From 4c630dbbc0128a5e35eb0bad1b0aab9f0b65dedb Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Sun, 12 Oct 2008 18:41:06 +0200 Subject: [PATCH] import cmake 2.6.0 Signed-off-by: Pierre Habouzit --- CMakeCPack.cmake | 89 + CMakeCPackOptions.cmake.in | 51 + CMakeGraphVizOptions.cmake | 1 + CMakeLists.txt | 500 + CMakeLogo.gif | Bin 0 -> 4481 bytes CTestConfig.cmake | 23 + CTestCustom.cmake.in | 52 + CTestCustom.ctest.in | 3 + ChangeLog.manual | 121 + ChangeLog.txt | 69537 ++++++++++++++++ CompileFlags.cmake | 44 + Copyright.txt | 50 + DartConfig.cmake | 61 + DartLocal.conf.in | 121 + Docs/cmake-indent.vim | 93 + Docs/cmake-mode.el | 241 + Docs/cmake-syntax.vim | 89 + Example/CMakeLists.txt | 10 + Example/Demo/CMakeLists.txt | 12 + Example/Demo/demo.cxx | 10 + Example/Demo/demo_b.cxx | 3 + Example/Hello/CMakeLists.txt | 3 + Example/Hello/hello.cxx | 7 + Example/Hello/hello.h | 11 + Modules/AddFileDependencies.cmake | 16 + Modules/CMake.cmake | 4 + Modules/CMakeASM-ATTInformation.cmake | 4 + Modules/CMakeASMCompiler.cmake.in | 11 + Modules/CMakeASMInformation.cmake | 61 + Modules/CMakeAddNewLanguage.txt | 17 + Modules/CMakeBackwardCompatibilityC.cmake | 71 + Modules/CMakeBackwardCompatibilityCXX.cmake | 40 + Modules/CMakeBorlandFindMake.cmake | 3 + Modules/CMakeBuildSettings.cmake.in | 29 + Modules/CMakeCCompiler.cmake.in | 36 + Modules/CMakeCCompilerABI.c | 28 + Modules/CMakeCCompilerId.c.in | 84 + Modules/CMakeCInformation.cmake | 175 + Modules/CMakeCXXCompiler.cmake.in | 36 + Modules/CMakeCXXCompilerABI.cpp | 24 + Modules/CMakeCXXCompilerId.cpp.in | 72 + Modules/CMakeCXXInformation.cmake | 243 + Modules/CMakeCommonLanguageInclude.cmake | 94 + Modules/CMakeCompilerABI.h | 26 + Modules/CMakeConfigurableFile.in | 2 + Modules/CMakeDependentOption.cmake | 37 + Modules/CMakeDetermineASM-ATTCompiler.cmake | 6 + Modules/CMakeDetermineASMCompiler.cmake | 77 + Modules/CMakeDetermineCCompiler.cmake | 149 + Modules/CMakeDetermineCXXCompiler.cmake | 159 + Modules/CMakeDetermineCompilerABI.cmake | 49 + Modules/CMakeDetermineCompilerId.cmake | 225 + Modules/CMakeDetermineFortranCompiler.cmake | 144 + Modules/CMakeDetermineJavaCompiler.cmake | 85 + Modules/CMakeDetermineRCCompiler.cmake | 48 + Modules/CMakeDetermineSystem.cmake | 154 + Modules/CMakeExportBuildSettings.cmake | 12 + Modules/CMakeFindBinUtils.cmake | 76 + Modules/CMakeFindFrameworks.cmake | 19 + Modules/CMakeFindWMake.cmake | 3 + Modules/CMakeFindXCode.cmake | 6 + Modules/CMakeForceCompiler.cmake | 49 + Modules/CMakeFortranCompiler.cmake.in | 29 + Modules/CMakeFortranCompilerId.F90.in | 78 + Modules/CMakeFortranInformation.cmake | 182 + Modules/CMakeGenericSystem.cmake | 80 + Modules/CMakeImportBuildSettings.cmake | 250 + Modules/CMakeJavaCompiler.cmake.in | 13 + Modules/CMakeJavaInformation.cmake | 41 + Modules/CMakeLists.txt | 12 + Modules/CMakeMSYSFindMake.cmake | 6 + Modules/CMakeMinGWFindMake.cmake | 10 + Modules/CMakeNMakeFindMake.cmake | 3 + Modules/CMakePlatformId.h.in | 83 + Modules/CMakePrintSystemInformation.cmake | 33 + Modules/CMakeRCCompiler.cmake.in | 6 + Modules/CMakeRCInformation.cmake | 33 + Modules/CMakeSystem.cmake.in | 15 + Modules/CMakeSystemSpecificInformation.cmake | 50 + Modules/CMakeTestASM-ATTCompiler.cmake | 9 + Modules/CMakeTestASMCompiler.cmake | 11 + Modules/CMakeTestCCompiler.cmake | 59 + Modules/CMakeTestCXXCompiler.cmake | 51 + Modules/CMakeTestForFreeVC.cxx | 3 + Modules/CMakeTestFortranCompiler.cmake | 66 + Modules/CMakeTestGNU.c | 9 + Modules/CMakeTestJavaCompiler.cmake | 7 + Modules/CMakeTestNMakeCLVersion.c | 2 + Modules/CMakeTestRCCompiler.cmake | 10 + Modules/CMakeUnixFindMake.cmake | 2 + Modules/CMakeVS6BackwardCompatibility.cmake | 13 + Modules/CMakeVS6FindMake.cmake | 10 + Modules/CMakeVS71FindMake.cmake | 11 + Modules/CMakeVS7BackwardCompatibility.cmake | 13 + Modules/CMakeVS7FindMake.cmake | 10 + Modules/CMakeVS8FindMake.cmake | 16 + Modules/CMakeVS9FindMake.cmake | 16 + Modules/COPYING-CMAKE-SCRIPTS | 22 + Modules/CPack.DS_Store.in | Bin 0 -> 12292 bytes Modules/CPack.Description.plist.in | 12 + Modules/CPack.Info.plist.in | 37 + Modules/CPack.OSXScriptLauncher.in | Bin 0 -> 1345804 bytes Modules/CPack.OSXX11.Info.plist.in | 36 + Modules/CPack.RuntimeScript.in | 66 + Modules/CPack.STGZ_Header.sh.in | 141 + Modules/CPack.VolumeIcon.icns.in | Bin 0 -> 45739 bytes Modules/CPack.background.png.in | Bin 0 -> 50482 bytes Modules/CPack.cmake | 219 + Modules/CPackDeb.cmake | 115 + Modules/CPackRPM.cmake | 227 + Modules/CPackZIP.cmake | 27 + Modules/CTest.cmake | 212 + Modules/CTestTargets.cmake | 69 + Modules/CheckCCompilerFlag.cmake | 21 + Modules/CheckCSourceCompiles.cmake | 60 + Modules/CheckCSourceRuns.cmake | 74 + Modules/CheckCXXCompilerFlag.cmake | 21 + Modules/CheckCXXSourceCompiles.cmake | 60 + Modules/CheckCXXSourceRuns.cmake | 74 + Modules/CheckForPthreads.c | 38 + Modules/CheckFortranFunctionExists.cmake | 50 + Modules/CheckFunctionExists.c | 23 + Modules/CheckFunctionExists.cmake | 54 + Modules/CheckIncludeFile.c.in | 13 + Modules/CheckIncludeFile.cmake | 63 + Modules/CheckIncludeFile.cxx.in | 6 + Modules/CheckIncludeFileCXX.cmake | 63 + Modules/CheckIncludeFiles.cmake | 59 + Modules/CheckLibraryExists.cmake | 52 + Modules/CheckLibraryExists.lists.in | 8 + Modules/CheckSizeOf.cmake | 4 + Modules/CheckStructHasMember.cmake | 39 + Modules/CheckSymbolExists.cmake | 70 + Modules/CheckTypeSize.cmake | 104 + Modules/CheckTypeSizeC.c.in | 47 + Modules/CheckVariableExists.c | 20 + Modules/CheckVariableExists.cmake | 48 + Modules/Dart.cmake | 110 + Modules/DartConfiguration.tcl.in | 62 + Modules/Documentation.cmake | 39 + Modules/DummyCXXFile.cxx | 4 + Modules/FLTKCompatibility.cmake | 1 + Modules/FeatureSummary.cmake | 64 + Modules/FindASPELL.cmake | 30 + Modules/FindAVIFile.cmake | 39 + Modules/FindBLAS.cmake | 338 + Modules/FindBZip2.cmake | 35 + Modules/FindBoost.cmake | 571 + Modules/FindCABLE.cmake | 68 + Modules/FindCURL.cmake | 27 + Modules/FindCVS.cmake | 56 + Modules/FindCups.cmake | 48 + Modules/FindCurses.cmake | 123 + Modules/FindCygwin.cmake | 14 + Modules/FindDCMTK.cmake | 129 + Modules/FindDart.cmake | 16 + Modules/FindDoxygen.cmake | 102 + Modules/FindEXPAT.cmake | 28 + Modules/FindFLTK.cmake | 244 + Modules/FindFLTK2.cmake | 268 + Modules/FindFreetype.cmake | 94 + Modules/FindGCCXML.cmake | 8 + Modules/FindGDAL.cmake | 84 + Modules/FindGIF.cmake | 67 + Modules/FindGLU.cmake | 14 + Modules/FindGLUT.cmake | 78 + Modules/FindGTK.cmake | 152 + Modules/FindGettext.cmake | 65 + Modules/FindGnuplot.cmake | 28 + Modules/FindHSPELL.cmake | 32 + Modules/FindHTMLHelp.cmake | 41 + Modules/FindITK.cmake | 87 + Modules/FindImageMagick.cmake | 82 + Modules/FindJNI.cmake | 146 + Modules/FindJPEG.cmake | 28 + Modules/FindJasper.cmake | 38 + Modules/FindJava.cmake | 51 + Modules/FindKDE3.cmake | 272 + Modules/FindKDE4.cmake | 74 + Modules/FindLAPACK.cmake | 196 + Modules/FindLATEX.cmake | 113 + Modules/FindLibXml2.cmake | 46 + Modules/FindLibXslt.cmake | 45 + Modules/FindLua50.cmake | 101 + Modules/FindLua51.cmake | 74 + Modules/FindMFC.cmake | 19 + Modules/FindMPEG.cmake | 29 + Modules/FindMPEG2.cmake | 39 + Modules/FindMPI.cmake | 307 + Modules/FindMatlab.cmake | 106 + Modules/FindMotif.cmake | 31 + Modules/FindOpenAL.cmake | 100 + Modules/FindOpenGL.cmake | 136 + Modules/FindOpenSSL.cmake | 70 + Modules/FindOpenThreads.cmake | 164 + Modules/FindPHP4.cmake | 70 + Modules/FindPNG.cmake | 44 + Modules/FindPackageHandleStandardArgs.cmake | 62 + Modules/FindPackageMessage.cmake | 35 + Modules/FindPerl.cmake | 37 + Modules/FindPerlLibs.cmake | 64 + Modules/FindPhysFS.cmake | 59 + Modules/FindPike.cmake | 24 + Modules/FindPkgConfig.cmake | 360 + Modules/FindProducer.cmake | 82 + Modules/FindPythonInterp.cmake | 28 + Modules/FindPythonLibs.cmake | 162 + Modules/FindQt.cmake | 148 + Modules/FindQt3.cmake | 319 + Modules/FindQt4.cmake | 1593 + Modules/FindQuickTime.cmake | 41 + Modules/FindRuby.cmake | 94 + Modules/FindSDL.cmake | 192 + Modules/FindSDL_image.cmake | 72 + Modules/FindSDL_mixer.cmake | 72 + Modules/FindSDL_net.cmake | 72 + Modules/FindSDL_sound.cmake | 412 + Modules/FindSDL_ttf.cmake | 73 + Modules/FindSWIG.cmake | 56 + Modules/FindSelfPackers.cmake | 55 + Modules/FindSubversion.cmake | 126 + Modules/FindTCL.cmake | 212 + Modules/FindTIFF.cmake | 22 + Modules/FindTclStub.cmake | 107 + Modules/FindTclsh.cmake | 81 + Modules/FindThreads.cmake | 119 + Modules/FindUnixCommands.cmake | 80 + Modules/FindVTK.cmake | 140 + Modules/FindWget.cmake | 23 + Modules/FindWish.cmake | 75 + Modules/FindX11.cmake | 425 + Modules/FindXMLRPC.cmake | 135 + Modules/FindZLIB.cmake | 30 + Modules/Findosg.cmake | 79 + Modules/FindosgDB.cmake | 81 + Modules/FindosgFX.cmake | 81 + Modules/FindosgGA.cmake | 81 + Modules/FindosgIntrospection.cmake | 81 + Modules/FindosgManipulator.cmake | 81 + Modules/FindosgParticle.cmake | 81 + Modules/FindosgProducer.cmake | 81 + Modules/FindosgShadow.cmake | 81 + Modules/FindosgSim.cmake | 81 + Modules/FindosgTerrain.cmake | 81 + Modules/FindosgText.cmake | 81 + Modules/FindosgUtil.cmake | 81 + Modules/FindosgViewer.cmake | 81 + Modules/FindwxWidgets.cmake | 969 + Modules/FindwxWindows.cmake | 693 + Modules/GetPrerequisites.cmake | 492 + Modules/ITKCompatibility.cmake | 3 + Modules/InstallRequiredSystemLibraries.cmake | 202 + Modules/KDE3Macros.cmake | 393 + Modules/MacroAddFileDependencies.cmake | 15 + Modules/NSIS.InstallOptions.ini.in | 46 + Modules/NSIS.template.in | 649 + Modules/Platform/AIX-VisualAge-Fortran.cmake | 1 + Modules/Platform/AIX.cmake | 72 + Modules/Platform/BSDOS.cmake | 2 + Modules/Platform/BeOS.cmake | 14 + Modules/Platform/BlueGeneL.cmake | 40 + Modules/Platform/CMakeLists.txt | 3 + Modules/Platform/CYGWIN-g77.cmake | 6 + Modules/Platform/CYGWIN.cmake | 54 + Modules/Platform/Catamount.cmake | 26 + Modules/Platform/Darwin-icc.cmake | 129 + Modules/Platform/Darwin-icpc.cmake | 3 + Modules/Platform/Darwin-xlc.cmake | 6 + Modules/Platform/Darwin.cmake | 157 + Modules/Platform/DragonFly.cmake | 5 + Modules/Platform/FreeBSD.cmake | 28 + Modules/Platform/GNU.cmake | 10 + Modules/Platform/Generic-ADSP-ASM.cmake | 7 + Modules/Platform/Generic-ADSP-C.cmake | 20 + Modules/Platform/Generic-ADSP-CXX.cmake | 18 + Modules/Platform/Generic-ADSP-Common.cmake | 120 + Modules/Platform/Generic-SDCC-C.cmake | 54 + Modules/Platform/Generic.cmake | 11 + Modules/Platform/HP-UX.cmake | 123 + Modules/Platform/IRIX.cmake | 46 + Modules/Platform/IRIX64.cmake | 75 + Modules/Platform/Linux-GNU-Fortran.cmake | 16 + Modules/Platform/Linux-Intel-C.cmake | 13 + Modules/Platform/Linux-Intel-CXX.cmake | 13 + Modules/Platform/Linux-Intel-Fortran.cmake | 14 + Modules/Platform/Linux-PGI-C.cmake | 5 + Modules/Platform/Linux-PGI-CXX.cmake | 4 + Modules/Platform/Linux-SunPro-C.cmake | 24 + Modules/Platform/Linux-SunPro-CXX.cmake | 24 + Modules/Platform/Linux-SunPro-Fortran.cmake | 16 + Modules/Platform/Linux-VisualAge-C.cmake | 2 + .../Platform/Linux-VisualAge-Fortran.cmake | 3 + Modules/Platform/Linux-como.cmake | 18 + Modules/Platform/Linux-icpc.cmake | 23 + Modules/Platform/Linux-ifort.cmake | 14 + Modules/Platform/Linux.cmake | 61 + Modules/Platform/MP-RAS.cmake | 10 + Modules/Platform/NetBSD.cmake | 15 + Modules/Platform/OSF1.cmake | 45 + Modules/Platform/OpenBSD.cmake | 2 + Modules/Platform/QNX.cmake | 38 + Modules/Platform/RISCos.cmake | 6 + Modules/Platform/SCO_SV.cmake | 5 + Modules/Platform/SINIX.cmake | 2 + Modules/Platform/SunOS-SunPro-Fortran.cmake | 2 + Modules/Platform/SunOS.cmake | 114 + Modules/Platform/Tru64.cmake | 2 + Modules/Platform/ULTRIX.cmake | 5 + Modules/Platform/UNIX_SV.cmake | 3 + Modules/Platform/UnixPaths.cmake | 57 + Modules/Platform/UnixWare.cmake | 3 + Modules/Platform/Windows-bcc32.cmake | 128 + Modules/Platform/Windows-cl.cmake | 278 + Modules/Platform/Windows-cl.cmake.in | 13 + Modules/Platform/Windows-df.cmake | 68 + Modules/Platform/Windows-g++.cmake | 1 + Modules/Platform/Windows-g77.cmake | 16 + Modules/Platform/Windows-gcc.cmake | 66 + Modules/Platform/Windows-icl.cmake | 77 + Modules/Platform/Windows-ifort.cmake | 69 + Modules/Platform/Windows-wcl386.cmake | 70 + Modules/Platform/Windows.cmake | 36 + Modules/Platform/WindowsPaths.cmake | 31 + Modules/Platform/Xenix.cmake | 2 + Modules/Platform/cl.cmake | 62 + Modules/Platform/eCos.cmake | 58 + Modules/Platform/g77.cmake | 7 + Modules/Platform/gas.cmake | 19 + Modules/Platform/gcc.cmake | 27 + Modules/Platform/kFreeBSD.cmake | 12 + Modules/Platform/syllable.cmake | 33 + Modules/Platform/xlf.cmake | 1 + Modules/SystemInformation.cmake | 88 + Modules/SystemInformation.in | 92 + Modules/TestBigEndian.cmake | 99 + Modules/TestCXXAcceptsFlag.cmake | 30 + Modules/TestEndianess.c.in | 20 + Modules/TestForANSIForScope.cmake | 31 + Modules/TestForANSIStreamHeaders.cmake | 20 + Modules/TestForANSIStreamHeaders.cxx | 6 + Modules/TestForAnsiForScope.cxx | 7 + Modules/TestForSSTREAM.cmake | 29 + Modules/TestForSSTREAM.cxx | 11 + Modules/TestForSTDNamespace.cmake | 29 + Modules/TestForSTDNamespace.cxx | 6 + Modules/UseEcos.cmake | 223 + Modules/UsePkgConfig.cmake | 57 + Modules/UseQt4.cmake | 70 + Modules/UseSWIG.cmake | 207 + Modules/UseVTK40.cmake | 22 + Modules/UseVTKBuildSettings40.cmake | 25 + Modules/UseVTKConfig40.cmake | 396 + Modules/Use_wxWindows.cmake | 50 + Modules/UsewxWidgets.cmake | 71 + Modules/VTKCompatibility.cmake | 38 + Modules/ecos_clean.cmake | 12 + Modules/kde3init_dummy.cpp.in | 6 + Modules/kde3uic.cmake | 20 + Modules/readme.txt | 102 + Readme.txt | 55 + Source/.cvsignore | 5 + Source/CMakeLists.txt | 459 + Source/CPack/OSXScriptLauncher.cxx | 153 + Source/CPack/bills-comments.txt | 68 + Source/CPack/cmCPackConfigure.h.in | 16 + Source/CPack/cmCPackCygwinBinaryGenerator.cxx | 112 + Source/CPack/cmCPackCygwinBinaryGenerator.h | 44 + Source/CPack/cmCPackCygwinSourceGenerator.cxx | 197 + Source/CPack/cmCPackCygwinSourceGenerator.h | 46 + Source/CPack/cmCPackDebGenerator.cxx | 506 + Source/CPack/cmCPackDebGenerator.h | 47 + Source/CPack/cmCPackGenerator.cxx | 1094 + Source/CPack/cmCPackGenerator.h | 137 + Source/CPack/cmCPackGeneratorFactory.cxx | 136 + Source/CPack/cmCPackGeneratorFactory.h | 64 + Source/CPack/cmCPackLog.cxx | 224 + Source/CPack/cmCPackLog.h | 160 + Source/CPack/cmCPackNSISGenerator.cxx | 417 + Source/CPack/cmCPackNSISGenerator.h | 53 + Source/CPack/cmCPackOSXX11Generator.cxx | 267 + Source/CPack/cmCPackOSXX11Generator.h | 52 + Source/CPack/cmCPackPackageMakerGenerator.cxx | 363 + Source/CPack/cmCPackPackageMakerGenerator.h | 57 + Source/CPack/cmCPackRPMGenerator.cxx | 52 + Source/CPack/cmCPackRPMGenerator.h | 51 + Source/CPack/cmCPackSTGZGenerator.cxx | 133 + Source/CPack/cmCPackSTGZGenerator.h | 47 + Source/CPack/cmCPackTGZGenerator.cxx | 298 + Source/CPack/cmCPackTGZGenerator.h | 52 + Source/CPack/cmCPackTarBZip2Generator.cxx | 180 + Source/CPack/cmCPackTarBZip2Generator.h | 47 + Source/CPack/cmCPackTarCompressGenerator.cxx | 255 + Source/CPack/cmCPackTarCompressGenerator.h | 48 + Source/CPack/cmCPackZIPGenerator.cxx | 103 + Source/CPack/cmCPackZIPGenerator.h | 49 + Source/CPack/cpack.cxx | 478 + Source/CPack/cygwin.readme | 69 + Source/CTest/cmCTestBuildAndTestHandler.cxx | 504 + Source/CTest/cmCTestBuildAndTestHandler.h | 83 + Source/CTest/cmCTestBuildCommand.cxx | 134 + Source/CTest/cmCTestBuildCommand.h | 79 + Source/CTest/cmCTestBuildHandler.cxx | 1022 + Source/CTest/cmCTestBuildHandler.h | 141 + Source/CTest/cmCTestCommand.h | 45 + Source/CTest/cmCTestConfigureCommand.cxx | 108 + Source/CTest/cmCTestConfigureCommand.h | 77 + Source/CTest/cmCTestConfigureHandler.cxx | 136 + Source/CTest/cmCTestConfigureHandler.h | 44 + Source/CTest/cmCTestCoverageCommand.cxx | 38 + Source/CTest/cmCTestCoverageCommand.h | 77 + Source/CTest/cmCTestCoverageHandler.cxx | 1691 + Source/CTest/cmCTestCoverageHandler.h | 142 + .../cmCTestEmptyBinaryDirectoryCommand.cxx | 41 + .../cmCTestEmptyBinaryDirectoryCommand.h | 83 + Source/CTest/cmCTestGenericHandler.cxx | 172 + Source/CTest/cmCTestGenericHandler.h | 105 + Source/CTest/cmCTestHandlerCommand.cxx | 170 + Source/CTest/cmCTestHandlerCommand.h | 64 + Source/CTest/cmCTestMemCheckCommand.cxx | 37 + Source/CTest/cmCTestMemCheckCommand.h | 79 + Source/CTest/cmCTestMemCheckHandler.cxx | 966 + Source/CTest/cmCTestMemCheckHandler.h | 136 + .../CTest/cmCTestReadCustomFilesCommand.cxx | 40 + Source/CTest/cmCTestReadCustomFilesCommand.h | 80 + Source/CTest/cmCTestRunScriptCommand.cxx | 45 + Source/CTest/cmCTestRunScriptCommand.h | 84 + Source/CTest/cmCTestScriptHandler.cxx | 1005 + Source/CTest/cmCTestScriptHandler.h | 171 + Source/CTest/cmCTestSleepCommand.cxx | 60 + Source/CTest/cmCTestSleepCommand.h | 83 + Source/CTest/cmCTestStartCommand.cxx | 109 + Source/CTest/cmCTestStartCommand.h | 83 + Source/CTest/cmCTestSubmitCommand.cxx | 112 + Source/CTest/cmCTestSubmitCommand.h | 75 + Source/CTest/cmCTestSubmitHandler.cxx | 1105 + Source/CTest/cmCTestSubmitHandler.h | 83 + Source/CTest/cmCTestTestCommand.cxx | 78 + Source/CTest/cmCTestTestCommand.h | 85 + Source/CTest/cmCTestTestHandler.cxx | 1968 + Source/CTest/cmCTestTestHandler.h | 218 + Source/CTest/cmCTestUpdateCommand.cxx | 95 + Source/CTest/cmCTestUpdateCommand.h | 76 + Source/CTest/cmCTestUpdateHandler.cxx | 1115 + Source/CTest/cmCTestUpdateHandler.h | 73 + Source/CursesDialog/.NoDartCoverage | 1 + Source/CursesDialog/CMakeLists.txt | 26 + Source/CursesDialog/ccmake.cxx | 221 + Source/CursesDialog/cmCursesBoolWidget.cxx | 79 + Source/CursesDialog/cmCursesBoolWidget.h | 45 + .../cmCursesCacheEntryComposite.cxx | 108 + .../cmCursesCacheEntryComposite.h | 47 + Source/CursesDialog/cmCursesDummyWidget.cxx | 31 + Source/CursesDialog/cmCursesDummyWidget.h | 41 + .../CursesDialog/cmCursesFilePathWidget.cxx | 25 + Source/CursesDialog/cmCursesFilePathWidget.h | 33 + Source/CursesDialog/cmCursesForm.cxx | 62 + Source/CursesDialog/cmCursesForm.h | 80 + Source/CursesDialog/cmCursesLabelWidget.cxx | 38 + Source/CursesDialog/cmCursesLabelWidget.h | 43 + .../CursesDialog/cmCursesLongMessageForm.cxx | 213 + Source/CursesDialog/cmCursesLongMessageForm.h | 63 + Source/CursesDialog/cmCursesMainForm.cxx | 1307 + Source/CursesDialog/cmCursesMainForm.h | 170 + Source/CursesDialog/cmCursesPathWidget.cxx | 99 + Source/CursesDialog/cmCursesPathWidget.h | 45 + .../CursesDialog/cmCursesStandardIncludes.h | 88 + Source/CursesDialog/cmCursesStringWidget.cxx | 247 + Source/CursesDialog/cmCursesStringWidget.h | 81 + Source/CursesDialog/cmCursesWidget.cxx | 63 + Source/CursesDialog/cmCursesWidget.h | 92 + Source/CursesDialog/form/.NoDartCoverage | 1 + Source/CursesDialog/form/CMakeLists.txt | 55 + Source/CursesDialog/form/READ.ME | 15 + Source/CursesDialog/form/cmFormConfigure.h.in | 26 + Source/CursesDialog/form/eti.h | 52 + Source/CursesDialog/form/fld_arg.c | 91 + Source/CursesDialog/form/fld_attr.c | 116 + Source/CursesDialog/form/fld_current.c | 124 + Source/CursesDialog/form/fld_def.c | 346 + Source/CursesDialog/form/fld_dup.c | 97 + Source/CursesDialog/form/fld_ftchoice.c | 62 + Source/CursesDialog/form/fld_ftlink.c | 83 + Source/CursesDialog/form/fld_info.c | 91 + Source/CursesDialog/form/fld_just.c | 81 + Source/CursesDialog/form/fld_link.c | 90 + Source/CursesDialog/form/fld_max.c | 74 + Source/CursesDialog/form/fld_move.c | 62 + Source/CursesDialog/form/fld_newftyp.c | 125 + Source/CursesDialog/form/fld_opts.c | 124 + Source/CursesDialog/form/fld_pad.c | 78 + Source/CursesDialog/form/fld_page.c | 76 + Source/CursesDialog/form/fld_stat.c | 73 + Source/CursesDialog/form/fld_type.c | 51 + Source/CursesDialog/form/fld_user.c | 67 + Source/CursesDialog/form/form.h | 401 + Source/CursesDialog/form/form.priv.h | 134 + Source/CursesDialog/form/frm_cursor.c | 66 + Source/CursesDialog/form/frm_data.c | 183 + Source/CursesDialog/form/frm_def.c | 376 + Source/CursesDialog/form/frm_driver.c | 3880 + Source/CursesDialog/form/frm_hook.c | 140 + Source/CursesDialog/form/frm_opts.c | 116 + Source/CursesDialog/form/frm_page.c | 100 + Source/CursesDialog/form/frm_post.c | 117 + Source/CursesDialog/form/frm_req_name.c | 169 + Source/CursesDialog/form/frm_scale.c | 63 + Source/CursesDialog/form/frm_sub.c | 69 + Source/CursesDialog/form/frm_user.c | 67 + Source/CursesDialog/form/frm_win.c | 70 + Source/CursesDialog/form/fty_alnum.c | 138 + Source/CursesDialog/form/fty_alpha.c | 139 + Source/CursesDialog/form/fty_enum.c | 295 + Source/CursesDialog/form/fty_int.c | 161 + Source/CursesDialog/form/fty_ipv4.c | 84 + Source/CursesDialog/form/fty_num.c | 192 + Source/CursesDialog/form/fty_regex.c | 264 + Source/CursesDialog/form/llib-lform | 694 + Source/CursesDialog/form/mf_common.h | 93 + Source/CursesDialog/form/nc_alloc.h | 83 + Source/FLTKDialog/CMakeLists.txt | 20 + Source/FLTKDialog/CMakeSetupGUI.fl | 116 + .../CMakeSetupGUIImplementation.cxx | 844 + .../FLTKDialog/CMakeSetupGUIImplementation.h | 85 + Source/FLTKDialog/FLTKDialog.cxx | 44 + Source/FLTKDialog/FLTKDialog.dsp | 116 + Source/FLTKDialog/FLTKPropertyItemRow.cxx | 387 + Source/FLTKDialog/FLTKPropertyItemRow.h | 83 + Source/FLTKDialog/FLTKPropertyList.cxx | 184 + Source/FLTKDialog/FLTKPropertyList.h | 143 + Source/MFCDialog/.cvsignore | 1 + Source/MFCDialog/CMakeCommandLineInfo.cpp | 142 + Source/MFCDialog/CMakeCommandLineInfo.h | 70 + Source/MFCDialog/CMakeGenDialog.cpp | 122 + Source/MFCDialog/CMakeGenDialog.h | 70 + Source/MFCDialog/CMakeLists.txt | 109 + Source/MFCDialog/CMakeSetup.cpp | 158 + Source/MFCDialog/CMakeSetup.h | 65 + Source/MFCDialog/CMakeSetup.rc | 246 + Source/MFCDialog/CMakeSetupDialog.cpp | 1552 + Source/MFCDialog/CMakeSetupDialog.h | 152 + Source/MFCDialog/CMakeSetupManifest.xml | 10 + Source/MFCDialog/MakeHelp.cpp | 43 + Source/MFCDialog/MakeHelp.h | 62 + Source/MFCDialog/PathDialog.cpp | 377 + Source/MFCDialog/PathDialog.h | 90 + Source/MFCDialog/PropertyList.cpp | 847 + Source/MFCDialog/PropertyList.h | 179 + Source/MFCDialog/StdAfx.cpp | 8 + Source/MFCDialog/StdAfx.h | 45 + Source/MFCDialog/res/CMakeSetupDialog.ico | Bin 0 -> 24542 bytes Source/MFCDialog/res/CMakeSetupDialog.rc2 | 13 + Source/MFCDialog/resource.h | 48 + Source/QtDialog/AddCacheEntry.cxx | 86 + Source/QtDialog/AddCacheEntry.h | 40 + Source/QtDialog/AddCacheEntry.ui | 97 + Source/QtDialog/CMake.desktop | 13 + .../CMakeIngestOSXBundleLibraries.cmake | 339 + Source/QtDialog/CMakeLists.txt | 100 + Source/QtDialog/CMakeSetup.cxx | 189 + Source/QtDialog/CMakeSetup.icns | Bin 0 -> 33452 bytes Source/QtDialog/CMakeSetup.ico | Bin 0 -> 24542 bytes Source/QtDialog/CMakeSetup.png | Bin 0 -> 358 bytes Source/QtDialog/CMakeSetup.qrc | 7 + Source/QtDialog/CMakeSetup.rc | 1 + Source/QtDialog/CMakeSetupDialog.cxx | 887 + Source/QtDialog/CMakeSetupDialog.h | 123 + Source/QtDialog/CMakeSetupDialog.ui | 306 + Source/QtDialog/Delete16.png | Bin 0 -> 731 bytes Source/QtDialog/MacInstallDialog.ui | 103 + Source/QtDialog/Plus16.png | Bin 0 -> 358 bytes Source/QtDialog/QCMake.cxx | 386 + Source/QtDialog/QCMake.h | 145 + Source/QtDialog/QCMakeCacheView.cxx | 567 + Source/QtDialog/QCMakeCacheView.h | 159 + Source/QtDialog/QMacInstallDialog.cxx | 122 + Source/QtDialog/QMacInstallDialog.h | 20 + Source/QtDialog/QtDialogCPack.cmake.in | 17 + Source/QtDialog/README | 3 + Source/QtDialog/cmakecache.xml | 8 + Source/QtDialog/postflight.sh.in | 3 + Source/QtDialog/postupgrade.sh.in | 2 + Source/WXDialog/CMakeIcon.xpm | 276 + Source/WXDialog/CMakeLists.txt | 87 + Source/WXDialog/CMakeSetup.cpp | 123 + Source/WXDialog/CMakeSetup.h | 92 + Source/WXDialog/CMakeSetup.pjd | 3514 + Source/WXDialog/CMakeSetup.rc | 12 + Source/WXDialog/CMakeSetupFrame.cpp | 1778 + Source/WXDialog/CMakeSetupFrame.h | 360 + Source/WXDialog/CommandLineInfo.cpp | 191 + Source/WXDialog/CommandLineInfo.h | 67 + Source/WXDialog/NGDialog.exe.manifest | 22 + Source/WXDialog/NGDialog.ico | Bin 0 -> 24542 bytes Source/WXDialog/PropertyList.cpp | 856 + Source/WXDialog/PropertyList.h | 339 + Source/WXDialog/about.html | 21 + Source/WXDialog/aboutdlg.cpp | 210 + Source/WXDialog/aboutdlg.h | 117 + Source/WXDialog/app_resources.cpp | 86 + Source/WXDialog/app_resources.h | 60 + Source/WXDialog/bin/FindUPX.cmake | 18 + Source/WXDialog/bin/FindwxW.cmake | 438 + Source/WXDialog/bin/FindwxWin.cmake | 469 + Source/WXDialog/bin/UsewxW.cmake | 80 + Source/WXDialog/changelog.txt | 22 + Source/WXDialog/cmake_icon.gif | Bin 0 -> 892 bytes Source/WXDialog/cmake_icon.xpm | 276 + Source/WXDialog/cmake_logo.xpm | 50 + Source/WXDialog/cmakesetup.done.xml | 2 + Source/WXDialog/cmakesetup.xml | 104 + Source/WXDialog/config.h | 43 + Source/WXDialog/optionsdlg.cpp | 199 + Source/WXDialog/optionsdlg.h | 125 + Source/WXDialog/progressdlg.cpp | 177 + Source/WXDialog/progressdlg.h | 139 + Source/cmAddCustomCommandCommand.cxx | 378 + Source/cmAddCustomCommandCommand.h | 169 + Source/cmAddCustomTargetCommand.cxx | 172 + Source/cmAddCustomTargetCommand.h | 103 + Source/cmAddDefinitionsCommand.cxx | 36 + Source/cmAddDefinitionsCommand.h | 87 + Source/cmAddDependenciesCommand.cxx | 55 + Source/cmAddDependenciesCommand.h | 81 + Source/cmAddExecutableCommand.cxx | 133 + Source/cmAddExecutableCommand.h | 121 + Source/cmAddLibraryCommand.cxx | 162 + Source/cmAddLibraryCommand.h | 125 + Source/cmAddSubDirectoryCommand.cxx | 128 + Source/cmAddSubDirectoryCommand.h | 96 + Source/cmAddTestCommand.cxx | 50 + Source/cmAddTestCommand.h | 81 + Source/cmAuxSourceDirectoryCommand.cxx | 94 + Source/cmAuxSourceDirectoryCommand.h | 91 + Source/cmBootstrapCommands.cxx | 164 + Source/cmBreakCommand.cxx | 26 + Source/cmBreakCommand.h | 78 + Source/cmBuildCommand.cxx | 57 + Source/cmBuildCommand.h | 77 + Source/cmBuildNameCommand.cxx | 82 + Source/cmBuildNameCommand.h | 87 + Source/cmCMakeMinimumRequired.cxx | 121 + Source/cmCMakeMinimumRequired.h | 90 + Source/cmCMakePolicyCommand.cxx | 122 + Source/cmCMakePolicyCommand.h | 131 + Source/cmCPluginAPI.cxx | 950 + Source/cmCPluginAPI.h | 248 + Source/cmCTest.cxx | 2609 + Source/cmCTest.h | 445 + Source/cmCacheManager.cxx | 993 + Source/cmCacheManager.h | 181 + Source/cmCallVisualStudioMacro.cxx | 504 + Source/cmCallVisualStudioMacro.h | 49 + Source/cmCommand.h | 179 + Source/cmCommandArgumentLexer.cxx | 2006 + Source/cmCommandArgumentLexer.h | 344 + Source/cmCommandArgumentLexer.in.l | 157 + Source/cmCommandArgumentParser.cxx | 1658 + Source/cmCommandArgumentParser.y | 229 + Source/cmCommandArgumentParserHelper.cxx | 320 + Source/cmCommandArgumentParserHelper.h | 113 + Source/cmCommandArgumentParserTokens.h | 88 + Source/cmCommandArgumentsHelper.cxx | 312 + Source/cmCommandArgumentsHelper.h | 212 + Source/cmCommands.cxx | 90 + Source/cmCommands.h | 33 + Source/cmComputeComponentGraph.cxx | 161 + Source/cmComputeComponentGraph.h | 87 + Source/cmComputeLinkDepends.cxx | 930 + Source/cmComputeLinkDepends.h | 152 + Source/cmComputeLinkInformation.cxx | 1633 + Source/cmComputeLinkInformation.h | 176 + Source/cmComputeTargetDepends.cxx | 431 + Source/cmComputeTargetDepends.h | 76 + Source/cmConfigure.cmake.h.in | 32 + Source/cmConfigureFileCommand.cxx | 106 + Source/cmConfigureFileCommand.h | 95 + Source/cmCoreTryCompile.cxx | 445 + Source/cmCoreTryCompile.h | 65 + Source/cmCreateTestSourceList.cxx | 194 + Source/cmCreateTestSourceList.h | 95 + Source/cmCustomCommand.cxx | 156 + Source/cmCustomCommand.h | 89 + Source/cmData.h | 43 + Source/cmDefinePropertyCommand.cxx | 144 + Source/cmDefinePropertyCommand.h | 98 + Source/cmDepends.cxx | 234 + Source/cmDepends.h | 116 + Source/cmDependsC.cxx | 429 + Source/cmDependsC.h | 98 + Source/cmDependsFortran.cxx | 1255 + Source/cmDependsFortran.h | 100 + Source/cmDependsFortranLexer.cxx | 2398 + Source/cmDependsFortranLexer.h | 346 + Source/cmDependsFortranLexer.in.l | 188 + Source/cmDependsFortranParser.cxx | 2038 + Source/cmDependsFortranParser.h | 101 + Source/cmDependsFortranParser.y | 331 + Source/cmDependsFortranParserTokens.h | 117 + Source/cmDependsJava.cxx | 49 + Source/cmDependsJava.h | 46 + Source/cmDependsJavaLexer.cxx | 2547 + Source/cmDependsJavaLexer.h | 339 + Source/cmDependsJavaLexer.in.l | 193 + Source/cmDependsJavaParser.cxx | 6026 ++ Source/cmDependsJavaParser.y | 3231 + Source/cmDependsJavaParserHelper.cxx | 434 + Source/cmDependsJavaParserHelper.h | 110 + Source/cmDependsJavaParserTokens.h | 254 + Source/cmDocumentVariables.cxx | 1106 + Source/cmDocumentVariables.h | 26 + Source/cmDocumentation.cxx | 1466 + Source/cmDocumentation.h | 191 + Source/cmDocumentationFormatter.cxx | 156 + Source/cmDocumentationFormatter.h | 70 + Source/cmDocumentationFormatterDocbook.cxx | 256 + Source/cmDocumentationFormatterDocbook.h | 45 + Source/cmDocumentationFormatterHTML.cxx | 253 + Source/cmDocumentationFormatterHTML.h | 46 + Source/cmDocumentationFormatterMan.cxx | 87 + Source/cmDocumentationFormatterMan.h | 41 + Source/cmDocumentationFormatterText.cxx | 185 + Source/cmDocumentationFormatterText.h | 45 + Source/cmDocumentationFormatterUsage.cxx | 68 + Source/cmDocumentationFormatterUsage.h | 36 + Source/cmDocumentationSection.cxx | 86 + Source/cmDocumentationSection.h | 73 + Source/cmDumpDocumentation.cxx | 155 + Source/cmDynamicLoader.cxx | 117 + Source/cmDynamicLoader.h | 52 + Source/cmELF.cxx | 921 + Source/cmELF.h | 113 + Source/cmElseCommand.cxx | 26 + Source/cmElseCommand.h | 77 + Source/cmElseIfCommand.cxx | 25 + Source/cmElseIfCommand.h | 77 + Source/cmEnableLanguageCommand.cxx | 48 + Source/cmEnableLanguageCommand.h | 81 + Source/cmEnableTestingCommand.cxx | 27 + Source/cmEnableTestingCommand.h | 84 + Source/cmEndForEachCommand.cxx | 28 + Source/cmEndForEachCommand.h | 84 + Source/cmEndFunctionCommand.cxx | 28 + Source/cmEndFunctionCommand.h | 84 + Source/cmEndIfCommand.cxx | 34 + Source/cmEndIfCommand.h | 77 + Source/cmEndMacroCommand.cxx | 28 + Source/cmEndMacroCommand.h | 84 + Source/cmEndWhileCommand.cxx | 28 + Source/cmEndWhileCommand.h | 84 + Source/cmExecProgramCommand.cxx | 150 + Source/cmExecProgramCommand.h | 100 + Source/cmExecuteProcessCommand.cxx | 427 + Source/cmExecuteProcessCommand.h | 118 + Source/cmExecutionStatus.h | 60 + Source/cmExportBuildFileGenerator.cxx | 161 + Source/cmExportBuildFileGenerator.h | 66 + Source/cmExportCommand.cxx | 186 + Source/cmExportCommand.h | 104 + Source/cmExportFileGenerator.cxx | 405 + Source/cmExportFileGenerator.h | 108 + Source/cmExportInstallFileGenerator.cxx | 305 + Source/cmExportInstallFileGenerator.h | 123 + Source/cmExportLibraryDependencies.cxx | 209 + Source/cmExportLibraryDependencies.h | 104 + Source/cmExprLexer.cxx | 1934 + Source/cmExprLexer.h | 339 + Source/cmExprLexer.in.l | 78 + Source/cmExprParser.cxx | 1438 + Source/cmExprParser.y | 174 + Source/cmExprParserHelper.cxx | 123 + Source/cmExprParserHelper.h | 79 + Source/cmExprParserTokens.h | 76 + Source/cmExternalMakefileProjectGenerator.cxx | 70 + Source/cmExternalMakefileProjectGenerator.h | 75 + Source/cmExtraCodeBlocksGenerator.cxx | 440 + Source/cmExtraCodeBlocksGenerator.h | 68 + Source/cmExtraEclipseCDT4Generator.cxx | 883 + Source/cmExtraEclipseCDT4Generator.h | 116 + Source/cmFLTKWrapUICommand.cxx | 166 + Source/cmFLTKWrapUICommand.h | 98 + Source/cmFileCommand.cxx | 2277 + Source/cmFileCommand.h | 206 + Source/cmFileTimeComparison.cxx | 279 + Source/cmFileTimeComparison.h | 56 + Source/cmFindBase.cxx | 591 + Source/cmFindBase.h | 78 + Source/cmFindCommon.cxx | 479 + Source/cmFindCommon.h | 95 + Source/cmFindFileCommand.cxx | 30 + Source/cmFindFileCommand.h | 56 + Source/cmFindLibraryCommand.cxx | 321 + Source/cmFindLibraryCommand.h | 76 + Source/cmFindPackageCommand.cxx | 1838 + Source/cmFindPackageCommand.h | 126 + Source/cmFindPathCommand.cxx | 229 + Source/cmFindPathCommand.h | 77 + Source/cmFindProgramCommand.cxx | 189 + Source/cmFindProgramCommand.h | 80 + Source/cmForEachCommand.cxx | 214 + Source/cmForEachCommand.h | 121 + Source/cmFunctionBlocker.h | 56 + Source/cmFunctionCommand.cxx | 292 + Source/cmFunctionCommand.h | 115 + Source/cmGeneratedFileStream.cxx | 313 + Source/cmGeneratedFileStream.h | 157 + Source/cmGetCMakePropertyCommand.cxx | 65 + Source/cmGetCMakePropertyCommand.h | 73 + Source/cmGetDirectoryPropertyCommand.cxx | 101 + Source/cmGetDirectoryPropertyCommand.h | 79 + Source/cmGetFilenameComponentCommand.cxx | 128 + Source/cmGetFilenameComponentCommand.h | 95 + Source/cmGetPropertyCommand.cxx | 360 + Source/cmGetPropertyCommand.h | 119 + Source/cmGetSourceFilePropertyCommand.cxx | 57 + Source/cmGetSourceFilePropertyCommand.h | 69 + Source/cmGetTargetPropertyCommand.cxx | 44 + Source/cmGetTargetPropertyCommand.h | 85 + Source/cmGetTestPropertyCommand.cxx | 47 + Source/cmGetTestPropertyCommand.h | 68 + Source/cmGlobalBorlandMakefileGenerator.cxx | 68 + Source/cmGlobalBorlandMakefileGenerator.h | 53 + Source/cmGlobalGenerator.cxx | 1892 + Source/cmGlobalGenerator.h | 334 + Source/cmGlobalKdevelopGenerator.cxx | 614 + Source/cmGlobalKdevelopGenerator.h | 97 + Source/cmGlobalMSYSMakefileGenerator.cxx | 110 + Source/cmGlobalMSYSMakefileGenerator.h | 56 + Source/cmGlobalMinGWMakefileGenerator.cxx | 90 + Source/cmGlobalMinGWMakefileGenerator.h | 52 + Source/cmGlobalNMakeMakefileGenerator.cxx | 62 + Source/cmGlobalNMakeMakefileGenerator.h | 52 + Source/cmGlobalUnixMakefileGenerator3.cxx | 993 + Source/cmGlobalUnixMakefileGenerator3.h | 183 + Source/cmGlobalVisualStudio6Generator.cxx | 505 + Source/cmGlobalVisualStudio6Generator.h | 103 + Source/cmGlobalVisualStudio71Generator.cxx | 330 + Source/cmGlobalVisualStudio71Generator.h | 81 + Source/cmGlobalVisualStudio7Generator.cxx | 759 + Source/cmGlobalVisualStudio7Generator.h | 156 + Source/cmGlobalVisualStudio8Generator.cxx | 354 + Source/cmGlobalVisualStudio8Generator.h | 81 + .../cmGlobalVisualStudio8Win64Generator.cxx | 56 + Source/cmGlobalVisualStudio8Win64Generator.h | 54 + Source/cmGlobalVisualStudio9Generator.cxx | 101 + Source/cmGlobalVisualStudio9Generator.h | 69 + .../cmGlobalVisualStudio9Win64Generator.cxx | 53 + Source/cmGlobalVisualStudio9Win64Generator.h | 54 + Source/cmGlobalVisualStudioGenerator.cxx | 720 + Source/cmGlobalVisualStudioGenerator.h | 86 + Source/cmGlobalWatcomWMakeGenerator.cxx | 71 + Source/cmGlobalWatcomWMakeGenerator.h | 51 + Source/cmGlobalXCode21Generator.cxx | 47 + Source/cmGlobalXCode21Generator.h | 41 + Source/cmGlobalXCodeGenerator.cxx | 2963 + Source/cmGlobalXCodeGenerator.h | 206 + Source/cmGraphAdjacencyList.h | 25 + Source/cmHexFileConverter.cxx | 267 + Source/cmHexFileConverter.h | 33 + Source/cmIfCommand.cxx | 713 + Source/cmIfCommand.h | 201 + Source/cmIncludeCommand.cxx | 108 + Source/cmIncludeCommand.h | 89 + Source/cmIncludeDirectoryCommand.cxx | 130 + Source/cmIncludeDirectoryCommand.h | 86 + Source/cmIncludeExternalMSProjectCommand.cxx | 67 + Source/cmIncludeExternalMSProjectCommand.h | 77 + Source/cmIncludeRegularExpressionCommand.cxx | 37 + Source/cmIncludeRegularExpressionCommand.h | 80 + Source/cmInstallCommand.cxx | 1332 + Source/cmInstallCommand.h | 353 + Source/cmInstallCommandArguments.cxx | 204 + Source/cmInstallCommandArguments.h | 71 + Source/cmInstallDirectoryGenerator.cxx | 58 + Source/cmInstallDirectoryGenerator.h | 46 + Source/cmInstallExportGenerator.cxx | 211 + Source/cmInstallExportGenerator.h | 64 + Source/cmInstallFilesCommand.cxx | 177 + Source/cmInstallFilesCommand.h | 118 + Source/cmInstallFilesGenerator.cxx | 58 + Source/cmInstallFilesGenerator.h | 47 + Source/cmInstallGenerator.cxx | 277 + Source/cmInstallGenerator.h | 109 + Source/cmInstallProgramsCommand.cxx | 138 + Source/cmInstallProgramsCommand.h | 111 + Source/cmInstallScriptGenerator.cxx | 52 + Source/cmInstallScriptGenerator.h | 38 + Source/cmInstallTargetGenerator.cxx | 716 + Source/cmInstallTargetGenerator.h | 101 + Source/cmInstallTargetsCommand.cxx | 67 + Source/cmInstallTargetsCommand.h | 86 + Source/cmLinkDirectoriesCommand.cxx | 37 + Source/cmLinkDirectoriesCommand.h | 77 + Source/cmLinkLibrariesCommand.cxx | 64 + Source/cmLinkLibrariesCommand.h | 88 + Source/cmListCommand.cxx | 626 + Source/cmListCommand.h | 125 + Source/cmListFileCache.cxx | 304 + Source/cmListFileCache.h | 83 + Source/cmListFileLexer.c | 2321 + Source/cmListFileLexer.h | 64 + Source/cmListFileLexer.in.l | 422 + Source/cmLoadCacheCommand.cxx | 235 + Source/cmLoadCacheCommand.h | 95 + Source/cmLoadCommandCommand.cxx | 318 + Source/cmLoadCommandCommand.h | 80 + Source/cmLocalGenerator.cxx | 2859 + Source/cmLocalGenerator.h | 383 + Source/cmLocalUnixMakefileGenerator3.cxx | 2207 + Source/cmLocalUnixMakefileGenerator3.h | 384 + Source/cmLocalVisualStudio6Generator.cxx | 1683 + Source/cmLocalVisualStudio6Generator.h | 112 + Source/cmLocalVisualStudio7Generator.cxx | 2338 + Source/cmLocalVisualStudio7Generator.h | 160 + Source/cmLocalVisualStudioGenerator.cxx | 211 + Source/cmLocalVisualStudioGenerator.h | 57 + Source/cmLocalXCodeGenerator.cxx | 53 + Source/cmLocalXCodeGenerator.h | 44 + Source/cmMacroCommand.cxx | 362 + Source/cmMacroCommand.h | 122 + Source/cmMakeDepend.cxx | 398 + Source/cmMakeDepend.h | 172 + Source/cmMakeDirectoryCommand.cxx | 39 + Source/cmMakeDirectoryCommand.h | 90 + Source/cmMakefile.cxx | 3467 + Source/cmMakefile.h | 906 + .../cmMakefileExecutableTargetGenerator.cxx | 514 + Source/cmMakefileExecutableTargetGenerator.h | 36 + Source/cmMakefileLibraryTargetGenerator.cxx | 907 + Source/cmMakefileLibraryTargetGenerator.h | 46 + Source/cmMakefileTargetGenerator.cxx | 1721 + Source/cmMakefileTargetGenerator.h | 231 + Source/cmMakefileUtilityTargetGenerator.cxx | 101 + Source/cmMakefileUtilityTargetGenerator.h | 36 + Source/cmMarkAsAdvancedCommand.cxx | 67 + Source/cmMarkAsAdvancedCommand.h | 90 + Source/cmMathCommand.cxx | 66 + Source/cmMathCommand.h | 84 + Source/cmMessageCommand.cxx | 82 + Source/cmMessageCommand.h | 84 + Source/cmObject.h | 56 + Source/cmOptionCommand.cxx | 77 + Source/cmOptionCommand.h | 80 + Source/cmOrderDirectories.cxx | 531 + Source/cmOrderDirectories.h | 88 + Source/cmOutputRequiredFilesCommand.cxx | 238 + Source/cmOutputRequiredFilesCommand.h | 84 + Source/cmPolicies.cxx | 647 + Source/cmPolicies.h | 101 + Source/cmProjectCommand.cxx | 79 + Source/cmProjectCommand.h | 82 + Source/cmProperty.cxx | 45 + Source/cmProperty.h | 46 + Source/cmPropertyDefinition.cxx | 52 + Source/cmPropertyDefinition.h | 64 + Source/cmPropertyDefinitionMap.cxx | 127 + Source/cmPropertyDefinitionMap.h | 46 + Source/cmPropertyMap.cxx | 128 + Source/cmPropertyMap.h | 48 + Source/cmQTWrapCPPCommand.cxx | 120 + Source/cmQTWrapCPPCommand.h | 79 + Source/cmQTWrapUICommand.cxx | 171 + Source/cmQTWrapUICommand.h | 80 + Source/cmRemoveCommand.cxx | 81 + Source/cmRemoveCommand.h | 86 + Source/cmRemoveDefinitionsCommand.cxx | 36 + Source/cmRemoveDefinitionsCommand.h | 76 + Source/cmReturnCommand.cxx | 26 + Source/cmReturnCommand.h | 82 + Source/cmSeparateArgumentsCommand.cxx | 38 + Source/cmSeparateArgumentsCommand.h | 81 + Source/cmSetCommand.cxx | 183 + Source/cmSetCommand.h | 105 + Source/cmSetDirectoryPropertiesCommand.cxx | 75 + Source/cmSetDirectoryPropertiesCommand.h | 83 + Source/cmSetPropertyCommand.cxx | 384 + Source/cmSetPropertyCommand.h | 111 + Source/cmSetSourceFilesPropertiesCommand.cxx | 174 + Source/cmSetSourceFilesPropertiesCommand.h | 99 + Source/cmSetTargetPropertiesCommand.cxx | 114 + Source/cmSetTargetPropertiesCommand.h | 172 + Source/cmSetTestsPropertiesCommand.cxx | 135 + Source/cmSetTestsPropertiesCommand.h | 84 + Source/cmSiteNameCommand.cxx | 100 + Source/cmSiteNameCommand.h | 77 + Source/cmSourceFile.cxx | 543 + Source/cmSourceFile.h | 124 + Source/cmSourceFileLocation.cxx | 218 + Source/cmSourceFileLocation.h | 104 + Source/cmSourceGroup.cxx | 160 + Source/cmSourceGroup.h | 126 + Source/cmSourceGroupCommand.cxx | 137 + Source/cmSourceGroupCommand.h | 86 + Source/cmStandardIncludes.h | 385 + Source/cmStandardLexer.h | 78 + Source/cmStringCommand.cxx | 764 + Source/cmStringCommand.h | 172 + Source/cmSubdirCommand.cxx | 79 + Source/cmSubdirCommand.h | 96 + Source/cmSubdirDependsCommand.cxx | 25 + Source/cmSubdirDependsCommand.h | 82 + Source/cmSystemTools.cxx | 2635 + Source/cmSystemTools.h | 419 + Source/cmTarget.cxx | 3620 + Source/cmTarget.h | 558 + Source/cmTargetLinkLibrariesCommand.cxx | 105 + Source/cmTargetLinkLibrariesCommand.h | 86 + Source/cmTest.cxx | 140 + Source/cmTest.h | 79 + Source/cmTryCompileCommand.cxx | 40 + Source/cmTryCompileCommand.h | 110 + Source/cmTryRunCommand.cxx | 384 + Source/cmTryRunCommand.h | 120 + Source/cmUseMangledMesaCommand.cxx | 136 + Source/cmUseMangledMesaCommand.h | 89 + Source/cmUtilitySourceCommand.cxx | 132 + Source/cmUtilitySourceCommand.h | 95 + Source/cmVariableRequiresCommand.cxx | 81 + Source/cmVariableRequiresCommand.h | 87 + Source/cmVariableWatch.cxx | 98 + Source/cmVariableWatch.h | 85 + Source/cmVariableWatchCommand.cxx | 145 + Source/cmVariableWatchCommand.h | 99 + Source/cmVersion.cxx | 46 + Source/cmVersion.h | 41 + Source/cmWhileCommand.cxx | 133 + Source/cmWhileCommand.h | 117 + Source/cmWin32ProcessExecution.cxx | 946 + Source/cmWin32ProcessExecution.h | 174 + Source/cmWriteFileCommand.cxx | 103 + Source/cmWriteFileCommand.h | 90 + Source/cmXCode21Object.cxx | 110 + Source/cmXCode21Object.h | 33 + Source/cmXCodeObject.cxx | 254 + Source/cmXCodeObject.h | 163 + Source/cmXMLParser.cxx | 220 + Source/cmXMLParser.h | 111 + Source/cmake.cxx | 4213 + Source/cmake.h | 498 + Source/cmakemain.cxx | 512 + Source/cmaketest.h.in | 21 + Source/cmakewizard.cxx | 159 + Source/cmakewizard.h | 47 + Source/cmakexbuild.cxx | 97 + Source/cmw9xcom.cxx | 50 + Source/ctest.cxx | 279 + Source/kwsys/Base64.c | 281 + Source/kwsys/Base64.h.in | 118 + Source/kwsys/CMakeEmptyInputFile.in | 1 + Source/kwsys/CMakeLists.txt | 998 + Source/kwsys/CPU.h.in | 111 + Source/kwsys/CTestConfig.cmake | 3 + Source/kwsys/CheckCXXSourceRuns.cmake | 62 + Source/kwsys/CommandLineArguments.cxx | 861 + Source/kwsys/CommandLineArguments.hxx.in | 288 + Source/kwsys/Configure.h.in | 124 + Source/kwsys/Configure.hxx.in | 168 + Source/kwsys/Copyright.txt | 33 + Source/kwsys/DateStamp.h.in | 44 + Source/kwsys/Directory.cxx | 252 + Source/kwsys/Directory.hxx.in | 82 + Source/kwsys/DynamicLoader.cxx | 560 + Source/kwsys/DynamicLoader.hxx.in | 103 + Source/kwsys/EncodeExecutable.c | 115 + Source/kwsys/ExtraTest.cmake.in | 1 + Source/kwsys/FundamentalType.h.in | 143 + Source/kwsys/Glob.cxx | 503 + Source/kwsys/Glob.hxx.in | 106 + Source/kwsys/IOStream.cxx | 283 + Source/kwsys/IOStream.hxx.in | 148 + Source/kwsys/MD5.c | 510 + Source/kwsys/MD5.h.in | 105 + Source/kwsys/Process.h.in | 426 + Source/kwsys/ProcessFwd9x.c | 213 + Source/kwsys/ProcessUNIX.c | 2904 + Source/kwsys/ProcessWin32.c | 2941 + Source/kwsys/README.txt | 10 + Source/kwsys/Registry.cxx | 819 + Source/kwsys/Registry.hxx.in | 109 + Source/kwsys/RegularExpression.cxx | 1217 + Source/kwsys/RegularExpression.hxx.in | 399 + Source/kwsys/SharedForward.h.in | 720 + Source/kwsys/String.c | 107 + Source/kwsys/String.h.in | 65 + Source/kwsys/String.hxx.in | 67 + Source/kwsys/System.c | 575 + Source/kwsys/System.h.in | 128 + Source/kwsys/SystemInformation.cxx | 3162 + Source/kwsys/SystemInformation.hxx.in | 91 + Source/kwsys/SystemTools.cxx | 4547 + Source/kwsys/SystemTools.hxx.in | 887 + Source/kwsys/Terminal.c | 413 + Source/kwsys/Terminal.h.in | 157 + Source/kwsys/auto_ptr.hxx.in | 203 + Source/kwsys/hash_fun.hxx.in | 117 + Source/kwsys/hash_map.hxx.in | 463 + Source/kwsys/hash_set.hxx.in | 447 + Source/kwsys/hashtable.hxx.in | 1263 + Source/kwsys/kwsysDateStamp.cmake | 10 + Source/kwsys/kwsysDateStamp.py | 32 + Source/kwsys/kwsysHeaderDump.pl | 50 + Source/kwsys/kwsysPlatformTests.cmake | 153 + Source/kwsys/kwsysPlatformTestsC.c | 51 + Source/kwsys/kwsysPlatformTestsCXX.cxx | 442 + Source/kwsys/kwsysPrivate.h | 43 + Source/kwsys/kwsys_cstddef.hxx.in | 37 + Source/kwsys/kwsys_ios_fstream.h.in | 48 + Source/kwsys/kwsys_ios_iosfwd.h.in | 51 + Source/kwsys/kwsys_ios_iostream.h.in | 101 + Source/kwsys/kwsys_ios_sstream.h.in | 201 + Source/kwsys/kwsys_stl.hxx.in | 51 + Source/kwsys/kwsys_stl_string.hxx.in | 125 + Source/kwsys/testAutoPtr.cxx | 165 + Source/kwsys/testCommandLineArguments.cxx | 189 + Source/kwsys/testCommandLineArguments1.cxx | 108 + Source/kwsys/testDynamicLoader.cxx | 131 + Source/kwsys/testDynload.c | 11 + Source/kwsys/testEncode.c | 78 + Source/kwsys/testFail.c | 24 + Source/kwsys/testHashSTL.cxx | 77 + Source/kwsys/testIOS.cxx | 123 + Source/kwsys/testProcess.c | 524 + Source/kwsys/testRegistry.cxx | 112 + Source/kwsys/testSystemInformation.cxx | 64 + Source/kwsys/testSystemTools.bin | Bin 0 -> 766 bytes Source/kwsys/testSystemTools.cxx | 362 + Source/kwsys/testSystemTools.h.in | 22 + Source/kwsys/testTerminal.c | 33 + Templates/AppleInfo.plist | 36 + Templates/CMakeLists.txt | 6 + Templates/CMakeVSMacros1.vsmacros | Bin 0 -> 88064 bytes Templates/CMakeVSMacros2.vsmacros | Bin 0 -> 63488 bytes .../CMakeVisualStudio6Configurations.cmake | 3 + Templates/CPack.GenericDescription.txt | 5 + Templates/CPack.GenericLicense.txt | 5 + Templates/CPack.GenericWelcome.txt | 1 + Templates/CPackConfig.cmake.in | 29 + Templates/CTestScript.cmake.in | 33 + Templates/DLLFooter.dsptemplate | 4 + Templates/DLLHeader.dsptemplate | 184 + Templates/EXEFooter.dsptemplate | 4 + Templates/EXEHeader.dsptemplate | 175 + Templates/EXEWinHeader.dsptemplate | 179 + Templates/TestDriver.cxx.in | 139 + Templates/UtilityFooter.dsptemplate | 2 + Templates/UtilityHeader.dsptemplate | 99 + Templates/cygwin-package.sh.in | 101 + Templates/staticLibFooter.dsptemplate | 4 + Templates/staticLibHeader.dsptemplate | 165 + Tests/.NoDartCoverage | 1 + Tests/Assembler/CMakeLists.txt | 26 + Tests/Assembler/main-linux-x86-gas.s | 28 + Tests/Assembler/main.c | 12 + Tests/BuildDepends/CMakeLists.txt | 154 + Tests/BuildDepends/Project/CMakeLists.txt | 61 + Tests/BuildDepends/Project/bar.cxx | 25 + Tests/BuildDepends/Project/dep.cxx | 1 + Tests/BuildDepends/Project/dep_custom.cxx | 1 + Tests/BuildDepends/Project/generator.cxx | 24 + Tests/BuildDepends/Project/zot.cxx | 10 + Tests/BundleTest/BundleLib.cxx | 63 + Tests/BundleTest/BundleSubDir/CMakeLists.txt | 36 + Tests/BundleTest/BundleTest.cxx | 9 + Tests/BundleTest/CMakeLists.txt | 93 + Tests/BundleTest/SomeRandomFile.txt | 0 Tests/BundleTest/randomResourceFile.plist.in | 9 + Tests/CMakeLists.txt | 854 + Tests/CMakeTests/CMakeLists.txt | 25 + Tests/CMakeTests/DummyToolchain.cmake | 8 + Tests/CMakeTests/FindBaseTest.cmake.in | 44 + .../CMakeTests/GetPrerequisitesTest.cmake.in | 146 + Tests/CMakeTests/IncludeTest.cmake.in | 37 + Tests/CMakeTests/ListTest.cmake.in | 88 + Tests/CMakeTests/ToolchainTest.cmake.in | 137 + Tests/CMakeTests/VariableWatchTest.cmake.in | 22 + .../cmake_i_do_not_exist_in_the_system.h | 1 + Tests/COnly/CMakeLists.txt | 21 + Tests/COnly/conly.c | 23 + Tests/COnly/foo.c | 1 + Tests/COnly/foo.h | 1 + Tests/COnly/libc1.c | 4 + Tests/COnly/libc1.h | 1 + Tests/COnly/libc2.c | 6 + Tests/COnly/libc2.h | 11 + Tests/CTestTest/CMakeLists.txt | 12 + Tests/CTestTest/test.cmake.in | 71 + Tests/CTestTest2/CMakeLists.txt | 13 + Tests/CTestTest2/test.cmake.in | 44 + Tests/CTestTest3/test.cmake.in | 107 + Tests/CommandLineTest/CMakeLists.txt | 89 + Tests/CommandLineTest/CommandLineTest.cxx | 4 + Tests/CommandLineTest/PreLoad.cmake | 1 + Tests/Complex/CMakeLists.txt | 379 + Tests/Complex/Cache/CMakeCache.txt | 34 + Tests/Complex/Executable/A.cxx | 7 + Tests/Complex/Executable/A.h | 4 + Tests/Complex/Executable/A.hh | 2 + Tests/Complex/Executable/A.txt | 1 + Tests/Complex/Executable/CMakeLists.txt | 158 + Tests/Complex/Executable/Included.cmake | 2 + .../Executable/Sub1/NameConflictTest.c | 4 + .../Executable/Sub2/NameConflictTest.c | 4 + Tests/Complex/Executable/Temp/CMakeLists.txt | 8 + Tests/Complex/Executable/cmVersion.h.in | 1 + Tests/Complex/Executable/complex.cxx | 1220 + Tests/Complex/Executable/complex.file.cxx | 8 + Tests/Complex/Executable/complex_nobuild.cxx | 1 + Tests/Complex/Executable/notInAllExe.cxx | 10 + Tests/Complex/Executable/testSystemDir.cxx | 3 + Tests/Complex/Executable/testcflags.c | 26 + Tests/Complex/Library/CMakeLists.txt | 137 + Tests/Complex/Library/ExtraSources/file1.cxx | 4 + Tests/Complex/Library/ExtraSources/file1.h | 1 + .../Complex/Library/SystemDir/testSystemDir.h | 2 + Tests/Complex/Library/TestLink.c | 8 + Tests/Complex/Library/create_file.cxx | 28 + Tests/Complex/Library/dummy | 0 Tests/Complex/Library/empty.h | 0 Tests/Complex/Library/file2.cxx | 10 + Tests/Complex/Library/file2.h | 1 + Tests/Complex/Library/moduleFile.c | 6 + Tests/Complex/Library/moduleFile.h | 12 + Tests/Complex/Library/notInAllLib.cxx | 5 + Tests/Complex/Library/sharedFile.cxx | 6 + Tests/Complex/Library/sharedFile.h | 12 + Tests/Complex/Library/testConly.c | 13 + Tests/Complex/Library/testConly.h | 13 + Tests/Complex/Library/test_preprocess.cmake | 7 + Tests/Complex/VarTests.cmake | 198 + Tests/Complex/cmTestConfigure.h.in | 83 + Tests/Complex/cmTestConfigureEscape.h.in | 1 + Tests/Complex/cmTestGeneratedHeader.h.in | 1 + Tests/ComplexOneConfig/CMakeLists.txt | 379 + Tests/ComplexOneConfig/Cache/CMakeCache.txt | 34 + Tests/ComplexOneConfig/Executable/A.cxx | 7 + Tests/ComplexOneConfig/Executable/A.h | 4 + Tests/ComplexOneConfig/Executable/A.hh | 2 + Tests/ComplexOneConfig/Executable/A.txt | 1 + .../Executable/CMakeLists.txt | 158 + .../Executable/Included.cmake | 2 + .../Executable/Sub1/NameConflictTest.c | 4 + .../Executable/Sub2/NameConflictTest.c | 4 + .../Executable/Temp/CMakeLists.txt | 8 + .../Executable/cmVersion.h.in | 1 + Tests/ComplexOneConfig/Executable/complex.cxx | 1220 + .../Executable/complex.file.cxx | 8 + .../Executable/complex_nobuild.cxx | 1 + .../Executable/notInAllExe.cxx | 10 + .../Executable/testSystemDir.cxx | 3 + .../ComplexOneConfig/Executable/testcflags.c | 26 + Tests/ComplexOneConfig/Library/CMakeLists.txt | 137 + .../Library/ExtraSources/file1.cxx | 4 + .../Library/ExtraSources/file1.h | 1 + .../Library/SystemDir/testSystemDir.h | 2 + Tests/ComplexOneConfig/Library/TestLink.c | 8 + .../ComplexOneConfig/Library/create_file.cxx | 28 + Tests/ComplexOneConfig/Library/dummy | 0 Tests/ComplexOneConfig/Library/empty.h | 0 Tests/ComplexOneConfig/Library/file2.cxx | 10 + Tests/ComplexOneConfig/Library/file2.h | 1 + Tests/ComplexOneConfig/Library/moduleFile.c | 6 + Tests/ComplexOneConfig/Library/moduleFile.h | 12 + .../ComplexOneConfig/Library/notInAllLib.cxx | 5 + Tests/ComplexOneConfig/Library/sharedFile.cxx | 6 + Tests/ComplexOneConfig/Library/sharedFile.h | 12 + Tests/ComplexOneConfig/Library/testConly.c | 13 + Tests/ComplexOneConfig/Library/testConly.h | 13 + .../Library/test_preprocess.cmake | 7 + Tests/ComplexOneConfig/VarTests.cmake | 198 + Tests/ComplexOneConfig/cmTestConfigure.h.in | 83 + .../cmTestConfigureEscape.h.in | 1 + .../cmTestGeneratedHeader.h.in | 1 + Tests/ComplexRelativePaths/CMakeLists.txt | 379 + .../ComplexRelativePaths/Cache/CMakeCache.txt | 34 + Tests/ComplexRelativePaths/Executable/A.cxx | 7 + Tests/ComplexRelativePaths/Executable/A.h | 4 + Tests/ComplexRelativePaths/Executable/A.hh | 2 + Tests/ComplexRelativePaths/Executable/A.txt | 1 + .../Executable/CMakeLists.txt | 158 + .../Executable/Included.cmake | 2 + .../Executable/Sub1/NameConflictTest.c | 4 + .../Executable/Sub2/NameConflictTest.c | 4 + .../Executable/Temp/CMakeLists.txt | 8 + .../Executable/cmVersion.h.in | 1 + .../Executable/complex.cxx | 1220 + .../Executable/complex.file.cxx | 8 + .../Executable/complex_nobuild.cxx | 1 + .../Executable/notInAllExe.cxx | 10 + .../Executable/testSystemDir.cxx | 3 + .../Executable/testcflags.c | 26 + .../Library/CMakeLists.txt | 137 + .../Library/ExtraSources/file1.cxx | 4 + .../Library/ExtraSources/file1.h | 1 + .../Library/SystemDir/testSystemDir.h | 2 + Tests/ComplexRelativePaths/Library/TestLink.c | 8 + .../Library/create_file.cxx | 28 + Tests/ComplexRelativePaths/Library/dummy | 0 Tests/ComplexRelativePaths/Library/empty.h | 0 Tests/ComplexRelativePaths/Library/file2.cxx | 10 + Tests/ComplexRelativePaths/Library/file2.h | 1 + .../ComplexRelativePaths/Library/moduleFile.c | 6 + .../ComplexRelativePaths/Library/moduleFile.h | 12 + .../Library/notInAllLib.cxx | 5 + .../Library/sharedFile.cxx | 6 + .../ComplexRelativePaths/Library/sharedFile.h | 12 + .../ComplexRelativePaths/Library/testConly.c | 13 + .../ComplexRelativePaths/Library/testConly.h | 13 + .../Library/test_preprocess.cmake | 7 + Tests/ComplexRelativePaths/VarTests.cmake | 198 + .../ComplexRelativePaths/cmTestConfigure.h.in | 83 + .../cmTestConfigureEscape.h.in | 1 + .../cmTestGeneratedHeader.h.in | 1 + Tests/ConvLibrary/CMakeLists.txt | 20 + Tests/ConvLibrary/bar.c | 4 + Tests/ConvLibrary/bartest.cxx | 37 + Tests/ConvLibrary/foo.cxx | 4 + Tests/ConvLibrary/sub1/car.cxx | 4 + Tests/CustComDepend/CMakeLists.txt | 14 + Tests/CustComDepend/bar.h | 9 + Tests/CustComDepend/foo.cxx | 15 + Tests/CustomCommand/CMakeLists.txt | 376 + .../GeneratedHeader/CMakeLists.txt | 13 + .../GeneratedHeader/generated.h.in | 1 + Tests/CustomCommand/GeneratedHeader/main.cpp | 5 + .../GeneratorInExtraDir/CMakeLists.txt | 8 + Tests/CustomCommand/check_command_line.c.in | 36 + Tests/CustomCommand/check_mark.cmake | 5 + Tests/CustomCommand/config.h.in | 1 + Tests/CustomCommand/doc1.tex | 1 + Tests/CustomCommand/foo.h.in | 1 + Tests/CustomCommand/foo.in | 28 + Tests/CustomCommand/gen_redirect_in.c | 5 + Tests/CustomCommand/generator.cxx | 19 + Tests/CustomCommand/main.cxx | 6 + Tests/CustomCommand/tcat.cxx | 11 + Tests/CustomCommand/wrapped.h | 1 + Tests/CustomCommand/wrapper.cxx | 18 + .../CMakeLists.txt | 25 + .../customTarget.c | 4 + .../working.c.in | 7 + Tests/CxxOnly/CMakeLists.txt | 8 + Tests/CxxOnly/cxxonly.cxx | 19 + Tests/CxxOnly/libcxx1.cxx | 6 + Tests/CxxOnly/libcxx1.h | 5 + Tests/CxxOnly/libcxx2.cxx | 6 + Tests/CxxOnly/libcxx2.h | 15 + Tests/Dependency/1/CMakeLists.txt | 3 + Tests/Dependency/1/OneSrc.c | 3 + Tests/Dependency/CMakeLists.txt | 54 + Tests/Dependency/Case1/CMakeLists.txt | 19 + Tests/Dependency/Case1/a.c | 5 + Tests/Dependency/Case1/b.c | 6 + Tests/Dependency/Case1/b2.c | 4 + Tests/Dependency/Case1/c.c | 6 + Tests/Dependency/Case1/c2.c | 6 + Tests/Dependency/Case1/d.c | 7 + Tests/Dependency/Case1/main.c | 10 + Tests/Dependency/Case2/CMakeLists.txt | 21 + Tests/Dependency/Case2/bar1.c | 4 + Tests/Dependency/Case2/bar2.c | 2 + Tests/Dependency/Case2/bar3.c | 2 + Tests/Dependency/Case2/foo1.c | 2 + Tests/Dependency/Case2/foo1b.c | 2 + Tests/Dependency/Case2/foo2.c | 2 + Tests/Dependency/Case2/foo2b.c | 2 + Tests/Dependency/Case2/foo3.c | 2 + Tests/Dependency/Case2/foo3b.c | 1 + Tests/Dependency/Case2/zot.c | 5 + Tests/Dependency/Case3/CMakeLists.txt | 10 + Tests/Dependency/Case3/bar.c | 5 + Tests/Dependency/Case3/foo1.c | 2 + Tests/Dependency/Case3/foo1b.c | 1 + Tests/Dependency/Case3/foo2.c | 2 + Tests/Dependency/Eight/CMakeLists.txt | 3 + Tests/Dependency/Eight/EightSrc.c | 6 + Tests/Dependency/Exec/CMakeLists.txt | 7 + Tests/Dependency/Exec/ExecMain.c | 18 + Tests/Dependency/Exec2/CMakeLists.txt | 12 + Tests/Dependency/Exec2/ExecMain.c | 14 + Tests/Dependency/Exec3/CMakeLists.txt | 6 + Tests/Dependency/Exec3/ExecMain.c | 14 + Tests/Dependency/Exec4/CMakeLists.txt | 6 + Tests/Dependency/Exec4/ExecMain.c | 14 + Tests/Dependency/Five/CMakeLists.txt | 3 + Tests/Dependency/Five/FiveSrc.c | 6 + Tests/Dependency/Four/CMakeLists.txt | 3 + Tests/Dependency/Four/FourSrc.c | 14 + Tests/Dependency/NoDepA/CMakeLists.txt | 1 + Tests/Dependency/NoDepA/NoDepASrc.c | 3 + Tests/Dependency/NoDepB/CMakeLists.txt | 3 + Tests/Dependency/NoDepB/NoDepBSrc.c | 6 + Tests/Dependency/NoDepC/CMakeLists.txt | 3 + Tests/Dependency/NoDepC/NoDepCSrc.c | 6 + Tests/Dependency/Seven/CMakeLists.txt | 3 + Tests/Dependency/Seven/SevenSrc.c | 6 + Tests/Dependency/Six/CMakeLists.txt | 12 + Tests/Dependency/Six/SixASrc.c | 8 + Tests/Dependency/Six/SixBSrc.c | 10 + Tests/Dependency/Three/CMakeLists.txt | 3 + Tests/Dependency/Three/ThreeSrc.c | 12 + Tests/Dependency/Two/CMakeLists.txt | 20 + Tests/Dependency/Two/TwoCustomSrc.c | 10 + Tests/Dependency/Two/TwoSrc.c | 10 + Tests/Dependency/Two/two-test.h.in | 1 + Tests/DocTest/CMakeLists.txt | 7 + Tests/DocTest/DocTest.cxx | 33 + Tests/ExportImport/CMakeLists.txt | 83 + Tests/ExportImport/Export/CMakeLists.txt | 72 + Tests/ExportImport/Export/testExe1.c | 26 + Tests/ExportImport/Export/testExe1lib.c | 1 + Tests/ExportImport/Export/testExe2.c | 12 + Tests/ExportImport/Export/testExe2lib.c | 10 + Tests/ExportImport/Export/testExe2libImp.c | 7 + Tests/ExportImport/Export/testExe3.c | 24 + Tests/ExportImport/Export/testLib1.c | 1 + Tests/ExportImport/Export/testLib2.c | 4 + Tests/ExportImport/Export/testLib3.c | 10 + Tests/ExportImport/Export/testLib3Imp.c | 7 + Tests/ExportImport/Export/testLib4.c | 7 + Tests/ExportImport/Import/CMakeLists.txt | 63 + Tests/ExportImport/Import/imp_mod1.c | 13 + Tests/ExportImport/Import/imp_testExe1.c | 11 + Tests/ExportImport/main.c | 4 + Tests/ExternalOBJ/CMakeLists.txt | 55 + Tests/ExternalOBJ/Object/CMakeLists.txt | 13 + Tests/ExternalOBJ/Object/external_main.cxx | 4 + Tests/ExternalOBJ/Object/external_object.cxx | 4 + Tests/ExternalOBJ/executable.cxx | 5 + Tests/FindPackageTest/CMakeLists.txt | 138 + Tests/FindPackageTest/FindPackageTest.cxx | 4 + Tests/FindPackageTest/FindVersionTestA.cmake | 12 + Tests/FindPackageTest/FindVersionTestB.cmake | 12 + Tests/FindPackageTest/FindVersionTestC.cmake | 12 + .../Contents/Resources/TAppConfig.cmake | 1 + .../Resources/cmake/tapp-config.cmake | 1 + .../A/Resources/CMake/TFrameworkConfig.cmake | 1 + .../A/Resources/tframework-config.cmake | 1 + Tests/FindPackageTest/include/foo.h | 1 + Tests/FindPackageTest/lib/Bar/BarConfig.cmake | 1 + .../lib/Bar/cmake/bar-config.cmake | 1 + .../FindPackageTest/lib/TApp/TAppConfig.cmake | 2 + .../lib/foo-1.2/CMake/FooConfig.cmake | 1 + .../lib/foo-1.2/foo-config.cmake | 1 + .../lib/suffix/test/SuffixTestConfig.cmake | 1 + .../suffix/test/SuffixTestConfigVersion.cmake | 7 + .../lib/zot-1.0/zot-config.cmake | 1 + .../lib/zot-2.0/zot-config-version.cmake | 5 + .../lib/zot-2.0/zot-config.cmake | 1 + .../lib/zot-3.0/zot-config-version.cmake | 5 + .../lib/zot-3.0/zot-config.cmake | 1 + .../lib/zot-3.1/zot-config-version.cmake | 8 + .../lib/zot-3.1/zot-config.cmake | 1 + Tests/Fortran/CMakeLists.txt | 71 + Tests/Fortran/Executable/CMakeLists.txt | 8 + Tests/Fortran/Executable/main.f90 | 6 + Tests/Fortran/External/CMakeLists.txt | 4 + Tests/Fortran/External/a.f90 | 7 + Tests/Fortran/Library/CMakeLists.txt | 11 + Tests/Fortran/Library/a.f90 | 3 + Tests/Fortran/Library/b.f90 | 2 + Tests/Fortran/Library/main.f90 | 3 + Tests/Fortran/hello.f | 6 + Tests/Fortran/in_interface/main.f90 | 3 + Tests/Fortran/in_interface/module.f90 | 12 + Tests/Fortran/test_module_implementation.f90 | 6 + Tests/Fortran/test_module_interface.f90 | 9 + Tests/Fortran/test_module_main.f90 | 4 + Tests/Fortran/test_preprocess.F90 | 55 + Tests/Fortran/test_use_in_comment_fixedform.f | 7 + .../Fortran/test_use_in_comment_freeform.f90 | 7 + Tests/Framework/CMakeLists.txt | 73 + Tests/Framework/bar.cxx | 6 + Tests/Framework/foo.cxx | 10 + Tests/Framework/foo.h | 1 + Tests/Framework/foo2.h | 1 + Tests/Framework/fooBoth.h | 1 + Tests/Framework/fooDeepPublic.h | 1 + Tests/Framework/fooNeither.h | 1 + Tests/Framework/fooPrivate.h | 1 + Tests/Framework/fooPublic.h | 1 + Tests/Framework/test.lua | 1 + Tests/FunctionTest/CMakeLists.txt | 135 + Tests/FunctionTest/SubDirScope/CMakeLists.txt | 4 + Tests/FunctionTest/Util.cmake | 3 + Tests/FunctionTest/functionTest.c | 7 + Tests/Java/A.java | 11 + Tests/Java/CMakeLists.txt | 42 + Tests/Java/HelloWorld.java | 11 + Tests/Jump/CMakeLists.txt | 6 + Tests/Jump/Executable/CMakeLists.txt | 6 + Tests/Jump/Executable/jumpExecutable.cxx | 12 + Tests/Jump/Library/CMakeLists.txt | 2 + Tests/Jump/Library/Shared/CMakeLists.txt | 26 + Tests/Jump/Library/Shared/jumpShared.cxx | 7 + Tests/Jump/Library/Static/CMakeLists.txt | 1 + Tests/Jump/Library/Static/jumpStatic.cxx | 1 + Tests/LibName/CMakeLists.txt | 13 + Tests/LibName/bar.c | 7 + Tests/LibName/foo.c | 11 + Tests/LibName/foobar.c | 10 + Tests/LinkLine/CMakeLists.txt | 12 + Tests/LinkLine/Exec.c | 9 + Tests/LinkLine/One.c | 10 + Tests/LinkLine/Two.c | 10 + Tests/LinkLineOrder/CMakeLists.txt | 36 + Tests/LinkLineOrder/Exec1.c | 8 + Tests/LinkLineOrder/Exec2.c | 8 + Tests/LinkLineOrder/NoDepA.c | 7 + Tests/LinkLineOrder/NoDepB.c | 4 + Tests/LinkLineOrder/NoDepC.c | 7 + Tests/LinkLineOrder/NoDepE.c | 11 + Tests/LinkLineOrder/NoDepF.c | 11 + Tests/LinkLineOrder/NoDepX.c | 7 + Tests/LinkLineOrder/NoDepY.c | 4 + Tests/LinkLineOrder/NoDepZ.c | 7 + Tests/LinkLineOrder/One.c | 10 + Tests/LinkLineOrder/Two.c | 8 + .../LoadCommand/CMakeCommands/CMakeLists.txt | 19 + .../LoadCommand/CMakeCommands/cmTestCommand.c | 219 + Tests/LoadCommand/CMakeLists.txt | 69 + Tests/LoadCommand/LoadedCommand.cxx.in | 41 + Tests/LoadCommand/LoadedCommand.h.in | 13 + .../CMakeCommands/CMakeLists.txt | 19 + .../CMakeCommands/cmTestCommand.c | 219 + Tests/LoadCommandOneConfig/CMakeLists.txt | 69 + .../LoadCommandOneConfig/LoadedCommand.cxx.in | 41 + Tests/LoadCommandOneConfig/LoadedCommand.h.in | 13 + Tests/MacroTest/CMakeLists.txt | 88 + Tests/MacroTest/macroTest.c | 7 + Tests/MakeClean/CMakeLists.txt | 64 + Tests/MakeClean/ToClean/CMakeLists.txt | 31 + Tests/MakeClean/ToClean/ToCleanFiles.cmake.in | 1 + Tests/MakeClean/ToClean/toclean.cxx | 4 + Tests/MakeClean/check_clean.c.in | 26 + Tests/MathTest/CMakeLists.txt | 29 + Tests/MathTest/MathTestExec.cxx | 26 + Tests/MathTest/MathTestTests.h.in | 1 + Tests/NewlineArgs/CMakeLists.txt | 16 + Tests/NewlineArgs/cxxonly.cxx | 19 + Tests/NewlineArgs/libcxx1.cxx | 10 + Tests/NewlineArgs/libcxx1.h | 9 + Tests/NewlineArgs/libcxx2.h.in | 6 + Tests/ObjC++/CMakeLists.txt | 6 + Tests/ObjC++/objc++.mm | 22 + Tests/OutOfBinary/CMakeLists.txt | 2 + Tests/OutOfBinary/outlib.c | 2 + Tests/OutOfSource/CMakeLists.txt | 18 + .../OutOfSourceSubdir/CMakeLists.txt | 53 + .../OutOfSource/OutOfSourceSubdir/simple.cxx | 39 + .../OutOfSourceSubdir/simple.cxx.in | 1 + .../OutOfSource/OutOfSourceSubdir/testlib.cxx | 6 + Tests/OutOfSource/OutOfSourceSubdir/testlib.h | 11 + Tests/OutOfSource/SubDir/CMakeLists.txt | 8 + Tests/OutOfSource/simple.cxx | 1 + Tests/OutOfSource/testdp.h.in | 1 + Tests/Plugin/CMakeLists.txt | 47 + Tests/Plugin/include/example.h | 25 + Tests/Plugin/src/example_exe.cxx | 60 + Tests/Plugin/src/example_exe.h.in | 6 + Tests/Plugin/src/example_mod_1.c | 22 + Tests/PreOrder/CMakeLists.txt | 6 + Tests/PreOrder/Library/CMakeLists.txt | 2 + Tests/PreOrder/Library/simpleLib.cxx | 3 + Tests/PreOrder/simple.cxx | 6 + Tests/PrecompiledHeader/CMakeLists.txt | 55 + Tests/PrecompiledHeader/foo1.c | 8 + Tests/PrecompiledHeader/foo2.c | 9 + Tests/PrecompiledHeader/foo_precompile.c | 5 + Tests/PrecompiledHeader/include/foo.h | 4 + .../include/foo_precompiled.h | 1 + Tests/Preprocess/CMakeLists.txt | 255 + Tests/Preprocess/file_def.h | 1 + Tests/Preprocess/preprocess.c | 200 + Tests/Preprocess/preprocess.cxx | 227 + Tests/Preprocess/preprocess.h.in | 16 + Tests/Preprocess/preprocess_vs6.cxx | 3 + Tests/Preprocess/target_def.h | 1 + Tests/Properties/CMakeLists.txt | 99 + Tests/Properties/SubDir/properties3.cxx | 9 + Tests/Properties/properties.h.in | 1 + Tests/Properties/properties2.h | 1 + Tests/ReturnTest/CMakeLists.txt | 141 + Tests/ReturnTest/returnTest.c | 7 + Tests/ReturnTest/subdir/CMakeLists.txt | 3 + Tests/RuntimePath/CMakeLists.txt | 37 + Tests/RuntimePath/bar1.c | 2 + Tests/RuntimePath/bar2.c | 2 + Tests/RuntimePath/foo1.c | 1 + Tests/RuntimePath/foo2.c | 1 + Tests/RuntimePath/main.c | 5 + Tests/SameName/CMakeLists.txt | 7 + Tests/SameName/Exe1/CMakeLists.txt | 11 + Tests/SameName/Exe1/conly.c | 12 + Tests/SameName/Lib1/CMakeLists.txt | 1 + Tests/SameName/Lib1/libc1.c | 4 + Tests/SameName/Lib1/libc1.h | 1 + Tests/SetLang/CMakeLists.txt | 10 + Tests/SetLang/bar.c | 21 + Tests/SetLang/foo.c | 7 + Tests/Simple/CMakeLists.txt | 17 + Tests/Simple/simple.cxx | 11 + Tests/Simple/simpleCLib.c | 12 + Tests/Simple/simpleLib.cxx | 3 + Tests/Simple/simpleWe.cpp | 17 + Tests/SimpleCOnly/CMakeLists.txt | 17 + Tests/SimpleCOnly/bar.c | 1 + Tests/SimpleCOnly/foo.c | 1 + Tests/SimpleCOnly/main.c | 12 + Tests/SimpleExclude/CMakeLists.txt | 11 + Tests/SimpleExclude/dirC/CMakeLists.txt | 3 + Tests/SimpleExclude/dirC/dirA/CMakeLists.txt | 10 + Tests/SimpleExclude/dirC/dirA/t1.c | 8 + Tests/SimpleExclude/dirC/dirA/t2.c | 7 + Tests/SimpleExclude/dirC/dirA/t3.c | 7 + Tests/SimpleExclude/dirC/dirA/t4.c | 17 + Tests/SimpleExclude/dirC/dirA/t5.c | 7 + Tests/SimpleExclude/dirC/dirB/CMakeLists.txt | 5 + Tests/SimpleExclude/dirC/dirB/t6.c | 8 + Tests/SimpleExclude/dirC/dirB/t7.c | 16 + Tests/SimpleExclude/dirD/CMakeLists.txt | 7 + Tests/SimpleExclude/dirD/t8.c | 7 + Tests/SimpleExclude/dirD/t9.c | 24 + Tests/SimpleExclude/run.cmake.in | 13 + Tests/SimpleInstall/CMakeLists.txt | 395 + Tests/SimpleInstall/InstallScript1.cmake | 5 + Tests/SimpleInstall/InstallScript2.cmake | 14 + Tests/SimpleInstall/InstallScript3.cmake | 12 + Tests/SimpleInstall/InstallScript4.cmake | 22 + Tests/SimpleInstall/PackageScript.cmake | 10 + Tests/SimpleInstall/PostInstall.cmake | 6 + Tests/SimpleInstall/PreInstall.cmake | 2 + Tests/SimpleInstall/TestSubDir/CMakeLists.txt | 3 + Tests/SimpleInstall/TestSubDir/TSD.cxx | 10 + Tests/SimpleInstall/TestSubDir/TSD.h | 1 + Tests/SimpleInstall/TestSubDir/TSD_utils.cxx | 10 + Tests/SimpleInstall/foo.c | 6 + Tests/SimpleInstall/foo.h | 11 + Tests/SimpleInstall/inst.cxx | 37 + Tests/SimpleInstall/inst2.cxx | 2 + Tests/SimpleInstall/lib1.cxx | 6 + Tests/SimpleInstall/lib1.h | 1 + Tests/SimpleInstall/lib2.cxx | 6 + Tests/SimpleInstall/lib2.h | 11 + Tests/SimpleInstall/lib3.cxx | 6 + Tests/SimpleInstall/lib3.h | 11 + Tests/SimpleInstall/lib4.cxx | 7 + Tests/SimpleInstall/lib4.h | 12 + Tests/SimpleInstall/scripts/CMakeLists.txt | 1 + Tests/SimpleInstall/scripts/sample_script | 2 + Tests/SimpleInstall/scripts/sample_script.bat | 1 + Tests/SimpleInstallS2/CMakeLists.txt | 395 + Tests/SimpleInstallS2/InstallScript1.cmake | 5 + Tests/SimpleInstallS2/InstallScript2.cmake | 14 + Tests/SimpleInstallS2/InstallScript3.cmake | 12 + Tests/SimpleInstallS2/InstallScript4.cmake | 22 + Tests/SimpleInstallS2/PackageScript.cmake | 10 + Tests/SimpleInstallS2/PostInstall.cmake | 6 + Tests/SimpleInstallS2/PreInstall.cmake | 2 + .../SimpleInstallS2/TestSubDir/CMakeLists.txt | 3 + Tests/SimpleInstallS2/TestSubDir/TSD.cxx | 10 + Tests/SimpleInstallS2/TestSubDir/TSD.h | 1 + .../SimpleInstallS2/TestSubDir/TSD_utils.cxx | 10 + Tests/SimpleInstallS2/foo.c | 6 + Tests/SimpleInstallS2/foo.h | 11 + Tests/SimpleInstallS2/inst.cxx | 37 + Tests/SimpleInstallS2/inst2.cxx | 2 + Tests/SimpleInstallS2/lib1.cxx | 6 + Tests/SimpleInstallS2/lib1.h | 1 + Tests/SimpleInstallS2/lib2.cxx | 6 + Tests/SimpleInstallS2/lib2.h | 11 + Tests/SimpleInstallS2/lib3.cxx | 6 + Tests/SimpleInstallS2/lib3.h | 11 + Tests/SimpleInstallS2/lib4.cxx | 7 + Tests/SimpleInstallS2/lib4.h | 12 + Tests/SimpleInstallS2/scripts/CMakeLists.txt | 1 + Tests/SimpleInstallS2/scripts/sample_script | 2 + .../SimpleInstallS2/scripts/sample_script.bat | 1 + Tests/SourceGroups/CMakeLists.txt | 42 + Tests/SourceGroups/bar.c | 4 + Tests/SourceGroups/baz.c | 4 + Tests/SourceGroups/foo.c | 4 + Tests/SourceGroups/main.c | 13 + Tests/SourceGroups/sub1/foo.c | 4 + Tests/SourceGroups/sub1/foobar.c | 4 + Tests/StringFileTest/CMakeLists.txt | 212 + Tests/StringFileTest/InputFile.h.in | 38 + Tests/StringFileTest/StringFile.cxx | 31 + Tests/StringFileTest/main.ihx | 21 + Tests/StringFileTest/main.srec | 21 + Tests/SubDir/AnotherSubdir/pair+int.int.c | 6 + Tests/SubDir/AnotherSubdir/pair_int.int.c | 6 + Tests/SubDir/AnotherSubdir/secondone.c | 6 + Tests/SubDir/AnotherSubdir/testfromsubdir.c | 14 + Tests/SubDir/CMakeLists.txt | 46 + Tests/SubDir/Examples/CMakeLists.txt | 3 + Tests/SubDir/Examples/example1/CMakeLists.txt | 7 + Tests/SubDir/Examples/example1/example1.cxx | 7 + Tests/SubDir/Examples/example2/CMakeLists.txt | 2 + Tests/SubDir/Examples/example2/example2.cxx | 7 + Tests/SubDir/Executable/CMakeLists.txt | 1 + Tests/SubDir/Executable/test.cxx | 49 + Tests/SubDir/ThirdSubDir/pair+int.int1.c | 6 + Tests/SubDir/ThirdSubDir/pair_int.int1.c | 6 + Tests/SubDir/ThirdSubDir/pair_p_int.int1.c | 6 + Tests/SubDir/ThirdSubDir/testfromauxsubdir.c | 16 + Tests/SubDir/ThirdSubDir/thirdone.c | 6 + .../vcl_algorithm+vcl_pair+double.foo.c | 6 + .../vcl_algorithm_vcl_pair_double.foo.c | 6 + .../Another Subdir/pair+int.int.c | 6 + .../Another Subdir/pair_int.int.c | 6 + Tests/SubDirSpaces/Another Subdir/secondone.c | 6 + .../Another Subdir/testfromsubdir.c | 14 + Tests/SubDirSpaces/CMakeLists.txt | 69 + .../Executable Sources/CMakeLists.txt | 1 + .../SubDirSpaces/Executable Sources/test.cxx | 49 + Tests/SubDirSpaces/Executable/CMakeLists.txt | 1 + Tests/SubDirSpaces/Executable/test.cxx | 49 + .../SubDirSpaces/Some Examples/CMakeLists.txt | 3 + .../Some Examples/example1/CMakeLists.txt | 7 + .../Some Examples/example1/example1.cxx | 7 + .../Some Examples/example2/CMakeLists.txt | 2 + .../Some Examples/example2/example2.cxx | 7 + .../Some(x86) Sources/CMakeLists.txt | 1 + Tests/SubDirSpaces/Some(x86) Sources/test.c | 3 + .../SubDirSpaces/ThirdSubDir/pair+int.int1.c | 6 + .../SubDirSpaces/ThirdSubDir/pair_int.int1.c | 6 + .../ThirdSubDir/pair_p_int.int1.c | 6 + .../ThirdSubDir/testfromauxsubdir.c | 21 + Tests/SubDirSpaces/ThirdSubDir/thirdone.c | 6 + .../vcl_algorithm+vcl_pair+double.foo.c | 6 + .../vcl_algorithm_vcl_pair_double.foo.c | 6 + Tests/SubProject/CMakeLists.txt | 6 + Tests/SubProject/bar.cxx | 4 + Tests/SubProject/car.cxx | 6 + Tests/SubProject/foo/CMakeLists.txt | 3 + Tests/SubProject/foo/foo.cxx | 15 + Tests/SwigTest/CMakeLists.txt | 50 + Tests/SwigTest/example.cxx | 28 + Tests/SwigTest/example.h | 39 + Tests/SwigTest/example.i | 10 + Tests/SwigTest/runme.php4 | 58 + Tests/SwigTest/runme.pike | 53 + Tests/SwigTest/runme.pl | 57 + Tests/SwigTest/runme.py | 51 + Tests/SwigTest/runme.rb | 49 + Tests/SwigTest/runme.tcl | 50 + Tests/SwigTest/runme2.tcl | 70 + Tests/SystemInformation/CMakeLists.txt | 61 + Tests/SystemInformation/DumpInformation.cxx | 78 + Tests/SystemInformation/DumpInformation.h.in | 6 + Tests/SystemInformation/SystemInformation.in | 88 + Tests/TarTest/CMakeLists.txt | 59 + Tests/TarTest/TestTarExec.cxx | 5 + Tests/TargetName/CMakeLists.txt | 5 + Tests/TargetName/executables/CMakeLists.txt | 1 + Tests/TargetName/executables/hello_world.c | 5 + Tests/TargetName/scripts/CMakeLists.txt | 13 + Tests/TargetName/scripts/hello_world | 2 + Tests/TestDriver/CMakeLists.txt | 15 + Tests/TestDriver/subdir/test3.cxx | 8 + Tests/TestDriver/test1.cxx | 25 + Tests/TestDriver/test2.cxx | 8 + Tests/TestDriver/testArgs.h | 20 + Tests/TestDriver/testExtraStuff.cxx | 4 + Tests/TestDriver/testExtraStuff2.cxx | 4 + Tests/TestDriver/testExtraStuff3.cxx | 4 + Tests/TestInstall.sh.in | 63 + Tests/Testing/CMakeLists.txt | 54 + Tests/Testing/DartConfig.cmake | 24 + Tests/Testing/Sub/Sub2/CMakeLists.txt | 5 + Tests/Testing/Sub/Sub2/testing2.cxx | 4 + Tests/Testing/testing.cxx | 4 + Tests/TryCompile/CMakeLists.txt | 194 + Tests/TryCompile/exit_success.c | 7 + Tests/TryCompile/exit_with_error.c | 7 + Tests/TryCompile/fail.c | 1 + Tests/TryCompile/pass.c | 6 + Tests/Tutorial/Step1/CMakeLists.txt | 20 + Tests/Tutorial/Step1/TutorialConfig.h.in | 4 + Tests/Tutorial/Step1/tutorial.cxx | 23 + Tests/Tutorial/Step2/CMakeLists.txt | 31 + .../Step2/MathFunctions/CMakeLists.txt | 1 + .../Step2/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx | 29 + Tests/Tutorial/Step2/TutorialConfig.h.in | 5 + Tests/Tutorial/Step2/tutorial.cxx | 34 + Tests/Tutorial/Step3/CMakeLists.txt | 68 + .../Step3/MathFunctions/CMakeLists.txt | 4 + .../Step3/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx | 29 + Tests/Tutorial/Step3/TutorialConfig.h.in | 5 + Tests/Tutorial/Step3/tutorial.cxx | 34 + Tests/Tutorial/Step4/CMakeLists.txt | 68 + .../Step4/MathFunctions/CMakeLists.txt | 4 + .../Step4/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx | 39 + Tests/Tutorial/Step4/TutorialConfig.h.in | 9 + Tests/Tutorial/Step4/tutorial.cxx | 34 + Tests/Tutorial/Step5/CMakeLists.txt | 72 + .../Step5/MathFunctions/CMakeLists.txt | 26 + .../Step5/MathFunctions/MakeTable.cxx | 35 + .../Step5/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx | 44 + Tests/Tutorial/Step5/TutorialConfig.h.in | 9 + Tests/Tutorial/Step5/tutorial.cxx | 34 + Tests/Tutorial/Step6/CMakeLists.txt | 78 + Tests/Tutorial/Step6/License.txt | 2 + .../Step6/MathFunctions/CMakeLists.txt | 26 + .../Step6/MathFunctions/MakeTable.cxx | 35 + .../Step6/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx | 44 + Tests/Tutorial/Step6/TutorialConfig.h.in | 9 + Tests/Tutorial/Step6/tutorial.cxx | 34 + Tests/Tutorial/Step7/CMakeLists.txt | 82 + Tests/Tutorial/Step7/CTestConfig.cmake | 1 + Tests/Tutorial/Step7/License.txt | 2 + .../Step7/MathFunctions/CMakeLists.txt | 26 + .../Step7/MathFunctions/MakeTable.cxx | 35 + .../Step7/MathFunctions/MathFunctions.h | 1 + Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx | 44 + Tests/Tutorial/Step7/TutorialConfig.h.in | 9 + Tests/Tutorial/Step7/build1.cmake | 5 + Tests/Tutorial/Step7/build2.cmake | 9 + Tests/Tutorial/Step7/tutorial.cxx | 34 + Tests/UseWX/CMakeLists.txt | 8 + Tests/UseWX/WX.cxx | 82 + Tests/VSExternalInclude/CMakeLists.txt | 40 + Tests/VSExternalInclude/Lib1/CMakeLists.txt | 5 + Tests/VSExternalInclude/Lib1/lib1.cpp | 7 + Tests/VSExternalInclude/Lib1/lib1.h | 8 + Tests/VSExternalInclude/Lib2/CMakeLists.txt | 7 + Tests/VSExternalInclude/Lib2/lib2.cpp | 9 + Tests/VSExternalInclude/Lib2/lib2.h | 10 + Tests/VSExternalInclude/main.cpp | 9 + Tests/Wrapping/CMakeLists.txt | 107 + Tests/Wrapping/Wrap.c | 23 + Tests/Wrapping/dummy | 0 Tests/Wrapping/fakefluid.cxx | 17 + Tests/Wrapping/fltk1.fl | 0 Tests/Wrapping/foo.ui.in | 44 + Tests/Wrapping/hints | 0 Tests/Wrapping/itkWrapperConfig.cxx | 0 Tests/Wrapping/qtnoqtmain.cxx | 5 + Tests/Wrapping/qtwrapping.ui | 44 + Tests/Wrapping/qtwrappingmain.cxx | 29 + Tests/Wrapping/vtkExcluded.cxx | 0 Tests/Wrapping/vtkExcluded.h | 2 + Tests/Wrapping/vtkIncluded.cxx | 0 Tests/Wrapping/vtkIncluded.h | 2 + Tests/Wrapping/vtkTestMoc.h | 8 + Tests/Wrapping/wrapping.cxx | 4 + Tests/X11/CMakeLists.txt | 35 + Tests/X11/HelloWorldX11.cxx | 145 + Tests/X11/X11.c | 21 + Utilities/.NoDartCoverage | 1 + Utilities/CMakeLists.txt | 89 + Utilities/Doxygen/CMakeLists.txt | 29 + Utilities/Doxygen/authors.txt | 17 + Utilities/Doxygen/doc_makeall.sh.in | 248 + Utilities/Doxygen/doxyfile.in | 78 + Utilities/KWStyle/CMake.kws.xml.in | 11 + Utilities/KWStyle/CMakeFiles.txt.in | 15 + Utilities/KWStyle/CMakeLists.txt | 50 + Utilities/KWStyle/CMakeMoreChecks.kws.xml.in | 30 + Utilities/KWStyle/CMakeOverwrite.txt | 0 Utilities/KWStyle/Headers/CMakeHeader.h | 16 + Utilities/Release/CMakeInstall.bmp | Bin 0 -> 25820 bytes Utilities/Release/CMakeLogo.ico | Bin 0 -> 24542 bytes Utilities/Release/Cygwin/CMakeLists.txt | 25 + Utilities/Release/Cygwin/README.cygwin.in | 42 + Utilities/Release/Cygwin/cygwin-package.sh.in | 90 + Utilities/Release/Cygwin/cygwin-patch.diff.in | 0 Utilities/Release/Cygwin/cygwin-setup.hint.in | 5 + Utilities/Release/README | 26 + Utilities/Release/create-cmake-release.cmake | 31 + Utilities/Release/dashmacmini2_release.cmake | 17 + Utilities/Release/dashsgi1_release.cmake | 11 + Utilities/Release/dashsgi1_release64.cmake | 15 + Utilities/Release/dashsun1_release.cmake | 18 + Utilities/Release/destiny_release.cmake | 12 + Utilities/Release/hythloth_release.cmake | 10 + Utilities/Release/magrathea_release.cmake | 15 + Utilities/Release/muse_release.cmake | 10 + Utilities/Release/muse_release64.cmake | 14 + Utilities/Release/r15n65_aix_release.cmake | 22 + Utilities/Release/r36n11_aix_release.cmake | 22 + Utilities/Release/release_cmake.cmake | 139 + Utilities/Release/release_cmake.sh.in | 129 + Utilities/Release/upload_release.cmake | 24 + Utilities/Release/v60n177_aix_release.cmake | 21 + Utilities/Release/vogon_cygwin.cmake | 10 + Utilities/Release/vogon_release.cmake | 17 + Utilities/cmThirdParty.h.in | 26 + Utilities/cm_curl.h | 28 + Utilities/cm_expat.h | 28 + Utilities/cm_xmlrpc.h | 30 + Utilities/cm_zlib.h | 28 + Utilities/cmcompress/CMakeLists.txt | 3 + Utilities/cmcompress/cmcompress.c | 551 + Utilities/cmcompress/cmcompress.h | 195 + Utilities/cmcompress/compress.c.original | 1308 + .../cmcurl/CMake/CMakeConfigurableFile.in | 2 + .../cmcurl/CMake/CheckCSourceCompiles.cmake | 75 + Utilities/cmcurl/CMake/CheckCSourceRuns.cmake | 83 + Utilities/cmcurl/CMake/CheckTypeSize.c.in | 34 + Utilities/cmcurl/CMake/CheckTypeSize.cmake | 56 + Utilities/cmcurl/CMake/CurlTests.c | 526 + Utilities/cmcurl/CMake/OtherTests.cmake | 250 + Utilities/cmcurl/CMakeLists.txt | 710 + Utilities/cmcurl/Platforms/WindowsCache.cmake | 121 + Utilities/cmcurl/Platforms/config-aix.h | 486 + Utilities/cmcurl/Testing/CMakeLists.txt | 19 + Utilities/cmcurl/Testing/curlgtk.c | 95 + Utilities/cmcurl/Testing/curltest.c | 143 + Utilities/cmcurl/Testing/ftpget.c | 84 + Utilities/cmcurl/Testing/ftpgetresp.c | 64 + Utilities/cmcurl/Testing/ftpupload.c | 93 + Utilities/cmcurl/Testing/getinmemory.c | 83 + Utilities/cmcurl/Testing/http-post.c | 35 + Utilities/cmcurl/Testing/httpput.c | 100 + Utilities/cmcurl/Testing/multithread.c | 70 + Utilities/cmcurl/Testing/persistant.c | 53 + Utilities/cmcurl/Testing/postit2.c | 92 + Utilities/cmcurl/Testing/sepheaders.c | 78 + Utilities/cmcurl/Testing/simple.c | 28 + Utilities/cmcurl/Testing/simplessl.c | 118 + Utilities/cmcurl/Testing/testconfig.h.in | 7 + Utilities/cmcurl/Testing/win32sockets.c | 49 + Utilities/cmcurl/amigaos.c | 74 + Utilities/cmcurl/amigaos.h | 58 + Utilities/cmcurl/arpa_telnet.h | 101 + Utilities/cmcurl/base64.c | 366 + Utilities/cmcurl/base64.h | 28 + Utilities/cmcurl/ca-bundle.h | 1 + Utilities/cmcurl/config.h.in | 719 + Utilities/cmcurl/connect.c | 905 + Utilities/cmcurl/connect.h | 46 + Utilities/cmcurl/content_encoding.c | 424 + Utilities/cmcurl/content_encoding.h | 41 + Utilities/cmcurl/cookie.c | 1017 + Utilities/cmcurl/cookie.h | 107 + Utilities/cmcurl/curl.copyright | 25 + Utilities/cmcurl/curl/curl.h | 1644 + Utilities/cmcurl/curl/curlver.h | 56 + Utilities/cmcurl/curl/easy.h | 81 + Utilities/cmcurl/curl/mprintf.h | 80 + Utilities/cmcurl/curl/multi.h | 327 + Utilities/cmcurl/curl/stdcheaders.h | 34 + Utilities/cmcurl/curl/types.h | 1 + Utilities/cmcurl/curlx.h | 107 + Utilities/cmcurl/dict.c | 280 + Utilities/cmcurl/dict.h | 30 + Utilities/cmcurl/easy.c | 895 + Utilities/cmcurl/easyif.h | 40 + Utilities/cmcurl/escape.c | 181 + Utilities/cmcurl/escape.h | 30 + Utilities/cmcurl/file.c | 407 + Utilities/cmcurl/file.h | 31 + Utilities/cmcurl/formdata.c | 1694 + Utilities/cmcurl/formdata.h | 97 + Utilities/cmcurl/ftp.c | 3865 + Utilities/cmcurl/ftp.h | 43 + Utilities/cmcurl/getenv.c | 69 + Utilities/cmcurl/getinfo.c | 234 + Utilities/cmcurl/getinfo.h | 28 + Utilities/cmcurl/gtls.c | 640 + Utilities/cmcurl/gtls.h | 46 + Utilities/cmcurl/hash.c | 315 + Utilities/cmcurl/hash.h | 61 + Utilities/cmcurl/hostares.c | 307 + Utilities/cmcurl/hostasyn.c | 174 + Utilities/cmcurl/hostip.c | 636 + Utilities/cmcurl/hostip.h | 271 + Utilities/cmcurl/hostip4.c | 389 + Utilities/cmcurl/hostip6.c | 306 + Utilities/cmcurl/hostsyn.c | 138 + Utilities/cmcurl/hostthre.c | 840 + Utilities/cmcurl/http.c | 2422 + Utilities/cmcurl/http.h | 85 + Utilities/cmcurl/http_chunks.c | 360 + Utilities/cmcurl/http_chunks.h | 104 + Utilities/cmcurl/http_digest.c | 504 + Utilities/cmcurl/http_digest.h | 58 + Utilities/cmcurl/http_negotiate.c | 327 + Utilities/cmcurl/http_negotiate.h | 39 + Utilities/cmcurl/http_ntlm.c | 1111 + Utilities/cmcurl/http_ntlm.h | 146 + Utilities/cmcurl/if2ip.c | 134 + Utilities/cmcurl/if2ip.h | 67 + Utilities/cmcurl/inet_ntoa_r.h | 44 + Utilities/cmcurl/inet_ntop.c | 224 + Utilities/cmcurl/inet_ntop.h | 37 + Utilities/cmcurl/inet_pton.c | 241 + Utilities/cmcurl/inet_pton.h | 42 + Utilities/cmcurl/krb4.c | 425 + Utilities/cmcurl/krb4.h | 70 + Utilities/cmcurl/ldap.c | 702 + Utilities/cmcurl/ldap.h | 29 + Utilities/cmcurl/llist.c | 138 + Utilities/cmcurl/llist.h | 60 + Utilities/cmcurl/md5.c | 352 + Utilities/cmcurl/md5.h | 29 + Utilities/cmcurl/memdebug.c | 298 + Utilities/cmcurl/memdebug.h | 125 + Utilities/cmcurl/memory.h | 50 + Utilities/cmcurl/mprintf.c | 1222 + Utilities/cmcurl/multi.c | 1988 + Utilities/cmcurl/multiif.h | 46 + Utilities/cmcurl/netrc.c | 247 + Utilities/cmcurl/netrc.h | 34 + Utilities/cmcurl/nwlib.c | 300 + Utilities/cmcurl/parsedate.c | 425 + Utilities/cmcurl/parsedate.h | 28 + Utilities/cmcurl/progress.c | 424 + Utilities/cmcurl/progress.h | 70 + Utilities/cmcurl/security.c | 493 + Utilities/cmcurl/select.c | 315 + Utilities/cmcurl/select.h | 60 + Utilities/cmcurl/sendf.c | 663 + Utilities/cmcurl/sendf.h | 72 + Utilities/cmcurl/setup.h | 382 + Utilities/cmcurl/setup_once.h | 153 + Utilities/cmcurl/share.c | 219 + Utilities/cmcurl/share.h | 56 + Utilities/cmcurl/sockaddr.h | 38 + Utilities/cmcurl/socks.c | 585 + Utilities/cmcurl/socks.h | 41 + Utilities/cmcurl/speedcheck.c | 75 + Utilities/cmcurl/speedcheck.h | 34 + Utilities/cmcurl/splay.c | 425 + Utilities/cmcurl/splay.h | 54 + Utilities/cmcurl/ssh.c | 979 + Utilities/cmcurl/ssh.h | 49 + Utilities/cmcurl/sslgen.c | 618 + Utilities/cmcurl/sslgen.h | 84 + Utilities/cmcurl/ssluse.c | 1945 + Utilities/cmcurl/ssluse.h | 71 + Utilities/cmcurl/strdup.c | 46 + Utilities/cmcurl/strdup.h | 34 + Utilities/cmcurl/strequal.c | 143 + Utilities/cmcurl/strequal.h | 43 + Utilities/cmcurl/strerror.c | 748 + Utilities/cmcurl/strerror.h | 34 + Utilities/cmcurl/strtok.c | 68 + Utilities/cmcurl/strtok.h | 38 + Utilities/cmcurl/strtoofft.c | 165 + Utilities/cmcurl/strtoofft.h | 73 + Utilities/cmcurl/telnet.c | 1403 + Utilities/cmcurl/telnet.h | 30 + Utilities/cmcurl/tftp.c | 816 + Utilities/cmcurl/tftp.h | 31 + Utilities/cmcurl/timeval.c | 116 + Utilities/cmcurl/timeval.h | 76 + Utilities/cmcurl/transfer.c | 2494 + Utilities/cmcurl/transfer.h | 51 + Utilities/cmcurl/url.c | 4252 + Utilities/cmcurl/url.h | 85 + Utilities/cmcurl/urldata.h | 1340 + Utilities/cmcurl/version.c | 249 + Utilities/cmexpat/.NoDartCoverage | 1 + Utilities/cmexpat/CMakeLists.txt | 34 + Utilities/cmexpat/COPYING | 21 + Utilities/cmexpat/ascii.h | 86 + Utilities/cmexpat/asciitab.h | 37 + Utilities/cmexpat/cm_expat_mangle.h | 87 + Utilities/cmexpat/expat.h | 740 + Utilities/cmexpat/expatConfig.h.in | 43 + Utilities/cmexpat/expatDllConfig.h.in | 6 + Utilities/cmexpat/iasciitab.h | 38 + Utilities/cmexpat/latin1tab.h | 37 + Utilities/cmexpat/nametab.h | 150 + Utilities/cmexpat/utf8tab.h | 38 + Utilities/cmexpat/xmlparse.c | 4622 + Utilities/cmexpat/xmlrole.c | 1401 + Utilities/cmexpat/xmlrole.h | 100 + Utilities/cmexpat/xmltok.c | 1584 + Utilities/cmexpat/xmltok.h | 299 + Utilities/cmexpat/xmltok_impl.c | 1775 + Utilities/cmexpat/xmltok_impl.h | 46 + Utilities/cmexpat/xmltok_ns.c | 98 + Utilities/cmtar/CMakeLists.txt | 389 + Utilities/cmtar/COPYRIGHT | 35 + Utilities/cmtar/append.c | 295 + Utilities/cmtar/block.c | 384 + Utilities/cmtar/compat/README | 12 + Utilities/cmtar/compat/basename.c | 76 + Utilities/cmtar/compat/compat.h | 332 + Utilities/cmtar/compat/dirname.c | 79 + Utilities/cmtar/compat/fnmatch.c | 234 + Utilities/cmtar/compat/gethostbyname_r.c | 41 + Utilities/cmtar/compat/gethostname.c | 36 + Utilities/cmtar/compat/getservbyname_r.c | 41 + Utilities/cmtar/compat/glob.c | 874 + Utilities/cmtar/compat/inet_aton.c | 27 + Utilities/cmtar/compat/snprintf.c | 793 + Utilities/cmtar/compat/strdup.c | 62 + Utilities/cmtar/compat/strlcat.c | 72 + Utilities/cmtar/compat/strlcpy.c | 67 + Utilities/cmtar/compat/strmode.c | 185 + Utilities/cmtar/compat/strrstr.c | 40 + Utilities/cmtar/compat/strsep.c | 87 + Utilities/cmtar/config.h.in | 213 + Utilities/cmtar/decode.c | 138 + Utilities/cmtar/encode.c | 231 + Utilities/cmtar/extract.c | 895 + Utilities/cmtar/filesystem.c | 87 + Utilities/cmtar/filesystem.h | 30 + Utilities/cmtar/handle.c | 163 + Utilities/cmtar/internal.h | 35 + Utilities/cmtar/libtar.c | 422 + Utilities/cmtar/libtar.h | 290 + Utilities/cmtar/listhash/hash.c.in | 344 + Utilities/cmtar/listhash/list.c.in | 461 + Utilities/cmtar/listhash/listhash.h.in | 196 + Utilities/cmtar/output.c | 151 + Utilities/cmtar/tar.h | 71 + Utilities/cmtar/util.c | 177 + Utilities/cmtar/wrapper.c | 241 + .../cmxmlrpc/CMake/TryCompileFromSource.cmake | 46 + Utilities/cmxmlrpc/CMakeLists.txt | 128 + Utilities/cmxmlrpc/XmlRpcCpp.cpp | 391 + Utilities/cmxmlrpc/XmlRpcCpp.h | 428 + Utilities/cmxmlrpc/bool.h | 18 + Utilities/cmxmlrpc/casprintf.c | 35 + Utilities/cmxmlrpc/casprintf.h | 19 + Utilities/cmxmlrpc/inline.h | 19 + Utilities/cmxmlrpc/linklist.h | 193 + Utilities/cmxmlrpc/mallocvar.h | 80 + Utilities/cmxmlrpc/synch_client.c | 68 + Utilities/cmxmlrpc/transport_config.h | 5 + Utilities/cmxmlrpc/win32_pthreads.c | 109 + Utilities/cmxmlrpc/xmlrpc.h | 784 + Utilities/cmxmlrpc/xmlrpc_amconfig.h.in | 37 + Utilities/cmxmlrpc/xmlrpc_array.c | 206 + Utilities/cmxmlrpc/xmlrpc_authcookie.c | 71 + Utilities/cmxmlrpc/xmlrpc_base64.c | 262 + Utilities/cmxmlrpc/xmlrpc_cgi.c | 295 + Utilities/cmxmlrpc/xmlrpc_cgi.h | 81 + Utilities/cmxmlrpc/xmlrpc_client.c | 977 + Utilities/cmxmlrpc/xmlrpc_client.h | 261 + Utilities/cmxmlrpc/xmlrpc_client_int.h | 102 + Utilities/cmxmlrpc/xmlrpc_config.h.in | 88 + Utilities/cmxmlrpc/xmlrpc_curl_transport.c | 759 + Utilities/cmxmlrpc/xmlrpc_curl_transport.h | 8 + Utilities/cmxmlrpc/xmlrpc_data.c | 1334 + Utilities/cmxmlrpc/xmlrpc_expat.c | 390 + Utilities/cmxmlrpc/xmlrpc_int.h | 112 + Utilities/cmxmlrpc/xmlrpc_libxml2.c | 406 + Utilities/cmxmlrpc/xmlrpc_parse.c | 767 + Utilities/cmxmlrpc/xmlrpc_pthreads.h | 74 + Utilities/cmxmlrpc/xmlrpc_registry.c | 819 + Utilities/cmxmlrpc/xmlrpc_serialize.c | 620 + Utilities/cmxmlrpc/xmlrpc_server.h | 179 + Utilities/cmxmlrpc/xmlrpc_server_abyss.c | 799 + Utilities/cmxmlrpc/xmlrpc_server_abyss.h | 182 + Utilities/cmxmlrpc/xmlrpc_server_abyss_int.h | 79 + Utilities/cmxmlrpc/xmlrpc_struct.c | 608 + Utilities/cmxmlrpc/xmlrpc_strutil.c | 75 + Utilities/cmxmlrpc/xmlrpc_support.c | 367 + Utilities/cmxmlrpc/xmlrpc_transport.c | 142 + Utilities/cmxmlrpc/xmlrpc_transport.h | 129 + Utilities/cmxmlrpc/xmlrpc_utf8.c | 372 + Utilities/cmxmlrpc/xmlrpc_xmlparser.h | 82 + Utilities/cmzlib/.NoDartCoverage | 1 + Utilities/cmzlib/CMakeLists.txt | 44 + Utilities/cmzlib/ChangeLog | 855 + Utilities/cmzlib/FAQ | 339 + Utilities/cmzlib/INDEX | 51 + Utilities/cmzlib/README | 125 + Utilities/cmzlib/README.Kitware.txt | 40 + Utilities/cmzlib/adler32.c | 149 + Utilities/cmzlib/cm_zlib_mangle.h | 93 + Utilities/cmzlib/compress.c | 79 + Utilities/cmzlib/crc32.c | 423 + Utilities/cmzlib/crc32.h | 441 + Utilities/cmzlib/deflate.c | 1736 + Utilities/cmzlib/deflate.h | 331 + Utilities/cmzlib/gzio.c | 1026 + Utilities/cmzlib/inffast.c | 318 + Utilities/cmzlib/inffast.h | 11 + Utilities/cmzlib/inffixed.h | 94 + Utilities/cmzlib/inflate.c | 1368 + Utilities/cmzlib/inflate.h | 115 + Utilities/cmzlib/inftrees.c | 329 + Utilities/cmzlib/inftrees.h | 55 + Utilities/cmzlib/trees.c | 1219 + Utilities/cmzlib/trees.h | 128 + Utilities/cmzlib/uncompr.c | 61 + Utilities/cmzlib/zconf.h | 351 + Utilities/cmzlib/zlib.def | 47 + Utilities/cmzlib/zlib.h | 1357 + Utilities/cmzlib/zlib.rc | 32 + Utilities/cmzlib/zlibDllConfig.h.in | 6 + Utilities/cmzlib/zutil.c | 318 + Utilities/cmzlib/zutil.h | 269 + bootstrap | 1383 + cmake.1 | 112 + cmake_uninstall.cmake.in | 22 + configure | 3 + doxygen.config | 697 + 2199 files changed, 444563 insertions(+) create mode 100755 CMakeCPack.cmake create mode 100755 CMakeCPackOptions.cmake.in create mode 100644 CMakeGraphVizOptions.cmake create mode 100644 CMakeLists.txt create mode 100644 CMakeLogo.gif create mode 100644 CTestConfig.cmake create mode 100644 CTestCustom.cmake.in create mode 100644 CTestCustom.ctest.in create mode 100755 ChangeLog.manual create mode 100644 ChangeLog.txt create mode 100755 CompileFlags.cmake create mode 100644 Copyright.txt create mode 100644 DartConfig.cmake create mode 100755 DartLocal.conf.in create mode 100644 Docs/cmake-indent.vim create mode 100644 Docs/cmake-mode.el create mode 100644 Docs/cmake-syntax.vim create mode 100644 Example/CMakeLists.txt create mode 100644 Example/Demo/CMakeLists.txt create mode 100644 Example/Demo/demo.cxx create mode 100644 Example/Demo/demo_b.cxx create mode 100644 Example/Hello/CMakeLists.txt create mode 100644 Example/Hello/hello.cxx create mode 100644 Example/Hello/hello.h create mode 100644 Modules/AddFileDependencies.cmake create mode 100755 Modules/CMake.cmake create mode 100644 Modules/CMakeASM-ATTInformation.cmake create mode 100644 Modules/CMakeASMCompiler.cmake.in create mode 100644 Modules/CMakeASMInformation.cmake create mode 100755 Modules/CMakeAddNewLanguage.txt create mode 100644 Modules/CMakeBackwardCompatibilityC.cmake create mode 100644 Modules/CMakeBackwardCompatibilityCXX.cmake create mode 100755 Modules/CMakeBorlandFindMake.cmake create mode 100644 Modules/CMakeBuildSettings.cmake.in create mode 100644 Modules/CMakeCCompiler.cmake.in create mode 100644 Modules/CMakeCCompilerABI.c create mode 100644 Modules/CMakeCCompilerId.c.in create mode 100755 Modules/CMakeCInformation.cmake create mode 100644 Modules/CMakeCXXCompiler.cmake.in create mode 100644 Modules/CMakeCXXCompilerABI.cpp create mode 100644 Modules/CMakeCXXCompilerId.cpp.in create mode 100755 Modules/CMakeCXXInformation.cmake create mode 100755 Modules/CMakeCommonLanguageInclude.cmake create mode 100644 Modules/CMakeCompilerABI.h create mode 100644 Modules/CMakeConfigurableFile.in create mode 100644 Modules/CMakeDependentOption.cmake create mode 100644 Modules/CMakeDetermineASM-ATTCompiler.cmake create mode 100644 Modules/CMakeDetermineASMCompiler.cmake create mode 100644 Modules/CMakeDetermineCCompiler.cmake create mode 100644 Modules/CMakeDetermineCXXCompiler.cmake create mode 100644 Modules/CMakeDetermineCompilerABI.cmake create mode 100644 Modules/CMakeDetermineCompilerId.cmake create mode 100755 Modules/CMakeDetermineFortranCompiler.cmake create mode 100644 Modules/CMakeDetermineJavaCompiler.cmake create mode 100755 Modules/CMakeDetermineRCCompiler.cmake create mode 100644 Modules/CMakeDetermineSystem.cmake create mode 100644 Modules/CMakeExportBuildSettings.cmake create mode 100644 Modules/CMakeFindBinUtils.cmake create mode 100644 Modules/CMakeFindFrameworks.cmake create mode 100755 Modules/CMakeFindWMake.cmake create mode 100755 Modules/CMakeFindXCode.cmake create mode 100644 Modules/CMakeForceCompiler.cmake create mode 100755 Modules/CMakeFortranCompiler.cmake.in create mode 100644 Modules/CMakeFortranCompilerId.F90.in create mode 100755 Modules/CMakeFortranInformation.cmake create mode 100755 Modules/CMakeGenericSystem.cmake create mode 100644 Modules/CMakeImportBuildSettings.cmake create mode 100644 Modules/CMakeJavaCompiler.cmake.in create mode 100755 Modules/CMakeJavaInformation.cmake create mode 100644 Modules/CMakeLists.txt create mode 100755 Modules/CMakeMSYSFindMake.cmake create mode 100755 Modules/CMakeMinGWFindMake.cmake create mode 100755 Modules/CMakeNMakeFindMake.cmake create mode 100644 Modules/CMakePlatformId.h.in create mode 100644 Modules/CMakePrintSystemInformation.cmake create mode 100755 Modules/CMakeRCCompiler.cmake.in create mode 100755 Modules/CMakeRCInformation.cmake create mode 100644 Modules/CMakeSystem.cmake.in create mode 100644 Modules/CMakeSystemSpecificInformation.cmake create mode 100644 Modules/CMakeTestASM-ATTCompiler.cmake create mode 100644 Modules/CMakeTestASMCompiler.cmake create mode 100755 Modules/CMakeTestCCompiler.cmake create mode 100755 Modules/CMakeTestCXXCompiler.cmake create mode 100755 Modules/CMakeTestForFreeVC.cxx create mode 100755 Modules/CMakeTestFortranCompiler.cmake create mode 100644 Modules/CMakeTestGNU.c create mode 100755 Modules/CMakeTestJavaCompiler.cmake create mode 100644 Modules/CMakeTestNMakeCLVersion.c create mode 100755 Modules/CMakeTestRCCompiler.cmake create mode 100755 Modules/CMakeUnixFindMake.cmake create mode 100755 Modules/CMakeVS6BackwardCompatibility.cmake create mode 100755 Modules/CMakeVS6FindMake.cmake create mode 100644 Modules/CMakeVS71FindMake.cmake create mode 100755 Modules/CMakeVS7BackwardCompatibility.cmake create mode 100755 Modules/CMakeVS7FindMake.cmake create mode 100755 Modules/CMakeVS8FindMake.cmake create mode 100755 Modules/CMakeVS9FindMake.cmake create mode 100644 Modules/COPYING-CMAKE-SCRIPTS create mode 100755 Modules/CPack.DS_Store.in create mode 100644 Modules/CPack.Description.plist.in create mode 100644 Modules/CPack.Info.plist.in create mode 100755 Modules/CPack.OSXScriptLauncher.in create mode 100644 Modules/CPack.OSXX11.Info.plist.in create mode 100755 Modules/CPack.RuntimeScript.in create mode 100644 Modules/CPack.STGZ_Header.sh.in create mode 100644 Modules/CPack.VolumeIcon.icns.in create mode 100644 Modules/CPack.background.png.in create mode 100644 Modules/CPack.cmake create mode 100644 Modules/CPackDeb.cmake create mode 100644 Modules/CPackRPM.cmake create mode 100644 Modules/CPackZIP.cmake create mode 100644 Modules/CTest.cmake create mode 100644 Modules/CTestTargets.cmake create mode 100644 Modules/CheckCCompilerFlag.cmake create mode 100755 Modules/CheckCSourceCompiles.cmake create mode 100755 Modules/CheckCSourceRuns.cmake create mode 100644 Modules/CheckCXXCompilerFlag.cmake create mode 100755 Modules/CheckCXXSourceCompiles.cmake create mode 100755 Modules/CheckCXXSourceRuns.cmake create mode 100644 Modules/CheckForPthreads.c create mode 100644 Modules/CheckFortranFunctionExists.cmake create mode 100644 Modules/CheckFunctionExists.c create mode 100644 Modules/CheckFunctionExists.cmake create mode 100644 Modules/CheckIncludeFile.c.in create mode 100644 Modules/CheckIncludeFile.cmake create mode 100644 Modules/CheckIncludeFile.cxx.in create mode 100644 Modules/CheckIncludeFileCXX.cmake create mode 100644 Modules/CheckIncludeFiles.cmake create mode 100644 Modules/CheckLibraryExists.cmake create mode 100644 Modules/CheckLibraryExists.lists.in create mode 100644 Modules/CheckSizeOf.cmake create mode 100644 Modules/CheckStructHasMember.cmake create mode 100755 Modules/CheckSymbolExists.cmake create mode 100644 Modules/CheckTypeSize.cmake create mode 100644 Modules/CheckTypeSizeC.c.in create mode 100644 Modules/CheckVariableExists.c create mode 100644 Modules/CheckVariableExists.cmake create mode 100644 Modules/Dart.cmake create mode 100644 Modules/DartConfiguration.tcl.in create mode 100644 Modules/Documentation.cmake create mode 100755 Modules/DummyCXXFile.cxx create mode 100644 Modules/FLTKCompatibility.cmake create mode 100644 Modules/FeatureSummary.cmake create mode 100644 Modules/FindASPELL.cmake create mode 100644 Modules/FindAVIFile.cmake create mode 100644 Modules/FindBLAS.cmake create mode 100644 Modules/FindBZip2.cmake create mode 100644 Modules/FindBoost.cmake create mode 100644 Modules/FindCABLE.cmake create mode 100644 Modules/FindCURL.cmake create mode 100644 Modules/FindCVS.cmake create mode 100644 Modules/FindCups.cmake create mode 100644 Modules/FindCurses.cmake create mode 100644 Modules/FindCygwin.cmake create mode 100755 Modules/FindDCMTK.cmake create mode 100644 Modules/FindDart.cmake create mode 100644 Modules/FindDoxygen.cmake create mode 100644 Modules/FindEXPAT.cmake create mode 100644 Modules/FindFLTK.cmake create mode 100755 Modules/FindFLTK2.cmake create mode 100644 Modules/FindFreetype.cmake create mode 100644 Modules/FindGCCXML.cmake create mode 100644 Modules/FindGDAL.cmake create mode 100644 Modules/FindGIF.cmake create mode 100644 Modules/FindGLU.cmake create mode 100644 Modules/FindGLUT.cmake create mode 100644 Modules/FindGTK.cmake create mode 100644 Modules/FindGettext.cmake create mode 100644 Modules/FindGnuplot.cmake create mode 100644 Modules/FindHSPELL.cmake create mode 100644 Modules/FindHTMLHelp.cmake create mode 100644 Modules/FindITK.cmake create mode 100644 Modules/FindImageMagick.cmake create mode 100644 Modules/FindJNI.cmake create mode 100644 Modules/FindJPEG.cmake create mode 100644 Modules/FindJasper.cmake create mode 100644 Modules/FindJava.cmake create mode 100644 Modules/FindKDE3.cmake create mode 100644 Modules/FindKDE4.cmake create mode 100644 Modules/FindLAPACK.cmake create mode 100644 Modules/FindLATEX.cmake create mode 100644 Modules/FindLibXml2.cmake create mode 100644 Modules/FindLibXslt.cmake create mode 100644 Modules/FindLua50.cmake create mode 100644 Modules/FindLua51.cmake create mode 100644 Modules/FindMFC.cmake create mode 100644 Modules/FindMPEG.cmake create mode 100644 Modules/FindMPEG2.cmake create mode 100644 Modules/FindMPI.cmake create mode 100755 Modules/FindMatlab.cmake create mode 100755 Modules/FindMotif.cmake create mode 100755 Modules/FindOpenAL.cmake create mode 100644 Modules/FindOpenGL.cmake create mode 100644 Modules/FindOpenSSL.cmake create mode 100644 Modules/FindOpenThreads.cmake create mode 100644 Modules/FindPHP4.cmake create mode 100644 Modules/FindPNG.cmake create mode 100644 Modules/FindPackageHandleStandardArgs.cmake create mode 100644 Modules/FindPackageMessage.cmake create mode 100644 Modules/FindPerl.cmake create mode 100644 Modules/FindPerlLibs.cmake create mode 100755 Modules/FindPhysFS.cmake create mode 100644 Modules/FindPike.cmake create mode 100755 Modules/FindPkgConfig.cmake create mode 100644 Modules/FindProducer.cmake create mode 100644 Modules/FindPythonInterp.cmake create mode 100644 Modules/FindPythonLibs.cmake create mode 100644 Modules/FindQt.cmake create mode 100755 Modules/FindQt3.cmake create mode 100644 Modules/FindQt4.cmake create mode 100644 Modules/FindQuickTime.cmake create mode 100644 Modules/FindRuby.cmake create mode 100644 Modules/FindSDL.cmake create mode 100755 Modules/FindSDL_image.cmake create mode 100755 Modules/FindSDL_mixer.cmake create mode 100755 Modules/FindSDL_net.cmake create mode 100755 Modules/FindSDL_sound.cmake create mode 100755 Modules/FindSDL_ttf.cmake create mode 100644 Modules/FindSWIG.cmake create mode 100644 Modules/FindSelfPackers.cmake create mode 100644 Modules/FindSubversion.cmake create mode 100644 Modules/FindTCL.cmake create mode 100644 Modules/FindTIFF.cmake create mode 100644 Modules/FindTclStub.cmake create mode 100644 Modules/FindTclsh.cmake create mode 100644 Modules/FindThreads.cmake create mode 100644 Modules/FindUnixCommands.cmake create mode 100644 Modules/FindVTK.cmake create mode 100644 Modules/FindWget.cmake create mode 100644 Modules/FindWish.cmake create mode 100644 Modules/FindX11.cmake create mode 100644 Modules/FindXMLRPC.cmake create mode 100644 Modules/FindZLIB.cmake create mode 100644 Modules/Findosg.cmake create mode 100644 Modules/FindosgDB.cmake create mode 100644 Modules/FindosgFX.cmake create mode 100644 Modules/FindosgGA.cmake create mode 100644 Modules/FindosgIntrospection.cmake create mode 100644 Modules/FindosgManipulator.cmake create mode 100644 Modules/FindosgParticle.cmake create mode 100644 Modules/FindosgProducer.cmake create mode 100644 Modules/FindosgShadow.cmake create mode 100644 Modules/FindosgSim.cmake create mode 100644 Modules/FindosgTerrain.cmake create mode 100644 Modules/FindosgText.cmake create mode 100644 Modules/FindosgUtil.cmake create mode 100644 Modules/FindosgViewer.cmake create mode 100755 Modules/FindwxWidgets.cmake create mode 100644 Modules/FindwxWindows.cmake create mode 100644 Modules/GetPrerequisites.cmake create mode 100755 Modules/ITKCompatibility.cmake create mode 100644 Modules/InstallRequiredSystemLibraries.cmake create mode 100644 Modules/KDE3Macros.cmake create mode 100644 Modules/MacroAddFileDependencies.cmake create mode 100755 Modules/NSIS.InstallOptions.ini.in create mode 100755 Modules/NSIS.template.in create mode 100755 Modules/Platform/AIX-VisualAge-Fortran.cmake create mode 100644 Modules/Platform/AIX.cmake create mode 100644 Modules/Platform/BSDOS.cmake create mode 100644 Modules/Platform/BeOS.cmake create mode 100644 Modules/Platform/BlueGeneL.cmake create mode 100644 Modules/Platform/CMakeLists.txt create mode 100755 Modules/Platform/CYGWIN-g77.cmake create mode 100644 Modules/Platform/CYGWIN.cmake create mode 100644 Modules/Platform/Catamount.cmake create mode 100644 Modules/Platform/Darwin-icc.cmake create mode 100644 Modules/Platform/Darwin-icpc.cmake create mode 100644 Modules/Platform/Darwin-xlc.cmake create mode 100644 Modules/Platform/Darwin.cmake create mode 100644 Modules/Platform/DragonFly.cmake create mode 100644 Modules/Platform/FreeBSD.cmake create mode 100644 Modules/Platform/GNU.cmake create mode 100644 Modules/Platform/Generic-ADSP-ASM.cmake create mode 100644 Modules/Platform/Generic-ADSP-C.cmake create mode 100644 Modules/Platform/Generic-ADSP-CXX.cmake create mode 100644 Modules/Platform/Generic-ADSP-Common.cmake create mode 100644 Modules/Platform/Generic-SDCC-C.cmake create mode 100755 Modules/Platform/Generic.cmake create mode 100644 Modules/Platform/HP-UX.cmake create mode 100644 Modules/Platform/IRIX.cmake create mode 100644 Modules/Platform/IRIX64.cmake create mode 100644 Modules/Platform/Linux-GNU-Fortran.cmake create mode 100755 Modules/Platform/Linux-Intel-C.cmake create mode 100755 Modules/Platform/Linux-Intel-CXX.cmake create mode 100755 Modules/Platform/Linux-Intel-Fortran.cmake create mode 100644 Modules/Platform/Linux-PGI-C.cmake create mode 100644 Modules/Platform/Linux-PGI-CXX.cmake create mode 100644 Modules/Platform/Linux-SunPro-C.cmake create mode 100644 Modules/Platform/Linux-SunPro-CXX.cmake create mode 100644 Modules/Platform/Linux-SunPro-Fortran.cmake create mode 100644 Modules/Platform/Linux-VisualAge-C.cmake create mode 100644 Modules/Platform/Linux-VisualAge-Fortran.cmake create mode 100644 Modules/Platform/Linux-como.cmake create mode 100755 Modules/Platform/Linux-icpc.cmake create mode 100755 Modules/Platform/Linux-ifort.cmake create mode 100644 Modules/Platform/Linux.cmake create mode 100644 Modules/Platform/MP-RAS.cmake create mode 100644 Modules/Platform/NetBSD.cmake create mode 100644 Modules/Platform/OSF1.cmake create mode 100644 Modules/Platform/OpenBSD.cmake create mode 100644 Modules/Platform/QNX.cmake create mode 100644 Modules/Platform/RISCos.cmake create mode 100644 Modules/Platform/SCO_SV.cmake create mode 100644 Modules/Platform/SINIX.cmake create mode 100644 Modules/Platform/SunOS-SunPro-Fortran.cmake create mode 100644 Modules/Platform/SunOS.cmake create mode 100644 Modules/Platform/Tru64.cmake create mode 100644 Modules/Platform/ULTRIX.cmake create mode 100644 Modules/Platform/UNIX_SV.cmake create mode 100755 Modules/Platform/UnixPaths.cmake create mode 100644 Modules/Platform/UnixWare.cmake create mode 100644 Modules/Platform/Windows-bcc32.cmake create mode 100644 Modules/Platform/Windows-cl.cmake create mode 100755 Modules/Platform/Windows-cl.cmake.in create mode 100755 Modules/Platform/Windows-df.cmake create mode 100755 Modules/Platform/Windows-g++.cmake create mode 100755 Modules/Platform/Windows-g77.cmake create mode 100755 Modules/Platform/Windows-gcc.cmake create mode 100755 Modules/Platform/Windows-icl.cmake create mode 100755 Modules/Platform/Windows-ifort.cmake create mode 100755 Modules/Platform/Windows-wcl386.cmake create mode 100644 Modules/Platform/Windows.cmake create mode 100755 Modules/Platform/WindowsPaths.cmake create mode 100644 Modules/Platform/Xenix.cmake create mode 100644 Modules/Platform/cl.cmake create mode 100644 Modules/Platform/eCos.cmake create mode 100755 Modules/Platform/g77.cmake create mode 100644 Modules/Platform/gas.cmake create mode 100644 Modules/Platform/gcc.cmake create mode 100755 Modules/Platform/kFreeBSD.cmake create mode 100644 Modules/Platform/syllable.cmake create mode 100755 Modules/Platform/xlf.cmake create mode 100755 Modules/SystemInformation.cmake create mode 100755 Modules/SystemInformation.in create mode 100644 Modules/TestBigEndian.cmake create mode 100755 Modules/TestCXXAcceptsFlag.cmake create mode 100644 Modules/TestEndianess.c.in create mode 100644 Modules/TestForANSIForScope.cmake create mode 100644 Modules/TestForANSIStreamHeaders.cmake create mode 100644 Modules/TestForANSIStreamHeaders.cxx create mode 100644 Modules/TestForAnsiForScope.cxx create mode 100755 Modules/TestForSSTREAM.cmake create mode 100755 Modules/TestForSSTREAM.cxx create mode 100644 Modules/TestForSTDNamespace.cmake create mode 100644 Modules/TestForSTDNamespace.cxx create mode 100644 Modules/UseEcos.cmake create mode 100644 Modules/UsePkgConfig.cmake create mode 100755 Modules/UseQt4.cmake create mode 100644 Modules/UseSWIG.cmake create mode 100644 Modules/UseVTK40.cmake create mode 100644 Modules/UseVTKBuildSettings40.cmake create mode 100644 Modules/UseVTKConfig40.cmake create mode 100644 Modules/Use_wxWindows.cmake create mode 100755 Modules/UsewxWidgets.cmake create mode 100644 Modules/VTKCompatibility.cmake create mode 100644 Modules/ecos_clean.cmake create mode 100644 Modules/kde3init_dummy.cpp.in create mode 100644 Modules/kde3uic.cmake create mode 100644 Modules/readme.txt create mode 100644 Readme.txt create mode 100644 Source/.cvsignore create mode 100644 Source/CMakeLists.txt create mode 100644 Source/CPack/OSXScriptLauncher.cxx create mode 100755 Source/CPack/bills-comments.txt create mode 100755 Source/CPack/cmCPackConfigure.h.in create mode 100755 Source/CPack/cmCPackCygwinBinaryGenerator.cxx create mode 100755 Source/CPack/cmCPackCygwinBinaryGenerator.h create mode 100755 Source/CPack/cmCPackCygwinSourceGenerator.cxx create mode 100755 Source/CPack/cmCPackCygwinSourceGenerator.h create mode 100644 Source/CPack/cmCPackDebGenerator.cxx create mode 100644 Source/CPack/cmCPackDebGenerator.h create mode 100755 Source/CPack/cmCPackGenerator.cxx create mode 100755 Source/CPack/cmCPackGenerator.h create mode 100755 Source/CPack/cmCPackGeneratorFactory.cxx create mode 100755 Source/CPack/cmCPackGeneratorFactory.h create mode 100644 Source/CPack/cmCPackLog.cxx create mode 100644 Source/CPack/cmCPackLog.h create mode 100644 Source/CPack/cmCPackNSISGenerator.cxx create mode 100644 Source/CPack/cmCPackNSISGenerator.h create mode 100644 Source/CPack/cmCPackOSXX11Generator.cxx create mode 100644 Source/CPack/cmCPackOSXX11Generator.h create mode 100644 Source/CPack/cmCPackPackageMakerGenerator.cxx create mode 100644 Source/CPack/cmCPackPackageMakerGenerator.h create mode 100644 Source/CPack/cmCPackRPMGenerator.cxx create mode 100644 Source/CPack/cmCPackRPMGenerator.h create mode 100644 Source/CPack/cmCPackSTGZGenerator.cxx create mode 100644 Source/CPack/cmCPackSTGZGenerator.h create mode 100644 Source/CPack/cmCPackTGZGenerator.cxx create mode 100644 Source/CPack/cmCPackTGZGenerator.h create mode 100644 Source/CPack/cmCPackTarBZip2Generator.cxx create mode 100644 Source/CPack/cmCPackTarBZip2Generator.h create mode 100644 Source/CPack/cmCPackTarCompressGenerator.cxx create mode 100644 Source/CPack/cmCPackTarCompressGenerator.h create mode 100644 Source/CPack/cmCPackZIPGenerator.cxx create mode 100644 Source/CPack/cmCPackZIPGenerator.h create mode 100644 Source/CPack/cpack.cxx create mode 100755 Source/CPack/cygwin.readme create mode 100644 Source/CTest/cmCTestBuildAndTestHandler.cxx create mode 100644 Source/CTest/cmCTestBuildAndTestHandler.h create mode 100755 Source/CTest/cmCTestBuildCommand.cxx create mode 100755 Source/CTest/cmCTestBuildCommand.h create mode 100755 Source/CTest/cmCTestBuildHandler.cxx create mode 100755 Source/CTest/cmCTestBuildHandler.h create mode 100755 Source/CTest/cmCTestCommand.h create mode 100755 Source/CTest/cmCTestConfigureCommand.cxx create mode 100755 Source/CTest/cmCTestConfigureCommand.h create mode 100755 Source/CTest/cmCTestConfigureHandler.cxx create mode 100755 Source/CTest/cmCTestConfigureHandler.h create mode 100644 Source/CTest/cmCTestCoverageCommand.cxx create mode 100644 Source/CTest/cmCTestCoverageCommand.h create mode 100755 Source/CTest/cmCTestCoverageHandler.cxx create mode 100755 Source/CTest/cmCTestCoverageHandler.h create mode 100755 Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx create mode 100755 Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h create mode 100644 Source/CTest/cmCTestGenericHandler.cxx create mode 100644 Source/CTest/cmCTestGenericHandler.h create mode 100644 Source/CTest/cmCTestHandlerCommand.cxx create mode 100644 Source/CTest/cmCTestHandlerCommand.h create mode 100644 Source/CTest/cmCTestMemCheckCommand.cxx create mode 100644 Source/CTest/cmCTestMemCheckCommand.h create mode 100644 Source/CTest/cmCTestMemCheckHandler.cxx create mode 100644 Source/CTest/cmCTestMemCheckHandler.h create mode 100755 Source/CTest/cmCTestReadCustomFilesCommand.cxx create mode 100755 Source/CTest/cmCTestReadCustomFilesCommand.h create mode 100755 Source/CTest/cmCTestRunScriptCommand.cxx create mode 100755 Source/CTest/cmCTestRunScriptCommand.h create mode 100755 Source/CTest/cmCTestScriptHandler.cxx create mode 100755 Source/CTest/cmCTestScriptHandler.h create mode 100755 Source/CTest/cmCTestSleepCommand.cxx create mode 100755 Source/CTest/cmCTestSleepCommand.h create mode 100755 Source/CTest/cmCTestStartCommand.cxx create mode 100755 Source/CTest/cmCTestStartCommand.h create mode 100644 Source/CTest/cmCTestSubmitCommand.cxx create mode 100644 Source/CTest/cmCTestSubmitCommand.h create mode 100644 Source/CTest/cmCTestSubmitHandler.cxx create mode 100644 Source/CTest/cmCTestSubmitHandler.h create mode 100644 Source/CTest/cmCTestTestCommand.cxx create mode 100644 Source/CTest/cmCTestTestCommand.h create mode 100755 Source/CTest/cmCTestTestHandler.cxx create mode 100755 Source/CTest/cmCTestTestHandler.h create mode 100755 Source/CTest/cmCTestUpdateCommand.cxx create mode 100755 Source/CTest/cmCTestUpdateCommand.h create mode 100755 Source/CTest/cmCTestUpdateHandler.cxx create mode 100755 Source/CTest/cmCTestUpdateHandler.h create mode 100644 Source/CursesDialog/.NoDartCoverage create mode 100644 Source/CursesDialog/CMakeLists.txt create mode 100644 Source/CursesDialog/ccmake.cxx create mode 100644 Source/CursesDialog/cmCursesBoolWidget.cxx create mode 100644 Source/CursesDialog/cmCursesBoolWidget.h create mode 100644 Source/CursesDialog/cmCursesCacheEntryComposite.cxx create mode 100644 Source/CursesDialog/cmCursesCacheEntryComposite.h create mode 100644 Source/CursesDialog/cmCursesDummyWidget.cxx create mode 100644 Source/CursesDialog/cmCursesDummyWidget.h create mode 100644 Source/CursesDialog/cmCursesFilePathWidget.cxx create mode 100644 Source/CursesDialog/cmCursesFilePathWidget.h create mode 100644 Source/CursesDialog/cmCursesForm.cxx create mode 100644 Source/CursesDialog/cmCursesForm.h create mode 100644 Source/CursesDialog/cmCursesLabelWidget.cxx create mode 100644 Source/CursesDialog/cmCursesLabelWidget.h create mode 100644 Source/CursesDialog/cmCursesLongMessageForm.cxx create mode 100644 Source/CursesDialog/cmCursesLongMessageForm.h create mode 100644 Source/CursesDialog/cmCursesMainForm.cxx create mode 100644 Source/CursesDialog/cmCursesMainForm.h create mode 100644 Source/CursesDialog/cmCursesPathWidget.cxx create mode 100644 Source/CursesDialog/cmCursesPathWidget.h create mode 100644 Source/CursesDialog/cmCursesStandardIncludes.h create mode 100644 Source/CursesDialog/cmCursesStringWidget.cxx create mode 100644 Source/CursesDialog/cmCursesStringWidget.h create mode 100644 Source/CursesDialog/cmCursesWidget.cxx create mode 100644 Source/CursesDialog/cmCursesWidget.h create mode 100644 Source/CursesDialog/form/.NoDartCoverage create mode 100644 Source/CursesDialog/form/CMakeLists.txt create mode 100644 Source/CursesDialog/form/READ.ME create mode 100644 Source/CursesDialog/form/cmFormConfigure.h.in create mode 100644 Source/CursesDialog/form/eti.h create mode 100644 Source/CursesDialog/form/fld_arg.c create mode 100644 Source/CursesDialog/form/fld_attr.c create mode 100644 Source/CursesDialog/form/fld_current.c create mode 100644 Source/CursesDialog/form/fld_def.c create mode 100644 Source/CursesDialog/form/fld_dup.c create mode 100644 Source/CursesDialog/form/fld_ftchoice.c create mode 100644 Source/CursesDialog/form/fld_ftlink.c create mode 100644 Source/CursesDialog/form/fld_info.c create mode 100644 Source/CursesDialog/form/fld_just.c create mode 100644 Source/CursesDialog/form/fld_link.c create mode 100644 Source/CursesDialog/form/fld_max.c create mode 100644 Source/CursesDialog/form/fld_move.c create mode 100644 Source/CursesDialog/form/fld_newftyp.c create mode 100644 Source/CursesDialog/form/fld_opts.c create mode 100644 Source/CursesDialog/form/fld_pad.c create mode 100644 Source/CursesDialog/form/fld_page.c create mode 100644 Source/CursesDialog/form/fld_stat.c create mode 100644 Source/CursesDialog/form/fld_type.c create mode 100644 Source/CursesDialog/form/fld_user.c create mode 100644 Source/CursesDialog/form/form.h create mode 100644 Source/CursesDialog/form/form.priv.h create mode 100644 Source/CursesDialog/form/frm_cursor.c create mode 100644 Source/CursesDialog/form/frm_data.c create mode 100644 Source/CursesDialog/form/frm_def.c create mode 100644 Source/CursesDialog/form/frm_driver.c create mode 100644 Source/CursesDialog/form/frm_hook.c create mode 100644 Source/CursesDialog/form/frm_opts.c create mode 100644 Source/CursesDialog/form/frm_page.c create mode 100644 Source/CursesDialog/form/frm_post.c create mode 100644 Source/CursesDialog/form/frm_req_name.c create mode 100644 Source/CursesDialog/form/frm_scale.c create mode 100644 Source/CursesDialog/form/frm_sub.c create mode 100644 Source/CursesDialog/form/frm_user.c create mode 100644 Source/CursesDialog/form/frm_win.c create mode 100644 Source/CursesDialog/form/fty_alnum.c create mode 100644 Source/CursesDialog/form/fty_alpha.c create mode 100644 Source/CursesDialog/form/fty_enum.c create mode 100644 Source/CursesDialog/form/fty_int.c create mode 100644 Source/CursesDialog/form/fty_ipv4.c create mode 100644 Source/CursesDialog/form/fty_num.c create mode 100644 Source/CursesDialog/form/fty_regex.c create mode 100644 Source/CursesDialog/form/llib-lform create mode 100644 Source/CursesDialog/form/mf_common.h create mode 100644 Source/CursesDialog/form/nc_alloc.h create mode 100644 Source/FLTKDialog/CMakeLists.txt create mode 100644 Source/FLTKDialog/CMakeSetupGUI.fl create mode 100644 Source/FLTKDialog/CMakeSetupGUIImplementation.cxx create mode 100644 Source/FLTKDialog/CMakeSetupGUIImplementation.h create mode 100644 Source/FLTKDialog/FLTKDialog.cxx create mode 100644 Source/FLTKDialog/FLTKDialog.dsp create mode 100644 Source/FLTKDialog/FLTKPropertyItemRow.cxx create mode 100644 Source/FLTKDialog/FLTKPropertyItemRow.h create mode 100644 Source/FLTKDialog/FLTKPropertyList.cxx create mode 100644 Source/FLTKDialog/FLTKPropertyList.h create mode 100644 Source/MFCDialog/.cvsignore create mode 100644 Source/MFCDialog/CMakeCommandLineInfo.cpp create mode 100644 Source/MFCDialog/CMakeCommandLineInfo.h create mode 100755 Source/MFCDialog/CMakeGenDialog.cpp create mode 100755 Source/MFCDialog/CMakeGenDialog.h create mode 100644 Source/MFCDialog/CMakeLists.txt create mode 100644 Source/MFCDialog/CMakeSetup.cpp create mode 100644 Source/MFCDialog/CMakeSetup.h create mode 100644 Source/MFCDialog/CMakeSetup.rc create mode 100644 Source/MFCDialog/CMakeSetupDialog.cpp create mode 100644 Source/MFCDialog/CMakeSetupDialog.h create mode 100644 Source/MFCDialog/CMakeSetupManifest.xml create mode 100644 Source/MFCDialog/MakeHelp.cpp create mode 100644 Source/MFCDialog/MakeHelp.h create mode 100644 Source/MFCDialog/PathDialog.cpp create mode 100644 Source/MFCDialog/PathDialog.h create mode 100644 Source/MFCDialog/PropertyList.cpp create mode 100644 Source/MFCDialog/PropertyList.h create mode 100644 Source/MFCDialog/StdAfx.cpp create mode 100644 Source/MFCDialog/StdAfx.h create mode 100644 Source/MFCDialog/res/CMakeSetupDialog.ico create mode 100644 Source/MFCDialog/res/CMakeSetupDialog.rc2 create mode 100644 Source/MFCDialog/resource.h create mode 100644 Source/QtDialog/AddCacheEntry.cxx create mode 100644 Source/QtDialog/AddCacheEntry.h create mode 100644 Source/QtDialog/AddCacheEntry.ui create mode 100644 Source/QtDialog/CMake.desktop create mode 100755 Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake create mode 100644 Source/QtDialog/CMakeLists.txt create mode 100644 Source/QtDialog/CMakeSetup.cxx create mode 100644 Source/QtDialog/CMakeSetup.icns create mode 100644 Source/QtDialog/CMakeSetup.ico create mode 100644 Source/QtDialog/CMakeSetup.png create mode 100644 Source/QtDialog/CMakeSetup.qrc create mode 100644 Source/QtDialog/CMakeSetup.rc create mode 100644 Source/QtDialog/CMakeSetupDialog.cxx create mode 100644 Source/QtDialog/CMakeSetupDialog.h create mode 100644 Source/QtDialog/CMakeSetupDialog.ui create mode 100644 Source/QtDialog/Delete16.png create mode 100755 Source/QtDialog/MacInstallDialog.ui create mode 100644 Source/QtDialog/Plus16.png create mode 100644 Source/QtDialog/QCMake.cxx create mode 100644 Source/QtDialog/QCMake.h create mode 100644 Source/QtDialog/QCMakeCacheView.cxx create mode 100644 Source/QtDialog/QCMakeCacheView.h create mode 100755 Source/QtDialog/QMacInstallDialog.cxx create mode 100755 Source/QtDialog/QMacInstallDialog.h create mode 100755 Source/QtDialog/QtDialogCPack.cmake.in create mode 100755 Source/QtDialog/README create mode 100644 Source/QtDialog/cmakecache.xml create mode 100644 Source/QtDialog/postflight.sh.in create mode 100644 Source/QtDialog/postupgrade.sh.in create mode 100644 Source/WXDialog/CMakeIcon.xpm create mode 100644 Source/WXDialog/CMakeLists.txt create mode 100644 Source/WXDialog/CMakeSetup.cpp create mode 100644 Source/WXDialog/CMakeSetup.h create mode 100644 Source/WXDialog/CMakeSetup.pjd create mode 100644 Source/WXDialog/CMakeSetup.rc create mode 100644 Source/WXDialog/CMakeSetupFrame.cpp create mode 100644 Source/WXDialog/CMakeSetupFrame.h create mode 100644 Source/WXDialog/CommandLineInfo.cpp create mode 100644 Source/WXDialog/CommandLineInfo.h create mode 100644 Source/WXDialog/NGDialog.exe.manifest create mode 100644 Source/WXDialog/NGDialog.ico create mode 100644 Source/WXDialog/PropertyList.cpp create mode 100644 Source/WXDialog/PropertyList.h create mode 100644 Source/WXDialog/about.html create mode 100644 Source/WXDialog/aboutdlg.cpp create mode 100644 Source/WXDialog/aboutdlg.h create mode 100644 Source/WXDialog/app_resources.cpp create mode 100644 Source/WXDialog/app_resources.h create mode 100644 Source/WXDialog/bin/FindUPX.cmake create mode 100644 Source/WXDialog/bin/FindwxW.cmake create mode 100644 Source/WXDialog/bin/FindwxWin.cmake create mode 100644 Source/WXDialog/bin/UsewxW.cmake create mode 100644 Source/WXDialog/changelog.txt create mode 100644 Source/WXDialog/cmake_icon.gif create mode 100644 Source/WXDialog/cmake_icon.xpm create mode 100644 Source/WXDialog/cmake_logo.xpm create mode 100644 Source/WXDialog/cmakesetup.done.xml create mode 100644 Source/WXDialog/cmakesetup.xml create mode 100644 Source/WXDialog/config.h create mode 100644 Source/WXDialog/optionsdlg.cpp create mode 100644 Source/WXDialog/optionsdlg.h create mode 100644 Source/WXDialog/progressdlg.cpp create mode 100644 Source/WXDialog/progressdlg.h create mode 100644 Source/cmAddCustomCommandCommand.cxx create mode 100644 Source/cmAddCustomCommandCommand.h create mode 100644 Source/cmAddCustomTargetCommand.cxx create mode 100644 Source/cmAddCustomTargetCommand.h create mode 100644 Source/cmAddDefinitionsCommand.cxx create mode 100644 Source/cmAddDefinitionsCommand.h create mode 100644 Source/cmAddDependenciesCommand.cxx create mode 100644 Source/cmAddDependenciesCommand.h create mode 100644 Source/cmAddExecutableCommand.cxx create mode 100644 Source/cmAddExecutableCommand.h create mode 100644 Source/cmAddLibraryCommand.cxx create mode 100644 Source/cmAddLibraryCommand.h create mode 100644 Source/cmAddSubDirectoryCommand.cxx create mode 100644 Source/cmAddSubDirectoryCommand.h create mode 100644 Source/cmAddTestCommand.cxx create mode 100644 Source/cmAddTestCommand.h create mode 100644 Source/cmAuxSourceDirectoryCommand.cxx create mode 100644 Source/cmAuxSourceDirectoryCommand.h create mode 100644 Source/cmBootstrapCommands.cxx create mode 100755 Source/cmBreakCommand.cxx create mode 100755 Source/cmBreakCommand.h create mode 100644 Source/cmBuildCommand.cxx create mode 100644 Source/cmBuildCommand.h create mode 100644 Source/cmBuildNameCommand.cxx create mode 100644 Source/cmBuildNameCommand.h create mode 100644 Source/cmCMakeMinimumRequired.cxx create mode 100644 Source/cmCMakeMinimumRequired.h create mode 100755 Source/cmCMakePolicyCommand.cxx create mode 100755 Source/cmCMakePolicyCommand.h create mode 100644 Source/cmCPluginAPI.cxx create mode 100644 Source/cmCPluginAPI.h create mode 100644 Source/cmCTest.cxx create mode 100644 Source/cmCTest.h create mode 100644 Source/cmCacheManager.cxx create mode 100644 Source/cmCacheManager.h create mode 100644 Source/cmCallVisualStudioMacro.cxx create mode 100644 Source/cmCallVisualStudioMacro.h create mode 100644 Source/cmCommand.h create mode 100644 Source/cmCommandArgumentLexer.cxx create mode 100644 Source/cmCommandArgumentLexer.h create mode 100644 Source/cmCommandArgumentLexer.in.l create mode 100644 Source/cmCommandArgumentParser.cxx create mode 100644 Source/cmCommandArgumentParser.y create mode 100644 Source/cmCommandArgumentParserHelper.cxx create mode 100644 Source/cmCommandArgumentParserHelper.h create mode 100644 Source/cmCommandArgumentParserTokens.h create mode 100644 Source/cmCommandArgumentsHelper.cxx create mode 100644 Source/cmCommandArgumentsHelper.h create mode 100644 Source/cmCommands.cxx create mode 100644 Source/cmCommands.h create mode 100644 Source/cmComputeComponentGraph.cxx create mode 100644 Source/cmComputeComponentGraph.h create mode 100644 Source/cmComputeLinkDepends.cxx create mode 100644 Source/cmComputeLinkDepends.h create mode 100644 Source/cmComputeLinkInformation.cxx create mode 100644 Source/cmComputeLinkInformation.h create mode 100644 Source/cmComputeTargetDepends.cxx create mode 100644 Source/cmComputeTargetDepends.h create mode 100644 Source/cmConfigure.cmake.h.in create mode 100644 Source/cmConfigureFileCommand.cxx create mode 100644 Source/cmConfigureFileCommand.h create mode 100644 Source/cmCoreTryCompile.cxx create mode 100644 Source/cmCoreTryCompile.h create mode 100644 Source/cmCreateTestSourceList.cxx create mode 100644 Source/cmCreateTestSourceList.h create mode 100644 Source/cmCustomCommand.cxx create mode 100644 Source/cmCustomCommand.h create mode 100644 Source/cmData.h create mode 100755 Source/cmDefinePropertyCommand.cxx create mode 100755 Source/cmDefinePropertyCommand.h create mode 100644 Source/cmDepends.cxx create mode 100644 Source/cmDepends.h create mode 100644 Source/cmDependsC.cxx create mode 100644 Source/cmDependsC.h create mode 100644 Source/cmDependsFortran.cxx create mode 100644 Source/cmDependsFortran.h create mode 100644 Source/cmDependsFortranLexer.cxx create mode 100644 Source/cmDependsFortranLexer.h create mode 100644 Source/cmDependsFortranLexer.in.l create mode 100644 Source/cmDependsFortranParser.cxx create mode 100644 Source/cmDependsFortranParser.h create mode 100644 Source/cmDependsFortranParser.y create mode 100644 Source/cmDependsFortranParserTokens.h create mode 100644 Source/cmDependsJava.cxx create mode 100644 Source/cmDependsJava.h create mode 100644 Source/cmDependsJavaLexer.cxx create mode 100644 Source/cmDependsJavaLexer.h create mode 100644 Source/cmDependsJavaLexer.in.l create mode 100644 Source/cmDependsJavaParser.cxx create mode 100644 Source/cmDependsJavaParser.y create mode 100644 Source/cmDependsJavaParserHelper.cxx create mode 100644 Source/cmDependsJavaParserHelper.h create mode 100644 Source/cmDependsJavaParserTokens.h create mode 100755 Source/cmDocumentVariables.cxx create mode 100755 Source/cmDocumentVariables.h create mode 100644 Source/cmDocumentation.cxx create mode 100644 Source/cmDocumentation.h create mode 100644 Source/cmDocumentationFormatter.cxx create mode 100644 Source/cmDocumentationFormatter.h create mode 100644 Source/cmDocumentationFormatterDocbook.cxx create mode 100644 Source/cmDocumentationFormatterDocbook.h create mode 100644 Source/cmDocumentationFormatterHTML.cxx create mode 100644 Source/cmDocumentationFormatterHTML.h create mode 100644 Source/cmDocumentationFormatterMan.cxx create mode 100644 Source/cmDocumentationFormatterMan.h create mode 100644 Source/cmDocumentationFormatterText.cxx create mode 100644 Source/cmDocumentationFormatterText.h create mode 100644 Source/cmDocumentationFormatterUsage.cxx create mode 100644 Source/cmDocumentationFormatterUsage.h create mode 100755 Source/cmDocumentationSection.cxx create mode 100755 Source/cmDocumentationSection.h create mode 100644 Source/cmDumpDocumentation.cxx create mode 100644 Source/cmDynamicLoader.cxx create mode 100644 Source/cmDynamicLoader.h create mode 100644 Source/cmELF.cxx create mode 100644 Source/cmELF.h create mode 100644 Source/cmElseCommand.cxx create mode 100644 Source/cmElseCommand.h create mode 100755 Source/cmElseIfCommand.cxx create mode 100755 Source/cmElseIfCommand.h create mode 100644 Source/cmEnableLanguageCommand.cxx create mode 100644 Source/cmEnableLanguageCommand.h create mode 100644 Source/cmEnableTestingCommand.cxx create mode 100644 Source/cmEnableTestingCommand.h create mode 100644 Source/cmEndForEachCommand.cxx create mode 100644 Source/cmEndForEachCommand.h create mode 100755 Source/cmEndFunctionCommand.cxx create mode 100755 Source/cmEndFunctionCommand.h create mode 100644 Source/cmEndIfCommand.cxx create mode 100644 Source/cmEndIfCommand.h create mode 100755 Source/cmEndMacroCommand.cxx create mode 100755 Source/cmEndMacroCommand.h create mode 100644 Source/cmEndWhileCommand.cxx create mode 100644 Source/cmEndWhileCommand.h create mode 100644 Source/cmExecProgramCommand.cxx create mode 100644 Source/cmExecProgramCommand.h create mode 100644 Source/cmExecuteProcessCommand.cxx create mode 100644 Source/cmExecuteProcessCommand.h create mode 100755 Source/cmExecutionStatus.h create mode 100644 Source/cmExportBuildFileGenerator.cxx create mode 100644 Source/cmExportBuildFileGenerator.h create mode 100644 Source/cmExportCommand.cxx create mode 100644 Source/cmExportCommand.h create mode 100644 Source/cmExportFileGenerator.cxx create mode 100644 Source/cmExportFileGenerator.h create mode 100644 Source/cmExportInstallFileGenerator.cxx create mode 100644 Source/cmExportInstallFileGenerator.h create mode 100644 Source/cmExportLibraryDependencies.cxx create mode 100644 Source/cmExportLibraryDependencies.h create mode 100644 Source/cmExprLexer.cxx create mode 100644 Source/cmExprLexer.h create mode 100644 Source/cmExprLexer.in.l create mode 100644 Source/cmExprParser.cxx create mode 100644 Source/cmExprParser.y create mode 100644 Source/cmExprParserHelper.cxx create mode 100644 Source/cmExprParserHelper.h create mode 100644 Source/cmExprParserTokens.h create mode 100644 Source/cmExternalMakefileProjectGenerator.cxx create mode 100644 Source/cmExternalMakefileProjectGenerator.h create mode 100644 Source/cmExtraCodeBlocksGenerator.cxx create mode 100644 Source/cmExtraCodeBlocksGenerator.h create mode 100644 Source/cmExtraEclipseCDT4Generator.cxx create mode 100644 Source/cmExtraEclipseCDT4Generator.h create mode 100644 Source/cmFLTKWrapUICommand.cxx create mode 100644 Source/cmFLTKWrapUICommand.h create mode 100644 Source/cmFileCommand.cxx create mode 100644 Source/cmFileCommand.h create mode 100644 Source/cmFileTimeComparison.cxx create mode 100644 Source/cmFileTimeComparison.h create mode 100755 Source/cmFindBase.cxx create mode 100755 Source/cmFindBase.h create mode 100644 Source/cmFindCommon.cxx create mode 100644 Source/cmFindCommon.h create mode 100644 Source/cmFindFileCommand.cxx create mode 100644 Source/cmFindFileCommand.h create mode 100644 Source/cmFindLibraryCommand.cxx create mode 100644 Source/cmFindLibraryCommand.h create mode 100644 Source/cmFindPackageCommand.cxx create mode 100644 Source/cmFindPackageCommand.h create mode 100644 Source/cmFindPathCommand.cxx create mode 100644 Source/cmFindPathCommand.h create mode 100644 Source/cmFindProgramCommand.cxx create mode 100644 Source/cmFindProgramCommand.h create mode 100644 Source/cmForEachCommand.cxx create mode 100644 Source/cmForEachCommand.h create mode 100644 Source/cmFunctionBlocker.h create mode 100755 Source/cmFunctionCommand.cxx create mode 100755 Source/cmFunctionCommand.h create mode 100644 Source/cmGeneratedFileStream.cxx create mode 100644 Source/cmGeneratedFileStream.h create mode 100644 Source/cmGetCMakePropertyCommand.cxx create mode 100644 Source/cmGetCMakePropertyCommand.h create mode 100644 Source/cmGetDirectoryPropertyCommand.cxx create mode 100644 Source/cmGetDirectoryPropertyCommand.h create mode 100644 Source/cmGetFilenameComponentCommand.cxx create mode 100644 Source/cmGetFilenameComponentCommand.h create mode 100755 Source/cmGetPropertyCommand.cxx create mode 100755 Source/cmGetPropertyCommand.h create mode 100644 Source/cmGetSourceFilePropertyCommand.cxx create mode 100644 Source/cmGetSourceFilePropertyCommand.h create mode 100644 Source/cmGetTargetPropertyCommand.cxx create mode 100644 Source/cmGetTargetPropertyCommand.h create mode 100644 Source/cmGetTestPropertyCommand.cxx create mode 100644 Source/cmGetTestPropertyCommand.h create mode 100644 Source/cmGlobalBorlandMakefileGenerator.cxx create mode 100644 Source/cmGlobalBorlandMakefileGenerator.h create mode 100644 Source/cmGlobalGenerator.cxx create mode 100644 Source/cmGlobalGenerator.h create mode 100644 Source/cmGlobalKdevelopGenerator.cxx create mode 100644 Source/cmGlobalKdevelopGenerator.h create mode 100644 Source/cmGlobalMSYSMakefileGenerator.cxx create mode 100644 Source/cmGlobalMSYSMakefileGenerator.h create mode 100644 Source/cmGlobalMinGWMakefileGenerator.cxx create mode 100644 Source/cmGlobalMinGWMakefileGenerator.h create mode 100644 Source/cmGlobalNMakeMakefileGenerator.cxx create mode 100644 Source/cmGlobalNMakeMakefileGenerator.h create mode 100644 Source/cmGlobalUnixMakefileGenerator3.cxx create mode 100644 Source/cmGlobalUnixMakefileGenerator3.h create mode 100644 Source/cmGlobalVisualStudio6Generator.cxx create mode 100644 Source/cmGlobalVisualStudio6Generator.h create mode 100644 Source/cmGlobalVisualStudio71Generator.cxx create mode 100644 Source/cmGlobalVisualStudio71Generator.h create mode 100644 Source/cmGlobalVisualStudio7Generator.cxx create mode 100644 Source/cmGlobalVisualStudio7Generator.h create mode 100644 Source/cmGlobalVisualStudio8Generator.cxx create mode 100644 Source/cmGlobalVisualStudio8Generator.h create mode 100644 Source/cmGlobalVisualStudio8Win64Generator.cxx create mode 100644 Source/cmGlobalVisualStudio8Win64Generator.h create mode 100755 Source/cmGlobalVisualStudio9Generator.cxx create mode 100755 Source/cmGlobalVisualStudio9Generator.h create mode 100755 Source/cmGlobalVisualStudio9Win64Generator.cxx create mode 100755 Source/cmGlobalVisualStudio9Win64Generator.h create mode 100755 Source/cmGlobalVisualStudioGenerator.cxx create mode 100644 Source/cmGlobalVisualStudioGenerator.h create mode 100644 Source/cmGlobalWatcomWMakeGenerator.cxx create mode 100644 Source/cmGlobalWatcomWMakeGenerator.h create mode 100644 Source/cmGlobalXCode21Generator.cxx create mode 100644 Source/cmGlobalXCode21Generator.h create mode 100644 Source/cmGlobalXCodeGenerator.cxx create mode 100644 Source/cmGlobalXCodeGenerator.h create mode 100644 Source/cmGraphAdjacencyList.h create mode 100644 Source/cmHexFileConverter.cxx create mode 100644 Source/cmHexFileConverter.h create mode 100644 Source/cmIfCommand.cxx create mode 100644 Source/cmIfCommand.h create mode 100644 Source/cmIncludeCommand.cxx create mode 100644 Source/cmIncludeCommand.h create mode 100644 Source/cmIncludeDirectoryCommand.cxx create mode 100644 Source/cmIncludeDirectoryCommand.h create mode 100644 Source/cmIncludeExternalMSProjectCommand.cxx create mode 100644 Source/cmIncludeExternalMSProjectCommand.h create mode 100644 Source/cmIncludeRegularExpressionCommand.cxx create mode 100644 Source/cmIncludeRegularExpressionCommand.h create mode 100644 Source/cmInstallCommand.cxx create mode 100644 Source/cmInstallCommand.h create mode 100644 Source/cmInstallCommandArguments.cxx create mode 100644 Source/cmInstallCommandArguments.h create mode 100644 Source/cmInstallDirectoryGenerator.cxx create mode 100644 Source/cmInstallDirectoryGenerator.h create mode 100644 Source/cmInstallExportGenerator.cxx create mode 100644 Source/cmInstallExportGenerator.h create mode 100644 Source/cmInstallFilesCommand.cxx create mode 100644 Source/cmInstallFilesCommand.h create mode 100644 Source/cmInstallFilesGenerator.cxx create mode 100644 Source/cmInstallFilesGenerator.h create mode 100644 Source/cmInstallGenerator.cxx create mode 100644 Source/cmInstallGenerator.h create mode 100644 Source/cmInstallProgramsCommand.cxx create mode 100644 Source/cmInstallProgramsCommand.h create mode 100644 Source/cmInstallScriptGenerator.cxx create mode 100644 Source/cmInstallScriptGenerator.h create mode 100644 Source/cmInstallTargetGenerator.cxx create mode 100644 Source/cmInstallTargetGenerator.h create mode 100644 Source/cmInstallTargetsCommand.cxx create mode 100644 Source/cmInstallTargetsCommand.h create mode 100644 Source/cmLinkDirectoriesCommand.cxx create mode 100644 Source/cmLinkDirectoriesCommand.h create mode 100644 Source/cmLinkLibrariesCommand.cxx create mode 100644 Source/cmLinkLibrariesCommand.h create mode 100644 Source/cmListCommand.cxx create mode 100644 Source/cmListCommand.h create mode 100644 Source/cmListFileCache.cxx create mode 100644 Source/cmListFileCache.h create mode 100644 Source/cmListFileLexer.c create mode 100644 Source/cmListFileLexer.h create mode 100644 Source/cmListFileLexer.in.l create mode 100644 Source/cmLoadCacheCommand.cxx create mode 100644 Source/cmLoadCacheCommand.h create mode 100644 Source/cmLoadCommandCommand.cxx create mode 100644 Source/cmLoadCommandCommand.h create mode 100644 Source/cmLocalGenerator.cxx create mode 100644 Source/cmLocalGenerator.h create mode 100644 Source/cmLocalUnixMakefileGenerator3.cxx create mode 100644 Source/cmLocalUnixMakefileGenerator3.h create mode 100644 Source/cmLocalVisualStudio6Generator.cxx create mode 100644 Source/cmLocalVisualStudio6Generator.h create mode 100644 Source/cmLocalVisualStudio7Generator.cxx create mode 100644 Source/cmLocalVisualStudio7Generator.h create mode 100755 Source/cmLocalVisualStudioGenerator.cxx create mode 100644 Source/cmLocalVisualStudioGenerator.h create mode 100644 Source/cmLocalXCodeGenerator.cxx create mode 100644 Source/cmLocalXCodeGenerator.h create mode 100644 Source/cmMacroCommand.cxx create mode 100644 Source/cmMacroCommand.h create mode 100644 Source/cmMakeDepend.cxx create mode 100644 Source/cmMakeDepend.h create mode 100644 Source/cmMakeDirectoryCommand.cxx create mode 100644 Source/cmMakeDirectoryCommand.h create mode 100644 Source/cmMakefile.cxx create mode 100644 Source/cmMakefile.h create mode 100644 Source/cmMakefileExecutableTargetGenerator.cxx create mode 100644 Source/cmMakefileExecutableTargetGenerator.h create mode 100644 Source/cmMakefileLibraryTargetGenerator.cxx create mode 100644 Source/cmMakefileLibraryTargetGenerator.h create mode 100644 Source/cmMakefileTargetGenerator.cxx create mode 100644 Source/cmMakefileTargetGenerator.h create mode 100644 Source/cmMakefileUtilityTargetGenerator.cxx create mode 100644 Source/cmMakefileUtilityTargetGenerator.h create mode 100644 Source/cmMarkAsAdvancedCommand.cxx create mode 100644 Source/cmMarkAsAdvancedCommand.h create mode 100644 Source/cmMathCommand.cxx create mode 100644 Source/cmMathCommand.h create mode 100644 Source/cmMessageCommand.cxx create mode 100644 Source/cmMessageCommand.h create mode 100644 Source/cmObject.h create mode 100644 Source/cmOptionCommand.cxx create mode 100644 Source/cmOptionCommand.h create mode 100644 Source/cmOrderDirectories.cxx create mode 100644 Source/cmOrderDirectories.h create mode 100644 Source/cmOutputRequiredFilesCommand.cxx create mode 100644 Source/cmOutputRequiredFilesCommand.h create mode 100755 Source/cmPolicies.cxx create mode 100755 Source/cmPolicies.h create mode 100644 Source/cmProjectCommand.cxx create mode 100644 Source/cmProjectCommand.h create mode 100755 Source/cmProperty.cxx create mode 100755 Source/cmProperty.h create mode 100755 Source/cmPropertyDefinition.cxx create mode 100755 Source/cmPropertyDefinition.h create mode 100755 Source/cmPropertyDefinitionMap.cxx create mode 100755 Source/cmPropertyDefinitionMap.h create mode 100755 Source/cmPropertyMap.cxx create mode 100755 Source/cmPropertyMap.h create mode 100644 Source/cmQTWrapCPPCommand.cxx create mode 100644 Source/cmQTWrapCPPCommand.h create mode 100644 Source/cmQTWrapUICommand.cxx create mode 100644 Source/cmQTWrapUICommand.h create mode 100644 Source/cmRemoveCommand.cxx create mode 100644 Source/cmRemoveCommand.h create mode 100644 Source/cmRemoveDefinitionsCommand.cxx create mode 100644 Source/cmRemoveDefinitionsCommand.h create mode 100755 Source/cmReturnCommand.cxx create mode 100755 Source/cmReturnCommand.h create mode 100644 Source/cmSeparateArgumentsCommand.cxx create mode 100644 Source/cmSeparateArgumentsCommand.h create mode 100644 Source/cmSetCommand.cxx create mode 100644 Source/cmSetCommand.h create mode 100644 Source/cmSetDirectoryPropertiesCommand.cxx create mode 100644 Source/cmSetDirectoryPropertiesCommand.h create mode 100644 Source/cmSetPropertyCommand.cxx create mode 100644 Source/cmSetPropertyCommand.h create mode 100644 Source/cmSetSourceFilesPropertiesCommand.cxx create mode 100644 Source/cmSetSourceFilesPropertiesCommand.h create mode 100644 Source/cmSetTargetPropertiesCommand.cxx create mode 100644 Source/cmSetTargetPropertiesCommand.h create mode 100644 Source/cmSetTestsPropertiesCommand.cxx create mode 100644 Source/cmSetTestsPropertiesCommand.h create mode 100644 Source/cmSiteNameCommand.cxx create mode 100644 Source/cmSiteNameCommand.h create mode 100644 Source/cmSourceFile.cxx create mode 100644 Source/cmSourceFile.h create mode 100644 Source/cmSourceFileLocation.cxx create mode 100644 Source/cmSourceFileLocation.h create mode 100644 Source/cmSourceGroup.cxx create mode 100644 Source/cmSourceGroup.h create mode 100644 Source/cmSourceGroupCommand.cxx create mode 100644 Source/cmSourceGroupCommand.h create mode 100644 Source/cmStandardIncludes.h create mode 100644 Source/cmStandardLexer.h create mode 100644 Source/cmStringCommand.cxx create mode 100644 Source/cmStringCommand.h create mode 100644 Source/cmSubdirCommand.cxx create mode 100644 Source/cmSubdirCommand.h create mode 100644 Source/cmSubdirDependsCommand.cxx create mode 100644 Source/cmSubdirDependsCommand.h create mode 100644 Source/cmSystemTools.cxx create mode 100644 Source/cmSystemTools.h create mode 100644 Source/cmTarget.cxx create mode 100644 Source/cmTarget.h create mode 100644 Source/cmTargetLinkLibrariesCommand.cxx create mode 100644 Source/cmTargetLinkLibrariesCommand.h create mode 100644 Source/cmTest.cxx create mode 100644 Source/cmTest.h create mode 100644 Source/cmTryCompileCommand.cxx create mode 100644 Source/cmTryCompileCommand.h create mode 100644 Source/cmTryRunCommand.cxx create mode 100644 Source/cmTryRunCommand.h create mode 100644 Source/cmUseMangledMesaCommand.cxx create mode 100644 Source/cmUseMangledMesaCommand.h create mode 100644 Source/cmUtilitySourceCommand.cxx create mode 100644 Source/cmUtilitySourceCommand.h create mode 100644 Source/cmVariableRequiresCommand.cxx create mode 100644 Source/cmVariableRequiresCommand.h create mode 100644 Source/cmVariableWatch.cxx create mode 100644 Source/cmVariableWatch.h create mode 100644 Source/cmVariableWatchCommand.cxx create mode 100644 Source/cmVariableWatchCommand.h create mode 100644 Source/cmVersion.cxx create mode 100644 Source/cmVersion.h create mode 100644 Source/cmWhileCommand.cxx create mode 100644 Source/cmWhileCommand.h create mode 100644 Source/cmWin32ProcessExecution.cxx create mode 100644 Source/cmWin32ProcessExecution.h create mode 100644 Source/cmWriteFileCommand.cxx create mode 100644 Source/cmWriteFileCommand.h create mode 100644 Source/cmXCode21Object.cxx create mode 100644 Source/cmXCode21Object.h create mode 100644 Source/cmXCodeObject.cxx create mode 100644 Source/cmXCodeObject.h create mode 100644 Source/cmXMLParser.cxx create mode 100644 Source/cmXMLParser.h create mode 100644 Source/cmake.cxx create mode 100644 Source/cmake.h create mode 100644 Source/cmakemain.cxx create mode 100644 Source/cmaketest.h.in create mode 100644 Source/cmakewizard.cxx create mode 100644 Source/cmakewizard.h create mode 100755 Source/cmakexbuild.cxx create mode 100644 Source/cmw9xcom.cxx create mode 100644 Source/ctest.cxx create mode 100644 Source/kwsys/Base64.c create mode 100644 Source/kwsys/Base64.h.in create mode 100644 Source/kwsys/CMakeEmptyInputFile.in create mode 100644 Source/kwsys/CMakeLists.txt create mode 100644 Source/kwsys/CPU.h.in create mode 100644 Source/kwsys/CTestConfig.cmake create mode 100644 Source/kwsys/CheckCXXSourceRuns.cmake create mode 100644 Source/kwsys/CommandLineArguments.cxx create mode 100644 Source/kwsys/CommandLineArguments.hxx.in create mode 100644 Source/kwsys/Configure.h.in create mode 100644 Source/kwsys/Configure.hxx.in create mode 100644 Source/kwsys/Copyright.txt create mode 100644 Source/kwsys/DateStamp.h.in create mode 100644 Source/kwsys/Directory.cxx create mode 100644 Source/kwsys/Directory.hxx.in create mode 100644 Source/kwsys/DynamicLoader.cxx create mode 100644 Source/kwsys/DynamicLoader.hxx.in create mode 100644 Source/kwsys/EncodeExecutable.c create mode 100644 Source/kwsys/ExtraTest.cmake.in create mode 100644 Source/kwsys/FundamentalType.h.in create mode 100644 Source/kwsys/Glob.cxx create mode 100644 Source/kwsys/Glob.hxx.in create mode 100644 Source/kwsys/IOStream.cxx create mode 100644 Source/kwsys/IOStream.hxx.in create mode 100644 Source/kwsys/MD5.c create mode 100644 Source/kwsys/MD5.h.in create mode 100644 Source/kwsys/Process.h.in create mode 100644 Source/kwsys/ProcessFwd9x.c create mode 100644 Source/kwsys/ProcessUNIX.c create mode 100644 Source/kwsys/ProcessWin32.c create mode 100644 Source/kwsys/README.txt create mode 100644 Source/kwsys/Registry.cxx create mode 100644 Source/kwsys/Registry.hxx.in create mode 100644 Source/kwsys/RegularExpression.cxx create mode 100644 Source/kwsys/RegularExpression.hxx.in create mode 100644 Source/kwsys/SharedForward.h.in create mode 100644 Source/kwsys/String.c create mode 100644 Source/kwsys/String.h.in create mode 100644 Source/kwsys/String.hxx.in create mode 100644 Source/kwsys/System.c create mode 100644 Source/kwsys/System.h.in create mode 100755 Source/kwsys/SystemInformation.cxx create mode 100755 Source/kwsys/SystemInformation.hxx.in create mode 100644 Source/kwsys/SystemTools.cxx create mode 100644 Source/kwsys/SystemTools.hxx.in create mode 100644 Source/kwsys/Terminal.c create mode 100644 Source/kwsys/Terminal.h.in create mode 100644 Source/kwsys/auto_ptr.hxx.in create mode 100644 Source/kwsys/hash_fun.hxx.in create mode 100644 Source/kwsys/hash_map.hxx.in create mode 100644 Source/kwsys/hash_set.hxx.in create mode 100644 Source/kwsys/hashtable.hxx.in create mode 100644 Source/kwsys/kwsysDateStamp.cmake create mode 100755 Source/kwsys/kwsysDateStamp.py create mode 100755 Source/kwsys/kwsysHeaderDump.pl create mode 100644 Source/kwsys/kwsysPlatformTests.cmake create mode 100644 Source/kwsys/kwsysPlatformTestsC.c create mode 100644 Source/kwsys/kwsysPlatformTestsCXX.cxx create mode 100644 Source/kwsys/kwsysPrivate.h create mode 100644 Source/kwsys/kwsys_cstddef.hxx.in create mode 100644 Source/kwsys/kwsys_ios_fstream.h.in create mode 100644 Source/kwsys/kwsys_ios_iosfwd.h.in create mode 100644 Source/kwsys/kwsys_ios_iostream.h.in create mode 100644 Source/kwsys/kwsys_ios_sstream.h.in create mode 100644 Source/kwsys/kwsys_stl.hxx.in create mode 100644 Source/kwsys/kwsys_stl_string.hxx.in create mode 100644 Source/kwsys/testAutoPtr.cxx create mode 100644 Source/kwsys/testCommandLineArguments.cxx create mode 100644 Source/kwsys/testCommandLineArguments1.cxx create mode 100644 Source/kwsys/testDynamicLoader.cxx create mode 100644 Source/kwsys/testDynload.c create mode 100644 Source/kwsys/testEncode.c create mode 100644 Source/kwsys/testFail.c create mode 100644 Source/kwsys/testHashSTL.cxx create mode 100644 Source/kwsys/testIOS.cxx create mode 100644 Source/kwsys/testProcess.c create mode 100644 Source/kwsys/testRegistry.cxx create mode 100755 Source/kwsys/testSystemInformation.cxx create mode 100644 Source/kwsys/testSystemTools.bin create mode 100644 Source/kwsys/testSystemTools.cxx create mode 100644 Source/kwsys/testSystemTools.h.in create mode 100644 Source/kwsys/testTerminal.c create mode 100644 Templates/AppleInfo.plist create mode 100644 Templates/CMakeLists.txt create mode 100644 Templates/CMakeVSMacros1.vsmacros create mode 100644 Templates/CMakeVSMacros2.vsmacros create mode 100644 Templates/CMakeVisualStudio6Configurations.cmake create mode 100644 Templates/CPack.GenericDescription.txt create mode 100644 Templates/CPack.GenericLicense.txt create mode 100644 Templates/CPack.GenericWelcome.txt create mode 100644 Templates/CPackConfig.cmake.in create mode 100644 Templates/CTestScript.cmake.in create mode 100644 Templates/DLLFooter.dsptemplate create mode 100644 Templates/DLLHeader.dsptemplate create mode 100644 Templates/EXEFooter.dsptemplate create mode 100644 Templates/EXEHeader.dsptemplate create mode 100644 Templates/EXEWinHeader.dsptemplate create mode 100644 Templates/TestDriver.cxx.in create mode 100644 Templates/UtilityFooter.dsptemplate create mode 100644 Templates/UtilityHeader.dsptemplate create mode 100755 Templates/cygwin-package.sh.in create mode 100644 Templates/staticLibFooter.dsptemplate create mode 100644 Templates/staticLibHeader.dsptemplate create mode 100644 Tests/.NoDartCoverage create mode 100644 Tests/Assembler/CMakeLists.txt create mode 100644 Tests/Assembler/main-linux-x86-gas.s create mode 100644 Tests/Assembler/main.c create mode 100755 Tests/BuildDepends/CMakeLists.txt create mode 100755 Tests/BuildDepends/Project/CMakeLists.txt create mode 100755 Tests/BuildDepends/Project/bar.cxx create mode 100644 Tests/BuildDepends/Project/dep.cxx create mode 100644 Tests/BuildDepends/Project/dep_custom.cxx create mode 100644 Tests/BuildDepends/Project/generator.cxx create mode 100644 Tests/BuildDepends/Project/zot.cxx create mode 100644 Tests/BundleTest/BundleLib.cxx create mode 100644 Tests/BundleTest/BundleSubDir/CMakeLists.txt create mode 100644 Tests/BundleTest/BundleTest.cxx create mode 100644 Tests/BundleTest/CMakeLists.txt create mode 100644 Tests/BundleTest/SomeRandomFile.txt create mode 100644 Tests/BundleTest/randomResourceFile.plist.in create mode 100755 Tests/CMakeLists.txt create mode 100644 Tests/CMakeTests/CMakeLists.txt create mode 100644 Tests/CMakeTests/DummyToolchain.cmake create mode 100644 Tests/CMakeTests/FindBaseTest.cmake.in create mode 100644 Tests/CMakeTests/GetPrerequisitesTest.cmake.in create mode 100644 Tests/CMakeTests/IncludeTest.cmake.in create mode 100644 Tests/CMakeTests/ListTest.cmake.in create mode 100644 Tests/CMakeTests/ToolchainTest.cmake.in create mode 100644 Tests/CMakeTests/VariableWatchTest.cmake.in create mode 100644 Tests/CMakeTests/include/cmake_i_do_not_exist_in_the_system.h create mode 100644 Tests/COnly/CMakeLists.txt create mode 100644 Tests/COnly/conly.c create mode 100644 Tests/COnly/foo.c create mode 100644 Tests/COnly/foo.h create mode 100644 Tests/COnly/libc1.c create mode 100644 Tests/COnly/libc1.h create mode 100644 Tests/COnly/libc2.c create mode 100644 Tests/COnly/libc2.h create mode 100644 Tests/CTestTest/CMakeLists.txt create mode 100644 Tests/CTestTest/test.cmake.in create mode 100644 Tests/CTestTest2/CMakeLists.txt create mode 100644 Tests/CTestTest2/test.cmake.in create mode 100644 Tests/CTestTest3/test.cmake.in create mode 100644 Tests/CommandLineTest/CMakeLists.txt create mode 100644 Tests/CommandLineTest/CommandLineTest.cxx create mode 100644 Tests/CommandLineTest/PreLoad.cmake create mode 100644 Tests/Complex/CMakeLists.txt create mode 100644 Tests/Complex/Cache/CMakeCache.txt create mode 100755 Tests/Complex/Executable/A.cxx create mode 100644 Tests/Complex/Executable/A.h create mode 100644 Tests/Complex/Executable/A.hh create mode 100644 Tests/Complex/Executable/A.txt create mode 100644 Tests/Complex/Executable/CMakeLists.txt create mode 100755 Tests/Complex/Executable/Included.cmake create mode 100755 Tests/Complex/Executable/Sub1/NameConflictTest.c create mode 100755 Tests/Complex/Executable/Sub2/NameConflictTest.c create mode 100644 Tests/Complex/Executable/Temp/CMakeLists.txt create mode 100644 Tests/Complex/Executable/cmVersion.h.in create mode 100644 Tests/Complex/Executable/complex.cxx create mode 100755 Tests/Complex/Executable/complex.file.cxx create mode 100644 Tests/Complex/Executable/complex_nobuild.cxx create mode 100644 Tests/Complex/Executable/notInAllExe.cxx create mode 100644 Tests/Complex/Executable/testSystemDir.cxx create mode 100755 Tests/Complex/Executable/testcflags.c create mode 100644 Tests/Complex/Library/CMakeLists.txt create mode 100644 Tests/Complex/Library/ExtraSources/file1.cxx create mode 100644 Tests/Complex/Library/ExtraSources/file1.h create mode 100644 Tests/Complex/Library/SystemDir/testSystemDir.h create mode 100644 Tests/Complex/Library/TestLink.c create mode 100644 Tests/Complex/Library/create_file.cxx create mode 100644 Tests/Complex/Library/dummy create mode 100644 Tests/Complex/Library/empty.h create mode 100644 Tests/Complex/Library/file2.cxx create mode 100644 Tests/Complex/Library/file2.h create mode 100755 Tests/Complex/Library/moduleFile.c create mode 100755 Tests/Complex/Library/moduleFile.h create mode 100644 Tests/Complex/Library/notInAllLib.cxx create mode 100644 Tests/Complex/Library/sharedFile.cxx create mode 100644 Tests/Complex/Library/sharedFile.h create mode 100644 Tests/Complex/Library/testConly.c create mode 100644 Tests/Complex/Library/testConly.h create mode 100644 Tests/Complex/Library/test_preprocess.cmake create mode 100644 Tests/Complex/VarTests.cmake create mode 100644 Tests/Complex/cmTestConfigure.h.in create mode 100644 Tests/Complex/cmTestConfigureEscape.h.in create mode 100644 Tests/Complex/cmTestGeneratedHeader.h.in create mode 100644 Tests/ComplexOneConfig/CMakeLists.txt create mode 100644 Tests/ComplexOneConfig/Cache/CMakeCache.txt create mode 100755 Tests/ComplexOneConfig/Executable/A.cxx create mode 100644 Tests/ComplexOneConfig/Executable/A.h create mode 100644 Tests/ComplexOneConfig/Executable/A.hh create mode 100644 Tests/ComplexOneConfig/Executable/A.txt create mode 100644 Tests/ComplexOneConfig/Executable/CMakeLists.txt create mode 100755 Tests/ComplexOneConfig/Executable/Included.cmake create mode 100755 Tests/ComplexOneConfig/Executable/Sub1/NameConflictTest.c create mode 100755 Tests/ComplexOneConfig/Executable/Sub2/NameConflictTest.c create mode 100644 Tests/ComplexOneConfig/Executable/Temp/CMakeLists.txt create mode 100644 Tests/ComplexOneConfig/Executable/cmVersion.h.in create mode 100644 Tests/ComplexOneConfig/Executable/complex.cxx create mode 100755 Tests/ComplexOneConfig/Executable/complex.file.cxx create mode 100644 Tests/ComplexOneConfig/Executable/complex_nobuild.cxx create mode 100644 Tests/ComplexOneConfig/Executable/notInAllExe.cxx create mode 100644 Tests/ComplexOneConfig/Executable/testSystemDir.cxx create mode 100755 Tests/ComplexOneConfig/Executable/testcflags.c create mode 100644 Tests/ComplexOneConfig/Library/CMakeLists.txt create mode 100644 Tests/ComplexOneConfig/Library/ExtraSources/file1.cxx create mode 100644 Tests/ComplexOneConfig/Library/ExtraSources/file1.h create mode 100644 Tests/ComplexOneConfig/Library/SystemDir/testSystemDir.h create mode 100644 Tests/ComplexOneConfig/Library/TestLink.c create mode 100644 Tests/ComplexOneConfig/Library/create_file.cxx create mode 100644 Tests/ComplexOneConfig/Library/dummy create mode 100644 Tests/ComplexOneConfig/Library/empty.h create mode 100644 Tests/ComplexOneConfig/Library/file2.cxx create mode 100644 Tests/ComplexOneConfig/Library/file2.h create mode 100755 Tests/ComplexOneConfig/Library/moduleFile.c create mode 100755 Tests/ComplexOneConfig/Library/moduleFile.h create mode 100644 Tests/ComplexOneConfig/Library/notInAllLib.cxx create mode 100644 Tests/ComplexOneConfig/Library/sharedFile.cxx create mode 100644 Tests/ComplexOneConfig/Library/sharedFile.h create mode 100644 Tests/ComplexOneConfig/Library/testConly.c create mode 100644 Tests/ComplexOneConfig/Library/testConly.h create mode 100644 Tests/ComplexOneConfig/Library/test_preprocess.cmake create mode 100644 Tests/ComplexOneConfig/VarTests.cmake create mode 100644 Tests/ComplexOneConfig/cmTestConfigure.h.in create mode 100644 Tests/ComplexOneConfig/cmTestConfigureEscape.h.in create mode 100644 Tests/ComplexOneConfig/cmTestGeneratedHeader.h.in create mode 100644 Tests/ComplexRelativePaths/CMakeLists.txt create mode 100644 Tests/ComplexRelativePaths/Cache/CMakeCache.txt create mode 100755 Tests/ComplexRelativePaths/Executable/A.cxx create mode 100644 Tests/ComplexRelativePaths/Executable/A.h create mode 100644 Tests/ComplexRelativePaths/Executable/A.hh create mode 100644 Tests/ComplexRelativePaths/Executable/A.txt create mode 100644 Tests/ComplexRelativePaths/Executable/CMakeLists.txt create mode 100755 Tests/ComplexRelativePaths/Executable/Included.cmake create mode 100755 Tests/ComplexRelativePaths/Executable/Sub1/NameConflictTest.c create mode 100755 Tests/ComplexRelativePaths/Executable/Sub2/NameConflictTest.c create mode 100644 Tests/ComplexRelativePaths/Executable/Temp/CMakeLists.txt create mode 100644 Tests/ComplexRelativePaths/Executable/cmVersion.h.in create mode 100644 Tests/ComplexRelativePaths/Executable/complex.cxx create mode 100755 Tests/ComplexRelativePaths/Executable/complex.file.cxx create mode 100644 Tests/ComplexRelativePaths/Executable/complex_nobuild.cxx create mode 100644 Tests/ComplexRelativePaths/Executable/notInAllExe.cxx create mode 100644 Tests/ComplexRelativePaths/Executable/testSystemDir.cxx create mode 100755 Tests/ComplexRelativePaths/Executable/testcflags.c create mode 100644 Tests/ComplexRelativePaths/Library/CMakeLists.txt create mode 100644 Tests/ComplexRelativePaths/Library/ExtraSources/file1.cxx create mode 100644 Tests/ComplexRelativePaths/Library/ExtraSources/file1.h create mode 100644 Tests/ComplexRelativePaths/Library/SystemDir/testSystemDir.h create mode 100644 Tests/ComplexRelativePaths/Library/TestLink.c create mode 100644 Tests/ComplexRelativePaths/Library/create_file.cxx create mode 100644 Tests/ComplexRelativePaths/Library/dummy create mode 100644 Tests/ComplexRelativePaths/Library/empty.h create mode 100644 Tests/ComplexRelativePaths/Library/file2.cxx create mode 100644 Tests/ComplexRelativePaths/Library/file2.h create mode 100755 Tests/ComplexRelativePaths/Library/moduleFile.c create mode 100755 Tests/ComplexRelativePaths/Library/moduleFile.h create mode 100644 Tests/ComplexRelativePaths/Library/notInAllLib.cxx create mode 100644 Tests/ComplexRelativePaths/Library/sharedFile.cxx create mode 100644 Tests/ComplexRelativePaths/Library/sharedFile.h create mode 100644 Tests/ComplexRelativePaths/Library/testConly.c create mode 100644 Tests/ComplexRelativePaths/Library/testConly.h create mode 100644 Tests/ComplexRelativePaths/Library/test_preprocess.cmake create mode 100644 Tests/ComplexRelativePaths/VarTests.cmake create mode 100644 Tests/ComplexRelativePaths/cmTestConfigure.h.in create mode 100644 Tests/ComplexRelativePaths/cmTestConfigureEscape.h.in create mode 100644 Tests/ComplexRelativePaths/cmTestGeneratedHeader.h.in create mode 100644 Tests/ConvLibrary/CMakeLists.txt create mode 100644 Tests/ConvLibrary/bar.c create mode 100644 Tests/ConvLibrary/bartest.cxx create mode 100644 Tests/ConvLibrary/foo.cxx create mode 100644 Tests/ConvLibrary/sub1/car.cxx create mode 100755 Tests/CustComDepend/CMakeLists.txt create mode 100755 Tests/CustComDepend/bar.h create mode 100755 Tests/CustComDepend/foo.cxx create mode 100644 Tests/CustomCommand/CMakeLists.txt create mode 100755 Tests/CustomCommand/GeneratedHeader/CMakeLists.txt create mode 100644 Tests/CustomCommand/GeneratedHeader/generated.h.in create mode 100644 Tests/CustomCommand/GeneratedHeader/main.cpp create mode 100644 Tests/CustomCommand/GeneratorInExtraDir/CMakeLists.txt create mode 100644 Tests/CustomCommand/check_command_line.c.in create mode 100644 Tests/CustomCommand/check_mark.cmake create mode 100644 Tests/CustomCommand/config.h.in create mode 100644 Tests/CustomCommand/doc1.tex create mode 100644 Tests/CustomCommand/foo.h.in create mode 100644 Tests/CustomCommand/foo.in create mode 100644 Tests/CustomCommand/gen_redirect_in.c create mode 100644 Tests/CustomCommand/generator.cxx create mode 100644 Tests/CustomCommand/main.cxx create mode 100644 Tests/CustomCommand/tcat.cxx create mode 100644 Tests/CustomCommand/wrapped.h create mode 100644 Tests/CustomCommand/wrapper.cxx create mode 100755 Tests/CustomCommandWorkingDirectory/CMakeLists.txt create mode 100755 Tests/CustomCommandWorkingDirectory/customTarget.c create mode 100755 Tests/CustomCommandWorkingDirectory/working.c.in create mode 100644 Tests/CxxOnly/CMakeLists.txt create mode 100644 Tests/CxxOnly/cxxonly.cxx create mode 100644 Tests/CxxOnly/libcxx1.cxx create mode 100644 Tests/CxxOnly/libcxx1.h create mode 100644 Tests/CxxOnly/libcxx2.cxx create mode 100644 Tests/CxxOnly/libcxx2.h create mode 100644 Tests/Dependency/1/CMakeLists.txt create mode 100644 Tests/Dependency/1/OneSrc.c create mode 100644 Tests/Dependency/CMakeLists.txt create mode 100644 Tests/Dependency/Case1/CMakeLists.txt create mode 100644 Tests/Dependency/Case1/a.c create mode 100644 Tests/Dependency/Case1/b.c create mode 100644 Tests/Dependency/Case1/b2.c create mode 100644 Tests/Dependency/Case1/c.c create mode 100644 Tests/Dependency/Case1/c2.c create mode 100644 Tests/Dependency/Case1/d.c create mode 100644 Tests/Dependency/Case1/main.c create mode 100644 Tests/Dependency/Case2/CMakeLists.txt create mode 100644 Tests/Dependency/Case2/bar1.c create mode 100644 Tests/Dependency/Case2/bar2.c create mode 100644 Tests/Dependency/Case2/bar3.c create mode 100644 Tests/Dependency/Case2/foo1.c create mode 100644 Tests/Dependency/Case2/foo1b.c create mode 100644 Tests/Dependency/Case2/foo2.c create mode 100644 Tests/Dependency/Case2/foo2b.c create mode 100644 Tests/Dependency/Case2/foo3.c create mode 100644 Tests/Dependency/Case2/foo3b.c create mode 100644 Tests/Dependency/Case2/zot.c create mode 100644 Tests/Dependency/Case3/CMakeLists.txt create mode 100644 Tests/Dependency/Case3/bar.c create mode 100644 Tests/Dependency/Case3/foo1.c create mode 100644 Tests/Dependency/Case3/foo1b.c create mode 100644 Tests/Dependency/Case3/foo2.c create mode 100644 Tests/Dependency/Eight/CMakeLists.txt create mode 100644 Tests/Dependency/Eight/EightSrc.c create mode 100644 Tests/Dependency/Exec/CMakeLists.txt create mode 100644 Tests/Dependency/Exec/ExecMain.c create mode 100644 Tests/Dependency/Exec2/CMakeLists.txt create mode 100644 Tests/Dependency/Exec2/ExecMain.c create mode 100644 Tests/Dependency/Exec3/CMakeLists.txt create mode 100644 Tests/Dependency/Exec3/ExecMain.c create mode 100644 Tests/Dependency/Exec4/CMakeLists.txt create mode 100644 Tests/Dependency/Exec4/ExecMain.c create mode 100644 Tests/Dependency/Five/CMakeLists.txt create mode 100644 Tests/Dependency/Five/FiveSrc.c create mode 100644 Tests/Dependency/Four/CMakeLists.txt create mode 100644 Tests/Dependency/Four/FourSrc.c create mode 100644 Tests/Dependency/NoDepA/CMakeLists.txt create mode 100644 Tests/Dependency/NoDepA/NoDepASrc.c create mode 100644 Tests/Dependency/NoDepB/CMakeLists.txt create mode 100644 Tests/Dependency/NoDepB/NoDepBSrc.c create mode 100644 Tests/Dependency/NoDepC/CMakeLists.txt create mode 100644 Tests/Dependency/NoDepC/NoDepCSrc.c create mode 100644 Tests/Dependency/Seven/CMakeLists.txt create mode 100644 Tests/Dependency/Seven/SevenSrc.c create mode 100644 Tests/Dependency/Six/CMakeLists.txt create mode 100644 Tests/Dependency/Six/SixASrc.c create mode 100644 Tests/Dependency/Six/SixBSrc.c create mode 100644 Tests/Dependency/Three/CMakeLists.txt create mode 100644 Tests/Dependency/Three/ThreeSrc.c create mode 100644 Tests/Dependency/Two/CMakeLists.txt create mode 100644 Tests/Dependency/Two/TwoCustomSrc.c create mode 100644 Tests/Dependency/Two/TwoSrc.c create mode 100644 Tests/Dependency/Two/two-test.h.in create mode 100755 Tests/DocTest/CMakeLists.txt create mode 100755 Tests/DocTest/DocTest.cxx create mode 100644 Tests/ExportImport/CMakeLists.txt create mode 100644 Tests/ExportImport/Export/CMakeLists.txt create mode 100644 Tests/ExportImport/Export/testExe1.c create mode 100644 Tests/ExportImport/Export/testExe1lib.c create mode 100644 Tests/ExportImport/Export/testExe2.c create mode 100644 Tests/ExportImport/Export/testExe2lib.c create mode 100644 Tests/ExportImport/Export/testExe2libImp.c create mode 100644 Tests/ExportImport/Export/testExe3.c create mode 100644 Tests/ExportImport/Export/testLib1.c create mode 100644 Tests/ExportImport/Export/testLib2.c create mode 100644 Tests/ExportImport/Export/testLib3.c create mode 100644 Tests/ExportImport/Export/testLib3Imp.c create mode 100644 Tests/ExportImport/Export/testLib4.c create mode 100644 Tests/ExportImport/Import/CMakeLists.txt create mode 100644 Tests/ExportImport/Import/imp_mod1.c create mode 100644 Tests/ExportImport/Import/imp_testExe1.c create mode 100644 Tests/ExportImport/main.c create mode 100644 Tests/ExternalOBJ/CMakeLists.txt create mode 100644 Tests/ExternalOBJ/Object/CMakeLists.txt create mode 100644 Tests/ExternalOBJ/Object/external_main.cxx create mode 100644 Tests/ExternalOBJ/Object/external_object.cxx create mode 100644 Tests/ExternalOBJ/executable.cxx create mode 100644 Tests/FindPackageTest/CMakeLists.txt create mode 100644 Tests/FindPackageTest/FindPackageTest.cxx create mode 100644 Tests/FindPackageTest/FindVersionTestA.cmake create mode 100644 Tests/FindPackageTest/FindVersionTestB.cmake create mode 100644 Tests/FindPackageTest/FindVersionTestC.cmake create mode 100644 Tests/FindPackageTest/TApp.app/Contents/Resources/TAppConfig.cmake create mode 100644 Tests/FindPackageTest/TApp.app/Contents/Resources/cmake/tapp-config.cmake create mode 100644 Tests/FindPackageTest/TFramework.framework/Versions/A/Resources/CMake/TFrameworkConfig.cmake create mode 100644 Tests/FindPackageTest/TFramework.framework/Versions/A/Resources/tframework-config.cmake create mode 100644 Tests/FindPackageTest/include/foo.h create mode 100644 Tests/FindPackageTest/lib/Bar/BarConfig.cmake create mode 100644 Tests/FindPackageTest/lib/Bar/cmake/bar-config.cmake create mode 100644 Tests/FindPackageTest/lib/TApp/TAppConfig.cmake create mode 100644 Tests/FindPackageTest/lib/foo-1.2/CMake/FooConfig.cmake create mode 100644 Tests/FindPackageTest/lib/foo-1.2/foo-config.cmake create mode 100644 Tests/FindPackageTest/lib/suffix/test/SuffixTestConfig.cmake create mode 100644 Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake create mode 100644 Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake create mode 100644 Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake create mode 100644 Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake create mode 100644 Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake create mode 100644 Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake create mode 100644 Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake create mode 100644 Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake create mode 100755 Tests/Fortran/CMakeLists.txt create mode 100644 Tests/Fortran/Executable/CMakeLists.txt create mode 100644 Tests/Fortran/Executable/main.f90 create mode 100644 Tests/Fortran/External/CMakeLists.txt create mode 100644 Tests/Fortran/External/a.f90 create mode 100644 Tests/Fortran/Library/CMakeLists.txt create mode 100644 Tests/Fortran/Library/a.f90 create mode 100644 Tests/Fortran/Library/b.f90 create mode 100644 Tests/Fortran/Library/main.f90 create mode 100755 Tests/Fortran/hello.f create mode 100644 Tests/Fortran/in_interface/main.f90 create mode 100644 Tests/Fortran/in_interface/module.f90 create mode 100644 Tests/Fortran/test_module_implementation.f90 create mode 100644 Tests/Fortran/test_module_interface.f90 create mode 100644 Tests/Fortran/test_module_main.f90 create mode 100644 Tests/Fortran/test_preprocess.F90 create mode 100644 Tests/Fortran/test_use_in_comment_fixedform.f create mode 100644 Tests/Fortran/test_use_in_comment_freeform.f90 create mode 100644 Tests/Framework/CMakeLists.txt create mode 100644 Tests/Framework/bar.cxx create mode 100644 Tests/Framework/foo.cxx create mode 100644 Tests/Framework/foo.h create mode 100644 Tests/Framework/foo2.h create mode 100644 Tests/Framework/fooBoth.h create mode 100644 Tests/Framework/fooDeepPublic.h create mode 100644 Tests/Framework/fooNeither.h create mode 100644 Tests/Framework/fooPrivate.h create mode 100644 Tests/Framework/fooPublic.h create mode 100755 Tests/Framework/test.lua create mode 100755 Tests/FunctionTest/CMakeLists.txt create mode 100644 Tests/FunctionTest/SubDirScope/CMakeLists.txt create mode 100755 Tests/FunctionTest/Util.cmake create mode 100644 Tests/FunctionTest/functionTest.c create mode 100755 Tests/Java/A.java create mode 100755 Tests/Java/CMakeLists.txt create mode 100755 Tests/Java/HelloWorld.java create mode 100644 Tests/Jump/CMakeLists.txt create mode 100644 Tests/Jump/Executable/CMakeLists.txt create mode 100644 Tests/Jump/Executable/jumpExecutable.cxx create mode 100644 Tests/Jump/Library/CMakeLists.txt create mode 100644 Tests/Jump/Library/Shared/CMakeLists.txt create mode 100644 Tests/Jump/Library/Shared/jumpShared.cxx create mode 100644 Tests/Jump/Library/Static/CMakeLists.txt create mode 100644 Tests/Jump/Library/Static/jumpStatic.cxx create mode 100755 Tests/LibName/CMakeLists.txt create mode 100755 Tests/LibName/bar.c create mode 100755 Tests/LibName/foo.c create mode 100755 Tests/LibName/foobar.c create mode 100644 Tests/LinkLine/CMakeLists.txt create mode 100644 Tests/LinkLine/Exec.c create mode 100644 Tests/LinkLine/One.c create mode 100644 Tests/LinkLine/Two.c create mode 100644 Tests/LinkLineOrder/CMakeLists.txt create mode 100644 Tests/LinkLineOrder/Exec1.c create mode 100644 Tests/LinkLineOrder/Exec2.c create mode 100644 Tests/LinkLineOrder/NoDepA.c create mode 100644 Tests/LinkLineOrder/NoDepB.c create mode 100644 Tests/LinkLineOrder/NoDepC.c create mode 100644 Tests/LinkLineOrder/NoDepE.c create mode 100644 Tests/LinkLineOrder/NoDepF.c create mode 100644 Tests/LinkLineOrder/NoDepX.c create mode 100644 Tests/LinkLineOrder/NoDepY.c create mode 100644 Tests/LinkLineOrder/NoDepZ.c create mode 100644 Tests/LinkLineOrder/One.c create mode 100644 Tests/LinkLineOrder/Two.c create mode 100644 Tests/LoadCommand/CMakeCommands/CMakeLists.txt create mode 100644 Tests/LoadCommand/CMakeCommands/cmTestCommand.c create mode 100644 Tests/LoadCommand/CMakeLists.txt create mode 100755 Tests/LoadCommand/LoadedCommand.cxx.in create mode 100644 Tests/LoadCommand/LoadedCommand.h.in create mode 100644 Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt create mode 100644 Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c create mode 100644 Tests/LoadCommandOneConfig/CMakeLists.txt create mode 100755 Tests/LoadCommandOneConfig/LoadedCommand.cxx.in create mode 100644 Tests/LoadCommandOneConfig/LoadedCommand.h.in create mode 100644 Tests/MacroTest/CMakeLists.txt create mode 100644 Tests/MacroTest/macroTest.c create mode 100644 Tests/MakeClean/CMakeLists.txt create mode 100644 Tests/MakeClean/ToClean/CMakeLists.txt create mode 100644 Tests/MakeClean/ToClean/ToCleanFiles.cmake.in create mode 100644 Tests/MakeClean/ToClean/toclean.cxx create mode 100644 Tests/MakeClean/check_clean.c.in create mode 100644 Tests/MathTest/CMakeLists.txt create mode 100644 Tests/MathTest/MathTestExec.cxx create mode 100644 Tests/MathTest/MathTestTests.h.in create mode 100755 Tests/NewlineArgs/CMakeLists.txt create mode 100755 Tests/NewlineArgs/cxxonly.cxx create mode 100755 Tests/NewlineArgs/libcxx1.cxx create mode 100755 Tests/NewlineArgs/libcxx1.h create mode 100755 Tests/NewlineArgs/libcxx2.h.in create mode 100644 Tests/ObjC++/CMakeLists.txt create mode 100644 Tests/ObjC++/objc++.mm create mode 100644 Tests/OutOfBinary/CMakeLists.txt create mode 100644 Tests/OutOfBinary/outlib.c create mode 100755 Tests/OutOfSource/CMakeLists.txt create mode 100755 Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt create mode 100755 Tests/OutOfSource/OutOfSourceSubdir/simple.cxx create mode 100755 Tests/OutOfSource/OutOfSourceSubdir/simple.cxx.in create mode 100755 Tests/OutOfSource/OutOfSourceSubdir/testlib.cxx create mode 100755 Tests/OutOfSource/OutOfSourceSubdir/testlib.h create mode 100755 Tests/OutOfSource/SubDir/CMakeLists.txt create mode 100644 Tests/OutOfSource/simple.cxx create mode 100755 Tests/OutOfSource/testdp.h.in create mode 100644 Tests/Plugin/CMakeLists.txt create mode 100644 Tests/Plugin/include/example.h create mode 100644 Tests/Plugin/src/example_exe.cxx create mode 100644 Tests/Plugin/src/example_exe.h.in create mode 100644 Tests/Plugin/src/example_mod_1.c create mode 100755 Tests/PreOrder/CMakeLists.txt create mode 100755 Tests/PreOrder/Library/CMakeLists.txt create mode 100644 Tests/PreOrder/Library/simpleLib.cxx create mode 100755 Tests/PreOrder/simple.cxx create mode 100644 Tests/PrecompiledHeader/CMakeLists.txt create mode 100644 Tests/PrecompiledHeader/foo1.c create mode 100644 Tests/PrecompiledHeader/foo2.c create mode 100644 Tests/PrecompiledHeader/foo_precompile.c create mode 100644 Tests/PrecompiledHeader/include/foo.h create mode 100644 Tests/PrecompiledHeader/include/foo_precompiled.h create mode 100644 Tests/Preprocess/CMakeLists.txt create mode 100644 Tests/Preprocess/file_def.h create mode 100644 Tests/Preprocess/preprocess.c create mode 100644 Tests/Preprocess/preprocess.cxx create mode 100644 Tests/Preprocess/preprocess.h.in create mode 100644 Tests/Preprocess/preprocess_vs6.cxx create mode 100644 Tests/Preprocess/target_def.h create mode 100755 Tests/Properties/CMakeLists.txt create mode 100755 Tests/Properties/SubDir/properties3.cxx create mode 100755 Tests/Properties/properties.h.in create mode 100755 Tests/Properties/properties2.h create mode 100755 Tests/ReturnTest/CMakeLists.txt create mode 100755 Tests/ReturnTest/returnTest.c create mode 100755 Tests/ReturnTest/subdir/CMakeLists.txt create mode 100644 Tests/RuntimePath/CMakeLists.txt create mode 100644 Tests/RuntimePath/bar1.c create mode 100644 Tests/RuntimePath/bar2.c create mode 100644 Tests/RuntimePath/foo1.c create mode 100644 Tests/RuntimePath/foo2.c create mode 100644 Tests/RuntimePath/main.c create mode 100755 Tests/SameName/CMakeLists.txt create mode 100755 Tests/SameName/Exe1/CMakeLists.txt create mode 100755 Tests/SameName/Exe1/conly.c create mode 100755 Tests/SameName/Lib1/CMakeLists.txt create mode 100644 Tests/SameName/Lib1/libc1.c create mode 100644 Tests/SameName/Lib1/libc1.h create mode 100755 Tests/SetLang/CMakeLists.txt create mode 100755 Tests/SetLang/bar.c create mode 100755 Tests/SetLang/foo.c create mode 100644 Tests/Simple/CMakeLists.txt create mode 100644 Tests/Simple/simple.cxx create mode 100644 Tests/Simple/simpleCLib.c create mode 100644 Tests/Simple/simpleLib.cxx create mode 100755 Tests/Simple/simpleWe.cpp create mode 100644 Tests/SimpleCOnly/CMakeLists.txt create mode 100644 Tests/SimpleCOnly/bar.c create mode 100644 Tests/SimpleCOnly/foo.c create mode 100644 Tests/SimpleCOnly/main.c create mode 100644 Tests/SimpleExclude/CMakeLists.txt create mode 100644 Tests/SimpleExclude/dirC/CMakeLists.txt create mode 100644 Tests/SimpleExclude/dirC/dirA/CMakeLists.txt create mode 100644 Tests/SimpleExclude/dirC/dirA/t1.c create mode 100644 Tests/SimpleExclude/dirC/dirA/t2.c create mode 100644 Tests/SimpleExclude/dirC/dirA/t3.c create mode 100644 Tests/SimpleExclude/dirC/dirA/t4.c create mode 100644 Tests/SimpleExclude/dirC/dirA/t5.c create mode 100644 Tests/SimpleExclude/dirC/dirB/CMakeLists.txt create mode 100644 Tests/SimpleExclude/dirC/dirB/t6.c create mode 100644 Tests/SimpleExclude/dirC/dirB/t7.c create mode 100644 Tests/SimpleExclude/dirD/CMakeLists.txt create mode 100644 Tests/SimpleExclude/dirD/t8.c create mode 100644 Tests/SimpleExclude/dirD/t9.c create mode 100644 Tests/SimpleExclude/run.cmake.in create mode 100644 Tests/SimpleInstall/CMakeLists.txt create mode 100644 Tests/SimpleInstall/InstallScript1.cmake create mode 100644 Tests/SimpleInstall/InstallScript2.cmake create mode 100644 Tests/SimpleInstall/InstallScript3.cmake create mode 100644 Tests/SimpleInstall/InstallScript4.cmake create mode 100644 Tests/SimpleInstall/PackageScript.cmake create mode 100644 Tests/SimpleInstall/PostInstall.cmake create mode 100644 Tests/SimpleInstall/PreInstall.cmake create mode 100644 Tests/SimpleInstall/TestSubDir/CMakeLists.txt create mode 100644 Tests/SimpleInstall/TestSubDir/TSD.cxx create mode 100644 Tests/SimpleInstall/TestSubDir/TSD.h create mode 100644 Tests/SimpleInstall/TestSubDir/TSD_utils.cxx create mode 100644 Tests/SimpleInstall/foo.c create mode 100644 Tests/SimpleInstall/foo.h create mode 100644 Tests/SimpleInstall/inst.cxx create mode 100644 Tests/SimpleInstall/inst2.cxx create mode 100644 Tests/SimpleInstall/lib1.cxx create mode 100644 Tests/SimpleInstall/lib1.h create mode 100644 Tests/SimpleInstall/lib2.cxx create mode 100644 Tests/SimpleInstall/lib2.h create mode 100644 Tests/SimpleInstall/lib3.cxx create mode 100644 Tests/SimpleInstall/lib3.h create mode 100644 Tests/SimpleInstall/lib4.cxx create mode 100644 Tests/SimpleInstall/lib4.h create mode 100644 Tests/SimpleInstall/scripts/CMakeLists.txt create mode 100755 Tests/SimpleInstall/scripts/sample_script create mode 100755 Tests/SimpleInstall/scripts/sample_script.bat create mode 100644 Tests/SimpleInstallS2/CMakeLists.txt create mode 100644 Tests/SimpleInstallS2/InstallScript1.cmake create mode 100644 Tests/SimpleInstallS2/InstallScript2.cmake create mode 100644 Tests/SimpleInstallS2/InstallScript3.cmake create mode 100644 Tests/SimpleInstallS2/InstallScript4.cmake create mode 100644 Tests/SimpleInstallS2/PackageScript.cmake create mode 100644 Tests/SimpleInstallS2/PostInstall.cmake create mode 100644 Tests/SimpleInstallS2/PreInstall.cmake create mode 100644 Tests/SimpleInstallS2/TestSubDir/CMakeLists.txt create mode 100644 Tests/SimpleInstallS2/TestSubDir/TSD.cxx create mode 100644 Tests/SimpleInstallS2/TestSubDir/TSD.h create mode 100644 Tests/SimpleInstallS2/TestSubDir/TSD_utils.cxx create mode 100644 Tests/SimpleInstallS2/foo.c create mode 100644 Tests/SimpleInstallS2/foo.h create mode 100644 Tests/SimpleInstallS2/inst.cxx create mode 100644 Tests/SimpleInstallS2/inst2.cxx create mode 100644 Tests/SimpleInstallS2/lib1.cxx create mode 100644 Tests/SimpleInstallS2/lib1.h create mode 100644 Tests/SimpleInstallS2/lib2.cxx create mode 100644 Tests/SimpleInstallS2/lib2.h create mode 100644 Tests/SimpleInstallS2/lib3.cxx create mode 100644 Tests/SimpleInstallS2/lib3.h create mode 100644 Tests/SimpleInstallS2/lib4.cxx create mode 100644 Tests/SimpleInstallS2/lib4.h create mode 100644 Tests/SimpleInstallS2/scripts/CMakeLists.txt create mode 100755 Tests/SimpleInstallS2/scripts/sample_script create mode 100755 Tests/SimpleInstallS2/scripts/sample_script.bat create mode 100644 Tests/SourceGroups/CMakeLists.txt create mode 100644 Tests/SourceGroups/bar.c create mode 100644 Tests/SourceGroups/baz.c create mode 100644 Tests/SourceGroups/foo.c create mode 100644 Tests/SourceGroups/main.c create mode 100644 Tests/SourceGroups/sub1/foo.c create mode 100644 Tests/SourceGroups/sub1/foobar.c create mode 100644 Tests/StringFileTest/CMakeLists.txt create mode 100644 Tests/StringFileTest/InputFile.h.in create mode 100644 Tests/StringFileTest/StringFile.cxx create mode 100644 Tests/StringFileTest/main.ihx create mode 100644 Tests/StringFileTest/main.srec create mode 100644 Tests/SubDir/AnotherSubdir/pair+int.int.c create mode 100644 Tests/SubDir/AnotherSubdir/pair_int.int.c create mode 100644 Tests/SubDir/AnotherSubdir/secondone.c create mode 100644 Tests/SubDir/AnotherSubdir/testfromsubdir.c create mode 100755 Tests/SubDir/CMakeLists.txt create mode 100755 Tests/SubDir/Examples/CMakeLists.txt create mode 100755 Tests/SubDir/Examples/example1/CMakeLists.txt create mode 100755 Tests/SubDir/Examples/example1/example1.cxx create mode 100755 Tests/SubDir/Examples/example2/CMakeLists.txt create mode 100755 Tests/SubDir/Examples/example2/example2.cxx create mode 100755 Tests/SubDir/Executable/CMakeLists.txt create mode 100755 Tests/SubDir/Executable/test.cxx create mode 100644 Tests/SubDir/ThirdSubDir/pair+int.int1.c create mode 100644 Tests/SubDir/ThirdSubDir/pair_int.int1.c create mode 100644 Tests/SubDir/ThirdSubDir/pair_p_int.int1.c create mode 100644 Tests/SubDir/ThirdSubDir/testfromauxsubdir.c create mode 100644 Tests/SubDir/ThirdSubDir/thirdone.c create mode 100644 Tests/SubDir/vcl_algorithm+vcl_pair+double.foo.c create mode 100644 Tests/SubDir/vcl_algorithm_vcl_pair_double.foo.c create mode 100755 Tests/SubDirSpaces/Another Subdir/pair+int.int.c create mode 100755 Tests/SubDirSpaces/Another Subdir/pair_int.int.c create mode 100755 Tests/SubDirSpaces/Another Subdir/secondone.c create mode 100755 Tests/SubDirSpaces/Another Subdir/testfromsubdir.c create mode 100755 Tests/SubDirSpaces/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Executable Sources/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Executable Sources/test.cxx create mode 100755 Tests/SubDirSpaces/Executable/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Executable/test.cxx create mode 100755 Tests/SubDirSpaces/Some Examples/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Some Examples/example1/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Some Examples/example1/example1.cxx create mode 100755 Tests/SubDirSpaces/Some Examples/example2/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Some Examples/example2/example2.cxx create mode 100755 Tests/SubDirSpaces/Some(x86) Sources/CMakeLists.txt create mode 100755 Tests/SubDirSpaces/Some(x86) Sources/test.c create mode 100755 Tests/SubDirSpaces/ThirdSubDir/pair+int.int1.c create mode 100755 Tests/SubDirSpaces/ThirdSubDir/pair_int.int1.c create mode 100755 Tests/SubDirSpaces/ThirdSubDir/pair_p_int.int1.c create mode 100755 Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c create mode 100755 Tests/SubDirSpaces/ThirdSubDir/thirdone.c create mode 100755 Tests/SubDirSpaces/vcl_algorithm+vcl_pair+double.foo.c create mode 100755 Tests/SubDirSpaces/vcl_algorithm_vcl_pair_double.foo.c create mode 100755 Tests/SubProject/CMakeLists.txt create mode 100755 Tests/SubProject/bar.cxx create mode 100755 Tests/SubProject/car.cxx create mode 100755 Tests/SubProject/foo/CMakeLists.txt create mode 100755 Tests/SubProject/foo/foo.cxx create mode 100644 Tests/SwigTest/CMakeLists.txt create mode 100644 Tests/SwigTest/example.cxx create mode 100644 Tests/SwigTest/example.h create mode 100644 Tests/SwigTest/example.i create mode 100644 Tests/SwigTest/runme.php4 create mode 100755 Tests/SwigTest/runme.pike create mode 100644 Tests/SwigTest/runme.pl create mode 100644 Tests/SwigTest/runme.py create mode 100644 Tests/SwigTest/runme.rb create mode 100644 Tests/SwigTest/runme.tcl create mode 100644 Tests/SwigTest/runme2.tcl create mode 100644 Tests/SystemInformation/CMakeLists.txt create mode 100644 Tests/SystemInformation/DumpInformation.cxx create mode 100644 Tests/SystemInformation/DumpInformation.h.in create mode 100644 Tests/SystemInformation/SystemInformation.in create mode 100644 Tests/TarTest/CMakeLists.txt create mode 100644 Tests/TarTest/TestTarExec.cxx create mode 100755 Tests/TargetName/CMakeLists.txt create mode 100755 Tests/TargetName/executables/CMakeLists.txt create mode 100755 Tests/TargetName/executables/hello_world.c create mode 100755 Tests/TargetName/scripts/CMakeLists.txt create mode 100755 Tests/TargetName/scripts/hello_world create mode 100644 Tests/TestDriver/CMakeLists.txt create mode 100644 Tests/TestDriver/subdir/test3.cxx create mode 100644 Tests/TestDriver/test1.cxx create mode 100644 Tests/TestDriver/test2.cxx create mode 100644 Tests/TestDriver/testArgs.h create mode 100644 Tests/TestDriver/testExtraStuff.cxx create mode 100644 Tests/TestDriver/testExtraStuff2.cxx create mode 100644 Tests/TestDriver/testExtraStuff3.cxx create mode 100644 Tests/TestInstall.sh.in create mode 100644 Tests/Testing/CMakeLists.txt create mode 100644 Tests/Testing/DartConfig.cmake create mode 100644 Tests/Testing/Sub/Sub2/CMakeLists.txt create mode 100644 Tests/Testing/Sub/Sub2/testing2.cxx create mode 100644 Tests/Testing/testing.cxx create mode 100755 Tests/TryCompile/CMakeLists.txt create mode 100755 Tests/TryCompile/exit_success.c create mode 100755 Tests/TryCompile/exit_with_error.c create mode 100755 Tests/TryCompile/fail.c create mode 100755 Tests/TryCompile/pass.c create mode 100755 Tests/Tutorial/Step1/CMakeLists.txt create mode 100755 Tests/Tutorial/Step1/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step1/tutorial.cxx create mode 100755 Tests/Tutorial/Step2/CMakeLists.txt create mode 100755 Tests/Tutorial/Step2/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step2/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step2/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step2/tutorial.cxx create mode 100755 Tests/Tutorial/Step3/CMakeLists.txt create mode 100755 Tests/Tutorial/Step3/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step3/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step3/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step3/tutorial.cxx create mode 100755 Tests/Tutorial/Step4/CMakeLists.txt create mode 100755 Tests/Tutorial/Step4/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step4/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step4/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step4/tutorial.cxx create mode 100755 Tests/Tutorial/Step5/CMakeLists.txt create mode 100755 Tests/Tutorial/Step5/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx create mode 100755 Tests/Tutorial/Step5/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step5/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step5/tutorial.cxx create mode 100644 Tests/Tutorial/Step6/CMakeLists.txt create mode 100644 Tests/Tutorial/Step6/License.txt create mode 100755 Tests/Tutorial/Step6/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step6/MathFunctions/MakeTable.cxx create mode 100755 Tests/Tutorial/Step6/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step6/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step6/TutorialConfig.h.in create mode 100755 Tests/Tutorial/Step6/tutorial.cxx create mode 100644 Tests/Tutorial/Step7/CMakeLists.txt create mode 100644 Tests/Tutorial/Step7/CTestConfig.cmake create mode 100644 Tests/Tutorial/Step7/License.txt create mode 100755 Tests/Tutorial/Step7/MathFunctions/CMakeLists.txt create mode 100755 Tests/Tutorial/Step7/MathFunctions/MakeTable.cxx create mode 100755 Tests/Tutorial/Step7/MathFunctions/MathFunctions.h create mode 100755 Tests/Tutorial/Step7/MathFunctions/mysqrt.cxx create mode 100755 Tests/Tutorial/Step7/TutorialConfig.h.in create mode 100644 Tests/Tutorial/Step7/build1.cmake create mode 100644 Tests/Tutorial/Step7/build2.cmake create mode 100755 Tests/Tutorial/Step7/tutorial.cxx create mode 100644 Tests/UseWX/CMakeLists.txt create mode 100644 Tests/UseWX/WX.cxx create mode 100755 Tests/VSExternalInclude/CMakeLists.txt create mode 100755 Tests/VSExternalInclude/Lib1/CMakeLists.txt create mode 100755 Tests/VSExternalInclude/Lib1/lib1.cpp create mode 100755 Tests/VSExternalInclude/Lib1/lib1.h create mode 100755 Tests/VSExternalInclude/Lib2/CMakeLists.txt create mode 100755 Tests/VSExternalInclude/Lib2/lib2.cpp create mode 100755 Tests/VSExternalInclude/Lib2/lib2.h create mode 100755 Tests/VSExternalInclude/main.cpp create mode 100644 Tests/Wrapping/CMakeLists.txt create mode 100644 Tests/Wrapping/Wrap.c create mode 100644 Tests/Wrapping/dummy create mode 100755 Tests/Wrapping/fakefluid.cxx create mode 100644 Tests/Wrapping/fltk1.fl create mode 100644 Tests/Wrapping/foo.ui.in create mode 100644 Tests/Wrapping/hints create mode 100644 Tests/Wrapping/itkWrapperConfig.cxx create mode 100755 Tests/Wrapping/qtnoqtmain.cxx create mode 100644 Tests/Wrapping/qtwrapping.ui create mode 100644 Tests/Wrapping/qtwrappingmain.cxx create mode 100644 Tests/Wrapping/vtkExcluded.cxx create mode 100644 Tests/Wrapping/vtkExcluded.h create mode 100644 Tests/Wrapping/vtkIncluded.cxx create mode 100644 Tests/Wrapping/vtkIncluded.h create mode 100644 Tests/Wrapping/vtkTestMoc.h create mode 100644 Tests/Wrapping/wrapping.cxx create mode 100644 Tests/X11/CMakeLists.txt create mode 100755 Tests/X11/HelloWorldX11.cxx create mode 100644 Tests/X11/X11.c create mode 100644 Utilities/.NoDartCoverage create mode 100644 Utilities/CMakeLists.txt create mode 100644 Utilities/Doxygen/CMakeLists.txt create mode 100644 Utilities/Doxygen/authors.txt create mode 100644 Utilities/Doxygen/doc_makeall.sh.in create mode 100644 Utilities/Doxygen/doxyfile.in create mode 100755 Utilities/KWStyle/CMake.kws.xml.in create mode 100755 Utilities/KWStyle/CMakeFiles.txt.in create mode 100755 Utilities/KWStyle/CMakeLists.txt create mode 100755 Utilities/KWStyle/CMakeMoreChecks.kws.xml.in create mode 100755 Utilities/KWStyle/CMakeOverwrite.txt create mode 100755 Utilities/KWStyle/Headers/CMakeHeader.h create mode 100755 Utilities/Release/CMakeInstall.bmp create mode 100755 Utilities/Release/CMakeLogo.ico create mode 100755 Utilities/Release/Cygwin/CMakeLists.txt create mode 100755 Utilities/Release/Cygwin/README.cygwin.in create mode 100755 Utilities/Release/Cygwin/cygwin-package.sh.in create mode 100755 Utilities/Release/Cygwin/cygwin-patch.diff.in create mode 100755 Utilities/Release/Cygwin/cygwin-setup.hint.in create mode 100755 Utilities/Release/README create mode 100644 Utilities/Release/create-cmake-release.cmake create mode 100644 Utilities/Release/dashmacmini2_release.cmake create mode 100644 Utilities/Release/dashsgi1_release.cmake create mode 100644 Utilities/Release/dashsgi1_release64.cmake create mode 100755 Utilities/Release/dashsun1_release.cmake create mode 100644 Utilities/Release/destiny_release.cmake create mode 100755 Utilities/Release/hythloth_release.cmake create mode 100644 Utilities/Release/magrathea_release.cmake create mode 100644 Utilities/Release/muse_release.cmake create mode 100644 Utilities/Release/muse_release64.cmake create mode 100644 Utilities/Release/r15n65_aix_release.cmake create mode 100644 Utilities/Release/r36n11_aix_release.cmake create mode 100755 Utilities/Release/release_cmake.cmake create mode 100755 Utilities/Release/release_cmake.sh.in create mode 100644 Utilities/Release/upload_release.cmake create mode 100644 Utilities/Release/v60n177_aix_release.cmake create mode 100755 Utilities/Release/vogon_cygwin.cmake create mode 100755 Utilities/Release/vogon_release.cmake create mode 100644 Utilities/cmThirdParty.h.in create mode 100644 Utilities/cm_curl.h create mode 100644 Utilities/cm_expat.h create mode 100644 Utilities/cm_xmlrpc.h create mode 100644 Utilities/cm_zlib.h create mode 100644 Utilities/cmcompress/CMakeLists.txt create mode 100644 Utilities/cmcompress/cmcompress.c create mode 100644 Utilities/cmcompress/cmcompress.h create mode 100644 Utilities/cmcompress/compress.c.original create mode 100644 Utilities/cmcurl/CMake/CMakeConfigurableFile.in create mode 100755 Utilities/cmcurl/CMake/CheckCSourceCompiles.cmake create mode 100755 Utilities/cmcurl/CMake/CheckCSourceRuns.cmake create mode 100644 Utilities/cmcurl/CMake/CheckTypeSize.c.in create mode 100644 Utilities/cmcurl/CMake/CheckTypeSize.cmake create mode 100644 Utilities/cmcurl/CMake/CurlTests.c create mode 100644 Utilities/cmcurl/CMake/OtherTests.cmake create mode 100644 Utilities/cmcurl/CMakeLists.txt create mode 100755 Utilities/cmcurl/Platforms/WindowsCache.cmake create mode 100644 Utilities/cmcurl/Platforms/config-aix.h create mode 100644 Utilities/cmcurl/Testing/CMakeLists.txt create mode 100644 Utilities/cmcurl/Testing/curlgtk.c create mode 100644 Utilities/cmcurl/Testing/curltest.c create mode 100644 Utilities/cmcurl/Testing/ftpget.c create mode 100644 Utilities/cmcurl/Testing/ftpgetresp.c create mode 100644 Utilities/cmcurl/Testing/ftpupload.c create mode 100644 Utilities/cmcurl/Testing/getinmemory.c create mode 100644 Utilities/cmcurl/Testing/http-post.c create mode 100644 Utilities/cmcurl/Testing/httpput.c create mode 100644 Utilities/cmcurl/Testing/multithread.c create mode 100644 Utilities/cmcurl/Testing/persistant.c create mode 100644 Utilities/cmcurl/Testing/postit2.c create mode 100644 Utilities/cmcurl/Testing/sepheaders.c create mode 100644 Utilities/cmcurl/Testing/simple.c create mode 100644 Utilities/cmcurl/Testing/simplessl.c create mode 100644 Utilities/cmcurl/Testing/testconfig.h.in create mode 100644 Utilities/cmcurl/Testing/win32sockets.c create mode 100644 Utilities/cmcurl/amigaos.c create mode 100644 Utilities/cmcurl/amigaos.h create mode 100644 Utilities/cmcurl/arpa_telnet.h create mode 100644 Utilities/cmcurl/base64.c create mode 100644 Utilities/cmcurl/base64.h create mode 100644 Utilities/cmcurl/ca-bundle.h create mode 100644 Utilities/cmcurl/config.h.in create mode 100644 Utilities/cmcurl/connect.c create mode 100644 Utilities/cmcurl/connect.h create mode 100644 Utilities/cmcurl/content_encoding.c create mode 100644 Utilities/cmcurl/content_encoding.h create mode 100644 Utilities/cmcurl/cookie.c create mode 100644 Utilities/cmcurl/cookie.h create mode 100644 Utilities/cmcurl/curl.copyright create mode 100644 Utilities/cmcurl/curl/curl.h create mode 100644 Utilities/cmcurl/curl/curlver.h create mode 100644 Utilities/cmcurl/curl/easy.h create mode 100644 Utilities/cmcurl/curl/mprintf.h create mode 100644 Utilities/cmcurl/curl/multi.h create mode 100644 Utilities/cmcurl/curl/stdcheaders.h create mode 100644 Utilities/cmcurl/curl/types.h create mode 100644 Utilities/cmcurl/curlx.h create mode 100644 Utilities/cmcurl/dict.c create mode 100644 Utilities/cmcurl/dict.h create mode 100644 Utilities/cmcurl/easy.c create mode 100644 Utilities/cmcurl/easyif.h create mode 100644 Utilities/cmcurl/escape.c create mode 100644 Utilities/cmcurl/escape.h create mode 100644 Utilities/cmcurl/file.c create mode 100644 Utilities/cmcurl/file.h create mode 100644 Utilities/cmcurl/formdata.c create mode 100644 Utilities/cmcurl/formdata.h create mode 100644 Utilities/cmcurl/ftp.c create mode 100644 Utilities/cmcurl/ftp.h create mode 100644 Utilities/cmcurl/getenv.c create mode 100644 Utilities/cmcurl/getinfo.c create mode 100644 Utilities/cmcurl/getinfo.h create mode 100644 Utilities/cmcurl/gtls.c create mode 100644 Utilities/cmcurl/gtls.h create mode 100644 Utilities/cmcurl/hash.c create mode 100644 Utilities/cmcurl/hash.h create mode 100644 Utilities/cmcurl/hostares.c create mode 100644 Utilities/cmcurl/hostasyn.c create mode 100644 Utilities/cmcurl/hostip.c create mode 100644 Utilities/cmcurl/hostip.h create mode 100644 Utilities/cmcurl/hostip4.c create mode 100644 Utilities/cmcurl/hostip6.c create mode 100644 Utilities/cmcurl/hostsyn.c create mode 100644 Utilities/cmcurl/hostthre.c create mode 100644 Utilities/cmcurl/http.c create mode 100644 Utilities/cmcurl/http.h create mode 100644 Utilities/cmcurl/http_chunks.c create mode 100644 Utilities/cmcurl/http_chunks.h create mode 100644 Utilities/cmcurl/http_digest.c create mode 100644 Utilities/cmcurl/http_digest.h create mode 100644 Utilities/cmcurl/http_negotiate.c create mode 100644 Utilities/cmcurl/http_negotiate.h create mode 100644 Utilities/cmcurl/http_ntlm.c create mode 100644 Utilities/cmcurl/http_ntlm.h create mode 100644 Utilities/cmcurl/if2ip.c create mode 100644 Utilities/cmcurl/if2ip.h create mode 100644 Utilities/cmcurl/inet_ntoa_r.h create mode 100644 Utilities/cmcurl/inet_ntop.c create mode 100644 Utilities/cmcurl/inet_ntop.h create mode 100644 Utilities/cmcurl/inet_pton.c create mode 100644 Utilities/cmcurl/inet_pton.h create mode 100644 Utilities/cmcurl/krb4.c create mode 100644 Utilities/cmcurl/krb4.h create mode 100644 Utilities/cmcurl/ldap.c create mode 100644 Utilities/cmcurl/ldap.h create mode 100644 Utilities/cmcurl/llist.c create mode 100644 Utilities/cmcurl/llist.h create mode 100644 Utilities/cmcurl/md5.c create mode 100644 Utilities/cmcurl/md5.h create mode 100644 Utilities/cmcurl/memdebug.c create mode 100644 Utilities/cmcurl/memdebug.h create mode 100644 Utilities/cmcurl/memory.h create mode 100644 Utilities/cmcurl/mprintf.c create mode 100644 Utilities/cmcurl/multi.c create mode 100644 Utilities/cmcurl/multiif.h create mode 100644 Utilities/cmcurl/netrc.c create mode 100644 Utilities/cmcurl/netrc.h create mode 100644 Utilities/cmcurl/nwlib.c create mode 100644 Utilities/cmcurl/parsedate.c create mode 100644 Utilities/cmcurl/parsedate.h create mode 100644 Utilities/cmcurl/progress.c create mode 100644 Utilities/cmcurl/progress.h create mode 100644 Utilities/cmcurl/security.c create mode 100644 Utilities/cmcurl/select.c create mode 100644 Utilities/cmcurl/select.h create mode 100644 Utilities/cmcurl/sendf.c create mode 100644 Utilities/cmcurl/sendf.h create mode 100644 Utilities/cmcurl/setup.h create mode 100644 Utilities/cmcurl/setup_once.h create mode 100644 Utilities/cmcurl/share.c create mode 100644 Utilities/cmcurl/share.h create mode 100644 Utilities/cmcurl/sockaddr.h create mode 100644 Utilities/cmcurl/socks.c create mode 100644 Utilities/cmcurl/socks.h create mode 100644 Utilities/cmcurl/speedcheck.c create mode 100644 Utilities/cmcurl/speedcheck.h create mode 100644 Utilities/cmcurl/splay.c create mode 100644 Utilities/cmcurl/splay.h create mode 100644 Utilities/cmcurl/ssh.c create mode 100644 Utilities/cmcurl/ssh.h create mode 100644 Utilities/cmcurl/sslgen.c create mode 100644 Utilities/cmcurl/sslgen.h create mode 100644 Utilities/cmcurl/ssluse.c create mode 100644 Utilities/cmcurl/ssluse.h create mode 100644 Utilities/cmcurl/strdup.c create mode 100644 Utilities/cmcurl/strdup.h create mode 100644 Utilities/cmcurl/strequal.c create mode 100644 Utilities/cmcurl/strequal.h create mode 100644 Utilities/cmcurl/strerror.c create mode 100644 Utilities/cmcurl/strerror.h create mode 100644 Utilities/cmcurl/strtok.c create mode 100644 Utilities/cmcurl/strtok.h create mode 100644 Utilities/cmcurl/strtoofft.c create mode 100644 Utilities/cmcurl/strtoofft.h create mode 100644 Utilities/cmcurl/telnet.c create mode 100644 Utilities/cmcurl/telnet.h create mode 100644 Utilities/cmcurl/tftp.c create mode 100644 Utilities/cmcurl/tftp.h create mode 100644 Utilities/cmcurl/timeval.c create mode 100644 Utilities/cmcurl/timeval.h create mode 100644 Utilities/cmcurl/transfer.c create mode 100644 Utilities/cmcurl/transfer.h create mode 100644 Utilities/cmcurl/url.c create mode 100644 Utilities/cmcurl/url.h create mode 100644 Utilities/cmcurl/urldata.h create mode 100644 Utilities/cmcurl/version.c create mode 100644 Utilities/cmexpat/.NoDartCoverage create mode 100644 Utilities/cmexpat/CMakeLists.txt create mode 100644 Utilities/cmexpat/COPYING create mode 100644 Utilities/cmexpat/ascii.h create mode 100644 Utilities/cmexpat/asciitab.h create mode 100644 Utilities/cmexpat/cm_expat_mangle.h create mode 100644 Utilities/cmexpat/expat.h create mode 100644 Utilities/cmexpat/expatConfig.h.in create mode 100644 Utilities/cmexpat/expatDllConfig.h.in create mode 100644 Utilities/cmexpat/iasciitab.h create mode 100644 Utilities/cmexpat/latin1tab.h create mode 100644 Utilities/cmexpat/nametab.h create mode 100644 Utilities/cmexpat/utf8tab.h create mode 100644 Utilities/cmexpat/xmlparse.c create mode 100644 Utilities/cmexpat/xmlrole.c create mode 100644 Utilities/cmexpat/xmlrole.h create mode 100644 Utilities/cmexpat/xmltok.c create mode 100644 Utilities/cmexpat/xmltok.h create mode 100644 Utilities/cmexpat/xmltok_impl.c create mode 100644 Utilities/cmexpat/xmltok_impl.h create mode 100644 Utilities/cmexpat/xmltok_ns.c create mode 100644 Utilities/cmtar/CMakeLists.txt create mode 100644 Utilities/cmtar/COPYRIGHT create mode 100644 Utilities/cmtar/append.c create mode 100644 Utilities/cmtar/block.c create mode 100644 Utilities/cmtar/compat/README create mode 100644 Utilities/cmtar/compat/basename.c create mode 100644 Utilities/cmtar/compat/compat.h create mode 100644 Utilities/cmtar/compat/dirname.c create mode 100644 Utilities/cmtar/compat/fnmatch.c create mode 100644 Utilities/cmtar/compat/gethostbyname_r.c create mode 100644 Utilities/cmtar/compat/gethostname.c create mode 100644 Utilities/cmtar/compat/getservbyname_r.c create mode 100644 Utilities/cmtar/compat/glob.c create mode 100644 Utilities/cmtar/compat/inet_aton.c create mode 100644 Utilities/cmtar/compat/snprintf.c create mode 100644 Utilities/cmtar/compat/strdup.c create mode 100644 Utilities/cmtar/compat/strlcat.c create mode 100644 Utilities/cmtar/compat/strlcpy.c create mode 100644 Utilities/cmtar/compat/strmode.c create mode 100644 Utilities/cmtar/compat/strrstr.c create mode 100644 Utilities/cmtar/compat/strsep.c create mode 100644 Utilities/cmtar/config.h.in create mode 100644 Utilities/cmtar/decode.c create mode 100644 Utilities/cmtar/encode.c create mode 100644 Utilities/cmtar/extract.c create mode 100644 Utilities/cmtar/filesystem.c create mode 100644 Utilities/cmtar/filesystem.h create mode 100644 Utilities/cmtar/handle.c create mode 100644 Utilities/cmtar/internal.h create mode 100644 Utilities/cmtar/libtar.c create mode 100644 Utilities/cmtar/libtar.h create mode 100644 Utilities/cmtar/listhash/hash.c.in create mode 100644 Utilities/cmtar/listhash/list.c.in create mode 100644 Utilities/cmtar/listhash/listhash.h.in create mode 100644 Utilities/cmtar/output.c create mode 100644 Utilities/cmtar/tar.h create mode 100644 Utilities/cmtar/util.c create mode 100644 Utilities/cmtar/wrapper.c create mode 100644 Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake create mode 100644 Utilities/cmxmlrpc/CMakeLists.txt create mode 100644 Utilities/cmxmlrpc/XmlRpcCpp.cpp create mode 100644 Utilities/cmxmlrpc/XmlRpcCpp.h create mode 100644 Utilities/cmxmlrpc/bool.h create mode 100644 Utilities/cmxmlrpc/casprintf.c create mode 100644 Utilities/cmxmlrpc/casprintf.h create mode 100644 Utilities/cmxmlrpc/inline.h create mode 100644 Utilities/cmxmlrpc/linklist.h create mode 100644 Utilities/cmxmlrpc/mallocvar.h create mode 100644 Utilities/cmxmlrpc/synch_client.c create mode 100644 Utilities/cmxmlrpc/transport_config.h create mode 100644 Utilities/cmxmlrpc/win32_pthreads.c create mode 100644 Utilities/cmxmlrpc/xmlrpc.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_amconfig.h.in create mode 100644 Utilities/cmxmlrpc/xmlrpc_array.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_authcookie.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_base64.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_cgi.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_cgi.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_client.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_client.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_client_int.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_config.h.in create mode 100644 Utilities/cmxmlrpc/xmlrpc_curl_transport.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_curl_transport.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_data.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_expat.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_int.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_libxml2.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_parse.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_pthreads.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_registry.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_serialize.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_server.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_server_abyss.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_server_abyss.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_server_abyss_int.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_struct.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_strutil.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_support.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_transport.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_transport.h create mode 100644 Utilities/cmxmlrpc/xmlrpc_utf8.c create mode 100644 Utilities/cmxmlrpc/xmlrpc_xmlparser.h create mode 100644 Utilities/cmzlib/.NoDartCoverage create mode 100644 Utilities/cmzlib/CMakeLists.txt create mode 100644 Utilities/cmzlib/ChangeLog create mode 100644 Utilities/cmzlib/FAQ create mode 100644 Utilities/cmzlib/INDEX create mode 100644 Utilities/cmzlib/README create mode 100644 Utilities/cmzlib/README.Kitware.txt create mode 100644 Utilities/cmzlib/adler32.c create mode 100644 Utilities/cmzlib/cm_zlib_mangle.h create mode 100644 Utilities/cmzlib/compress.c create mode 100644 Utilities/cmzlib/crc32.c create mode 100644 Utilities/cmzlib/crc32.h create mode 100644 Utilities/cmzlib/deflate.c create mode 100644 Utilities/cmzlib/deflate.h create mode 100644 Utilities/cmzlib/gzio.c create mode 100644 Utilities/cmzlib/inffast.c create mode 100644 Utilities/cmzlib/inffast.h create mode 100644 Utilities/cmzlib/inffixed.h create mode 100644 Utilities/cmzlib/inflate.c create mode 100644 Utilities/cmzlib/inflate.h create mode 100644 Utilities/cmzlib/inftrees.c create mode 100644 Utilities/cmzlib/inftrees.h create mode 100644 Utilities/cmzlib/trees.c create mode 100644 Utilities/cmzlib/trees.h create mode 100644 Utilities/cmzlib/uncompr.c create mode 100644 Utilities/cmzlib/zconf.h create mode 100644 Utilities/cmzlib/zlib.def create mode 100644 Utilities/cmzlib/zlib.h create mode 100644 Utilities/cmzlib/zlib.rc create mode 100644 Utilities/cmzlib/zlibDllConfig.h.in create mode 100644 Utilities/cmzlib/zutil.c create mode 100644 Utilities/cmzlib/zutil.h create mode 100755 bootstrap create mode 100644 cmake.1 create mode 100644 cmake_uninstall.cmake.in create mode 100755 configure create mode 100644 doxygen.config diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake new file mode 100755 index 000000000..6532d9e1c --- /dev/null +++ b/CMakeCPack.cmake @@ -0,0 +1,89 @@ +# If the cmake version includes cpack, use it +IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") + IF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake") + SET(CMAKE_INSTALL_MFC_LIBRARIES 1) + OPTION(CMAKE_INSTALL_DEBUG_LIBRARIES + "Install Microsoft runtime debug libraries with CMake." FALSE) + MARK_AS_ADVANCED(CMAKE_INSTALL_DEBUG_LIBRARIES) + INCLUDE(${CMake_SOURCE_DIR}/Modules/InstallRequiredSystemLibraries.cmake) + ENDIF(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake") + # Set the options file that needs to be included inside CMakeCPackOptions.cmake + SET(QT_DIALOG_CPACK_OPTIONS_FILE ${CMake_BINARY_DIR}/Source/QtDialog/QtDialogCPack.cmake) + CONFIGURE_FILE("${CMake_SOURCE_DIR}/CMakeCPackOptions.cmake.in" + "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake" @ONLY) + SET(CPACK_PROJECT_CONFIG_FILE "${CMake_BINARY_DIR}/CMakeCPackOptions.cmake") + SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CMake is a build tool") + SET(CPACK_PACKAGE_VENDOR "Kitware") + SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") + SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") + SET(CPACK_PACKAGE_VERSION_MAJOR "${CMake_VERSION_MAJOR}") + SET(CPACK_PACKAGE_VERSION_MINOR "${CMake_VERSION_MINOR}") +# if version date is set then use that as the patch + IF(CMake_VERSION_DATE) + SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_DATE}") + ELSE(CMake_VERSION_DATE) + SET(CPACK_PACKAGE_VERSION_PATCH "${CMake_VERSION_PATCH}") + ENDIF(CMake_VERSION_DATE) + SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") + SET(CPACK_SOURCE_PACKAGE_FILE_NAME + "cmake-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + IF(CMake_VERSION_RC) + SET(CPACK_SOURCE_PACKAGE_FILE_NAME + "${CPACK_SOURCE_PACKAGE_FILE_NAME}-RC-${CMake_VERSION_RC}") + ENDIF(CMake_VERSION_RC) + IF(NOT DEFINED CPACK_SYSTEM_NAME) + SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) + ENDIF(NOT DEFINED CPACK_SYSTEM_NAME) + IF(${CPACK_SYSTEM_NAME} MATCHES Windows) + IF(CMAKE_CL_64) + SET(CPACK_SYSTEM_NAME win64-${CMAKE_SYSTEM_PROCESSOR}) + ELSE(CMAKE_CL_64) + SET(CPACK_SYSTEM_NAME win32-${CMAKE_SYSTEM_PROCESSOR}) + ENDIF(CMAKE_CL_64) + ENDIF(${CPACK_SYSTEM_NAME} MATCHES Windows) + IF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") + ENDIF(NOT DEFINED CPACK_PACKAGE_FILE_NAME) + SET(CPACK_PACKAGE_CONTACT "cmake@cmake.org") + IF(UNIX) + SET(CPACK_STRIP_FILES "bin/ccmake;bin/cmake;bin/cpack;bin/ctest") + SET(CPACK_SOURCE_STRIP_FILES "") + SET(CPACK_PACKAGE_EXECUTABLES "ccmake" "CMake") + ENDIF(UNIX) +# cygwin specific packaging stuff + IF(CYGWIN) + # if we are on cygwin and have cpack, then force the + # doc, data and man dirs to conform to cygwin style directories + SET(CMAKE_DOC_DIR "/share/doc/${CPACK_PACKAGE_FILE_NAME}") + SET(CMAKE_DATA_DIR "/share/${CPACK_PACKAGE_FILE_NAME}") + SET(CMAKE_MAN_DIR "/share/man") + # let the user know we just forced these values + MESSAGE(STATUS "Setup for Cygwin packaging") + MESSAGE(STATUS "Override cache CMAKE_DOC_DIR = ${CMAKE_DOC_DIR}") + MESSAGE(STATUS "Override cache CMAKE_DATA_DIR = ${CMAKE_DATA_DIR}") + MESSAGE(STATUS "Override cache CMAKE_MAN_DIR = ${CMAKE_MAN_DIR}") + + # setup the cygwin package name + SET(CPACK_PACKAGE_NAME cmake) + # setup the name of the package for cygwin cmake-2.4.3 + SET(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}-${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") + # the source has the same name as the binary + SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_FILE_NAME}) + # Create a cygwin version number in case there are changes for cygwin + # that are not reflected upstream in CMake + SET(CPACK_CYGWIN_PATCH_NUMBER 1) + # These files are required by the cmCPackCygwinSourceGenerator and the files + # put into the release tar files. + SET(CPACK_CYGWIN_BUILD_SCRIPT + "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.sh") + SET(CPACK_CYGWIN_PATCH_FILE + "${CMake_BINARY_DIR}/@CPACK_PACKAGE_FILE_NAME@-@CPACK_CYGWIN_PATCH_NUMBER@.patch") + # include the sub directory cmake file for cygwin that + # configures some files and adds some install targets + # this file uses some of the package file name variables + INCLUDE(Utilities/Release/Cygwin/CMakeLists.txt) + ENDIF(CYGWIN) + # include CPack model once all variables are set + INCLUDE(CPack) +ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake") diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in new file mode 100755 index 000000000..0c571d069 --- /dev/null +++ b/CMakeCPackOptions.cmake.in @@ -0,0 +1,51 @@ +# This file is configured at cmake time, and loaded at cpack time. +# To pass variables to cpack from cmake, they must be configured +# in this file. + +if(CPACK_GENERATOR MATCHES "NSIS") + # set the install/unistall icon used for the installer itself + # There is a bug in NSI that does not handle full unix paths properly. + SET(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico") + SET(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico") + # set the package header icon for MUI + SET(CPACK_PACKAGE_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeInstall.bmp") + # tell cpack to create links to the doc files + SET(CPACK_NSIS_MENU_LINKS + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/CMakeSetup.html" "CMakeSetup Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake.html" "CMake Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-properties.html" + "CMake Properties and Variables Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/ctest.html" "CTest Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-modules.html" "CMake Modules Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cmake-commands.html" "CMake Commands Help" + "doc/cmake-@CMake_VERSION_MAJOR@.@CMake_VERSION_MINOR@/cpack.html" "CPack Help" + "http://www.cmake.org" "CMake Web Site" + ) + # tell cpack the executables you want in the start menu as links + SET(CPACK_PACKAGE_EXECUTABLES "CMakeSetup" "CMake" ) + # tell cpack to create a desktop link to CMakeSetup + SET(CPACK_CREATE_DESKTOP_LINKS "CMakeSetup") + SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\CMakeSetup.exe") + SET(CPACK_NSIS_DISPLAY_NAME "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR} a cross-platform, open-source build system") + SET(CPACK_NSIS_HELP_LINK "http:\\\\www.cmake.org") + SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\www.kitware.com") + SET(CPACK_NSIS_CONTACT @CPACK_PACKAGE_CONTACT@) + SET(CPACK_NSIS_MODIFY_PATH ON) +endif(CPACK_GENERATOR MATCHES "NSIS") +# include the cpack options for qt dialog if they exisit +# they might not if qt was not enabled for the build +INCLUDE("@QT_DIALOG_CPACK_OPTIONS_FILE@" OPTIONAL) + +if(CPACK_GENERATOR MATCHES "CygwinSource") + # when packaging source make sure the .build directory is not included + SET(CPACK_SOURCE_IGNORE_FILES + "/CVS/" "/\\.build/" "/\\.svn/" "\\.swp$" "\\.#" "/#" "~$") +endif(CPACK_GENERATOR MATCHES "CygwinSource") + +if("${CPACK_GENERATOR}" STREQUAL "PackageMaker") + if(CMAKE_PACKAGE_QTGUI) + set(CPACK_PACKAGE_DEFAULT_LOCATION "/Applications") + else(CMAKE_PACKAGE_QTGUI) + set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr") + endif(CMAKE_PACKAGE_QTGUI) +endif("${CPACK_GENERATOR}" STREQUAL "PackageMaker") diff --git a/CMakeGraphVizOptions.cmake b/CMakeGraphVizOptions.cmake new file mode 100644 index 000000000..038f17e9b --- /dev/null +++ b/CMakeGraphVizOptions.cmake @@ -0,0 +1 @@ +SET(GRAPHVIZ_IGNORE_TARGETS "tartest;testSystemTools;testRegistry;testProcess;testIOS;testHashSTL;testFail;testCommandLineArguments;xrtest;LIBCURL;foo") diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 000000000..6cbc639eb --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,500 @@ +PROJECT(CMake) +CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR) +IF(COMMAND CMAKE_POLICY) + CMAKE_POLICY(SET CMP0003 NEW) +ENDIF(COMMAND CMAKE_POLICY) + +MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) + + + +#----------------------------------------------------------------------- +# a macro to deal with system libraries, implemented as a macro +# simply to improve readability of the main script +#----------------------------------------------------------------------- +MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES) + # Third party libraries must be something that can be found. + IF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake) + SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 1) + ELSE(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake) + SET(CMAKE_ALLOW_SYSTEM_LIBRARIES 0) + ENDIF(EXISTS ${CMAKE_ROOT}/Modules/FindXMLRPC.cmake) + + IF(CMAKE_ALLOW_SYSTEM_LIBRARIES) + # Options have dependencies. + INCLUDE(CMakeDependentOption) + + # Allow the user to enable/disable all system utility library options + # by setting CMAKE_USE_SYSTEM_LIBRARIES on the command line. + IF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES) + SET(CMAKE_USE_SYSTEM_LIBRARIES_USER 1) + ENDIF(DEFINED CMAKE_USE_SYSTEM_LIBRARIES) + IF(CMAKE_USE_SYSTEM_LIBRARIES) + SET(CMAKE_USE_SYSTEM_LIBRARIES ON) + ELSE(CMAKE_USE_SYSTEM_LIBRARIES) + SET(CMAKE_USE_SYSTEM_LIBRARIES OFF) + ENDIF(CMAKE_USE_SYSTEM_LIBRARIES) + IF(CMAKE_USE_SYSTEM_LIBRARIES_USER) + SET(CMAKE_USE_SYSTEM_CURL "${CMAKE_USE_SYSTEM_LIBRARIES}" + CACHE BOOL "Use system-installed curl" FORCE) + SET(CMAKE_USE_SYSTEM_EXPAT "${CMAKE_USE_SYSTEM_LIBRARIES}" + CACHE BOOL "Use system-installed expat" FORCE) + SET(CMAKE_USE_SYSTEM_XMLRPC "${CMAKE_USE_SYSTEM_LIBRARIES}" + CACHE BOOL "Use system-installed xmlrpc" FORCE) + SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}" + CACHE BOOL "Use system-installed zlib" FORCE) + ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER) + + # Optionally use system utility libraries. + OPTION(CMAKE_USE_SYSTEM_CURL "Use system-installed curl" + ${CMAKE_USE_SYSTEM_LIBRARIES}) + OPTION(CMAKE_USE_SYSTEM_XMLRPC "Use system-installed xmlrpc" + ${CMAKE_USE_SYSTEM_LIBRARIES}) + CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_EXPAT "Use system-installed expat" + ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_XMLRPC" ON) + CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib" + ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON) + + # There is currently no option for system tar because the upstream + # libtar does not have our modifications to allow reentrant + # object-oriented use of the library. + # OPTION(CMAKE_USE_SYSTEM_TAR "Use system-installed tar" OFF) + ELSE(CMAKE_ALLOW_SYSTEM_LIBRARIES) + SET(CMAKE_USE_SYSTEM_CURL 0) + SET(CMAKE_USE_SYSTEM_EXPAT 0) + SET(CMAKE_USE_SYSTEM_XMLRPC 0) + SET(CMAKE_USE_SYSTEM_ZLIB 0) + ENDIF(CMAKE_ALLOW_SYSTEM_LIBRARIES) + + + # Mention to the user what system libraries are being used. + FOREACH(util CURL EXPAT XMLRPC ZLIB) + IF(CMAKE_USE_SYSTEM_${util}) + MESSAGE(STATUS "Using system-installed ${util}") + ENDIF(CMAKE_USE_SYSTEM_${util}) + ENDFOREACH(util) + + # Inform utility library header wrappers whether to use system versions. + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Utilities/cmThirdParty.h.in + ${CMake_BINARY_DIR}/Utilities/cmThirdParty.h + @ONLY) + +ENDMACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES) + + + +#----------------------------------------------------------------------- +# a macro to check for MFC and setup to build the MFC Dialog +# simply to improve readability of the main script +#----------------------------------------------------------------------- +MACRO(CMAKE_TEST_FOR_MFC) + SET(CMAKE_BUILD_ON_VISUAL_STUDIO 0) + IF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW ) + SET(CMAKE_BUILD_ON_VISUAL_STUDIO 1) + ENDIF(WIN32 AND NOT UNIX AND NOT BORLAND AND NOT MINGW ) + + IF(CMAKE_BUILD_ON_VISUAL_STUDIO) + IF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$") + SET(CHECK_INCLUDE_FILE_VAR "afxwin.h") + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx) + MESSAGE(STATUS "Looking for MFC") + TRY_COMPILE(CMake_HAVE_MFC + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx + CMAKE_FLAGS + -DCMAKE_MFC_FLAG:STRING=2 + -DCOMPILE_DEFINITIONS:STRING=-D_AFXDLL + OUTPUT_VARIABLE OUTPUT) + IF(CMake_HAVE_MFC) + MESSAGE(STATUS "Looking for MFC - found") + SET(CMake_HAVE_MFC 1 CACHE INTERNAL "Have MFC?") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if MFC exists passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(CMake_HAVE_MFC) + MESSAGE(STATUS "Looking for MFC - not found") + SET(CMake_HAVE_MFC 0 CACHE INTERNAL "Have MFC?") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if MFC exists failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(CMake_HAVE_MFC) + ENDIF("CMake_HAVE_MFC" MATCHES "^CMake_HAVE_MFC$") + + IF(CMake_HAVE_MFC) + OPTION(BUILD_MFCDialog "Whether to build the CMakeSetup MFC dialog." ON) + ELSE(CMake_HAVE_MFC) + SET(BUILD_MFCDialog 0) + ENDIF(CMake_HAVE_MFC) + ELSE(CMAKE_BUILD_ON_VISUAL_STUDIO) + SET(BUILD_MFCDialog 0) + ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO) +ENDMACRO(CMAKE_TEST_FOR_MFC) + + + +#----------------------------------------------------------------------- +# a macro to determine the generator and ctest executable to use +# for testing. Simply to improve readability of the main script. +#----------------------------------------------------------------------- +MACRO(CMAKE_SETUP_TESTING) + IF (NOT DART_ROOT) + SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM}) + ENDIF (NOT DART_ROOT) + + IF(BUILD_TESTING) + SET(CMAKE_TEST_GENERATOR "" CACHE STRING + "Generator used when running tests") + SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH + "Generator used when running tests") + IF(NOT CMAKE_TEST_GENERATOR) + SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}") + SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}") + ELSE(NOT CMAKE_TEST_GENERATOR) + SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE) + ENDIF(NOT CMAKE_TEST_GENERATOR) + + # Are we testing with the MSVC compiler? + SET(CMAKE_TEST_MSVC 0) + IF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) + SET(CMAKE_TEST_MSVC 1) + ELSE(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) + IF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR + "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") + SET(CMAKE_TEST_MSVC 1) + ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "NMake" OR + "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio") + ENDIF(MSVC AND NOT CMAKE_TEST_DIFFERENT_GENERATOR) + + SET(CMAKE_TEST_SYSTEM_LIBRARIES 0) + FOREACH(util CURL EXPAT XMLRPC ZLIB) + IF(CMAKE_USE_SYSTEM_${util}) + SET(CMAKE_TEST_SYSTEM_LIBRARIES 1) + ENDIF(CMAKE_USE_SYSTEM_${util}) + ENDFOREACH(util) + + # This variable is set by cmake, however to + # test cmake we want to make sure that + # the ctest from this cmake is used for testing + # and not the ctest from the cmake building and testing + # cmake. + SET(CMAKE_CTEST_COMMAND "${EXECUTABLE_OUTPUT_PATH}/ctest") + SET(CMAKE_CMAKE_COMMAND "${EXECUTABLE_OUTPUT_PATH}/cmake") + ENDIF(BUILD_TESTING) + + # configure some files for testing + CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/Templates/CTestScript.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/CTestScript.cmake" + @ONLY) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage + ${CMake_BINARY_DIR}/Tests/.NoDartCoverage) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage + ${CMake_BINARY_DIR}/Modules/.NoDartCoverage) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.cmake.in + ${CMake_BINARY_DIR}/CTestCustom.cmake @ONLY) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/CTestCustom.ctest.in + ${CMake_BINARY_DIR}/CTestCustom.ctest @ONLY) + IF(BUILD_TESTING AND DART_ROOT) + CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif + ${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY) + ENDIF(BUILD_TESTING AND DART_ROOT) + MARK_AS_ADVANCED(DART_ROOT) + MARK_AS_ADVANCED(CURL_TESTING) +ENDMACRO(CMAKE_SETUP_TESTING) + + + +#----------------------------------------------------------------------- +# a macro to build the utilities used by CMake +# Simply to improve readability of the main script. +#----------------------------------------------------------------------- +MACRO (CMAKE_BUILD_UTILITIES) + #--------------------------------------------------------------------- + # Create the kwsys library for CMake. + SET(KWSYS_NAMESPACE cmsys) + SET(KWSYS_USE_SystemTools 1) + SET(KWSYS_USE_Directory 1) + SET(KWSYS_USE_RegularExpression 1) + SET(KWSYS_USE_Base64 1) + SET(KWSYS_USE_MD5 1) + SET(KWSYS_USE_Process 1) + SET(KWSYS_USE_CommandLineArguments 1) + SET(KWSYS_HEADER_ROOT ${CMake_BINARY_DIR}/Source) + SUBDIRS(Source/kwsys) + + #--------------------------------------------------------------------- + # Setup third-party libraries. + # Everything in the tree should be able to include files from the + # Utilities directory. + INCLUDE_DIRECTORIES( + ${CMake_SOURCE_DIR}/Utilities + ${CMake_BINARY_DIR}/Utilities + ) + + # check for the use of system libraries versus builtin ones + # (a macro defined in this file) + CMAKE_HANDLE_SYSTEM_LIBRARIES() + + #--------------------------------------------------------------------- + # Build zlib library for Curl, CMake, and CTest. + SET(CMAKE_ZLIB_HEADER "cm_zlib.h") + IF(CMAKE_USE_SYSTEM_ZLIB) + FIND_PACKAGE(ZLIB) + IF(NOT ZLIB_FOUND) + MESSAGE(FATAL_ERROR + "CMAKE_USE_SYSTEM_ZLIB is ON but a zlib is not found!") + ENDIF(NOT ZLIB_FOUND) + SET(CMAKE_ZLIB_INCLUDES ${ZLIB_INCLUDE_DIR}) + SET(CMAKE_ZLIB_LIBRARIES ${ZLIB_LIBRARIES}) + ELSE(CMAKE_USE_SYSTEM_ZLIB) + SET(CMAKE_ZLIB_INCLUDES) + SET(CMAKE_ZLIB_LIBRARIES cmzlib) + SUBDIRS(Utilities/cmzlib) + ENDIF(CMAKE_USE_SYSTEM_ZLIB) + + #--------------------------------------------------------------------- + # Build Curl library for CTest. + IF(CMAKE_USE_SYSTEM_CURL) + FIND_PACKAGE(CURL) + IF(NOT CURL_FOUND) + MESSAGE(FATAL_ERROR + "CMAKE_USE_SYSTEM_CURL is ON but a curl is not found!") + ENDIF(NOT CURL_FOUND) + SET(CMAKE_CURL_INCLUDES ${CURL_INCLUDE_DIRS}) + SET(CMAKE_CURL_LIBRARIES ${CURL_LIBRARIES}) + ELSE(CMAKE_USE_SYSTEM_CURL) + SET(CURL_SPECIAL_ZLIB_H ${CMAKE_ZLIB_HEADER}) + SET(CURL_SPECIAL_LIBZ_INCLUDES ${CMAKE_ZLIB_INCLUDES}) + SET(CURL_SPECIAL_LIBZ ${CMAKE_ZLIB_LIBRARIES}) + ADD_DEFINITIONS(-DCURL_STATICLIB) + SET(CMAKE_CURL_INCLUDES) + SET(CMAKE_CURL_LIBRARIES cmcurl) + SUBDIRS(Utilities/cmcurl) + ENDIF(CMAKE_USE_SYSTEM_CURL) + + #--------------------------------------------------------------------- + # Build Tar library for CTest. + SET(CMTAR_ZLIB_HEADER ${CMAKE_ZLIB_HEADER}) + SET(CMTAR_ZLIB_LIBRARIES ${CMAKE_ZLIB_LIBRARIES}) + SET(CMTAR_ZLIB_INCLUDE_DIRS ${CMAKE_ZLIB_INCLUDES}) + SET(CMAKE_TAR_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmtar) + SET(CMAKE_TAR_LIBRARIES cmtar) + SUBDIRS(Utilities/cmtar) + + #--------------------------------------------------------------------- + # Build Compress library for CTest. + SET(CMAKE_COMPRESS_INCLUDES + "${CMAKE_CURRENT_BINARY_DIR}/Utilities/cmcompress") + SET(CMAKE_COMPRESS_LIBRARIES "cmcompress") + SUBDIRS(Utilities/cmcompress) + + #--------------------------------------------------------------------- + # Build expat library for CMake and CTest. + IF(CMAKE_USE_SYSTEM_EXPAT) + FIND_PACKAGE(EXPAT) + IF(NOT EXPAT_FOUND) + MESSAGE(FATAL_ERROR + "CMAKE_USE_SYSTEM_EXPAT is ON but a expat is not found!") + ENDIF(NOT EXPAT_FOUND) + SET(CMAKE_EXPAT_INCLUDES ${EXPAT_INCLUDE_DIRS}) + SET(CMAKE_EXPAT_LIBRARIES ${EXPAT_LIBRARIES}) + ELSE(CMAKE_USE_SYSTEM_EXPAT) + SET(CMAKE_EXPAT_INCLUDES) + SET(CMAKE_EXPAT_LIBRARIES cmexpat) + SUBDIRS(Utilities/cmexpat) + ENDIF(CMAKE_USE_SYSTEM_EXPAT) + + #--------------------------------------------------------------------- + # Build XMLRPC library for CMake and CTest. + IF(CMAKE_USE_SYSTEM_XMLRPC) + FIND_PACKAGE(XMLRPC QUIET REQUIRED libwww-client) + IF(NOT XMLRPC_FOUND) + MESSAGE(FATAL_ERROR + "CMAKE_USE_SYSTEM_XMLRPC is ON but a xmlrpc is not found!") + ENDIF(NOT XMLRPC_FOUND) + SET(CMAKE_XMLRPC_INCLUDES ${XMLRPC_INCLUDE_DIRS}) + SET(CMAKE_XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES}) + ELSE(CMAKE_USE_SYSTEM_XMLRPC) + SET(CMAKE_XMLRPC_INCLUDES) + SET(CMAKE_XMLRPC_LIBRARIES cmXMLRPC) + SUBDIRS(Utilities/cmxmlrpc) + ENDIF(CMAKE_USE_SYSTEM_XMLRPC) + + #--------------------------------------------------------------------- + # Use curses? + IF (UNIX) + # there is a bug in the Syllable libraries which makes linking ccmake fail, Alex + IF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable) + SET(CURSES_NEED_NCURSES TRUE) + FIND_PACKAGE(Curses QUIET) + IF (CURSES_LIBRARY) + OPTION(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON) + ELSE (CURSES_LIBRARY) + MESSAGE("Curses libraries were not found. Curses GUI for CMake will not be built.") + SET(BUILD_CursesDialog 0) + ENDIF (CURSES_LIBRARY) + ELSE(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable) + SET(BUILD_CursesDialog 0) + ENDIF(NOT "${CMAKE_SYSTEM_NAME}" MATCHES syllable) + ELSE (UNIX) + SET(BUILD_CursesDialog 0) + ENDIF (UNIX) + IF(BUILD_CursesDialog) + SUBDIRS(Source/CursesDialog/form) + ENDIF(BUILD_CursesDialog) +ENDMACRO (CMAKE_BUILD_UTILITIES) + + + +#----------------------------------------------------------------------- +# The main section of the CMakeLists file +# +#----------------------------------------------------------------------- +# The CMake version number. +SET(CMake_VERSION_MAJOR 2) +SET(CMake_VERSION_MINOR 6) +SET(CMake_VERSION_PATCH 0) +#SET(CMake_VERSION_RC 1) +# CVS versions are odd, if this is an odd minor version +# then set the CMake_VERSION_DATE variable +IF("${CMake_VERSION_MINOR}" MATCHES "[13579]$") + INCLUDE(${CMake_SOURCE_DIR}/Source/kwsys/kwsysDateStamp.cmake) + SET(CMake_VERSION_DATE + "${KWSYS_DATE_STAMP_YEAR}${KWSYS_DATE_STAMP_MONTH}${KWSYS_DATE_STAMP_DAY}" + ) +ENDIF("${CMake_VERSION_MINOR}" MATCHES "[13579]$") + +SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") +SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}") + +# Include the standard Dart testing module +ENABLE_TESTING() +INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake) + +# where to write the resulting executables and libraries +SET(BUILD_SHARED_LIBS OFF) +SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/bin CACHE INTERNAL + "Where to put the executables for CMake") +SET(LIBRARY_OUTPUT_PATH "" CACHE INTERNAL + "Where to put the libraries for CMake") +INCLUDE_REGULAR_EXPRESSION("^.*$") + +# The CMake executables usually do not need any rpath to run in the build or +# install tree. +SET(CMAKE_SKIP_RPATH ON CACHE INTERNAL "CMake does not need RPATHs.") + +SET(CMAKE_DATA_DIR "/share/cmake-${CMake_VERSION}" CACHE STRING + "Install location for data (relative to prefix).") +SET(CMAKE_DOC_DIR "/doc/cmake-${CMake_VERSION}" CACHE STRING + "Install location for documentation (relative to prefix).") +SET(CMAKE_MAN_DIR "/man" CACHE STRING + "Install location for man pages (relative to prefix).") +MARK_AS_ADVANCED(CMAKE_DATA_DIR CMAKE_DOC_DIR CMAKE_MAN_DIR) + +# include special compile flags for some compilers +INCLUDE(CompileFlags.cmake) + +# no clue why we are testing for this here +INCLUDE(CheckSymbolExists) +CHECK_SYMBOL_EXISTS(unsetenv "stdlib.h" HAVE_UNSETENV) +CHECK_SYMBOL_EXISTS(environ "stdlib.h" HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE) + +# build the utilities (a macro defined in this file) +CMAKE_BUILD_UTILITIES() + +# On NetBSD ncurses is required, since curses doesn't have the wsyncup() +# function. ncurses is installed via pkgsrc, so the library is in /usr/pkg/lib, +# which isn't in the default linker search path. So without RPATH ccmake +# doesn't run and the build doesn't succeed since ccmake is executed for +# generating the documentation. +IF(BUILD_CursesDialog) + GET_FILENAME_COMPONENT(_CURSES_DIR "${CURSES_LIBRARY}" PATH) + SET(CURSES_NEED_RPATH FALSE) + IF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64") + SET(CURSES_NEED_RPATH TRUE) + ENDIF(NOT "${_CURSES_DIR}" STREQUAL "/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib" AND NOT "${_CURSES_DIR}" STREQUAL "/lib64" AND NOT "${_CURSES_DIR}" STREQUAL "/usr/lib64") +ENDIF(BUILD_CursesDialog) + +IF(BUILD_QtDialog) + IF(APPLE) + SET(CMAKE_BUNDLE_NAME + "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_PATCH}") + IF(CMake_VERSION_DATE) + SET(CMAKE_BUNDLE_NAME + "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}-${CMake_VERSION_DATE}") + ENDIF(CMake_VERSION_DATE) + SET(CMAKE_BUNDLE_LOCATION "${CMAKE_INSTALL_PREFIX}") + # make sure CMAKE_INSTALL_PREFIX ends in / + STRING(LENGTH "${CMAKE_INSTALL_PREFIX}" LEN) + MATH(EXPR LEN "${LEN} -1" ) + STRING(SUBSTRING "${CMAKE_INSTALL_PREFIX}" ${LEN} 1 ENDCH) + IF(NOT "${ENDCH}" STREQUAL "/") + SET(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/") + ENDIF(NOT "${ENDCH}" STREQUAL "/") + SET(CMAKE_INSTALL_PREFIX + "${CMAKE_INSTALL_PREFIX}${CMAKE_BUNDLE_NAME}.app/Contents") + ENDIF(APPLE) + + SET(QT_NEED_RPATH FALSE) + IF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64") + SET(QT_NEED_RPATH TRUE) + ENDIF(NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/lib64" AND NOT "${QT_LIBRARY_DIR}" STREQUAL "/usr/lib64") +ENDIF(BUILD_QtDialog) + + +# The same might be true on other systems for other libraries if +# CMAKE_USE_SYSTEM_XMLRPC or other variables like this are enabled. +# Then only enable RPATH if we have are building at least with cmake 2.4, +# since this one has much better RPATH features than cmake 2.2. +# The executables are then built with the RPATH for the libraries outside +# the build tree, which is both the build and the install RPATH. +IF (UNIX) + IF( CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB + OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH) + SET(CMAKE_SKIP_RPATH OFF CACHE INTERNAL "CMake built with RPATH.") + SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) + ENDIF(CMAKE_USE_SYSTEM_CURL OR CMAKE_USE_SYSTEM_ZLIB + OR CMAKE_USE_SYSTEM_EXPAT OR CMAKE_USE_SYSTEM_XMLRPC OR CURSES_NEED_RPATH OR QT_NEED_RPATH) +ENDIF (UNIX) + + +# should we build the MFC dialog? (a macro defined in this file) +CMAKE_TEST_FOR_MFC() + +# add the uninstall support +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + @ONLY) +ADD_CUSTOM_TARGET(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") + +INCLUDE (CMakeCPack.cmake) + +# setup some Testing support (a macro defined in this file) +CMAKE_SETUP_TESTING() +CONFIGURE_FILE( + "${CMAKE_CURRENT_SOURCE_DIR}/DartLocal.conf.in" + "${CMAKE_CURRENT_BINARY_DIR}/DartLocal.conf" + COPYONLY) + +OPTION(CMAKE_STRICT + "Perform strict testing to record property and variable access. Can be used to report any undefined properties or variables" OFF) +MARK_AS_ADVANCED(CMAKE_STRICT) + + +# build the remaining subdirectories +SUBDIRS(Source) +SUBDIRS(Modules) +SUBDIRS(Templates) +SUBDIRS(Utilities) +SUBDIRS(Tests) + +# add a test +ADD_TEST(SystemInformationNew "${CMAKE_CMAKE_COMMAND}" + --system-information -G "${CMAKE_TEST_GENERATOR}" ) + +#----------------------------------------------------------------------- +# End of the main section of the CMakeLists file +#----------------------------------------------------------------------- diff --git a/CMakeLogo.gif b/CMakeLogo.gif new file mode 100644 index 0000000000000000000000000000000000000000..8426402a7264672715a35bd0e0f879452843acc5 GIT binary patch literal 4481 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 b<14!puXgXr?2b*M?$GH;p{QdpVB`M)0Qz7} literal 0 HcmV?d00001 diff --git a/CTestConfig.cmake b/CTestConfig.cmake new file mode 100644 index 000000000..2e43722c4 --- /dev/null +++ b/CTestConfig.cmake @@ -0,0 +1,23 @@ +SET (CTEST_PROJECT_NAME "CMake") +SET (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") + +MACRO(SET_IF_NOT_SET var val) + IF(NOT DEFINED "${var}") + SET("${var}" "${val}") + ENDIF(NOT DEFINED "${var}") +ENDMACRO(SET_IF_NOT_SET) + +SET_IF_NOT_SET(CTEST_DROP_METHOD "http") +IF(CTEST_DROP_METHOD STREQUAL "http") + SET (CTEST_DROP_SITE "public.kitware.com") + SET (CTEST_DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi") + SET (CTEST_TRIGGER_SITE "http://${CTEST_DROP_SITE}/cgi-bin/Submit-CMake-TestingResults.cgi") +ENDIF(CTEST_DROP_METHOD STREQUAL "http") + +IF(CTEST_DROP_METHOD STREQUAL "xmlrpc") + SET (CTEST_DROP_SITE "http://www.na-mic.org:8081") + SET (CTEST_DROP_LOCATION "CMake") + SET (CTEST_TRIGGER_SITE "not used") + SET (COMPRESS_SUBMISSION ON) +ENDIF(CTEST_DROP_METHOD STREQUAL "xmlrpc") + diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in new file mode 100644 index 000000000..68f0dedd0 --- /dev/null +++ b/CTestCustom.cmake.in @@ -0,0 +1,52 @@ +SET(CTEST_CUSTOM_WARNING_EXCEPTION + ${CTEST_CUSTOM_WARNING_EXCEPTION} + "xtree.[0-9]+. : warning C4702: unreachable code" + "warning LNK4221" + "variable .var_args[2]*. is used before its value is set" + "jobserver unavailable" + "warning: \\(Long double usage is reported only once for each file" + "warning: To disable this warning use" + "could not be inlined" + "libcmcurl.*has no symbols" + "not sorted slower link editing will result" + "stl_deque.h:479" + "Utilities.cmzlib." + "Utilities.cmxmlrpc." + "Source.CTest.Curl" + "Utilities.cmcurl" + "Source.CursesDialog.form" + "/usr/bin/ld.*warning.*-..*directory.name.*bin.*does not exist" + "Redeclaration of .send..... with a different storage class specifier" + "Utilities.cmexpat." + "is not used for resolving any symbol" + "Clock skew detected" + "remark\\(1209" + "stl_deque.h:1051" + "Parser.cxx.*warning.*2111-D.*statement is unreachable" + "CMakeSetupManifest.xml.*manifest authoring warning.*Unrecognized Element" + ) + +IF(NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") + SET(CTEST_CUSTOM_COVERAGE_EXCLUDE + ${CTEST_CUSTOM_COVERAGE_EXCLUDE} + "XCode" + ) +ENDIF (NOT "@CMAKE_GENERATOR@" MATCHES "Xcode") + +IF(NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop") + SET(CTEST_CUSTOM_COVERAGE_EXCLUDE + ${CTEST_CUSTOM_COVERAGE_EXCLUDE} + "Kdevelop" + ) +ENDIF (NOT "@CMAKE_GENERATOR@" MATCHES "KDevelop") + +SET(CTEST_CUSTOM_COVERAGE_EXCLUDE + ${CTEST_CUSTOM_COVERAGE_EXCLUDE} + + # Exclude kwsys files from coverage results. They are reported + # (with better coverage results) on kwsys dashboards... + "/Source/(cm|kw)sys/" + + # Exclude try_compile sources from coverage results: + "/CMakeFiles/CMakeTmp/" + ) diff --git a/CTestCustom.ctest.in b/CTestCustom.ctest.in new file mode 100644 index 000000000..6127843f6 --- /dev/null +++ b/CTestCustom.ctest.in @@ -0,0 +1,3 @@ +# This file is provided for compatibility with CMake 2.2 and lower. +# Just include the custom file by its new name. +INCLUDE("CTestCustom.cmake") diff --git a/ChangeLog.manual b/ChangeLog.manual new file mode 100755 index 000000000..c49a154c8 --- /dev/null +++ b/ChangeLog.manual @@ -0,0 +1,121 @@ +Changes in CMake 2.6.0 +- Fix links in generated documentation +- Fix for FindQt and some mac frameworks +- Fix for ctest to report more than 2 gigs system memory on windows +- Fix CTest build name for vs 9, and fix memory size on windows +Changes in CMake 2.6.0 RC 10 +- Do not duplicate .so libraries on the link line +- Add more system library paths to sun builds +- Add BETA support for Intel Fortran IDE files in visual studio +- Fix FindCurses to work if ncurses is the only option +- Fix shell escapes on some systems +- Remove check for file write as input to cmake, as it is no longer needed +- Make check_type_size automatically check for headers that it uses +- Remove minimum required from FindBoost.cmake +- Fix FindSDL so that it can be run more than once +- Fix find required for VTK package +- Allow for CMAKE_OSX_SYSROOT to work with single architecture +- Add context information when a source file cannot be found. +- Report the directory-level context even if no list file + is currently being processed. + +Changes in CMake 2.6.0 RC 9 + +- Fix for fortran mod:: support +- Fix bug in install command with BUNDLE DESTINATION +- Make mac install symlinks check for errors +- Fix for CMP0007, to not warn about empty lists +- Preserve static libraries when linked multiple times +- Use c compiler path to find asm compiler +- Allow RC compiler to not get all COMPILE_FLAGS +- Complete overhaul for FindBoost.cmake +- Minor fixes for FindMPI.cmake +- Fix for list command and empty list elements CMP0007 +- Fix for VS6 and sub-groups +- Fix bug 6440, and make sure _INIT flags do not overright cache values +- Do not report CMP0003 for anything other than -l +- Fix crash in fortran depend scanning, bug 6855 +- Fix timeout values for cmake's own tests +- Better message in compiler ABI detect +- Fixes for cpack x11 packages on leopard +- Changes to cpack options names +- Fixes for FindMPI on 64 bit MS MPI +- Fix for -isystem for wxWidgets +- Some fixes for chrpath during installation +- Fix compatibility with CMake 2.4 for installation of MACOSX_BUNDLE (CMP0006) +- Do not use debug postfix when building frameworks on the Mac +- Fix exception handling off/on issue with visual studio IDE generators +- Fix to be native path style +- Fix leak in cpack +- Some Qt GUI style changes + +Changes in CMake 2.6.0 RC 8 + +- Fix sun make very poor performance +- Fix includes for automoc in FindQt4 + +Changes in CMake 2.6.0 RC 7 + +- Fix for chrpath on sun with gcc +- Fix FindJNI on unix with HKEY issue bug 6688 +- Change install location on mac for cmake-gui +- Fix for bugs 6730 and 6720 in FindQt4 configured headers in binary dir +- Add VS9 support to InstallRequiredSystemLibraries.cmake +- Fix some bugs in framework support +- Have make edit_cache work with cmake-gui and eclipse generator +- Fix find_* to not mistakenly construct network paths on windows +- Several bug fixes in cmake-gui Qt program. + +Changes in CMake 2.6.0 RC 6 + +- Added ChangeLog.manual +- Allow CMakeImportBuildSettings force compiler to be optional +- Change cpack deb packager to detect the architecture +- Fix FindCurses to be backwards compatible with cache variable CURSES_LIBRARY +- Add version variables to FindQt4.cmake +- Fix CPack Deb generator to not hard code /usr +- Better default size for cmake-gui help dialog +- Fix problem where incorrect path was used for cmake.exe when + used to do incremental linking on windows nmake or make +- Fix build with system libraries on +- Add color output in kdevelop +- Create non-verbose makefiles in kdevelop +- Fix some missing flags for vs IDE flag map +- Fix MacOSX install symlink crash problem +- Fix turning of Dev warnings with gui's +- Fix backwards compatibility issue with FindMPI.cmake +- Fix for bug 6605, add -L path for optimized in debug sometimes for + backwards compatibility +- Allow for CMP0000 to be set before any warnings happen +- Do not use FAT32 hack in VS 2005 and 2008 unless on a FAT32 disk, + causes try-compiles to be 3 times slower if FAT hack is present. +- Fixes to debian cpack +- Can now check if a proprty is SET or not +- Fix for generate with vs 2005 and vista not being able to create stamp file +- set_property with an empty value unsets that property now +- Fix FindQt4 on windows with some \ style paths + +Changes in CMake 2.6.0 + +- Documentation for all variables +- Automatic reload of projects in visual stuido 7 and greater + when cmake is re-run. +- Direct CDash submit support +- Bullseye coverage support +- Use full paths for linking to libraries on all platforms. No longer + separate into -L and -l. +- Enhance the install command +- export command and ability to have imported targets +- CPack support for rpm and deb +- Cross compile support +- New Qt GUI +- Introduction of the cmake_policy command +- Much better Fortran support +- Mac OSX Framework creation support +- Project generators for Eclipse and CodeBlocks +- Beta support for asm in makefiles +- Enhanced find_package() command with support for project-installed + FooConfig.cmake files +- New CMAKE_PREFIX_PATH environment variable to specify user search dirs + for find_xxx() +- Lots of bug fixes \ No newline at end of file diff --git a/ChangeLog.txt b/ChangeLog.txt new file mode 100644 index 000000000..1623ada0a --- /dev/null +++ b/ChangeLog.txt @@ -0,0 +1,69537 @@ +2008-03-27 13:27 hoffman + + * ChangeLog.txt: ENH: check in new change log for 2.6 + +2008-03-27 11:16 hoffman + + * CMakeLists.txt, Modules/CPack.cmake, + Source/cmInstallCommandArguments.cxx, Source/cmake.cxx: ENH: + merge in from main tree + +2008-03-26 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-26 22:34 hoffman + + * Source/cmake.cxx: ENH: clean up annoying output from rc tool in + VS9 + +2008-03-26 20:12 alex + + * Modules/CPack.cmake: ENH: use CPACK_PACKAGE_VERSION instead of + CPACK_PACKAGE_VERSION_MAJOR.CPACK_PACKAGE_VERSION_MINOR.CPACK_PACKAGE_VERSION_PATCH + for creating the package file name + + Alex + +2008-03-26 18:30 alex + + * Source/cmInstallCommandArguments.cxx: BUG: fix the default + "Unspecified" component when only the generic (i.e. not RUNTIME, + ARCHIVE, LIBRARY, etc.) arguments are given. + + If the component of a part of a target is queried, return the + specific one, if a specific one hasn't been set, return the + generic one, if that hasn't been set, return "Unspecified". + + Alex + +2008-03-26 15:55 hoffman + + * Utilities/Release/: v20n17_aix_release.cmake, + vogon_release_qt.cmake: ENH: + +2008-03-26 14:08 hoffman + + * CMakeLists.txt, Modules/CMakeJavaInformation.cmake, + Modules/FindSubversion.cmake, Source/cmCoreTryCompile.cxx: ENH: + merge in from main tree + +2008-03-26 13:50 hoffman + + * Source/cmCoreTryCompile.cxx: ENH: make sure numAttempts is + incremented + +2008-03-26 13:14 hoffman + + * Source/cmCoreTryCompile.cxx: ENH: try to fix dashboard issue with + not being able to remove try compile code + +2008-03-25 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-25 19:58 hoffman + + * CMakeLists.txt, Source/cmLocalUnixMakefileGenerator3.cxx, + Tests/Assembler/CMakeLists.txt, + Tests/BuildDepends/CMakeLists.txt, + Tests/BundleTest/CMakeLists.txt, Tests/COnly/CMakeLists.txt, + Tests/CTestTest/CMakeLists.txt, Tests/CTestTest2/CMakeLists.txt, + Tests/CommandLineTest/CMakeLists.txt, + Tests/ConvLibrary/CMakeLists.txt, + Tests/CustComDepend/CMakeLists.txt, + Tests/CustomCommand/CMakeLists.txt, + Tests/CustomCommandWorkingDirectory/CMakeLists.txt, + Tests/Dependency/CMakeLists.txt, Tests/DocTest/CMakeLists.txt, + Tests/ExportImport/CMakeLists.txt, + Tests/ExportImport/Export/CMakeLists.txt, + Tests/ExportImport/Import/CMakeLists.txt, + Tests/ExternalOBJ/CMakeLists.txt, + Tests/ExternalOBJ/Object/CMakeLists.txt, + Tests/FindPackageTest/CMakeLists.txt, + Tests/Fortran/CMakeLists.txt, Tests/Framework/CMakeLists.txt, + Tests/FunctionTest/CMakeLists.txt, Tests/Java/CMakeLists.txt, + Tests/Jump/CMakeLists.txt, Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt, + Tests/LoadCommand/CMakeCommands/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + Tests/MacroTest/CMakeLists.txt, Tests/MakeClean/CMakeLists.txt, + Tests/MathTest/CMakeLists.txt, Tests/NewlineArgs/CMakeLists.txt, + Tests/OutOfSource/CMakeLists.txt, Tests/Plugin/CMakeLists.txt, + Tests/PrecompiledHeader/CMakeLists.txt, + Tests/Properties/CMakeLists.txt, Tests/ReturnTest/CMakeLists.txt, + Tests/RuntimePath/CMakeLists.txt, Tests/SameName/CMakeLists.txt, + Tests/SetLang/CMakeLists.txt, Tests/SimpleExclude/CMakeLists.txt, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SourceGroups/CMakeLists.txt, + Tests/StringFileTest/CMakeLists.txt, Tests/SubDir/CMakeLists.txt, + Tests/SubDir/Examples/CMakeLists.txt, + Tests/SubDir/Examples/example1/CMakeLists.txt, + Tests/SubDirSpaces/CMakeLists.txt, Tests/SubDirSpaces/Some + Examples/CMakeLists.txt, Tests/SubDirSpaces/Some + Examples/example1/CMakeLists.txt, + Tests/SubProject/CMakeLists.txt, Tests/SwigTest/CMakeLists.txt, + Tests/SystemInformation/CMakeLists.txt, + Tests/TarTest/CMakeLists.txt, Tests/TargetName/CMakeLists.txt, + Tests/TestDriver/CMakeLists.txt, Tests/Testing/CMakeLists.txt, + Tests/TryCompile/CMakeLists.txt, + Tests/Tutorial/Step1/CMakeLists.txt, + Tests/Tutorial/Step2/CMakeLists.txt, + Tests/Tutorial/Step3/CMakeLists.txt, + Tests/Tutorial/Step4/CMakeLists.txt, + Tests/Tutorial/Step5/CMakeLists.txt, + Tests/Tutorial/Step6/CMakeLists.txt, + Tests/Tutorial/Step7/CMakeLists.txt, Tests/UseWX/CMakeLists.txt, + Tests/VSExternalInclude/CMakeLists.txt, + Tests/Wrapping/CMakeLists.txt, Tests/X11/CMakeLists.txt: ENH: + merge in from main tree + +2008-03-25 14:37 martink + + * Tests/ExternalOBJ/CMakeLists.txt: BUG: make test more robust + +2008-03-25 14:15 martink + + * Tests/ExternalOBJ/CMakeLists.txt: BUG: add debugging into to + check out a problem + +2008-03-25 11:26 martink + + * Tests/: Assembler/CMakeLists.txt, BuildDepends/CMakeLists.txt, + BundleTest/CMakeLists.txt, COnly/CMakeLists.txt, + CTestTest/CMakeLists.txt, CTestTest2/CMakeLists.txt, + CommandLineTest/CMakeLists.txt, ConvLibrary/CMakeLists.txt, + CustComDepend/CMakeLists.txt, CustomCommand/CMakeLists.txt, + CustomCommandWorkingDirectory/CMakeLists.txt, + Dependency/CMakeLists.txt, DocTest/CMakeLists.txt, + ExportImport/CMakeLists.txt, ExportImport/Export/CMakeLists.txt, + ExportImport/Import/CMakeLists.txt, ExternalOBJ/CMakeLists.txt, + ExternalOBJ/Object/CMakeLists.txt, + FindPackageTest/CMakeLists.txt, Fortran/CMakeLists.txt, + Framework/CMakeLists.txt, FunctionTest/CMakeLists.txt, + Java/CMakeLists.txt, Jump/CMakeLists.txt, + LoadCommand/CMakeLists.txt, LoadCommandOneConfig/CMakeLists.txt, + LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + MacroTest/CMakeLists.txt, MakeClean/CMakeLists.txt, + MathTest/CMakeLists.txt, NewlineArgs/CMakeLists.txt, + OutOfSource/CMakeLists.txt, Plugin/CMakeLists.txt, + PrecompiledHeader/CMakeLists.txt, Properties/CMakeLists.txt, + ReturnTest/CMakeLists.txt, RuntimePath/CMakeLists.txt, + SameName/CMakeLists.txt, SetLang/CMakeLists.txt, + SimpleExclude/CMakeLists.txt, SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt, SourceGroups/CMakeLists.txt, + StringFileTest/CMakeLists.txt, SubDir/CMakeLists.txt, + SubDir/Examples/CMakeLists.txt, + SubDir/Examples/example1/CMakeLists.txt, + SubDirSpaces/CMakeLists.txt, SubDirSpaces/Some + Examples/CMakeLists.txt, SubDirSpaces/Some + Examples/example1/CMakeLists.txt, SubProject/CMakeLists.txt, + SwigTest/CMakeLists.txt, SystemInformation/CMakeLists.txt, + TarTest/CMakeLists.txt, TargetName/CMakeLists.txt, + TestDriver/CMakeLists.txt, Testing/CMakeLists.txt, + TryCompile/CMakeLists.txt, Tutorial/Step1/CMakeLists.txt, + Tutorial/Step2/CMakeLists.txt, Tutorial/Step3/CMakeLists.txt, + Tutorial/Step4/CMakeLists.txt, Tutorial/Step5/CMakeLists.txt, + Tutorial/Step6/CMakeLists.txt, Tutorial/Step7/CMakeLists.txt, + UseWX/CMakeLists.txt, VSExternalInclude/CMakeLists.txt, + Wrapping/CMakeLists.txt, X11/CMakeLists.txt: ENH: preclean some + warnings + +2008-03-25 10:11 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix for watcom + can't use phony + +2008-03-24 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-24 18:23 hoffman + + * CMakeLists.txt, Modules/FindBLAS.cmake, Modules/FindKDE4.cmake, + Modules/FindLAPACK.cmake, Modules/FindMPI.cmake, + Modules/FindQt4.cmake, Modules/FindSubversion.cmake, + Source/cmCMakeMinimumRequired.cxx, + Source/cmCMakePolicyCommand.cxx, + Source/cmComputeLinkInformation.cxx, Source/cmCoreTryCompile.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmIfCommand.cxx, Source/cmIfCommand.h, + Source/cmListFileCache.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, Source/cmPolicies.cxx, + Source/cmake.cxx, Source/cmake.h, + Source/CTest/cmCTestBuildHandler.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/Preprocess/CMakeLists.txt: ENH: merge in from CVS + +2008-03-24 15:41 hoffman + + * Modules/FindMPI.cmake: ENH: remove use of undefined cdr + +2008-03-24 15:40 hoffman + + * Modules/FindQt4.cmake: ENH: fix if + +2008-03-24 11:49 alin.elena + + * Modules/: FindBLAS.cmake, FindLAPACK.cmake: ENH: + FindBLAS.cmake&FindLAPACK updated to support intel mkl 10 + +2008-03-24 10:56 king + + * Source/: cmCMakeMinimumRequired.cxx, cmCMakePolicyCommand.cxx, + cmPolicies.cxx: ENH: Cleanup policy version interface presented + to user. + + - In cmake_minimum_required do not set policy version if + current + CMake is too old + - In cmPolicies::ApplyPolicyVersion report error if version is + too + new or cannot be parsed + +2008-03-24 10:26 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: add PHONY targets + +2008-03-23 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-22 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-22 10:24 hoffman + + * Source/: cmake.h, cmake.cxx: ENH: make sure -Wno-dev sticks so + make rebuild_cache will work + +2008-03-21 23:58 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-20 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-20 21:11 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h, cmPolicies.cxx: ENH: Yet another + attempt at warning for CMP0003. + + - Give example code to avoid the warning + - Make explanation more consise + - Explicitly state this is for compatibility + - Issue the warning for at most one target + +2008-03-20 18:25 king + + * Source/cmIfCommand.cxx, Source/cmIfCommand.h, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: Add "if(POLICY + policy-id)" option for IF command. + + - This will help projects support multiple CMake versions. + - In order to set a policy when using a newer CMake but still + working with an older CMake one may write + if(POLICY CMP1234) + cmake_policy(SET CMP1234 NEW) + endif(POLICY CMP1234) + - Note that since CMake 2.4 does not have if(POLICY) supporting + it will also require using "if(COMMAND cmake_policy)" + +2008-03-20 18:25 king + + * Tests/: MakeClean/ToClean/CMakeLists.txt, + Preprocess/CMakeLists.txt: BUG: Convert cmake_policy(VERSION) to + cmake_minimum_required(VERSION) in + Tests/MakeClean/ToClean/CMakeLists.txt and + Tests/Preprocess/CMakeLists.txt. CMP0000 now requires the + cmake_minimum_required command. + +2008-03-20 11:44 david.cole + + * Modules/FindSubversion.cmake: BUG: Remove reference to + PROJECT_SOURCE_DIR so that the Subversion_WC_INFO macro may be + called from a ctest or cmake script. + +2008-03-20 10:46 martink + + * Source/cmListFileCache.cxx: ENH: tiny performance improvement + +2008-03-20 10:40 martink + + * Source/cmListFileCache.cxx: ENH: small simple projects do not + need to specify cmake minimum required + +2008-03-20 10:11 king + + * Source/cmake.cxx: ENH: Clarify end of (dev) warnings to + explicitly state they are meant for project developers. + +2008-03-19 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-19 16:14 clinton + + * Modules/FindQt4.cmake: + BUG: Fix issue when Qt from Linux distro is used and glib + and dbus development packages aren't installed. + +2008-03-19 15:44 king + + * Source/cmCoreTryCompile.cxx: BUG: Change generated try-compile + projects to use cmake_minimum_required instead of cmake_policy to + set the version now that CMP0000 requires it. + +2008-03-19 15:27 clinton + + * Modules/FindQt4.cmake: BUG: Don't clear output strings before + using. + +2008-03-19 15:18 king + + * Source/: cmListFileCache.cxx, cmPolicies.cxx: ENH: Improve + warning about specifying a cmake version + + - Update policy CMP0000 to require use of the command + cmake_minimum_required and not cmake_policy + so there is only one way to avoid it. + - Explicitly specify the line users should add. + - Reference policy CMP0000 only at the end. + - Fix policy CMP0000 documentation to not suggest + use of the cmake_policy command. + +2008-03-19 14:32 king + + * Source/cmComputeLinkInformation.cxx: ENH: Clarify warning for + policy CMP0003 further. + +2008-03-19 11:18 david.cole + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: Missing a linker + crashed error matching string. + +2008-03-19 09:14 hoffman + + * Source/cmComputeLinkInformation.cxx: ENH: do not warn about + frameworks as they are not affected by -L anyway + +2008-03-18 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-18 21:22 hoffman + + * CMakeLists.txt: ENH: forgot to check this in, need to change the + version in CVS + +2008-03-18 18:37 clinton + + * Modules/FindQt4.cmake: + STYLE: Improve documentation by expanding on how UseQt4.cmake + fits in. + +2008-03-18 17:54 alex + + * Modules/FindQt4.cmake: STYLE: fix documentation again: + QT_LIBRARIES exists if you use Qt4 via UseQt4.cmake + + Alex + +2008-03-18 17:32 hoffman + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h: ENH: try to reduce the number of + CMP0003 warnings that people see. Only report them for unique + sets of libraries with no full path. Also add a message + explaining the course of action that should be taken + +2008-03-18 17:26 alex + + * Modules/FindQt4.cmake: STYLE: fix documentation, QT_LIBRARIES + doesn't exist, and also didn't exist in cmake 2.4.3, the first + stable cmake 2.4.x release + + Alex + +2008-03-18 16:30 clinton + + * Modules/FindQt4.cmake: + ENH: Satisfy QtDBus dependencies for builds with static Qt. + Finish fix for #6607. + +2008-03-18 11:51 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: exclude borland + make as well + +2008-03-18 11:28 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: turn off extra + rules for nmake and wmake + +2008-03-18 11:11 hoffman + + * CMakeLists.txt: ENH: set the version on 2.6 + +2008-03-18 10:23 hoffman + + * CMakeLists.txt, Modules/CTest.cmake, Modules/FindKDE4.cmake, + Modules/FindPackageHandleStandardArgs.cmake, + Modules/FindPackageMessage.cmake, Modules/FindQt4.cmake, + Modules/FindX11.cmake, Modules/UseQt4.cmake, + Modules/VTKCompatibility.cmake, + Modules/Platform/Linux-GNU-Fortran.cmake, + Modules/Platform/Linux-ifort.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmCMakeMinimumRequired.h, Source/cmCMakePolicyCommand.h, + Source/cmComputeLinkDepends.cxx, Source/cmComputeLinkDepends.h, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, Source/cmExportFileGenerator.cxx, + Source/cmListCommand.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, Source/cmMakefile.cxx, + Source/cmPolicies.cxx, Source/cmPolicies.h, + Source/cmSourceFileLocation.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Source/QtDialog/CMakeSetup.cxx, + Source/QtDialog/CMakeSetupDialog.cxx, + Source/kwsys/CMakeLists.txt, Source/kwsys/kwsysDateStamp.cmake, + Utilities/cmcurl/CMakeLists.txt: ENH: move head to branch + +2008-03-18 10:02 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: try to improve + make speed by getting rid of some implicit rules that were still + around. + +2008-03-17 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-17 20:30 king + + * Source/cmCMakePolicyCommand.h: ENH: Improve documentation of + cmake_policy command. + + - Add a paragraph introducing the policy mechanism + - Explicitly introduce the CMP, OLD, and NEW notation + - Note that setting policies by CMake version is preferred + - Fix SET signature to use CMP notation + - Add more details about the policy stack + +2008-03-17 16:22 king + + * CMakeLists.txt, Source/kwsys/CMakeLists.txt, + Utilities/cmcurl/CMakeLists.txt: ENH: Set CMake Policy CMP0003 to + NEW behavior to build without warnings with the upcoming CMake + 2.6 release. + +2008-03-17 14:53 clinton + + * Modules/FindQt4.cmake: + ENH: For Mac OS X, remove QuickTime link for Qt 4.3+ and add + AppKit link for Qt 4.2+. + +2008-03-17 11:10 hoffman + + * Modules/FindPackageMessage.cmake: file FindPackageMessage.cmake + was added on branch CMake-2-6 on 2008-03-18 14:23:52 +0000 + +2008-03-17 11:10 king + + * Modules/: FindPackageHandleStandardArgs.cmake, + FindPackageMessage.cmake, FindQt4.cmake, FindX11.cmake: ENH: + Added FindPackageMessage module + + - Defines FIND_PACKAGE_MESSAGE function to help display + find result messages only once + - Added use of it to FindPackageHandleStandardArgs + - Added use of it to FindQt4, and FindX11 + - This cleans up repeated messages in big projects + +2008-03-17 11:10 king + + * Modules/CTest.cmake: ENH: Avoid printing message about unknown + repository type repeatedly in CTest. + +2008-03-17 08:55 king + + * Modules/Platform/: Linux-GNU-Fortran.cmake, Linux-ifort.cmake: + ENH: Patch from Maik to add per-configuration default flags to + GCC and Intel Fortran compilers on Linux. + +2008-03-16 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-15 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-15 20:10 david.cole + + * Modules/CMakeJavaInformation.cmake: BUG: Go back to using "." so + the Java test passes on the nightly nmake dashboards again. Still + need a solution that works with both nmake and Visual Studio + builds. + +2008-03-15 10:00 king + + * Source/cmComputeLinkInformation.cxx: COMP: Fix unreachable code + warning for break after return in switch in CMP0003 impl. + +2008-03-15 10:00 king + + * Source/: cmTarget.cxx, cmSourceFileLocation.cxx: STYLE: Fix + line-too-long for new INTERNAL_ERROR messages. + +2008-03-14 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-14 18:16 alex + + * Modules/FindKDE4.cmake: ENH: preparations for cross compiling + KDE4 + + Alex + +2008-03-14 16:39 barre + + * Source/cmListCommand.cxx: STYLE: yeah yeah. + +2008-03-14 15:18 clinton + + * Source/QtDialog/CMakeSetup.cxx: + ENH: Prevent loading standard qt plugins at runtime (which we + dont' care about). This can cause problems if a Mac bundle + doesn't contain the plugins. + +2008-03-14 14:28 clinton + + * Modules/FindQt4.cmake: BUG: Fix typo to find QAssistantClient + header. + +2008-03-14 14:21 king + + * Source/cmComputeLinkInformation.cxx: ENH: Improve CMP0003 to + provide more compatibility + + - Targets built in the tree now add compatibility paths too + - The warning message's first list includes at most one item + for each unique compatibility path + - Clarified error message further + +2008-03-14 13:29 clinton + + * Modules/FindQt4.cmake: + ENH: Satisfy QtNetwork and QtOpenGL dependencies for builds with + static Qt. Partial fix for #6607. + +2008-03-14 13:16 clinton + + * Modules/: FindQt4.cmake, UseQt4.cmake: + ENH: Automatically add dependent modules. For example, if + QT_USE_QTXMLPATTERNS is on, QT_USE_QTNETWORK is turned on. + The equivalent happens in a qmake .pro file when QT += + xmlpatterns is specified. + +2008-03-14 12:11 clinton + + * Modules/FindQt4.cmake: + ENH: Support static Qt 4.4 builds using QtHelp module. + +2008-03-13 19:12 clinton + + * Modules/: FindQt4.cmake, UseQt4.cmake: + ENH: Add support for Qt 4.4's phonon module. Add new Qt + 4.4 modules in UseQt4.cmake + +2008-03-13 17:38 king + + * Source/cmMakefile.cxx: BUG: Fix impl of CMP0005 regex to match + value-less definitions. + +2008-03-13 17:32 king + + * Source/: cmCMakeMinimumRequired.h, cmPolicies.cxx: ENH: Clarify + documentation of policy CMP0000 and its relationship with + cmake_minimum_required. + +2008-03-13 17:11 king + + * Source/: cmMakefile.cxx, cmPolicies.cxx, cmPolicies.h: ENH: Add + policy CMP0005 to decide whether add_definitions should escape + defs. + +2008-03-13 17:04 king + + * Source/cmExportFileGenerator.cxx: ENH: Add cmake_policy + push/version/pop to import/export files. + +2008-03-13 16:42 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: fix c flags for 2003 free + command line tools + +2008-03-13 16:35 king + + * Source/: cmComputeLinkDepends.cxx, cmComputeLinkDepends.h, + cmPolicies.cxx, cmPolicies.h, cmTarget.cxx, cmTarget.h: ENH: Add + policy CMP_0004 to require library names to have no leading or + trailing whitespace. Replace previous check of + CMAKE_BACKWARDS_COMPATIBILITY against version 2.4 with the + policy. + +2008-03-13 16:23 king + + * Modules/VTKCompatibility.cmake, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, Source/cmPolicies.cxx, + Source/cmPolicies.h, Source/cmTarget.cxx, Source/cmTarget.h: ENH: + Convert CMAKE_LINK_OLD_PATHS to policy CMP0003. + + - Policy is WARN by default so projects will build + as they did in 2.4 without user intervention + - Remove CMAKE_LINK_OLD_PATHS variable since it was + never in a release and the policy supercedes it + - Report target creation backtrace in warning message + since policy should be set by that point + +2008-03-13 16:21 hoffman + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: make menu item match + -Wno-dev command line + +2008-03-13 16:13 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: Preserve white spaces + when printing messages. + +2008-03-13 15:34 hoffman + + * Source/cmake.cxx: ENH: move the clear to before things are added + to the maps + +2008-03-13 15:29 clinton + + * Modules/FindQt4.cmake: + ENH: Add support for new modules in Qt 4.4. Fixes #6316. + Simplify and clarify some documentation. + + BUG: Fix order of include paths (from KDE's FindQt4) Fix + find of Designer components debug library on Windows. + +2008-03-13 15:06 king + + * Source/cmake.cxx: ENH: Make (dev) warnings show note about + -Wno-dev option. Fix -Wdev and -Wno-dev options to not be + mistaken for the source directory specification. + +2008-03-13 15:03 david.cole + + * Modules/CMakeJavaInformation.cmake: COMP: Conditionalize the last + change so that the fix only applies to WIN32. Leave it the way it + was elsewhere, the new way does not work on the Mac continuous + dashboard... + +2008-03-13 15:01 king + + * Source/cmPolicies.cxx: ENH: Reduce whitespace in policy + warning/error messages. + +2008-03-13 14:29 david.cole + + * Modules/CMakeJavaInformation.cmake: BUG: Fix the Java test for + Visual Studio builds. Before this, it had been trying to include + "BuildLog.htm" in the .jar file because it was using "." as the + list of files to include in the .jar file. Use "*.class" instead + of "." to prevent this silliness. + +2008-03-13 14:13 king + + * Source/cmMakefile.cxx: ENH: Improve error message when invalid + policy is given. + +2008-03-13 13:52 king + + * Source/cmSetCommand.cxx: ENH: Simplify error message for invalid + set(... CACHE) calls to make it look nicer with new message + format. + +2008-03-13 13:48 king + + * Source/: cmListFileCache.cxx, cmListFileCache.h, cmMakefile.cxx, + cmMakefile.h, cmTarget.cxx, cmTarget.h, cmake.cxx, cmake.h: ENH: + Improve new error/warning message generation + + - Add cmListFileBacktrace to record stack traces + - Move main IssueMessage method to the cmake class instance + (make the backtrace an explicit argument) + - Change cmMakefile::IssueMessage to construct a backtrace + and call the cmake instance version + - Record a backtrace at the point a target is created + (useful later for messages issued by generators) + +2008-03-13 11:38 martink + + * Source/: cmCMakePolicyCommand.h, cmListFileCache.cxx, + cmLocalGenerator.cxx, cmMakefile.cxx, cmPolicies.cxx, + cmPolicies.h, cmake.cxx: ENH: change CMP_ to CMP + +2008-03-13 10:56 hoffman + + * Modules/FindGLUT.cmake: BUG: fix bug 6594 look for glut in more + places on windows + +2008-03-13 09:28 barre + + * Source/cmFileCommand.cxx: BUG: the directory the FILE DOWNLOAD + command is writing to might not exist. + +2008-03-12 23:59 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-12 21:54 hoffman + + * CMakeCPackOptions.cmake.in, + Source/CPack/cmCPackCygwinBinaryGenerator.cxx, + Source/CPack/cmCPackCygwinSourceGenerator.cxx, + Source/CPack/cmCPackGenerator.cxx: ENH: fix crash in cpack when + CPACK_CYGWIN_PATCH_NUMBER not specified + +2008-03-12 21:06 hoffman + + * Source/: cmLocalUnixMakefileGenerator3.cxx, cmMakefile.cxx, + cmSourceFileLocation.cxx, cmTarget.cxx, cmake.h: ENH: remove + abort calls and replace with an IssueMessage INTERANL_ERROR, + better to not crash on the end user. + +2008-03-12 17:02 hoffman + + * Source/: cmake.cxx, cmake.h: ENH: make sure properties are re-set + on each configure + +2008-03-12 17:02 barre + + * Source/cmListCommand.cxx, Source/cmListCommand.h, + Tests/CMakeTests/ListTest.cmake.in: ENH: add REMOVE_DUPLICATES + subcommand to LIST command (and test). Remove duplicates from a + list (keep the ordering) + +2008-03-12 14:37 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix some bad + changes in progress calc + +2008-03-12 09:25 hoffman + + * Source/cmMakefile.cxx: STYLE: fix line len + +2008-03-12 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-11 23:01 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: fix dumb MS warning + about BOOL and performance with more code + +2008-03-11 22:52 hoffman + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: remove iostream, not + used + +2008-03-11 22:50 hoffman + + * Source/: cmake.cxx, cmake.h, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h, + MFCDialog/resource.h, QtDialog/CMakeSetupDialog.cxx, + QtDialog/CMakeSetupDialog.h, QtDialog/QCMake.cxx, + QtDialog/QCMake.h: ENH: add ability to suppress dev warnings to + gui code + +2008-03-11 17:53 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fix subtle bug + that prevented Makefile generators from rescanning dependencies + when a new source file is added but no other sources are touched. + +2008-03-11 17:37 king + + * Source/kwsys/SystemInformation.hxx.in: COMP: Fix shared lib build + on windows for KWSys's SystemInformation by adding export macro. + +2008-03-11 17:27 hoffman + + * Source/QtDialog/: CMake.desktop, CMakeLists.txt, cmakecache.xml: + ENH: add KDE desktop stuff + +2008-03-11 17:27 hoffman + + * Source/cmMakefile.cxx: ENH: fix warning message a bit + +2008-03-11 17:25 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, cmake.cxx, cmake.h: + BUG: Fixes to VS8/VS9 project regeneration rules + + - ZERO_CHECK should check all stamps in case + of parallel build (fixes complex test failure) + - ZERO_CHECK should not appear when + CMAKE_SUPPRESS_REGENERATION is on (fixes bug 6490) + +2008-03-11 16:02 hoffman + + * Source/: cmake.h, cmakemain.cxx: ENH: fix -Wno-dev for ccmake + +2008-03-11 15:17 hoffman + + * Source/: cmMakefile.cxx, cmake.cxx, cmakemain.cxx: ENH: add a way + to suppress the new policy warnings, still need ccmake and gui's + +2008-03-11 10:54 barre + + * Docs/cmake-mode.el: ENH: add simple function to convert all CMake + commands to lowercase + +2008-03-11 10:29 hoffman + + * Source/: cmListFileCache.cxx, cmMakefile.cxx, cmMakefile.h, + cmPolicies.cxx, cmake.h: ENH: add enum to IssueMessage + +2008-03-11 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-10 18:48 barre + + * Modules/: FindCVS.cmake: ENH: for some reasons there was never a + FindCVS module? + +2008-03-10 15:41 king + + * Source/cmMakefile.cxx: ENH: Enforce matching PUSH/POP calls for + cmake_policy. + +2008-03-10 15:40 king + + * Source/cmMakefile.cxx: ENH: Add directory-level context + information to error/warning messages when no call stack is + present. + +2008-03-10 13:26 alex + + * Modules/: FindLua50.cmake, FindLua51.cmake: ENH: use the standard + find_package_handle_standard_args() for lua 5.0 and 5.1 + + Alex + +2008-03-10 09:32 king + + * Modules/: CMakeCCompilerId.c.in, CMakeCXXCompilerId.cpp.in, + CMakePlatformId.h.in: ENH: Make compiler id detection more robust + + - Split INFO strings in source into multiple pieces + to make sure assembly or other listings produced + by the compiler are never matched by the regex + - Store INFO strings via pointer instead of array + to convince some compilers to store the string + literally in the binary + - This should help make it work for sdcc 2.8.0 RC1 + +2008-03-10 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-09 19:20 alex + + * Modules/CMakeDetermineCompilerId.cmake: BUG: make compiler id + detection (almost) work again with sdcc 2.8.0 RC1, mail sent to + Brad for the remaining issue don't match INFO:compiler[" + COMPILER_ID "] which appears in the assembler file generated from + the C file by sdcc, but make sure the first character after the [ + is no double quote + + Alex + +2008-03-09 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-08 09:50 king + + * Source/cmIncludeDirectoryCommand.cxx: BUG: Fix + include_directories command to produce an immediately whether or + not 2.4 compatibility is enabled. CMake 2.4 already produced an + error, just not immediately. + +2008-03-08 09:27 king + + * Source/cmIncludeCommand.cxx: ENH: Improve formatting of include + command error message. + +2008-03-08 09:21 king + + * Source/cmMakefile.cxx: COMP: Avoid using operator-> on + const_reverse_iterator to help old compilers. + +2008-03-08 09:13 king + + * Source/: cmMakefile.cxx, cmPolicies.cxx: ENH: Cleanup policy + generic documentation. Cleanup some policy error/warning + messages. + +2008-03-08 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-07 19:58 hoffman + + * Modules/FindMPI.cmake: ENH: add new version of FindMPI, fix it to + work with MPICH2 on windows + +2008-03-07 17:05 king + + * Source/cmAddCustomTargetCommand.cxx: COMP: Fix unused parameter + warning in cmAddCustomTargetCommand. + +2008-03-07 16:36 king + + * Source/: cmMakefile.cxx, cmPolicies.cxx, cmPolicies.h, cmake.cxx: + ENH: Finish creating, documenting, and enforcing policy CMP_0002. + +2008-03-07 16:32 hoffman + + * Source/CursesDialog/: cmCursesCacheEntryComposite.cxx, + cmCursesMainForm.cxx: ENH: fix it for working with an empty cache + +2008-03-07 16:26 king + + * bootstrap: COMP: Fix bootstrap build after using + cmDocumentationFormatterText in cmMakefile. + +2008-03-07 16:01 king + + * Source/: cmDocumentationFormatterText.cxx, cmMakefile.cxx: ENH: + In cmMakefile::IssueMessage use cmDocumentationFormatterText to + format the message nicely. + +2008-03-07 15:30 king + + * Source/cmAddCustomTargetCommand.cxx, + Source/cmCMakeMinimumRequired.h, Source/cmCMakePolicyCommand.h, + Source/cmConfigureFileCommand.cxx, Source/cmFindBase.cxx, + Source/cmListFileCache.cxx, Source/cmLocalGenerator.cxx, + Source/cmMakefile.cxx, Source/cmPolicies.cxx, + Source/cmPolicies.h, Source/cmake.cxx, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/Preprocess/CMakeLists.txt: ENH: Improve handling of + old-style compatibility. + + - Remove CMP_0001 (no slash in target name) and restore + old CMAKE_BACKWARDS_COMPATIBILITY check for it + - Replace all checks of CMAKE_BACKWARDS_COMPATIBILITY + with cmLocalGenerator::NeedBackwardsCompatibility calls + - Create new CMP_0001 to determine whether or not + CMAKE_BACKWARDS_COMPATIBILITY is used. + (old = use, new = ignore) + - Show CMAKE_BACKWARDS_COMPATIBILITY in cache only when + CMP_0001 is set to OLD or WARN + - Update documentation of cmake_policy and + cmake_minimum_required + to indicate their relationship and the 2.4 version boundary + - When no cmake policy version is set in top level makefile + implicitly call cmake_policy(VERSION 2.4) which restores + CMAKE_BACKWARDS_COMPATIBILITY and other 2.4 compatibility + - Fix tests MakeClean and Preprocess to call + cmake_policy(VERSION 2.6) because they depend on new policies + +2008-03-07 14:03 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + dashmacmini2_release.cmake, magrathea_release.cmake, + release_cmake.sh.in: ENH: qtgui stuff + +2008-03-07 11:50 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: Use fixed pitch font + in output window. + +2008-03-07 11:43 martink + + * Source/: cmCMakeMinimumRequired.cxx, cmCacheManager.h, + cmListFileCache.cxx, cmPolicies.cxx, cmake.cxx: ENH: clean up + some policy stuff and interactions with + CMAKE_BACKWARDS_COMPATIBILITY and CMAKE_MINIMUM_REQUIRED + +2008-03-07 11:06 hoffman + + * Source/CPack/: cmCPackCygwinBinaryGenerator.cxx, + cmCPackGenerator.cxx: ENH: fix crash in cygwin package stuff + +2008-03-07 09:41 martink + + * Source/cmListFileCache.cxx: STYLE: fix line length issue + +2008-03-07 09:09 king + + * Source/cmMakefile.cxx: BUG: Do not produce whitespace-only lines + when indenting messages in new error/warning format. + +2008-03-07 08:53 king + + * Source/cmCoreTryCompile.cxx: BUG: Generated try-compile + CMakeLists.txt file should call cmake_policy with the current + version of CMake, not just 2.6. + +2008-03-07 08:40 king + + * Source/: cmAddCustomTargetCommand.cxx, cmExecutionStatus.h, + cmFunctionCommand.cxx, cmListFileCache.cxx, cmListFileCache.h, + cmMacroCommand.cxx, cmMakefile.cxx, cmMakefile.h, cmPolicies.cxx: + ENH: New format for warning and error messages + + - Add cmMakefile methods IssueError and IssueWarning + - Maintain an explicit call stack in cmMakefile + - Include context/call-stack info in messages + - Nested errors now unwind the call stack + - Use new mechanism for policy warnings and errors + - Improve policy error message + - Include cmExecutionStatus pointer in call stack + so that errors deeper in the C++ stack under + a command invocation will become errors for the + command + +2008-03-07 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-06 16:03 martink + + * Source/cmListFileCache.cxx: BUG: keep CMAKE_BACKWARDS_COMP as + internal + +2008-03-06 15:51 martink + + * Source/cmListFileCache.cxx: BUG: make default + CMAKE_BACKWARDS_COMPATIBILITY 2.5 + +2008-03-06 15:20 hoffman + + * Source/cmCoreTryCompile.cxx: ENH: make sure policy is set in + generated cmakelist files + +2008-03-06 15:08 martink + + * Source/: cmConfigureFileCommand.cxx, cmListFileCache.cxx, + cmPolicies.cxx: BUG: change in handling of cmake_minimum_required + +2008-03-06 11:34 hoffman + + * Source/cmDocumentationFormatterHTML.cxx: STYLE: fix line length + +2008-03-06 10:57 martink + + * Source/: cmCMakeMinimumRequired.cxx, cmConfigureFileCommand.cxx, + cmListFileCache.cxx, cmListFileCache.h, cmMakefile.cxx, + cmPolicies.cxx: BUG: change the handling of + CMAKE_MINIMUM_REQUIRED and BACKWARDS_COMPATIBILITY and extend the + documentaiton quite a bit + +2008-03-06 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-05 18:42 king + + * Source/cmPolicies.cxx: ENH: Fix policy warning message to not + give wrong code as example. + +2008-03-05 18:21 king + + * Source/: cmCMakePolicyCommand.cxx, cmCMakePolicyCommand.h, + cmMakefile.cxx, cmMakefile.h: ENH: Improve cmake_policy command + signature + + - Replace NEW and OLD modes with a SET mode for clarity + - Enforce VERSION argument validity (major.minor[.patch]) + +2008-03-05 18:20 king + + * Source/cmPolicies.cxx: BUG: Require policy version to specify at + least major.minor. Do not store CMAKE_BACKWARDS_COMPATIBILITY + with an invalid version value. + +2008-03-05 17:26 king + + * Source/cmPolicies.cxx: BUG: Fix parsing of policy version number + in cmPolicies. + +2008-03-05 15:55 king + + * Modules/CMakeFortranCompiler.cmake.in: ENH: Patch from Maik to + add more fortran extensions. + +2008-03-05 12:53 clinton + + * Modules/FindQt4.cmake: + ENH: Allow users to recover from trying to use an improperly + installed Qt without removing their cache, fixing their + environment and trying again. + +2008-03-05 11:41 martink + + * Source/: cmConfigureFileCommand.cxx, cmMakefile.cxx, + cmPolicies.cxx, cmPolicies.h: BUG: some fixes, still a few to go + +2008-03-05 11:05 hoffman + + * Source/: cmDocumentation.cxx, cmDocumentationFormatter.h, + cmDocumentationFormatterHTML.cxx, cmDocumentationFormatterHTML.h: + ENH: add master index into html full help + +2008-03-05 03:11 ewing + + * Modules/FindOpenAL.cmake: BUG: Fixed PATH_SUFFIXES copy/paste bug + (0006201) + +2008-03-05 00:00 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-04 18:57 king + + * Source/cmMakefile.cxx: BUG: Make sure at least one policy stack + entry is created for every cmMakefile instance. + +2008-03-04 18:42 king + + * Source/: cmCMakeMinimumRequired.cxx, cmCMakeMinimumRequired.h: + ENH: Make CMAKE_MINIMUM_REQUIRED command FATAL_ERROR option + implicit (always on). Accept but ignore the existing option. + +2008-03-04 18:41 king + + * Source/: cmGlobalGenerator.cxx, cmIncludeDirectoryCommand.cxx: + BUG: Fix crash when CMAKE_BACKWARDS_COMPATIBILITY is not set. + +2008-03-04 14:51 martink + + * Source/: cmCMakeMinimumRequired.cxx, cmPolicies.cxx, cmake.cxx: + ENH: more policy changes + +2008-03-04 13:51 king + + * Source/cmTarget.cxx: BUG: Fix memory leak when cmTarget instances + are assigned. We really need to get rid of global targets and + their associated assignments. + +2008-03-04 13:34 hoffman + + * Source/CTest/cmCTestSubmitHandler.cxx: STYLE: fix line len + +2008-03-04 09:40 king + + * Source/cmDocumentVariables.cxx: BUG: Fix typo in documentation of + LIBRARY_OUTPUT_PATH. + +2008-03-04 09:16 martink + + * Source/: cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationFormatter.h, cmPolicies.cxx, cmPolicies.h, + cmake.cxx, cmake.h, cmakemain.cxx: ENH: add --help-policies and + --help-policy command line options + +2008-03-04 09:10 martink + + * CMakeLists.txt: BUG: undo accidental commit + +2008-03-04 08:18 david.cole + + * Tests/CMakeTests/CMakeLists.txt, + Tests/CMakeTests/GetPrerequisitesTest.cmake.in, + Modules/GetPrerequisites.cmake: ENH: Add script + GetPrerequisites.cmake to help analyze what shared libraries + executable files depend on. Primary uses are to determine what + shared libraries should be copied into Mac OSX bundle + applications to create standalone bundles apps and to determine + what shared library files need to be installed for an executable + to run on any platform. Requires native platform tools dumpbin, + otool and ldd to generate results. + +2008-03-04 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-03 20:31 king + + * Modules/UsewxWidgets.cmake: STYLE: Remove trailing whitespace. + +2008-03-03 20:24 king + + * Modules/CMakeASMInformation.cmake: STYLE: Remove trailing + whitespace. + +2008-03-03 15:56 king + + * Modules/Use_wxWindows.cmake: STYLE: Remove trailing whitespace. + +2008-03-03 11:57 king + + * Modules/VTKCompatibility.cmake: STYLE: Remove trailing + whitespace. + +2008-03-03 11:28 hoffman + + * Source/cmAddCustomTargetCommand.cxx: ENH: fix ICE with gcc in + dash8 + +2008-03-03 11:18 king + + * Modules/CMakeForceCompiler.cmake: STYLE: Fixed docs of new + CMakeForceCompiler + +2008-03-03 11:16 king + + * Modules/CMakeForceCompiler.cmake: ENH: Restore + CMAKE_FORCE_C_COMPILER and CMAKE_FORCE_CXX_COMPILER macros in + CMakeForceCompiler module. + +2008-03-03 08:48 king + + * Source/cmELF.cxx: COMP: Fix cmELF to build when ET_LOOS, ET_HIOS, + ET_LOPROC, ET_HIPROC may not be defined. + +2008-03-03 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-02 16:48 king + + * Source/cmInstallTargetGenerator.cxx: ENH: During installation do + not use builtin chrpath if the rpath will not change. + +2008-03-02 16:37 king + + * Source/cmTarget.cxx: ENH: Allow users to work around problems + with the builtin chrpath by setting CMAKE_NO_BUILTIN_CHRPATH. + +2008-03-02 16:31 king + + * Source/cmELF.cxx: BUG: Fix bug introduced by workaround to + warning. + +2008-03-02 16:19 king + + * Source/: cmELF.cxx, cmELF.h: BUG: A few more corrections for + cmELF + + - Add os-specific and processor-specific file types + - Add more error strings for invalid files. + - Byte order of header fields does not always match encoding + +2008-03-02 16:19 king + + * Source/cmSystemTools.cxx: ENH: In cmSystemTools::ChangeRPath + check for the RUNPATH if RPATH does not exist. + +2008-03-02 14:35 king + + * Source/: cmComputeLinkInformation.cxx, cmFileCommand.cxx, + cmInstallTargetGenerator.cxx, cmLocalGenerator.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx: ENH: Cleanup + builtin chrpath support + + - Move computation of extended build-tree rpath + to cmComputeLinkInformation + - Only enable the extended build-tree rpath if + the target will be installed + - Generalize the interface of file(CHRPATH) + - When changing the rpath on installation only + replace the part generated by CMake because + the native tools (ex SunCC on Linux) might have + added their own part to the rpath + +2008-03-02 14:35 king + + * CMakeLists.txt: ENH: Simplify tests for building CMake itself + with rpath support now that 2.4 is required to build. + +2008-03-02 09:12 martink + + * Source/cmPolicies.h: COMP: possible fix for VS6, but probably + not, probably need tomake it internal + +2008-03-02 09:11 martink + + * Source/cmMakefile.cxx: COMP: fix warning + +2008-03-02 09:03 martink + + * Source/: cmPolicies.cxx, cmPolicies.h: ENH: revert dumb change + +2008-03-02 08:36 martink + + * Source/: cmAddCustomTargetCommand.cxx, cmPolicies.cxx, + cmPolicies.h: COMP: fix compile errors on vs6 and a warning + +2008-03-02 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-03-01 16:21 martink + + * Source/cmMakefile.cxx: BUG: bad loop index unsigned compared to + zero + +2008-03-01 15:44 martink + + * Source/: cmAddCustomTargetCommand.cxx, cmMakefile.cxx: COMP: fix + some warnings + +2008-03-01 15:26 martink + + * Source/: cmPolicies.cxx, cmPolicies.h: STYLE: fix some line + lengths + +2008-03-01 15:20 martink + + * CMakeLists.txt, bootstrap, Source/CMakeLists.txt, + Source/cmAddCustomTargetCommand.cxx, + Source/cmBootstrapCommands.cxx, Source/cmCommand.h, + Source/cmIncludeDirectoryCommand.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmake.cxx, Source/cmake.h: ENH: add + first cut and policies still need to add the doc support + +2008-03-01 15:16 king + + * Source/cmSystemTools.cxx: COMP: Fix unused parameter warning when + cmSystemTools::ChangeRPath is built without ELF support. + +2008-03-01 13:17 king + + * Source/cmSystemTools.cxx: BUG: Fix cmSystemTools::ChangeRPath to + not complain if there is no RPATH entry in the file but the + requested new rpath is empty. + +2008-03-01 13:02 king + + * Source/cmTarget.cxx: BUG: Do not try to change the RPATH when + installing a target if CMAKE_SKIP_RPATH is on or the path does + not need to be changed. + +2008-03-01 12:51 king + + * Modules/CMakeFindBinUtils.cmake, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmInstallTargetGenerator.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmTarget.cxx, Source/cmTarget.h: ENH: Use builtin chrpath + instead of relinking ELF targets + + - Add cmSystemTools::ChangeRPath method + - Add undocumented file(CHRPATH) command + - When installing use file(CHRPATH) to change the rpath + instead of relinking + - Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils + - Remove CMAKE_USE_CHRPATH option since this should + always work + +2008-03-01 12:50 king + + * Source/: cmELF.cxx, cmELF.h: ENH: Add Size member to + cmELF::StringEntry to return the amount of space in the string + entry. + +2008-03-01 10:56 king + + * Tests/Preprocess/CMakeLists.txt: BUG: Fix typo XCode -> Xcode in + Preprocess test. + +2008-03-01 09:08 king + + * Tests/Preprocess/CMakeLists.txt: ENH: Update Preprocess test to + distinguish between the make tool or compiler tool that is at + fault for not supporting a particular character in definitions. + Make it skip the % character when the compiler is MSVC and it is + a non-nmake tool. + +2008-03-01 09:08 king + + * Modules/Platform/Windows-cl.cmake, Source/cmLocalGenerator.cxx: + BUG: Do not place $(CMAKE_COMMAND) in link scripts. + +2008-03-01 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-29 21:33 hoffman + + * Source/: cmIfCommand.cxx, cmWhileCommand.cxx: ENH: fix warnings + +2008-02-29 21:33 hoffman + + * Source/cmSetSourceFilesPropertiesCommand.h: ENH: fix docs + +2008-02-29 15:42 martink + + * Source/cmCMakePolicyCommand.cxx: ENH: just getting somethng + checked in, still work to do + +2008-02-29 15:41 martink + + * Source/cmCmakePolicyCOmmand.cxx: ENH: case + +2008-02-29 15:28 martink + + * Source/: cmCMakePolicyCommand.h, cmCmakePolicyCOmmand.cxx, + cmPolicies.cxx, cmPolicies.h: ENH: just getting somethng checked + in, still work to do + +2008-02-29 14:58 hoffman + + * Modules/DartConfiguration.tcl.in, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestSubmitHandler.h: ENH: allow cdash not to + trigger + +2008-02-29 14:36 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: add vs9 stuff, + still need msvc9 mfc + +2008-02-29 12:18 hoffman + + * Source/: cmForEachCommand.cxx, cmFunctionCommand.cxx, + cmIfCommand.cxx, cmMacroCommand.cxx, cmMakefile.cxx, + cmWhileCommand.cxx: ENH: make CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS + the default and remove the property. If any value is specified + in an endif, endforeach, endwhile, etc then make sure it matches + the start string. If no values are given then it is no longer an + error. + +2008-02-29 11:12 king + + * Source/: cmELF.cxx, cmELF.h: ENH: Make cmELF parser more general + and powerful + + - Add support to get RPATH and RUNPATH entries. + - Add support to get file offsets to strings. + - Add more DT_* tags to byte swapping. + +2008-02-29 09:15 king + + * Source/cmComputeLinkInformation.cxx: BUG: + cmComputeLinkInformation::CheckImplicitDirItem needs to extract + the filename portion of the link item to test against the library + regex. + +2008-02-29 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-28 08:43 king + + * Source/cmELF.cxx: COMP: cmELF needs to include sys/link.h to get + dynamic section structures on the Sun. + +2008-02-28 08:32 king + + * Source/cmELF.cxx: COMP: Fix warnings in cmELF. + +2008-02-28 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-27 17:10 king + + * Modules/Platform/Windows-ifort.cmake, Modules/Platform/cl.cmake, + Source/cmDocumentVariables.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h: ENH: Handle large object file + lists on some platforms + + - Use a response file when enabled by + CMAKE__USE_RESPONSE_FILE_FOR_OBJECTS + - Enable for C and CXX with cl (MSVC) + - Enable for Fortran with ifort (Intel Fortran) + +2008-02-27 16:26 king + + * Source/: CMakeLists.txt, cmConfigure.cmake.h.in, cmELF.cxx, + cmELF.h, cmSystemTools.cxx: ENH: Add ELF file parsing + + - Enabled when system provides elf.h + - Introduce cmELF class to parse ELF files + - Use in cmSystemTools::GuessLibrarySOName to really get soname + +2008-02-27 16:11 king + + * Source/kwsys/CPU.h.in: BUG: Fixed typo in previous commit of + kwsys/CPU.h.in + +2008-02-27 16:07 king + + * Source/kwsys/: CMakeLists.txt, CPU.h.in: ENH: Added CPU.h to + KWSys to identify the target CPU and its byte order. + +2008-02-27 14:31 king + + * Modules/Platform/: HP-UX.cmake, IRIX64.cmake, Linux-PGI-C.cmake, + Linux-PGI-CXX.cmake, SunOS.cmake, Windows-bcc32.cmake, gcc.cmake: + BUG: Apply patch from bug#6445. Add preprocessor definitions to + assembly and preprocessing build rules. + +2008-02-27 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-26 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-25 18:47 king + + * Modules/CMakeCCompilerId.c.in: ENH: Add support to C compiler + identification for void return type from main. Cross-compilers + for embedded platforms may require it. + +2008-02-25 15:07 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: + ENH: Adjust when log is cleared. Its kept doing generate, + and cleared when changing the source directory. #6358. + +2008-02-25 14:23 alex + + * Modules/CPackRPM.cmake: BUG: fix rpmbuild bug, which expands + variables in comments :-/ apparently rpmbuild can't handle paths + with spaces and can't handle variables in comments... + + Alex + +2008-02-25 10:17 david.cole + + * CTestCustom.cmake.in: BUG: Exclude try_compile sources and kwsys + files from CMake coverage results. + +2008-02-25 09:23 king + + * Modules/: CMakeCCompilerId.c, CMakeCCompilerId.c.in, + CMakeCXXCompilerId.cpp, CMakeCXXCompilerId.cpp.in, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineCompilerId.cmake, + CMakeDetermineFortranCompiler.cmake, CMakeFortranCompilerId.F90, + CMakeFortranCompilerId.F90.in, CMakePlatformId.h, + CMakePlatformId.h.in: ENH: Improvied compiler identification + robustness + + - Write a single source file into the compiler id directory + - This avoid requiring the compiler to behave correctly with + respect to include rules and the current working directory + - Helps to identify cross-compiling toolchains with unusual + default behavior + +2008-02-25 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-24 14:05 king + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmMakefileTargetGenerator.cxx: ENH: Simplify make build + rule generation by removing use of OBJECTS_QUOTED and + TARGET_QUOTED rule variables and updating the generation of + OBJECTS to always use the newer cmLocalGenerator::Convert method. + +2008-02-24 14:05 king + + * Source/: cmComputeLinkDepends.cxx, cmExportFileGenerator.cxx, + cmStandardIncludes.h, cmTarget.cxx: COMP: Fix Borland 5.5 build + + - Its header includes windows.h which + defines GetCurrentDirectory + - It defines 'interface' so we cannot use it as + a variable name. + +2008-02-24 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-23 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-22 09:44 king + + * Source/cmOrderDirectories.cxx: COMP: Fix unreachable code warning + in cmOrderDirectories. + +2008-02-22 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-21 13:59 king + + * Source/cmOrderDirectories.cxx: COMP: Remove unused local variable + from cmOrderDirectories. + +2008-02-21 13:58 king + + * Source/: cmComputeLinkInformation.cxx, cmOrderDirectories.cxx, + cmSystemTools.cxx, cmSystemTools.h: ENH: Improve linking to + third-party shared libraries on soname platforms + + - Reduce false positives in cases of unknown soname + - Make library extension regular expressions match only at end + of string + - When linking to libraries in implicit dirs convert to the -l + option + only if the file name is one that can be found by the linker + (ex. /usr/lib/libfoo.so.1 should be linked by full path) + - Add cmSystemTools::GuessLibrarySOName to guess the soname of + a + library based on presence of a symlink + - In cmComputeLinkInformation try to guess an soname before + assuming + that a third-party library is built without an soname + - In cmOrderDirectories guess the soname of shared libraries in + cases + it is otherwise unknown + +2008-02-21 11:41 king + + * bootstrap, Modules/Platform/FreeBSD.cmake, + Modules/Platform/HP-UX.cmake, Modules/Platform/Linux.cmake, + Modules/Platform/QNX.cmake, Modules/Platform/SunOS.cmake, + Source/CMakeLists.txt, Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, Source/cmOrderDirectories.cxx, + Source/cmOrderDirectories.h, + Source/cmOrderRuntimeDirectories.cxx, + Source/cmOrderRuntimeDirectories.h, Source/cmTarget.cxx, + Source/cmTarget.h: ENH: Better linker search path computation. + + - Use linker search path -L.. -lfoo for lib w/out soname + when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME + - Rename cmOrderRuntimeDirectories to cmOrderDirectories + and generalize it for both soname constraints and link + library constraints + - Use cmOrderDirectories to order -L directories based + on all needed constraints + - Avoid processing implicit link directories + - For CMAKE_OLD_LINK_PATHS add constraints from libs + producing them to produce old ordering + +2008-02-21 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-20 14:56 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h: BUG: + Link scripts should be generated with copy-if-different and + included as a dependency of the link rule. + +2008-02-20 13:36 king + + * Source/: cmExportLibraryDependencies.cxx, + cmExportLibraryDependencies.h: ENH: Deprecate + export_library_dependencies + + - Reference export() and install(EXPORT) + - Fix to support OUTPUT_NAME in simple cases + +2008-02-20 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-19 18:50 ibanez + + * Source/kwsys/testSystemInformation.cxx: ENH: Missing copyright + header. + +2008-02-19 16:34 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: STYLE: patch part 3 from + Miguel: follow naming style for variables + + Alex + +2008-02-19 16:27 alex + + * Source/: cmExtraEclipseCDT4Generator.cxx, + cmExtraEclipseCDT4Generator.h: ENH: patch from Miguel part 2: if + ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT is true, then the generator + additionally generates eclipse project files in the source dir, + since this is the only way to get cvs/svn working with eclipse + + This is off by default and the user has to enable it explicitely. + If cmake can't write there it still continues. + + Alex + +2008-02-19 15:07 alex + + * Source/: cmExtraEclipseCDT4Generator.cxx, + cmExtraEclipseCDT4Generator.h: ENH: patch part 1 from Miguel: use + the cmake project name for the eclipse project name + + Alex + +2008-02-19 14:47 hoffman + + * Source/QtDialog/MacInstallDialog.ui: ENH: better ui + +2008-02-19 14:33 alex + + * Source/: CMakeLists.txt, cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationFormatter.h, cmDocumentationFormatterDocbook.cxx, + cmDocumentationFormatterDocbook.h, + cmDocumentationFormatterHTML.cxx, cmakemain.cxx: ENH: add support + for creating the documentation in docbook format + (http://www.oasis-open.org/docbook/xml/4.2/), which users can + then convert to other formats. Tested with meinproc from KDE, + which generates HTML pages which look good. + + Alex + +2008-02-19 14:26 hoffman + + * Source/: CPack/cmCPackPackageMakerGenerator.cxx, + CPack/cmCPackPackageMakerGenerator.h, QtDialog/CMakeLists.txt, + QtDialog/QtDialogCPack.cmake.in, QtDialog/postflight.sh.in, + QtDialog/postupgrade.sh.in: ENH: install working with symlink qt + tool + +2008-02-19 14:06 hoffman + + * Source/QtDialog/: CMakeLists.txt, CMakeSetup.cxx, + MacInstallDialog.ui, QMacInstallDialog.cxx, QMacInstallDialog.h: + ENH: add mac install symlink option to dialog + +2008-02-19 09:09 king + + * Source/cmTarget.cxx: COMP: Fix HP warning about + cmTargetInternalPointer::operator= checking for self-assignment. + +2008-02-19 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-18 16:38 king + + * Source/: cmGlobalXCodeGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileExecutableTargetGenerator.h, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.h, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h, + cmMakefileUtilityTargetGenerator.cxx, + cmMakefileUtilityTargetGenerator.h, cmSourceFile.cxx, + cmTarget.cxx, cmTarget.h: ENH: Cleanup impl of PUBLIC_HEADER, + PRIVATE_HEADER, and RESOURCE properties + +2008-02-18 15:50 hoffman + + * CMakeCPackOptions.cmake.in, CMakeLists.txt: ENH: install seems to + be working for cmake-gui + +2008-02-18 15:42 hoffman + + * Source/cmFileCommand.cxx: ENH: add more information to message + +2008-02-18 14:51 hoffman + + * Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake: ENH: make + sure fixup has right paths + +2008-02-18 13:11 hoffman + + * Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake: STYLE: use + lowercase + +2008-02-18 13:03 hoffman + + * Source/: cmConfigure.cmake.h.in, cmake.cxx: ENH: remove + CMAKE_PREFIX so changing it does not rebuild all + +2008-02-18 12:01 king + + * Modules/Platform/HP-UX.cmake: BUG: Fix passing of nodefaultrpath + flag to linker through c++ compiler. + +2008-02-18 11:10 hoffman + + * CMakeLists.txt: ENH: require 2.4 to build cmake + +2008-02-18 10:26 hoffman + + * Modules/CMakeIngestOSXBundleLibraries.cmake, + Source/CPack/cmCPackGenerator.cxx, + Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake, + Source/QtDialog/CMakeLists.txt: ENH: have cpack work with DESTDIR + install and ingest qt framework libs into cmake-gui + +2008-02-18 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-17 17:40 hoffman + + * Modules/CheckIncludeFiles.cmake: BUG: fix double cmakefiles + directory + +2008-02-17 14:04 alex + + * Source/cmDocumentation.cxx: BUG: actually print the docs for + custom modules if this was requested + + Alex + +2008-02-17 12:31 alex + + * Source/cmDocumentationFormatterHTML.cxx: PERF: reduce time for + full docs as HTML from 1.4 s to 0.2 s, the map is now created and + filled only once instead for every character I guess a simple + case-switch would be still faster. + + Alex + +2008-02-17 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-16 16:33 hoffman + + * Modules/CMakeIngestOSXBundleLibraries.cmake: ENH: add script to + ingest library depends into a bundle + +2008-02-16 13:05 hoffman + + * CMakeLists.txt, bootstrap, Source/cmBootstrapCommands.cxx, + Source/cmCommands.cxx, Source/cmInstallProgramsCommand.cxx, + Source/QtDialog/CMakeLists.txt, Source/QtDialog/QCMake.cxx, + Source/QtDialog/QtDialogCPack.cmake.in: ENH: support for cpack + and install of cmake-gui as mac app bundle + +2008-02-16 13:02 hoffman + + * Source/CPack/cmCPackGenerator.cxx: ENH: fix DESTDIR install + +2008-02-16 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-15 18:26 alex + + * Modules/FindPythonLibs.cmake: STYLE: use global property instead + of helper target to collect all python modules from a source tree + + Alex + +2008-02-15 15:36 clinton + + * Source/QtDialog/QCMake.cxx: ENH: remove unused code. + +2008-02-15 12:12 hoffman + + * Source/QtDialog/QCMake.cxx: ENH: use package name on mac for edit + cache + +2008-02-15 11:56 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Apply patch from + bug #6180 to make CMAKE_ADDITIONAL_MAKE_CLEAN_FILES work for + directories. + +2008-02-15 11:49 david.cole + + * Source/cmCallVisualStudioMacro.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudio9Generator.cxx, + Source/cmGlobalVisualStudio9Generator.h, + Source/cmGlobalVisualStudioGenerator.cxx, + Source/cmGlobalVisualStudioGenerator.h, + Templates/CMakeVSMacros2.vsmacros: ENH: Add code to support + calling the VS reload macro from Visual Studio 7.1 and 9.0 in + addition to 8.0 sp1... Make new macros file with VS 7.1 so that + it can be read by 7.1 and later. VS 7.1 does not appear to run + the macros while a build is in progress, but does not return any + errors either, so for now, the reload macro is not called when + using 7.1. If I can figure out how to get 7.1 to execute the + macro, I will uncomment the code in + cmGlobalVisualStudio71Generator::GetUserMacrosDirectory() to + activate executing the macros in VS 7.1, too. + +2008-02-15 11:22 king + + * Modules/Platform/Darwin.cmake, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmSetPropertyCommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.cxx, + Source/cmSourceFile.cxx: ENH: Cleanup building of OS X bundle + content + + - Fixes repeated rebuild of bundles by Makefile generators + - Add special rules to copy sources to their + MACOSX_PACKAGE_LOCATION bundle directory + - Remove MacOSX_Content language hack + - Remove EXTRA_CONTENT property + - Remove MACOSX_CONTENT + - Remove corresponding special cases in object names + +2008-02-15 10:40 hoffman + + * Source/CPack/cmCPackNSISGenerator.cxx: BUG: fix for bug 6294, + correct url for nsis + +2008-02-15 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-14 20:18 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: ENH: enable color in the + eclipse generator, there doesn't seem to be problems + + Alex + +2008-02-14 19:58 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, QCMakeCacheView.cxx, + QCMakeCacheView.h: + ENH: Convert native paths from QFileDialog and + QDirModel/QCompleter. BUG: Block possible completion loop. + +2008-02-14 18:18 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, QCMake.cxx, QCMakeCacheView.cxx: + ENH: Add shortcut to start search/filter. A bit of + cleanup. Disable tab navigation in cache variable list. + Enable home/end keys. + + BUG: Ensure currently edited values are saved before doing + configure. + +2008-02-14 16:42 king + + * Source/: cmAddCustomTargetCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalUnixMakefileGenerator3.h, + cmMakefile.cxx, cmMakefile.h, cmake.cxx: ENH: Add global property + ALLOW_DUPLICATE_CUSTOM_TARGETS to help existing projects that + depend on having duplicate custom targets. It is allowed only + for Makefile generators. See bug#6348. + +2008-02-14 15:31 king + + * Modules/MacOSXBundleInfo.plist.in, + Modules/MacOSXFrameworkInfo.plist.in, + Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, Source/cmTarget.cxx: + ENH: Allow multiple OS X applications bundles to be created in a + single build directory. Converted Info.plist files to be + generated directly instead of configured with make variables. + The MACOSX_BUNDLE_* variables are now properties (and vars for + compatibility). + +2008-02-14 15:06 hoffman + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h: ENH: + make sure html < > & stuff is escaped for the output window + +2008-02-14 13:36 king + + * Modules/CTestTargets.cmake, Source/cmDefinePropertyCommand.cxx, + Source/cmDefinePropertyCommand.h, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/Properties/CMakeLists.txt: ENH: Updated DEFINE_PROPERTY + command to be more extendible and more consistent with new + SET_PROPERTY and GET_PROPERTY signatures. + +2008-02-14 11:58 king + + * Modules/CTestTargets.cmake, Source/cmBootstrapCommands.cxx, + Source/cmCommands.cxx, Source/cmMakefile.cxx: ENH: Re-enable + diagnosis of non-unique target names. + + - Re-enable enforcement in cmMakefile::EnforceUniqueName + - Improve error message to help user resolve the problem + - Fix Modules/CTestTargets.cmake to not duplicate testing + targets + - Move commands used by the changes to + Modules/CTestTargets.cmake + to build during bootstrap: DEFINE_PROPERTY, GET_PROPERTY + +2008-02-14 10:50 king + + * Modules/: CMakeForceCompiler.cmake, CMakeTestCCompiler.cmake, + CMakeTestCXXCompiler.cmake: ENH: Remove unnecessary compiler + force macros. The compiler ID can now be detected without + linking an executable. + +2008-02-14 09:14 hoffman + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: add a check before + delete cache + +2008-02-14 08:55 hoffman + + * Source/QtDialog/QCMake.cxx: ENH: do not show unititialized + entries + +2008-02-14 01:11 clinton + + * Modules/FindQt4.cmake: + BUG: Fix error when paths have + in them. (special regex + characters) + +2008-02-14 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-13 17:00 barre + + * Modules/FindTCL.cmake: ENH: fix advanced bug + +2008-02-13 15:29 king + + * Source/: cmComputeLinkDepends.cxx, cmComputeLinkDepends.h: BUG: + Update cmComputeLinkDepends to support leading/trailing + whitespace stripping off link items for compatibility. + +2008-02-13 14:47 king + + * bootstrap, Source/cmBootstrapCommands.cxx, Source/cmCommands.cxx: + ENH: Add option to bootstrap script to enable Qt dialog. + + - Add --qt-gui and --no-qt-gui options + - Add --qt-qmake= option to help locate Qt + - Build more commands during bootstrap to help FindQt4.cmake: + MATH, GET_DIRECTORY_PROPERTY, EXECUTE_PROCESS, + SEPARATE_ARGUMENTS + - Bootstrapping with the cmake-gui is now possible in MSys + +2008-02-13 14:35 king + + * Modules/FindQt4.cmake: BUG: Fix FindQt4.cmake + QT4_CREATE_MOC_COMMAND macro to work with spaces in the path + while using the @ syntax on MSYS builds. + +2008-02-13 13:58 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, QCMakeCacheView.cxx: + ENH: Remove CurrentChanged from the table view's edit triggers. + It results in editor issues when modifying the view. + Remove workarounds for some of those issues. + +2008-02-13 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-12 17:22 hoffman + + * Source/QtDialog/CMakeLists.txt: ENH: do not expand regular vars + here + +2008-02-12 10:19 king + + * Source/cmMakefile.cxx: BUG: Disable enforcement of unique target + names until CTestTargets can be fixed. + +2008-02-12 09:49 hoffman + + * Source/: cmake.cxx, cmake.h, CursesDialog/cmCursesMainForm.cxx, + MFCDialog/CMakeSetupDialog.cpp, QtDialog/CMakeSetup.cxx, + QtDialog/QCMake.cxx: ENH: fix make edit_cache for cmake-gui + +2008-02-12 09:18 king + + * Source/cmExportLibraryDependencies.cxx: STYLE: Fix line-too-long + in cmExportLibraryDependencies. + +2008-02-12 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-11 20:13 king + + * Source/cmDocumentVariables.cxx: ENH: Update documentation of + EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH to reference their + replacements. + +2008-02-11 17:33 king + + * Source/: cmAddCustomTargetCommand.cxx, + cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx: COMP: Fix + shadowed local variable warning. + +2008-02-11 17:01 king + + * Modules/Platform/eCos.cmake: ENH: Fix eCos.cmake to not require a + forced compiler + + - Search for libtarget.a explicitly + - Do not complain about compiler id during try-compile + +2008-02-11 17:00 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake: ENH: When detecting the + compiler id try compiling only to an object file. + +2008-02-11 17:00 king + + * Source/cmFindLibraryCommand.cxx: BUG: FIND_LIBRARY should not + require CMAKE_SIZEOF_VOID_P to be set. + +2008-02-11 17:00 king + + * Source/cmake.cxx: ENH: Add global computed property + IN_TRY_COMPILE. + +2008-02-11 15:31 king + + * Modules/Platform/HP-UX.cmake: ENH: Remove CMAKE_ANSI_CFLAGS + variable and instead always add ansi flags to + CMAKE_C_COMPILE_OBJECT. We should not require every project to + reference CMAKE_ANSI_CFLAGS. + +2008-02-11 13:35 king + + * Source/: cmAddCustomTargetCommand.cxx, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, cmMakefile.cxx, + cmMakefile.h, cmTarget.cxx: ENH: Enforce global target name + uniqueness. + + - Error if imported target is involved in conflict + - Error for non-imported target conflict unless + CMAKE_BACKWARDS_COMPATIBILITY <= 2.4 + - Include OUTPUT_NAME property in error message + - Update add_executable and add_library command documentation + +2008-02-11 13:35 king + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Add + cmMakefile::NeedBackwardsCompatibility method to pass through to + cmLocalGenerator::NeedBackwardsCompatibility for convenience. + +2008-02-11 10:31 king + + * Source/cmExportLibraryDependencies.cxx: BUG: Fix + export_library_dependencies command to produce a file that is + compatible with CMake 2.4. + +2008-02-11 10:31 king + + * Source/cmComputeLinkDepends.cxx: BUG: Fix + cmComputeLinkDepends::AddVarLinkEntries + + - Track link type correctly + - Use _LINK_TYPE variables exported by CMake 2.4 + +2008-02-11 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-10 17:19 alex + + * Source/cmIfCommand.h: STYLE: document that if(COMMAND) works also + for macros and functions + + Alex + +2008-02-10 11:37 king + + * Source/cmFindLibraryCommand.cxx: BUG: Fix recent find_library + change to look for user-specified name first to do so only if the + name matches a valid library extension. + +2008-02-10 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-09 10:05 hoffman + + * Utilities/Release/vogon_release.cmake: ENH: build the qt gui + +2008-02-09 09:53 hoffman + + * CMakeCPack.cmake, CMakeCPackOptions.cmake.in, + Source/QtDialog/CMakeLists.txt, + Source/QtDialog/QtDialogCPack.cmake.in: ENH: make it so cmake-gui + only installs if qt is static on windows + +2008-02-09 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-08 13:47 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: Make sure editor + closes when deleting cache entries. + +2008-02-08 12:01 clinton + + * Modules/FindQt4.cmake: ENH: Better way to have escaping done + correctly for all generators. + +2008-02-08 11:26 clinton + + * Source/QtDialog/QCMake.cxx: ENH: Need to pick up the + PreLoad.cmake files. + +2008-02-08 10:42 clinton + + * Source/QtDialog/: CMakeSetup.cxx, QCMakeCacheView.cxx: COMP: Fix + build with Qt 4.2. BUG: Fix new editors stealing focus while + typing search text. ENH: Look for translation in data dir, not + bin dir. + +2008-02-08 09:24 king + + * Tests/Dependency/CMakeLists.txt: BUG: Need ANSI C. + +2008-02-08 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-07 23:26 clinton + + * Modules/FindQt4.cmake: + BUG: Fix arg for moc parameter file so it works with unix + makefiles, when the build dir has a space in it. + +2008-02-07 18:24 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: patch from Miguel BUG: + fix #5496: eclipse can't load projects where the build dir is a + subdir of the src dir + + Alex + +2008-02-07 17:58 clinton + + * Source/QtDialog/: QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: Show cache variable name in title of file dialogs. + +2008-02-07 16:49 king + + * Source/: cmGlobalXCodeGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, cmTarget.cxx: ENH: Avoid + computing link information for static library targets. They do + not link. + +2008-02-07 16:26 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: two patches from Miguel: + BUG: fix #5819: put compile definitions into the eclipse project + files so eclipse handles ifdef blcoks correctly STYLE: make the + code for filtering some global targets out nicer + + Alex + +2008-02-07 16:24 king + + * Source/cmComputeLinkDepends.cxx: COMP: Add missing assert + include. + +2008-02-07 16:22 alex + + * Source/cmInstallCommand.cxx: STYLE: add some comments + + Alex + +2008-02-07 16:14 king + + * Tests/Dependency/Case2/: CMakeLists.txt, foo1.c, foo1b.c, + foo2b.c, foo3.c, foo3b.c: ENH: Make Dependency test Case2 require + two traversals of a static library loop. + +2008-02-07 16:14 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmComputeComponentGraph.cxx, + Source/cmComputeComponentGraph.h, + Source/cmComputeLinkDepends.cxx, Source/cmComputeLinkDepends.h, + Source/cmComputeTargetDepends.cxx, + Source/cmComputeTargetDepends.h, Source/cmGraphAdjacencyList.h: + ENH: Improve link line generation for static library cycles. + + - Move Tarjan algorithm from cmComputeTargetDepends + into its own class cmComputeComponentGraph + - Use cmComputeComponentGraph to identify the component DAG + of link dependencies in cmComputeLinkDepends + - Emit non-trivial component members more than once but always + in a contiguous group on the link line + +2008-02-07 13:26 hoffman + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: make sure files + are binary for download and make status a pair of value string + +2008-02-07 13:19 hoffman + + * Modules/FindPkgConfig.cmake: BUG: fix for bug 6117 pkgconfig + +2008-02-07 11:43 hoffman + + * CMakeCPackOptions.cmake.in, Source/QtDialog/CMakeLists.txt: ENH: + for windows only allow a static qt for install and NSIS of + cmake-gui + +2008-02-07 08:55 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: complex must + link to curl now + +2008-02-07 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-06 20:14 king + + * Source/cmComputeLinkInformation.cxx: BUG: Fix + cmComputeLinkInformation to include the target's user link + directories in the runtime path computation. This bug was + introduced when cmOrderRuntimeDirectories was introduced. + +2008-02-06 17:02 alex + + * Modules/FindPackageHandleStandardArgs.cmake: STYLE: use a + function instead of a macro, to keep FAIL_MESSAGE local patch + from Miguel + + Alex + +2008-02-06 15:26 king + + * Source/cmFindLibraryCommand.cxx: ENH: Make find_library test for + the library file as named before trying prefixes and suffixes. + This will allow users to explicitly search for static libraries + on unix. See bug #1643. + +2008-02-06 15:23 king + + * Source/cmTargetLinkLibrariesCommand.h: STYLE: Improve + documentation of target_link_libraries command to make + target-level dependency explicit. See bug #6043. + +2008-02-06 15:10 clinton + + * Source/QtDialog/CMakeSetup.cxx: ENH: Update some strings to + match program name. + +2008-02-06 14:52 king + + * Tests/: CMakeLists.txt, Dependency/CMakeLists.txt, + Dependency/Case1/CMakeLists.txt, Dependency/Case1/a.c, + Dependency/Case1/b.c, Dependency/Case1/b2.c, + Dependency/Case1/c.c, Dependency/Case1/c2.c, + Dependency/Case1/d.c, Dependency/Case1/main.c, + Dependency/Case2/CMakeLists.txt, Dependency/Case2/bar1.c, + Dependency/Case2/bar2.c, Dependency/Case2/bar3.c, + Dependency/Case2/foo1.c, Dependency/Case2/foo2.c, + Dependency/Case2/foo3.c, Dependency/Case2/zot.c: ENH: Combine all + dependency* tests into one Dependency test. Add more difficult + test cases. + +2008-02-06 14:45 clinton + + * Source/QtDialog/CMakeSetup.cxx: BUG: On Mac OS X, give the CMake + library the correct path to the cmake exectuables. Fixes + #6286. + +2008-02-06 14:20 king + + * Source/cmExportBuildFileGenerator.cxx, + Source/cmExportCommand.cxx, + Source/cmExportInstallFileGenerator.cxx, + Source/cmInstallCommand.cxx, Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Tests/ExportImport/Export/CMakeLists.txt: ENH: Improve + exporting/importing of targets + + - Use real name instead of link for location of versioned + targets + - Error when a target is exported multiple times + +2008-02-06 14:19 king + + * Source/cmTarget.cxx: BUG: Make sure linking to a shared lib on + windows uses import library and not the new realname. + +2008-02-06 14:06 king + + * Source/cmTarget.cxx: BUG: Do not create versioned executable + names on Xcode where they are not supported. + +2008-02-06 13:34 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h, cmTarget.cxx, cmTarget.h: ENH: When + linking to versioned targets whose real file name is known pass + the real name to the linker instead of the symlink name. + +2008-02-06 09:46 hoffman + + * Source/cmFileCommand.cxx: ENH: remove debug print stuff + +2008-02-06 09:35 hoffman + + * Source/: CMakeLists.txt, cmFileCommand.cxx, cmFileCommand.h: ENH: + add DOWNLOAD option to FILE command + +2008-02-06 09:17 hoffman + + * Source/QtDialog/CMakeLists.txt: ENH: change name of qt-dialog + +2008-02-06 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-05 23:10 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmComputeTargetDepends.cxx, + Source/cmComputeTargetDepends.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, Source/cmake.cxx: ENH: Analyze + inter-target dependencies to safely fix cycles + + - Cycles may be formed among static libraries + - Native build system should not have cycles in target deps + - Create cmComputeTargetDepends to analyze dependencies + - Identify conneced components and use them to fix deps + - Diagnose cycles containing non-STATIC targets + - Add debug mode property GLOBAL_DEPENDS_DEBUG_MODE + - Use results in cmGlobalGenerator as target direct depends + +2008-02-05 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-04 19:00 king + + * Source/cmInstallTargetGenerator.cxx: COMP: Add missing include + for assert. + +2008-02-04 17:03 king + + * Source/: cmInstallCommand.cxx, cmInstallCommand.h, + cmInstallCommandArguments.cxx, cmInstallCommandArguments.h, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h: ENH: + Allow separate installation of shared libs and their links. + + - Add NAMELINK_ONLY and NAMELINK_SKIP to INSTALL command + - Options select a \"namelink\" mode + - cmInstallTargetGenerator selects files/link based on mode + - See bug #4419 + +2008-02-04 16:05 hoffman + + * Source/cmGlobalVisualStudio7Generator.cxx: ENH: make sure + ALL_BUILD only shows up once + +2008-02-04 15:22 king + + * Modules/Platform/AIX.cmake, Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, Source/cmake.cxx: BUG: Added + TARGET_ARCHIVES_MAY_BE_SHARED_LIBS global property to help + compute proper rpath information on AIX when shared libraries + have names like "libfoo.a". + +2008-02-04 10:04 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake, CMakeTestCCompiler.cmake, + CMakeTestCXXCompiler.cmake: BUG: When configuring compiler + information files into the CMakeFiles directory in the project + build tree, use IMMEDIATE option for CONFIGURE_FILE explicitly. + It is needed in case the user sets CMAKE_BACKWARDS_COMPATIBILITY + to 2.0 or lower. + +2008-02-04 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-03 17:24 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake, CMakeForceCompiler.cmake, + CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: BUG: When + forcing the C and CXX compilers do not try to detect the ABI + information. Cleanup configured language compiler info files by + always using @ONLY. This addresses bug#6297. + +2008-02-03 08:58 king + + * Source/kwsys/IOStream.cxx: COMP: Avoid warning in kwsys + IOStream.cxx when the helper functions are not needed. Define + one public symbol to avoid complaints from archivers about empty + object files. + +2008-02-03 08:57 king + + * Tests/ExportImport/Export/: testExe1.c, testExe1lib.c, + testLib1.c, testLib2.c: COMP: Convert C function prototypes to + use (void) instead of (). + +2008-02-03 08:57 king + + * Source/: cmCTest.cxx, cmCTest.h: BUG: cmCTest::GetConfigType + should return the string by reference-to-const so that callers + may use .c_str() safely. + +2008-02-03 08:20 king + + * Source/kwsys/SystemInformation.cxx: COMP: Fix warning in + SystemInformation.cxx about possibly incorrect assignment in if + condition. + +2008-02-03 08:14 king + + * Source/kwsys/SystemInformation.cxx: COMP: Fix unreachable code + warning. Remove runtime test of constant information. + +2008-02-03 08:07 king + + * Source/kwsys/hash_set.hxx.in: COMP: Remove inline keyword from + forward declaration for VS9. + +2008-02-03 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-02 16:18 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix infinite loop from + size_t change + +2008-02-02 08:58 king + + * Modules/Platform/: NetBSD.cmake, kFreeBSD.cmake: ENH: Enable + dependent library search paths on more platforms + + - NetBSD needs dependent library paths in -rpath-link option. + - kFreeBSD needs dependent library paths in -rpath-link option. + +2008-02-02 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-02-01 16:17 martink + + * Tests/CMakeLists.txt: ENH: disable test for vs 70 as devenv + randomly segfaults when building the sub-project + +2008-02-01 16:05 martink + + * Source/cmGlobalGenerator.cxx: ENH: really Bill, using Ken's + checkout, fix output in ctest so clean output in build and test + is not lost, also display the command lines used + +2008-02-01 14:35 king + + * Source/cmExportInstallFileGenerator.cxx: BUG: Fixed typo + resulting in confusing error message from + cmExportInstallFileGenerator. + +2008-02-01 13:52 clinton + + * Modules/FindQt4.cmake: + BUG: When preserving relative paths for moc generated files, + also consider paths to headers in the build directory. + +2008-02-01 13:18 david.cole + + * Source/kwsys/CMakeLists.txt: ENH: Merge changes from main tree + into VTK-5-0 branch. (cvs -q up -j1.135 -j1.136 + Utilities/kwsys/CMakeLists.txt) + +2008-02-01 13:08 king + + * Source/cmInstallTargetGenerator.cxx, Source/cmTarget.h, + Tests/ExportImport/Export/CMakeLists.txt: BUG: Remove + InstallNameFixupPath from cmTarget and cmInstallTargetGenerator. + + - Motivation: + - It depended on the order of installation + - It supported only a single destination for each target + - It created directory portions of an install name without + user request + - Updated ExportImport test to install targets in an order that + expoed + this bug + +2008-02-01 12:35 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix warnings + +2008-02-01 12:02 clinton + + * Modules/UseQt4.cmake: ENH: Use new COMPILE_DEFINITIONS_* with + set_property to add Qt release/debug defines. + +2008-02-01 11:48 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx: ENH: + Show version number in window title. + +2008-02-01 11:40 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix more warnings + +2008-02-01 11:33 hoffman + + * Source/kwsys/: SystemInformation.cxx: ENH: fix more warnings + +2008-02-01 11:30 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix some warnings and 64 + bit build windows + +2008-02-01 11:09 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix win64 build and a + warning + +2008-02-01 10:41 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, QCMake.cxx: ENH: Use translation file if it + exists for the locale. Consolidate some strings. + + More responsive interrupting. Prompt user if they try to + close during + configure, and allow them to close. + +2008-02-01 09:57 king + + * Tests/ExportImport/: CMakeLists.txt, Export/CMakeLists.txt: ENH: + Update ExportImport test to enforce dependent library paths + + - Build without rpaths + - Place implementation libs in separate directories + +2008-02-01 09:57 king + + * Modules/Platform/: FreeBSD.cmake, HP-UX.cmake, IRIX.cmake, + IRIX64.cmake, SunOS.cmake: ENH: Enable dependent library search + paths on more platforms + + - HP-UX needs dependent library paths as -L options. + - IRIX needs dependent library paths as -L options. + - Sun needs dependent library paths as -L options. + - FreeBSD needs dependent library paths in -rpath-link option. + +2008-02-01 09:36 king + + * Tests/CMakeLists.txt: BUG: Fix commit 1.41 of + Tests/CMakeLists.txt to place fake target before --version flag + instead of after. + +2008-02-01 08:56 king + + * bootstrap, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/Platform/Darwin.cmake, Modules/Platform/Linux.cmake, + Modules/Platform/QNX.cmake, Source/CMakeLists.txt, + Source/cmComputeLinkDepends.cxx, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, + Source/cmExportBuildFileGenerator.cxx, + Source/cmExportBuildFileGenerator.h, + Source/cmExportFileGenerator.cxx, Source/cmExportFileGenerator.h, + Source/cmExportInstallFileGenerator.cxx, + Source/cmExportInstallFileGenerator.h, + Source/cmLocalGenerator.cxx, + Source/cmOrderRuntimeDirectories.cxx, + Source/cmOrderRuntimeDirectories.h, Source/cmTarget.cxx: ENH: + Pass dependent library search path to linker on some platforms. + + - Move runtime path ordering out of cmComputeLinkInformation + into its own class cmOrderRuntimeDirectories. + - Create an instance of cmOrderRuntimeDirectories for runtime + path ordering and another instance for dependent library + path ordering. + - Replace CMAKE_DEPENDENT_SHARED_LIBRARY_MODE with explicit + CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean. + - Create CMAKE_LINK_DEPENDENT_LIBRARY_DIRS boolean. + - Create variables to specify -rpath-link flags: + CMAKE_SHARED_LIBRARY_RPATH_LINK__FLAG + CMAKE_EXECUTABLE_RPATH_LINK__FLAG + - Enable -rpath-link flag on Linux and QNX. + - Documentation and error message updates + +2008-02-01 08:55 king + + * Source/cmTarget.cxx: COMP: Fix shadowed local warning. + +2008-02-01 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-31 21:33 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: try to fix hp and vs 6, + again... + +2008-01-31 16:38 hoffman + + * Source/: CTest/cmCTestUpdateHandler.cxx, + cmGlobalVisualStudio7Generator.h: STYLE: line length + +2008-01-31 16:37 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fixes for borland + +2008-01-31 16:33 martink + + * Source/CTest/cmCTestTestHandler.cxx: BUG: minor fix for ctest + +2008-01-31 16:10 hoffman + + * Source/cmCTest.cxx: ENH: remove extra junk + +2008-01-31 15:45 king + + * Modules/Platform/Darwin.cmake, Source/cmComputeLinkDepends.cxx, + Source/cmComputeLinkDepends.h, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, Source/cmExportFileGenerator.cxx, + Source/cmExportFileGenerator.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/ExportImport/Export/CMakeLists.txt: ENH: + Support linking to shared libs with dependent libs + + - Split IMPORTED_LINK_LIBRARIES into two parts: + IMPORTED_LINK_INTERFACE_LIBRARIES + IMPORTED_LINK_DEPENDENT_LIBRARIES + - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior + - Set mode to LINK for Darwin (fixes universal binary problem) + - Update ExportImport test to account for changes + +2008-01-31 15:34 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix for qnx, I hope, and + fix indent stuff + +2008-01-31 15:10 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix build errors with + asm stuff on mingw and hopefully win64 + +2008-01-31 14:50 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix build for mingw + +2008-01-31 14:34 hoffman + + * Source/kwsys/: SystemInformation.cxx, SystemInformation.hxx.in: + ENH: split into implementation and interface class to clean up + namespace issues with #define stuff + +2008-01-31 13:23 martink + + * Modules/Dart.cmake: ENH: use ctest to drive dashboards for make + targets as opposed to tclsh + +2008-01-31 12:56 king + + * Source/kwsys/CMakeLists.txt: BUG: Need to install cstddef header. + +2008-01-31 12:19 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: remove a const cast + +2008-01-31 11:43 martink + + * Source/: ctest.cxx, CTest/cmCTestTestHandler.cxx: ENH: read in + old file formats Dart as well + +2008-01-31 08:32 king + + * Source/kwsys/kwsysPlatformTestsCXX.cxx: STYLE: Work-around std:: + check since this is a platform test. + +2008-01-31 08:21 king + + * Source/kwsys/: String.hxx.in, SystemTools.hxx.in, + kwsys_ios_sstream.h.in: STYLE: Remove references to std:: inside + KWSys, even in comments. This will allow a commit check to be + added. + +2008-01-31 08:21 king + + * Source/kwsys/SystemInformation.cxx: COMP: Replace kwsys_stl:: + with kwsys_ios:: for streams access. + +2008-01-31 08:05 king + + * Source/: cmComputeLinkInformation.cxx, cmTarget.cxx: ENH: Add + target property LINK_SEARCH_END_STATIC to help people building + static binaries on some platforms. + +2008-01-31 07:50 king + + * Modules/Platform/IRIX.cmake, Modules/Platform/IRIX64.cmake, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmFindLibraryCommand.cxx, Source/cmFindLibraryCommand.h: + BUG: Move decision to switch library paths found in implicit link + directories to use -l options from cmFindLibraryCommand to + cmComputeLinkInformation. Existing projects may depend on + find_library returning a full path. This slightly weakens + cmComputeLinkInformation but is necessary for compatibility. + +2008-01-31 06:51 king + + * Source/: cmExportFileGenerator.cxx, cmExportFileGenerator.h: + COMP: Remove unused parameter. + +2008-01-31 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-30 22:56 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: remove const + +2008-01-30 21:40 hoffman + + * Source/kwsys/: SystemInformation.cxx, SystemInformation.hxx.in: + COMP: use kwsys_stl and not std:: + +2008-01-30 17:57 king + + * Source/cmExportFileGenerator.cxx: BUG: Fixed previous commit in + cmExportFileGenerator to separate libraries correctly in the + import link list. + +2008-01-30 17:26 king + + * Tests/ExportImport/: CMakeLists.txt, Export/CMakeLists.txt, + Export/testExe2lib.c, Export/testExe2libImp.c, Export/testLib3.c, + Export/testLib3Imp.c, Import/imp_mod1.c: ENH: Updated + ExportImport test to try LINK_INTERFACE_LIBRARIES. + +2008-01-30 17:25 king + + * Source/: cmComputeLinkDepends.cxx, + cmExportBuildFileGenerator.cxx, cmExportBuildFileGenerator.h, + cmExportCommand.cxx, cmExportCommand.h, + cmExportFileGenerator.cxx, cmExportFileGenerator.h, + cmExportInstallFileGenerator.cxx, cmTarget.cxx, cmTarget.h: ENH: + Implemented link-interface specification feature. + + - Shared libs and executables with exports may now have + explicit transitive link dependencies specified + - Created LINK_INTERFACE_LIBRARIES and related properties + - Exported targets get the interface libraries as their + IMPORTED_LINK_LIBRARIES property. + - The export() and install(EXPORT) commands now give + an error when a linked target is not included since + the user can change the interface libraries instead + of adding the target. + +2008-01-30 16:22 hoffman + + * Source/cmGlobalVisualStudio7Generator.cxx: ENH: make sure global + targets are in the right projects + +2008-01-30 13:02 hoffman + + * Tests/SubProject/foo/: CMakeLists.txt, foo.cxx: ENH: add missing + files + +2008-01-30 12:55 hoffman + + * Source/kwsys/SystemInformation.hxx.in: ENH: fix for vs 70 + +2008-01-30 12:15 king + + * Source/cmComputeLinkDepends.cxx: BUG: cmComputeLinkDepends should + not follow the dependencies of executables. + +2008-01-30 12:04 hoffman + + * Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Tests/CMakeLists.txt, + Tests/SubProject/CMakeLists.txt, Tests/SubProject/bar.cxx, + Tests/SubProject/car.cxx: ENH: fix for bug 3218 dependant + projects are written out automatically if they are in the + project. Also fix bug 5829, remove hard coded + CMAKE_CONFIGURATION_TYPES from vs 7 generator + +2008-01-30 11:54 hoffman + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestUpdateHandler.cxx: + ENH: remove warnings + +2008-01-30 11:22 king + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h: ENH: Make add_custom_command + interpret relative OUTPUT locations with respect to the build tre + instead of the source tree. This can greatly simplify user code + since generating a file will not need to reference + CMAKE_CURRENT_BINARY_DIR. The new behavior is what users expect + 99% of the time. + +2008-01-30 11:21 king + + * Source/: cmGetPropertyCommand.cxx, + cmGetSourceFilePropertyCommand.cxx, cmSourceFile.cxx, + cmSourceFile.h: BUG: Add cmSourceFile::GetPropertyForUser to + centralize the LOCATION property hack. This fixes the LOCATION + property when retrieved via the get_property command. + +2008-01-30 11:17 hoffman + + * Source/: cmCTest.cxx, CTest/cmCTestBuildHandler.cxx, + CTest/cmCTestBuildHandler.h, CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h, CTest/cmCTestUpdateHandler.cxx, + kwsys/CMakeLists.txt, kwsys/SystemInformation.hxx.in: ENH: + enhancements for cdash, include system information and better + time entries + +2008-01-30 08:37 king + + * Source/cmMakefile.cxx: BUG: Fix misuse of stl vector that caused + definitions to be dropped by cmMakefile::PushScope. + +2008-01-30 07:44 king + + * CompileFlags.cmake, Source/kwsys/hash_map.hxx.in: COMP: Fix + warnings on VS9. + +2008-01-30 07:17 king + + * Utilities/cmtar/CMakeLists.txt: COMP: Fix warning about tolower + by making sure ctype.h is included in cmtar. + +2008-01-30 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-29 21:16 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx: ENH: Enable use of link + script whenever incremental archive construction rules are + available. Enable use of archive construction rules on MSYS. + +2008-01-29 20:46 king + + * Modules/Platform/Windows-gcc.cmake, + Source/cmDocumentVariables.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h: ENH: Added build rule + variables CMAKE__ARCHIVE_CREATE, + CMAKE__ARCHIVE_APPEND, and CMAKE__ARCHIVE_FINISH to + support creation of static archive libraries out of a large + number of objects. See bug #6284. + +2008-01-29 17:30 king + + * Source/: cmCacheManager.cxx, cmCacheManager.h: BUG: Fix + uninitialzed members of cmCacheManager. + +2008-01-29 17:30 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmTarget.cxx, cmTarget.h: BUG: + cmTarget instances should not be copied. Removed pass-by-value + arguments from cmLocalVisualStudio7Generator::WriteGroup and + cmLocalVisualStudio6Generator::WriteGroup. Updated cmTarget to + make this easier to find. + +2008-01-29 17:01 clinton + + * Modules/FindQt4.cmake: ENH: Make lupdate and lrelease + executables advanced variables. + +2008-01-29 15:54 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: Correctly format + multi-line error messages. + +2008-01-29 15:47 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h, cmInstallTargetGenerator.cxx: ENH: + Update cmInstallTargetGenerator to get the shared libraries + linked by a target from cmComputeLinkInformation instead of + duplicating the computation. + +2008-01-29 15:10 barre + + * Modules/FindHTMLHelp.cmake: ENH: need quotes + +2008-01-29 15:07 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h, cmGlobalXCodeGenerator.cxx, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmTarget.cxx, cmTarget.h: ENH: + Add cmTarget::GetLinkInformation method to allow several places + in the generators to share link information while only computing + it once per configuration for a target. Use it to simplify the + chrpath feature. + +2008-01-29 13:07 clinton + + * Modules/FindQt4.cmake: + ENH: Allow QT4_WRAP_CPP to work with dir1/myobject.h + dir2/myobject.h Fixes #5067. + +2008-01-29 09:57 king + + * Source/cmFindPackageCommand.cxx: ENH: Added not to find_package + documentation about unspecified choice among multiple versions. + +2008-01-29 08:03 king + + * Tests/ExportImport/CMakeLists.txt: BUG: Custom command driver + outputs must be SYMBOLIC since no corresponding file is created. + +2008-01-29 07:57 king + + * Tests/ExportImport/CMakeLists.txt: BUG: Make sure + CMAKE_INSTALL_PREFIX stays in subproject caches. + +2008-01-29 07:48 king + + * Modules/Platform/Linux-SunPro-C.cmake: BUG: Fix dynamic exports + executable link option for Sun C compiler on Linux. + +2008-01-29 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-28 20:38 king + + * Modules/readme.txt, Source/cmFindPackageCommand.cxx, + Source/cmFindPackageCommand.h, + Tests/FindPackageTest/CMakeLists.txt, + Tests/FindPackageTest/lib/suffix/test/SuffixTestConfigVersion.cmake, + Tests/FindPackageTest/lib/zot-1.0/zot-config.cmake, + Tests/FindPackageTest/lib/zot-2.0/zot-config-version.cmake, + Tests/FindPackageTest/lib/zot-2.0/zot-config.cmake, + Tests/FindPackageTest/lib/zot-3.0/zot-config-version.cmake, + Tests/FindPackageTest/lib/zot-3.0/zot-config.cmake, + Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake, + Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake: ENH: Added + version support to Config mode of find_package command. + + - Added EXACT option to request an exact version. + - Enforce version using check provided by package. + - Updated FindPackageTest to test versioning in config mode. + +2008-01-28 19:20 clinton + + * Modules/FindQt4.cmake: + ENH: Improve find for glib/gthread when Qt is configured to use + it. Fixes #6220. + +2008-01-28 15:22 king + + * Source/: cmExportBuildFileGenerator.cxx, + cmExportInstallFileGenerator.cxx: STYLE: Updated TODO comment for + PUBLIC_HEADER_LOCATION export. + +2008-01-28 15:12 king + + * Source/: cmInstallCommand.h, cmTarget.cxx: ENH: Document + PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE target properties and + corresponding arguments to INSTALL(TARGETS). + +2008-01-28 14:46 king + + * Tests/Framework/CMakeLists.txt: BUG: Fix Framework test after + fixing FRAMEWORK targets to not install like frameworks on + non-Apple systems. + +2008-01-28 14:46 king + + * Source/cmExportBuildFileGenerator.cxx, + Source/cmExportFileGenerator.cxx, + Source/cmExportInstallFileGenerator.cxx, + Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallTargetGenerator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/ExportImport/Export/CMakeLists.txt, + Tests/ExportImport/Export/testExe3.c, + Tests/ExportImport/Import/CMakeLists.txt, + Tests/ExportImport/Import/imp_testExe1.c: ENH: Support + exporting/importing of AppBundle targets. + + - Imported bundles have the MACOSX_BUNDLE property set + - Added cmTarget::IsAppBundleOnApple method to simplify checks + - Document BUNDLE keyword in INSTALL command + - Updated IMPORTED_LOCATION property documentation for bundles + - Updated ExportImport test to test bundles + +2008-01-28 13:37 king + + * Source/cmExportFileGenerator.cxx, Source/cmExportFileGenerator.h, + Tests/ExportImport/Export/CMakeLists.txt, + Tests/ExportImport/Export/testExe1.c, + Tests/ExportImport/Export/testExe1lib.c: BUG: Fix export/import + file generation to not store link dependencies of executables or + modules. + +2008-01-28 13:21 king + + * Source/cmExportBuildFileGenerator.h, Source/cmExportCommand.cxx, + Source/cmExportCommand.h, Source/cmExportFileGenerator.cxx, + Source/cmExportFileGenerator.h, + Tests/ExportImport/Export/CMakeLists.txt: ENH: Restored APPEND + option to EXPORT() command in new implementation. + +2008-01-28 13:06 king + + * Tests/ExportImport/: Export/CMakeLists.txt, Export/testLib4.c, + Import/CMakeLists.txt, Import/imp_testExe1.c: ENH: Added + framework to ExportImport test. + +2008-01-28 13:05 king + + * Source/: cmComputeLinkInformation.cxx, cmExportFileGenerator.cxx, + cmExportInstallFileGenerator.cxx, cmGlobalGenerator.cxx, + cmGlobalXCodeGenerator.cxx, cmInstallCommand.cxx, + cmInstallCommand.h, cmInstallTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: + ENH: Support exporting/importing of Framework targets. + + - Imported frameworks have the FRAMEWORK property set + - Added cmTarget::IsFrameworkOnApple method to simplify checks + - Also remove separate IMPORTED_ENABLE_EXPORTS property and + just use ENABLE_EXPORTS since, like FRAMEWORK, it just represents + the target type. + - Document FRAMEWORK keyword in INSTALL command. + - Updated IMPORTED_LOCATION property documentation for + Frameworks + +2008-01-28 09:53 king + + * Source/cmExportFileGenerator.h: COMP: Add virtual destructor to + cmExportFileGenerator to avoid warnings about other virtual + functions. + +2008-01-28 08:40 king + + * Tests/: CMakeLists.txt, ExportImport/CMakeLists.txt, + ExportImport/main.c, ExportImport/Export/CMakeLists.txt, + ExportImport/Export/testExe1.c, ExportImport/Export/testExe2.c, + ExportImport/Export/testLib1.c, ExportImport/Export/testLib2.c, + ExportImport/Export/testLib3.c, + ExportImport/Import/CMakeLists.txt, + ExportImport/Import/imp_mod1.c, + ExportImport/Import/imp_testExe1.c: ENH: Added ExportImport test + to test new export/import features. + +2008-01-28 08:39 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Updated SimpleInstall tests + for new export/import interface. + +2008-01-28 08:38 king + + * Source/: CMakeLists.txt, cmAddDependenciesCommand.cxx, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmComputeLinkDepends.cxx, cmComputeLinkDepends.h, + cmComputeLinkInformation.cxx, cmExportBuildFileGenerator.cxx, + cmExportBuildFileGenerator.h, cmExportCommand.cxx, + cmExportCommand.h, cmExportFileGenerator.cxx, + cmExportFileGenerator.h, cmExportInstallFileGenerator.cxx, + cmExportInstallFileGenerator.h, cmGetPropertyCommand.cxx, + cmGetTargetPropertyCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudioGenerator.cxx, cmGlobalXCodeGenerator.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmInstallCommand.cxx, + cmInstallCommand.h, cmInstallCommandArguments.cxx, + cmInstallCommandArguments.h, cmInstallDirectoryGenerator.cxx, + cmInstallExportGenerator.cxx, cmInstallExportGenerator.h, + cmInstallFilesCommand.cxx, cmInstallFilesGenerator.cxx, + cmInstallGenerator.cxx, cmInstallGenerator.h, + cmInstallProgramsCommand.cxx, cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h, cmLocalGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, cmMakefile.cxx, cmMakefile.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmSetPropertyCommand.cxx, + cmSetTargetPropertiesCommand.cxx, cmTarget.cxx, cmTarget.h: ENH: + Updated exporting and importing of targets to support libraries + and configurations. + + - Created cmExportFileGenerator hierarchy to implement export + file generation + - Installed exports use per-config import files loaded by a + central one. + - Include soname of shared libraries in import information + - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() + commands + - Move addition of CMAKE_INSTALL_PREFIX to destinations to + install generators + - Import files compute the installation prefix relative to + their location when loaded + - Add mapping of importer configurations to importee + configurations + - Rename IMPORT targets to IMPORTED targets to distinguish from + windows import libraries + - Scope IMPORTED targets within directories to isolate them + - Place all properties created by import files in the IMPORTED + namespace + - Document INSTALL(EXPORT) and EXPORT() commands. + - Document IMPORTED signature of add_executable and add_library + - Enable finding of imported targets in cmComputeLinkDepends + +2008-01-28 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-27 15:09 king + + * bootstrap, Source/cmComputeLinkDepends.cxx: COMP: Use kwsys to + get STL set_intersection algorithm. + +2008-01-27 13:42 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmComputeLinkDepends.cxx, Source/cmComputeLinkDepends.h, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, Source/cmTarget.cxx: ENH: + Created cmComputeLinkDepends to compute link dependencies. + + - This will be useful for imported library dependencies + - Replaces old cmTarget analyze-lib-depends stuff for linking + - Formalizes graph construction and dump + - Explicitly represents dependency inferral sets + - Use BFS of initial dependencies to preserve order + +2008-01-27 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-26 01:11 barre + + * Modules/: FindTCL.cmake, FindTclStub.cmake, FindTclsh.cmake, + FindWish.cmake: ENH: Update Tcl/Tk 8.5 + +2008-01-26 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-25 13:07 barre + + * Modules/: FindPerl.cmake, FindTCL.cmake, FindTclStub.cmake, + FindTclsh.cmake, FindWish.cmake: ENH: update for Tcl/Tk 8.5 + +2008-01-25 08:11 king + + * Source/cmSystemTools.cxx: COMP: Need to return a value from fake + MD5 method under bootstrap. + +2008-01-25 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-24 19:42 barre + + * Modules/FindTclsh.cmake: ENH: typo + +2008-01-24 19:31 barre + + * Modules/: FindTCL.cmake, FindTclsh.cmake, FindWish.cmake: ENH: + update for Tcl/Tk 8.5 + +2008-01-24 16:11 king + + * Source/cmSystemTools.cxx: COMP: Cannot do MD5 from KWSys during + CMake bootstrap. + +2008-01-24 14:41 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add + cmSystemTools::ComputeStringMD5 method. + +2008-01-24 14:37 king + + * Source/cmake.cxx: BUG: Make cmake -E remove_directory work when + directory is not present. + +2008-01-24 07:37 king + + * Source/cmFindLibraryCommand.cxx: ENH: Apply new implicit link + directory find_library policy when loading a cache from an + earlier CMake. + +2008-01-24 07:37 king + + * Source/: cmCacheManager.cxx, cmCacheManager.h, cmMakefile.cxx, + cmMakefile.h: ENH: Added cmMakefile::NeedCacheCompatibility + method and support for it in cmCacheManager. This will allow + commands to modify their behavior when running with a cache + loaded from an earlier CMake version. + +2008-01-24 07:31 king + + * Source/CPack/cmCPackDebGenerator.cxx: COMP: Add include of + to get USHRT_MAX constant. + +2008-01-24 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-23 18:34 alex + + * Source/cmReturnCommand.h: STYLE: fix typo + + Alex + +2008-01-23 17:53 king + + * Modules/CMakeCompilerABI.h, Source/cmFindLibraryCommand.cxx: ENH: + Remove sparcv9 architecture subdir added earlier. The new + implicit link directory policy takes care of the problem. + +2008-01-23 17:43 king + + * bootstrap: BUG: Do not have variable and function of the same + name. Old shells do not likeit. + +2008-01-23 16:53 king + + * Source/CursesDialog/CMakeLists.txt: ENH: Simplify code by + removing unnecessary LINK_DIRECTORIES call. + +2008-01-23 16:35 king + + * Modules/CMakeCXXInformation.cmake: BUG: + CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG should get its default value + from CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG, not + CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG. + +2008-01-23 16:27 barre + + * Modules/: FindTCL.cmake, FindTclStub.cmake, FindTclsh.cmake, + FindWish.cmake: ENH: update for Tcl/Tk 8.5 + +2008-01-23 16:21 king + + * Source/: cmFindLibraryCommand.cxx, cmFindLibraryCommand.h: ENH: + Teach find_library to avoid returning library paths in system + directories that may be converted to architecture-specific + directories by the compiler when it invokes the linker. + +2008-01-23 15:56 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h: BUG: Fix cmComputeLinkInformation + cycle detection. + +2008-01-23 15:22 king + + * Modules/VTKCompatibility.cmake, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx: ENH: Added CMAKE_LINK_OLD_PATHS + compatibility mode for linker search paths. + +2008-01-23 14:07 barre + + * Modules/: FindTCL.cmake, FindTclStub.cmake: ENH: keep cleaning up + Tcl/Tk modules + +2008-01-23 13:37 king + + * Source/cmComputeLinkInformation.cxx: COMP: Fix build on Borland + 5.5. + +2008-01-23 13:30 king + + * Modules/Platform/Windows-wcl386.cmake, + Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, Source/cmLocalGenerator.cxx: BUG: + Fix generation of Watcom link lines. + + - Work-around bug in Watcom command line parsing for spaces in + paths. + - Add 'library' option before libraries specified by file path. + +2008-01-23 13:03 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: BUG: + Work-around bug in MSVC 6 command line parsing. + +2008-01-23 12:51 martink + + * Source/cmCTest.cxx: ENH: look for CTestConfiguration.ini first + +2008-01-23 10:29 martink + + * Tests/: CMakeLists.txt, ReturnTest/CMakeLists.txt, + ReturnTest/returnTest.c, ReturnTest/subdir/CMakeLists.txt: ENH: + add testing for return and break commands + +2008-01-23 10:27 martink + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmAddDefinitionsCommand.cxx, + cmAddDefinitionsCommand.h, cmAddDependenciesCommand.cxx, + cmAddDependenciesCommand.h, cmAddExecutableCommand.cxx, + cmAddExecutableCommand.h, cmAddLibraryCommand.cxx, + cmAddLibraryCommand.h, cmAddSubDirectoryCommand.cxx, + cmAddSubDirectoryCommand.h, cmAddTestCommand.cxx, + cmAddTestCommand.h, cmAuxSourceDirectoryCommand.cxx, + cmAuxSourceDirectoryCommand.h, cmBootstrapCommands.cxx, + cmBuildCommand.cxx, cmBuildCommand.h, cmBuildNameCommand.cxx, + cmBuildNameCommand.h, cmCMakeMinimumRequired.cxx, + cmCMakeMinimumRequired.h, cmCPluginAPI.cxx, cmCommand.h, + cmConfigureFileCommand.cxx, cmConfigureFileCommand.h, + cmCreateTestSourceList.cxx, cmCreateTestSourceList.h, + cmDefinePropertyCommand.cxx, cmDefinePropertyCommand.h, + cmElseCommand.cxx, cmElseCommand.h, cmElseIfCommand.cxx, + cmElseIfCommand.h, cmEnableLanguageCommand.cxx, + cmEnableLanguageCommand.h, cmEnableTestingCommand.cxx, + cmEnableTestingCommand.h, cmEndForEachCommand.cxx, + cmEndForEachCommand.h, cmEndFunctionCommand.cxx, + cmEndFunctionCommand.h, cmEndIfCommand.cxx, cmEndIfCommand.h, + cmEndMacroCommand.cxx, cmEndMacroCommand.h, + cmEndWhileCommand.cxx, cmEndWhileCommand.h, + cmExecProgramCommand.cxx, cmExecProgramCommand.h, + cmExecuteProcessCommand.cxx, cmExecuteProcessCommand.h, + cmExportCommand.cxx, cmExportCommand.h, + cmExportLibraryDependencies.cxx, cmExportLibraryDependencies.h, + cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h, + cmFileCommand.cxx, cmFileCommand.h, cmFindLibraryCommand.cxx, + cmFindLibraryCommand.h, cmFindPackageCommand.cxx, + cmFindPackageCommand.h, cmFindPathCommand.cxx, + cmFindPathCommand.h, cmFindProgramCommand.cxx, + cmFindProgramCommand.h, cmForEachCommand.cxx, cmForEachCommand.h, + cmFunctionBlocker.h, cmFunctionCommand.cxx, cmFunctionCommand.h, + cmGetCMakePropertyCommand.cxx, cmGetCMakePropertyCommand.h, + cmGetDirectoryPropertyCommand.cxx, + cmGetDirectoryPropertyCommand.h, + cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, cmGetPropertyCommand.cxx, + cmGetPropertyCommand.h, cmGetSourceFilePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.h, cmGetTargetPropertyCommand.cxx, + cmGetTargetPropertyCommand.h, cmGetTestPropertyCommand.cxx, + cmGetTestPropertyCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeCommand.h, + cmIncludeDirectoryCommand.cxx, cmIncludeDirectoryCommand.h, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallCommand.cxx, + cmInstallCommand.h, cmInstallFilesCommand.cxx, + cmInstallFilesCommand.h, cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.cxx, + cmInstallTargetsCommand.h, cmLinkDirectoriesCommand.cxx, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.h, cmListCommand.cxx, cmListCommand.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h, + cmLoadCommandCommand.cxx, cmLoadCommandCommand.h, + cmMacroCommand.cxx, cmMacroCommand.h, cmMakeDirectoryCommand.cxx, + cmMakeDirectoryCommand.h, cmMakefile.cxx, cmMakefile.h, + cmMarkAsAdvancedCommand.cxx, cmMarkAsAdvancedCommand.h, + cmMathCommand.cxx, cmMathCommand.h, cmMessageCommand.cxx, + cmMessageCommand.h, cmOptionCommand.cxx, cmOptionCommand.h, + cmOutputRequiredFilesCommand.cxx, cmOutputRequiredFilesCommand.h, + cmProjectCommand.cxx, cmProjectCommand.h, cmQTWrapCPPCommand.cxx, + cmQTWrapCPPCommand.h, cmQTWrapUICommand.cxx, cmQTWrapUICommand.h, + cmRemoveCommand.cxx, cmRemoveCommand.h, + cmRemoveDefinitionsCommand.cxx, cmRemoveDefinitionsCommand.h, + cmSeparateArgumentsCommand.cxx, cmSeparateArgumentsCommand.h, + cmSetCommand.cxx, cmSetCommand.h, + cmSetDirectoryPropertiesCommand.cxx, + cmSetDirectoryPropertiesCommand.h, cmSetPropertyCommand.cxx, + cmSetPropertyCommand.h, cmSetSourceFilesPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, + cmSetTargetPropertiesCommand.cxx, cmSetTargetPropertiesCommand.h, + cmSetTestsPropertiesCommand.cxx, cmSetTestsPropertiesCommand.h, + cmSiteNameCommand.cxx, cmSiteNameCommand.h, + cmSourceGroupCommand.cxx, cmSourceGroupCommand.h, + cmStringCommand.cxx, cmStringCommand.h, cmSubdirCommand.cxx, + cmSubdirCommand.h, cmSubdirDependsCommand.cxx, + cmSubdirDependsCommand.h, cmTargetLinkLibrariesCommand.cxx, + cmTargetLinkLibrariesCommand.h, cmTryCompileCommand.cxx, + cmTryCompileCommand.h, cmTryRunCommand.cxx, cmTryRunCommand.h, + cmUseMangledMesaCommand.cxx, cmUseMangledMesaCommand.h, + cmUtilitySourceCommand.cxx, cmUtilitySourceCommand.h, + cmVariableRequiresCommand.cxx, cmVariableRequiresCommand.h, + cmVariableWatchCommand.cxx, cmVariableWatchCommand.h, + cmWhileCommand.cxx, cmWhileCommand.h, cmWriteFileCommand.cxx, + cmWriteFileCommand.h, + CTest/cmCTestEmptyBinaryDirectoryCommand.cxx, + CTest/cmCTestEmptyBinaryDirectoryCommand.h, + CTest/cmCTestHandlerCommand.cxx, CTest/cmCTestHandlerCommand.h, + CTest/cmCTestReadCustomFilesCommand.cxx, + CTest/cmCTestReadCustomFilesCommand.h, + CTest/cmCTestRunScriptCommand.cxx, + CTest/cmCTestRunScriptCommand.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestSleepCommand.cxx, CTest/cmCTestSleepCommand.h, + CTest/cmCTestStartCommand.cxx, CTest/cmCTestStartCommand.h, + CTest/cmCTestTestHandler.cxx, cmBreakCommand.cxx, + cmBreakCommand.h, cmExecutionStatus.h, cmReturnCommand.cxx, + cmReturnCommand.h: ENH: add return and break support to cmake, + also change basic command invocation signature to be able to + return extra informaiton via the cmExecutionStatus class + +2008-01-23 10:21 king + + * Source/cmComputeLinkInformation.cxx: BUG: Be less aggressive + about finding conflicts in the runtime path when the real soname + is not known. + +2008-01-23 09:53 king + + * Modules/CMakeCompilerABI.h, Source/cmFindLibraryCommand.cxx, + Source/cmFindLibraryCommand.h: ENH: Enable library search path + suffix for sparcv9 architecture. This should be generalized to a + platform file later. + +2008-01-23 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-22 10:11 clinton + + * Modules/FindQt4.cmake: ENH: Add macros to handle translations. + Fixes #6229. + +2008-01-22 10:05 king + + * Source/: cmComputeLinkInformation.cxx, + cmComputeLinkInformation.h: BUG: When a library file name is + linked without a path make sure the link type is restored after + the -l option. + +2008-01-22 09:15 king + + * Tests/: CMakeLists.txt, RuntimePath/CMakeLists.txt, + RuntimePath/bar1.c, RuntimePath/bar2.c, RuntimePath/foo1.c, + RuntimePath/foo2.c, RuntimePath/main.c: ENH: Added RuntimePath + test to make sure rpath gets correct order. + +2008-01-22 09:13 king + + * bootstrap, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/Platform/AIX.cmake, Modules/Platform/HP-UX.cmake, + Source/CMakeLists.txt, Source/cmComputeLinkInformation.cxx, + Source/cmComputeLinkInformation.h, + Source/cmDocumentVariables.cxx, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, Source/cmGlobalXCodeGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: Implement + linking with paths to library files instead of -L and -l + separation. See bug #3832 + + - This is purely an implementation improvement. No interface + has changed. + - Create cmComputeLinkInformation class + - Move and re-implement logic from: + cmLocalGenerator::ComputeLinkInformation + cmOrderLinkDirectories + - Link libraries to targets with their full path (if it is + known) + - Dirs specified with link_directories command still added with + -L + - Make link type specific to library names without paths + (name libfoo.a without path becomes -Wl,-Bstatic -lfoo) + - Make directory ordering specific to a runtime path + computation feature + (look for conflicting SONAMEs instead of library names) + - Implement proper rpath support on HP-UX and AIX. + +2008-01-22 08:52 king + + * Source/kwsys/hash_map.hxx.in: COMP: Remove inline keyword from + forward declaration for VS9. + +2008-01-22 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-21 22:48 king + + * Source/cmFindPackageCommand.cxx: ENH: Updated find_package + documentation to describe common usage first. + +2008-01-21 20:57 king + + * Modules/: CMakeDetermineCompilerId.cmake, + CMakeFindBinUtils.cmake: ENH: Cleanup chrpath feature by not + displaying exe format or placing non-advanced options in cache. + +2008-01-21 18:30 king + + * Source/: cmFindLibraryCommand.cxx, cmFindLibraryCommand.h: ENH: + Add support to find_library to transform /lib to /lib32 on some + architectures. + +2008-01-21 18:30 king + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCCompilerABI.c, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXCompilerABI.cpp, Modules/CMakeCompilerABI.h, + Modules/CMakeDetermineCompilerABI.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Source/cmDocumentVariables.cxx: ENH: Generalize the check for + sizeof void* to detect more ABI information. + +2008-01-21 17:29 king + + * Tests/CMakeLists.txt: BUG: Do not get in infinite loop when + checking make tool version in cmake build tree. + +2008-01-21 13:59 king + + * Source/cmTarget.cxx: BUG: Added missing documentation of + LINK_FLAGS_ property. + +2008-01-21 13:04 king + + * Source/cmFindPackageCommand.cxx: COMP: snprintf is not portable. + +2008-01-21 12:56 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-cl.cmake.in, + Source/cmGlobalVisualStudio9Generator.cxx, + Source/cmGlobalVisualStudio9Generator.h: ENH: final 2.4.8 + +2008-01-21 08:48 king + + * Modules/readme.txt, Source/cmFindPackageCommand.cxx, + Source/cmFindPackageCommand.h, + Tests/FindPackageTest/CMakeLists.txt, + Tests/FindPackageTest/FindVersionTestA.cmake, + Tests/FindPackageTest/FindVersionTestB.cmake, + Tests/FindPackageTest/FindVersionTestC.cmake: ENH: Implement + version support in the find_package command module mode. Version + numbers provided to the command are converted to variable + settings to tell the FindXXX.cmake module what version is + requested. This addresses issue #1645. + +2008-01-21 08:01 king + + * Source/kwsys/SystemTools.cxx: COMP: Fix VS6 and old HP build. + This source does not have the #define for hack. + +2008-01-21 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-20 19:29 king + + * Source/: cmFindLibraryCommand.cxx, cmFindPathCommand.cxx, + kwsys/SystemTools.cxx: BUG: Fix previous commit to not access + empty strings out of bounds. + +2008-01-20 17:41 king + + * Source/cmFindLibraryCommand.cxx: BUG: Make sure search paths + never have double-slashes. Leading with two slashes (//) on + cygwin looks like a network path and delays while waiting for a + non-existent machine. This file was left out of the previous + checkin for this problem. + +2008-01-20 17:24 king + + * Source/: cmFindPathCommand.cxx, kwsys/SystemTools.cxx: BUG: Make + sure search paths never have double-slashes. Leading with two + slashes (//) on cygwin looks like a network path and delays while + waiting for a non-existent machine. + +2008-01-20 16:02 king + + * Modules/FindX11.cmake: BUG: FindX11 module should search for SM + library instead of returning -lSM. + +2008-01-20 13:36 king + + * Source/cmake.cxx: COMP: Fix build during bootstrap on MSys. + +2008-01-20 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-19 15:09 martink + + * Source/: cmLocalGenerator.cxx, CTest/cmCTestTestHandler.cxx: ENH: + improve backwards compatibility + +2008-01-19 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-18 19:02 barre + + * Modules/: FindTCL.cmake, FindTclsh.cmake, FindWish.cmake: ENH: + Tcl/Tk 8.6 alpha schedule for May 2008. + +2008-01-18 18:40 king + + * Source/cmDependsFortran.cxx: COMP: Fix build on Borland 5.5. + +2008-01-18 17:11 alex + + * Source/cmMakefile.cxx: BUG: don't crash if + cmMakefile::RaiseScope() is called from a cmake file in the top + level directory in normal code (i.e. not within a function) + + Alex + +2008-01-18 16:06 hoffman + + * Modules/Platform/Windows-cl.cmake.in: ENH: make sure msvc90 gets + set + +2008-01-18 15:52 alex + + * Modules/CMakeDetermineCompilerId.cmake, + Modules/FindwxWidgets.cmake, Source/cmBootstrapCommands.cxx, + Source/cmRaiseScopeCommand.cxx, Source/cmRaiseScopeCommand.h, + Source/cmSetCommand.cxx, Source/cmSetCommand.h, + Tests/FunctionTest/CMakeLists.txt, Tests/FunctionTest/Util.cmake, + Tests/FunctionTest/SubDirScope/CMakeLists.txt: ENH: remove + RAISE_SCOPE() again and instead add SET( + PARENT_SCOPE) + + Alex + +2008-01-18 15:19 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: make sure MSVC90 is set + +2008-01-18 14:34 hoffman + + * Source/: cmGlobalVisualStudio9Generator.cxx, + cmGlobalVisualStudio9Generator.h: ENH: add MSVC90 define to vs9 + ide + +2008-01-18 14:02 barre + + * Modules/: FindTCL.cmake, FindTclsh.cmake, FindWish.cmake: ENH: + cleanup FindPerl and FindTcl (use ActiveState CurrentVersion, and + support Tcl/Tk 8.5) + +2008-01-18 13:51 barre + + * Modules/: FindTclsh.cmake, FindWish.cmake: ENH: cleanup FindPerl + and FindTcl (use ActiveState CurrentVersion, and support Tcl/Tk + 8.5) + +2008-01-18 13:46 barre + + * Modules/: FindTCL.cmake, FindTclsh.cmake, FindWish.cmake: ENH: + cleanup FindPerl and FindTcl (use ActiveState CurrentVersion, and + support Tcl/Tk 8.5) + +2008-01-18 13:15 barre + + * Modules/: FindPerl.cmake, FindTCL.cmake, FindTclsh.cmake, + FindWish.cmake: ENH: cleanup FindPerl and FindTcl (use + ActiveState CurrentVersion, and support Tcl/Tk 8.5) + +2008-01-18 12:26 martink + + * Source/cmMacroCommand.h: STYLE: fix bug 5682 + +2008-01-18 10:25 martink + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator3.cxx, + cmake.cxx, CTest/cmCTestTestHandler.cxx: BUG: fix bugs 5539 + (progress going beyond 100% when new files are added) and 5889 + (tests are not found in some cases when using add_subdirectory to + .. etc) + +2008-01-18 08:35 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Construction of + COMPILE_DEFINITIONS_ property name must use upper-case + config name. + +2008-01-18 08:19 king + + * Source/cmFindPackageCommand.cxx: STYLE: Fix line-too-long. + +2008-01-18 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-17 20:59 king + + * Source/cmFindPackageCommand.cxx: ENH: Clarify documentation of + find_package command. + +2008-01-17 20:34 king + + * Source/cmMakefile.cxx, Tests/Complex/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: Make + per-configuration COMPILE_DEFINITIONS_ directory property + initialized from parent. + +2008-01-17 19:58 king + + * Modules/CMakeFortranInformation.cmake, + Modules/Platform/Windows-ifort.cmake, + Source/cmDependsFortran.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Enable use of + COMPILE_DEFINITIONS property for Fortran sources. + +2008-01-17 19:50 king + + * Source/cmMakefile.cxx: BUG: COMPILE_DEFINITIONS directory + property needs to be inherited from parent when a directory is + created. + +2008-01-17 19:29 king + + * Source/cmAddDefinitionsCommand.h, + Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmMakefileTargetGenerator.cxx, + Source/cmRemoveDefinitionsCommand.h, + Tests/Preprocess/CMakeLists.txt, Tests/Preprocess/preprocess.c, + Tests/Preprocess/preprocess.cxx: ENH: Converted cmMakefile + DefineFlags added by ADD_DEFINITIONS command into a + COMPILE_DEFINITIONS directory property. + +2008-01-17 18:13 king + + * Source/: cmMakefile.cxx, cmMakefile.h, cmProperty.cxx, + cmProperty.h, cmPropertyMap.cxx, cmPropertyMap.h, + cmSetPropertyCommand.cxx, cmSetPropertyCommand.h, + cmSourceFile.cxx, cmSourceFile.h, cmTarget.cxx, cmTarget.h, + cmTest.cxx, cmTest.h, cmake.cxx, cmake.h: ENH: Add AppendProperty + methods for use by C++ code in CMake. Simplify implementation of + SET_PROPERTY command by using them. + +2008-01-17 17:49 alex + + * Source/cmFindBase.cxx: STYLE: PATHS is optional (#6253) + + Alex + +2008-01-17 17:43 alex + + * Source/cmFindBase.cxx: STYLE: fix typo (#6252) + + Alex + +2008-01-17 17:34 king + + * Tests/Preprocess/CMakeLists.txt: ENH: Use new set_property + signature to set COMPILE_DEFINITIONS properties in Preprocess + test. + +2008-01-17 17:19 king + + * Modules/CPackDeb.cmake, Modules/FeatureSummary.cmake, + Modules/FindPythonLibs.cmake, Source/cmGetPropertyCommand.cxx, + Source/cmGetPropertyCommand.h, Tests/Properties/CMakeLists.txt: + ENH: Changed signature of GET_PROPERTY command to be more + powerful and extendible. + +2008-01-17 16:24 king + + * Source/cmSetPropertyCommand.cxx: COMP: Fix VS build. + +2008-01-17 15:54 king + + * Modules/CMakeGenericSystem.cmake, Modules/FeatureSummary.cmake, + Modules/Platform/BlueGeneL.cmake, + Modules/Platform/Catamount.cmake, Modules/Platform/Generic.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/UnixPaths.cmake, + Modules/Platform/eCos.cmake, Source/cmBootstrapCommands.cxx, + Source/cmSetPropertiesCommand.cxx, + Source/cmSetPropertiesCommand.h, Source/cmSetPropertyCommand.cxx, + Source/cmSetPropertyCommand.h, Tests/DocTest/CMakeLists.txt, + Tests/Properties/CMakeLists.txt: ENH: Rename SET_PROPERITES + command to SET_PROPERTY and give it a more powerful signature. + +2008-01-17 12:44 martink + + * Source/: cmLocalGenerator.cxx, ctest.cxx, + CTest/cmCTestTestHandler.cxx: ENH: use CTestTestfile.txt + +2008-01-17 12:35 martink + + * Source/cmEnableTestingCommand.h: ENH: remove unused prototype + +2008-01-17 10:35 king + + * bootstrap: COMP: The find_package command needs more of kwsys. + Added String.h, String.c, and auto_ptr.hxx to bootstrapping + kwsys. + +2008-01-17 10:32 king + + * Source/cmFindPackageCommand.cxx: COMP: Fix warning about missing + virtual destructor. + +2008-01-17 10:26 martink + + * Tests/Tutorial/Step7/: CMakeLists.txt, CTestConfig.cmake: STYLE: + change case to match book + +2008-01-17 10:00 king + + * Modules/Platform/xlf.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmMakefileTargetGenerator.cxx: ENH: Enable + CMAKE__DEFINE_FLAG for COMPILE_DEFINITIONS property + implementation. + +2008-01-17 09:06 king + + * Tests/FindPackageTest/: CMakeLists.txt, + TApp.app/Contents/Resources/TAppConfig.cmake, + TApp.app/Contents/Resources/cmake/tapp-config.cmake, + TFramework.framework/Versions/A/Resources/tframework-config.cmake, + TFramework.framework/Versions/A/Resources/CMake/TFrameworkConfig.cmake, + lib/Bar/BarConfig.cmake, lib/Bar/cmake/bar-config.cmake, + lib/TApp/TAppConfig.cmake, lib/foo-1.2/foo-config.cmake, + lib/foo-1.2/CMake/FooConfig.cmake, + lib/suffix/test/SuffixTestConfig.cmake: ENH: Updated + FindPackageTest to test new find_package command features. + +2008-01-17 09:02 king + + * Source/: cmBootstrapCommands.cxx, cmFindBase.cxx, cmFindBase.h, + cmFindCommon.cxx, cmFindCommon.h, cmFindLibraryCommand.cxx, + cmFindPackageCommand.cxx, cmFindPackageCommand.h, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx: ENH: Major + improvements to the FIND_PACKAGE command. See bug #3659. + + - Use CMAKE_PREFIX_PATH and CMAKE_SYSTEM_PREFIX_PATH among + other means + to locate package configuration files. + - Create cmFindCommon as base for cmFindBase and + cmFindPackageCommand + - Move common functionality up to cmFindCommon + - Improve documentation of FIND_* commands. + - Fix FIND_* commands to not add framework/app paths in wrong + place. + +2008-01-17 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-16 11:53 karthik + + * Docs/: cmake-indent.vim, cmake-syntax.vim: ENH: + + + ~/CMake/src/Docs * Additions for cmake-command + highligting. * Additions for operator-highlighting + +2008-01-16 11:24 king + + * Source/cmListCommand.cxx: ENH: Allow LIST(APPEND) command to + append nothing. + +2008-01-16 10:04 david.cole + + * Modules/FindJNI.cmake: BUG: Eliminate message - it pops up an + annoying dialog whenever you run CMakeSetup in a project with + java wrapping turned on. + +2008-01-16 09:51 king + + * Modules/Platform/: Darwin.cmake, UnixPaths.cmake, + WindowsPaths.cmake, syllable.cmake: ENH: Convert Modules/Platform + specification of system search paths to use + CMAKE_SYSTEM_PREFIX_PATH when possible. + +2008-01-16 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-15 21:20 king + + * Modules/: FindFreetype.cmake, FindGDAL.cmake, FindGIF.cmake, + FindLua50.cmake, FindLua51.cmake, FindOpenAL.cmake, + FindOpenThreads.cmake, FindPhysFS.cmake, FindProducer.cmake, + FindQuickTime.cmake, FindSDL.cmake, FindSDL_image.cmake, + FindSDL_mixer.cmake, FindSDL_net.cmake, FindSDL_ttf.cmake, + Findosg.cmake, FindosgDB.cmake, FindosgFX.cmake, FindosgGA.cmake, + FindosgIntrospection.cmake, FindosgManipulator.cmake, + FindosgParticle.cmake, FindosgProducer.cmake, + FindosgShadow.cmake, FindosgSim.cmake, FindosgTerrain.cmake, + FindosgText.cmake, FindosgUtil.cmake, FindosgViewer.cmake: BUG: + Remove references to CMAKE_PREFIX_PATH variable. It should not + be referenced directly by FIND_* command calls. The commands + search it automatically. + +2008-01-15 21:02 king + + * Source/cmGlobalXCodeGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmSourceFile.cxx, + Source/cmTarget.cxx, Tests/Preprocess/CMakeLists.txt: ENH: + Renamed _COMPILE_DEFINITIONS to + COMPILE_DEFINITIONS_ for better documentation clarity. + +2008-01-15 19:56 alex + + * Modules/CMakeFindBinUtils.cmake: STYLE: fix infinished comment + + Alex + +2008-01-15 17:02 hoffman + + * CMakeCPackOptions.cmake.in: ENH: fix add/remove program name + +2008-01-15 16:02 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudioGenerator.cxx, + Source/MFCDialog/CMakeLists.txt, + Source/MFCDialog/CMakeSetupManifest.xml: ENH: move more stuff + over and get vs 9 working + +2008-01-15 14:19 hoffman + + * Modules/Platform/SunOS.cmake: BUG: fix for bug 6231, bad regex + for sunos, worked by chance, but better to have it right + +2008-01-15 14:00 hoffman + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmLocalVisualStudioGenerator.cxx, QtDialog/README: ENH: remove + patch as directory change was already fixed + +2008-01-15 11:56 hoffman + + * Source/cmLocalVisualStudioGenerator.cxx: BUG: fix for bug 6234, + use cd /d so that drives can be changed. + +2008-01-15 10:49 king + + * Source/cmake.cxx: ENH: Added partial implementation of + recognizing per-configration properties. + +2008-01-15 10:49 king + + * Source/: cmSourceFile.cxx, cmTarget.cxx: ENH: Add explicit + documentation entry for configuration-specific + _COMPILE_DEFINITIONS. + +2008-01-15 10:38 king + + * Tests/DocTest/DocTest.cxx: BUG: Add newline between properties. + +2008-01-15 09:09 king + + * Tests/Preprocess/CMakeLists.txt: BUG: Test needs ansi C code + support. + +2008-01-15 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-14 19:20 alex + + * Docs/: cmake-indent.vim, cmake-syntax.vim: BUG: fix vim + highlighting, see #6238 + + Alex + +2008-01-14 19:02 alex + + * Modules/CMakeFindBinUtils.cmake: BUG: according to the binutils + mailing list chrpath doesn't work when cross compiling + + Alex + +2008-01-14 17:19 alex + + * Modules/FindSubversion.cmake: BUG: set LC_ALL to C, so message + from svn are not translated, which can lead to problems (since + the output is parsed, which fails then) + + Brad, Bill, can you think of any reasons this change might create + problems ? + + Alex + +2008-01-14 17:05 alex + + * Source/cmDocumentation.cxx: BUG: make -help-module-list work by + filling the modules section first, also for custom modules + + Alex + +2008-01-14 11:21 king + + * Tests/Preprocess/CMakeLists.txt: BUG: Disable semicolon test on + VS 7.0. + +2008-01-14 11:07 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fix warning about + backslash at end of c++ comment. + +2008-01-14 09:20 king + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, Modules/Platform/AIX.cmake, + Modules/Platform/Generic-SDCC-C.cmake, + Modules/Platform/QNX.cmake, Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-icl.cmake, + Modules/Platform/Windows-wcl386.cmake, Modules/Platform/cl.cmake, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMakefileTargetGenerator.cxx, Source/cmSourceFile.cxx, + Source/cmTarget.cxx, Tests/CMakeLists.txt, + Tests/Preprocess/CMakeLists.txt, Tests/Preprocess/file_def.h, + Tests/Preprocess/preprocess.c, Tests/Preprocess/preprocess.cxx, + Tests/Preprocess/preprocess.h.in, + Tests/Preprocess/preprocess_vs6.cxx, + Tests/Preprocess/target_def.h: ENH: Create COMPILE_DEFINITIONS + property for targets and source files. Create + _COMPILE_DEFINITIONS property as per-configuration + version. Add Preprocess test to test the feature. Document + limitations on Xcode and VS6 generators. + +2008-01-14 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-13 16:59 king + + * Source/cmLocalGenerator.cxx: BUG: Removed stray debugging + statement. + +2008-01-13 16:36 king + + * Source/: cmGlobalNMakeMakefileGenerator.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio7Generator.cxx, kwsys/System.c, + kwsys/System.h.in: ENH: Improved escaping in kwsys/System. Added + escape of % for NMake. Added escape of ; for the VS IDE. + +2008-01-13 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-12 09:52 king + + * Source/kwsys/SystemTools.cxx: COMP: Fix build on borland. + +2008-01-12 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-11 17:37 hoffman + + * Modules/Platform/: AIX-VisualAge-Fortran.cmake, + Linux-VisualAge-Fortran.cmake, xlf.cmake: ENH: add support for + xlf with -WF,-D for -D + +2008-01-11 13:00 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: add + CMAKE_DEFINE_FLAG_(LANG) that can replace -D flags with what the + compiler actually uses + +2008-01-11 12:40 clinton + + * Modules/FindQt4.cmake: ENH: For moc commands on Windows, use + @param_file method to allow arguments longer than Windows' + command length limitation. Fixes #6221. + +2008-01-11 10:36 david.cole + + * Source/kwsys/SystemTools.cxx: ENH: Merge changes from main tree + into VTK-5-0 branch. (Selected Utilities/kwsys/SystemTools.cxx + fixes for KWWidgets file browser dialog) + +2008-01-11 08:33 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + SystemTools::SplitPathRootComponent and re-implement SplitPath to + use it. Add better treatment of user home directory paths. + +2008-01-11 08:30 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/CMakeVS9FindMake.cmake, + Source/cmInstallTargetGenerator.cxx: ENH: push a few more changes + to 2.4.8 + +2008-01-11 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-10 21:42 david.cole + + * Source/kwsys/SystemTools.cxx: ENH: Merge changes from main tree + into VTK-5-0 branch. (cvs -q up -j1.205 -j1.206 + Utilities/kwsys/SystemTools.cxx) + +2008-01-10 18:52 alex + + * Modules/FindBoost.cmake: BUG: it seems on some installations + boost is installed under boost-1_34 , see #5030 + + FindBoost.cmake recommends using LINK_DIRECTORIES(), is this + really good ? + + Alex + +2008-01-10 18:32 king + + * Source/kwsys/ProcessUNIX.c: BUG: Fix hang in Process_Kill on OS X + caused by an OS bug in which a pipe read end cannot be closed if + the pipe write end is open, the pipe is full, and another process + is blocking waiting to write. Work around the problem by killing + the children before closing the pipes. + +2008-01-10 16:22 hoffman + + * Modules/FindSWIG.cmake: BUG: fix for bug 4145 much better + findSwig + +2008-01-10 15:17 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, + cmInstallTargetGenerator.cxx: BUG: fix for bug 6193, fix xcode + depend helper + +2008-01-10 14:47 king + + * Modules/Platform/Linux-VisualAge-C.cmake: BUG: Removed stray + debugging message. + +2008-01-10 14:47 king + + * Modules/CMakeLists.txt: BUG: Need to install fortran compiler id + source. + +2008-01-10 11:58 king + + * Modules/CMakeFortranCompilerId.F90: STYLE: Move VisualAge id + macro to correct block. + +2008-01-10 10:50 hoffman + + * Modules/: CMakeFortranCompilerId.F90, + Platform/Linux-VisualAge-C.cmake, + Platform/Linux-VisualAge-Fortran.cmake: ENH: add support for + visual age fortran on linux + +2008-01-10 09:46 king + + * Source/cmDependsFortran.cxx: COMP: Fix build on VS6. + +2008-01-10 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-09 22:09 perera + + * Source/: cmAddExecutableCommand.h, cmConfigureFileCommand.h, + cmDocumentation.cxx, cmEnableLanguageCommand.h, cmFindBase.cxx, + cmMakefile.cxx, cmSourceFile.cxx, cmStringCommand.h, + cmTarget.cxx, cmTest.cxx, cmTryCompileCommand.h, + cmVariableWatchCommand.h, cmWhileCommand.h: STYLE: Spelling fixes + on documentation + +2008-01-09 16:59 alex + + * Source/cmDocumentation.cxx: ENH: sort the module files + alphabetically when generating the documentation of rht modules + + Alex + +2008-01-09 10:30 king + + * Modules/Platform/Windows-ifort.cmake, + Source/cmDependsFortran.cxx, Source/cmDependsFortran.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Tests/Fortran/CMakeLists.txt, Tests/Fortran/test_preprocess.F90: + ENH: Patch from Maik to add preprocessor directive handling to + Fortran dependency scanning. Also added -fpp flag to Intel + Fortran compiler on Windows by default. + +2008-01-09 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-08 17:51 hoffman + + * Source/kwsys/: SystemInformation.cxx, SystemInformation.hxx.in: + ENH: figure out long long value + +2008-01-08 17:20 hoffman + + * Source/kwsys/SystemInformation.cxx: ENH: fix lots of warnings + +2008-01-08 16:40 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/CPack.cmake: ENH: + remove relocate option in mac installer as it is broken + +2008-01-08 16:28 hoffman + + * Source/kwsys/CMakeLists.txt: ENH: turn off for now + +2008-01-08 14:59 hoffman + + * Source/kwsys/: CMakeLists.txt, SystemInformation.cxx, + SystemInformation.hxx.in: ENH: fix leaks and turn on by default + +2008-01-08 11:43 hoffman + + * Source/kwsys/: CMakeLists.txt, testSystemInformation.cxx: ENH: + add missing file + +2008-01-08 11:38 hoffman + + * Source/kwsys/: CMakeLists.txt, SystemInformation.cxx, + SystemInformation.hxx.in: ENH: add new system information class + for use in ctest + +2008-01-08 11:06 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindQt4.cmake: ENH: + last change for 2.4.8 branch, I hope, fix for findqt + +2008-01-08 08:25 hoffman + + * Source/cmDependsFortran.cxx: BUG: make it compile on vs 6 + +2008-01-08 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-07 23:08 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + BUG: Fix parsing of fortran include directives during dependency + scanning. Previously only #include worked but not just include. + +2008-01-07 16:12 king + + * Modules/CMakeJavaCompiler.cmake.in, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmMakefileTargetGenerator.cxx: BUG: Restore old interface + of "make foo.o" and "make foo.i" even though object file names + now include source extensions. For Java we also need to always + remove the source extension (.java -> .class). This fixes the + re-opening of bug #6169. + +2008-01-07 14:52 alex + + * Source/cmFileCommand.cxx: BUG: with cmake 2.4 INSTALL_FILES() + with no files was accepted by cmake, with cmake cvs without this + patch an invalid cmake_install.cmake script was generated in this + case, it failed with an error if no files were given. So just do + nothing if no files are listed to make it compatible. + + http://lists.kde.org/?l=kde-commits&m=119965185114478&w=2 + + Alex + +2008-01-07 11:36 king + + * Source/cmDependsFortran.cxx: ENH: Changes based on patch from + Maik for better cmDependsFortran::ModulesDiffer. + +2008-01-07 10:27 king + + * Modules/: CMakeDetermineCompilerId.cmake, + CMakeDetermineFortranCompiler.cmake: ENH: Add support to + CMAKE_DETERMINE_COMPILER_ID macro to try building the id source + more than once with different extra flags added to the compiler. + Use the support to correctly identify the Intel Fortran compiler + on windows which does not preprocess by default without special + flags. + +2008-01-07 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-06 17:18 alex + + * Source/cmFindBase.cxx: BUG: fix #6105, if a directory inside + CMAKE_FIND_ROOT_PATH is given to a FIND_XXX() command, don't + prepend the root to it (since it is already in this root) + + Alex + +2008-01-06 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-05 20:37 miguelf + + * Modules/FindwxWidgets.cmake: BUG: Support cross-compiling; + wx-config should be searched for in target platform ONLY (bug + 6187). + +2008-01-05 11:19 miguelf + + * Modules/FindwxWidgets.cmake: ENH: Generalized the + WXWIDGETS_ADD_RESOURCES to support header generation, xrs file + generation, and other options (BUG: 6162). + +2008-01-05 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-04 14:22 king + + * Source/cmFileCommand.cxx: BUG: File installation should overwrite + the destination if the file times differ at all rather than only + if the source file is newer. Users expect installation to + overwrite destination files. This addresses the re-opening of + bug#3349. + +2008-01-04 12:38 alex + + * Modules/: FindFreetype.cmake, FindGIF.cmake: ENH: rename + variables from GIFLIB_* to GIF_* -add standard QUIET and REQUIRED + handling -add GIF_LIBRARIES variable as readme.txt says -add name + giflib to the names for the gif library -remove some unnecessary + search paths for the lib (they are already part of the standard + search paths, see Modules/Platform/UnixPaths.cmake) + -FindFreetype.cmake: use PATH_SUFFIXES include again for the + headers with the CMAKE_PREFIX_PATH variable + + Alex + +2008-01-04 12:29 alex + + * Modules/: FindGIF.cmake, FindGIFLIB.cmake: STYLE: rename + FindGIFLIB.cmake to FindGIF.cmake, as discussed with Eric + + Alex + +2008-01-04 11:56 alex + + * Modules/FindX11.cmake: BUG: fix spelling of the xf86misc and + xf86vmode variables + + Alex + +2008-01-04 11:42 ewing + + * Modules/FindOpenAL.cmake: ENH: Added all lowercase 'openal' to + library search names in hopes of addressing bug 6201 (won't + detect on Gentoo). + +2008-01-04 07:29 alex + + * Modules/FindFreetype.cmake: STYLE: use + FIND_PACKAGE_HANDLE_STANDARD_ARGS() to handle QUIET and REQUIRED + -remove some unnecessary search paths (they are part of the + default paths) -don't use PATH_SUFFIXES for include/ when + searching for a header, that's very uncommon style -add + FREETYPE_LIBRARIES as the variable which should be used by the + user (as documented in readme.txt) + + Alex + +2008-01-04 07:25 alex + + * Modules/: FindFreeType.cmake, FindFreetype.cmake: STYLE: renamed + FindFreeType.cmake to FindFreetype.cmake to make it more + compatible with the one in KDE4 + + Alex + +2008-01-04 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-03 11:21 martink + + * Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmRaiseScopeCommand.cxx, Source/cmRaiseScopeCommand.h, + Tests/FunctionTest/CMakeLists.txt, + Tests/FunctionTest/SubDirScope/CMakeLists.txt, + Tests/FunctionTest/Util.cmake: ENH: change raise_scope signature + to be safer for returned varuables + +2008-01-03 09:40 king + + * Source/cmFileCommand.cxx: STYLE: Fix line-too-long. + +2008-01-03 07:28 hoffman + + * Source/cmake.cxx: BUG: fix resource file with a full path + +2008-01-03 04:19 alex + + * Source/cmFileCommand.cxx: COMP: fix build on Windows with gcc, + patch from Maik Beckmann + + Alex + +2008-01-03 00:01 king + + * Source/: cmFileTimeComparison.cxx, cmFileTimeComparison.h: ENH: + Add method cmFileTimeComparison::FileTimesDiffer to check if file + times differ by 1 second or more. + +2008-01-03 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-02 18:30 king + + * Source/cmDependsFortran.cxx: ENH: Cleanup Fortran build + directories by placing module stamp files in the target directory + that builds them. This is actually a simpler implementation + anyway. + +2008-01-02 18:00 king + + * Tests/StringFileTest/CMakeLists.txt: ENH: Add test for FILE(READ + ...HEX). + +2008-01-02 17:49 king + + * Source/cmMakefile.cxx, Tests/FunctionTest/CMakeLists.txt, + Tests/FunctionTest/SubDirScope/CMakeLists.txt: BUG: Make + RAISE_SCOPE function work when variable is not defined. + +2008-01-02 17:32 king + + * Docs/cmake-mode.el: ENH: Enable indentation of + FUNCTION/ENDFUNCTION blocks in emacs. + +2008-01-02 17:12 hoffman + + * Modules/UseSWIG.cmake: BUG: fix for bug 6151 + +2008-01-02 16:53 alex + + * Source/cmTarget.cxx: ENH: only allow usage of chrpath if the + executable file format is ELF + + Alex + +2008-01-02 16:52 alex + + * Modules/: CMakeDetermineCompilerId.cmake, + CMakeFindBinUtils.cmake: ENH: check the magic code of the + executable file to determine the executable file format. Tested + for ELF on x86 Linux, COFF and Mach-O prepared but commented out + since I don't have such systems available. Please have a look a + CMakeDetermineCompilerId.cmake and enable the test for them too. + + Only add the option for using chrpath if the executable format is + ELF + + Alex + +2008-01-02 16:46 alex + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: add the + keywords OFFSET and HEX to the FILE() command, using OFFSET an + offset can be specified where the reading starts, and using HEX + the data can be converted into a hex string, so binary data can + be compared with text functions -add docs for LIMIT, OFFSET and + HEX + + Alex + +2008-01-02 15:55 king + + * Source/cmGlobalVisualStudio8Generator.cxx: STYLE: Fixed + line-too-long. + +2008-01-02 15:53 king + + * Source/cmGlobalVisualStudio8Generator.cxx: BUG: Do not use + VSMacros stuff for VS8sp0 because macros do not work in that + version. + +2008-01-02 15:17 king + + * Source/cmFileCommand.cxx, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Added FILES_MATCHING + option to INSTALL(DIRECTORY). This will help install a tree of + header files while ignoring non-headers. + +2008-01-02 12:32 alex + + * Modules/FindRuby.cmake: ENH: add more ruby paths: sitearch, + sitelib, vendorarch, vendorlib (#5531) -make these variables + cached and ADVANCED -remove unused QUIETLY code -document + RUBY_LIBRARY + + Alex + +2008-01-02 11:43 alex + + * Modules/FindRuby.cmake: BUG: make FindRuby work with the libs for + MSVC, which can have additional pre- and suffixes (#5642) + + Alex + +2008-01-02 11:08 hoffman + + * Source/cmAuxSourceDirectoryCommand.cxx: BUG: fix for bug 6197, + absolute paths were not supported + +2008-01-02 11:04 king + + * Source/: cmDependsFortran.cxx, cmDependsFortran.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Make the Fortran compiler + id available to cmDependsFortran at scanning and module timestamp + copy time. + +2008-01-02 10:56 hoffman + + * Source/cmListCommand.h: BUG: fix for bug 6207 explain list index + values better + +2008-01-02 09:32 hoffman + + * Source/cmake.cxx: ENH: fix new incremental link stuff to work + with nmake @ files + +2008-01-02 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2008-01-01 17:19 hoffman + + * Source/cmake.cxx: ENH: remove warning + +2008-01-01 15:13 hoffman + + * Modules/CMakeVCManifest.cmake, Modules/CMakeVCManifestExe.cmake, + Modules/Platform/Windows-cl.cmake, Source/cmMakefile.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmake.cxx, Source/cmake.h: ENH: add ability to have + manifest files and incremental linking with make and nmake + +2008-01-01 10:54 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Fix SimpleInstall test to + work with new dependency of package on all. + +2008-01-01 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-31 17:29 david.cole + + * Source/cmGlobalGenerator.cxx: ENH: Add a dependency from the + PACKAGE target to the ALL target so that "make package" will + first (essentially) do a "make all"... A similar chunk of code + already existed for the make install target. This change makes it + easy to build an installer package as part of a dashboard run + simply by setting CTEST_BUILD_TARGET to "package". + +2007-12-31 11:25 king + + * Source/: cmDependsFortran.cxx, cmDependsFortran.h: ENH: Changes + based on patch from Maik Beckmann to copy fortran modules to + timestamps only if they have really changed. This optimization + should reduce extra rebuilds caused by dependencies on modules + whose providers have recompiled but whose interfaces have not + changed. + +2007-12-31 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-30 16:34 king + + * Modules/Platform/SunOS-SunPro-Fortran.cmake: ENH: Add SunPro + fortran module flags on SunOS. + +2007-12-30 16:11 king + + * Modules/Platform/Linux-GNU-Fortran.cmake, + Modules/Platform/Linux-SunPro-Fortran.cmake, + Modules/Platform/Linux-ifort.cmake, Source/cmDependsFortran.cxx, + Source/cmDependsFortran.h, Source/cmDocumentVariables.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, Source/cmTarget.cxx, + Tests/Fortran/CMakeLists.txt, + Tests/Fortran/Executable/CMakeLists.txt, + Tests/Fortran/Library/CMakeLists.txt: ENH: Implemented Fortran + module output directory and search path flags. + +2007-12-30 12:23 king + + * Source/cmDependsFortran.cxx: ENH: Simplify Fortran module proxy + dependency implementation by removing unnecessary target. + +2007-12-30 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-29 11:53 alex + + * Source/cmDocumentation.cxx: BUG: create modules documentation not + only for the first documentation creation step in cmake (the set + ModulesFound wasn't cleared at the beginning of each + PrintDocumentation() function, so when documentation for modules + was executed the second time, ModulesFound already contained all + modules and so no module was documented) + + Alex + +2007-12-29 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-28 23:07 king + + * Source/cmLocalGenerator.cxx, Tests/ExternalOBJ/CMakeLists.txt, + Tests/MakeClean/ToClean/CMakeLists.txt: BUG: Do not remove the + source file extension when computing an object file name. This + addresses bug #6169. If CMAKE_BACKWARDS_COMPATIBILITY is 2.4 or + lower maintain the old behavior so that existing build trees and + old project releases are not affected. + +2007-12-28 23:07 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmStandardIncludes.h: ENH: Added method + cmLocalGenerator::GetBackwardsCompatibility to reduce parsing of + CMAKE_BACKWARDS_COMPATIBILITY variable. Add + cmLocalGenerator::NeedBackwardsCompatibility to simplify checks + for compatibility requirements. + +2007-12-28 22:53 king + + * Tests/Fortran/CMakeLists.txt: BUG: Disable test of fortran module + dependencies except on GNU for now. A module path feature is + needed for Sun support because it uses -M instead of -I for the + module search path. + +2007-12-28 22:29 king + + * Source/cmDependsFortran.cxx: COMP: Fix uninitialized variable and + unused parameter warnings. + +2007-12-28 14:59 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h: ENH: + Simplified and moved link script implementation up from + cmMakefileLibraryTargetGenerator to cmMakefileTargetGenerator and + use for cmMakefileExecutableTargetGenerator too. This addresses + bug #6192. + +2007-12-28 13:20 hoffman + + * CMakeLists.txt, ChangeLog.manual, MacInstallReadme.txt: ENH: add + some descriptive text for mac installer + +2007-12-28 12:01 king + + * Source/cmFindBase.cxx: ENH: Make FIND_* commands look in the + CMAKE_PREFIX_PATH directories directly after looking in each + command's specific subdirectory (/include, /lib, or /bin). This + may be useful on Windows where projects could be installed in a + single directory. See issue #4947. + +2007-12-28 11:50 king + + * Tests/Fortran/: CMakeLists.txt, Executable/CMakeLists.txt, + Executable/main.f90, External/CMakeLists.txt, External/a.f90: + ENH: Add tests of Fortran module dependencies across directories + and on external modules. Tests based on cases provided by Maik + in issue #5809. + +2007-12-28 11:50 king + + * Source/: cmDependsFortran.cxx, cmLocalUnixMakefileGenerator3.cxx: + ENH: Add per-language clean rule generation to cmake_clean.cmake + files to include cmake_clean_.cmake files generated by + dependency scanning. Add Fortran module file and timestamp + cleaning rules. + +2007-12-28 11:49 king + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsFortran.cxx, + cmDependsFortran.h: ENH: Implement Fortran module dependencies + across targets and directories. - See issue #5809 - Keep + information about all sources in the target until deps are + written - Create a fortran.internal file after scanning that + lists modules provided - Load fortran.internal files from + linked targets to find modules - Search the include path for + external modules - Create file-level deps on in-project module + timestamps or external mods + +2007-12-28 11:49 king + + * Source/cmMakefileTargetGenerator.cxx: ENH: Store in + DependInfo.cmake files a list of the corresponding files for the + targets to which a target links. This is useful for locating + Fortran modules provided by linked targets. See issue #5809. + +2007-12-28 09:49 hoffman + + * ChangeLog.manual, Modules/CPack.Info.plist.in, + Modules/CPack.cmake: ENH: move over mac package change + +2007-12-28 09:34 hoffman + + * CMakeLists.txt, ChangeLog.manual: ENH: ooppss there is no 2.4.9 + +2007-12-28 09:11 hoffman + + * CMakeLists.txt, ChangeLog.manual: ENH: make a new version number + +2007-12-28 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-27 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-26 16:57 david.cole + + * CMakeCPackOptions.cmake.in, Modules/CPack.Info.plist.in, + Modules/CPack.cmake: ENH: Give Mac installers package relocation + capability. Default location is still the same for backwards + compatibility, but packages will now be relocatable by default + like they are on Windows via the NSIS installer. New CPack + variables for controlling this functionality are + CPACK_PACKAGE_DEFAULT_LOCATION and CPACK_PACKAGE_RELOCATABLE. + +2007-12-26 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-25 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-24 11:15 king + + * Source/cmGlobalGenerator.cxx: COMP: Fix build on VS6. + +2007-12-24 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-23 19:03 king + + * Source/cmLinkDirectoriesCommand.h: ENH: Clarify documentation of + link_directories command for bug#6199. + +2007-12-23 15:03 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmTarget.h: ENH: Moved global + inter-target dependency analysis and cycle-prevention code up + from cmGlobalUnixMakefileGenerator3 to cmGlobalGenerator. + Simplified cmGlobalUnixMakefileGenerator3 to use it. Later other + generators may be modified to use it also. + +2007-12-23 13:16 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Revert previous change + until it works on all OSX versions. + +2007-12-23 13:13 king + + * Source/cmGlobalVisualStudio71Generator.cxx: BUG: Disable static + lib deps until a global cycle removal can be done. + +2007-12-23 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-22 22:41 king + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsFortran.cxx, + cmDependsFortran.h, cmLocalUnixMakefileGenerator3.cxx: ENH: + Convert cmDepends object interface to scan an entire target at + once. + +2007-12-22 14:17 king + + * Source/cmGlobalXCodeGenerator.cxx: ENH: Simplify target-level + dependencies by depending only on directly linked targets instead + of those chained. + +2007-12-22 13:08 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: BUG: Support cyclic + dependencies among STATIC libraries by removing one from the + generated Makefile rules. + +2007-12-22 10:15 miguelf + + * Modules/FindwxWidgets.cmake: STYLE: Refactored common libs into a + variable, modified comments, and cleaned use of monolithic build. + +2007-12-22 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-21 20:19 king + + * Tests/BuildDepends/CMakeLists.txt: BUG: Enable + CMAKE_SUPPRESS_REGENERATION because the entire test runs during + the inital configuration. + +2007-12-21 18:32 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: COMP: Remove unused parameter + of method. + +2007-12-21 16:46 ibanez + + * Source/kwsys/SystemTools.cxx: BUG: Fix bug#5590. When + converting a relative path between two full paths on different + windows drive letters do not create a ../../d:/foo/bar path + and just return the full path to the destination. + +2007-12-21 15:04 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio8Generator.h, + cmGlobalVisualStudioGenerator.cxx, + cmGlobalVisualStudioGenerator.h, cmGlobalXCodeGenerator.cxx: ENH: + Make static library targets depend on targets to which they + "link" for the purpose of build ordering. This makes the build + order consistent for static and shared library builds. It is + also useful when custom command inputs of one library are + generated as custom commands outputs of another. It may be + useful in the future for Fortran module dependencies. + Implemented for Makefiles, Xcode, and VS 8 and above. Added + sample code to do it for VS 7.1 and below, but left it disabled + with comments explaining why. Likely it will never be needed on + VS 7.1 or below anyway. + +2007-12-21 13:10 king + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: Now that custom + targets have dependencies their DependInfo files should be listed + in Makefile.cmake. + +2007-12-21 12:22 king + + * Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmMakefileUtilityTargetGenerator.cxx, Source/cmake.cxx, + Tests/BuildDepends/CMakeLists.txt, + Tests/BuildDepends/Project/CMakeLists.txt, + Tests/BuildDepends/Project/dep_custom.cxx, + Tests/BuildDepends/Project/zot.cxx: ENH: Add a depends check step + to custom targets. Add support for the IMPLICIT_DEPENDS feature + of custom commands when building in custom targets. Convert + multiple-output pair checks to be per-target instead of global. + +2007-12-21 11:00 king + + * Source/cmMakefileTargetGenerator.cxx: BUG: The dependency + scanning target should be symbolic. + +2007-12-21 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-20 20:59 ewing + + * Modules/: FindFreeType.cmake, FindGDAL.cmake, FindGIFLIB.cmake, + FindLua50.cmake, FindLua51.cmake, FindOpenAL.cmake, + FindOpenThreads.cmake, FindPhysFS.cmake, FindProducer.cmake, + FindQuickTime.cmake, FindSDL.cmake, FindSDL_image.cmake, + FindSDL_mixer.cmake, FindSDL_net.cmake, FindSDL_sound.cmake, + FindSDL_ttf.cmake, Findosg.cmake, FindosgDB.cmake, + FindosgFX.cmake, FindosgGA.cmake, FindosgIntrospection.cmake, + FindosgManipulator.cmake, FindosgParticle.cmake, + FindosgProducer.cmake, FindosgShadow.cmake, FindosgSim.cmake, + FindosgTerrain.cmake, FindosgText.cmake, FindosgUtil.cmake, + FindosgViewer.cmake: BUG: Fixed modules to set FOO_FOUND when + both headers and libraries are found. BUG: FindSDL now has flag + it responds to so it will not find/link against SDLmain. This is + required to build libraries instead of applications since they + don't have main(). ENH: All modules have a predictable search + order, where environmental variables are searched before system + paths. This is designed to make automation easier for those that + need to automatically build projects without intervention but may + be using alternative install locations for isolated testing. + ENH: New modules for OpenSceneGraph, Freetype, GDAL, Lua, + QuickTime, GIFLIB, Producer, OpenThreads. STYLE: Added + documentation explaining peculuar SDL_LIBRARY_TEMP variable in + SDL module when library find is incomplete. + +2007-12-20 17:49 alex + + * Source/: cmAuxSourceDirectoryCommand.h, cmBuildCommand.h, + cmCreateTestSourceList.h, cmExportCommand.h, + cmExportLibraryDependencies.h, cmOptionCommand.h, cmSetCommand.h: + STYLE: make formatting of help a bit more consistent + + Alex + +2007-12-20 10:05 martink + + * Source/cmFunctionCommand.cxx: BUG: fix issue with + CMAKE_CURENT_LIST_FILE reporting in funcitons + +2007-12-20 09:35 king + + * Source/cmSystemTools.h: COMP: Fixed error on HP due to newline + macro. + +2007-12-20 09:27 king + + * Source/cmLocalGenerator.cxx: COMP: Fixed data loss warning. + +2007-12-20 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-19 17:54 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fix make depend + target in subdirectory Makefile interface. + +2007-12-19 17:15 king + + * Source/: cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmake.cxx: ENH: Enabled color + printing of "Scanning dependencies of target ..." message. + +2007-12-19 16:53 alex + + * Source/cmOptionCommand.h: ENH: options() is now scriptable, set() + is scriptable too, I don't see a big difference + + Alex + +2007-12-19 16:48 clinton + + * Modules/FindQt4.cmake: ENH: Better QT4_EXTRACT_OPTIONS macro. + +2007-12-19 16:46 alex + + * Source/cmMakefile.cxx: STYLE: nicer error message: "Command + options() is not scriptable" is IMO better to understand than + "Command options not scriptable" (with all uppercase commands it + was easier to see) + + Alex + +2007-12-19 16:36 king + + * Source/: cmDepends.cxx, cmDepends.h, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx, + cmake.cxx: ENH: Moved dependency integrity check from + CheckBuildSystem over to a per-target UpdateDependencies step. + This greatly reduces the startup time for make processes and + allows individual targets to be built without a global dependency + check. + +2007-12-19 16:35 king + + * Source/cmDependsFortran.cxx: BUG: cmDependsFortran should store + the source file as a dependency of the object file when scanning + for dependencies. + +2007-12-19 14:28 king + + * Source/: cmDependsFortran.cxx, cmDependsFortran.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Pass target directory to + cmDependsFortran scanning instances. + +2007-12-19 11:51 king + + * Source/cmake.cxx: ENH: Improved speed of cmake::CheckBuildSystem + when checking build system outputs versus dependencies. Instead + of doing an O(m*n) comparison of every pair, just locate the + oldest output and the newest input and compare them which is now + O(m+n). + +2007-12-19 11:06 king + + * Source/cmFindBase.cxx, Tests/FindPackageTest/CMakeLists.txt: ENH: + Renamed CMAKE_FIND_PREFIX_PATH to CMAKE_PREFIX_PATH for brevity + and consistency with other find path variable names. + +2007-12-19 10:43 hoffman + + * Source/: cmListCommand.cxx, cmListCommand.h: ENH: merge in list + find to support Findqt + +2007-12-19 10:34 king + + * Source/cmFindBase.cxx: ENH: Added CMAKE_SYSTEM_PREFIX_PATH + variable. + +2007-12-19 03:56 alex + + * Source/: cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h, cmLocalGenerator.cxx, + cmLocalGenerator.h: + STYLE: fix warnings: comparison signed/unsigned, unused variable + + Alex + +2007-12-19 03:55 alex + + * Modules/CMakeFindBinUtils.cmake: + BUG: make CMAKE_USE_CHRPATH a simple variable instead an option, + since an option is not scriptable and so breaks the toolchain + test or maybe option() should be made scriptable ? + + Alex + +2007-12-19 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-18 17:50 alex + + * Modules/CMakeFindBinUtils.cmake, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, Source/cmTarget.cxx, + Source/cmTarget.h: ENH: add support for chrpath, so the RPATH in + ELF files can be changed when installing without having to link + the target again -> can save a lot of time + + chrpath is handled very similar to install_name_tool on the mac. + If the RPATH in the build tree file is to short, it is padded + using the separator character. This is currently disabled by + default, it can be enabled using the option CMAKE_USE_CHRPATH. + There are additional checks whether it is safe to enable it. I + will rework them and use FILE(READ) instead to detect whether the + binaries are actually ELF files. + + chrpath is available here + http://www.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/ or kde + svn (since a few days): + http://websvn.kde.org/trunk/kdesupport/chrpath/ + + Alex + +2007-12-18 15:58 hoffman + + * Source/: cmGlobalVisualStudio9Generator.cxx, + cmGlobalVisualStudio9Generator.h, + cmGlobalVisualStudio9Win64Generator.cxx, + cmGlobalVisualStudio9Win64Generator.h: ENH: merge from main tree + +2007-12-18 15:02 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindPkgConfig.cmake, + Modules/Platform/Linux-ifort.cmake, Source/CMakeLists.txt, + Source/cmLocalVisualStudio7Generator.h, Source/cmake.cxx, + Utilities/cmtar/encode.c: ENH: merge in from main tree + +2007-12-18 14:50 clinton + + * Modules/FindQt4.cmake: ENH: should define QT_DLL instead of + QT_SHARED + +2007-12-18 13:05 clinton + + * Modules/FindQt4.cmake: ENH: Improve documentation of new + features. + +2007-12-18 10:02 hoffman + + * Modules/FindBoost.cmake: BUG: fix for bug 5464 better find boost + for windows + +2007-12-18 09:57 hoffman + + * Source/cmGetSourceFilePropertyCommand.cxx, + Tests/COnly/CMakeLists.txt: BUG: fix for bug 6172 add get source + file prop LANGUAGE + +2007-12-18 09:50 king + + * Source/cmGlobalXCodeGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio7Generator.cxx, + Tests/CustomCommand/CMakeLists.txt: ENH: Implemented generation + of display for pre-build, pre-link, and post-build custom command + comments during the build. This addresses issue #5353. + +2007-12-18 08:53 hoffman + + * Source/cmGlobalVisualStudio8Generator.cxx: STYLE: fix line len + +2007-12-18 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-17 21:37 hoffman + + * Modules/FindPkgConfig.cmake: BUG: fix for 5722 + +2007-12-17 19:48 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Remove stray debugging + message. + +2007-12-17 18:38 king + + * Source/cmLocalVisualStudioGenerator.cxx: BUG: When the working + directory for a custom command is on another drive letter we need + to change to that drive letter after changing its working + directory. Fixes issue #6150. + +2007-12-17 17:57 hoffman + + * Modules/TestForANSIForScope.cmake: STYLE: fix doc string + +2007-12-17 17:55 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + BUG: Fixed memory-leaks in fortran parser. + +2007-12-17 17:55 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + BUG: Fix parsing of #include preprocessor directives. + +2007-12-17 17:54 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Fortran include + path is the same as C and CXX include paths. + +2007-12-17 17:50 hoffman + + * Utilities/cmtar/encode.c: BUG: fix for bug 5837, libtar and long + path names + +2007-12-17 17:40 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindPkgConfig.cmake, + Modules/FindQt3.cmake, Modules/FindQt4.cmake, + Modules/UseQt4.cmake, Source/cmDependsFortran.cxx, + Source/cmInstallCommand.cxx, Source/cmMakefile.cxx, + Source/cmake.cxx, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.hxx.in, + Source/kwsys/SystemTools.hxx.in.bak: ENH: move changes from main + tree + +2007-12-17 17:28 hoffman + + * Source/cmGlobalVisualStudio8Generator.cxx: BUG: fix for bug 5931 + add some more flags for the gui + +2007-12-17 17:22 hoffman + + * Modules/FindJNI.cmake: BUG: fix for 5933, look for java in more + reg entries + +2007-12-17 17:05 alex + + * Modules/CTest.cmake: STYLE: use IF(NOT ) instead of IF() ELSE() + with empty IF() branch + + Alex + +2007-12-17 16:15 alex + + * Docs/cmake-syntax.vim: STYLE: apply patch from #6166, better + cmake syntax highlighting in vim, seems to fix the issues + mentioned in the bug report and the rest also still seems to be + ok + + Alex + +2007-12-17 15:27 hoffman + + * Source/CPack/cmCPackPackageMakerGenerator.cxx: ENH: try to fix + dashboard + +2007-12-17 15:20 king + + * Source/cmInstallCommand.cxx: BUG: Apply patch from issue #6006. + +2007-12-17 14:43 hoffman + + * Source/: CMakeLists.txt, cmGlobalVisualStudio9Win64Generator.cxx, + cmGlobalVisualStudio9Win64Generator.h, cmake.cxx: ENH: add + support for vs 9 win64 + +2007-12-17 12:04 hoffman + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake, + CMakeFortranInformation.cmake: BUG: fix for bug 6167 get rid of + extra space in flags + +2007-12-17 10:12 king + + * Source/cmTarget.cxx, Tests/Properties/CMakeLists.txt: ENH: Added + SOURCES property to targets. This is based on patch from issues + #6137. + +2007-12-17 10:12 king + + * Source/: cmSourceFile.cxx, cmSourceFile.h: ENH: Added + cmSourceFile::GetLocation method to get a read-only reference to + the Location ivar. This partially addresses issue #6137. + +2007-12-17 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-16 07:56 alex + + * Source/cmStringCommand.cxx: BUG: fix STRING(STRIP ...) if no + non-space is contained in the input string, this should fix the + dashboard + + Alex + +2007-12-16 05:49 alex + + * Modules/FindQt4.cmake: STYLE: some whitespace syncing with + FindQt4.cmake in KDE svn + + Alex + +2007-12-16 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-15 16:03 king + + * Modules/CMakeDetermineCompilerId.cmake: BUG: Need to strip + leading and trailing whitespace off the compiler 'ARG1'. This + fixes bug#6141. + +2007-12-15 15:36 king + + * Tests/Fortran/: CMakeLists.txt, Library/CMakeLists.txt, + Library/a.f90, Library/b.f90, Library/main.f90: ENH: Added test + for Fortran90 modules in subdirectories. + +2007-12-15 15:35 king + + * Source/cmDependsFortran.cxx: ENH: Make module timestamps work for + modules in subdirectories. Make sure timestamps for all modules + provided by a target are created when the target is done + building. + +2007-12-15 14:16 king + + * Source/: cmFindPackageCommand.cxx, cmFindPackageCommand.h: STYLE: + Removed trailing whitespace. + +2007-12-15 14:14 king + + * Source/cmFindBase.cxx: STYLE: Fixed terminology to avoid + confusion between roots and prefixes. + +2007-12-15 14:13 king + + * Source/cmake.cxx: STYLE: Fixed line-too-long. + +2007-12-15 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-14 20:46 hoffman + + * Source/: cmFindLibraryCommand.cxx, cmFindPathCommand.cxx: BUG: + fix for bug 6039 LIB and INCLUDE not used for find stuff + +2007-12-14 20:31 hoffman + + * Source/: cmDependsC.cxx, cmDependsFortran.cxx, cmMakeDepend.cxx, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: BUG: fix for bug + 6136 make sure includes are not directories + +2007-12-14 16:56 clinton + + * Modules/FindQt4.cmake: ENH: Add OPTIONS argument to some Qt4 + macros. Addresses #6125. + +2007-12-14 15:50 hoffman + + * Source/cmListCommand.h: BUG: fix bug 6081 + +2007-12-14 14:58 hoffman + + * Source/CPack/cmCPackNSISGenerator.cxx: BUG: fix for 6086 + uninstall icon not set right + +2007-12-14 12:51 hoffman + + * Modules/FindPkgConfig.cmake: BUG: fix for 6117, fix for second + run + +2007-12-14 12:49 hoffman + + * Source/cmCreateTestSourceList.h: STYLE: line length + +2007-12-14 11:00 hoffman + + * Utilities/cmcurl/curl/mprintf.h: BUG: fix for bug 6054 remove + some warnings + +2007-12-14 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-13 18:30 king + + * Source/cmake.cxx: COMP: Add missing return value from Bill's + change. + +2007-12-13 17:56 king + + * Source/: cmCTest.cxx, cmCTest.h, cmDumpDocumentation.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmake.cxx, cmake.h, + cmakemain.cxx, ctest.cxx, CPack/cpack.cxx, + CTest/cmCTestScriptHandler.cxx, CursesDialog/ccmake.cxx, + FLTKDialog/FLTKDialog.cxx, MFCDialog/CMakeSetup.cpp, + QtDialog/CMakeSetup.cxx: ENH: Centralized and globalized + computation of CMake program locations. This eliminates startup + paths that failed to produce this information. + +2007-12-13 17:39 king + + * Source/cmake.cxx: BUG: Fixed typo introduced by previous commit. + +2007-12-13 15:54 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmMakefileTargetGenerator.cxx, cmake.cxx, cmake.h: ENH: fix for + bug 6102, allow users to change the compiler + +2007-12-13 15:42 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: STYLE: fix indent + +2007-12-13 15:41 hoffman + + * Source/cmCreateTestSourceList.h: ENH: fix docs + +2007-12-13 15:11 hoffman + + * Source/cmakemain.cxx: ENH: fix docs + +2007-12-13 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-12 13:25 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: Fix logic to accept + drop events. + +2007-12-12 07:26 hoffman + + * Modules/FindPerlLibs.cmake: BUG: Fix bug 6106 FindPerlLibs.cmake + missing escaped $ + +2007-12-12 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-11 22:28 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindJNI.cmake, + Modules/FindPerlLibs.cmake, + Modules/InstallRequiredSystemLibraries.cmake, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmTryCompileCommand.cxx: ENH: changes for RC5 + +2007-12-11 12:57 clinton + + * Modules/FindQt4.cmake: ENH: Correctly find UiTools library on + Mac w/ binary install of Qt. Fixes #4554. + +2007-12-11 11:36 king + + * Source/kwsys/: CMakeLists.txt, String.c, String.h.in: ENH: Added + C String utilities to KWSys. Implemented strcasecmp and + strncasecmp. + +2007-12-11 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-10 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-09 19:58 hoffman + + * Source/cmLocalVisualStudio7Generator.h: STYLE: fix line len error + +2007-12-09 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-08 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-07 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-06 22:38 hoffman + + * Tests/COnly/CMakeLists.txt: ENH: change to libs that are not real + +2007-12-06 16:43 pppebay + + * Source/kwsys/SystemTools.cxx: BUG: fixed an incomplete regexp + +2007-12-06 14:07 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: Prevent mapping of + Configure to Preferences when Qt merges menu items with the + standard Mac OS X application menu. + +2007-12-06 09:56 hoffman + + * Source/cmCoreTryCompile.cxx: ENH: for try compile do not put the + rules to rebuild the project with cmake inside it. This has + caused infinite loops of builds in some cases, and it is just a + waste of time anyway. + +2007-12-06 08:40 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Tests/COnly/CMakeLists.txt: BUG: fix for bug 5455, handle + nodefaultlib with more than one lib + +2007-12-06 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-05 13:13 king + + * Source/kwsys/SystemTools.cxx: COMP: Remove reference to vtksys. + The unmangled kwsys name should be used in this source. + +2007-12-05 12:24 pppebay + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: added + two functions for URL parsing: 1. an "abridged" version that + separates protocol from dataglom in an expression with + the form protocol://dataglom 2. a "full" version that parses + protocol, username, password, hostname, port, and path in + a standard URL (all of these variables are optional, + except for protocol and hostname). + +2007-12-05 10:40 hoffman + + * CMakeLists.txt: ENH: move up to rc 4 + +2007-12-05 10:40 hoffman + + * ChangeLog.manual, Modules/NSIS.template.in: ENH: move fix for + nsis to branch + +2007-12-05 09:17 hoffman + + * Source/cmDependsFortran.cxx: STYLE: fix line len + +2007-12-05 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-04 17:14 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmCTest.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmTarget.cxx: + ENH: merge in fixes from main tree + +2007-12-04 17:00 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove warning + +2007-12-04 16:09 hoffman + + * Source/cmDependsFortran.cxx: ENH: do not depend on touch being on + the system + +2007-12-04 16:03 hoffman + + * Source/: cmake.cxx, kwsys/SystemTools.cxx, + kwsys/SystemTools.hxx.in: ENH: add a touch -E command to cmake + +2007-12-04 10:43 martink + + * Source/: cmFunctionCommand.cxx, cmFunctionCommand.h: COMP: fix + style and work around old compilers + +2007-12-04 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-03 20:44 hoffman + + * DartLocal.conf.in: ENH: remove superior dean i, no longer uses + borland + +2007-12-03 13:35 martink + + * Source/cmBootstrapCommands.cxx, Source/cmCommands.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmake.cxx, + Tests/CMakeLists.txt: ENH: add functions and raise scope + +2007-12-03 12:47 martink + + * Source/: cmEndFunctionCommand.cxx, cmEndFunctionCommand.h: ENH: + add functions + +2007-12-03 12:43 martink + + * Source/cmFunctionCommand.cxx, Source/cmFunctionCommand.h, + Source/cmRaiseScopeCommand.cxx, Source/cmRaiseScopeCommand.h, + Tests/FunctionTest/CMakeLists.txt, + Tests/FunctionTest/functionTest.c: ENH: add functions and raise + scope to cmake + +2007-12-03 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-02 11:51 hoffman + + * DartLocal.conf.in: ENH: fix up some stuff + +2007-12-02 09:15 miguelf + + * Modules/FindwxWidgets.cmake: STYLE: Clarified usage documentation + for cmake --help-module FindwxWidgets. + +2007-12-02 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-12-01 22:51 miguelf + + * Modules/FindwxWidgets.cmake: STYLE: Use LIST(APPEND ...) instead + of SET(...) + +2007-12-01 20:58 miguelf + + * Modules/FindwxWidgets.cmake: ENH: Added search entry for the new + release: wxWidgets-2.8.7. + +2007-12-01 20:35 miguelf + + * Modules/FindwxWidgets.cmake: ENH: Added support for selecting + different configurations in UNIX_STYLE: debug/release, + static/shared, unicode/ansi, and regular/universal. + +2007-12-01 19:30 miguelf + + * Modules/FindwxWidgets.cmake: ENH: Added macro support for + compiling xrc resources to cpp code. + +2007-12-01 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-30 19:11 clinton + + * Modules/UseQt4.cmake: ENH: Define QT_NO_DEBUG when building with + release Qt libs. Fixes #6104. + +2007-11-30 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-29 10:23 martink + + * Source/cmDocumentation.cxx: BUG: fix single module generation + +2007-11-29 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-28 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-27 15:59 hoffman + + * Source/cmDocumentationFormatterHTML.cxx: ENH: better output for + qt assistant + +2007-11-27 01:04 clinton + + * Source/QtDialog/CMakeSetup.cxx: ENH: Add handling of --help and + related arguments. + +2007-11-27 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-26 17:57 alex + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: STYLE: + restructure OutputLinkLibraries() a bit, so that new there is a + function which returns the RPATH, so e.g. the install rpath can + be queried when the command for the build rpath is created. This + is a first step for supporting chrpath. + + Alex + +2007-11-26 13:21 barre + + * CMakeLogo.gif: ENH: fancier logo + +2007-11-26 10:01 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fixed computation + of 'object' name for MACOSX_PACKAGE_LOCATION source files. + +2007-11-26 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-25 17:11 hoffman + + * Tests/CMakeLists.txt: BUG: try to fix configure error on + dashboard + +2007-11-25 08:20 alex + + * Modules/FindEXPAT.cmake: BUG: use the correct variable for + checking the success (#6062) + + Alex + +2007-11-25 07:45 alex + + * Source/: cmExtraCodeBlocksGenerator.cxx, + cmExtraCodeBlocksGenerator.h: STYLE: move the code for generating + the XML for one target in a separate function AppendTarget() -add + "all" target -some syncing with the Eclipse generator + + Alex + +2007-11-25 07:40 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: ENH: add the "clean" + target don't add *all existing* targets as Eclipse targets, but + only a subset (the same as for CodeBlocks), e.g. exclude the + subtargets of Experimental, and also edit_cache, ccmake doesn't + work from within an IDE + + Alex + +2007-11-25 07:34 alex + + * Source/: cmGlobalGenerator.h, cmGlobalUnixMakefileGenerator3.h: + ENH: add GetCleanTargetName() which returns "clean" for + makefiles, so it can be used by the eclipse generator + + Alex + +2007-11-25 06:21 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: ENH: also add the + experimental, nightly, package_source, preinstall and + rebuild_cache targets + + Alex + +2007-11-25 05:26 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: STYLE: add some comments + + Alex + +2007-11-25 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-24 03:51 alex + + * Source/: cmQTWrapCPPCommand.h, cmQTWrapUICommand.h: STYLE: QT -> + Qt in the docs + + Alex + +2007-11-24 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-23 20:45 alex + + * CMakeLists.txt, Modules/Platform/syllable.cmake, + Source/kwsys/SystemTools.cxx, Source/kwsys/testDynamicLoader.cxx, + Tests/CMakeLists.txt, Utilities/cmtar/CMakeLists.txt: ENH: add + support for the Syllable OS (http://www.syllable.org) major + issues: -access() doesn't return false for an empty string + (#ifdefed in cmake) -dlopen() doesn't return 0 on failure + (#ifdefed in cmake and fixed now in Syllable) -the kwsys and + Bootstrap tests fail with timeout due to the fact that I'm doing + all that in qemu, which is quite slow -RPATH is now supported, so + without modifying the test adapting DLL_PATH in Syllable is + required for the tests to succeed -the Plugin test fails with an + undefined reference to example_exe_function() in example_mod_1, + it seems this isn't supported under Syllable + + Alex + +2007-11-23 14:53 king + + * Source/cmMakefileTargetGenerator.cxx: STYLE: Fixed line-too-long. + +2007-11-23 11:30 alex + + * Source/cmQTWrapCPPCommand.cxx: STYLE: QT is quicktime, Qt is Qt, + as pointed out by David Faure + + Alex + +2007-11-23 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-22 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-21 17:09 david.cole + + * DartLocal.conf.in: STYLE: Updated and alphabetized expected + builds list. Many new Mac Leopard entries from Rogue -- thanks + guys! + +2007-11-21 15:33 david.cole + + * Templates/CMakeLists.txt: BUG: Install the vsmacros file. + +2007-11-21 13:37 king + + * Source/cmMakefileTargetGenerator.cxx: ENH: Change compiler + working directory to the local build tree location when compiling + object files. This simplifies the compiler command line and the + usage of the .s and .i targets. It also helps + fortran compilers put their modules in the correct place. + +2007-11-21 12:55 king + + * CMakeLists.txt: BUG: Fixed construction of CMake_VERSION_DATE to + use KWSys DateStamp feature now that cmVersion.cxx is not updated + nightly anymore. + +2007-11-21 10:07 king + + * Source/cmCTest.cxx: BUG: Do not require a nightly start time for + an experimental or continuous test model. + +2007-11-21 08:59 king + + * Source/cmTarget.cxx: BUG: For imported target directory, do not + return pointer to freed memory. + +2007-11-21 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-20 11:18 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Need to honor + HEADER_FILE_ONLY source file property and exclude the source from + the build. + +2007-11-20 11:10 king + + * Source/: cmCallVisualStudioMacro.cxx, cmGlobalGenerator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio9Generator.cxx, + cmGlobalVisualStudioGenerator.cxx: STYLE: Fixed line-too-long. + COMP: Fixed warnings about lossy conversions. + +2007-11-20 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-19 14:27 king + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex_nobuild.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex_nobuild.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex_nobuild.cxx: ENH: Adding + test for using HEADER_FILE_ONLY to avoid building a .cxx file. + +2007-11-19 14:27 king + + * Source/cmSourceFile.cxx: BUG: Do not force HEADER_FILE_ONLY off + if the user has already set it on. + +2007-11-19 14:22 king + + * Source/cmake.cxx: COMP: Do not build VS-specific code when + generators are not included. + +2007-11-19 14:08 clinton + + * Source/QtDialog/CMakeLists.txt: ENH: Add install command for + executable. + +2007-11-19 13:45 king + + * Source/: cmake.cxx, cmake.h: ENH: Added call to StopBuild VS + macro when projects fail to regenerate during a build. + +2007-11-19 13:44 king + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudioGenerator.cxx, + cmGlobalVisualStudioGenerator.h: ENH: Renamed + cmGlobalVisualStudioGenerator::CallVisualStudioReloadMacro method + to CallVisualStudioMacro and added arguments to select which + macro to call and optionally pass the solution file name. Added + option to call to new StopBuild macro. Updated logic for + replacing the macro file in user directories when the distributed + version is newer. + +2007-11-19 13:44 king + + * Templates/CMakeVSMacros1.vsmacros: ENH: Added StopBuild macro. + +2007-11-19 13:42 king + + * Source/cmakemain.cxx: BUG: Always return positive integers to the + OS on error. Windows error encoding is confused by negative + return values. + +2007-11-19 13:42 king + + * Source/cmListFileCache.cxx: BUG: ParseFile should return false if + there was a parse error. + +2007-11-19 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-18 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-17 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-16 21:18 clinton + + * Source/QtDialog/AddCacheEntry.cxx: ENH: Remove debug printf + +2007-11-16 14:06 hoffman + + * Utilities/cmxmlrpc/: CMakeLists.txt, xmlrpc_config.h.in, + xmlrpc_data.c: ENH: add a try compile for va_copy + +2007-11-16 13:54 david.cole + + * Source/cmGlobalVisualStudioGenerator.cxx: ENH: Add more + conditions for attempting to call the new Visual Studio macros. + Only try to call them if the vsmacros file exists and is + registered. Count VS instances again after warning about running + instances. If user closed them in response to the warning, it's + OK to register the macros now rather than waiting till the next + CMake generate. + +2007-11-16 11:32 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: add support for + CDash bullseye coverage + +2007-11-16 11:01 king + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Fix exception handling + flag translation to be specific to each VS version. This allows + /EHa to be handled correctly for VS 2003. + +2007-11-16 10:40 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: ENH: more robust search + filter. + +2007-11-16 07:01 david.cole + + * Source/CMakeLists.txt, Source/cmCallVisualStudioMacro.cxx, + Source/cmCallVisualStudioMacro.h, + Source/cmGeneratedFileStream.cxx, Source/cmGeneratedFileStream.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudio9Generator.cxx, + Source/cmGlobalVisualStudio9Generator.h, + Source/cmGlobalVisualStudioGenerator.cxx, + Source/cmGlobalVisualStudioGenerator.h, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmake.cxx, + Source/kwsys/SystemTools.cxx, Templates/CMakeVSMacros1.vsmacros: + ENH: Add ability to call Visual Studio macros from CMake. Add a + CMake Visual Studio macro to reload a solution file automatically + if CMake makes changes to .sln files or .vcproj files. Add code + to call the macro automatically for any running Visual Studio + instances with the .sln file open at the end of the Visual Studio + Generate call. Only call the macro if some .sln or .vcproj file + changed during Generate. Also, add handling for REG_EXPAND_SZ + type to SystemTools::ReadRegistryValue - returned string has + environment variable references expanded. + +2007-11-16 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-15 13:14 hoffman + + * Modules/Platform/Darwin.cmake: ENH: add support for env var and + better default for CMAKE_OSX_SYSROOT + +2007-11-15 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: STYLE: Nightly Date Stamp + +2007-11-14 23:30 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: COMP: Fix warning. + +2007-11-14 21:17 king + + * bootstrap, Source/cmVersion.cxx: ENH: Simplified CMake version + information using KWSys DateStamp feature. Reduced duplicate + code in bootstrap script. + +2007-11-14 18:08 clinton + + * Modules/FindQt4.cmake: ENH: Fix case of windows library names to + support cross compiling w/ Qt on case sensitive platforms. + +2007-11-14 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: daily version number + +2007-11-13 23:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-13 16:25 alex + + * Source/QtDialog/CMakeSetupDialog.cxx: ENH: add completer for the + source and binary dir lineedits + + Clinton: do I actually have to create separate models for each + completer, and a separate completer for each widget, or could the + models/completers be used for multiple widgets ? + + Alex + +2007-11-13 12:53 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: ENH: single click can start + editing cache values. + +2007-11-13 11:21 martink + + * Tests/Tutorial/Step6/CMakeLists.txt: ENH: switch to new install + commands to match book text + +2007-11-13 11:18 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: BUG: The search is set to + apply to all columns, but in Qt 4.2, that breaks the search + entirely. Search on the first column only when using Qt 4.2. + +2007-11-13 11:11 martink + + * Tests/Tutorial/: Step3/CMakeLists.txt, + Step3/MathFunctions/CMakeLists.txt, Step4/CMakeLists.txt, + Step4/MathFunctions/CMakeLists.txt, Step5/CMakeLists.txt, + Step5/MathFunctions/CMakeLists.txt, Step6/CMakeLists.txt, + Step6/MathFunctions/CMakeLists.txt, Step7/CMakeLists.txt, + Step7/MathFunctions/CMakeLists.txt: ENH: switch to new install + commands to match book text + +2007-11-13 00:33 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx: ENH: + support specifying build or source directory at command line. + +2007-11-13 00:17 clinton + + * Source/QtDialog/: QCMakeCacheView.cxx, QCMakeCacheView.h: ENH: + Allow clicking anywhere in field to toggle check boxes. + +2007-11-13 00:01 king + + * Source/kwsys/kwsysDateStamp.cmake: daily version number + +2007-11-12 23:59 clinton + + * Source/QtDialog/: AddCacheEntry.cxx, AddCacheEntry.h: STYLE: add + license. + +2007-11-12 23:54 clinton + + * Source/QtDialog/: AddCacheEntry.cxx, AddCacheEntry.h, + AddCacheEntry.ui, CMakeLists.txt, CMakeSetup.qrc, + CMakeSetupDialog.cxx, CMakeSetupDialog.h, CMakeSetupDialog.ui, + Plus16.png, QCMake.cxx, QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: Add ability to add cache entries (even before first + configure). + +2007-11-12 23:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-12 22:36 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: add f stuff to avoid warnings + +2007-11-12 22:33 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: ENH: add + guess progress for first time configuring a project. + +2007-11-12 18:22 king + + * Source/kwsys/kwsysDateStamp.cmake: daily version number + +2007-11-12 18:22 king + + * Source/kwsys/: DateStamp.h.in, kwsysDateStamp.py: ENH: Created + better names and a more convenient set of version date stamp + macros. + +2007-11-12 18:06 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.ui: ENH: + Fix layout with Qt 4.2. BUG: Fix help comments to match what + this GUI does. + +2007-11-12 17:51 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: Fix prompt for + changes if they haven't been saved. + +2007-11-12 17:41 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui: + BUG: Fix pause at shutdown. ENH: Remove interrupt button and + make configure/generate turn to stop during runs. ENH: Add text + to remove cache entry button. + +2007-11-12 17:38 king + + * Source/kwsys/CMakeLists.txt: BUG: Fixed typo in previous commit. + +2007-11-12 17:34 king + + * Source/kwsys/: CMakeLists.txt, DateStamp.h.in, + kwsysDateStamp.cmake, kwsysDateStamp.py: ENH: Adding DateStamp + feature to KWSys. This provides a header file giving + preprocessor access to a dated version. The 'datestamp' will be + updated automatically every day by a script. + +2007-11-12 16:58 king + + * Source/cmake.cxx: BUG: Fix messages for time stamp file + recreation. + +2007-11-12 15:42 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: Converted per-vcproj + timestamp to a single directory-level CMakeFiles/generate.stamp + file shared by all targets in each directory. This avoids having + all targets overwrite each others timestamp check rules and + instead has one single rule. + +2007-11-12 13:54 clinton + + * Source/QtDialog/: CMakeLists.txt, CMakeSetupDialog.ui: ENH: + Allow build with Qt 4.2. + + 4.3 dependence fell out when errors go to output + window instead of message box blocking cmake thread. + +2007-11-12 13:52 miguelf + + * Modules/FindwxWidgets.cmake: BUG: Fix to support arch and + isysroot compilation options on MAC (Bug 5007). + +2007-11-12 12:04 martink + + * Source/cmCPluginAPI.cxx: BUG: better setup of properties for + loaded commands + +2007-11-11 23:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-10 23:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-10 17:31 king + + * Tests/Wrapping/: CMakeLists.txt, fakefluid.cxx: BUG: Fixed fake + generation of files to behave more like fluid. + +2007-11-10 11:36 clinton + + * Source/QtDialog/: CMakeSetup.qrc, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, CMakeSetupDialog.ui, Delete16.png, + QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: Re-arrange UI a bit. BUG: Properly update when values + that changed since the last configure. + +2007-11-10 08:15 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmake.cxx, cmake.h: ENH: Allow + VS 7 project Rebuild and Solution Rebuild to work without + re-running CMake for every project during the rebuild. + +2007-11-10 08:14 king + + * Source/cmDocumentVariables.cxx: STYLE: Fixed line-too-long for + undocumented variable entries. + +2007-11-10 06:54 david.cole + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Need extra regex to parse + sw_vers output on Mac OSX 10.2 (and presumably earlier) to avoid + running PackageMaker during the SimpleInstall* tests. See comment + in CMake/Tests/SimpleInstall/CMakeLists.txt for more info. + +2007-11-09 23:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-09 15:18 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, QCMakeCacheView.h: + BUG: Don't prompt for unsaved changes if no changes were made. + ENH: Error messages go to output window instead of message + boxes. + +2007-11-09 15:08 king + + * Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Templates/CMakeWindowsSystemConfig.cmake: ENH: Removed dependency + on Templates/CMakeWindowsSystemConfig.cmake which is no longer + used. Also removed the file itself. + +2007-11-09 12:18 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: change name + +2007-11-09 12:05 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: Converted vcproj file + generation to use cmGeneratedFileStream for atomic replacement. + Replaced the vcproj.cmake copy of the file with a simple + vcproj.stamp timestamp file to preserve previous + rerun-without-reload behavior. + +2007-11-09 01:14 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: ENH: Add completion to + editor for files and file paths. + +2007-11-08 23:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-08 20:37 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: add ability to + use your own install directories + +2007-11-08 16:47 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, QCMake.cxx: BUG: Don't + enable generate if configure completed with errors. ENH: Allow + build w/ Qt configured with no STL support. + +2007-11-08 15:54 david.cole + + * Source/MFCDialog/res/CMakeSetupDialog.ico, + Source/QtDialog/CMakeSetup.ico, Source/WXDialog/NGDialog.ico, + Utilities/Release/CMakeLogo.ico: ENH: Put black outline around + all resolutions of the new ico files. Looks better on a dark + background than the lighter outline... + +2007-11-08 14:31 hoffman + + * Modules/Platform/Darwin.cmake: ENH: fix bug in default arch, it + was using the environment variable which is not a default + +2007-11-08 13:03 hoffman + + * Source/CTest/cmCTestTestHandler.cxx: BUG: try to fix crash + +2007-11-08 12:27 clinton + + * Modules/FindQt4.cmake: BUG: handle qmake returning multiple + paths for mkspecs. Fixes #5935 + +2007-11-08 10:56 clinton + + * Modules/FindQt4.cmake: ENH: Add support for static Qt 4.3 + builds. + +2007-11-08 10:38 david.cole + + * Tests/: CMakeLists.txt, Tutorial/Step6/CMakeLists.txt, + Tutorial/Step6/License.txt, Tutorial/Step6/TutorialConfig.h.in, + Tutorial/Step6/tutorial.cxx, + Tutorial/Step6/MathFunctions/CMakeLists.txt, + Tutorial/Step6/MathFunctions/MakeTable.cxx, + Tutorial/Step6/MathFunctions/MathFunctions.h, + Tutorial/Step6/MathFunctions/mysqrt.cxx, + Tutorial/Step7/CMakeLists.txt, Tutorial/Step7/CTestConfig.cmake, + Tutorial/Step7/License.txt, Tutorial/Step7/TutorialConfig.h.in, + Tutorial/Step7/build1.cmake, Tutorial/Step7/build2.cmake, + Tutorial/Step7/tutorial.cxx, + Tutorial/Step7/MathFunctions/CMakeLists.txt, + Tutorial/Step7/MathFunctions/MakeTable.cxx, + Tutorial/Step7/MathFunctions/MathFunctions.h, + Tutorial/Step7/MathFunctions/mysqrt.cxx: ENH: Add new Tutorial + steps. Diff between Step5 and Step6 shows how to add a cpack + driven installer to your project. Diff between Step6 and Step7 + shows how to add ctest dashboard scripting capability. + +2007-11-08 10:22 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: COMP: Fix warnings. + +2007-11-08 10:17 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.ui, + QCMake.cxx, QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: add context menu for deleting, ignoring, and getting help + for cache entries. ENH: add delete cache button ENH: add + information string above configure/generate buttons ENH: change + search to search both columns, and from regex to plain string + search ENH: add buddy info in cache entry view, so double + clicking in the left column starts editing the associated + value. BUG: fix file path editor so it goes away when focus is + lost + +2007-11-08 09:09 david.cole + + * Modules/Platform/Darwin.cmake: BUG: Do not us the + search_paths_first flag on older Mac OSX (10.2 and earlier) + systems. + +2007-11-07 23:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-07 17:43 hoffman + + * Utilities/Release/vogon_release.cmake: ENH: add mt to vogon + release + +2007-11-07 17:30 hoffman + + * Source/MFCDialog/CMakeLists.txt: ENH: allow for msvc71 to build + for vista if CMAKE_MT_EXECUTABLE is put in the cache + +2007-11-07 14:35 hoffman + + * Utilities/cmcurl/CMakeLists.txt: ENH: remove memdebug.c from list + +2007-11-07 13:11 hoffman + + * CMakeCPack.cmake, CMakeCPackOptions.cmake.in, + Source/CPack/cmCPackNSISGenerator.cxx: ENH: change + CPACK_CREATE_DESKTOP_LINKS to something that can handle spaces in + the name of the exectuable + +2007-11-07 11:31 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui: + ENH: remove status bar and move interrupt/progress next to + configure/generate. + +2007-11-07 10:09 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui, QCMakeCacheView.cxx, QCMakeCacheView.h: + BUG: Fix behavior of + CMakeSetupDialog::set{Binary|Source}Directory so they work + right when called externally. Disable the generate button + when one hits configure again. ENH: Some UI tweaks for spacing. + Allow viewing cache values while configure/generate (but + not edit). + +2007-11-07 09:12 king + + * Source/CTest/cmCTestSubmitHandler.cxx: COMP: Fix check for + file-too-big to avoid warnings. + +2007-11-07 08:59 king + + * Source/kwsys/SystemTools.cxx: COMP: Fix warning when gcount + stream method does not really return std::streamsize. + +2007-11-06 23:00 clinton + + * Source/QtDialog/: CMakeLists.txt, CMakeSetup.icns, QCMake.cxx: + ENH: For Mac OSX -- add app icon, and implement find of cmake + executable. + +2007-11-06 22:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-06 22:27 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: disable drag & drop + while busy. + +2007-11-06 21:51 clinton + + * Source/QtDialog/CMakeSetupDialog.cxx: BUG: only handle drop + events if they'll really change something. + +2007-11-06 21:27 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h: + BUG: Put back read/write of original WhereBuild* settings. ENH: + Make public a couple functions to support command line args. + Try removing exit after generate to see if others like it. + COMP: Fix warnings. + +2007-11-06 19:25 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, CMakeSetupDialog.ui, QCMake.cxx, + QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: Disable menu/buttons when doing configure. Also + disable generate until configure is done. Save more + settings (last 10 binary directories, exit after generate, + last generator) Some UI tweaks for + better layout. Support drag & drop of + CMakeLists.txt/CMakeCache.txt files. + +2007-11-06 14:16 martink + + * Source/: cmDocumentVariables.cxx, cmMakefile.cxx, + cmPropertyMap.cxx, cmake.cxx, cmake.h: ENH: different way of + testing properties + +2007-11-06 14:14 martink + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: move CMAKE_STRICT + option to the top + +2007-11-06 14:11 martink + + * Tests/CMakeLists.txt: ENH: add doc test for strict builds + +2007-11-06 14:10 martink + + * Tests/DocTest/: CMakeLists.txt, DocTest.cxx: ENH: add a etst to + verify props are documented + +2007-11-06 08:28 hoffman + + * Source/CPack/: cmCPackGenerator.cxx, cmCPackGenerator.h, + cpack.cxx: ENH: changne ProcessGenertor to DoPackage + +2007-11-06 08:27 hoffman + + * Source/CPack/cmCPackDebGenerator.cxx: STYLE: fix line length + issue + +2007-11-06 01:16 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui, QCMake.cxx, QCMake.h: ENH: Add menus in + menu bar. Add reload & delete cache options. Add + option to quit after generation step (not yet remembered between + sessions). Add Help -> About Remove Help button (in + menu now) Remove Cancel button (File -> Exit and the + Window 'X' button exist) + +2007-11-06 00:04 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.ui: ENH: + clarify label for current generator. + +2007-11-06 00:02 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui, QCMakeCacheView.cxx: ENH: search is case + insensitive ENH: put back prompt for generator, and change combo + to label showing current generator. + +2007-11-05 22:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-05 19:26 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui, QCMakeCacheView.cxx, QCMakeCacheView.h: + ENH: Replace prompt for generator with combobox in UI. ENH: + Make "Show Advanced" toggle work. ENH: Add regex search + capabilities. ENH: Read existing registry entries from MFC + CMakeSetup.exe (will save later). + +2007-11-05 18:06 alex + + * CMakeLists.txt: COMP: use RPATH is building QtDialog and the Qt + libs are not in /lib or /usr/lib (same logic as for ccmake) + + Alex + +2007-11-05 17:44 king + + * Source/kwsys/kwsys_ios_iostream.h.in: COMP: Add streamsize and + streamoff to kwsys_ios namespace for ancient streams. + +2007-11-05 16:57 david.cole + + * DartLocal.conf.in: STYLE: Trade in expected arrakis dashboards + for resurrected equivalent ones on dash14. + +2007-11-05 16:55 hoffman + + * Source/: CMakeLists.txt, CPack/cmCPackDebGenerator.h, + CPack/cmCPackGenerator.cxx, CPack/cmCPackGenerator.h, + CPack/cmCPackGeneratorFactory.cxx, + CPack/cmCPackGeneratorFactory.h, + CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackGenericGenerator.h, CPack/cmCPackNSISGenerator.h, + CPack/cmCPackOSXX11Generator.h, + CPack/cmCPackPackageMakerGenerator.h, + CPack/cmCPackRPMGenerator.h, CPack/cmCPackTGZGenerator.h, + CPack/cmCPackZIPGenerator.h, CPack/cpack.cxx: ENH: change name + +2007-11-05 16:33 hoffman + + * Source/: CMakeLists.txt, CPack/cmCPackGeneratorFactory.cxx, + CPack/cmCPackGeneratorFactory.h, CPack/cmCPackGenerators.cxx, + CPack/cmCPackGenerators.h, CPack/cpack.cxx: ENH: change name of + class + +2007-11-05 14:47 hoffman + + * Source/WXDialog/: CMakeLists.txt, CMakeSetupFrame.cpp: ENH: fix + the compile and add install rule + +2007-11-05 14:34 king + + * Source/cmake.cxx, Source/CPack/cmCPackDebGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.h, + Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/kwsys/SystemTools.cxx, Utilities/cmcurl/ftp.c: COMP: Fix + warnings on 64-bit Mac OS X build. Patch from issue #3697. + +2007-11-05 13:20 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, + QCMakeCacheView.h: + ENH: Prompt user for generator when there is none. Many + minor improvements, bug fixes, and style fixes. + +2007-11-04 22:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-04 01:20 miguelf + + * Modules/FindwxWidgets.cmake: BUG: Fixed error related to missing + quotes around variable. + +2007-11-03 23:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-03 19:48 clinton + + * Source/QtDialog/: CMakeSetupDialog.cxx, CMakeSetupDialog.h, + CMakeSetupDialog.ui, QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, + QCMakeCacheView.h: + ENH: Allow working with empty build directories. Make + output window a bit smaller compared to cache view. Prompt + on X'ing window as well as hitting cancel. Color new cache + values red, and put them first. + +2007-11-03 13:28 clinton + + * Source/QtDialog/QCMakeCacheView.cxx: COMP: Fix some compile + warnings. STYLE: Make style a bit more consistent. + +2007-11-03 12:50 hoffman + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.h, QCMake.h, + QCMakeCacheView.h: ENH: remove qt warnings from qt with MS + compiler + +2007-11-03 12:07 hoffman + + * Source/QtDialog/QCMakeCacheView.h: ENH: fix compile error on + windows + +2007-11-03 10:30 clinton + + * Source/QtDialog/: CMakeLists.txt, CMakeSetup.cxx, CMakeSetup.ico, + CMakeSetup.png, CMakeSetup.qrc, CMakeSetup.rc, + CMakeSetupDialog.cxx, CMakeSetupDialog.h, CMakeSetupDialog.png, + CMakeSetupDialog.ui, QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, + QCMakeCacheView.h: + ENH: Add interrupt button near progress bar. Implement + help button. Implement cancel button. Add + scrollable output window. Replace ON/OFF & combobox + editors with checkboxes. Tab/backtab in cache table jumps + between values (not names and values) Add tooltips to show + help strings. Add application icon and qtmain for Windows. + + BUG: Fix save of cache values on configure. + +2007-11-02 23:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-02 14:12 clinton + + * Source/QtDialog/CMakeLists.txt: COMP: Fix build on Windows. + +2007-11-02 12:03 hoffman + + * Source/CMakeLists.txt: ENH: add option for qt dialog + +2007-11-02 11:55 clinton + + * Source/QtDialog/: CMakeSetup.cxx, CMakeSetupDialog.cxx, + CMakeSetupDialog.h, QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, + QCMakeCacheView.h: STYLE: Add license info to code. + +2007-11-02 11:50 clinton + + * Source/QtDialog/: CMakeLists.txt, CMakeSetup.cxx, CMakeSetup.qrc, + CMakeSetupDialog.cxx, CMakeSetupDialog.h, CMakeSetupDialog.png, + CMakeSetupDialog.ui, QCMake.cxx, QCMake.h, QCMakeCacheView.cxx, + QCMakeCacheView.h: ENH: Beginnings of a Qt UI for CMake. + +2007-11-02 10:46 hoffman + + * Tests/: CMakeLists.txt, Wrapping/CMakeLists.txt, + Wrapping/qtnoqtmain.cxx: ENH: remove findqt3 from cmake's + cmakelist files + +2007-11-01 22:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-11-01 16:21 hoffman + + * Source/QtDialog/README: ENH: create a directory for qt interface + to cmake + +2007-11-01 09:52 hoffman + + * Modules/CPackRPM.cmake: ENH: fix for RPM generator from Eric + +2007-11-01 08:36 david.cole + + * Source/MFCDialog/res/CMakeSetupDialog.ico, + Source/WXDialog/NGDialog.ico, Utilities/Release/CMakeLogo.ico: + ENH: Add more resolutions for CMake icons to avoid that bloated + chunky blown up icon look... + +2007-10-31 22:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-31 13:57 martink + + * Source/cmDocumentVariables.cxx: ENH: minor fix + +2007-10-31 13:38 martink + + * Source/cmDocumentVariables.cxx: ENH: added documentation for more + variables + +2007-10-31 12:55 hoffman + + * CMakeCPack.cmake, CMakeCPackOptions.cmake.in, + CPackConfig.cmake.in, CPackSourceConfig.cmake.in, + Source/CPack/cmCPackGenericGenerator.cxx: ENH: add + CPACK_PROJECT_CONFIG_FILE option to CPack + +2007-10-31 10:49 hoffman + + * Utilities/Release/CMakeLogo.ico: ENH: add icon for installer + +2007-10-31 09:39 king + + * Source/kwsys/SystemTools.cxx: BUG: Merge changes from 1.205-1.207 + from trunk to gccxml-gcc42 branch. + +2007-10-31 09:37 king + + * Source/kwsys/SystemTools.hxx.in: STYLE: Fix documentation (merge + from trunk) + +2007-10-31 09:03 hoffman + + * Source/CPack/cmCPackNSISGenerator.cxx: ENH: fix line length + +2007-10-31 08:50 david.cole + + * Modules/CPack.cmake, + Source/CPack/cmCPackCygwinBinaryGenerator.cxx, + Source/CPack/cmCPackCygwinBinaryGenerator.h, + Source/CPack/cmCPackCygwinSourceGenerator.cxx, + Source/CPack/cmCPackCygwinSourceGenerator.h, + Source/CPack/cmCPackDebGenerator.cxx, + Source/CPack/cmCPackDebGenerator.h, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackOSXX11Generator.cxx, + Source/CPack/cmCPackOSXX11Generator.h, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.h, + Source/CPack/cmCPackRPMGenerator.cxx, + Source/CPack/cmCPackRPMGenerator.h: ENH: Add CPACK_SET_DESTDIR + handling to enable packaging of installed files in absolute + locations. With this setting on, cpack will set the DESTDIR env + var when building the package so that files end up in their + intended locations. Default behavior is not to set DESTDIR for + backwards compatibility. Helps address issue #4993 and issue + #5257. Also, remove unused CPACK_USE_DESTDIR variable. ENH: Add + variable CPACK_PACKAGING_INSTALL_PREFIX to allow overriding the + CPack GetPackagingInstallPrefix from a project's CMakeLists file + if necessary. Could be used to remove the annoying /usr prefix + still used by default in the Mac PackageMaker generator. + +2007-10-30 23:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-30 23:02 hoffman + + * CMakeCPack.cmake, CPackConfig.cmake.in, + CPackSourceConfig.cmake.in, Modules/CPack.cmake, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackRPMGenerator.cxx: ENH: cpack changes, remove + the escape variable stuff as it is not needed if you provide a + config file for cpack + +2007-10-30 11:03 martink + + * Source/cmTarget.cxx: BUG: fix undefined property FRAMEWORK + +2007-10-30 10:57 martink + + * Source/cmake.cxx: BUG: fix bad set property code in cmake + +2007-10-30 10:16 hoffman + + * Modules/CPackRPM.cmake: ENH: use cpack generic variable if rpm + one is not set + +2007-10-30 10:16 hoffman + + * CMakeCPack.cmake: ENH: fix for cygwin package + +2007-10-29 22:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-29 21:10 hoffman + + * Templates/cygwin-package.sh.in: ENH: add package script for cmake + project + +2007-10-29 12:21 hoffman + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: ENH: move list + command to bootstrap commands + +2007-10-29 08:11 hoffman + + * CMakeCPack.cmake, Modules/CPack.cmake, Modules/NSIS.template.in, + Source/CPack/cmCPackNSISGenerator.cxx: ENH: add ability to set + installer icons, links to web pages, nsis code in the icon + section of the template, and ability to escape variables + correctly + +2007-10-28 22:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-27 23:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-26 23:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-26 22:57 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmSystemTools.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.cxx, + Source/kwsys/SystemTools.cxx: ENH: move changes from head + +2007-10-26 13:36 alex + + * Source/cmFindBase.cxx: STYLE: change wording of FIND_XXX() docs + to be more correct + + Alex + +2007-10-26 12:13 seanmcbride + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: STYLE: fixed + misspellings of Mac OS X + +2007-10-26 09:55 alex + + * Source/cmFindBase.cxx, Source/cmFindBase.h, + Source/cmFindLibraryCommand.cxx, Source/cmFindPathCommand.cxx, + Source/cmFindProgramCommand.cxx, + Tests/FindPackageTest/CMakeLists.txt, + Tests/FindPackageTest/include/foo.h: ENH: add support for + CMAKE_FIND_PREFIX_PATH as discussed with Brad. + CMAKE_FIND_PREFIX_PATH is both an environment variable and a + cmake variable, which is a list of base directories where + FIND_PATH, FIND_FILE, FIND_PROGRAM and FIND_LIBRARY will search + in the respective subdirectories + + Alex + +2007-10-25 22:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-25 14:03 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CPack.STGZ_Header.sh.in, Modules/FindKDE3.cmake, + Modules/FindKDE4.cmake, Modules/FindPythonInterp.cmake, + Modules/KDE3Macros.cmake, Modules/Platform/DragonFly.cmake, + Modules/Platform/GNU.cmake, Modules/Platform/NetBSD.cmake, + Modules/Platform/UnixPaths.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows.cmake, + Modules/Platform/WindowsPaths.cmake, Source/cmDependsFortran.cxx, + Source/cmFileCommand.h, Source/cmFindPackageCommand.h, + Source/cmIfCommand.cxx, Source/cmIfCommand.h, + Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmMakefile.cxx, Source/cmRemoveDefinitionsCommand.h, + Source/cmSystemTools.cxx, Source/cmTryRunCommand.h, + Source/cmake.cxx, Source/cmakemain.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.cxx, + Source/CPack/cpack.cxx: ENH: merge in stuff from head + +2007-10-25 13:29 king + + * Source/kwsys/SystemTools.cxx: BUG: Fix bug#5590. When converting + a relative path between two full paths on different windows drive + letters do not create a ../../d:/foo/bar path and just return the + full path to the destination. + +2007-10-25 13:26 alex + + * Modules/CPackDeb.cmake, Source/CPack/cmCPackDebGenerator.cxx: + BUG: rename DEBIAN_PACKAGE_* variables to CPACK_DEBIAN_PACKAGE_* + variables to make them actually work + + Alex + +2007-10-24 23:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-24 14:43 martink + + * Source/: cmGetPropertyCommand.cxx, cmGetPropertyCommand.h, + cmPropertyDefinition.h, cmake.cxx, cmake.h: ENH: add ability to + get documentaiton of a property from a script + +2007-10-24 11:36 martink + + * Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmDocumentationFormatter.h, + Source/cmDocumentationFormatterHTML.cxx, + Source/cmDocumentationSection.h, Source/cmakemain.cxx, + Source/MFCDialog/CMakeSetup.cpp, Utilities/CMakeLists.txt: ENH: + some more cleanup, fixes, and patch for HTML output + +2007-10-23 23:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-23 10:40 martink + + * Source/: cmMakefile.cxx, cmPropertyDefinitionMap.cxx: COMP: fix + for when STRICT is defined, and fix for props that have no docs + +2007-10-23 10:08 martink + + * Source/cmDocumentVariables.cxx: STYLE: fix some long lines + +2007-10-23 10:07 martink + + * Source/cmDocumentation.cxx: COMP: fix a problem with a shadowed + var + +2007-10-22 23:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-22 17:16 hoffman + + * Modules/CPack.cmake: ENH: fix bitmap escapes + +2007-10-22 16:41 martink + + * Source/: cmDocumentation.cxx, cmakemain.cxx: COMP: fix some + warnings and add some doc strings back in + +2007-10-22 15:33 martink + + * Source/: cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationSection.cxx, cmDocumentationSection.h, + cmakemain.cxx: COMP: fix some warnings and add some doc strings + back in + +2007-10-22 14:01 hoffman + + * Modules/Platform/Darwin.cmake, Source/cmLocalGenerator.cxx: ENH: + fix spelling error + +2007-10-22 13:28 martink + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmGlobalXCodeGenerator.cxx: ENH: change to make the documentation + class more generic, about halfway there, also provides secitons + for Variables now + +2007-10-22 12:48 martink + + * Source/: CMakeLists.txt, cmDocumentVariables.cxx, + cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationFormatter.h, cmDocumentationFormatterHTML.cxx, + cmDocumentationFormatterHTML.h, cmDocumentationFormatterMan.cxx, + cmDocumentationFormatterMan.h, cmDocumentationFormatterText.cxx, + cmDocumentationFormatterText.h, + cmDocumentationFormatterUsage.cxx, + cmDocumentationFormatterUsage.h, cmDumpDocumentation.cxx, + cmExtraCodeBlocksGenerator.cxx, cmExtraEclipseCDT4Generator.cxx, + cmGlobalBorlandMakefileGenerator.cxx, cmGlobalGenerator.cxx, + cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Win64Generator.cxx, + cmGlobalVisualStudio9Generator.cxx, + cmGlobalWatcomWMakeGenerator.cxx, cmMakefile.cxx, + cmPropertyDefinition.cxx, cmPropertyDefinition.h, + cmPropertyDefinitionMap.cxx, cmPropertyDefinitionMap.h, + cmStandardIncludes.h, cmake.cxx, cmake.h, cmakemain.cxx, + ctest.cxx, CPack/cpack.cxx, CursesDialog/ccmake.cxx, + MFCDialog/CMakeSetup.cpp, cmDocumentationSection.cxx, + cmDocumentationSection.h: ENH: change to make the documentation + class more generic, about halfway there, also provides secitons + for Variables now + +2007-10-22 11:40 hoffman + + * Modules/: CPack.cmake, NSIS.template.in: ENH: allow + CPACK_PACKAGE_ICON to be not set + +2007-10-22 10:17 hoffman + + * Modules/Platform/Darwin.cmake: ENH: try to fix boostrap on 10.5 + +2007-10-21 23:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-20 23:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-19 23:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-19 22:24 hoffman + + * Modules/Platform/Darwin.cmake, Source/cmLocalGenerator.cxx: ENH: + do not always add -arch flags + +2007-10-19 12:03 hoffman + + * Source/CPack/cmCPackNSISGenerator.cxx: ENH: fix line length error + +2007-10-18 22:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-18 11:11 king + + * Source/kwsys/SystemTools.cxx: BUG: Merge bug fixes from HEAD. + +2007-10-18 09:40 hoffman + + * CMakeCPack.cmake, Modules/NSIS.template.in, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.h: ENH: add ability to create + links on the start menu + +2007-10-18 09:39 hoffman + + * bootstrap: ENH: add new file + +2007-10-18 09:38 hoffman + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx: ENH: do not remove + executables and dll's before linking them so that incremental + links work, incremental links are still broken for vs 2005 and + greater because of the manifest stuff + +2007-10-18 09:10 hoffman + + * Source/: CMakeLists.txt, cmDocumentVariables.cxx, + cmDocumentVariables.h, cmake.cxx: ENH: add docs for variables + +2007-10-17 22:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-17 10:29 king + + * Utilities/cmxmlrpc/xmlrpc_client.h: COMP: Attempt to fix warning + about pointer->integer cast. + +2007-10-17 09:38 miguelf + + * Modules/FindwxWidgets.cmake: ENH: Added support for finding + wxWidgets-2.9. Thanks to Joshua Jensen and Steven. + +2007-10-16 22:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-16 14:27 martink + + * Source/: CMakeLists.txt, cmConfigure.cmake.h.in, + cmPropertyMap.cxx: ENH: added CMAKE_STRICT option for var and + property checking + +2007-10-16 10:19 king + + * Source/: cmDependsFortran.cxx, cmInstallCommand.cxx: STYLE: Fixed + line-too-long. + +2007-10-15 22:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-15 17:38 king + + * Source/cmExecuteProcessCommand.cxx: BUG: Work around bug when + calling insert on an empty vector of char on midworld. Should + eliminate the sporadic failure of EXECUTE_PROCESS during the + SimpleInstall-Stage2 test. (david.cole from Brad's checkout on + midworld) + +2007-10-15 14:50 martink + + * Modules/TestForSSTREAM.cmake, Source/cmForEachCommand.h, + Source/cmWhileCommand.h, Source/cmake.cxx: ENH: minor doc + cleanups and an example of documenting a variable + +2007-10-15 07:08 david.cole + + * Source/cmInstallCommand.cxx, Source/cmInstallScriptGenerator.cxx, + Source/cmInstallScriptGenerator.h, Source/cmLocalGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/InstallScript3.cmake, + Tests/SimpleInstall/InstallScript4.cmake, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/InstallScript3.cmake, + Tests/SimpleInstallS2/InstallScript4.cmake: BUG: Fix #5868 - add + COMPONENT handling to the SCRIPT and CODE signatures of the + INSTALL command. + +2007-10-14 22:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-14 08:15 alex + + * Source/cmExportCommand.cxx: + BUG: fix #5806, wrong quotes used in the exported file + + Alex + +2007-10-13 22:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-12 22:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-12 21:30 miguelf + + * Modules/FindwxWidgets.cmake: BUG: Added support for the AUI + library module (bug 4338). Also applied some STYLE changes + including: deprecation of wxWidgets_USE_LIBS in favor of using + standard FIND_PACKAGE COMPONENTS, removed some CMake 2.4.2 + compatibility patches, use of execute_process instead of + exec_program, etc. + +2007-10-12 19:33 hoffman + + * Modules/CPackRPM.cmake: BUG: fix for bug 5878 + +2007-10-12 11:43 david.cole + + * Source/cmTarget.cxx: BUG: Fix the dashboards! Put it back the way + it was so it always creates the target directory at configure + time. Figure out how to avoid it for the framework case on the + Mac/Xcode later... + +2007-10-12 11:34 hoffman + + * Modules/FindFLTK2.cmake: ENH: add from bug 0004219 + +2007-10-12 11:00 hoffman + + * Modules/FindASPELL.cmake: BUG: fix for bug 0005871 + +2007-10-12 10:58 hoffman + + * Source/cmLocalGenerator.cxx: BUG: fix for bug 0003618 , allow one + arch in OSX_ARCHS to work + +2007-10-12 09:58 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix for bug 0005767 hang for + replace string with empty + +2007-10-12 09:51 king + + * Source/cmDependsFortran.cxx: ENH: When an object file requires a + module add the file-level dependency between the object file and + the module timestamp file. Create a dummy timestamp file in case + nothing in the project actually creates the module. See + bug#5809. + +2007-10-12 09:32 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Dependency + scanners should have local generators set always. + +2007-10-11 22:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-10 22:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-10 17:47 alin.elena + + * Modules/: CheckFortranFunctionExists.cmake, FindBLAS.cmake, + FindLAPACK.cmake, Platform/Linux-ifort.cmake: + ENH: FindBLAS.cmake and FindLAPACK.cmake modules added. They + locate various implementations of blas and lapack libraries. + CheckFortranFunctionExists.cmake provides a test function to + check if the library is usabale. I have also changed the -KPIC + flag to -fPIC in Linux-ifort.cmake. + +2007-10-10 11:47 martink + + * Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.h, + Source/cmAddDefinitionsCommand.h, + Source/cmAddDependenciesCommand.h, + Source/cmAddExecutableCommand.h, Source/cmAddLibraryCommand.h, + Source/cmAddSubDirectoryCommand.h, Source/cmAddTestCommand.h, + Source/cmAuxSourceDirectoryCommand.h, Source/cmBuildCommand.h, + Source/cmBuildNameCommand.h, Source/cmCMakeMinimumRequired.h, + Source/cmConfigureFileCommand.h, Source/cmCreateTestSourceList.h, + Source/cmDefinePropertyCommand.h, Source/cmDocumentation.cxx, + Source/cmElseCommand.h, Source/cmElseIfCommand.h, + Source/cmEnableLanguageCommand.h, + Source/cmEnableTestingCommand.h, Source/cmEndForEachCommand.h, + Source/cmEndIfCommand.h, Source/cmEndMacroCommand.h, + Source/cmEndWhileCommand.h, Source/cmExecProgramCommand.h, + Source/cmExecuteProcessCommand.h, Source/cmExportCommand.h, + Source/cmExportLibraryDependencies.h, + Source/cmFLTKWrapUICommand.h, Source/cmFileCommand.h, + Source/cmFindFileCommand.cxx, Source/cmFindFileCommand.h, + Source/cmFindLibraryCommand.cxx, Source/cmFindLibraryCommand.h, + Source/cmFindPackageCommand.h, Source/cmFindPathCommand.cxx, + Source/cmFindPathCommand.h, Source/cmFindProgramCommand.cxx, + Source/cmFindProgramCommand.h, Source/cmForEachCommand.h, + Source/cmGetCMakePropertyCommand.h, + Source/cmGetDirectoryPropertyCommand.h, + Source/cmGetFilenameComponentCommand.h, + Source/cmGetPropertyCommand.h, + Source/cmGetSourceFilePropertyCommand.h, + Source/cmGetTargetPropertyCommand.h, + Source/cmGetTestPropertyCommand.h, Source/cmIfCommand.h, + Source/cmIncludeCommand.h, Source/cmIncludeDirectoryCommand.h, + Source/cmIncludeExternalMSProjectCommand.h, + Source/cmIncludeRegularExpressionCommand.h, + Source/cmInstallCommand.h, Source/cmInstallFilesCommand.h, + Source/cmInstallProgramsCommand.h, + Source/cmInstallTargetsCommand.h, + Source/cmLinkDirectoriesCommand.h, + Source/cmLinkLibrariesCommand.h, Source/cmListCommand.h, + Source/cmLoadCacheCommand.h, Source/cmLoadCommandCommand.h, + Source/cmMacroCommand.h, Source/cmMakeDirectoryCommand.h, + Source/cmMarkAsAdvancedCommand.h, Source/cmMathCommand.h, + Source/cmMessageCommand.h, Source/cmOptionCommand.h, + Source/cmOutputRequiredFilesCommand.h, Source/cmProjectCommand.h, + Source/cmQTWrapCPPCommand.h, Source/cmQTWrapUICommand.h, + Source/cmRemoveCommand.h, Source/cmRemoveDefinitionsCommand.h, + Source/cmSeparateArgumentsCommand.h, Source/cmSetCommand.h, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSetPropertiesCommand.h, + Source/cmSetSourceFilesPropertiesCommand.h, + Source/cmSetTargetPropertiesCommand.h, + Source/cmSetTestsPropertiesCommand.h, Source/cmSiteNameCommand.h, + Source/cmSourceGroupCommand.h, Source/cmStringCommand.h, + Source/cmSubdirCommand.h, Source/cmSubdirDependsCommand.h, + Source/cmTargetLinkLibrariesCommand.h, + Source/cmTryCompileCommand.h, Source/cmTryRunCommand.h, + Source/cmUseMangledMesaCommand.h, + Source/cmUtilitySourceCommand.h, + Source/cmVariableRequiresCommand.h, + Source/cmVariableWatchCommand.h, Source/cmWhileCommand.h, + Source/cmWriteFileCommand.h, + Tests/CommandLineTest/CMakeLists.txt: ENH: make commands lower + case by default + +2007-10-10 11:06 david.cole + + * Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalXCodeGenerator.cxx, Source/cmInstallCommand.cxx, + Source/cmInstallTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmOrderLinkDirectories.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/CMakeLists.txt, + Tests/Framework/CMakeLists.txt: ENH: Finish up the Framework + creation code restructuring. Frameworks build and install now. + More work needed on the packaging step. See Tests/Framework for + example use. + +2007-10-10 09:09 king + + * Tests/Fortran/: CMakeLists.txt, test_use_in_comment_fixedform.f, + test_use_in_comment_freeform.f90, in_interface/main.f90, + in_interface/module.f90: ENH: Added test for 'use' keyword in a + comment. Patch from Maik Beckmann. See bug#5809. + +2007-10-10 09:07 king + + * Source/cmDependsFortran.cxx: BUG: Fix in-interface mode. Patch + from Maik Beckmann. See bug#5809. + +2007-10-09 22:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-09 15:20 barre + + * Source/kwsys/SystemTools.cxx: ENH: bad bug bad + +2007-10-09 14:35 martink + + * Source/: cmDocumentation.cxx, cmDocumentationFormatterHTML.cxx, + cmDocumentationFormatterMan.cxx, + cmDocumentationFormatterText.cxx, + cmDocumentationFormatterUsage.cxx, cmDumpDocumentation.cxx, + cmPropertyDefinition.cxx, cmPropertyDefinitionMap.cxx, + cmStandardIncludes.h, cmake.cxx, cmake.h, cmakemain.cxx, + ctest.cxx, CPack/cpack.cxx, MFCDialog/CMakeSetup.cpp: BUG: revert + doc changes since VS7 cannot compile them, will implement them in + a different manner + +2007-10-09 09:55 martink + + * Source/: cmDocumentation.cxx, cmDocumentationFormatterHTML.cxx, + cmDocumentationFormatterMan.cxx, + cmDocumentationFormatterText.cxx, + cmDocumentationFormatterUsage.cxx, cmDumpDocumentation.cxx, + cmPropertyDefinition.cxx, cmPropertyDefinitionMap.cxx, + cmStandardIncludes.h, cmake.cxx, cmake.h, cmakemain.cxx, + ctest.cxx, CPack/cpack.cxx, MFCDialog/CMakeSetup.cpp: ENH: make + documentation entries actually store their data + +2007-10-08 22:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-08 10:05 king + + * Source/cmSystemTools.cxx: STYLE: Fixed line-too-long. + +2007-10-08 10:03 king + + * Source/cmSystemTools.cxx: COMP: Added inadvertantly removed + include. + +2007-10-07 22:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-07 16:22 king + + * Source/cmSystemTools.cxx: COMP: Simplified include file logic. + The windows.h header should be included for all compilers on + windows. + +2007-10-06 22:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-05 22:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-05 15:51 martink + + * Source/cmSystemTools.cxx: COMP: fix to compile on VS 8 + +2007-10-05 13:15 hoffman + + * Modules/Platform/Windows-bcc32.cmake: ENH: add support for + preprocessed files in borland + +2007-10-05 13:14 hoffman + + * Utilities/KWStyle/CMakeFiles.txt.in: ENH: add more exclusions for + kwstyle + +2007-10-05 10:03 king + + * Source/cmSystemTools.cxx: BUG: Fix call to SetFileTime to set it + on the proper file. + +2007-10-05 10:02 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + COMP: Disable some warnings in generated code. Disable + compilation of unused goto block. + +2007-10-05 09:46 king + + * Source/: cmFileCommand.cxx, cmSystemTools.cxx, cmSystemTools.h: + ENH: During file installation treat the source file as a + dependency of the installed file. Install the file only if the + destination is older than the source. Set the file times on the + installed file to match those of the source file. This should + greatly improve the speed of repeated installations because it + removes the comparison of file contents. This addresses + bug#3349. + +2007-10-04 22:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-04 15:31 hoffman + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + ENH: update .y file with borland fix, and use a table based + strcasecmp + +2007-10-04 14:47 david.cole + + * Source/cmDependsFortranParser.cxx: COMP: Get it to compile on + Borland 5.5, too. Including stl headers here does not work, + because with Borland 5.5 stl headers pull in windef.h which + typedefs WORD which is in the fortran tokens list... + +2007-10-04 09:49 king + + * Source/cmDependsFortranParser.cxx: STYLE: Removed reference to my + home directory from #line calls. + +2007-10-03 22:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-03 17:01 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + COMP: Do not use non-portable strcasecmp. + +2007-10-03 16:19 king + + * Source/cmDependsFortran.cxx: BUG: When requiring a module through + a .proxy rule add an empty .proxy rule in case no other source in + the target provides it. Since it is not a file-level dependency + there does not need to be a rule to create the .proxy as a file. + This addresses bug#3984. + +2007-10-03 15:41 king + + * Source/: cmDependsFortran.cxx, cmDependsFortranLexer.cxx, + cmDependsFortranLexer.h, cmDependsFortranLexer.in.l, + cmDependsFortranParser.cxx, cmDependsFortranParser.h, + cmDependsFortranParser.y, cmDependsFortranParserTokens.h: BUG: + Fix for bug#5809. Applied patch supplied in the bug report. + Updated pre-generated lexer and parser sources. This updates the + makedepf90 version to 2.8.8. The parser actions have been + updated to ignore "use" in comments properly. + +2007-10-03 15:23 king + + * Source/CMakeLists.txt: ENH: Updated CMAKE_REGENERATE_YACCLEX + option to support cmDependsFortran. Fixed to work with spaces in + path. + +2007-10-02 22:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-02 15:48 hoffman + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: speed up + actual path name by cache on windows + +2007-10-01 22:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-10-01 15:57 david.cole + + * Tests/: CMakeLists.txt, SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: COMP: Rename the executables for + the SimpleInstall tests so that the executable files that run + during the test do not have the word install in their file names. + This allows running the tests on Windows Vista without admin + privileges and without adding a manifest containing the asInvoker + requestedExecutionLevel element. + +2007-09-30 22:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-29 22:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-28 22:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-27 23:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-27 14:44 hoffman + + * Source/cmGeneratedFileStream.cxx, Source/cmSystemTools.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, Utilities/cmtar/libtar.c: + COMP: remove warnings + +2007-09-27 14:20 hoffman + + * Modules/FindQt4.cmake: ENH: set QT_EDITION_DESKTOPLIGHT and do + not disable modules + +2007-09-27 14:18 hoffman + + * DartLocal.conf.in: ENH: fix space + +2007-09-27 14:16 hoffman + + * Source/cmWin32ProcessExecution.cxx: ENH: remove junk from output + +2007-09-27 08:53 hoffman + + * Utilities/cmcurl/CMakeLists.txt: ENH: add a check for basename to + cmcurl + +2007-09-26 22:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-26 20:53 hoffman + + * Modules/FindQt4.cmake: ENH: look for qt in a beter registry place + and disable modules that won't work with DesktopLight, also set + QT_EDITION variable + +2007-09-25 23:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-25 11:01 hoffman + + * Source/MFCDialog/CMakeGenDialog.cpp: ENH: more generic search for + visual studio installations + +2007-09-25 10:57 hoffman + + * Source/cmSystemTools.cxx: BUG: fix problem with stdout and stderr + not showing up in ms dos shells + +2007-09-25 08:36 hoffman + + * Tests/CMakeLists.txt: ENH: increase timeout + +2007-09-25 08:30 hoffman + + * DartLocal.conf.in: ENH: remove extra space + +2007-09-24 23:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-24 13:19 hoffman + + * DartLocal.conf.in, Source/cmSystemTools.cxx: ENH: add new + machines + +2007-09-24 11:18 hoffman + + * CTestCustom.cmake.in: COMP: exclude some warnings on hp + +2007-09-24 11:16 hoffman + + * Source/: cmCommandArgumentLexer.cxx, cmDependsJavaLexer.cxx, + cmExprLexer.cxx: COMP: fix warnings on hp + +2007-09-24 11:10 hoffman + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: ENH: + fix line length issues + +2007-09-24 09:53 king + + * Modules/FindThreads.cmake: BUG: Enable CMAKE_HP_PTHREADS only + when the old CMA threads are available. Modern HP pthreads are + just normal pthreads. + +2007-09-23 23:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-22 22:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-21 22:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-21 13:37 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + STYLE: use %-10lld instead of %-10qd for printing a 64bit int, + maybe this silences the warning of the HP compiler + + Alex + +2007-09-21 11:42 alex + + * Source/cmFindPackageCommand.cxx: + STYLE: improved error message for the case that neither + FindFoo.cmake nor FooConfig.cmake were found + + Alex + +2007-09-21 11:42 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: remove message + +2007-09-20 22:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-20 17:21 king + + * Modules/FindThreads.cmake: BUG: Do not use CMA threads on HP if + they do not exist. + +2007-09-20 16:48 hoffman + + * Tests/CMakeLists.txt: ENH: VV make too much data for the + dashboard + +2007-09-20 11:57 hoffman + + * Source/kwsys/testRegistry.cxx: COMP: remove warning on new HPUX + compiler + +2007-09-20 11:27 hoffman + + * Source/MFCDialog/CMakeLists.txt: BUG: fix to work with cmake 2.2 + +2007-09-20 10:56 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Disable package test only on + OSX < 10.4. Added comment explaining reason for timeout. + +2007-09-20 10:47 king + + * Tests/CMakeLists.txt: ENH: Restore shorter timeout for + SimpleInstall-Stage2. + +2007-09-20 09:36 alex + + * Source/kwsys/SystemTools.cxx: + COMP: TIOCGWINSZ and struct winsize also doesn't exist on Cray + Catamount + + Alex + +2007-09-20 09:30 alex + + * Source/kwsys/SystemTools.cxx: + COMP: make SystemTools.cxx build on Cray Xt3 + + Alex + +2007-09-20 08:33 alex + + * Source/cmDocumentation.cxx: + STYLE: fix line lengths + + Alex + +2007-09-19 22:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-19 13:51 david.cole + + * Source/MFCDialog/CMakeLists.txt: COMP: Only use the VERBATIM flag + for non-Visual Studio builds being configured by CMake 2.4.5 or + later. + +2007-09-19 13:14 alex + + * Source/: cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationFormatter.h, cmakemain.cxx: + ENH: add new help option --help-custom-modules, which generates + documentation for all modules found in CMAKE_MODULE_PATH, which + currently has to be specified via -D, this can later on be + improved e.g. by reading a special (to-be-created) file like + CMakeFiles/ModulePath.cmake in the build tree so that running + cmake help in the build tree of a project will always give you + the current module path. (This could actually also help IDEs + which would like to support cmake for projects...) + + Alex + +2007-09-19 11:42 hoffman + + * Utilities/cmcurl/CMakeLists.txt: ENH: add test for HAVE_BASENAME + since it is used + +2007-09-19 11:16 hoffman + + * Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, Source/kwsys/CMakeLists.txt, + Tests/CMakeLists.txt: ENH: fix failing test when valgrind is on + +2007-09-19 11:10 king + + * Tests/: CMakeLists.txt, SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Re-enable packaging part of + SimpleInstall-Stage2 test on Apple. Give it a long timeout to + see what is going on. + +2007-09-19 10:46 alex + + * Source/: cmDocumentationFormatter.h, + cmDocumentationFormatterHTML.cxx: + COMP: fix warning about unused parameters + + Alex + +2007-09-19 09:59 alex + + * Source/cmDocumentationFormatterMan.cxx: + BUG: correct name for the man page + + Alex + +2007-09-19 09:35 alex + + * Modules/FindQt4.cmake: + BUG: if Qt is installed as a framework, add -F to the command + line so Q_WS_MAC can be detected correctly + + Alex + +2007-09-19 09:05 alex + + * Source/: CMakeLists.txt, cmDocumentation.cxx, cmDocumentation.h, + cmDocumentationFormatter.cxx, cmDocumentationFormatter.h, + cmDocumentationFormatterHTML.cxx, cmDocumentationFormatterHTML.h, + cmDocumentationFormatterMan.cxx, cmDocumentationFormatterMan.h, + cmDocumentationFormatterText.cxx, cmDocumentationFormatterText.h, + cmDocumentationFormatterUsage.cxx, + cmDocumentationFormatterUsage.h: + STYLE: move the code for the different formats of the generated + help into their own classes, making cmDocumentation smaller and + also making it easier to eventually add another format + + Alex + +2007-09-19 09:04 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + COMP: reenable the installation of the PUBLIC_HEADERs + + Alex + +2007-09-18 22:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-18 17:05 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + STYLE: fix line lengths + + Alex + +2007-09-18 15:16 hoffman + + * CMakeCPack.cmake, Modules/NSIS.InstallOptions.ini.in, + Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx: + ENH: allow for desktop link to be created and fix chop of last + char in PATH on uninstall + +2007-09-18 15:13 alex + + * Modules/FindPythonLibs.cmake: + BUG: make the string static, otherwise the contents are gone when + we exit the function (same fix as in VTK/CMake/) + + Alex + +2007-09-18 11:35 hoffman + + * Tests/CMakeLists.txt: ENH: increase timeout for long test + +2007-09-18 11:34 hoffman + + * Source/cmCTest.cxx: ENH: allow test properties to set a timeout + that is longer than the default timeout, but not longer than + CTEST_TIME_LIMIT for a script + +2007-09-18 09:54 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + ENH: use the oubject_output option to try to tell CodeBlocks + where the object files are located (to make "compile file" work). + Doesn't work yet, but at least the .objs/ is now removed from the + path. + + Alex + +2007-09-17 22:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-17 16:21 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + COMP: disable packaging test on Apple, see if this fixes the + timeouts + + Alex + +2007-09-17 16:10 hoffman + + * Source/MFCDialog/CMakeLists.txt: ENH: make mt command work with + gmake + +2007-09-17 15:59 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix for vs 8 + +2007-09-17 15:55 alex + + * CMakeLists.txt, Modules/CMakeCCompilerId.c, + Modules/CMakeCXXCompilerId.cpp, + Modules/Platform/Linux-PGI-C.cmake, + Modules/Platform/Linux-PGI-CXX.cmake, Source/kwsys/Directory.cxx: + + ENH: add support for the Portland Compiler to CMake, can build + cmake and the tests pass (except the wrapping tests, which fail + to link to the g++-compiled Qt) + + Alex + +2007-09-17 15:40 alex + + * Utilities/cmtar/libtar.c: + COMP: use C-style comments in C code + + Alex + +2007-09-17 15:27 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: test install of debug libs + +2007-09-17 15:26 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: allow for + installation of debug libs + +2007-09-17 15:20 hoffman + + * Modules/CMakeVS8FindMake.cmake, + Modules/Platform/Windows-cl.cmake, Source/CMakeLists.txt, + Source/cmGlobalVisualStudio9Generator.cxx, + Source/cmGlobalVisualStudio9Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmake.cxx, + Source/MFCDialog/StdAfx.h, Utilities/cmcurl/select.h, + Utilities/cmcurl/CMake/CurlTests.c, + Utilities/cmcurl/Platforms/WindowsCache.cmake, + Modules/CMakeVS9FindMake.cmake: ENH: add support for vs 2008 beta + 2 + +2007-09-17 15:18 alex + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, internal.h: + COMP: add a check for makedev, which isn't available with the PGI + compiler on Cray XT3 + + Alex + +2007-09-17 11:17 hoffman + + * Source/cmSystemTools.cxx: ENH: fix warning + +2007-09-17 10:53 alex + + * Source/cmTryRunCommand.cxx: + STYLE: copy the executables from TRY_RUN() to + ${CMAKE_BINARY_DIR}/CMakeFiles/ instead to ${CMAKE_BINARY_DIR} + + Alex + +2007-09-17 10:51 king + + * Tests/BuildDepends/: CMakeLists.txt, Project/CMakeLists.txt, + Project/dep.cxx, Project/zot.cxx: ENH: Adding test for + ADD_CUSTOM_COMMAND's new IMPLICIT_DEPENDS feature. + +2007-09-17 10:50 king + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmCustomCommand.cxx, + cmCustomCommand.h, cmMakefileTargetGenerator.cxx: ENH: Added + IMPLICIT_DEPENDS option to ADD_CUSTOM_COMMAND. It currently + works only for Makefile generators. It allows a custom command + to have implicit dependencies in the form of C or CXX sources. + +2007-09-17 10:40 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildCommand.cxx, CTest/cmCTestTestHandler.cxx: ENH: + fix build issue with config type not being specified by ctest + +2007-09-16 22:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-15 22:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-14 22:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-13 22:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-13 13:37 king + + * Source/cmMakefileTargetGenerator.cxx, Source/cmSourceFile.cxx, + Tests/PrecompiledHeader/CMakeLists.txt: ENH: Added OBJECT_OUTPUTS + source file property. Updated PrecompiledHeader test to use it + (making the test simpler). + +2007-09-13 09:14 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fix shadowed local + warning by scoping the previous decl properly. + +2007-09-12 22:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-11 22:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-11 15:21 david.cole + + * CTestCustom.cmake.in, Source/MFCDialog/CMakeLists.txt, + Source/MFCDialog/CMakeSetupManifest.xml: ENH: Avoid prompting for + admin privileges when running CMakeSetup.exe on Vista by adding a + requestedExecutionLevel element to its manifest. + +2007-09-11 14:43 hoffman + + * Source/CTest/cmCTestBuildAndTestHandler.cxx: ENH: for build and + test default the config type to the one that ctest was built + with, it is good for the current ctest setup, and other projects + can always specify a value on the command line + +2007-09-11 12:23 hoffman + + * Source/cmSystemTools.cxx: ENH: opps + +2007-09-11 11:22 david.cole + + * Utilities/cmzlib/: CMakeLists.txt, ChangeLog, FAQ, INDEX, README, + README.Kitware.txt, adler32.c, cm_zlib_mangle.h, compress.c, + crc32.c, crc32.h, deflate.c, deflate.h, example.c, gzio.c, + infblock.c, infblock.h, infcodes.c, infcodes.h, inffast.c, + inffast.h, inffixed.h, inflate.c, inflate.h, inftrees.c, + inftrees.h, infutil.c, infutil.h, maketree.c, minigzip.c, + trees.c, uncompr.c, zconf.h, zlib.def, zlib.h, zlib.rc, zutil.c, + zutil.h: ENH: Update zlib to 1.2.3. Addresses bugs #5445 and + #3473. + +2007-09-11 11:21 hoffman + + * Source/: cmCTest.cxx, cmSystemTools.cxx, cmSystemTools.h, + ctest.cxx, CTest/cmCTestTestHandler.cxx: ENH: fix 2 ctest issues, + do not use the build type of ctest to look for config types, do + not inherit pipes in child procs for ctest so it can kill them + +2007-09-11 10:01 hoffman + + * Source/cmMathCommand.h: ENH: improve docs + +2007-09-10 22:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-10 17:39 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: turn this stuff off to see + if it fixes the dashboard on midworld + +2007-09-10 17:10 hoffman + + * Tests/Plugin/src/example_exe.cxx: ENH: fix memory leak + +2007-09-10 10:49 hoffman + + * Tests/CMakeLists.txt, Utilities/Release/README, + Utilities/Release/create-cmake-release.cmake, + Utilities/Release/upload_release.cmake: ENH: add test that builds + a nightly windows cmake binary + +2007-09-10 10:22 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmTarget.cxx: ENH: Added + XCODE_ATTRIBUTE_ property to allow direct setting + of Xcode target attributes in generated projects. For example, + one may set the prefix header property and the corresponding + precompiled option to do precompiled headers. + +2007-09-09 23:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-09 13:18 hoffman + + * CMakeLists.txt: ENH: remove debug print + +2007-09-08 23:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-07 22:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-07 17:00 hoffman + + * CMakeLists.txt: ENH: MATH is not in bootstrap cmake + +2007-09-07 14:20 hoffman + + * CMakeCPack.cmake, CMakeLists.txt: ENH: for CVS CMake have cpack + use the version date in the name of the package + +2007-09-07 11:10 hoffman + + * Source/cmCacheManager.cxx: ENH: fix spelling error + +2007-09-06 22:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-06 17:47 david.cole + + * Utilities/Release/CMakeInstall.bmp: BUG: Put back + CMakeInstall.bmp in order to build a package with NSIS on + Windows. It was inadvertently removed. + +2007-09-06 10:06 hoffman + + * DartLocal.conf.in: ENH: acdc is dead + +2007-09-05 23:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-09-04 11:45 zack.galbreath + + * Source/temp.txt: ENH: removing temporary testing file + +2007-09-04 11:05 zack.galbreath + + * Source/temp.txt: ENH: testing branchRestrict + +2007-08-31 16:52 alex + + * Source/: cmInstallCommand.cxx, cmInstallCommandArguments.h: + STYLE: fix line lengths + + Alex + +2007-08-31 16:27 alex + + * Modules/CPack.cmake: + STYLE: mark the generator options as advanced + + Alex + +2007-08-31 15:05 alex + + * Utilities/KWStyle/CMake.kws.xml.in: + STYLE: disable header check + + Alex + +2007-08-31 14:51 king + + * CMakeLists.txt, CTestCustom.cmake.in, CTestCustom.ctest.in: ENH: + Create CTestCustom.cmake instead of CTestCustom.ctest. Create + the old file to include the new one for compatibility. This + should prevent the long delays of CTest traversing the whole tree + looking for CTestCustom.ctest files. + +2007-08-31 14:07 alex + + * Utilities/KWStyle/: CMakeLists.txt, CMakeMoreChecks.kws.xml.in: + STYLE: add makefile target MoreStyleChecks, which runs KWStyle + with more checks enabled and creates the html files. + + Alex + +2007-08-31 13:45 alex + + * Source/cmGlobalGenerator.cxx: + STYLE: the temporary variable is not necessary + + Alex + +2007-08-31 13:42 alex + + * Source/: cmExtraCodeBlocksGenerator.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalKdevelopGenerator.cxx: + ENH: add support for Fortran to the KDevelop generator -minor + optimization for GetLanguageEnabled() + + Alex + +2007-08-31 09:14 king + + * Source/CPack/cmCPackDebGenerator.cxx: BUG: Another space-in-path + fix. + +2007-08-31 09:09 king + + * Source/cmake.cxx: BUG: Fix path to CMake executables when run + from bootstrap build. + +2007-08-30 16:23 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + STYLE: adapt the test to the change from FILENAME to FILE -add a + call to the EXPORT() command + + Alex + +2007-08-30 16:22 alex + + * Source/: cmInstallCommand.cxx, cmInstallExportGenerator.cxx: + STYLE: rename FILENAME keyword to FILE, because FILENAME is used + in no other place + + Alex + +2007-08-30 13:35 alex + + * Modules/: FindPythonInterp.cmake, FindPythonLibs.cmake: + ENH: add support for the next python release, python 2.6 + + Alex + +2007-08-30 11:36 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + STYLE: "Build file" still doesn't work, but now it is at least a + bit closer, it needs some more support from CB + + Alex + +2007-08-30 10:26 alex + + * Source/cmStringCommand.h: + STYLE: add the | to the docs + + Alex + +2007-08-29 16:32 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + BUG: work if there are spaces in the path to cmake + + Alex + +2007-08-29 16:31 alex + + * Modules/CPackRPM.cmake: + ENH: fail with error if trying to create a RPM stating that + rpmbuild can't handle spaces + + Alex + +2007-08-29 15:19 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + BUG: make paths with spaces work in CodeBlocks -gcc is always gcc + and not mingw + + Alex + +2007-08-29 14:35 alex + + * Source/cmIfCommand.cxx: BUG: this seems to fix the regexp + result-storage problem, now it seems the actual result is tored + instead of "1" , as it happened for StringFileTest on Windows + + Alex + +2007-08-29 14:05 alex + + * Source/cmStringCommand.h: + STYLE: add docs about the supported regexp characters and + CMAKE_MATCH_(0..9) + + Alex + +2007-08-29 12:01 alex + + * Tests/StringFileTest/CMakeLists.txt: + ENH: added tests for the CMAKE_MATCH_(0..9) variables, which get + set by regex matches (STRING(REGEX), IF(MATCHES)) + + Alex + +2007-08-29 11:58 alex + + * Source/: cmIfCommand.cxx, cmIfCommand.h, cmStringCommand.cxx, + cmStringCommand.h: + ENH: also store the group matches from IF( MATCHES) in + CMAKE_MATCH_(0..9) + + Alex + +2007-08-29 11:30 king + + * Source/cmDependsFortran.cxx: BUG: Do not write symbolic make + dependencies into depends.internal. + +2007-08-29 10:12 alex + + * Source/: cmExtraCodeBlocksGenerator.cxx, + cmExtraCodeBlocksGenerator.h: + ENH: don't hardcode gcc -put the include dirs in the project file + to enable autocompletion -prepare for nmake + + Alex + +2007-08-28 16:27 alex + + * Source/cmMakefile.cxx: + COMP: explicitely cast to int to silence warning with msvc8 + + Alex + +2007-08-28 16:19 alex + + * Modules/CMakeGenericSystem.cmake, Source/cmLocalGenerator.cxx: + ENH: add flag so a terminating slash for the link path can be + specified (needed by the Digital Mars D compiler) + + Alex + +2007-08-28 15:13 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + STYLE: add links to docs + + Alex + +2007-08-28 13:46 alex + + * Source/CTest/cmCTestGenericHandler.cxx: + STYLE: fix typo + + Alex + +2007-08-28 11:02 alex + + * CMakeLists.txt: + COMP: enable RPATH if any of the CMAKE_USE_SYSTEM_XXX variables + is enabled or if the curses library is neither in /lib nor in + /usr/lib . This makes it build on NetBSD. For more comments see + CMakeLists.txt + + Alex + +2007-08-28 10:59 alex + + * Tests/SourceGroups/: CMakeLists.txt, main.c: + COMP: enable ANSI C, this should make it work with the HP-UX + compiler + + Alex + +2007-08-28 10:52 alex + + * Modules/: CheckCSourceRuns.cmake, CheckCXXSourceRuns.cmake: + ENH: use the same CMAKE_SKIP_RPATH setting in + CHECK_C/CXX_SOURCE_RUNS as in the main project. I think it + doesn't make sense if a project disables RPATH, uses + CHECK_C_SOURCE_RUNS() to see if something is able to run, and + this succeeds because it has been built with RPATH, but an + executable built within the project won't be able to run since it + has been built without RPATH. + + Alex + +2007-08-28 08:36 alex + + * Tests/SourceGroups/main.c: + COMP: maybe it compiles this way with the HP-UX compiler + + Alex + +2007-08-27 23:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-27 17:05 alex + + * Source/: cmLocalVisualStudioGenerator.cxx, + cmLocalVisualStudioGenerator.h: BUG: fix #5326: source files with + the same name in different groups lead to colliding object file + names + + Alex + +2007-08-27 16:05 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + ENH: add test for installing a header marked as PUBLIC_HEADER of + a library + + Alex + +2007-08-27 16:04 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmInstallCommand.cxx, cmInstallCommand.h, + cmInstallExportGenerator.cxx, cmInstallExportGenerator.h: + ENH: add install files generators for targets which have + PUBLIC_HEADER, PRIVATE_HEADER or RESOURCE_FILES property, use the + destination for the public headers as include directory property + for exported libraries + + Alex + +2007-08-27 15:15 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + COMP: add a test for exporting and importing targets + + Alex + +2007-08-27 14:44 alex + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: + COMP: the SimpleInstall test also succeeds on the Mac, so maybe + Andys comment is not valid anymore + + Alex + +2007-08-27 14:17 alex + + * Tests/: CMakeLists.txt, SourceGroups/CMakeLists.txt: + ENH: add the source_group() demo to the tests + + Alex + +2007-08-27 13:23 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + COMP: disable nmake support until somebody tests it + + Alex + +2007-08-27 09:01 alex + + * Modules/FindCurses.cmake, Source/CursesDialog/CMakeLists.txt, + Source/CursesDialog/ccmake.cxx, + Source/CursesDialog/cmCursesStandardIncludes.h, + Source/CursesDialog/form/CMakeLists.txt, + Source/CursesDialog/form/cmFormConfigure.h.in, + Source/CursesDialog/form/form.h: + COMP: make it build on NetBSD, which has separate curses and + ncurses, so it has to be detected that curses isn't good enough, + but ncurses is, and that ncurses.h instead of curses.h is + included + + Alex + +2007-08-27 08:49 alex + + * Source/cmGlobalKdevelopGenerator.cxx: + COMP: remove unused variable + + Alex + +2007-08-26 23:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-26 19:27 alex + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmGlobalKdevelopGenerator.h: + ENH: add all subdirs of the project to the kdevelop blacklist, so + kdevelop doesn't watch these dirs for added or remved files + everytime it is started + + Alex + +2007-08-26 03:29 alex + + * Modules/FindKDE4.cmake: + BUG: KDEDIRS contains the kde install locations, not the binary + dirs, so make KDEDIRS actually work in FindKDE4.cmake + + Alex + +2007-08-26 03:17 alex + + * Source/: cmMakefile.cxx, cmMakefile.h, cmSourceGroupCommand.cxx: + COMP: parent is not used anymore with this patch, since now the + name is given as a vector of components + + Alex + +2007-08-26 02:42 alex + + * Modules/FindPkgConfig.cmake: + STYLE: fix typo + + Alex + +2007-08-25 23:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-24 23:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-24 14:39 alex + + * Tests/SourceGroups/: CMakeLists.txt, baz.c, main.c: BUG: demo + (not really test) for the source_group() command + + Alex + +2007-08-24 14:27 alex + + * Source/: cmInstallCommand.cxx, cmInstallCommandArguments.cxx, + cmInstallCommandArguments.h: + STYLE: fix MSVC warnings by making the cmCommandArgumentsHelper a + member of cmInstallCommandArguments instead of deriving from it + + Alex + +2007-08-24 14:21 alex + + * Source/: cmMakefile.cxx, cmMakefile.h, cmSourceGroup.cxx, + cmSourceGroupCommand.cxx: BUG: fix #4057 (which had several + duplicates): handle recursivew source groups better, i.e. + multiple sourcegroups with the same end component work now + + Alex + +2007-08-24 13:30 david.cole + + * Source/cmInstallCommand.cxx, Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmTarget.h, + Tests/CMakeLists.txt, Tests/BundleTest/CMakeLists.txt, + Tests/BundleTest/BundleSubDir/CMakeLists.txt, + Tests/Framework/CMakeLists.txt: ENH: Add InstallNameFixupPath to + support installing built frameworks on the Mac. Change + Application to Applications in the BundleTest. Also correct small + typo (tcl->Tcl) noted in bug 4572. + +2007-08-24 10:58 alex + + * Source/cmSourceGroupCommand.cxx: BUG: handle source_group names + which consist only of the delimiter the same was as empty source + group names + + Alex + +2007-08-24 10:39 alex + + * Tests/SourceGroups/: CMakeLists.txt, bar.c, foo.c, main.c, + sub1/foo.c, sub1/foobar.c: + ENH: add test for source_group + + Alex + +2007-08-24 08:55 alex + + * Source/cmInstallCommand.cxx: + ENH: use cmCommandArgumentHelper for INSTALL(TARGETS, FILES, + PROGRAMS, EXPORTS), saves a lot of code. INSTALL(DIRECTORY) is + still done the old way, since this seems to be quite complicated + -for INSTALL(TARGETS ): also parse PUBLIC_HEADER, PRIVATE_HEADER, + RESOURCE + + Alex + +2007-08-24 08:40 alex + + * Modules/CMakeForceCompiler.cmake: + STYLE: fix typo in the docs + + Alex + +2007-08-23 23:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-23 16:14 alex + + * Source/: cmCommands.cxx, cmInstallCommandArguments.cxx, + cmInstallCommandArguments.h: + ENH: class for parsing the arguments for INSTALL() + + Alex + +2007-08-23 16:13 alex + + * Source/: cmCommandArgumentsHelper.cxx, + cmCommandArgumentsHelper.h: + ENH: add support for a default value, fix case when there is no + item except the own group + + Alex + +2007-08-22 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-22 11:32 david.cole + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmInstallCommand.cxx, cmInstallExportGenerator.cxx, + cmInstallExportGenerator.h: ENH: Handle FRAMEWORK and BUNDLE + arguments in the INSTALL TARGETS command. Work in progress... + More to come. + +2007-08-22 09:25 alex + + * Source/kwsys/RegularExpression.hxx.in: + BUG: if there is no match, don't construct the stl string from a + NULL pointer + + Alex + +2007-08-21 23:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-21 16:51 alex + + * Modules/UseQt4.cmake: + ENH: support QtScript + + Alex + +2007-08-21 16:50 alex + + * Modules/FindQt4.cmake: + ENH: support QtScript (since Qt 4.3), #4632 + + Alex + +2007-08-21 16:22 alex + + * Source/cmLocalGenerator.cxx: + STYLE: more space in the cmake_install.cmake script (easier to + read) + + Alex + +2007-08-21 16:21 alex + + * Source/: CMakeLists.txt, FLTKDialog/CMakeLists.txt, + FLTKDialog/CMakeSetupGUIImplementation.cxx, + FLTKDialog/FLTKPropertyItemRow.cxx, + FLTKDialog/FLTKPropertyList.cxx: + COMP: make it build on Linux + + Alex + +2007-08-21 15:30 alex + + * Source/kwsys/Glob.cxx: + BUG: fix segfault if FindFiles() is called without actual match + pattern (e.g. FILE(GLOB /usr/include) instead of FILE(GLOB + /usr/include/* ) #4620 + + Alex + +2007-08-21 13:47 alex + + * Source/cmGlobalKdevelopGenerator.cxx: + ENH: also check for .hpp and .cxx files + + Alex + +2007-08-21 12:34 alex + + * Source/cmStringCommand.h: + COMP: header was missing... + + Alex + +2007-08-21 12:31 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: fix leak + +2007-08-21 11:30 alex + + * Source/cmStringCommand.cxx: + ENH: store the matches for paren-delimited subexpression in + CMAKE_MATCH_[0..9] variables, so to get multiple subexpressions + from one string STRING(REGEX MATCH) has to be executed only once + + Alex + +2007-08-21 10:56 alex + + * Source/cmStringCommand.h: + STYLE: fix documentation for STRING(REPLACE) #5536 + + Alex + +2007-08-20 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-20 16:59 alex + + * Source/: cmFindLibraryCommand.cxx, cmInstallGenerator.cxx, + cmInstallTargetGenerator.cxx: + STYLE: add some newlines to cmake_install.cmake, so it's easier + to read -move the array behind the if, it's unused before it + + Alex + +2007-08-20 11:03 david.cole + + * Source/cmGlobalXCodeGenerator.cxx: STYLE: Fix line length style + errors introduced last week. + +2007-08-20 08:49 alex + + * Source/cmFindPackageCommand.cxx: + ENH: also process "~" and paths relative to + CMAKE_CURRENT_SOURCE_DIR in Foo_DIR + + Alex + +2007-08-19 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-18 23:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-17 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-17 10:41 alex + + * Modules/Platform/BlueGeneL.cmake: + COMP: also use -Wl,-relax and -lc -lnss etc. when using the IBM + compiler + + Alex + +2007-08-17 10:14 alex + + * Source/cmGlobalGenerator.cxx: + COMP: include windows.h first, as it is done in the other source + files + + Alex + +2007-08-17 10:05 alex + + * Source/: cmExtraEclipseCDT4Generator.cxx, + cmExtraEclipseCDT4Generator.h: + ENH: patch from Miguel - cleaning up a bit: static helper + functions, remove unused scanner profiles, remove unused + variables, etc. - correct entry in .project file - + converts the make command and other paths obtained from cygwin + cmake to windows style paths - provide environment setup for + compiling with nmake - create linked resources and path entries + for executable/library_output_path's not subdirs of binary path - + fixes incorrect exclusions of output dirs when named the same as + source dir - excludes the CMakeFiles subdirs from the directories + to scan for output targets - removes possible redundant entries + in - adds the all and preinstall targets + to the target list - removes the linked resources for non + out-of-source builds and conflicting dirs + + Alex + +2007-08-17 09:33 alex + + * Source/CPack/: cmCPackRPMGenerator.cxx, cmCPackRPMGenerator.h: + STYLE: InitializeInternal() is unused + + Alex + +2007-08-17 09:13 alex + + * Modules/CPackRPM.cmake, Source/CPack/cmCPackRPMGenerator.cxx, + Source/CPack/cmCPackRPMGenerator.h: + ENH: patch from Eric Noulard for an RPM package generator It + seems rpmbuild can't handle paths with spaces, it complains that + Buildroot takes only one tag (or something like this), quoting + and escaping don't seem to help. + + Alex + +2007-08-17 09:00 hoffman + + * Modules/Platform/Darwin.cmake: ENH: use the correct flag for the + linker + +2007-08-16 23:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-16 16:50 alex + + * Source/cmGlobalGenerator.cxx: COMP: quick windows name mangling + fix (otherwise the compiler complains about + cmMakefile::GetCurrentDirectoryA(), which doesn't exist) + + Alex + +2007-08-16 15:33 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: + ENH: move the code for the NOTFOUND checking into its own + function, so Configure() gets easier to overview -improve the + error message, now it also says in which directories and for + which targets the missing variables are used -minor speedup: the + include directories don't have to be checked per target, per + directory is enough + + Alex + +2007-08-16 15:03 alex + + * Modules/FindPythonLibs.cmake: + STYLE: this wasn't intended to be committed + + Alex + +2007-08-16 15:02 alex + + * Modules/: FindPythonLibs.cmake, Platform/BlueGeneL.cmake: + ENH: add -Wl,-relax to the default linker flags for BlueGene, + otherwise you can get "relocation truncated to fit" errors + + Alex + +2007-08-16 10:14 king + + * DartLocal.conf.in: ENH: Added dash1win98 expected nightly. + +2007-08-16 09:22 hoffman + + * Modules/Platform/Darwin.cmake: ENH: make sure osx searches static + and shared libs like other platforms + +2007-08-16 08:37 alex + + * Modules/Platform/Generic-SDCC-C.cmake: + COMP: fix arguments + + Alex + +2007-08-16 07:38 malaterre + + * Source/kwsys/: Directory.hxx.in, Glob.hxx.in: COMP: Directory and + Glob have pointer data members + +2007-08-15 23:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-15 14:26 alex + + * Modules/: CMakeDetermineSystem.cmake, CMakeFindBinUtils.cmake, + CMakeSystem.cmake.in, CMakeSystemWithToolchainFile.cmake.in: + STYLE: don't use an extra file to generate CMakeSystem.cmake but + instead configure the toolchain file into it if required -also + search for nm, objdump and objcpy, so these can be used in macros + + Alex + +2007-08-15 14:22 alex + + * Modules/Platform/Generic-SDCC-C.cmake: + STYLE: explicitely set default options for sdcc, so it is visible + for which processor it currently compiles, use --out-fmt-ihx to + enforce .ihx files + + Alex + +2007-08-15 11:38 david.cole + + * Source/kwsys/: CMakeLists.txt, Configure.h.in: COMP: Second try + getting rid of Microsoft deprecation warnings. This time tested + from KWStyle with vs8 to make sure the warnings are really gone. + Remove the deprecation defs from CMakeLists and guard the defs in + the header so we do not redefine them if they are already + defined. + +2007-08-15 10:26 alex + + * Source/cmListCommand.cxx, Source/cmListCommand.h, + Tests/CMakeTests/ListTest.cmake.in: + ENH: change LIST(CONTAINS ...) TO LIST(FIND ...), which returns + the index and which is more useful, because then you can also + access the item behind the one you were looking, useful for + writing macros with optional keywords with parameters + + Alex + +2007-08-15 09:43 alex + + * CMakeLists.txt, Modules/FindCurses.cmake: + COMP: ccmake requires ncurses, according to Berk and since it + doesn't build on NetBSD where there are separate curses and + ncurses libraries, and where the curses library is found, which + doesn't work for ccmake while the existing ncurses library would + work. With this change it should be possible to test whether the + found curses lib provides ncurses functionality. + + Alex + +2007-08-15 09:25 david.cole + + * Source/kwsys/Configure.h.in: COMP: Suppress Microsoft deprecation + warnings when building kwsys .c and .cxx files. This way, other + projects that include kwsys will not see the warnings in kwsys .c + and .cxx files, but they can still see the warnings in their own + source files if they want to... + +2007-08-15 08:47 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + COMP: fix warning about comparison signed - unsigned + + Alex + +2007-08-15 08:28 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + COMP: fix build on HPUX, snprintf apparently doesn't work there + + Alex + +2007-08-14 23:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-14 14:12 david.cole + + * Source/: cmMakefileLibraryTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.h: ENH: Improve framework + support in the makefile generator to match the support just added + to the Xcode generator. BUG: Remove spurious warning and + eliminate empty Libraries subdir inside built framework. + +2007-08-14 11:58 alex + + * Source/cmUtilitySourceCommand.h: + STYLE: document the behaviour of UTILITY_SOURCE in cross + compiling mode + + Alex + +2007-08-14 11:45 david.cole + + * Source/cmGlobalXCode21Generator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalXCodeGenerator.cxx, Source/cmXCode21Object.cxx, + Source/cmXCode21Object.h, Source/cmXCodeObject.cxx, + Tests/Framework/CMakeLists.txt, Tests/Framework/fooBoth.h, + Tests/Framework/fooNeither.h, Tests/Framework/fooPrivate.h, + Tests/Framework/fooPublic.h, Tests/Framework/test.lua: ENH: + Improvements to the Xcode generator. Build frameworks using + native Copy Headers and Copy Bundle Resources phases. Fix bugs: + eliminate folders with no names, ensure source files show up in + multiple targets, remove empty utility targets from Sources + subtrees, ensure that fileRefs only show up once in each grouping + folder. + +2007-08-14 10:27 alex + + * Source/cmSystemTools.cxx: + COMP: patch from Mathieu: fix warning about unused variables in + bootstrap mode + + Alex + +2007-08-14 10:25 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + STYLE: another patch from Mathieu with some comments + + Alex + +2007-08-14 10:20 alex + + * Modules/CPackDeb.cmake: + BUG: fix typo + + Alex + +2007-08-14 08:40 alex + + * Modules/CPackDeb.cmake, Source/CMakeLists.txt, + Source/CPack/cmCPackDebGenerator.cxx, + Source/CPack/cmCPackDebGenerator.h: + ENH: deb generator: don't use the system provided ar, but do it + yourself using the code from OpenBSD ar COMP: don't build all + package generators on all platforms + + Alex + +2007-08-13 23:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-13 11:04 alex + + * Modules/TestBigEndian.cmake: + ENH: for universal binaries return the endianess based on the + processor + + Alex + +2007-08-12 23:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-12 21:08 alex + + * Modules/TestBigEndian.cmake: + COMP: turn error into warning for now + + Alex + +2007-08-11 23:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-10 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-10 16:28 hoffman + + * Source/CTest/cmCTestMemCheckHandler.cxx: ENH: fix output and + valgrind truncation issue + +2007-08-10 15:02 alex + + * Source/cmUtilitySourceCommand.cxx: + ENH: print a warning if UTILITY_SOURCE is used in cross compiling + mode -make it possible to preload the cache with the command in + cross compiling mode + + Alex + +2007-08-10 13:14 alex + + * Modules/: CheckTypeSize.c.in, CheckTypeSize.cmake, + TestBigEndian.c, TestBigEndian.cmake, TestEndianess.c.in: + STYLE: remove unused CheckTypeSize.c.in ENH: change test for + endianess from TRY_RUN() to TRY_COMPILE() by testing the binary + image of a 16bit integer array, tested on Linux x86, Intel Mac + and Sun (big endian) + + Alex + +2007-08-10 13:02 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: BUG: Fixed passing of + configuration names to GetRealDependency and ConstructScript. + Added GetConfigName helper method to do this. + +2007-08-10 11:37 alex + + * Modules/FindOpenGL.cmake: + STYLE: remove unnecessary default search paths + + Alex + +2007-08-10 11:15 hoffman + + * Source/cmake.cxx: ENH: fix memory leak + +2007-08-10 09:20 alex + + * Modules/CMakeDetermineCompilerId.cmake: + BUG: fix compiler id test on cygwin + + Alex + +2007-08-10 09:07 alex + + * Source/cmMakefile.cxx, Modules/CMakeDetermineSystem.cmake, + Modules/CMakeSystemSpecificInformation.cmake: + ENH: set UNIX, WIN32 and APPLE in cmMakefile.cxx as it was + before, so it works for scripts, then reset them in + CMakeSystemSpecificInformation.cxx, so the platform modules can + set them again for the target system + + Alex + +2007-08-10 08:54 alex + + * Modules/Platform/: AIX.cmake, BSDOS.cmake, BeOS.cmake, + MP-RAS.cmake, QNX.cmake, RISCos.cmake: + BUG: also include UnixPaths.cmake on these platforms, this also + sets UNIX to 1 + + Alex + +2007-08-09 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-09 16:54 alex + + * Tests/CMakeLists.txt: + STYLE: mark these variables as advanced, they are only used for + testing whether the tests should be added or not + + Alex + +2007-08-09 16:47 alex + + * Modules/CMakeGenericSystem.cmake: + BUG: use CMAKE_HOST_UNIX here instead of UNIX + + Alex + +2007-08-09 15:57 alex + + * Source/: cmExportCommand.cxx, cmGlobalMSYSMakefileGenerator.h, + cmGlobalMinGWMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.h, cmGlobalWatcomWMakeGenerator.h: + + STYLE: use correct case for cmGlobalUnixMakefileGenerator3 make + export() work with spaces in the path + + Alex + +2007-08-09 15:31 hoffman + + * Source/cmSetSourceFilesPropertiesCommand.h: ENH: merge in doc + change from head + +2007-08-09 14:55 alex + + * Utilities/cmcurl/: CMakeLists.txt, CMake/CurlTests.c, + CMake/OtherTests.cmake: + STYLE: HAVE_LONG_LONG_CONST was completely unused here (it was + used in the (unused) copy of curl under CMake/CTest/Curl/ ) + + Alex + +2007-08-09 14:45 alex + + * Modules/CMakeDetermineCompilerId.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/Platform/BeOS.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Darwin.cmake, Modules/Platform/QNX.cmake, + Modules/Platform/UnixPaths.cmake, Modules/Platform/Windows.cmake, + Source/cmMakefile.cxx: + ENH: UNIX, CYGWIN, WIN32, APPLE, QNXNTO and BEOS are not longer + set in cmMakefile.cxx, but now in the platform files and are now + valid for the target platform, not the host platform. New + variables CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE and + CMAKE_HOST_CYGWIN have been added in cmMakefile.cxx (...and have + now to be used in all cmake files which are executed before + CMakeSystemSpecificInformation.cmake is loaded). For + compatibility the old set is set to the new one in + CMakeDetermineSystem.cmake and reset before the system platform + files are loaded, so custom language or compiler modules which + use these should still work. + + Alex + +2007-08-09 14:26 alex + + * Source/: CMakeLists.txt, CTest/CMakeLists.txt: + COMP: this copy of curl is unused, the one in Utilities/cmcurl/ + is used + + Alex + +2007-08-09 11:05 alex + + * Modules/CMakeSystemWithToolchainFile.cmake.in: + BUG: work with spaces in the path + + Alex + +2007-08-09 09:57 alex + + * Tests/CMakeLists.txt: + COMP: lets see if this sets the timeout back to 5400 + + Alex + +2007-08-09 09:03 alex + + * Source/kwsys/CommandLineArguments.hxx.in: + STYLE: fix typo + + Alex + +2007-08-09 08:49 alex + + * Source/cmTarget.cxx: + STYLE: fix typo + + Alex + +2007-08-09 08:48 alex + + * Source/cmDocumentation.cxx: + BUG: properties and module names are case sensitive + + Alex + +2007-08-08 23:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-08 15:44 alex + + * Source/CPack/cmCPackRPMGenerator.cxx: + COMP: silence warnings + + Alex + +2007-08-08 14:44 alex + + * Source/CPack/cmCPackGenerators.cxx: + BUG: register the rpm generator for RPM + + Alex + +2007-08-08 14:18 alex + + * Modules/CPackDeb.cmake, Source/CPack/cmCPackDebGenerator.cxx: + ENH: patch from Mathieu: more entries in the debian control file + + Alex + +2007-08-08 13:05 alex + + * Source/cmFindPackageCommand.cxx, + Tests/FindPackageTest/CMakeLists.txt: + ENH: remove the watch for the upper case variable name, it breaks + the feature summary, which needs to check for both the upper case + and original case _FOUND variables + + Alex + +2007-08-08 11:33 alex + + * Source/CMakeLists.txt, Modules/CPack.cmake, + Modules/CPackRPM.cmake, Source/CPack/cmCPackGenerators.cxx, + Source/CPack/cmCPackRPMGenerator.cxx, + Source/CPack/cmCPackRPMGenerator.h: + ENH: add empty RPM package generator, Eric Noulard wants to work + on it + + Alex + +2007-08-08 10:05 alex + + * Tests/CMakeLists.txt: + COMP: change the order of the tests, so maybe the timeout works + + Alex + +2007-08-08 09:32 alex + + * Tests/CMakeLists.txt: + ENH: also specify the C++ compiler for mingw + + Alex + +2007-08-08 08:41 malaterre + + * Source/kwsys/CommandLineArguments.cxx: ENH: Remove extra ; + +2007-08-07 23:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-07 18:02 alex + + * Tests/FindPackageTest/CMakeLists.txt: + BUG: disable this test temporarily + + Alex + +2007-08-07 16:26 alex + + * Source/cmFindPackageCommand.h: + COMP: also commit the header... + + Alex + +2007-08-07 15:42 alex + + * Modules/Dart.cmake: + STYLE: find Dart quietly (so it doesn't go in the feature log) + + Alex + +2007-08-07 15:41 alex + + * Modules/FeatureSummary.cmake, Source/cmFindPackageCommand.cxx, + Source/cmake.cxx: + ENH: add global properties for collecting enabled/disabled + features during the cmake run and add macros + print_enabled/disabled_features() and set_feature_info(), so + projects can get a nice overview at the end of the cmake run what + has been found and what hasn't FIND_PACKAGE() automatically adds + the packages to these global properties, except when used with + QUIET Maybe this can also be useful for packagers to find out + dependencies of projects. + + Alex + +2007-08-07 15:36 hoffman + + * DartLocal.conf.in: ENH: change ibm machine again + +2007-08-07 15:09 alex + + * Source/cmGlobalGenerator.cxx: + STYLE: I think the comment (and the book) were wrong about the + naming of this file + + Alex + +2007-08-07 13:57 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx: + ENH: Replaced dependency integrity map with an explicit map from + object file to source file for each language in each target. + This simplifies creation of implicit dependency scanning rules + and allows more than one object file in a target to start + dependency scanning with the same source file. + +2007-08-07 10:13 alex + + * Tests/CMakeLists.txt: + BUG: the test for chicken should be named Chicken, not plplot + + Alex + +2007-08-07 00:00 alex + + * Source/cmExtraCodeBlocksGenerator.cxx: + ENH: don't create a CodeBlocks workspace, the CodeBlocks projects + cover everything what's needed + + Alex + +2007-08-06 23:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-06 22:08 alex + + * Modules/FindPackageHandleStandardArgs.cmake: + STYLE: fix typo + + Alex + +2007-08-06 17:09 hoffman + + * Source/cmCTest.cxx: ENH: change error to warning so ctesttest3 + passes + +2007-08-06 14:45 alex + + * Tests/CMakeLists.txt: + ENH: add plplot and Chicken Scheme build tests + + Alex + +2007-08-06 13:31 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + ENH: another fix for the deb generator by Mathieu + + Alex + +2007-08-06 13:24 alex + + * Source/: cmExtraCodeBlocksGenerator.cxx, + cmExtraCodeBlocksGenerator.h, cmExtraEclipseCDT4Generator.cxx: + STYLE: fix line lengths + + Alex + +2007-08-06 11:02 alex + + * Modules/: FindMPI.cmake, FindThreads.cmake: + STYLE: use FIND_PACKAGE_HANDLE_STANDARD_ARGS() also in + FindMPI.cmake -remove unnecessary ELSE() in FindThreads.cmake + + Alex + +2007-08-06 10:42 hoffman + + * Modules/FLTKCompatibility.cmake: ENH: threads used to include + this + +2007-08-06 09:03 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + BUG: patch from Mathieu: the md5sums were not correct + + Alex + +2007-08-05 23:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-04 23:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-03 23:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-03 16:44 hoffman + + * Source/CTest/cmCTestGenericHandler.cxx: ENH: make sure there is + an error and notify user if nightly start time not set + +2007-08-03 16:44 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: show files as + untested if no lines are covered + +2007-08-03 16:42 hoffman + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: fatal error if cvs + update fails + +2007-08-03 16:41 hoffman + + * Source/cmCTest.cxx: ENH: add a check to make sure nightly start + time was specified + +2007-08-03 16:35 hoffman + + * Source/CTest/cmCTestMemCheckHandler.cxx: ENH: add another + valgrind error type + +2007-08-03 16:31 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, cmInstallCommand.h, + cmInstallTargetGenerator.cxx, cmLocalUnixMakefileGenerator3.cxx, + cmTarget.cxx: ENH: Added warning when an install rule is created + from an EXCLUDE_FROM_ALL target. Added a foo/preinstall version + of targets that need relinking so that exclude-from-all targets + can be manually relinked for installation. + +2007-08-03 15:44 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, cmMakefile.cxx, cmTarget.cxx: + BUG: Target exclusion-from-all tests should always use the root + local generator associated with the all target being tested. + +2007-08-03 15:43 seanmcbride + + * Source/kwsys/CommandLineArguments.cxx: COMP: fixed compiler + warning in sprintf usage + +2007-08-03 15:26 alex + + * Modules/CPack.cmake, Modules/CPackDeb.cmake, + Source/CPack/cmCPackGenericGenerator.cxx, Source/CPack/cpack.cxx: + + ENH: better error messages from the debian package generator + -don't display the cpack help if a generator failed with some + problem -check for cmSystemTools::GetErrorOccuredFlag() + + Alex + +2007-08-03 09:39 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: Added + cmTarget::GetLanguages method to centralize computation of the + list of languages compiled in a target. Transformed + NeedRequiresStep to use it. + +2007-08-02 23:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-02 15:48 alex + + * Modules/FindPythonLibs.cmake: + ENH: make the python modules usable for C and C++ and only write + the header if it has changed + + Alex + +2007-08-02 14:28 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: BUG: Removing accidental + commit. + +2007-08-02 14:28 king + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: Quick-fix for + accidental commit. + +2007-08-02 14:23 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: Added + cmTarget::GetLanguages method to centralize computation of the + list of languages compiled in a target. + +2007-08-02 13:38 king + + * Source/: cmMakefileTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: + ENH: Added cmTarget::GetLanguages method to centralize + computation of the list of languages compiled in a target. + +2007-08-02 11:17 alex + + * Modules/Platform/: Windows-cl.cmake, Windows.cmake, + WindowsPaths.cmake: + ENH: use WindowsPaths.cmake on all Windows platforms, not only + for cl, makes the mingw cross compiler work out of the box and + should help mingw users on windows with a common install dir + + Alex + +2007-08-02 09:37 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: ENH: Simplify makefile target + generator listing of object files to clean. + +2007-08-02 08:24 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: + COMP: fix warning + + Alex + +2007-08-01 23:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-08-01 17:10 alex + + * Source/: cmInstallCommand.cxx, cmTryRunCommand.cxx: + ENH: if no COMPONENT is specified, make this install item part of + the "Unspecified" component -> if no components are used at all, + no change in behaviour, if components are used completely, no + change in behaviour, since this default will be overridden + everywhere, if components where used partly, it is now possible + to install only the unspecified items (e.g. everything which + wasn't marked as "Development") + + Alex + + Alex + +2007-08-01 16:15 david.cole + + * Tests/Framework/: bar.cxx, foo.cxx: BUG: Fix test that broke on + Windows - sharing sources between SHARED and STATIC libraries + requires correct export and import decorations in the source + code... + +2007-08-01 15:51 alex + + * Source/MFCDialog/CMakeSetup.cpp: ENH: separate the commands into + current and compat as in cmake + + Alex + +2007-08-01 15:25 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmLocalXCodeGenerator.cxx, + cmLocalXCodeGenerator.h: ENH: Moved GetTargetDirectory method up + to cmLocalGenerator. This provides a common interface to + something that was implemented in most local generators anyway. + +2007-08-01 14:58 alex + + * Source/: cmExtraCodeBlocksGenerator.cxx, cmake.cxx, + MFCDialog/CMakeSetupDialog.cpp: BUG: also offer the extra + generators in CMakeSetup + + Alex + +2007-08-01 13:04 david.cole + + * Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, Source/cmTarget.cxx, + Tests/Framework/CMakeLists.txt: BUG: Only pay attention to the + FRAMEWORK target property for SHARED library targets + +2007-08-01 11:59 alex + + * Source/cmTryRunCommand.cxx: + STYLE: some more tuning for the comment text + + Alex + +2007-08-01 11:50 alex + + * Source/cmExtraEclipseCDT4Generator.cxx: + ENH: works also with nmake, tested by Jeff + + Alex + +2007-08-01 11:39 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Do not recognize + preprocessor definition flags for the linker which has no + preprocessor but does have flags starting with /D. + +2007-08-01 11:36 king + + * Source/cmTarget.cxx: BUG: _LOCATION property should use + the config name in the directory and not $(OutDir). This + addresses bug#5363. + +2007-08-01 10:53 king + + * Source/cmGeneratedFileStream.h: COMP: Fix warning about not being + able to automatically generate a copy constructor. + +2007-08-01 10:07 alex + + * Source/kwsys/DynamicLoader.cxx: + COMP: also build the static dummy loader on Cray Catamount + + Alex + +2007-08-01 09:18 alex + + * Source/: CMakeLists.txt, cmExtraEclipseCDT4Generator.cxx, + cmExtraEclipseCDT4Generator.h, cmake.cxx: + ENH: add Eclipse CDT4 generator, patch from Miguel A. + Figueroa-Villanueva + + Alex + +2007-08-01 09:14 alex + + * Modules/Platform/Catamount.cmake: + ENH: add support for Catamount, the OS running on the compute + nodes of Cray super computers + + Alex + +2007-07-31 23:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-31 14:52 alex + + * Source/cmTryRunCommand.cxx, Tests/TryCompile/CMakeLists.txt: + ENH: add tests for check_c_source_runs(), + check_cxx_source_runs(), check_c_source_compiles() and + check_cxx_source_compiles() -TRY_RUN in crosscompiling mode: copy + the created executables to CMAKE_BINARY_DIR so the user can run + them manually on the target + + Alex + +2007-07-31 13:30 alex + + * Modules/: CheckCSourceRuns.cmake, CheckCXXSourceRuns.cmake, + FindThreads.cmake: + STYLE: don't use FIND_INCLUDE_FILE() but only + FIND_INCLUDE_FILES() in FindThreads.h + + BUG: improve CheckC(XX)SourceRuns.cmake so that it works with + cross compiling, the return value has to go in the cache but + shouldn't overwrite the actual return value, and it should go + only in the cache if we have a result from try_run() otherwise we + won't get here again if we have a result later on + + Alex + +2007-07-31 11:23 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix DLL and DEF + being lost and add real support for /DEF: /DLL does not have an + entry so just let it pass to advanced command line + +2007-07-30 23:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-30 22:51 hoffman + + * Source/: cmSystemTools.cxx, CPack/cmCPackTGZGenerator.cxx, + CPack/cmCPackTarCompressGenerator.cxx: ENH: use gnu tar for + cygwin + +2007-07-30 21:38 hoffman + + * Source/cmXMLParser.cxx: STYLE: fix warning + +2007-07-30 15:52 alex + + * Source/kwsys/DynamicLoader.cxx: + COMP: add a dynamic loader for systems which don't support + dynamic loading, so this is handled in kwsys and not every + project using this has to care for it + + Alex + +2007-07-30 14:46 alex + + * Source/cmTryRunCommand.cxx: + ENH: FORCE the values in the cache, otherwise the file is useless + + Alex + +2007-07-29 23:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-28 23:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-28 00:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-27 13:12 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + STYLE: fix line length + + Alex + +2007-07-27 11:57 alex + + * Modules/Platform/: UnixPaths.cmake, WindowsPaths.cmake: + ENH: -add /usr/openwin/include and /usr/openwin/lib to the + default search paths -add + /${CMAKE_INSTALL_PREFIX}/(lib|bin|include) to the default cmake + search paths -> this should help users who install stuff in their + home + + Alex + +2007-07-27 10:55 hoffman + + * Source/: cmCommandArgumentLexer.h, cmCommandArgumentParser.cxx, + cmCommandArgumentParserTokens.h, cmConfigure.cmake.h.in, + cmCoreTryCompile.cxx, cmDependsFortranLexer.h, + cmDependsJavaLexer.h, cmExprLexer.h, cmXCodeObject.cxx, + cmXCodeObject.h, cmaketest.h.in, cmakexbuild.cxx, + CPack/OSXScriptLauncher.cxx, CPack/cmCPackConfigure.h.in, + CPack/cmCPackGenerators.cxx, CPack/cmCPackZIPGenerator.cxx, + CPack/cpack.cxx, CTest/cmCTestCoverageHandler.cxx, + CTest/cmCTestMemCheckHandler.cxx: STYLE: fix some kwstyle errors + +2007-07-27 08:59 alex + + * CMakeCPack.cmake, Source/cmSetPropertiesCommand.h, + Source/cmake.cxx, Source/cmake.h, Modules/CPackDeb.cmake, + Modules/FindPythonLibs.cmake, + Source/CPack/cmCPackDebGenerator.cxx, Source/CPack/cpack.cxx, + Source/CTest/cmCTestScriptHandler.cxx: + ENH: deb generator can now generate deb packages -remove the + unscriptable commands also from the cpack cmake -use + CPACK_PACKAGE_CONTACT in CMakeCPack.cmake, it's used in the nsis + and the deb generator -make set_properties() scriptable -use a + non-const char array for adding the python modules + + Alex + +2007-07-27 04:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-26 16:38 hoffman + + * Source/CTest/cmCTestMemCheckHandler.cxx: ENH: add test output to + valgrind output and truncate output for valgrind + +2007-07-26 14:36 hoffman + + * Source/: cmXMLParser.cxx, cmXMLParser.h: ENH: fix warning on + win64 + +2007-07-26 11:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-26 08:40 alex + + * Source/: cmTryRunCommand.cxx, CPack/cmCPackGenerators.cxx, + CPack/cmCPackZIPGenerator.cxx, CPack/cpack.cxx: + STYLE: fix line lengths + + Alex + +2007-07-26 00:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-25 16:37 hoffman + + * Source/CTest/cmCTestTestHandler.cxx: ENH: fix bug with valgrind + output being truncated + +2007-07-25 15:08 alex + + * Modules/FindPythonLibs.cmake: + COMP: same as in VTK, build modules by default as shared if the + platform supports this, don't include shared modules in the + generated header + + Alex + +2007-07-25 13:08 alex + + * Source/CPack/: cmCPackDebGenerator.cxx, cmCPackGenerators.cxx: + ENH: apply patch from Mathieu which creates a deb file (not + finishsed yet) + + Alex + +2007-07-25 11:41 alex + + * Source/CPack/cmCPackDebGenerator.cxx: + COMP: silence warnings + + Alex + +2007-07-25 10:57 alex + + * Modules/CPackDeb.cmake, Source/CMakeLists.txt, Source/cmake.cxx, + Source/CPack/cmCPackDebGenerator.cxx, + Source/CPack/cmCPackDebGenerator.h, + Source/CPack/cmCPackGenerators.cxx: + ENH: add an empty debian package generator, Mathieu volunteered + to fill it :-) + + Alex + +2007-07-25 09:22 hoffman + + * Source/: cmXMLParser.cxx, cmXMLParser.h: STYLE: fix compiler + warning + +2007-07-25 04:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-24 15:55 hoffman + + * Source/cmWin32ProcessExecution.cxx: ENH: fix resource leak + +2007-07-24 15:27 hoffman + + * DartLocal.conf.in: ENH: clean up some missing dashboards + +2007-07-24 14:50 alex + + * Source/kwsys/ProcessUNIX.c: + COMP: sync with HEAD + + Alex + +2007-07-24 14:43 hoffman + + * Source/CTest/: cmCTestMemCheckHandler.cxx, + cmCTestMemCheckHandler.h, cmCTestTestHandler.h: ENH: add support + for bounds checker + +2007-07-24 14:14 alex + + * Source/kwsys/DynamicLoader.cxx: + ENH: disable dynamic loader if shared libraries are not supported + instead of hacking around it + + Alex + +2007-07-24 12:52 alex + + * Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackZIPGenerator.cxx, + Source/CPack/cmCPackZIPGenerator.h, Modules/CPackZIP.cmake, + Modules/Platform/BlueGeneL.cmake: + ENH: add ReadListFile() to cmCPackGenericGenerator, so cmMakefile + can be private again -convert the ZIP generator to use a cmake + script instead of hardcoding everything (CPackZIP.cmake) + + Alex + +2007-07-24 10:05 hoffman + + * Source/kwsys/ProcessWin32.c: ENH: fix resource leak + +2007-07-24 10:00 alex + + * Modules/CMakeDetermineSystem.cmake, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, Source/CPack/cpack.cxx: + ENH: determine the current system also in cpack, so the search + paths are loaded Additionally the makefile in + cmCPackGenericGenerator is now protected instead of private, so + with these two changes the cpack generators should now be able to + find their tools and how to call these tools from cmake scripts, + instead of hardcoding the search order and command line (as done + e.g. in cmCPackZIPGenerator.cxx) + + Alex + +2007-07-24 02:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-23 13:13 alex + + * Source/cmTryRunCommand.cxx: + STYLE: put a lot of comments into the generated cmake-cache + preloading file to aid the user with using it + + Alex + +2007-07-23 11:22 alex + + * Modules/FindPythonInterp.cmake: + STYLE: mark the variable as advanced + + Alex + +2007-07-23 10:47 alex + + * Source/cmTryRunCommand.cxx: + ENH: try to create a file which can be used for presetting the + cache values of the TRY_RUN() results when crosscompiling + + Alex + +2007-07-23 09:49 alex + + * Modules/: FindASPELL.cmake, FindBZip2.cmake, FindBoost.cmake, + FindCURL.cmake, FindCurses.cmake, FindEXPAT.cmake, + FindGnuplot.cmake, FindHSPELL.cmake, FindJPEG.cmake, + FindJasper.cmake, FindLibXml2.cmake, FindLibXslt.cmake, + FindMPEG.cmake, FindMPEG2.cmake, FindMotif.cmake, + FindOpenAL.cmake, FindPNG.cmake, + FindPackageHandleStandardArgs.cmake, FindPerl.cmake, + FindPerlLibs.cmake, FindPhysFS.cmake, FindPythonInterp.cmake, + FindPythonLibs.cmake, FindSDL.cmake, FindTCL.cmake, + FindTIFF.cmake, FindTclsh.cmake, FindWget.cmake, FindZLIB.cmake: + ENH: add second failure message parameter to + FIND_PACKAGE_HANDLE_STANDARD_ARGS(), so cmake modules can specify + their own better failure messages. If the default is ok use + "DEFAULT_MSG". Do this also for FindBoost.cmake (#5349) + + Alex + +2007-07-23 09:06 alex + + * Source/: cmLocalGenerator.cxx, kwsys/SystemTools.cxx: + PERF: micro optimization: the (*pos1) && (*pos1=='/') were + redundant, and hasDoubleSlash is false in most cases, so in most + cases 3 comparisons were done, now only one + + Alex + +2007-07-23 00:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-21 23:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-20 22:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-20 16:31 alex + + * Utilities/KWStyle/CMakeFiles.txt.in: + ENH: add quotes around the file names, so kwstyle can handle it + if there are spaces in the path + + Alex + +2007-07-20 14:08 hoffman + + * Source/cmCommandArgumentParser.cxx, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: user more memory + for parser and add test to complex that sets a huge string + +2007-07-20 13:03 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: fix div by 0 + +2007-07-20 12:25 hoffman + + * Utilities/cmcurl/CMake/OtherTests.cmake: ENH: change order so + windows functions are found first since try compile is slow on + windows + +2007-07-20 10:07 hoffman + + * DartLocal.conf.in: ENH: change name + +2007-07-20 08:48 alex + + * Source/cmMakefile.cxx: + STYLE: even more output when --debug-output is used + + Alex + +2007-07-20 08:36 alex + + * Source/: cmDocumentation.cxx, cmExportCommand.h, + cmExtraCodeBlocksGenerator.cxx, cmExtraCodeBlocksGenerator.h, + cmFileCommand.cxx, cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmHexFileConverter.cxx, cmIncludeExternalMSProjectCommand.cxx, + cmMakefile.cxx, cmMakefile.h, cmTryCompileCommand.h, + cmTryRunCommand.h, cmake.h, CTest/cmCTestScriptHandler.cxx: + STYLE: fix line lengths + + Alex + +2007-07-19 21:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-19 15:39 alex + + * Modules/CPack.STGZ_Header.sh.in: + ENH: try if tail works with the -n + syntax, if not use + only "+" (GNU tail warns that this is deprecated) + + Alex + +2007-07-19 13:40 alex + + * Modules/FindTCL.cmake: + ENH: add TK_FOUND and TCLTK_FOUND TCL_FOUND is now TRUE if Tcl + was found, before it was only TRUE if Tcl and Tk were found + + Alex + +2007-07-19 11:59 alex + + * Modules/FindPythonLibs.cmake: + BUG: fix typo + + Alex + +2007-07-19 11:47 alex + + * Modules/FindPythonLibs.cmake: + ENH: make the list of modules global + + Alex + +2007-07-19 11:13 alex + + * Source/: cmFindPackageCommand.h, cmMakefile.cxx, cmakemain.cxx, + CPack/cpack.cxx: + STYLE: fix some typos, nicer debug output + + Alex + +2007-07-19 10:20 alex + + * Modules/FindPythonLibs.cmake: + ENH: only load the static modules in the LoadAll function + + Alex + +2007-07-19 09:42 alex + + * Modules/: CPack.STGZ_Header.sh.in, FindPHP4.cmake: + BUG: fix #5329, if /usr/xpg4/bin/tail exists, use this one -> on + SunOS /usr/bin/tail doesn't understand the -n + syntax + -remove standard searchd dirs from FindPHP4.cmake + + Alex + +2007-07-19 09:00 alex + + * Modules/: FindASPELL.cmake, FindCURL.cmake, FindCurses.cmake, + FindDCMTK.cmake, FindEXPAT.cmake, FindGLUT.cmake, FindGTK.cmake, + FindGnuplot.cmake, FindHSPELL.cmake, FindMPEG.cmake, + FindMPEG2.cmake, FindMotif.cmake, FindPerl.cmake, + FindPhysFS.cmake, FindPike.cmake, FindPythonLibs.cmake, + FindSDL.cmake, FindTCL.cmake, FindTclsh.cmake, FindWget.cmake, + readme.txt: + ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS() macro in + most of the not-too-complicated modules -remove unnecessary + default search paths used in the FIND_XXX() calls + + Alex + +2007-07-18 14:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-18 13:56 alex + + * Modules/: FindBZip2.cmake, FindCups.cmake, FindJPEG.cmake, + FindJasper.cmake, FindLibXslt.cmake, FindOpenAL.cmake, + FindPNG.cmake, FindPerlLibs.cmake, FindPythonInterp.cmake, + FindTCL.cmake, FindTIFF.cmake, FindZLIB.cmake: + ENH: use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the + FindXXX modules, remove some of the extra search paths which are + also searched by default + + Alex + +2007-07-18 13:26 alex + + * Modules/: CMakeLists.txt, FindLibXml2.cmake, + FindPackageHandleStandardArgs.cmake, FindPythonLibs.cmake: + ENH: add a macro FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 + LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) which handles the required + and QUIET arguments and sets _FOUND + + Alex + +2007-07-18 10:52 alex + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: + ENH: if CMAKE_(C|CXX)_COMPILER is preset to a list of two + elements, use the first one as the compiler and the second one as + ARG1 for the compiler + + Alex + +2007-07-18 10:19 alex + + * Source/: CMakeLists.txt, cmExtraCodeBlocksGenerator.cxx, + cmake.cxx: + ENH: build codeblocks generator also on Windows + + Alex + +2007-07-17 13:43 hoffman + + * Source/cmAddCustomCommandCommand.h: STYLE: add more docs + +2007-07-17 13:10 alex + + * Source/cmakemain.cxx: + COMP: fix warning about unused variable + + Alex + +2007-07-17 12:01 alex + + * Source/: cmake.cxx, cmakemain.cxx: + COMP: fix build on Windows, where GetCurrentDirecty() is + redefined to GetCurrentDirectoryA() -correct return value for + md5sum + + Alex + +2007-07-17 10:44 alex + + * Source/: cmLocalGenerator.cxx, cmake.cxx, cmakemain.cxx: + STYLE: fix line lengths and add "remove -f" to the docs + + Alex + +2007-07-17 09:25 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.cxx, cmMakefile.cxx, cmMessageCommand.cxx, + cmakemain.cxx: + ENH: produce a lot more output when running with --debug-output + -try to fix build error on HPUX + + Alex + +2007-07-17 08:51 alex + + * Modules/Platform/WindowsPaths.cmake: + ENH: also look in the include/, lib/ and bin/ directories in the + cmake install dir under windows, this will help e.g. people using + kdewininstaller and similar setups + + Alex + +2007-07-17 08:41 alex + + * Modules/: KDE3Macros.cmake, FindKDE3.cmake: + ENH: don't hardcode the /lib/kde3/ directory for the libtool + files, but make it adjustable and detect if libkdecore.so is a + 64bit library + + Alex + +2007-07-16 15:10 alex + + * Source/cmSystemTools.cxx: + BUG: fix bootstrapping, md5sum disabled in bootstrapping mode + + Alex + +2007-07-16 13:29 alex + + * Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt: + STYLE: remove debug output + +2007-07-16 13:26 alex + + * Source/cmMakefile.cxx, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt: + BUG: GET_DIRECTORY_PROPERTY(INCLUDE_DIRECTORIES|LINK_DIRECTORIES) + wasn't working, for both the result was always empty, since + cmMakefile::GetProperty() recognized it as a special property, + constructed a correct return value and called + cmMakefile::SetProperty() with this list of directories, which + then didn't actually set the property, but applied it to the + internal vector of include/link directories. The following + getPropertyValue in cmMakefile::GetProperty() then still didn't + find it and returned nothing. Now for all special property the + static string output is used and its content is returned. I'm not + sure it is the right way to fix this problem but at least it + seems to work and it fixes the Paraview3 build + + Alex + +2007-07-16 10:59 hoffman + + * CMakeLists.txt, Readme.txt: ENH: final 2.4.7 commit + +2007-07-16 10:54 alex + + * Source/: cmake.cxx, cmSystemTools.h, cmSystemTools.cxx: + ENH: apply patch from Mathieu, add argument -E md5sum to compute + md5sums of files, compatible to md5sum output + + Alex + +2007-07-16 10:54 hoffman + + * Readme.txt: ENH: + +2007-07-16 10:53 hoffman + + * Readme.txt: ENH: clean up a bit + +2007-07-16 10:13 alex + + * Modules/Platform/NetBSD.cmake: + BUG: the Plugin test fails on NetBSD, let's see if this fixes it + + Alex + +2007-07-16 09:08 alex + + * Modules/Platform/UnixPaths.cmake: + ENH: also add the install base dir of the running cmake to the + search directories for the FIND_XXX() commands, for the case that + somebody has its own install tree + + Alex + +2007-07-13 12:03 alex + + * Source/cmAddLibraryCommand.cxx, Utilities/CMakeLists.txt: + STYLE: better error message, name the new manpages cmakecommands, + cmakecompat, cmakeprops and cmakemodules + + Alex + +2007-07-13 11:20 alex + + * Modules/Platform/DragonFly.cmake: + ENH: add DragonFly BSD, which is very close to FreeBSD (#4500) + + Alex + +2007-07-13 10:29 alex + + * Modules/: CheckCSourceRuns.cmake, CheckCXXSourceRuns.cmake: + BUG: the SET( ... CACHE INTERNAL) didn't work as expected, since + the variable is already added to the cache inside + cmTryRunCommand.cxx, so the value used here was ignored. + Additionally the INTERNAL made it internal, which shouldn't be + done when cross compiling, since here the user is required to + edit this variable manually e.g. using ccmake. + + Alex + +2007-07-13 00:58 alex + + * Source/: CMakeLists.txt, cmExtraCodeBlocksGenerator.cxx, + cmExtraCodeBlocksGenerator.h, cmake.cxx: + ENH: add a simple CodeBlocks extra generator, early alpha stage, + there seems to be interest in it + + Alex + +2007-07-12 16:15 alex + + * Modules/Platform/BlueGeneL.cmake: + ENH: add the static libs always to the link libs, if they are not + used it shouldn't hurt + + Alex + +2007-07-12 15:00 alex + + * Modules/: CMakeLists.txt, CheckStructHasMember.cmake: + ENH: add macro to test if a member has specified struct, e.g. + check_struct_has_member("struct stat" st_rdev "${CFG_HEADERS}" + HAVE_STRUCT_STAT_ST_RDEV) + + Alex + +2007-07-12 13:41 alex + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp, + Platform/Generic-ADSP-ASM.cmake, Platform/Generic-ADSP-C.cmake, + Platform/Generic-ADSP-CXX.cmake, + Platform/Generic-ADSP-Common.cmake: + ENH: add support for the ADSP toolchains for Blackfin, Shark and + TigerShark DSPs, patch from Raphael Cotty + + Alex + +2007-07-12 11:56 alex + + * Source/cmListCommand.cxx, Source/cmListCommand.h, + Tests/CMakeTests/ListTest.cmake.in: + ENH: add LIST(CONTAINS ...) patch from "Miguel A. + Figueroa-Villanueva, miguelf (AT) ieee.org added tests for + LIST(CONTAINS, SORT, REVERSE) + + Alex + +2007-07-12 11:05 alex + + * Modules/FindCURL.cmake: + BUG: honor REQUIRED and QUIETLY (#5312) + + Alex + +2007-07-12 10:38 alex + + * Readme.txt: + STYLE: add Readme.txt with instructions how to build cmake, fix + #5296 + + Alex + +2007-07-12 10:17 martink + + * Source/cmGetDirectoryPropertyCommand.cxx: BUG: fix screwup in + GetDirectoryProp... + +2007-07-12 08:37 alex + + * Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmTarget.cxx, Modules/CMakeASMCompiler.cmake.in, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeForceCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeJavaCompiler.cmake.in: ENH: second try for handling + the linker language with integer priority values (returning a + pointer to a string on the stack is no good idea) + + Alex + +2007-07-11 17:29 alex + + * Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmTarget.cxx, Modules/CMakeASMCompiler.cmake.in, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeForceCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeJavaCompiler.cmake.in: COMP: revert last commit for + now, broke Visual Studio + + Alex + +2007-07-11 16:22 alex + + * Modules/CMakeASMCompiler.cmake.in, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeForceCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeJavaCompiler.cmake.in, Modules/CMakeLists.txt, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmTarget.cxx: + ENH: CMAKE__LINKER_PREFERENCE is now an integer priority, + not a two-step priority (None or Prefered) Current order: ASM 0, + C 10, Fortran 20, CXX 30, Java 40 This is the same order as + automake choses: + http://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html + + This change should be backward compatible: if there is a project + using fortran and CXX, they had to set the LINKER_LANGUAGE + explicitely, otherwise cmake complained (but still generated the + project files). Explicitely setting the linker language still + overrides automatic detection. If somebody has a custom language + for cmake and the PREFERENCE starts with "P", its changed to 100, + which gives it preference over all other languages (except the + other custom languages which have also "Prefered"). "None" is + converted to 0. + + Alex + +2007-07-11 15:53 alex + + * Source/: cmDocumentation.cxx, cmDocumentation.h, + cmPropertyDefinition.cxx, cmPropertyDefinition.h, cmake.cxx, + cmake.h, cmakemain.cxx: + STYLE: sort the property documentation into + global/directory/target/test/sourcefile and variable sections + + Alex + +2007-07-11 15:50 alex + + * Source/cmMakefile.cxx: + ENH: change the way #cmakedefine is changed to #undef, so it is + similar to what autoconf does. This makes porting software from + autoconf to cmake easier, since it's easier to diff the resulting + config headers. + + Now the following #cmakedefine HAVE_STRING_H 1 #cmakedefine + HAVE_STRLCAT 1 + + produce: + + #define HAVE_STRING_H 1 /* #undef HAVE_STRLCAT */ + + whereas before they produced: + + #define HAVE_STRING_H 1 /* #undef HAVE_STRLCAT 1 */ + + Since it's commented out anyway, it's now change in behaviour. + + Alex + +2007-07-11 13:39 alex + + * Modules/CMakeASMInformation.cmake: + ENH: add CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} and don't allow + preset CMAKE_xxx_INFORMATION files + + Alex + +2007-07-10 21:38 alex + + * Modules/FindKDE4.cmake: + STYLE: use EXECUTE_PROCESS() instead of EXEC_PROGRAM() + + Alex + +2007-07-10 17:11 alex + + * Modules/Platform/eCos.cmake: + ENH: add the ecos include dir and the ecos definitions by default + + Alex + +2007-07-10 14:05 martink + + * Source/cmGetSourceFilePropertyCommand.cxx: ENH: added some + documentation to explain a section of code a bit better + +2007-07-10 13:52 martink + + * Source/: cmMakefile.cxx, cmGetDirectoryPropertyCommand.cxx: ENH: + some cleanup of get property commands + +2007-07-09 14:30 king + + * Source/cmLocalVisualStudioGenerator.h: STYLE: Removed stray + comment. + +2007-07-09 13:07 alex + + * Modules/Platform/eCos.cmake: + ENH: add support for building eCos applications natively + + Alex + +2007-07-09 08:16 alex + + * Tests/Assembler/main.c: COMP: hopefully fix test, finally + + Alex + +2007-07-09 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-09 00:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-08 22:06 alex + + * Tests/Assembler/main.c: COMP: fix test + + Alex + +2007-07-07 17:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-06 19:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-06 14:02 alex + + * Tests/Assembler/CMakeLists.txt: + BUG: fix test + + Alex + +2007-07-06 13:08 alex + + * Utilities/CMakeLists.txt: + BUG: the cmake deps depend on cmake + + Alex + +2007-07-06 08:53 alex + + * Tests/Assembler/: CMakeLists.txt, main.c: + COMP: OPTIONAL was missing in ENABLE_LANGUAGE() -the assembler + file seems to work for Linux and FreeBSD -try to fix main() for + HP-UX compiler + + Alex + +2007-07-05 16:38 alex + + * Tests/Assembler/CMakeLists.txt: + STYLE: some more output + + Alex + +2007-07-05 16:32 alex + + * Tests/Assembler/: CMakeLists.txt, main-linux-x86-gas.s: + COMP: skip APPLE, since there with universal binaries the + assembler file would be built for both architectures + + Alex + +2007-07-05 16:11 alex + + * Tests/Assembler/CMakeLists.txt: + COMP: let's see if this assembler file works also on other + platforms than linux... + + Alex + +2007-07-05 15:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-05 09:05 alex + + * Tests/: CMakeLists.txt, Assembler/CMakeLists.txt, + Assembler/main-linux-x86-gas.s, Assembler/main.c: + ENH: add a simple assembler test + + Alex + +2007-07-04 08:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-03 16:10 alex + + * Source/: cmCommandArgumentsHelper.cxx, + cmExternalMakefileProjectGenerator.cxx, cmake.cxx: + STYLE: name the external generator "KDevelop3 - Unix Makefiles" + instead of "Unix Makefiles - KDevelop3" -initialize Ignore to 0, + crashes otherwise + + Alex + +2007-07-03 11:41 alex + + * Modules/FindOpenGL.cmake: + STYLE: don't test twice for APPLE + + Alex + +2007-07-03 09:45 king + + * DartLocal.conf.in: ENH: Adding hythloth expected nightly + submissions. + +2007-07-03 08:26 alex + + * Source/: cmDocumentation.cxx, cmDocumentation.h: + COMP: fix compile on HP-UX with aCC, reusing the same identifier + for a variable as for the enum type doesn't work here + + Alex + +2007-07-03 03:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-07-02 16:46 alex + + * Source/: cmCommandArgumentsHelper.cxx, cmExportCommand.cxx: + COMP: fix warnings + + Alex + +2007-07-02 16:04 king + + * Source/: cmFileCommand.cxx, cmFileCommand.h: COMP: Remove unused + argument. + +2007-07-02 16:04 king + + * Source/cmInstallTargetGenerator.cxx: COMP: Remove shadowed local. + +2007-07-02 15:54 alex + + * Modules/CMakeFindBinUtils.cmake: + COMP: with visual studio it's no error if link isn't found + + Alex + +2007-07-02 15:43 alex + + * Source/: cmBootstrapCommands.cxx, cmCommand.h, + cmCommandArgumentsHelper.cxx, cmCommandArgumentsHelper.h, + cmExportCommand.cxx, cmExportCommand.h: + ENH: add framework for unified handling of arguments to cmake + commands, example see cmExportCommand.cxx + + Alex + +2007-07-02 14:56 king + + * Source/: cmFileCommand.cxx, cmFileCommand.h, + cmInstallCommand.cxx, cmInstallDirectoryGenerator.cxx, + cmInstallDirectoryGenerator.h, cmInstallExportGenerator.cxx, + cmInstallExportGenerator.h, cmInstallFilesGenerator.cxx, + cmInstallFilesGenerator.h, cmInstallGenerator.cxx, + cmInstallGenerator.h, cmInstallScriptGenerator.cxx, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h: ENH: + Further cleanup of installation script generation. The + per-component and per-configuration testing is now done in cmake + code instead of in the FILE(INSTALL) command. The generation of + the cmake code to do these tests is centralized in + cmInstallGenerator. Old-style shared library versioning and + component/config support code has been removed from + FILE(INSTALL). This commit is surrounded by the tags + CMake-InstallGeneratorCleanup2-pre and + CMake-InstallGeneratorCleanup2-post. + +2007-07-02 14:18 alex + + * Modules/CMakeForceCompiler.cmake: + ENH: make supporting embedded compilers need a user specific + linker file for compiling an executable (amd thus cannot build + the compiler-id program) easier by providing CMAKE_FORCE_XXX() + macros which force cmake to use the given compilers anyway + + Alex + +2007-07-02 13:32 king + + * Source/: cmTarget.cxx, cmTarget.h: STYLE: Fixed line-too-long, + fixed indentation, removed trailing whitespace, added function + separator comment lines. + +2007-07-02 13:29 alex + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Tests/CMakeTests/DummyToolchain.cmake, + Tests/CMakeTests/ToolchainTest.cmake.in: + ENH: remove support for presetting CMAKE_SYSTEM_INFO_FILE, + CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE, + CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE, + CMAKE_SYSTEM_AND_C_COMPILER_AND_PROCESSOR_INFO_FILE and + CMAKE_SYSTEM_AND_CXX_COMPILER_AND_PROCESSOR_INFO_FILE + + Instead of presetting these variables to arbitrary filenames, + users should set up CMAKE_SYSTEM_NAME and the compilers correctly + and also create a Platform/ directory so these files will all + follow the official cmake style, which should make it easier to + understand and debug project which have their own + platform/toolchain support files. + + -remove support for a suffix to MS crosscompilers, since this is + not (yet) supported by cmake and might confuse users + + Alex + +2007-07-02 12:46 alex + + * Modules/CMakeFindBinUtils.cmake: + BUG: with MS Visual Studio currently there is no compiler id, so + check the generator too + + Alex + +2007-07-02 11:31 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Fix install_name_tool + update of the executable in an installed bundle on OSX. This + addresses bug#4534. + +2007-07-02 11:24 alex + + * Source/cmDocumentation.h: + COMP: fix build with msvc 6, the enums are now part of a class + which is already completely parsed + + Alex + +2007-07-02 11:05 alex + + * Utilities/CMakeLists.txt: + BUG: fix build with cmake < 2.4 + + Alex + +2007-07-02 11:02 king + + * Source/: cmInstallGenerator.cxx, cmInstallGenerator.h, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h: ENH: + Improved indentation of generated cmake_install.cmake code. + +2007-07-02 09:58 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Enable versioned executable + test everywhere but XCode. + +2007-07-01 22:55 hoffman + + * Source/: cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: COMP: fix warning in release + branch + +2007-07-01 16:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-30 22:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-30 21:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-29 16:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-29 12:58 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/Platform/Linux.cmake, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserHelper.h, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmLocalGenerator.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmake.cxx, + Tests/StringFileTest/InputFile.h.in, + Tests/StringFileTest/StringFile.cxx: ENH: RC 11 + +2007-06-29 11:30 hoffman + + * DartLocal.conf.in: ENH: remove more machines + +2007-06-29 11:18 hoffman + + * CMakeLists.txt, DartLocal.conf.in: ENH: make DartLocal.conf part + of project + +2007-06-28 16:11 king + + * Source/: cmInstallDirectoryGenerator.cxx, + cmInstallExportGenerator.cxx, cmInstallFilesGenerator.cxx, + cmInstallGenerator.cxx, cmInstallGenerator.h, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h: ENH: + First step of install script generator cleanup. Each + configuration to be installed is now separately handled instead + of using variables to store per-configuration names. For targets + the component and configuration install-time tests are now done + in the install script instead of in the FILE(INSTALL) command. + This cleans things up like not trying to strip a file that was + optionally not installed. It also simplifies the code for + install_name adjustment on OSX. This commit is surrounded by the + tags CMake-InstallGeneratorCleanup1-pre and + CMake-InstallGeneratorCleanup1-post. + +2007-06-28 15:28 alex + + * Source/cmGlobalGenerator.cxx: + COMP: fix warning about unused parameter + + Alex + +2007-06-28 15:04 alex + + * Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmakemain.cxx, Utilities/CMakeLists.txt: + ENH: generate separate documentation for the commands, + compatiblity commands, modules and properties as html, text and + man pages. The names of the man pages are cmcommands, cmcompat, + cmprops and cmmodules, so they are easy to type. + + Alex + +2007-06-28 13:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-28 11:00 alex + + * Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmDumpDocumentation.cxx, Source/cmakemain.cxx, + Source/CursesDialog/ccmake.cxx, Utilities/CMakeLists.txt: + ENH: -in the full documentation there is now an extra section for + compatibility commands, so users see which commands they + shouldn't use -cmake -h now also works with lower case + commands --help-fullm --help-command, --help-module and + --help-property now determine the output format from the + extension of the given filename + + Let me know if there are some things I overlooked. + + Alex + +2007-06-28 10:22 alex + + * Source/cmGlobalVisualStudio6Generator.cxx: + COMP: fix typo + + Alex + +2007-06-28 09:14 alex + + * Modules/: CMakeASM-ATTInformation.cmake, + CMakeASMCompiler.cmake.in, CMakeASMInformation.cmake, + CMakeDetermineASM-ATTCompiler.cmake, + CMakeDetermineASMCompiler.cmake, CMakeTestASM-ATTCompiler.cmake, + CMakeTestASMCompiler.cmake, Platform/gas.cmake: + ENH: initial support for assembler in cmake, needs testing by our + users + + Alex + +2007-06-28 09:09 alex + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmEnableLanguageCommand.cxx, cmEnableLanguageCommand.h, + cmGlobalBorlandMakefileGenerator.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMSYSMakefileGenerator.h, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Win64Generator.cxx, + cmGlobalVisualStudio8Win64Generator.h, + cmGlobalWatcomWMakeGenerator.cxx, cmGlobalWatcomWMakeGenerator.h, + cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalVisualStudio6Generator.cxx, cmMakefile.cxx, cmMakefile.h, + cmProjectCommand.cxx: + ENH: add OPTIONAL keyword to ENABLE_LANGUAGE, so it will be + possible to do something like this: + + ENABLE_LANGUAGE(ASM-ATT) IF(CMAKE_ASM-ATT_COMPILER_WORKS) ... + do assembler stufff ELSE(CMAKE_ASM-ATT_COMPILER_WORKS) ... + fallback to generic C/C++ ENDIF(CMAKE_ASM-ATT_COMPILER_WORKS) + + Alex + +2007-06-27 16:28 alex + + * Source/kwsys/: DynamicLoader.cxx, ProcessUNIX.c: + ENH: build on BlueGene/L: -add static resolv, nss_files and + nss_dns libs to the default set of libs, otherwise we get + undefined references out of libc to several functions -add a + dummy DynamicLoader in kwsys for systems without shared libs + -BlueGene doesn't have SA_SIGINFO + + Alex + +2007-06-27 16:14 king + + * Source/cmInstallCommand.cxx: BUG: Do not install the import + library for an executable that does not have ENABLE_EXPORTS set. + +2007-06-27 16:10 king + + * Source/: cmFileCommand.cxx, cmFileCommand.h: BUG: Need to compute + the correct versioned name for executables on cygwin. This + addresses bug#5238. + +2007-06-27 15:42 alex + + * Source/cmTarget.cxx: + ENH: here we really want only non-imported targets, as discussed + with Brad + + Alex + +2007-06-27 14:55 alex + + * Modules/CMakeDetermineCompilerId.cmake: + BUG: use ${LANG}_COMPILER_ARG1 also here, otherwise some + compilers won't be able to compile e.g. the C++ source file (e.g. + the ADSP compiler needs -c++ for compiling C++ files) + + Alex + +2007-06-27 13:22 king + + * Tests/Java/CMakeLists.txt: BUG: For in-source version do not use + a custom command output and custom target with the same name. + This accidentally worked before but with a circular dependency. + +2007-06-27 12:07 king + + * Modules/Platform/Linux.cmake, Modules/Platform/UnixPaths.cmake, + Source/cmFindLibraryCommand.cxx, Source/cmake.cxx: ENH: Added + global property FIND_LIBRARY_USE_LIB64_PATHS to allow lib64 paths + to be searched optionally. Turn off the feature on debian + systems. This addresses debian report 419007. + +2007-06-27 12:05 king + + * Source/cmPropertyDefinition.cxx: BUG: Fixed spelling of globally + in global property names. + +2007-06-27 11:42 king + + * Modules/Platform/GNU.cmake: ENH: Added GNU/Hurd platform. Taken + from debian patch 407155. + +2007-06-27 11:39 king + + * Source/kwsys/ProcessUNIX.c: COMP: Fix for platforms that do not + have siginfo on their signal handlers. + +2007-06-27 08:43 alex + + * Tests/CMakeLists.txt: + COMP: fix tests where the building cmake doesn't have + GET_TEST_PROPERTY + + Alex + +2007-06-27 04:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-26 19:54 alex + + * Source/cmGlobalGenerator.cxx: + ENH: use CMAKE_SYSTEM instead of CMAKE_SYSTEM_NAME, since + CMAKE_SYSTEM_NAME may already have been set when crosscompiling + + Alex + +2007-06-26 17:14 alex + + * Source/cmGlobalGenerator.cxx: + COMP: fix broken tests for now + + Alex + +2007-06-26 17:08 alex + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: + COMP: fix bootstrapping + + Alex + +2007-06-26 15:30 alex + + * Tests/: CMakeLists.txt, SimpleCOnly/CMakeLists.txt, + SimpleCOnly/bar.c, SimpleCOnly/foo.c, SimpleCOnly/main.c: + ENH: add a SimpleCOnly test, this is needed e.g. for testing sdcc + since this doesn't support C++ and also doesn't have a printf() + implementation by default -add a test for mingw cross compiler + + Alex + +2007-06-26 15:15 alex + + * Tests/CMakeLists.txt, Modules/Platform/Generic-SDCC-C.cmake: + ENH: + +2007-06-26 14:48 martink + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: ENH: add + SetProperties into bootstrap + +2007-06-26 13:50 alex + + * Source/: cmDefinePropertyCommand.h, cmGetPropertyCommand.h, + cmSetPropertiesCommand.h: + STYLE: rename chain to inherit in the docs + + Alex + +2007-06-26 13:19 alex + + * Modules/: CMakeCCompilerId.c, Platform/Generic-SDCC-C.cmake: + ENH: add basic support for sdcc (http://sdcc.sourceforge.net), + needs sdcc (sdcclib) cvs for creating libraries) + + Alex + +2007-06-26 13:05 alex + + * Modules/Platform/Generic.cmake, Source/cmAddLibraryCommand.cxx, + Source/cmake.cxx, Source/cmake.h, + Modules/CMakeGenericSystem.cmake, + Modules/Platform/BlueGeneL.cmake: + STYLE: change global cmake variable + CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS to the first global cmake + property TARGET_SUPPORTS_SHARED_LIBS + + Alex + +2007-06-26 13:00 alex + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Source/cmGlobalGenerator.cxx: + ENH: check for CMAKE_HOST_SYSTEM_NAME to decide whether to load + CMakeDetermineSystem.cmake, since CMAKE_SYSTEM_NAME might already + be preset when using cmake for cross compiling use type STRING + instead of FILEPATH since otherwise a strange filename was + generated + + Alex + +2007-06-26 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-25 12:50 martink + + * Source/: cmGetPropertyCommand.cxx, cmSetPropertiesCommand.cxx: + COMP: fix warnings + +2007-06-25 12:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-25 10:34 martink + + * Source/: cmDefinePropertyCommand.cxx, cmDefinePropertyCommand.h, + cmProperty.h, cmPropertyDefinition.cxx, cmPropertyMap.cxx, + cmake.cxx, cmake.h: ENH: added the ability to document variables + and cached_variables + +2007-06-25 10:33 martink + + * Source/: cmGetPropertyCommand.cxx, cmGetPropertyCommand.h: ENH: + added cmGetPropertyCommand + +2007-06-25 09:51 martink + + * Source/cmCommands.cxx, Source/cmGetCMakePropertyCommand.cxx, + Source/cmMakefile.cxx, + Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetPropertiesCommand.cxx, Source/cmake.cxx, + Tests/Properties/CMakeLists.txt: ENH: some property cleanup and + added GetProperty + +2007-06-24 06:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-23 01:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-22 11:31 hoffman + + * CMakeLists.txt, Utilities/Release/CMake.nsi.in, + Utilities/Release/CMakeInstall.bmp, + Utilities/Release/MakeRelease.cmake.in, Utilities/Release/README, + Utilities/Release/Release.cmake, Utilities/Release/cmake_login, + Utilities/Release/cmake_release.sh.in, + Utilities/Release/config_AIX, + Utilities/Release/config_CYGWIN_NT-5.1, + Utilities/Release/config_Darwin, Utilities/Release/config_HP-UX, + Utilities/Release/config_IRIX64, Utilities/Release/config_Linux, + Utilities/Release/config_OSF1, Utilities/Release/config_SunOS, + Utilities/Release/cygwin-package.sh.in, + Utilities/Release/release_dispatch.sh: ENH: remove old style + release stuff + +2007-06-22 10:22 alex + + * Modules/: CMakeLists.txt, FindMPI.cmake, + Platform/BlueGeneL.cmake: + ENH: add support for BlueGene/L + + Alex + +2007-06-22 09:58 alex + + * Source/: cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmCPluginAPI.cxx, cmMakefile.cxx, cmMakefile.h: + ENH: add IMPORT keyword to ADD_LIBRARY, dependencies are not yet + working STYLE: fix line lengths and indentation, use enum as + argument to AddLibrary() instead of int (which was initialized + from a bool in some cases) + + Alex + +2007-06-22 08:44 alex + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmake.cxx, + cmake.h: + ENH: put compatibility commands in extra section and prepare for + creating separate man pages for properties, modules, commands and + compatibility commands + + Alex + +2007-06-21 16:23 alex + + * Modules/CMakeGenericSystem.cmake, Modules/Platform/Generic.cmake, + Source/cmAddLibraryCommand.cxx: + ENH: print a warning if ADD_LIBRARY( SHARED/MODULE ) is used and + the target platform doesn't support shared libraries + + Alex + +2007-06-21 14:06 alex + + * Tests/Java/CMakeLists.txt: + STYLE: add some more output, so it is easier to understand + + Alex + +2007-06-21 13:08 alex + + * Source/: cmLocalGenerator.cxx, cmTarget.cxx: + BUG: handle dependencies to imported targets better: don't create + a dependency if the target name was not listed in DEPENDS, if it + was listed in DEPENDS, create a dependency to the file + + Seems to work, but have to check with Brad. + + Alex + +2007-06-21 06:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-21 04:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-20 23:01 alex + + * Source/cmMakefile.h: + STYLE: GetProjectName() is const + + Alex + +2007-06-20 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-19 14:57 alex + + * Source/cmInstallExportGenerator.cxx: + COMP: fix build under windows + + Alex + +2007-06-19 13:10 alex + + * Source/: CMakeLists.txt, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmInstallCommand.cxx, cmInstallCommand.h, + cmInstallExportGenerator.cxx, cmInstallExportGenerator.h: + ENH: add INSTALL(EXPORT ...) mode and INSTALL( TARGETS ... EXPORT + ) , tests still have to be added + + Alex + +2007-06-19 11:11 alex + + * Source/: cmInstallCommand.cxx, cmInstallCommand.h, + cmInstallDirectoryGenerator.cxx, cmInstallDirectoryGenerator.h, + cmInstallFilesGenerator.cxx, cmInstallFilesGenerator.h, + cmInstallGenerator.h, cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h: + STYLE: preparations for the INSTALL(EXPORT ...) generator -move + std::string Destination to cmInstallGenerator, since all (except + the script one) have it and add a const accessor so it can be + queried -use temporary variables in cmInstallCommand for the + generators so they can be reused easier -some more const + + Alex + +2007-06-19 09:18 king + + * Source/cmCPluginAPI.cxx: COMP: Work-around warning about static + specifier on HP compiler. + +2007-06-18 18:01 alex + + * Modules/CMakeDetermineJavaCompiler.cmake: + STYLE: use IF(NOT ...) and remove MARK_AS_ADVANCED() for + variables which are not defined here + + Alex + +2007-06-18 17:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-18 11:59 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmAuxSourceDirectoryCommand.cxx, Source/cmCPluginAPI.cxx, + Source/cmCommands.cxx, Source/cmCreateTestSourceList.cxx, + Source/cmFLTKWrapUICommand.cxx, + Source/cmGetSourceFilePropertyCommand.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalXCodeGenerator.cxx, Source/cmLocalXCodeGenerator.h, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmOutputRequiredFilesCommand.cxx, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapCPPCommand.h, + Source/cmQTWrapUICommand.cxx, Source/cmQTWrapUICommand.h, + Source/cmSourceFile.cxx, Source/cmSourceFile.h, + Source/cmSourceFileLocation.cxx, Source/cmSourceFileLocation.h, + Source/cmTarget.cxx, Source/cmTarget.h: ENH: Merging changes from + branch CMake-SourceFile2-b between tags CMake-SourceFile2-bp and + CMake-SourceFile2-b-mp1 to trunk. This commit is surrounded by + tags CMake-SourceFile2-b-mp1-pre and CMake-SourceFile2-b-mp1-post + on the trunk. + + The changes re-implement cmSourceFile and the use of it to allow + instances to be created much earlier. The use of + cmSourceFileLocation allows locating a source file referenced by + a user to be much simpler and more robust. The two SetName + methods are no longer needed so some duplicate code has been + removed. The strange "SourceName" stuff is gone. Code that + created cmSourceFile instances on the stack and then sent them to + cmMakefile::AddSource has been simplified and converted to + getting cmSourceFile instances from cmMakefile. The CPluginAPI + has preserved the old API through a compatibility interface. + + Source lists are gone. Targets now get real instances of + cmSourceFile right away instead of storing a list of strings + until the final pass. + + TraceVSDependencies has been re-written to avoid the use of + SourceName. It is now called TraceDependencies since it is not + just for VS. It is now implemented with a helper object which + makes the code simpler. + +2007-06-18 09:00 alex + + * Source/CPack/: cmCPackGenerators.cxx, cmCPackNSISGenerator.cxx: + ENH: NSIS exists also for Linux, not only Windows, so enable it + there too patch by Michal ÄŒihaÅ™ + + Alex + +2007-06-17 20:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-17 08:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-16 17:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-15 16:09 alex + + * Source/cmake.cxx: + COMP: include cmExternalMakefileProjectGenerator.h + + Alex + +2007-06-15 16:07 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmMakefile.h, cmake.cxx: + STYLE: minor fixes + + Alex + +2007-06-15 15:33 alex + + * Source/cmInstallTargetGenerator.h: + COMP: forgot to commit this one + + Alex + +2007-06-15 14:27 alex + + * Source/cmInstallTargetGenerator.cxx: + STYLE: remove code duplication between PrepareScriptReference and + GetScriptReference, and make the logic for getting the filename + public, so it can be used e.g. for exporting + + Alex + +2007-06-15 13:00 alex + + * Source/: cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h: + BUG: don't strip static libraries, it removes their symbol table, + dynamic libs have an extra symbol table so they still work + stripped + + Alex + +2007-06-15 11:12 alex + + * Source/: cmInstallTargetGenerator.h, + cmInstallTargetGenerator.cxx: + BUG: don't run strip on OPTIONAL install targets if the file + doesn't exist + + Alex + +2007-06-15 10:34 alex + + * Source/cmInstallCommand.h: + STYLE: add some more line breaks so it should be easier to read + + Alex + +2007-06-15 10:10 alex + + * Source/: cmExportLibraryDependencies.cxx, + cmExportLibraryDependencies.h, cmGlobalGenerator.h, + cmLocalGenerator.h, cmMakefile.h, cmTarget.h, cmake.cxx, cmake.h: + + STYLE: remove duplicate non-const accessors + GetLocalGenerator(int) and GetLocaGenerators(cmLocalGenerators) + from cmGlobalGenerator(). Now there is one const accessor which + is even faster since it returns a reference (instead of copying a + vector) -more const to ensure that this the returned local + generators don't actually get modified -removed duplicated code + in GetCTestCommand() and GetCPackCommand() -added some const + accessors + + Alex + +2007-06-15 08:53 alex + + * Utilities/CMakeLists.txt: + STYLE: use a macro for generating the documentation + + Alex + +2007-06-15 08:42 alex + + * Tests/CMakeLists.txt: + COMP: big timeout for building kdelibs + + Alex + +2007-06-15 08:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-14 13:57 alex + + * Source/CPack/cmCPackZIPGenerator.cxx: + STYLE: fix typo + + Alex + +2007-06-14 13:55 alex + + * Tests/CMakeLists.txt: + ENH: add test for buildingn kdelibs alpha1 + (http://websvn.kde.org/tags/KDE/3.90.1) with cmake requires Qt >= + 4.3.0, DBus, kdesupport (http://websvn.kde.org/trunk/kdesupport/) + and the EasyDashboard scripts. + + Alex + +2007-06-14 13:05 hoffman + + * Source/: cmCTest.cxx, CTest/cmCTestBuildCommand.cxx, + CTest/cmCTestBuildHandler.cxx: ENH: add more verbose output + +2007-06-14 12:03 alex + + * Source/CPack/: cmCPackZIPGenerator.cxx, cmCPackZIPGenerator.h: + ENH: support 7zip for creating zip files (not 7z files) + + Alex + +2007-06-14 11:17 alex + + * Utilities/CMakeLists.txt: + STYLE: add man page for cpack + + Alex + +2007-06-14 08:49 alex + + * Source/: cmRemoveDefinitionsCommand.h, cmakemain.cxx: + STYLE: add comment about the -D -P order and fix typo in doc + + Alex + +2007-06-14 08:33 alex + + * Tests/BuildDepends/CMakeLists.txt: + COMP: removing the directory at the beginning breaks the test for + in-source builds + + Alex + +2007-06-14 07:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-14 01:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-13 17:06 king + + * Source/: cmSourceFile.cxx, cmSourceFile.h: ENH: Make sure + FindFullPath does not complain more than once about not finding + the file if it fails. + +2007-06-13 16:58 king + + * Source/: cmSourceFile.cxx, cmSourceFile.h: ENH: Use + non-const==>locate policy for GetLanguage() method. + +2007-06-13 16:33 king + + * Source/cmSourceFileLocation.h: STYLE: Added interface + documentation. + +2007-06-13 16:26 alex + + * Tests/BuildDepends/: CMakeLists.txt, Project/bar.cxx: + COMP: fix test, in some cases stdout from bar was not captured + correctly, probably because the process was killed before the + fflush() worked because the busy loop blocked the processor + (failing midworld test) + + Alex + +2007-06-13 16:22 king + + * Source/cmSourceFile.cxx: BUG: Do not abort when file cannot be + found. + +2007-06-13 16:12 king + + * Source/: cmGetSourceFilePropertyCommand.cxx, cmSourceFile.cxx, + cmSourceFile.h: ENH: Improved const-correctness of cmSourceFile + API. On-demand computation of the full path is now done only for + non-const cmSourceFile instances. + +2007-06-13 15:32 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakeDepend.cxx, + cmMakefileLibraryTargetGenerator.cxx, cmSourceFile.cxx, + cmSourceFile.h: ENH: Changed signature of + cmSourceFile::GetFullPath() back to returning a reference to a + string. + +2007-06-13 15:21 king + + * Source/: cmMakefile.cxx, cmMakefile.h, cmSourceFile.h: STYLE: + Removed commented-out code that is no longer needed. + +2007-06-13 15:21 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fixed for new + cmSourceFile interface. + +2007-06-13 15:20 king + + * Source/cmSourceFile.cxx: BUG: Never return a null pointer from + GetFullPath. Too many places construct a string with the result. + +2007-06-13 14:36 alex + + * Source/cmFileCommand.h: + STYLE: add documentation for FILE(REMOVE ...) and + FILE(REMOVE_RECURSE ...) FILE(REMOVE ...) works only for files, + not for directories, REMOVE_RECURSE works for both, it seems + having both is not necessary + + Alex + +2007-06-13 13:44 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudioGenerator.cxx: COMP: Fix for new cmSourceFile + interface. + +2007-06-13 13:44 king + + * Source/cmMakefile.cxx: COMP: Fix for build on VS. + +2007-06-13 12:52 alex + + * Source/cmExternalMakefileProjectGenerator.h: + COMP: include cmStandardIncludes.h instead of and + , this should fix the build problem on AIX + + Alex + +2007-06-13 11:55 king + + * Source/cmSourceFileLocation.cxx: BUG: When updating the directory + or extension from an unambiguous location we need to mark the new + copy as unambiguous too. + +2007-06-13 11:17 king + + * Source/: cmCPluginAPI.cxx, cmCommands.cxx: ENH: Implemented + compatibility interface in cmCPluginAPI to preserve old API for + loaded commadns. + +2007-06-13 10:54 alex + + * Source/cmMarkAsAdvancedCommand.h: + BUG: make MARK_AS_ADVANCED() scriptable, because this is the only + reason many cmake FindXXX.cmake modules can't be used in script + mode and also FindUnixMake.cmake, which is required by the + CTEST_BUILD() command + + Alex + +2007-06-12 17:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-12 16:41 alex + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake: + ENH: first include the processor specific file, then the compiler + file, this way the specific hardware file can set variables which + can be used in the toolchain rules (like CMAKE_C_COMPILE_OBJECT + etc.) + + Alex + +2007-06-12 11:11 david.cole + + * Source/cmCTest.cxx: BUG: Never return a string containing a space + " " from cmCTest::GetShortPathToFile - replace them with "_". + DART cannot construct valid file names during dashboard rollup + with space " " in the short path. + +2007-06-12 10:56 alex + + * Source/: cmake.cxx, cmake.h, CTest/cmCTestScriptHandler.cxx: + ENH: remove non/scriptable cmake commands from the script handler + in ctest, as discussed with David. This also gives a better ctest + man page with just the commands you should actually use in ctest + scripts. Until now these commands were more or less executed, + but e.g. add_executable() didn't create an executable, project() + failed with an error. Now you get an error instantly if using one + of these commands. + + Alex + +2007-06-12 10:19 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: make sure working + directory is set + +2007-06-12 09:40 alex + + * Source/: cmCTest.cxx, cmCTest.h: + STYLE: remove argument bool fast, it was unused + + Alex + +2007-06-12 08:23 alex + + * Source/cmGlobalGenerator.cxx: + COMP: remove warning about unused variable + + Alex + +2007-06-11 18:23 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmAuxSourceDirectoryCommand.cxx, Source/cmCommands.cxx, + Source/cmCreateTestSourceList.cxx, + Source/cmFLTKWrapUICommand.cxx, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalXCodeGenerator.cxx, Source/cmLocalXCodeGenerator.h, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmOutputRequiredFilesCommand.cxx, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapCPPCommand.h, + Source/cmQTWrapUICommand.cxx, Source/cmQTWrapUICommand.h, + Source/cmSourceFile.cxx, Source/cmSourceFile.h, + Source/cmSourceFileLocation.cxx, Source/cmSourceFileLocation.h, + Source/cmTarget.cxx, Source/cmTarget.h: ENH: Initial sweep for + new-sytle creation of cmSourceFile instances. Committing on + branch CMake-SourceFile2-b. + +2007-06-11 17:15 hoffman + + * Tests/CMakeLists.txt: ENH: remove test + +2007-06-11 17:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-11 15:47 alex + + * Modules/Platform/Generic.cmake, Source/cmGlobalGenerator.cxx: + STYLE: add a comment about SetLanguageEnabled() -add a + Generic.cmake for target platforms without operating system + + Alex + +2007-06-11 15:36 david.cole + + * Source/: cmCTest.cxx, CTest/cmCTestCoverageHandler.cxx: BUG: + Never return a string containing a ":" from + cmCTest::GetShortPathToFile - replace them with "_". DART cannot + construct valid file names during dashboard rollup with ":" in + the short path. Also, fix the Bullseye coverage handler so that + the file names and paths match in both the coverage summary and + the individual coverage logs. + +2007-06-11 15:31 alex + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h: + ENH: split cmGlobalGenerator::SetLanguageEnabled() in two parts, + where the second part copies the values from the cmake variables + into internal maps. So this can now be done after the + compiler-specific information has been loaded, which can now + overwrite more settings. + + Alex + +2007-06-11 15:02 king + + * Modules/FindQt3.cmake: BUG: Fixed name of variable used to check + version of uic executable. + +2007-06-11 15:00 hoffman + + * Tests/CMakeLists.txt: ENH: add ConvLib test back for some time + +2007-06-11 14:28 alex + + * Source/cmGlobalGenerator.cxx: + STYLE: determineLanguageCalled removed, now the conditional code + is directly called in the only place where it could be set to + true + + Alex + +2007-06-11 13:22 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Re-arranged code to test + adding a custom command to generate a source file after the file + has been added to a target. This is supported by the current + implementation because of the use of source lists in the target + implementation. When we later convert to creating cmSourceFile + instances immediately for the target we need to make sure the + mentioned case still works. + +2007-06-11 12:40 king + + * Source/: cmIncludeRegularExpressionCommand.h, + cmLocalUnixMakefileGenerator3.h, cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.h, cmMakefileTargetGenerator.h: + STYLE: Removed unused reference to cmMakeDepend. + +2007-06-11 10:25 king + + * Source/: cmMakefile.cxx, cmMakefile.h: BUG: More problems with + cmMakefile copy-constructor. It seems the regular expression + class cannot be assigned but does not enforce this limitation at + compile time. + +2007-06-10 19:51 alex + + * Source/cmGlobalKdevelopGenerator.cxx: + ENH: enable cvs or svn support if the source has the CVS/.svn + subdirs + + Alex + +2007-06-10 15:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-09 02:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-08 17:44 king + + * Source/cmMakefile.cxx: BUG: Copy constructor needs to copy + regular expression members. + +2007-06-08 16:19 alex + + * Source/cmExportCommand.cxx: + ENH: fail if an unknown target is listed + + Alex + +2007-06-08 16:06 alex + + * Source/: cmDocumentation.cxx, ctest.cxx, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestScriptHandler.h: + STYLE: create command documentation for ctest + + I think some of the cmake commands should be removed from ctest + if possible, like add_executable etc. + + Alex + +2007-06-08 14:16 martink + + * Source/cmCTest.cxx: BUG: fix timeout bug with global timeouts + such as DART_TESTING_TIMEOUT + +2007-06-08 13:43 king + + * Source/cmFindBase.cxx: BUG: Fixed spelling and formatting of new + documentation. + +2007-06-08 12:42 alex + + * Source/: cmExternalMakefileProjectGenerator.h, + cmGlobalGenerator.h: + COMP: less warnings + + Alex + +2007-06-08 12:29 hoffman + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: use new covbr that does not stop + on error + +2007-06-08 11:57 alex + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx, + cmExportCommand.cxx, cmExportCommand.h, + cmExternalMakefileProjectGenerator.cxx, + cmExternalMakefileProjectGenerator.h, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalKdevelopGenerator.h, + cmMakefile.cxx, cmake.cxx, cmake.h: + ENH: add cmExternalMakefileProjectGenerator, which should make it + easier to write generators for IDE projects, which use already + existing makefiles (current the kdevelop generator) -first stept + of the export interface, iniitial export() command -more + replacements for the FIND_XXX docs + + Alex + +2007-06-08 10:28 alex + + * Modules/FindX11.cmake: + ENH: more consistence among the X11 components + + Alex + +2007-06-08 09:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-08 09:28 alex + + * Modules/FindQt4.cmake: + ENH: patch from #5054: also search for QtUitoolsd lib + + Alex + +2007-06-08 09:19 alex + + * Source/cmExecProgramCommand.h: + STYLE: fix typo (bug #5115) + + Alex + +2007-06-07 14:57 alex + + * Source/cmFindBase.cxx: + STYLE: add documentation for CMAKE_FIND_ROOT_PATH + + Alex + +2007-06-07 14:31 alex + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: + BUG: fix Bootstrap test + + Alex + +2007-06-07 13:51 alex + + * Modules/CMakeDetermineCompilerId.cmake, + Modules/CheckTypeSize.cmake, Source/cmFileCommand.cxx, + Source/cmFileCommand.h: + STYLE: remove out commented code + + Alex + +2007-06-07 13:05 alex + + * Utilities/CMakeLists.txt: + STYLE: use GET_TARGET_PROPERTY(LOCATION) instead of manually + building the path to the executables (tested with cmake 2.2.3) + + Alex + +2007-06-07 10:41 alex + + * Source/cmake.cxx: + ENH: also remove uninitialized from the cache + + Alex + +2007-06-07 09:37 alex + + * Source/cmGlobalGenerator.cxx: + BUG: fix #5137, now with the modified CMakeDetermineSystem.cmake + the CMAKE_HOST_SYSTEM_xxx variables have to be preset, not the + CMAKE_SYSTEM_xxx ones + + Alex + +2007-06-07 08:29 alex + + * Source/cmExportLibraryDependencies.cxx: + STYLE: remove wrong comments + + Alex + +2007-06-06 16:20 king + + * Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserHelper.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Tests/StringFileTest/InputFile.h.in, + Tests/StringFileTest/StringFile.cxx: BUG: Fixed @ONLY + configuration to not try to parse ${} syntax at all. This fixes + the original fix to bug#4393 and adds a test. + +2007-06-06 15:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-06 13:43 hoffman + + * Tests/CMakeTests/: IncludeTest.cmake.in, ToolchainTest.cmake.in: + ENH: fix it + +2007-06-06 13:32 hoffman + + * Tests/CMakeTests/: IncludeTest.cmake.in, ToolchainTest.cmake.in: + ENH: use lower case for file compare on windows + +2007-06-06 11:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-06 11:26 hoffman + + * Source/kwsys/: DynamicLoader.cxx, DynamicLoader.hxx.in: ENH: + remove some stuff to improve coverage + +2007-06-06 11:02 martink + + * Source/: cmCTest.cxx, CTest/cmCTestBuildAndTestHandler.cxx: BUG: + better passing of global TIMEOUT to internal ctest invocaitons + +2007-06-06 10:44 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: fix case problem with drive + letters and cmake vs CMakeSetup build.make changing + +2007-06-06 10:41 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/kwsys/SystemTools.cxx: + ENH: move to RC 10 + +2007-06-06 08:49 alex + + * Source/: cmIfCommand.cxx, cmIfCommand.h: + ENH: add IF(IS_ABSOLUTE path), so no regex matching is required + in the cmake scripts + + Alex + +2007-06-05 16:37 alex + + * Source/cmGlobalUnixMakefileGenerator3.h: + STYLE: fix comment + + Alex + +2007-06-05 16:35 alex + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmGlobalKdevelopGenerator.h, cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: + STYLE: move ForceVerboseMakefiles to + cmGlobalUnixMakefileGenerator3, so the kdevelop generator doesn't + need its own CreateLocalGenerator() anymore + + Alex + +2007-06-05 10:28 alex + + * Modules/: CMakeCCompilerId.c, CMakeCInformation.cmake, + CMakeCXXInformation.cmake, CMakeDetermineSystem.cmake, + CMakeSystemWithToolchainFile.cmake.in: + ENH: also load a processor-specific file if exists -also try the + basename file if the compiler id file doesn't exist -don't rely + so much on the CMAKE_TOOLCHAIN_FILE + + Alex + +2007-06-05 10:20 alex + + * Modules/CheckTypeSizeC.c.in: + COMP: don't use stdio, it can fail on some embedded targets + (sdcc) + + Alex + +2007-06-05 09:30 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Source/cmCommandArgumentLexer.cxx, + Source/cmCommandArgumentLexer.h, + Source/cmCommandArgumentLexer.in.l, + Source/cmCommandArgumentParserHelper.cxx: ENH: merge in changes + from main tree that fix at only parsing + +2007-06-05 09:19 hoffman + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.in.l: + ENH: fix for aix + +2007-06-05 09:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-05 08:30 alex + + * Modules/CheckTypeSizeC.c.in: + COMP: make the new check_type_size work with the HPUX cc + compiler: const doesn't exist there + + Alex + +2007-06-04 17:18 hoffman + + * Tests/Framework/test.lua: ENH: add missing file + +2007-06-04 17:17 hoffman + + * Source/cmMakefileLibraryTargetGenerator.cxx: ENH: prevent crash + +2007-06-04 17:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-04 17:08 alex + + * Modules/CheckTypeSize.cmake, Modules/CheckTypeSizeC.c.in, + Modules/Platform/Darwin.cmake, Source/cmCoreTryCompile.cxx, + Source/cmLocalGenerator.cxx: ENH: determine typesize by compiling + a file and reading strings from the compiled output. Tested with + various gcc, XCode, MSVC7, sdcc For OSX when doing TRY_COMPILE() + CMAKE_OSX_ARCHITECTURES is used, if there are different results + an error is generated. CMAKE_OSX_ARCHITECTURES can be overwritten + for the TRY_COMPILES with CMAKE_TRY_COMPILE_OSX_ARCHITECTURES. + + Alex + +2007-06-04 15:57 king + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.h, + cmCommandArgumentLexer.in.l, cmCommandArgumentParserHelper.cxx: + BUG: Fixed cmCommandArgumentLexer no-escape mode to not match + backslash-escape sequences as lexical tokens at all. Needed to + configure files with backslashes preceding an @VAR@ replacement. + This fixes bug#5130. + +2007-06-04 15:28 hoffman + + * Tests/Framework/CMakeLists.txt: ENH: add one of the headers to + the regular sources + +2007-06-04 13:50 alex + + * Source/cmake.cxx: + STYLE: fix typo: now double space after -D + + Alex + +2007-06-04 13:48 alex + + * Source/: cmCacheManager.cxx, cmake.cxx, cmake.h: + ENH: -U for removing variables now uses globbing expressions + -cmCacheManager: now also variables with type UNINITIALIZED are + saved in CMakeCache.txt, these are the vars defined using + -DFOO=foo but without type + + Alex + +2007-06-04 13:39 martink + + * Source/: cmCTest.cxx, CTest/cmCTestBuildAndTestHandler.cxx: ENH: + fix passing of time limit to some ctest invocations that also use + build-options + +2007-06-03 10:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-02 16:15 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: remove debug that + caused tests to fail + +2007-06-02 06:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-06-01 23:06 hoffman + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: opps + +2007-06-01 15:40 hoffman + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: initial bullseye stuff + +2007-06-01 14:16 alex + + * Source/: cmake.cxx, cmake.h: + BUG: also put a variable into the cache when defined using -D if + no type is given, then STRING is used. Also add command line + option -U as suggested for undefining cache variables. This fixes + #4896 and #4264. + + Alex + +2007-06-01 13:17 alex + + * Modules/FindX11.cmake: + COMP: fix warnings on some machines where some X libs apparently + don't really work by reverting X11_LIBRARIES back to the old + version -add some more X11_xxx_FOUND variables -reformat comments + at the top -always use IF(INCLUDE_DIR and LIB) for setting FOUND + to TRUE + + Alex + +2007-06-01 11:18 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmAddLibraryCommand.cxx, + Source/cmGlobalGenerator.cxx: ENH: merge in a few more fixes from + the main tree + +2007-06-01 11:16 alex + + * Modules/CheckCSourceRuns.cmake, Modules/CheckCXXSourceRuns.cmake, + Modules/FindThreads.cmake, Modules/TestBigEndian.cmake, + Source/cmTryRunCommand.cxx, Source/cmTryRunCommand.h, + Tests/TryCompile/CMakeLists.txt, Tests/TryCompile/exit_success.c, + Tests/TryCompile/exit_with_error.c: + ENH: improve TRY_RUN() for crosscompiling: instead of just + failing, it now creates two cache variables, one for the + RUN_RESULT, one for the RUN_OUTPUT (if required), which can be + set or preset by the user. It has now also two new arguments: + RUN_OUTPUT_VARIABLE and COMPILE_OUTPUT_VARIABLE (the old + OUTPUT_VARIABLE merges both), so if only COMPILE_OUTPUT_VARIABLE + is used the run time output of the TRY_RUN is unused and the user + doesn't have to care about the output when crosscompiling. This + is now used in FindThreads.cmake, CheckC/CXXSourceRuns.cmake and + TestBigEndian.cmake, which used the output only for the logfile + (compile output is still there). Test/TryCompile/ now also tests + the behaviour of OUTPUT_VARIABLE, RUN_OUTPUT_VARIABLE and + COMPILE_OUTPUT_VARIABLE. + + Alex + +2007-06-01 11:06 alex + + * Source/cmCacheManager.cxx: + ENH: also handle comments for variables which contain newlines + + Alex + +2007-06-01 09:18 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: fix crash, bug 5121 + +2007-05-31 22:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-31 16:18 alex + + * Source/kwsys/kwsysPlatformTests.cmake: + COMP: revert some of the changes for crosscompiling, not required + anymore with recent changes in cmake + + Alex + +2007-05-31 12:03 alex + + * Source/cmGetTargetPropertyCommand.cxx: + ENH: if get_target_property() doesn't find a target with the + given name, it returns now "-NOTFOUND" instead of + just "NOTFOUND", which can help in finding problems + + Alex + +2007-05-31 10:29 martink + + * Tests/: CMakeLists.txt, Properties/CMakeLists.txt, + Properties/properties.h.in, Properties/properties2.h, + Properties/SubDir/properties3.cxx: ENH: added new test for + SourceFile objects and properties + +2007-05-30 12:09 alex + + * Modules/FindX11.cmake: + ENH: mostly synced with FindX11.cmake from KDE svn: now also + searches for a lot of additional X11 libs, like Xv, Xau, Xrandr + and others + + Alex + +2007-05-30 10:40 alex + + * Source/kwsys/kwsysPlatformTests.cmake: + COMP: start crosscompiling Paraview3 (requires cmake cvs, + currently to scratchbox) + + Alex + +2007-05-30 05:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-29 11:36 alex + + * Modules/CMakeDetermineSystem.cmake, Modules/CMakeSystem.cmake.in, + Modules/CMakeSystemWithToolchainFile.cmake.in, + Tests/CMakeTests/ToolchainTest.cmake.in: + ENH: always provide CMAKE_SYSTEM_XXX() and MAKE_HOST_SYSTEM_XXX() + variables, so when cross compiling the build host platform can be + tested + + Alex + +2007-05-29 08:42 alex + + * Source/cmHexFileConverter.cxx: + COMP: less warnings with msvc8 + + Alex + +2007-05-29 05:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-28 17:49 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Finished previous fix. + +2007-05-28 13:46 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fixed shadowed local + warning. + +2007-05-28 13:32 king + + * Source/cmSourceFile.h: ENH: Removed unused methods that should + never be used anyway. + +2007-05-28 12:23 king + + * Source/cmake.h: STYLE: Fixed comment for Generate() method. + +2007-05-28 12:05 king + + * Source/cmTarget.cxx: ENH: Moved link library related code from + GenerateSourceFilesFromSourceLists to AnalyzeLibDependencies to + make the former do no more than what its name says. + +2007-05-28 11:41 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Added more install rules to + increase coverage of the command. + +2007-05-28 11:18 king + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, cmTarget.cxx: + ENH: Removed "Used" mark from custom commands. It is no longer + needed or checked by any generators. + +2007-05-28 11:16 king + + * Source/cmGlobalXCodeGenerator.cxx: ENH: Remove unused build rules + from Xcode. This change was made in the VS generators on + 2006-03-23 and should have been made for the Xcode generator too. + Also commented out some debug print statements. + +2007-05-28 11:03 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: COMP: Fix build + on mac after change to GetSourceFiles signature. + +2007-05-28 11:02 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fix build of XCode + generator after change to GetSourceFiles signature. + +2007-05-28 11:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-28 11:00 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: COMP: Fix build for + windows-only generators after change to GetSourceFiles signature. + +2007-05-28 10:25 king + + * Source/: cmFLTKWrapUICommand.cxx, cmLocalGenerator.cxx, + cmTarget.cxx, cmTarget.h: ENH: Made cmTarget::GetSourceFiles + method return reference to const so addition of cmSourceFile + pointers must be done with an access method in cmTarget. + +2007-05-28 10:11 king + + * Source/: cmCPluginAPI.cxx, cmFLTKWrapUICommand.cxx, + cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, cmSourceFile.h: + ENH: Made cmSourceFile::GetDepends return reference to const so + dependencies can be added only by an access method in + cmSourceFile. + +2007-05-28 10:07 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindPkgConfig.cmake, + Modules/UsePkgConfig.cmake, Modules/UseSWIG.cmake, + Modules/Platform/UnixPaths.cmake, Source/cmFileCommand.cxx, + Source/cmListCommand.h, Source/cmLocalGenerator.cxx, + Source/cmTryCompileCommand.h, Source/cmXCodeObject.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in: + ENH: merge in changes from branch RC 7 + +2007-05-28 09:59 king + + * Source/: cmFLTKWrapUICommand.cxx, cmMakefile.cxx, cmTarget.h: + ENH: Made cmTarget::GetSourceLists return a reference to const so + that all additions of sources must go through access methods in + cmTarget. + +2007-05-28 08:31 alex + + * Source/cmHexFileConverter.cxx: + COMP: fix warning on MSVC 8: conversion from 'size_t' to + 'unsigned int', possible loss of data + + Alex + +2007-05-27 18:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-27 10:32 hoffman + + * Source/cmXCodeObject.cxx: ENH: @ must be escaped in xcode + projects + +2007-05-27 04:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-26 14:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-25 16:46 alex + + * Modules/CMakeDetermineCompilerId.cmake, Source/cmFileCommand.cxx, + Source/cmFileCommand.h: + ENH: add option to FILE(STRINGS NO_HEX_CONVERSION) to disable + automatic conversion of hex and srec files to binary. Without + this automatic conversion, everywhere where a compiled file is + parsed for strings the a file(HEX2BIN somefile binfile) command + has to be added otherwise it will not work for these compilers. I + tried this with DetermineCompiler and CheckTypeSize and nobody + will do this except the users who work with such compilers. For + them it will break if they don't add this conversion command in + all these places. If FILE(STRINGS) is used with a text file, it + will in most cases still work as expected, since it will only + convert hex and srec files. If a user actually wants to get text + out of hex files, he knows what he's doing and will see the hint + in the documentation. + + Anyway, it should work without having to create a temporary file, + will work on this later. + + Alex + +2007-05-25 16:23 alex + + * Source/cmHexFileConverter.cxx: + COMP: less warnings (signed vs. unsigned) + + Alex + +2007-05-25 15:51 king + + * Source/cmGlobalGenerator.cxx: BUG: Need to create global targets + before AddHelperCommands is called. We should investigate + creating global targets at the beginning of the configure step + even if their commands are not populated or if they will not + actually be generated later. + +2007-05-25 15:22 alex + + * Modules/CMakeCCompilerId.c, + Modules/CMakeDetermineCompilerId.cmake, Modules/CMakeLists.txt, + Source/cmBootstrapCommands.cxx, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmHexFileConverter.cxx, + Source/cmHexFileConverter.h, Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/main.ihx, Tests/StringFileTest/main.srec: + ENH: make the compiler id detection work, even if the output file + name of the compiler is completely unknown and even if it + produces intel hex or motorola s-record files, with test + + Alex + +2007-05-25 12:05 alex + + * Source/cmTryRunCommand.cxx: + BUG: remove debug output + + Alex + +2007-05-25 11:41 king + + * Tests/: SimpleInstall/CMakeLists.txt, SimpleInstall/inst.cxx, + SimpleInstall/scripts/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt, SimpleInstallS2/inst.cxx, + SimpleInstallS2/scripts/CMakeLists.txt: ENH: Added testing of + REGEX option to INSTALL(DIRECTORY). Added tests to cover all + forms of old-style install commands. + +2007-05-25 11:09 king + + * Tests/: SimpleInstall/inst.cxx, SimpleInstallS2/inst.cxx: ENH: + Add test to see if INSTALL_FILES actually worked. + +2007-05-25 11:08 king + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h: BUG: + Fix FILES mode after recent changes. + +2007-05-25 11:01 king + + * Source/: cmInstallFilesCommand.cxx, cmInstallProgramsCommand.cxx: + BUG: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to install + under the prefix like they did before the recent changes. + +2007-05-25 06:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-24 17:06 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: add copy header stuff + +2007-05-24 16:03 alex + + * Modules/CMakeCCompilerId.c, Modules/CheckTypeSize.cmake, + Source/cmTryRunCommand.cxx: + STYLE: remove debug output, fix indentation the tests run again + successfully, but since CheckTypeSize will switch to a + TRY_COMPILE soon I will look at it again after this change + + Alex + +2007-05-24 14:30 alex + + * Modules/CheckTypeSize.cmake, Source/cmTryRunCommand.cxx: + COMP: try to fix the test failures on dash2 + + Alex + +2007-05-24 12:06 alex + + * Source/cmCoreTryCompile.cxx, Source/cmTryCompileCommand.h, + Source/cmTryRunCommand.cxx, Tests/TryCompile/CMakeLists.txt: + ENH: add COPY_FILE argument to TRY_COMPILE, so the compiled + executable can be used e.g. for getting strings out of it. + + Alex + +2007-05-24 11:27 alex + + * Source/cmBootstrapCommands.cxx, Source/cmCoreTryCompile.cxx, + Source/cmCoreTryCompile.h, Source/cmTryCompileCommand.cxx, + Source/cmTryCompileCommand.h, Source/cmTryRunCommand.cxx, + Source/cmTryRunCommand.h, Tests/TryCompile/CMakeLists.txt, + Tests/TryCompile/exit_success.c, + Tests/TryCompile/exit_with_error.c: + ENH: add two simple tests for TRY_RUN() STYLE: create a new base + class cmCoreTryCompile, from which cmTryCompileCommand and + cmTryRunCommand are derived, so there are no public static + functions with lots of arguments anymore + + Alex + +2007-05-24 09:35 alex + + * Modules/CMakeCCompilerId.c: + ENH: add compiler id for sdcc + + Alex + +2007-05-24 08:56 alex + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h, + cmTryRunCommand.cxx: + ENH: move output file search to cmTryCompileCommand.cxx, so it + can be used there too... many public static functions with lots + of arguments... :-/ + + Alex + +2007-05-24 08:43 alex + + * Source/: cmLocalGenerator.cxx, cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmTarget.cxx: + BUG: don't use non-imported target when cross compiling as + commands in custom commands STYLE: remove now invalid comments, + use this-> + + Alex + +2007-05-24 08:33 alex + + * Modules/: CMakeCCompilerId.c, CMakeDetermineCCompiler.cmake, + TestBigEndian.cmake: + ENH: add compiler id for IAR compiler (http://www.iar.com/) ENH: + don't run endian test again if the variable is already set + + Alex + +2007-05-24 08:18 alex + + * Source/cmListCommand.h: + STYLE: use "items" instead od "item" + + Alex + +2007-05-24 05:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-23 18:22 king + + * Source/: cmLocalGenerator.cxx: ENH: Removed unused code now that + INSTALL_FILES and INSTALL_PROGRAMS are not targets. + +2007-05-23 17:58 king + + * Tests/BuildDepends/CMakeLists.txt: BUG: Report proper error + message when project does not build the first time. Also added + hack to rebuild subproject several times for Xcode. The + generator should be fixed and the hack removed. + +2007-05-23 17:21 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Need to use + GetRealDependency for custom command file-level dependencies. + +2007-05-23 17:01 king + + * Tests/BuildDepends/Project/CMakeLists.txt: ENH: Executable bar + should rebuild when its generated header changes. It does not + need to link to the foo library anymore. + +2007-05-23 15:40 king + + * Source/: cmExportLibraryDependencies.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmInstallFilesCommand.cxx, cmInstallFilesCommand.h, + cmInstallProgramsCommand.cxx, cmInstallProgramsCommand.h, + cmLocalGenerator.cxx, cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx, cmTarget.cxx: + ENH: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to not + create targets. No targets of type cmTarget::INSTALL_FILES or + cmTarget::INSTALL_PROGRAMS are created, so we do not need to + check for them everywhere anymore. + +2007-05-23 13:30 king + + * Tests/BuildDepends/Project/generator.cxx: BUG: Target names in + the COMMAND part of a custom command should not create a + file-level dependency that forces the command to rerun when the + executable target rebuilds, but the target-level dependency + should still be created. Target names in a DEPENDS should do + both a target-level and file-level dependency. Updated the + BuildDepends test to check that this works. + +2007-05-23 13:27 king + + * Source/cmAddCustomCommandCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/BuildDepends/CMakeLists.txt, + Tests/BuildDepends/Project/CMakeLists.txt, + Tests/BuildDepends/Project/bar.cxx: BUG: Target names in the + COMMAND part of a custom command should not create a file-level + dependency that forces the command to rerun when the executable + target rebuilds, but the target-level dependency should still be + created. Target names in a DEPENDS should do both a target-level + and file-level dependency. Updated the BuildDepends test to + check that this works. + +2007-05-23 12:05 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Add ./ to custom + command executables in the top of the build tree even when the + path is generated by target name replacement. + +2007-05-23 11:00 king + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp, + CMakePlatformId.h: ENH: Unify design of CMakeCCompilerId.c, + CMakeCXXCompilerId.cpp, and CMakePlatformId.h. BUG: Do not + violate system-reserved symbol namespace _[A-Z]. + +2007-05-23 08:24 alex + + * Source/cmTarget.cxx: + COMP: don't user string::clear(), fix warnings about unused + variables + + Alex + +2007-05-22 17:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-22 12:48 alex + + * Modules/: CMakeCCompilerId.c, CMakeDetermineSystem.cmake, + CMakePlatformId.h, CMakeSystemWithToolchainFile.cmake.in: + BUG: now the toolchain file is configured into the buildtree, + otherwise e.g. CMAKE_SOURCE_DIR can't be used there ENH: modify + CMakeCCompilerId.c and .h so that sdcc can compile them. As they + were the preprocessor produced: + + 9 "test.c" + static char const info_compiler[] = "INFO:compiler[" # 40 + "test.c" "" + + "]"; + + and the mixing of the preprocessing directives and the string + constants didn't work. + + Alex + +2007-05-22 11:05 alex + + * Source/cmIncludeExternalMSProjectCommand.cxx: COMP: compile fix + + Alex + +2007-05-22 10:42 alex + + * Source/: cmAddExecutableCommand.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: + COMP: compile fix and remove warning + + Alex + +2007-05-22 10:24 alex + + * Source/: cmAddDependenciesCommand.cxx, + cmAddExecutableCommand.cxx, cmGetTargetPropertyCommand.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudioGenerator.cxx, cmGlobalXCodeGenerator.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmInstallCommand.cxx, + cmInstallTargetGenerator.cxx, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, cmMakefile.cxx, cmMakefile.h, + cmMakefileTargetGenerator.cxx, cmSetTargetPropertiesCommand.cxx, + cmTarget.cxx, cmTarget.h: + ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates + an "imported" executable target. This can then be used e.g. with + ADD_CUSTOM_COMMAND() to generate stuff. It adds a second + container for "imported" targets, and FindTarget() now takes an + additional argument bool useImportedTargets to specify whether + you also want to search in the imported targets or only in the + "normal" targets. + + Alex + +2007-05-22 09:15 alex + + * Modules/: CMakeGenericSystem.cmake, Platform/gcc.cmake: + STYLE: move the two CMAKE_SHARED_LIBRARYC/CXX_FLAGS for gcc from + CMakeGenericSystem.cmake to gcc.cmake + + Alex + +2007-05-22 04:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-21 11:26 alex + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineSystem.cmake, CMakeLists.txt, CMakeSystem.cmake.in, + CMakeSystemWithToolchainFile.cmake.in: + STYLE: use a separate source file for generating + CMakeSystem.cmake if CMAKE_TOOLCHAIN_FILE is used + + Alex + +2007-05-21 10:58 alex + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: + BUG: don't fail if a compiler is given in CMAKE_C/CXX_COMPILER + but it can't be found in the path + + Alex + +2007-05-21 10:15 alex + + * Modules/CMakeFindBinUtils.cmake, Tests/CMakeLists.txt: + BUG: always search for ar, ranlib, etc. except under MSVC -> this + should fix the mingw fortran test -also generate the fortran test + with the kdevelop generator + + Alex + +2007-05-21 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-20 10:11 king + + * Tests/CMakeLists.txt: BUG: Fix name of project to build for + LoadCommandOneConfig now that it has been renamed for new name of + LoadCommand test. + +2007-05-20 10:08 king + + * Modules/CMakeDetermineSystem.cmake: BUG: Use @ONLY substitution + to configure CMakeSystem.cmake. + +2007-05-20 02:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-19 10:15 king + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: BUG: Finish fixing test for + new name. + +2007-05-19 10:11 hoffman + + * Utilities/KWStyle/CMake.kws.xml.in: ENH: try to tone down kwstyle + +2007-05-19 10:10 hoffman + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: BUG: fix project name for + test + +2007-05-19 09:55 king + + * Source/cmFileCommand.cxx: COMP: Fix for borland now that + components list check is const. + +2007-05-18 20:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-18 15:11 martink + + * Tests/: CMakeLists.txt, ExternalOBJ/CMakeLists.txt, + LinkLine/CMakeLists.txt, MacroTest/CMakeLists.txt: ENH: some + cleanup, condensing some tests, removing arguments that were not + needed but rather were cut and paste copies etc + +2007-05-18 14:41 alex + + * Source/CPack/: bills-comments.txt, cmCPackGenericGenerator.cxx: + ENH: 2nd try to move stripping out of cpack and to install time, + now if CPACK_STRIP_FILES is true (or contains a list of files), + everything will be stripped, if it's empty or false they won't be + stripped + + Alex + +2007-05-18 13:43 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx: + ENH: add install/strip target for makefile generators if strip + was found + + Alex + +2007-05-18 11:57 alex + + * Modules/Platform/Darwin.cmake, + Source/cmInstallTargetGenerator.cxx: ENH: move hack to fix "new + cmake on old build tree on OSX doesn't have + CMAKE_INSTALL_NAME_TOOL in the cache" from + cmInstallTargetGenerator.cxx to Darwin.cmake + + Alex + +2007-05-18 11:45 alex + + * Source/CPack/cpack.cxx: + COMP: force a recompile on VS71 + + Alex + +2007-05-18 11:36 king + + * Modules/Platform/UnixPaths.cmake, Source/cmLocalGenerator.cxx: + ENH: Use CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES from platform + files to block link directories. + +2007-05-18 10:55 alex + + * Modules/: CMakeFindBinUtils.cmake, Platform/cl.cmake: COMP: if a + new cmake runs on an old build tree, set CMAKE_LINKER to link to + make it link + + Alex + +2007-05-18 10:32 alex + + * Modules/Platform/cl.cmake, Source/cmLocalGenerator.cxx: COMP: fix + link rules with nmake, the linker command has to be converted to + shortpath form for nmake + + Alex + +2007-05-18 09:33 king + + * Tests/CustomCommand/CMakeLists.txt: BUG: Replace "with space" in + custom command argument tests with "w s" to still have whitespace + but be shorter. The test was failing because the custom command + line length was simply too long for the VS IDE. + +2007-05-18 09:30 hoffman + + * Source/cmTryCompileCommand.h: STYLE: fix documentation for + command + +2007-05-18 09:18 king + + * Tests/CustomCommand/: CMakeLists.txt, check_command_line.c.in: + ENH: Added quick means to turn on verbose output for debugging + this test. + +2007-05-18 09:17 king + + * Source/kwsys/System.c: BUG: Added carrot (^) to characters that + need quoting. The solaris shell needs it. + +2007-05-18 09:16 alex + + * Modules/CMakeDetermineFortranCompiler.cmake: STYLE: fdcorrect + comments about FC/CC + + Alex + +2007-05-18 09:08 king + + * Modules/: CMakeDetermineCompilerId.cmake, + CMakeDetermineFortranCompiler.cmake: BUG: If the Fortran + CompilerId source fails to compile it should not be a failure. + It is only expected to work for Fortran90 compilers. + +2007-05-18 08:49 alex + + * Source/: cmFileCommand.cxx, cmFindBase.cxx, cmFindBase.h, + cmInstallTargetGenerator.cxx, cmTryRunCommand.cxx: + STYLE: fix line lengths + + Alex + +2007-05-17 17:43 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Need to use + GetSafeDefinition when assigning to a string. + +2007-05-17 17:40 king + + * Source/: cmIfCommand.cxx, cmMakefile.cxx, cmMakefile.h, + cmVariableWatch.h: BUG: All variable accesses should produce + watch callbacks, including IF(DEFINED ) ones. Instead we + define a new access type for IF(DEFINED) so that the error does + not show up for backward compatibility variables. + +2007-05-17 17:21 alex + + * Source/cmInstallTargetGenerator.cxx: STYLE: fix indentation ENH: + add hack to make new cmake work with older existing cmake build + trees + + Alex + +2007-05-17 16:50 alex + + * Source/cmGlobalKdevelopGenerator.cxx: + STYLE: use braces + + Alex + +2007-05-17 16:49 alex + + * Modules/CMakeFindBinUtils.cmake: ENH: fail if install_name_tool + wasn't found + + Alex + +2007-05-17 15:17 king + + * Modules/CheckTypeSize.cmake, + Utilities/cmcurl/CMake/CheckTypeSize.cmake: ENH: Use IF(NOT + DEFINED) check to short-circuit size test. + +2007-05-17 15:12 king + + * Source/: cmIfCommand.cxx, cmMakefile.cxx, cmMakefile.h: BUG: Do + not complain about missing watched variables when they are + accessd with IF(DEFINED VAR). + +2007-05-17 14:47 king + + * Source/cmMakefile.cxx: COMP: GCC 2.95 does not have + std::string::clear() method. + +2007-05-17 14:41 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmCTest.cxx, + Source/cmIfCommand.h, Source/cmListFileCache.h, + Source/cmLocalGenerator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/CPack/cmCPackTarCompressGenerator.cxx: ENH: merge in + changes from main tree + +2007-05-17 14:32 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Add testing of * and / + character arguments except on MinGW. + +2007-05-17 14:03 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Added test for custom + command lines with special single-character arguments. + +2007-05-17 14:01 king + + * Source/kwsys/System.c: BUG: Some single-character arguments need + quoting on windows. + +2007-05-17 13:28 king + + * Tests/CustomCommand/CMakeLists.txt: BUG: Disable test of angle + bracket escapes until it works everywhere. + +2007-05-17 13:20 alex + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeFindBinUtils.cmake, Modules/CMakeLists.txt, + Modules/CMakeSystem.cmake.in, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, Modules/CTest.cmake, + Modules/CheckTypeSize.cmake, Modules/Platform/Windows-cl.cmake, + Modules/Platform/cl.cmake, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmFindBase.cxx, + Source/cmFindBase.h, Source/cmIncludeCommand.cxx, + Source/cmIncludeCommand.h, Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmTryRunCommand.cxx, + Source/cmUtilitySourceCommand.cxx, + Source/cmUtilitySourceCommand.h, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, + Tests/CMakeTests/CMakeLists.txt, + Tests/CMakeTests/DummyToolchain.cmake, + Tests/CMakeTests/FindBaseTest.cmake.in, + Tests/CMakeTests/IncludeTest.cmake.in, + Tests/CMakeTests/ToolchainTest.cmake.in, + Tests/CMakeTests/include/cmake_i_do_not_exist_in_the_system.h: + ENH: merge CMake-CrossCompileBasic to HEAD -add a RESULT_VARIABLE + to INCLUDE() -add CMAKE_TOOLCHAIN_FILE for specifiying your + (potentially crosscompiling) toolchain -have TRY_RUN() complain + if you try to use it in crosscompiling mode (which were compiled + but cannot run on this system) -use CMAKE_EXECUTABLE_SUFFIX in + TRY_RUN(), probably TRY_RUN won't be able to run the executables + if they have a different suffix because they are probably + crosscompiled, but nevertheless it should be able to find them + -make several cmake variables presettable by the user: + CMAKE_C/CXX_COMPILER, CMAKE_C/CXX_OUTPUT_EXTENSION, + CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_INFO_FILE -support prefix for GNU + toolchains (arm-elf-gcc, arm-elf-ar, arm-elf-strip etc.) -move + ranlib on OSX from the file command to a command in executed in + cmake_install.cmake -add support for stripping during install in + cmake_install.cmake -split out cl.cmake from Windows-cl.cmake, + first (very incomplete) step to support MS crosscompiling tools + -remove stdio.h from the simple C program which checks if the + compiler works, since this may not exist for some embedded + platforms -create a new CMakeFindBinUtils.cmake which collects + the search fro ar, ranlib, strip, ld, link, install_name_tool and + other tools like these -add support for CMAKE_FIND_ROOT_PATH for + all FIND_XXX commands, which is a list of directories which will + be prepended to all search directories, right now as a cmake + variable, turning it into a global cmake property may need some + more work -remove cmTestTestHandler::TryExecutable(), it's unused + -split cmFileCommand::HandleInstall() into slightly smaller + functions + + Alex + +2007-05-17 11:27 king + + * Source/cmSystemTools.cxx: BUG: Fix ExpandListArgument when the + string ends in a backslash. + +2007-05-17 11:18 king + + * Source/cmTarget.cxx: BUG: An empty configuration name is + equivalent to no configuration. + +2007-05-17 11:12 alex + + * Source/: cmFileCommand.h, cmIncludeCommand.cxx, + cmInstallTargetGenerator.cxx: COMP: less warnings with msvc7 + + Alex + +2007-05-17 11:09 alex + + * Tests/CMakeTests/: FindBaseTest.cmake.in, ToolchainTest.cmake.in: + BUG: correct quoting in the tests so that the new tests pass + + Alex + +2007-05-17 10:53 king + + * Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Tests/CustomCommand/CMakeLists.txt: ENH: Added testing for custom + command line arguments containing all special characters on the + US keyboard. Fixed curly brace arguments on borland and % + arguments in mingw32-make. + +2007-05-17 10:53 king + + * Source/kwsys/: System.c, System.h.in: ENH: Added more special + unix shell characters that require quoting. Added escaping of % + as %% for shells inside mingw32-make. + +2007-05-17 10:24 alex + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCCompilerId.c, + Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXCompilerId.cpp, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineCompilerId.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeFindBinUtils.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CPack.cmake, Modules/CTest.cmake, Modules/Dart.cmake, + Modules/DartConfiguration.tcl.in, Modules/Platform/Darwin.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/Windows-cl.cmake, + Modules/Platform/cl.cmake, Source/CMakeLists.txt, + Source/cmBootstrapCommands.cxx, Source/cmCommands.cxx, + Source/cmCustomCommand.h, Source/cmFindBase.cxx, + Source/cmFindBase.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalWatcomWMakeGenerator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmIncludeCommand.cxx, + Source/cmIncludeCommand.h, Source/cmListFileCache.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.h, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmMakefileUtilityTargetGenerator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTryRunCommand.cxx, + Source/cmTryRunCommand.h, Source/cmVersion.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CTest/cmCTestTestHandler.cxx, Source/kwsys/ProcessUNIX.c, + Source/kwsys/System.c, Templates/DLLHeader.dsptemplate, + Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate, + Tests/CMakeTests/CMakeLists.txt, + Tests/CMakeTests/DummyToolchain.cmake, + Tests/CMakeTests/FindBaseTest.cmake.in, + Tests/CMakeTests/IncludeTest.cmake.in, + Tests/CMakeTests/ToolchainTest.cmake.in, + Tests/CMakeTests/include/cmake_i_do_not_exist_in_the_system.h: + ENH: merge changes from HEAD into the branch -change INCLUDE(file + [OPTIONAL] [VAR]) to INCLUDE(file [OPTIONAL] [RESULT_VARIABLE + VAR]) -add tests for INCLUDE(), CMAKE_TOOLCHAIN_FILE and + FIND_XXX() -keep the stripping in CPack for now -support a MS + toolchain suffix + + Alex + +2007-05-17 10:07 hoffman + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp, + CMakeDetermineCompilerId.cmake: ENH: fix up compiler id to be + more robust + +2007-05-17 08:38 hoffman + + * Modules/CMakeCXXCompilerId.cpp: BUG: make sure this thing + compiles on 64 bit machines + +2007-05-17 07:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-16 19:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-16 16:19 king + + * Source/kwsys/System.c: BUG: Shell escaping needs to write % as %% + for VS IDE. + +2007-05-16 13:26 king + + * Modules/Platform/Windows-wcl386.cmake: ENH: Enabled preprocessor + make rules for Watcom. + +2007-05-16 13:24 king + + * Source/: cmGlobalUnixMakefileGenerator3.h, + cmGlobalWatcomWMakeGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefileTargetGenerator.cxx: + BUG: Watcom WMake needs empty rule commands even for symbolic + targets. This fixes the cmake_force target. + +2007-05-16 13:10 king + + * Source/kwsys/ProcessUNIX.c: BUG: Do not send both SIGSTOP and + SIGKILL when killing a process. The SIGSTOP seems to be able to + block the SIGKILL occasionally. Also the SIGKILL is sufficient + since the process table entry will still exist until it is reaped + with waitpid. + +2007-05-16 11:40 king + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx: BUG: Disable test of + feature that is not documented or implemented everywhere. + +2007-05-16 10:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-16 09:07 king + + * Source/cmLocalGenerator.cxx: BUG: Do not emit /usr/lib32 or + /usr/lib64 as linker paths. Submitted by David Faure. + +2007-05-16 07:56 andy + + * Tests/BuildDepends/Project/CMakeLists.txt: BUG: check in the rest + of the changes to move from c to cxx + +2007-05-16 07:54 andy + + * Tests/BuildDepends/: CMakeLists.txt, Project/bar.c, + Project/bar.cxx: BUG: fix test for hp move to c++ to avoid ansi + issues and produce a message if the compile fails, (really + checked in by Bill H.) + +2007-05-15 16:55 alex + + * Modules/Platform/Windows-cl.cmake: BUG: let INCLUDE() actually + find cl.cmake + + Alex + +2007-05-15 16:53 alex + + * Modules/Platform/: Windows-cl.cmake, cl.cmake: + ENH: create a separate cl.cmake as preparation for supporting the + cross-compiling cl's + + Alex + +2007-05-15 16:06 alex + + * Source/cmTarget.cxx: + BUG: fix segfault when trying to get the object file for a + sourcefile in an unknown language via GET_TARGET_PROPERTY(), as + reported by Trevor Kellaway + + Alex + +2007-05-15 13:30 alex + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeFindBinUtils.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/Platform/Windows-cl.cmake, Modules/Platform/gcc.cmake, + Source/cmIncludeCommand.cxx, Source/cmIncludeCommand.h, + Source/cmInstallTargetGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h: + ENH: some adjustments as suggested by Brad: only check for the + various "binutils" on the respective platform, hardcode the strip + command, make the return variable of include() available also + without OPTIONAL, honor DESTDIR for strip and ranlib -use + FIND_PROGRAM(CMAKE_LINKER link) for the MSVC linker + + Alex + +2007-05-15 10:23 king + + * Modules/: CTest.cmake, Dart.cmake: STYLE: Added basic usage + documentation. + +2007-05-15 03:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-14 17:02 alex + + * Source/: cmFileCommand.cxx, cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h: + ENH: move ranlib handling on _APPLE_CC_ from the file command to + the InstallTargetGenerator + + Alex + +2007-05-14 16:28 alex + + * CMakeLists.txt, Modules/CMakeGenericSystem.cmake, + Modules/CPack.cmake, Modules/Platform/gcc.cmake, + Source/cmGlobalGenerator.cxx, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/CPack/cmCPackGenericGenerator.cxx: + ENH: move stripping from cpack to cmake/install time, fully + configurable via the CMAKE_STRIP_FILE rule, currently only + implemented for the GNU toolchain. Now cpack should work also + for cross compiling (since it doesn't have to know the executable + suffix anymore). + + stripping can be enabled/disabled via the cache variable + CMAKE_INSTALL_DO_STRIP. + + Even if this is disabled, the cmake_install.cmake files still + contain the strip rules, so by running cmake + -DCMAKE_INSTALL_DO_STRIP=1 cmake_install.cmake you can install + with stripping also in this case. + + Alex + +2007-05-14 13:46 alex + + * Source/: cmFileCommand.cxx, cmFileCommand.h: + STYLE: split the HandleInstallCommand() into shorter functions + (which are still quite long) + + Alex + +2007-05-14 11:23 alex + + * Source/: cmGlobalXCodeGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, cmTarget.cxx: + STYLE: fix line lengths + + Alex + +2007-05-14 11:07 alex + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeFindBinUtils.cmake, Modules/CMakeLists.txt, + Source/cmInstallTargetGenerator.cxx: + ENH: -added new CMakeFindBinUtils.cmake to have less code + duplication in CMakeDetermineC/C++?FortranCompiler.cmake, -added + CMAKE_INSTALL_NAME_TOOL variable, only run install_name_tool + handling if this was found + + Alex + +2007-05-14 09:46 alex + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: + ENH: use GetCTestConfiguration("ExecutableSuffix") instead + instead of cmSystemTools::GetExecutableExtension() -rmove the + unused TryExecutable() + + Alex + +2007-05-14 08:59 martink + + * Tests/CMakeLists.txt: ENH: revert back to SUBDIRS so that CMake + can be built with 2.2 + +2007-05-14 08:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-13 10:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-13 09:11 hoffman + + * CMakeLists.txt: ENH: revert to SUBDIRS to make sure cmake can be + built with 2.2 + +2007-05-13 07:16 king + + * CMakeLists.txt, Source/cmBootstrapCommands.cxx, + Source/cmCommands.cxx: COMP: Need CMake 2.4 or a bootstrap cmake + that has ADD_SUBDIRECTORY to build. + +2007-05-12 02:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-11 16:25 alex + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, Source/cmFindBase.cxx, + Source/cmIncludeCommand.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h: + ENH: -search CMAKE_TOOLCHAIN_FILE at first relative to the + CMAKE_BINARY_DIR -if in CMAKE_C_COMPILER only the basename of the + compiler without path was given then find the path + -CMAKE_FIND_PREFIX can now be a list of directories -via + CMAKE_PROGRAM_FIND_PREFIX_MODE, CMAKE_LIBRARY_FIND_PREFIX_MODE + and CMAKE_INCLUDE_FIND_PREFIX_MODE the default behaviour for + these 3 types can be adjusted: *at first the directories with the + prefixes, then without prefixes (default, unset) *only the + prefixes (useful for libs and headers, "ONLY") *only without the + prefixes (useful for programs, "NEVER") + + Alex + +2007-05-11 14:03 alex + + * Source/: cmListFileCache.h, cmTryRunCommand.cxx, + cmUtilitySourceCommand.cxx: + BUG: same as HEAD: use a std::string instead a const char* for + storing the filename + + ENH: use CMAKE_EXECUTABLE_SUFFIX() in try_run and utility_source, + although usually they won't be able to run the executables (but + IMO they shouldn't complain they can't find the executables) + + ENH: try_run now fails with "cant run executables if used with + this toolchain" if used with a user defined toolchain which + didn't reset the CMAKE_ALIEN_EXECUTABLES flag + + Alex + +2007-05-11 13:52 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + BUG: Fixed generation of XCODE_DEPEND_HELPER.make into proper + directory. Cleaned up duplicate code created by recent changes. + +2007-05-11 13:46 alex + + * Modules/CTest.cmake, Modules/DartConfiguration.tcl.in, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CTest/cmCTestTestHandler.cxx: + ENH: allow it to set UPDATE_TYPE via CTEST_UPDATE_TYPE from + CTestConfig.cmake -add EXECUTABLE_SUFFIX to DartConfig.tcl so it + can be used in ctest -use CPACK_EXECUTABLE_SUFFIX for cpack + (strip, which doesn't work because of the install dir) + + Alex + +2007-05-11 13:06 alex + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeSystemSpecificInformation.cmake, CPack.cmake: + ENH: also use the target platform strip and executable suffix in + cpack use the new include() parameter to handle both full-path + and module-name-only SYSTEM_INFO files + + Alex + +2007-05-11 12:17 martink + + * CMakeLists.txt, Tests/CMakeLists.txt: ENH: minor fixes + +2007-05-11 11:55 alex + + * Source/: cmIncludeCommand.cxx, cmIncludeCommand.h: + ENH: if OPTIONAL is used, give the user a way to check whether + the file was included or not (by setting a variable to the full + path or NOTFOUND) Additionally now fail if a second argument is + used and this is not "OPTIONAL" + + Alex + +2007-05-11 10:34 alex + + * Modules/: CMakeDetermineSystem.cmake, CMakeSystem.cmake.in, + CMakeSystemSpecificInformation.cmake, CheckTypeSize.cmake: + ENH: only check for the type size if it hasn't already been set, + put a bit more information in the CMakeSystemInformation.cmake + file if it has been used with a toolchain file, use the file + given in the toolchain file as CMake_SYSTEM_INFO_FILE + + Alex + +2007-05-11 10:22 martink + + * CMakeLists.txt, Tests/CMakeLists.txt, Tests/COnly/CMakeLists.txt, + Tests/CxxOnly/CMakeLists.txt, Tests/MathTest/CMakeLists.txt, + Tests/NewlineArgs/CMakeLists.txt, Tests/ObjC++/CMakeLists.txt, + Tests/PreOrder/CMakeLists.txt, Tests/SetLang/CMakeLists.txt, + Tests/Simple/CMakeLists.txt, + Tests/SystemInformation/CMakeLists.txt, + Tests/TarTest/CMakeLists.txt: ENH: some more CMakeList cleanups + +2007-05-11 09:02 martink + + * CMakeLists.txt, Source/CMakeLists.txt, Tests/CMakeLists.txt: ENH: + more cleanup of some CMakeLists files + +2007-05-11 08:36 alex + + * Source/cmListFileCache.h: + BUG: const char* FilePath could point to a non-existent + std::string for commands used in a macro, using a std::string + instead copies the contents so this works (correct error message) + + Alex + +2007-05-11 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-10 15:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-10 15:13 hoffman + + * Utilities/: CMakeLists.txt, KWStyle/CMake.kws.xml.in, + KWStyle/CMakeFiles.txt.in, KWStyle/CMakeLists.txt, + KWStyle/CMakeOverwrite.txt, KWStyle/Headers/CMakeHeader.h: ENH: + add KWStyle support + +2007-05-10 14:43 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: fix -D escaped quotes for + watcom + +2007-05-10 14:08 martink + + * CMakeCPack.cmake, CMakeLists.txt, CompileFlags.cmake: ENH: start + trying to cleanup CMakeLists files + +2007-05-10 13:03 alex + + * Source/: cmTarget.cxx, cmTarget.h: + ENH: return the default location for imported targets if the + config-dependent locations are not set + + Alex + +2007-05-10 11:41 alex + + * Source/: cmAddDependenciesCommand.cxx, + cmAddExecutableCommand.cxx, cmGetTargetPropertyCommand.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudioGenerator.cxx, cmGlobalXCodeGenerator.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmInstallCommand.cxx, + cmInstallFilesCommand.cxx, cmInstallTargetGenerator.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h, + cmMakefileTargetGenerator.cxx, cmSetTargetPropertiesCommand.cxx, + cmTarget.cxx, cmTarget.h: + ENH: first try at "importing" targets (from other build trees), + now done using a separate container for the imported targets -as + in HEAD: move TraceVSDependencies() to one central place, + GlobalGenerator::Generate() + + Alex + +2007-05-10 11:38 alex + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalVisualStudio7Generator.cxx, cmTarget.cxx: + STYLE: fix line length + + Alex + +2007-05-10 11:16 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make sure escaping is + done for strings on the command line + +2007-05-10 10:31 hoffman + + * Source/CMakeLists.txt: ENH: add test for a simple depend test, + does an exe re-link if a library that it uses changes + +2007-05-10 10:05 hoffman + + * Tests/BuildDepends/: CMakeLists.txt, Project/bar.c: ENH: add test + for build depends + +2007-05-10 10:05 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for move of trace + depends + +2007-05-09 15:10 hoffman + + * Tests/BuildDepends/: CMakeLists.txt, Project/CMakeLists.txt, + Project/bar.c: ENH: add a test to make sure Xcode does not break + again + +2007-05-09 14:41 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.h, cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: + BUG: fix problem for non-C/CXX languages with Visual Studio, the + dependencies for the custom commands added for java were not + handled correctly. Needs more work. + + Alex + +2007-05-09 11:44 alex + + * Source/: cmAddExecutableCommand.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmIncludeExternalMSProjectCommand.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefile.cxx, cmMakefile.h, + cmMakefileTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: + ENH: initial try for support for "importing" targets into cmake, + so e.g. the support for libs in release- and debug mode can be + done much better and importeed executable targets can be used in + custom commands (-> cross compiling) + + Alex + +2007-05-09 10:28 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for older xcode and + framework create + +2007-05-09 10:18 king + + * Source/cmLocalVisualStudio7Generator.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Fixed + cmLocalVisualStudio7Generator to deal with quotes in macro + definitions properly. This addresses bug#4983. + +2007-05-09 09:35 alex + + * Source/: cmTarget.cxx, cmTarget.h: + STYLE: functions use upper case for the first letter + + Alex + +2007-05-09 09:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-09 08:25 alex + + * Source/cmCustomCommand.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, Source/cmMakefile.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate, + Tests/CustomCommand/CMakeLists.txt, Tests/CustomCommand/main.cxx, + Tests/CustomCommand/GeneratorInExtraDir/CMakeLists.txt: + ENH: now target names can be used in add_custom_command() and + add_custom_target() as COMMAND, and cmake will recognize them and + replace them with the actual output path of these executables. + Also the dependency will be added automatically. Test included. + ENH: moved TraceVSDependencies() to the end of + GlobalGenerator::Configure(), so it is done now in one central + place + + Alex + +2007-05-08 16:58 alex + + * Tests/CustomCommand/: CMakeLists.txt, + GeneratorInExtraDir/CMakeLists.txt: + ENH: also test if the dependency to a target works with POSTBUILD + + Alex + +2007-05-08 16:37 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: getting closer + +2007-05-08 15:49 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: add initial xcode + framework stuff + +2007-05-08 15:29 alex + + * Source/cmLocalVisualStudio7Generator.cxx: COMP: a closing brace + was missing + + Alex + +2007-05-08 14:47 alex + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: + ENH: move TraceVSDependencies() from every generator to the end + of GlobalGenerator::Configure(), removes some code duplication + and makes it easier to add support for "importing" targets + + Alex + +2007-05-08 14:28 alex + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalGenerator.cxx, cmGlobalVisualStudio7Generator.cxx, + cmGlobalXCodeGenerator.cxx: + STYLE: standard for-loop-initialization in the MSVC generator, + one level less deep if-statement in XCode generator, one level + less deep function call in the global generator -> makes it + easier to understand IMO + + Alex + +2007-05-08 14:10 alex + + * Source/cmTarget.h: + STYLE: GetName() is const, comment updated + + Alex + +2007-05-08 12:43 hoffman + + * Tests/Framework/: bar.cxx, foo.cxx: ENH: make it work on non + windows + +2007-05-08 11:53 hoffman + + * Source/cmLocalGenerator.cxx, Tests/Framework/CMakeLists.txt, + Tests/Framework/bar.cxx, Tests/Framework/foo.cxx: ENH: fix it so + that the FRAMEWORK property does not break the building of normal + shared libs on non-mac platforms + +2007-05-08 11:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-08 10:58 hoffman + + * Source/CMakeLists.txt, Tests/Framework/CMakeLists.txt, + Tests/Framework/bar.cxx, Tests/Framework/foo.cxx, + Tests/Framework/foo.h, Tests/Framework/foo2.h: ENH: add a very + simple framework test + +2007-05-08 10:32 hoffman + + * Modules/MacOSXFrameworkInfo.plist.in, + Modules/Platform/Darwin.cmake, Source/cmLocalGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.h, Source/cmTarget.cxx: + ENH: initial support for creation of frameworks on Mac + +2007-05-08 10:05 alex + + * Source/: cmMakefile.cxx, cmTarget.cxx: + ENH: also detect targetnames-used-as-commands for + PREBUILD/PRELINK/POSTBUILD custom commands + + Alex + +2007-05-07 18:17 king + + * Modules/Platform/Linux.cmake: BUG: Detect debian with existence + of /etc/debian_version so things work in a chroot install. This + is suggested in bug#4805. + +2007-05-07 14:50 alex + + * Tests/CustomCommand/: CMakeLists.txt, + GeneratorInExtraDir/CMakeLists.txt: + ENH: also test the automatic dependency. To make it a bit harder + also use SET_TARGET_PROPERTIES(OUTPUT_NAME) for the generator + executable + + Alex + +2007-05-07 14:42 alex + + * Source/: cmLocalUnixMakefileGenerator3.cxx, cmTarget.cxx: + ENH: if a target name is used as command in add_custom_command, + automatically add the dependency to this target + + Alex + +2007-05-07 14:27 alex + + * Source/cmCustomCommand.h: + STYLE: IsUsed() is const, semicolons are not required + + Alex + +2007-05-07 11:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-07 09:48 alex + + * Tests/CustomCommand/CMakeLists.txt: + ENH: add test for the target-to-location translation for + ADD_CUSTOM_TARGET + + Alex + +2007-05-07 08:48 alex + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: + ENH: also support target-as-command with the MSVC6 generator + + Alex + +2007-05-06 09:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-05 08:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-04 17:17 alex + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: + ENH: add configName argument to CreateTargetRules so it can + create the rules correctly for the different configtypes. Has to + be used for configuring the project file templates. + + Alex + +2007-05-04 17:09 alex + + * Source/cmLocalVisualStudio7Generator.cxx: + STYLE: remove the commented code, wasn't intended to be committed + + Alex + +2007-05-04 16:43 alex + + * Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, Source/cmTarget.cxx, + Tests/CustomCommand/CMakeLists.txt, Tests/CustomCommand/main.cxx, + Tests/CustomCommand/GeneratorInExtraDir/CMakeLists.txt: + ENH: you can now use the target name of a executable target in + cmake as command in add_custom_command, it should also honor the + buildtypes. A testcase in Tests/CustomCommand/ is also coming + soon. Tested on Linux with Makefiles, OSX with XCode and MSVC 7. + MSVC 6 and 8 are not tested. Next will be to also automatically + add the dependencies to this target automatically. + + Alex + +2007-05-04 14:08 alex + + * Source/cmLocalVisualStudio7Generator.cxx: COMP: removed unused + variable temp + + Alex + +2007-05-04 09:50 alex + + * Source/cmMakefile.cxx: + COMP: fix warning on VS8: conversion unsigned int -> size_t + + Alex + +2007-05-03 20:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-03 15:25 martink + + * Source/cmTryRunCommand.cxx: ENH: look at + CMAKE_TRY_COMPILE_CONFIGURATION var for TryRun as well + +2007-05-03 13:03 king + + * Source/kwsys/ProcessUNIX.c, Utilities/cmcurl/url.c, + Utilities/cmxmlrpc/xmlrpc_curl_transport.c: COMP: Fix + code-not-reached warnings for SunCC. + +2007-05-03 08:24 king + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineCompilerId.cmake, + CMakeDetermineFortranCompiler.cmake, + CMakeFortranCompiler.cmake.in, CMakeFortranCompilerId.F90, + CMakeFortranInformation.cmake, Platform/Linux-SunPro-C.cmake, + Platform/Linux-SunPro-CXX.cmake, + Platform/Linux-SunPro-Fortran.cmake: ENH: Merging CompilerId + updates from branch CMake-Modules-CompilerId to the main tree. + Changes between CMake-Modules-CompilerId-mp1 and + CMake-Modules-CompilerId-mp2 are included. + +2007-05-03 07:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-02 14:13 alex + + * Modules/CMakeDetermineCCompiler.cmake: + BUG: fix typo, use TOOLCHAIN_PREFIX as prefix instead of location + + Alex + +2007-05-02 11:56 alex + + * Modules/: CMakeCCompiler.cmake.in, CMakeCXXCompiler.cmake.in, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake: + ENH: make it possible to set the object file extension + independent from the build platform at build time + + Alex + +2007-05-02 01:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-05-01 18:28 king + + * Modules/: CMakeDetermineFortranCompiler.cmake, + CMakeFortranCompiler.cmake.in, CMakeFortranCompilerId.F90, + CMakeFortranInformation.cmake: ENH: Using + CMAKE_DETERMINE_COMPILER_ID to determine the Fortran compiler. + This works only for Fortran90+ compilers that run the + preprocessor. Otherwise we fall back to the old behavior. + +2007-05-01 18:27 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, CMakeDetermineCompilerId.cmake: + ENH: Added flagvar argument to CMAKE_DETERMINE_COMPILER_ID to + choose the environment variable from which to get flags. Made + parsing of INFO blocks robust to having more than one in a single + string. + +2007-05-01 18:26 king + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake: + ENH: Added code to load CompilerId version of platform file if it + exists. Set CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS only if it is + not already defined. + +2007-05-01 18:24 king + + * Modules/Platform/: Linux-SunPro-C.cmake, Linux-SunPro-CXX.cmake, + Linux-SunPro-Fortran.cmake: ENH: Adding platform file for Sun + Studio Express on Linux. + +2007-05-01 18:22 king + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp, + CMakeDetermineCompilerId.cmake, CMakeLists.txt, FindMPI.cmake, + Platform/UnixPaths.cmake: ENH: Merging modules changes in range + CMake-Modules-CompilerId-mp1-post to + CMake-Modules-CompilerId-trunk-mp1 from trunk to + CMake-Modules-CompilerId branch. + +2007-05-01 17:02 alex + + * Source/cmTryRunCommand.h: + STYLE: fix typo + + Alex + +2007-05-01 17:00 alex + + * Source/cmUtilitySourceCommand.h: + STYLE: according to Brad this one is ancient and shouldn't be + used for any new stuff + + Alex + +2007-05-01 16:37 alex + + * Modules/CMakeTestCCompiler.cmake: + BUG: don't use stdio in the test for a simple executable, for + some embedded targets/toolchains/platforms this might already be + too much + + Alex + +2007-05-01 16:25 alex + + * Source/: cmFindBase.cxx, cmFindBase.h: + ENH: add support for CMAKE_FIND_PREFIX, for prepending a prefix + before all directories searched by FIND_XXX(), useful for + defining a different root directory for the base directory of the + target platform + + Alex + +2007-05-01 14:35 king + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp: ENH: + Changed GNUC compiler id name to GNU. + +2007-05-01 14:23 alex + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: + ENH: add two new variables: CMAKE_TOOLCHAIN_PREFIX: will be + prepended to gcc, ar, g++, cc, c++ and ranlib if defined (gives + e.g. arm-elf-gcc etc.) CMAKE_TOOLCHAIN_LOCATION: if defined, the + compilers will be searched only there, the other tools at first + there, after that in other locations + + If not already defined, both of them will be set by + CMakeDetermineXXXCompiler.cmake and used by the other one. If + mixing the environment variable CC/CXX and these variables this + can give weird mixtures. + + change order of compiler names for CXX: from c++, g++ to g++, c++ + (same order as for C) + + Alex + +2007-05-01 14:12 king + + * Tests/CustomCommand/: CMakeLists.txt, check_mark.cmake: ENH: + Added test to make sure custom commands are not built more than + once in a single build. This tests for a bug introduced by one + fix and fixed by another fix for bug#4377. + +2007-05-01 13:51 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h, + cmMakefileUtilityTargetGenerator.cxx: BUG: A utility target + should not run the custom commands from its source files + directly. The target-level rule must add dependencies on the + file-level custom commands to drive them. This bug was + introduced by the "fix" to bug 4377. This also restores the + documented behavior that PRE_BUILD rules are treated as PRE_LINK + rules on non-VS generators. Also fixed custom command + dependencies on the rule file build.make so that custom commands + re-run when the commands themselves change. + +2007-05-01 13:13 alex + + * Modules/CMakeDetermineSystem.cmake: + STYLE: the second check for uname wasn't intended to be committed + + Alex + +2007-05-01 13:11 alex + + * Modules/CMakeDetermineSystem.cmake: + ENH: new variable CMAKE_TOOLCHAIN_FILE which can be used to + specify a cmake file which will be loaded even before cmake tries + to detect the system, so people can set e.g. CMAKE_SYSTEM to the + value for their target platform. Only detect CMAKE_SYSTEM if it + isn't set yet. + + Alex + +2007-05-01 13:07 alex + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake: + ENH: use CMAKE_SYSTEM_AND_C[XX]_COMPILER_INFO_FILE for loading + the file info file, but don't overwrite it if it has already been + specified. This is needed for cross compiling so people can + explicitely say which file to use depending on their target + platform + + Alex + +2007-05-01 11:46 alex + + * Source/cmMakefile.cxx: + BUG: fix cmake listfile stack: if a file could not be opened, + remove it from the stack (usually CMakeCInformation.cmake and + CMakeCXXInformation.cmake which both put Linux-gcc.cmake on the + stack without removing it again: INCLUDE(... OPTIONAL) ) STYLE: + better readable output formatting of the listfile stack, now in + the same order as in gdb or with include files + + Alex + +2007-05-01 04:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-30 18:10 king + + * Modules/CMakeCXXCompilerId.cpp: STYLE: Added comment explaining + choice of file extension. + +2007-04-30 18:09 king + + * Modules/CMakeLists.txt: BUG: Need to install + CMakeCXXCompilerId.cpp so that C++ compiler identification works + in an install tree. + +2007-04-30 17:05 alex + + * Modules/CMakeDetermineCompilerId.cmake: + STYLE: comment which says which variables this macro sets + + Alex + +2007-04-30 17:03 alex + + * Modules/FindMPI.cmake: + STYLE: use the newer FIND_XXX syntax, which should find MPI in + even more directories and doesn't require to list standard + directories like /usr/lib, etc. + + Alex + +2007-04-30 16:05 alex + + * Modules/CMakeLists.txt: + BUG: also install CMakePlatformId.h, otherwise the check for the + compiler id works only when building cmake itself, but not with + an installed cmake + + Alex + +2007-04-30 10:57 alex + + * Modules/Platform/UnixPaths.cmake: + BUG: if /opt/lib and /opt/csw/lib are searched for libs, then + /opt/include and /opt/csw/include should also be searched for + headers (according to google they also exist) + + Alex + +2007-04-29 23:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-29 03:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-28 12:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-28 09:35 king + + * Modules/: CMakeCCompiler.cmake.in, CMakeCCompilerId.c, + CMakeCXXCompiler.cmake.in, CMakeCXXCompilerId.cpp, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineCompilerId.cmake, CMakePlatformId.h: ENH: Merging + CompilerId implementation from branch CMake-Modules-CompilerId to + the main tree. Changes between CMake-Modules-CompilerId-bp and + CMake-Modules-CompilerId-mp1 are included. + +2007-04-28 08:25 king + + * Source/CTest/cmCTestCoverageHandler.cxx: STYLE: Fixed line too + long. + +2007-04-27 10:44 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: ENH: Hard-coded platform for + Visual Studio generators. Added TODO comment about setting the + compiler id. + +2007-04-27 10:29 king + + * Modules/CMakeDetermineCompilerId.cmake: BUG: When passing the + compiler id source file to the compiler, the native file path + format should be used on the command line. + +2007-04-27 10:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-27 10:19 king + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp: ENH: Added + Watcom compiler identifier. + +2007-04-27 09:46 king + + * Modules/: CMakeCCompilerId.c, CMakeCXXCompilerId.cpp: BUG: Fixed + for HP compilers. + +2007-04-27 09:20 king + + * Modules/CMakeDetermineCompilerId.cmake: BUG: Need to strip all + text before and after the INFO block because the binary may + contain string data leading up to the beginning of the strings. + +2007-04-27 09:09 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: BUG: Still need to identify + compiler using command line for Xcode generator. + +2007-04-27 09:01 andy + + * Source/CTest/cmCTestCoverageHandler.h: STYLE: Add somme comments + +2007-04-27 08:57 king + + * Modules/: CMakeCCompiler.cmake.in, CMakeCCompilerId.c, + CMakeCXXCompiler.cmake.in, CMakeCXXCompilerId.cpp, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineCompilerId.cmake, CMakePlatformId.h: ENH: Initial + checkin of CompilerId feature on CMake-Modules-CompilerId branch. + This helps identify compilers and platforms by actually building + a source file and using the preprocessor definitions to recognize + known compilers. + +2007-04-26 23:20 andy + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: Initial attempt to do python + coverage. Hopefully will not break coverage on GCov + +2007-04-26 21:50 andy + + * Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Add STRING STRIP + command + +2007-04-26 09:56 king + + * Source/cmFileCommand.cxx: COMP: Avoid warning. + +2007-04-26 07:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-25 17:48 king + + * Source/cmStringCommand.h: STYLE: Fixed line-too-long. + +2007-04-25 17:22 king + + * Source/cmFileCommand.cxx, Source/cmFileCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Added FILE(STRINGS) + command. + +2007-04-25 16:22 alex + + * Modules/CMakeDetermineCXXCompiler.cmake: + STYLE: fix typo "CCC" -> "CC", add comments which variables it + sets + + Alex + +2007-04-25 05:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-24 14:03 hoffman + + * Source/cmEnableLanguageCommand.h: ENH: fix docs + +2007-04-24 12:30 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: fix seg fault in ccmake when + hitting configure twice + +2007-04-24 01:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-23 16:48 king + + * Source/cmStringCommand.cxx: COMP: Added missing include for time. + +2007-04-23 11:04 martink + + * Source/: cmStringCommand.cxx, cmStringCommand.h: ENH: Add command + to generate random strings + +2007-04-22 23:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-21 18:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-20 11:53 king + + * Source/kwsys/kwsysPlatformTestsCXX.cxx: COMP: Make sure gcc 2.96 + sstream header is not used. + +2007-04-20 09:50 king + + * Source/kwsys/kwsys_ios_sstream.h.in: COMP: Added + istringstream::clear() method to disambiguate the call from using + string::clear or istrstream::clear. + +2007-04-20 09:49 king + + * Source/cmLoadCommandCommand.cxx: BUG: Reverting previous change. + It did not account for the possibility that the loaded command + was built with a different compiler. + +2007-04-20 04:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-19 12:56 king + + * Source/kwsys/testIOS.cxx: BUG: Need to clear read failure when + string is reset. + +2007-04-19 12:53 king + + * Source/kwsys/testIOS.cxx: ENH: Added testing for istringstream + and stringstream. + +2007-04-19 12:44 king + + * Source/kwsys/kwsys_stl_string.hxx.in: BUG: Fix stream state on + successfully reading a string. + +2007-04-19 12:12 king + + * Source/kwsys/: String.hxx.in, kwsys_ios_sstream.h.in: COMP: Fixes + for Watcom. + +2007-04-19 12:11 king + + * Source/kwsys/CMakeLists.txt: COMP: Skip testAutoPtr and + testHashSTL on Watcom. They are hopeless. + +2007-04-19 12:11 king + + * Source/kwsys/EncodeExecutable.c: COMP: Need to include header for + unlink function. + +2007-04-19 11:32 king + + * Tests/Plugin/src/: example_exe.cxx, example_mod_1.c: ENH: Added + function call argument to module function to make sure calling + convention matches on lookup. Fixed for Watcom. + +2007-04-19 11:31 king + + * Source/kwsys/DynamicLoader.cxx: ENH: Added support for Watcom + compiler. Added TODO comment about calling conventions. + +2007-04-19 11:23 king + + * Source/cmLoadCommandCommand.cxx: ENH: Removed code unnecessary + now that DynamicLoader is implemented better. + +2007-04-19 11:21 king + + * Source/kwsys/: CMakeLists.txt, kwsys_stl_string.hxx.in: ENH: + Fixed stl string streaming operators for Watcom. + +2007-04-19 04:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-18 09:56 king + + * Source/cmLocalGenerator.cxx: BUG: Fix ComputeLinkInformation. + When using a loader_flag link item the full per-configuration + path should be used. The fullPathLibs returned should refer to + the import library if it was used. Since the full paths are used + for dependencies the executable used with loader_flag should be + returned also. + +2007-04-18 04:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-18 00:12 king + + * Source/CMakeLists.txt: ENH: Plugin test should now work on QNX. + +2007-04-18 00:11 king + + * Modules/Platform/QNX.cmake: ENH: Add CMAKE_EXE_EXPORTS_C_FLAG and + CMAKE_EXE_EXPORTS_CXX_FLAG to support executables that export + symbols. + +2007-04-18 00:04 king + + * Source/cmLocalGenerator.cxx: BUG: Cannot escape link items + because some need the spaces to separate arguments. Instead just + escape the argument to the loader flag. + +2007-04-17 23:40 king + + * Modules/Platform/: Linux.cmake, FreeBSD.cmake: ENH: Added + CMAKE_EXE_EXPORTS_C_FLAG and CMAKE_EXE_EXPORTS_CXX_FLAG to + support executables that export symbols. + +2007-04-17 23:39 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: ENH: Added + platform variable CMAKE_EXE_EXPORTS__FLAG to add a linker + flag when building executables that have the ENABLE_EXPORTS + property set. + +2007-04-17 23:27 king + + * Tests/Plugin/CMakeLists.txt: COMP: Need to enable ansi C + features. + +2007-04-17 23:16 king + + * Source/cmLocalGenerator.cxx: BUG: Fix ComputeLinkInformation for + non-linked targets. Why is it called for utility targets anyway? + +2007-04-17 18:18 king + + * Source/CMakeLists.txt, Tests/Plugin/include/example.h: ENH: Fixed + Plugin test on Cygwin. + +2007-04-17 16:42 king + + * Source/CMakeLists.txt: BUG: Disable Plugin test on Cygwin until + it is implemented. + +2007-04-17 16:34 king + + * Source/CMakeLists.txt: ENH: Re-enabling Plugin test now that it + should work on MacOSX. I will let it run one night to see what + platforms are still not implemented. Currently it is not run on + QNX because it is known to not be implemented there. + +2007-04-17 16:19 king + + * Modules/Platform/Darwin.cmake: ENH: Added + CMAKE_SHARED_MODULE_LOADER_C_FLAG and + CMAKE_SHARED_MODULE_LOADER_CXX_FLAG to support linking plugins to + executables. + +2007-04-17 16:11 king + + * Source/cmLocalGenerator.cxx: ENH: Added use of platform variable + CMAKE_SHARED_MODULE_LOADER__FLAG to add a special flag when + linking a plugin to an executable that loads it. + +2007-04-17 15:06 king + + * Source/CMakeLists.txt: BUG: Disable Plugin test until it works + everywhere. + +2007-04-17 14:08 king + + * Source/CMakeLists.txt: ENH: Added test for executables with + plugins that use an API exported by the executable itself. + +2007-04-17 13:52 king + + * Tests/Plugin/: CMakeLists.txt, src/example_exe.cxx, + src/example_exe.h.in: ENH: Configure location of plugin files so + that the executable can run with any current working directory. + +2007-04-17 13:43 king + + * Tests/Plugin/: CMakeLists.txt, include/example.h, + src/example_exe.cxx, src/example_mod_1.c: ENH: Added test for + executables with plugins that use an API exported by the + executable itself. + +2007-04-17 04:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-16 04:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-15 11:56 andy + + * Utilities/cmcurl/Testing/sepheaders.c: ENH: Fix old api + +2007-04-15 03:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-14 02:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-13 10:22 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: better progress + for any directory that is a project + +2007-04-13 01:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-12 15:50 andy + + * Source/cmVariableWatchCommand.cxx: STYLE: Fix line lengths + +2007-04-12 15:46 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: some code consolidation + and cleanup + +2007-04-12 14:21 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix progress for + ENCLUDE_FORM_ALL cases using new project to target map. Only + fixes it for the top level all target + +2007-04-12 10:56 king + + * Source/kwsys/ProcessWin32.c: ENH: Added KWSYSPE_DEBUG macro to + print debugging trace information. Added TODO comment explaining + why process execution can still hang when a grandchild keeps the + output pipes open. + +2007-04-11 17:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-11 15:13 andy + + * Source/cmCommands.cxx, Source/cmFindPackageCommand.cxx, + Source/cmMakefile.cxx, Source/cmVariableWatch.cxx, + Source/cmVariableWatch.h, Source/cmVariableWatchCommand.cxx, + Source/cmVariableWatchCommand.h, Source/cmake.cxx, + Tests/CMakeTests/CMakeLists.txt, + Tests/CMakeTests/VariableWatchTest.cmake.in: ENH: Add variable + watch command + +2007-04-11 10:00 king + + * Source/cmMarkAsAdvancedCommand.cxx: STYLE: Fixed line-too-long. + +2007-04-10 21:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-10 17:12 utkarsh1 + + * Utilities/cmcurl/CMakeLists.txt: ENH: Merging branch + PVEE-ERDC-Setup-4-3-2007 to main tree. Changes between + PVEE-ERDC-Setup-4-3-2007-bp and PVEE-ERDC-Setup-4-3-2007-mp1 are + included. + +2007-04-10 16:03 king + + * Source/cmCacheManager.h: BUG: When a non-cache variable is marked + as advance do not use the cmMakefile implementation of + AddCacheDefinition to avoid removing the makefile definition. + +2007-04-10 15:55 king + + * Source/cmMarkAsAdvancedCommand.cxx: BUG: When a non-cache + variable is marked as advance do not use the cmMakefile + implementation of AddCacheDefinition to avoid removing the + makefile definition. + +2007-04-10 14:54 barre + + * Modules/Dart.cmake: ENH: this variable overrides all PROJECT_URL. + Check the dashboard, all projects have the wrong URL in their + "Home" button. Other variables (like ROLLUP_URL) were moved a + while ago, for some reasons this one is still here. + +2007-04-10 13:09 king + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudioGenerator.cxx, + cmGlobalVisualStudioGenerator.h: BUG: The ALL_BUILD target should + not have any command lines so that it is not always considered + out of date. Moved the 'Build all projects' message into the + description field instead of an echo in the command field. Moved + common implementation of Generate for VS6 and VS7 into the + superclass to avoid duplicate code for the ALL_BUILD target. + This addresses bug#4556. + +2007-04-10 11:26 andy + + * Utilities/cmcurl/CMakeLists.txt: ENH: No reason to search for + UCB. Let me know if anybody still has ucb + +2007-04-10 11:22 king + + * Modules/Platform/Linux.cmake, Source/cmFileCommand.cxx, + Source/cmLocalGenerator.cxx: ENH: Added option + CMAKE_INSTALL_SO_NO_EXE on linux to choose whether the default + permissions for shared libraries include the executable bit. + This is necessary to support the conflicting policies of Debian + and Fedora. These changes address bug#4805. + +2007-04-10 09:54 martink + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmTarget.cxx: ENH: added + internal target property for the name of the project file + +2007-04-10 08:49 king + + * Source/cmGlobalUnixMakefileGenerator3.cxx: STYLE: Added comment + about why dependencies need to be chained to clarify code. + +2007-04-10 08:36 king + + * Modules/Platform/NetBSD.cmake: ENH: Enabled use of soname and + therefore versioning symlinks. Patch is from bug#4558. + +2007-04-09 21:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-08 21:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-07 21:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-06 21:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-05 21:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-05 09:19 king + + * Source/cmMakefile.cxx: STYLE: Fix line-too-long. + +2007-04-04 17:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-04 16:28 andy + + * Utilities/Doxygen/doxyfile.in: STYLE: Do doxygen for CPack + +2007-04-04 15:58 andy + + * Modules/CheckCSourceCompiles.cmake: BUG: Revert back to 1.14 + +2007-04-04 15:57 andy + + * Modules/: CheckCSourceCompiles.cmake, CheckCSourceRuns.cmake: + BUG: Revert back to 1.4 + +2007-04-04 14:49 king + + * Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudioGenerator.cxx, + Source/cmGlobalVisualStudioGenerator.h, + Tests/Dependency/Two/CMakeLists.txt, + Tests/Dependency/Two/TwoSrc.c, + Tests/Dependency/Two/TwoCustomSrc.c, + Tests/Dependency/Two/two-test.h.in: BUG: Fix utility dependencies + for static libraries in VS generators. This addresses bug#4789. + +2007-04-04 13:43 hoffman + + * Modules/FindJNI.cmake: BUG: fix for bug 4605 + +2007-04-04 13:41 andy + + * bootstrap: ENH: Fix copyright year + +2007-04-04 13:06 andy + + * Source/CTest/cmCTestBuildHandler.cxx: COMP: Fix kwstyle + +2007-04-04 13:06 andy + + * Modules/: CheckCSourceCompiles.cmake, CheckCSourceRuns.cmake: + COMP: Fix kwstyleSource/CTest/cmCTestBuildHandler.cxx + +2007-04-04 12:05 andy + + * Source/cmConfigureFileCommand.cxx: BUG: No need for the backward + compatibility variable warning + +2007-04-04 12:05 andy + + * Source/cmMakefile.cxx: ENH: Add variable for the current list + file + +2007-04-04 11:22 king + + * Source/: CMakeLists.txt, cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudioGenerator.cxx, + cmGlobalVisualStudioGenerator.h: ENH: Added + cmGlobalVisualStudioGenerator as superclass to all VS global + generators. + +2007-04-03 23:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-03 03:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-02 02:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-04-01 02:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-31 02:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-30 10:53 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx, + cmMakefileTargetGenerator.cxx: ENH: make sure default /System + framework is not added with -F + +2007-03-30 02:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-29 02:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-28 11:06 martink + + * Source/CTest/: cmCTestBuildHandler.cxx: BUG: even safer checking + of return value + +2007-03-28 10:58 martink + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: fix checking of the + return value for a build + +2007-03-28 02:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-27 23:15 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Restored shared local + variable removed by previous change. + +2007-03-27 23:13 king + + * Source/: cmGlobalXCodeGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefileTargetGenerator.cxx, + cmTarget.cxx, cmTarget.h: ENH: Created method + cmTarget::GetExportMacro to centralize computation of the export + symbol name. This removes duplicate code from all the + generators. Also enabled the export definition for executable + targets with the ENABLE_EXPORTS property set. + +2007-03-27 02:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-26 02:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-25 02:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-24 14:12 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: need + kwsys' Glob in VTK 5.0 + +2007-03-24 14:04 barre + + * Source/kwsys/: CMakeLists.txt, Glob.cxx, Glob.hxx.in: ENH: need + kwsys' Glob in VTK 5.0 + +2007-03-24 02:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-23 16:33 hoffman + + * Source/cmCTest.cxx: BUG: fix problem with new curl_getdate and + ctest + +2007-03-23 02:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-22 09:45 king + + * Source/cmLocalGenerator.cxx, Source/cmMakefile.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmTarget.cxx, Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-wcl386.cmake: ENH: Added target property + ENABLE_EXPORTS for executable targets. It enables the + executables for linking by loadable modules that import symbols + from the executable. This finishes the executable import library + support mentioned in bug #4210. + +2007-03-22 02:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-21 13:49 martink + + * Source/CMakeLists.txt: BUG: typo in if test + +2007-03-21 07:16 king + + * Tests/OutOfSource/OutOfSourceSubdir/: CMakeLists.txt, simple.cxx: + BUG: Disable deep-source test on Watcom until it can be fixed. + This is a new feature for other generators anyway. + +2007-03-21 02:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-20 15:51 hoffman + + * Utilities/cmcurl/strequal.c: ENH: second try to fix qnx build + problem + +2007-03-20 15:49 hoffman + + * Utilities/cmcurl/strequal.c: ENH: try to fix qnx build problem + +2007-03-20 14:52 martink + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: try markign non zero + return values as warnings for make programs + +2007-03-20 14:31 martink + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: try markign non zero + return values as warnings for make programs + +2007-03-20 14:11 martink + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: add another error + regexp + +2007-03-20 13:34 king + + * Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt: BUG: Reduce + long source file name length for WMake. + +2007-03-20 12:44 hoffman + + * Source/CPack/cmCPackTarCompressGenerator.cxx: BUG: fix coverity + error, null check after usage fix + +2007-03-20 12:32 hoffman + + * Modules/Platform/: AIX.cmake, QNX.cmake: ENH: add c++ flag when + compiling c++ code merge from main tree + +2007-03-20 11:52 martink + + * Source/cmCTest.cxx: ENH: minor additional error output + +2007-03-20 09:51 martink + + * Utilities/cmcurl/: CMakeLists.txt, config.h.in, + Platforms/WindowsCache.cmake: BUG: was not setting HAVE_PROCESS_H + properly + +2007-03-20 09:14 king + + * Modules/Platform/Windows-bcc32.cmake: BUG: Disable creation of + import libraries for executables on Borland until it can be made + optional. Otherwise all executables get a .lib with the same + name which is unexpected behavior for users. + +2007-03-20 08:16 king + + * Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt: BUG: Work + around VS8 conversion to a relative path for the long source + name. It takes the nice full path we give it, converts to + relative, and then repacks relative on top of the build directory + resulting in a path longer than its own maxpath even though the + original path given was short enough. Even VS6 dealt with it + better. + +2007-03-20 02:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-19 13:04 martink + + * Source/: CMakeLists.txt, ctest.cxx, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildAndTestHandler.h, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h: ENH: support for + --build-config-sample feature #1022 + +2007-03-19 10:00 king + + * Modules/Platform/CYGWIN.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/cmInstallCommand.cxx, + Source/cmInstallTargetGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Templates/EXEHeader.dsptemplate: ENH: Added + support for import libraries created by executable and module + targets. The module import libraries should never be used but + some windows compilers always create them for .dll files since + there is no distinction from shared libraries on that platform. + The executable import libraries may be used to create modules + that when loaded bind to symbols from the executables. This is + an enhancement related to bug#4210 though not requested by it + explicitly. + +2007-03-19 02:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-18 16:18 andy + + * Utilities/cmcurl/: tftp.c, transfer.c: COMP: Remove some warnings + +2007-03-18 02:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-17 13:23 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: fix for crash from + main tree + +2007-03-17 13:18 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: remove seg fault I + hope + +2007-03-17 00:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-16 18:44 king + + * Utilities/cmcurl/curl/curl.h: COMP: Do not #include files inside + extern "C" {} blocks. + +2007-03-16 18:05 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/Platform/Windows-bcc32.cmake, Modules/Platform/gcc.cmake, + Source/CMakeLists.txt, Source/cmFileCommand.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudio8Win64Generator.cxx, + Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/kwsys/SystemTools.cxx, + Tests/PrecompiledHeader/CMakeLists.txt, + Tests/PrecompiledHeader/foo1.c, Tests/PrecompiledHeader/foo2.c, + Tests/PrecompiledHeader/foo_precompile.c, + Tests/PrecompiledHeader/include/foo.h, + Tests/PrecompiledHeader/include/foo_precompiled.h, + Tests/SetLang/CMakeLists.txt, Tests/SetLang/bar.c, + Tests/SetLang/foo.c: ENH: check in fixes from main tree to create + 2.4.7 RC 5 + +2007-03-16 16:48 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Need to include + relative path top information in directory information so that + relative path conversion during dependency generation works with + the same rules as project generation. + +2007-03-16 16:28 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Use GetExecutableNames + instead of GetLibraryNames to compute the installation file name + for executable targets. + +2007-03-16 16:04 king + + * Source/CTest/cmCTestBuildHandler.cxx: COMP: Fix bad escape + sequence. + +2007-03-16 14:51 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More regular + expressions for visual studio 6 + +2007-03-16 14:28 king + + * Utilities/cmcurl/CMakeLists.txt: COMP: Ignore windows sockets on + cygwin. Remove duplicate source entry. + +2007-03-16 10:34 king + + * Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx.in: ENH: Added + computation of object file names that are almost always short + enough to not exceed the filesystem path length limitation. This + is useful when a source file from outside the tree is referenced + with a long full path. The object file name previously would + contain the entire path which when combined with the build output + directory could exceed the filesystem limit. Now CMake + recognizes this case and replaces enough of the beginning of the + full path to the source file with an md5sum of the replaced + portion to make the name fit on disk. This addresses bug#4520. + +2007-03-16 09:34 andy + + * Utilities/cmcurl/CMake/: CMakeConfigurableFile.in, + CheckCSourceCompiles.cmake, CheckCSourceRuns.cmake: COMP: Fix + support for old CMake (2.0 and 2.2) + +2007-03-15 17:22 andy + + * Utilities/cmcurl/CMake/CheckCSourceRuns.cmake: ENH: Unify with + the compile one + +2007-03-15 15:22 andy + + * Utilities/cmcurl/: CMakeLists.txt, amigaos.c, amigaos.h, + arpa_telnet.h, base64.c, base64.h, config.h.in, connect.c, + connect.h, content_encoding.c, content_encoding.h, cookie.c, + cookie.h, curl.copyright, curl_memory.h, curlx.h, dict.c, dict.h, + easy.c, easyif.h, escape.c, escape.h, file.c, file.h, formdata.c, + formdata.h, ftp.c, ftp.h, getdate.c, getdate.h, getenv.c, + getinfo.c, getinfo.h, gtls.c, gtls.h, hash.c, hash.h, hostares.c, + hostasyn.c, hostip.c, hostip.h, hostip4.c, hostip6.c, hostsyn.c, + hostthre.c, http.c, http.h, http_chunks.c, http_chunks.h, + http_digest.c, http_digest.h, http_negotiate.c, http_negotiate.h, + http_ntlm.c, http_ntlm.h, if2ip.c, if2ip.h, inet_ntoa_r.h, + inet_ntop.c, inet_ntop.h, inet_pton.c, inet_pton.h, krb4.c, + krb4.h, ldap.c, ldap.h, llist.c, llist.h, md5.c, md5.h, + memdebug.c, memdebug.h, memory.h, mprintf.c, multi.c, multiif.h, + netrc.c, netrc.h, nwlib.c, parsedate.c, parsedate.h, progress.c, + progress.h, security.c, security.h, select.c, select.h, sendf.c, + sendf.h, setup.h, setup_once.h, share.c, share.h, sockaddr.h, + socks.c, socks.h, speedcheck.c, speedcheck.h, splay.c, splay.h, + ssh.c, ssh.h, sslgen.c, sslgen.h, ssluse.c, ssluse.h, strdup.c, + strdup.h, strequal.c, strequal.h, strerror.c, strerror.h, + strtok.c, strtok.h, strtoofft.c, strtoofft.h, telnet.c, telnet.h, + tftp.c, tftp.h, timeval.c, timeval.h, transfer.c, transfer.h, + url.c, url.h, urldata.h, version.c, + CMake/CheckCSourceCompiles.cmake, CMake/CheckCSourceRuns.cmake, + CMake/OtherTests.cmake, Platforms/WindowsCache.cmake, + curl/curl.h, curl/curlver.h, curl/easy.h, curl/mprintf.h, + curl/multi.h, curl/stdcheaders.h: ENH: Update Curl to 7.16.1 + +2007-03-15 13:48 martink + + * Source/cmMakefile.cxx: BUG: change in how set cache overrides + local definitions. Should mainly be a NOP change for most cases + +2007-03-14 21:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-14 16:30 king + + * CMakeLists.txt: ENH: Enable use of kwsys MD5 implementation. + +2007-03-14 16:29 king + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Reverting previous + changes related to using an empty string for a relative path to + the current directory. Too many places want the . version. + Instead we can just convert the . to an empty string in the one + place that motiviated the original change. + +2007-03-14 15:35 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: When the current + output directory is a link directory we need to reference it with + the relative path "." instead of an empty relative path. + +2007-03-14 15:12 king + + * Source/kwsys/: CMakeLists.txt, MD5.c, MD5.h.in, testEncode.c: + ENH: Added MD5 implementation to KWSys. + +2007-03-14 13:36 king + + * Source/cmLocalGenerator.cxx: BUG: During relative path conversion + if the remote and target paths are the same return the empty + string instead of ".". + +2007-03-14 09:34 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: All executable and + library project types should specify a program database file name + for all configurations. Even when debug information is not used + the .pdb file specified is used to construct the name of a .idb + file that exists for all configurations when building with the VS + IDE. + +2007-03-13 15:18 martink + + * Source/: cmAddCustomTargetCommand.cxx, cmCPluginAPI.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmMakefile.cxx, cmMakefile.h: ENH: some more cleanup + +2007-03-13 14:23 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmMakefile.cxx, cmPropertyMap.cxx, cmTarget.cxx: ENH: add project + to target map, not used yet, but created + +2007-03-13 11:58 king + + * Source/cmLocalGenerator.cxx: BUG: Fix check of EXCLUDE_FROM_ALL + property to use boolean type. This is required for installation + of subdirectories to work. + +2007-03-13 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-12 23:36 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Remove spaces from test + output paths. Not all make tools can handle it. Ths + SubDirSpaces test is meant for that purpose anyway. + +2007-03-12 16:10 martink + + * Source/cmake.cxx: ENH: added remove_directory bug 2937 + +2007-03-12 14:15 king + + * Source/cmFileCommand.cxx: BUG: Preserve symlinks during + installation. This addresses bug#4384. + +2007-03-12 13:50 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: ENH: Added kwsys + SystemTools::CreateSymlink and SystemTools::ReadSymlink. + +2007-03-12 13:30 martink + + * Source/: cmake.cxx, MFCDialog/CMakeSetup.rc: ENH: typo + +2007-03-12 13:28 king + + * Tests/PrecompiledHeader/CMakeLists.txt: BUG: Do not use /I mode + in VS6. + +2007-03-12 12:44 king + + * Tests/PrecompiledHeader/CMakeLists.txt: BUG: Clean the pch during + make clean so that the test passes when run more than once. + +2007-03-12 12:40 martink + + * Source/cmake.cxx: ENH: small enchancement for bug 3776. + +2007-03-12 12:35 king + + * Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudio8Win64Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Tests/PrecompiledHeader/CMakeLists.txt: BUG: Split precompiled + header flags into a separate per-global-generator flag map. This + is needed because the flag mappings differ across VS IDE + versions. This fixes bug#3512 for VS8 where as the previous fix + only worked for VS7. + +2007-03-12 11:32 martink + + * Source/cmGlobalXCodeGenerator.cxx: COMP: XCode fix + +2007-03-12 10:26 martink + + * Source/: cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx, + cmAddSubDirectoryCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmInstallFilesCommand.cxx, + cmInstallProgramsCommand.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmMakefile.cxx, cmMakefile.h, + cmSubdirCommand.cxx, cmTarget.h: ENH: some code cleanup + +2007-03-12 10:23 king + + * Tests/: Complex/CMakeLists.txt, Complex/Executable/complex.cxx, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt, + SimpleInstall/CMakeLists.txt, SimpleInstallS2/CMakeLists.txt: + ENH: Testing new target properties RUNTIME_OUTPUT_DIRECTORY, + LIBRARY_OUTPUT_DIRECTORY, and ARCHIVE_OUTPUT_DIRECTORY. This is + an incremental fix for bug#2240 and bug#4210. + +2007-03-11 01:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-10 07:49 king + + * Modules/Platform/Windows-wcl386.cmake: BUG: Do not create import + library for MODULEs. This is an incremental fix for bug#4210. + +2007-03-10 07:37 king + + * Modules/Platform/Windows-cl.cmake: BUG: Fixed MSVC8 module build + rule to not use /implib option. This is an incremental fix for + bug#4210. + +2007-03-10 06:56 king + + * Source/cmLocalVisualStudio6Generator.cxx: STYLE: Fix + line-too-long. + +2007-03-10 01:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-09 17:15 king + + * Source/cmLocalGenerator.cxx: BUG: Use real path subdirectory + check instead of substring comparison to identify when paths are + below the relative path tops. Otherwise when the build tree is + next to the source tree with the same name plus a suffix the + relative path from the binary to source tree is allowed even + though it goes outside cmake-managed directories. + +2007-03-09 16:58 king + + * Source/kwsys/auto_ptr.hxx.in: COMP: Fix warning about binding + reference-to-non-const to an rvalue on VS6. It does not seem to + be doing the proper auto_ptr_ref conversions. Instead use the + const_cast work-around on this platform. + +2007-03-09 16:27 king + + * Source/kwsys/hashtable.hxx.in: COMP: Fixed unreferenced parameter + warning for VS6 with /W4. + +2007-03-09 16:26 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Re-enable backward + compatibility replacements in user-provided VS6 DSP template + files. + +2007-03-09 16:25 king + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: ENH: Implemented use of + cmTarget::GetDirectory() in Visual Studio 6 generator. This is + an incremental fix for bug#4210. + +2007-03-09 15:14 king + + * Source/: cmTarget.cxx, cmTarget.h: ENH: Added target properties + ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and + RUNTIME_OUTPUT_DIRECTORY. If set these override + EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH for a specific + target. They can be used to distribute target files in the build + tree with the same granularity that the INSTALL command provides + for the install tree. This addresses bug#2240 and bug#4210. + +2007-03-09 14:50 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: BUG: Fixed OSX + bundles to be built in the directory specified by + cmTarget::GetDirectory(). This is an incremental step for + bug#2240. + +2007-03-09 13:59 king + + * Modules/Platform/Windows-cl.cmake: BUG: Shared library creation + should use /implib option to specify the name of the import + library explicitly. This is an incremental step for bug #4210. + +2007-03-09 13:56 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: ENH: Do not compute + a path name for the import library if there is no import library. + This simplifies tracking down problems with trying to create + import libraries for MODULEs. + +2007-03-09 11:35 andy + + * CMakeLists.txt: ENH: Prepare for the new curl. Curl is build + static, so set define to on + +2007-03-09 11:35 andy + + * Utilities/cmcurl/: CMakeLists.txt, setup.h, + CMake/OtherTests.cmake, Platforms/WindowsCache.cmake: ENH: + Several windows fixes + +2007-03-09 11:29 king + + * Source/: cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h: ENH: + Added cmMakefileTargetGenerator::GenerateExtraOutput to wrap up + creation of rules to drive creation of extra outputs generated as + side effects of another rule. Reimplemented generation of custom + command multiple output rules to use it. Reimplemented soname + symlink output dependencies to use it. Now if a symlink is + deleted the library will be recreated with the symlink. + +2007-03-09 11:26 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: BUG: Need to account + for import library directory when constructing the clean rule for + the import library. This is an incremental fix for bug #4210. + +2007-03-09 10:30 king + + * Source/cmLocalGenerator.cxx: ENH: Implemented new policy to + choose the directory part of the object file name. This should + keep the names looking as nice and short as possible. This + partially addresses bug#4520. + +2007-03-09 09:30 king + + * Source/: cmInstallTargetGenerator.cxx, cmLocalGenerator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmMakefileLibraryTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: + ENH: Added implib option to cmTarget::GetDirectory to support a + separate directory containing the import library. This is an + incremental step for bug#4210. + +2007-03-08 23:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-08 15:33 king + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: ENH: + Combined cmTarget::GetDirectory and cmTarget::GetOutputDir since + they are nearly the same. This is another step for bug#2240. + +2007-03-08 15:24 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: Removed unused variables LibraryOutputPath and + ExecutableOutputPath. Each target is asked for its own output + directory. This is a step towards bug#2240. + +2007-03-08 15:10 king + + * Source/cmTarget.cxx: COMP: Fixed enumeration-not-used warning in + switch. + +2007-03-08 14:57 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: ENH: + Replaced LibraryOutputPath and ExecutableOutputPath variables in + Makefile and VS generators to instead ask each target for its + output path. This significantly reduces total code size and + centralizes previously duplicate code. It is also a step towards + bug#2240. + +2007-03-08 14:15 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Ask the target for + its own directory in case of bundle instead of directly using + ExecutableOutputPath. + +2007-03-08 14:11 andy + + * Utilities/cmcurl/: CMakeLists.txt, CMake/OtherTests.cmake: ENH: + Add some missing headers and fix OtherTests.cmake macros + +2007-03-08 13:19 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Compute + HomeRelativeOutputPath following the rules of + RelativePathTopBinary by going through the Convert() method. + This supports out-of-binary build trees without using relative + paths that go outside trees managed by CMake. + +2007-03-08 13:13 king + + * Source/CMakeLists.txt: ENH: Enable SubDirSpaces test when + building with bootstrapped cmake. + +2007-03-08 13:05 king + + * Source/: CMakeLists.txt, cmGlobalBorlandMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Fixed recursive make call + target escaping for Borland to support SubDirSpaces test. + +2007-03-08 11:49 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Updated + GetRecursiveMakeCall to use EscapeForShell instead of MAKEFILE + conversion. This code is special because it is the only place + that a make target name is passed on a command line. + +2007-03-08 11:49 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + ConvertToOutputSlashes method to convert slashes with the same + policy as ConvertToOutputPath but without escaping. + +2007-03-08 11:10 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Removed useless method + ConvertToMakeTarget and all calls to it. It had a buggy + implementation that caused it to do nothing. + +2007-03-08 10:31 king + + * Source/: cmLocalGenerator.cxx, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: BUG: Some calls to Convert() were + converting for MAKEFILE but then passing the output to the build + shell. The calls have now been converted to call Convert() with + SHELL. + +2007-03-08 10:19 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: STYLE: Removed unused + calls to Convert. + +2007-03-08 09:48 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: STYLE: Removing + unused methods ConvertToShellPath and EscapeForUnixShell. + +2007-03-08 08:50 andy + + * Utilities/cmcurl/: CMakeLists.txt, amigaos.c, amigaos.h, + arpa_telnet.h, base64.c, base64.h, config.h.in, connect.c, + connect.h, content_encoding.c, content_encoding.h, cookie.c, + cookie.h, curl.copyright, curlx.h, dict.c, dict.h, easy.c, + easyif.h, escape.c, escape.h, file.c, file.h, formdata.c, + formdata.h, ftp.c, ftp.h, getenv.c, getinfo.c, getinfo.h, gtls.c, + gtls.h, hash.c, hash.h, hostares.c, hostasyn.c, hostip.c, + hostip.h, hostip4.c, hostip6.c, hostsyn.c, hostthre.c, http.c, + http.h, http_chunks.c, http_chunks.h, http_digest.c, + http_digest.h, http_negotiate.c, http_negotiate.h, http_ntlm.c, + http_ntlm.h, if2ip.c, if2ip.h, inet_ntoa_r.h, inet_ntop.c, + inet_ntop.h, inet_pton.c, inet_pton.h, krb4.c, krb4.h, ldap.c, + ldap.h, llist.c, llist.h, md5.c, md5.h, memdebug.c, memdebug.h, + memory.h, mprintf.c, multi.c, multiif.h, netrc.c, netrc.h, + nwlib.c, parsedate.c, parsedate.h, progress.c, progress.h, + security.c, select.c, select.h, sendf.c, sendf.h, setup.h, + setup_once.h, share.c, share.h, sockaddr.h, socks.c, socks.h, + speedcheck.c, speedcheck.h, splay.c, splay.h, ssh.c, ssh.h, + sslgen.c, sslgen.h, ssluse.c, ssluse.h, strdup.c, strdup.h, + strequal.c, strequal.h, strerror.c, strerror.h, strtok.c, + strtok.h, strtoofft.c, strtoofft.h, telnet.c, telnet.h, tftp.c, + tftp.h, timeval.c, timeval.h, transfer.c, transfer.h, url.c, + url.h, urldata.h, version.c, CMake/CheckCSourceCompiles.cmake, + CMake/CheckCSourceRuns.cmake, CMake/OtherTests.cmake, + curl/curl.h, curl/curlver.h, curl/easy.h, curl/mprintf.h, + curl/multi.h, curl/stdcheaders.h: ENH: Update to 7.16.1 + +2007-03-08 08:46 king + + * Source/cmIncludeDirectoryCommand.cxx: STYLE: Fix line-too-long. + +2007-03-08 08:38 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, cmake.cxx: ENH: + SetupPathConversions is now called automatically on demand. + +2007-03-07 22:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-07 17:39 king + + * Source/cmLocalGenerator.cxx: ENH: Modified + GetObjectFileNameWithoutTarget to use relative paths for object + file names with sources above the current directory so long as + the relative path conversion works. + +2007-03-07 17:32 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: Improved + computation of RelativePathTopSource and RelativePathTopBinary to + use higher relative path tops when the source directories jump + around in a tree below the original source top. + +2007-03-07 16:35 king + + * Source/cmLocalGenerator.cxx: ENH: Set RelativePathTopSource and + RelativePathTopBinary independently for each local generator. + Relative path conversion is safe within a tree as long as it does + not go above the highest parent directory still managed by CMake. + +2007-03-07 16:32 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.h: COMP: + Fix ConvertToRelativePath change for Xcode generator. + +2007-03-07 16:00 king + + * Source/kwsys/hashtable.hxx.in: STYLE: Move warning disable pragma + into push/pop block. + +2007-03-07 15:57 king + + * Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx: BUG: Get rid of ancient + variables CMAKE_CXX_WARNING_LEVEL, CMAKE_CXX_USE_RTTI, + CMAKE_CXX_STACK_SIZE which are only partially implemented and now + taken care of by flag mapping anyway. + +2007-03-07 15:36 martink + + * Modules/UsePkgConfig.cmake: BUG: untested fix for newlines in the + output of pkg config + +2007-03-07 15:30 king + + * Source/cmLocalGenerator.cxx: COMP: Add missing include for + assert. + +2007-03-07 15:15 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: Moved + ConvertToRelativePath from cmGlobalGenerator to cmLocalGenerator. + This is in preparation for setting up each local generator to + have its own RelativePathTopSource and RelativePathTopBinary + based on its ancestor directories. + +2007-03-07 13:52 king + + * Source/kwsys/: testDynamicLoader.cxx, testSystemTools.cxx: BUG: + Use angle-brackets to include testSystemTools.h to avoid problems + with in-source builds. + +2007-03-07 13:01 martink + + * Source/CMakeLists.txt: BUG: oops bad arg for new test + +2007-03-07 11:03 martink + + * Source/CMakeLists.txt, Source/cmIncludeDirectoryCommand.cxx, + Source/cmIncludeDirectoryCommand.h, Source/cmMakefile.cxx, + Source/cmSeparateArgumentsCommand.cxx, + Tests/NewlineArgs/CMakeLists.txt: BUG: improve bad argument + handling for INCLUDE_DIRECTORIES and ADD_DEFINITIONS bug 4364 + +2007-03-07 09:26 king + + * Source/kwsys/: auto_ptr.hxx.in, testAutoPtr.cxx: ENH: Enabled + support for use_auto_ptr(get_auto_ptr()) syntax on HP compiler. + +2007-03-06 21:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-06 14:52 martink + + * Tests/NewlineArgs/: CMakeLists.txt, cxxonly.cxx, libcxx1.cxx, + libcxx1.h, libcxx2.h.in: ENH: added a tets for newlines in some + commands + +2007-03-06 10:56 martink + + * Source/kwsys/hashtable.hxx.in: COMP: shut up w4 warning + +2007-03-06 09:16 andy + + * Modules/CPack.STGZ_Header.sh.in: STYLE: Defautl answer for the + license is no + +2007-03-05 21:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-05 15:21 martink + + * Modules/UseSWIG.cmake: ENH: patch applied for bug 4517 + +2007-03-05 13:01 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: Removed legacy + SetupTests method that was causing RUN_TESTS to test twice. + +2007-03-05 10:36 martink + + * Source/: cmCommandArgumentParser.cxx, cmDependsFortranParser.cxx, + cmDependsJavaParser.cxx, cmExprParser.cxx: COMP: shut up warnings + +2007-03-05 09:51 martink + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PathDialog.cpp, + PropertyList.cpp: ENH: fix compiler warnings + +2007-03-05 09:50 martink + + * Source/cmTryCompileCommand.cxx: STYLE: long line + +2007-03-04 21:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-03 23:46 king + + * Source/kwsys/testAutoPtr.cxx: COMP: Disable function call with + function return test for HP until it is implemented. + +2007-03-03 21:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-03 15:43 king + + * Source/kwsys/: CMakeLists.txt, auto_ptr.hxx.in: COMP: All kwsys + .hxx headers should include Configure.hxx. Re-enabling + testAutoPtr. + +2007-03-03 15:32 king + + * Source/kwsys/CMakeLists.txt: COMP: Disable auto_ptr test for now. + +2007-03-03 15:05 king + + * Source/kwsys/: auto_ptr.hxx.in, testAutoPtr.cxx: ENH: Implemented + auto_ptr_ref in a way that allows conversion of the pointed-to + type. + +2007-03-03 14:51 king + + * Source/kwsys/testAutoPtr.cxx: COMP: Remove one conversion test + until it is implemented. + +2007-03-03 14:48 king + + * Source/kwsys/: CMakeLists.txt, auto_ptr.hxx.in, testAutoPtr.cxx: + ENH: Added test for auto_ptr. Documented aut_ptr template + implementation. + +2007-03-03 12:16 king + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: BUG: + cmCreateTestSourceList command is needed at boostrap time because + KWSys now uses test drivers. + +2007-03-03 10:47 king + + * Source/: kwsys/CMakeLists.txt, + kwsys/testCommandLineArguments.cxx, + kwsys/testCommandLineArguments1.cxx, kwsys/testDynamicLoader.cxx, + kwsys/testFail.c, kwsys/testHashSTL.cxx, kwsys/testIOS.cxx, + kwsys/testRegistry.cxx, kwsys/testSystemTools.cxx, + kwsys/testTerminal.c, CMakeLists.txt: ENH: Cleaned up KWSys tests + to use test drivers. + +2007-03-03 10:09 king + + * Modules/Platform/Windows-bcc32.cmake: BUG: Do not create import + library for MODULEs. The TARGET_IMPLIB name is not set correctly + for MODULE rules anyway. + +2007-03-02 21:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-02 14:31 martink + + * Source/: cmMakefileUtilityTargetGenerator.cxx, + cmMakefileUtilityTargetGenerator.h: BUG: fix for build order + +2007-03-02 11:33 andy + + * Modules/Platform/Darwin.cmake, Source/cmTryCompileCommand.cxx: + BUG: Propagate platform settings such as CMAKE_OSX_ARCHITECTURES + to the try compile + +2007-03-02 10:57 martink + + * Modules/SystemInformation.cmake: ENH: limit the output of system + information to no more than 50K per file + +2007-03-02 10:50 martink + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmWin32ProcessExecution.cxx: COMP: fix some w4 warnings + +2007-03-02 10:49 martink + + * Source/cmake.cxx: ENH: fix compiler warning + +2007-03-02 10:48 martink + + * Source/: kwsys/SystemTools.cxx, cmFileCommand.cxx: COMP: fix + warnings + +2007-03-01 23:28 king + + * Source/kwsys/auto_ptr.hxx.in: COMP: More workarounds for Borland. + +2007-03-01 21:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-03-01 16:44 king + + * Modules/FindQt4.cmake: BUG: Fix bug introduced by revision 1.67. + The qmake query mode prints information to stderr on some + platforms. The OUTPUT_VARIABLE and ERROR_VARIABLE must be the + same variable to get all the output. + +2007-03-01 16:23 martink + + * Source/cmFileCommand.cxx: COMP: fix a compiel warning + +2007-03-01 15:53 martink + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: added LIMIT on + file read + +2007-03-01 14:52 martink + + * Source/kwsys/SystemTools.cxx: COMP: fix warning + +2007-03-01 14:30 martink + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: added a + limit to the getline method + +2007-03-01 10:53 martink + + * Source/cmake.cxx: BUG: a couple bugs in system informaiton + +2007-03-01 10:33 martink + + * CMakeLists.txt: BUG: bad command line + +2007-02-28 21:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-28 17:26 hoffman + + * Source/cmLocalGenerator.cxx: ENH: remove qnx special stuff that + does not work + +2007-02-28 14:45 martink + + * Source/cmMakefile.cxx: BUG: cleanup paths in GetSourceFile to + handle bug 2724 + +2007-02-28 14:29 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator3.cxx: + ENH: one more pass at paths with spaces and parens + +2007-02-28 12:25 martink + + * CMakeLists.txt, Source/CMakeLists.txt, Source/cmake.cxx: BUG: + allow system information to accept the -G option + +2007-02-28 09:36 king + + * Source/kwsys/auto_ptr.hxx.in: BUG: Assignment should always use + reset(). + +2007-02-28 09:35 king + + * Source/kwsys/auto_ptr.hxx.in: COMP: Fix for auto_ptr_ref on + Borland 5.8. + +2007-02-28 09:33 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fix for + cmake_force target in Borland Makefiles. + +2007-02-27 16:41 martink + + * Source/cmake.cxx: BUG: fix to naming of results file + +2007-02-27 15:11 hoffman + + * Tests/SubDirSpaces/: CMakeLists.txt, + ThirdSubDir/testfromauxsubdir.c: ENH: watcom wmake can not handle + () in the path with cd command + +2007-02-27 13:34 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: add a fix for + spaces in the path again... + +2007-02-27 13:04 martink + + * CMakeLists.txt, Source/CMakeLists.txt: BUG: possible fix for new + SystemInfo test + +2007-02-27 12:47 martink + + * Source/cmake.cxx: BUG: fix for unused variable + +2007-02-27 12:10 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix for spaces in + the path and mingw + +2007-02-27 11:59 martink + + * Source/CMakeLists.txt: BUG: possible fix for new SystemInfo test + +2007-02-27 10:10 martink + + * Source/: CMakeLists.txt, cmake.cxx, cmake.h, cmakemain.cxx: ENH: + added --system-information option to CMake + +2007-02-27 09:43 martink + + * Modules/: SystemInformation.cmake, SystemInformation.in: ENH: + improvements + +2007-02-26 13:40 martink + + * Modules/: SystemInformation.cmake, SystemInformation.in: ENH: + added for system information command line option + +2007-02-26 12:08 king + + * Source/kwsys/auto_ptr.hxx.in: COMP: Added line accidentally + removed. + +2007-02-26 12:06 king + + * Source/kwsys/auto_ptr.hxx.in: BUG: Fixed implementation of + auto_ptr_ref. + +2007-02-26 11:56 hoffman + + * Source/cmLocalGenerator.cxx: ENH: go back to \ escapes for qnx + +2007-02-26 11:41 hoffman + + * Source/cmLocalGenerator.cxx: ENH: go back to EscapeForShell + version + +2007-02-26 10:46 king + + * Tests/SubDirSpaces/CMakeLists.txt: COMP: Disable rpath with + spaces on some systems. + +2007-02-25 21:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-25 19:22 alex + + * Modules/FindGettext.cmake: BUG: fix typo reported by Duncan Mac + Vicar + + Alex + +2007-02-25 16:13 hoffman + + * Source/cmLocalGenerator.cxx: ENH: try and use \ for space and () + escapes + +2007-02-23 20:37 hoffman + + * Source/cmLocalGenerator.cxx: ENH: try another thing 3 + +2007-02-23 17:38 hoffman + + * Source/cmLocalGenerator.cxx: ENH: try another thing + +2007-02-23 17:07 hoffman + + * Source/cmLocalGenerator.cxx: ENH: add some debug stuff + +2007-02-23 16:44 hoffman + + * Source/cmLocalGenerator.cxx: ENH: add some debug stuff + +2007-02-23 14:37 andy + + * Source/CMakeLists.txt: COMP: Disable test until generators are + fixed + +2007-02-23 11:30 andy + + * Source/CMakeLists.txt: ENH: Try to fix spaces in the path problem + +2007-02-23 11:17 andy + + * Tests/SimpleExclude/run.cmake.in: ENH: Try to fix spaces in the + path problem + +2007-02-23 10:31 andy + + * Tests/SimpleExclude/: dirC/dirA/CMakeLists.txt, + dirC/dirB/CMakeLists.txt, dirD/CMakeLists.txt: ENH: Force + libraries to be static + +2007-02-23 09:54 martink + + * Source/cmGetTestPropertyCommand.h: ENH: added some documentation + on how to find the default properties of a test + +2007-02-23 09:46 andy + + * Source/: CMakeLists.txt, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmMakefile.cxx, cmTarget.cxx, cmTarget.h: + ENH: Make EXCLUDE_FROM_ALL a target and directory properties. + Also, make IsInAll use EXCLUDE_FROM_ALL. Also, enable the test + that tests this + +2007-02-23 09:45 andy + + * Source/cmIncludeDirectoryCommand.cxx: BUG: Produce error when + include directories is invoked with an empty list + +2007-02-22 17:34 hoffman + + * Source/cmLocalGenerator.cxx: ENH: hack put the hack back for qnx + to try and fix spaces in the path + +2007-02-22 17:26 hoffman + + * Source/cmLocalGenerator.cxx: ENH: undo hack and try to get + dashboard back + +2007-02-22 17:15 hoffman + + * Tests/SubDirSpaces/CMakeLists.txt: ENH: add a comment + +2007-02-22 16:23 king + + * Source/cmLocalGenerator.cxx: BUG: Hack to try working around a + problem with spaces in an rpath on QNX. + +2007-02-22 15:43 hoffman + + * Tests/SubDirSpaces/CMakeLists.txt: ENH: show make results on the + dashboard + +2007-02-22 15:33 hoffman + + * Source/cmLocalGenerator.cxx: ENH: add new escape stuff + +2007-02-22 15:27 king + + * Source/kwsys/SystemTools.cxx: BUG: Fix bug#4482. + +2007-02-22 15:16 andy + + * Tests/SimpleExclude/run.cmake.in: COMP: Use exec_program instead + of execute_process + +2007-02-22 11:42 andy + + * Tests/SimpleExclude/: CMakeLists.txt, run.cmake.in: ENH: Improve + test + +2007-02-22 10:31 hoffman + + * Source/CMakeLists.txt: ENH: actually keep the output + +2007-02-22 10:05 hoffman + + * Source/CMakeLists.txt: ENH: make sure EXECUTE_PROCESS is there + because in bootstrap it is not + +2007-02-22 09:48 hoffman + + * Source/kwsys/SystemTools.cxx: COMP: remove warning + +2007-02-22 09:44 martink + + * Source/CPack/cmCPackOSXX11Generator.cxx: STYLE: fix someones line + length + +2007-02-22 09:10 andy + + * Source/cmake.cxx: BUG: Produce an error when the script is not + found + +2007-02-22 08:39 andy + + * Tests/SimpleExclude/: CMakeLists.txt, dirC/CMakeLists.txt, + dirC/dirA/CMakeLists.txt, dirC/dirA/t1.c, dirC/dirA/t2.c, + dirC/dirA/t3.c, dirC/dirA/t4.c, dirC/dirA/t5.c, + dirC/dirB/CMakeLists.txt, dirC/dirB/t6.c, dirC/dirB/t7.c, + dirD/CMakeLists.txt, dirD/t8.c, dirD/t9.c: ENH: Add simple + exclusion test for subdirectories + +2007-02-21 21:24 hoffman + + * Source/CMakeLists.txt, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/kwsys/SystemTools.cxx, Tests/SubDirSpaces/CMakeLists.txt, + Tests/SubDirSpaces/Some(x86) Sources/CMakeLists.txt, + Tests/SubDirSpaces/Some(x86) Sources/test.c, + Tests/SubDirSpaces/ThirdSubDir/testfromauxsubdir.c: ENH: fix + parens in the path with spaces in the path + +2007-02-21 14:58 martink + + * Source/CMakeLists.txt: ENH: turn on spaces test for more + platforms + +2007-02-21 14:07 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: get rid of some extra erase + calls + +2007-02-21 14:07 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: STYLE: fix line length + +2007-02-21 14:01 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx: BUG: fix + for quotes in strings for flags #4022 + +2007-02-21 13:33 king + + * Source/kwsys/CMakeLists.txt: COMP: Disable LFS on AIX. + +2007-02-21 12:19 martink + + * Source/cmGlobalWatcomWMakeGenerator.cxx: ENH: remove unused + variable + +2007-02-21 11:58 martink + + * Source/CMakeLists.txt: ENH: turn on spaces test for more + platforms + +2007-02-21 11:45 hoffman + + * Modules/Platform/AIX.cmake: ENH: force c++ when building c++ + objects + +2007-02-21 10:29 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: better processor + detection on linux + +2007-02-21 10:03 hoffman + + * Modules/CMakeDetermineFortranCompiler.cmake: ENH: remove df + because df is a unix utilitiy + +2007-02-20 16:43 hoffman + + * Modules/: CMakeDetermineFortranCompiler.cmake, + Platform/Windows-df.cmake: BUG: fix for bug 3950 add support for + df compiler on windows + +2007-02-20 16:35 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug # 3954 glib with qt + +2007-02-20 16:05 alex + + * Modules/FindKDE4.cmake: STYLE: fix docs for FindKDE4.cmake + + Alex + +2007-02-20 16:02 alex + + * Modules/: FindKDE3.cmake, KDE3Macros.cmake: BUG: remove + KDE3_ENABLE_FINAL (#4140): it doesn't work currently and I don't + have the time to fix this since it would require bigger changes. + Maybe I'll do this if the KDE3 support of CMake becomes more + widely used. + + Alex + +2007-02-20 16:00 alex + + * Modules/FindLibXml2.cmake: STYLE: don't put the copyright notice + twice in the file + + Alex + +2007-02-20 15:15 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug 4187 fix typo in docs + +2007-02-20 15:14 hoffman + + * Modules/CMakeUnixFindMake.cmake: BUG: fix for 4188 look for smake + as well as gmake and make + +2007-02-20 15:09 hoffman + + * Source/cmFileCommand.h: ENH: fix spelling error bug # 4233 + +2007-02-20 15:03 martink + + * Source/CMakeLists.txt: ENH: only add the test for some platforms + +2007-02-20 13:52 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix source extensions + fror txt on xcode + +2007-02-20 12:28 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: fix for Watcom + +2007-02-20 11:33 hoffman + + * Modules/Platform/QNX.cmake: ENH: try to force c++ on qnx + +2007-02-20 11:14 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for force language + stuff + +2007-02-20 10:57 hoffman + + * Tests/SetLang/CMakeLists.txt: ENH: verbose + +2007-02-20 10:52 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: fix crash + +2007-02-20 09:54 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: BUG: fix for bug + 4420 add language dll's to mfc install + +2007-02-20 09:35 hoffman + + * Source/CMakeLists.txt, Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Tests/SetLang/CMakeLists.txt, Tests/SetLang/bar.c, + Tests/SetLang/foo.c: BUG: fix for bug 4423 set language fixes + +2007-02-19 16:34 hoffman + + * Source/CMakeLists.txt: ENH: remove ConvLib test for now + +2007-02-19 15:12 hoffman + + * Source/CMakeLists.txt: ENH: use correct name + +2007-02-19 15:07 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: use project not target + name + +2007-02-19 14:48 martink + + * Source/CMakeLists.txt, Tests/SubDirSpaces/CMakeLists.txt: ENH: + make the test really test targets with spaces + +2007-02-19 14:32 martink + + * Source/: cmTarget.cxx, cmTarget.h: BUG: fix accidental checkin + +2007-02-19 14:26 martink + + * Tests/SubDirSpaces/Executable Sources/: CMakeLists.txt, test.cxx: + ENH: added used sources with a path that has spaces + +2007-02-19 14:25 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmMakefileTargetGenerator.cxx: ENH: fixed more bugs with spaces + in the path + +2007-02-19 13:53 king + + * Modules/Platform/gcc.cmake: BUG: Applied patch from bug#4462. + +2007-02-19 13:44 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug 4464 handle qmake errors + better + +2007-02-19 13:26 hoffman + + * Source/CMakeLists.txt, Tests/ConvLibrary/CMakeLists.txt: ENH: add + test for conv libraries + +2007-02-19 13:20 martink + + * Source/: CMakeLists.txt, cmTarget.cxx, cmTarget.h: ENH: turn on + spaces in path test + +2007-02-19 12:25 martink + + * Source/: cmMakefileTargetGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx: BUG: fix for spaces in path + for nmake + +2007-02-19 12:21 martink + + * Tests/SubDirSpaces/: CMakeLists.txt, + vcl_algorithm+vcl_pair+double.foo.c, + vcl_algorithm_vcl_pair_double.foo.c, Another + Subdir/pair+int.int.c, Another Subdir/pair_int.int.c, Another + Subdir/secondone.c, Another Subdir/testfromsubdir.c, + Executable/CMakeLists.txt, Executable/test.cxx, Some + Examples/CMakeLists.txt, Some Examples/example1/CMakeLists.txt, + Some Examples/example1/example1.cxx, Some + Examples/example2/CMakeLists.txt, Some + Examples/example2/example2.cxx, ThirdSubDir/pair+int.int1.c, + ThirdSubDir/pair_int.int1.c, ThirdSubDir/pair_p_int.int1.c, + ThirdSubDir/testfromauxsubdir.c, ThirdSubDir/thirdone.c: ENH: new + test for spaces in the tree structure + +2007-02-19 11:30 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: fix for shrinking + cmake oh no + +2007-02-18 21:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-18 09:31 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: STYLE: fix warning + +2007-02-17 22:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-17 11:43 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for external object + test + +2007-02-17 08:46 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalVisualStudio7Generator.cxx, + cmLocalXCodeGenerator.cxx, cmTarget.cxx, + CPack/cmCPackOSXX11Generator.cxx: STYLE: fix line length issues + +2007-02-17 08:38 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx: ENH: + remove warnings and debug statement + +2007-02-16 16:45 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Tests/ConvLibrary/bartest.cxx: ENH: fix for vs ide + +2007-02-16 16:12 hoffman + + * Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, + Source/cmLocalXCodeGenerator.cxx, Source/cmLocalXCodeGenerator.h, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/ConvLibrary/CMakeLists.txt, + Tests/ConvLibrary/bar.c, Tests/ConvLibrary/bartest.cxx, + Tests/ConvLibrary/foo.cxx, Tests/ConvLibrary/sub1/car.cxx: ENH: + check in initial conv library stuff + +2007-02-16 15:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-15 15:07 andy + + * Source/cmake.cxx: BUG: Overwrite the symlink if it already + exists. Close Bug #4418 - cmake -create-symlink doesn't overwrite + existing symlinks + +2007-02-15 13:36 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserHelper.h, Source/cmMakefile.cxx: + ENH: move @@ fix from main tree + +2007-02-15 12:45 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/FindQt4.cmake, + Modules/InstallRequiredSystemLibraries.cmake, + Source/cmAddDependenciesCommand.cxx, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmLocalVisualStudio7Generator.cxx, + Source/cmSetTargetPropertiesCommand.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.cxx.bak: + ENH: merge in changes from main tree, including fix for exception + stuff in vs 7 + +2007-02-15 12:23 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Do not hack the + exception handling default for linker flags or for + per-source-file flags. + +2007-02-14 22:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-13 22:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-13 14:12 andy + + * Source/CPack/cmCPackOSXX11Generator.cxx, + Source/CPack/cmCPackOSXX11Generator.h, Modules/CPack.DS_Store.in, + Modules/CPack.VolumeIcon.icns.in, + Modules/CPack.background.png.in, Modules/CPack.cmake: ENH: More + work on the packaging. Add Applicaitons, add icons, etc + +2007-02-12 23:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-12 12:06 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + release_cmake.cmake: ENH: add cygwin cpack stuff to release + scripts + +2007-02-12 09:15 hoffman + + * Utilities/Release/vogon_cygwin.cmake: ENH: add cygwin on vogon + +2007-02-11 22:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-10 22:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-10 09:52 alex + + * Modules/FindPNG.cmake: STYLE: remove empty line, so the + documentation for the module is complete again + + Alex + +2007-02-09 22:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-09 13:44 hoffman + + * Source/: cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h, cmMakefile.cxx: ENH: add atonly + support to cmCommandArgumentParserHelper.cxx and remove old + non-yacc parser code from cmMakefile.cxx + +2007-02-08 22:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-08 16:18 king + + * Source/CMakeLists.txt, Tests/PrecompiledHeader/CMakeLists.txt, + Tests/PrecompiledHeader/foo1.c, Tests/PrecompiledHeader/foo2.c, + Tests/PrecompiledHeader/foo_precompile.c, + Tests/PrecompiledHeader/include/foo.h, + Tests/PrecompiledHeader/include/foo_precompiled.h: ENH: Added + PrecompiledHeader test for MSVC compilers. + +2007-02-07 22:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-07 14:50 alex + + * Modules/: UseEcos.cmake, ecos_clean.cmake: ENH: now also the + "ecosclean" target works with MS nmake + + Alex + +2007-02-07 11:50 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug 4399 + +2007-02-07 11:49 hoffman + + * Source/: cmAddDependenciesCommand.cxx, + cmSetTargetPropertiesCommand.cxx: BUG: fix for bug 4414, find + targets in the global generator for set_target_properties and + add_dependencies + +2007-02-07 10:26 hoffman + + * Modules/InstallRequiredSystemLibraries.cmake: BUG: fix for 4420 + Unicode and MBC versions of the MFC + +2007-02-07 09:23 king + + * Source/cmDependsC.cxx: STYLE: Fixed line-too-long. + +2007-02-06 21:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-06 16:03 hoffman + + * Source/cmSetSourceFilesPropertiesCommand.h: ENH: fix + documentation to include source language property + +2007-02-06 15:05 king + + * Source/cmDocumentation.cxx: BUG: Patch from Alex to fix + single-command help broken by previous patch. + +2007-02-06 10:01 hoffman + + * CMakeLists.txt, Source/CPack/cmCPackGenerators.cxx: ENH: fix + release tree to build on mac + +2007-02-05 21:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-05 14:05 hoffman + + * Source/cmLocalUnixMakefileGenerator3.h: ENH: merge changes from + main trunk + +2007-02-05 13:21 hoffman + + * CMakeLists.txt, ChangeLog.manual, cmake_uninstall.cmake.in, + Modules/CPack.cmake, Modules/FindKDE4.cmake, + Modules/FindXMLRPC.cmake, Source/CMakeLists.txt, + Source/cmGlobalKdevelopGenerator.cxx, + Source/cmInstallTargetGenerator.cxx, + Source/cmLocalKdevelopGenerator.cxx, + Source/cmLocalKdevelopGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, Source/cmTarget.h, + Source/CPack/cmCPackGenerators.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackNSISGenerator.h, + Source/CPack/cmCPackPackageMakerGenerator.h, + Source/CPack/cmCPackSTGZGenerator.h, + Source/CPack/cmCPackTGZGenerator.h, + Source/CPack/cmCPackTarBZip2Generator.cxx, + Source/CPack/cmCPackTarBZip2Generator.h, + Source/CPack/cmCPackTarCompressGenerator.h, + Source/CPack/cmCPackZIPGenerator.h, Source/kwsys/System.h.in, + Source/kwsys/SystemTools.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Utilities/Release/Cygwin/CMakeLists.txt, + Utilities/Release/Cygwin/README.cygwin.in, + Utilities/Release/Cygwin/cygwin-package.sh.in, + Utilities/Release/Cygwin/cygwin-patch.diff.in, + Utilities/Release/Cygwin/cygwin-setup.hint.in, + Source/CPack/cmCPackCygwinBinaryGenerator.cxx, + Source/CPack/cmCPackCygwinBinaryGenerator.h, + Source/CPack/cmCPackCygwinSourceGenerator.cxx, + Source/CPack/cmCPackCygwinSourceGenerator.h: ENH: merge in + changes from branch + +2007-02-05 11:13 martink + + * Source/: CMakeLists.txt, MFCDialog/CMakeSetupDialog.cpp: ENH: add + more time to bootstrap test + +2007-02-05 09:48 king + + * Source/: cmDependsC.cxx, cmDependsC.h: BUG: Patch from Alex to + recompute dependencies when the include regex changes. This + addresses bug#4168. + +2007-02-04 21:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-03 21:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-02 21:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-02 16:52 hoffman + + * Source/CPack/: cmCPackCygwinSourceGenerator.cxx, + cmCPackTarBZip2Generator.cxx: STYLE: fix warnings + +2007-02-02 16:51 hoffman + + * Modules/FindQt4.cmake: ENH: fix depend bug in qt + +2007-02-02 14:40 hoffman + + * CMakeLists.txt, Modules/CPack.cmake, Source/CMakeLists.txt, + Source/CPack/bills-comments.txt, + Source/CPack/cmCPackCygwinBinaryGenerator.cxx, + Source/CPack/cmCPackCygwinBinaryGenerator.h, + Source/CPack/cmCPackCygwinSourceGenerator.cxx, + Source/CPack/cmCPackCygwinSourceGenerator.h, + Source/CPack/cmCPackGenerators.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackNSISGenerator.h, + Source/CPack/cmCPackOSXX11Generator.h, + Source/CPack/cmCPackPackageMakerGenerator.h, + Source/CPack/cmCPackSTGZGenerator.h, + Source/CPack/cmCPackTGZGenerator.h, + Source/CPack/cmCPackTarBZip2Generator.cxx, + Source/CPack/cmCPackTarBZip2Generator.h, + Source/CPack/cmCPackTarCompressGenerator.h, + Source/CPack/cmCPackZIPGenerator.h, Source/CPack/cygwin.readme, + Utilities/Release/create-cmake-release.cmake, + Utilities/Release/release_cmake.cmake, + Utilities/Release/Cygwin/CMakeLists.txt, + Utilities/Release/Cygwin/README.cygwin.in, + Utilities/Release/Cygwin/cygwin-package.sh.in: ENH: add support + for cygwin source and binary packaging + +2007-02-02 14:13 king + + * Source/cmDocumentation.h: COMP: Fix void return failure. + +2007-02-02 12:46 alex + + * Modules/FindGettext.cmake: BUG: add gettext module for working + with GNU gettext (#4081) + + Alex + +2007-02-02 10:14 martink + + * Source/CMakeLists.txt: ENH: allow the dashboard to override the + timeouts for CTestTest + +2007-02-02 09:11 king + + * Source/cmDocumentation.h: STYLE: Fixed line length and this-> + convention violations from yesterday's patch. + +2007-02-02 09:11 king + + * Source/CTest/cmCTestBuildCommand.cxx: STYLE: Fixed line-too-long. + +2007-02-01 20:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-02-01 17:06 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: STYLE: fix line length + +2007-02-01 16:56 king + + * Source/cmMakefileTargetGenerator.cxx: BUG: Use the exe/lib output + path for .pdb file location. This addresses bug#3277 and + bug#4287. + +2007-02-01 16:54 king + + * Source/: cmLocalVisualStudio7Generator.cxx, cmTarget.cxx, + cmTarget.h: ENH: Added cmTarget::GetPDBName method to simplify + computation of .pdb file name for a target. + +2007-02-01 16:52 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx: BUG: Do not clean the .pdb + file for a target just before it is linked! This finishes + addressing bug#4341. + +2007-02-01 16:07 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: BUG: Clean rule + for exe pdb file should use full path. + +2007-02-01 15:44 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Do not use bitwise + OR on bool. + +2007-02-01 15:22 king + + * Source/cmLocalVisualStudio7Generator.h: STYLE: Removed unused + method declarations. + +2007-02-01 15:02 king + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: Added a special + flags integer field to the flag map entries. Added flags for + user values and other special cases. Added precompiled header + flag translation entries. This addresses bug#3512. + +2007-02-01 14:45 king + + * Source/kwsys/SystemTools.cxx: STYLE: Removed one more stray + comment. + +2007-02-01 14:43 martink + + * Source/kwsys/SystemTools.cxx: STYLE: removed code accidently + checked in + +2007-02-01 14:11 martink + + * Source/kwsys/SystemTools.cxx: BUG: fix for bug number 3320 + +2007-02-01 13:04 king + + * Source/cmLocalVisualStudio7Generator.cxx: COMP: Removed unused + variable. + +2007-02-01 12:02 king + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: Added smoke + test for user-value flag mapping for VS IDE. + +2007-02-01 12:00 king + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: Added mapping of + /NODEFAULTLIB flag when no values are provided. + +2007-02-01 11:49 king + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: ENH: Reimplemented parsing and + mapping of flags into vcproj file attribute options. This cleans + up and centralizes a few things. It is in preparation for + dealing with precompiled header flags for bug #3512 since they + require some special handling. + +2007-02-01 11:45 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + EscapeWindowsShellArgument and ParseWindowsCommandLine methods to + cmSystemTools. + +2007-02-01 11:33 martink + + * Source/cmMakefileTargetGenerator.cxx: BUG: fix for bug number + 3964 + +2007-02-01 10:38 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Patch from + Alex to improve implementation and prepare for splitting the man + page into more sections. + +2007-02-01 09:57 king + + * Source/: cmInstallTargetGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, cmTarget.cxx, cmTarget.h: + BUG: The .pdb file generated for a library or executable should + match the real file name used for the target. This addresses + bug#3277. + +2007-01-31 20:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-31 16:50 hoffman + + * Source/CPack/: cmCPackCygwinSourceGenerator.cxx, + cmCPackCygwinSourceGenerator.h: ENH: commit cygwin source + generator files, not used yet + +2007-01-31 16:49 hoffman + + * Source/cmLocalGenerator.cxx: ENH: do not use crazy long paths to + object files for try compile + +2007-01-31 16:48 hoffman + + * Utilities/Release/Cygwin/: CMakeLists.txt, README.cygwin.in, + cygwin-package.sh.in, cygwin-patch.diff.in, cygwin-setup.hint.in: + ENH: add support files for cpack cygwin setup package stuff + +2007-01-31 15:06 alex + + * Modules/FindQt4.cmake: BUG: finally fix #4331, the previous + version just caught the tag, the filename not at all + + Alex + +2007-01-31 14:00 hoffman + + * Tests/TryCompile/CMakeLists.txt: ENH: add more output when test + fails + +2007-01-31 13:54 andy + + * Source/CMakeLists.txt: COMP: Remove osx bundle from + OSXScriptLauncher + +2007-01-31 13:53 andy + + * Source/CPack/OSXScriptLauncher.cxx: COMP: Use new API + +2007-01-31 13:37 andy + + * Source/CMakeLists.txt: COMP: Add missing file in the installation + +2007-01-31 13:34 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: make sure external vs + projects use the GUID in the project if it has one. + +2007-01-30 20:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-30 15:43 alex + + * Modules/FindKDE4.cmake: STYLE: KDEDIR is deprecated and not used, + so also document that KDEDIRS is used instead + + Alex + +2007-01-30 11:48 andy + + * Source/CTest/cmCTestBuildCommand.cxx: ENH: Allow to specify build + target + +2007-01-30 11:48 andy + + * Source/CMakeLists.txt: COMP: Fix bootstrap + +2007-01-30 11:35 martink + + * Source/: CMakeLists.txt, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, ctest.cxx, + CTest/cmCTestBuildAndTestHandler.cxx: BUG: fixes so that + --build-and-test will honor timeouts + +2007-01-30 11:32 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: allow copy if different from a + file to a directory to work + +2007-01-29 20:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-29 12:42 martink + + * Source/cmCTest.cxx: BUG: fix in the timeout code + +2007-01-28 20:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-27 20:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-27 15:29 malaterre + + * Source/kwsys/System.h.in: STYLE: Fix typo + +2007-01-26 20:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-26 15:06 martink + + * Source/cmIfCommand.h: STYLE: improve IF documentation to cover + elseif + +2007-01-26 14:26 king + + * Source/kwsys/CMakeLists.txt: BUG: Added use of + KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT for header file install + rules. + +2007-01-26 09:31 martink + + * Source/CTest/cmCTestTestHandler.cxx: COMP: fix warning + +2007-01-25 17:05 hoffman + + * Source/cmSubdirCommand.h: BUG: remove early ; + +2007-01-25 15:44 hoffman + + * Source/: CMakeLists.txt, cmGlobalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.cxx, cmLocalKdevelopGenerator.h, + cmLocalUnixMakefileGenerator3.h: BUG: fix for 4186, kdevelop + adding file twice + +2007-01-25 11:16 martink + + * Source/: cmCTest.cxx, cmCTest.h, cmTest.cxx, ctest.cxx, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildAndTestHandler.h, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h: ENH: added per test timeout support + +2007-01-24 13:45 king + + * Source/: cmExecProgramCommand.h, cmInstallFilesCommand.h, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.h, + cmLinkLibrariesCommand.h, cmMakeDirectoryCommand.h, + cmRemoveCommand.h, cmSubdirCommand.h, cmSubdirDependsCommand.h, + cmVariableRequiresCommand.h, cmWriteFileCommand.h: ENH: Patch + from Alex to make deprecated command documentation more + consistent. + +2007-01-24 13:40 king + + * Source/: cmUseMangledMesaCommand.h, cmVariableRequiresCommand.h: + ENH: Patch from Alex to document this command as discouraged. + +2007-01-24 07:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-23 14:28 hoffman + + * Source/cmLocalGenerator.cxx: ENH: this does not need to be safe + as the value is checked + +2007-01-23 14:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-23 13:41 alex + + * Modules/UseEcos.cmake: BUG: reent.c wasn't intended to be + committed, too special + + Alex + +2007-01-23 13:29 alex + + * Modules/UseEcos.cmake: STYLE: use even more absolute paths, can't + hurt for out-of-source builds STYLE: use + SET_SOURCE_FILES_PROPERTIES() on multiple files at once instead + of interating over each one of them STYLE: no need to add + target.ld to the clean-files, this is done now automatically by + add_custom_command() ENH: now also MS nmake can be used to build + ecos apps + + Alex + +2007-01-23 13:08 hoffman + + * Source/cmLocalGenerator.cxx: ENH: avoid crash, but do not make it + an error if include flags is missing from a language + +2007-01-23 11:39 hoffman + + * Source/cmLocalGenerator.cxx: ENH: make the include flag required + for a language avoids seg fault + +2007-01-23 11:25 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: undo bug fix + because of failed test + +2007-01-23 10:50 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: add link flags for + debug/release etc + +2007-01-22 20:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-22 10:52 king + + * Source/cmWriteFileCommand.h: ENH: Patch from Alex to document + WRITE_FILE as a discouraged command. + +2007-01-22 10:52 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: COMP: Patch from + Alex for const correctness. + +2007-01-22 10:39 king + + * cmake_uninstall.cmake.in: BUG: Patch from bug#4312 to make + uninstall work with DESTDIR. + +2007-01-21 20:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-20 21:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-20 10:05 andy + + * Modules/FindQt4.cmake: COMP: Fix typo that makes all Qt4 builds + break + +2007-01-19 20:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-19 11:55 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug 4331 + +2007-01-18 20:35 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug 4331 + +2007-01-18 20:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-18 16:10 hoffman + + * Source/cmLocalVisualStudioGenerator.cxx: ENH: do not use relative + paths for custom command commands if they working directory is + used + +2007-01-17 14:06 alex + + * Modules/UseEcos.cmake: ENH: the ecos headers are always in the + binary dir + + Alex + +2007-01-17 13:57 alex + + * Modules/UseEcos.cmake: ENH: building ecos apps now seems to work + also out-of-source + + Alex + +2007-01-17 13:45 alex + + * Modules/UseEcos.cmake: BUG: also check that tclsh is available, + otherwise you can't build any eCos stuff ENH: make the name of + the config file ecos.ecc adjustable via the new variable + ECOS_CONFIG_FILE + + Alex + +2007-01-16 14:37 clinton + + * Source/kwsys/SystemTools.cxx: ENH: Add support for "~otheruser/" + +2007-01-15 12:31 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: STYLE: Fix kwstyle + +2007-01-15 12:12 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: STYLE: fix link lenght + issue + +2007-01-14 20:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-13 20:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-12 20:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-12 16:47 clinton + + * Source/kwsys/SystemTools.cxx: ENH: Handle "~" in SplitPath. + +2007-01-12 09:53 hoffman + + * Utilities/Release/cygwin-package.sh.in: ENH: break it again + +2007-01-12 09:46 hoffman + + * Utilities/Release/cygwin-package.sh.in: ENH: fix for newer cygwin + +2007-01-12 09:18 hoffman + + * Utilities/Release/cmake_release.sh: ENH: change version of curses + +2007-01-11 21:02 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: fix for bug 4239, + NODEFAULTLIB flag support in ide + +2007-01-11 20:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-11 10:49 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h: STYLE: Fix kwstyle issues + +2007-01-10 20:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-10 19:59 hoffman + + * Source/CPack/OSXScriptLauncher.cxx: ENH: fix warning and code + style + +2007-01-10 18:33 andy + + * Modules/CPack.RuntimeScript.in: ENH: Change permission for + getdisplay.sh to make the runtimescript work + +2007-01-10 15:41 hoffman + + * Utilities/Release/cygwin-package.sh.in: ENH: remove old docs + +2007-01-10 15:30 andy + + * Modules/CPack.OSXScriptLauncher.in, + Modules/CPack.OSXX11.Info.plist.in, + Modules/CPack.RuntimeScript.in, Source/CMakeLists.txt, + Source/CPack/OSXScriptLauncher.cxx, + Source/CPack/cmCPackGenerators.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackOSXX11Generator.cxx, + Source/CPack/cmCPackOSXX11Generator.h: ENH: First pass at CPack + generator for OSX X11 applications. This are applications that + require X11 to work. This is not really installed but a bundle + packager + +2007-01-10 14:27 hoffman + + * Utilities/Release/cmake_release.sh: ENH: create cygwin + +2007-01-10 12:39 hoffman + + * CMakeLists.txt: ENH: make this the final 2.4.6 + +2007-01-09 21:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-08 21:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-08 15:12 king + + * Source/kwsys/SharedForward.h.in: STYLE: Fixed documentation of + how to produce forwarding executables for multi-configuration + builds with CMAKE_INTDIR. + +2007-01-07 21:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-06 22:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-06 00:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-04 17:29 alex + + * Modules/FindQt4.cmake: ENH: if a wrong qmake has been found, mark + it as invalid in the cache, so that it is searched again the next + time cmake runs Tested in KDE since Jul 5th: + http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake?rev=558318&view=rev + + Alex + +2007-01-04 16:50 alex + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: add QT_USE_QTDBUS as + it exists for all other modules too + + Alex + +2007-01-04 16:35 alex + + * Modules/FindQt4.cmake: BUG: also look for qmake4, as it is named + on OpenBSD + + Alex + +2007-01-04 16:03 martink + + * Source/cmAddLibraryCommand.cxx: BUG: fix for bad argument + handling + +2007-01-04 14:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-04 13:02 martink + + * Source/cmPropertyMap.cxx: ENH: change STRICT to CMAKE_STRICT + +2007-01-04 10:18 hoffman + + * CMakeLists.txt: ENH: add RC stuff to main tree + +2007-01-04 03:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-03 18:20 alex + + * Modules/FindQt4.cmake: ENH: partly sync with KDE svn: add the + macros for generating the dbus files + + Alex + +2007-01-03 17:50 alex + + * Modules/FindQt4.cmake: ENH: mark more variables ADVANCED + + Alex + +2007-01-03 17:32 alex + + * Modules/FindQt4.cmake: ENH: partly sync with KDE svn: handle + QtMain more like the other libs + + Alex + +2007-01-03 17:00 alex + + * Modules/FindQt4.cmake: BUG: argument names in macros are not real + variables, which can lead to problems, which we fixed for KDE in + Trysil: + http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/FindQt4.cmake?rev=557470&r1=557241&r2=557470 + + Alex + +2007-01-03 16:48 alex + + * Modules/FindQt4.cmake: STYLE: some more space to make it easier + to read + + Alex + +2007-01-03 16:38 alex + + * Modules/FindQt4.cmake: ENH: partly sync with KDE svn: also find + the QtDBus and the QtDesignerComponents libraries + + Alex + +2007-01-03 16:09 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CPack.STGZ_Header.sh.in, Modules/FindDoxygen.cmake, + Modules/FindJNI.cmake, Modules/FindRuby.cmake, + Source/cmFindBase.cxx, Source/cmFindBase.h, + Tests/CTestTest3/test.cmake.in, + Tests/CustComDepend/CMakeLists.txt, Tests/CustComDepend/bar.h, + Tests/CustComDepend/foo.cxx: ENH: merge from main tree + +2007-01-03 16:01 alex + + * Modules/FindQt4.cmake: ENH: partly sync with the KDE vesion: find + the dbus tools coming with Qt since 4.2 + + Alex + +2007-01-03 10:19 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/CMakeLists.txt, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalGenerator.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmMakefileUtilityTargetGenerator.cxx, Source/cmTarget.cxx: + ENH: merge in fixes from main tree + +2007-01-03 04:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-02 00:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2007-01-01 04:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-31 03:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-30 03:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-29 19:20 hoffman + + * Tests/CustComDepend/: CMakeLists.txt, bar.h, foo.cxx: ENH: try to + fix test on watcom + +2006-12-29 03:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-28 15:31 hoffman + + * Source/: cmFindBase.cxx, cmFindBase.h: BUG: fix problem with path + suffix and mac frameworks and find stuff, showed up in + FindPythonLibs.cmake + +2006-12-28 03:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-27 03:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-26 08:47 andy + + * Modules/FindJNI.cmake: ENH: Support JVM on Mac + +2006-12-26 03:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-25 03:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-24 03:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-23 03:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-22 03:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-21 10:24 utkarsh + + * Source/kwsys/CommandLineArguments.cxx: BUG: reverting previous + change. + +2006-12-21 09:52 utkarsh + + * Source/kwsys/CommandLineArguments.cxx: BUG: When a "wrong + argument" was detected, we call the WrongArgument handler. If the + handler returns success, the argument parsing should continue. + Currently, it was stopping parsing immediately after the wrong + argument was processed, irrespective of the WrongArgument handler + status. Fixed that. + +2006-12-21 04:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-20 03:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-19 03:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-18 11:30 utkarsh + + * Source/kwsys/SystemTools.cxx: BUG: FileIsDirectory would remove + the trailing '/' even when the path is indeed the root i.e. '/'. + Hence the test would be incorrect for root directory. Fixed that. + +2006-12-18 11:04 malaterre + + * Source/kwsys/kwsys_ios_sstream.h.in: COMP: Fix compilation when + VS6 is using the new ANSI stdlib + +2006-12-18 03:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-17 03:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-16 03:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-15 10:30 malaterre + + * Source/kwsys/kwsys_ios_sstream.h.in: COMP: Try to get + stringstream emulation working + +2006-12-15 03:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-14 14:30 king + + * Source/: cmGlobalUnixMakefileGenerator3.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileUtilityTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h: ENH: + Made cmMakefileTargetGenerator::GlobalGenerator have full type + cmGlobalUnixMakefileGenerator3 to give access to all methods. + Fixed broken custom targets with no commands for Borland + makefiles when CMAKE_SKIP_RULE_DEPENDENCY is set. + +2006-12-14 13:18 king + + * Source/kwsys/kwsys_ios_sstream.h.in: ENH: Adding stringstream + compatibility implementation. It is currently identical to + ostringstream. Fixed local variable pcount hiding method + warning. + +2006-12-14 11:41 malaterre + + * Source/kwsys/: kwsys_ios_sstream.h.in, testIOS.cxx: BUG: Remove + stringstream implementation, this was a wrong interface anyway. + +2006-12-14 11:02 malaterre + + * Source/kwsys/testIOS.cxx: BUG: disable test for now + +2006-12-14 10:03 king + + * Source/cmSystemTools.cxx: ENH: Changes from Ryan C. Gordon to fix + old process execution on BeOS. + +2006-12-14 03:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-13 16:44 andy + + * Modules/CPack.STGZ_Header.sh.in: BUG: Fixes for dash + +2006-12-13 13:24 martink + + * Source/cmPropertyMap.cxx: COMP: oops really did not mean to check + in that change + +2006-12-13 12:19 martink + + * Source/: cmAuxSourceDirectoryCommand.cxx, cmCPluginAPI.cxx, + cmCreateTestSourceList.cxx, cmFLTKWrapUICommand.cxx, + cmMakefile.cxx, cmPropertyMap.cxx, cmSourceFile.cxx, + cmSourceFile.h: ENH: allow source file properties to chain to + Directories and up + +2006-12-13 12:11 martink + + * Modules/VTKCompatibility.cmake: ENH: fix for back VTK error + message + +2006-12-13 08:52 malaterre + + * Source/kwsys/: kwsys_ios_sstream.h.in, testIOS.cxx: ENH: provide + stringstream too. FIX: warning shadow var + +2006-12-13 03:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-12 14:39 martink + + * Source/: cmCommands.cxx, cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h, cmVTKWrapJavaCommand.cxx, + cmVTKWrapJavaCommand.h, cmVTKWrapPythonCommand.cxx, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.cxx, + cmVTKWrapTclCommand.h: ENH: remove old commands + +2006-12-12 13:59 martink + + * Modules/VTKCompatibility.cmake: ENH: put in a better error + message for VTK 4.0 + +2006-12-12 13:59 martink + + * Tests/Wrapping/CMakeLists.txt: ENH: removed old VTK tests + +2006-12-12 11:17 martink + + * Modules/VTKCompatibility.cmake: ENH: minor cleanup + +2006-12-12 11:06 hoffman + + * Tests/CTestTest3/test.cmake.in: ENH: do not use svn until it is + working again + +2006-12-12 10:07 martink + + * Source/: cmIfCommand.cxx, cmIfCommand.h, + cmSetPropertiesCommand.cxx: ENH: fix a warning and a nice fix to + the IF command + +2006-12-12 03:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-11 10:26 martink + + * Source/: cmSetPropertiesCommand.cxx, cmSetPropertiesCommand.h, + cmSetSourceFilesPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, cmake.cxx: ENH: improve + SetProperties and fix a couple warnings + +2006-12-11 03:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-10 03:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-09 15:02 hoffman + + * Modules/: FindPkgConfig.cmake, UsePkgConfig.cmake: ENH: better + backwards compatibility, and deprecate PKGCONFIG + +2006-12-09 11:25 malaterre + + * Source/kwsys/: CMakeLists.txt, DynamicLoader.cxx, + DynamicLoader.hxx.in: BUG: revert yesterday patch. The + implementation was correct. The problem was that _WIN32 was + forced to be #define on cygwin when included from ITK, which was + miss matching the implementation from the declaration. Put extra + condition for CYGWIN system + +2006-12-09 03:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-08 15:52 malaterre + + * Source/kwsys/: CMakeLists.txt, DynamicLoader.cxx, + DynamicLoader.hxx.in: BUG: Make sure to use the Win32 interface + (HINSTANCE) for handling shared lib on cygwin and mingw system + +2006-12-08 09:27 martink + + * Source/: cmDocumentation.cxx, cmSetPropertiesCommand.cxx, + cmTarget.cxx, cmake.cxx: COMP: fix some warnings and style issues + +2006-12-08 03:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-07 17:37 alex + + * Modules/FindRuby.cmake: BUG: fix 4164, also search for + libruby1.8.so, I guess it should be synced with the KDE version + of FindRUBY.cmake + + Alex + +2006-12-07 16:31 martink + + * Source/cmSetTestsPropertiesCommand.cxx: BUG: fix bad comparison + +2006-12-07 16:14 hoffman + + * Modules/Platform/BeOS.cmake: ENH: add beos file + +2006-12-07 15:23 martink + + * Source/cmSetTestsPropertiesCommand.cxx: COMP: fix a warning + +2006-12-07 14:54 martink + + * Source/: cmSetPropertiesCommand.cxx, cmSetPropertiesCommand.h, + cmSetTestsPropertiesCommand.cxx, cmSetTestsPropertiesCommand.h: + ENH: implements SetProperties for TEST + +2006-12-07 11:38 hoffman + + * Tests/CustComDepend/CMakeLists.txt: ENH: fix test for config dir + based stuff + +2006-12-07 10:48 martink + + * bootstrap: COMP: fix bootstrap maybe + +2006-12-07 10:33 martink + + * Source/: cmPropertyMap.cxx, cmSetPropertiesCommand.cxx: COMP: fix + warning + +2006-12-07 10:26 martink + + * Source/cmSetPropertiesCommand.cxx: COMP: fix warning right now + +2006-12-07 10:22 martink + + * Source/cmTest.cxx: BUG: fix missing return value + +2006-12-07 10:15 hoffman + + * Source/CMakeLists.txt: ENH: add test I removed by mistake + +2006-12-07 09:51 martink + + * Source/cmCPluginAPI.cxx: COMP: fix warning + +2006-12-07 09:44 martink + + * Source/CMakeLists.txt, Source/cmAuxSourceDirectoryCommand.cxx, + Source/cmCPluginAPI.cxx, Source/cmCPluginAPI.h, + Source/cmCommands.cxx, Source/cmCreateTestSourceList.cxx, + Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmFLTKWrapUICommand.cxx, Source/cmForEachCommand.cxx, + Source/cmGlobalGenerator.cxx, Source/cmIfCommand.cxx, + Source/cmInstallFilesCommand.cxx, + Source/cmInstallProgramsCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmMacroCommand.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmPropertyMap.cxx, + Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSetTargetPropertiesCommand.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmSourceFile.cxx, + Source/cmSourceFile.h, Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmTest.cxx, Source/cmTest.h, + Source/cmVTKMakeInstantiatorCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, Source/cmWhileCommand.cxx, + Source/cmake.cxx, Source/cmake.h, Source/cmakemain.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c, + Source/cmDefinePropertyCommand.cxx, + Source/cmDefinePropertyCommand.h: ENH: make properties a bit more + formal with documentation and chaining + +2006-12-07 02:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-06 23:05 hoffman + + * Source/CMakeLists.txt, Source/cmLocalGenerator.cxx, + Source/cmTarget.cxx, Tests/CustComDepend/CMakeLists.txt, + Tests/CustComDepend/foo.cxx: ENH: fix bug in full path to target + depends stuff + +2006-12-06 00:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-05 10:36 martink + + * Source/: cmPropertyDefinition.cxx: ENH: fix compiler warning + +2006-12-05 09:14 hoffman + + * Source/: cmSystemTools.cxx, CTest/cmCTestSubmitHandler.cxx: COMP: + fix line length style error + +2006-12-05 09:02 hoffman + + * Source/kwsys/ProcessUNIX.c: COMP: remove warning + +2006-12-05 08:47 hoffman + + * bootstrap: ENH: fix bootstrap for mac + +2006-12-05 08:39 hoffman + + * Source/kwsys/ProcessUNIX.c: ENH: fix build error on IRIX + +2006-12-04 19:37 hoffman + + * Modules/FindDoxygen.cmake: ENH: fix for backwards compatibility + +2006-12-04 17:26 hoffman + + * bootstrap, Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CheckForPthreads.c, Source/cmCTest.cxx, + Source/cmDependsJavaLexer.cxx, Source/cmDependsJavaLexer.h, + Source/cmMakefile.cxx, Source/cmSystemTools.cxx, + Source/kwsys/DynamicLoader.cxx, + Source/kwsys/DynamicLoader.hxx.in, Source/kwsys/SystemTools.cxx, + Source/kwsys/testDynamicLoader.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Utilities/cmcurl/CMakeLists.txt, Utilities/cmtar/encode.c, + Utilities/cmtar/extract.c, Utilities/cmtar/libtar.c, + Utilities/cmtar/util.c, + Utilities/cmxmlrpc/xmlrpc_curl_transport.c: ENH: merge in changes + for beos support + +2006-12-04 14:42 king + + * Source/kwsys/: ProcessUNIX.c, testProcess.c: ENH: Changes based + on patch from Ryan C. Gordon to enable process execution on BeOS. + There seems to be no way to implement it without polling (or + threads). + +2006-12-04 13:54 king + + * Source/cmLocalGenerator.cxx: BUG: Do not print empty install + configuration repeatedly. + +2006-12-04 11:52 hoffman + + * Modules/FindDoxygen.cmake: BUG: fix for bug 4102 + +2006-12-04 11:44 hoffman + + * Modules/FindXMLRPC.cmake: BUG: fix for bug 4123, find xmlrpc in + standard locations + +2006-12-04 11:19 martink + + * Source/CMakeLists.txt: ENH: added properties into the compile, + but not that many + +2006-12-04 11:05 martink + + * Source/CMakeLists.txt: ENH: added properties into the compile + +2006-12-04 11:04 martink + + * Source/cmPropertyDefinitionMap.h: STYLE: fix line length + +2006-12-04 09:58 hoffman + + * CMakeLists.txt: ENH: move to actual release + +2006-12-02 13:17 hoffman + + * Source/CTest/cmCTestSubmitHandler.cxx: ENH: put checks on vector + before referencing begin iterator + +2006-12-01 22:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-12-01 15:32 hoffman + + * Source/cmMacroCommand.cxx: ENH: fix warning + +2006-12-01 15:28 hoffman + + * Source/cmMacroCommand.cxx: ENH: fix warning + +2006-12-01 13:35 martink + + * Source/: cmProperty.cxx, cmProperty.h, cmPropertyDefinition.cxx, + cmPropertyDefinition.h, cmPropertyDefinitionMap.cxx, + cmPropertyDefinitionMap.h, cmPropertyMap.cxx, cmPropertyMap.h, + cmSetPropertiesCommand.cxx, cmSetPropertiesCommand.h: ENH: + getting some of the property changed chewcked into CVS at least + +2006-12-01 11:04 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmMacroCommand.cxx: ENH: + merge in fix for seg fault and move to RC 4 + +2006-12-01 10:30 hoffman + + * Source/cmMacroCommand.cxx: BUG: fix for 3815 seg fault + +2006-12-01 01:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-30 18:27 ibanez + + * Source/kwsys/: DynamicLoader.cxx, DynamicLoader.hxx.in: BUG: + 4100. Fixing the Mac OS/X version in the Dynamic loader in kwsys, + and replacing copy/pasted code in the itkDynamicLoader with + usage of the kwsys loader. This was fixed in the HEAD by + Mathieu Malaterre and Neil Weisenfeld. This changes in the + branch are just the port of the bug fix from the HEAD. + +2006-11-30 18:13 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Source/cmOrderLinkDirectories.cxx, Source/cmTarget.cxx, + Tests/LibName/CMakeLists.txt: ENH: move to RC 3 and add a fix for + -L/path in link commands that was broken by the .dll.lib fix + +2006-11-30 17:50 hoffman + + * Source/cmOrderLinkDirectories.cxx: ENH: clean up comment and + avoid some vector access calles + +2006-11-30 17:32 hoffman + + * Source/cmOrderLinkDirectories.cxx, Source/cmTarget.cxx, + Tests/LibName/CMakeLists.txt: BUG: better fix for .dll.lib + problem + +2006-11-30 16:23 alex + + * Modules/FindCups.cmake: ENH: add a module to find Cups (#3081), + taken from KDE svn + + Alex + +2006-11-30 10:12 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/CMakeLists.txt, + Source/cmOrderLinkDirectories.cxx, Tests/LibName/CMakeLists.txt, + Tests/LibName/bar.c, Tests/LibName/foo.c, Tests/LibName/foobar.c: + ENH: put fix for foo.dll.lib problem on branch with test + +2006-11-30 09:51 hoffman + + * Tests/LibName/foobar.c: ENH: make it work for hp + +2006-11-30 01:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-29 21:53 hoffman + + * Tests/LibName/: bar.c, foo.c, foobar.c: ENH: add extern for hp c + compiler + +2006-11-29 21:36 hoffman + + * Source/CMakeLists.txt, Tests/LibName/CMakeLists.txt: ENH: fix + test to run with debug or release and put the exe next to the + dll, still shows the bug this is testing for + +2006-11-29 17:45 hoffman + + * bootstrap, Source/CMakeLists.txt, Source/cmake.cxx, + Tests/LibName/bar.c, Tests/LibName/foo.c, Tests/LibName/foobar.c: + ENH: fix errors for unix builds + +2006-11-29 17:25 hoffman + + * Source/CursesDialog/cmCursesLongMessageForm.cxx: ENH: fix warning + +2006-11-29 17:17 hoffman + + * Source/CursesDialog/: cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx: ENH: there can be only one version + +2006-11-29 17:10 martink + + * Source/: cmMakefile.cxx, cmTarget.cxx: COMP: fix compile issue on + Sun hopefully + +2006-11-29 17:02 hoffman + + * Source/CMakeLists.txt: ENH: fix test for configuration type + builds + +2006-11-29 16:43 hoffman + + * Source/cmOrderLinkDirectories.cxx: ENH: fix compile error on mac + +2006-11-29 16:12 hoffman + + * Modules/: FindPkgConfig.cmake, UsePkgConfig.cmake: ENH: maintain + backwards compatibility in UsePkgConfig + +2006-11-29 15:59 hoffman + + * Source/: cmCMakeMinimumRequired.cxx, cmCPluginAPI.cxx, + cmCacheManager.cxx, cmGlobalGenerator.cxx, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefile.cxx, cmMakefile.h, + cmake.cxx, cmake.h, MFCDialog/CMakeSetupDialog.cpp: ENH: unify + version stuff, get rid of it out of cmake and cmMakefile and only + use cmVersion + +2006-11-29 15:57 hoffman + + * Source/cmOrderLinkDirectories.cxx, Tests/LibName/CMakeLists.txt, + Tests/LibName/bar.c, Tests/LibName/foo.c, Tests/LibName/foobar.c, + Source/CMakeLists.txt: BUG: fix a problem where it tried to link + .dll.lib files + +2006-11-29 15:45 martink + + * Source/: cmMakefile.cxx, cmTarget.cxx: COMP: fix compile issue on + Sun + +2006-11-29 12:56 malaterre + + * Source/kwsys/: DynamicLoader.cxx, DynamicLoader.hxx.in: BUG: Fix + problem with loading dylib on Tiger (10.4) x86. We need to be + using the dlopen/dlclose instead of the old NSModule + +2006-11-29 11:00 martink + + * Source/: cmMakefile.cxx, cmTarget.cxx, cmTarget.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h: + ENH: updated handling of debug and optimized target link + libraries + +2006-11-28 16:09 hoffman + + * Source/: cmConfigure.cmake.h.in, cmMakefile.cxx, cmVersion.cxx: + ENH: add rc to version stuff + +2006-11-28 16:03 hoffman + + * CMakeLists.txt, Source/cmConfigure.cmake.h.in, + Source/cmMakefile.cxx, Source/cmVersion.cxx: ENH: add release + candidate to versions + +2006-11-28 14:45 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + r15n65_aix_release.cmake: ENH: use older os for AIX release + +2006-11-28 14:19 hoffman + + * ChangeLog.manual, Modules/FindKDE4.cmake, Modules/FindQt3.cmake, + Source/CMakeLists.txt, Source/cmLocalGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmTarget.cxx, + Tests/Simple/CMakeLists.txt, Tests/TargetName/CMakeLists.txt, + Tests/TargetName/executables/CMakeLists.txt, + Tests/TargetName/executables/hello_world.c, + Tests/TargetName/scripts/CMakeLists.txt, + Tests/TargetName/scripts/hello_world, + Tests/Wrapping/CMakeLists.txt, Utilities/cmcurl/CMakeLists.txt: + ENH: merge in changes from the main tree + +2006-11-28 09:49 hoffman + + * Source/CMakeLists.txt: ENH: use the built cmake for file compare + as older versions of cmake may not support this + +2006-11-28 00:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-27 16:15 hoffman + + * Source/CMakeLists.txt: ENH: use correct project name + +2006-11-27 16:13 hoffman + + * Source/cmMakefileTargetGenerator.cxx, + Tests/Simple/CMakeLists.txt: ENH: make sure things do not depend + on optimized libraries if they are debug, and the other way + around as well + +2006-11-27 15:14 hoffman + + * Source/CMakeLists.txt, Tests/TargetName/CMakeLists.txt, + Tests/TargetName/executables/CMakeLists.txt, + Tests/TargetName/executables/hello_world.c, + Tests/TargetName/scripts/CMakeLists.txt, + Tests/TargetName/scripts/hello_world: ENH: add a test for a + target name with the same name as the output of a custom command + +2006-11-27 12:14 hoffman + + * Source/cmTarget.cxx: ENH: fix line length problem + +2006-11-27 12:11 hoffman + + * Source/cmTarget.cxx: ENH: fix crash in plplot build + +2006-11-27 10:42 hoffman + + * Utilities/cmcurl/CMakeLists.txt: ENH: save logs of passed try + compile stuff as well + +2006-11-26 07:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-25 21:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-25 21:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-25 10:59 hoffman + + * Source/: cmLocalGenerator.cxx, cmTarget.cxx: BUG: fix problem + when a target name is the same as the output of a custom command + +2006-11-25 07:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-23 07:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-22 19:28 alex + + * Modules/FindKDE4.cmake: ENH: kde-config has been renamed to + kde4-config several weeks ago, so it's not necessary anymore to + use "kde-config" as fallback, since this will surely be a wrong + version + + Alex + +2006-11-22 14:26 hoffman + + * Source/CMakeLists.txt: ENH: make sure it is qt3 before running + test + +2006-11-22 14:22 hoffman + + * Tests/Wrapping/CMakeLists.txt: ENH: make sure it is qt3 before + running test + +2006-11-22 13:44 hoffman + + * Modules/: FindPkgConfig.cmake, UsePkgConfig.cmake: ENH: check in + new pkgconfig stuff from Enrico Scholz + +2006-11-22 13:30 hoffman + + * Modules/FindQt3.cmake, Tests/Wrapping/CMakeLists.txt: ENH: make + sure findqt3 finds qt3 and not qt4 + +2006-11-22 09:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-21 13:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-21 07:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-20 14:23 hoffman + + * Source/cmMakefile.cxx: ENH: fix from main tree + +2006-11-20 13:57 hoffman + + * Source/cmMakefile.cxx: ENH: fix for when a library is tagged both + debug and optimized + +2006-11-20 08:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-19 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-18 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-17 15:55 hoffman + + * Source/: cmMakefile.cxx, CPack/cmCPackNSISGenerator.cxx: ENH: + move fix for replace of @var@ in cmake files from main tree and a + better message for cpack and nsis + +2006-11-17 15:35 hoffman + + * Source/cmMakefile.cxx: BUG: undo bug fix 2722, still replace + @foo@ in cmake files + +2006-11-17 11:14 martink + + * Source/CPack/cmCPackNSISGenerator.cxx: STYLE: fix a long line + +2006-11-17 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-16 15:57 hoffman + + * ChangeLog.manual, Source/cmMakefile.cxx: ENH: move fix from main + tree + +2006-11-16 15:31 martink + + * Source/cmIfCommand.cxx: ENH: remove old hack now that project + level compatibility files are supported + +2006-11-16 15:29 martink + + * Modules/VTKCompatibility.cmake: ENH: added to handle case in very + old odd versions of VTK + +2006-11-16 15:28 martink + + * Modules/ITKCompatibility.cmake: ENH: added to handle case in ITK + 2.8 and earlier + +2006-11-16 10:57 martink + + * Source/: cmMakefile.cxx, cmTarget.cxx: ENH: fix a bug with useing + debuf optimized libs from other builds + +2006-11-16 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-15 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-14 09:03 hoffman + + * CMakeLists.txt: ENH: try again for 2.4.4 + +2006-11-14 08:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-13 22:08 andy + + * Source/CPack/cmCPackNSISGenerator.cxx: ENH: Expand comment + +2006-11-13 15:25 hoffman + + * ChangeLog.manual, Modules/FindQt4.cmake: ENH: move from main tree + +2006-11-13 14:22 hoffman + + * Modules/FindQt4.cmake: ENH: add depend information from qrc files + +2006-11-13 12:59 hoffman + + * ChangeLog.manual, Modules/CMakeVCManifestExe.cmake, + Modules/FindSubversion.cmake, Modules/Platform/Windows-cl.cmake, + Source/cmFindBase.cxx, Source/MFCDialog/PropertyList.cpp: ENH: + merge changes in from main tree + +2006-11-13 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-12 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-11 14:07 hoffman + + * Source/MFCDialog/PropertyList.cpp: BUG: fix for 4028 fix scroll + after delete + +2006-11-11 14:06 hoffman + + * Source/cmFindBase.cxx: BUG: fix for 4009 lib64 should work with + path suffix + +2006-11-11 14:04 hoffman + + * Modules/: CMakeVCManifestExe.cmake, Platform/Windows-cl.cmake: + BUG: use different commands for shared libraries and exe for + manifest stuff fix for bug#4039 + +2006-11-11 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-10 10:54 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: move from main tree + +2006-11-10 10:12 hoffman + + * Modules/FindMPI.cmake, Modules/FindQt4.cmake, Modules/readme.txt, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmSetTargetPropertiesCommand.h, Source/cmake.cxx, + Source/cmake.h, Source/CTest/cmCTestBuildHandler.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: merge from main + tree fix for vs all build qt and mpi2 + +2006-11-10 09:32 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: remove warning + +2006-11-10 08:11 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: fix for broken borland + compiler + +2006-11-10 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-09 16:07 hoffman + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: fix it to work with + stl debug mode on mac + +2006-11-09 09:57 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h, cmSetTargetPropertiesCommand.h: + ENH: commit fix for putting everything in the build on vs + +2006-11-09 08:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-08 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-07 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-06 08:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-05 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-04 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-03 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-02 19:58 hoffman + + * Modules/FindMPI.cmake: ENH: add support for finding mpich2 on + windows + +2006-11-02 17:51 hoffman + + * Modules/FindQt4.cmake: ENH: look for QtAssistantClient4 + +2006-11-02 17:16 hoffman + + * CMakeLists.txt: ENH: abort 2.4.4 for now + +2006-11-02 08:09 hoffman + + * CMakeLists.txt: ENH: this is 2.4.4 + +2006-11-02 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-11-01 09:06 king + + * Modules/readme.txt: ENH: Added XXX_RUNTIME_LIBRARY_DIRS as a + suggested variable. + +2006-11-01 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-31 14:28 andy + + * Source/: cmGlobalGenerator.cxx, cmInstallTargetGenerator.cxx, + cmake.cxx, cmake.h: ENH: Cleanup of install component list. There + was already the list in the global generator. Use that one + +2006-10-31 06:43 andy + + * Source/cmInstallTargetGenerator.cxx: STYLE: Fix kwstyle + +2006-10-30 15:59 andy + + * Source/: cmGlobalGenerator.cxx, cmInstallTargetGenerator.cxx, + cmake.cxx, cmake.h: ENH: Add support for displaying the list of + components + +2006-10-30 15:30 king + + * Modules/FindSubversion.cmake: ENH: Adding FindSubversion module + from Tristan Carel. This addresses bug#3987. + +2006-10-30 11:36 hoffman + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackPackageMakerGenerator.cxx, cmCPackTGZGenerator.cxx, + cmCPackTarBZip2Generator.cxx, cmCPackTarCompressGenerator.cxx: + ENH: merge fix for cpack crash into main tree + +2006-10-30 11:22 hoffman + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackPackageMakerGenerator.cxx, cmCPackTGZGenerator.cxx, + cmCPackTarBZip2Generator.cxx, cmCPackTarCompressGenerator.cxx: + ENH: make sure null const char* is not put into ossttringstream + to avoid seg faults + +2006-10-30 10:38 king + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: Added test case for + bug#3966. + +2006-10-30 09:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-30 09:17 hoffman + + * Modules/FindJNI.cmake: ENH: move from main tree + +2006-10-27 17:30 andy + + * Modules/FindJNI.cmake: ENH: More documentation + +2006-10-27 17:29 andy + + * Modules/FindJNI.cmake: ENH: Add support for libjvm + +2006-10-27 16:03 hoffman + + * Utilities/cmThirdParty.h.in, Utilities/cm_curl.h, + Utilities/cm_expat.h, Utilities/cm_xmlrpc.h, Utilities/cm_zlib.h, + Modules/CMakeDependentOption.cmake, Modules/FindCURL.cmake, + Modules/FindEXPAT.cmake, Modules/FindXMLRPC.cmake, + Tests/SimpleInstall/PackageScript.cmake, + Tests/SimpleInstallS2/PackageScript.cmake: ENH: move from main + tree + +2006-10-27 16:01 hoffman + + * CMakeLists.txt, CTestCustom.ctest.in, ChangeLog.manual, + bootstrap, doxygen.config, Modules/CMakeGenericSystem.cmake, + Modules/CPack.cmake, Modules/CTestTargets.cmake, + Modules/FindDoxygen.cmake, Modules/FindJNI.cmake, + Modules/FindJava.cmake, Modules/FindKDE3.cmake, + Modules/FindPerl.cmake, Modules/FindQt4.cmake, + Modules/FindTclsh.cmake, Modules/FindWish.cmake, + Modules/FindwxWidgets.cmake, Modules/NSIS.template.in, + Modules/UsewxWidgets.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/CMakeLists.txt, + Source/cmCTest.cxx, Source/cmCTest.h, Source/cmDocumentation.cxx, + Source/cmExecuteProcessCommand.cxx, + Source/cmExecuteProcessCommand.h, Source/cmFindBase.cxx, + Source/cmFindPackageCommand.cxx, Source/cmFindPackageCommand.h, + Source/cmGeneratedFileStream.cxx, + Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmGlobalWatcomWMakeGenerator.cxx, + Source/cmGlobalXCodeGenerator.cxx, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmSystemTools.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, Source/cmXMLParser.cxx, + Source/cmake.cxx, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, Source/CPack/cpack.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestMemCheckHandler.cxx, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestScriptHandler.h, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, + Source/CTest/cmCTestUpdateHandler.cxx, + Source/kwsys/CMakeLists.txt, Source/kwsys/System.c, + Source/kwsys/System.h.in, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.cxx.bak, + Source/kwsys/kwsysPlatformCxxTests.cmake, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Tests/CTestTest2/test.cmake.in, Tests/CTestTest3/test.cmake.in, + Tests/Complex/CMakeLists.txt, Tests/Complex/cmTestConfigure.h.in, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/CustomCommand/CMakeLists.txt, + Tests/MacroTest/CMakeLists.txt, Tests/OutOfSource/CMakeLists.txt, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/StringFileTest/CMakeLists.txt, + Utilities/cmtar/CMakeLists.txt, Utilities/cmtar/config.h.in, + Utilities/cmtar/libtar.c, Utilities/cmxmlrpc/xmlrpc.h, + Utilities/cmxmlrpc/xmlrpc_expat.c, + Utilities/cmxmlrpc/xmlrpc_server.h: ENH: move changes from main + tree + +2006-10-27 15:59 hoffman + + * Modules/FindJNI.cmake: ENH: remove JavaEmbedding + +2006-10-27 15:55 hoffman + + * CTestCustom.ctest.in: ENH: fix warnings on windows paths + +2006-10-26 11:39 king + + * Source/: cmFindPackageCommand.cxx, cmFindPackageCommand.h: ENH: + Added NO_MODULE and COMPONENTS options to improve flexibility of + the command. Re-implemented argument parsing to be simpler and + more robust. + +2006-10-26 11:01 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: STYLE: Fix typo + +2006-10-26 10:49 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: When writing + newlines between script portions in prebuild, prelink, and + postbuild command lines they must be escaped for XML so that the + IDE receives them. This fixes the fix for bug #3977. + +2006-10-25 14:03 king + + * Source/cmLocalVisualStudio6Generator.cxx: COMP: Remove unused + variable. + +2006-10-25 12:49 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Adjust + prebuild/prelink/postbuild script construction to account for + ConstructScript no longer producing trailing newlines. This + addresses bug#3977. + +2006-10-25 12:27 king + + * Source/cmLocalVisualStudioGenerator.cxx: BUG: Avoid leading and + trailing newlines in custom command scripts because some VS6 + versions do not like the trailing backslash this produces. This + addresses bug#3977. + +2006-10-25 11:23 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Re-enabling # escape + test now that it is implemented everywhere. + +2006-10-25 11:23 king + + * Source/: cmGlobalWatcomWMakeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.h, + kwsys/System.c, kwsys/System.h.in: ENH: Adding support for # + escape in Watcom WMake. + +2006-10-25 10:58 king + + * Tests/MacroTest/CMakeLists.txt: BUG: EQUAL -> STREQUAL for string + comparison. + +2006-10-25 10:57 king + + * Source/cmIfCommand.cxx: BUG: It cannot be an error if the values + do not convert. The docs say that if the values do not convert + the test is false. + +2006-10-25 10:31 king + + * Source/cmIfCommand.cxx: BUG: For LESS, GREATER, and EQUAL check + that the arguments can actually be converted to numbers. Also + force the conversion results to be stored in memory to make sure + they both use the same precision. This addresses bug#3966. + +2006-10-25 09:54 andy + + * Source/CMakeLists.txt: COMP: Remove unnecessary provocation + +2006-10-25 09:54 andy + + * Tests/CTestTest3/test.cmake.in: BUG: Attempt to fix the test + +2006-10-25 08:56 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: STYLE: Fix line length + +2006-10-24 17:56 alex + + * Modules/FindPerl.cmake: BUG: honor the REQUIRED flag for Perl, + please backport to 2.4 branch so that it will be in 2.4.4 + + Alex + +2006-10-24 12:44 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: BUG: Looks like gcov + produces lines with string /*EOF*/ on them if there is no line at + the end of the file. This will fix the coverage code complaining + about it + +2006-10-24 11:06 hoffman + + * Source/CMakeLists.txt: ENH: remove failing test + +2006-10-24 10:03 hoffman + + * Modules/FindDoxygen.cmake: ENH: fix more doxygen issues + +2006-10-24 10:03 hoffman + + * Modules/FindJNI.cmake: ENH: remove JavaEmbedding framework + +2006-10-24 09:47 king + + * Tests/CustomCommand/CMakeLists.txt: BUG: Disable testing of # + escapes until it can be implemented for Watcom WMake. + +2006-10-23 19:04 alex + + * Modules/FindKDE3.cmake: BUG: fix #3955: add -O2 by default but + only if no special buildtype is set + + Alex + +2006-10-23 17:20 king + + * Source/kwsys/System.c, Tests/CustomCommand/CMakeLists.txt: ENH: + Added # character for shell escaping. + +2006-10-23 17:14 king + + * Source/cmIfCommand.cxx, Source/cmIfCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Remove old + IF(FILE_IS_NEWER) syntax. It was never in a release anyway. + +2006-10-23 16:16 king + + * Source/cmake.cxx: BUG: Do not display cmake -E usage when any old + command line error occurs. + +2006-10-23 14:51 hoffman + + * Modules/FindDoxygen.cmake: ENH: put in backwards compatibility + for older cmake + +2006-10-23 13:36 king + + * Tests/StringFileTest/CMakeLists.txt, Source/cmIfCommand.cxx, + Source/cmIfCommand.h: ENH: Patch from Alex to provide nicer + syntax for FILE_IS_NEWER. Using name IS_NEWER_THAN so old syntax + will continue to work. + +2006-10-22 19:21 hoffman + + * Source/CMakeLists.txt: ENH: remove broken test + +2006-10-22 11:57 king + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: COMP: Fixed typo: + CMAKE_TEST_CMAKELIB -> COMPLEX_TEST_CMAKELIB. + +2006-10-19 15:45 king + + * Utilities/cmtar/CMakeLists.txt: ENH: Remove old include dirs. + +2006-10-19 15:39 king + + * Utilities/cmxmlrpc/xmlrpc_server.h: COMP: Fix for building + without system xmlrpc installed. + +2006-10-19 15:17 king + + * bootstrap: ENH: Adding option to use system-installed third-party + libraries. This addresses bug#3653. + +2006-10-19 15:00 king + + * CMakeLists.txt, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmGeneratedFileStream.cxx, Source/cmSystemTools.cxx, + Source/cmXMLParser.cxx, Source/CPack/cmCPackTGZGenerator.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Utilities/cmThirdParty.h.in, Utilities/cm_curl.h, + Utilities/cm_expat.h, Utilities/cm_xmlrpc.h, Utilities/cm_zlib.h, + Utilities/cmtar/CMakeLists.txt, Utilities/cmtar/config.h.in, + Utilities/cmtar/libtar.c, Utilities/cmxmlrpc/xmlrpc.h, + Utilities/cmxmlrpc/xmlrpc_expat.c: ENH: Add options to build with + system utility libraries. Organize inclusion of third party + libraries into a single header per library. This addresses + bug#3653. + +2006-10-19 14:48 king + + * Modules/CMakeDependentOption.cmake: ENH: Adding + CMAKE_DEPENDENT_OPTION macro. + +2006-10-19 14:45 king + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx: ENH: Added explicit + name for option to test CMakeLib. Added option to disable + testing of CMakeLib if system utility libraries are used until + linking made easier. + +2006-10-19 12:58 king + + * Modules/FindXMLRPC.cmake: ENH: Find module for XMLRPC libraries. + +2006-10-19 12:57 king + + * Modules/FindEXPAT.cmake: ENH: Find module for EXPAT library. + +2006-10-19 12:55 king + + * Modules/FindCURL.cmake: ENH: Find module for CURL library. + +2006-10-19 10:45 martink + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestBuildHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestTestHandler.cxx: ENH: + added total time limit for a CTest run bug 1207 + +2006-10-19 10:07 king + + * Modules/: FindwxWidgets.cmake, UsewxWidgets.cmake: ENH: Patch + from Jan for bug#3453. Cleans up find script and enables + -isystem feature for use script. + +2006-10-19 09:18 king + + * Source/cmFindBase.cxx: ENH: Clarified search behavior when the + objective is not found. + +2006-10-18 23:27 david.cole + + * Source/kwsys/SystemTools.cxx: BUG: Correct the + SystemReportDebugHook function. It should not call exit. It gets + called multiple times at shutdown in a memory leak reporting + scenario... This is the source of the long standing KWWidgetsTour + debug build dashboard failure. + +2006-10-17 09:34 king + + * Source/CPack/cpack.cxx: STYLE: Fixed line-too-long. + +2006-10-16 18:17 king + + * Modules/Platform/CYGWIN.cmake, Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Templates/DLLHeader.dsptemplate, + Templates/EXEHeader.dsptemplate: ENH: Adding image version number + (major.minor) property to windows binaries. Default is 0.0, but + the VERSION target property may change the value. Windows now + has first-class support for dll and exe versioning. This + addresses bug#1219. + +2006-10-16 15:18 king + + * Source/cmGetDirectoryPropertyCommand.cxx, + Tests/OutOfSource/CMakeLists.txt: BUG: Need to collapse path + argument to get_directory_property. This addresses bug#3847. + +2006-10-16 14:52 king + + * Source/cmDocumentation.cxx: ENH: Make hyperlinks in documentation + active when generated into HTML documents. This addresses + bug#3906. + +2006-10-16 13:58 king + + * Modules/CMakeGenericSystem.cmake: ENH: Allow user project code to + distinguish between an install prefix set on the command line and + one set by CMake as a default. This is useful for changing the + default prefix while still allowing the user to override it. + +2006-10-16 12:49 martink + + * Source/cmake.cxx: BUG: partial fix for the progress after install + bug + +2006-10-16 12:47 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + magrathea_release.cmake, r36n11_aix_release.cmake, + release_cmake.sh.in, upload_release.cmake: ENH: update for + release + +2006-10-16 11:32 king + + * Source/: cmExecuteProcessCommand.cxx, cmExecuteProcessCommand.h: + ENH: Added OUTPUT_STRIP_TRAILING_WHITESPACE and + ERROR_STRIP_TRAILING_WHITESPACE options to EXECUTE_PROCESS + command. These allow it to behave more like the old EXEC_PROGRAM + command that it is supposed to replace. + +2006-10-16 10:47 hoffman + + * Modules/FindDoxygen.cmake: BUG: fix for bug# 3310 + +2006-10-15 07:54 andy + + * Source/: cmCTest.cxx, CPack/cmCPackGenericGenerator.cxx, + CTest/cmCTestCoverageHandler.cxx: STYLE: Fix kwstyle + +2006-10-13 17:10 andy + + * Source/cmCTest.cxx, Source/cmCTest.h, + Tests/CTestTest2/test.cmake.in: ENH: Properly propagate config + type to test + +2006-10-13 16:13 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug#3908 + if header_file_only is set on cxx files in visual studio do not + compile them + +2006-10-13 15:04 king + + * Modules/NSIS.template.in: BUG: Compression must be set before any + output is created. + +2006-10-13 14:44 andy + + * Source/CTest/cmCTestTestHandler.h: COMP: Fix Sun build + +2006-10-13 13:59 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: BUG: When using link + scripts use native shell escapes instead of makefile shell + escapes because the script is not interpreted by a make tool. + +2006-10-13 11:53 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: allow for -gdwarf-2 to be + in cflags or cxxflags for xcode + +2006-10-13 11:26 hoffman + + * doxygen.config: BUG: fix for bug# 3921 INPUT wrong + +2006-10-13 11:25 hoffman + + * Modules/: FindTclsh.cmake, FindWish.cmake: BUG: fix for bug #3846 + more advanced stuff + +2006-10-13 11:23 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug#3898 find qt plugin dir + +2006-10-13 10:57 hoffman + + * CMake.pdf, CMake.rtf, Docs/CMake12p2.rtf, Docs/CMake14.rtf, + Docs/CMake16.rtf, Modules/CMakeVCManifest.cmake, + Modules/COPYING-CMAKE-SCRIPTS, Modules/CheckCCompilerFlag.cmake, + Modules/CheckCSourceRuns.cmake, + Modules/CheckCXXCompilerFlag.cmake, + Modules/CheckCXXSourceRuns.cmake, Modules/FindASPELL.cmake, + Modules/FindBZip2.cmake, Modules/FindHSPELL.cmake, + Modules/FindJasper.cmake, Modules/FindLibXml2.cmake, + Modules/FindLibXslt.cmake, Modules/FindOpenSSL.cmake, + Source/cmElseIfCommand.cxx, Source/cmElseIfCommand.h, + Source/cmEndMacroCommand.cxx, Source/cmEndMacroCommand.h, + Source/cmInstallDirectoryGenerator.cxx, + Source/cmInstallDirectoryGenerator.h, Source/cmStandardLexer.h, + Source/kwsys/CMakeEmptyInputFile.in, + Source/kwsys/CheckCXXSourceRuns.cmake, Source/kwsys/IOStream.cxx, + Source/kwsys/IOStream.hxx.in, Source/kwsys/System.c, + Source/kwsys/System.h.in, Source/kwsys/SystemTools.cxx.bak, + Source/kwsys/SystemTools.hxx.in.bak, + Source/kwsys/kwsysPlatformCxxTests.cmake.bak, + Source/kwsys/kwsysPlatformCxxTests.cxx.bak, + Source/kwsys/kwsysPlatformTests.cmake, + Source/kwsys/kwsysPlatformTestsC.c, + Source/kwsys/kwsysPlatformTestsCXX.cxx, + Tests/Complex/Executable/A.cxx.bak, Tests/Complex/Executable/A.h, + Tests/Complex/Executable/A.hh, Tests/Complex/Executable/A.txt, + Tests/Complex/Executable/notInAllExe.cxx, + Tests/Complex/Executable/testSystemDir.cxx, + Tests/Complex/Library/TestLink.c, + Tests/Complex/Library/notInAllLib.cxx, + Tests/Complex/Library/test_preprocess.cmake, + Tests/Complex/Library/SystemDir/testSystemDir.h, + Tests/ComplexOneConfig/Executable/A.cxx.bak, + Tests/ComplexOneConfig/Executable/A.h, + Tests/ComplexOneConfig/Executable/A.hh, + Tests/ComplexOneConfig/Executable/A.txt, + Tests/ComplexOneConfig/Executable/notInAllExe.cxx, + Tests/ComplexOneConfig/Executable/testSystemDir.cxx, + Tests/ComplexOneConfig/Library/TestLink.c, + Tests/ComplexOneConfig/Library/notInAllLib.cxx, + Tests/ComplexOneConfig/Library/test_preprocess.cmake, + Tests/ComplexOneConfig/Library/SystemDir/testSystemDir.h, + Tests/ComplexRelativePaths/Executable/A.cxx.bak, + Tests/ComplexRelativePaths/Executable/A.h, + Tests/ComplexRelativePaths/Executable/A.hh, + Tests/ComplexRelativePaths/Executable/A.txt, + Tests/ComplexRelativePaths/Executable/notInAllExe.cxx, + Tests/ComplexRelativePaths/Executable/testSystemDir.cxx, + Tests/ComplexRelativePaths/Library/TestLink.c, + Tests/ComplexRelativePaths/Library/notInAllLib.cxx, + Tests/ComplexRelativePaths/Library/test_preprocess.cmake, + Tests/ComplexRelativePaths/Library/SystemDir/testSystemDir.h, + Tests/CustomCommand/check_command_line.c.in, + Tests/OutOfBinary/CMakeLists.txt, Tests/OutOfBinary/outlib.c, + Tests/SimpleInstall/scripts/sample_script, + Tests/SimpleInstall/scripts/sample_script.bat, + Tests/SimpleInstallS2/scripts/sample_script, + Tests/SimpleInstallS2/scripts/sample_script.bat, + Utilities/cmcompress/CMakeLists.txt, + Utilities/cmcompress/cmcompress.c, + Utilities/cmcompress/cmcompress.h: ENH: merge files from main + tree to 2.4 + +2006-10-13 10:52 hoffman + + * CMakeLists.txt, ChangeLog.manual, bootstrap, + Docs/cmake-indent.vim, Docs/cmake-mode.el, Docs/cmake-syntax.vim, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, Modules/FindDoxygen.cmake, + Modules/FindGLUT.cmake, Modules/FindKDE3.cmake, + Modules/FindPNG.cmake, Modules/FindPythonInterp.cmake, + Modules/FindPythonLibs.cmake, Modules/FindQt3.cmake, + Modules/FindQt4.cmake, Modules/FindRuby.cmake, + Modules/FindSDL.cmake, Modules/FindTCL.cmake, + Modules/FindwxWidgets.cmake, + Modules/InstallRequiredSystemLibraries.cmake, + Modules/KDE3Macros.cmake, Modules/UseEcos.cmake, + Modules/UseQt4.cmake, Modules/UseSWIG.cmake, + Modules/kde3uic.cmake, Modules/readme.txt, + Modules/Platform/AIX.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Darwin.cmake, Modules/Platform/FreeBSD.cmake, + Modules/Platform/HP-UX.cmake, Modules/Platform/IRIX.cmake, + Modules/Platform/IRIX64.cmake, Modules/Platform/Linux.cmake, + Modules/Platform/QNX.cmake, Modules/Platform/SunOS.cmake, + Modules/Platform/UnixPaths.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Modules/Platform/gcc.cmake, + Source/CMakeLists.txt, Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.cxx, + Source/cmAddCustomTargetCommand.h, + Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h, Source/cmAddLibraryCommand.cxx, + Source/cmAddLibraryCommand.h, + Source/cmAddSubDirectoryCommand.cxx, Source/cmAddTestCommand.h, + Source/cmBuildNameCommand.h, Source/cmCPluginAPI.cxx, + Source/cmCommand.h, Source/cmCommandArgumentLexer.cxx, + Source/cmCommandArgumentLexer.h, + Source/cmCommandArgumentLexer.in.l, + Source/cmCommandArgumentParser.cxx, + Source/cmCommandArgumentParser.y, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserHelper.h, Source/cmCommands.cxx, + Source/cmCustomCommand.cxx, Source/cmCustomCommand.h, + Source/cmDependsC.cxx, Source/cmDependsC.h, + Source/cmDependsFortranLexer.cxx, + Source/cmDependsFortranLexer.in.l, + Source/cmDependsFortranParser.cxx, + Source/cmDependsFortranParser.y, Source/cmDependsJavaLexer.cxx, + Source/cmDependsJavaLexer.in.l, Source/cmDependsJavaParser.cxx, + Source/cmDependsJavaParser.y, Source/cmDocumentation.cxx, + Source/cmExecProgramCommand.h, Source/cmExprLexer.cxx, + Source/cmExprLexer.in.l, Source/cmExprParser.cxx, + Source/cmExprParser.y, Source/cmFileCommand.cxx, + Source/cmGetTargetPropertyCommand.h, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalKdevelopGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalWatcomWMakeGenerator.cxx, + Source/cmGlobalXCodeGenerator.cxx, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmIncludeDirectoryCommand.cxx, + Source/cmIncludeDirectoryCommand.h, + Source/cmIncludeExternalMSProjectCommand.cxx, + Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallFilesCommand.cxx, Source/cmInstallFilesCommand.h, + Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, Source/cmInstallGenerator.cxx, + Source/cmInstallGenerator.h, Source/cmInstallProgramsCommand.cxx, + Source/cmInstallProgramsCommand.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Source/cmInstallTargetsCommand.cxx, + Source/cmInstallTargetsCommand.h, + Source/cmLinkLibrariesCommand.h, Source/cmListCommand.cxx, + Source/cmListCommand.h, Source/cmListFileCache.cxx, + Source/cmListFileLexer.c, Source/cmListFileLexer.in.l, + Source/cmLoadCommandCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, Source/cmMacroCommand.cxx, + Source/cmMakeDirectoryCommand.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileExecutableTargetGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.h, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, Source/cmMessageCommand.cxx, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmRemoveCommand.h, + Source/cmSetCommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.h, + Source/cmSetTargetPropertiesCommand.h, + Source/cmStandardIncludes.h, Source/cmSubdirCommand.h, + Source/cmSubdirDependsCommand.h, Source/cmTarget.cxx, + Source/cmTryCompileCommand.cxx, + Source/cmVTKMakeInstantiatorCommand.h, + Source/cmVTKWrapJavaCommand.cxx, Source/cmVTKWrapJavaCommand.h, + Source/cmVTKWrapPythonCommand.h, Source/cmVTKWrapTclCommand.h, + Source/cmWin32ProcessExecution.cxx, Source/cmake.cxx, + Source/cmake.h, Source/cmakemain.cxx, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.h, + Source/CPack/cmCPackZIPGenerator.cxx, Source/CPack/cpack.cxx, + Source/CTest/cmCTestBuildAndTestHandler.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestHandlerCommand.cxx, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestStartCommand.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CursesDialog/ccmake.cxx, + Source/CursesDialog/cmCursesMainForm.cxx, + Source/MFCDialog/PropertyList.cpp, Source/kwsys/CMakeLists.txt, + Source/kwsys/CommandLineArguments.cxx, + Source/kwsys/Configure.h.in, Source/kwsys/Directory.cxx, + Source/kwsys/Glob.cxx, Source/kwsys/Glob.hxx.in, + Source/kwsys/Process.h.in, Source/kwsys/ProcessUNIX.c, + Source/kwsys/ProcessWin32.c, Source/kwsys/Registry.cxx, + Source/kwsys/SharedForward.h.in, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.hxx.in, Source/kwsys/Terminal.c, + Source/kwsys/testCommandLineArguments.cxx, + Source/kwsys/testCommandLineArguments1.cxx, + Source/kwsys/testProcess.c, Source/kwsys/testSystemTools.cxx, + Tests/Complex/CMakeLists.txt, Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/A.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/A.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/A.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/CustomCommand/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/OutOfSource/SubDir/CMakeLists.txt, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/StringFileTest/CMakeLists.txt, + Tests/SystemInformation/SystemInformation.in, + Utilities/Release/README, Utilities/cmcurl/CMakeLists.txt, + Utilities/cmtar/CMakeLists.txt, + Utilities/cmxmlrpc/CMakeLists.txt, + Utilities/cmxmlrpc/xmlrpc_curl_transport.c, + Utilities/cmzlib/CMakeLists.txt: ENH: merge changes from the main + tree to the 2.4 branch + +2006-10-13 10:27 andy + + * Source/CTest/: cmCTestMemCheckHandler.cxx, + cmCTestUpdateHandler.cxx: BUG: Replace some errors with warnings + +2006-10-13 10:22 king + + * Source/: cmGlobalMinGWMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: Juse use cmake -E echo + instead of the native echo on MinGW makefiles. The echo; hack + did not work when running from ctest. + +2006-10-13 10:03 king + + * Source/cmLocalGenerator.cxx: BUG: Do not try to compute the + location of a non-library target for linking. + +2006-10-13 09:30 andy + + * Source/: CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h, kwsys/CMakeLists.txt: ENH: Report + command line as a measurement and allow user to add custom + measurements + +2006-10-12 17:19 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: undo bad changes + +2006-10-12 16:31 andy + + * Source/: cmCTest.cxx, CTest/cmCTestCoverageHandler.cxx: BUG: Use + BuildDirectory from the DartConfiguration information. Also, Make + missing coverage information not make ctest fail + +2006-10-12 15:30 andy + + * Source/cmGlobalGenerator.cxx: BUG: Use variable instead of + retrieving again. Fixes bug: Bug #3476 + +2006-10-12 15:10 andy + + * Source/CTest/cmCTestScriptHandler.cxx: BUG: Report and error when + ctest -S script fails... Fixes: Bug #3540 + +2006-10-12 14:59 andy + + * Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx: + ENH: Add NSIS compression + +2006-10-12 14:47 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Handle more regular + expressions + +2006-10-12 13:30 andy + + * Tests/: SimpleInstall/PackageScript.cmake, + SimpleInstallS2/PackageScript.cmake: ENH: Several CPack fixes. + First, allow user to set CMAKE_MODULE_PATH for CPack; make + SetOptionIfNotSet more robust to handle empty options; do test + TGZ, STGZ, and TZ, Add handling (and test) of Install Script; set + environment variable CMAKE_INSTALL_PREFIX + +2006-10-12 13:15 andy + + * Modules/CTestTargets.cmake: ENH: On Visual Studio and Xcode + handle config type + +2006-10-12 13:12 andy + + * Modules/: FindJNI.cmake, FindJava.cmake: ENH: More locations for + Java + +2006-10-12 13:05 andy + + * Modules/CPack.cmake, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, Source/CPack/cpack.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Several CPack fixes. + First, allow user to set CMAKE_MODULE_PATH for CPack; make + SetOptionIfNotSet more robust to handle empty options; do test + TGZ, STGZ, and TZ, Add handling (and test) of Install Script; set + environment variable CMAKE_INSTALL_PREFIX + +2006-10-12 12:51 martink + + * Source/: cmCTest.cxx, cmCTest.h: ENH: some cleanup and commenting + of code + +2006-10-12 10:57 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for bug -gdwarf + getting removed + +2006-10-11 12:41 king + + * Source/cmMakefileLibraryTargetGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: BUG: Do not collapse the + INSTALL_NAME_DIR setting because users may intend to have .. in + the path. This makes the makefile generator consistent with the + already working Xcode implementation of this feature. Also added + a test for @executable_path/.. style settings for this property. + +2006-10-11 12:41 king + + * Source/cmGlobalXCodeGenerator.cxx: ENH: Simplify code by removing + redundant check against BUILD_WITH_INSTALL_RPATH. + +2006-10-10 16:03 king + + * Modules/readme.txt: STYLE: Fixed typo: INCLUDE_DIR->INCLUDE_DIRS. + +2006-10-10 14:13 king + + * Source/cmLocalGenerator.cxx: BUG: TARGET_QUOTED should always be + replaced if Target is set in the rule variables. + +2006-10-10 13:47 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: BUG: Avoid duplicate + conversion to output path. + +2006-10-10 12:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-09 21:48 king + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: BUG: Fixed references to + projects outside the build tree and in other locations with + spaces in the path. This is needed for + out-of-source/out-of-binary subdirectories in the build. + +2006-10-09 21:25 king + + * Source/cmMakefileTargetGenerator.cxx, + Tests/OutOfBinary/CMakeLists.txt, Tests/OutOfBinary/outlib.c, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/OutOfSource/SubDir/CMakeLists.txt: BUG: Fixed out-of-source + subdirectories to work when they are also out-of-binary. Updated + the OutOfSource test to test this feature. + +2006-10-09 11:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-09 10:06 david.cole + + * Source/kwsys/ProcessWin32.c: COMP: Fix or suppress warnings on + Borland and Mac dashboards. Definitely fix "may be used + uninitialized" warnings. + +2006-10-08 09:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-07 06:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-06 15:33 martink + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: remove old unused + code + +2006-10-06 14:00 martink + + * Source/cmDocumentation.cxx: BUG: potential segfault + +2006-10-06 11:13 david.cole + + * Source/kwsys/CMakeLists.txt: STYLE: Make the set of supported STL + headers the same in vtkstd and vtksys/stl. (The union of the + present values of the two sets.) + +2006-10-06 11:11 hoffman + + * Source/: cmMessageCommand.cxx, cmake.cxx, cmake.h, cmakemain.cxx: + ENH: do not print a call stack if the user does a message error + unless --debug-output is used + +2006-10-06 09:16 king + + * Modules/Platform/Darwin.cmake: BUG: Do not enable -isystem + support for Xcode generator until it is implemented. + +2006-10-06 03:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-05 17:53 hoffman + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestTestHandler.cxx: BUG: fix bug where converage was required + to get valgrind output because of bad current directory + +2006-10-05 16:59 king + + * Source/: cmLocalGenerator.cxx, cmOrderLinkDirectories.cxx: BUG: + Need to match shared library names before static because some + platforms have static name patterns that match their shared + patterns but not vice versa. This is needed for implementing + bug#1644 on cygwin. + +2006-10-05 16:30 king + + * Modules/Platform/CYGWIN.cmake, Source/cmTarget.cxx: ENH: Adding + version number to the name of a DLL built in cygwin but not the + import library. This addresses bug#3571. + +2006-10-05 15:08 king + + * Modules/Platform/: CYGWIN.cmake, Windows-gcc.cmake: ENH: Enabling + link-type selection flags on Cygwin, MSYS, and MinGW. This + addresses bug#1644 on these platforms. + +2006-10-05 15:08 king + + * Source/cmLocalGenerator.cxx, Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Fix link + flags on cygwin shared libraries. This requires that the shared + library prefix be supported in the link library regex. + +2006-10-05 14:51 king + + * Source/: cmGlobalMinGWMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: Hack to make echo command + work properly in mingw32-make. + +2006-10-05 13:43 king + + * Source/cmWin32ProcessExecution.cxx: BUG: Robustly handle failure + of FormatMessage. See bug#3471. + +2006-10-05 12:04 king + + * Tests/: Complex/CMakeLists.txt, Complex/Library/testSystemDir.h, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Library/testSystemDir.h, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Library/testSystemDir.h, + Complex/Library/SystemDir/testSystemDir.h, + ComplexOneConfig/Library/SystemDir/testSystemDir.h, + ComplexRelativePaths/Library/SystemDir/testSystemDir.h: BUG: Test + -isystem without affecting other tests. Made separate + Library/SystemDir for this purpose. + +2006-10-05 11:31 king + + * Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Added OPTIONAL option + to INSTALL command to allow installation of files if they exist + while ignoring them otherwise. This addresses bug#2922. + +2006-10-05 11:30 king + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: BUG: Run + testSystemDir test only if -isystem flag is available. + +2006-10-05 10:55 king + + * Source/cmDocumentation.cxx: ENH: Adding links to web resources + and FAQ to SEE ALSO section. This addresses bug #3757. + +2006-10-05 09:33 king + + * Modules/Platform/QNX.cmake: BUG: QNX GCC does not have -isystem. + +2006-10-05 08:55 king + + * Modules/Platform/gcc.cmake, Source/cmIncludeDirectoryCommand.cxx, + Source/cmIncludeDirectoryCommand.h, Source/cmLocalGenerator.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Tests/Complex/CMakeLists.txt, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/testSystemDir.cxx, + Tests/Complex/Library/testSystemDir.h, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/testSystemDir.cxx, + Tests/ComplexOneConfig/Library/testSystemDir.h, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/testSystemDir.cxx, + Tests/ComplexRelativePaths/Library/testSystemDir.h: ENH: Adding + SYSTEM option to INCLUDE_DIRECTORIES command. This addresses bug + #3462. + +2006-10-05 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-04 19:21 king + + * Source/CursesDialog/ccmake.cxx: BUG: The --help option should + list generators. This addresses bug #2494. + +2006-10-04 18:57 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Adding test of special + characters in custom command and custom target comments. + +2006-10-04 18:52 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalWatcomWMakeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: Fixed display of custom + command comments with quotes, dollars, and other special + characters in them. + +2006-10-04 18:52 king + + * Source/kwsys/: System.c, System.h.in: ENH: Adding + Shell_Flag_EchoWindows option to setup escapes for arguments to + the native echo command in a shell. This special case is needed + to avoid adding quotes when passing text to echo in a native + windows shell which does no command line parsing at all. + +2006-10-04 18:10 king + + * Source/cmAddCustomTargetCommand.cxx, + Source/cmAddCustomTargetCommand.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Tests/CustomCommand/CMakeLists.txt: ENH: + Added COMMENT option to ADD_CUSTOM_TARGET. This addresses + bug#3461. + +2006-10-04 18:09 king + + * Source/cmAddCustomCommandCommand.h: BUG: COMMENT was missing from + docs. + +2006-10-04 17:27 king + + * Source/kwsys/: CMakeLists.txt, ProcessUNIX.c, + kwsysPlatformTestsC.c: ENH: Adding tests KWSYS_C_HAS_PTRDIFF_T + and KWSYS_C_HAS_SSIZE_T to help ProcessUNIX.c build everywhere + without warnings. + +2006-10-04 17:24 king + + * bootstrap: ENH: Renamed kwsysPlatformCxxTests to + kwsysPlatformTests and generalized it for multiple language tests + (C and CXX). + +2006-10-04 17:08 king + + * Source/kwsys/kwsysPlatformTests.cmake: BUG: Name of C test file + ends in .c not .cxx. + +2006-10-04 16:56 king + + * Source/kwsys/: CMakeLists.txt, kwsysPlatformCxxTests.cmake, + kwsysPlatformCxxTests.cxx, kwsysPlatformTests.cmake, + kwsysPlatformTestsC.c, kwsysPlatformTestsCXX.cxx: ENH: Renamed + kwsysPlatformCxxTests to kwsysPlatformTests and generalized it + for multiple language tests (C and CXX). + +2006-10-04 16:31 hoffman + + * Modules/FindDoxygen.cmake: ENH: remove paths that cmake already + looks at + +2006-10-04 15:54 alex + + * Modules/FindRuby.cmake: ENH: apply patch so that the config + values from ruby are used to determine the additional locations + (see #3297) + + Alex + +2006-10-04 15:24 king + + * Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomCommandCommand.h, Source/cmCustomCommand.cxx, + Source/cmCustomCommand.h, Tests/CustomCommand/CMakeLists.txt: + ENH: Added APPEND option to ADD_CUSTOM_COMMAND to allow extra + dependencies to be connected later. This is useful to create one + rule and then have a macro add things to it later. This + addresses bug#2151. + +2006-10-04 14:37 king + + * Source/cmCommandArgumentParser.cxx, + Source/cmCommandArgumentParser.y, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserHelper.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Tests/CustomCommand/CMakeLists.txt: BUG: Do + not replace @VAR@ syntax in list files. This addresses bug + #2722. + +2006-10-04 14:02 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for fat file + systems and vs8 #2617 + +2006-10-04 14:00 king + + * Modules/UseQt4.cmake: BUG: Patch from Clinton to restore proper + QT3_SUPPORT macro definition. + +2006-10-04 13:27 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug#3362 + xml escapes on -D stuff for visual studio + +2006-10-04 13:05 hoffman + + * Modules/FindTCL.cmake: BUG: fix for bug# 3313 same advanced for + tcl win and unix + +2006-10-04 11:33 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug# 3664 + +2006-10-04 11:11 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: fix for bug #3517 seg fault + with enable language before project command + +2006-10-04 11:04 hoffman + + * Modules/FindDoxygen.cmake: BUG: fix for bug#3520 - better find + doxygen + +2006-10-04 10:54 hoffman + + * Modules/Platform/Darwin.cmake: BUG: fix for bug# 3584 missing + SONAME for fortran on darwin + +2006-10-04 10:33 hoffman + + * Modules/FindQt4.cmake: ENH: make qmake-qt4 really work if qmake + is qt3 also fix indent in file, for diff use cvs diff -w + +2006-10-04 05:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-03 17:53 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: fix dashbaord error do not + exclude root project from itself. + +2006-10-03 16:18 hoffman + + * Modules/FindGLUT.cmake: BUG: fix for bug#3646 GLUT not Glut for + framework name + +2006-10-03 16:12 hoffman + + * Modules/Platform/Windows-cl.cmake: BUG: fix for bug#3652 use link + /lib instead of lib + +2006-10-03 15:25 hoffman + + * Source/CMakeLists.txt: ENH: use core and not all of carbon + +2006-10-03 15:12 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: fix for bug#3714 + execlude_from_all not working on vs + +2006-10-03 14:40 martink + + * Source/: cmCommands.cxx, cmEndMacroCommand.cxx, + cmEndMacroCommand.h: ENH: added endmacro command + +2006-10-03 14:39 hoffman + + * Modules/FindQt4.cmake: BUG: fix for bug#3720 + +2006-10-03 14:03 alex + + * Modules/KDE3Macros.cmake: BUG: fix #3827, the name of the var is + _tmp_FILE instead of tmp_FILE, so the dcop stuff should work now + + Alex + +2006-10-03 14:03 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug#3738 + +2006-10-03 13:48 hoffman + + * Modules/FindSDL.cmake: BUG: fix for 3765 + +2006-10-03 13:45 hoffman + + * Source/cmAddTestCommand.h: BUG: fix for bug#3775 + +2006-10-03 13:35 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: check for empty path + +2006-10-03 13:35 hoffman + + * Modules/Platform/AIX.cmake: ENH: disable static shared stuff on + AIX, see comment + +2006-10-03 13:35 hoffman + + * Source/cmGlobalMSYSMakefileGenerator.cxx: BUG: bug#3789 add msys + for the msys generator + +2006-10-03 13:22 hoffman + + * Source/cmTryCompileCommand.cxx: ENH: make sure file is closed + +2006-10-03 12:21 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: allow edit of file text + directly + +2006-10-03 12:09 hoffman + + * Source/cmMacroCommand.cxx: ENH: fix compile error + +2006-10-03 11:55 hoffman + + * Source/cmake.cxx: ENH: do not allow null pointer access + +2006-10-03 11:55 hoffman + + * Source/kwsys/Registry.cxx: ENH: make sure value is set before + using it + +2006-10-03 10:57 hoffman + + * Source/cmMacroCommand.cxx: BUG: fix for seg fault bug #3815 + +2006-10-03 10:26 king + + * Source/kwsys/ProcessUNIX.c: BUG: Need to initialize to not use + native pipes. + +2006-10-03 09:12 king + + * Source/cmGlobalKdevelopGenerator.cxx: STYLE: Fixed line-too-long + warning. + +2006-10-03 09:10 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added Process_SetPipeNative method to allow user code to override + the pipes connected to the child pipeline. + +2006-10-03 05:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-02 12:01 king + + * Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h, Source/cmAddLibraryCommand.cxx, + Source/cmAddLibraryCommand.h, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: ENH: Renamed + NOT_IN_ALL to EXCLUDE_FROM_ALL. + +2006-10-02 11:13 king + + * Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h, Source/cmAddLibraryCommand.cxx, + Source/cmAddLibraryCommand.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/notInAllExe.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/Complex/Library/notInAllLib.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/notInAllExe.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/notInAllLib.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/notInAllExe.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/notInAllLib.cxx: ENH: Added + NOT_IN_ALL option for ADD_LIBRARY and ADD_EXECUTABLE to avoid + building the targets by default. + +2006-10-02 10:49 king + + * Source/cmGlobalKdevelopGenerator.cxx: ENH: Patch from Alex to + help with KDevelop code completion in generated projects. + +2006-10-02 10:20 king + + * Source/: cmAddCustomCommandCommand.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalWatcomWMakeGenerator.cxx, + cmMakefile.cxx, cmMakefileTargetGenerator.cxx, + cmSetSourceFilesPropertiesCommand.h: ENH: Added SYMBOLIC source + file property to mark custom command outputs that are never + actually created on disk. This is used by the Watcom WMake + generator to generate the .SYMBOLIC mark on the files in the make + system. + +2006-10-02 10:17 king + + * Tests/CustomCommand/: CMakeLists.txt, check_command_line.c.in: + COMP: Fix command line check test implementation for Watcom. + +2006-10-02 09:03 hoffman + + * Modules/FindQt4.cmake: ENH: fix from clinton + +2006-10-02 04:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-10-01 04:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-30 03:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-29 16:42 king + + * Source/: cmGetTargetPropertyCommand.h, cmTarget.cxx: ENH: Added + support for getting a target's location on a per-configuration + basis (ex. DEBUG_LOCATION). This does not fix but helps with + bug#3250. + +2006-09-29 16:14 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix failing tests on mac + +2006-09-29 09:11 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fixed inclusion of + progress.make from subdirectory makefiles. + +2006-09-29 03:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-28 17:35 king + + * Source/cmIncludeExternalMSProjectCommand.cxx: BUG: Move hack from + old cmMakefile::AddUtilityTarget to this command directly. There + really needs to be a better way to represent external project + targets. + +2006-09-28 17:21 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Moved + progress.make file into CMakeFiles subdirectory to keep things + clean. + +2006-09-28 16:40 king + + * Source/: cmAddCustomCommandCommand.cxx, cmCustomCommand.cxx, + cmCustomCommand.h, cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h, cmLocalGenerator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakefile.cxx, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileExecutableTargetGenerator.h, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.h, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h: BUG: + Fix/cleanup custom commands and custom targets. Make empty + comment strings work. Fix ZERO_CHECK target always out of date + for debugging. Fix Makefile driving of custom commands in a + custom target. Fix dependencies on custom targets not in ALL in + VS generators. + +2006-09-28 13:55 king + + * Source/: cmAddCustomTargetCommand.cxx, cmCPluginAPI.cxx, + cmGlobalGenerator.cxx, cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmMakefile.cxx, + cmMakefile.h, cmVTKWrapJavaCommand.cxx: ENH: Cleaned up signature + of cmMakefile::AddUtilityCommand. It is not valid to have an + output from a utility rule and no calls to the method asked for + an output anyway. The argument has been removed. + +2006-09-28 11:42 king + + * Modules/Platform/UnixPaths.cmake: BUG: Header and library search + path ordering should be consistent. + +2006-09-28 11:30 king + + * Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.cxx, + Source/cmAddCustomTargetCommand.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Tests/CustomCommand/CMakeLists.txt, + Tests/CustomCommand/check_command_line.c.in: ENH: Added VERBATIM + option to ADD_CUSTOM_COMMAND and ADD_CUSTOM_TARGET commands. + This option enables full escaping of custom command arguments on + all platforms. See bug#3786. + +2006-09-28 10:41 king + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: Re-enabling .i + rule test on MSYS now that it works. + +2006-09-28 10:37 king + + * Source/: cmGlobalMSYSMakefileGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.h: BUG: MSYS + makefile shell needs posix paths to executables in some cases and + it does not hurt to do it always. + +2006-09-28 09:49 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx: BUG: Do not filter system + directories for include file dependencies. + +2006-09-28 02:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-27 16:20 king + + * Source/cmCustomCommand.cxx: COMP: Fix init order. + +2006-09-27 16:14 king + + * Source/cmCommandArgumentParserHelper.cxx: BUG: One should be able + to escape the @ symbol. + +2006-09-27 15:26 king + + * Source/cmCustomCommand.cxx: BUG: The copy constructor should copy + the escape settings. + +2006-09-27 14:27 king + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: Re-enable + preprocessing target test but specifically disable it on broken + platforms. + +2006-09-27 13:43 king + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, + cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudioGenerator.cxx, cmLocalVisualStudioGenerator.h, + kwsys/ProcessWin32.c, kwsys/System.c, kwsys/System.h.in: ENH: + Re-implemented command line argument shell quoting to support + several platforms with one code base. + +2006-09-27 13:30 alex + + * Modules/: FindPythonInterp.cmake, FindPythonLibs.cmake: + ENH: apply patch from Dirk Mueller to support Python 2.5 + + Alex + +2006-09-27 12:55 king + + * Source/cmDependsC.cxx: STYLE: Fixed line-too-long. + +2006-09-26 08:04 andy + + * Source/cmDependsC.cxx: BUG: Handle header file dependencies for + objective C + +2006-09-26 02:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-25 18:33 king + + * Source/cmCommandArgumentLexer.cxx: COMP: Removed yyunput function + to avoid warning. + +2006-09-25 14:01 king + + * Source/cmCommandArgumentLexer.cxx: COMP: Restoring previous AIX + fix. + +2006-09-25 10:22 king + + * Source/cmLocalGenerator.cxx, Tests/CustomCommand/CMakeLists.txt: + BUG: Disable new shell escape code until backward compatibility + can be established in the new implementation. + +2006-09-25 10:05 king + + * Source/cmCommandArgumentLexer.cxx, + Source/cmCommandArgumentLexer.h, + Source/cmCommandArgumentLexer.in.l, + Tests/StringFileTest/CMakeLists.txt: BUG: Character + should be + valid in a variable name. + +2006-09-25 02:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-24 10:28 king + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: BUG: Disable new + test_preprocess target until it is fixed on OSX universal + binaries and mingw. + +2006-09-24 02:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-23 17:09 king + + * Docs/: cmake-indent.vim, cmake-syntax.vim: ENH: Adding elseif to + VIM syntax and indentation files. See bug #3781. + +2006-09-23 16:55 king + + * Tests/: Complex/Library/CMakeLists.txt, + Complex/Library/test_preprocess.cmake, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/test_preprocess.cmake, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/test_preprocess.cmake: ENH: Adding + test for running preprocessor rules. + +2006-09-23 16:32 king + + * Docs/cmake-mode.el: ENH: Adding elseif indentation. See + bug#3781. + +2006-09-23 14:41 andy + + * Source/CPack/cmCPackZIPGenerator.cxx: BUG: Attempt to fix winzip + problems + +2006-09-23 02:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-22 11:49 martink + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: added test for + elseif + +2006-09-22 11:23 martink + + * Source/: cmCommands.cxx, cmElseIfCommand.cxx, cmElseIfCommand.h, + cmIfCommand.cxx, cmIfCommand.h: ENH: added elseif + +2006-09-22 08:42 king + + * Tests/CustomCommand/CMakeLists.txt: COMP: Need ANSI C flags to + build check_command_line.c. + +2006-09-22 02:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-21 17:21 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: Fix shadowed + local variable created by previous cmake_force change. + +2006-09-21 16:11 king + + * Tests/CustomCommand/: CMakeLists.txt, check_command_line.c.in: + ENH: Adding test for non-trivial custom command line arguments. + This is for bug#3786. + +2006-09-21 16:10 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.h: BUG: + Enabled use of EscapeForShell to properly escape custom command + lines. This addresses bug#3786 for Xcode. + +2006-09-21 15:35 king + + * Source/cmLocalGenerator.cxx: BUG: Need to escape spaces in custom + command line arguments. + +2006-09-21 15:30 king + + * Source/cmLocalGenerator.cxx: BUG: Do not escape parens because we + need to be able to reference make variables in the scripts. + +2006-09-21 15:14 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudioGenerator.cxx, cmLocalVisualStudioGenerator.h: + BUG: Centralized generation of command line arguments in escaped + form. This addresses bug#3786 for several platforms. + +2006-09-21 15:09 andy + + * Source/CPack/cmCPackZIPGenerator.cxx: ENH: Handle zip (command + line was too long) + +2006-09-21 14:46 king + + * Source/kwsys/System.c: BUG: Windows_ShellArgument: need to escape + if the string contains one of a set of special characters as well + as spaces. Moved test for needing escapes to a separate method + kwsysSystemWindowsShellArgumentNeedsEscape. + +2006-09-21 13:47 king + + * bootstrap: ENH: Added System component of kwsys. + +2006-09-21 11:49 king + + * Source/kwsys/: CMakeLists.txt, ProcessWin32.c, System.c, + System.h.in: ENH: Adding 'System' component of C sources to hold + system tools written in C. Moved windows shell command line + argument escaping code to kwsysSystem_Windows_ShellArgument and + kwsysSystem_Windows_ShellArgumentSize. + +2006-09-21 10:04 king + + * Source/kwsys/SharedForward.h.in: ENH: Added + KWSYS_SHARED_FORWARD_OPTION_COMMAND option to allow users to + replace the command executed. Extended documentation at top of + file. + +2006-09-21 02:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-20 12:13 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: cmake_force needs + to be written into build.make as well as Makefile. + +2006-09-20 02:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-19 16:11 alex + + * Modules/: COPYING-CMAKE-SCRIPTS, FindASPELL.cmake, + FindBZip2.cmake, FindHSPELL.cmake, FindJasper.cmake, + FindLibXml2.cmake, FindLibXslt.cmake, FindOpenSSL.cmake: ENH: add + cmake modules for some common libraries: aspell, hspell, bzip2, + jasper (jpeg2000), libxml2 and libxslt and openssl and the + accompanying license (BSD) + + Alex + +2006-09-19 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-18 17:55 alex + + * Modules/: CheckCCompilerFlag.cmake, CheckCXXCompilerFlag.cmake: + ENH: two macros to check whether the C/CXX compiler supports a + given flag: CHECK_CXX_COMPILER_FLAG("-Wall" + COMPILER_SUPPORTS_WALL) + + Alex + +2006-09-18 09:40 king + + * Modules/Platform/QNX.cmake: ENH: Enabling link type selection + flags for this platform. See bug#1644 for details. + +2006-09-18 02:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-17 09:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-16 11:54 king + + * Source/cmDependsC.cxx: STYLE: Fixed line-too-long. + +2006-09-16 11:52 king + + * Source/cmLocalGenerator.cxx: BUG: Do not look for linker language + unless it is needed. + +2006-09-16 11:47 king + + * Modules/Platform/SunOS.cmake: BUG: Need -Wl, to pass linker flags + when using gcc on Sun. + +2006-09-16 09:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-15 15:19 king + + * Modules/Platform/AIX.cmake: ENH: Enabling link type selection + flags for this platform. See bug#1644 for details. + +2006-09-15 15:18 king + + * Modules/Platform/HP-UX.cmake: STYLE: Updated comment about link + type flags and passing directly to ld. + +2006-09-15 15:14 king + + * Modules/Platform/HP-UX.cmake: BUG: Fix + CMAKE_SHARED_*_LINK_*_C_FLAGS to pass link type selection flags + directly to the linker. + +2006-09-15 15:05 king + + * Modules/Platform/SunOS.cmake: ENH: Enabling link type selection + flags for this platform. See bug#1644 for details. + +2006-09-15 14:58 king + + * Modules/Platform/: FreeBSD.cmake, HP-UX.cmake: ENH: Enabling link + type selection flags for this platform. See bug#1644 for + details. + +2006-09-15 14:31 king + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + Complex/Library/CMakeLists.txt, Complex/Library/TestLink.c, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/TestLink.c, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/TestLink.c: ENH: Added test for + linking to a static library that is next to a shared library. + See bug#1644 for related changes. + +2006-09-15 14:08 king + + * Modules/CMakeCXXInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/Platform/Linux.cmake, Source/cmLocalGenerator.cxx, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/SystemInformation/SystemInformation.in: ENH: Adding support + to link specifically to an archive or a shared library based on + the file name specified. This fixes the problem of having -lfoo + linking to libfoo.so even when it came from libfoo.a being + specified. + +2006-09-15 14:02 king + + * Modules/CMakeFortranInformation.cmake: STYLE: Removing unused + platform variable CMAKE_SHARED_MODULE_LINK_Fortran_FLAGS. It + does not make sense because nothing links to shared modules. + +2006-09-15 09:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-14 09:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-13 12:43 king + + * Source/: cmDependsC.cxx, cmDependsC.h: ENH: Patch from Alex to + speed dependency scanning approximately 2x. + +2006-09-13 11:39 king + + * Source/cmAddCustomTargetCommand.cxx: ENH: Added diagnosis of bad + target names. + +2006-09-13 11:22 king + + * Modules/FindwxWidgets.cmake: BUG: Patch from Peter Visser to run + wx-config from an MSYS prompt. + +2006-09-13 08:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-12 10:21 hoffman + + * Source/cmMakefileTargetGenerator.cxx: ENH: put the if in the + right place + +2006-09-12 10:03 hoffman + + * Source/cmMakefileTargetGenerator.cxx: ENH: fix for BUG: #739 + again, makefiles did not depend on external full path libraries + +2006-09-12 09:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-10 22:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-09 21:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-08 22:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-08 10:42 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefileTargetGenerator.cxx: + BUG: Fixed ordering of code generated in Makefile and build.make + files to make sure .SUFFIXES rule comes as early as possible. + Also cleaned up documentation in generated files. + +2006-09-08 10:39 king + + * Source/cmInstallCommand.cxx: STYLE: Fixed line-too-long. + +2006-09-08 09:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-07 10:05 king + + * Source/cmInstallCommand.cxx: ENH: Patch from Toni Timonen to + allow cross-compiling of DLLs. + +2006-09-07 08:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-06 09:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-06 08:31 hoffman + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: fixes from Clinton to + allow qt to work with static libs + +2006-09-05 09:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-04 09:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-03 09:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-02 10:51 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Patch from Alex to + fix name of includecache files to not look like source files. + +2006-09-02 09:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-09-01 09:51 king + + * Source/: cmBuildNameCommand.h, cmExecProgramCommand.h, + cmGlobalGenerator.cxx, cmInstallFilesCommand.h, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.h, + cmLinkLibrariesCommand.h, cmMakeDirectoryCommand.h, + cmRemoveCommand.h, cmSubdirCommand.h, cmSubdirDependsCommand.h, + cmVTKMakeInstantiatorCommand.h, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h: STYLE: Fixed + line-too-long warning. + +2006-09-01 08:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-31 16:40 king + + * Source/cmAddSubDirectoryCommand.cxx: BUG: Fix automatic + computation of binary path to work for subdirectories of out of + source directories. This addresses bug#3592. + +2006-08-31 14:09 king + + * Source/: cmDependsC.cxx, cmDependsC.h, + cmLocalUnixMakefileGenerator3.cxx, cmMakefileTargetGenerator.cxx: + ENH: Make sure all custom command outputs are up to date before + scanning dependencies. This avoids the need to pass a list of + generated files to the dependency scanning code and to rescan + after the files have been generated. Currently there is no + notion of implicit dependencies of the custom commands themselves + so this design is safe. We only need to make sure implicit + dependencies are up to date before the make process for the + /build part of a target is executed because only this process + loads them. This is a step towards fixing bug#3658. + +2006-08-31 13:20 king + + * Source/: cmBuildNameCommand.h, cmCommand.h, + cmExecProgramCommand.h, cmInstallFilesCommand.h, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.h, + cmLinkLibrariesCommand.h, cmMakeDirectoryCommand.h, + cmRemoveCommand.h, cmSubdirCommand.h, cmSubdirDependsCommand.h, + cmVTKMakeInstantiatorCommand.h, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h: ENH: Patch from + Alex to add IsDiscouraged method for future use in generating + separate documentation for old commands. Also modified + documentation of MAKE_DIRECTORY and REMOVE commands to indicate + they should not be used. + +2006-08-31 12:04 hoffman + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: ENH: fix possible + free memory use + +2006-08-31 10:47 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmInstallCommand.cxx, cmInstallFilesCommand.cxx, + cmInstallProgramsCommand.cxx, cmInstallTargetsCommand.cxx: ENH: + Do not generate install target unless some INSTALL or INSTALL_* + commands have been used. This addresses bug#2827. + +2006-08-31 10:46 king + + * Modules/CMakeDetermineRCCompiler.cmake: BUG: Need to search for + rc by default, not c++ compilers. + +2006-08-31 09:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-30 13:59 king + + * Source/kwsys/: CMakeLists.txt, kwsysPlatformCxxTests.cmake: COMP: + Fix try-compile to fail properly on HP. + +2006-08-30 13:51 alex + + * Modules/FindQt3.cmake: ENH: automatically find Qt3 on SUSE, patch + from Dirk Mueller and Stephan Kulow + + Alex + +2006-08-30 13:47 alex + + * Modules/FindPNG.cmake: ENH: also look in + /usr/local/include/libpng (OpenBSD) ENH: error out with + FATAL_ERROR if REQUIRED was given but png hasn't been found + + Alex + +2006-08-30 10:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-29 16:08 king + + * Source/cmGlobalKdevelopGenerator.cxx: ENH: Patch from Alex to fix + current working directory when running executables built in + KDevelop. + +2006-08-29 15:08 king + + * Source/cmInstallCommand.h: ENH: Add support to INSTALL(DIRECTORY) + to install an empty directory. This addresses bug#3572. + +2006-08-29 15:04 king + + * Source/cmFileCommand.cxx, Source/cmInstallCommand.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Add support to + INSTALL(DIRECTORY) to install an empty directory. This addresses + bug#3572. + +2006-08-29 13:59 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake, + CMakeDetermineRCCompiler.cmake: BUG: Search for the compiler only + once and store a full path to it in the cache. This avoids + problems with the case of locations in the PATH variable on + Windows that change the compiler name when CMake is re-run. + CMakeFiles/CMake*Compiler.cmake files should hold the full path + to the compiler always. + +2006-08-29 12:55 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: BUG: bad progress for named top + level targets + +2006-08-29 10:27 king + + * Source/cmStandardIncludes.h: COMP: Fix warnings in system headers + on VS6. + +2006-08-29 10:03 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: Adding install/local + global target for Makefile generators. This runs installation + only in the current directory and not subdirectories. + +2006-08-29 09:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-28 08:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-27 15:52 alex + + * Modules/: KDE3Macros.cmake, kde3uic.cmake: BUG: fix #3324: + KDE3Macros.cmake didn't find Qt designer plugins when running uic + (the kde plugin dir wasn't used) + + Alex + +2006-08-27 15:34 alex + + * Modules/FindKDE3.cmake: STYLE: remove unnecessary + /usr/local/include search path + + Alex + +2006-08-27 13:59 alex + + * Modules/FindQt3.cmake: BUG: #3514: qt-mt3.lib wasn't found on + windows STYLE: remove some (now) unnecessary /usr/lib, + /usr/local/lib, /usr/include and /usr/local/include search paths + + Alex + +2006-08-27 13:23 king + + * Source/cmStandardIncludes.h: COMP: Use new KWSys IOStream + component to help print large file size integer types to streams. + +2006-08-27 13:17 king + + * Source/kwsys/: CMakeLists.txt, IOStream.cxx, IOStream.hxx.in, + kwsysPlatformCxxTests.cxx: ENH: Adding KWSys component IOStream + to provide help with broken C++ stream libraries. + +2006-08-27 13:15 king + + * Source/: cmFileCommand.cxx, CPack/cmCPackNSISGenerator.cxx: COMP: + Need to use cmsys_stl when in CMake code, not kwsys_stl. + +2006-08-27 12:35 king + + * Source/kwsys/Glob.hxx.in: BUG: Need to undefine temporary macros + defined at top of file. + +2006-08-27 11:25 king + + * Source/kwsys/kwsysPlatformCxxTests.cmake: BUG: When a try-run + fails to compile create the run result cache entry with a bogus + non-zero return value to avoid running the test again. + +2006-08-27 11:19 alex + + * Modules/: CheckCSourceCompiles.cmake, + CheckCXXSourceCompiles.cmake: STYLE: fix #3519 (incorrect + comment) + + Alex + +2006-08-27 11:14 alex + + * Modules/FindKDE3.cmake: BUG: fix comment (#3511) + + Alex + +2006-08-27 10:19 alex + + * Modules/KDE3Macros.cmake: BUG: apply patch from bero (#3518) so + that DESTDIR is supported for installing icons + + Alex + +2006-08-27 09:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-27 09:34 alex + + * Modules/FindKDE3.cmake: ENH: #3225: first check the special + paths, the the default path, also for searching kde-config + + Alex + +2006-08-26 16:14 king + + * Source/kwsys/SystemTools.cxx: BUG: GetLineFromStream should + remove carriage return characters to make sure newlines do not + get duplicates. + +2006-08-26 15:17 king + + * Source/kwsys/kwsysPlatformCxxTests.cmake: BUG: Fix location of + CMakeOutput.log and CMakeError.log. + +2006-08-26 14:43 king + + * Source/cmMakefile.cxx: BUG: Reverting previous change until it is + further tested. + +2006-08-26 14:37 king + + * Source/cmMakefile.cxx: BUG: ConfigureFile must read/write in + binary mode to avoid windows newline trouble. The problem + occurred when configuring a file in cygwin from a path starting + with a windows drive letter instead of a posix path. + +2006-08-26 10:28 king + + * Source/: cmIfCommand.cxx, cmListCommand.cxx: STYLE: Fixed + line-too-long. + +2006-08-26 10:22 king + + * Source/cmLocalVisualStudio7Generator.cxx: STYLE: Fixed + line-too-long. + +2006-08-26 09:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-25 22:56 king + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: Fix for VS.NET 2003 SP1 to + make sure global target and utility target rules run every time. + +2006-08-25 22:56 king + + * Source/cmGlobalGenerator.cxx: BUG: Make sure targets of type + GLOBAL_TARGET have a makefile set. + +2006-08-25 21:21 king + + * CMakeLists.txt, bootstrap: ENH: Changing default data and doc + directories to share/cmake-V.v and doc/cmake-V.v instead of + share/CMake and doc/CMake for consistency with many linux + distribution conventions. + +2006-08-25 20:52 king + + * bootstrap: COMP: Fix for new kwsys Configure.h.in. + +2006-08-25 16:32 king + + * Source/kwsys/Configure.h.in: COMP: Disable _FILE_OFFSET_BITS + check until sys/types.h check is enabled. + +2006-08-25 16:31 king + + * Source/cmIfCommand.cxx, Source/cmIfCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Patch from Alex for + adding IF(FILE_IS_NEWER). I also added a test. + +2006-08-25 16:07 king + + * Source/kwsys/Configure.h.in: ENH: Separate the notion of a + request for LFS and its availability. Allow user code to block + definitions of LFS macros. Added framework to give error if + sys/types.h is included before this header when LFS is requested + (currently disabled). + +2006-08-25 16:00 king + + * Source/kwsys/: CMakeLists.txt, Configure.h.in, + RequireLargeFilesSupport.cxx, kwsysPlatformCxxTests.cxx: ENH: + Moved test for large file support into kwsysPlatformCxxTests.cxx + with name KWSYS_LFS_WORKS. + +2006-08-25 15:53 king + + * Source/kwsys/: CMakeLists.txt, kwsysPlatformCxxTests.cxx: ENH: + Switching KWSYS_CHAR_IS_SIGNED test to use + KWSYS_PLATFORM_CXX_TEST_RUN macro. + +2006-08-25 15:50 king + + * Source/kwsys/kwsysPlatformCxxTests.cmake: ENH: Added + KWSYS_PLATFORM_CXX_TEST_RUN macro. + +2006-08-25 12:13 king + + * Source/kwsys/Glob.cxx: ENH: Globbing patterns should not match a + slash inside a filename component. + +2006-08-25 12:11 king + + * Source/cmFileCommand.cxx: BUG: Avoid putting double-slashes in + fromFile during installation. Also added regex debugging copy of + the expression in string form. + +2006-08-25 09:14 king + + * Modules/UseSWIG.cmake: ENH: Added interface to add extra + dependencies. + +2006-08-25 05:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-24 14:58 king + + * Source/: cmCommandArgumentParser.cxx, cmCommandArgumentParser.y: + COMP: Added missing include for malloc on QNX. + +2006-08-24 10:57 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Always do tar.Z since we do + have compress now builtin + +2006-08-24 09:47 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Added code to remove any bad + installations of CVS directories before running the test so that + one failure does not need manual adjustment to get it to pass + again. + +2006-08-24 09:34 king + + * Source/cmStandardLexer.h: COMP: Add missing malloc.h include for + QNX. + +2006-08-24 09:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-23 18:11 alex + + * Modules/UseEcos.cmake: ENH: add i386 toolchain and some minor + improvement of the comments + +2006-08-23 12:02 andy + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentParser.cxx, + cmCommandArgumentParser.y, cmDependsJavaLexer.cxx, + cmExprLexer.cxx: COMP: Attempt to fix aix build + +2006-08-23 10:21 martink + + * Source/cmIncludeDirectoryCommand.cxx: ENH: fix bad error + reporting with not found paths + +2006-08-23 10:00 andy + + * Source/cmStandardIncludes.h: COMP: Add large files support to + CMake + +2006-08-23 09:47 king + + * Source/kwsys/Terminal.c: ENH: Added '256color' terminal names. + Patch applied from bug#3651. + +2006-08-23 09:45 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Centralized generation of + targets listed in the help to be done by the code that actually + writes the targets. + +2006-08-23 09:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-23 08:07 andy + + * Source/kwsys/CMakeLists.txt: COMP: Support cmake older than 2.4 + +2006-08-22 18:33 alex + + * Modules/UseEcos.cmake: STYLE: don't use the hack to copy and + rename the created executable under cygwin but instead use the + SUFFIX target property (I'll publish a short article about + ecos+cmake RSN) + + Alex + +2006-08-22 16:07 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Handle more warnings + properly on AIX + +2006-08-22 15:51 andy + + * Source/kwsys/CheckCXXSourceRuns.cmake: COMP: On some project + configure may not copy right away + +2006-08-22 15:46 andy + + * Source/kwsys/: CMakeLists.txt, CheckCXXSourceRuns.cmake, + CMakeEmptyInputFile.in: COMP: Add missing cmake file + +2006-08-22 15:34 andy + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.h.in, + Source/kwsys/RequireLargeFilesSupport.cxx: ENH: Support large + file systems in kwsys + +2006-08-22 10:38 king + + * Source/: cmDocumentation.cxx, cmInstallCommand.h: BUG: Fixed man + page formatting for INSTALL command documentation. Fixed + line-too-long warning. + +2006-08-22 10:16 andy + + * Source/: cmListCommand.cxx, cmListCommand.h: BUG: Add missing API + +2006-08-22 09:52 andy + + * Source/cmListCommand.cxx: BUG: Fix error messages and fix remove + item to actually remove all instances of the item + +2006-08-22 09:20 andy + + * Source/CPack/cmCPackTarCompressGenerator.cxx: COMP: Remove + warnings + +2006-08-22 08:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-21 22:39 king + + * Source/kwsys/Glob.cxx: BUG: Fixed #if test for case-insensitive + glob on OSX. + +2006-08-21 17:52 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Added check for bad + installation of a CVS directory to test. + +2006-08-21 17:47 king + + * Source/: cmFileCommand.cxx, cmInstallCommand.cxx: BUG: Directory + installation pattern matching should be case insensitive on some + platforms. + +2006-08-21 17:37 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Need to execute + sample_script.bat on windows and sample_script otherwise. + +2006-08-21 17:34 king + + * Source/kwsys/SystemTools.cxx: BUG: FileIsDirectory should work + when the name contains a trailing slash. + +2006-08-21 16:55 king + + * Source/cmFileCommand.cxx, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, + Source/cmInstallDirectoryGenerator.cxx, + Source/cmInstallDirectoryGenerator.h, + Source/cmInstallGenerator.cxx, Source/cmInstallGenerator.h, + Source/cmInstallTargetGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/scripts/sample_script, + Tests/SimpleInstall/scripts/sample_script.bat, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/scripts/sample_script, + Tests/SimpleInstallS2/scripts/sample_script.bat: ENH: Implemented + INSTALL(DIRECTORY) command and added a test. Re-organized + cmFileCommand's implementation of FILE(INSTALL) a bit to help + out. This addresses bug#1694 and partially addresses bug#2691. + +2006-08-21 14:17 king + + * Source/kwsys/: Glob.cxx, Glob.hxx.in: ENH: Exposed pattern->regex + API. Cleaned up and commented implementation of pattern->regex + conversion. + +2006-08-21 12:37 andy + + * Source/: CMakeLists.txt, CPack/cmCPackTarCompressGenerator.cxx, + CPack/cmCPackTarCompressGenerator.h: ENH: Implement TarCompress + generator using compress library + +2006-08-21 10:49 king + + * Source/cmFileCommand.cxx: BUG: RENAME option should be allowd for + INSTALL(PROGRAMS) too. + +2006-08-21 10:10 hoffman + + * Modules/: CheckCSourceCompiles.cmake, CheckCSourceRuns.cmake, + CheckCXXSourceCompiles.cmake, CheckCXXSourceRuns.cmake: ENH: fixs + for check compile stuff from Oswald B. + +2006-08-21 08:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-20 06:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-19 06:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-18 08:57 king + + * Source/: cmAddCustomTargetCommand.h, cmStandardLexer.h: STYLE: + Fixed line-too-long style errors. + +2006-08-18 08:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-17 16:40 hoffman + + * Source/CMakeLists.txt: ENH: fix project names to be case + sensitive and change name to linkline from inkline + +2006-08-17 15:42 king + + * Source/cmFileCommand.cxx: BUG: Bundle installation needs all file + permissions to be preserved from the build tree. + +2006-08-17 15:06 king + + * Source/cmAddCustomTargetCommand.h: ENH: Making documentation even + less ambiguous since some users still think this command can + generate a file with dependencies. + +2006-08-17 14:48 king + + * Source/: CMakeLists.txt, cmFileCommand.cxx, cmInstallCommand.cxx, + cmInstallCommand.h, cmInstallDirectoryGenerator.cxx, + cmInstallDirectoryGenerator.h, cmInstallFilesGenerator.cxx, + cmInstallFilesGenerator.h, cmInstallGenerator.cxx, + cmInstallGenerator.h, cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h: ENH: Started implementing + INSTALL(DIRECTORY) command mode. This is not yet finished so it + is undocumented and there is no test. These changes also + separate the notions of file and directory permissions. + +2006-08-17 12:07 king + + * Source/cmFileCommand.cxx: ENH: Fix directory installation to + properly deal with trailing slash names (using the rsync + convention for whether the last directory name is included in + naming the destination directory). + +2006-08-17 12:04 martink + + * Utilities/cmcompress/cmcompress.c: ENH: reorder code to remove + forward declarations + +2006-08-17 12:02 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Added + JoinPath overload that accepts an iterator range. + +2006-08-17 09:45 king + + * Utilities/cmcompress/cmcompress.c: COMP: Fixed linkage specifier + consistency warning. + +2006-08-17 09:36 king + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: Implemented + support for installing VC8 runtime libraries. + +2006-08-17 09:35 king + + * Utilities/Release/Release.cmake: BUG: Removed code that is now in + Modules/InstallRequiredSystemLibraries.cmake. + +2006-08-17 07:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-16 14:22 hoffman + + * Source/: cmDependsFortranLexer.cxx, cmDependsFortranLexer.h, + cmDependsFortranLexer.in.l: ENH: revert change in parser as it + sent the parser into an infinite loop + +2006-08-16 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-15 15:33 king + + * Modules/CMakeVCManifest.cmake, Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx: ENH: Adding flags to + force generation of manifest files when building with VC 8. + +2006-08-15 15:28 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx: BUG: Need to clean manifest + files that may have been generated for .exe and .dll files. + +2006-08-15 12:00 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx: + BUG: Added object language to list of object files in a local + generator's directory. Fixed generation of preprocessing and + assembly rules to be done only for C and C++ objects. + +2006-08-15 10:56 hoffman + + * Source/: cmDependsFortranLexer.cxx, cmDependsFortranLexer.h, + cmDependsFortranLexer.in.l: ENH: change comment for fortran + depend parsing + +2006-08-15 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-14 17:30 hoffman + + * Utilities/cmcompress/cmcompress.c: ENH: remove c++ comments from + c code + +2006-08-14 17:02 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: do not use OBJROOT or you + can get two copies of executables + +2006-08-14 14:16 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: add newline for + some versions of make + +2006-08-14 11:32 andy + + * Utilities/cmcompress/cmcompress.c: COMP: Remove warnings + +2006-08-14 10:59 andy + + * Utilities/cmcompress/cmcompress.c: COMP: Remove more warnings + +2006-08-14 10:51 andy + + * Source/: cmMakefileTargetGenerator.cxx, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestStartCommand.cxx: + ENH: fix for no newline on some makes fix for ctest and some + symlinks + +2006-08-14 09:58 andy + + * Utilities/cmcompress/: cmcompress.c, cmcompress.h: COMP: Remove + some warnings and make library report an error instead of call + exit + +2006-08-14 09:50 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: still escape () but do not + escape + +2006-08-14 08:54 andy + + * CMakeLists.txt: ENH: Start building compress library + +2006-08-14 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-13 07:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-12 07:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-11 10:54 martink + + * Source/kwsys/SystemTools.cxx: ENH: fix for AddKeepPath not + calling realpath + +2006-08-11 09:56 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: escape ( and ) in unix paths + +2006-08-11 07:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-10 23:20 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: fix error in if statement + +2006-08-10 15:17 david.cole + + * Source/kwsys/SystemTools.cxx: BUG: strlen logic was backwards + resulting in function body never actually executing... when + called with valid strings, it was always doing nothing and + returning false... now it works as expected. + +2006-08-10 11:05 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: only change the + cache if the value was really changed + +2006-08-10 09:38 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: fix failing tests + +2006-08-10 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-09 13:59 king + + * Modules/Platform/AIX.cmake: ENH: Enabling preprocessed source and + asembly source generation rules on AIX compilers. + +2006-08-09 13:45 king + + * Modules/Platform/Windows-cl.cmake: ENH: Enabled generation of + preprocessed and assembly source rules for MSVC with NMake. + +2006-08-09 13:14 king + + * Modules/Platform/: IRIX.cmake, IRIX64.cmake: ENH: Enabling + preprocessed source and asembly source generation rules on SGI + MIPSpro compilers. + +2006-08-09 13:10 king + + * Modules/Platform/HP-UX.cmake: ENH: Enabling preprocessed source + and asembly source generation rules on HP aCC and cc. + +2006-08-09 11:48 king + + * Modules/Platform/SunOS.cmake: ENH: Enabling preprocessed source + and asembly source generation rules on Sun CC. + +2006-08-09 11:43 king + + * Modules/Platform/gcc.cmake, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileTargetGenerator.cxx: ENH: Changed preprocessed + source extension to .i and assembly extension to .s for more + portability. + +2006-08-09 11:32 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: try to fix compress failure + +2006-08-09 09:56 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Added options + CMAKE_SKIP_PREPROCESSED_SOURCE_RULES and + CMAKE_SKIP_ASSEMBLY_SOURCE_RULES to allow projects to disable + generation of .E and .S rules. + +2006-08-09 09:45 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l, + cmStandardLexer.h: COMP: Fix warnings produced by the change in + include order from the re-organization of lexer code. + +2006-08-09 07:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-08 15:55 hoffman + + * Source/CTest/cmCTestBuildAndTestHandler.cxx: ENH: add cmake + output to build and test + +2006-08-08 14:00 king + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.in.l, + cmDependsFortranLexer.cxx, cmDependsFortranLexer.in.l, + cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l, cmExprLexer.cxx, + cmExprLexer.in.l, cmListFileLexer.c, cmListFileLexer.in.l, + cmStandardLexer.h: COMP: Moved duplicate flex-generated lexer + warning suppression and cross-platform support code to a single + cmStandardLexer.h included by all lexer sources. Added fix for + macro redefinitions on Borland 5.8 compiler. + +2006-08-08 13:44 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: make sure + RuleVariable struct is initialized correctly, also make sure + custom command targets do not crash cmake + +2006-08-08 13:02 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: STYLE: Fixed line + length. + +2006-08-08 11:26 king + + * Source/cmLocalVisualStudioGenerator.cxx: BUG: Duplicate object + name detection should not be case sensitive since this code is + used on Windows file systems. This addresses bug#3589. + +2006-08-08 07:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-07 23:25 king + + * Modules/Platform/gcc.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmMakefileTargetGenerator.cxx: ENH: Added generation of + rules to manually request preprocessed or generated assembly + sources. + +2006-08-07 17:22 king + + * Source/cmake.cxx: ENH: Added undocumented option -E + cmake_unimplemented_variable to help print useful error messages + for unimplemented features on a given platform. + +2006-08-07 10:10 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: finally fix the failing test + on the dashboard for the past month or so + +2006-08-07 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-06 07:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-05 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-04 10:35 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: give up on try run + +2006-08-04 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-03 15:20 hoffman + + * Modules/CheckCXXSourceRuns.cmake: ENH: add a try run source code + macro + +2006-08-03 14:38 hoffman + + * Modules/CheckCSourceRuns.cmake: ENH: fix error + +2006-08-03 14:36 hoffman + + * Modules/CheckCSourceRuns.cmake, Utilities/cmtar/CMakeLists.txt: + ENH: fix for makedev three args test + +2006-08-03 13:51 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: use try run source + +2006-08-03 13:41 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: change to a try run so that + it will fail on the sun + +2006-08-03 13:41 hoffman + + * Modules/: CheckCSourceCompiles.cmake, CheckCSourceRuns.cmake: + ENH: add a crun macro and fix the output log for compile c + +2006-08-03 09:42 king + + * Source/: cmMakefileLibraryTargetGenerator.cxx, + cmSetTargetPropertiesCommand.h, cmTarget.cxx: ENH: Added target + property CLEAN_DIRECT_OUTPUT to not clean all forms of a library + name so that static and shared libraries of the same name can + coexist in a single build directory. + +2006-08-03 09:26 king + + * Source/cmLocalVisualStudioGenerator.cxx, + Tests/Complex/Executable/A.txt, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/A.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/A.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt: BUG: Make + sure sources with unknown extensions are not compiled by VS. + +2006-08-03 09:26 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Moved GetSourceFileLanguage + up to cmLocalGenerator. + +2006-08-03 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-02 21:30 king + + * Source/cmInstallTargetGenerator.cxx: STYLE: Fixed long line. + +2006-08-02 21:24 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: use dev_t instead of major_t + and minor_t + +2006-08-02 12:51 david.cole + + * Utilities/cmtar/CMakeLists.txt: COMP: libtar should build when + included in non-CMake projects... + +2006-08-02 11:06 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Restoring previous change + with a fix. + +2006-08-02 07:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-08-01 19:52 hoffman + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: undo change that broke + borland 5.6 cont + +2006-08-01 16:16 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Moved generation of + directory-level object convenience rules to a separate method. + This will aid generation of more such rules later. + +2006-08-01 16:01 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: make cmake build with older + versions of cmake + +2006-08-01 15:48 hoffman + + * Modules/FindQt4.cmake: ENH: fix for qtmain + +2006-08-01 15:36 king + + * Modules/Platform/Linux.cmake, + Source/cmInstallTargetGenerator.cxx: BUG: Fixed shared library + version support for Fortran. This addresses bug#3558. + +2006-08-01 15:26 hoffman + + * Utilities/cmtar/CMakeLists.txt: ENH: add a try compile test for + makedev_three_args + +2006-08-01 15:24 hoffman + + * Modules/: CheckCSourceCompiles.cmake, FindQt4.cmake: ENH: fix for + location of error log + +2006-08-01 15:16 glehmann + + * Source/kwsys/Directory.cxx: BUG: #3563. Segmentation fault with + non initialized input or NULL pointers. + +2006-08-01 14:45 king + + * Source/kwsys/: Registry.cxx, testCommandLineArguments.cxx, + testCommandLineArguments1.cxx, testSystemTools.cxx: COMP: Added + missing headers. This partially addresses bug#3556. + +2006-08-01 14:34 hoffman + + * Modules/FindQt4.cmake: ENH: add QtCored as a possible name for + qtcore debug + +2006-08-01 14:33 king + + * Source/cmMakefile.cxx: ENH: Added platform identifier for QNXNTO. + This partially addresses bug#3556. + +2006-08-01 14:31 king + + * Source/: cmCPluginAPI.cxx, cmLoadCommandCommand.cxx: COMP: Added + missing includes. This partially addresses bug#3556. + +2006-08-01 14:28 king + + * Source/kwsys/ProcessUNIX.c: COMP: Use SA_RESTART only if it is + defined for the current platform. This partially addresses + bug#3556. + +2006-08-01 14:10 king + + * Modules/FindKDE3.cmake: BUG: Fix usage of FIND_PROGRAM command. + +2006-08-01 12:27 hoffman + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: fix for optimized + debug stuff + +2006-08-01 11:38 king + + * Source/cmCommandArgumentLexer.cxx, + Source/cmCommandArgumentLexer.in.l, + Source/cmCommandArgumentParser.cxx, + Source/cmCommandArgumentParser.y, + Source/cmDependsFortranLexer.cxx, + Source/cmDependsFortranLexer.in.l, + Source/cmDependsFortranParser.cxx, + Source/cmDependsFortranParser.y, Source/cmDependsJavaLexer.cxx, + Source/cmDependsJavaLexer.in.l, Source/cmDependsJavaParser.cxx, + Source/cmDependsJavaParser.y, Source/cmExprLexer.cxx, + Source/cmExprLexer.in.l, Source/cmExprParser.cxx, + Source/cmExprParser.y, Source/cmListFileCache.cxx, + Source/cmListFileLexer.c, Source/cmListFileLexer.in.l, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmSetCommand.cxx, + Source/cmStandardIncludes.h, Source/cmTarget.cxx, + Source/cmWin32ProcessExecution.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/kwsys/CommandLineArguments.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/testProcess.c, + Utilities/cmcurl/CMakeLists.txt, Utilities/cmtar/CMakeLists.txt, + Utilities/cmxmlrpc/CMakeLists.txt, + Utilities/cmzlib/CMakeLists.txt: COMP: Fix and/or disable + warnings for Borland 5.6 build. + +2006-08-01 11:26 hoffman + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: fix qtmain for + release + +2006-08-01 10:51 hoffman + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: fix qtmain for + release + +2006-08-01 10:49 king + + * Tests/: Complex/Executable/A.cxx, Complex/Executable/A.h, + Complex/Executable/A.hh, Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/A.cxx, + ComplexOneConfig/Executable/A.h, + ComplexOneConfig/Executable/A.hh, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/A.cxx, + ComplexRelativePaths/Executable/A.h, + ComplexRelativePaths/Executable/A.hh, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: Adding test + for source files and header files with the same base name in the + same target. + +2006-08-01 10:48 king + + * Source/: cmLocalVisualStudioGenerator.cxx, + cmLocalVisualStudioGenerator.h, cmMakefile.cxx: ENH: Adding .hh + file as a C++ header file extension. Remove duplicate code from + implementation of unique object name computation for VS + generators. This addresses bug#3565. + +2006-08-01 09:12 hoffman + + * Modules/FindQt4.cmake: ENH: put back find qtmain + +2006-08-01 07:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-31 16:59 andy + + * Utilities/cmcompress/: CMakeLists.txt, cmcompress.c, + cmcompress.h, compress.c.original: ENH: Initial import + +2006-07-31 13:50 martink + + * Source/kwsys/: SystemTools.hxx.in, testSystemTools.cxx: ENH: + better coverage + +2006-07-31 11:00 hoffman + + * Utilities/Release/cmake_release.sh: ENH: move release branch + +2006-07-31 10:28 martink + + * Source/CPack/cpack.cxx: ENH: fix line lengths + +2006-07-31 07:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-30 07:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-29 07:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-28 14:47 martink + + * Source/kwsys/testSystemTools.cxx: BUG: fix some bad code and add + a couple more tests + +2006-07-28 14:20 martink + + * Docs/: CMake12p2.rtf, CMake14.rtf, CMake16.rtf: ENH: remove old + files + +2006-07-28 12:00 hoffman + + * ChangeLog.manual, Source/cmLocalVisualStudio7Generator.cxx: ENH: + move stuff from main tree + +2006-07-28 11:21 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for 3557 + TargetEnvironment for MIDL Compiler set correctly for 64 bit + +2006-07-28 11:13 hoffman + + * ChangeLog.manual: ENH: changes on branch + +2006-07-28 09:22 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Add test for bz2 and check + for compress + +2006-07-28 09:14 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: move from main tree + +2006-07-28 09:14 andy + + * Source/CPack/cpack.cxx: BUG: Bail out on generator initialization + failure + +2006-07-28 08:57 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: move from main tree + +2006-07-28 08:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-27 15:02 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Set + GCC_SYMBOLS_PRIVATE_EXTERN and GCC_INLINES_ARE_PRIVATE_EXTERN + attributes on all projects to prevent -fvisibility=hidden flags. + This is needed to make RTTI work by default. + +2006-07-27 11:55 andy + + * Source/CPack/cpack.cxx: BUG: Fix executing and help + +2006-07-27 11:27 king + + * Source/kwsys/SystemTools.cxx: BUG: Do not block signals during + sleep. Leave that up to the application. + +2006-07-27 11:26 andy + + * Source/CPack/cpack.cxx: BUG: Prevent crash when no input file or + generator specified + +2006-07-27 10:37 hoffman + + * ChangeLog.manual, bootstrap, + Modules/CMakeCommonLanguageInclude.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, Source/cmMakefile.cxx, + Source/cmSystemTools.cxx, Source/CTest/cmCTestTestHandler.cxx, + Tests/LoadCommand/LoadedCommand.cxx, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/LoadedCommand.cxx, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: + move changes from main tree to branch + +2006-07-27 09:40 king + + * Source/CTest/cmCTestHandlerCommand.cxx: BUG: Fix error message + when handler cannot be created. + +2006-07-27 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-26 14:46 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix comment + +2006-07-26 14:10 andy + + * bootstrap, Modules/CMakeTestCCompiler.cmake: COMP: More warnings + and hp issues + +2006-07-26 13:19 hoffman + + * Modules/CMakeCommonLanguageInclude.cmake: BUG: fix for 3550 + again + +2006-07-26 11:46 andy + + * bootstrap, Modules/CMakeTestCCompiler.cmake, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmIncludeDirectoryCommand.cxx, Source/cmMakefile.cxx, + Source/cmSystemTools.cxx, Source/CTest/cmCTestTestHandler.cxx: + COMP: Handle both ansi and non-ansi C + +2006-07-26 11:15 hoffman + + * Modules/Platform/Windows-cl.cmake: BUG: fix for bug 3550, for + release builds do not build incremental + +2006-07-26 10:11 hoffman + + * bootstrap: ENH: put back so it works on hp + +2006-07-26 09:11 hoffman + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: do not + use c++ comments in c code + +2006-07-26 08:35 hoffman + + * CTestCustom.ctest.in, ChangeLog.manual, bootstrap, + Modules/CMakeImportBuildSettings.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Source/kwsys/testSystemTools.cxx, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: + move changes from main tree + +2006-07-26 07:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-25 15:18 king + + * Source/kwsys/SystemTools.cxx: BUG: Mask signals during + SystemTools::Delay to avoid interrupted sleep. + +2006-07-25 14:32 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: BUG: remove + command causing issues with mid build reruns of cmake on vs70 + +2006-07-25 14:15 martink + + * Source/kwsys/testSystemTools.cxx: COMP: fix compile issue + +2006-07-25 12:38 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: trying a + slight change + +2006-07-25 12:08 martink + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in, + testSystemTools.cxx: BUG: some bug fixes, better docs, and more + coverage + +2006-07-25 11:00 andy + + * bootstrap: COMP: Remove warning + +2006-07-25 10:46 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: BUG: remove + c++comments + +2006-07-25 10:01 hoffman + + * Source/CPack/cmCPackGenerators.cxx: ENH: remove uncompiled header + +2006-07-25 08:27 hoffman + + * CTestCustom.ctest.in: ENH: try to get rid of clock skew warning + +2006-07-25 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-24 16:58 hoffman + + * Modules/CMakeImportBuildSettings.cmake: ENH: fix for case + difference with nmake + +2006-07-24 16:35 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: BUG: temp fix + +2006-07-24 16:13 martink + + * Modules/Platform/Windows-cl.cmake: BUG: fix for CXX only projects + +2006-07-24 15:40 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: add + more coverage + +2006-07-24 11:27 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + kwsys/SystemTools.cxx: ENH: allow for source tree to be in root + directory + +2006-07-24 11:19 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, Modules/CPack.cmake, + Modules/FindBoost.cmake, Modules/FindKDE4.cmake, + Modules/FindOpenGL.cmake, Modules/FindwxWidgets.cmake, + Modules/FindwxWindows.cmake, Modules/Use_wxWindows.cmake, + Modules/UsewxWidgets.cmake, Modules/readme.txt, + Source/CMakeLists.txt, Source/cmBuildCommand.cxx, + Source/cmCTest.cxx, Source/cmFindBase.cxx, Source/cmFindBase.h, + Source/cmFindLibraryCommand.cxx, Source/cmFindPackageCommand.cxx, + Source/cmFindPathCommand.cxx, Source/cmFindProgramCommand.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmLocalVisualStudioGenerator.cxx, + Source/cmLocalVisualStudioGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmSetSourceFilesPropertiesCommand.cxx, + Source/cmStandardIncludes.h, Source/cmake.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, Source/CPack/cpack.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestConfigureCommand.cxx, + Source/CTest/cmCTestHandlerCommand.cxx, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestStartCommand.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestUpdateCommand.cxx, + Source/WXDialog/CMakeLists.txt, + Source/WXDialog/bin/FindUPX.cmake, + Source/WXDialog/bin/FindwxW.cmake, + Source/WXDialog/bin/FindwxWin.cmake, + Source/WXDialog/bin/UsewxW.cmake, Source/kwsys/CMakeLists.txt, + Source/kwsys/CommandLineArguments.cxx, + Source/kwsys/CommandLineArguments.hxx.in, Source/kwsys/Glob.cxx, + Source/kwsys/ProcessWin32.c, Source/kwsys/Registry.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/Terminal.c, + Source/kwsys/kwsys_ios_iostream.h.in, + Source/kwsys/testCommandLineArguments.cxx, + Source/kwsys/testCommandLineArguments1.cxx, + Tests/BundleTest/BundleLib.cxx, Tests/BundleTest/CMakeLists.txt, + Tests/BundleTest/BundleSubDir/CMakeLists.txt, + Tests/CTestTest/test.cmake.in, Tests/CxxOnly/CMakeLists.txt, + Tests/CxxOnly/cxxonly.cxx, Tests/CxxOnly/libcxx1.cxx, + Tests/CxxOnly/libcxx1.h, Tests/CxxOnly/libcxx2.cxx, + Tests/CxxOnly/libcxx2.h, Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommand/LoadedCommand.cxx.in, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/CMakeLists.txt, + Tests/LoadCommandOneConfig/LoadedCommand.cxx.in, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c, + Tests/OutOfSource/simple.cxx, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/UseWX/CMakeLists.txt, Tests/UseWX/WX.cxx, + Utilities/cmcurl/Testing/ftpget.c, + Utilities/cmcurl/Testing/ftpgetresp.c, + Utilities/cmcurl/Testing/ftpupload.c, Utilities/cmtar/block.c, + Utilities/cmtar/libtar.c, Utilities/cmtar/compat/strlcpy.c, + Utilities/cmtar/listhash/list.c.in: ENH: move changes from main + tree to release branch + +2006-07-24 09:43 martink + + * Tests/CTestTest/test.cmake.in: ENH: more coverage + +2006-07-24 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-23 07:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-22 08:11 king + + * Modules/CMakeDetermineCXXCompiler.cmake: BUG: CMAKE_AR should be + advanced. + +2006-07-22 08:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-21 15:43 king + + * Modules/FindwxWidgets.cmake, Modules/FindwxWindows.cmake, + Modules/Use_wxWindows.cmake, Modules/UsewxWidgets.cmake, + Source/CMakeLists.txt, Source/WXDialog/CMakeLists.txt, + Source/WXDialog/bin/FindUPX.cmake, + Source/WXDialog/bin/FindwxW.cmake, + Source/WXDialog/bin/FindwxWin.cmake, + Source/WXDialog/bin/UsewxW.cmake, Tests/UseWX/CMakeLists.txt, + Tests/UseWX/WX.cxx: ENH: Applying patch from bug#3443 to + implement FindwxWidgets.cmake properly. It also updates the + UseWX test and WXDialog sources to use the new find script. + +2006-07-21 15:20 king + + * Utilities/Release/config_Darwin: ENH: Do not include experimental + WXDialog in release. + +2006-07-21 15:16 king + + * Modules/readme.txt: ENH: Added documentation about + XXX_FIND_COMPONENTS for FIND_PACKAGE. + +2006-07-21 14:58 martink + + * Source/: cmCTest.cxx, cmake.cxx: ENH: fix color output inside of + ctest runs + +2006-07-21 14:02 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.cxx.in, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.cxx.in, + LoadCommand/LoadedCommand.cxx, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: BUG: work + around XCode issue + +2006-07-21 13:05 andy + + * Source/cmake.cxx: ENH: Cleanup. Replace c-style cast with + static_cast and replace sprintf with cmOStringStream + +2006-07-21 12:04 king + + * Modules/FindBoost.cmake: ENH: Adding FindBoost.cmake module from + Andrew Maclean. This addresses bug#3447. + +2006-07-21 11:53 king + + * Modules/CMakeDetermineCXXCompiler.cmake, Source/CMakeLists.txt: + BUG: Fixed building of C++-only projects and added a test. + +2006-07-21 11:43 king + + * Tests/CxxOnly/: CMakeLists.txt, cxxonly.cxx, libcxx1.cxx, + libcxx1.h, libcxx2.cxx, libcxx2.h: ENH: Adding C++-only test. + +2006-07-21 10:26 martink + + * Tests/: CTestTest/test.cmake.in, LoadCommand/CMakeLists.txt, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: increase + coverage in a couple places + +2006-07-21 08:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-20 09:35 king + + * Source/kwsys/Terminal.c: BUG: Do not display VT100 escapes inside + emacs even if TERM is set to xterm. + +2006-07-20 08:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-19 08:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-18 15:21 king + + * Source/: cmFindBase.cxx, cmFindBase.h, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx: BUG: If the user + specifies a cache entry on the command line without a type, the + FIND_* commands should add the type and docstring to the given + value and put it back in the cache. + +2006-07-18 13:16 king + + * Modules/readme.txt: STYLE: Added note about singular versus + plural name for XXX_INCLUDE_DIRS. Added XXX_LIBRARY_DIRS and + XXX_YY_INCLUDE_DIR conventions. + +2006-07-18 13:02 king + + * Source/kwsys/kwsys_ios_iostream.h.in: COMP: Fix references to + cin, cout, cerr, and clog in case of HP aCC compiler with -mt + flag. + +2006-07-18 09:32 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalVisualStudioGenerator.cxx: STYLE: fix long lines + +2006-07-18 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-17 13:34 king + + * Source/kwsys/ProcessWin32.c: BUG: When handing the child stdin + pipe a file, allow another process to be writing to the file at + the same time. This allows children such as tail -f to function + properly. + +2006-07-17 11:07 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix warning + +2006-07-17 09:15 andy + + * Source/kwsys/testCommandLineArguments1.cxx: COMP: Only delete + once + +2006-07-17 08:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-16 21:11 andy + + * Source/kwsys/: testCommandLineArguments.cxx, + testCommandLineArguments1.cxx: COMP: Remove some warnings + +2006-07-16 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-15 08:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-14 15:02 andy + + * Source/kwsys/: CMakeLists.txt, CommandLineArguments.cxx, + CommandLineArguments.hxx.in, testCommandLineArguments.cxx, + testCommandLineArguments1.cxx: ENH: Add a way to get unused + arguments and add a test + +2006-07-14 13:59 andy + + * Source/kwsys/CommandLineArguments.hxx.in: COMP: Remove warning + +2006-07-14 13:32 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: It does not really makes sense + to have Boolean Argument List + +2006-07-14 09:13 andy + + * Source/kwsys/: CMakeLists.txt, CommandLineArguments.cxx, + CommandLineArguments.hxx.in, SystemTools.cxx, + testCommandLineArguments.cxx: ENH: Add support for + multi-arguments: -f arg1 arg2 arg3 ... and support for lists: -f + arg1 -f arg2 -f arg3 ... and for boolean to be stored as strings + and doubles + +2006-07-14 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-13 14:03 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: added progress to + custom commands with comments + +2006-07-13 11:30 andy + + * Utilities/cmtar/listhash/list.c.in: COMP: Remove warning + +2006-07-13 09:26 andy + + * Utilities/cmtar/libtar.c, Utilities/cmtar/compat/strlcpy.c, + Utilities/cmtar/listhash/list.c.in, Source/cmStandardIncludes.h, + Source/kwsys/SystemTools.cxx: COMP: Remove warnings + +2006-07-13 09:13 andy + + * Source/CTest/cmCTestTestHandler.cxx: STYLE: Fix kwstyle + +2006-07-13 09:07 andy + + * Source/kwsys/Registry.cxx: COMP: Remove warnings + +2006-07-13 07:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-12 16:30 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestTestHandler.cxx: + ENH: Remove debug + +2006-07-12 16:21 andy + + * Source/kwsys/Registry.cxx: BUG: Fix error conditions + +2006-07-12 14:41 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix old compiler + issue + +2006-07-12 14:15 martink + + * Source/: cmMakefileTargetGenerator.cxx, + cmMakefileTargetGenerator.h: BUG: reduce the number of file + handles kept open + +2006-07-12 13:11 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: added progress for subdir + all targets and fixed compiler waring + +2006-07-12 09:21 andy + + * Source/CTest/cmCTestTestHandler.cxx: STYLE: Remove debug + +2006-07-12 09:20 andy + + * Source/kwsys/CommandLineArguments.cxx, Source/kwsys/Glob.cxx, + Source/kwsys/Registry.cxx, Source/kwsys/SystemTools.cxx, + Utilities/cmtar/block.c, Utilities/cmtar/libtar.c, + Utilities/cmtar/compat/strlcpy.c, + Utilities/cmtar/listhash/list.c.in: COMP: Remove warnings + +2006-07-12 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-11 17:10 king + + * Source/cmFindPackageCommand.cxx: ENH: Added creation of + XXX_FIND_COMPONENTS list of all components requested with + REQUIRED option. This addresses the feature request in bug#3494. + +2006-07-11 16:08 andy + + * Source/cmCTest.cxx: COMP: Fix stl string access + +2006-07-11 15:58 andy + + * Source/: cmCTest.cxx, CTest/cmCTestConfigureCommand.cxx, + CTest/cmCTestHandlerCommand.cxx, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestUpdateCommand.cxx: + BUG: Try to fix the problem of bad test names + +2006-07-11 13:23 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: ENH: Made + cmLocalVisualStudioGenerator a superclass of + cmLocalVisualStudio6Generator. Implemented object file unique + naming when multiple sources share the same name. + +2006-07-11 11:41 king + + * Source/: CMakeLists.txt, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, + cmLocalVisualStudioGenerator.cxx, cmLocalVisualStudioGenerator.h: + ENH: Moved unique object file name computation from + cmLocalUnixMakefileGenerator3 up to cmLocalGenerator for use by + all generators. Created cmLocalVisualStudioGenerator as + superclass for all VS generators. Implemented on-demand unique + object file name computation for VS 7 generator to avoid slow + compiles when all sources are in subdirectories. + +2006-07-11 11:08 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: fix compile warning + +2006-07-11 09:55 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx, + cmMakefileTargetGenerator.h: BUG: changed to progress to make it + more flexible and to no relink targets as often + +2006-07-11 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-10 07:59 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: COMP: Remove warnings + and style problems + +2006-07-10 07:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-10 07:52 andy + + * Source/: cmMakefileTargetGenerator.cxx, CPack/cpack.cxx: STYLE: + Fix some style errors + +2006-07-09 13:48 andy + + * Utilities/cmcurl/Testing/: ftpget.c, ftpgetresp.c, ftpupload.c: + COMP: Remove errors + +2006-07-09 13:20 andy + + * Modules/CPack.cmake, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, Source/CPack/cpack.cxx: + ENH: Several cleanups and support for multiple generators + +2006-07-09 13:19 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Add a copy + constructor to copy the values + +2006-07-09 13:18 andy + + * Source/: cmBuildCommand.cxx, cmCTest.cxx: ENH: Pass -C flag to + cmake to generate the apropriate build command + +2006-07-09 07:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-08 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-07 13:59 andy + + * Source/CTest/cmCTestScriptHandler.cxx: ENH: Be more verbose + +2006-07-07 09:54 king + + * Tests/OutOfSource/: simple.cxx, OutOfSourceSubdir/CMakeLists.txt, + OutOfSourceSubdir/simple.cxx: ENH: Adding test for multiple + source files with the same name but different full paths. + +2006-07-07 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-06 16:05 andy + + * Source/CMakeLists.txt, Tests/BundleTest/CMakeLists.txt, + Tests/BundleTest/BundleSubDir/CMakeLists.txt: ENH: Improve the + test to create a bundle in the subdirectory + +2006-07-06 16:04 andy + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, + cmSetSourceFilesPropertiesCommand.cxx: BUG: Several fixes to + handle bundle content on Mac OSX + +2006-07-06 13:52 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Make the path + change more localized to bundles only + +2006-07-06 11:35 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Revert the change + 1.152 + +2006-07-06 07:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-05 16:27 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx, Source/CMakeLists.txt, + Tests/BundleTest/BundleLib.cxx, Tests/BundleTest/CMakeLists.txt: + BUG: If the source file specified is not in a source tree, do not + use full path to the file + +2006-07-05 16:21 andy + + * Modules/FindOpenGL.cmake: ENH: On apple do not look for X11 + +2006-07-05 10:06 king + + * Source/kwsys/CMakeLists.txt: ENH: Updated installation options + and implementation to use INSTALL command if it is available. + This will allow installation component assignment and separate + installation of the .dll and .lib on windows. + +2006-07-05 08:26 berk + + * Source/kwsys/CMakeLists.txt: ENH: Adding cmake 2.4 style + installation. NOTE: These changes will work on a paraview build + only. This file has to updated to be general + +2006-07-05 07:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-04 11:06 andy + + * Modules/CMakeFortranCompiler.cmake.in: ENH: Merge debian changes. + Support more fortran extensions + +2006-07-04 08:38 alex + + * Modules/FindKDE4.cmake: + ENH: prefer kde4-config over kde-config, since for KDE 4 + kde-config will be renamed to kde-config, and so cmake has to + prefer this one over the old version + + Alex + +2006-07-04 07:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-03 07:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-02 07:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-07-01 07:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-30 13:51 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: add EHa option + +2006-06-30 13:50 hoffman + + * Modules/MacroAddFileDependencies.cmake, + Tests/CustomCommand/config.h.in: ENH: add files from main tree + +2006-06-30 13:48 hoffman + + * CMakeLists.txt, ChangeLog.manual, cmake_uninstall.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, Modules/CPack.cmake, + Modules/CTest.cmake, Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckFunctionExists.cmake, Modules/CheckIncludeFile.c.in, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/FindOpenGL.cmake, + Modules/FindQt4.cmake, Modules/FindSDL_sound.cmake, + Modules/FindThreads.cmake, Modules/FindVTK.cmake, + Modules/FindZLIB.cmake, Modules/KDE3Macros.cmake, + Modules/TestBigEndian.cmake, Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, Modules/TestForSSTREAM.cmake, + Modules/TestForSTDNamespace.cmake, Modules/kde3uic.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.h, + Source/cmAddSubDirectoryCommand.cxx, Source/cmBuildCommand.cxx, + Source/cmCacheManager.cxx, Source/cmDepends.cxx, + Source/cmDepends.h, Source/cmDependsC.cxx, + Source/cmFileCommand.cxx, Source/cmFileCommand.h, + Source/cmForEachCommand.cxx, Source/cmForEachCommand.h, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalKdevelopGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmInstallTargetGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmMacroCommand.cxx, Source/cmMacroCommand.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmMakefileUtilityTargetGenerator.cxx, + Source/cmMessageCommand.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTryCompileCommand.cxx, + Source/cmTryRunCommand.cxx, Source/cmWhileCommand.cxx, + Source/cmWhileCommand.h, Source/cmake.cxx, Source/cmake.h, + Source/cmakemain.cxx, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CTest/cmCTestBuildAndTestHandler.cxx, + Source/CTest/cmCTestBuildCommand.cxx, + Source/CursesDialog/form/form.priv.h, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/kwsys/CommandLineArguments.cxx, + Source/kwsys/Directory.cxx, Source/kwsys/Directory.hxx.in, + Source/kwsys/Process.h.in, Source/kwsys/ProcessUNIX.c, + Source/kwsys/ProcessWin32.c, Source/kwsys/Terminal.c, + Source/kwsys/kwsysPlatformCxxTests.cmake, + Source/kwsys/testProcess.c, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/CustomCommand/CMakeLists.txt, Tests/CustomCommand/foo.in, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/TryCompile/CMakeLists.txt, Tests/Wrapping/Wrap.c, + Tests/Wrapping/fakefluid.cxx, Utilities/cmcurl/CMakeLists.txt, + Utilities/cmcurl/mprintf.c, + Utilities/cmcurl/CMake/CheckTypeSize.cmake, + Utilities/cmtar/CMakeLists.txt, Utilities/cmtar/append.c, + Utilities/cmtar/config.h.in, Utilities/cmtar/extract.c, + Utilities/cmtar/handle.c, Utilities/cmtar/compat/fnmatch.c, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: merge + main tree into branch + +2006-06-30 07:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-29 07:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-28 17:15 king + + * Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: BUG: Fix + usage of FILE(APPEND) mode. + +2006-06-28 17:00 king + + * Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: BUG: Make + sure try-compile source ends in a newline. + +2006-06-28 16:16 hoffman + + * Source/CPack/cmCPackGenericGenerator.cxx: ENH: remove cerr output + +2006-06-28 15:15 martink + + * Modules/CTest.cmake: BUG: fix typo + +2006-06-28 07:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-27 14:26 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: warning fix + +2006-06-27 10:24 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix for subdir all + target after control c + +2006-06-27 09:57 hoffman + + * Source/CursesDialog/form/form.priv.h: ENH: fix ia64 build with + aCC + +2006-06-27 09:56 hoffman + + * Source/cmFileCommand.cxx: ENH: fix crash when glob has wrong + number of arguments + +2006-06-27 07:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-26 15:27 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: When using a + working directory for the custom command do not convert paths to + be relative to the build directory. + +2006-06-26 12:06 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug 3444, + remove trailing . in lib names + +2006-06-26 11:27 martink + + * Source/cmMakefile.cxx: ENH: fix subdir issue + +2006-06-26 10:57 king + + * Source/cmIfCommand.h: ENH: Clarified documentation of EXISTS and + IS_DIRECTORY modes. + +2006-06-26 09:46 king + + * Utilities/Release/README: BUG: Added missing release steps. + +2006-06-26 07:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-25 15:18 karthik + + * Source/kwsys/CommandLineArguments.cxx: BUG: The operator + precedence is [] followed by *. Calling this method was causing + out of array index segfaults bounds + +2006-06-25 07:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-24 07:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-23 07:08 andy + + * Modules/CTest.cmake: ENH: Default drop method http + +2006-06-22 15:37 andy + + * Source/cmMessageCommand.cxx: ENH: Use CMake's error reporting + mechanism + +2006-06-22 15:31 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: DIsplay the list file + stack when displaying errors + +2006-06-22 10:35 martink + + * Source/: cmake.cxx, kwsys/Directory.cxx, kwsys/Directory.hxx.in: + ENH: add a higher performance method to get the number of files + in a directory + +2006-06-22 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-21 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-20 13:13 hoffman + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: ENH: avoid + crash in sprintf + +2006-06-20 09:50 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: fix line length + and warning + +2006-06-19 14:57 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: BUG: Delay + relative path configuration until as late as possible to make + sure the source/binary dir are set. This is a work-around for + lack of a more structured way of creating the global generator. + +2006-06-19 11:34 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: fix for dependent targets + +2006-06-19 10:07 king + + * Modules/FindOpenGL.cmake: ENH: Do not search for X11 if it is + already found. + +2006-06-19 09:49 king + + * Source/kwsys/ProcessWin32.c: COMP: Fix conversion warning. + +2006-06-18 20:05 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: do not use the + link script on windows + +2006-06-18 11:50 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: BUG: Do not write + link script lines that use the ':' command which is supposed to + be a no-op anyway. + +2006-06-18 09:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-17 19:32 king + + * Source/cmMakefileLibraryTargetGenerator.cxx: BUG: Need to use + different link script name when relinking. + +2006-06-17 07:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-16 16:29 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: warning fix + +2006-06-16 15:29 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: cleanup how + progress is reported for individual targets to fix an integer + math issue + +2006-06-16 14:45 andy + + * Modules/: FindQt4.cmake, MacroAddFileDependencies.cmake: ENH: + Updates from KDE + +2006-06-16 14:19 martink + + * Source/cmSetTargetPropertiesCommand.h: ENH: fix line length + +2006-06-16 14:02 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: BUG: fix for bug 3417 + +2006-06-16 07:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-15 21:43 hoffman + + * Modules/CPack.cmake: ENH: add a comment + +2006-06-15 16:42 king + + * Source/cmMakefile.cxx: ENH: Provide access to CMAKE_PATCH_VERSION + in CMake code. + +2006-06-15 16:37 king + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: Pre-install rules + for a target should not have target-level dependencies. Each + target can be re-linked independently as long as the original + targets are up to date. + +2006-06-15 16:17 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h, + cmake.cxx, cmake.h: ENH: Added generation of link rules into + script files executed by a cmake -E command in order to support + longer link lines. This is needed only on platforms without + response file support and that may have weak shells. + +2006-06-15 14:40 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added Option_Verbatim to run whole command lines directly. + +2006-06-15 11:51 martink + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmake.h: ENH: fix linelength + +2006-06-15 10:51 king + + * Source/: cmAddCustomCommandCommand.h, cmAddCustomTargetCommand.h: + BUG: Clarified documentation about custom command outputs and + custom target dependencies. + +2006-06-15 10:24 king + + * Source/cmMakefile.cxx: ENH: Unknown command invocations should be + fatal errors. + +2006-06-15 10:12 king + + * Source/: cmLocalGenerator.cxx, cmSetTargetPropertiesCommand.h, + cmTarget.cxx: ENH: Added target property + INSTALL_RPATH_USE_LINK_PATH to append the linker search path + directories not inside the project to the INSTALL_RPATH + automatically. The property is initialized by the variable + CMAKE_INSTALL_RPATH_USE_LINK_PATH when the target is created. + +2006-06-15 09:45 king + + * Source/cmake.cxx: BUG: Always check dependency integrity whether + or not CMake will re-run because the generator no longer checks + integrity during generation. + +2006-06-15 07:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-14 13:41 hoffman + + * DartConfig.cmake: ENH: handle the fact the public can no longer + do ftp + +2006-06-14 12:28 martink + + * CMakeLists.txt, Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/FindQt4.cmake, + Modules/FindSDL_sound.cmake, Modules/FindThreads.cmake, + Modules/TestBigEndian.cmake, Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, Modules/TestForSSTREAM.cmake, + Modules/TestForSTDNamespace.cmake, + Modules/Platform/Windows-cl.cmake, Source/cmCacheManager.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalKdevelopGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmInstallTargetGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, Source/cmMakefile.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmTryCompileCommand.cxx, Source/cmTryRunCommand.cxx, + Source/cmake.h, Source/kwsys/kwsysPlatformCxxTests.cmake, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/TryCompile/CMakeLists.txt, Utilities/cmcurl/CMakeLists.txt, + Utilities/cmcurl/CMake/CheckTypeSize.cmake, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: + centralized locaiton of CMakeFiles setting + +2006-06-13 10:28 martink + + * CMake.pdf, CMake.rtf: ENH: removed old out of date files, online + and command line help is better + +2006-06-13 09:46 martink + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix line length + +2006-06-13 08:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-12 15:44 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: fix line length + +2006-06-12 14:21 andy + + * Modules/CPack.cmake: ENH: Add support for overwriting the name of + the file CPackConfig.cmake and CPackSourceConfig.cmake + +2006-06-12 13:17 martink + + * Modules/Platform/Windows-cl.cmake: ENH: removed logo info from + the manifest tool + +2006-06-12 13:05 king + + * Source/cmIfCommand.h: BUG: Patch from Miguel A. + Figueroa-Villanueva for fixing documentation. + +2006-06-12 12:18 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: cleanup + +2006-06-12 11:40 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmMakefileTargetGenerator.cxx, cmake.cxx: ENH: some cleanup to + progress + +2006-06-12 10:22 andy + + * DartConfig.cmake: ENH: Switch to http submission + +2006-06-12 07:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-11 07:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-10 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-09 15:49 alex + + * Modules/FindZLIB.cmake: BUG: don't append to ZLIB_NAMES ENH: also + check for zdll on windows ENH: honor REQUIRED and QUIETLY + + Alex + +2006-06-09 13:45 hoffman + + * Source/CPack/: bills-comments.txt, + cmCPackCygwinBinaryGenerator.cxx, cmCPackCygwinBinaryGenerator.h, + cmCPackGenerators.cxx, cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cygwin.readme: ENH: check in partial + cygwin generator + +2006-06-09 08:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-08 07:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-07 08:47 hoffman + + * Source/cmakemain.cxx: ENH: add docs for debug trycompile + +2006-06-06 12:01 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix /TP for c code + +2006-06-06 09:39 hoffman + + * Source/cmMakefile.cxx: ENH: fix for replacement of @var @ only + legal variable names should be replaced + +2006-06-06 07:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-05 15:28 king + + * Source/cmAddSubDirectoryCommand.cxx: COMP: Removed unused + variable. + +2006-06-05 14:38 king + + * Source/cmAddSubDirectoryCommand.cxx: BUG: Always check whether a + subdirectory is below the top of the source before computing the + binary tree automatically. Even when the source is a relative + path it may contain ../ which would allow it to be outside the + source tree. + +2006-06-05 14:32 martink + + * Source/: cmDependsC.cxx, cmGlobalUnixMakefileGenerator3.cxx, + cmMakefileTargetGenerator.cxx: ENH: line lengths + +2006-06-05 14:13 king + + * cmake_uninstall.cmake.in: BUG: Use proper signature for + EXEC_PROGRAM to get return value of cmake -E remove. Also fixed + spelling error in message, and made non-existing files not a + fatal error so that the rest of the files are removed. + +2006-06-05 13:45 king + + * Source/: cmFileCommand.cxx, cmFileCommand.h, cmTarget.cxx: ENH: + Changing shared library versioned file names on OSX to conform to + that platform's convention. + +2006-06-05 11:22 king + + * Source/kwsys/Terminal.c: ENH: Added rxvt-unicode and cygwin + terminals for color support. + +2006-06-05 07:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-04 07:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-03 18:43 andy + + * Source/kwsys/Terminal.c: ENH: Handle 'screen' terminal. Thank you + Thomas Z. + +2006-06-03 18:43 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: COMP: Remove warning + +2006-06-03 09:48 king + + * Tests/Wrapping/Wrap.c: COMP: More fixes for non-ANSI C compilers. + +2006-06-03 09:42 king + + * Tests/Wrapping/Wrap.c: COMP: Fix for non-ANSI C compilers. + +2006-06-03 07:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-06-02 12:19 king + + * Tests/Wrapping/: Wrap.c, fakefluid.cxx: BUG: Custom commands + should actually generate the files they claim to generate. + +2006-06-02 11:26 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h: ENH: Display cmake install information + when in verbose mode + +2006-06-01 15:51 king + + * Source/: cmBuildCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, CPack/cmCPackGenericGenerator.cxx, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildCommand.cxx: BUG: cmGlobalGenerator::Build + should not always use the /fast target name because dependency + checking is often required. It now takes an argument specifying + whether to use the /fast target name, and the argument is + currently only true for try-compiles. + +2006-06-01 15:08 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Adjustment of + install_name with install_name_tool should account for DESTDIR + when specifying the file to be changed. + +2006-06-01 14:43 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: Moved generation of the + /fast version of GLOBAL_TARGET targets to the proper place in the + local generator instead of in the global generator. Also made + the install/fast target not depend on the all target. + +2006-06-01 14:09 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: BUG: Added /fast targets in + subdirectory makefiles. Removed bogus INSTALL_*/fast targets. + Also fixed preinstall/fast target. + +2006-06-01 13:01 king + + * Tests/CustomCommand/: CMakeLists.txt, config.h.in, foo.in: ENH: + Added test for generation of files listed explicitly as sources + but not used during the build of a target. + +2006-06-01 11:45 king + + * Source/: cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h, + cmMakefileUtilityTargetGenerator.cxx: BUG: Custom command outputs + listed explicitly as source files in a target should be generated + whether or not an object file in the target needs them. This + useful and makes Makefile builds more consistent with VS IDE + builds. + +2006-06-01 09:38 hoffman + + * Utilities/Release/cmake_release.sh: ENH: change the version + number to match the release for cygwin + +2006-06-01 08:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-31 11:19 martink + + * Source/: cmForEachCommand.cxx, cmIfCommand.cxx, + cmMacroCommand.cxx, cmWhileCommand.cxx: ENH: reduce string + construct delete ops + +2006-05-31 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-30 16:23 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: BUG: Fix progress when total + number of source files is less than 100. + +2006-05-30 11:15 king + + * Source/cmake.cxx: BUG: Fixed cmake -E remove return code. + +2006-05-30 08:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-29 08:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-28 07:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-27 07:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-26 07:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-25 14:16 king + + * Modules/CMakeGenericSystem.cmake: ENH: Adding advanced option + CMAKE_COLOR_MAKEFILE for makefile generators with default ON. + +2006-05-25 14:16 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Slight improvement in + genreation time by recording the setting of CMAKE_COLOR_MAKEFILE + in an ivar of each local generator at the beginning of + generation. This avoids many repeated table lookups. + +2006-05-25 11:56 hoffman + + * Modules/FindQt4.cmake: ENH: add qtmain to findqt + +2006-05-25 10:55 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx: BUG: fix to progress for small + projects + +2006-05-25 10:21 martink + + * Modules/CTest.cmake: ENH: remove debugging output + +2006-05-25 09:47 king + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefileTargetGenerator.cxx, + cmake.cxx: BUG: Updated Makefile dependency scanning to provide a + full local generator to the dependency scanner to do proper path + conversions. This allows the rules written into the depend.make + files to use the same relative path conversion as those written + into the build.make files. Several previous changes added more + and more information for use by the dependency scanner and it was + converging to having the full local generator anyway. + +2006-05-25 07:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-24 10:13 king + + * Source/kwsys/ProcessUNIX.c: BUG: Do not leak global table of + processes. + +2006-05-24 10:09 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: fix compiler warnings and + posibly java test + +2006-05-24 07:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-23 15:27 king + + * Source/cmLocalVisualStudio7Generator.cxx: COMP: Added missing + include for isspace. + +2006-05-23 15:01 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Fix parsing of + definitions to support REMOVE_DEFINITIONS. + +2006-05-23 12:51 king + + * Source/cmMakefile.cxx, Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Fix + REMOVE_DEFINITIONS command to not remove substrings. + +2006-05-23 12:38 david.cole + + * Utilities/cmtar/: CMakeLists.txt, append.c, config.h.in, + extract.c, handle.c, compat/fnmatch.c: COMP: Fix warnings on + Borland dashboards... + +2006-05-23 11:48 king + + * Source/kwsys/ProcessUNIX.c: ENH: Re-enabling SIGCHLD handling + implementation with a fix for Cygwin. + +2006-05-23 10:40 king + + * Modules/FindVTK.cmake: ENH: Add ability to find VTK 5 without + user help. + +2006-05-23 09:58 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: BUG: Finished fix + to bug#3229 and bug#3272. + +2006-05-23 09:58 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefileTargetGenerator.cxx: + BUG: Fix for spaces in path to build directory with new progress + stuff. + +2006-05-23 09:11 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMacroCommand.cxx, + cmMacroCommand.h, cmMakefileTargetGenerator.cxx, cmake.cxx: ENH: + always compile progress + +2006-05-23 07:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-22 16:10 martink + + * Source/cmake.cxx: COMP: fix bootstrap + +2006-05-22 16:07 martink + + * Source/cmake.cxx: COMP: fix mac warning + +2006-05-22 15:41 martink + + * Source/cmake.cxx: ENH: part of the progress reporting checkin + +2006-05-22 15:11 king + + * Source/kwsys/ProcessUNIX.c: BUG: Reverting previous change until + it can be fixed on Cygwin. + +2006-05-21 14:06 hoffman + + * Source/cmMakefile.cxx: ENH: fix line length + +2006-05-21 10:28 king + + * Source/kwsys/testProcess.c: ENH: Added test 8 to test + grandchildren running after children exit. + +2006-05-21 10:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-21 10:27 king + + * Source/kwsys/ProcessWin32.c: BUG: Fixed deadlock condition when + grandchildren are running after the children exit. + +2006-05-21 10:26 king + + * Source/kwsys/ProcessUNIX.c: ENH: Implemented handling of SIGCHLD + to detect the termination of immediate children. This allows + grandchildren to remain running after the children exit. + +2006-05-20 18:50 king + + * Source/kwsys/ProcessUNIX.c: ENH: Enabling process tree killing on + Cygwin. + +2006-05-20 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-19 16:57 alex + + * Modules/: FindQt4.cmake, KDE3Macros.cmake, kde3uic.cmake: BUG: + kde3: use QT_UIC_EXECUTABLE instead of simply uic BUG: use + qouting for the path to Qt4 moc and uic, should help with paths + with spaces + + Alex + +2006-05-19 15:53 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + dashmacmini2_release.cmake: ENH: release scripts + +2006-05-19 15:51 hoffman + + * Utilities/cmcurl/mprintf.c: ENH: fix for uclibc + +2006-05-19 13:02 hoffman + + * Source/: cmMakefile.cxx, cmTarget.cxx, cmTarget.h: ENH: fix for + vtk 4.4 and other projects that may try to link to a module + +2006-05-19 09:36 martink + + * Source/cmIfCommand.cxx: COMP: fix warning + +2006-05-19 08:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-18 23:24 hoffman + + * Source/: cmake.cxx, cmakemain.cxx: ENH: fix crashes when command + line arguments are not followed by the correct number of + arguments + +2006-05-18 14:35 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix issue with + too many fast targets being listed + +2006-05-18 13:50 martink + + * Source/: cmForEachCommand.cxx, cmForEachCommand.h, + cmIfCommand.cxx, cmWhileCommand.cxx, cmWhileCommand.h: ENH: allow + loose loop constructs + +2006-05-18 10:28 king + + * Modules/CheckIncludeFile.c.in: BUG: Fix signature of main to work + on both strict ANSI and non-ANSI C compilers. + +2006-05-18 08:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-17 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-16 14:04 hoffman + + * ChangeLog.manual, Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmListCommand.cxx, + Source/cmListCommand.h, Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx: ENH: move changes + from main tree to branch + +2006-05-16 13:41 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: BUG: Added + missing cd command before running executable version symlink + rule. This addresses bug#3229. + +2006-05-16 13:23 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix warning + +2006-05-16 09:54 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: fix rebuild problem with xcode and universal binaries + +2006-05-16 08:42 andy + + * Source/: cmListCommand.cxx, cmListCommand.h: STYLE: Fix style + +2006-05-16 08:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-15 18:05 hoffman + + * ChangeLog.manual, Source/cmDependsFortranParser.h, + Source/cmDependsJavaParser.cxx, Source/cmExprParser.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmListCommand.cxx, Source/cmListCommand.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmQTWrapCPPCommand.h, Source/cmake.cxx, + Tests/CMakeTests/ListTest.cmake.in: ENH: merge from main tree + +2006-05-15 13:47 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: PERF: performance + improvement + +2006-05-15 13:02 andy + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmake.cxx: ENH: Add simple + progress reporting during make + +2006-05-15 10:19 martink + + * Source/: cmDependsFortranParser.h, cmDependsJavaParser.cxx, + cmExprParser.cxx, cmLocalUnixMakefileGenerator3.cxx, + cmQTWrapCPPCommand.h: STYLE: fix line length + +2006-05-15 10:14 andy + + * Source/cmListCommand.cxx, Tests/CMakeTests/ListTest.cmake.in: + ENH: Fix INSERT to allow inserting to empty list + +2006-05-15 09:57 andy + + * Source/cmListCommand.cxx, Source/cmListCommand.h, + Tests/CMakeTests/ListTest.cmake.in: ENH: Change REMOVE and + REMOVE_ITEM to REMOVE_AT and REMOVE_ITEM + +2006-05-15 09:25 andy + + * Source/cmListCommand.cxx, Source/cmListCommand.h, + Tests/CMakeTests/ListTest.cmake.in: ENH: Remove some errors, fix + append to work on nonexisting lists + +2006-05-14 20:20 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: fix module + +2006-05-14 20:17 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: check return value for + uname -p + +2006-05-14 19:17 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: move from main tree + handle uname without -p correctly + +2006-05-14 17:42 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: check return value for + uname -p + +2006-05-14 15:24 hoffman + + * Utilities/Release/: release_cmake.cmake, + v60n177_aix_release.cmake: ENH: extra path + +2006-05-14 15:22 hoffman + + * CMakeLists.txt, Modules/FindJPEG.cmake, Modules/FindKDE4.cmake, + Modules/FindQt4.cmake, Source/cmGlobalGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.h, + Source/cmIncludeDirectoryCommand.cxx, + Source/cmLinkDirectoriesCommand.cxx, + Source/cmLinkLibrariesCommand.cxx, Source/cmListCommand.cxx, + Source/cmListFileCache.cxx, Source/cmLoadCacheCommand.cxx, + Source/cmLoadCommandCommand.h, Source/cmLocalGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMacroCommand.cxx, Source/cmMakeDepend.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMarkAsAdvancedCommand.cxx, Source/cmMathCommand.h, + Source/cmObject.h, Source/cmOptionCommand.cxx, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Source/cmOutputRequiredFilesCommand.cxx, + Source/cmProjectCommand.cxx, Source/cmQTWrapCPPCommand.cxx, + Source/cmQTWrapUICommand.cxx, + Source/cmRemoveDefinitionsCommand.cxx, + Source/cmSeparateArgumentsCommand.cxx, + Source/cmSeparateArgumentsCommand.h, + Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.h, + Source/cmSetTargetPropertiesCommand.cxx, + Source/cmSetTargetPropertiesCommand.h, + Source/cmSetTestsPropertiesCommand.cxx, + Source/cmSetTestsPropertiesCommand.h, + Source/cmSiteNameCommand.cxx, Source/cmSourceFile.cxx, + Source/cmSourceFile.h, Source/cmSourceGroupCommand.h, + Source/cmStringCommand.cxx, Source/cmSubdirCommand.cxx, + Source/cmSubdirCommand.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTryCompileCommand.cxx, Source/cmTryCompileCommand.h, + Source/cmUseMangledMesaCommand.cxx, + Source/cmUtilitySourceCommand.cxx, + Source/cmVTKMakeInstantiatorCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, Source/cmWin32ProcessExecution.h, + Source/cmWriteFileCommand.cxx, Source/cmXCode21Object.cxx, + Source/cmXCode21Object.h, Source/cmXCodeObject.cxx, + Source/cmXCodeObject.h, Source/cmXMLParser.h, Source/cmake.cxx, + Source/cmake.h, Source/cmakemain.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.cxx, + Source/CPack/cpack.cxx, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: merge from main + tree + +2006-05-14 09:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-13 12:28 king + + * Source/cmGlobalGenerator.cxx: BUG: Make sure RUN_TESTS target + passes the desired configuration to ctest. + +2006-05-13 08:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-12 14:44 martink + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackNSISGenerator.cxx, cmCPackPackageMakerGenerator.cxx, + cmCPackSTGZGenerator.cxx, cmCPackTarCompressGenerator.cxx, + cpack.cxx: STYLE: fix line length + +2006-05-12 14:36 martink + + * Source/: cmXCode21Object.cxx, cmXCode21Object.h, + cmXCodeObject.cxx, cmXCodeObject.h, cmXMLParser.h, cmake.cxx, + cmake.h, cmakemain.cxx: STYLE: fix line length + +2006-05-12 14:12 martink + + * Source/: cmTarget.cxx, cmTarget.h, + cmTargetLinkLibrariesCommand.cxx, cmTryCompileCommand.cxx, + cmTryCompileCommand.h, cmUseMangledMesaCommand.cxx, + cmUtilitySourceCommand.cxx, cmVTKMakeInstantiatorCommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx, cmWin32ProcessExecution.h, + cmWriteFileCommand.cxx: STYLE: fix line length + +2006-05-12 13:53 martink + + * Source/: cmSeparateArgumentsCommand.cxx, + cmSeparateArgumentsCommand.h, + cmSetDirectoryPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, + cmSetTargetPropertiesCommand.cxx, cmSetTargetPropertiesCommand.h, + cmSetTestsPropertiesCommand.cxx, cmSetTestsPropertiesCommand.h, + cmSiteNameCommand.cxx, cmSourceFile.cxx, cmSourceFile.h, + cmSourceGroupCommand.h, cmStringCommand.cxx, cmSubdirCommand.cxx, + cmSubdirCommand.h, cmSystemTools.cxx, cmSystemTools.h: STYLE: fix + line length + +2006-05-12 13:44 martink + + * Source/: cmProjectCommand.cxx, cmQTWrapCPPCommand.cxx, + cmQTWrapUICommand.cxx, cmRemoveDefinitionsCommand.cxx: STYLE: fix + line length + +2006-05-12 13:39 martink + + * Source/: cmObject.h, cmOptionCommand.cxx, + cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h, + cmOutputRequiredFilesCommand.cxx: STYLE: fix line length + +2006-05-12 12:29 martink + + * Source/: cmMacroCommand.cxx, cmMakeDepend.h, cmMakefile.cxx, + cmMakefile.h, cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMarkAsAdvancedCommand.cxx, + cmMathCommand.h: STYLE: fix line length + +2006-05-12 11:56 martink + + * Source/: cmLinkDirectoriesCommand.cxx, + cmLinkLibrariesCommand.cxx, cmListCommand.cxx, + cmListFileCache.cxx, cmLoadCacheCommand.cxx, + cmLoadCommandCommand.h, cmLocalGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: STYLE: fix line length + +2006-05-12 11:03 hoffman + + * CMakeLists.txt: ENH: add the processor to the system name for + cpack + +2006-05-12 10:56 hoffman + + * Modules/FindQt4.cmake: ENH: remove bad quoteed code + +2006-05-12 10:54 king + + * Source/cmIncludeDirectoryCommand.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: BUG: + INCLUDE_DIRECTORIES should interpret relative path arguments with + respect to the current source directory. + +2006-05-12 10:46 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalMSYSMakefileGenerator.h: + STYLE: fix line length + +2006-05-12 10:09 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: remove bogus + machine setting + +2006-05-12 09:47 hoffman + + * Modules/FindQt4.cmake: ENH: fix path problem with qt + +2006-05-12 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-11 18:32 alex + + * Modules/FindJPEG.cmake: ENH: honor REQUIRED flag + + Alex + +2006-05-11 18:27 alex + + * Modules/FindKDE4.cmake: ENH: use the new FILE(TO_CMAKE_PATH ...) + command instead of regexps BUG: append the kde 4 cmake module + path instead of prepending it + + Alex + +2006-05-11 16:07 hoffman + + * Utilities/Release/: dashmacmini2_release.cmake, + destiny_release.cmake, release_cmake.cmake, release_cmake.sh.in, + vogon_release.cmake: ENH: working package creator + +2006-05-11 16:05 hoffman + + * Source/: cmAddSubDirectoryCommand.cxx, cmExprParser.cxx, + cmExprParserHelper.cxx, cmFLTKWrapUICommand.cxx, + cmFileCommand.cxx, cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h, + cmGlobalVisualStudio8Win64Generator.cxx, + cmGlobalVisualStudio8Win64Generator.h, + cmGlobalWatcomWMakeGenerator.cxx, cmGlobalXCode21Generator.cxx, + cmGlobalXCode21Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeDirectoryCommand.cxx, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallCommand.h, + cmInstallFilesCommand.cxx, cmInstallGenerator.cxx, + cmInstallGenerator.h, cmInstallProgramsCommand.cxx, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h, + cmInstallTargetsCommand.cxx, cmListCommand.cxx, cmListCommand.h, + CTest/cmCTestBuildHandler.cxx: ENH: merge changes from main tree + +2006-05-11 15:50 hoffman + + * Source/cmFileCommand.cxx: ENH: fix error message + +2006-05-11 15:50 martink + + * Source/: cmIfCommand.cxx, cmIfCommand.h, cmIncludeCommand.cxx, + cmIncludeDirectoryCommand.cxx, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallCommand.h, + cmInstallFilesCommand.cxx, cmInstallGenerator.cxx, + cmInstallGenerator.h, cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h, cmInstallTargetGenerator.cxx, + cmInstallTargetGenerator.h, cmInstallTargetsCommand.cxx: STYLE: + fix line length + +2006-05-11 15:39 martink + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + STYLE: fix line length + +2006-05-11 13:56 andy + + * Source/: cmListCommand.cxx, cmListCommand.h: ENH: Some + documentation and add APPEND + +2006-05-11 12:00 andy + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: Fix segfault + +2006-05-11 11:47 martink + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h, + cmGlobalVisualStudio8Win64Generator.cxx, + cmGlobalVisualStudio8Win64Generator.h, + cmGlobalWatcomWMakeGenerator.cxx, cmGlobalXCode21Generator.cxx, + cmGlobalXCode21Generator.h, cmGlobalXCodeGenerator.cxx: STYLE: + fix line length + +2006-05-11 10:56 hoffman + + * ChangeLog.manual, Modules/FindQt4.cmake: ENH: merge changs from + main tree + +2006-05-11 10:45 martink + + * Source/: cmExprParser.cxx, cmExprParserHelper.cxx, + cmFLTKWrapUICommand.cxx: STYLE: fix line length + +2006-05-11 10:41 hoffman + + * Modules/FindQt4.cmake: ENH: fix for bug 3216 allow full path to + qt input files + +2006-05-11 10:39 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, cmAddSubDirectoryCommand.cxx: + STYLE: fix line length + +2006-05-11 10:33 hoffman + + * ChangeLog.manual, Source/CPack/cmCPackZIPGenerator.cxx: ENH: + merge changes from main tree + +2006-05-11 09:37 hoffman + + * Source/CPack/cmCPackZIPGenerator.cxx: ENH: use @ file for winzip + on windows + +2006-05-11 08:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-10 22:15 hoffman + + * CMakeLists.txt, Modules/CPack.cmake, + Modules/NSIS.InstallOptions.ini.in, Modules/NSIS.template.in, + Source/cmAddExecutableCommand.cxx, + Source/cmAddSubDirectoryCommand.cxx, Source/cmAddTestCommand.cxx, + Source/cmAuxSourceDirectoryCommand.cxx, + Source/cmAuxSourceDirectoryCommand.h, Source/cmCTest.cxx, + Source/cmCacheManager.cxx, Source/cmCommandArgumentLexer.cxx, + Source/cmCommandArgumentParser.cxx, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmCommandArgumentParserTokens.h, + Source/cmConfigureFileCommand.cxx, + Source/cmCreateTestSourceList.h, Source/cmDepends.cxx, + Source/cmDepends.h, Source/cmDependsC.cxx, + Source/cmDependsFortran.cxx, Source/cmDependsFortranParser.cxx, + Source/cmDependsJavaParserHelper.cxx, + Source/cmDependsJavaParserHelper.h, Source/cmDocumentation.cxx, + Source/cmDumpDocumentation.cxx, Source/cmElseCommand.cxx, + Source/cmEnableLanguageCommand.cxx, + Source/cmEndForEachCommand.cxx, Source/cmEndIfCommand.cxx, + Source/cmEndWhileCommand.cxx, Source/cmExecProgramCommand.cxx, + Source/cmExecuteProcessCommand.cxx, + Source/cmExecuteProcessCommand.h, + Source/cmExportLibraryDependencies.cxx, + Source/cmExportLibraryDependencies.h, Source/cmExprLexer.cxx, + Source/cmExprLexer.h, Source/cmFLTKWrapUICommand.cxx, + Source/cmFileCommand.cxx, Source/cmFileCommand.h, + Source/cmFileTimeComparison.cxx, Source/cmFindBase.cxx, + Source/cmFindFileCommand.cxx, Source/cmFindLibraryCommand.cxx, + Source/cmFindPackageCommand.cxx, Source/cmFindPathCommand.cxx, + Source/cmFindProgramCommand.cxx, Source/cmForEachCommand.cxx, + Source/cmGeneratedFileStream.cxx, + Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmGetFilenameComponentCommand.cxx, + Source/cmGetFilenameComponentCommand.h, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, Source/CPack/cpack.cxx, + Source/CTest/cmCTestGenericHandler.cxx, + Source/CTest/cmCTestHandlerCommand.cxx, + Source/CTest/cmCTestReadCustomFilesCommand.h, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestUpdateCommand.cxx: ENH: move changes from + main tree + +2006-05-10 17:26 andy + + * CMakeLists.txt, Modules/CPack.cmake: BUG: Prevent stripping of + sources + +2006-05-10 16:44 hoffman + + * Utilities/Release/create-cmake-release.cmake: ENH: remove ps + thing + +2006-05-10 16:43 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + vogon_release.cmake: ENH: it works + +2006-05-10 15:56 martink + + * Source/: cmGeneratedFileStream.cxx, + cmGetDirectoryPropertyCommand.cxx, + cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, + cmGetSourceFilePropertyCommand.h, + cmGlobalBorlandMakefileGenerator.cxx: STYLE: fix line length + +2006-05-10 15:46 martink + + * Source/: cmFLTKWrapUICommand.cxx, cmFileCommand.cxx, + cmFileCommand.h, cmFileTimeComparison.cxx, cmFindBase.cxx, + cmFindFileCommand.cxx, cmFindLibraryCommand.cxx, + cmFindPackageCommand.cxx, cmFindPathCommand.cxx, + cmFindProgramCommand.cxx, cmForEachCommand.cxx: STYLE: fix line + length + +2006-05-10 15:29 hoffman + + * Utilities/Release/vogon_release.cmake: ENH: add vogon + +2006-05-10 15:06 martink + + * Source/: cmElseCommand.cxx, cmEnableLanguageCommand.cxx, + cmEndForEachCommand.cxx, cmEndIfCommand.cxx, + cmEndWhileCommand.cxx, cmExecProgramCommand.cxx, + cmExecuteProcessCommand.cxx, cmExecuteProcessCommand.h, + cmExportLibraryDependencies.cxx, cmExportLibraryDependencies.h, + cmExprLexer.cxx, cmExprLexer.h: STYLE: fix line length + +2006-05-10 15:01 martink + + * Source/: cmDependsJavaParserHelper.cxx, + cmDependsJavaParserHelper.h, cmDocumentation.cxx, + cmDumpDocumentation.cxx: STYLE: fix line length + +2006-05-10 14:54 martink + + * Source/: cmDepends.h, cmDependsC.cxx, cmDependsFortran.cxx, + cmDependsFortranParser.cxx: STYLE: fix line length + +2006-05-10 14:13 martink + + * Source/: cmCommandArgumentParser.cxx, + cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserTokens.h, cmConfigureFileCommand.cxx, + cmCreateTestSourceList.h, cmDepends.cxx: STYLE: fix line length + +2006-05-10 14:07 martink + + * Source/cmCommandArgumentLexer.cxx: STYLE: hmm + +2006-05-10 14:03 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + dashsgi1_release.cmake, dashsgi1_release64.cmake, + release_cmake.sh.in: ENH: + +2006-05-10 14:00 martink + + * Source/cmCommandArgumentLexer.cxx: STYLE: hmm + +2006-05-10 13:56 martink + + * Source/: cmAuxSourceDirectoryCommand.h, cmCTest.cxx, + cmCacheManager.cxx: STYLE: fix line length + +2006-05-10 13:48 martink + + * Source/: CTest/cmCTestGenericHandler.cxx, + CTest/cmCTestHandlerCommand.cxx, + CTest/cmCTestReadCustomFilesCommand.h, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestUpdateCommand.cxx, cmAddExecutableCommand.cxx, + cmAddSubDirectoryCommand.cxx, cmAddTestCommand.cxx, + cmAuxSourceDirectoryCommand.cxx: STYLE: fix line length + +2006-05-10 12:39 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, cpack.cxx: BUG: Fix + relative path to config file, fix cmake_install.cmake location + problem + +2006-05-10 12:15 hoffman + + * Modules/: NSIS.InstallOptions.ini.in, NSIS.template.in: ENH: use + radio buttons to choose PATH options + +2006-05-10 09:28 hoffman + + * CMakeLists.txt: ENH: allow package name to be changed from cmake + cache + +2006-05-10 09:15 hoffman + + * CMakeLists.txt: ENH: allow for cpack stuff to be changed + +2006-05-10 07:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-09 17:18 hoffman + + * Utilities/Release/: dashsun1_release.cmake, release_cmake.cmake, + v60n177_aix_release.cmake: ENH: works + +2006-05-09 16:30 hoffman + + * ChangeLog.manual, Modules/FindQt3.cmake, + Modules/NSIS.template.in, Source/cmSetTargetPropertiesCommand.h, + Source/kwsys/SystemTools.cxx, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: merge from main + tree + +2006-05-09 14:14 hoffman + + * Utilities/Release/: create-cmake-release.cmake, + release_cmake.cmake: ENH: seems to be working + +2006-05-09 13:49 hoffman + + * Utilities/Release/create-cmake-release.cmake: ENH: add a xterm + script create script + +2006-05-09 13:48 hoffman + + * Utilities/Release/: dashsun1_release.cmake, muse_release64.cmake, + release_cmake.cmake, release_cmake.sh.in: ENH: add 64 bit sgi + +2006-05-09 12:23 hoffman + + * Utilities/Release/release_cmake.sh.in: ENH: mark time + +2006-05-09 12:23 andy + + * Utilities/Release/v60n177_aix_release.cmake: ENH: copy right + files + +2006-05-09 08:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-08 16:59 hoffman + + * Utilities/Release/: dashmacmini2_release.cmake, + dashsun1_release.cmake, destiny_release.cmake, + muse_release.cmake, v60n177_aix_release.cmake: ENH: skip + bootstrap test as it already does a bootstrap + +2006-05-08 16:50 hoffman + + * Utilities/Release/: dashmacmini2_release.cmake, + destiny_release.cmake, hythloth_release.cmake, + muse_release.cmake, release_cmake.cmake, + v60n177_aix_release.cmake: ENH: change name to MAKE_COMMAND + +2006-05-08 16:40 hoffman + + * Source/cmSetTargetPropertiesCommand.h: ENH: fix docs to include + linker lang + +2006-05-08 16:38 andy + + * Utilities/Release/release_cmake.cmake: ENH: add extra copy for + ibm + +2006-05-08 16:36 hoffman + + * Utilities/Release/: dashmacmini2_release.cmake, + destiny_release.cmake, hythloth_release.cmake, + muse_release.cmake, release_cmake.cmake, release_cmake.sh.in, + v60n177_aix_release.cmake: ENH: add make program stuff + +2006-05-08 14:18 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: search for program without + extensions + +2006-05-08 13:34 andy + + * Modules/NSIS.template.in: ENH: Some cleanups and fix installing + as a non-admin + +2006-05-08 10:02 king + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: Disabling an + EXECUTE_PROCESS test until problems on UNIX systems are fixed. + +2006-05-07 13:04 hoffman + + * Modules/FindQt3.cmake: ENH: try to find qt3 better + +2006-05-07 10:55 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CPack.STGZ_Header.sh.in, Modules/FindQt4.cmake, + Modules/Platform/CYGWIN.cmake, Modules/Platform/SunOS.cmake, + Modules/Platform/Windows-cl.cmake, Source/CMakeLists.txt, + Source/cmCommandArgumentParserHelper.cxx, Source/cmDepends.h, + Source/cmDependsC.cxx, Source/cmFileCommand.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmIncludeExternalMSProjectCommand.cxx, + Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, Source/cmInstallGenerator.cxx, + Source/cmInstallGenerator.h, Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmSourceFile.cxx, Source/cmSourceFile.h, + Source/cmSourceGroupCommand.h, Source/cmTarget.cxx, + Source/CPack/cmCPackGenerators.cxx, + Source/CPack/cmCPackGenerators.h, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, + Source/CPack/cmCPackTGZGenerator.h, + Source/CPack/cmCPackTarBZip2Generator.cxx, + Source/CPack/cmCPackTarBZip2Generator.h, + Source/CPack/cmCPackTarCompressGenerator.cxx, + Source/CPack/cmCPackTarCompressGenerator.h, + Source/CPack/cmCPackZIPGenerator.cxx, Source/CPack/cpack.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Tests/COnly/conly.c, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, + Utilities/Release/cmake_release.sh.in: ENH: move changes from + main tree and change version to 2.4.2 + +2006-05-07 09:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-06 10:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-05 22:04 hoffman + + * Utilities/Release/: release_cmake.sh.in, + v60n177_aix_release.cmake: ENH: add extra copy for aix + +2006-05-05 21:49 hoffman + + * Modules/Platform/CYGWIN.cmake: ENH: add the flag for creating + windows gui's + +2006-05-05 21:45 hoffman + + * Source/cmCommandArgumentParserHelper.cxx: ENH: handle empty + variables + +2006-05-05 20:54 king + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h: BUG: MSVC* variables should be + set in IDE generators instead of just NMake. + +2006-05-05 16:12 andy + + * Utilities/Release/v60n177_aix_release.cmake: ENH: use a directory + with space + +2006-05-05 15:51 hoffman + + * Utilities/Release/: release_cmake.cmake, release_cmake.sh.in: + ENH: make release directory a variable + +2006-05-05 15:04 hoffman + + * Modules/FindQt4.cmake: ENH: fix windows path issue + +2006-05-05 14:57 king + + * Source/cmFileCommand.cxx, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, Source/cmInstallGenerator.cxx, + Source/cmInstallGenerator.h, Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmLocalGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Added CONFIGURATIONS + option to INSTALL command to allow per-configuration install + rules. + +2006-05-05 14:53 andy + + * Utilities/Release/: release_cmake.sh.in, + v60n177_aix_release.cmake: ENH: fix env vars + +2006-05-05 13:52 hoffman + + * Utilities/Release/release_cmake.sh.in: ENH: add ability to set + CC, CXX and LDFLAGS + +2006-05-05 13:10 hoffman + + * Utilities/Release/release_cmake.cmake: ENH: move from tr to cat + since it works from a windows machine and works on the AIX + +2006-05-05 12:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-05 12:34 hoffman + + * Utilities/Release/: release_cmake.cmake, release_cmake.sh.in: + ENH: add missing quote and some comments + +2006-05-05 12:25 hoffman + + * Utilities/Release/: release_cmake.cmake, release_cmake.sh.in: + ENH: remove old copy + +2006-05-05 12:14 hoffman + + * Utilities/Release/: destiny_release.cmake, release_cmake.cmake, + release_cmake.sh.in: ENH: working on hp + +2006-05-05 11:51 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Adding COMPONENT option to + an INSTALL command call to smoke-test it. + +2006-05-05 11:46 king + + * Source/: cmSourceFile.cxx, cmSourceFile.h, cmTarget.cxx: ENH: + Added information about target needing a source file when one + cannot be found. + +2006-05-05 11:37 king + + * Source/cmSourceGroupCommand.h: ENH: Added example of sub-group to + docs. + +2006-05-05 10:38 king + + * Source/cmFileCommand.cxx: ENH: Added option to not use + copy-if-different when installing. + +2006-05-05 10:33 hoffman + + * Utilities/Release/: release_cmake.cmake: ENH: create script is + working + +2006-05-05 10:30 hoffman + + * Utilities/Release/: release_cmake.cmake, release_cmake.sh.in: + ENH: create script is working + +2006-05-05 10:29 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Added + always/if-different option to CopyADirectory. Added CopyAFile + with the same interface. + +2006-05-05 08:16 hoffman + + * Utilities/Release/release_cmake.cmake: ENH: change to script mode + +2006-05-04 22:58 hoffman + + * Utilities/Release/: release_cmake.sh.in: ENH: add file + +2006-05-04 21:57 hoffman + + * Utilities/Release/: destiny_release.cmake, muse_release.cmake: + ENH: add some machines + +2006-05-04 17:54 hoffman + + * Source/cmMakefile.cxx: ENH: add a check to make sure targets only + link to libraries and not utility targets to avoid seg faults, + bug 3194 + +2006-05-04 13:39 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: remove debug + output + +2006-05-04 13:35 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx, Tests/COnly/conly.c: + ENH: fix build c stuff with c and c++ with c++ + +2006-05-04 10:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-03 23:03 hoffman + + * Source/cmIncludeExternalMSProjectCommand.cxx: ENH: make sure path + is converted to unix + +2006-05-03 21:42 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackTarBZip2Generator.cxx, + CPack/cmCPackTarBZip2Generator.h, CPack/cpack.cxx: ENH: Add BZip2 + support, add better documentation + +2006-05-03 17:27 hoffman + + * Utilities/Release/release_cmake.cmake: ENH: add cvs command + variable + +2006-05-03 17:22 hoffman + + * Utilities/Release/: release_cmake.cmake, + v60n177_aix_release.cmake: ENH: more aix stuff + +2006-05-03 17:08 hoffman + + * Utilities/Release/: release_cmake.cmake, + v60n177_aix_release.cmake: ENH: add aix + +2006-05-03 16:24 andy + + * Modules/CPack.STGZ_Header.sh.in: ENH: Better output + +2006-05-03 15:17 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: use SHELL var + +2006-05-03 15:17 martink + + * Source/CPack/cmCPackGenericGenerator.cxx: BUG: fix CPack to use + correct paths + +2006-05-03 10:07 king + + * Source/: cmDepends.h, cmDependsC.cxx, + cmLocalUnixMakefileGenerator3.cxx: BUG: Fix to avoid repeated + calls to CollapseFullPath during dependency scanning. This + addresses bug#3191. + +2006-05-03 09:23 hoffman + + * Modules/Platform/SunOS.cmake: ENH: use correct flags for + optimization + +2006-05-03 08:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-02 23:20 hoffman + + * Utilities/Release/: dashmacmini2_release.cmake, + dashsun1_release.cmake, hythloth_release.cmake, + release_cmake.cmake: ENH: getting better + +2006-05-02 18:47 andy + + * Source/CPack/cmCPackTGZGenerator.cxx: COMP: Fix cast to char* + +2006-05-02 18:43 andy + + * Source/CPack/cmCPackTarCompressGenerator.cxx: COMP: Try to fix + windows builds + +2006-05-02 17:52 andy + + * Source/CPack/: cmCPackGenerators.cxx, cmCPackGenerators.h, + cpack.cxx: ENH: Add generators documentation + +2006-05-02 17:34 andy + + * Source/CPack/: cmCPackTGZGenerator.cxx, cmCPackTGZGenerator.h, + cmCPackTarCompressGenerator.cxx, cmCPackTarCompressGenerator.h: + ENH: Simplify TarCompress to only require compress. Use cmake's + tar + +2006-05-02 17:07 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackTarCompressGenerator.cxx, + CPack/cmCPackTarCompressGenerator.h: ENH: Initial cut at + TarCompress generator + +2006-05-02 16:41 hoffman + + * Utilities/Release/release_cmake.cmake: ENH: remove debug + +2006-05-02 16:41 hoffman + + * Utilities/Release/: cmake_login, release_cmake.cmake: ENH: more + stuff + +2006-05-02 16:33 hoffman + + * Utilities/Release/release_cmake.cmake: ENH: remove if0 + +2006-05-02 16:32 hoffman + + * Utilities/Release/: dashsun1_release.cmake, + hythloth_release.cmake, release_cmake.cmake: ENH: first pass at + cmake scripts to create the cmake release + +2006-05-02 14:04 hoffman + + * Modules/FindQt4.cmake: ENH: fix qt version detection + +2006-05-02 13:31 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: add a fast version + for preinstall + +2006-05-02 12:44 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: need to make sure + paths are OK + +2006-05-02 12:40 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: need to make sure + paths are OK + +2006-05-02 10:48 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix for unix + +2006-05-02 09:56 martink + + * Source/cmGlobalGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Modules/CMakeDetermineCCompiler.cmake, + Modules/Platform/Windows-cl.cmake: ENH: Makefile performance + improvements + +2006-05-02 08:49 andy + + * CMakeLists.txt, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackZIPGenerator.cxx: ENH: Add support for + stipping and make more things overwritable + +2006-05-02 08:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-05-01 22:40 hoffman + + * Utilities/Release/cmake_release.sh: ENH: try again + +2006-05-01 22:31 hoffman + + * Utilities/Release/cmake_release.sh: ENH: try to call cpack from + script + +2006-05-01 14:23 andy + + * Modules/CPack.STGZ_Header.sh.in, + Source/CPack/cmCPackSTGZGenerator.cxx: ENH: Add license and make + it more verbose + +2006-05-01 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-30 10:59 hoffman + + * CMakeLists.txt, Copyright.txt, Modules/CPack.cmake, + Modules/NSIS.InstallOptions.ini.in, Modules/NSIS.template.in, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CTest/cmCTestGenericHandler.cxx, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestScriptHandler.h: ENH: move files from main + tree to 2.4.1 + +2006-04-30 08:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-30 03:16 andy + + * Source/CTest/cmCTestGenericHandler.cxx: BUG: Make handle + arguments work again + +2006-04-30 03:10 andy + + * Modules/NSIS.template.in: ENH: Handle the no-icon case + +2006-04-29 20:13 andy + + * Source/CTest/: cmCTestScriptHandler.cxx, cmCTestScriptHandler.h: + ENH: Allow CTEST_UPDATE_COMMAND and fix the comments. This should + allow SVN update too, maybe + +2006-04-29 20:03 andy + + * Copyright.txt: ENH: Acknowledge NAMIC + +2006-04-29 20:01 andy + + * CMakeLists.txt, Modules/CPack.cmake, Modules/NSIS.template.in: + ENH: Add more install registry options + +2006-04-29 19:22 andy + + * CMakeLists.txt, Modules/NSIS.InstallOptions.ini.in, + Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx: + ENH: Add NSIS options page for path selection, fix adding and + removing from path, add welcome page and license page + +2006-04-29 11:49 hoffman + + * CMakeLists.txt, CTestConfig.cmake, ChangeLog.manual, + Modules/CTest.cmake, Modules/FindQt4.cmake, + Modules/NSIS.template.in, Source/cmCTest.cxx, Source/cmCTest.h, + Source/cmMakefile.cxx, Source/cmVersion.cxx, Source/ctest.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestGenericHandler.cxx, + Source/CTest/cmCTestGenericHandler.h, + Source/CTest/cmCTestStartCommand.cxx, + Source/CTest/cmCTestStartCommand.h, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/kwsys/DynamicLoader.cxx, Source/kwsys/SystemTools.cxx, + Templates/CTestScript.cmake.in: ENH: merge in changes from main + tree and change version to 2.4.1-beta + +2006-04-29 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-28 11:59 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestStartCommand.cxx, CTest/cmCTestStartCommand.h, + CTest/cmCTestSubmitHandler.cxx: ENH: Add support for special + tracks, fix options of handlers so that the -R, -U, and so on + work in the new style scripting + +2006-04-28 11:58 andy + + * CTestConfig.cmake: ENH: Add XMLRPC support + +2006-04-28 11:58 andy + + * CMakeLists.txt, Templates/CTestScript.cmake.in: ENH: Add template + of ctest script + +2006-04-28 09:58 andy + + * Modules/CTest.cmake: ENH: Allow overwriting CTestConfig.cmake + items + +2006-04-28 08:59 hoffman + + * ChangeLog.manual, Docs/cmake-mode.el, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, Modules/FindQt4.cmake, + Modules/UseQt4.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalKdevelopGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalWatcomWMakeGenerator.cxx, + Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmTest.cxx, + Source/cmake.cxx, Source/cmake.h, Source/kwsys/CMakeLists.txt, + Source/kwsys/SystemTools.cxx, Source/kwsys/Terminal.c, + Source/kwsys/Terminal.h.in, Source/kwsys/testTerminal.c: ENH: + merge changes from main tree + +2006-04-28 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-27 17:52 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: put the fix back in with abort + +2006-04-27 17:46 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove code that does not + compile, on windows cwd must exist + +2006-04-27 16:20 andy + + * Modules/NSIS.template.in: ENH: Better support for adding and + removing path + +2006-04-27 16:02 mrichardson + + * Source/kwsys/SystemTools.cxx: COMP: Fixing the the build for + windows. + +2006-04-27 15:48 hoffman + + * Source/kwsys/DynamicLoader.cxx: ENH: remove warning + +2006-04-27 15:26 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: handle running from a + directory that has been deleted + +2006-04-27 15:23 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Fix problem with + Source Lines and add debugging of regular expressions + +2006-04-27 15:14 alex + + * Modules/FindQt4.cmake: ENH: use the ADD_FILE_DEPENDENCIES() macro + coming with cmake instead a duplicated implementation + _qt4_add_file_dependencies() here + + Alex + +2006-04-27 15:07 alex + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: -apply the patches by + Clinton Stimpson and Kenneth Moreland which fix some QtMain + issues on Windows ENH: -sync with KDE svn FindQt4, which features + a lot of enhancements + + Alex + +2006-04-27 10:55 andy + + * Modules/: CheckCSourceCompiles.cmake, + CheckCXXSourceCompiles.cmake: BUG: Use the extra definicions + +2006-04-27 10:41 king + + * Source/cmMakefileTargetGenerator.cxx: BUG: Make sure each + cmake_depends process uses the same SystemTools path translation + table as the original process. This addresses problems with + dependency scanning when make is run from a symlink directory + pointing at the original binary tree. + +2006-04-27 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-26 21:53 king + + * Source/: cmLocalUnixMakefileGenerator3.cxx, cmake.cxx: COMP: + Disable color support for bootstrap. + +2006-04-26 21:51 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Default SHELL on + windows should not be a hard-coded path. + +2006-04-26 21:31 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalWatcomWMakeGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmake.cxx, cmake.h: ENH: + Enabling color makefile support using cmsysTerminal_cfprintf. + Support for color is automatically detected when messages are + printed. Also made color scheme more readable on both black and + white backgrounds. This option can be enabled by setting + CMAKE_COLOR_MAKEFILE to true in the project. + +2006-04-26 15:54 king + + * Docs/cmake-mode.el: BUG: In example .emacs code use \' for + end-of-string instead of $ for end-of-line. + +2006-04-26 14:28 king + + * Docs/cmake-mode.el: BUG: Mode should only be used if + CMakeLists.txt is at the end of the buffer name. + +2006-04-26 14:22 king + + * Docs/cmake-mode.el: BUG: Tabs around a function name are allowed. + +2006-04-26 13:04 king + + * Docs/cmake-mode.el: ENH: Using suggestion from Stuart Herring to + avoid needing a list of command names in the highlighting table. + +2006-04-26 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-25 16:31 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: fix global help + +2006-04-25 12:09 hoffman + + * CMakeLists.txt, ChangeLog.manual, Docs/cmake-indent.vim, + Modules/CPack.cmake, Modules/CTest.cmake, Modules/FindQt3.cmake, + Modules/NSIS.template.in, Modules/UseEcos.cmake, + Source/CMakeLists.txt, Source/cmGlobalKdevelopGenerator.cxx, + Source/kwsys/SystemTools.cxx, Tests/Java/CMakeLists.txt: ENH: + move from main tree to 2.4 branch + +2006-04-25 11:58 hoffman + + * Source/cmLocalGenerator.cxx: ENH: make sure special vs ide path + is only used for msvc_ide builds + +2006-04-25 11:52 king + + * Docs/cmake-mode.el: ENH: Cleaned-up mode in preparation for + inclusion in emacs upstream. + +2006-04-25 09:54 king + + * Source/cmLocalGenerator.cxx: ENH: Added option + CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE to put all in-project + include directories before all out-of-project include + directories. + +2006-04-25 09:54 king + + * Source/kwsys/SystemTools.cxx: BUG: IsSubDirectory should use + ComparePath to do platform-independent path comparison. + +2006-04-25 09:38 hoffman + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmLocalGenerator.cxx: ENH: add special windows + CMAKE_MSVCIDE_RUN_PATH variable for adding to the path of vs IDE + for running custom commands from cmake + +2006-04-25 08:34 hoffman + + * Source/cmTest.cxx: ENH: make sure command is unix style as it may + have been sent into cmake as a windows path + +2006-04-25 08:33 hoffman + + * Source/kwsys/Terminal.h.in: ENH: fix build on AIX + +2006-04-25 08:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-24 12:15 king + + * Source/kwsys/CMakeLists.txt: ENH: Enabling build/test of Terminal + code now that it has been manually tested on several platforms. + +2006-04-24 12:12 hoffman + + * Source/cmFLTKWrapUICommand.cxx: ENH: fix fltk fluid order of + build + +2006-04-24 11:30 hoffman + + * Source/cmFLTKWrapUICommand.cxx: ENH: make sure command depends on + fluid + +2006-04-24 09:39 hoffman + + * Source/cmGlobalKdevelopGenerator.cxx: ENH: fix warnings + +2006-04-24 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-23 23:24 hoffman + + * Tests/Java/CMakeLists.txt: ENH: create the correct jar name + +2006-04-23 21:12 hoffman + + * Source/cmGlobalKdevelopGenerator.cxx: ENH: merge in Alex patches + +2006-04-23 19:45 andy + + * Modules/: CPack.cmake, NSIS.template.in: ENH: Propagate system + name and handle win32/win64 name + +2006-04-23 18:39 andy + + * CMakeLists.txt: ENH: Enable path + +2006-04-23 18:23 andy + + * Modules/NSIS.template.in: ENH: Add a line to Add/Remove programs + to uninstall + +2006-04-23 15:34 hoffman + + * Tests/Java/CMakeLists.txt: ENH: use the right name for the test + +2006-04-23 11:10 hoffman + + * Tests/Java/CMakeLists.txt: ENH: fix build + +2006-04-23 08:08 alex + + * Modules/UseEcos.cmake: BUG: finally really fix #2576 by adding + UseEcos.cmake to cvs :-) + + Alex + +2006-04-23 07:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-23 07:23 alex + + * Modules/FindQt3.cmake: BUG: fix QT_MIN_VERSION handling, it + didn't work anymore (qt_version_str vs. qt_version_str_lib) + + Alex + +2006-04-22 20:32 king + + * Source/kwsys/Terminal.c: COMP: Added missing include of string.h + for strcmp. + +2006-04-22 20:26 king + + * Source/kwsys/Terminal.c: BUG: Fixed bug in check for vt100 + assumption. + +2006-04-22 20:25 king + + * Source/kwsys/Terminal.c: BUG: Fixed uninitialized variable when + not building with windows console support. + +2006-04-22 20:20 king + + * Source/kwsys/: CMakeLists.txt, Terminal.c, Terminal.h.in, + testTerminal.c: ENH: Adding 'Terminal' component to hold support + routines for dealing with interactive terminals. Currently only + a cfprintf function is provided to print color messages. + +2006-04-22 09:13 hoffman + + * Tests/Java/CMakeLists.txt: ENH: fix in source build for vs ide + +2006-04-22 08:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-21 20:13 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: fix borland bug + +2006-04-21 16:33 andy + + * Docs/cmake-indent.vim: BUG: Fix typo + +2006-04-21 15:15 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: performance improvments + +2006-04-21 14:36 andy + + * Modules/CTest.cmake: BUG: Fix the missing nightly start time bug + and do some cleanup + +2006-04-21 14:26 andy + + * Source/CMakeLists.txt: ENH: Cleanup + +2006-04-21 10:26 hoffman + + * CTestCustom.ctest.in, ChangeLog.manual, Docs/cmake-indent.vim, + Docs/cmake-syntax.vim, Modules/CMakeGenericSystem.cmake, + Modules/Platform/HP-UX.cmake, Modules/Platform/Linux-ifort.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/kFreeBSD.cmake, + Source/cmGlobalGenerator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.h, + Source/cmMakefileTargetGenerator.cxx, Source/cmake.cxx: ENH: move + stuff from main tree + +2006-04-21 08:59 hoffman + + * CTestCustom.ctest.in: ENH: supress xcode warning + +2006-04-21 08:59 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: use a better name + +2006-04-21 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-21 07:17 andy + + * Docs/cmake-indent.vim: ENH: Add While support + +2006-04-20 21:54 hoffman + + * Source/cmMakefileTargetGenerator.cxx: ENH: ignore all files that + we do not know about just like in ide generators + +2006-04-20 21:32 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: do not compile + header files + +2006-04-20 17:00 hoffman + + * Source/cmake.cxx: ENH: save the cache on fatal error so that + users can set cache values + +2006-04-20 16:16 hoffman + + * ChangeLog.manual, Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmBootstrapCommands.cxx, Source/cmCommands.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, Source/cmakemain.cxx, + Templates/CPack.GenericDescription.txt, + Templates/CPack.GenericLicense.txt, + Templates/CPack.GenericWelcome.txt, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate: ENH: merge changes from main + tree + +2006-04-20 15:49 hoffman + + * Source/cmMakefile.h: ENH: fix .. in the path of subdirs + +2006-04-20 15:49 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: don't add package target if no + package file is around + +2006-04-20 15:28 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: VS7 seems to have + a limit on the length of the link directory list string. Try to + make the string as short as possible by avoiding trailing slashes + and using a relative path (if it is shorter). + +2006-04-20 10:51 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: fix help for + global targets + +2006-04-20 10:23 andy + + * Modules/: CMakeGenericSystem.cmake, Platform/HP-UX.cmake, + Platform/Linux-ifort.cmake, Platform/Linux.cmake, + Platform/kFreeBSD.cmake: ENH: Cleanup link libraries. Remove -l + from -ldl + +2006-04-20 10:22 andy + + * Source/cmakemain.cxx: ENH: Add help for graphviz + +2006-04-20 10:20 andy + + * Docs/cmake-syntax.vim: STYLE: Add missing command + +2006-04-20 09:59 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Changed color + scheme to be more readable on both white and black backgrounds. + +2006-04-20 09:54 andy + + * Templates/: CPack.GenericDescription.txt, + CPack.GenericLicense.txt, CPack.GenericWelcome.txt: ENH: Simplify + the generic instructions + +2006-04-20 09:32 hoffman + + * CTestCustom.ctest.in: ENH: add ignore for xcode + +2006-04-19 17:23 hoffman + + * Modules/: CheckCSourceCompiles.cmake, + CheckCXXSourceCompiles.cmake: ENH: append to log files + +2006-04-19 16:51 hoffman + + * CMakeLists.txt: ENH: update cpack stuff to match old cmake + releases + +2006-04-19 16:36 hoffman + + * Modules/Platform/Windows-cl.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx: ENH: name pdb files for + visual studio make based builds + +2006-04-19 15:29 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: unix makefiles should + work with cl + +2006-04-19 12:58 hoffman + + * ChangeLog.txt: ENH: put cvs2cl changelog to match branch + +2006-04-19 12:30 hoffman + + * ChangeLog.manual: ENH: add changelog for 2.4 + +2006-04-19 12:29 hoffman + + * ChangeLog.txt: ENH: create new change log with cvs2cl + +2006-04-19 11:14 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: don't need two of these + +2006-04-19 10:56 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: test for vs8 correctly + +2006-04-19 10:50 king + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: BUG: Need + ADD_DEPENDENCIES command for MinGW bootstrap since kwsys uses the + Win32 implementation of process execution. + +2006-04-19 10:34 king + + * Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate: BUG: VS6 generator now uses + ComputeLinkInformation just like all other generators. + +2006-04-19 10:11 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: check for version 1400 + +2006-04-19 08:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-18 16:40 hoffman + + * CMakeLists.txt: ENH: make cpack names match old cmake release + process + +2006-04-18 15:32 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: put global + targets in the help + +2006-04-18 15:30 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: make sure help + has global targets + +2006-04-18 14:48 hoffman + + * CMakeLists.txt, Source/cmCPluginAPI.h: ENH: move version numbers + to 2.5.0 + +2006-04-18 14:48 hoffman + + * CMakeLists.txt, Source/cmCPluginAPI.h, Utilities/Release/README: + ENH: move version numbers to 2.4.0 + +2006-04-18 11:53 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Do not require + language flags variables. Other generators do not, and it breaks + programmable language support (like the Java test). + +2006-04-18 11:50 barre + + * Source/kwsys/SystemTools.cxx: ENH: try to bypass Microsoft + assert() on isspace, isalpha, etc. + +2006-04-18 11:45 king + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Updated VS6 generator + to use target.GetFullName() to compute target file names. + +2006-04-18 10:56 king + + * Source/: cmSetTargetPropertiesCommand.h, cmTarget.cxx: ENH: Added + _OUTPUT_NAME target property to allow the output name to + be set on a per-configuration basis. + +2006-04-18 10:32 andy + + * Docs/: cmake-indent.vim, cmake-syntax.vim: ENH: Cleanup header + and make license compatible with VIM + +2006-04-18 10:32 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackSTGZGenerator.cxx: ENH: Remove some debugging + +2006-04-18 10:30 king + + * Source/: cmFileCommand.cxx, cmInstallCommand.h: BUG: Using the + source-file permissions by default for installation is somewhat + unpredictable because users can extract source code with almost + any permissions (umask). Changing the default to use 644 for + files and 755 for programs. No release has documented the old + behavior so we do not need compatibility. + +2006-04-18 10:27 king + + * Source/cmIfCommand.h: BUG: Fixed missing false values in + documentation of IF command. + +2006-04-18 10:01 king + + * Modules/CPack.cmake: BUG: Need to ignore source packaging of #*# + files created by emacs during editing. + +2006-04-18 09:24 andy + + * Source/CPack/cmCPackSTGZGenerator.cxx: COMP: Remove non-existent + header + +2006-04-18 08:25 andy + + * Modules/CPack.STGZ_Header.sh.in, Source/cmFileCommand.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.h, Source/CPack/cpack.cxx: ENH: + More cleanups and add stgz header script, so it does not have to + be hard-coded. Also, the user can overwrite it + +2006-04-18 08:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-17 19:02 andy + + * bootstrap: ENH: Fix copyright year + +2006-04-17 18:10 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: remove + duplicate file name test because it fails on xcode + +2006-04-17 16:06 andy + + * Source/cmGlobalGenerator.cxx: BUG: Verify the global target name + exists before using it. Fixes VS and Xcode + +2006-04-17 15:55 hoffman + + * Modules/FindX11.cmake: ENH: fix find x11 on the mac + +2006-04-17 15:35 hoffman + + * Source/cmLocalGenerator.cxx: ENH: fix java for ide builds again + +2006-04-17 15:26 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h: ENH: Add packaging of source + code (make package_source) + +2006-04-17 14:13 malaterre + + * Source/kwsys/CMakeLists.txt: COMP: Fix compilation on linux + (dlopen/dlclose symbols) + +2006-04-17 14:00 hoffman + + * Modules/CMakeJavaInformation.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx: ENH: fix java and add + OBJECT_DIR support + +2006-04-17 13:59 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + Complex/Executable/Sub1/NameConflictTest.c, + Complex/Executable/Sub2/NameConflictTest.c, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Executable/Sub1/NameConflictTest.c, + ComplexOneConfig/Executable/Sub2/NameConflictTest.c, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Executable/Sub1/NameConflictTest.c, + ComplexRelativePaths/Executable/Sub2/NameConflictTest.c: ENH: + allow multiple files with the same name in different sub dirs + test + +2006-04-17 13:58 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: allow multiple + files with the same name in different subdirs + +2006-04-17 13:57 hoffman + + * Modules/CMakeDetermineCXXCompiler.cmake: ENH: add mingw test to + cxx + +2006-04-17 13:57 hoffman + + * Modules/Platform/Windows-gcc.cmake: ENH: add windows apps to + mingw + +2006-04-17 07:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-16 13:49 andy + + * Docs/cmake-syntax.vim: ENH: Cleanup, make case insensitive, + remove macro since it does not work anyway + +2006-04-16 08:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-15 13:02 andy + + * Modules/CPack.cmake, Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.h, + Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.h, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.h, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.h, + Source/CPack/cmCPackTGZGenerator.cxx, + Source/CPack/cmCPackTGZGenerator.h, + Source/CPack/cmCPackZIPGenerator.cxx, + Source/CPack/cmCPackZIPGenerator.h: ENH: Support for packaging + source, several cleanups and more yeehaa... + +2006-04-15 08:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-14 15:08 hoffman + + * Modules/FindX11.cmake: ENH: make sure frameworks are not searched + for x header files + +2006-04-14 09:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-14 09:02 hoffman + + * Source/CMakeLists.txt: ENH: fix syntax + +2006-04-14 08:58 andy + + * Modules/CPack.cmake, Source/CPack/cmCPackGenericGenerator.cxx, + Templates/CPackConfig.cmake.in: ENH: Start adding support for + packaging component and to package into a subdirectory + +2006-04-14 08:44 hoffman + + * Source/CMakeLists.txt: ENH: make sure cmake can be built with an + older version of cmake + +2006-04-13 23:24 hoffman + + * Source/cmFindProgramCommand.cxx: ENH: fix warning + +2006-04-13 23:15 hoffman + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmakemain.cxx: + ENH: search for help modules in the correct place for install and + source tree builds + +2006-04-13 22:57 king + + * Source/cmFileCommand.cxx: BUG: Fixed install rules to use + copy-if-different. + +2006-04-13 22:56 king + + * Source/kwsys/SystemTools.cxx: ENH: Improved implementation of + FilesDiffer to avoid allocating enough memory for the entire file + twice. Instead using a block-at-a-time comparison. + +2006-04-13 15:28 king + + * Tests/CustomCommand/wrapper.cxx: COMP: Do not use ANSI function + prototypes to pacify HP. + +2006-04-13 11:00 hoffman + + * bootstrap, Modules/Platform/Darwin.cmake, Source/CMakeLists.txt, + Source/cmFindBase.cxx, Source/cmFindBase.h, + Source/cmFindProgramCommand.cxx, Source/cmFindProgramCommand.h, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in: + ENH: add patch for finding applications on OSX + +2006-04-13 10:15 king + + * Source/: cmGlobalUnixMakefileGenerator3.h, + cmGlobalWatcomWMakeGenerator.cxx, cmMakefileTargetGenerator.cxx: + BUG: Work-around Watcom WMake limitation for multiple-output + custom command support. + +2006-04-13 08:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-12 22:04 king + + * Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallScriptGenerator.cxx, + Source/cmInstallScriptGenerator.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/InstallScript1.cmake, + Tests/SimpleInstall/InstallScript2.cmake, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/InstallScript1.cmake, + Tests/SimpleInstallS2/InstallScript2.cmake: ENH: Added + INSTALL(CODE) mode to allow inline specification of install + script code. This reduces the need for configuring an install + script that needs some variable settings because the install code + can set thing up first. + +2006-04-12 21:24 andy + + * Docs/cmake-indent.vim: ENH: Unify the comment + +2006-04-12 21:20 andy + + * Docs/cmake-syntax.vim: ENH: More system variables, more + operators, more commands, fix some string issues and some cmake + arguments issues + +2006-04-12 15:23 hoffman + + * Source/CMakeLists.txt: ENH: lang by custom command does not yet + work for Xcode + +2006-04-12 11:56 martink + + * Source/cmGlobalGenerator.cxx: COMP: fix warning + +2006-04-12 11:36 martink + + * Source/cmGlobalGenerator.h: ENH: fix compile issue on HP + hopefully + +2006-04-12 09:12 hoffman + + * Source/cmDocumentation.cxx: ENH: case insensitive command help + +2006-04-12 08:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-11 22:39 hoffman + + * Source/cmake.cxx: ENH: add more verbose output in verbose mode + +2006-04-11 22:39 hoffman + + * Source/cmMakefile.cxx: ENH: fix re-run of cmake based on + configured files that are done with copy if different and never + change + +2006-04-11 17:11 hoffman + + * Source/: CMakeLists.txt, cmLocalGenerator.cxx: ENH: enable test + for java with IDE builds + +2006-04-11 16:55 king + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-icl.cmake, + Modules/Platform/Windows-ifort.cmake, + Modules/Platform/Windows-wcl386.cmake, + Source/cmLocalGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx: ENH: Split + CMAKE_STANDARD_LIBRARIES into per-language variables + CMAKE__STANDARD_LIBRARIES. This is needed to get + programmable language support working with Visual Studio + generators. It makes sense anyway. + +2006-04-11 14:54 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Use flag-map + transform only for C and C++ flags. + +2006-04-11 14:53 king + + * Source/cmLocalGenerator.cxx: ENH: Restored implementation of + AddCustomCommandToCreateObject. Updated it to use newer custom + command functionality. + +2006-04-11 13:32 king + + * Source/cmLocalGenerator.cxx: BUG: Install scripts should honor + EXCLUDE_FROM_ALL options for subdirectories. This addresses + bug#3100. + +2006-04-11 12:51 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, cmMakefile.cxx, cmMakefile.h: + ENH: some performance optimizations + +2006-04-11 11:40 king + + * Source/cmLocalGenerator.cxx: BUG: Do not add non-per-config + subdirectory name of cmake target libraries as full path libs. + +2006-04-11 11:06 king + + * Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomCommandCommand.h, Source/cmCustomCommand.cxx, + Source/cmCustomCommand.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmMakefileTargetGenerator.cxx, + Source/cmake.cxx, Tests/CustomCommand/CMakeLists.txt, + Tests/CustomCommand/wrapper.cxx: ENH: Added support for multiple + outputs generated by a single custom command. For Visual Studio + generators the native tool provides support. For Xcode and + Makefile generators a simple trick is used. The first output is + considered primary and has the build rule attached. Other + outputs simply depend on the first output with no build rule. + During cmake_check_build_system CMake detects when a secondary + output is missing and removes the primary output to make sure all + outputs are regenerated. This approach always builds the custom + command at the right time and only once even during parallel + builds. + +2006-04-11 10:04 king + + * Source/cmMakefile.h: BUG: Fixed typo in new cmake-rerun code. + +2006-04-11 08:56 andy + + * Source/cmCTest.cxx: BUG: The fast mode should not read + CTestCustom.ctest files + +2006-04-11 08:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-10 13:52 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, cmMakefile.cxx, + cmMakefile.h: ENH: add support for re-running cmake if the + cmakefiles change + +2006-04-10 13:52 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: add test for mfc + +2006-04-10 13:47 hoffman + + * Source/cmFileCommand.cxx: ENH: handle single path + +2006-04-10 13:46 hoffman + + * Modules/: CMakeVS6FindMake.cmake, CMakeVS71FindMake.cmake, + CMakeVS7FindMake.cmake, CMakeVS8FindMake.cmake, + InstallRequiredSystemLibraries.cmake: ENH: add correct flags for + msvc generators + +2006-04-10 13:44 andy + + * Modules/CPack.cmake, Source/cmGlobalGenerator.h, + Source/ctest.cxx, Source/CPack/cmCPackGenericGenerator.cxx: ENH: + Add support for preinstall for cmake generated projects when + packaging them + +2006-04-10 11:39 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix so all configurations + show up + +2006-04-10 11:09 andy + + * Modules/CPack.cmake, Source/CPack/cmCPackGenericGenerator.cxx: + ENH: Deprecate CPACK_BINARY_DIR and add + CPACK_INSTALL_CMAKE_PROJECTS + +2006-04-10 09:36 andy + + * CTestCustom.ctest.in: ENH: Some ctest custom fixes + +2006-04-10 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-09 08:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-09 07:45 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestBuildHandler.cxx, + CTest/cmCTestReadCustomFilesCommand.cxx: BUG: Improve the + behavior of the ReadCustomFilesCommand + +2006-04-08 14:15 hoffman + + * Source/: cmLocalKdevelopGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: make sure verbose output is + used for kde + +2006-04-08 08:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-07 16:46 hoffman + + * Modules/Platform/: Windows-cl.cmake, Windows-cl.cmake.in: ENH: + add better variables for MSVC versions + +2006-04-07 16:35 andy + + * Modules/CPack.cmake: ENH: Allow to overwrite CPACK_BINARY_DIR + +2006-04-07 07:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-06 07:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-05 11:07 king + + * Source/cmOrderLinkDirectories.cxx: COMP: Moved var decl out of + _WIN32 block. + +2006-04-05 11:05 king + + * Source/: cmLocalGenerator.cxx, cmOrderLinkDirectories.cxx: BUG: + Fixed cmOrderLinkDirectories to deal with raw link items that do + not yet exist and correct drive letter case to avoid duplicate + paths on windows. Fixed cmLocalGenerator to pass CMake targets + as full paths to cmOrderLinkDirectories to make sure the ordering + will pick up the proper target libraries. + +2006-04-05 07:46 hoffman + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: add path + conversion stuff and rm SYSTEM_PATH + +2006-04-05 07:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-04 17:27 hoffman + + * Modules/CMakeVS8FindMake.cmake: ENH: add search directories for + 32 bit devenv from a 64bit cmake + +2006-04-04 17:14 king + + * Source/cmLocalGenerator.cxx: BUG: Removing part of earlier fix + because it does not work with VS generators. It may be restored + later after cmOrderLinkDirs is further fixed. + +2006-04-04 14:53 king + + * Source/cmSetTargetPropertiesCommand.h: ENH: Added documentation + for COMPILE_FLAGS property and clarified meaning of + DEFINE_SYMBOL. + +2006-04-04 14:25 king + + * Source/cmLocalGenerator.cxx, Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Fixed + cmOrderLinkDirectories to make sure cmake-built libraries are + found properly. Also taking libraries that will be built but may + not yet exist into account. The per-configuration subdirectories + that are included by generators in the link path are checked for + conflicting libraries also. Potentially conflicting libraries + that are actually symlinks back to the desired library are no + longer considered conflicting, which avoids bogus impossible + ordering warnings. + +2006-04-04 14:25 martink + + * Source/cmakexbuild.cxx: BUG: compiler fix + +2006-04-04 13:04 martink + + * Source/: cmCTest.cxx, cmCTest.h, cmForEachCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmakexbuild.cxx, ctest.cxx, + CTest/cmCTestRunScriptCommand.cxx, + CTest/cmCTestRunScriptCommand.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h: ENH: added support for -SP scripts + in new processes + +2006-04-04 11:52 hoffman + + * Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: change + library order to use a vector + +2006-04-04 11:48 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h, cmTarget.h: ENH: Added + global TargetManifest computation between Configure and Generate + steps. This allows generators to know what other targets will + exist on disk when the build completes. + +2006-04-04 09:35 king + + * Source/: cmIncludeDirectoryCommand.cxx, + cmIncludeDirectoryCommand.h: ENH: INCLUDE_DIRECTORIES should have + been written to prepend to the include path so that the most + local directories are included first. This is a patch from Alex + to resolve the problem by allowing users to switch the default + using a variable CMAKE_INCLUDE_DIRECTORIES_BEFORE and then still + explicitly appending or prepending by using AFTER or BEFORE + arguments explicitly. + +2006-04-04 07:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-03 22:05 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: use correct addcache call to + fix build tools + +2006-04-03 17:54 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix spaces in path for + xcode + +2006-04-03 16:20 hoffman + + * Source/: cmIncludeDirectoryCommand.cxx, + cmLinkDirectoriesCommand.cxx: ENH: make sure include and lib dirs + are unix paths + +2006-04-03 15:59 hoffman + + * Source/cmFileCommand.cxx: ENH: fix warning, and remove debug code + +2006-04-03 12:57 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmSetTargetPropertiesCommand.h: ENH: add support for per config + target LINK_FLAGS + +2006-04-03 07:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-02 11:20 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackNSISGenerator.cxx, + CPack/cmCPackPackageMakerGenerator.cxx, + CPack/cmCPackZIPGenerator.cxx, CPack/cmCPackZIPGenerator.h, + CPack/cpack.cxx: ENH: Add ZIP generator and add support for + including or excluding the toplevel directory + +2006-04-02 08:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-04-01 07:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-31 21:43 hoffman + + * Source/: cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h: + ENH: fix spelling + +2006-03-31 17:59 hoffman + + * Source/cmOrderLinkDirectories.cxx: ENH: fix for bug 3067 the + first framework ate the rest of the libraries + +2006-03-31 13:17 hoffman + + * bootstrap, Source/CMakeLists.txt, Source/cmGlobalGenerator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmTryCompileCommand.cxx, Source/cmakemain.cxx, + Source/cmakexbuild.cxx: ENH: add a wrapper for xcodebuild to get + around bug and verbose output + +2006-03-31 08:46 hoffman + + * Utilities/cmcurl/getdate.c: ENH: remove c++ comment from c code + +2006-03-31 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-30 23:03 hoffman + + * Utilities/cmtar/append.c: ENH: remove warning + +2006-03-30 17:26 hoffman + + * Source/cmakexbuild.cxx: ENH: add program to run xcodebuild and + get around bug + +2006-03-30 16:55 king + + * Modules/Platform/Windows-cl.cmake: BUG: Fixed order of options to + cl for 32-bit/64-bit test to work with VS 6 NMake. + +2006-03-30 15:39 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalWatcomWMakeGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: ENH: Implemented VT100 terminal + escape sequences. If CMAKE_COLOR_MAKEFILE is set then messages + produced by makefiles will be in color if the native tool + supports it. This addresses bug#3060. + +2006-03-30 13:49 hoffman + + * Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-cl.cmake.in, Source/CMakeLists.txt, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmDependsJavaParserHelper.cxx, + Source/cmExecuteProcessCommand.cxx, Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalVisualStudio8Win64Generator.cxx, + Source/cmGlobalVisualStudio8Win64Generator.h, + Source/cmIfCommand.cxx, Source/cmListCommand.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmXMLParser.cxx, + Source/cmake.cxx, Source/CTest/cmCTestHandlerCommand.cxx, + Source/CTest/cmCTestMemCheckHandler.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/kwsys/CommandLineArguments.cxx, Source/kwsys/Glob.cxx, + Source/kwsys/ProcessWin32.c, Source/kwsys/Registry.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/hashtable.hxx.in, + Source/kwsys/testDynamicLoader.cxx, + Utilities/cmcurl/CMakeLists.txt, Utilities/cmcurl/getdate.c, + Utilities/cmcurl/inet_pton.c, Utilities/cmcurl/md5.c, + Utilities/cmcurl/mprintf.c, Utilities/cmtar/CMakeLists.txt, + Utilities/cmtar/append.c, Utilities/cmtar/block.c, + Utilities/cmtar/extract.c, Utilities/cmtar/handle.c, + Utilities/cmtar/output.c, Utilities/cmtar/compat/snprintf.c, + Utilities/cmxmlrpc/xmlrpc_array.c, + Utilities/cmxmlrpc/xmlrpc_client.c, + Utilities/cmxmlrpc/xmlrpc_data.c, + Utilities/cmxmlrpc/xmlrpc_expat.c, + Utilities/cmxmlrpc/xmlrpc_parse.c, + Utilities/cmxmlrpc/xmlrpc_registry.c, + Utilities/cmxmlrpc/xmlrpc_serialize.c, + Utilities/cmxmlrpc/xmlrpc_struct.c, + Utilities/cmxmlrpc/xmlrpc_strutil.c, + Utilities/cmxmlrpc/xmlrpc_support.c: ENH: add support for win64 + for visual studio 2005 ide and nmake, also fix warnings produced + by building for win64 + +2006-03-30 13:33 king + + * Source/: cmFileCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmInstallCommand.cxx, cmInstallCommand.h, + cmInstallFilesGenerator.cxx, cmInstallFilesGenerator.h, + cmInstallGenerator.cxx, cmInstallGenerator.h, + cmInstallTargetGenerator.cxx, cmInstallTargetGenerator.h, + cmLocalGenerator.cxx: ENH: Added named component installation + implementation. Installation behavior should be unchanged unless + -DCOMPONENT= is specified when cmake_install.cmake is + invoked. + +2006-03-30 11:55 hoffman + + * Source/: cmFileCommand.cxx, cmFindBase.cxx, cmFindBase.h: ENH: + make sure framework search order is correct + +2006-03-30 09:17 martink + + * Source/cmGlobalGenerator.cxx: ENH: modified the relative path + code to not do relative paths between bin and source + +2006-03-30 08:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-29 16:34 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: Use + PBXResourcesBuildPhase for resrources + +2006-03-29 16:34 hoffman + + * Modules/Platform/Darwin.cmake: ENH: use correct name for path + +2006-03-29 16:25 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: Simplify. Instead of + doing ../MacOS just copy to current directory + +2006-03-29 16:21 andy + + * Source/cmXCode21Object.cxx: ENH: Add support for Xcode 2.1 + +2006-03-29 15:02 andy + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx, + cmXCodeObject.h: ENH: Add copy stages for bundle files + +2006-03-29 13:33 hoffman + + * Source/cmFindBase.cxx, Tests/BundleTest/CMakeLists.txt: ENH: add + a test for find framework stuff in find_library, and fix the + framework search stuff + +2006-03-29 13:26 hoffman + + * Source/kwsys/CMakeLists.txt: ENH: remove test on cygwin since it + randomly fails + +2006-03-29 12:33 andy + + * Source/CTest/: cmCTestBuildCommand.cxx, + cmCTestConfigureCommand.cxx, cmCTestCoverageCommand.cxx, + cmCTestSubmitCommand.cxx, cmCTestUpdateCommand.cxx: COMP: Return + 0 instead of false + +2006-03-29 12:01 andy + + * Source/cmCTest.cxx, Source/cmCTest.h, + Source/CTest/cmCTestBuildCommand.cxx, + Source/CTest/cmCTestBuildCommand.h, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestConfigureCommand.cxx, + Source/CTest/cmCTestConfigureCommand.h, + Source/CTest/cmCTestCoverageCommand.cxx, + Source/CTest/cmCTestCoverageCommand.h, + Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestHandlerCommand.cxx, + Source/CTest/cmCTestMemCheckHandler.cxx, + Source/CTest/cmCTestSubmitCommand.cxx, + Source/CTest/cmCTestSubmitCommand.h, + Source/CTest/cmCTestTestCommand.h, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestUpdateCommand.cxx, + Source/CTest/cmCTestUpdateCommand.h, + Tests/CTestTest3/test.cmake.in: ENH: Several cleanups and make + sure things get propagated where they should. Also, allow to load + CTest custom files to the actual ctest -S script + +2006-03-29 09:10 andy + + * Source/cmSetSourceFilesPropertiesCommand.cxx: COMP: Remove + warning + +2006-03-29 08:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-28 16:36 andy + + * Source/CTest/cmCTestReadCustomFilesCommand.cxx, + Tests/CTestTest3/test.cmake.in: BUG: Fix the read custom files + command and add a coverage test + +2006-03-28 16:25 andy + + * Source/: cmLocalGenerator.cxx, cmTarget.cxx: COMP: Remove + warnings + +2006-03-28 15:20 andy + + * Source/cmCTest.cxx: ENH: Pass handler flags to both test and + memcheck handler + +2006-03-28 15:19 andy + + * Source/: CMakeLists.txt, cmCTest.h: ENH: Add new ctest command + +2006-03-28 14:45 king + + * Source/cmFindBase.cxx: ENH: Added check of + CMAKE_BACKWARDS_COMPATIBILITY to skip the CMake system path + search when simulating CMake 2.2 and earlier. + +2006-03-28 14:37 andy + + * Source/CTest/: cmCTestReadCustomFilesCommand.cxx, + cmCTestReadCustomFilesCommand.h, cmCTestScriptHandler.cxx: ENH: + Add command to read ctest custom files + +2006-03-28 13:48 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Handle spaces in + the path + +2006-03-28 13:23 andy + + * Tests/BundleTest/: BundleLib.cxx, BundleTest.cxx: ENH: Check if + files exist + +2006-03-28 13:16 andy + + * Source/: cmFileCommand.cxx, cmInstallGenerator.cxx, + cmInstallTargetGenerator.cxx, cmTarget.h: ENH: Add proper support + for installing bundles + +2006-03-28 13:07 alex + + * Modules/FindKDE4.cmake: STYLE: better error message when KDE4 + hasn't been found + + Alex + +2006-03-28 10:58 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Pay attention to the + MACOSX_BUNDLE target property only on APPLE platforms. + +2006-03-28 08:54 andy + + * Modules/Platform/Darwin.cmake, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h, + Source/cmSetSourceFilesPropertiesCommand.cxx, + Tests/BundleTest/CMakeLists.txt, + Tests/BundleTest/SomeRandomFile.txt, + Tests/BundleTest/randomResourceFile.plist.in: ENH: Add support + for adding content to bundles + +2006-03-28 08:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-27 12:21 hoffman + + * Modules/Platform/UnixPaths.cmake: ENH: add /opt/local/include + +2006-03-27 11:09 hoffman + + * Modules/Platform/: FreeBSD.cmake, OpenBSD.cmake: ENH: add unix + paths + +2006-03-27 10:46 hoffman + + * Modules/Platform/: FreeBSD.cmake, HP-UX.cmake, IRIX.cmake, + IRIX64.cmake, NetBSD.cmake, OSF1.cmake, SCO_SV.cmake, + SINIX.cmake, Tru64.cmake, ULTRIX.cmake, UNIX_SV.cmake, + UnixPaths.cmake, UnixWare.cmake, Xenix.cmake, kFreeBSD.cmake: + ENH: add more search paths and add UnixPaths to all unix + platforms + +2006-03-27 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-26 08:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-25 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-24 16:13 hoffman + + * Source/cmListCommand.cxx: ENH: allow unset vars to be used in + list length + +2006-03-24 16:11 king + + * CMakeLists.txt, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Added ARCHIVE option + to the TARGETS mode of the INSTALL command. It is a third option + added to RUNTIME and LIBRARY property types. Static libraries + and import libraries are now treated as ARCHIVE targets instead + of LIBRARY targets. This adds a level of granularity necessary + for upcoming features. Also updated the CVS CMake patch level + set in CMake_VERSION_PATCH from 4 to 5 to allow users of this + version to know whether this incompatible change is present. + +2006-03-24 14:47 king + + * Modules/FindPythonLibs.cmake: ENH: Updated implementation to use + new FIND_* command power. The correct library is now found on + MinGW also. + +2006-03-24 14:16 king + + * Source/: cmFindBase.cxx, cmFindBase.h: ENH: Added + NO_CMAKE_ENVIRONMENT_PATH, NO_CMAKE_PATH, + NO_SYSTEM_ENVIRONMENT_PATH, and NO_CMAKE_SYSTEM_PATH options back + to allow more granularity than NO_DEFAULT_PATH. + +2006-03-24 14:15 king + + * Modules/Platform/UnixPaths.cmake: BUG: Fix '/use/lib' to be + '/usr/lib'. + +2006-03-24 12:20 martink + + * Tests/CustomCommand/: CMakeLists.txt, + GeneratedHeader/CMakeLists.txt: BUG: fix test to list generate + dheader + +2006-03-24 09:15 hoffman + + * Modules/Platform/Darwin.cmake, Source/cmGlobalXCodeGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalXCodeGenerator.cxx, Source/cmTryCompileCommand.cxx, + Tests/ExternalOBJ/CMakeLists.txt, + Tests/ExternalOBJ/Object/CMakeLists.txt, + Tests/X11/CMakeLists.txt: ENH: add support for universal binaries + +2006-03-24 08:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-23 15:35 andy + + * Source/CTest/cmCTestBuildAndTestHandler.cxx: COMP: Remove warning + +2006-03-23 13:55 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: removed unused rules from + targets for VS + +2006-03-23 11:19 andy + + * Source/cmCTest.cxx: BUG: Fix CTestCustom.ctest file + +2006-03-23 10:10 hoffman + + * CTestCustom.ctest.in: ENH: try to get rid of warning on HP + +2006-03-23 09:56 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More error handling + +2006-03-23 08:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-22 17:21 hoffman + + * Source/cmExecuteProcessCommand.cxx: ENH: do not dereference empty + stl vectors + +2006-03-22 15:01 martink + + * Tests/: Complex/VarTests.cmake, + Complex/Executable/CMakeLists.txt, + Complex/Executable/Included.cmake, + Complex/Executable/complex.cxx, ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/Included.cmake, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/Included.cmake, + ComplexRelativePaths/Executable/complex.cxx: ENH: added testing + for new features + +2006-03-22 14:45 andy + + * Source/cmMakefile.cxx: BUG: Fix logic. If the variable is not + set, then it is always ok to write the file + +2006-03-22 14:40 andy + + * Source/: cmAddCustomCommandCommand.cxx, + cmConfigureFileCommand.cxx, cmExecuteProcessCommand.cxx, + cmFileCommand.cxx, cmMakeDirectoryCommand.cxx, cmMakefile.cxx, + cmMakefile.h, cmWriteFileCommand.cxx: ENH: Allow blocking of + writing into the source tree + +2006-03-22 14:06 martink + + * Source/: cmGetDirectoryPropertyCommand.h, + cmGetSourceFilePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmMakefile.cxx, cmMakefile.h, cmSourceFile.cxx: ENH: added some + new functionality + +2006-03-22 13:04 andy + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx, cmake.cxx: + COMP: Fix apple bootstrap issues + +2006-03-22 11:14 andy + + * Source/cmBootstrapCommands.cxx, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, Source/cmCommands.cxx, + Source/cmWriteFileCommand.cxx, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: Cleanup + bootstrap even more + +2006-03-22 11:10 king + + * Modules/Platform/Windows-gcc.cmake, Source/cmLocalGenerator.cxx: + ENH: Added support for linking to MS .lib libraries in MinGW. + +2006-03-22 09:58 andy + + * bootstrap, Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmakemain.cxx: ENH: Remove things from bootstrap + +2006-03-22 08:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-21 17:47 barre + + * Source/kwsys/SystemTools.cxx: ENH: the arguments to this function + were not checked in a robust way + +2006-03-21 16:59 andy + + * CMakeLists.txt: ENH: Add flag for MFC + +2006-03-21 16:58 andy + + * Modules/InstallRequiredSystemLibraries.cmake: ENH: Handle visual + studio versions + +2006-03-21 16:39 andy + + * Source/cmCTest.cxx: ENH: Two things. If there is + CTestCustom.cmake in the toplevel directory read that file only. + If there is CTestCustom.ctest in the toplevel directory, do the + glob, if there is none, do nothing + +2006-03-21 16:03 andy + + * Source/cmFileCommand.cxx, Source/cmFileCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Add relative tag and + add test for relative tag + +2006-03-21 16:02 andy + + * Source/kwsys/: Glob.cxx, Glob.hxx.in: ENH: Add support for + relative paths and cleanup + +2006-03-21 16:01 andy + + * Source/cmCTest.cxx: BUG: Handle visual studio 8 + +2006-03-21 12:56 alex + + * Modules/FindKDE3.cmake: BUG: put the path to the kde3 lib dir in + KDE3_LIB_DIR, not the complete libkdecore.so + + Alex + +2006-03-21 12:54 andy + + * bootstrap, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmCacheManager.cxx, Source/cmFileCommand.cxx, + Source/cmFindPathCommand.cxx, Source/cmGlob.cxx, Source/cmGlob.h, + Source/CTest/cmCTestCoverageHandler.cxx: ENH: Remove cmGlob and + use glob from kwsys + +2006-03-21 08:45 king + + * Source/cmLocalGenerator.cxx: ENH: Enabling + CMAKE_INCLUDE_CURRENT_DIR even for in-source builds to be more + consistent with its name. This also makes double-quote and + angle-bracket include styles (almost) identical. + +2006-03-21 08:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-20 16:24 andy + + * Source/CPack/cmCPackPackageMakerGenerator.cxx: ENH: Handle + unusual path for packagemaker + +2006-03-20 12:29 alex + + * Modules/: AddFileDependencies.cmake, FindPNG.cmake, + KDE3Macros.cmake: BUG: don't include MacroLibrary.cmake, but add + a cmake module which implements ADD_FILE_DEPENDENCIES() ENH: mark + the variables from FindPNG.cmake as advanced + + Alex + +2006-03-20 07:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-19 07:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-18 12:23 hoffman + + * CTestCustom.ctest.in: ENH: add more warning stuff + +2006-03-18 12:16 alex + + * Modules/FindKDE3.cmake: STYLE: fix typos + + Alex + +2006-03-18 08:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-17 16:30 andy + + * Source/cmConfigure.cmake.h.in: ENH: Propagate cmake variables to + macros in C + +2006-03-17 16:14 andy + + * CMakeLists.txt, Source/CMakeLists.txt, Source/cmSystemTools.cxx: + ENH: Simplify the test + +2006-03-17 15:47 andy + + * Source/CMakeLists.txt: COMP: Use the current cmake's + CheckCXXSourceCompiles + +2006-03-17 15:46 andy + + * Source/: CMakeLists.txt, cmSystemTools.cxx, cmSystemTools.h, + cmake.cxx: ENH: Handle missing unsetenv and add check for environ + +2006-03-17 15:33 hoffman + + * Source/cmSystemTools.cxx: ENH: make cmake compile + +2006-03-17 12:31 andy + + * Source/cmSystemTools.cxx: COMP: Fix windows + +2006-03-17 12:24 andy + + * Source/cmSystemTools.cxx: COMP: Handle windows with hack for now + +2006-03-17 12:06 malaterre + + * Source/kwsys/: Directory.cxx, Directory.hxx.in, SystemTools.cxx, + SystemTools.hxx.in: ENH: Use const char where it should have + been. At same time fix Bug#2958 + +2006-03-17 11:44 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add a method to + remove environment variables + +2006-03-17 11:14 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx: ENH: Use + vector of plain strings and add cmake -E command for getting + environment + +2006-03-17 10:58 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add access for + all environment variables + +2006-03-17 09:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-16 18:24 king + + * Source/cmGlobalGenerator.cxx: BUG: When generating the install + rules for CMake itself the per-configuration subdirectory must be + used to specify the executable location. + +2006-03-16 17:49 hoffman + + * Source/: cmFindBase.cxx, cmFindBase.h: ENH: clean up find stuff + so that NO_SYSTEM_PATH is backwards compatible and you get put + system env variables in the find commands + +2006-03-16 17:40 king + + * Modules/Platform/Windows-cl.cmake: BUG: /DWIN32 and /D_WINDOWS + should be defined for all configurations or if no configuration + is set. + +2006-03-16 17:26 king + + * Source/kwsys/auto_ptr.hxx.in: COMP: Skip trying to use native + auto_ptr implementation and just provide a conforming one. + +2006-03-16 17:20 king + + * Tests/: Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: BUG: Removed + compiled-in CMAKE_SHARED_MODULE_PREFIX and + CMAKE_SHARED_MODULE_SUFFIX for loaded commands in favor of using + the settings from the platform files. + +2006-03-16 17:09 king + + * Source/: cmConfigure.cmake.h.in, cmDynamicLoader.cxx, + cmDynamicLoader.h, cmLoadCommandCommand.cxx: BUG: Removed + compiled-in CMAKE_SHARED_MODULE_PREFIX and + CMAKE_SHARED_MODULE_SUFFIX for loaded commands in favor of using + the settings from the platform files. + +2006-03-16 17:07 king + + * Modules/CMakeSystemSpecificInformation.cmake: BUG: When copying + the module variables from shared library variables use double + quotes for the required definitions ...PREFIX and ...SUFFIX to + make sure a value is set even if it is empty. + +2006-03-16 16:04 king + + * Source/cmExportLibraryDependencies.cxx: COMP: Using KWSys + auto_ptr to avoid cross-platform problems. + +2006-03-16 16:04 king + + * Source/kwsys/: CMakeLists.txt, auto_ptr.hxx.in: ENH: Adding + auto_ptr to KWSys to provide a conforming version everywhere. + +2006-03-16 15:53 alex + + * Modules/FindKDE4.cmake: ENH: after searching for kde-config in + the special dirs, search again in the standard dirs BUG: handle + paths on windows correctly + + Alex + +2006-03-16 15:50 king + + * Source/cmExportLibraryDependencies.cxx: COMP: Fix for auto_ptr + usage on VC6's broken implementation. + +2006-03-16 14:51 king + + * Source/cmLocalGenerator.cxx: BUG: Fixed generation of mismatched + IF in install script. This bug was introduced during the m_ + sweep. + +2006-03-16 14:44 king + + * Source/: cmCommandArgumentParser.cxx, cmCommandArgumentParser.y: + COMP: Fix malloc/free declaration for windows compilers. + +2006-03-16 14:14 king + + * Source/cmExportLibraryDependencies.cxx: BUG: Do not leak the + ofstream object in append mode. Just use an auto_ptr for both + cases. + +2006-03-16 11:57 king + + * Source/: cmCommandArgumentParser.cxx, cmCommandArgumentParser.y, + cmCommandArgumentParserTokens.h: ENH: Using patch from Frans + Englich to clarify error messages. + +2006-03-16 11:34 andy + + * Source/CTest/cmCTestTestHandler.h: COMP: Make members protected + so that subclass can use them + +2006-03-16 11:29 andy + + * Source/CTest/: cmCTestMemCheckHandler.cxx, + cmCTestTestHandler.cxx: BUG: Couple of memcheck bugs: Log files + should really be different for test and memcheck. Also make sure + to not trunkate the output of the test until the valgrind or any + other checking is pefrormed. + +2006-03-16 11:28 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: not all messages + are errors + +2006-03-16 11:27 hoffman + + * Source/cmOrderLinkDirectories.cxx: ENH: don't put the default + framework path in a -F option + +2006-03-16 11:21 andy + + * Source/kwsys/DynamicLoader.hxx.in: COMP: Fix problem with + namespace + +2006-03-16 11:15 king + + * Modules/Platform/FreeBSD.cmake: ENH: Enabling soname support on + FreeBSD. + +2006-03-16 11:01 andy + + * Source/cmDynamicLoader.cxx, Source/cmDynamicLoader.h, + Source/cmLoadCommandCommand.cxx, Source/cmSystemTools.cxx, + Source/cmakemain.cxx, Source/kwsys/DynamicLoader.cxx, + Source/kwsys/DynamicLoader.hxx.in, + Source/kwsys/testDynamicLoader.cxx, Source/kwsys/testDynload.c, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: Cleanup + DynamicLoader so that the symbols have more consistent names, + start using dynamic loader from kwsys in CMake + +2006-03-16 10:53 martink + + * Source/: cmGlobalGenerator.h, cmLocalVisualStudio7Generator.h, + cmLocalXCodeGenerator.h, cmMakefile.h: STYLE: minor comment + cleanups + +2006-03-16 10:44 martink + + * Source/CursesDialog/: cmCursesBoolWidget.cxx, + cmCursesCacheEntryComposite.cxx, cmCursesCacheEntryComposite.h, + cmCursesDummyWidget.cxx, cmCursesFilePathWidget.cxx, + cmCursesForm.cxx, cmCursesForm.h, cmCursesLabelWidget.cxx, + cmCursesLongMessageForm.cxx, cmCursesLongMessageForm.h, + cmCursesMainForm.cxx, cmCursesMainForm.h, cmCursesPathWidget.cxx, + cmCursesPathWidget.h, cmCursesStringWidget.cxx, + cmCursesStringWidget.h, cmCursesWidget.cxx, cmCursesWidget.h: + ENH: m_ cleanup for curses + +2006-03-16 09:33 martink + + * Source/: cmAddTestCommand.h, cmData.h, cmDependsC.cxx, + cmDependsC.h, cmStandardIncludes.h, cmUseMangledMesaCommand.h, + cmVariableRequiresCommand.h: ENH: a warning fix and some more + cleanup + +2006-03-16 09:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-15 16:32 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix warning + +2006-03-15 14:14 hoffman + + * Modules/Platform/IRIX64.cmake: ENH: use c not cxx + +2006-03-15 13:20 alex + + * Modules/UsePkgConfig.cmake: BUG: change the formatting of the + pkgconfig module documentation so that it doesn't crash some + versions of konqueror (fixed with current konqy) + + Alex + +2006-03-15 12:02 hoffman + + * Source/: cmGlobalXCode21Generator.cxx, + cmGlobalXCodeGenerator.cxx, cmake.cxx: ENH: fix up this changes + for mac + +2006-03-15 11:38 martink + + * Source/: cmGlobalXCodeGenerator.cxx, cmMakeDepend.cxx, + cmMakeDepend.h, cmXCodeObject.cxx, cmXCodeObject.h: BUG: some + UNIX fixes for my m_ commit + +2006-03-15 11:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-15 11:01 martink + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomTargetCommand.cxx, cmAddDefinitionsCommand.cxx, + cmAddDependenciesCommand.cxx, cmAddExecutableCommand.cxx, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddSubDirectoryCommand.cxx, cmAddTestCommand.cxx, + cmAuxSourceDirectoryCommand.cxx, cmBuildCommand.cxx, + cmBuildNameCommand.cxx, cmCMakeMinimumRequired.cxx, + cmCPluginAPI.cxx, cmCTest.cxx, cmCTest.h, cmCacheManager.cxx, + cmCacheManager.h, cmCommand.h, cmCommandArgumentLexer.cxx, + cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h, cmConfigureFileCommand.cxx, + cmConfigureFileCommand.h, cmCreateTestSourceList.cxx, + cmCustomCommand.cxx, cmCustomCommand.h, cmDepends.cxx, + cmDepends.h, cmDependsC.cxx, cmDependsC.h, cmDependsFortran.cxx, + cmDependsFortran.h, cmDependsFortranLexer.cxx, + cmDependsJavaLexer.cxx, cmDynamicLoader.cxx, + cmEnableLanguageCommand.cxx, cmEnableTestingCommand.cxx, + cmEndIfCommand.cxx, cmExecProgramCommand.cxx, + cmExecuteProcessCommand.cxx, cmExportLibraryDependencies.cxx, + cmExportLibraryDependencies.h, cmExprLexer.cxx, + cmExprParserHelper.cxx, cmExprParserHelper.h, + cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h, + cmFileCommand.cxx, cmFileTimeComparison.cxx, + cmFileTimeComparison.h, cmFindBase.cxx, cmFindLibraryCommand.cxx, + cmFindPackageCommand.cxx, cmFindPathCommand.cxx, + cmFindProgramCommand.cxx, cmForEachCommand.cxx, + cmForEachCommand.h, cmGeneratedFileStream.cxx, + cmGeneratedFileStream.h, cmGetCMakePropertyCommand.cxx, + cmGetDirectoryPropertyCommand.cxx, + cmGetFilenameComponentCommand.cxx, + cmGetSourceFilePropertyCommand.cxx, + cmGetTargetPropertyCommand.cxx, cmGetTestPropertyCommand.cxx, + cmGlob.cxx, cmGlob.h, cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalKdevelopGenerator.cxx, cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalWatcomWMakeGenerator.cxx, cmGlobalXCode21Generator.cxx, + cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmIfCommand.cxx, cmIfCommand.h, cmIncludeCommand.cxx, + cmIncludeDirectoryCommand.cxx, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeRegularExpressionCommand.cxx, cmInstallCommand.cxx, + cmInstallFilesCommand.cxx, cmInstallFilesCommand.h, + cmInstallProgramsCommand.cxx, cmInstallProgramsCommand.h, + cmInstallTargetGenerator.cxx, cmInstallTargetsCommand.cxx, + cmLinkDirectoriesCommand.cxx, cmLinkLibrariesCommand.cxx, + cmListCommand.cxx, cmListFileCache.cxx, cmListFileCache.h, + cmLoadCacheCommand.cxx, cmLoadCommandCommand.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMacroCommand.cxx, + cmMacroCommand.h, cmMakeDepend.cxx, cmMakeDepend.h, + cmMakefile.cxx, cmMakefile.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, cmMakefileTargetGenerator.h, + cmMarkAsAdvancedCommand.cxx, cmMathCommand.cxx, + cmMessageCommand.cxx, cmOptionCommand.cxx, + cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h, + cmOutputRequiredFilesCommand.cxx, cmOutputRequiredFilesCommand.h, + cmProjectCommand.cxx, cmQTWrapCPPCommand.cxx, + cmQTWrapCPPCommand.h, cmQTWrapUICommand.cxx, cmQTWrapUICommand.h, + cmRemoveCommand.cxx, cmRemoveDefinitionsCommand.cxx, + cmSeparateArgumentsCommand.cxx, cmSetCommand.cxx, + cmSetDirectoryPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.cxx, + cmSetTargetPropertiesCommand.cxx, + cmSetTestsPropertiesCommand.cxx, cmSiteNameCommand.cxx, + cmSourceFile.cxx, cmSourceFile.h, cmSourceGroup.cxx, + cmSourceGroup.h, cmSourceGroupCommand.cxx, cmStringCommand.cxx, + cmSubdirCommand.cxx, cmTarget.cxx, cmTarget.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h, + cmTest.cxx, cmTest.h, cmTryCompileCommand.cxx, + cmTryRunCommand.cxx, cmUtilitySourceCommand.cxx, + cmVTKMakeInstantiatorCommand.cxx, cmVTKMakeInstantiatorCommand.h, + cmVTKWrapJavaCommand.cxx, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.cxx, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h, + cmVariableRequiresCommand.cxx, cmVariableWatch.cxx, + cmVariableWatch.h, cmWhileCommand.cxx, cmWhileCommand.h, + cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h, + cmWriteFileCommand.cxx, cmXCode21Object.cxx, cmXCodeObject.cxx, + cmXCodeObject.h, cmake.cxx, cmake.h, cmakemain.cxx, + cmakewizard.cxx, cmakewizard.h, CTest/cmCTestBuildCommand.cxx, + CTest/cmCTestConfigureCommand.cxx, + CTest/cmCTestCoverageCommand.cxx, + CTest/cmCTestHandlerCommand.cxx, + CTest/cmCTestMemCheckCommand.cxx, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestSubmitCommand.cxx, CTest/cmCTestTestCommand.cxx, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestUpdateCommand.cxx: + STYLE: some m_ to this-> cleanup + +2006-03-15 09:23 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Add svn cleanup + before running svn + +2006-03-15 09:22 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: ENH: Allow multiple + install directories + +2006-03-14 16:38 hoffman + + * Modules/FindOpenGL.cmake: ENH: go back to finding the framework + opengl on the mac + +2006-03-14 15:19 hoffman + + * Modules/FindOpenGL.cmake: ENH: use standard include path for + OpenGL + +2006-03-14 14:03 hoffman + + * Modules/Platform/Darwin.cmake, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.cxx, + Source/cmMakefileTargetGenerator.h: ENH: add support for removing + language flags from shared library and shared module link + commands + +2006-03-14 11:35 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fixed object file + name construction to use Convert method for relative path + conversion. Also fixed test of result to check explicitly for a + full path. + +2006-03-14 10:14 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Avoid full paths + and spaces when constructing object file names. + +2006-03-14 09:37 king + + * Source/cmMakefile.cxx: BUG: Clarified confusing error message. + +2006-03-14 02:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-13 16:45 andy + + * Source/CPack/cmCPackGenericGenerator.h: STYLE: Fix style checker + +2006-03-13 15:57 malaterre + + * Source/kwsys/testDynamicLoader.cxx: COMP: Fix warning + +2006-03-13 15:19 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Introducing new + policy to construct more unique object file names. This should + allow multiple sources with the same file name but different FULL + paths to be added to a single target. + +2006-03-13 14:39 malaterre + + * Source/kwsys/: DynamicLoader.cxx, testDynamicLoader.cxx: BUG: Fix + problem on MacOSX, by disabling part of the test. + +2006-03-13 13:11 hoffman + + * Modules/VTKCompatibility.cmake: ENH: add backwards compatibility + fix for more aggressive find_path command + +2006-03-13 11:27 malaterre + + * Source/kwsys/DynamicLoader.cxx: ENH: Fix dashboard with coverage + +2006-03-13 10:49 malaterre + + * Source/kwsys/CMakeLists.txt: ENH: Do not build the library if we + are not doing Testing + +2006-03-13 10:27 malaterre + + * Source/kwsys/testDynamicLoader.cxx: ENH: Make test usable from + command line + +2006-03-13 02:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-12 10:03 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove warning + +2006-03-12 09:43 hoffman + + * Source/CMakeLists.txt: ENH: remove test until it works + +2006-03-12 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-11 12:43 hoffman + + * Modules/FindOpenGL.cmake: ENH: take advantage of new framework + stuff + +2006-03-11 11:53 hoffman + + * Source/cmake.cxx: ENH: remove print + +2006-03-11 11:52 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: try to clean up the search for + programs + +2006-03-11 10:09 malaterre + + * Source/kwsys/DynamicLoader.cxx: BUG: Fix for MINGW32 + +2006-03-11 09:59 malaterre + + * Source/kwsys/DynamicLoader.cxx: ENH: Add support for LastError on + HPUX + +2006-03-11 09:47 malaterre + + * Source/kwsys/DynamicLoader.cxx: ENH: Also look into data segment + (consistant with other implementation) + +2006-03-11 02:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-10 17:37 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: undo last change because it + broke the dashboard + +2006-03-10 16:53 hoffman + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: add a new FILE + SYSTEM_PATH that allows you to read a environment variable with a + path in it. + +2006-03-10 16:52 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: fix find program to look for + .com and .exe correctly and not return files with no extension on + windows + +2006-03-10 16:03 malaterre + + * Source/kwsys/: DynamicLoader.hxx.in, SystemTools.hxx.in: ENH: Add + documentation on the problem with system wide path for looking up + dynamic libraries. STYLE: Fix trailing white spaces + +2006-03-10 15:42 malaterre + + * Source/kwsys/testDynamicLoader.cxx: BUG: Need a / for Visual + Studio build + +2006-03-10 15:38 malaterre + + * Source/kwsys/: testDynamicLoader.cxx, testSystemTools.h.in: BUG: + Do the proper path + +2006-03-10 15:12 malaterre + + * Source/kwsys/testDynamicLoader.cxx: BUG: Need a trailing slash + +2006-03-10 15:08 malaterre + + * Source/kwsys/: CMakeLists.txt, testDynamicLoader.cxx, + testSystemTools.h.in: BUG: Fix problem with in the path + +2006-03-10 15:03 andy + + * Source/: cmCTest.cxx, cmCTest.h, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildAndTestHandler.h, + CTest/cmCTestBuildCommand.cxx, CTest/cmCTestBuildCommand.h, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestBuildHandler.h, + CTest/cmCTestCommand.h, CTest/cmCTestConfigureCommand.cxx, + CTest/cmCTestConfigureCommand.h, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageCommand.cxx, CTest/cmCTestCoverageCommand.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestEmptyBinaryDirectoryCommand.h, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestHandlerCommand.cxx, CTest/cmCTestHandlerCommand.h, + CTest/cmCTestMemCheckCommand.cxx, CTest/cmCTestMemCheckCommand.h, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestMemCheckHandler.h, + CTest/cmCTestRunScriptCommand.cxx, + CTest/cmCTestRunScriptCommand.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestSleepCommand.cxx, + CTest/cmCTestSleepCommand.h, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestStartCommand.h, CTest/cmCTestSubmitCommand.cxx, + CTest/cmCTestSubmitCommand.h, CTest/cmCTestSubmitHandler.cxx, + CTest/cmCTestSubmitHandler.h, CTest/cmCTestTestCommand.cxx, + CTest/cmCTestTestCommand.h, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h, CTest/cmCTestUpdateCommand.cxx, + CTest/cmCTestUpdateCommand.h, CTest/cmCTestUpdateHandler.cxx, + CTest/cmCTestUpdateHandler.h: STYLE: Fix some style issues + +2006-03-10 14:53 malaterre + + * Source/kwsys/: CMakeLists.txt, testDynamicLoader.cxx, + testSystemTools.h.in: BUG: Trying to get testDynamicLoader to + work on Solaris and SunOS, where current directory is not lookup + when doing dlopen + +2006-03-10 13:54 hoffman + + * Source/: cmCommandArgumentLexer.h, + cmDependsFortranParserTokens.h, cmDependsJavaLexer.h, + cmDependsJavaParserHelper.h, cmDependsJavaParserTokens.h, + cmExecProgramCommand.h, cmExprLexer.h, cmExprParserTokens.h, + cmFLTKWrapUICommand.h, cmFileCommand.h, cmFindBase.h, + cmGlobalBorlandMakefileGenerator.h, cmGlobalGenerator.h, + cmGlobalMSYSMakefileGenerator.h, + cmGlobalMinGWMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.h, cmGlobalWatcomWMakeGenerator.h, + cmGlobalXCodeGenerator.h, cmListCommand.h, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.h, cmSourceFile.cxx, + cmStringCommand.cxx, cmSystemTools.cxx, cmTarget.cxx, + cmTargetLinkLibrariesCommand.cxx, cmTryCompileCommand.cxx, + cmTryRunCommand.cxx, cmUseMangledMesaCommand.cxx, + cmUtilitySourceCommand.cxx, cmVTKMakeInstantiatorCommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx, cmVariableRequiresCommand.cxx, + cmVariableWatch.cxx, cmVariableWatch.h, cmWhileCommand.cxx, + cmWin32ProcessExecution.cxx, cmXCode21Object.cxx, + cmXCodeObject.cxx, cmakemain.cxx: STYLE: fix line lengths + +2006-03-10 13:34 malaterre + + * Source/kwsys/SystemTools.cxx: STYLE: Remove trailing whitespaces + +2006-03-10 13:34 malaterre + + * Source/kwsys/: CMakeLists.txt, DynamicLoader.cxx: BUG: Fix + DynamicLoader implementation on MacOSX (using old API) + +2006-03-10 13:33 malaterre + + * Source/kwsys/SystemTools.cxx: ENH: Add trailing whitespace + +2006-03-10 13:06 andy + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomTargetCommand.cxx, cmAddDefinitionsCommand.cxx, + cmAddDefinitionsCommand.h, cmAddDependenciesCommand.cxx, + cmAddExecutableCommand.h, cmBuildCommand.cxx, + cmBuildNameCommand.h, cmCMakeMinimumRequired.cxx, + cmCPluginAPI.cxx, cmCPluginAPI.h, cmCacheManager.cxx, + cmCommandArgumentParser.cxx, cmCommandArgumentParserHelper.h, + cmCommandArgumentParserTokens.h, cmCreateTestSourceList.cxx, + cmCustomCommand.cxx, cmDependsC.cxx, cmDependsC.h, + cmDependsFortranLexer.cxx, cmDependsFortranLexer.h, + cmLocalVisualStudio7Generator.cxx, cmMacroCommand.cxx, + cmMacroCommand.h, cmMakeDepend.cxx, cmake.cxx, cmakewizard.cxx, + CPack/cmCPackGenerators.cxx, CPack/cmCPackGenerators.h, + CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackGenericGenerator.h, CPack/cmCPackLog.cxx, + CPack/cmCPackLog.h, CPack/cmCPackNSISGenerator.cxx, + CPack/cmCPackNSISGenerator.h, + CPack/cmCPackPackageMakerGenerator.cxx, + CPack/cmCPackSTGZGenerator.cxx, CPack/cmCPackSTGZGenerator.h, + CPack/cmCPackTGZGenerator.cxx, CPack/cmCPackTGZGenerator.h, + CPack/cpack.cxx: STYLE: Fix some style issues + +2006-03-10 12:47 andy + + * Source/CPack/cmCPackPackageMakerGenerator.cxx: STYLE: Cleanup + trailing spaces + +2006-03-10 12:01 malaterre + + * Source/kwsys/: Glob.cxx, Registry.cxx, RegularExpression.cxx, + testCommandLineArguments.cxx: STYLE: Make sure to use the proper + cast. + +2006-03-10 11:58 alex + + * Modules/FindKDE4.cmake: ENH: new module to find the + FindKDE4Internal.cmake installed by kdelibs4 + + Alex + +2006-03-10 11:57 malaterre + + * Source/kwsys/: DynamicLoader.cxx, testDynamicLoader.cxx: ENH: + Make sure that we find the proper symbol and not the one that + start with _. STYLE: Remove an old style cast + +2006-03-10 11:32 malaterre + + * Source/kwsys/: DynamicLoader.cxx, testDynamicLoader.cxx: ENH: + Hopefully have the DynamicLoader to the proper thing. + +2006-03-10 11:13 hoffman + + * Source/: cmCacheManager.h, cmLocalVisualStudio7Generator.h, + cmMakeDepend.h, cmMakefile.h, cmOutputRequiredFilesCommand.h, + cmProjectCommand.h, cmRemoveDefinitionsCommand.h, + cmSetTestsPropertiesCommand.h, cmSourceGroup.h, + cmStandardIncludes.h, cmStringCommand.h, cmSubdirCommand.h, + cmSystemTools.h, cmTarget.h, cmTryCompileCommand.h, + cmVariableWatch.h, cmXCode21Object.h, cmake.h: ENH: fix line + length style stuff + +2006-03-10 11:12 hoffman + + * Source/cmFindBase.cxx: ENH: avoid adding junk into paths + +2006-03-10 10:28 malaterre + + * Source/kwsys/testDynamicLoader.cxx: BUG: Make sure to have proper + dependencies + +2006-03-10 10:26 hoffman + + * Source/kwsys/CMakeLists.txt: ENH: use CMAKE_DL_LIBS and not dl + directly as it does not always exist + +2006-03-10 10:23 malaterre + + * Source/kwsys/CMakeLists.txt: COMP: Fix cygwin build + +2006-03-10 10:19 malaterre + + * Source/kwsys/testDynload.c: COMP: Fix compilation on MacOSX + (common symbols not allowed with MH_DYLIB output format) + +2006-03-10 10:12 andy + + * Source/CMakeLists.txt, Tests/BundleTest/CMakeLists.txt: ENH: Add + package to bundle test + +2006-03-10 10:07 andy + + * Source/kwsys/testDynamicLoader.cxx: COMP: Add missing include + +2006-03-10 02:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-09 17:16 malaterre + + * Source/kwsys/testDynload.c: BUG: Remove comment + +2006-03-09 17:15 malaterre + + * Source/kwsys/: testDynamicLoader.cxx, testDynload.c: ENH: remove + test temporarily + +2006-03-09 17:08 malaterre + + * Source/kwsys/: CMakeLists.txt, testDynamicLoader.cxx: ENH: Still + more coverage of the DynamicLoader + +2006-03-09 17:06 malaterre + + * Source/kwsys/testDynload.c: ENH: Add a file to generate the lib + +2006-03-09 16:40 malaterre + + * Source/kwsys/testDynamicLoader.cxx: ENH: Improve test coverage + +2006-03-09 16:40 malaterre + + * Source/kwsys/: Registry.cxx, Registry.hxx.in: STYLE: Minor style + +2006-03-09 15:55 king + + * CMakeLists.txt: ENH: Updated patch level to 4 for special KDE + release. + +2006-03-09 15:47 hoffman + + * Source/: cmCacheManager.cxx, cmCacheManager.h: ENH: if + CMakeCache.txt has been removed, then automatically remove + CMakefiles/*.cmake + +2006-03-09 15:00 hoffman + + * Modules/Platform/AIX.cmake: ENH: add correct initial flags for + aix + +2006-03-09 14:57 hoffman + + * Modules/Platform/Darwin.cmake: ENH: remove junk + +2006-03-09 14:41 malaterre + + * Source/kwsys/CMakeLists.txt: ENH: Carefully turn testing of + DynamicLib on + +2006-03-09 14:36 malaterre + + * Source/kwsys/: Directory.cxx, testSystemTools.cxx, + DynamicLoader.cxx: STYLE: Minor style + +2006-03-09 14:35 malaterre + + * Source/kwsys/testDynamicLoader.cxx: ENH: Adding initial test for + DynamicLoader + +2006-03-09 14:30 hoffman + + * Source/: cmFileCommand.cxx, cmFileCommand.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: ENH: use a cmake script to do the + clean step, this allows for large numbers of files to be removed + without making the command line too long + +2006-03-09 14:10 alex + + * Modules/: FindKDE.cmake, FindKDE3.cmake, KDE3Macros.cmake, + kde3init_dummy.cpp.in, kde3uic.cmake: ENH: add real-world-tested + and used KDE3 support, and obsolete FindKDE.cmake, which wasn't + used by anybody that I heard of + + Alex + +2006-03-09 11:57 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: STYLE: Fix some style + issues + +2006-03-09 11:35 hoffman + + * Modules/FindTCL.cmake, Source/cmFindPathCommand.cxx: ENH: fix a + bug in the find path stuff so that it can find headers deep in + frameworks + +2006-03-09 11:17 andy + + * Source/CTest/: cmCTestBuildAndTestHandler.cxx, + cmCTestBuildCommand.cxx, cmCTestBuildHandler.cxx, + cmCTestBuildHandler.h, cmCTestConfigureCommand.cxx, + cmCTestConfigureCommand.h, cmCTestConfigureHandler.cxx, + cmCTestConfigureHandler.h, cmCTestCoverageCommand.cxx, + cmCTestCoverageCommand.h, cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h, cmCTestEmptyBinaryDirectoryCommand.h, + cmCTestGenericHandler.cxx, cmCTestGenericHandler.h, + cmCTestHandlerCommand.cxx, cmCTestHandlerCommand.h, + cmCTestMemCheckCommand.h, cmCTestMemCheckHandler.cxx, + cmCTestRunScriptCommand.cxx, cmCTestScriptHandler.cxx, + cmCTestStartCommand.cxx, cmCTestStartCommand.h, + cmCTestSubmitCommand.cxx, cmCTestSubmitCommand.h, + cmCTestSubmitHandler.cxx, cmCTestTestCommand.cxx, + cmCTestTestHandler.cxx, cmCTestTestHandler.h, + cmCTestUpdateCommand.cxx, cmCTestUpdateCommand.h, + cmCTestUpdateHandler.cxx: STYLE: Fix some style issues + +2006-03-09 09:53 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fix problem on + Wacom system with global symbolic targets + +2006-03-09 08:32 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackPackageMakerGenerator.cxx, cpack.cxx: STYLE: Fix style + problems + +2006-03-09 08:20 andy + + * Utilities/: cmcurl/formdata.c, cmtar/libtar.h: COMP: Remove win64 + warnings + +2006-03-09 02:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-08 18:16 hoffman + + * Source/cmFindProgramCommand.cxx: ENH: make sure system path is + not added unless asked for + +2006-03-08 17:11 alex + + * Modules/UsePkgConfig.cmake: ENH: add a cmake module for using + pkg-config, tested in kdelibs, ok by Bill Hoffman + + Alex + +2006-03-08 16:33 andy + + * Source/CPack/: cmCPackGenerators.cxx, cmCPackGenerators.h, + cmCPackGenericGenerator.cxx, cmCPackGenericGenerator.h, + cmCPackLog.cxx, cmCPackLog.h, cmCPackNSISGenerator.cxx, + cmCPackNSISGenerator.h, cmCPackPackageMakerGenerator.cxx, + cmCPackPackageMakerGenerator.h, cmCPackSTGZGenerator.cxx, + cmCPackSTGZGenerator.h, cmCPackTGZGenerator.cxx, + cmCPackTGZGenerator.h, cpack.cxx: STYLE: Lots of formating to + remove style problems + +2006-03-08 14:02 andy + + * Source/CMakeLists.txt, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/InstallScript2.cmake, + Tests/SimpleInstall/TestSubDir/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/InstallScript2.cmake, + Tests/SimpleInstallS2/TestSubDir/CMakeLists.txt: ENH: Add + additional subdirectory to improve testing and to allow cleanup + when testing cpack + +2006-03-08 13:59 andy + + * Source/CPack/cmCPackPackageMakerGenerator.cxx: BUG: Handle + version with multiple dots + +2006-03-08 13:20 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: COMP: Ok, fix typo + +2006-03-08 13:13 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Add testing for cpack + +2006-03-08 13:06 king + + * Source/kwsys/ProcessUNIX.c: ENH: Enabled process tree killing on + AIX. + +2006-03-08 12:42 king + + * Source/kwsys/ProcessUNIX.c: ENH: Enabled process tree killing on + the SGI. + +2006-03-08 12:36 king + + * Source/kwsys/ProcessUNIX.c: ENH: Enabled process tree killing for + FreeBSD and Sun. + +2006-03-08 12:12 king + + * Source/kwsys/ProcessUNIX.c: ENH: Enabled process tree killing on + HP-UX. + +2006-03-08 11:57 king + + * Source/kwsys/ProcessUNIX.c: BUG: Do not leak ps FILE when the + process starts but reading the header fails. + +2006-03-08 11:39 king + + * Source/kwsys/testProcess.c: ENH: Added a way to quickly enable + manual testing of grandchild killing. + +2006-03-08 11:38 king + + * Source/kwsys/ProcessUNIX.c: ENH: Added implementation of process + tree killing that runs "ps" to traverse the tree. + +2006-03-08 10:52 andy + + * Source/: cmListFileCache.cxx, cmListFileCache.h: BUG: Remove some + old legacy code and remove memory leak + +2006-03-08 09:16 malaterre + + * Source/kwsys/: DynamicLoader.cxx, DynamicLoader.hxx.in: BUG: + Including file within a namespace{} is dangerous(unless symbols + are within an extern C). Also update documentation about special + case for MacOSX + +2006-03-08 02:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-07 19:52 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: remove cpack stuff for now + so that we can get mac dashboards again + +2006-03-07 15:31 andy + + * CMakeGraphVizOptions.cmake, Source/cmake.cxx: ENH: Add a way to + overwrite some preferences and ignore certain targets + +2006-03-07 14:46 king + + * Source/cmake.cxx: ENH: Add CMAKE_COMMAND and CMAKE_ROOT variables + when running in script mode. This partially addresses bug#2828. + +2006-03-07 14:38 king + + * Source/cmGlobalGenerator.cxx: BUG: Check for whether to add -C to + package rule should check for a . in the first character not the + second. + +2006-03-07 12:03 andy + + * Source/cmake.cxx: COMP: Fix warnings + +2006-03-07 10:05 king + + * Source/cmFileCommand.cxx: BUG: Most platforms other than Linux + seem to require executable permissions on their shared libraries. + +2006-03-07 10:04 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Some platforms require + executable permission on shared libraries. + +2006-03-07 02:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-06 15:41 hoffman + + * bootstrap: ENH: add more depends for bootstrap + +2006-03-06 15:14 hoffman + + * Modules/Platform/Darwin.cmake: ENH: add support for language + flags that allow for universal binaries + +2006-03-06 15:14 hoffman + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/Platform/CYGWIN.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx: ENH: add support for + language flags at rule expansion time + +2006-03-06 15:01 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: add support for manifest + stuff + +2006-03-06 14:30 malaterre + + * Source/kwsys/DynamicLoader.cxx: COMP: Fix compilation on MacOSX + +2006-03-06 14:08 hoffman + + * Modules/FindQt3.cmake: ENH: try to fix non-clean dashboards + +2006-03-06 14:07 malaterre + + * Source/kwsys/CMakeLists.txt: ENH: Compile DynamicLoader + +2006-03-06 14:02 malaterre + + * Source/kwsys/: DynamicLoader.cxx, DynamicLoader.hxx.in: ENH: + Adding kwsys implementation for a DynamicLoader class. Copy from + itkDynamicLoader, with patch from cmDynamicLoader + +2006-03-06 13:43 hoffman + + * Source/kwsys/: Directory.cxx, Registry.cxx: ENH: add missing + cmake depend hacks + +2006-03-06 13:34 hoffman + + * Source/kwsys/Glob.cxx: ENH: add missing cmake include + +2006-03-06 13:02 malaterre + + * Source/kwsys/Directory.cxx: COMP: Some STL implementation do not + provide clear on std::string + +2006-03-06 11:57 malaterre + + * Source/kwsys/: Directory.cxx, Directory.hxx.in: BUG: Need to + reset internal structure in case of multiple calls to Load + +2006-03-06 10:12 malaterre + + * Source/kwsys/: Directory.cxx, Directory.hxx.in: ENH: Redo + implementation of itkDirectory to use kwsys (avoid duplicating + code). + +2006-03-06 02:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-05 09:09 king + + * Source/cmLocalGenerator.cxx: BUG: Fix for generated install + scripts to support prefixes with trailing slashes or just a + single slash. + +2006-03-05 08:38 hoffman + + * Source/cmFindBase.cxx: ENH: fix old style parsing of FIND + commands and fix broken tests + +2006-03-05 02:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-04 02:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-03 23:00 hoffman + + * Source/cmFindBase.cxx: ENH: make sure NAMES tag is not required + for name argument, fixes msys generator + +2006-03-03 19:29 king + + * Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Added PERMISSIONS + option to the TARGETS mode of the INSTALL command. + +2006-03-03 18:44 king + + * Source/cmFileCommand.cxx, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, Source/cmInstallGenerator.cxx, + Source/cmInstallGenerator.h, Source/cmLocalGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, Tests/SimpleInstall/inst.cxx, + Tests/SimpleInstall/inst2.cxx, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstallS2/inst2.cxx: + ENH: Added PERMISSIONS and RENAME options to the INSTALL + command's FILES and PROGRAMS mode, and corresponding support to + FILE(INSTALL). Default permissions for shared libraries on + non-Windows/non-OSX platforms no longer has the execute bit set. + +2006-03-03 18:06 king + + * Source/: cmTarget.cxx, cmTarget.h: ENH: Replaced UpdateLocation + method with call to GetLocation. Added comment about problems + with the LOCATION attribute. + +2006-03-03 15:04 andy + + * Source/CPack/: cmCPackPackageMakerGenerator.cxx, + cmCPackPackageMakerGenerator.h: ENH: Check package maker version + +2006-03-03 14:28 andy + + * Source/cmake.cxx: COMP: Oops, typo + +2006-03-03 14:24 andy + + * Source/: cmTarget.cxx, cmTarget.h, cmake.cxx, cmake.h: ENH: Add + support for exporting graphviz of the project dependencies + +2006-03-03 12:58 king + + * Source/CMakeLists.txt, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmTarget.cxx, Tests/BundleTest/BundleLib.cxx, + Tests/BundleTest/BundleTest.cxx, Tests/BundleTest/CMakeLists.txt: + BUG: Fixed installation of MacOSX Bundle executables and the + corresponding install_name remapping support. Extended the + BundleTest test to check that this all works. Part of these + fixes required changing the signature of AppendDirectoryForConfig + in all generators. It now accepts prefix and suffix strings to + deal with whether leading or trailing slashes should be included + with the configuration subdirectory. + +2006-03-03 12:01 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: add manifest support for + 2005 + +2006-03-03 11:59 hoffman + + * Modules/CMakeVS8FindMake.cmake: ENH: look for VCExpress first + +2006-03-03 10:52 andy + + * Modules/CPack.Info.plist.in, + Source/CPack/cmCPackPackageMakerGenerator.cxx: ENH: Add verbose + flag to package maker and add CFBundleIdentifier string + +2006-03-03 02:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-02 21:33 hoffman + + * Source/kwsys/: Registry.cxx, SystemTools.cxx: ENH: fix std in + kwsys, has to be kwsys_stl + +2006-03-02 20:11 hoffman + + * Source/cmFindBase.cxx: ENH: remove warning + +2006-03-02 15:03 hoffman + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: removed unused + methods after find changes + +2006-03-02 14:39 hoffman + + * Source/cmTryCompileCommand.cxx: ENH: pass CMAKE_MODULE_PATH into + try compile projects + +2006-03-02 13:43 hoffman + + * Source/: cmFindBase.cxx, cmFindLibraryCommand.cxx: ENH: fix + spelling errors in docs + +2006-03-02 13:30 hoffman + + * Modules/Platform/CYGWIN.cmake, Modules/Platform/Darwin.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/SunOS.cmake, + Modules/Platform/UnixPaths.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/WindowsPaths.cmake, + Source/cmBootstrapCommands.cxx, Source/cmFindBase.cxx, + Source/cmFindBase.h, Source/cmFindFileCommand.cxx, + Source/cmFindFileCommand.h, Source/cmFindLibraryCommand.cxx, + Source/cmFindLibraryCommand.h, Source/cmFindPathCommand.cxx, + Source/cmFindPathCommand.h, Source/cmFindProgramCommand.cxx, + Source/cmFindProgramCommand.h, Source/kwsys/Registry.cxx, + Source/kwsys/SystemTools.cxx: ENH: check in new find stuff + +2006-03-02 07:52 hoffman + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeJavaInformation.cmake, Source/cmGlobalGenerator.cxx: + ENH: fix for bug 2921, move _OVERRIDE variable to a better + position to allow changing _INIT variables + +2006-03-02 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-03-01 22:45 king + + * Source/: cmSetTargetPropertiesCommand.h, cmTarget.cxx: ENH: + Finished CMAKE__POSTFIX feature and documented it. The + value of this variable is used when a library target is created + to initialize the _POSTFIX target property. The value of + this property is used (even for executables) to define a + per-configuration postfix on the name of the target. Also + enabled use of the OUTPUT_NAME property for non-executable + targets. + +2006-03-01 19:00 king + + * CMakeLists.txt: ENH: CMake does not need RPATHs at all for its + own executables. Disable them to avoid relinking during + installation. + +2006-03-01 18:54 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Cleaned up generation of + directory-level rules and their support structure. The + directorystart rule has been removed in favor of checking the + build system in the subdirectory makefile first. The "directory" + rule has been renamed "all" since it corresponds to the "all" + pass anyway (as against "clean"). Also fixed directory-level + rule for preinstall. + +2006-03-01 18:49 king + + * Source/cmGlobalGenerator.cxx: BUG: Check for whether to add + BUILD_TYPE to install rule should check for a . in the first + character not the second. + +2006-03-01 15:00 andy + + * Modules/: CPack.cmake, NSIS.template.in: ENH: Several changes to + for NSIS + +2006-03-01 13:15 andy + + * CMakeLists.txt, Modules/CPack.cmake, + Modules/InstallRequiredSystemLibraries.cmake: ENH: Install system + libraries only if project requires them + +2006-03-01 13:05 andy + + * Source/cmSystemTools.cxx: BUG: Even more VS8 issues + +2006-03-01 12:50 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: BUG: More VS8 fixes + +2006-03-01 11:55 andy + + * Templates/CMakeLists.txt: ENH: Install cpack files + +2006-03-01 08:28 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h: ENH: Cleanup global targets even more + and potentially fix Xcode + +2006-03-01 02:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-28 16:33 andy + + * Source/cmGlobalGenerator.cxx: BUG: Ok, fix the ordering + +2006-02-28 16:22 andy + + * Source/CTest/cmCTestHandlerCommand.cxx: BUG: Fix for STL + +2006-02-28 16:17 andy + + * Source/cmCTest.h: BUG: Handle buggy streams + +2006-02-28 15:56 andy + + * Source/cmCTest.cxx: BUG: Add additional check + +2006-02-28 15:31 andy + + * Source/cmGlobalGenerator.cxx: BUG: On Visual Studio and XCode, + handle build configurations + +2006-02-28 15:31 andy + + * Source/CTest/cmCTestBuildAndTestHandler.cxx: STYLE: Remove debug + +2006-02-28 14:18 andy + + * Modules/CPack.cmake, Templates/CPack.GenericLicense.txt, + Templates/CPack.GenericWelcome.txt: ENH: Add resource files for + PackageMaker + +2006-02-28 14:06 andy + + * Templates/CPack.GenericDescription.txt, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Add generic + instructions + +2006-02-28 13:30 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Attempt to handle windows + without NSIS installed + +2006-02-28 11:38 king + + * Source/kwsys/ProcessWin32.c: COMP: Fixed warnings for Borland + 5.8. + +2006-02-28 11:14 andy + + * Modules/FindQt4.cmake: BUG: Fix typo + +2006-02-28 11:13 andy + + * Modules/FindQt4.cmake: ENH: Add support for debian having both + qt3 and qt4 + +2006-02-28 10:27 hoffman + + * Modules/: CMakeVS71FindMake.cmake, CMakeVS8FindMake.cmake, + FindDart.cmake, FindDoxygen.cmake, FindGCCXML.cmake, + FindHTMLHelp.cmake, FindMPI.cmake, FindQt3.cmake, FindQt4.cmake, + FindTCL.cmake, Platform/Darwin.cmake: ENH: use program files env + for searching + +2006-02-28 09:53 king + + * Source/cmGlobalGenerator.cxx: BUG: Need to use the CMAKE_COMMAND + cache entry to get the location of CMake. + +2006-02-28 08:23 andy + + * Source/CTest/cmCTestBuildAndTestHandler.cxx, + Source/CTest/cmCTestBuildAndTestHandler.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Add support for + multiple build targets and start adding simple cpack tests + +2006-02-28 02:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-27 23:06 hoffman + + * Source/cmSourceGroupCommand.cxx: ENH: fix problem if there are .. + in the path to the source file specified in a source group + +2006-02-27 16:38 hoffman + + * Source/: cmFindBase.cxx, cmFindBase.h: ENH: add new find stuff + +2006-02-27 12:14 hoffman + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake, + CMakeFortranInformation.cmake, CMakeRCInformation.cmake: ENH: fix + spelling errors + +2006-02-27 10:58 andy + + * Modules/CPack.Info.plist.in, Modules/CPack.cmake, + Modules/NSIS.template.in, Source/cmBootstrapCommands.cxx, + Source/cmCommands.cxx, Source/cmGlobalGenerator.cxx, + Source/CPack/cmCPackGenericGenerator.cxx, + Templates/CPackConfig.cmake.in: ENH: Several packaging issues. + Allow random variables to be passed to cpack (anything starting + with CPACK_, add preinstall to the list of dependencies for + package, fix typos + +2006-02-27 02:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-26 02:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-25 01:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-24 18:15 andy + + * Source/: cmGlobalGenerator.cxx, cmake.h: COMP: More fixes for non + makefile generators and global targets + +2006-02-24 17:43 andy + + * Source/cmGlobalGenerator.cxx: STYLE: Remove debug + +2006-02-24 17:35 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCode21Generator.h, + cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx, cmTarget.h: + COMP: Even more global target fixes + +2006-02-24 16:30 andy + + * Source/CMakeLists.txt: ENH: Install cpack + +2006-02-24 16:20 andy + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: More fixing of support + for global target son visual studio + +2006-02-24 13:13 king + + * Modules/Platform/Darwin.cmake, Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Created target + property INSTALL_NAME_DIR initalized by CMAKE_INSTALL_NAME_DIR + specifying the directory portion of the OSX install_name field in + shared libraries. This is the OSX equivalent of RPATH. + +2006-02-24 12:50 hoffman + + * Source/cmSourceGroupCommand.cxx: ENH: fix warning and remove + unused variable + +2006-02-24 11:13 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: BUG: Fix generation of Xcode 2.0 + and earlier projects to use CMAKE_BUILD_TYPE. + +2006-02-24 11:07 king + + * Source/cmGlobalXCodeGenerator.cxx: BUG: Treat GLOBAL_TARGET like + UTILITY for generation. + +2006-02-24 10:56 andy + + * Source/cmLocalGenerator.cxx: COMP: Remove warnings + +2006-02-24 10:55 andy + + * Source/cmGlobalGenerator.cxx: BUG: Only add test targets when + testing is enabled. Also add CMAKE_CFG_INTDIR when specified + +2006-02-24 09:43 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: COMP: Handle preinstall + properly on IDEs + +2006-02-24 09:32 andy + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: COMP: Fix for preinstall + +2006-02-24 09:08 andy + + * Modules/CheckIncludeFiles.cmake: BUG: Fix the module + +2006-02-24 08:57 andy + + * Source/cmake.cxx: BUG: Fix location of ctest for bootstrap + +2006-02-24 02:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-23 18:25 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: try to fix things + up for the dashboard + +2006-02-23 17:30 andy + + * Source/: cmGlobalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: Properly handle target + dependencies + +2006-02-23 14:05 andy + + * Source/cmGlobalVisualStudio71Generator.cxx: COMP: Even more + Visual Studio fixes. Why is this code duplicated? + +2006-02-23 13:46 andy + + * Source/: cmGlobalGenerator.cxx, + cmLocalVisualStudio7Generator.cxx: COMP: More fixes for visual + studio + +2006-02-23 13:37 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio7Generator.cxx: COMP: Fixes for visual studio + +2006-02-23 11:36 hoffman + + * Source/cmSourceGroupCommand.cxx: ENH: fix for bug 2908 crash for + empty source group name + +2006-02-23 10:48 andy + + * Source/: cmGlobalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: Remove debug + +2006-02-23 10:07 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Add a notion of a global + target + +2006-02-23 10:02 andy + + * Source/: cmTarget.cxx, cmTarget.h, cmMakefile.cxx: ENH: Add a + notion of a global target + +2006-02-23 10:00 andy + + * Source/: cmake.cxx, cmake.h: ENH: Add accessors for CTest and + CPack + +2006-02-23 09:59 andy + + * Source/CPack/cpack.cxx: ENH: Allow running without config file + +2006-02-23 09:58 andy + + * Modules/: CMakeConfigurableFile.in, CheckIncludeFiles.cmake, + CheckSymbolExists.cmake: ENH: Make modules use configure instead + of file write + +2006-02-23 09:38 andy + + * Modules/CPack.cmake, Modules/NSIS.template.in, + Source/CPack/cmCPackNSISGenerator.cxx, + Templates/CPackConfig.cmake.in: ENH: Several NSIS features + +2006-02-23 02:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-22 02:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-21 12:19 hoffman + + * Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx: ENH: make command line + flags more consistent with ide settings + +2006-02-21 09:35 hoffman + + * Source/cmGlobalMSYSMakefileGenerator.cxx: ENH: use last mount + point found for mingw location, not first + +2006-02-21 07:58 hoffman + + * Source/cmGlobalMSYSMakefileGenerator.cxx: ENH: try to get the + order a bit better + +2006-02-21 02:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-20 23:08 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, Source/cmCacheManager.cxx, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.h: ENH: better finding of + mingw from msys, and delete CMakeFiles directory when cache is + deleted + +2006-02-20 17:47 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: make sure + CMAKE_STANDARD_LIBRARIES are used + +2006-02-20 14:37 hoffman + + * Source/cmLocalGenerator.h: ENH: make it compile on vs6 + +2006-02-20 14:21 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Add target-level + COMPILE_FLAGS to the target not the individual source files. + This simplifies the generated files and puts flags in a more + logical order (VS6 works, VS7 needs more translation to work). + +2006-02-20 13:42 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx: ENH: change expand stuff to pass a + struct for all the args + +2006-02-20 12:48 king + + * Source/cmMakefileTargetGenerator.cxx: ENH: Order compilation + flags from most general to most specific: language, then target, + then source. + +2006-02-20 09:54 king + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.h: BUG: + Xcode generator should use local generator computation of include + directories. + +2006-02-20 03:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-19 19:29 king + + * Source/: cmFileCommand.cxx, cmInstallGenerator.cxx, + cmInstallTargetGenerator.cxx: BUG: Fixed optional file install + support for multi-configuration generators. + +2006-02-19 19:28 king + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmTarget.cxx: ENH: Switched order of slash and configuration name + in cmGlobalGenerator::AppendDirectoryForConfig method to increase + flexibility. + +2006-02-19 18:47 king + + * bootstrap, Source/CMakeLists.txt, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Source/cmInstallFilesCommand.h, + Source/cmInstallFilesGenerator.cxx, + Source/cmInstallFilesGenerator.h, + Source/cmInstallProgramsCommand.h, Source/cmLocalGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Implemented FILES and + PROGRAMS forms of the INSTALL command as replacements for the + INSTALL_FILES and INSTALL_PROGRAMS commands. This addresses the + request for absolute path install destinations in bug#2691. + +2006-02-19 18:44 king + + * Source/cmInstallTargetGenerator.cxx: STYLE: Removed unused + includes. + +2006-02-19 17:44 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Using CMAKE_SKIP_BUILD_RPATH + to test relink support. + +2006-02-19 17:27 king + + * Source/: cmInstallTargetGenerator.cxx, + cmInstallTargetsCommand.cxx, cmTarget.cxx, cmTarget.h: BUG: Fixed + relink with new install framework. + +2006-02-19 16:35 king + + * Source/cmInstallCommand.cxx: COMP: Removed unused variables. + +2006-02-19 16:12 king + + * Source/: cmInstallGenerator.cxx, cmInstallGenerator.h: BUG: Do + not report files as installed if they are optional and do not + exist. + +2006-02-19 16:10 king + + * Source/cmInstallTargetGenerator.cxx: BUG: Import libraries should + be installed as STATIC_LIBRARY. + +2006-02-19 15:25 king + + * bootstrap, Source/CMakeLists.txt, Source/cmInstallCommand.cxx, + Source/cmInstallCommand.h, Source/cmInstallGenerator.cxx, + Source/cmInstallGenerator.h, Source/cmInstallScriptGenerator.cxx, + Source/cmInstallScriptGenerator.h, + Source/cmInstallTargetGenerator.cxx, + Source/cmInstallTargetGenerator.h, + Source/cmInstallTargetsCommand.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSetTargetPropertiesCommand.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Created new install + script generation framework. The INSTALL command creates the + generators which are later used by cmLocalGenerator to create the + cmake_install.cmake files. A new target installation interface + is provided by the INSTALL command which fixes several problems + with the INSTALL_TARGETS command. See bug#2691. Bugs 1481 and + 1695 are addressed by these changes. + +2006-02-19 13:49 king + + * Modules/Platform/Windows-gcc.cmake: BUG: Fixed module creation + rules. Removed soname portion of all rules because it is never + used on this platform. + +2006-02-19 13:34 king + + * Modules/Platform/CYGWIN.cmake: BUG: Fixed cygwin module creation + rules. Modules should not have the "cyg" prefix by default. + Removd soname flags from creation rules because they are never + used on this platform. + +2006-02-19 13:10 king + + * Source/cmLocalGenerator.cxx, + Tests/CustomCommand/GeneratedHeader/CMakeLists.txt: ENH: + Automatic include directories should not be done by default as + was just implemented. Instead a project may now set + CMAKE_INCLUDE_CURRENT_DIR to get this behavior. The current + source and binary directories are added automatically to the + beginning of the include path in every directory. This simulates + in-source behavior for double-quote includes when there are + generated sources and headers in the directory. + +2006-02-19 13:08 king + + * Source/cmFileCommand.cxx: BUG: Install location full-path test + for windows needs to account for both lower case and upper case + drive letters. + +2006-02-19 01:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-18 16:47 king + + * Source/cmLocalGenerator.cxx: BUG: Remove trailing slashes from + install destinations. + +2006-02-18 16:36 king + + * Source/cmFileCommand.cxx: ENH: Clarified error message. + +2006-02-18 15:42 king + + * Source/cmLocalGenerator.cxx: COMP: Fixed shadowed variable + warning. + +2006-02-18 15:37 king + + * Modules/Platform/CYGWIN.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows-wcl386.cmake, + Modules/Platform/Windows.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h: ENH: Generate import libraries for DLLs on + Cygwin and MinGW. + +2006-02-18 11:51 king + + * Source/: cmLocalGenerator.cxx, cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: If + CMAKE_NO_AUTOMATIC_INCLUDE_DIRECTORIES is not set try to + approximate in-source build include file behavior in an + out-of-source build by adding the build tree directory + corresponding to a source tree directory at the beginning of the + include path. Also fixed VS6 and VS7 generators to use + cmLocalGenerator's computation of include paths. The VS6 + generator will now short-path the include directories if the + total length is too long in order to try to avoid its truncation + limit. + +2006-02-18 11:03 hoffman + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmGlobalKdevelopGenerator.h: ENH: apply patch from Alex to + support some more kdevelop stuff + +2006-02-18 01:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-17 12:49 hoffman + + * Source/cmMakefile.cxx: ENH: put the system path ahead of the + command path + +2006-02-17 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-16 20:15 king + + * Modules/CPack.cmake, Utilities/Release/Release.cmake: BUG: Do not + install MSVC dlls for a non-MSVC build. + +2006-02-16 20:13 king + + * bootstrap: ENH: Made default install prefix consistent with + building with another CMake. + +2006-02-16 18:50 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: BUG: Work-around borland make + bug that drops a rule completely if it has no dependencies or + commands. + +2006-02-16 18:09 king + + * Source/cmSetTargetPropertiesCommand.h: ENH: Clarified + documentation of DEFINE_SYMBOL. + +2006-02-16 17:49 king + + * Source/cmSetTargetPropertiesCommand.cxx: BUG: Report error when a + target does not exist. + +2006-02-16 15:55 andy + + * Source/CPack/cmCPackNSISGenerator.cxx: BUG: Remove debug and fix + space between label and exec name + +2006-02-16 15:41 andy + + * CMakeLists.txt: ENH: Variable name changed + +2006-02-16 15:39 king + + * Source/cmMakefileExecutableTargetGenerator.cxx: BUG: Do not + perform pre-build, pre-link, or post-install commands when + relinking. + +2006-02-16 15:38 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Need INSTALL_RPATH property + on SimpleInstallS2 also. + +2006-02-16 15:35 andy + + * Templates/CPackConfig.cmake.in: ENH: Fix icons + +2006-02-16 15:28 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Use target property for + INSTALL_RPATH of SimpleInstall so that it is the only one that + needs to relink. + +2006-02-16 15:20 andy + + * Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.h: ENH: More work on NSI to + improve installing and uninstalling + +2006-02-16 15:18 king + + * Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmMakefileExecutableTargetGenerator.cxx, + Source/cmMakefileExecutableTargetGenerator.h, + Source/cmMakefileLibraryTargetGenerator.cxx, + Source/cmMakefileLibraryTargetGenerator.h, + Source/cmSetTargetPropertiesCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Implemented RPATH + specification support. It is documented by the command + SET_TARGET_PROPERTIES. + +2006-02-16 13:42 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: warning fix + +2006-02-16 11:32 martink + + * Source/cmMakefileTargetGenerator.cxx: ENH: warning fix + +2006-02-16 10:35 hoffman + + * Source/: cmDynamicLoader.cxx, cmDynamicLoader.h: ENH: fix for bug + 2808, use dlopen on new OSX versions + +2006-02-16 02:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-15 21:26 hoffman + + * Modules/CMakeMSYSFindMake.cmake, + Modules/CMakeMinGWFindMake.cmake, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.cxx: ENH: better algorithm + for looking for make and gcc on msys and mingw + +2006-02-15 16:38 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Use NOINHERIT + macro to avoid linking to project default libraries which may not + exist. + +2006-02-15 16:35 king + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, + cmMakefileUtilityTargetGenerator.cxx: ENH: Cleaned up generation + of symbolic rules. Removed generation of rebuild_cache and + similar rules from internal makefiles. + +2006-02-15 12:32 martink + + * Source/cmMakefileTargetGenerator.h: COMP: fix compiler warning + +2006-02-15 12:30 hoffman + + * Source/cmMakefileTargetGenerator.cxx: ENH: fix build error for + mac + +2006-02-15 10:34 martink + + * bootstrap, Source/CMakeLists.txt, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmMakefileTargetGenerator.h: ENH: some reorg of the unix + makefile generator + +2006-02-15 10:22 king + + * Source/: cmCTest.cxx, cmSystemTools.cxx, cmSystemTools.h, + cmake.cxx: ENH: Enable capture of output from VCExpress.exe and + devenv.exe. + +2006-02-15 08:05 hoffman + + * Modules/Platform/Windows-bcc32.cmake: ENH: remove warning + suppressions for borland compiler, projects wanting this should + use -w-, the default warning level is used for all other + compilers. Used to be -w- -whid -waus -wpar + +2006-02-15 02:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-14 22:03 hoffman + + * Modules/CMakeMinGWFindMake.cmake, Source/cmake.cxx: ENH: do not + allow mingw makefiles to generate if sh.exe is in the path, also + do not write CMakeCache.txt if there is a fatal error. + +2006-02-14 17:16 king + + * Source/: cmCMakeMinimumRequired.cxx, cmCMakeMinimumRequired.h: + ENH: Added FATAL_ERROR option and fixed check to not have + floating point roundoff problems. + +2006-02-14 16:35 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Removed hard-coded + linking to odbc32 and odbccp32. + +2006-02-14 16:32 king + + * Source/: cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Avoid adding unused rules + to special targets like ALL_BUILD. Make sure project + regeneration rules go only in desired targets. + +2006-02-14 15:35 king + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h: BUG: Fixed generation of VS8 + solution file to not be re-written when loaded by VS and to work + with msbuild. + +2006-02-14 15:29 king + + * Modules/CheckTypeSize.cmake: ENH: Added + CMAKE_REQUIRED_DEFINITIONS and CMAKE_REQUIRED_INCLUDES to the + interface. + +2006-02-14 15:15 king + + * Tests/CustomCommand/GeneratedHeader/main.cpp: COMP: Fixed form of + function main. + +2006-02-14 14:29 andy + + * Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx: + ENH: Better handling of executables on windows + +2006-02-14 14:28 andy + + * Templates/CPackConfig.cmake.in: ENH: Cleanup + +2006-02-14 11:17 andy + + * Source/cmCacheManager.cxx: ENH: Report which cmake was used to + generate the cache in the comment + +2006-02-14 10:51 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: fix try compile for MFC + +2006-02-14 10:35 martink + + * Source/: cmMakefileExecutableTargetGenerator.h, + cmMakefileLibraryTargetGenerator.h, cmMakefileTargetGenerator.h, + cmMakefileUtilityTargetGenerator.h, + cmMakefileExecutableTargetGenerator.cxx, + cmMakefileLibraryTargetGenerator.cxx, + cmMakefileTargetGenerator.cxx, + cmMakefileUtilityTargetGenerator.cxx: ENH: some cleanup of the + makefile generator + +2006-02-14 10:28 andy + + * CMakeLists.txt, Modules/CPack.cmake, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.cxx, Source/CPack/cpack.cxx, + Templates/CPackConfig.cmake.in: ENH: Improved support for icons, + random directories, etc... + +2006-02-14 02:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-13 02:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-12 02:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-11 02:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-10 15:45 king + + * Tests/CommandLineTest/CMakeLists.txt: ENH: Added test for + IF(DEFINED ENV{var})(. + +2006-02-10 14:59 king + + * CMakeLists.txt: ENH: Updated patch level to 3 for special KDE + release. + +2006-02-10 14:41 king + + * Source/cmIfCommand.cxx: ENH: Allow IF(DEFINED ENV{somevar}) to + work. + +2006-02-10 14:15 king + + * Docs/cmake-mode.el: ENH: Added highlighting for LIST command. + +2006-02-10 14:11 andy + + * CMakeLists.txt, Source/cmCommands.cxx, Source/cmListCommand.cxx, + Source/cmListCommand.h, Tests/CMakeTests/CMakeLists.txt, + Tests/CMakeTests/ListTest.cmake.in: ENH: Add initial + implementation of the list command + +2006-02-10 13:54 king + + * Docs/cmake-mode.el, Source/cmCommands.cxx, + Source/cmInstallCommand.cxx, Source/cmInstallCommand.h, + Source/cmLocalGenerator.cxx, Source/cmMakefile.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/InstallScript1.cmake, + Tests/SimpleInstall/InstallScript2.cmake, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/InstallScript1.cmake, + Tests/SimpleInstallS2/InstallScript2.cmake: ENH: Added INSTALL + command as a placeholder for a future generic install + specification interface. Currently it supports only a SCRIPT + option specifying a script to run during the install stage. + +2006-02-10 12:43 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: fix for bug 28618, cmake.exe + can not find itself + +2006-02-10 11:47 king + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: Strengthened + EXECUTE_PROCESS output check test. + +2006-02-10 11:46 king + + * Source/cmExecuteProcessCommand.cxx: ENH: Remove extra windows + newline characters from process output. Centralized text fix + processing. + +2006-02-10 11:43 king + + * Source/: cmExecProgramCommand.h, cmExecuteProcessCommand.h: ENH: + Mention relationship of EXECUTE_PROCESS and EXEC_PROGRAM. + +2006-02-10 11:41 king + + * Source/cmake.cxx: BUG: Fixed echo command to not print trailing + space. + +2006-02-10 11:19 king + + * bootstrap: BUG: Fixed bootstrap from MSYS prompt. It was working + only when the bootstrap directory in MSYS mapped to the same + directory on windows except for the drive letter in front. Now + it should work from any path. + +2006-02-10 10:30 hoffman + + * Tests/CustomCommandWorkingDirectory/: CMakeLists.txt, working.c, + working.c.in: ENH: fix test to work with in source build + +2006-02-10 10:11 hoffman + + * Source/cmLocalGenerator.cxx: ENH: fix bug for single char + libraries + +2006-02-10 09:46 andy + + * Modules/CheckLibraryExists.cmake: BUG: Fix + CMAKE_REQUIRED_LIBRARIES stuff in this module + +2006-02-10 02:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-09 23:08 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: bug fix for 2829 + better flags for idl tool + +2006-02-09 19:29 king + + * Source/cmLocalVisualStudio6Generator.cxx: COMP: Removed unused + variables. + +2006-02-09 19:25 king + + * CMakeLists.txt: ENH: Updated patch level to 2 for special KDE + release. + +2006-02-09 19:23 king + + * Modules/: CheckCSourceCompiles.cmake, + CheckCXXSourceCompiles.cmake, CheckFunctionExists.cmake, + CheckIncludeFile.cmake, CheckIncludeFileCXX.cmake, + CheckIncludeFiles.cmake, CheckLibraryExists.cmake, + CheckSymbolExists.cmake, CheckVariableExists.cmake: ENH: Made + Check* modules more consistent and well documented. Added + CMAKE_REQUIRED_DEFINITIONS option. + +2006-02-09 19:03 king + + * Source/cmMakefile.cxx: BUG: Need to include empty arguments when + parsing prefix/suffix lists for FindLibrary. + +2006-02-09 19:03 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Adding option + to return empty arguments when expanding a list. + +2006-02-09 18:42 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: Fixed generation of cmake + re-run rules. + +2006-02-09 18:39 king + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: BUG: Avoid case + problems on windows. + +2006-02-09 17:29 king + + * Source/: cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h: + BUG: Deal with case insensitivity on windows linker paths. Also + fixed spelling typo. + +2006-02-09 15:33 king + + * Modules/FindPNG.cmake: ENH: Put libpng name back because it is + needed for plain windows. + +2006-02-09 15:08 king + + * Modules/: FindJPEG.cmake, FindPNG.cmake, FindTIFF.cmake, + FindZLIB.cmake: ENH: Removing platform-specific name hacks now + that FIND_LIBRARY handles it. + +2006-02-09 15:05 king + + * Modules/CMakeGenericSystem.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Darwin.cmake, Modules/Platform/HP-UX.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows.cmake, Source/cmMakefile.cxx: ENH: Added + platform settings CMAKE_FIND_LIBRARY_PREFIXES and + CMAKE_FIND_LIBRARY_SUFFIXES to allow customized searching for + libraries. + +2006-02-09 14:28 king + + * Modules/CheckSymbolExists.cmake: ENH: Pay attention to + CMAKE_REQUIRED_INCLUDES. + +2006-02-09 14:18 king + + * Modules/Platform/Windows-g++.cmake: BUG: Need Windows-g++.cmake + module to support C++-only projects on Windows. + +2006-02-09 13:48 king + + * Modules/CMakeCXXCompiler.cmake.in: BUG: Need to duplicate some + information from CMakeCCompiler to support C++-only projects. + +2006-02-09 13:14 king + + * Modules/: CheckCSourceCompiles.cmake, + CheckCXXSourceCompiles.cmake, CheckIncludeFiles.cmake: ENH: Patch + from Alexander Neundorf to improve behavior. + +2006-02-09 12:04 king + + * Modules/: FindJPEG.cmake, FindPNG.cmake, FindTIFF.cmake, + FindZLIB.cmake: ENH: Added names for gnuwin32 library versions. + +2006-02-09 09:34 david.cole + + * Utilities/cmtar/wrapper.c: COMP: Last (?) fix for dashboard + warning. + +2006-02-09 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-08 15:37 hoffman + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomTargetCommand.cxx, cmVTKWrapJavaCommand.cxx: ENH: fix + broken tests + +2006-02-08 14:12 hoffman + + * Source/: CMakeLists.txt, cmGlobalXCodeGenerator.cxx: ENH: working + directory working for XCode + +2006-02-08 12:01 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: ENH: Enabled new + WORKING_DIRECTORY option to ADD_CUSTOM_COMMAND and + ADD_CUSTOM_TARGET on VS 6 generator. + +2006-02-08 11:33 hoffman + + * Tests/CustomCommandWorkingDirectory/: CMakeLists.txt, + customTarget.c, working.c: ENH: add test for working directory of + custom command and target + +2006-02-08 10:58 hoffman + + * Modules/CMakeFortranInformation.cmake, Source/CMakeLists.txt, + Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.cxx, + Source/cmAddCustomTargetCommand.h, Source/cmCPluginAPI.cxx, + Source/cmCustomCommand.cxx, Source/cmCustomCommand.h, + Source/cmFLTKWrapUICommand.cxx, Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmIncludeExternalMSProjectCommand.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmQTWrapCPPCommand.cxx, + Source/cmQTWrapUICommand.cxx, Source/cmVTKWrapJavaCommand.cxx: + ENH: add working directory support + +2006-02-08 10:13 king + + * CMakeLists.txt, Source/CMakeLists.txt, Utilities/CMakeLists.txt: + ENH: Added option BUILD_CursesDialog if curses is found. This + allows people to disable building the dialog even when curses is + found. + +2006-02-08 09:51 king + + * Modules/FindQt4.cmake: BUG: Fixed qt version message. Submitted + by Tanner Lovelace. + +2006-02-08 07:17 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: COMP: Fix + problem with STL on HP, and fix reusing the same variable in for + loops + +2006-02-08 02:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-07 17:10 king + + * Modules/Platform/Windows-cl.cmake: ENH: Adding definition of MSVC + when it is the compiler. + +2006-02-07 17:09 king + + * Source/cmMakefile.cxx: BUG: Fixed finding of MinGW libraries with + a windows build of CMake. + +2006-02-07 12:53 andy + + * Source/CPack/cpack.cxx: ENH: Add missing help for -C option + +2006-02-07 11:43 andy + + * Source/kwsys/SystemTools.cxx: COMP: Fix compile problem on + windows and mac + +2006-02-07 10:43 andy + + * Source/kwsys/SystemTools.cxx: COMP: Fix build problem + +2006-02-07 10:23 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: ENH: Move + relative path to kwsys + +2006-02-07 10:11 king + + * bootstrap, Source/cmStandardIncludes.h, + Source/kwsys/CMakeLists.txt, Source/kwsys/String.hxx.in: ENH: + Added kwsys::String class to shorten debugging symbols and error + messages involving std::string. + +2006-02-07 09:25 malaterre + + * Source/kwsys/SystemTools.hxx.in: ENH: Add some doc for visible + class + +2006-02-07 08:49 andy + + * Source/: cmCTest.cxx, cmListFileCache.cxx, cmListFileCache.h, + cmMakefile.cxx, cmTryCompileCommand.cxx, cmTryRunCommand.cxx, + cmakemain.cxx, ctest.cxx, CTest/cmCTestBuildAndTestHandler.cxx, + MFCDialog/CMakeSetupDialog.cpp: ENH: Since list file cache does + not make much sense any more (because of proper list file + parsing), and it actually adds unnecessary complications and make + ctest scripting not work, take it out + +2006-02-07 08:03 david.cole + + * Utilities/cmtar/wrapper.c: COMP: Fix next round of dashboard + warnings. + +2006-02-07 02:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-06 16:32 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: allow for - in the + name of targets for nmake + +2006-02-06 09:31 david.cole + + * Utilities/cmtar/: extract.c, output.c, wrapper.c: COMP: Fix CMake + dashboard warnings related to previous revisions. + +2006-02-06 02:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-05 02:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-04 02:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-03 18:08 king + + * CMakeLists.txt: ENH: Incremented patch version for special KDE + release. + +2006-02-03 17:09 king + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: Added test for new + EXECUTE_PROCESS command. + +2006-02-03 16:55 king + + * Docs/cmake-mode.el: ENH: Adding new EXECUTE_PROCESS command that + interfaces to KWSys Process Execution. + +2006-02-03 16:51 king + + * Source/: cmCommands.cxx, cmExecuteProcessCommand.cxx, + cmExecuteProcessCommand.h: ENH: Adding new EXECUTE_PROCESS + command that interfaces to KWSys Process Execution. + +2006-02-03 12:03 king + + * Source/cmGlobalXCodeGenerator.h: COMP: Added missing method decl + to header. + +2006-02-03 11:48 david.cole + + * Utilities/cmtar/: decode.c, extract.c, output.c, wrapper.c: BUG: + Fix mem leaks related to th_get_pathname. Change this + implementation of th_get_pathname so that it *always* returns a + strdup'ed value. Callers must now free non-NULL returns from + th_get_pathname. Change all callers to call free appropriately. + +2006-02-03 11:36 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCodeGenerator.cxx, + cmTarget.cxx: BUG: Fixed cmTarget::GetFullPath to not append the + configuration name when only one configuration is built. It now + asks the generator what subdirectory if any to use for a given + configuration name. + +2006-02-03 02:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-02 20:18 king + + * CMakeLists.txt, Source/CMakeLists.txt, Utilities/CMakeLists.txt: + COMP: Fixed build on VC++ Express 2005. Explicitly testing for + MFC to determine whether to build the MFCDialog. + +2006-02-02 20:16 king + + * Modules/CMakeGenericSystem.cmake: BUG: CMAKE_INSTALL_PREFIX must + always have forward slashes. + +2006-02-02 20:15 king + + * Modules/Platform/Windows-cl.cmake: BUG: Removed odbc32.lib and + odbccp32.lib from standard libraries on VS 8 because VC++ Express + 2005 does not have them. They are SQL database access libraries + and should not be needed for every application. User code can + always explicitly link the library. Also replacing deprecated + /GZ option with /RTC1 for VS 8. This addresses bug#2795. + +2006-02-02 15:53 david.cole + + * Utilities/cmtar/filesystem.c: BUG: Fix memory leak in libtar's + kwReadDir. Use a static buffer like readdir (probably) does + rather than malloc-ing a block which never gets free-d. + +2006-02-02 03:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-02-01 02:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-31 19:34 king + + * Source/: CMakeLists.txt, cmake.cxx: ENH: Enabled build of VS 7 + and 8 generators for MinGW. + +2006-01-31 18:50 king + + * bootstrap, Source/cmake.cxx: ENH: Enabled bootstrapping with + MinGW from an MSYS prompt. + +2006-01-31 10:46 king + + * Source/cmGetFilenameComponentCommand.cxx: BUG: ABSOLUTE option + should evaluate relative paths with respect to + CMAKE_CURRENT_SOURCE_DIR. This addresses bug#2797. + +2006-01-31 05:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-30 14:25 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: more cleanup and removal of + old code + +2006-01-30 13:57 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: cleanup and remove some old + code + +2006-01-30 02:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-29 02:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-28 01:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-27 18:20 king + + * Source/: cmFindFileCommand.cxx, cmFindLibraryCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h, cmMakefile.cxx, + cmMakefile.h: ENH: Improved support for user-configured search + paths. Paths given in the CMAKE_LIBRARY_PATH cmake variable are + searched first, then those in the CMAKE_LIBRARY_PATH environment + variable, then those listed in the call to the FIND_LIBRARY + command and finally those listed in the PATH environment + variable. The support is similar for finding include files with + FIND_PATH, but the variable is CMAKE_INCLUDE_PATH. + +2006-01-27 13:48 king + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: VS7 generator should use + per-configuration linker flags for targets. This addresses + bug#2765. + +2006-01-27 13:46 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestBuildHandler.h: + ENH: Better handle interleved error/output + +2006-01-27 13:07 king + + * Modules/readme.txt, Source/cmFindPackageCommand.cxx, + Source/cmFindPackageCommand.h: ENH: Added optional component list + to the REQUIRED option of the FIND_PACKAGE command. This + addresses bug#2771. + +2006-01-27 12:58 martink + + * Source/cmOptionCommand.h: STYLE: spelling fix + +2006-01-27 12:58 martink + + * Source/cmMessageCommand.h: STYLE: grammer fix + +2006-01-27 11:19 hoffman + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: add extra thing for + svn X status output + +2006-01-27 01:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-26 01:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-25 14:12 hoffman + + * Source/cmTryCompileCommand.cxx: ENH: fix double + CMAKE_(LANG)_FLAGS problem in try compile + +2006-01-25 12:16 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: change to fatal error + +2006-01-25 11:41 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeCXXCompiler.cmake.in, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake, + CMakeDetermineJavaCompiler.cmake, CMakeDetermineRCCompiler.cmake: + ENH: fix more than one argument passed in to compilers via + environment + +2006-01-25 11:07 hoffman + + * Source/: cmMessageCommand.cxx, cmMessageCommand.h: ENH: fix docs, + and revert fatal error change + +2006-01-25 08:39 hoffman + + * Source/cmMessageCommand.cxx: ENH: make all errors fatal in + message command + +2006-01-25 08:38 hoffman + + * Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Executable/testcflags.c, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/testcflags.c, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/testcflags.c: ENH: add + COMPILE_FLAGS to targets + +2006-01-25 00:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-24 22:20 hoffman + + * Source/MFCDialog/PathDialog.cpp: ENH: do not force users to + create paths + +2006-01-24 15:48 hoffman + + * Source/cmStandardIncludes.h: ENH: fix for borland memcpy junk + +2006-01-24 12:07 andy + + * Modules/CheckCXXSourceCompiles.cmake: ENH: fix bug, write the + correct file + +2006-01-24 07:58 hoffman + + * Source/cmLocalGenerator.cxx: COMP: fix warning + +2006-01-24 00:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-23 17:24 hoffman + + * Source/cmLocalGenerator.cxx: ENH: fix warning + +2006-01-23 16:36 martink + + * Source/kwsys/SystemTools.cxx: ENH: by Bill make sure path is unix + style + +2006-01-23 13:50 hoffman + + * Source/: CMakeLists.txt, cmGlobalWatcomWMakeGenerator.cxx, + cmLocalGenerator.cxx: ENH: fix problem with watcom and short + paths and -I + +2006-01-23 12:31 hoffman + + * Source/cmDepends.cxx: ENH: correct include for memcpy + +2006-01-23 11:32 hoffman + + * Modules/Platform/kFreeBSD.cmake: ENH: add kFreeBSD support + +2006-01-23 00:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-22 21:15 hoffman + + * Modules/CheckTypeSize.cmake: ENH: fix check type size + +2006-01-22 00:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-21 00:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-20 01:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-19 00:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-18 00:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-17 16:53 hoffman + + * Source/kwsys/SystemTools.hxx.in: ENH: fix for icc + +2006-01-17 16:22 martink + + * Utilities/cmcurl/CMake/CheckTypeSize.cmake: BUG: revert such that + it should work + +2006-01-17 14:35 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: more fixes + for watcom + +2006-01-17 10:21 hoffman + + * Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CMakeFindWMake.cmake, Modules/TestForSSTREAM.cmake, + Modules/TestForSSTREAM.cxx, Modules/readme.txt, + Modules/Platform/Windows-wcl386.cmake, Source/CMakeLists.txt, + Source/cmCPluginAPI.cxx, Source/cmCPluginAPI.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalWatcomWMakeGenerator.cxx, + Source/cmGlobalWatcomWMakeGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, Source/cmStringCommand.h, + Source/cmake.cxx, Source/kwsys/Directory.cxx, + Source/kwsys/EncodeExecutable.c, Source/kwsys/Glob.cxx, + Source/kwsys/ProcessWin32.c, Source/kwsys/Registry.cxx, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Source/kwsys/testRegistry.cxx, + Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/LoadCommand/CMakeCommands/CMakeLists.txt, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c, + Tests/SubDir/CMakeLists.txt, + Tests/SubDir/vcl_algorithm_vcl_pair_double.foo.c, + Tests/SubDir/AnotherSubdir/pair_int.int.c, + Tests/SubDir/ThirdSubDir/pair_int.int1.c, + Utilities/cmcurl/CMakeLists.txt, Utilities/cmcurl/timeval.h, + Utilities/cmcurl/CMake/CheckTypeSize.c.in, + Utilities/cmcurl/CMake/CheckTypeSize.cmake, + Utilities/cmcurl/Platforms/WindowsCache.cmake, + Utilities/cmtar/handle.c, Utilities/cmtar/libtar.c: ENH: add + support for watcom wmake and wcl386 + +2006-01-17 09:27 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: correct standard + libraries + +2006-01-17 00:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-16 12:54 yogi.girdhar + + * Utilities/cmtar/compat/compat.h: COMP: wrapped compat.h inside a + extern C block so that we can use it in C++ code + +2006-01-16 00:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-15 00:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-14 10:27 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Fixed shadowed variable + warning. + +2006-01-14 00:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-13 20:51 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: Further centralized custom + command dependency computation. Custom command dependencies in + the source tree may now also be specified relative to the source + directory. + +2006-01-13 19:36 king + + * Source/cmFLTKWrapUICommand.cxx: BUG: Removed bogust dependency. + +2006-01-13 19:35 king + + * Source/: cmFileCommand.cxx, cmLocalGenerator.cxx: COMP: Removed + unused variables. + +2006-01-13 18:33 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator3.cxx: COMP: Removed unused paramter + from cmLocalGenerator::OutputLinkLibraries. + +2006-01-13 18:18 king + + * Source/cmFileCommand.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmLinkLibrariesCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTargetLinkLibrariesCommand.h, Source/cmXCodeObject.h, + Source/CTest/cmCTestBuildAndTestHandler.cxx, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Sweeping + changes to cleanup computation of target names. This should fix + many bugs related to target names being computed inconsistently. + + - Centralized computation of a target's file name to a method in + cmTarget. Now that global knowledge is always available the + *_CMAKE_PATH cache variables are no longer needed. + + - Centralized computation of link library command lines and link + directory search order. + + - Moved computation of link directories needed to link CMake + targets to be after evaluation of linking dependencies. + + This also removed alot of duplicate code in which each version + had its own bugs. + + This commit is surrounded by the tags + + CMake-TargetNameCentralization1-pre + + and + + CMake-TargetNameCentralization1-post + + so make the large set of changes easy to identify. + +2006-01-13 11:44 hoffman + + * Source/cmTryCompileCommand.cxx, + Utilities/cmcurl/CMake/CheckTypeSize.cmake, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: fix for + CMakeTmp move broken stuff + +2006-01-13 09:57 hoffman + + * Modules/: CheckTypeSize.c.in, CheckTypeSize.cmake: ENH: fix + checktypesize + +2006-01-13 00:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-12 23:08 hoffman + + * Modules/: CheckTypeSize.c.in, CheckTypeSize.cmake: ENH: move + define into configured file and do not use the command line + +2006-01-12 14:21 andy + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: + COMP: Remove warning + +2006-01-12 13:48 martink + + * Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, Modules/CheckSymbolExists.cmake, + Modules/CheckTypeSize.cmake, Modules/FindSDL_sound.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmTryCompileCommand.cxx, Source/cmTryCompileCommand.h, + Source/cmTryRunCommand.cxx, + Utilities/cmcurl/CMake/CheckTypeSize.cmake, + Tests/TryCompile/CMakeLists.txt, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: put + CmakeTmp into CMakeFiles + +2006-01-12 11:10 hoffman + + * Modules/FindwxWindows.cmake: ENH: contribution from Jan Woetzel + +2006-01-12 09:20 andy + + * Source/cmGeneratedFileStream.cxx: COMP: Fix compile error that + was caused by the binary flag + +2006-01-12 00:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-11 19:12 andy + + * Source/CPack/cmCPackTGZGenerator.cxx: ENH: Fix compression on + Windows + +2006-01-11 19:06 andy + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Add support for binary + +2006-01-11 11:23 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: ENH: Add a way to + specify a custom install command + +2006-01-11 11:08 andy + + * CMakeLists.txt, Modules/CPack.cmake, Modules/NSIS.template.in, + Source/CPack/cmCPackGenericGenerator.cxx, + Templates/CPackConfig.cmake.in: ENH: Some improvements: specify + link, copy msvc libraries, fix install directory + +2006-01-11 00:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-10 12:05 andy + + * Source/CPack/: cmCPackConfigure.h.in, cmCPackNSISGenerator.cxx, + cmCPackNSISGenerator.h, cmCPackPackageMakerGenerator.h: COMP: + Remove legacy code and fix sun build + +2006-01-10 00:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-09 18:24 andy + + * Modules/NSIS.template.in, + Source/CPack/cmCPackGenericGenerator.cxx: ENH: Use specified + output file name, also detect errors during install + +2006-01-09 18:20 andy + + * Templates/CPackConfig.cmake.in: ENH: Pass CPACK_PACKAGE_FILE_NAME + +2006-01-09 18:20 andy + + * Modules/CPack.cmake: ENH: Cleanup + +2006-01-09 16:34 andy + + * Modules/NSIS.template.in: BUG: Allow spaces in path + +2006-01-09 14:56 hoffman + + * Tests/CustomCommand/GeneratedHeader/: CMakeLists.txt, + generated.h.in, main.cpp: ENH: add test for generated header + +2006-01-09 14:40 hoffman + + * Source/cmCustomCommand.cxx, Source/cmCustomCommand.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmTarget.cxx, + Tests/CustomCommand/CMakeLists.txt, + Tests/Wrapping/CMakeLists.txt, Tests/Wrapping/fakefluid.cxx: ENH: + for all custom commands that can not be given to a target, add + them to all targets in the current makefile + +2006-01-09 13:15 andy + + * CMakeLists.txt: STYLE: Add an explanation for a bunch of + backslashes + +2006-01-09 13:14 andy + + * Source/CPack/cmCPackTGZGenerator.cxx: BUG: Fix memory problem + +2006-01-09 12:46 hoffman + + * Utilities/Release/: Release.cmake, cmake_release.sh.in: ENH: + +2006-01-09 12:45 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: add qt quiet stuff + +2006-01-09 11:26 andy + + * CMakeLists.txt, Modules/CPack.cmake, + Source/CPack/cmCPackGenericGenerator.cxx, + Templates/CPackConfig.cmake.in: ENH: Fix test for cpack + variables, add support for icon on windows + +2006-01-09 00:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-08 00:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-07 00:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-06 15:51 hoffman + + * Modules/: CMakeMSYSFindMake.cmake, CMakeMinGWFindMake.cmake, + Platform/Linux-icpc.cmake: ENH: merge from main tree + +2006-01-06 15:51 hoffman + + * Source/: cmGlobalMSYSMakefileGenerator.cxx, + cmGlobalMSYSMakefileGenerator.h, + cmGlobalMinGWMakefileGenerator.cxx, + cmGlobalMinGWMakefileGenerator.h: ENH: add missing files + +2006-01-06 15:07 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/Platform/CYGWIN-g77.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-g77.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows.cmake, Source/CMakeLists.txt, + Source/cmAddExecutableCommand.cxx, Source/cmCTest.cxx, + Source/cmDependsC.cxx, Source/cmDependsC.h, + Source/cmFindFileCommand.cxx, Source/cmFindFileCommand.h, + Source/cmFindPathCommand.cxx, Source/cmFindPathCommand.h, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmake.cxx, Source/CTest/cmCTestBuildAndTestHandler.cxx, + Source/kwsys/ProcessUNIX.c, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.hxx.in, Tests/Complex/CMakeLists.txt, + Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/CustomCommand/CMakeLists.txt, + Utilities/Release/cmake_release.sh, + Utilities/Release/cmake_release.sh.in: ENH: merges from main tree + +2006-01-06 13:54 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix missing plist file + error + +2006-01-06 10:45 andy + + * Utilities/cmtar/compat/snprintf.c: COMP: Try to remove more + warnings + +2006-01-06 00:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-05 17:16 king + + * Source/: cmDependsC.cxx, cmDependsC.h: BUG: Fix for scanning + generated headers included with double-quotes. Also fixed + double-quote include support to not use the special quoted + location when a full path is given on the include line. + +2006-01-05 15:49 king + + * Source/kwsys/testProcess.c: ENH: Added special test 0 to just run + a given command line. + +2006-01-05 13:27 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, cpack.cxx: ENH: More + debugging and work on PackageMaker code + +2006-01-05 13:25 yogi.girdhar + + * Utilities/cmtar/: config.h.in, libtar.c: BUG: libtar now compiles + in VJ and works with vtkzlib + +2006-01-05 12:33 andy + + * Source/CPack/cmCPackLog.cxx: ENH: flush the output + +2006-01-05 12:16 andy + + * Source/CPack/cpack.cxx: BUG: Use objects that exist + +2006-01-05 12:16 andy + + * Source/CPack/cmCPackLog.cxx: BUG: Print the right line number to + the right pipe + +2006-01-05 10:37 andy + + * Source/CPack/cmCPackPackageMakerGenerator.cxx: BUG: Revert back + +2006-01-05 09:18 hoffman + + * CMakeLists.txt: ENH: use a safer check for CPack + +2006-01-05 09:13 hoffman + + * Source/: cmAddExecutableCommand.cxx, cmGlobalXCodeGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, cmMakefile.cxx: ENH: fix + bundles for Mac and Xcode + +2006-01-05 03:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-04 16:24 hoffman + + * Source/CPack/cmCPackTGZGenerator.cxx: ENH: remove assert + +2006-01-04 15:13 andy + + * CMakeLists.txt, Modules/CPack.Description.plist.in, + Modules/NSIS.template.in, + Source/CPack/cmCPackGenericGenerator.cxx, + Source/CPack/cmCPackSTGZGenerator.cxx, + Source/CPack/cmCPackTGZGenerator.cxx, Source/CPack/cpack.cxx, + Modules/CPack.cmake, Templates/CPackConfig.cmake.in: ENH: More + CPack stuff and fix zlib compression + +2006-01-04 09:55 hoffman + + * Source/cmFindPathCommand.cxx: ENH: remove debug print stuff + +2006-01-04 08:32 andy + + * Source/kwsys/CMakeLists.txt: COMP: Do not build tests if build + testing is off + +2006-01-04 01:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-03 17:11 hoffman + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2006-01-03 17:07 hoffman + + * Utilities/Release/cmake_release.sh.in: ENH: move to patch 2 + +2006-01-03 16:40 hoffman + + * Source/cmMakefile.cxx, Source/cmMakefile.h, + Tests/Complex/CMakeLists.txt, Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: add new + cmakedefine01 feature from bug report 2603 + +2006-01-03 14:00 hoffman + + * Modules/Platform/: CYGWIN-g77.cmake, CYGWIN.cmake: ENH: add exe + stuff for cygwin + +2006-01-03 08:39 andy + + * Source/cmSystemTools.cxx: COMP: Remove warnings on HP-UX + +2006-01-03 08:39 andy + + * Utilities/cmtar/append.c, Utilities/cmtar/extract.c, + Utilities/cmtar/libtar.c, Source/CPack/cmCPackLog.cxx, + Source/CPack/cpack.cxx: COMP: Remove warnings + +2006-01-03 01:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-02 17:28 andy + + * Source/CPack/: cmCPackGenerators.cxx, + cmCPackGenericGenerator.cxx, cmCPackGenericGenerator.h, + cmCPackNSISGenerator.cxx, cmCPackNSISGenerator.h, + cmCPackPackageMakerGenerator.cxx, cmCPackPackageMakerGenerator.h, + cmCPackSTGZGenerator.cxx, cmCPackSTGZGenerator.h, + cmCPackTGZGenerator.cxx, cmCPackTGZGenerator.h, cpack.cxx: ENH: + Start working on CPack input file and cleanups + +2006-01-02 17:22 andy + + * Source/CPack/: cmCPackLog.h, cmCPackLog.cxx: COMP: Fix compile + errors + +2006-01-02 16:14 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackGenerators.h, CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackGenericGenerator.h, CPack/cmCPackLog.cxx, + CPack/cmCPackLog.h, CPack/cmCPackNSISGenerator.cxx, + CPack/cmCPackPackageMakerGenerator.cxx, + CPack/cmCPackSTGZGenerator.cxx, CPack/cmCPackTGZGenerator.cxx, + CPack/cpack.cxx: ENH: More improvements and add logging + +2006-01-02 15:01 hoffman + + * Tests/: CustomCommand/CMakeLists.txt, Wrapping/CMakeLists.txt: + BUG: force EXECUABLE and LIBRARY output paths so bad cache + entries do not fail tests + +2006-01-02 14:33 andy + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: Flush the EXECUTABLE + and LIBRARY output path to internal + +2006-01-02 13:37 hoffman + + * Modules/CMakeGenericSystem.cmake, + Modules/Platform/Windows-g77.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows.cmake, Source/cmTarget.cxx: BUG: fix for + bug 2322, use CMAKE_EXECUTABLE_SUFFIX variable for exe suffix + +2006-01-02 13:34 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: fix build problem + on gcc + +2006-01-02 12:36 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: fix for bug 2533, make + foo/foo.o now works and .o files are in the help + +2006-01-02 11:39 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: COMP: Remove warning + +2006-01-02 11:21 hoffman + + * Utilities/Release/Release.cmake: ENH: remove MS dll's from + install on cygwin + +2006-01-02 11:07 hoffman + + * Source/: cmFindPathCommand.cxx, cmMakefile.cxx: ENH: change + framework order + +2006-01-02 10:37 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cmCPackTGZGenerator.cxx, + cmCPackTGZGenerator.h: COMP: Fix build problems + +2006-01-02 10:36 andy + + * Source/cmGeneratedFileStream.cxx: BUG: Fix the compression with + custom extension + +2006-01-02 07:53 andy + + * Source/CPack/: cmCPackPackageMakerGenerator.cxx, + cmCPackTGZGenerator.cxx, cmCPackTGZGenerator.h: ENH: Use libtar + +2006-01-02 07:52 andy + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Add a way to overwrite compression extension + +2006-01-02 01:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2006-01-01 23:31 andy + + * Source/: CMakeLists.txt, cmSystemTools.cxx, cmSystemTools.h: ENH: + Merge from cpack branch + +2006-01-01 23:28 andy + + * Modules/: CPack.Description.plist.in, CPack.Info.plist.in, + NSIS.template.in: ENH: Merge from CPack branch + +2006-01-01 23:21 andy + + * Source/CPack/: cmCPackConfigure.h.in, cmCPackGenerators.cxx, + cmCPackGenerators.h, cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cmCPackNSISGenerator.cxx, + cmCPackNSISGenerator.h, cmCPackPackageMakerGenerator.cxx, + cmCPackPackageMakerGenerator.h, cmCPackSTGZGenerator.cxx, + cmCPackSTGZGenerator.h, cmCPackTGZGenerator.cxx, + cmCPackTGZGenerator.h, cpack.cxx: ENH: Merge from the cpack + branch + +2006-01-01 01:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-31 13:10 king + + * Tests/TarTest/CMakeLists.txt: ENH: Simplified ln command to use + relative path in symlink. + +2005-12-31 12:59 king + + * Source/kwsys/ProcessUNIX.c: BUG: When more than one command is + given and one of them fails to start and the rest are killed, do + not forget to reap the killed children. + +2005-12-31 10:33 andy + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, internal.h: COMP: + Try to fix major/minor problem on aix + +2005-12-31 09:40 andy + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, internal.h: COMP: + Attempt to fix problems with major and minor + +2005-12-31 01:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-30 21:54 hoffman + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h: ENH: move framework + stuff from FindFile to FindPath + +2005-12-30 21:54 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix so verbose is + put in the correct place + +2005-12-30 17:51 andy + + * Utilities/cmtar/compat/snprintf.c: COMP: Fix systems that do not + have both vsnprintf and snprintf. + +2005-12-30 17:27 andy + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, compat/compat.h, + compat/snprintf.c: COMP: Fix support for vsnprintf + +2005-12-30 16:28 andy + + * Source/cmSystemTools.cxx: COMP: Fix warning on sun + +2005-12-30 16:05 andy + + * Utilities/cmtar/extract.c: COMP: Another borland bug + +2005-12-30 15:46 andy + + * Tests/TarTest/CMakeLists.txt: ENH: Add testing of symlinks too + +2005-12-30 15:46 andy + + * Utilities/cmtar/extract.c: BUG: Handle mkdirhier properly since + it may modify the string + +2005-12-30 15:32 andy + + * Source/cmSystemTools.cxx: COMP: Remove sun warning + +2005-12-30 15:27 andy + + * Source/CMakeLists.txt, Tests/TarTest/CMakeLists.txt, + Tests/TarTest/TestTarExec.cxx: ENH: Add a tar test + +2005-12-30 15:25 andy + + * Source/cmake.cxx: ENH: Add a way to compare two files + +2005-12-30 14:51 andy + + * Source/cmSystemTools.cxx, Utilities/cmtar/handle.c, + Utilities/cmtar/libtar.c, Utilities/cmtar/libtar.h: ENH: Cleanup + the file handler stuf so that now any file descriptor type can be + used + +2005-12-30 14:50 andy + + * CMakeLists.txt, Utilities/cmcurl/CMakeLists.txt, + Utilities/cmexpat/CMakeLists.txt, Utilities/cmtar/CMakeLists.txt, + Utilities/cmzlib/CMakeLists.txt, Source/CMakeLists.txt: COMP: + Cleanup regular expressions + +2005-12-30 14:31 andy + + * Source/cmSystemTools.cxx: COMP: Remove unused variable + +2005-12-30 14:23 andy + + * Utilities/cmtar/compat/: basename.c, dirname.c: COMP: Remove + warnings by exposing some variables + +2005-12-30 14:22 andy + + * Source/cmSystemTools.cxx, Utilities/cmtar/handle.c, + Utilities/cmtar/libtar.c, Utilities/cmtar/libtar.h: COMP: Fix + support for gzip on non-32 bit platforms + +2005-12-30 13:22 andy + + * Utilities/cmtar/util.c: COMP: Remove warning about argument not + being int + +2005-12-30 13:22 andy + + * Source/: cmFindFileCommand.cxx, cmGlobalXCodeGenerator.cxx: COMP: + Remove shadow variable warning + +2005-12-30 12:58 andy + + * Source/cmSystemTools.cxx: COMP: Use mangle names + +2005-12-30 12:58 andy + + * Source/: cmFindFileCommand.cxx, cmTarget.cxx: COMP: Remove + warnings + +2005-12-30 10:35 andy + + * Utilities/cmtar/: CMakeLists.txt, append.c, config.h.in, + encode.c, internal.h, output.c, util.c, wrapper.c: BUG: Several + Borland fixes + +2005-12-30 01:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-29 12:19 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx: ENH: Make + the syntax more line tar + +2005-12-29 12:18 andy + + * Utilities/cmtar/append.c: COMP: More cygwin fixes + +2005-12-29 11:42 andy + + * Utilities/cmtar/append.c: BUG: Fix on cygwin... again? + +2005-12-29 11:15 andy + + * Utilities/cmtar/output.c: COMP: Try to remove warnings and add + support for cygwin + +2005-12-29 10:52 andy + + * Source/cmake.cxx: ENH: Make additional file names optional + +2005-12-29 10:43 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx: ENH: Add + untaring support + +2005-12-29 10:41 andy + + * Utilities/cmtar/extract.c: BUG: Fix extract. Looks like dirname + actually changes the string, so temporary string should be used + +2005-12-29 09:11 andy + + * Utilities/cmtar/: output.c, compat/compat.h: COMP: Remove c++ + style comments + +2005-12-29 01:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-28 20:04 andy + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: BUG: Now really + fix the test + +2005-12-28 19:31 andy + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: COMP: Fix test + +2005-12-28 17:02 andy + + * Source/cmSystemTools.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt: COMP: Fix + complex test and fix bootstrap + +2005-12-28 16:53 andy + + * Source/cmSystemTools.cxx: COMP: Add missing include + +2005-12-28 16:44 andy + + * Source/cmSystemTools.cxx: BUG: Return proper values + +2005-12-28 16:43 andy + + * Utilities/cmtar/: extract.c, libtar.c: COMP: Remove more warnings + +2005-12-28 16:31 andy + + * Source/cmake.cxx: ENH: Add command to create tar + +2005-12-28 16:30 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add method to + create tar + +2005-12-28 16:30 andy + + * Source/CMakeLists.txt: COMP: Link tar library to cmake + +2005-12-28 16:29 andy + + * CMakeLists.txt: COMP: Fix path to include files + +2005-12-28 15:31 andy + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, handle.c, + compat/compat.h: COMP: Remove more warnings and rename library to + cmtar + +2005-12-28 15:03 andy + + * Utilities/cmtar/append.c: COMP: Remove warning + +2005-12-28 14:58 andy + + * Utilities/cmtar/: CMakeLists.txt, append.c, decode.c, extract.c, + filesystem.c, filesystem.h, handle.c, internal.h, libtar.c, + util.c, wrapper.c, compat/basename.c, compat/compat.h, + compat/dirname.c: COMP: Several borland fixes + +2005-12-28 14:50 andy + + * Utilities/cmtar/compat/snprintf.c: COMP: Remove warnings + +2005-12-28 13:36 andy + + * CMakeLists.txt: ENH: First cut at enabling tar + +2005-12-28 13:35 andy + + * Utilities/cmtar/append.c: COMP: Only do O_BINARY on windows + +2005-12-28 13:33 andy + + * Utilities/cmtar/: append.c, libtar.c: COMP: Fix windows + +2005-12-28 13:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-28 12:34 andy + + * Utilities/cmtar/libtar.c: ENH: Fix building on cygwin + +2005-12-28 12:24 andy + + * Utilities/cmtar/: CMakeLists.txt, config.h.in, extract.c, + libtar.c: COMP: Fix build on sun by adding missing include + +2005-12-28 11:00 andy + + * Utilities/cmtar/: CMakeLists.txt, decode.c, filesystem.c, + wrapper.c, compat/basename.c, compat/dirname.c, compat/fnmatch.c, + compat/snprintf.c: ENH: Windows fixes + +2005-12-28 10:28 andy + + * CMakeLists.txt: ENH: Merge change from the main tree + +2005-12-28 10:19 andy + + * CMakeLists.txt: ENH: Initial setup of libtar + +2005-12-28 10:18 andy + + * Utilities/cmtar/: CMakeLists.txt, COPYRIGHT, append.c, block.c, + config.h.in, decode.c, encode.c, extract.c, filesystem.c, + filesystem.h, handle.c, internal.h, libtar.c, libtar.h, output.c, + tar.h, util.c, wrapper.c, compat/README, compat/basename.c, + compat/compat.h, compat/dirname.c, compat/fnmatch.c, + compat/gethostbyname_r.c, compat/gethostname.c, + compat/getservbyname_r.c, compat/glob.c, compat/inet_aton.c, + compat/snprintf.c, compat/strdup.c, compat/strlcat.c, + compat/strlcpy.c, compat/strmode.c, compat/strrstr.c, + compat/strsep.c, listhash/hash.c.in, listhash/list.c.in, + listhash/listhash.h.in: ENH: Initial import + +2005-12-28 10:09 andy + + * Utilities/cmtar/: CMakeLists.txt, COPYRIGHT, append.c, block.c, + config.h.in, decode.c, encode.c, extract.c, filesystem.c, + filesystem.h, handle.c, internal.h, libtar.c, libtar.h, output.c, + tar.h, util.c, wrapper.c, compat/README, compat/basename.c, + compat/compat.h, compat/dirname.c, compat/fnmatch.c, + compat/gethostbyname_r.c, compat/gethostname.c, + compat/getservbyname_r.c, compat/glob.c, compat/inet_aton.c, + compat/snprintf.c, compat/strdup.c, compat/strlcat.c, + compat/strlcpy.c, compat/strmode.c, compat/strrstr.c, + compat/strsep.c, listhash/hash.c.in, listhash/list.c.in, + listhash/listhash.h.in: ENH: Initial import + +2005-12-28 10:07 andy + + * Source/cmake.cxx: ENH: Add file compare + +2005-12-27 15:33 hoffman + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: make sure -F is not + duplicated + +2005-12-27 15:08 andy + + * Source/CPack/: cmCPackConfigure.h.in, cmCPackGenerators.cxx, + cmCPackGenerators.h, cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cmCPackNSISGenerator.cxx, + cmCPackNSISGenerator.h, cmCPackPackageMakerGenerator.cxx, + cmCPackPackageMakerGenerator.h, cmCPackSTGZGenerator.h, + cmCPackTGZGenerator.cxx, cmCPackTGZGenerator.h: ENH: Remove + references to m_Makefile. It is now private. Fix several build + problems. Change generator creation. ... + +2005-12-27 14:56 hoffman + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx: ENH: add + framework support to FIND_FILE + +2005-12-27 14:32 andy + + * Source/CPack/cpack.cxx, Utilities/CMakeLists.txt: ENH: Improve + help arguments and add generation of doc files + +2005-12-27 13:10 andy + + * Source/cmCTest.cxx: ENH: Fix command line argument parsing + +2005-12-27 13:03 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: remove warning + +2005-12-26 13:14 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmMakefile.cxx, + cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx, cmTarget.h, + kwsys/SystemTools.cxx: ENH: add better support for framework + linking + +2005-12-26 01:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-25 01:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-24 01:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-23 01:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-22 16:42 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeMSYSFindMake.cmake, + Modules/CMakeMinGWFindMake.cmake, Source/CMakeLists.txt, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.cxx, + Source/cmGlobalMSYSMakefileGenerator.h, + Source/cmGlobalMinGWMakefileGenerator.cxx, + Source/cmGlobalMinGWMakefileGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, Source/cmake.cxx: ENH: + fix borland make clean targets before build, add new generators + for msys and mingw + +2005-12-22 16:02 hoffman + + * ChangeLog.manual, Modules/CMake.cmake, + Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeCommonLanguageInclude.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeExportBuildSettings.cmake, + Modules/CMakeFindFrameworks.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeImportBuildSettings.cmake, + Modules/CMakeJavaInformation.cmake, + Modules/CMakePrintSystemInformation.cmake, + Modules/CMakeRCInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/CMakeTestJavaCompiler.cmake, + Modules/CMakeTestRCCompiler.cmake, + Modules/CMakeVS6BackwardCompatibility.cmake, + Modules/CMakeVS7BackwardCompatibility.cmake, Modules/CTest.cmake, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/Dart.cmake, + Modules/Documentation.cmake, Modules/FindAVIFile.cmake, + Modules/FindCABLE.cmake, Modules/FindCurses.cmake, + Modules/FindCygwin.cmake, Modules/FindDCMTK.cmake, + Modules/FindDart.cmake, Modules/FindDoxygen.cmake, + Modules/FindFLTK.cmake, Modules/FindGCCXML.cmake, + Modules/FindGLU.cmake, Modules/FindGLUT.cmake, + Modules/FindGTK.cmake, Modules/FindGnuplot.cmake, + Modules/FindHTMLHelp.cmake, Modules/FindITK.cmake, + Modules/FindImageMagick.cmake, Modules/FindJNI.cmake, + Modules/FindJPEG.cmake, Modules/FindJava.cmake, + Modules/FindKDE.cmake, Modules/FindLATEX.cmake, + Modules/FindMFC.cmake, Modules/FindMPEG.cmake, + Modules/FindMPEG2.cmake, Modules/FindMPI.cmake, + Modules/FindMatlab.cmake, Modules/FindMotif.cmake, + Modules/FindOpenAL.cmake, Modules/FindOpenGL.cmake, + Modules/FindPHP4.cmake, Modules/FindPNG.cmake, + Modules/FindPerl.cmake, Modules/FindPerlLibs.cmake, + Modules/FindPhysFS.cmake, Modules/FindPike.cmake, + Modules/FindPythonInterp.cmake, Modules/FindPythonLibs.cmake, + Modules/FindQt.cmake, Modules/FindQt.cmake.bak, + Modules/FindQt3.cmake, Modules/FindQt4.cmake, + Modules/FindRuby.cmake, Modules/FindSDL.cmake, + Modules/FindSDL.cmake.bak, Modules/FindSDL_image.cmake, + Modules/FindSDL_image.cmake.bak, Modules/FindSDL_mixer.cmake, + Modules/FindSDL_mixer.cmake.bak, Modules/FindSDL_net.cmake, + Modules/FindSDL_net.cmake.bak, Modules/FindSDL_sound.cmake, + Modules/FindSDL_ttf.cmake, Modules/FindSDL_ttf.cmake.bak, + Modules/FindSWIG.cmake, Modules/FindSelfPackers.cmake, + Modules/FindTCL.cmake, Modules/FindTIFF.cmake, + Modules/FindTclsh.cmake, Modules/FindThreads.cmake, + Modules/FindUnixCommands.cmake, Modules/FindVTK.cmake, + Modules/FindWget.cmake, Modules/FindWish.cmake, + Modules/FindX11.cmake, Modules/FindZLIB.cmake, + Modules/FindwxWindows.cmake, Modules/TestBigEndian.cmake, + Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForANSIStreamHeaders.cmake, + Modules/TestForSTDNamespace.cmake, Modules/UseQt4.cmake, + Modules/UseSWIG.cmake, Modules/UseVTK40.cmake, + Modules/UseVTKBuildSettings40.cmake, + Modules/UseVTKConfig40.cmake, Modules/Use_wxWindows.cmake, + Modules/UsewxWidgets.cmake, Modules/readme.txt, + Source/cmBuildCommand.cxx, Source/cmBuildNameCommand.h, + Source/cmCTest.cxx, Source/cmDepends.cxx, Source/cmDepends.h, + Source/cmDependsC.cxx, Source/cmDependsC.h, + Source/cmDependsFortran.cxx, Source/cmDependsFortran.h, + Source/cmDependsJava.cxx, Source/cmDependsJava.h, + Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmFindPackageCommand.h, + Source/cmGetCMakePropertyCommand.h, + Source/cmGetDirectoryPropertyCommand.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmInstallTargetsCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSiteNameCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTryRunCommand.h, + Source/cmakemain.cxx, Source/CTest/cmCTestBuildCommand.cxx, + Source/CTest/cmCTestUpdateHandler.cxx, + Source/MFCDialog/CMakeCommandLineInfo.cpp, + Source/MFCDialog/CMakeSetup.cpp, Source/kwsys/ProcessWin32.c, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: merge changes from + main tree to branch + +2005-12-22 15:41 andy + + * Modules/CPack.Description.plist.in, Modules/CPack.Info.plist.in, + Source/CPack/cmCPackPackageMakerGenerator.cxx, + Source/CPack/cmCPackPackageMakerGenerator.h: ENH: Ok, now it + works + +2005-12-22 15:34 andy + + * Source/CPack/cmCPackGenericGenerator.cxx: ENH: Add mandatory + project description file or string + +2005-12-22 15:34 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add XML + encoduing method + +2005-12-22 01:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-21 15:45 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: make sure depend helper actually works, if a depend library + gets updated, then the target needs to be removed, and the + CONFIGURATION directory needs to be used + +2005-12-21 08:46 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Libraries and + executables that are built with version numbers and symlinks + should be built by a rule using the real file name. The symlink + file names should be rules that just depend on the main rule. + This way if a version number changes a target will re-link with + the new name and the symlinks will be updated. + +2005-12-21 01:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-20 14:07 andy + + * Utilities/cmcurl/mprintf.c: COMP: Fix build on uclibc + +2005-12-20 13:53 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: remove duplicates + +2005-12-20 13:22 king + + * Source/kwsys/ProcessWin32.c: ENH: Improved robustness of sharing + parent pipes with children. This ensures that the parent pipe + handles are inherited by the children. If a parent pipe handle + is invalid a handle to an empty pipe is given to the child to + make sure all pipes are defined for the children. + +2005-12-20 09:20 andy + + * Source/CMakeLists.txt: ENH: Start working on PackageMaker + +2005-12-20 01:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-19 18:17 andy + + * Source/CPack/: cmCPackGenerators.cxx, + cmCPackGenericGenerator.cxx, cmCPackGenericGenerator.h, + cmCPackPackageMakerGenerator.cxx, cmCPackPackageMakerGenerator.h: + ENH: Start working on Osx + +2005-12-19 11:29 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, + CTest/cmCTestBuildAndTestHandler.cxx: BUG: fix for bug 2560, + Xcode does not create correct bundles + +2005-12-19 01:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-18 10:00 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cmCPackNSISGenerator.cxx, + cmCPackNSISGenerator.h, cpack.cxx: ENH: 'Finish; NSI + +2005-12-18 09:59 andy + + * Modules/NSIS.template.in: ENH: Unify with Ken's + +2005-12-18 01:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-17 01:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-16 16:49 hoffman + + * Source/cmDocumentation.cxx: ENH: make sure uncommented modules + are not documented + +2005-12-16 09:03 andy + + * Source/kwsys/SystemTools.cxx: BUG: Return if the file is in any + directory not just in first one + +2005-12-16 01:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-15 16:28 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Fix test + +2005-12-15 14:17 martink + + * Modules/: FindMFC.cmake, FindMPEG.cmake, FindMPEG2.cmake, + FindMPI.cmake, FindMotif.cmake, FindOpenGL.cmake, FindPHP4.cmake, + FindPerl.cmake, FindPerlLibs.cmake, FindPhysFS.cmake, + FindPike.cmake, FindPythonInterp.cmake, FindPythonLibs.cmake, + FindQt.cmake, FindQt4.cmake, FindRuby.cmake, FindSDL.cmake, + FindSDL_image.cmake, FindSDL_mixer.cmake, FindSDL_net.cmake, + FindSDL_sound.cmake, FindSDL_ttf.cmake, FindTCL.cmake, + FindTIFF.cmake, FindTclsh.cmake, FindThreads.cmake, + FindVTK.cmake, FindWget.cmake, FindWish.cmake, FindX11.cmake, + FindwxWindows.cmake, TestForANSIStreamHeaders.cmake, + TestForSTDNamespace.cmake, UseSWIG.cmake, Use_wxWindows.cmake: + ENH: cleanups + +2005-12-15 12:01 andy + + * Source/cmInstallTargetsCommand.cxx: ENH: Report an error if the + target does not exists + +2005-12-15 10:41 martink + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, + CMakeExportBuildSettings.cmake, CMakeImportBuildSettings.cmake, + CheckCXXSourceCompiles.cmake, CheckIncludeFile.cmake, + CheckIncludeFileCXX.cmake, CheckIncludeFiles.cmake, + CheckLibraryExists.cmake, CheckSymbolExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake, + FindAVIFile.cmake, FindCABLE.cmake, FindFLTK.cmake, + FindGLUT.cmake, FindGTK.cmake, FindHTMLHelp.cmake, FindITK.cmake, + FindImageMagick.cmake, FindJNI.cmake, FindJPEG.cmake, + FindJava.cmake, FindLATEX.cmake, FindMatlab.cmake: ENH: some + style fixes for the book + +2005-12-15 09:19 hoffman + + * Modules/FindQt3.cmake, Source/cmDocumentation.cxx: ENH: fix + module documenation to handle bad docs and fix qt3 docs + +2005-12-15 01:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-14 13:51 hoffman + + * Modules/CMake.cmake, Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeCommonLanguageInclude.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeExportBuildSettings.cmake, + Modules/CMakeFindFrameworks.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeImportBuildSettings.cmake, + Modules/CMakeJavaInformation.cmake, + Modules/CMakePrintSystemInformation.cmake, + Modules/CMakeRCInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/CMakeTestJavaCompiler.cmake, + Modules/CMakeTestRCCompiler.cmake, + Modules/CMakeVS6BackwardCompatibility.cmake, + Modules/CMakeVS7BackwardCompatibility.cmake, Modules/CTest.cmake, + Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/Dart.cmake, + Modules/Documentation.cmake, Modules/FindAVIFile.cmake, + Modules/FindCABLE.cmake, Modules/FindCurses.cmake, + Modules/FindCygwin.cmake, Modules/FindDCMTK.cmake, + Modules/FindDart.cmake, Modules/FindDoxygen.cmake, + Modules/FindFLTK.cmake, Modules/FindGCCXML.cmake, + Modules/FindGLU.cmake, Modules/FindGLUT.cmake, + Modules/FindGTK.cmake, Modules/FindGnuplot.cmake, + Modules/FindHTMLHelp.cmake, Modules/FindITK.cmake, + Modules/FindImageMagick.cmake, Modules/FindJNI.cmake, + Modules/FindJPEG.cmake, Modules/FindJava.cmake, + Modules/FindKDE.cmake, Modules/FindLATEX.cmake, + Modules/FindMFC.cmake, Modules/FindMPEG.cmake, + Modules/FindMPEG2.cmake, Modules/FindMPI.cmake, + Modules/FindMatlab.cmake, Modules/FindMotif.cmake, + Modules/FindOpenAL.cmake, Modules/FindOpenGL.cmake, + Modules/FindPHP4.cmake, Modules/FindPNG.cmake, + Modules/FindPerl.cmake, Modules/FindPerlLibs.cmake, + Modules/FindPhysFS.cmake, Modules/FindPike.cmake, + Modules/FindPythonInterp.cmake, Modules/FindPythonLibs.cmake, + Modules/FindQt.cmake, Modules/FindQt3.cmake, + Modules/FindQt4.cmake, Modules/FindRuby.cmake, + Modules/FindSDL.cmake, Modules/FindSDL_image.cmake, + Modules/FindSDL_mixer.cmake, Modules/FindSDL_net.cmake, + Modules/FindSDL_sound.cmake, Modules/FindSDL_ttf.cmake, + Modules/FindSWIG.cmake, Modules/FindSelfPackers.cmake, + Modules/FindTCL.cmake, Modules/FindTIFF.cmake, + Modules/FindTclsh.cmake, Modules/FindThreads.cmake, + Modules/FindUnixCommands.cmake, Modules/FindVTK.cmake, + Modules/FindWget.cmake, Modules/FindWish.cmake, + Modules/FindX11.cmake, Modules/FindZLIB.cmake, + Modules/FindwxWindows.cmake, Modules/TestBigEndian.cmake, + Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForANSIStreamHeaders.cmake, + Modules/TestForSTDNamespace.cmake, Modules/UseQt4.cmake, + Modules/UseSWIG.cmake, Modules/UseVTK40.cmake, + Modules/UseVTKBuildSettings40.cmake, + Modules/UseVTKConfig40.cmake, Modules/Use_wxWindows.cmake, + Modules/UsewxWidgets.cmake, Modules/readme.txt, + Source/cmDocumentation.cxx, Source/cmDocumentation.h, + Source/cmakemain.cxx: ENH: add documentation support for modules + +2005-12-14 11:00 king + + * Source/cmGlobalVisualStudio7Generator.h: ENH: Renamed + ZeroTargetCheck target to ZERO_CHECK for consistency with other + CMake-generated targets (ALL_BUILD, RUN_TESTS, INSTALL). + +2005-12-14 10:58 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: Fix conversion + warning. + +2005-12-14 10:47 king + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator3.cxx, + cmMakefile.cxx, cmTarget.cxx, cmTarget.h: ENH: Removed cmMakefile + arguments from cmTarget methods because cmTarget has the ivar + m_Makefile now. Re-implemented + cmLocalUnixMakefileGenerator3::AppendAnyDepend to use the new + global knowledge and avoid the need to look at the cache for + information about other targets. This should fix problems with + custom commands and executables with the OUTPUT_NAME set. Also + the _LIBRARY_TYPE cache variable is no longer needed at + all and has been removed. + +2005-12-13 18:23 king + + * Source/cmGlobalVisualStudio8Generator.cxx: COMP: Fixed unused + variable warning. + +2005-12-13 15:16 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: BUG: Fix the problem with + update.xml.tmp not being coppied + +2005-12-13 15:14 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: removed + TARGET_DIR_PREFIX support and someother fix + +2005-12-13 15:13 martink + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: removed + TARGET_DIR_PREFIX support + +2005-12-13 15:12 martink + + * Source/cmTryRunCommand.h: STYLE: fix missing docs + +2005-12-13 14:21 king + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmGlobalVisualStudio8Generator.h, + cmLocalVisualStudio7Generator.cxx: ENH: Added support for + parallel builds in VS 8. There is now a special target on which + all other targets depend that re-runs CMake if any listfiles have + been changed. This addresses bug#2512. + +2005-12-13 14:14 king + + * Source/MFCDialog/: CMakeCommandLineInfo.cpp, CMakeSetup.cpp: BUG: + Fix storage/use of argc/argv in CMakeSetup dialog. + +2005-12-13 14:07 martink + + * Utilities/Release/CMake.nsi.in: ENH: removed the add to path + +2005-12-13 04:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-12 11:34 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix for bug 2584, + empty source groups with children skipped + +2005-12-12 04:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-11 04:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-11 00:12 andy + + * Source/kwsys/SystemTools.cxx: COMP: for a in range(100): + write_on_board(No std in kwsys...) + +2005-12-10 12:16 andy + + * Modules/NSIS.template.in: ENH: Some fixes to make it work + +2005-12-10 12:14 andy + + * Source/CPack/: cmCPackGenericGenerator.cxx, + cmCPackGenericGenerator.h, cmCPackNSISGenerator.cxx, cpack.cxx: + ENH: More work on NSIS: + +2005-12-10 12:11 andy + + * Source/cmLocalGenerator.cxx: ENH: Allow the installer to + overwrite the install prefix + +2005-12-10 12:10 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Add a method to remove + remaining arguments + +2005-12-10 12:09 andy + + * Source/kwsys/Glob.hxx.in: COMP: Fix the exporting so that it can + actually be used + +2005-12-10 12:08 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + another signature to FindProgram that matches more to the one + from CMake + +2005-12-10 04:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-09 23:04 hoffman + + * Source/: cmDependsC.cxx, cmDependsC.h: ENH: try to fix hp build + problem + +2005-12-09 16:32 andy + + * Source/cmDependsC.h: ENH: fix compile error + +2005-12-09 14:30 hoffman + + * Source/: cmDependsC.cxx, cmDependsC.h: ENH: clean up style a bit + +2005-12-09 13:58 hoffman + + * Source/: cmDependsC.cxx, cmDependsC.h, + cmLocalUnixMakefileGenerator3.cxx: PERF: apply patch for bug 2575 + speeds up depend scanning + +2005-12-09 04:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-08 04:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-07 11:39 andy + + * Source/: cmBuildNameCommand.h, cmFindPackageCommand.h, + cmGetCMakePropertyCommand.h, cmGetDirectoryPropertyCommand.h, + cmSetDirectoryPropertiesCommand.h, cmSiteNameCommand.h: ENH: Make + commands scriptable + +2005-12-06 10:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-05 08:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-04 05:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-03 06:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-02 09:18 hoffman + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2005-12-02 09:16 hoffman + + * ChangeLog.manual, Utilities/Release/config_IRIX64, + Utilities/Release/release_dispatch.sh: ENH: fix change log and + change sgi release scripts + +2005-12-02 05:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-12-01 21:52 andy + + * Modules/NSIS.template.in, Source/CPack/cmCPackNSISGenerator.cxx, + Source/CPack/cmCPackNSISGenerator.h: ENH: Work on nsis + +2005-12-01 12:27 hoffman + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2005-12-01 11:41 andy + + * Source/: cmBuildCommand.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, CTest/cmCTestBuildCommand.cxx: ENH: Add + a way for the generated command to include extra flags. This is + useful for CTest (or try compile) to add -j2 + +2005-12-01 05:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-30 13:46 andy + + * Source/cmMakefile.cxx: ENH: Add variable for debugging. This + variable CMAKE_PARENT_LIST_FILE holds the parent CMake list file + of the current cmake list file. + +2005-11-30 05:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-29 05:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-28 15:57 hoffman + + * Source/CMakeLists.txt, Tests/Tutorial/Step1/CMakeLists.txt, + Tests/Tutorial/Step1/TutorialConfig.h.in, + Tests/Tutorial/Step1/tutorial.cxx, + Tests/Tutorial/Step2/CMakeLists.txt, + Tests/Tutorial/Step2/TutorialConfig.h.in, + Tests/Tutorial/Step2/tutorial.cxx, + Tests/Tutorial/Step2/MathFunctions/CMakeLists.txt, + Tests/Tutorial/Step2/MathFunctions/MathFunctions.h, + Tests/Tutorial/Step2/MathFunctions/mysqrt.cxx, + Tests/Tutorial/Step3/CMakeLists.txt, + Tests/Tutorial/Step3/TutorialConfig.h.in, + Tests/Tutorial/Step3/tutorial.cxx, + Tests/Tutorial/Step3/MathFunctions/CMakeLists.txt, + Tests/Tutorial/Step3/MathFunctions/MathFunctions.h, + Tests/Tutorial/Step3/MathFunctions/mysqrt.cxx, + Tests/Tutorial/Step4/CMakeLists.txt, + Tests/Tutorial/Step4/TutorialConfig.h.in, + Tests/Tutorial/Step4/tutorial.cxx, + Tests/Tutorial/Step4/MathFunctions/CMakeLists.txt, + Tests/Tutorial/Step4/MathFunctions/MathFunctions.h, + Tests/Tutorial/Step4/MathFunctions/mysqrt.cxx, + Tests/Tutorial/Step5/CMakeLists.txt, + Tests/Tutorial/Step5/TutorialConfig.h.in, + Tests/Tutorial/Step5/tutorial.cxx, + Tests/Tutorial/Step5/MathFunctions/CMakeLists.txt, + Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx, + Tests/Tutorial/Step5/MathFunctions/MathFunctions.h, + Tests/Tutorial/Step5/MathFunctions/mysqrt.cxx: ENH: move tutorial + to branch + +2005-11-28 15:15 hoffman + + * CMakeLists.txt, Source/cmDependsFortranLexer.cxx, + Source/cmDependsFortranLexer.in.l: ENH: Version 2.2.3 + +2005-11-28 14:19 hoffman + + * Modules/VTKCompatibility.cmake: ENH: fix problem with building + vtk 4.4.2 + +2005-11-28 14:05 hoffman + + * Modules/VTKCompatibility.cmake: ENH: fix for vtk 4.4.2 and cmake + 2.2 + +2005-11-28 05:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-27 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-26 05:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-25 05:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-24 05:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-23 12:33 hoffman + + * ChangeLog.manual, Modules/CMakeCCompiler.cmake.in, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestJavaCompiler.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, + Modules/CheckVariableExists.cmake, Modules/FindOpenAL.cmake, + Modules/FindPhysFS.cmake, Modules/FindQt3.cmake, + Modules/FindSDL.cmake, Modules/FindSDL.cmake.bak, + Modules/FindSDL_image.cmake, Modules/FindSDL_image.cmake.bak, + Modules/FindSDL_mixer.cmake, Modules/FindSDL_mixer.cmake.bak, + Modules/FindSDL_net.cmake, Modules/FindSDL_net.cmake.bak, + Modules/FindSDL_sound.cmake, Modules/FindSDL_ttf.cmake, + Modules/FindSDL_ttf.cmake.bak, Modules/Platform/SunOS.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-icl.cmake, + Modules/Platform/Windows-ifort.cmake, + Source/cmAddLibraryCommand.h, Source/cmAddSubDirectoryCommand.h, + Source/cmCMakeMinimumRequired.h, Source/cmCPluginAPI.h, + Source/cmCTest.cxx, Source/cmConfigureFileCommand.h, + Source/cmCreateTestSourceList.h, Source/cmElseCommand.h, + Source/cmEnableLanguageCommand.h, + Source/cmEnableTestingCommand.h, Source/cmEndForEachCommand.h, + Source/cmEndIfCommand.h, Source/cmEndWhileCommand.h, + Source/cmExecProgramCommand.h, Source/cmFLTKWrapUICommand.h, + Source/cmFileCommand.h, Source/cmForEachCommand.h, + Source/cmGetCMakePropertyCommand.h, + Source/cmGetDirectoryPropertyCommand.h, + Source/cmGetSourceFilePropertyCommand.h, + Source/cmGetTargetPropertyCommand.h, + Source/cmGetTestPropertyCommand.h, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmIncludeCommand.h, + Source/cmInstallFilesCommand.h, Source/cmInstallTargetsCommand.h, + Source/cmLoadCacheCommand.h, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmMacroCommand.h, Source/cmMakefile.cxx, + Source/cmMarkAsAdvancedCommand.h, Source/cmMessageCommand.h, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmQTWrapCPPCommand.h, + Source/cmQTWrapUICommand.h, Source/cmSetCommand.h, + Source/cmSetSourceFilesPropertiesCommand.h, + Source/cmSetTargetPropertiesCommand.h, + Source/cmSetTestsPropertiesCommand.h, Source/cmSourceFile.cxx, + Source/cmSourceGroupCommand.h, Source/cmSubdirCommand.h, + Source/cmSystemTools.cxx, Source/cmTarget.cxx, + Source/cmTryCompileCommand.h, Source/cmTryRunCommand.h, + Source/cmVariableRequiresCommand.h, Source/cmWhileCommand.h, + Source/cmWriteFileCommand.h, Source/cmXCode21Object.cxx, + Source/cmXCodeObject.cxx, Source/cmXCodeObject.h, + Source/ctest.cxx, Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestScriptHandler.h, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, Source/kwsys/ProcessUNIX.c, + Source/kwsys/ProcessWin32.c, Source/kwsys/SystemTools.cxx, + Tests/ExternalOBJ/CMakeLists.txt, Tests/Wrapping/CMakeLists.txt, + Utilities/Release/CMake.nsi.in: ENH: merge fixes from main tree, + see ChangeLog.manual + +2005-11-23 10:27 hoffman + + * Source/cmTarget.cxx: ENH: executable prefix and post fix + variables should not be the same as the executable extension + +2005-11-23 05:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-22 17:03 king + + * Source/: cmMakefile.cxx, cmTarget.cxx: BUG: Do not expand escape + sequences when re-expanding variables in include directories, + link directories, and link libraries. + +2005-11-22 16:59 king + + * Source/cmOrderLinkDirectories.cxx: BUG: Do not accept a directory + name as a library. + +2005-11-22 16:08 hoffman + + * Source/: cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h: + BUG: fix for bug 2357, do not allow targets to link to + directories + +2005-11-22 15:15 hoffman + + * Source/CTest/cmCTestScriptHandler.h: BUG: fix spelling error + +2005-11-22 13:37 king + + * Source/: cmGlobalVisualStudio7Generator.h, + cmGlobalVisualStudio8Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Tweak VS8 generator to + keep VS8 happy. The .vcproj files need their own GUIDs in a + ProjectGUID attribute. The top level .sln file needs a special + comment at the top to allow it to be opened with double-click in + explorer. + +2005-11-22 13:36 king + + * CMakeLists.txt: COMP: Define _CRT_SECURE_NO_DEPRECATE to build + CMake itself on VS8. This disables 1000s of deprecation warnings + about standard code. + +2005-11-22 12:04 hoffman + + * Modules/Platform/Windows-cl.cmake: BUG: fix for bug 2488 + +2005-11-22 11:44 hoffman + + * Modules/Platform/: Linux-icpc.cmake, SunOS.cmake: ENH: more + compiler flags + +2005-11-22 11:35 king + + * Source/cmSetTargetPropertiesCommand.h: STYLE: Fixed documentation + to state target_EXPORTS default right after DEFINE_SYMBOL + documentation instead of many sentences later in a random place. + +2005-11-22 11:33 king + + * Modules/FindQt3.cmake: BUG: QT_DEFINITIONS should not be quoted. + This addresses bug#2481. + +2005-11-22 11:28 hoffman + + * Modules/CMakeTestJavaCompiler.cmake: ENH: set java compiler works + +2005-11-22 05:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-21 05:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-20 05:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-19 09:40 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmSetTargetPropertiesCommand.h: ENH: add some more properties for + visual studio projects + +2005-11-19 08:29 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: COMP: fix compile error + +2005-11-19 08:04 hoffman + + * Source/cmTryRunCommand.h: ENH: fix docs + +2005-11-19 05:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-18 17:07 andy + + * Source/CPack/: cmCPackGenerators.cxx, + cmCPackGenericGenerator.cxx, cmCPackGenericGenerator.h, + cmCPackTGZGenerator.cxx, cpack.cxx: ENH: Use cmMakefile instead + for the options, more cleanups and start working on NSIS + +2005-11-18 17:07 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + another signature for FindProgram that takes the list of names + +2005-11-18 17:06 andy + + * Source/CMakeLists.txt: ENH: Add NSIS + +2005-11-18 16:59 hoffman + + * Source/cmXCodeObject.cxx: ENH: more chars need quotes + +2005-11-18 15:03 martink + + * Utilities/Release/CMake.nsi.in: BUG: fixe dproblem with not + uninstalling start menu entries + +2005-11-18 14:12 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: fixes for Xcode 2.2 + +2005-11-18 10:40 hoffman + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: add new error regex + +2005-11-18 10:36 king + + * Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-icl.cmake, + Modules/Platform/Windows-ifort.cmake, + Source/cmLocalVisualStudio7Generator.cxx: BUG: Fixed + flag-to-vcproj-attribute conversion code to work again (it was + broken by the optimization changes). Added conversion of /nologo + flag to SuppressStartupBanner attribute and /Gy flag to + EnableFunctionLevelLinking attribute. + +2005-11-17 16:49 king + + * Tests/Wrapping/CMakeLists.txt: COMP: Need target-level dependency + from wrapper targets on Wrap executable target. + +2005-11-17 15:57 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Fixed XML escapes + for custom commands. Also added escaping of newlines for VS + 2005. + +2005-11-17 15:44 king + + * Source/: cmCTest.cxx, cmSystemTools.cxx: BUG: Do not dereference + an end iterator. + +2005-11-17 13:49 king + + * Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmSourceFile.cxx, Tests/ExternalOBJ/CMakeLists.txt: BUG: + Fixed support for external object files built by custom commands. + Also added a test to keep it working. + +2005-11-17 11:44 martink + + * Source/: cmVariableRequiresCommand.h, cmWhileCommand.h, + cmWriteFileCommand.h: STYLE: fix docs + +2005-11-17 11:37 martink + + * Source/: cmTryCompileCommand.h, cmTryRunCommand.h: STYLE: fix + docs + +2005-11-17 11:20 martink + + * Source/cmSubdirCommand.h: STYLE: fix docs + +2005-11-17 11:04 martink + + * Source/cmSourceGroupCommand.h: STYLE: fix docs + +2005-11-17 10:41 martink + + * Source/cmSetTargetPropertiesCommand.h: STYLE: fix docs + +2005-11-17 10:36 martink + + * Source/cmSetSourceFilesPropertiesCommand.h: STYLE: fix docs + +2005-11-17 10:28 martink + + * Source/: cmQTWrapUICommand.h, cmSetCommand.h: STYLE: fix docs + +2005-11-17 10:20 martink + + * Source/: cmMessageCommand.h, cmQTWrapCPPCommand.h: STYLE: fix + docs + +2005-11-17 09:44 martink + + * Source/cmIfCommand.cxx: BUG: clean up scoping + +2005-11-17 09:32 martink + + * Source/: cmIfCommand.cxx: BUG: fix incrementing past end + +2005-11-17 09:31 martink + + * Source/cmMarkAsAdvancedCommand.h: STYLE: fix docs + +2005-11-17 05:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-16 14:41 martink + + * Source/cmMacroCommand.h: STYLE: fix docs + +2005-11-16 14:36 martink + + * Source/: cmInstallTargetsCommand.h, cmLoadCacheCommand.h: STYLE: + fix docs + +2005-11-16 14:27 martink + + * Source/cmInstallFilesCommand.h: STYLE: fix docs + +2005-11-16 14:08 martink + + * Source/: cmIfCommand.h, cmIncludeCommand.h: STYLE: fix docs + +2005-11-16 14:02 martink + + * Source/cmGetTestPropertyCommand.h: STYLE: fix docs + +2005-11-16 13:13 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCode21Object.cxx, + cmXCodeObject.cxx, cmXCodeObject.h: ENH: fixes for xcode21 and + build styles and comments in the generated project + +2005-11-16 12:08 martink + + * Source/: cmGetSourceFilePropertyCommand.h, + cmGetTargetPropertyCommand.h: STYLE: fix docs + +2005-11-16 12:05 martink + + * Source/cmGetDirectoryPropertyCommand.h: STYLE: fix docs + +2005-11-16 12:00 martink + + * Source/: cmForEachCommand.h, cmGetCMakePropertyCommand.h: STYLE: + fix docs + +2005-11-16 11:57 martink + + * Source/cmFLTKWrapUICommand.h: STYLE: fix docs + +2005-11-16 11:39 king + + * Source/kwsys/ProcessUNIX.c: STYLE: Documented reference to "man + select_tut". + +2005-11-16 11:36 king + + * Source/kwsys/ProcessWin32.c: BUG: Do not close handle obtained + from GetModuleHandle which does not increase the reference count + of the module. + +2005-11-16 11:25 martink + + * Source/cmFileCommand.h: STYLE: fix docs + +2005-11-16 10:40 martink + + * Source/cmExecProgramCommand.h: STYLE: fix docs + +2005-11-16 10:35 martink + + * Source/: cmEnableTestingCommand.h, cmEndForEachCommand.h, + cmEndIfCommand.h, cmEndWhileCommand.h: STYLE: fix docs + +2005-11-16 10:31 martink + + * Source/: cmCreateTestSourceList.h, cmElseCommand.h, + cmEnableLanguageCommand.h: STYLE: fix docs + +2005-11-16 10:26 martink + + * Source/: cmConfigureFileCommand.h: STYLE: fix docs + +2005-11-16 10:22 martink + + * Source/cmCMakeMinimumRequired.h: STYLE: fix docs + +2005-11-16 10:14 martink + + * Source/: cmAddLibraryCommand.h, cmAddSubDirectoryCommand.h: + STYLE: fix docs + +2005-11-16 10:08 martink + + * Source/ctest.cxx: STYLE: removed some docs that did not make + sense + +2005-11-16 06:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-15 13:30 martink + + * Source/cmConfigureFileCommand.h: STYLE: updated comments + +2005-11-15 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-14 14:21 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeTestCCompiler.cmake: BUG: + fix SIZEOF VOIDP problem + +2005-11-14 12:29 andy + + * Source/: CMakeLists.txt, cmConfigure.cmake.h.in, + CPack/cmCPackConfigure.h.in, CPack/cmCPackTGZGenerator.cxx, + CPack/cmCPackTGZGenerator.h: ENH: More cross platform stuff + +2005-11-14 05:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-13 05:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-12 05:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-11 14:39 andy + + * Source/CPack/cmCPackSTGZGenerator.cxx: ENH: Cleanup + +2005-11-11 14:32 andy + + * Source/CPack/cmCPackSTGZGenerator.cxx: ENH: Fix for sun + +2005-11-11 14:25 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackGenericGenerator.h, CPack/cmCPackSTGZGenerator.cxx, + CPack/cmCPackSTGZGenerator.h, CPack/cmCPackTGZGenerator.cxx, + CPack/cmCPackTGZGenerator.h: ENH: Add support for self extracted + tars + +2005-11-11 05:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-10 15:15 andy + + * Source/: CMakeLists.txt, cmConfigure.cmake.h.in, + CPack/cmCPackTGZGenerator.h: COMP: Fix building on Cygwin + +2005-11-10 15:13 martink + + * Tests/Tutorial/Step5/MathFunctions/CMakeLists.txt: ENH: some + fixes + +2005-11-10 15:10 martink + + * Tests/Tutorial/: Step1/tutorial.cxx, Step2/tutorial.cxx, + Step3/tutorial.cxx, Step4/tutorial.cxx, Step5/tutorial.cxx: ENH: + some fixes + +2005-11-10 14:36 andy + + * Source/: CMakeLists.txt, CPack/cmCPackGenerators.cxx, + CPack/cmCPackGenerators.h, CPack/cmCPackGenericGenerator.cxx, + CPack/cmCPackGenericGenerator.h, CPack/cmCPackTGZGenerator.cxx, + CPack/cmCPackTGZGenerator.h, CPack/cpack.cxx: ENH: Start working + on CPack + +2005-11-10 14:33 andy + + * Source/cmLocalGenerator.cxx: ENH: Make CMAKE_INSTALL_PREFIX to be + optional (on by default) + +2005-11-10 14:32 andy + + * Source/CTest/cmCTestGenericHandler.h: ENH: More type macros + +2005-11-10 14:32 andy + + * Source/kwsys/Glob.hxx.in: COMP: Fix the building with Glob + +2005-11-10 14:31 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Add method to delete the + remaining arguments + +2005-11-10 14:28 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: add all libs + +2005-11-10 12:02 martink + + * Tests/Tutorial/: Step5/CMakeLists.txt, Step2/CMakeLists.txt, + Step3/CMakeLists.txt, Step4/CMakeLists.txt, + Step5/MathFunctions/CMakeLists.txt: ENH: some fixes + +2005-11-10 11:48 martink + + * Tests/Tutorial/Step5/MathFunctions/MakeTable.cxx: STYLE: fix + spelling + +2005-11-10 10:55 martink + + * Source/CMakeLists.txt: ENH: added tutorial tests + +2005-11-10 10:55 martink + + * Source/CTest/cmCTestTestHandler.cxx: ENH: change the pass regexp + so that it overrides the return value + +2005-11-10 10:51 martink + + * Tests/Tutorial/Step5/: CMakeLists.txt, TutorialConfig.h.in, + tutorial.cxx, MathFunctions/CMakeLists.txt, + MathFunctions/MakeTable.cxx, MathFunctions/MathFunctions.h, + MathFunctions/mysqrt.cxx: ENH: step 5 + +2005-11-10 10:50 martink + + * Tests/Tutorial/Step4/: CMakeLists.txt, TutorialConfig.h.in, + tutorial.cxx, MathFunctions/CMakeLists.txt, + MathFunctions/MathFunctions.h, MathFunctions/mysqrt.cxx: ENH: + step 4 + +2005-11-10 10:50 martink + + * Tests/Tutorial/Step3/: CMakeLists.txt, TutorialConfig.h.in, + tutorial.cxx, MathFunctions/CMakeLists.txt, + MathFunctions/MathFunctions.h, MathFunctions/mysqrt.cxx: ENH: + step 3 + +2005-11-10 04:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-09 16:21 martink + + * Tests/Tutorial/: Step1/CMakeLists.txt, Step1/TutorialConfig.h.in, + Step1/tutorial.cxx, Step2/CMakeLists.txt, + Step2/TutorialConfig.h.in, Step2/tutorial.cxx, + Step2/MathFunctions/CMakeLists.txt, + Step2/MathFunctions/MathFunctions.h, + Step2/MathFunctions/mysqrt.cxx: ENH: checkeed in step 1 and 2 + +2005-11-09 11:14 andy + + * Source/cmSetTestsPropertiesCommand.h: STYLE: More comments + +2005-11-09 11:07 andy + + * Source/: cmSetTestsPropertiesCommand.h, + CTest/cmCTestTestHandler.cxx, kwsys/CMakeLists.txt: ENH: Change + flag to PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION and + add help in cmSetTestsPropertiesCommand + +2005-11-09 07:22 andy + + * Source/kwsys/CMakeLists.txt: COMP: Fix all dashboards + +2005-11-09 05:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-08 17:59 andy + + * Source/kwsys/: CMakeLists.txt, testRegistry.cxx: ENH: Add test + for output regular expression + +2005-11-08 17:59 andy + + * Source/: cmLocalGenerator.cxx, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h: ENH: Add support for output reguilar + expression + +2005-11-08 05:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-07 05:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-06 05:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-05 04:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-04 10:52 martink + + * Source/cmCPluginAPI.h: DOC: updated comment about the inherited + ivar + +2005-11-04 09:28 andy + + * Modules/: CheckIncludeFile.cmake, CheckIncludeFileCXX.cmake: ENH: + Cleanup and unify + +2005-11-03 04:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-11-02 13:59 martink + + * Modules/CheckLibraryExists.cmake: DOC: better documentation + +2005-11-02 13:51 martink + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckIncludeFileCXX.cmake, CheckIncludeFiles.cmake, + CheckLibraryExists.cmake, CheckSymbolExists.cmake, + CheckVariableExists.cmake: DOC: better documentaiton + +2005-11-02 04:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-31 12:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-31 10:52 hoffman + + * Utilities/Release/release_dispatch.sh: ENH: change names of + machine + +2005-10-31 10:48 hoffman + + * Utilities/Release/: cmake_release.sh: ENH: update revision + numbers + +2005-10-31 10:01 hoffman + + * ChangeLog.manual, Source/cmFileTimeComparison.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, Source/cmake.cxx: ENH: + merge from main tree + +2005-10-30 08:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-28 17:46 hoffman + + * Modules/: FindOpenAL.cmake, FindPhysFS.cmake, FindSDL.cmake, + FindSDL_image.cmake, FindSDL_mixer.cmake, FindSDL_net.cmake, + FindSDL_sound.cmake, FindSDL_ttf.cmake: ENH: changes from Eric + Wing, bug 2249 + +2005-10-28 11:52 hoffman + + * Source/cmWin32ProcessExecution.cxx: BUG: fix stack over write bug + +2005-10-28 11:51 hoffman + + * Utilities/Release/: CMake.nsi.in, MakeRelease.cmake.in: BUG: fix + space in path probs + +2005-10-28 11:32 hoffman + + * Utilities/Release/: CMake.nsi.in, MakeRelease.cmake.in: BUG: fix + release with spaces in the path + +2005-10-28 11:31 hoffman + + * Source/cmWin32ProcessExecution.cxx: BUG: fix stack write error + +2005-10-28 11:02 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: make the clean + target work + +2005-10-27 13:57 king + + * Source/: cmFileTimeComparison.cxx, kwsys/SystemTools.cxx: ENH: + Improved file modification time comparison on Windows to use + GetFileAttributesEx instead of CreateFile/GetFileTime/CloseHandle + to get file times. This results in a 30% reduction in time to do + a build system check. + +2005-10-26 09:03 hoffman + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2005-10-26 05:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-25 05:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-24 17:00 hoffman + + * ChangeLog.manual: [no log message] + +2005-10-24 15:43 hoffman + + * CMakeLists.txt, Modules/Platform/Windows-gcc.cmake, + Source/cmBuildNameCommand.h, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalKdevelopGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmOutputRequiredFilesCommand.cxx, + Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestUpdateHandler.cxx, + Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/StringFile.cxx: ENH: move stuff into the + branch in prep for 2.2.2 + +2005-10-24 05:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-23 05:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-22 05:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-21 15:24 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix for bad + placement of SILENT target + +2005-10-21 12:04 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: symlink issue + +2005-10-21 11:10 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix bad checkin + that had debugging code in it + +2005-10-21 09:49 hoffman + + * Source/kwsys/testFail.c: ENH: try to get this thing to pass with + cmake 2.2.1 + +2005-10-21 04:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-20 16:37 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix over checking + of build system + +2005-10-20 16:37 martink + + * Source/cmake.cxx: STYLE: minor cleanup + +2005-10-20 15:03 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix for def files + and new local target link lines + +2005-10-20 14:25 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: missing + check_build_system for all target + +2005-10-20 13:40 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: big cleanup and fix for + jump commands + +2005-10-20 10:10 hoffman + + * Source/: cmStringCommand.cxx, cmStringCommand.h: BUG: end is not + really end, but rather length + +2005-10-20 04:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-19 13:23 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: fix compiler + error + +2005-10-19 11:00 andy + + * Source/: cmCTest.cxx, CTest/cmCTestUpdateHandler.cxx: ENH: More + output + +2005-10-19 11:00 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Initialize to something + resonable + +2005-10-19 10:47 andy + + * Source/kwsys/: Glob.cxx, Glob.hxx.in: COMP: More namespace fixes + to build on HP + +2005-10-19 10:03 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: cd into local directory to + reduce link line length + +2005-10-19 08:42 andy + + * Source/kwsys/Glob.cxx: COMP: Fix namespace. This way kwsys can be + built outside cmake + +2005-10-19 04:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-18 16:35 hoffman + + * Source/cmOutputRequiredFilesCommand.cxx: ENH: fix test + +2005-10-18 16:10 hoffman + + * Source/cmOutputRequiredFilesCommand.cxx: ENH: add .txx files and + put the start directory in the search path + +2005-10-18 16:09 hoffman + + * Source/cmLocalKdevelopGenerator.cxx: ENH: unused include + +2005-10-18 16:09 hoffman + + * Source/cmBuildNameCommand.h: ENH: spelling + +2005-10-18 14:08 andy + + * bootstrap, Source/kwsys/CMakeLists.txt, Source/kwsys/Glob.cxx, + Source/kwsys/Glob.hxx.in: ENH: Push glob to the kwsys + +2005-10-18 13:25 andy + + * Modules/Platform/Windows-gcc.cmake: COMP: On mingw, -fPIC is not + necessary and it actually produces warnings + +2005-10-18 13:22 andy + + * Tests/MathTest/CMakeLists.txt: ENH: More tests + +2005-10-18 09:42 andy + + * Source/cmStringCommand.cxx: COMP: Remove warning + +2005-10-18 04:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-17 21:34 hoffman + + * Source/: cmFileTimeComparison.cxx, cmFileTimeComparison.h: add + missing file + +2005-10-17 16:53 andy + + * Source/: cmExprParser.cxx, cmExprParser.y: ENH: Fix precedence + +2005-10-17 16:42 andy + + * Source/: CMakeLists.txt, cmCommands.cxx, cmExprLexer.cxx, + cmExprLexer.h, cmExprLexer.in.l, cmExprParser.cxx, + cmExprParser.y, cmExprParserHelper.cxx, cmExprParserHelper.h, + cmExprParserTokens.h, cmMathCommand.cxx, cmMathCommand.h, + cmStringCommand.cxx: ENH: Add rudamentary mathematical expression + support + +2005-10-17 16:39 andy + + * Tests/MathTest/: CMakeLists.txt, MathTestExec.cxx, + MathTestTests.h.in: ENH: Add math test + +2005-10-17 09:58 king + + * Source/: cmDependsFortranLexer.cxx, cmDependsFortranLexer.in.l: + BUG: Lexer should be case insensitive so flex should be run with + -i option. This partially addresses bug#2361. + +2005-10-17 09:56 andy + + * Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/StringFile.cxx: ENH: Add String length and + substring + +2005-10-17 09:10 andy + + * Source/cmFileCommand.cxx, Source/cmFileCommand.h, + Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/StringFile.cxx: ENH: Add regular string + replace (not regex), and relative path command. Also add tests + +2005-10-17 09:09 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: If test passes but it + should fail, report an error + +2005-10-17 08:49 hoffman + + * ChangeLog.manual, bootstrap, Modules/CMakeCXXInformation.cmake, + Modules/FindJNI.cmake, Modules/FindJava.cmake, + Source/CMakeLists.txt, Source/cmDepends.cxx, Source/cmDepends.h, + Source/cmDependsC.cxx, Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmLocalUnixMakefileGenerator3.cxx, Source/cmMakefile.cxx, + Source/cmTarget.h, Source/cmake.cxx, Source/cmake.h, + Source/CTest/cmCTestBuildHandler.cxx: ENH: merge fixes from main + tree + +2005-10-17 04:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-16 04:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-15 04:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-14 05:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-13 10:30 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More error exceptions + +2005-10-13 10:07 andy + + * Source/: cmDepends.cxx, cmFileTimeComparison.cxx: BUG: Fix logic + to return true when the file was already statted. Also, use + nanosecond percision if available. Remove debug + +2005-10-13 05:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-12 13:52 andy + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmDependsC.h, cmDependsFortran.cxx, cmDependsFortran.h, + cmDependsJava.cxx, cmDependsJava.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Improve performance of + check build system by creating another file that is simpler to + parse and therefore much faster overall + +2005-10-12 13:51 andy + + * Source/: cmake.cxx, cmake.h: ENH: Optimize performance by caching + stat results + +2005-10-12 13:50 andy + + * Source/cmFileTimeComparison.cxx: COMP: Windows fixes + +2005-10-12 13:36 andy + + * bootstrap, Source/CMakeLists.txt, + Source/cmFileTimeComparison.cxx, Source/cmFileTimeComparison.h: + ENH: Add file time comparison code + +2005-10-12 12:08 andy + + * Source/kwsys/: SystemTools.hxx.in, SystemTools.cxx: ENH: Add an + accessor for the maximum file length + +2005-10-12 05:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-11 05:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-10 11:49 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, cmMakefile.cxx, cmTarget.h: + ENH: some fixes for better backwards compatibility + +2005-10-10 05:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-09 05:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-08 05:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-07 11:36 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Add support for + setting the maximum number of errors and warnings reported. This + should fix Bug #2318 - The maximum number of errors to report is + fixed to 50 + +2005-10-07 05:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-06 17:16 barre + + * Source/kwsys/: CMakeLists.txt, testSystemTools.bin, + testSystemTools.cxx, testSystemTools.h.in: ENH: CMake kills me + (so does Cygwin) + +2005-10-06 15:28 hoffman + + * ChangeLog.manual, Source/cmGetSourceFilePropertyCommand.h, + Source/cmGetTargetPropertyCommand.h, + Source/cmGetTestPropertyCommand.cxx, Source/cmListFileLexer.c, + Source/cmListFileLexer.in.l, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmake.cxx, + Source/cmake.h, Source/cmakemain.cxx, + Source/CTest/cmCTestTestCommand.cxx, + Source/CTest/cmCTestTestCommand.h, + Source/CTest/cmCTestTestHandler.cxx, + Utilities/Release/Release.cmake: ENH: merge bug fixes from main + trunk + +2005-10-06 15:10 martink + + * Utilities/Release/Release.cmake: ENH: some fixes for missing vars + and missing libs + +2005-10-06 05:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-05 16:06 barre + + * Source/kwsys/: CMakeLists.txt, testSystemTools.cxx, + testSystemTools.h.in: ENH: avoid the use of GET_TARGET_PROPERTY + by testing the CMake executable instead of the test executable + +2005-10-05 13:11 king + + * Source/kwsys/CMakeLists.txt: BUG: Reverting fundamental type info + change until it is fixed on more platforms. It was tested on + Linux, SGI, HP, Sun, OSX, Windows with nmake and VS 6, 7, 7.1, 8, + Borland Make, and cygwin by hand with spaces in the path and + cmake 2.0 and 2.2 before committing but still seems to be failing + on some dashboards...strange. + +2005-10-05 05:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-04 16:40 barre + + * Source/: cmBootstrapCommands.cxx, cmCommands.cxx: ENH: the test + for kwsys uses GET_TARGET_PROPERTY, which was not in the CMake + bootstrap + +2005-10-04 15:09 barre + + * Source/kwsys/: CMakeLists.txt, testSystemTools.cxx, + testSystemTools.h.in: ENH: add kwsys test for DetectFileType + +2005-10-04 10:58 andy + + * Source/: cmCTest.cxx, CTest/cmCTestSubmitHandler.cxx: ENH: More + verbosity + +2005-10-04 05:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-03 14:44 king + + * Source/kwsys/: CMakeLists.txt, kwsysPlatformCxxTests.cxx: ENH: + Converting FundamentalType try-compiles into a single try-run. + All the information about the existence, size, and signedness of + types can be determined in one program thanks to limits.h. + +2005-10-03 14:33 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Double-quotes in + definitions must be escaped. + +2005-10-03 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-02 05:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-10-01 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-29 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-28 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-27 04:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-26 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-24 04:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-23 17:47 hoffman + + * Source/FLTKDialog/: CMakeSetupGUI.fl, + CMakeSetupGUIImplementation.cxx, CMakeSetupGUIImplementation.h, + FLTKDialog.cxx, FLTKDialog.dsp, FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h, FLTKPropertyList.cxx, FLTKPropertyList.h, + CMakeLists.txt: ENH: try to find a gui for the Mac + +2005-09-23 14:39 hoffman + + * Modules/CMakeCXXInformation.cmake: ENH: remove -lgcc used by + crazy coverage stuff + +2005-09-23 14:38 hoffman + + * Modules/: FindJNI.cmake, FindJava.cmake: ENH: java fixes from + Mathieu + +2005-09-23 12:50 martink + + * Source/cmake.cxx: BUG: the -P option was not working with + relative paths and a couple types + +2005-09-23 04:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-22 09:58 andy + + * Source/kwsys/Registry.cxx: COMP: Try to remove warnings + +2005-09-22 05:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-21 14:15 king + + * Source/kwsys/kwsysPlatformCxxTests.cmake: ENH: Updated to use + modern FILE command for writing to output logs instead of + WRITE_FILE. + +2005-09-21 13:42 king + + * Source/kwsys/kwsys_ios_sstream.h.in: BUG: kwsys_ios namespace + should import streambuf also. + +2005-09-21 13:31 king + + * Source/: cmGetSourceFilePropertyCommand.h, + cmGetTargetPropertyCommand.h, cmake.h, cmakemain.cxx: BUG: + Corrected and updated documentation of the -P option, -C option, + GET_TARGET_PROPERTY command, and GET_SOURCE_FILE_PROPERTY + command. + +2005-09-21 10:32 martink + + * Source/: cmCommands.cxx, cmITKWrapTclCommand.cxx, + cmITKWrapTclCommand.h: ENH: removed ITK command + +2005-09-21 05:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-20 15:08 andy + + * Source/CTest/cmCTestTestHandler.cxx: ENH: Properly report failed + tests + +2005-09-20 12:50 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: increase + coverage in loaded commands + +2005-09-20 10:42 andy + + * Source/kwsys/CMakeLists.txt: ENH: Make message into status + +2005-09-20 05:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-19 17:20 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: BUG: When an + unquoted argument contains a pair of matching double quotes + spaces and tabs should be allowed in-between. This allows + arguments like -DFOO='"bar zot"' to work. + +2005-09-19 16:19 andy + + * Source/kwsys/Registry.cxx: BUG: Remove warning and try to fix + memory problem + +2005-09-19 15:15 andy + + * Source/kwsys/CMakeLists.txt: ENH: Test for both commands + +2005-09-19 15:11 andy + + * Source/CTest/cmCTestTestHandler.cxx: ENH: Modify output based on + wether it is tested or memory checked + +2005-09-19 15:08 andy + + * Source/CTest/cmCTestTestCommand.h: BUG: This should fix memory + checking + +2005-09-19 12:38 martink + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2005-09-19 12:33 hoffman + + * Modules/FindQt4.cmake, Modules/FindQt4.cmake.bak, + Modules/VTKCompatibility.cmake, Source/cmCTest.cxx: minor fixes + for 2.2.1 + +2005-09-19 12:19 hoffman + + * Modules/FindQt4.cmake: ENH: fix typo + +2005-09-19 12:17 hoffman + + * Modules/VTKCompatibility.cmake: ENH: remove message + +2005-09-19 04:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-18 17:15 king + + * Source/kwsys/README.txt: STYLE: Added reference to documentation + in CMakeLists.txt. + +2005-09-18 17:08 king + + * Source/kwsys/CMakeLists.txt: STYLE: Added backward compatibility + disclaimer. + +2005-09-18 08:17 andy + + * Source/: cmGetTestPropertyCommand.cxx, kwsys/CMakeLists.txt: BUG: + Fix which argument is which, also, fix the test to be less + agressive + +2005-09-18 04:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-17 11:31 andy + + * Source/CTest/cmCTestTestCommand.cxx: ENH: Fix memcheck command + +2005-09-17 09:53 andy + + * Source/kwsys/CMakeLists.txt: ENH: Add testing of + GET_TEST_PROPERTY command + +2005-09-17 08:50 andy + + * Source/kwsys/Registry.cxx: BUG: On WIN32, since we are using + subkey, set it + +2005-09-17 05:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-16 15:30 andy + + * Source/kwsys/Registry.cxx: COMP: Remove unused variable + +2005-09-16 13:56 andy + + * Source/kwsys/: Registry.cxx, testRegistry.cxx: BUG: Fix encoding + and add deleting to the test + +2005-09-16 13:38 andy + + * Source/kwsys/: Registry.cxx, Registry.hxx.in, testRegistry.cxx: + ENH: Modify API a little bit to allow arbitrary length values. + Encode certain characters. Rename UNIX registry to FILE registry. + More testing + +2005-09-16 12:17 martink + + * Utilities/Release/cmake_release.sh: ENH: update revision numbers + +2005-09-16 10:57 hoffman + + * Utilities/Release/: MakeRelease.cmake.in, README, Release.cmake: + move off branch + +2005-09-16 10:53 martink + + * Utilities/Release/: cmake_release.sh: ENH: update revision + numbers + +2005-09-16 10:53 martink + + * Utilities/Release/MakeRelease.cmake.in: ENH: fix for + CMAKE_COMMAND not being defined with -P + +2005-09-16 10:47 martink + + * Utilities/Release/cmake_release.sh: ENH: fix Bill + +2005-09-16 10:41 martink + + * Utilities/Release/: MakeRelease.cmake.in, Release.cmake: ENH: fix + to syntax + +2005-09-16 10:32 martink + + * Utilities/Release/: Release.cmake, MakeRelease.cmake.in: ENH: + added commit for release script + +2005-09-16 10:10 hoffman + + * Utilities/Release/MakeRelease.cmake.in: ENH: auto release stuff + +2005-09-16 10:09 andy + + * Source/kwsys/Registry.cxx: COMP: Remove problem on borland + +2005-09-16 09:21 andy + + * Source/kwsys/CMakeLists.txt: ENH: Enable registry, add test of + SET_TESTS_PROPERTIES, rename tests for dart2 + +2005-09-16 09:20 andy + + * Source/kwsys/Registry.cxx: COMP: Remove some more warnings + +2005-09-16 09:15 andy + + * Source/kwsys/: Registry.cxx, Registry.hxx.in: ENH: Cleanups and + expose unix registry on windows (for cygwin etc) + +2005-09-16 09:08 andy + + * Source/kwsys/: Registry.cxx, Registry.hxx.in: COMP: Win32 fixes + +2005-09-16 08:38 andy + + * Source/kwsys/Registry.cxx: ENH: More handling of unix versus + windows registry + +2005-09-16 08:20 andy + + * Source/kwsys/: Registry.cxx, Registry.hxx.in, testFail.c, + testRegistry.cxx: ENH: Initial import + +2005-09-16 05:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-15 17:22 andy + + * Source/cmCTest.cxx: ENH: Expose version of ctest + +2005-09-15 16:38 hoffman + + * CTestCustom.ctest.in, ChangeLog.manual, bootstrap, + Docs/cmake-mode.el, Modules/CMakeAddNewLanguage.txt, + Modules/CMakeTestRCCompiler.cmake, Modules/FindQt.cmake, + Modules/FindQt.cmake.bak, Modules/FindQt3.cmake, + Modules/FindQt4.cmake, Modules/FindQt4.cmake.bak, + Modules/UseQt4.cmake, Source/CMakeLists.txt, + Source/cmAddSubDirectoryCommand.cxx, + Source/cmAddSubDirectoryCommand.h, + Source/cmCommandArgumentParserHelper.cxx, + Source/cmFileCommand.cxx, + Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmGetDirectoryPropertyCommand.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmLocalGenerator.cxx, Source/cmOrderLinkDirectories.cxx, + Source/cmTest.h, Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, + Tests/OutOfSource/CMakeLists.txt, Tests/OutOfSource/testdp.h.in, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/OutOfSource/SubDir/CMakeLists.txt, + Tests/Wrapping/CMakeLists.txt, Utilities/Release/CMake.nsi.in: + Merge more changes from main trunk + +2005-09-15 16:06 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: COMP: Too fast commit + +2005-09-15 16:03 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: BUG: Make sure full + paths are collapsed + +2005-09-15 13:26 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: fix warning + +2005-09-15 12:17 hoffman + + * Modules/CMakeAddNewLanguage.txt, + Modules/CMakeTestRCCompiler.cmake, Source/cmGlobalGenerator.cxx: + ENH: clean up EnableLanguage try to fix problem where try compile + runs cmake + +2005-09-15 11:05 martink + + * CTestCustom.ctest.in: ENH: cleaner code coverage + +2005-09-15 04:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-14 11:16 hoffman + + * Modules/FindQt4.cmake: ENH: only add optional qt stuff to + QT_INCLUDES + +2005-09-14 09:12 hoffman + + * Modules/FindQt.cmake: ENH: if qt4 qmake is found then set + QT_QMAKE_EXECUTABLE to that value so that the same one will be + used in FindQt4.cmake + +2005-09-14 04:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-13 12:55 martink + + * CTestCustom.ctest.in: ENH: coverage cleanup for non XCode builds + +2005-09-13 10:40 martink + + * Tests/OutOfSource/: CMakeLists.txt, testdp.h.in, + OutOfSourceSubdir/CMakeLists.txt, OutOfSourceSubdir/simple.cxx: + ENH: test get directory properties ability to get props from + subdirs + +2005-09-13 10:39 martink + + * Source/: cmGetDirectoryPropertyCommand.cxx, + cmGetDirectoryPropertyCommand.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h: ENH: added DIRECTORY option to + GET_DIRECTORY_PROPERTIES + +2005-09-13 10:33 martink + + * Docs/cmake-mode.el: ENH: missing get_directory_property command + +2005-09-13 09:25 hoffman + + * Modules/FindQt4.cmake: ENH: add some checks on the qmake install + +2005-09-13 08:52 hoffman + + * Modules/FindQt.cmake: ENH: fix if statement + +2005-09-13 04:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-12 22:46 hoffman + + * Modules/FindQt.cmake: ENH: add docs for QT_REQUIRED + +2005-09-12 22:39 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: more findqt fixes + +2005-09-12 14:26 martink + + * Tests/OutOfSource/SubDir/CMakeLists.txt: ENH: convert to work + with the new syntax for ADD_SUBDIRECTORY + +2005-09-12 13:46 martink + + * Source/: cmAddSubDirectoryCommand.cxx, + cmAddSubDirectoryCommand.h: ENH: better format for + ADD_SUBDIRECTORY command + +2005-09-12 11:43 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: add new place to + search for qt4 in registry + +2005-09-12 11:25 hoffman + + * Modules/FindQt.cmake: ENH: fix typo + +2005-09-12 10:37 hoffman + + * Source/CMakeLists.txt: ENH: use the findqt3 from this cmake and + not the one configureing cmake + +2005-09-12 10:33 hoffman + + * Modules/FindQt.cmake: ENH: add a better message + +2005-09-12 10:28 hoffman + + * Modules/FindQt3.cmake: ENH: add more libraries for qt3 + +2005-09-12 09:55 hoffman + + * Modules/FindQt4.cmake: ENH: use correct variable for qmake + +2005-09-12 09:52 hoffman + + * Modules/FindQt4.cmake: ENH: add a better message + +2005-09-12 09:36 hoffman + + * Modules/FindQt.cmake: ENH: add some messages not errors for + findqt + +2005-09-12 09:32 hoffman + + * Modules/FindQt3.cmake, Modules/FindQt4.cmake, + Source/CMakeLists.txt, Tests/Wrapping/CMakeLists.txt: ENH: more + qt changes + +2005-09-12 09:09 hoffman + + * Modules/UseQt4.cmake: ENH: add -D options for qt stuff + +2005-09-12 09:00 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: make sure the correct + qmake is used + +2005-09-12 04:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-11 04:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-10 22:36 hoffman + + * Modules/FindQt.cmake: ENH: only print errors if QT_REQUIRED is + set + +2005-09-10 10:33 hoffman + + * bootstrap, Modules/FindQt.cmake, Source/cmFileCommand.cxx: BUG: + try to fix qt problems + +2005-09-10 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-09 21:51 hoffman + + * Modules/FindQt.cmake, Modules/FindQt3.cmake, + Modules/FindQt4.cmake, Tests/Wrapping/CMakeLists.txt: ENH: clean + up the find qt stuff some + +2005-09-09 17:04 hoffman + + * Modules/: CheckQtInstalled.cmake, FindQt.cmake: ENH: try to fix + this find qt stuff + +2005-09-09 13:23 martink + + * Utilities/Release/CMake.nsi.in: ENH: to support both admin and + locla installs + +2005-09-09 11:32 hoffman + + * Modules/: CheckQtInstalled.cmake, FindQt.cmake: ENH: make FindQt + default to qt3 and print a message, and add + CheckQtInstalled.cmake + +2005-09-09 05:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-08 15:26 hoffman + + * Source/cmCommandArgumentParserHelper.cxx: ENH: remove UMR + +2005-09-08 15:25 hoffman + + * Source/cmOrderLinkDirectories.cxx: BUG: fix spelling error + +2005-09-08 14:59 hoffman + + * ChangeLog.manual, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeFortranInformation.cmake, Modules/FindCurses.cmake, + Modules/FindJNI.cmake, Modules/FindJPEG.cmake, + Modules/FindJava.cmake, Modules/FindMatlab.cmake, + Modules/FindMotif.cmake, Modules/FindQt4.cmake, + Modules/FindQt4.cmake.bak, Modules/FindZLIB.cmake, + Modules/UseQt4.cmake, Modules/UseSWIG.cmake, + Modules/VTKCompatibility.cmake, Source/cmGlobalGenerator.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, + Source/cmOrderLinkDirectories.cxx: merge with main trunk + +2005-09-08 14:35 andy + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + BUG: fix xcode 15 (really bill Hoffman) + +2005-09-08 14:22 martink + + * Source/cmOrderLinkDirectories.cxx: BUG: bug num 1994 library + linking when a config is not specified but debug and opt libs are + +2005-09-08 11:38 hoffman + + * Modules/: FindCurses.cmake, FindJPEG.cmake, FindZLIB.cmake: ENH: + clean up some stuff + +2005-09-08 11:38 hoffman + + * Modules/UseSWIG.cmake: ENH: add ability to set outdir in swig + +2005-09-08 10:03 hoffman + + * Modules/: CMakeDetermineJavaCompiler.cmake, FindJNI.cmake, + FindJava.cmake: ENH: add support for java 1.5 + +2005-09-08 10:01 hoffman + + * Modules/FindMatlab.cmake: ENH: add Matlab support + +2005-09-08 09:59 hoffman + + * Modules/FindMotif.cmake: ENH: add a find motif + +2005-09-08 09:58 hoffman + + * Modules/: FindQt4.cmake, UseQt4.cmake: ENH: add Ken Morelands + fixes for FindQT + +2005-09-08 05:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-07 17:05 hoffman + + * Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/VTKCompatibility.cmake, Source/cmGlobalGenerator.cxx: + ENH: add a fix for VTK on the mac and a way to fix some projects + with a single file in the cmake modules directory + +2005-09-07 05:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-06 23:31 andy + + * Source/: cmLocalGenerator.cxx, cmTest.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestTestHandler.h: ENH: + Add a way for test to intentionally fail + +2005-09-06 12:55 hoffman + + * ChangeLog.manual, bootstrap, Modules/CMakeGenericSystem.cmake, + Modules/Platform/AIX.cmake, Source/CMakeLists.txt, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalXCode21Generator.cxx, + Source/cmGlobalXCode21Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmTryRunCommand.cxx, + Source/cmXCode21Object.cxx, Source/cmXCode21Object.h, + Source/cmXCodeObject.cxx, Source/cmXCodeObject.h, + Source/CTest/cmCTestTestHandler.cxx, + Source/kwsys/SharedForward.h.in, + Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt: Merge with main tree + +2005-09-06 05:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-05 09:17 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.h: ENH: fix + warnings + +2005-09-05 04:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-04 04:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-03 22:16 hoffman + + * bootstrap: ENH: fix bootstrap, maybe this should somehow grep awk + the sources from the cmakelist file.... + +2005-09-03 04:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-02 16:29 hoffman + + * Source/: CMakeLists.txt, cmGlobalXCode21Generator.cxx, + cmGlobalXCode21Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmXCode21Object.cxx, cmXCode21Object.h, + cmXCodeObject.cxx, cmXCodeObject.h: ENH: add real support for + Xcode21 + +2005-09-02 08:41 hoffman + + * Source/CMakeLists.txt: BUG: not all Macs are case insensitive if + they mount nfs directories + +2005-09-02 05:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-09-01 17:14 hoffman + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: fix NONE + +2005-09-01 05:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-31 19:41 king + + * Source/kwsys/SharedForward.h.in: ENH: Added cygcheck knowledge + for --ldd option on Cygwin. Added error message for --ldd option + when no tool is available but the option was still requested. + +2005-08-31 05:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-30 13:58 hoffman + + * Source/cmGlobalXCodeGenerator.cxx, Source/cmTryRunCommand.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt: ENH: use native + Deployment and Development directories + +2005-08-30 04:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-29 17:09 hoffman + + * Modules/Platform/AIX.cmake: ENH: add flags for debug release for + aix + +2005-08-29 16:19 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/CMakeTestCCompiler.cmake, Modules/FindJava.cmake, + Modules/FindQt3.cmake, Source/CMakeLists.txt, + Source/cmDependsC.cxx, Source/cmDependsC.h, + Source/cmFileCommand.cxx, Source/cmGlobalXCodeGenerator.cxx, + Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio6Generator.cxx, Source/cmMakefile.cxx, + Source/cmSetTargetPropertiesCommand.h, Source/cmSystemTools.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, Source/cmVersion.cxx, + Source/cmake.cxx, Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestGenericHandler.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestTestHandler.h, + Source/CTest/cmCTestUpdateCommand.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/kwsys/SharedForward.h.in, Source/kwsys/SystemTools.cxx, + Templates/EXEHeader.dsptemplate, + Tests/CustomCommand/CMakeLists.txt, Tests/CustomCommand/foo.h.in, + Tests/CustomCommand/foo.in, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: merge with cvs again + and change version + +2005-08-29 15:49 king + + * Modules/CMakeGenericSystem.cmake: ENH: Picking better default for + CMAKE_INSTALL_PREFIX on Windows by using ProgramFiles environment + variable. Now that install actually works on Windows I'm making + this entry non-advanced also. + +2005-08-29 04:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-28 04:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-27 05:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-26 17:02 andy + + * Modules/FindJava.cmake: ENH: More paths for java + +2005-08-26 16:20 andy + + * Source/CTest/cmCTestGenericHandler.cxx: COMP: Simplify logic and + remove sun compile error + +2005-08-26 05:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-25 05:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-24 11:18 andy + + * Source/CTest/cmCTestGenericHandler.cxx: BUG: Prevent from + creating bogus files + +2005-08-24 04:54 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-23 13:25 king + + * Modules/FindQt3.cmake: ENH: Added support for finding qt-mtedu, + the educational version of Qt. + +2005-08-23 10:24 hoffman + + * Source/cmFileCommand.cxx: make sure correct path type is used + +2005-08-23 04:48 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-22 04:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-21 04:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-20 05:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-19 17:57 king + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/EXEHeader.dsptemplate: BUG: Fixed OUTPUT_NAME feature + for VS6 generator. It was not working for Debug builds and was + not paying attention to the executable output path. + +2005-08-19 17:56 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Install rule should take + build configuration into account. + +2005-08-19 17:17 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: add support for + OUTPUT_NAME + +2005-08-19 10:13 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: If the scanner is + not defined this would crash. For example when using new language + +2005-08-19 09:38 king + + * Source/cmake.cxx: ENH: Added cmake -E create_symlink command that + behaves like ln -s. + +2005-08-19 09:29 king + + * Modules/CMakeTestCCompiler.cmake: BUG: Need to test void* not + "void *" because the Intel compiler icc expands the asterisk. + Thanks to Filipe Sousa for the patch. + +2005-08-19 09:22 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Removing exe VERSION + attribute test until it is implemented in the XCode generator. + +2005-08-19 04:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-18 16:17 andy + + * Source/CTest/cmCTestTestHandler.h: COMP: Add STD namespace + +2005-08-18 16:06 king + + * Source/kwsys/SharedForward.h.in: BUG: Fixed dirname in a few + cases on windows. Now using KWSYS_SHARED_FORWARD_CONFIG_NAME + setting instead of CMAKE_INTDIR directly to give choice to user + code. Updated documentation to include + @KWSYS_NAMESPACE@_SHARED_FORWARD_CONFIG_NAME, + @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_PRINT, and + @KWSYS_NAMESPACE@_SHARED_FORWARD_OPTION_LDD settings. + +2005-08-18 13:50 andy + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: ENH: + Improve log file strategy + +2005-08-18 10:02 andy + + * Source/CTest/cmCTestUpdateCommand.cxx: ENH: Set update options + +2005-08-18 09:23 king + + * Source/kwsys/SharedForward.h.in: ENH: Added support for Windows. + +2005-08-18 09:21 king + + * Tests/CustomCommand/foo.h.in: COMP: Avoid C++ comment in C + translation unit. + +2005-08-18 09:19 king + + * Source/cmDependsC.cxx: COMP: Work-around iterator/const_iterator + comparison problem on Borland 5.5. + +2005-08-18 05:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-17 17:56 king + + * Tests/CustomCommand/CMakeLists.txt: BUG: It seems the + auto-object-depends feature does not work in Visual Studio. I'm + restoring the explicit OBJECT_DEPENDS lines. + +2005-08-17 17:39 king + + * Source/cmSystemTools.cxx: BUG: RunSingleCommand should translate + NULL characters in the output to valid text. This should fix the + missing-output problem caused by NULL-characters in VS build + output. + +2005-08-17 17:04 king + + * Source/kwsys/SystemTools.cxx: BUG: Automatic pwd/cwd path + translation must check that the generated logical-to-physical + mapping is correct by using realpath. + +2005-08-17 16:19 king + + * Source/CMakeLists.txt, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Updated SimpleInstall + test to test new versioned executable and OUTPUT_NAME support. + +2005-08-17 16:11 king + + * Source/: cmFileCommand.cxx, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmSetTargetPropertiesCommand.h, cmTarget.cxx, cmTarget.h: ENH: + Added versioned executable support. This partially addresses + bug#2143. Also made OUTPUT_NAME work when installing + executables. + +2005-08-17 16:06 king + + * Source/cmake.cxx: ENH: Added -E cmake_symlink_executable command + to help create symbolic links for versioned executables. + +2005-08-17 16:05 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Do not make a file + depend on a virtual target. That causes everything to always + rebuild. + +2005-08-17 14:16 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More error regex + +2005-08-17 13:23 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: Cannot use + first/last insertion constructor of std::set because it is not + available on all platforms. + +2005-08-17 11:48 king + + * Tests/CustomCommand/: CMakeLists.txt, foo.in, foo.h.in: ENH: + Adding test for auto-object-depends feature. It has been tested + with the Makefile generator. Hopefully this will work for the + Visual Studio and XCode generators. + +2005-08-17 11:43 king + + * Source/: cmDependsC.cxx, cmDependsC.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: Adding support for + automatically adding the OBJECT_DEPENDS for generated header + files. + +2005-08-17 05:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-16 08:32 hoffman + + * Utilities/Release/: cmake_release.sh: ENH: file is now configured + +2005-08-16 05:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-15 05:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-14 05:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-13 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-12 11:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-11 14:02 hoffman + + * ChangeLog.manual, Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/CMakeJavaCompiler.cmake.in, + Modules/CMakeRCCompiler.cmake.in, + Modules/CMakeRCInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, Modules/CTest.cmake, + Modules/CTestTargets.cmake, Modules/CheckCSourceCompiles.cmake, + Modules/CheckCXXSourceCompiles.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/Dart.cmake, + Modules/FindDoxygen.cmake, Modules/FindGLUT.cmake, + Modules/FindJNI.cmake, Modules/FindOpenAL.cmake, + Modules/FindPhysFS.cmake, Modules/FindPythonInterp.cmake, + Modules/FindQt.cmake, Modules/FindQt.cmake.bak, + Modules/FindQt3.cmake, Modules/FindQt4.cmake, + Modules/FindQt4.cmake.bak, Modules/FindSDL.cmake, + Modules/FindSDL.cmake.bak, Modules/FindSDL_image.cmake, + Modules/FindSDL_image.cmake.bak, Modules/FindSDL_mixer.cmake, + Modules/FindSDL_mixer.cmake.bak, Modules/FindSDL_net.cmake, + Modules/FindSDL_net.cmake.bak, Modules/FindSDL_sound.cmake, + Modules/FindSDL_ttf.cmake, Modules/FindSDL_ttf.cmake.bak, + Modules/FindThreads.cmake, Modules/TestBigEndian.cmake, + Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForSTDNamespace.cmake, Modules/Use_wxWindows.cmake, + Modules/Platform/CYGWIN-g77.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/Windows-cl.cmake, Modules/Platform/g77.cmake, + Source/CMakeLists.txt, Source/cmAddCustomCommandCommand.cxx, + Source/cmAddDependenciesCommand.h, Source/cmAddTestCommand.h, + Source/cmCTest.cxx, Source/cmCTest.h, Source/cmCacheManager.cxx, + Source/cmCommands.cxx, Source/cmCustomCommand.cxx, + Source/cmCustomCommand.h, Source/cmDepends.cxx, + Source/cmDepends.h, Source/cmDependsC.cxx, Source/cmDependsC.h, + Source/cmDependsFortran.cxx, Source/cmDependsFortran.h, + Source/cmDependsJava.cxx, Source/cmDependsJava.h, + Source/cmDocumentation.cxx, Source/cmDynamicLoader.cxx, + Source/cmFLTKWrapUICommand.cxx, Source/cmFileCommand.cxx, + Source/cmGetTestPropertyCommand.cxx, + Source/cmGetTestPropertyCommand.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalUnixMakefileGenerator3.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalXCode21Generator.cxx, + Source/cmGlobalXCode21Generator.h, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmListFileLexer.c, + Source/cmListFileLexer.in.l, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalUnixMakefileGenerator3.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, Source/cmQTWrapCPPCommand.cxx, + Source/cmSetTestsPropertiesCommand.cxx, + Source/cmSetTestsPropertiesCommand.h, Source/cmSourceGroup.cxx, + Source/cmSourceGroup.h, Source/cmSourceGroupCommand.cxx, + Source/cmTarget.cxx, Source/cmTest.cxx, Source/cmTest.h, + Source/cmTryCompileCommand.h, Source/cmUtilitySourceCommand.cxx, + Source/cmake.cxx, Source/cmake.h, Source/ctest.cxx, + Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestCoverageHandler.cxx, + Source/CTest/cmCTestCoverageHandler.h, + Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx, + Source/CTest/cmCTestGenericHandler.cxx, + Source/CTest/cmCTestSubmitCommand.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestTestCommand.cxx, + Source/CTest/cmCTestTestHandler.cxx, + Source/CTest/cmCTestUpdateHandler.cxx, + Source/WXDialog/CMakeLists.txt, Source/WXDialog/CMakeSetup.cpp, + Source/WXDialog/CMakeSetup.pjd, + Source/WXDialog/CMakeSetupFrame.cpp, + Source/WXDialog/CommandLineInfo.cpp, + Source/WXDialog/CommandLineInfo.h, + Source/WXDialog/cmakesetup.xml, + Source/WXDialog/bin/FindwxWin.cmake, Source/kwsys/Base64.c, + Source/kwsys/Base64.h.in, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.h.in, Source/kwsys/FundamentalType.h.in, + Source/kwsys/Process.h.in, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cmake, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Source/kwsys/testHashSTL.cxx, Source/kwsys/testhash.cxx, + Tests/BundleTest/BundleTest.cxx, Tests/BundleTest/CMakeLists.txt, + Tests/CTestTest/test.cmake.in, Tests/CTestTest2/test.cmake.in, + Tests/CTestTest3/test.cmake.in, + Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Executable/testcflags.c, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/testcflags.c, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/testcflags.c, + Tests/MacroTest/CMakeLists.txt, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx, + Tests/OutOfSource/OutOfSourceSubdir/testlib.cxx, + Tests/OutOfSource/OutOfSourceSubdir/testlib.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt, Utilities/CMakeLists.txt, + Utilities/cmcurl/CMakeLists.txt, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: move + cvs onto branch and try for beta 2 + +2005-08-11 13:20 martink + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: ENH: added + better error checking for cases when there is a CMakeCache.txt + file but it is not readable + +2005-08-11 11:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-10 16:18 jorgb + + * Source/WXDialog/: CommandLineInfo.cpp, CommandLineInfo.h, + cmakesetup.xml: Implemented new parser which can handle: + -G"generator" (legacy format) -G "generator" (new format) + +2005-08-10 12:55 hoffman + + * Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: fix bug + 2087 lib prefix stripped off on windows + +2005-08-10 12:50 hoffman + + * Modules/FindQt4.cmake: ENH: some clean up from Clinton + +2005-08-10 12:01 hoffman + + * Modules/: FindOpenAL.cmake, FindSDL.cmake, FindSDL_image.cmake, + FindSDL_mixer.cmake, FindSDL_net.cmake, FindSDL_sound.cmake, + FindSDL_ttf.cmake: ENH: add Eric Wings FindSDL updates + +2005-08-10 11:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-10 10:01 hoffman + + * Source/cmDependsC.cxx: ENH: fix bug in depend file removing for + deleted depend files + +2005-08-10 08:48 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: fixed up qt stuff + from Clinton Stimpson + +2005-08-09 15:42 jorgb + + * Source/WXDialog/: CMakeSetup.cpp, CommandLineInfo.cpp, + CommandLineInfo.h, cmakesetup.xml: Implemented -G option + +2005-08-09 13:12 martink + + * Source/CTest/cmCTestTestHandler.cxx: BUG: do not search the + user's path for text executables when a full path is provided to + the test + +2005-08-09 11:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-09 10:35 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix for sun make + with spaces + +2005-08-08 17:14 jorgb + + * Source/WXDialog/: CMakeSetup.cpp, CMakeSetup.pjd, + CMakeSetupFrame.cpp, CommandLineInfo.cpp, CommandLineInfo.h, + cmakesetup.xml: Started on command line parsing, added string + parse method for default generator + +2005-08-08 15:23 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: have the + build.make file include flags.make and use the language flags + +2005-08-08 13:28 martink + + * Source/cmAddCustomCommandCommand.cxx: ENH: fix for earlier fix on + source with relative path + +2005-08-08 12:00 king + + * Source/cmAddCustomCommandCommand.cxx: BUG: Do not convert SOURCE + argument from relative to full path. It breaks the old-style + SOURCE==TARGET trick and the SOURCE argument is only present for + old-style commands anyway. This addresses bug#2120. + +2005-08-08 11:33 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Need TSD target to be built + before SimpleInstall. + +2005-08-08 11:28 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Do not escape + CMAKE_COMMAND twice. + +2005-08-08 11:02 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix and issue with + spaces in paths + +2005-08-08 10:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-08 09:37 king + + * Source/cmake.cxx: BUG: When exiting before the configure step in + script mode we must account for + cmSystemTools::GetErrorOccuredFlag() for the return code. + +2005-08-07 10:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-06 10:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-05 17:07 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: fix warning + +2005-08-05 14:19 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: some fixes for cwd + problems with rebuild_cache option + +2005-08-05 11:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-04 17:12 king + + * Source/kwsys/CMakeLists.txt: ENH: If VTK_LIBRARY_PROPERTIES is + set then the properties it lists will be added to VTK library + targets with SET_TARGET_PROPERTIES. This will be useful to + enable shared library versioning. + +2005-08-04 11:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-03 16:10 king + + * Source/cmAddDependenciesCommand.h: ENH: Clarified documentation + further. + +2005-08-03 14:16 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More build errors + +2005-08-03 14:15 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: More handling of + gcov 4.0 + +2005-08-03 13:34 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: More support for + gcov 4.0 + +2005-08-03 13:19 andy + + * Modules/: CTest.cmake, CTestTargets.cmake: ENH: Initial import + +2005-08-03 13:19 andy + + * Modules/: Dart.cmake, FindJNI.cmake: STYLE: Fix typo + +2005-08-03 11:56 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: Add support for the + new gcc that uses files with extension .gcda + +2005-08-03 11:50 andy + + * Tests/CTestTest2/test.cmake.in: COMP: Fix for proxy test + +2005-08-03 11:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-02 17:41 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: /nologo must be first + +2005-08-02 16:44 hoffman + + * Modules/FindQt4.cmake: ENH: add changes for qt4 from Clinton + Stimpson + +2005-08-02 16:34 hoffman + + * Modules/FindQt4.cmake: ENH: add changes for qt4 from Clinton + Stimpson + +2005-08-02 13:40 andy + + * Source/CMakeLists.txt: ENH: change name from XCode to Xcode no + need to test bootstrap for xcode + +2005-08-02 13:02 andy + + * Source/CMakeLists.txt: ENH: change name from XCode to Xcode no + need to test bootstrap for xcode + +2005-08-02 13:01 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: get around problem where + OBJROOT has been set by default for all projects in Xcode gui + +2005-08-02 11:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-02 11:06 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: FIX: fix bad depend info and + COMPILE_FLAGS problem and remove extra cerr calls + +2005-08-02 10:07 andy + + * Tests/CTestTest/test.cmake.in: COMP: Try to fix test by taking + arg1 into acount + +2005-08-02 09:55 hoffman + + * Modules/FindQt.cmake: ENH: add advanced values + +2005-08-01 16:49 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: BUG: Unquoted + arguments can have quotes that are not at the beginning, but only + an even number of them. + +2005-08-01 12:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-08-01 10:19 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: first step to only + rebuuilding on flag changes + +2005-08-01 09:44 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: make sure + CMAKE_C_FLAGS are not clobbered + +2005-08-01 09:24 king + + * Source/cmQTWrapCPPCommand.cxx: BUG: Patch from Filipe Sousa. + QT_WRAP_CPP should generate the file moc_dlgmain.ui.cxx instead + of moc_dlgmain.cxx. + +2005-07-31 23:05 andy + + * Modules/CheckCXXSourceCompiles.cmake, + Tests/MacroTest/CMakeLists.txt: ENH: Add C++ test too + +2005-07-31 23:02 andy + + * Modules/CheckCSourceCompiles.cmake, + Tests/MacroTest/CMakeLists.txt: ENH: Add a test for C source file + like AC_TRY_COMPILE + +2005-07-31 22:25 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: use ansi + flags + +2005-07-31 11:51 andy + + * Source/: cmCommands.cxx, cmGetTestPropertyCommand.cxx, + cmGetTestPropertyCommand.h, cmLocalGenerator.cxx, cmMakefile.cxx, + cmMakefile.h, cmSetTestsPropertiesCommand.cxx, + cmSetTestsPropertiesCommand.h, cmTest.cxx, cmTest.h: ENH: Add set + and get test propety command + +2005-07-31 11:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-30 21:58 hoffman + + * Tests/: Complex/Executable/testcflags.c, + ComplexOneConfig/Executable/testcflags.c, + ComplexRelativePaths/Executable/testcflags.c: ENH: no c++ + comments in a c file + +2005-07-30 11:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-29 14:17 martink + + * Source/cmFLTKWrapUICommand.cxx: ENH; better warning message and + fix type per julien + +2005-07-29 14:02 hoffman + + * Tests/: Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: do not test for + c and cxx flags on visual studio as it does not work yet + +2005-07-29 13:19 martink + + * Source/kwsys/kwsysPlatformCxxTests.cmake: ENH: change loc of log + files + +2005-07-29 11:56 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Executable/testcflags.c, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Executable/testcflags.c, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Executable/testcflags.c: ENH: add new test + to make sure c and cxx flags are going to the right files + +2005-07-29 11:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-29 11:25 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fix dependencies. + Looks like all dependencies were missing subdirectory + +2005-07-29 10:04 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: undo last change + +2005-07-29 10:02 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: support versions greater + than 20 + +2005-07-29 09:19 martink + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/CheckIncludeFiles.cmake, + Modules/CheckLibraryExists.cmake, + Modules/CheckSymbolExists.cmake, Modules/CheckTypeSize.cmake, + Modules/CheckVariableExists.cmake, Modules/FindThreads.cmake, + Modules/TestBigEndian.cmake, Modules/TestCXXAcceptsFlag.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForSTDNamespace.cmake, + Modules/Platform/Windows-cl.cmake, Source/cmCacheManager.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator3.cxx, + Source/cmGlobalXCodeGenerator.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator3.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Tests/MakeClean/ToClean/CMakeLists.txt, + Utilities/cmcurl/CMakeLists.txt, + Utilities/cmxmlrpc/CMake/TryCompileFromSource.cmake: ENH: put + cmake files intoa CMakeFiles subdir to clean up bin tree + +2005-07-28 15:24 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: fix warning + +2005-07-28 14:52 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make sure c flags are + used for c and cxx flags are used for cxx, really Bill + +2005-07-28 13:21 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: add + method to attempt to check if a file is text or binary + +2005-07-28 13:12 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make sure custom commands + depend on full path files only: Bill as Andy + +2005-07-28 11:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-28 09:14 martink + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: always write out all + custom commands + +2005-07-27 17:23 king + + * Source/cmMakefile.cxx: BUG: InitializeFromParent should copy + include file regular expressions. + +2005-07-27 16:46 king + + * Source/cmGlobalGenerator.cxx: ENH: RUN_TESTS target now uses + proper CMAKE_CFG_INTDIR setting to get $(IntDir) or $(OutDir) + depending on the generator. + +2005-07-27 16:37 king + + * Source/cmUtilitySourceCommand.cxx: BUG: Hack to support building + existing trees with UTILITY_SOURCE commands and the new VS + generator directory structure. + +2005-07-27 15:46 andy + + * Source/cmGlobalGenerator.cxx: BUG: Generate RUN_TEST target if + any tests are there + +2005-07-27 13:36 king + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: ENH: Generator now creates a + separate intermediate files directory for each target. This is + needed for MSVC 8 to support parallel builds. + +2005-07-27 12:41 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: fix some warnings and + cleanup some + +2005-07-27 11:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-27 11:42 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: maybe fix fortran + issue + +2005-07-27 11:36 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: fix some warnings and + cleanup some + +2005-07-27 11:31 martink + + * Source/: cmDependsJava.cxx, cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: fix some warnings and + cleanup some + +2005-07-27 09:49 martink + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmDependsC.h, cmDependsFortran.cxx, cmDependsFortran.h, + cmDependsJava.cxx, cmDependsJava.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmake.cxx: ENH: reduce the + number of files produced still needs a bit more cleanup + +2005-07-26 17:40 king + + * Modules/Dart.cmake: ENH: Added VS8 support for DART_CXX_NAME. + +2005-07-26 13:26 hoffman + + * Source/cmTarget.cxx: ENH: make sure source file depends are used + to determine if custom commands are used + +2005-07-26 13:26 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: if it is not a + cmake target or a full path do not put depend information in the + command + +2005-07-26 13:25 hoffman + + * Source/cmFLTKWrapUICommand.cxx: ENH: make sure custom command + depend on fluid so if fltk is part of project fluid gets built + first + +2005-07-26 11:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-26 11:37 king + + * Source/kwsys/: CMakeLists.txt, FundamentalType.h.in: ENH: Added + FundamentalType header defining platform-independent fixed + size/signedness integer types. + +2005-07-26 11:36 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: ENH: Added + TEST_KWSYS_CXX_SAME_LONG_AND___INT64, + TEST_KWSYS_CXX_SAME_LONG_LONG_AND___INT64, + TEST_KWSYS_CAN_CONVERT_UI64_TO_DOUBLE, and + TEST_KWSYS_CHAR_IS_SIGNED. + +2005-07-26 11:34 king + + * Source/kwsys/: Base64.c, Base64.h.in, Configure.h.in, + Process.h.in: ENH: Moved kwsys_ns and kwsysEXPORT macros to + Configure.h in the case of building a kwsys source file. This + allows more than one header to be included in a kwsys source file + without redefining the macros. + +2005-07-26 09:17 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Add support for multi-string + compiler name, and improve support for subversion + +2005-07-25 16:10 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix lib case bug + correctly + +2005-07-25 11:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-24 11:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-23 11:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-23 10:32 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: undo fix + +2005-07-22 17:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-22 15:41 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: more efficent fix + for bug # 2063 + +2005-07-22 15:33 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for case + mismatched lib bug # 2063 + +2005-07-22 15:32 hoffman + + * Source/cmDependsC.cxx: ENH: string += is very slow, so don't use + it + +2005-07-22 08:40 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Better handling of + removed files and remove warning + +2005-07-22 08:39 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: More regular + expressions + +2005-07-21 15:54 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Add support for + detecting files that were removed + +2005-07-21 10:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-21 09:07 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: BUG: Remove duplicate + prefix + +2005-07-20 22:23 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix warning + +2005-07-20 15:44 hoffman + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeJavaCompiler.cmake.in, + Modules/CMakeRCCompiler.cmake.in, + Modules/CMakeRCInformation.cmake, Source/cmLocalGenerator.cxx: + ENH: make sure flags set in CC or CXX environment variables stay + with the compiler + +2005-07-20 12:54 hoffman + + * Modules/: CMakeCInformation.cmake, CMakeCXXInformation.cmake, + Platform/Windows-cl.cmake: ENH: move flags next to compiler, so + if env contains compiler and some flag, they stay together + +2005-07-20 12:53 hoffman + + * Source/CMakeLists.txt: ENH: java does not work under mingw + +2005-07-20 12:48 hoffman + + * Modules/: FindQt.cmake, FindQt4.cmake: ENH: make sure qmake is on + the machine before running it + +2005-07-20 12:40 andy + + * Source/kwsys/testHashSTL.cxx: ENH: Rename test + +2005-07-20 12:03 andy + + * Source/cmCTest.cxx: BUG: Initialize variable + +2005-07-20 12:02 andy + + * Source/kwsys/: CMakeLists.txt, testhash.cxx: ENH: Rename test + +2005-07-20 10:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-19 18:05 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make it so that bootstrap + does not use xml parser + +2005-07-19 17:16 hoffman + + * Source/: cmake.cxx, cmake.h: ENH: fix for bug 1866, make -G,-D -C + options allow for space between arg and value + +2005-07-19 16:40 hoffman + + * Source/: CMakeLists.txt, cmFileCommand.cxx, + cmGlobalXCode21Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h: ENH: if Xcode21 is installed then + create 21 compatible project files + +2005-07-19 15:28 hoffman + + * Source/: cmGlobalXCode21Generator.cxx, + cmGlobalXCode21Generator.h: ENH: add new stub generator + +2005-07-19 15:27 hoffman + + * Source/cmTryCompileCommand.h: ENH: add more docs + +2005-07-19 14:36 hoffman + + * Modules/CMakeGenericSystem.cmake: ENH: make KDevelop3 default to + CMAKE_VERBOSE_MAKEFILE + +2005-07-19 11:48 hoffman + + * Modules/CMakeGenericSystem.cmake: ENH: make KDevelop3 default to + CMAKE_VERBOSE_MAKEFILE + +2005-07-19 10:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-18 12:53 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx, + CTest/cmCTestSubmitCommand.cxx, CTest/cmCTestSubmitHandler.cxx: + ENH: Add a way to submit extra files to the dashboard + +2005-07-18 11:46 andy + + * Modules/Dart.cmake, Source/cmCTest.cxx, Source/cmCTest.h, + Source/ctest.cxx, Tests/CTestTest2/test.cmake.in: ENH: Several + improvements and cleanups: 1. Add long command line arguments for + every argument 2. Add a way to overwrite CTest configuration by + providing --overwrite TimeOut=10 3. Improve argument parsing. 4. + Add submit index argument + +2005-07-18 11:32 andy + + * Source/CTest/cmCTestGenericHandler.cxx: ENH: Cleanup file name + +2005-07-18 11:32 andy + + * Source/cmDocumentation.cxx: ENH: Cleanup the help a bit + +2005-07-18 08:47 hoffman + + * Modules/FindQt.cmake: ENH: fix qt bug + +2005-07-18 03:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-17 03:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-16 03:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-15 15:20 hoffman + + * Source/cmGlobalXCodeGenerator.h: ENH: fix bug 1960 + +2005-07-15 13:24 hoffman + + * Source/cmAddTestCommand.h: BUG: fix for bug 1838 + +2005-07-15 12:57 hoffman + + * Modules/FindGLUT.cmake: BUG: fix for bug 852 + +2005-07-15 12:39 hoffman + + * Modules/: FindQt.cmake: ENH: fix hard coded include from patch + +2005-07-15 12:14 hoffman + + * Modules/: FindQt.cmake, FindQt3.cmake, FindQt4.cmake: ENH: add + new qt stuff from warfield@bwh.harvard.edu, thanks + +2005-07-15 12:01 martink + + * Utilities/CMakeLists.txt: BUG: converted to 1.8 form of custom + commands + +2005-07-15 11:48 andy + + * Modules/FindPythonInterp.cmake: ENH: Add registry for 2.4 + +2005-07-15 11:45 andy + + * Modules/FindPythonInterp.cmake: BUG: Set PYTHONINTERP_FOUND + +2005-07-15 11:38 hoffman + + * Source/WXDialog/bin/FindwxWin.cmake: ENH: fix for older versions + of cmake + +2005-07-15 11:38 hoffman + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: fix static build of vtk + with cmake by having custom targets chain depend information + +2005-07-15 11:37 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: remove commented + code + +2005-07-15 11:36 hoffman + + * Source/CMakeLists.txt: ENH: remove messages about not running + java test + +2005-07-15 11:34 hoffman + + * Source/cmDynamicLoader.cxx: ENH: fix compile error bug# 2020 on + mac + +2005-07-15 08:36 andy + + * Modules/FindPythonInterp.cmake: ENH: Initial import + +2005-07-15 03:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-14 17:21 hoffman + + * Source/WXDialog/: CMakeLists.txt, bin/FindwxWin.cmake: ENH: fix + wxdialog to build with xcode + +2005-07-14 16:46 andy + + * Source/WXDialog/CMakeLists.txt: ENH: add an install target for + WXDialog + +2005-07-14 16:00 hoffman + + * Source/cmLocalGenerator.cxx: ENH: fix for bug 992, mac bundle + install fix + +2005-07-14 15:12 hoffman + + * Source/cmMakefile.cxx: BUG: fix for bug 1850 wrapping can leave + out files if they are a substring of another file + +2005-07-14 14:15 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: ENH: Some more cleanups + and add ctest custom vector for regular expression to exclude + from coverage + +2005-07-14 14:15 andy + + * Source/cmCTest.cxx: BUG: Look for custom files in all directories + +2005-07-14 13:50 hoffman + + * Tests/OutOfSource/OutOfSourceSubdir/: testlib.cxx, testlib.h: + ENH: add missing files + +2005-07-14 13:25 andy + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: Add custom supression regular + expressions + +2005-07-14 12:21 hoffman + + * Source/cmLocalUnixMakefileGenerator3.cxx, + Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt, + Tests/OutOfSource/OutOfSourceSubdir/simple.cxx: FIX: fix bug + 2043 borland compiler and dll problem and add a test for it + +2005-07-14 11:24 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: BUG: Fix line number + inconsistency, improve output + +2005-07-14 10:15 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: add support for + borland exe with shared libs back in + +2005-07-14 09:44 andy + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: Do 4 files + +2005-07-14 09:30 andy + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: Add a test for + cmGeneratedFileStream + +2005-07-14 09:29 andy + + * Source/CTest/cmCTestTestCommand.cxx: COMP: Remove warning and fix + the logic + +2005-07-14 09:29 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: BUG: Rename tmp files + +2005-07-14 03:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-13 16:57 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: remove part of + patch from bug 1965 that set executable paths + +2005-07-13 16:49 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: revert part of + patch that set executable debug prefix as it breaks too much + stuff + +2005-07-13 16:24 hoffman + + * Source/cmLocalGenerator.cxx: ENH: add -L as possible library flag + +2005-07-13 16:23 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: add support for bundles + +2005-07-13 16:20 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: try to fix failed + test + +2005-07-13 15:49 hoffman + + * Source/CMakeLists.txt: ENH: add bundle test + +2005-07-13 15:43 hoffman + + * Tests/BundleTest/: BundleTest.cxx, CMakeLists.txt: ENH: add a + bundle test + +2005-07-13 11:21 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h, + cmSourceGroup.cxx, cmSourceGroup.h, cmSourceGroupCommand.cxx: + FIX: apply patch from bug# 1965 + +2005-07-13 10:17 andy + + * Source/: cmCTest.h, CTest/cmCTestTestCommand.cxx: ENH: Add + timeout support + +2005-07-13 09:49 andy + + * Source/kwsys/SystemTools.cxx: COMP: Remove warning on windows + +2005-07-13 09:08 hoffman + + * Modules/FindDoxygen.cmake: ENH: fix for darwin from eric wing + +2005-07-13 09:06 hoffman + + * Modules/: FindOpenAL.cmake, FindPhysFS.cmake, FindSDL.cmake, + FindSDL_image.cmake, FindSDL_mixer.cmake, FindSDL_net.cmake, + FindSDL_ttf.cmake: ENH: add a bunch of find sdl stuff from eric + wing + +2005-07-13 08:29 hoffman + + * Modules/Platform/: CYGWIN-g77.cmake, IRIX64.cmake, g77.cmake: + FIX: for 1852 fix fortran case + +2005-07-13 03:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-12 17:30 hoffman + + * ChangeLog.manual, Source/kwsys/SystemTools.cxx, + Source/kwsys/SystemTools.hxx.in: merge from main tree + +2005-07-12 17:24 hoffman + + * CMakeSystemConfig.txt.in, CMakeWindowsSystemConfig.txt: ENH: + remove unused files + +2005-07-12 17:24 hoffman + + * Source/cmCPluginAPI.h: ENH: change version + +2005-07-12 17:23 hoffman + + * Utilities/: cmcurl/CMakeLists.txt, cmxmlrpc/CMakeLists.txt: add + -dl on unix + +2005-07-12 17:22 hoffman + + * Utilities/Release/: cmake_release.sh, config_Darwin, + config_HP-UX, config_SunOS, release_dispatch.sh: move release + stuff off branch + +2005-07-12 16:56 hoffman + + * ChangeLog.txt: update changes + +2005-07-12 16:51 hoffman + + * ChangeLog.txt: ENH: update changes for 2.2 + +2005-07-12 15:40 hoffman + + * Utilities/Release/config_Darwin: [no log message] + +2005-07-12 15:26 hoffman + + * Utilities/Release/config_Darwin: [no log message] + +2005-07-12 15:11 hoffman + + * Utilities/Release/: config_Darwin, release_dispatch.sh: fixes for + osx + +2005-07-12 15:08 hoffman + + * Source/WXDialog/: CMakeLists.txt, bin/FindwxWin.cmake: Fixes for + macosx + +2005-07-12 15:06 andy + + * Source/WXDialog/: CMakeLists.txt, bin/FindwxWin.cmake: ENH: fixes + for macosx + +2005-07-12 14:21 hoffman + + * Utilities/cmxmlrpc/CMakeLists.txt: ENH: add dl lib + +2005-07-12 13:54 hoffman + + * Utilities/Release/config_SunOS: put it back + +2005-07-12 13:21 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: BUG: Revert + the change to FileIsDirectory. Add FileIsSymlink and treat + symlinks as files when removing directory + +2005-07-12 12:40 hoffman + + * Utilities/cmcurl/CMakeLists.txt: [no log message] + +2005-07-12 12:31 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Go back to the original + directory after examining the current directory + +2005-07-12 12:30 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Make sure it always + starts in the current directory when searching for tests + +2005-07-12 10:39 andy + + * Source/: kwsys/SystemTools.cxx, + CTest/cmCTestEmptyBinaryDirectoryCommand.cxx: BUG: When removing + directory, use lstat instead of stat to make sure that symlinks + are treated as files and not as directories + +2005-07-12 10:25 hoffman + + * Utilities/Release/config_SunOS: [no log message] + +2005-07-12 10:08 hoffman + + * Utilities/Release/config_SunOS: [no log message] + +2005-07-12 09:36 hoffman + + * Utilities/Release/config_HP-UX: use gmake + +2005-07-12 08:50 andy + + * Source/cmCTest.cxx: BUG: Fix problem with visual studio in + release mode + +2005-07-12 03:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-11 18:07 hoffman + + * Source/CursesDialog/form/CMakeLists.txt: ENH: fix from main tree + +2005-07-11 18:07 hoffman + + * Source/CursesDialog/form/CMakeLists.txt: ENH: add curses include + directory + +2005-07-11 17:58 hoffman + + * Utilities/Release/config_Darwin: turn off wx dialog for now + +2005-07-11 17:15 hoffman + + * Utilities/Release/cmake_release.sh: get the correct version + +2005-07-11 17:11 hoffman + + * Utilities/Release/: cmake_release.sh, cmake_release.sh.in, + config_CYGWIN_NT-5.1, config_IRIX64, config_Linux, + cygwin-package.sh.in, release_dispatch.sh, README: ENH: merge + changes from branches + +2005-07-11 16:57 hoffman + + * Utilities/Release/release_dispatch.sh: [no log message] + +2005-07-11 16:09 hoffman + + * Utilities/Release/: cmake_release.sh, cmake_release.sh.in, + config_CYGWIN_NT-5.1, config_IRIX64, cygwin-package.sh.in, + release_dispatch.sh: move stuff from 2.0 over to 2.2 + +2005-07-11 15:21 hoffman + + * Utilities/Release/config_Linux: move config linix to 2.2 branch + +2005-07-11 15:11 hoffman + + * Utilities/Release/release_dispatch.sh: change to muse + +2005-07-11 15:05 hoffman + + * Utilities/Release/release_dispatch.sh: ENH: add from HEAD + +2005-07-11 15:04 hoffman + + * Utilities/Release/release_dispatch.sh: add from branch + +2005-07-11 14:55 martink + + * ChangeLog.manual: ENH: commit some change logs + +2005-07-11 14:54 hoffman + + * Source/cmCPluginAPI.h, Utilities/Release/cmake_release.sh, + Utilities/Release/cmake_release.sh.in: ENH: fix up some version + stuff + +2005-07-11 12:22 martink + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: provide default + update options if none were provided + +2005-07-11 11:59 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Add default update + options + +2005-07-11 11:37 martink + + * ChangeLog.manual: ENH: added ChangeLog as in prior release + +2005-07-11 11:36 martink + + * Source/cmAddCustomCommandCommand.cxx: ENH: merge from the main + tree to handle relative files + +2005-07-11 11:31 martink + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: merged from CVS fix + for SNV warning + +2005-07-11 11:16 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: BUG: Remove warning when + using CVS + +2005-07-11 03:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-10 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-09 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-08 11:51 martink + + * Source/cmAddCustomCommandCommand.cxx: ENH: slightly modified + version of Alex's relative path arguments for custom commands + +2005-07-08 10:13 martink + + * Utilities/Release/cmake_release.sh: ENH: release commit + +2005-07-08 10:00 martink + + * CMakeLists.txt: ENH: rev to 22 + +2005-07-08 09:55 martink + + * CMakeLists.txt: ENH: update rev to 23 + +2005-07-08 09:53 martink + + * Source/MFCDialog/CMakeSetup.rc: ENH: minor version update + +2005-07-08 09:05 king + + * Source/kwsys/testProcess.c: COMP: Fixed uninitialized variable. + +2005-07-08 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-07 16:01 martink + + * Source/cmConfigureFileCommand.cxx: ENH: configure file will + assume start source dir if a full path is not provided + +2005-07-07 15:06 martink + + * Source/cmMakefile.cxx: BUG: library return values were not UNIX + slashes on Win98 + +2005-07-07 13:55 martink + + * Source/cmSourceFile.cxx: BUG: mor emissing convert to unix + slashes + +2005-07-07 11:44 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: cleaned up some old + methods and vars + +2005-07-07 10:21 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Removing + CMAKE_HIDE_TARGET_DIRS since it has been superceded by + CMAKE_TARGET_DIR_PREFIX. + +2005-07-07 10:14 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: Added use of + CMAKE_TARGET_DIR_PREFIX variable to prepend a project-specified + string to the names of all the target-name.dir directories. + +2005-07-07 10:11 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: added ability to + prefix target directories with a . to make them not show up in + ls. From patch from Alex + +2005-07-07 09:44 martink + + * Source/cmake.cxx: BUG: win95 returning non unix path for cmake + command + +2005-07-07 09:06 king + + * Source/kwsys/testProcess.c: ENH: Extended test 0 to run the + executable twice using the same process object. This tests the + reusability of the objects. + +2005-07-07 09:05 king + + * Source/kwsys/ProcessWin32.c: BUG: Fixed reusability of process + object by clearing each pipe's Closed flag when cleaning up. + +2005-07-07 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-06 16:16 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: fix for bootstrap problem + +2005-07-06 15:51 andy + + * Source/: cmCacheManager.cxx, cmFileCommand.cxx, + cmWriteFileCommand.cxx: STYLE: Fix typos + +2005-07-06 15:49 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: COMP: Remove warning + +2005-07-06 15:27 andy + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: Improve support for various + versions of gcov + +2005-07-06 15:25 andy + + * Modules/FindFLTK.cmake: ENH: Replace with the one from InsightApp + +2005-07-06 15:25 martink + + * Source/cmListFileCache.cxx: BUG: project command should also work + with lower case + +2005-07-06 15:24 martink + + * Tests/Simple/CMakeLists.txt: BUG: minor fix to project name to + match ADD_TEST call + +2005-07-06 15:11 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: BUG: On windows there can + be a problem because scp does not handle drive names. This uses + relative path for scp + +2005-07-06 03:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-05 16:13 martink + + * Utilities/Release/: MakeRelease.cmake.in, Release.cmake: ENH: a + start on UNIX release + +2005-07-05 15:43 martink + + * Utilities/Release/Release.cmake: ENH: better release support + +2005-07-05 12:38 martink + + * Utilities/Release/: MakeRelease.cmake.in, Release.cmake: ENH: + better release support + +2005-07-05 11:17 andy + + * Modules/FindDCMTK.cmake: ENH: Improvements by Julien + +2005-07-05 10:08 martink + + * Source/cmMacroCommand.cxx: ENH: revert back to string replacement + version + +2005-07-05 09:21 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: util targets now + show up in locla makefile and make rebuild_cache now works in + subdirs + +2005-07-05 09:00 martink + + * Source/cmLocalGenerator.cxx: BUG: fix for debug optimized link + libraries + +2005-07-05 03:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-04 03:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-03 12:06 andy + + * Source/cmake.cxx: ENH: Only truncate files when not in try + compile. Alsom move truncating code closer to configure + +2005-07-03 03:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-02 22:50 andy + + * Source/cmCTest.cxx: ENH: Improve performance of MakeXMLSafe, + improve performance of reading custom ctest files, and remove + error when running ctest on directory without + DartConfiguration.tcl + +2005-07-02 22:32 andy + + * Source/CTest/cmCTestCoverageHandler.cxx: STYLE: Unify number of + spaces + +2005-07-02 22:31 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Improve performance by + compiling regular expressions when needed + +2005-07-02 22:30 andy + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: ENH: + Improve performance of testing and do not complain if + DartTestfile.txt is not found or if directory does not exist + +2005-07-02 22:25 andy + + * Source/: cmake.cxx, cmake.h: ENH: Start adding the code that will + truncate output logs + +2005-07-02 01:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-07-01 10:57 martink + + * Source/: cmGetTargetPropertyCommand.h, cmTarget.cxx: ENH: added + Alexander's target property TYPE + +2005-07-01 10:23 martink + + * Source/: cmGetDirectoryPropertyCommand.cxx, + cmGetDirectoryPropertyCommand.h: ENH: added patch from Alexander + Neundorf to get DEFINITIONS + +2005-06-30 15:54 jorgb + + * Source/WXDialog/bin/: FindUPX.cmake, FindwxW.cmake, + FindwxWin.cmake, UsewxW.cmake: initial checkin for bin dir + +2005-06-30 15:54 jorgb + + * Source/WXDialog/: CMakeIcon.xpm, CMakeLists.txt, CMakeSetup.cpp, + CMakeSetup.h, CMakeSetup.pjd, CMakeSetup.rc, CMakeSetupFrame.cpp, + CMakeSetupFrame.h, CommandLineInfo.cpp, CommandLineInfo.h, + NGDialog.exe.manifest, NGDialog.ico, PropertyList.cpp, + PropertyList.h, about.html, aboutdlg.cpp, aboutdlg.h, + app_resources.cpp, app_resources.h, changelog.txt, + cmake_icon.gif, cmake_icon.xpm, cmake_logo.xpm, + cmakesetup.done.xml, cmakesetup.xml, config.h, optionsdlg.cpp, + optionsdlg.h, progressdlg.cpp, progressdlg.h: Initial checkin new + wx dialog + +2005-06-30 15:52 jorgb + + * Source/WXDialog/: CMakeIcon.gif, CMakeIcon.icns, CMakeIcon.xpm, + CMakeLists.txt, ReadMe.Mac.txt, cmWXCacheProperty.cxx, + cmWXCacheProperty.h, cmWXCommandLineInfo.cxx, + cmWXCommandLineInfo.h, cmWXMainFrame.cxx, cmWXMainFrame.h, + wxCMakeSetup.cxx, wxincludes.h: deleted old wx-dialog + +2005-06-30 13:39 martink + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: added testing + of the WHILE command + +2005-06-30 13:39 martink + + * Docs/cmake-mode.el: ENH: added while command + +2005-06-30 13:27 martink + + * Docs/cmake-mode.el: ENH: added while command + +2005-06-30 13:09 martink + + * Utilities/Release/: CMake.nsi.in, MakeRelease.cmake.in, + Release.cmake, Win32Release.sh.in: ENH: better release scripts + +2005-06-30 11:33 martink + + * Utilities/Release/Release.cmake: ENH: hard coded for VS 71 nmake + for now + +2005-06-30 11:18 king + + * Modules/Platform/Windows-cl.cmake: BUG: Fixed escaped quote at + end of . + +2005-06-30 09:53 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: added local help and + install targets + +2005-06-30 09:21 king + + * Source/kwsys/Base64.c: BUG: Do not increment optr by 2 after + storing only one character. Also fixed possibility of storing + uninitialized characters from the last triplet. + +2005-06-30 05:47 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-29 12:07 king + + * Modules/Platform/Windows-bcc32.cmake: BUG: Need to use the -c + option for implib to produce case-sensitive symbols in the .lib + files. + +2005-06-29 08:46 martink + + * CTestCustom.ctest.in: COMP: shut up warning + +2005-06-29 05:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-28 15:00 martink + + * Utilities/Release/: CMake.nsi.in, CMakeInstall.bmp: ENH: added + our own bitmap + +2005-06-28 10:55 martink + + * Utilities/Release/CMake.nsi.in, + Utilities/Release/Win32Release.sh.in, + Utilities/Release/cmake_release.sh.in, + Utilities/Release/Release.cmake, CMakeLists.txt: ENH: added some + release support + +2005-06-28 05:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-27 15:59 martink + + * Source/cmMakefile.cxx: BUG: dont pass unverified char * to + streams + +2005-06-27 12:45 martink + + * Tests/Simple/CMakeLists.txt: ENH: convert to lower case + +2005-06-27 12:44 martink + + * Example/: CMakeLists.txt, Demo/CMakeLists.txt, + Hello/CMakeLists.txt: ENH: updte to lower case and using + ADD_SUBDIRECTORY + +2005-06-27 11:39 martink + + * CTestCustom.ctest.in: ENH: mods to warning excludes based on new + locaiton of curl + +2005-06-27 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-26 05:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-25 05:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-24 13:29 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: BUG: Exit properly on SCP + submission + +2005-06-24 09:41 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: COMP: Remove warnings + +2005-06-24 09:06 andy + + * CMakeLists.txt, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Utilities/cmxmlrpc/xmlrpc_curl_transport.c: ENH: Move curl to + utilities + +2005-06-24 09:00 andy + + * Utilities/cmcurl/: amigaos.c, amigaos.h, arpa_telnet.h, base64.c, + base64.h, ca-bundle.h, connect.c, connect.h, content_encoding.c, + content_encoding.h, cookie.c, cookie.h, curl_memory.h, curlx.h, + dict.c, dict.h, easy.c, escape.c, escape.h, file.c, file.h, + formdata.c, formdata.h, ftp.c, ftp.h, getdate.c, getdate.h, + getenv.c, getinfo.c, getinfo.h, hash.c, hash.h, hostares.c, + hostasyn.c, hostip.c, hostip.h, hostip4.c, hostip6.c, hostsyn.c, + hostthre.c, http.c, http.h, http_chunks.c, http_chunks.h, + http_digest.c, http_digest.h, http_negotiate.c, http_negotiate.h, + http_ntlm.c, http_ntlm.h, if2ip.c, if2ip.h, inet_ntoa_r.h, + inet_ntop.c, inet_ntop.h, inet_pton.c, inet_pton.h, krb4.c, + krb4.h, ldap.c, ldap.h, llist.c, llist.h, md5.c, md5.h, + memdebug.c, memdebug.h, mprintf.c, multi.c, netrc.c, netrc.h, + nwlib.c, progress.c, progress.h, security.c, security.h, sendf.c, + sendf.h, setup.h, share.c, share.h, speedcheck.c, speedcheck.h, + ssluse.c, ssluse.h, strequal.c, strequal.h, strerror.c, + strerror.h, strtok.c, strtok.h, strtoofft.c, strtoofft.h, + telnet.c, telnet.h, timeval.c, timeval.h, transfer.c, transfer.h, + url.c, url.h, urldata.h, version.c, CMakeLists.txt, config.h.in, + curl.copyright, CMake/CheckTypeSize.c.in, + CMake/CheckTypeSize.cmake, CMake/CurlTests.c, + Platforms/WindowsCache.cmake, Platforms/config-aix.h, + Testing/CMakeLists.txt, Testing/curlgtk.c, Testing/curltest.c, + Testing/ftpget.c, Testing/ftpgetresp.c, Testing/ftpupload.c, + Testing/getinmemory.c, Testing/http-post.c, Testing/httpput.c, + Testing/multithread.c, Testing/persistant.c, Testing/postit2.c, + Testing/sepheaders.c, Testing/simple.c, Testing/simplessl.c, + Testing/testconfig.h.in, Testing/win32sockets.c, curl/curl.h, + curl/curlver.h, curl/easy.h, curl/mprintf.h, curl/multi.h, + curl/stdcheaders.h, curl/types.h: ENH: Initial import + +2005-06-24 05:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-23 16:06 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: ENH: Make iterators const + +2005-06-23 13:07 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Perform second test if + subversion exists + +2005-06-23 13:04 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildCommand.cxx, CTest/cmCTestBuildHandler.cxx, + CTest/cmCTestConfigureCommand.cxx, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageCommand.cxx, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestHandlerCommand.cxx, CTest/cmCTestHandlerCommand.h, + CTest/cmCTestMemCheckCommand.cxx, CTest/cmCTestMemCheckCommand.h, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestSubmitCommand.cxx, CTest/cmCTestSubmitHandler.cxx, + CTest/cmCTestSubmitHandler.h, CTest/cmCTestTestCommand.cxx, + CTest/cmCTestTestCommand.h, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestUpdateCommand.cxx, CTest/cmCTestUpdateHandler.cxx, + kwsys/CTestConfig.cmake: ENH: Several improvements with the way + things are handled. Also, support multiple submited files + +2005-06-23 12:34 martink + + * Source/cmMacroCommand.cxx: COMP: fix compiler warnings + +2005-06-23 11:03 martink + + * Source/: cmForEachCommand.cxx, cmIfCommand.cxx, + cmMacroCommand.cxx, cmWhileCommand.cxx: ENH: converted macro to + use variables and fixed some case issues with some function + blockers + +2005-06-23 10:25 king + + * Source/kwsys/hashtable.hxx.in: ENH: Added some smaller primes to + allow small hash table sizes and therefore shorter initial + construction times. + +2005-06-23 05:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-22 14:20 martink + + * Source/cmForEachCommand.h: STYLE: updated the docs to be more + accurate + +2005-06-22 14:16 martink + + * Source/cmForEachCommand.cxx: COMP: fix possible poroblem with + freed memory + +2005-06-22 14:04 martink + + * Source/cmForEachCommand.cxx: COMP: fix unused variable + +2005-06-22 13:32 martink + + * Source/cmForEachCommand.cxx: ENH: changed FOREACH to use + variables instead of string replacement + +2005-06-22 10:54 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Fix displaying of + percentage + +2005-06-22 10:09 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: clean rule wasn't + cleaning libs and executables + +2005-06-22 09:12 martink + + * Source/cmTarget.cxx: ENH: some better checks + +2005-06-22 09:06 martink + + * Source/: cmExportLibraryDependencies.cxx, cmGlobalGenerator.cxx, + cmGlobalKdevelopGenerator.cxx, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakeDepend.cxx, + cmMakeDepend.h, cmMakefile.cxx, cmMakefile.h, + cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h, + cmTarget.cxx, cmTarget.h: ENH: make LOCATION an computed property + of the target and get rid of a bunch of const junk + +2005-06-22 05:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-21 16:44 andy + + * Source/cmCommandArgumentParserHelper.cxx: ENH: Remove stray abort + +2005-06-21 16:29 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: fix for BSD makes no + longer use dir name as a target + +2005-06-21 14:20 king + + * Source/cmTryRunCommand.cxx: BUG: Fixed error message formatting + when try run executable command cannot be found. + +2005-06-21 11:01 andy + + * Source/cmCommandArgumentParserHelper.cxx: BUG: Fix escaping to + make OSX work again + +2005-06-21 10:33 king + + * Source/kwsys/testProcess.c: BUG: Use sleep(1) instead of + usleep(1000000) because some UNIX systems specify that the + argument to usleep must be less than 1000000. + +2005-06-21 09:34 martink + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: add test to make sure + custom commands are used + +2005-06-21 05:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-20 17:57 andy + + * Source/cmCTest.cxx: ENH: Initialize handler before processing it + +2005-06-20 17:37 andy + + * Source/CursesDialog/.NoDartCoverage: ENH: Until there is some + test for curses dialog, no need to do coverage + +2005-06-20 16:31 martink + + * Modules/: Dart.cmake, TestCXXAcceptsFlag.cmake, + Platform/Darwin.cmake: ENH: fixed some spelling errors + +2005-06-20 16:24 martink + + * Source/cmMakefile.cxx: BUG: goof in new feature fixed + +2005-06-20 14:15 martink + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: removed unused files + +2005-06-20 14:00 martink + + * Docs/CMake04.rtf, Source/cmGetTargetPropertyCommand.cxx, + Source/cmGetTargetPropertyCommand.h, Source/cmGlobalGenerator.h, + Source/cmMakefile.cxx: ENH: modified GET_TARGET_PROPERTIES to + work with all targets + +2005-06-20 13:49 barre + + * Source/kwsys/testSystemTools.cxx: ENH: fix test, it has to return + a true/false value otherwise it just passes the test, and add + test for EscapeChars + +2005-06-20 13:10 martink + + * Modules/: TestBigEndian.cmake, UseSWIG.cmake: BUG: fix some + missing quotes for STREQUAL IF statements + +2005-06-20 12:55 martink + + * Modules/CMakeGenericSystem.cmake: ENH: adde dback in + CMAKE_VERBOSE_MAKEFILE that was acc removed + +2005-06-20 11:54 king + + * Source/cmSetTargetPropertiesCommand.h: ENH: Added documentation + of VERSION and SOVERSION properties. + +2005-06-20 11:53 martink + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h: ENH: no longer used + +2005-06-20 11:49 martink + + * Tests/COnly/CMakeLists.txt: COMP: converted to lowercase commands + +2005-06-20 11:47 martink + + * Docs/cmake-mode.el: ENH: updated emacs mode to include lowercase + commands and missing command ENDMACRO + +2005-06-20 08:59 martink + + * Source/CTest/cmCTestTestHandler.cxx: COMP: see about fixing + warning + +2005-06-20 07:42 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Skip svn test for now + +2005-06-20 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-19 06:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-18 05:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-17 23:15 andy + + * Source/CMakeLists.txt: COMP: Fix problems with old cmake + +2005-06-17 15:50 andy + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.in.l, + cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h, cmListFileCache.cxx, + cmMakefile.cxx, cmMakefile.h: ENH: Improve handling of escaped + characters + +2005-06-17 15:44 andy + + * Source/CMakeLists.txt: ENH: Pass ctest config type to + subprocesses + +2005-06-17 15:43 andy + + * Source/CTest/cmCTestTestHandler.cxx: ENH: Pass configuration type + to subprocesses + +2005-06-17 14:13 king + + * Source/kwsys/CMakeLists.txt: ENH: Enabling new test 7 of process + execution. + +2005-06-17 14:07 king + + * Source/kwsys/Process.h.in: ENH: Added polling feature to + documentation of WaitForData. + +2005-06-17 14:05 king + + * Source/kwsys/ProcessWin32.c: BUG: Fixed polling feature of + WaitForData. + +2005-06-17 13:59 king + + * Source/kwsys/testProcess.c: ENH: Added test 7 to expose problems + with polling by WaitForData. + +2005-06-17 13:57 king + + * Source/kwsys/ProcessUNIX.c: BUG: Fixed polling capability of + WaitForData. + +2005-06-17 13:14 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Make CVS one nightly + +2005-06-17 13:07 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Add subversion test + +2005-06-17 13:04 andy + + * Source/: cmCTest.cxx, cmCTest.h, cmCommand.h, cmObject.h, + cmStandardIncludes.h, CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildAndTestHandler.h, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestBuildHandler.h, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestConfigureHandler.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestGenericHandler.h, CTest/cmCTestMemCheckHandler.cxx, + CTest/cmCTestMemCheckHandler.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestSubmitHandler.cxx, CTest/cmCTestSubmitHandler.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestTestHandler.h, + CTest/cmCTestUpdateCommand.cxx, CTest/cmCTestUpdateHandler.cxx, + CTest/cmCTestUpdateHandler.h: ENH: Add superclass for all + commands and handlers. Improve handlers to have initialization + code, and start initializing ctest when start is invoked + +2005-06-17 11:46 malaterre + + * Source/kwsys/CommandLineArguments.hxx.in: ENH: Fix Bug #1950, + provide a direct access to the input. Minor cleanup (convenience) + +2005-06-17 09:49 king + + * Source/: cmCMakeMinimumRequired.cxx, cmMakefile.h, cmVersion.h: + ENH: Enabling ability for CMAKE_MINIMUM_REQUIRED version to + include patch level. Submitted by Alexander Neundorf. + +2005-06-17 08:45 andy + + * Tests/MacroTest/CMakeLists.txt: ENH: Fix test on HP + +2005-06-17 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-16 16:42 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: When running the same + ctest as the one we are testing, make sure to run as separate + process + +2005-06-16 16:33 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Add extra argument + +2005-06-16 16:24 andy + + * Source/cmCTest.cxx, Tests/CTestTest3/test.cmake.in: ENH: Return + error if there is an ERROR_MESSAGE. Also fix tag for the test + +2005-06-16 15:44 andy + + * Source/cmCommand.h: COMP: Fix build error on Windows + +2005-06-16 14:56 andy + + * Source/CMakeLists.txt, Tests/MacroTest/CMakeLists.txt, + Tests/MacroTest/macroTest.c: ENH: Add test of macro + +2005-06-16 14:56 andy + + * Source/: cmake.cxx, cmake.h: ENH: Before running configre, remove + all macros. Also, backup the command names. Also, make command + names case insensitive + +2005-06-16 14:05 andy + + * Source/: cmCommand.h, cmConfigureFileCommand.h, + cmFLTKWrapUICommand.h, cmQTWrapCPPCommand.h, cmQTWrapUICommand.h, + cmUseMangledMesaCommand.h, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h: ENH: Add + classname to commands + +2005-06-16 13:29 andy + + * Tests/CTestTest3/test.cmake.in: ENH: Initial import + +2005-06-16 13:18 andy + + * Source/CMakeLists.txt, Source/cmCTest.cxx, Source/cmCTest.h, + Source/CTest/cmCTestBuildCommand.cxx, + Source/CTest/cmCTestCommand.h, + Source/CTest/cmCTestGenericHandler.h, + Source/CTest/cmCTestStartCommand.cxx, + Source/CTest/cmCTestSubmitCommand.cxx, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestUpdateCommand.cxx, + Source/CTest/cmCTestUpdateHandler.cxx, + Tests/CTestTest2/test.cmake.in: ENH: Several improvements to + CTest: + + 1. Support for showing line numbers when debugging ctest + --show-line-numbers 2. Modify the ctest initialization code, so + that it can be delayed 3. Handlers now have corresponding command + if they were invoked from the command (so far only update + actually use that) 4. Start command is simplified and the + functionality is moved to CTest 5. Update can perform initial + checkout if CTEST_CHECKOUT_COMMAND is set 6. Add test that checks + out kwsys and perform tests on the fresh checkout + +2005-06-16 11:52 martink + + * Source/CMakeLists.txt: ENH: add first cut at support for exe with + same name as lib + +2005-06-16 11:48 martink + + * Source/: cmSetTargetPropertiesCommand.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: add first cut at support + for exe with same name as lib + +2005-06-16 11:47 martink + + * Tests/SameName/: CMakeLists.txt, Exe1/CMakeLists.txt, + Exe1/conly.c, Lib1/CMakeLists.txt, Lib1/libc1.c, Lib1/libc1.h: + ENH: add same name test + +2005-06-16 10:23 martink + + * Source/cmITKWrapTclCommand.cxx: ENH: replace brackets with more + generic find + +2005-06-16 10:22 martink + + * Source/cmOrderLinkDirectories.cxx: ENH: make more specific in + reject self linking + +2005-06-16 05:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-15 15:51 andy + + * Source/cmCommand.h: ENH: Add accessor for Makefile and make + SetError public + +2005-06-15 15:29 hoffman + + * CTestConfig.cmake: ENH: add for testing + +2005-06-15 10:54 andy + + * Tests/CTestTest2/test.cmake.in: BUG: Fix typo + +2005-06-15 10:53 andy + + * Source/CTest/: cmCTestMemCheckCommand.cxx, + cmCTestMemCheckHandler.cxx: ENH: Pass in memcheck command options + and suppresions, and change skin to tool + +2005-06-15 10:53 andy + + * Source/CTest/cmCTestCoverageCommand.cxx: ENH: Handle passing in + coverage command + +2005-06-15 08:54 andy + + * Source/CMakeLists.txt: ENH: Add logging to improve coverage + +2005-06-15 05:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-14 15:53 andy + + * Utilities/.NoDartCoverage: ENH: No need to do coverage of + utilities + +2005-06-14 15:49 andy + + * Source/: cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: ENH: More cleanups + +2005-06-14 14:01 andy + + * Tests/CTestTest2/test.cmake.in: ENH: Also perform memory checking + and coverage + +2005-06-14 14:00 andy + + * Source/: CMakeLists.txt, CTest/cmCTestCoverageCommand.cxx, + CTest/cmCTestCoverageCommand.h, CTest/cmCTestMemCheckCommand.cxx, + CTest/cmCTestMemCheckCommand.h, CTest/cmCTestScriptHandler.cxx: + ENH: Add commands for memory checking and coverage + +2005-06-14 13:22 andy + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.in.l: + ENH: Improve variable name regular expression + +2005-06-14 12:48 andy + + * Source/: cmMacroCommand.cxx, cmake.cxx, cmake.h: ENH: Save + command that macro overwrites + +2005-06-14 11:42 andy + + * Source/: cmCTest.cxx, cmCTest.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestUpdateHandler.cxx: + ENH: Separate standard output and standard error for problematic + commands + +2005-06-14 03:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-13 18:03 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: add + method to escape some chars in a string + +2005-06-13 14:29 andy + + * Source/cmCommandArgumentParserHelper.cxx: ENH: Handle + non-existing variables + +2005-06-13 11:00 andy + + * bootstrap, Source/CMakeLists.txt, Source/cmMakefile.cxx: ENH: Use + the new parser that supports nested variables + +2005-06-13 10:27 andy + + * Source/: cmCommandArgumentParser.cxx, cmCommandArgumentParser.y: + ENH: More cleanups + +2005-06-13 10:11 andy + + * Source/: cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: ENH: More optimization + +2005-06-13 10:01 andy + + * Source/: cmCommandArgumentLexer.cxx, cmCommandArgumentLexer.h, + cmCommandArgumentParser.cxx, cmCommandArgumentParserTokens.h: + ENH: Initial import + +2005-06-13 10:00 andy + + * Source/: cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: ENH: Handle errors and optimize + a bit + +2005-06-13 10:00 andy + + * Source/cmCommandArgumentLexer.in.l: ENH: Remove some allocations + +2005-06-13 09:59 andy + + * Source/cmCommandArgumentParser.y: ENH: Rearange and cleanup + +2005-06-13 09:33 martink + + * Source/: cmConfigureFileCommand.cxx, cmConfigureFileCommand.h: + ENH: made configure file immediate by default for 2.2 or later + +2005-06-12 03:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-11 03:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-10 11:27 martink + + * Source/cmMakefile.cxx: ENH: remove old 1.2 compatability from + cmake 2.2 + +2005-06-10 10:45 martink + + * Source/cmMakefile.cxx: ENH: remove old 1.2 compatability from + cmake 2.2 + +2005-06-10 10:44 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmake.cxx, cmake.h, + cmLocalGenerator.h: ENH: added support for forcing recomputation + of depends + +2005-06-10 10:09 martink + + * Tests/Wrapping/CMakeLists.txt: ENH: change to work with new FLTK + command + +2005-06-10 10:09 martink + + * Source/: cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h: ENH: + change workings of command so that it can all happing in the + initial pass still works the old way but complains + +2005-06-10 10:08 martink + + * Source/cmAddLibraryCommand.cxx: ENH: allow libs with no sources + but complain + +2005-06-10 09:01 andy + + * Source/: cmCTest.cxx, CTest/cmCTestBuildHandler.cxx: ENH: Be more + verbose + +2005-06-10 08:56 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, + cmCTestConfigureHandler.cxx: ENH: Be more verbose + +2005-06-10 08:40 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: removed old + convert calls + +2005-06-10 02:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-09 14:37 martink + + * bootstrap, Source/cmake.cxx, Source/CMakeLists.txt: ENH: removed + UMG2 + +2005-06-09 14:34 martink + + * Source/cmITKWrapTclCommand.cxx: ENH: deprecate old ITK wrap + command + +2005-06-09 11:46 martink + + * Source/cmGlobalKdevelopGenerator.cxx: BUG: fix KDev gen to call + parent class Generate + +2005-06-09 11:39 martink + + * Source/: cmGlobalKdevelopGenerator.h, + cmLocalKdevelopGenerator.cxx, cmLocalKdevelopGenerator.h: ENH: + make KDev sub off of Gen3 + +2005-06-09 11:33 martink + + * Source/cmTarget.cxx: ENH: removed old 1.2 compatability + +2005-06-09 11:23 martink + + * Tests/Wrapping/CMakeLists.txt: ENH: no longer test ITK command + +2005-06-09 09:48 andy + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: some better error + reporting and more robust handlign of bad targets + +2005-06-09 08:19 king + + * Source/kwsys/Configure.h.in: COMP: Disable more warnings. + +2005-06-09 08:18 king + + * Source/kwsys/kwsys_ios_sstream.h.in: COMP: Fix + no-assignment-operator warning and disable typedef-name synonym + warning. + +2005-06-09 08:03 king + + * Source/kwsys/Configure.h.in: COMP: Disable useless warnings. + +2005-06-09 08:02 king + + * Source/kwsys/Configure.hxx.in: ENH: C++ configuration should + include C configuration. + +2005-06-09 07:51 king + + * Source/kwsys/SystemTools.cxx: COMP: Need windows.h even on cygwin + to get CreateFile API. + +2005-06-09 07:40 king + + * Source/kwsys/RegularExpression.cxx: COMP: Fixed conversion + warnings. + +2005-06-09 04:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-08 16:55 martink + + * Source/cmIncludeCommand.cxx: BUG: fatal error in include file + should not cause report of missing include file + +2005-06-08 16:39 martink + + * Tests/Wrapping/CMakeLists.txt: ENH: remove bad add target + commands + +2005-06-08 16:39 martink + + * Source/: cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx: + ENH: better error checking for add library or executable with no + source files + +2005-06-08 16:31 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: prevent segfault + when no sources provided for lib + +2005-06-08 14:18 andy + + * Source/: cmCommandArgumentLexer.in.l, cmCommandArgumentParser.y, + cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: ENH: Handle more cases + +2005-06-08 14:11 martink + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, Wrapping/CMakeLists.txt: + ENH: remove requirements on 1.2 + +2005-06-08 12:26 martink + + * Tests/: OutOfSource/SubDir/CMakeLists.txt, + Complex/CMakeLists.txt, Complex/Executable/CMakeLists.txt, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + Dependency/CMakeLists.txt, Jump/CMakeLists.txt, + Jump/Library/CMakeLists.txt, PreOrder/CMakeLists.txt, + SimpleInstall/CMakeLists.txt, SimpleInstallS2/CMakeLists.txt, + Testing/CMakeLists.txt: ENH: shift to using ADD_SUBDIRECTORY + +2005-06-08 10:41 andy + + * Source/: cmCommandArgumentLexer.in.l, cmCommandArgumentParser.y, + cmCommandArgumentParserHelper.cxx, + cmCommandArgumentParserHelper.h: ENH: Initial import (not working + yet) + +2005-06-08 09:59 king + + * Docs/cmake-mode.el: ENH: Experimenting with auto-dated copyright. + +2005-06-08 09:52 andy + + * Tests/CTestTest/CMakeLists.txt: ENH: Cleanup + +2005-06-08 04:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-07 12:07 martink + + * Source/cmGlobalVisualStudio7Generator.cxx, + Modules/Platform/Windows-cl.cmake: ENH: fix for incorrect setting + of CONFIZGURATION_TYPES + +2005-06-07 10:55 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Remove debugging code + +2005-06-07 10:47 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, cmake.cxx: ENH: fix + problem with dependency scanning + +2005-06-07 09:57 andy + + * Source/cmLocalGenerator.cxx, Source/kwsys/CMakeLists.txt, + Source/kwsys/ExtraTest.cmake.in, Tests/CTestTest/test.cmake.in, + Tests/CTestTest2/test.cmake.in: ENH: Add capability to include + files to DartTestfile.txt and add example of that + +2005-06-07 09:06 andy + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: ENH: + Use CMake for parsing DartTestfile.txt + +2005-06-07 08:44 king + + * Modules/FindQt.cmake: ENH: Added search locations for a FreeBSD + location. Contributed by Alexander Neundorf. + +2005-06-07 04:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-06 09:23 andy + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: Initialize the + iterator to prevent seg-fault + +2005-06-06 04:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-05 15:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-03 16:10 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestBuildAndTestHandler.cxx, + CTest/cmCTestBuildAndTestHandler.h: ENH: Move the build-and-test + code to a handler + +2005-06-03 14:42 andy + + * Source/CTest/: cmCTestGenericHandler.cxx, + cmCTestGenericHandler.h: ENH: Add a method to parse command line + argument inside the handler + +2005-06-03 14:42 andy + + * Tests/CommandLineTest/CMakeLists.txt: ENH: Test setting of + environment variables + +2005-06-03 14:17 andy + + * Source/cmSetCommand.cxx: BUG: Remove memory leak + +2005-06-03 12:59 martink + + * Source/: cmWrapExcludeFilesCommand.cxx, + cmWrapExcludeFilesCommand.h, cmSourceFilesCommand.cxx, + cmSourceFilesCommand.h, cmSourceFilesRemoveCommand.cxx, + cmSourceFilesRemoveCommand.h: ENH: no longer used + +2005-06-03 12:58 martink + + * Source/cmCommands.cxx: ENH: removed old commands + +2005-06-03 11:29 andy + + * Source/CTest/cmCTestConfigureHandler.cxx: BUG: Remove unused code + +2005-06-03 11:26 martink + + * CTestCustom.ctest.in: ENH: shut up buggy gcc stl header + +2005-06-03 04:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-02 18:10 andy + + * Source/: cmCTest.cxx, ctest.cxx: ENH: Add debug flag + +2005-06-02 16:47 andy + + * Source/: cmCTest.cxx, CTest/cmCTestSubmitHandler.cxx: BUG: Fix + the order of things to make submit handler not crash when proxies + are set + +2005-06-02 15:14 martink + + * Docs/cmake-mode.el: ENH: updated commands + +2005-06-02 15:09 martink + + * Tests/Wrapping/CMakeLists.txt: ENH: removed old command + +2005-06-02 14:56 martink + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: removed old + commands + +2005-06-02 14:48 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: ENH: Cleanup output even + more + +2005-06-02 14:24 martink + + * Source/: cmCommands.cxx, cmAbstractFilesCommand.cxx, + cmAbstractFilesCommand.h: ENH: removed the ABSTRACT_FILES command + +2005-06-02 14:21 martink + + * Docs/cmake-mode.el: ENH: updated to remove ABSTRACT_FILES and add + ADD_SUBDIRECTORY + +2005-06-02 14:10 martink + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: removed use of + ABSTRACT command + +2005-06-02 13:41 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: now also provides obj rules + for local Makefiles + +2005-06-02 12:26 andy + + * Source/CTest/cmCTestBuildHandler.cxx: COMP: Remove compile + warning + +2005-06-02 11:47 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestBuildHandler.h: + ENH: Once the number of errors or warnings was reached, stop + counting them. Also fix compile warning on bad compilers + +2005-06-02 09:35 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: BUG: On windows there are + problems when opening file as ascii + +2005-06-02 04:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-06-01 15:59 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestBuildHandler.h: + ENH: Streamline build process. This reduces the memory footprint, + since only some number of lines of output will be in memory at + the time. Also, this will report the build errors and warnings as + it goes through the build + +2005-06-01 13:37 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: minor perf improvement + +2005-06-01 13:24 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: do not add help + target if there is a real target named help + +2005-06-01 13:19 king + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: Fixed name given + to clean target listing for executable and library targets. + +2005-06-01 11:18 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix warning + +2005-06-01 09:25 andy + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: BUG: Remove duplicate targets + when in different generators + +2005-06-01 08:59 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix warning + +2005-06-01 08:56 martink + + * CTestCustom.ctest.in: COMP: suppress warnings in 3rd party libs + +2005-06-01 08:54 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix warning + +2005-06-01 08:50 martink + + * Source/cmQTWrapUICommand.cxx: COMP: fix warning + +2005-06-01 08:48 martink + + * Source/: cmVariableRequiresCommand.cxx, + cmVariableRequiresCommand.h: ENH: made immediate + +2005-06-01 08:25 andy + + * Source/cmCTest.cxx: ENH: Make CMake --build-and-test to be + verbose by default + +2005-06-01 08:25 andy + + * Source/cmStandardIncludes.h: ENH: Add support for deque + +2005-06-01 03:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-31 18:40 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestSubmitHandler.cxx, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestUpdateHandler.cxx: COMP: Remove ERROR reserved word + or something and replace with ERROR_MESSAGE + +2005-05-31 17:32 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestStartCommand.cxx, CTest/cmCTestSubmitHandler.cxx, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestUpdateHandler.cxx: + ENH: Add support for writing output file. While doing that, + redesign the way ctest does output. There may still be problems + with commands failing, but that should be fixed by applying the + similar concept to whole CMake + +2005-05-31 16:20 martink + + * CTestCustom.ctest.in: ENH: shut up some warning on SGI + +2005-05-31 16:16 martink + + * Utilities/cmxmlrpc/CMakeLists.txt: BUG: shut downgrade XMLRPC + support + +2005-05-31 15:10 martink + + * Source/: cmAddSubDirectoryCommand.cxx, + cmAddSubDirectoryCommand.h: ENH: removed the PREORDER option from + the AddSubDirectory command + +2005-05-31 14:09 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix a waring + +2005-05-31 11:46 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: now uses Makefile2 to + cleanup zsh issues and provided some more documentation + +2005-05-31 10:16 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: STYLE: add some better comments + and remove some unused code + +2005-05-31 04:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-30 17:26 andy + + * Source/cmStandardIncludes.h: ENH: Add support for iomanip + +2005-05-30 04:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-29 04:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-28 08:44 lorensen + + * Source/kwsys/SystemTools.cxx: COMP: warning. + +2005-05-28 04:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-27 22:11 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: add + convenience function to convert Windows command line args into + Unix argc/argv. Pulled and cleaned from PV/VV/VJ init code + +2005-05-27 16:17 andy + + * Source/CTest/cmCTestScriptHandler.cxx: ENH: Use generated file + stream for files + +2005-05-27 11:26 andy + + * DartConfig.cmake: ENH: Dart change + +2005-05-27 04:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-26 18:15 andy + + * Source/CTest/cmCTestSubmitHandler.cxx: ENH: Fix for changes in + XML-RPC for Dart2 + +2005-05-26 17:30 andy + + * Modules/CMakeVS8FindMake.cmake, + Source/MFCDialog/CMakeSetupDialog.cpp: COMP: Fix for support of + VS 8.0 beta 2 + +2005-05-26 04:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-25 15:09 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: added clean target for + subdirs + +2005-05-25 12:22 martink + + * Source/: cmDepends.cxx, cmDepends.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: BUG: a fix for constant + recomputing of depends + +2005-05-25 11:19 andy + + * Source/cmDependsFortran.cxx: ENH: new fortran depends to match + new Unix Gen + +2005-05-25 11:18 martink + + * Source/: cmGlobalUnixMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.h, cmake.cxx: ENH: switch to using + new Unix Makefile generator for Unix as well + +2005-05-25 04:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-24 16:36 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix for directory + of empty depend.make files + +2005-05-24 16:11 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: building libs + caused all generated files to be deleted + +2005-05-24 15:36 martink + + * Source/cmIfCommand.h: STYLE: fix the docs + +2005-05-24 14:42 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: some more cleanup and + changes to how custom commands are stored + +2005-05-24 11:17 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx: ENH: optimization to not use + requires step unless a language requires it + +2005-05-24 10:45 martink + + * Modules/CMakeFortranInformation.cmake: ENH: added requires flag + +2005-05-24 04:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-23 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-22 03:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-21 03:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-20 12:09 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix for empty + custom commands + +2005-05-20 11:01 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: added help target and made + custom commands execute in start output directory + +2005-05-20 08:45 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx: ENH: fix warning and + also add back in build.make + +2005-05-20 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-19 15:55 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: COMP: fix warning + +2005-05-19 15:00 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: fixes for subdir build + Makefiles + +2005-05-19 14:36 andy + + * Modules/Platform/Windows-cl.cmake: ENH: Be more verbose, handle + network paths, and write compiler output to the log files + +2005-05-19 13:32 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: fix warning + +2005-05-19 13:26 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: BUG: fix for bad + depency clearing + +2005-05-19 10:52 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx: ENH: some performance + improvements + +2005-05-19 03:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-18 16:10 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: fix for makes that + do not handle targets wihtout a rule to build them + +2005-05-18 13:46 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmTarget.cxx: ENH: another step + to the next generator still not optimized yet + +2005-05-18 04:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-17 14:39 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: COMP: some warning fixes and + cleanup + +2005-05-17 14:22 andy + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: implemented + provides requires code + +2005-05-17 11:15 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: some more reorg + +2005-05-17 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-16 14:17 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: BUG: + Changing to a new test for whether to do relative path + conversion. Now only paths inside the source or binary trees are + converted. + +2005-05-16 13:42 king + + * Source/kwsys/: ProcessUNIX.c, testProcess.c: ENH: Removing + previous debug code. + +2005-05-16 10:53 martink + + * Source/: cmDependsFortran.cxx, cmLocalUnixMakefileGenerator3.cxx: + ENH: some updates to the provides requires code + +2005-05-15 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-14 04:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-13 15:51 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: ENH: remove duplicate + provide rule for fortran + +2005-05-13 15:50 martink + + * Source/cmLocalGenerator.cxx: COMP: shut up warning + +2005-05-13 14:45 king + + * Source/kwsys/SharedForward.h.in: ENH: Added knowledge of FreeBSD. + +2005-05-13 14:44 king + + * Source/kwsys/: ProcessUNIX.c, testProcess.c: ENH: Adding + debugging code for freebsd. + +2005-05-13 14:13 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: BUG: minor cleanup and + fix for convenience rules + +2005-05-13 14:12 martink + + * Source/cmGlobalGenerator.cxx: BUG: filx for old bug in rel path + computaiton code + +2005-05-13 09:54 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: warning fixes and some + first steps in cleaning up the convert code + +2005-05-13 04:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-12 16:25 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: Undo fix as it broke + the dashboard + +2005-05-12 13:27 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix for bug where + debug, release etc flags were not used for linker options, BUG + 1781 fix + +2005-05-12 11:53 martink + + * bootstrap: ENH: moved gen3 into bootstrap process + +2005-05-12 11:26 martink + + * Source/cmLocalUnixMakefileGenerator3.cxx: COMP: shut up unused + var + +2005-05-12 11:24 martink + + * Source/cmake.cxx: BUG: fix bad generator name + +2005-05-12 10:58 martink + + * Source/CMakeLists.txt: ENH: defer relative paths + +2005-05-12 10:49 martink + + * Source/: CMakeLists.txt, cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator3.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, cmake.cxx: ENH: added new + generator + +2005-05-12 03:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-11 13:16 martink + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmDependsC.h, cmDependsFortran.cxx, cmDependsFortran.h, + cmDependsJava.cxx, cmDependsJava.h, + cmLocalUnixMakefileGenerator2.cxx: ENH: some changes to the + depends signature to be more flexible + +2005-05-11 12:44 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: another snapshot + +2005-05-11 10:19 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: ENH: added + new methods to convert to HomeRelative paths + +2005-05-11 08:45 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: snapshot + +2005-05-11 03:55 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-10 16:41 king + + * Source/kwsys/testProcess.c: ENH: Removing QNX hack for test 6 now + that the problem has been fixed. + +2005-05-10 16:36 king + + * Source/kwsys/ProcessUNIX.c: BUG: struct timeval uses unsigned + types on at least one platform (QNX). Alot of the time logic + assumes a signed type. Switch to using a signed representation + that is converted to the native representation only for system + calls. + +2005-05-10 11:11 andy + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Allow changing of file name + +2005-05-10 11:00 king + + * Source/: cmDependsC.cxx, cmDependsC.h: BUG: Re-implemented + dependency line parsing to deal with quoted paths and escaped + spaces. + +2005-05-10 10:10 andy + + * Source/cmBuildCommand.cxx: ENH: Remove the old code + +2005-05-10 03:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-09 15:11 martink + + * Source/cmGlobalUnixMakefileGenerator3.cxx: ENH: some more fixes + +2005-05-09 08:53 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: some more cleanup + +2005-05-09 03:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-08 13:49 andy + + * Source/CTest/cmCTestSubmitCommand.cxx, + Tests/CTestTest2/test.cmake.in: ENH: Add notes + +2005-05-08 13:48 andy + + * Source/CTest/cmCTestStartCommand.cxx: ENH: Remove error about not + being able to update CTest configuration + +2005-05-08 13:48 andy + + * Source/CTest/: cmCTestBuildCommand.cxx, cmCTestBuildCommand.h: + ENH: Remove memory leak and remember global generator for next + time + +2005-05-08 13:47 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add method so that ctest + handlers and commands can add notes + +2005-05-08 04:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-07 03:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-06 14:49 martink + + * Source/: cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h, + cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h: ENH: updates + +2005-05-06 12:38 king + + * Source/cmake.cxx: COMP: Fixed forced bool conversion warning. + +2005-05-06 09:58 king + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmDependsC.h, cmDependsFortran.cxx, cmDependsFortran.h, + cmDependsJava.cxx, cmDependsJava.h, + cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, cmake.cxx: ENH: Added optional + verbose output to build system dependency check. + +2005-05-06 03:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-05 12:45 martink + + * Source/: cmGlobalUnixMakefileGenerator3.cxx, + cmGlobalUnixMakefileGenerator3.h, + cmLocalUnixMakefileGenerator3.cxx, + cmLocalUnixMakefileGenerator3.h: ENH: backup of work in progress + +2005-05-05 10:40 andy + + * Source/cmMakefile.cxx: BUG: If there is a fatal error, stop + processing list file + +2005-05-05 10:26 king + + * Source/cmGlobalVisualStudio7Generator.cxx: BUG: Added space after + /clean to avoid putting it together with the build configuration. + This fixes the failure of the complext test on the second run in + the same tree. + +2005-05-05 10:19 andy + + * Source/kwsys/CTestConfig.cmake: ENH: Add configuration file for + kwsys + +2005-05-05 10:19 andy + + * Source/CMakeLists.txt, Tests/CTestTest2/CMakeLists.txt, + Tests/CTestTest2/test.cmake.in: ENH: Add new style ctest project + +2005-05-05 10:18 andy + + * Source/CTest/: cmCTestConfigureCommand.cxx, + cmCTestSubmitCommand.cxx: ENH: Add default configure rules for + CMake projects and add default rules for submission + +2005-05-05 10:18 andy + + * Source/CTest/cmCTestScriptHandler.cxx: ENH: Add variable that + holds cmake executable + +2005-05-05 10:17 andy + + * Source/cmCTest.h: ENH: Add accessort for CMake executable + +2005-05-05 09:45 king + + * Source/kwsys/testProcess.c: ENH: Disabling test 6 on QNX until + process killing can be resolved. It will just fail always for + now. + +2005-05-05 09:21 andy + + * Source/cmCTest.cxx: BUG: Fix logic for verbose + +2005-05-05 09:09 king + + * Source/kwsys/hashtable.hxx.in: COMP: Removed unused parameter + warning. + +2005-05-05 09:08 king + + * Source/kwsys/SystemTools.cxx: COMP: Added work-around to avoid + warnings about unreferenced inline functions from SGI termios. + +2005-05-05 09:05 king + + * Source/kwsys/ProcessUNIX.c: COMP: Added initializer to avoid + warning. It is not really needed, though. + +2005-05-05 03:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-04 11:37 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + split that splits on arbitrary separator + +2005-05-04 11:16 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Allow spaces in + update command + +2005-05-04 11:13 andy + + * Source/CTest/: cmCTestBuildCommand.cxx, cmCTestBuildCommand.h, + cmCTestConfigureCommand.cxx, cmCTestConfigureCommand.h, + cmCTestCoverageHandler.cxx, cmCTestSubmitCommand.cxx, + cmCTestSubmitCommand.h, cmCTestTestCommand.cxx, + cmCTestTestCommand.h, cmCTestUpdateCommand.cxx, + cmCTestUpdateCommand.h: ENH: Improve syntax + +2005-05-04 11:13 andy + + * Source/cmGlobalGenerator.cxx: BUG: Fix bootstrap test on machines + with spaces in the path + +2005-05-04 11:12 andy + + * Source/kwsys/SystemTools.hxx.in: ENH: Expose + ConvertToUnixOutputPath + +2005-05-04 03:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-03 15:28 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestStartCommand.cxx: + ENH: Add Site and BuildName, make sure that the rest of the + default -S rule does not happen, and make sure that new tag will + be created + +2005-05-03 15:20 andy + + * Source/cmGlobalGenerator.cxx: ENH: No need to convert to output + path + +2005-05-03 15:19 king + + * Source/: cmDependsFortranLexer.cxx, cmDependsFortranLexer.in.l, + cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l: COMP: Removed + warnings about unreachable code and constant control expressions. + Added the changes to the instructions in the input lex files. + +2005-05-03 14:58 king + + * Source/: cmGeneratedFileStream.h, + cmLocalUnixMakefileGenerator2.h, cmStandardIncludes.h, + cmSystemTools.cxx, CTest/cmCTestUpdateHandler.h, + kwsys/CommandLineArguments.cxx, kwsys/SystemTools.cxx, + kwsys/testhash.cxx: COMP: Added pragma directives for SGI + compilers to avoid useless warnings. + +2005-05-03 14:57 king + + * Source/CursesDialog/: cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx: COMP: Changed while(1) to for(;;) to avoid + warning about constant control expression. + +2005-05-03 14:53 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: COMP: Removed stray + semicolon. + +2005-05-03 14:28 king + + * Source/cmStandardIncludes.h: COMP: Added hack to avoid SGI + termios.h warnings. + +2005-05-03 14:28 king + + * Source/: cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l: COMP: + Need #undef ECHO to avoid conflict with system ECHO definition. + +2005-05-03 14:27 king + + * Source/kwsys/RegularExpression.hxx.in: COMP: Changed type of + regmlen to avoid warnings when other lengths are converted to it. + +2005-05-03 10:02 king + + * Source/kwsys/testProcess.c: ENH: Adding test of running + executable with forward slashes on windows. + +2005-05-03 09:40 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestBuildCommand.cxx, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestConfigureCommand.cxx, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestSubmitCommand.cxx, CTest/cmCTestSubmitHandler.cxx, + CTest/cmCTestTestCommand.cxx, CTest/cmCTestUpdateCommand.cxx, + CTest/cmCTestUpdateHandler.cxx: ENH: Cleanups + +2005-05-03 08:17 andy + + * CTestConfig.cmake, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmCTest.h, Source/CTest/cmCTestBuildHandler.cxx, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestSubmit.cxx, Source/CTest/cmCTestSubmit.h, + Source/CTest/cmCTestSubmitCommand.cxx, + Source/CTest/cmCTestSubmitCommand.h, + Source/CTest/cmCTestSubmitHandler.cxx, + Source/CTest/cmCTestSubmitHandler.h, + Source/CTest/cmCTestTestCommand.cxx, + Source/CTest/cmCTestTestCommand.h: ENH: Promote submit into a + full handler, add test and submit command and do some cleanups + +2005-05-03 04:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-02 15:51 andy + + * CTestConfig.cmake, Source/CTest/cmCTestBuildCommand.cxx, + Source/CTest/cmCTestScriptHandler.cxx: ENH: Make ctest build + command work + +2005-05-02 15:51 andy + + * Source/cmake.h: ENH: Make AddCMakePath public + +2005-05-02 15:50 andy + + * Source/cmGlobalGenerator.h: ENH: Make FindMakeProgram public + +2005-05-02 14:15 andy + + * CTestConfig.cmake, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmCTest.h, Source/CTest/cmCTestBuildCommand.cxx, + Source/CTest/cmCTestBuildCommand.h, + Source/CTest/cmCTestConfigureCommand.cxx, + Source/CTest/cmCTestConfigureCommand.h, + Source/CTest/cmCTestScriptHandler.cxx, + Source/CTest/cmCTestStartCommand.cxx, + Source/CTest/cmCTestUpdateCommand.cxx: ENH: More commands. Start + working on new style ctest configuration + +2005-05-02 03:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-05-01 03:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-30 15:36 andy + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Remove warning + +2005-04-30 04:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-29 12:50 andy + + * Source/cmBuildCommand.cxx: ENH: Try to see if + GenerateBuildCommand produces apropriate result + +2005-04-29 11:49 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h: ENH: Add option to ignore errors. Only + works on make + +2005-04-29 10:11 king + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: COMP: Converting + INSTALL->ALL_BUILD dependency implementation to use the + AddUtility method on a target. This significantly simplifies the + implementation and removes warnings about hiding virtual + functions. + +2005-04-29 10:07 andy + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Remove warning + +2005-04-29 10:06 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make install depend on + all + +2005-04-29 04:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-28 18:34 andy + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: Start working on command that will abstract generating of + build command + +2005-04-28 18:18 andy + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: ENH: Start working on a method + that abstracts generating of build command + +2005-04-28 17:33 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: ENH: Start + working on command that will abstract generating of build command + +2005-04-28 16:21 king + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: ENH: Added dependency from + INSTALL target to ALL_BUILD target so that targets build before + being installed. + +2005-04-28 11:47 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: BUG: Avoid infinite loop during + installation. + +2005-04-28 09:21 king + + * Source/kwsys/testProcess.c: BUG: Extending all timeouts to help + out slower machines. + +2005-04-28 09:14 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Add internal error + +2005-04-28 05:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-27 11:46 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Added dependency + on all for install rule to make sure build is up to date before + installing. This behavior can be disabled by setting + CMAKE_SKIP_INSTALL_ALL_DEPENDENCY to true. + +2005-04-27 11:33 king + + * Source/cmSourceFile.cxx: BUG: Do not leave ../ in the full path + to a source file. Using CollapseFullPath simplifies the code + anyway. + +2005-04-27 10:01 king + + * Source/kwsys/testProcess.c: BUG: Extending timeout of test 6 from + 0.1 seconds to 3 seconds. This should avoid missed signals and + intermittent failures. + +2005-04-27 09:12 king + + * Tests/CustomCommand/CMakeLists.txt: BUG: Use copy to produce + doc1pre.txt instead of echo. The redirection does not like + forward slashes on Win9x. + +2005-04-27 04:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-26 17:11 king + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindThreads.cmake: + BUG: Fix try-compile for sys/prctl.h. It needs to include + sys/types.h first according to the man page. + +2005-04-26 14:12 king + + * Source/CursesDialog/form/CMakeLists.txt, + Source/CursesDialog/form/internal_stdio_core.h.in, + Utilities/cmxmlrpc/CMakeLists.txt, + Utilities/cmxmlrpc/internal_stdio_core.h.in: ENH: Removing + stdio_core hack. A better work-around has been put in + cmStandardIncludes.h. + +2005-04-26 14:11 king + + * Source/cmStandardIncludes.h: COMP: Adding inclusion of stdarg.h + to work-around SGI header bug in 7.4.2m. + +2005-04-26 11:55 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Added pre-build and + post-build test for custom targets. + +2005-04-26 11:31 andy + + * Source/kwsys/SystemTools.cxx: BUG: Looks like std::string changes + the result of c_str() call. This fixes potential problems + +2005-04-26 11:15 andy + + * Source/cmakewizard.h: COMP: Remove warning + +2005-04-26 11:09 andy + + * Source/: cmakewizard.h, CTest/cmCTestUpdateHandler.cxx: COMP: + Remove warnings + +2005-04-26 11:08 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: BUG: Fixed ordering of multiple + commands in a custom target when implemented as custom commands. + Also added support to execute pre-build rules first to be + consistent with makefile generator. + +2005-04-26 08:51 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Added inclusion of + pre-build rules for custom targets. + +2005-04-26 04:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-25 09:59 andy + + * Source/cmLocalGenerator.cxx: COMP: Remove warning + +2005-04-25 03:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-24 16:19 andy + + * Source/cmAddTestCommand.cxx: COMP: Fix problem on compilers that + cannot implicitly convert std::string to cmStdString + +2005-04-24 15:59 andy + + * bootstrap, Source/CMakeLists.txt, Source/cmAddTestCommand.cxx, + Source/cmAddTestCommand.h, Source/cmEnableTestingCommand.cxx, + Source/cmEnableTestingCommand.h, Source/cmGlobalGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmTest.cxx, + Source/cmTest.h: ENH: Improve internal test handling by creating + a test class. Command cmEnableTesting now only sets + CMAKE_TESTING_ENABLED and cmAddTest only adds a test to the list. + The actual test files are written by local generator. This way we + can at some point in the future replace DartTestfile with some + XML file + +2005-04-24 14:28 andy + + * Source/cmCTest.cxx: BUG: The argument is --ctest-config + +2005-04-24 13:57 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Support for modified + and conflicts in subversion + +2005-04-24 13:15 king + + * Source/CursesDialog/form/CMakeLists.txt, + Utilities/cmxmlrpc/CMakeLists.txt: BUG: Older SGI compilers still + have internal/stdio_core.h but do not support #include_next. + We'll have to try-compile to test whether this hack is needed. + +2005-04-24 12:32 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: BUG: Remember if there was + update error + +2005-04-24 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-23 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-22 16:11 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, cmTarget.cxx, cmTarget.h: ENH: + Created cmTarget::GetLibraryNames to replace + cmLocalUnixMakefileGenerator2::GetLibraryNames. Added + cmTarget::GetLibraryCleanNames to be used by + cmLocalUnixMakefileGenerator2. Now when a library is linked both + the shared and static versions are removed from the build tree. + In this way we avoid having both kinds of libraries present when + the user switches BUILD_SHARED_LIBS on/off. This prevents + problems with turning off shared libraries and then expecting the + linker to use the static libraries only to find it is using the + out-of-date shared versions. + +2005-04-22 15:23 king + + * Source/: cmGetTargetPropertyCommand.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, cmTarget.cxx, cmTarget.h: ENH: + Added cmTarget::GetBaseName and cmTarget::GetFullName methods and + removed cmLocalGenerator::GetFullTargetName and + cmLocalUnixMakefileGenerator2::GetBaseTargetName. This + functionality is more sensibly implemented in cmTarget. It is + also needed for an upcoming feature in which both the shared and + static versions of a library will be removed before one is + linked. + +2005-04-22 13:52 king + + * Source/CTest/cmCTestUpdateHandler.cxx: COMP: Commented out unused + variable until the corresponding logic is finished. + +2005-04-22 11:57 king + + * Source/kwsys/: hashtable.hxx.in, kwsys_stl_string.hxx.in: COMP: + Removed line continuation characters from #if lines to avoid + linefeed problems on cygwin. + +2005-04-22 09:44 king + + * Source/kwsys/testProcess.c: BUG: Drastically extending test5's + timeouts to get it to pass when running on a heavily-loaded + machine. + +2005-04-22 09:22 king + + * Source/kwsys/SystemTools.cxx: COMP: Fixed + assignment-in-conditional warning. + +2005-04-22 09:21 king + + * Source/kwsys/CommandLineArguments.cxx: COMP: Fixed constant + conditional warning. + +2005-04-22 09:21 king + + * Source/kwsys/ProcessWin32.c: COMP: Fixed unused parameter and + constant conditional warnings. + +2005-04-22 03:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-21 18:23 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Reorganize a bit and + make sure to report an error if there are modified files or + conflicts + +2005-04-21 17:00 king + + * Source/CursesDialog/form/CMakeLists.txt, + Source/CursesDialog/form/form.h, + Source/CursesDialog/form/internal_stdio_core.h.in, + Utilities/cmxmlrpc/CMakeLists.txt, + Utilities/cmxmlrpc/internal_stdio_core.h.in, + Utilities/cmxmlrpc/xmlrpc.h: COMP: Using a new work-around for + stdarg.h problem on SGI. + +2005-04-21 16:46 king + + * Source/kwsys/hashtable.hxx.in: BUG: Fixed hash_allocator_n size + computation. + +2005-04-21 16:46 king + + * Source/kwsys/testhash.cxx: ENH: Added include-work-around for + hashtable.hxx.in dependency. + +2005-04-21 16:05 king + + * Source/kwsys/: ProcessUNIX.c, ProcessWin32.c: BUG: Do not close + stdout/stderr pipes in parent if they are shared. + +2005-04-21 13:56 king + + * Source/kwsys/SystemTools.hxx.in: COMP: Do not do va_list hack if + there is no std:: namespace. + +2005-04-21 13:47 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, Source/kwsys/hashtable.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx: COMP: Added KWSys + try-compiles KWSYS_STL_HAS_ALLOCATOR_TEMPLATE and + KWSYS_STL_HAS_ALLOCATOR_OBJECTS. Needed for more old-stl support + in the hashtable. + +2005-04-21 09:33 andy + + * Utilities/cmxmlrpc/CMakeLists.txt: COMP: Do not build the file + when wide char is not set since the file would be empty + +2005-04-21 02:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-20 16:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-20 08:53 king + + * Source/kwsys/testProcess.c: BUG: Adjusting timeouts for tests 4 + and 5 to avoid early killing. + +2005-04-19 18:35 andy + + * Utilities/cmxmlrpc/xmlrpc.h: COMP: Attempt to fix problem with + building on SGI + +2005-04-19 18:26 andy + + * Source/: CursesDialog/form/form.h, kwsys/SystemTools.hxx.in: + COMP: Attempt to fix problem with building on SGI + +2005-04-19 11:52 king + + * Source/kwsys/ProcessUNIX.c: BUG: When killing a child all the + pipe read ends should be closed. This will allow a child that is + blocking while waiting to write to the pipe to wake up and + receive the kill signal properly on cygwin. + +2005-04-19 10:52 king + + * Source/kwsys/testProcess.c: BUG: Expanded difference in timeouts + between tests 4 and 5 so that 5 does not timeout while waiting + for 4 to timeout. This should fix the intermittent failure of + test 5 on cygwin. ENH: When a mismatch is reported it now + reports what it was as well as what it should have been. + +2005-04-19 09:52 king + + * Utilities/cmxmlrpc/xmlrpc_data.c: COMP: Fix MAKE_WCS_BLOCK_NULL + when HAVE_UNICODE_WCHAR is off. + +2005-04-19 09:52 king + + * Utilities/cmxmlrpc/xmlrpc_config.h.in: BUG: Need to use + #cmakedefine for HAVE_UNICODE_WCHAR. + +2005-04-19 09:52 king + + * Utilities/cmxmlrpc/CMakeLists.txt: BUG: Do not provide + HAVE_UNICODE_WCHAR option if wchar.h is not available. + +2005-04-15 18:57 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: BUG: For some reason the + non-template allocator test compiles on VS6 even though its + allocator is a template. Adding ::size_type to be sure it + accesses a member of the allocator. + +2005-04-15 18:49 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: BUG: Fix iterator traits + test to use a real iterator instead of int*. + +2005-04-15 16:10 king + + * Source/kwsys/CMakeLists.txt: BUG: Cannot use Win32 implementation + for cygwin processes because then cygwin paths to executables + like /usr/bin/ls are not found. + +2005-04-15 16:00 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, Source/kwsys/hash_fun.hxx.in, + Source/kwsys/hashtable.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Source/kwsys/kwsys_cstddef.hxx.in: COMP: Added + KWSYS_CXX_HAS_CSTDDEF try-compile to KWSys to provide + kwsys/cstddef header (to get size_t for hash_fun.hxx). + +2005-04-15 15:30 king + + * Source/kwsys/: hash_map.hxx.in, hash_set.hxx.in, + hashtable.hxx.in: COMP: Replaced kwsys_stl with + @KWSYS_NAMESPACE@_stl to properly use the configured namespace. + +2005-04-15 15:18 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: move + convenience method to get OS name and version from KWApp to + KWSys. + +2005-04-15 14:47 andy + + * Source/cmCTest.cxx: STYLE: Fix english + +2005-04-15 13:56 king + + * Source/kwsys/SystemTools.cxx: BUG: Added missing variable + initialization that was accidentally removed on the previsous + commit. + +2005-04-15 13:35 king + + * Source/kwsys/CMakeLists.txt: ENH: Changing kwsysProcess + implementation on Cygwin to use the Win32 implementation instead + of the UNIX implementation. This makes dealing with misbehaving + children work better. The KWSys Win32 process implementaion is + more robust than the Cygwin implementation (partly because it + doesn't have to exactly reproduce the POSIX api). + +2005-04-15 10:46 hoffman + + * Source/cmTryCompileCommand.cxx: BUG: work around for buggy Tigger + OSX systems that read two copies of the same file in a directory + +2005-04-15 09:54 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, Source/kwsys/hash_map.hxx.in, + Source/kwsys/hash_set.hxx.in, Source/kwsys/hashtable.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx: ENH: Added KWSys + try-compiles KWSYS_STL_HAS_ITERATOR_TRAITS, + KWSYS_STL_HAS_ITERATOR_CATEGORY, + KWSYS_STL_HAS___ITERATOR_CATEGORY, and + KWSYS_STL_HAS_ALLOCATOR_NONTEMPLATE to get the hash table to + compile on old HP and Sun compilers. + +2005-04-15 09:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-15 09:05 king + + * Source/kwsys/hash_map.hxx.in: COMP: Replacing _Select1st with a + specialized hash_select1st that avoids requiring the stl pair to + have first_type defined. The old HP STL does not define + first_type and second_type in its pair. + +2005-04-15 08:59 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, Source/kwsys/hashtable.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx: ENH: Added + KWSYS_CXX_HAS_ARGUMENT_DEPENDENT_LOOKUP try-compile to KWSys. + Needed to optionally bring hash table comparison operators into + the global namespace when argument dependent lookup is not + supported. + +2005-04-15 08:25 king + + * Source/kwsys/SystemTools.cxx: COMP: Removed extra variable + initializations to avoid Borland warnings. + +2005-04-14 04:50 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-13 23:04 king + + * Source/kwsys/: hash_map.hxx.in, hash_set.hxx.in, + hashtable.hxx.in: COMP: Remove friend templates and always use + template friends (possibly with <>). Needed to work-around Sun + CC bug. + +2005-04-13 23:03 king + + * Source/kwsys/testSystemTools.cxx: COMP: Disable MSVC debug symbol + truncation warning. + +2005-04-13 18:13 andy + + * Source/cmGeneratedFileStream.cxx: ENH: For sanity, create + directory before creating generated file stream + +2005-04-13 17:58 king + + * Source/CMakeLists.txt: BUG: The test1 executable has been removed + from kwsys. Instead using testIOS for the kwsys test. + +2005-04-13 16:58 king + + * Source/kwsys/CMakeLists.txt: STYLE: Renaming kwsys-hash test to + kwsys-testhash for consistency with other tests. + +2005-04-13 16:55 king + + * Source/kwsys/testProcess.c: COMP: Removing return value from + test6. It is an infinite loop, so the return causes warnings. + It will never return anyway. + +2005-04-13 16:47 king + + * Source/kwsys/: CMakeLists.txt, test1.cxx: ENH: Removing old + test1.c Process execution example. It is fully replaced by + testProcess. + +2005-04-13 16:46 king + + * Source/kwsys/: Base64.c, CommandLineArguments.cxx, Directory.cxx, + ProcessUNIX.c, ProcessWin32.c, RegularExpression.cxx, + SystemTools.cxx, test1.cxx, testCommandLineArguments.cxx, + testIOS.cxx, testProcess.c, testSystemTools.cxx, testhash.cxx: + COMP: Adding work-around for CMake dependency scanning + limitation. Any configured header included by KWSYS_HEADER() in + a .c or .cxx file in kwsys itself must use this hack to get + dependencies. + +2005-04-13 16:35 andy + + * Source/: cmMakefile.cxx, cmSourceFile.cxx, cmSourceFile.h: ENH: + Speedup by storing source name without last extension + +2005-04-13 16:34 andy + + * Source/cmTarget.cxx: ENH: Speedup by only getting the source once + +2005-04-13 16:25 andy + + * Source/cmSystemTools.cxx: ENH: Improve performance by using + vector of char instead of string + +2005-04-13 16:05 king + + * Source/kwsys/testSystemTools.cxx: BUG: Only do ~ test if HOME + variable is defined. + +2005-04-13 15:57 king + + * Source/kwsys/testProcess.c: BUG: Avoid error diagnostic popups on + windows for test that crashes on purpose. + +2005-04-13 15:39 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, Source/kwsys/hashtable.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cxx: COMP: Added + KWSYS_STL_HAS_ALLOCATOR_MAX_SIZE_ARGUMENT check for non-standard + argument to stl allocator<>::max_size method. Needed for kwsys + hashtable to compile on Sun CC. + +2005-04-13 15:29 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: BUG: + allocator<>::rebind<> test should use kwsys_stl::allocator, not + std::allocator. + +2005-04-13 15:22 king + + * Source/kwsys/hashtable.hxx.in: COMP: Fix for Sun CC stl allocator + signature of allocate method. + +2005-04-13 15:04 king + + * Source/kwsys/hashtable.hxx.in: BUG: When constructing the bucket + vector type the allocator given must have been rebound to _Node* + already because GCC 3.4's vector type does not rebind it. + +2005-04-13 14:43 king + + * Source/cmTryCompileCommand.cxx: ENH: Added better error message + when TRY_COMPILE does not recognize an extension. + +2005-04-13 14:37 king + + * Source/kwsys/SystemTools.cxx: BUG: Fix GetFilenameName to not use + uninitialized search position in win32 version. + +2005-04-13 14:13 king + + * bootstrap: BUG: Added more try-compiles from kwsys. + +2005-04-13 14:13 king + + * Source/kwsys/kwsysPlatformCxxTests.cxx: BUG: Fixed member + template test to not produce a test program that crashes when it + runs. + +2005-04-13 13:59 andy + + * Source/kwsys/SystemTools.cxx: ENH: Speedup improvements + +2005-04-13 13:57 andy + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, Process.h.in, + ProcessUNIX.c, ProcessWin32.c, test1.cxx, + testCommandLineArguments.cxx, testIOS.cxx, testProcess.c, + testSystemTools.cxx, testhash.cxx: ENH: Do kwsys testing as part + of cmake testing, command line arguments are not experimental and + add simple test for systemtools + +2005-04-13 13:43 hoffman + + * Utilities/Release/cmake_release.sh: BUG: fix clean action + +2005-04-13 12:44 hoffman + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: Move minor + version to 2.0.6 + +2005-04-13 09:54 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + kwsys/SystemTools.cxx: BUG: fix insert for 64 bit + +2005-04-13 08:08 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, hash_fun.hxx.in, + hash_map.hxx.in, hash_set.hxx.in, hashtable.hxx.in, + kwsysPlatformCxxTests.cxx, testhash.cxx: ENH: Adding SGI hash_map + and hash_set implementation ported from STL to KWSys. This also + adds try-compiles for KWSYS_STL_HAS_ALLOCATOR_REBIND, + KWSYS_CXX_HAS_FULL_SPECIALIZATION, + KWSYS_CXX_HAS_MEMBER_TEMPLATES, and + KWSYS_CXX_HAS_NULL_TEMPLATE_ARGS. + +2005-04-13 08:05 king + + * Source/kwsys/kwsys_stl.hxx.in: ENH: Added + __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL fix from vtkstd. + +2005-04-13 04:39 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-12 15:40 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix Ambiguity in + insert call + +2005-04-12 15:11 hoffman + + * Source/cmLocalGenerator.cxx: BUG: add missing header for borland + +2005-04-12 13:33 king + + * Source/kwsys/SystemTools.cxx: COMP: Fixed ambiguous call to + insert method of string. + +2005-04-12 13:27 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalVisualStudio7Generator.cxx, cmMacroCommand.cxx, + cmMakefile.cxx, cmMakefile.h: ENH: performance improvements + +2005-04-12 13:26 hoffman + + * Source/cmDepends.cxx: ENH: do not collapse full path for cwd + +2005-04-12 13:26 hoffman + + * Source/cmCacheManager.cxx: ENH: make regex static so it is not + recomputed for each line of the cache + +2005-04-12 13:25 hoffman + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: + optimization of cwd and do not leak library handle + +2005-04-12 09:36 martink + + * Source/cmLocalGenerator.cxx: BUG: local gen was setting proj dir + when it shouldnt + +2005-04-12 09:35 martink + + * Tests/OutOfSource/OutOfSourceSubdir/CMakeLists.txt: ENH: also + test for correct Proj dir settings + +2005-04-12 03:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-11 12:38 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx: BUG: fix GetLongPathName + for all versions of windows + +2005-04-11 12:20 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix GetLongPathName for + WindowsNT + +2005-04-11 04:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-10 04:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-09 02:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-08 12:46 hoffman + + * Source/: cmOrderLinkDirectories.cxx, cmOrderLinkDirectories.h: + BUG: handle case insensitive library extensions on windows + +2005-04-08 08:34 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix build on mingw + +2005-04-08 02:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-07 17:39 hoffman + + * Source/cmakemain.cxx: BUG: move fix for -E option to branch + +2005-04-07 17:24 hoffman + + * Tests/CommandLineTest/CMakeLists.txt: merge from main tree fix + for command line test + +2005-04-07 17:22 hoffman + + * Source/cmCTest.cxx: BUG: add error checking on GetLongPath + +2005-04-07 17:20 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: if short path or long path + fails return the original input + +2005-04-07 16:58 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: check return value of + GetLongPath + +2005-04-07 16:12 hoffman + + * ChangeLog.manual, Source/cmSystemTools.cxx, + Source/cmWin32ProcessExecution.cxx, + Source/cmWin32ProcessExecution.h: Merge in fix for win32 process + stuff + +2005-04-07 16:09 hoffman + + * Modules/Platform/Darwin.cmake, Source/cmGlobalXCodeGenerator.cxx: + ENH: fix install test with xcode, the xcode generator does not + support library versioning yet + +2005-04-07 15:09 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Avoid converting + the subdirectory name to a relative path twice. + +2005-04-07 14:41 king + + * Source/cmMakefile.cxx: BUG: Do not repeat paths when trying the + lib/ to lib64/ replacement. + +2005-04-07 14:30 king + + * Source/cmMakefile.cxx: ENH: Adding automatic generation of + several 64-bit search path forms. + +2005-04-07 14:27 king + + * Modules/: CMakeDetermineJavaCompiler.cmake, FindAVIFile.cmake, + FindFLTK.cmake, FindGLUT.cmake, FindGTK.cmake, FindJNI.cmake, + FindJPEG.cmake, FindJava.cmake, FindMPEG.cmake, FindMPEG2.cmake, + FindOpenGL.cmake, FindPHP4.cmake, FindPNG.cmake, + FindPerlLibs.cmake, FindPythonLibs.cmake, FindQt.cmake, + FindRuby.cmake, FindSDL.cmake, FindSWIG.cmake, FindTCL.cmake, + FindTIFF.cmake, FindX11.cmake, FindZLIB.cmake: ENH: Removing + extra 64-bit search paths. They are now constructed + automatically from the paths listed. + +2005-04-07 13:48 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Fix rule name for + subdirectory traversal to use relative paths. This was broken by + the recent subdirectory changes. + +2005-04-07 13:46 king + + * Modules/: CMakeDetermineJavaCompiler.cmake, FindAVIFile.cmake, + FindFLTK.cmake, FindGLUT.cmake, FindGTK.cmake, FindJNI.cmake, + FindJPEG.cmake, FindJava.cmake, FindMPEG.cmake, FindMPEG2.cmake, + FindOpenGL.cmake, FindPHP4.cmake, FindPNG.cmake, + FindPerlLibs.cmake, FindPythonLibs.cmake, FindQt.cmake, + FindRuby.cmake, FindSDL.cmake, FindSWIG.cmake, FindTCL.cmake, + FindTIFF.cmake, FindX11.cmake, FindZLIB.cmake: ENH: Adding + support for 64-bit library paths. Contributed by Peter Vanroose. + +2005-04-07 13:03 hoffman + + * Source/: CTest/cmCTestBuildHandler.cxx, kwsys/SystemTools.cxx, + kwsys/SystemTools.hxx.in: BUG: fix for bug 1717 incorrect path + sent to dart server + +2005-04-07 12:44 hoffman + + * Source/cmCTest.cxx: BUG: remove debug statement + +2005-04-07 12:12 hoffman + + * ChangeLog.manual, Source/cmSystemTools.cxx, + Source/cmSystemTools.h: move fix for relative paths from main + tree + +2005-04-07 12:11 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx: BUG: fix for bug 1717 use + the correct path for Dart server on warnings and errors + +2005-04-07 10:37 hoffman + + * ChangeLog.manual, Source/cmInstallProgramsCommand.cxx, + Source/cmInstallProgramsCommand.h: move from main tree + +2005-04-07 02:31 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-06 16:53 king + + * Modules/Dart.cmake: STYLE: Fixed spelling of "memmory". + +2005-04-06 16:15 king + + * Source/cmStandardIncludes.h: BUG: Avoid duplicate definition by + using cmsys_STL_STRING_NEQ_CHAR_DEFINED and + cmsys_STL_STRING_NO_NEQ_CHAR. + +2005-04-06 16:14 king + + * Source/kwsys/kwsys_stl_string.hxx.in: ENH: Added proper + namespaced version of KWSYS_STL_STRING_ISTREAM_DEFINED, + KWSYS_STL_STRING_OSTREAM_DEFINED, and + _STL_STRING_NEQ_CHAR_DEFINED macros. + +2005-04-06 15:06 king + + * Modules/Platform/Darwin-xlc.cmake, Modules/Platform/Darwin.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, + Tests/Fortran/CMakeLists.txt, + Tests/MakeClean/ToClean/CMakeLists.txt: ENH: Removed + CMAKE_GENERATOR_NEW now that the old unix makefile generator is + never used. + +2005-04-06 13:34 king + + * bootstrap: BUG: The bootstrap script should perform the + KWSYS_STL_STRING_HAVE_NEQ_CHAR test for kwsys. + +2005-04-06 11:56 hoffman + + * Source/cmMakefile.cxx: ENH: better fix for 64 bit, add 64 to the + name of all directories in the search path + +2005-04-06 10:59 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: allow sub projects to use + targets that are not part of the sub-project + +2005-04-06 09:47 hoffman + + * Source/kwsys/SystemTools.cxx: remove cerr stuff + +2005-04-06 09:44 hoffman + + * Source/kwsys/SystemTools.cxx: Fix bug in != stuff + +2005-04-06 04:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-05 21:10 hoffman + + * Source/kwsys/SystemTools.cxx: COMP: hack fix for old sgi until + bootstrap is fixed + +2005-04-05 17:06 hoffman + + * Modules/CMakeTestCCompiler.cmake, Source/cmMakefile.cxx: BUG: try + to address Bug 1673 . + +2005-04-05 16:24 hoffman + + * Modules/FindOpenGL.cmake: Fix for bug Bug #1287 - cmake use + MesaGL by default instead of libGL - Return to bug list + +2005-04-05 14:48 hoffman + + * Source/cmAuxSourceDirectoryCommand.cxx: BUG: fix for bug 1636 add + extensions to AUX_SOURCE_DIRECTORY files + +2005-04-05 13:39 hoffman + + * ChangeLog.manual, Modules/FindDCMTK.cmake: Move from main tree, + fix for 1652 + +2005-04-05 13:37 hoffman + + * Modules/FindDCMTK.cmake: BUG: fix for bug 1652 + +2005-04-05 13:30 hoffman + + * ChangeLog.manual, Source/cmLocalVisualStudio7Generator.cxx: fix + on branch for 1660 language NONE working + +2005-04-05 13:14 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: fix for bug 1660 + +2005-04-05 12:54 hoffman + + * ChangeLog.manual: fixes on branch + +2005-04-05 12:52 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: fix for bug 1702 better + error on bad GUID + +2005-04-05 12:51 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: move fix from main + tree for bug 1680 + +2005-04-05 11:23 hoffman + + * Source/cmake.cxx: BUG: fix for bug 1700 + +2005-04-05 10:22 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: fix for bug 1702, better + error message for GUID missing + +2005-04-05 08:25 king + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Added Close method and updated Open method to allow streams to be + reused. + +2005-04-05 04:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-04 17:01 hoffman + + * ChangeLog.manual, Modules/UseSWIG.cmake, + Source/cmGetDirectoryPropertyCommand.cxx: FIX: swig fixes from + main tree + +2005-04-04 16:55 hoffman + + * Modules/UseSWIG.cmake: ENH: make sure source flags don't have to + be set + +2005-04-04 16:43 hoffman + + * Source/cmGetDirectoryPropertyCommand.cxx: ENH: get directory + property should return an empty variable if it is not set, not + just have an error + +2005-04-04 16:13 hoffman + + * Modules/UseSWIG.cmake: ENH: fix for bug 1304 + +2005-04-04 15:55 hoffman + + * ChangeLog.manual, Modules/UseSWIG.cmake: ENH: move changes from + main tree + +2005-04-04 15:52 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx: ENH: move from main tree + timezone fix + +2005-04-04 15:51 hoffman + + * Modules/UseSWIG.cmake: FIX: fix for bug 1730 + +2005-04-04 15:41 hoffman + + * ChangeLog.manual, Source/cmFileCommand.cxx, + Source/cmWriteFileCommand.cxx, Source/kwsys/SystemTools.cxx: ENH: + move fix for read only file configure to branch + +2005-04-04 12:22 andy + + * Modules/Dart.cmake, Source/cmAddTestCommand.cxx, + Source/cmEnableTestingCommand.cxx, Source/cmGlobalGenerator.cxx: + BUG: By default disable new files. + +2005-04-04 03:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-03 03:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-02 02:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-04-01 15:48 andy + + * Source/: cmAddTestCommand.cxx, cmEnableTestingCommand.cxx, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h: + ENH: More ctest changes and move SetupTest to superclass + +2005-04-01 15:45 andy + + * Modules/Dart.cmake, Source/cmCTest.cxx: ENH: Rename the + DartConfiguration.tcl to CTestConfiguration.ini + +2005-04-01 14:57 andy + + * Source/: cmAddTestCommand.cxx, cmCTest.cxx, cmCTest.h, + cmEnableTestingCommand.cxx, ctest.cxx, + CTest/cmCTestTestHandler.cxx: ENH: Start adding support for CTest + testfiles + +2005-04-01 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-31 18:03 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: When generating + the name of the custom rule file the character : should be + replaced with an underscore because it might be a non-file-name + part of a path. + +2005-03-31 11:57 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: BUG: fix ITK build with xcode, + as long as you build it in little parts, this fixes the headermap + problem + +2005-03-31 10:00 martink + + * CTestCustom.ctest.in: ENH: shut up warning in 3rd party packages + +2005-03-31 02:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-30 16:11 king + + * Source/cmCTest.cxx: BUG: It is possible for the nightly start + time to be over 24 hours in the future which requires two days to + be subtracted. Using a while loop to make sure enough days are + added or subtracted. It should never be able to iterate more + than twice. + +2005-03-30 15:41 hoffman + + * ChangeLog.manual, Source/cmLocalVisualStudio7Generator.cxx: FIX: + Merge from main tree: fix for VS 2005 beta + +2005-03-30 15:27 king + + * Source/kwsys/CMakeLists.txt: BUG: Test for stl stirng operator!= + for char* needs to know result of KWSYS_STL_HAVE_STD. + +2005-03-30 02:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-29 15:34 martink + + * Source/: cmGlobalGenerator.cxx, cmMakefile.cxx, cmMakefile.h: + ENH: removed GetParentProjects + +2005-03-29 15:33 martink + + * Tests/OutOfSource/SubDir/CMakeLists.txt: ENH: better test for + subdirs + +2005-03-29 15:26 henderson + + * Source/kwsys/: CMakeLists.txt, SharedForward.h.in: ENH: copying + Brad's installation changes from the main tree to the ParaView + 2.0 branch + +2005-03-29 10:34 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: BUG: Fix dependencies of custom + commands that are relative paths to files or other custom command + outputs. + +2005-03-29 10:10 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cxx, kwsys_stl_string.hxx.in: ENH: Added + operator!= for stl string and char* when the system does not + provide one. + +2005-03-29 08:20 king + + * bootstrap, Source/kwsys/CMakeLists.txt, + Source/kwsys/Configure.hxx.in, + Source/kwsys/kwsysPlatformCxxTests.cmake, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Source/kwsys/kwsys_stl.h.in, Source/kwsys/kwsys_stl.hxx.in, + Source/kwsys/kwsys_stl_string.hxx.in: ENH: Added istream and + ostream operators for stl string in KWSys when using old streams + that do not provide them. + +2005-03-29 08:09 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: + SplitPath now supports slashes in both directions in the input + path but still produces forward slashes in the root component. + +2005-03-29 02:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-28 18:00 andy + + * bootstrap: BUG: The is replaced by cvs... This is safer anyway + +2005-03-28 17:46 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: move + EstimateFormatLength to kwsys + +2005-03-28 13:20 martink + + * Source/MFCDialog/: CMakeLists.txt, CMakeSetup.rc, + CMakeSetupDialog.cpp, CMakeSetupDialog.h, resource.h, + CMakeGenDialog.cpp, CMakeGenDialog.h: ENH: change how the + generator is selected and what the last one used was + +2005-03-28 02:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-27 02:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-26 09:58 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cmake, kwsysPlatformCxxTests.cxx, + kwsys_stl.h.in, kwsys_stl.hxx.in, kwsys_stl_string.hxx.in: COMP: + Removing stl string io operators change until the CMake bootstrap + script can be fixed. + +2005-03-26 08:19 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cmake, kwsysPlatformCxxTests.cxx, + kwsys_stl.h.in, kwsys_stl.hxx.in, kwsys_stl_string.hxx.in: ENH: + Added istream and ostream operators for stl string when using old + streams that do not provide them. + +2005-03-26 02:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-25 18:55 andy + + * Source/CMakeLists.txt: ENH: When in-source build, do not do + bootstrap test + +2005-03-25 18:46 andy + + * Source/CMakeLists.txt: ENH: Remove curl build testing + +2005-03-25 16:40 king + + * Source/cmAddSubDirectoryCommand.h: ENH: Clarified documentation + of the command. + +2005-03-25 14:23 andy + + * bootstrap: ENH: For development versions report version when + doing bootstrap + +2005-03-25 08:41 king + + * Source/kwsys/: CMakeLists.txt, SharedForward.h.in: ENH: Adding + SharedForward C header to help create forwarding executables on + UNIX systems that configure the shared library runtime search + path and then replace themselves with the real executable. This + is useful to create binary distributions that work from any + extracted location even with shared libraries. + +2005-03-25 08:09 king + + * Source/kwsys/SystemTools.cxx: ENH: Re-implemented + CollapseFullPath to not need to change directories. Operation is + now fully string based. + +2005-03-25 08:05 king + + * Source/cmCTest.cxx: BUG: Adjusted GetNightlyTime computation to + not depend on time_t being a signed type. + +2005-03-25 02:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-24 02:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-23 08:20 hoffman + + * Source/cmBuildCommand.cxx: fix for xcode + +2005-03-23 02:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-22 14:27 hoffman + + * Source/cmDynamicLoader.h: FIX: fix bug 1690 + +2005-03-22 14:00 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: try to handle more source + file types + +2005-03-22 13:32 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: just use the file name + +2005-03-22 11:33 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: make sure project map is + cleared each time. + +2005-03-22 10:29 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: use better names for + files + +2005-03-22 10:23 king + + * Source/cmMakefile.cxx: BUG: Initializing from parent should copy + link directories as well. + +2005-03-22 08:36 king + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomTargetCommand.cxx: ENH: Added check for invalid + characters in output name. + +2005-03-22 07:27 hoffman + + * Source/cmLocalGenerator.cxx: ENH: remove commented code + +2005-03-22 07:26 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: fix adding of rc + files + +2005-03-22 02:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-21 02:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-20 02:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-19 09:05 martink + + * Source/cmGlobalGenerator.cxx: COMP: fix warning + +2005-03-19 02:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-18 11:29 martink + + * Source/cmMacroCommand.cxx: COMP: fix warning + +2005-03-18 10:58 martink + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: remove cmSubDirectory from + unused files? + +2005-03-18 10:41 martink + + * Source/cmAddDefinitionsCommand.h, Source/cmAddTestCommand.cxx, + Source/cmBootstrapCommands.cxx, Source/cmBuildCommand.h, + Source/cmBuildNameCommand.h, Source/cmCMakeMinimumRequired.h, + Source/cmCommand.h, Source/cmCreateTestSourceList.h, + Source/cmElseCommand.h, Source/cmEnableLanguageCommand.h, + Source/cmEnableTestingCommand.cxx, + Source/cmEnableTestingCommand.h, Source/cmEndForEachCommand.h, + Source/cmEndIfCommand.h, Source/cmEndWhileCommand.h, + Source/cmFileCommand.h, Source/cmFindFileCommand.h, + Source/cmFindLibraryCommand.h, Source/cmFindPackageCommand.cxx, + Source/cmFindPackageCommand.h, Source/cmFindPathCommand.h, + Source/cmFindProgramCommand.h, Source/cmForEachCommand.h, + Source/cmGetFilenameComponentCommand.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmIfCommand.h, Source/cmIncludeCommand.h, + Source/cmIncludeDirectoryCommand.h, + Source/cmIncludeRegularExpressionCommand.h, + Source/cmLinkDirectoriesCommand.h, + Source/cmLinkLibrariesCommand.h, Source/cmLoadCacheCommand.h, + Source/cmLoadCommandCommand.cxx, Source/cmLoadCommandCommand.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalKdevelopGenerator.cxx, + Source/cmLocalKdevelopGenerator.h, + Source/cmLocalUnixMakefileGenerator2.cxx, + Source/cmLocalUnixMakefileGenerator2.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio6Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMacroCommand.cxx, Source/cmMacroCommand.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmMarkAsAdvancedCommand.h, Source/cmOptionCommand.h, + Source/cmProjectCommand.h, Source/cmRemoveCommand.h, + Source/cmRemoveDefinitionsCommand.h, + Source/cmSeparateArgumentsCommand.h, Source/cmSetCommand.h, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSiteNameCommand.h, Source/cmSourceGroupCommand.h, + Source/cmStringCommand.h, Source/cmSubdirCommand.cxx, + Source/cmUtilitySourceCommand.h, Source/cmWhileCommand.h, + Tests/OutOfSource/CMakeLists.txt, + Tests/OutOfSource/SubDir/CMakeLists.txt: ENH: big change that + includes immediate subdir support, removing the notion of + inherited commands, makefiles no longer read in the parent + makefiles but instead inherit thier parent makefiles current + settings + +2005-03-18 10:39 martink + + * Source/: cmAddSubDirectoryCommand.cxx, + cmAddSubDirectoryCommand.h: ENH: added immediate subdirectory + command + +2005-03-18 09:03 martink + + * Source/cmSubDirectory.h: ENH: bad idea + +2005-03-18 02:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-17 18:37 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Need to collapse + full paths before depending on them to remove ./ and ../ to make + sure target names match. + +2005-03-17 15:35 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: add source groups xcode + +2005-03-17 13:06 king + + * Source/kwsys/SystemTools.cxx: COMP: Using proper __QNX__ + preprocessor test. + +2005-03-17 02:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-16 15:31 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, win32_pthreads.c: COMP: Fix + more pthreads problems on windows + +2005-03-16 13:26 andy + + * CMakeLists.txt, Utilities/cmexpat/CMakeLists.txt, + Utilities/cmxmlrpc/CMakeLists.txt, + Utilities/cmzlib/CMakeLists.txt: COMP: More cleanups + +2005-03-16 13:24 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: COMP: Remove warnings + +2005-03-16 12:54 andy + + * Source/CMakeLists.txt: ENH: Make sure to use internal zlib + +2005-03-16 12:54 andy + + * Source/CTest/cmCTestSubmit.cxx: ENH: Cleanup of the output + +2005-03-16 11:10 andy + + * Utilities/cmxmlrpc/CMakeLists.txt: BUG: No need to link threads + libraries when pthreads are not found + +2005-03-16 10:49 king + + * Source/kwsys/SystemTools.cxx: COMP: Only include malloc.h on QNX. + +2005-03-16 10:15 barre + + * Source/kwsys/SystemTools.cxx: FIX: that was wrong + +2005-03-16 09:55 king + + * Source/CMakeLists.txt, Tests/Wrapping/CMakeLists.txt: BUG: Do not + add Qt wrapping test unless QT is found and QT_UIC_EXECUTABLE is + found. + +2005-03-16 09:41 king + + * Source/kwsys/SystemTools.cxx: COMP: Need malloc.h for malloc/free + on QNX. + +2005-03-16 02:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-15 11:22 martink + + * Source/cmEnableTestingCommand.cxx: ENH: only support rel paths + for now + +2005-03-15 08:14 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: COMP: Defining + YY_NO_INPUT to remove compilation of unused yyinput function. It + was producing a warning about unreachable code. + +2005-03-15 08:13 king + + * Source/cmCacheManager.cxx: COMP: Removed warning due to unsigned + enum type. + +2005-03-15 02:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-14 13:23 hoffman + + * Source/: CMakeLists.txt, cmake.cxx: ENH: make xcode compile only + on apple + +2005-03-14 12:25 martink + + * bootstrap: ENH: oops forgot to chek this in + +2005-03-14 12:18 hoffman + + * Modules/Platform/QNX.cmake: ENH: try to fix rpath on qnx + +2005-03-14 11:28 martink + + * Source/: CMakeLists.txt, cmEnableTestingCommand.cxx, + cmGlobalGenerator.cxx, cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h, cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h, + cmLocalUnixMakefileGenerator2.cxx, cmMakefile.cxx, cmMakefile.h, + cmSubdirCommand.cxx, cmGlobalVisualStudio6Generator.cxx: ENH: add + support for out of source source + +2005-03-14 11:26 martink + + * Tests/OutOfSource/: CMakeLists.txt, + OutOfSourceSubdir/CMakeLists.txt, OutOfSourceSubdir/simple.cxx, + SubDir/CMakeLists.txt: ENH: added new test for out of dir source + trees + +2005-03-14 09:23 martink + + * Source/cmSubDirectory.h: ENH: added new structure to hold + subdirectories + +2005-03-14 08:15 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + COMP: Added __INTEL_COMPILER to test for yyerrorlab warning + suppression. + +2005-03-14 03:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-13 03:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-12 02:35 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-11 13:12 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: try to see if + there is still a problem + +2005-03-11 12:56 king + + * Source/CTest/cmCTestScriptHandler.cxx: BUG: Do not report an + error removing the binary directory if it doesn't exist. + +2005-03-11 11:48 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: add last + two small funcs from vtkString. Done removing deps + +2005-03-11 10:53 andy + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + FIX: fix crashing test SubDir for xcode + +2005-03-11 10:43 barre + + * Source/kwsys/: SystemTools.hxx.in, SystemTools.cxx: ENH: update + documentation, sort methods into categories + +2005-03-11 10:29 hoffman + + * Source/ctest.cxx: FIX: fix output of passing tests + +2005-03-11 10:15 king + + * Modules/Platform/QNX.cmake: ENH: Initial attempt at QNX support. + Submitted by Tim Arney. + +2005-03-11 10:07 king + + * Source/kwsys/: CommandLineArguments.cxx, RegularExpression.cxx, + SystemTools.cxx: COMP: Added missing include of string.h. + +2005-03-11 10:03 king + + * Source/cmStandardIncludes.h: COMP: Adding stdlib.h to standard + includes. We are using functions from it all over the place + assuming it has been included here. + +2005-03-11 09:31 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: COMP: fix + some warnings + +2005-03-11 08:38 martink + + * Source/cmake.cxx: COMP: fix a warning + +2005-03-11 02:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-10 17:49 barre + + * Source/kwsys/SystemTools.cxx: ENH: remove deps to vtkString by + using KWSys (a handful of functions have been moved to KWSys) + +2005-03-10 17:44 barre + + * Source/kwsys/: SystemTools.hxx.in, SystemTools.cxx: ENH: remove + deps to vtkString by using KWSys (a handful of functions have + been moved to KWSys) + +2005-03-10 17:34 barre + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: remove + deps to vtkString by using KWSys (a handful of functions have + been moved to KWSys) + +2005-03-10 13:39 martink + + * Source/: cmExportLibraryDependencies.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h, + cmTryCompileCommand.cxx, cmTryRunCommand.cxx, cmake.cxx, cmake.h: + ENH: cleanup by removing all the olf local generate junk that i + not longer needed + +2005-03-10 12:50 barre + + * Source/kwsys/: SystemTools.hxx.in, SystemTools.cxx: ENH: move + function from vtkKWDirectoryUtilities and vtkString to + SystemTools + +2005-03-10 10:04 martink + + * Source/ctest.cxx: ENH: better docs + +2005-03-10 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-09 18:07 andy + + * Utilities/cmxmlrpc/xmlrpc_serialize.c: BUG: This is weird, but + marquee does not seem to handle base64 with new lines + +2005-03-09 18:06 andy + + * Source/CTest/cmCTestSubmit.cxx: BUG: xmlrpc does the base64 + encoding + +2005-03-09 15:51 andy + + * bootstrap: BUG: Remove awk, remove problems and add full spaces + in the path support + +2005-03-09 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-08 18:38 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Removing + jump-and-build ordering change until we can prevent extra jumps + from always occuring. + +2005-03-08 17:27 king + + * bootstrap: BUG: Fix for spaces in the path when constructing + cmBootstrapCommands dependencies. + +2005-03-08 16:01 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Removing ... + ellipsis from end of echo lines. It is just clutter. + +2005-03-08 15:55 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Adding extra + dependencies to jump-and-build rules that force a single ordering + to prevent parallel jumps. This avoids problems with two jumps + reaching the same target in parallel which happened occasionally + with the old generator. + +2005-03-08 15:35 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Removed "Checking + build system in ..." message. It is always paired with an + Entering or Jumping message and is not necessary. + +2005-03-08 13:43 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added option + CMAKE_SKIP_RULE_DEPENDENCY to skip making build rules depend on + their own rule files. It can be added to the cache by the user + or added by the project in a list file. + +2005-03-08 11:37 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Only add leading + ./ to custom command executable if the command is really + specified as one in the current directory. + +2005-03-08 11:25 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: When a custom + command's executable is in the current directory the relative + path to it needs a "./". + +2005-03-08 09:25 king + + * Source/: cmLocalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.h: ENH: Updating Kdevelop generator to + use the new makefile generator. The old one no longer works + anyway because local generates are now disabled. + +2005-03-08 09:24 king + + * Source/cmDepends.cxx: BUG: Dependency scans and checks must + always set the current working directory to the directory + containing the Makefile. + +2005-03-08 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-07 18:48 andy + + * Utilities/cmxmlrpc/win32_pthreads.c: COMP: Try to remove warning + on mingw + +2005-03-07 15:19 king + + * Source/cmDependsFortran.cxx: BUG: When checking for upper-case + modules do not use an upper-case .MOD extension. + +2005-03-07 13:51 andy + + * Source/: cmFileCommand.cxx, cmWriteFileCommand.cxx: BUG: Handle + restrictive permissions + +2005-03-07 12:14 andy + + * Source/CTest/cmCTestSubmit.cxx: COMP: Remove warning + +2005-03-07 12:11 andy + + * bootstrap: ENH: Add proper dependencies for cmBootstrapCommands + +2005-03-07 11:03 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: BUG: Remove memory + leak + +2005-03-07 02:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-06 12:10 andy + + * Utilities/cmxmlrpc/linklist.h: COMP: Try to remove warnings on + windows + +2005-03-06 11:26 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, xmlrpc_config.h.in: ENH: Fix + the symantic of unicode_wchar + +2005-03-06 11:23 andy + + * Utilities/cmxmlrpc/xmlrpc_utf8.c: COMP: Remove warning on gcc + +2005-03-06 08:52 andy + + * Utilities/cmxmlrpc/synch_client.c: BUG: Fix destruction of + objects + +2005-03-06 08:51 andy + + * DartConfig.cmake, Source/cmCTest.cxx, + Source/CTest/cmCTestSubmit.cxx: COMP: Remove warning and fix the + logic + +2005-03-06 08:17 andy + + * Source/CMakeLists.txt: COMP: Do not build cmw9xcom on Cygwin + +2005-03-06 02:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-05 08:25 andy + + * DartConfig.cmake: ENH: Work on xmlrpc submit + +2005-03-05 08:12 andy + + * Source/CTest/cmCTestSubmit.cxx: COMP: Remove compile error + +2005-03-05 02:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-04 17:11 andy + + * Source/: CTest/cmCTestSubmit.cxx, CTest/cmCTestSubmit.h, + cmCTest.cxx: ENH: Start working on xmlrpc code. This code does + not work, but it will at least test compiling with cmxmlrpc + +2005-03-04 15:04 andy + + * Utilities/cmxmlrpc/synch_client.c: ENH: Print more states + including NY + +2005-03-04 14:27 andy + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: More cleanups and + start linking ctest to XML-RPC + +2005-03-04 11:37 andy + + * Source/CMakeLists.txt, CMakeLists.txt, Utilities/CMakeLists.txt: + ENH: More cleanups and reorganization + +2005-03-04 10:05 andy + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: Cleanups + +2005-03-04 10:04 andy + + * Source/CTest/CMakeLists.txt: BUG: This cmakelists file is not + used any more + +2005-03-04 10:03 andy + + * bootstrap: BUG: Handle when initial cmake fails + +2005-03-04 09:46 andy + + * Utilities/cmxmlrpc/xmlrpc_registry.c: COMP: Remove warning about + code being unused + +2005-03-04 02:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-03 22:35 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalXCodeGenerator.cxx: ENH: fix for finding the correct + target in the current project + +2005-03-03 19:42 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: make it pass + anyway so I can see debug info + +2005-03-03 18:46 hoffman + + * Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: try and + debug the failed test on the continuous + +2005-03-03 18:15 hoffman + + * Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: try + number two with topological sort + +2005-03-03 17:21 andy + + * Utilities/cmxmlrpc/xmlrpc.h: COMP: Ok, remove warnings because of + removal of warnings + +2005-03-03 17:00 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: COMP: Fix typo + +2005-03-03 16:58 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: BUG: Comp sci 101. + Strings go away at the end of the function + +2005-03-03 16:53 king + + * Source/: cmDependsFortran.cxx, cmDependsFortran.h, cmake.cxx: + ENH: Implementing explicit cmake_copy_f90_mod callback to copy + Fortran90 modules to the stamp files more reliably. This removes + the temporary hack for per-platform upper-/lower- case. + +2005-03-03 16:12 andy + + * Utilities/cmxmlrpc/xmlrpc_config.h.in: COMP: setenv is not needed + any more + +2005-03-03 15:52 andy + + * Utilities/cmxmlrpc/xmlrpc_authcookie.c: COMP: Try to remove + setenv warning + +2005-03-03 15:49 andy + + * Utilities/cmxmlrpc/xmlrpc.h: ENH: Remove warnings + +2005-03-03 15:22 king + + * Source/: cmDependsC.cxx, cmDependsC.h: BUG: Fixed scanning to + account for double-quote includes. + +2005-03-03 12:00 king + + * Source/kwsys/kwsys_ios_sstream.h.in: ENH: Added + "ostringstream(const kwsys_stl::string& s)" and "void str(const + kwsys_stl::string& s)" compatibility methods. + +2005-03-03 09:25 andy + + * Utilities/cmxmlrpc/: xmlrpc_authcookie.c, xmlrpc_client.c, + xmlrpc_data.c, xmlrpc_expat.c, xmlrpc_parse.c, xmlrpc_registry.c, + xmlrpc_serialize.c, xmlrpc_struct.c, xmlrpc_strutil.c, + xmlrpc_utf8.c: COMP: Remove warnings on borland + +2005-03-03 08:46 martink + + * Source/: CMakeLists.txt, cmake.cxx: ENH: remove code warrior + classes + +2005-03-03 08:45 andy + + * Utilities/cmxmlrpc/: xmlrpc_strutil.c, xmlrpc_support.c: COMP: + Remove warnings + +2005-03-03 02:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-02 18:56 hoffman + + * Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: reverse + last changes to avoid dashboard failures + +2005-03-02 17:49 hoffman + + * Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: fix + library ordering stuff to use a topological sort + +2005-03-02 17:38 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: BUG: Attempt to get + error code + +2005-03-02 17:19 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: ENH: Temporary proxy + support + +2005-03-02 11:48 andy + + * Source/cmOrderLinkDirectories.cxx: BUG: Attempt to fix sorting + stability using more deterministic compare function + +2005-03-02 11:04 andy + + * Utilities/cmxmlrpc/: xmlrpc_client.c, xmlrpc_parse.c: COMP: + Remove more warnings + +2005-03-02 10:58 martink + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmGlobalCodeWarriorGenerator.h, cmLocalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.h: ENH: now use xcode instead + +2005-03-02 10:35 andy + + * Utilities/cmxmlrpc/xmlrpc.h: COMP: Enum should really not have + comma at the end + +2005-03-02 09:34 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Pay attention to + ForceUnixPaths setting in cmSystemTools for + ConvertToQuotedOutputPath and for dependency scanning. + +2005-03-02 09:02 king + + * Source/cmDependsFortran.cxx: BUG: We need to test the compiler + for the case of the mod file names. For now this is a temporary + hack to use upper case on SGI and lower case on Sun. + +2005-03-02 08:51 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: SGI make can + support suffixes only up to 32 characters. Renaming + .hpux_make_must_have_suffixes_list to + .hpux_make_needs_suffix_list. + +2005-03-02 02:30 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-03-01 17:32 hoffman + + * Source/cmOrderLinkDirectories.cxx: FIX: switch to stable_sort to + avoid crash + +2005-03-01 14:30 andy + + * Modules/Dart.cmake: BUG: Change error to warning + +2005-03-01 14:21 andy + + * CMakeLists.txt: COMP: CMake should be build static. Also + propagate build_shared_libs to curl + +2005-03-01 13:36 king + + * Source/cmDependsFortran.cxx: BUG: Module file names are case + insensitive. Always use lower case no matter the real name of + the module. + +2005-03-01 13:32 king + + * Source/cmDependsJava.cxx: COMP: Removed unused parameter warning. + +2005-03-01 12:27 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx: ENH: Enabling + cmLocalUnixMakefileGenerator2 by default. + +2005-03-01 12:26 king + + * Modules/Platform/: Darwin-xlc.cmake, Darwin.cmake: ENH: Adding + support for shared library versioning using the -install_name + option on the OSX linker. This is actually needed to support + relative -o paths which are used by + cmLocalUnixMakefileGenerator2. + +2005-03-01 12:26 king + + * bootstrap, Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmake.cxx: ENH: Enabling cmLocalUnixMakefileGenerator2 + (new makefile generator) by default. + +2005-03-01 12:20 king + + * Source/: cmDependsJava.cxx, cmDependsJava.h, CMakeLists.txt, + cmLocalUnixMakefileGenerator2.cxx: ENH: Framework for java + dependency scanner. Right now it does nothing but always reports + success. This is enough to get the Java test to pass with the + new generator because the old implementation did not do + dependencies anyway. + +2005-03-01 12:13 king + + * Source/: cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h: BUG: Added FILES mode to + INSTALL_PROGRAMS command to make the single argument case + unambiguous. + +2005-03-01 11:25 andy + + * Source/cmGlobalXCodeGenerator.cxx: FIX: fix spaces in paths + +2005-03-01 11:21 andy + + * Utilities/cmxmlrpc/: synch_client.c, xmlrpc_curl_transport.c: + COMP: Attempt to remove warnings + +2005-03-01 11:01 king + + * Utilities/cmxmlrpc/win32_pthreads.c: COMP: #if WIN32 -> #ifdef + _WIN32 for Borland. + +2005-03-01 10:54 andy + + * CMakeLists.txt: ENH: Enable XMLRPC... please do not break + everywhere... + +2005-03-01 10:11 andy + + * Utilities/cmxmlrpc/CMakeLists.txt: ENH: Enable test + +2005-03-01 10:05 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Replaced previous + fix with an implementation of properly formatting the custom + build code in the generated file. + +2005-03-01 09:50 andy + + * Utilities/cmxmlrpc/xmlrpc_curl_transport.c: ENH: More removing of + pthreads + +2005-03-01 09:07 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, xmlrpc_authcookie.c, + xmlrpc_config.h.in, xmlrpc_curl_transport.c, xmlrpc_pthreads.h, + xmlrpc_transport.h: ENH: Attempt to remove threading code + +2005-03-01 02:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-28 17:12 andy + + * CMakeLists.txt: ENH: Add the rest of xmlrpc stuff + +2005-02-28 16:26 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, synch_client.c, xmlrpc.h, + xmlrpc_client.c, xmlrpc_config.h.in: ENH: Add example + +2005-02-28 16:11 martink + + * Source/cmLocalVisualStudio6Generator.cxx: FIXTHIS THING: fix the + bug + +2005-02-28 15:30 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: fix typeo + +2005-02-28 15:07 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: add re run cmake if inputs change + +2005-02-28 02:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-27 17:34 andy + + * Utilities/cmxmlrpc/xmlrpc.h, Utilities/cmxmlrpc/xmlrpc_array.c, + Utilities/cmxmlrpc/xmlrpc_curl_transport.c, + Utilities/cmxmlrpc/xmlrpc_parse.c, + Utilities/cmxmlrpc/xmlrpc_struct.c, Source/kwsys/ProcessUNIX.c: + COMP: Remove warnings about shadow variables + +2005-02-27 17:33 andy + + * Utilities/cmexpat/xmlparse.c: COMP: Remove compile warning about + shadow variables + +2005-02-27 03:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-26 16:58 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: remove some warnings + +2005-02-26 03:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-25 20:46 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: fix warning + +2005-02-25 17:45 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmOrderLinkDirectories.cxx, + cmOrderLinkDirectories.h: ENH: clean up and use order link + directories + +2005-02-25 14:21 hoffman + + * Utilities/cmexpat/xmltok_impl.c: COMP: fix warnings + +2005-02-25 14:20 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: make sure header files + are in the header file group + +2005-02-25 11:23 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Replaced + OutputEcho/pre-echo/post-echo with AppendEcho. This allows for + more flexible echo specifications and better preserves echo text. + +2005-02-25 09:31 king + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: Added full + pre-build/pre-link/post-build testing for both library and + executable targets. + +2005-02-25 09:19 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Adding inclusion + of pre-build and pre-link commands when building executables and + libraries. + +2005-02-25 09:14 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: + ConvertToQuotedOutputPath must replace slashes in root component + on windows. + +2005-02-25 09:06 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added + ConvertToQuotedOutputPath method and used it to properly generate + external object references with spaces in the path. + +2005-02-25 03:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-24 19:32 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Removed instances + of calling ConvertToRelativeOutputPath twice on the same path. + +2005-02-24 19:28 king + + * Source/cmGlobalGenerator.cxx: BUG: Need to configure relative + path support for LocalGenerate to support old makefile generator. + +2005-02-24 18:35 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: Converted some + ConvertToRelativeOutputPath calls to + ConvertToOptionallyRelativeOutputPath in preparation for making + ConvertToRelativeOutputPath always convert. Some of these might + be able to be switched back but we will first have to test what + paths can be relative in the generate VS project files. + +2005-02-24 17:46 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + kwsys/SystemTools.cxx: ENH: fix relative paths in xcode + +2005-02-24 16:25 king + + * Source/cmLocalGenerator.cxx: ENH: Converted some + ConvertToRelativeOutputPath calls to + ConvertToOptionallyRelativeOutputPath in preparation for making + ConvertToRelativeOutputPath not check CMAKE_USE_RELATIVE_PATHS. + +2005-02-24 16:19 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: The path to the + source file in a compile line should be made relative only when + CMAKE_USE_RELATIVE_PATHS is on. + +2005-02-24 16:04 king + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Merged implementations of + ConvertToRelative*Path methods. The main ConvertToRelativePath + method is now in cmGlobalGenerator. It converts paths only if + they are at least inside the deepest common directory between the + top-level source and build trees. Each cmLocalGenerator instance + calls this global method with its own output directory as the + "local" argument from which paths are relative. Added separate + ConvertToOptionallyRelative path that pays attention to the + CMAKE_USE_RELATIVE_PATHS option. + +2005-02-24 15:36 andy + + * Source/cmOrderLinkDirectories.cxx: COMP: remove compiler warning + +2005-02-24 15:34 andy + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: fix spaces in paths problems + +2005-02-24 14:47 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Added + ComparePath method. + +2005-02-24 14:27 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: remove + unused code + +2005-02-24 13:45 king + + * Source/cmMakefile.cxx: COMP: HP compiler does not like + initializing a const std::string & with a const char* (which + requires the reference to be bound to a temporary with the scope + of the reference). + +2005-02-24 13:26 hoffman + + * Source/cmOrderLinkDirectories.cxx: ENH: clean up and remove some + debug code + +2005-02-24 13:16 hoffman + + * bootstrap, Source/CMakeLists.txt, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, Source/cmOrderLinkDirectories.cxx, + Source/cmOrderLinkDirectories.h: ENH: add a new library path + ordering algorithm to make sure -L paths will pick the correct + libraries if possible + +2005-02-24 12:44 king + + * Source/cmDependsC.cxx: BUG: Avoid putting a leading ./ on the + dependency names. + +2005-02-24 12:19 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: BUG: Using a better technique to + produce the rule file name for a custom command when the output + is not in the current directory or lower. + +2005-02-24 11:46 king + + * Modules/Platform/CMakeLists.txt: BUG: Added installation of .in + files as well as .cmake files. + +2005-02-24 10:32 king + + * Source/cmGlobalGenerator.cxx: BUG: Only use the existing + CMake(lang)Compiler.cmake file from the build tree if it was + generated by the same version of CMake. + +2005-02-24 10:31 king + + * Source/cmMakefile.cxx: BUG: Fixed GetCacheMinorVersion to not + always return 0. + +2005-02-24 10:14 andy + + * Source/cmCommands.cxx: COMP: Remove compile warning in bootstrap + stage + +2005-02-24 09:21 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Do not crash when + the link language for a target is not known. + +2005-02-24 09:20 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Need proper + newline argument to ConstructScript call. + +2005-02-24 03:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-23 20:41 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: remove output path stuff + +2005-02-23 20:28 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, casprintf.c, casprintf.h, + inline.h, linklist.h, xmlrpc.h, xmlrpc_client.h, + xmlrpc_client_int.h, xmlrpc_config.h.in, xmlrpc_curl_transport.c, + xmlrpc_data.c, xmlrpc_pthreads.h, xmlrpc_support.c: COMP: Several + Windows fixes + +2005-02-23 14:36 martink + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: fix for empty + target or config strings in the Build method + +2005-02-23 13:50 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: FIX: fix to make this work + with new custom command stuff + +2005-02-23 03:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-22 15:31 king + + * Source/cmProjectCommand.cxx: ENH: Added CMAKE_PROJECT_NAME + variable to play the role of CMAKE_SOURCE_DIR and + CMAKE_BINARY_DIR for the top-level project name. + +2005-02-22 15:22 king + + * Modules/CMakeGenericSystem.cmake, Source/cmLocalGenerator.cxx: + ENH: Added better default install location for windows builds. + The previous default /usr/local did not make much sense. Now + "%SystemDrive%/Program Files/PROJECT_NAME" is used, which is the + windows equivalent to /usr/local. + +2005-02-22 14:52 king + + * Source/: cmLoadCommandCommand.cxx, cmLoadCommandCommand.h: ENH: + LOAD_COMMAND command will now set a variable called + CMAKE_LOADED_COMMAND_ to the full path of the + loaded module if loading was successful. Otherwise the variable + is not set (will evaluate to empty string). This is useful both + in testing whether loading worked and for installing loaded + command modules. + +2005-02-22 13:08 andy + + * Utilities/cmxmlrpc/: CMakeLists.txt, XmlRpcCpp.cpp, XmlRpcCpp.h, + bool.h, mallocvar.h, transport_config.h, win32_pthreads.c, + xmlrpc.h, xmlrpc_amconfig.h.in, xmlrpc_array.c, + xmlrpc_authcookie.c, xmlrpc_base64.c, xmlrpc_cgi.c, xmlrpc_cgi.h, + xmlrpc_client.c, xmlrpc_client.h, xmlrpc_client_int.h, + xmlrpc_config.h.in, xmlrpc_curl_transport.c, + xmlrpc_curl_transport.h, xmlrpc_data.c, xmlrpc_expat.c, + xmlrpc_int.h, xmlrpc_libxml2.c, xmlrpc_parse.c, + xmlrpc_pthreads.h, xmlrpc_registry.c, xmlrpc_serialize.c, + xmlrpc_server.h, xmlrpc_server_abyss.c, xmlrpc_server_abyss.h, + xmlrpc_server_abyss_int.h, xmlrpc_struct.c, xmlrpc_strutil.c, + xmlrpc_support.c, xmlrpc_transport.c, xmlrpc_transport.h, + xmlrpc_utf8.c, xmlrpc_xmlparser.h, + CMake/TryCompileFromSource.cmake: ENH: Initial import + +2005-02-22 12:34 martink + + * Source/cmGlobalGenerator.cxx: COMP: fix warning + +2005-02-22 12:10 king + + * Source/cmAddCustomCommandCommand.h: BUG: Fixed formatting of + generated documentation. + +2005-02-22 12:04 king + + * Tests/CustomCommand/CMakeLists.txt: ENH: Added test for multiple + commands in a custom command. + +2005-02-22 10:43 martink + + * Source/CMakeLists.txt: BUG: fix test execution + +2005-02-22 10:42 martink + + * Source/cmCTest.cxx: BUG: better error handling + +2005-02-22 10:32 king + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmCPluginAPI.cxx, + cmCustomCommand.cxx, cmCustomCommand.h, cmFLTKWrapUICommand.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmGlobalXCodeGenerator.cxx, + cmITKWrapTclCommand.cxx, cmIncludeExternalMSProjectCommand.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator2.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx, cmMakefile.h, + cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx: ENH: Updated implementation of custom + commands. Multiple command lines are now supported effectively + allowing entire scripts to be written. Also removed extra + variable expansions and cleaned up passing of commands through to + the generators. The command and individual arguments are now + kept separate all the way until the generator writes them out. + This cleans up alot of escaping issues. + +2005-02-22 09:12 martink + + * Source/: cmCTest.cxx, cmCTest.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, ctest.cxx: ENH: ctest now uses CMake + global generator to do the build part of build-and-test + +2005-02-22 09:08 king + + * Source/cmake.cxx: BUG: Need to return before configure step when + running in script mode. + +2005-02-22 08:22 king + + * Source/cmStandardIncludes.h: ENH: Adding cmCustomCommandLine and + cmCustomCommandLines subclasses of std::vector instantiations to + represent multiple commands for a single custom command. These + will be used in an upcoming checkin. + +2005-02-22 03:01 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-21 03:07 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-20 03:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-19 02:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-18 16:19 king + + * Source/: cmMakefile.cxx, cmSourceFile.cxx, cmSourceFile.h: BUG: + cmSourceFile instances should delete their own custom commands + when a new one is set. + +2005-02-18 16:12 king + + * Source/cmTarget.cxx: COMP: Using const_iterator instead of + iterator to walk through custom command dependencies. + +2005-02-18 16:12 king + + * Source/cmTarget.h: COMP: Added missing forward declaration of + cmMakefile. This was only working because cmCustomCommand.h + declared it. + +2005-02-18 15:45 andy + + * Source/cmGlobalXCodeGenerator.cxx: ENH: fix for spaces in the + path + +2005-02-18 15:43 king + + * Tests/ExternalOBJ/CMakeLists.txt: BUG: We still want to print out + the location where the object was found if it was found by the + glob. + +2005-02-18 14:32 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: remove warning + +2005-02-18 14:22 king + + * CMakeLists.txt: BUG: Disabling DART_ROOT removal until we can get + Dart to submit without it. + +2005-02-18 13:32 hoffman + + * Source/CMakeLists.txt, Source/cmFileCommand.cxx, + Source/cmGlobalXCodeGenerator.cxx, + Source/cmGlobalXCodeGenerator.h, Source/cmLocalGenerator.cxx, + Tests/ExternalOBJ/CMakeLists.txt: ENH: all tests are passing for + XCode + +2005-02-18 02:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-17 17:54 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmXCodeObject.h: ENH: more tests are + passing, relative paths, and external objects are the ones left + now + +2005-02-17 16:59 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Detect when + TestsToRunInformation is not set + +2005-02-17 16:11 andy + + * Source/: cmCTest.cxx, CTest/cmCTestTestHandler.cxx: ENH: Some + more generalization + +2005-02-17 15:23 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestUpdateCommand.cxx, + CTest/cmCTestUpdateCommand.h, CTest/cmCTestUpdateHandler.cxx: + ENH: Cleanups and add CTEST_UPDATE command + +2005-02-17 15:22 andy + + * Source/CTest/: cmCTestGenericHandler.cxx, + cmCTestGenericHandler.h: ENH: Add a way to set options of the + handler genericly + +2005-02-17 11:28 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: ENH: Adding + kwsys::SystemTools::FileTimeCompare method to compare file + modification times with the highest resolution possible on the + file system. + +2005-02-17 11:27 king + + * bootstrap: ENH: Added try-compile KWSYS_STAT_HAS_ST_MTIM. This + tests whether struct stat has the extra st_mtim member that has + high resolution times. + +2005-02-17 10:51 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestCoverageHandler.cxx, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestStartCommand.cxx, + CTest/cmCTestStartCommand.h: ENH: Cleanups and add CTEST_START + command + +2005-02-17 10:51 andy + + * Source/cmSystemTools.cxx: ENH: Add support for single ' + +2005-02-17 10:49 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cxx: ENH: Added try-compile + KWSYS_STAT_HAS_ST_MTIM. This tests whether struct stat has the + extra st_mtim member that has high resolution times. + +2005-02-17 10:45 hoffman + + * Modules/FindQt.cmake: FIX: fix for bug 1409 + +2005-02-17 10:42 hoffman + + * Modules/FindCurses.cmake: FIX: fix for bug 1438 + +2005-02-17 10:39 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: FIX: fix for bug 1606 + +2005-02-17 10:18 king + + * Source/cmDependsC.cxx: ENH: Removing collapsing of files to full + path before checking. The current working directory is set + correctly because the dependency lines are used by make anyway. + This drastically improves the speed of dependency checking. + +2005-02-17 10:03 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Avoid generating duplicate + rules for an object file. A warning about duplicate source files + in a target is now generated. + +2005-02-17 08:50 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Added generation + of test target to run ctest. + +2005-02-17 07:53 king + + * Source/cmake.cxx: BUG: Removing "guess when there is a space in + the path" check for chdir command. It is the responsibility of + the caller of the command to ensure the arguments are properly + quoted on the command line. + +2005-02-17 07:53 king + + * Tests/CommandLineTest/CMakeLists.txt: BUG: Fix for space in path + for chdir test. We just need to double-quote the arguments. + +2005-02-17 02:42 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-16 19:13 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: add CMAKE_CFG_INTDIR + +2005-02-16 18:47 hoffman + + * Source/: cmCTest.cxx, cmGlobalXCodeGenerator.cxx: ENH: use + ALL_BUILD target + +2005-02-16 16:35 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmMakefile.cxx, cmMakefile.h: ENH: more + tests are passing + +2005-02-16 16:06 andy + + * Source/CTest/: cmCTestEmptyBinaryDirectoryCommand.cxx, + cmCTestScriptHandler.cxx: BUG: Report errors + +2005-02-16 16:03 andy + + * Source/kwsys/SystemTools.cxx: BUG: On windows allow removing of + files that are read-only + +2005-02-16 14:38 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: COMP: Remove unused + variable + +2005-02-16 14:24 andy + + * Source/CTest/cmCTestUpdateHandler.h: COMP: Remove warning + +2005-02-16 14:24 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Improve output, and + handle 'G' files in subversion + +2005-02-16 13:45 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: BUG: If project is up to + date, handle that case + +2005-02-16 13:36 andy + + * Modules/Dart.cmake: BUG: Clean the messages + +2005-02-16 13:30 andy + + * Modules/: Dart.cmake, DartConfiguration.tcl.in: ENH: Reorganize + and add subversion support + +2005-02-16 13:29 andy + + * CMakeLists.txt: ENH: Remove DART_ROOT to force + DartConfiguration.tcl to be up to date + +2005-02-16 13:28 andy + + * Source/CTest/: cmCTestUpdateHandler.cxx, cmCTestUpdateHandler.h: + ENH: Initial implementation of SVN support. Closes Bug #1601 - + Add subversion support + +2005-02-16 13:15 hoffman + + * Source/cmake.cxx, Source/cmakemain.cxx, + Tests/CommandLineTest/CMakeLists.txt: BUG: fix CommandLine test + problems with spaces and testing for the return value + +2005-02-16 12:31 martink + + * CTestCustom.ctest.in: ENH: add supp for xlc linking on darwin + +2005-02-16 09:17 andy + + * Utilities/cmzlib/CMakeLists.txt: COMP: attempt to fix warning on + Visual Studio 7 + +2005-02-16 09:00 hoffman + + * CTestCustom.ctest.in: COMP: add a warning ignore for gcc 3.4.2 + +2005-02-16 08:56 king + + * Source/kwsys/SystemTools.cxx: BUG: Removing debugging code now + that the problem has been fixed on the remote dashboard. + +2005-02-16 02:18 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-15 17:25 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: add custom commands, still failing a bunch of tests + +2005-02-15 16:03 king + + * Source/kwsys/SystemTools.cxx: BUG: Preserve trailing slash state + when translating paths. + +2005-02-15 09:58 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: make sure paths do not end in + / before adding one + +2005-02-15 09:02 king + + * Source/cmDependsFortran.cxx: STYLE: Added TODO comment for + checking dependencies. + +2005-02-15 09:01 king + + * Tests/Fortran/: CMakeLists.txt, test_module_implementation.f90, + test_module_interface.f90, test_module_main.f90: ENH: Added + Fortran 90 test if the platform supports it. + +2005-02-15 08:40 king + + * Source/kwsys/SystemTools.cxx: BUG: Adding debugging code to + remotely debug a failing dashboard test. + +2005-02-15 08:28 king + + * Source/kwsys/SystemTools.cxx: BUG: Adding debugging code to + remotely debug a failing dashboard test. + +2005-02-15 02:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-14 16:46 hoffman + + * Source/: cmCTest.cxx, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmLocalGenerator.h: ENH: getting closer + +2005-02-14 16:15 andy + + * Tests/MakeClean/CMakeLists.txt: COMP: Try to fix test on HP + +2005-02-14 14:35 hoffman + + * CMakeLists.txt, CTestCustom.ctest.in, ChangeLog.manual, + Source/CMakeLists.txt, Source/cmCTest.cxx: ENH: merge from main + tree + +2005-02-14 10:16 martink + + * Source/CMakeLists.txt: ENH: only do objc++ test with GNU of + course + +2005-02-14 10:16 martink + + * CTestCustom.ctest.in: ENH: added supp for Curl coding style + +2005-02-14 09:21 hoffman + + * Modules/Platform/Darwin-xlc.cmake: ENH: move xlc stuff to branch + +2005-02-14 08:44 king + + * Tests/MakeClean/CMakeLists.txt: COMP: Need ANSI flags for C + executable. + +2005-02-14 02:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-13 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-12 02:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-11 16:25 andy + + * Source/cmake.cxx: ENH: Add command to copy directory with content + +2005-02-11 16:25 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: + Implement copy of directory with content + +2005-02-11 14:36 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h: FIX: + fix for bug 1135 + +2005-02-11 14:25 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + more work on linking flags + +2005-02-11 14:22 hoffman + + * Modules/CMakeCXXCompiler.cmake.in: FIX: fix bug 1495 + +2005-02-11 14:20 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: FIX: fix for bug 1460 + +2005-02-11 14:18 hoffman + + * Modules/UseSWIG.cmake: FIX: fix bug 1303 + +2005-02-11 14:13 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/staticLibHeader.dsptemplate: FIX: fixes bugs 1152 and + 1154 + +2005-02-11 02:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-10 16:18 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Split + cmLocalUnixMakefileGenerator2 away from + cmLocalUnixMakefileGenerator to be a stand-alone generator. + +2005-02-10 14:19 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: + Initializing translation map using the PWD environment variable + and getcwd functions to automatically translate logical paths + involving the current working directory. Also added the JoinPath + method to aid users of the SplitPath method. + +2005-02-10 10:35 king + + * Source/kwsys/SystemTools.cxx: COMP: std:: -> kwsys_stl:: + +2005-02-10 10:32 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, kwsys/SystemTools.cxx, + kwsys/SystemTools.hxx.in: ENH: Added SystemTools::SplitPath + method to split any file path into its basic components. + +2005-02-10 08:27 hoffman + + * Source/cmGlobalKdevelopGenerator.cxx: COMP: fix warning + +2005-02-10 08:22 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Fix for bug 1100. + If EXECUTABLE_OUTPUT_PATH or LIBRARY_OUTPUT_PATH is a relative + path it should be converted to a full path relative to each build + directory. + +2005-02-10 07:46 king + + * Utilities/cmzlib/: CMakeLists.txt, zconf.h: COMP: Disabling + warnings in zlib code to avoid changing it too much. + +2005-02-10 07:44 hoffman + + * Source/cmGlobalKdevelopGenerator.cxx: COMP: fix warning + +2005-02-10 02:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-09 23:25 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: ENH: fix bug 1324 + +2005-02-09 23:21 hoffman + + * Source/: cmGlobalKdevelopGenerator.cxx, + cmGlobalKdevelopGenerator.h, cmLocalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.h: ENH: move most of the to global + generator + +2005-02-09 23:00 hoffman + + * Source/cmTryRunCommand.cxx, Source/cmTryRunCommand.h, + Modules/TestBigEndian.cmake: ENH: fix for 1450 + +2005-02-09 22:46 hoffman + + * Modules/: FindJNI.cmake, FindJava.cmake: ENH: bug fix 1573 + +2005-02-09 22:45 hoffman + + * Modules/FindPythonLibs.cmake: ENH: bug fix 1574 + +2005-02-09 11:40 king + + * Source/cmLocalUnixMakefileGenerator2.cxx, + Source/cmLocalUnixMakefileGenerator2.h, + Tests/MakeClean/CMakeLists.txt, + Tests/MakeClean/ToClean/CMakeLists.txt, + Tests/Wrapping/CMakeLists.txt: ENH: Adding cleaning of custom + command outputs during "make clean". + +2005-02-09 09:36 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Moved reference from local + driver targets (like build.local) into individual target rule + files. Main rule is now empty, except that clean.local may + remove files registered for cleaning. + +2005-02-09 09:32 king + + * Source/CMakeLists.txt: ENH: Adding MakeClean test to test + cleaning for makefile generators. + +2005-02-09 09:21 king + + * Tests/MakeClean/: CMakeLists.txt, check_clean.c.in, + ToClean/CMakeLists.txt, ToClean/ToCleanFiles.cmake.in, + ToClean/toclean.cxx: ENH: Adding test of "make clean". + +2005-02-08 17:12 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmXCodeObject.h: ENH: add link library stuff + +2005-02-08 10:13 andy + + * Tests/SystemInformation/CMakeLists.txt: ENH: Display all output + in ctest + +2005-02-07 17:36 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx, + cmXCodeObject.h: ENH: fix bug in target linking + +2005-02-07 16:18 king + + * Tests/: Complex/CMakeLists.txt, + Complex/Executable/complex.file.cxx, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/complex.file.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.file.cxx: ENH: Added + partial test for include regular expressions. + +2005-02-07 16:16 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: COMP: Removed useless + expression warning. + +2005-02-07 16:11 king + + * Source/: cmDepends.cxx, cmDepends.h, cmDependsC.cxx, + cmDependsC.h, cmLocalUnixMakefileGenerator2.cxx: ENH: Implemented + support for include/complain regular expressions for dependency + scanning. This now includes the possibility that scanning will + return failure and the build will stop. + +2005-02-07 15:10 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added generation of + CMakeDirectoryInformation.cmake file in each directory next to + the Makefile. The include file search path is now stored in this + file instead of duplicating it for every object file. This will + also allow more information to be passed in the future. + +2005-02-07 15:09 king + + * Source/cmMakefile.h: ENH: Added GetComplainRegularExpression + method. + +2005-02-07 09:05 king + + * Tests/SystemInformation/DumpInformation.cxx: BUG: Need to include + full output to be a useful test. + +2005-02-07 05:26 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-06 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-05 07:50 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Updated post-build command + to drive installation through the native build system. + +2005-02-05 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-04 17:58 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx, + cmXCodeObject.h: ENH: this version can build cmake + +2005-02-04 17:38 king + + * Source/cmCTest.cxx: BUG: Fixed --build-target implementation to + work with Visual Studio generators. + +2005-02-04 15:14 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented external object + feature. + +2005-02-04 14:13 king + + * Source/CMakeLists.txt: ENH: Adding test for external object file + feature. + +2005-02-04 13:58 king + + * Tests/ExternalOBJ/: CMakeLists.txt, executable.cxx, + Object/CMakeLists.txt, Object/external_main.cxx, + Object/external_object.cxx: ENH: Adding test for external object + file feature. + +2005-02-04 10:06 king + + * Modules/CMakeTestFortranCompiler.cmake: ENH: Added test for + Fortran90 support. + +2005-02-04 05:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-03 19:32 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: remove warnings + +2005-02-03 17:42 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalGenerator.h, cmXCodeObject.cxx, cmXCodeObject.h: ENH: + depends work between targets + +2005-02-03 08:39 king + + * Source/cmDependsJavaParserHelper.cxx: COMP: Fix warning about + printf format and given type. + +2005-02-03 05:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-02 17:16 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalGenerator.h, cmXCodeObject.cxx, cmXCodeObject.h: ENH: + getting closer + +2005-02-02 17:05 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y, + cmDependsJavaParser.cxx, cmDependsJavaParser.y: COMP: Adding + warning work-around for unused case label yyerrorlab on HP + compiler. + +2005-02-02 13:19 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: move AddFlags stuff up to + LocalGenerator from LocalUnix generator + +2005-02-02 05:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-02-01 17:17 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: closer + +2005-02-01 15:48 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx: ENH: + getting closer + +2005-02-01 14:28 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: fix warning + +2005-02-01 13:12 hoffman + + * Modules/CMakeFindXCode.cmake: ENH: add trycompile code for xcode + +2005-02-01 13:07 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: add trycompile code for xcode + +2005-02-01 11:28 king + + * Source/: cmDependsFortranParser.cxx, cmDependsFortranParser.y: + COMP: Disabling warning in generated code. + +2005-02-01 10:44 king + + * Source/: cmDependsJavaLexer.h, cmDependsJavaLexer.in.l: COMP: + Removing #line directives from .h file to avoid bogus Sun + warning. + +2005-02-01 10:42 king + + * Source/: CMakeLists.txt, cmDependsFortran.cxx, + cmDependsFortranLexer.cxx, cmDependsFortranLexer.h, + cmDependsFortranLexer.in.l, cmDependsFortranParser.cxx, + cmDependsFortranParser.h, cmDependsFortranParser.y, + cmDependsFortranParserTokens.h, cmDependsFortranLexer.c, + cmDependsFortranParser.c: ENH: Changed over to using C++ for + building flex/bison generated files. It reduces the number of + changes that need to be made after generation. + +2005-02-01 05:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-31 05:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-30 05:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-29 07:57 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: COMP: Removed shadowed + variable warning. + +2005-01-29 05:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-28 18:12 king + + * Source/cmGlobalXCodeGenerator.cxx: COMP: Added missing labels to + case. + +2005-01-28 17:46 andy + + * Source/: cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l: COMP: + Another borland problem + +2005-01-28 17:43 andy + + * Source/: cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l, + cmDependsJavaParser.cxx, cmDependsJavaParser.y, + cmDependsJavaParserTokens.h: COMP: Remove more warnings/errors + +2005-01-28 17:25 king + + * Source/cmGeneratedFileStream.cxx: COMP: Fix unused parameter + warning when bootstrapping. + +2005-01-28 17:24 andy + + * Source/: cmDependsJavaLexer.cxx, cmDependsJavaLexer.in.l, + cmDependsJavaParser.cxx, cmDependsJavaParser.y, + cmDependsJavaParserTokens.h: COMP: Remove warnings + +2005-01-28 17:21 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: move executable xcode stuff to a method + +2005-01-28 17:18 king + + * Source/cmDependsJavaParserHelper.cxx: COMP: Removed default + argument from method definition. + +2005-01-28 17:14 andy + + * Source/CMakeLists.txt: ENH: Enable java dependency + +2005-01-28 17:13 andy + + * Source/: cmDependsJavaParser.cxx, cmDependsJavaParser.y, + cmDependsJavaParserHelper.cxx, cmDependsJavaParserHelper.h, + cmDependsJavaParserTokens.h: ENH: Initial import of java parser + +2005-01-28 17:13 andy + + * Source/cmDependsFortranParser.y: STYLE: Add some diff helping + comments + +2005-01-28 17:09 king + + * Source/: cmDependsFortranParser.c, cmDependsFortranParser.y, + cmDependsFortranParserTokens.h: COMP: Disabled warnings in + generated code. + +2005-01-28 16:56 andy + + * Source/: cmDependsJavaLexer.cxx, cmDependsJavaLexer.h, + cmDependsJavaLexer.in.l: ENH: Initial import of java parser + +2005-01-28 16:26 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: ENH: use absolute paths + +2005-01-28 16:00 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h: + ENH: create mainGroup + +2005-01-28 14:17 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented full per-object + test for whether provides-requires mode is needed. This will + still use a recursive make for any Fortran object even if it + doesn't have requires. It is possible to avoid it but we can do + that later. + +2005-01-28 13:20 andy + + * Modules/Dart.cmake: ENH: Better checking for Dart. Closes Bug + #1505 - Configuration fails to create Makefile + +2005-01-28 13:00 andy + + * Source/cmake.cxx: BUG: prevent -P or script to be passed as + homedirectory + +2005-01-28 12:01 king + + * Source/cmDependsFortran.cxx: STYLE: Added another solution + proposal for out-of-directory modules. + +2005-01-28 10:45 king + + * Source/cmDependsFortran.cxx: ENH: Added provides/requires output + for modules. + +2005-01-28 10:12 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Add error regex + +2005-01-28 08:30 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: remove debug print + +2005-01-28 05:20 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-27 19:24 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: fix warning + +2005-01-27 17:45 andy + + * Modules/Dart.cmake: ENH: Enable compression and use the new + trigger script + +2005-01-27 17:43 andy + + * Source/cmCTest.cxx, Modules/DartConfiguration.tcl.in: ENH: Enable + compression with DartConfiguration file + +2005-01-27 17:09 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx: ENH: + xcode almost working for simple exe, but not yet + +2005-01-27 16:49 andy + + * Source/CTest/cmCTestTestHandler.h: COMP: Fix build on sun + +2005-01-27 16:43 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmXCodeObject.cxx: ENH: fix + a few more xcode things + +2005-01-27 16:25 hoffman + + * Source/cmXCodeObject.cxx: ENH: add missing ; + +2005-01-27 16:11 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmXCodeObject.cxx: ENH: add more xcode stuff + +2005-01-27 15:54 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestBuildHandler.h, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestConfigureHandler.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestMemCheckHandler.cxx, CTest/cmCTestMemCheckHandler.h, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestScriptHandler.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestTestHandler.h, + CTest/cmCTestUpdateHandler.cxx, CTest/cmCTestUpdateHandler.h: + ENH: Several cleanups and improvements + +2005-01-27 13:31 martink + + * Source/CTest/: cmCTestRunScriptCommand.cxx, + cmCTestScriptHandler.cxx, cmCTestScriptHandler.h: ENH: clean up + running of default script + +2005-01-27 11:43 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestBuildHandler.h, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestConfigureHandler.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestGenericHandler.cxx, CTest/cmCTestGenericHandler.h, + CTest/cmCTestScriptHandler.cxx, CTest/cmCTestScriptHandler.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestTestHandler.h, + CTest/cmCTestUpdateHandler.cxx, CTest/cmCTestUpdateHandler.h: + ENH: Add a superclass to all handlers + +2005-01-27 11:01 martink + + * Source/CTest/: cmCTestRunScriptCommand.cxx, + cmCTestScriptHandler.cxx, cmCTestScriptHandler.h, + cmCTestSleepCommand.cxx: COMP: fix some compiler warnings/errors + +2005-01-27 10:47 martink + + * Source/ctest.cxx: ENH: added missing documentation + +2005-01-27 10:14 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestBuildHandler.cxx, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestUpdateHandler.cxx: + ENH: Add compression support to XML files + +2005-01-27 10:14 andy + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Add compression support + +2005-01-27 10:11 andy + + * Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Source/CMakeLists.txt: ENH: Link to cmzlib + +2005-01-27 10:11 martink + + * Source/: CMakeLists.txt, CTest/cmCTestCommand.h, + CTest/cmCTestEmptyBinaryDirectoryCommand.cxx, + CTest/cmCTestEmptyBinaryDirectoryCommand.h, + CTest/cmCTestRunScriptCommand.cxx, + CTest/cmCTestRunScriptCommand.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestSleepCommand.cxx, + CTest/cmCTestSleepCommand.h: ENH: added more capabilities to + ctest + +2005-01-27 05:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-26 16:19 king + + * Source/cmDependsFortranParser.y: COMP: Added instruction to + remove TABs from generated file. + +2005-01-26 16:18 king + + * Source/: CMakeLists.txt, cmLocalUnixMakefileGenerator2.cxx: ENH: + Added hook into Fortran dependency scanner. + +2005-01-26 16:17 king + + * Source/: cmDependsFortranLexer.c, cmDependsFortranLexer.h, + cmDependsFortranParser.c, cmDependsFortranParserTokens.h: ENH: + Added generated lexer and parser sources. + +2005-01-26 16:10 king + + * Source/: cmDependsFortranLexer.in.l, cmDependsFortranParser.y: + COMP: Added additional instructions about how to modify the + generated files. + +2005-01-26 16:09 king + + * Source/cmDependsFortran.cxx: COMP: Added constructor to + cmDependsFortranFile to avoid using initializer list. Also + included assert.h. + +2005-01-26 15:58 king + + * Source/cmDependsFortranParser.y: COMP: Added forward declaration + of yylex. + +2005-01-26 15:55 andy + + * CMakeLists.txt: ENH: Add zlib from VTK + +2005-01-26 15:55 andy + + * Utilities/cmzlib/: .NoDartCoverage, CMakeLists.txt, adler32.c, + cm_zlib_mangle.h, compress.c, crc32.c, deflate.c, deflate.h, + example.c, gzio.c, infblock.c, infblock.h, infcodes.c, + infcodes.h, inffast.c, inffast.h, inffixed.h, inflate.c, + inftrees.c, inftrees.h, infutil.c, infutil.h, maketree.c, + minigzip.c, trees.c, trees.h, uncompr.c, zconf.h, zlib.def, + zlib.h, zlib.rc, zlibDllConfig.h.in, zutil.c, zutil.h: ENH: + Initial import from VTK + +2005-01-26 15:45 king + + * Source/cmDependsFortran.cxx: ENH: Removed Lexer/Parser prefix + before _yy symbols. Just cmDependsFortran_yy is enough. + +2005-01-26 15:43 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix version number + +2005-01-26 15:33 king + + * Source/: cmDependsFortran.cxx, cmDependsFortran.h, + cmDependsFortranLexer.in.l, cmDependsFortranParser.h, + cmDependsFortranParser.y: ENH: Added Fortran dependency scanner + implementation. + +2005-01-26 14:25 king + + * Source/: cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: ENH: + Added default constructor and Open method. + +2005-01-26 11:13 andy + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: ENH: + Add support for shrinking the output of the test + +2005-01-26 10:10 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add method to populate + custom integers + +2005-01-26 05:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-25 16:36 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: fix warnings + +2005-01-25 16:30 hoffman + + * Source/cmGlobalXCodeGenerator.cxx: COMP: fix warnings + +2005-01-25 16:09 hoffman + + * bootstrap: ENH: add xcode stuff to bootstrap + +2005-01-25 15:26 hoffman + + * Source/: CMakeLists.txt, cmGlobalXCodeGenerator.cxx, + cmGlobalXCodeGenerator.h, cmXCodeObject.cxx, cmXCodeObject.h, + cmake.cxx: ENH: add initial non-working XCode stuff + +2005-01-25 05:59 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-24 17:35 hoffman + + * Source/: cmGlobalXCodeGenerator.cxx, cmGlobalXCodeGenerator.h, + cmLocalXCodeGenerator.cxx, cmLocalXCodeGenerator.h, + cmXCodeObject.cxx, cmXCodeObject.h: ENH: initial xcode stuff + +2005-01-24 05:53 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-23 05:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-22 05:51 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-21 16:25 hoffman + + * Source/: cmXCodeObject.cxx, cmXCodeObject.h: ENH: start xcode + stuff + +2005-01-21 12:26 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: ENH: move project map to global + generator base + +2005-01-21 11:22 martink + + * Source/cmWhileCommand.cxx: COMP: fix unused var warning + +2005-01-21 10:27 hoffman + + * bootstrap, Source/CMakeLists.txt, Source/cmBootstrapCommands.cxx, + Source/cmCommands.cxx, Source/cmCommands.h, + Source/cmWhileCommand.cxx, Source/cmake.cxx: ENH: split up + cmCommands into two files + +2005-01-21 09:37 martink + + * Source/: cmCommands.cxx, cmWhileCommand.cxx, cmWhileCommand.h, + cmEndWhileCommand.cxx, cmEndWhileCommand.h: ENH: added while + command + +2005-01-21 05:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-20 15:26 martink + + * Source/cmSetCommand.cxx: COMP: fix unused var warning + +2005-01-20 14:38 martink + + * Source/: cmSetCommand.cxx, cmSetCommand.h: ENH: now the set + command can set environment variables + +2005-01-20 12:30 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeCXXCompiler.cmake.in, + CMakeDetermineCCompiler.cmake, CMakeFortranCompiler.cmake.in, + CMakeJavaCompiler.cmake.in, CMakeRCCompiler.cmake.in, + CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake, + Platform/Windows-cl.cmake, Platform/Windows-cl.cmake.in: ENH: + stuff to keep compiler tests from re-running all the time + +2005-01-20 12:28 hoffman + + * Source/: cmGlobalGenerator.cxx, cmLocalKdevelopGenerator.cxx: + ENH: add some comments on how this could be moved to global + generator + +2005-01-20 04:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-19 12:06 king + + * Source/: cmListFileLexer.in.l, cmListFileLexer.c: ENH: Mangled + lexer symbols to begin in cmListFileLexer_yy instead of just yy + to avoid conflict with other lexers that may be added. + +2005-01-19 07:23 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Removed unquoted version of + OBJECTS make variable. Quoted seems to work everywhere. BUG: + Fixed AppendAnyDepend to properly identify executable targets. + BUG: Used CreateMakeVariable to fix variable name for OBJECTS + list when target has a . in its name. + +2005-01-19 05:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-18 18:11 andy + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: COMP: Add proper + link directory + +2005-01-18 17:29 andy + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: COMP: Add cmexpat + to complex + +2005-01-18 17:09 king + + * Source/: CMakeLists.txt, cmDepends.cxx, cmDepends.h, + cmDependsC.cxx, cmDependsC.h, cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, cmake.cxx: ENH: Split dependency + scanning and checking into separate cmDepends superclass with + language-specific subclasses such as cmDependsC. + +2005-01-18 16:47 andy + + * Source/CMakeLists.txt: COMP: Ok, actually link to the library.... + +2005-01-18 15:54 andy + + * Source/cmXMLParser.cxx, Utilities/cmexpat/xmlparse.c: COMP: Try + to resolve compile errors because of missing includes and wrong + include path + +2005-01-18 14:02 andy + + * Source/cmXMLParser.cxx: COMP: Use cmOStringStream not + ostringstream + +2005-01-18 13:41 andy + + * Source/: CMakeLists.txt, cmXMLParser.cxx, cmXMLParser.h: ENH: Add + XML parser + +2005-01-18 11:15 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: STYLE: Added TODO + comment for another missing feature (external object files). + +2005-01-18 09:06 andy + + * Utilities/Doxygen/doc_makeall.sh.in: ENH: Cleanup + +2005-01-18 08:58 andy + + * CMakeLists.txt, cmake_uninstall.cmake.in: ENH: Add uninstall. + This is not really a feature but more of an example on how to do + it. + +2005-01-18 04:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-17 16:29 hoffman + + * Source/cmCTest.cxx: BUG: when ctest is looking for cmake look in + the build directory as well as where ctest is so that purify will + work + +2005-01-17 15:20 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeCXXCompiler.cmake.in, + Platform/Windows-cl.cmake: BUG: fix running of cl in trycompiles + +2005-01-17 15:09 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Adding partial + implementation of provides-requires mode. + +2005-01-17 15:09 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Fix for relative + path conversion when path is a subset of relative path root. + +2005-01-17 14:29 hoffman + + * Source/: cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h: + BUG: make sure handles are always closed even if Wait is not + called. + +2005-01-17 04:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-15 04:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-13 12:38 hoffman + + * ChangeLog.manual, Source/MFCDialog/PropertyList.cpp: BUG: fix + from main tree + +2005-01-13 12:26 hoffman + + * Source/MFCDialog/PropertyList.cpp: BUG: fix for Bug #1466 delete + cache leaves file button and can crash + +2005-01-13 03:58 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-12 13:58 martink + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: now limits warnings + and error report to 50 each + +2005-01-12 13:51 martink + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: now limits warnings + and error report to 50 each + +2005-01-12 10:11 millerjv + + * Source/kwsys/Base64.c: BUG: encoding 2 bytes into 4 bytes was + accessing a 3rd byte from the source + +2005-01-12 04:43 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-11 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-10 05:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-08 05:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-07 11:56 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-05 05:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-04 18:24 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added install target + implementation. Also added missing include of assert.h. + +2005-01-04 17:41 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added relative path support + (mostly done). Many paths are written relative even if + CMAKE_USE_RELATIVE_PATHS is not on just to keep makefiles short. + +2005-01-04 16:26 king + + * Source/cmLocalUnixMakefileGenerator.h: ENH: Made + ConfigureOutputPaths virtual to help new generator. + +2005-01-04 15:38 hoffman + + * ChangeLog.manual, Modules/Platform/Windows-icl.cmake: add intel + compiler config file + +2005-01-04 12:12 hoffman + + * ChangeLog.manual, Source/cmSetCommand.cxx: fix for bug 1445 + +2005-01-04 10:55 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add a + delay method + +2005-01-04 09:56 king + + * Source/cmLocalKdevelopGenerator.cxx: BUG: Applied patch attached + to bug #1453. + +2005-01-04 08:42 martink + + * Source/cmSetCommand.cxx: ENH: fixed SET command to accept cache + values with more than one value + +2005-01-04 04:17 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-02 05:04 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2005-01-01 21:02 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-31 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-30 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-29 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-28 05:23 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-27 05:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-26 05:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-25 05:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-24 05:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-23 05:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-22 05:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-21 05:14 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-20 05:09 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-19 05:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-18 05:11 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-17 05:06 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-16 22:19 hoffman + + * Modules/CMakeDetermineSystem.cmake: fix wrong number of arguments + +2004-12-16 22:18 hoffman + + * Modules/CMakeDetermineSystem.cmake: fix number of arguments + +2004-12-16 17:26 hoffman + + * ChangeLog.manual, Modules/CMakeDetermineSystem.cmake, + Modules/Platform/OpenBSD.cmake: ENH: fix for OpenBSD + +2004-12-16 05:52 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-15 05:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-14 05:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-13 05:03 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-12 05:08 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-11 05:10 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-10 05:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-09 16:14 king + + * Source/cmSystemTools.cxx: BUG: Fix to avoid relative path with + ..s all the way to the root. + +2004-12-09 15:56 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Support for custom + command outputs in subdirectories of current build tree location. + +2004-12-09 15:23 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: AppendAnyDepend + must handle non-existing files. + +2004-12-09 15:11 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added post-build rules to + executables and libraries. Generalized AppendLibDepend method to + AppendAnyDepend. This takes most of the functionality of + AppendCustomDepend too, and generalized jump-and-build to + executables. + +2004-12-09 13:52 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented utility + targets. This involved pulling part of the custom command rule + implementation out into shared methods. + +2004-12-09 05:12 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-08 05:05 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-07 05:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-06 12:39 hoffman + + * Modules/Platform/: Tru64.cmake, True64.cmake: FIX: fix for bug + 1325, Tru64 not True64 + +2004-12-06 12:38 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalUnixMakefileGenerator.cxx: BUG: fix for bug 1396, object + files could not be used as sources any more + +2004-12-06 11:10 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx, + Source/CTest/cmCTestSubmit.cxx, Source/CTest/cmCTestSubmit.h, + Utilities/Release/cmake_release.sh: merge from main tree + +2004-12-06 05:00 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-05 04:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-04 04:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-03 09:25 martink + + * Source/CMakeLists.txt: ENH: minor fix for windows + +2004-12-03 09:05 martink + + * Source/cmMakefile.cxx: ENH: fix for relative paths + +2004-12-03 06:27 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-02 13:14 hoffman + + * Source/cmMakefile.cxx: BUG: fix for 1369 before include + directories need to be always added + +2004-12-02 12:33 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix for bug 1385, /tmp should + not be used on windows + +2004-12-02 06:13 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-12-01 07:28 king + + * Source/kwsys/kwsys_ios_sstream.h.in: COMP: Need to choose between + and based on whether standard headers are + available. + +2004-12-01 07:24 king + + * Source/kwsys/: kwsys_ios_fstream.h.in, kwsys_ios_iostream.h.in: + COMP: Disabling old streams warnings when including old headers + on MSVC. + +2004-12-01 06:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-30 18:20 king + + * Source/kwsys/kwsys_ios_sstream.h.in: BUG: Need to include header + to use placement new syntax. Really this should be fixed + by replacing the stream buffer to set a new string instead of + reconstructing the object, but this will require quite a bit of + work to do portably. + +2004-11-30 06:29 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-29 06:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-28 06:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-27 06:28 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-26 06:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-25 06:19 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-24 09:25 andy + + * Source/CTest/: cmCTestSubmit.cxx, cmCTestSubmit.h: ENH: Add + support for proxy authentication (thanks Jean-Michel) + +2004-11-24 05:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-23 17:34 hoffman + + * Modules/Platform/AIX.cmake: ENH: try and fix aix xlC with gcc + +2004-11-23 17:28 hoffman + + * Modules/Platform/AIX.cmake: ENH: try and fix aix xlC with gcc + +2004-11-23 14:07 hoffman + + * Modules/Platform/AIX.cmake: ENH: try to fix aix with native cxx + and gcc + +2004-11-23 10:48 andy + + * Source/CTest/cmCTestUpdateHandler.cxx: ENH: Make more things XML + safe + +2004-11-23 05:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-22 05:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-21 05:44 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-20 05:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-19 09:42 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Moved custom + command rule files into special CMakeCustomCommands.dir + subdirectory. + +2004-11-19 09:32 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Unified WriteDependRules, + WriteBuildRules, WriteCleanRules, and the future + WriteInstallRules into a single WritePassRules method. Also + added WriteTargetDependsRule and WriteTargetCleanRule methods to + unify writing of depend and clean rules for each target. + +2004-11-19 05:41 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-18 08:25 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-17 08:33 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-16 08:16 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-15 09:39 martink + + * Source/ctest.cxx: COMP: fix warning + +2004-11-15 08:22 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-14 08:21 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-13 09:55 martink + + * Source/: cmCTest.cxx, ctest.cxx, CTest/cmCTestTestHandler.cxx, + CTest/cmCTestTestHandler.h: ENH: added -U option to take union of + -R and -I + +2004-11-13 08:15 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-12 05:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-11 17:40 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Another linker error + on sun + +2004-11-11 05:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-10 15:39 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: FIX: make sure the + object file name is correctly mangled for depend information + +2004-11-10 13:15 martink + + * CMakeLists.txt, CTestCustom.ctest.in: ENH: added custom supp for + cmake + +2004-11-10 10:24 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-09 09:57 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-08 05:46 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-07 05:45 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-06 05:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-05 15:09 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added partial clean target + support. + +2004-11-05 15:03 king + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: Moved code that checks + output path variables to separate ConfigureOutputPaths method. + Needed to provide access to the same code from a subclass. + +2004-11-05 07:39 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented VERBOSE output + setting. + +2004-11-05 05:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-04 05:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-03 15:43 martink + + * Source/kwsys/SystemTools.cxx: ENH: merges from the main tree + +2004-11-03 11:02 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Generalized driver targets + and subdirectory traversal rules. The implementations of all, + depend, build, clean, install, etc. now follow a common + framework. + +2004-11-03 08:59 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Removed unneeded requires + rules now that canonical names are available. + +2004-11-03 08:46 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added convenience rules to + build targets without specifying full paths. + +2004-11-03 07:51 king + + * Source/: cmExportLibraryDependencies.cxx, + cmGeneratedFileStream.cxx, cmGeneratedFileStream.h, + cmGlobalVisualStudio7Generator.cxx, cmLocalGenerator.cxx, + cmLocalKdevelopGenerator.cxx, cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator2.cxx, + cmVTKMakeInstantiatorCommand.cxx: STYLE: Adjusted signature of + cmGeneratedFileStream to make copy-if-different more explicity. + +2004-11-03 07:27 king + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmGeneratedFileStream.cxx, cmGeneratedFileStream.h: COMP: Fix new + cmGeneratedFileStream for MSVC. + +2004-11-03 07:23 king + + * bootstrap, Source/CMakeLists.txt, + Source/cmExportLibraryDependencies.cxx, + Source/cmGeneratedFileStream.cxx, Source/cmGeneratedFileStream.h, + Source/cmLocalGenerator.cxx, Source/cmLocalKdevelopGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator2.cxx, + Source/cmVTKMakeInstantiatorCommand.cxx: ENH: Re-implemented + cmGeneratedFileStream to look like a real stream and replace the + destination file atomically. This will avoid problems with the + process being terminated while generating a file. + +2004-11-03 05:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-02 18:09 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Added partial RC + language dependency scanning (just using C dependencies for now). + +2004-11-02 17:38 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added dependencies between + libraries. + +2004-11-02 17:19 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Removed debugging + output. + +2004-11-02 17:14 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented generation of + custom command rule files. + +2004-11-02 17:11 andy + + * Source/kwsys/SystemTools.cxx: COMP: Remove compile warning + +2004-11-02 08:32 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: BUG: Fixed subdirectory + implementation for Borland Make. + +2004-11-02 07:36 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Implemented subdirectory + rules for all target. + +2004-11-02 04:49 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-11-01 16:57 hoffman + + * Source/kwsys/SystemTools.cxx, Tests/Dependency/CMakeLists.txt, + Tests/Dependency/1/CMakeLists.txt, Tests/Dependency/1/OneSrc.c: + BUG: add a test for a single char dir, and fix bug introduced in + 1.53, but we still can not handle a space as the start of a + directory name + +2004-11-01 04:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-31 03:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-30 04:32 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-29 18:15 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added framework for + subdirectory traversal. + +2004-10-29 17:18 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Dependency + makefile lines must be at least three characters long to hold a + dependency. + +2004-10-29 16:50 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h, cmake.cxx, cmake.h: ENH: Added + build system integrity check to cmLocalUnixMakefileGenerator2. + This now uses a special --check-build-system flag to cmake which + replaces --check-rerun. Integrity of dependencies is also + checked during generation. + +2004-10-29 15:32 hoffman + + * Source/cmLocalGenerator.cxx: FIX: fix shared flag + +2004-10-29 15:31 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: remove debug print + +2004-10-29 14:57 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Fixes for Borland + Make. + +2004-10-29 13:55 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: BUG: Fixes for NMake. + +2004-10-29 13:04 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Changed AppendRecursiveMake + to GetRecursiveMakeCall and implemented jump-and-build on Windows + and UNIX. + +2004-10-29 11:42 hoffman + + * CMakeLists.txt, ChangeLog.manual, + Modules/TestCXXAcceptsFlag.cmake, Source/cmCTest.cxx, + Source/cmCacheManager.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Tests/Complex/Executable/A.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/A.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/A.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/LoadCommand/LoadedCommand.cxx, + Tests/LoadCommandOneConfig/LoadedCommand.cxx, + Utilities/Release/cmake_release.sh: move 2.0.5 to LatestRelease + +2004-10-29 10:52 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Cleaned up format of + generated makefiles. Consolidated rule generation into single + WriteMakeRule method. Added special targets like rebuild_cache + and edit_cache. + +2004-10-29 04:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-28 15:40 hoffman + + * Source/cmIncludeDirectoryCommand.cxx: ENH: add a check for empty + include directories + +2004-10-28 15:31 hoffman + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: Create + CMake2.0.5 version + +2004-10-28 07:46 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: COMP: Fix local shadow + warnings. + +2004-10-28 07:43 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: COMP: Fix for Mac + specific code. + +2004-10-28 04:36 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-27 16:00 hoffman + + * Source/cmMakefile.cxx: ENH: look in the windows LIB env variable + for libraries + +2004-10-27 16:00 hoffman + + * Source/cmGlobalKdevelopGenerator.cxx: DOC: documentation change + +2004-10-27 15:58 hoffman + + * ChangeLog.manual, Modules/TestCXXAcceptsFlag.cmake, + Source/cmCacheManager.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: ENH: merge from main + tree bug fixes + +2004-10-27 12:05 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Do not try to handle + unimplemented target types yet. Fixes for projects with + subdirectories. + +2004-10-27 11:26 andy + + * Source/cmakemain.cxx: BUG: If bootstrap cmake is run with no + argument produce error + +2004-10-27 10:53 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: put error checking for + missing linker languages + +2004-10-27 10:47 andy + + * bootstrap, Source/cmFileCommand.cxx, + Source/cmFindPackageCommand.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmake.cxx, Source/cmake.h, + Source/cmakemain.cxx: PERF: Remove several classes from the + bootstrap and so making bootstrap smaller and faster + +2004-10-27 10:45 andy + + * Source/CursesDialog/ccmake.cxx: STYLE: Remove unused code + +2004-10-27 10:45 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added executable + dependencies on libraries including jump-and-build support. + +2004-10-27 10:45 andy + + * Modules/TestCXXAcceptsFlag.cmake: BUG: Check for the variable + first time + +2004-10-27 08:49 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Add a space before + the : only if the target name is one letter long. This works + around bugs in some shells' tab completion of target names. + +2004-10-27 08:47 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added generation of rules + for shared libraries and modules. + +2004-10-27 08:20 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added rules to build + executables. Also began to consolidate flag list construction + into separate methods. + +2004-10-27 04:37 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-26 20:13 andy + + * Source/cmCacheManager.cxx: BUG: Handle DOS files un unix file + systems + +2004-10-26 17:23 andy + + * Modules/TestCXXAcceptsFlag.cmake: BUG: Only test for cxx flags + the first time around + +2004-10-26 16:07 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Do not generate + touch rule for target level dependencies. There are no + build-time dependencies by default. + +2004-10-26 15:03 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: ENH: move stuff + from main tree to branch + +2004-10-26 14:49 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added generation of rule to + build object file. + +2004-10-26 14:33 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: handle read only directories + with configure file destination + +2004-10-26 14:12 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx: ENH: merge from main tree + +2004-10-26 13:00 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ERR: Missing std:: on + endl. + +2004-10-26 12:55 king + + * Source/cmake.cxx: ENH: Added object file dependency scanning to + cmLocalUnixMakefileGenerator2. This needs a hook in cmake.cxx. + +2004-10-26 12:54 king + + * bootstrap, Source/CMakeLists.txt: ENH: Added + cmLocalUnixMakefileGenerator2 to build. + +2004-10-26 12:53 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Added object file + dependency scanning. + +2004-10-26 10:24 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Handle more REMARKS on + SGI + +2004-10-26 10:15 king + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ENH: Split + part of GetIncludeFlags method into separate + GetIncludeDirectories method. + +2004-10-26 08:45 andy + + * Source/kwsys/SystemTools.hxx.in: COMP: Attempt to fix warnings on + SGI + +2004-10-26 04:40 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-25 16:39 hoffman + + * Source/: cmLocalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.h: ENH: add some more comments + +2004-10-25 15:08 hoffman + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.cxx, LoadCommand/LoadedCommand.h.in, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommandOneConfig/LoadedCommand.h.in: ENH: clean up loaded + command test so you can tell what really failed + +2004-10-25 13:40 hoffman + + * Source/cmSystemTools.cxx: COMP: remove an unused variable warning + +2004-10-25 13:24 hoffman + + * ChangeLog.manual, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/LoadCommand/LoadedCommand.cxx, + Tests/LoadCommandOneConfig/LoadedCommand.cxx: ENH: move stuff + from main tree to fix the runsingle program mess + +2004-10-25 13:16 hoffman + + * Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: FIX: go back + to not trying to handle spaces in the path for run single command + and comment it so that people know to call the right thing + +2004-10-25 12:26 hoffman + + * Source/cmLocalKdevelopGenerator.cxx: COMP: remove warnings + +2004-10-25 12:15 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: add test back + for single char exe + +2004-10-25 11:59 hoffman + + * Source/cmSystemTools.cxx, Tests/LoadCommand/LoadedCommand.cxx, + Tests/LoadCommandOneConfig/LoadedCommand.cxx: FIX: fix + RunSingleCommand to work with spaces in the path, and with an + already quoted command + +2004-10-25 10:04 andy + + * Source/CMakeLists.txt: ENH: Allow disabling of long running tests + +2004-10-25 04:34 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-24 11:38 andy + + * Source/cmVersion.cxx: STYLE: Nightly Version update + +2004-10-22 21:52 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: remove run program + test until run single command is fixed + +2004-10-22 21:03 hoffman + + * Source/cmSystemTools.cxx: undo last check in as it breaks borland + with spaces some how + +2004-10-22 17:51 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmSystemTools.cxx, Source/kwsys/SystemTools.cxx, + Tests/Complex/Executable/A.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/A.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/A.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: fixes from + main tree + +2004-10-22 17:05 hoffman + + * Tests/: Complex/Executable/A.cxx, + ComplexOneConfig/Executable/A.cxx, + ComplexRelativePaths/Executable/A.cxx: ENH: add missing file + +2004-10-22 17:00 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmSystemTools.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: FIX: fix the + problem where a target is a single character and nmake gets + confused and add a test for it + +2004-10-22 16:58 hoffman + + * Source/cmTarget.cxx: COMP: remove warnings + +2004-10-22 15:45 andy + + * Source/CMakeLists.txt: COMP: Remove unnecessary commit + +2004-10-22 15:44 andy + + * bootstrap, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmDocumentation.cxx, Source/cmDumpDocumentation.cxx, + Source/cmVersion.cxx, Source/cmVersion.h, Source/cmake.cxx, + Source/CTest/cmCTestUpdateHandler.cxx: ENH: Add development + version support in CMake + +2004-10-22 10:19 hoffman + + * Source/cmLocalKdevelopGenerator.cxx: COMP: remove warning + +2004-10-21 17:29 hoffman + + * ChangeLog.manual: add .0.5 + +2004-10-21 17:11 hoffman + + * ChangeLog.manual: add .0.5 + +2004-10-21 16:07 andy + + * Source/CTest/cmCTestTestHandler.cxx: BUG: Fix reporting of path + and full command when test program was not found + +2004-10-21 15:21 hoffman + + * Source/: cmLocalGenerator.cxx, cmTarget.cxx: COMP: fix warnings + +2004-10-21 14:55 hoffman + + * Source/cmLocalGenerator.cxx: COMP: fix warning + +2004-10-21 14:34 hoffman + + * Modules/CMakeDetermineFortranCompiler.cmake, + Modules/Platform/Windows-g77.cmake, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h: ENH: add the ability to generate custom + commands for a language that is not supported by an IDE + +2004-10-21 13:34 andy + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: Handle remarks on SGI + properly + +2004-10-21 11:58 hoffman + + * Source/: cmLocalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.h: ENH: better support for kdevelop3 + +2004-10-20 12:37 andy + + * Source/kwsys/CommandLineArguments.cxx: COMP: Remove warning + +2004-10-20 08:19 hoffman + + * Source/cmCTest.cxx: fix warning on LRB + +2004-10-20 08:14 hoffman + + * Source/cmCTest.cxx: COMP: remove warning + +2004-10-19 15:09 hoffman + + * CMakeLists.txt, ChangeLog.manual, Modules/CMakeTestForFreeVC.cxx, + Modules/Platform/Windows-cl.cmake, Source/CMakeLists.txt, + Source/cmAddExecutableCommand.cxx, Source/cmCTest.cxx, + Source/cmCTest.h, Source/cmFileCommand.cxx, + Source/cmForEachCommand.cxx, Source/cmGlob.cxx, Source/cmGlob.h, + Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmGlobalCodeWarriorGenerator.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmIncludeExternalMSProjectCommand.cxx, + Source/cmListFileLexer.c, Source/cmListFileLexer.h, + Source/cmListFileLexer.in.l, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmSystemTools.h, Source/cmTryRunCommand.cxx, + Source/cmWin32ProcessExecution.cxx, + Source/cmWin32ProcessExecution.h, Source/cmakemain.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/PathDialog.cpp, Source/kwsys/SystemTools.cxx, + Tests/StringFileTest/CMakeLists.txt, + Utilities/Release/cmake_release.sh, + Utilities/Release/config_IRIX64: ENH: move 2.0.4 to LRB + +2004-10-19 14:57 hoffman + + * ChangeLog.manual: update change log + +2004-10-19 14:56 hoffman + + * Source/cmCTest.cxx: merge from main tree, add more warning cases + to ctest + +2004-10-19 14:51 hoffman + + * bootstrap: ENH: perfer gmake for bootstrap + +2004-10-19 13:25 andy + + * Tests/CTestTest/test.cmake.in: ENH: Display version of ctest + first + +2004-10-19 13:25 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Add regular expression + for remarks on IRIX + +2004-10-19 13:02 hoffman + + * Source/cmSystemTools.cxx: BUG: if the paths share nothing then + just return the remote path with no .. + +2004-10-19 12:48 andy + + * Source/cmCTest.cxx: BUG: Remove instances of // in the output + +2004-10-19 12:38 andy + + * Source/cmCTest.cxx: EHN: Even more cleanup + +2004-10-19 10:59 andy + + * Source/CMakeLists.txt, Tests/CTestTest/test.cmake.in: ERR: Fix + problems on windows + +2004-10-18 18:11 will + + * bootstrap: COMP: Fix on sun + +2004-10-18 17:24 andy + + * Source/CMakeLists.txt: ENH: Remove bogus clean step + +2004-10-18 15:37 andy + + * Source/CMakeLists.txt: BUG: Ok, this should make the test + actually do something + +2004-10-18 15:05 andy + + * Source/CMakeLists.txt: ENH: Do bootstrap test on all unix systems + +2004-10-18 13:19 hoffman + + * Source/cmSystemTools.cxx: ENH: better comments and variable names + +2004-10-18 12:33 andy + + * Source/CMakeLists.txt: ENH: Add bootstrap test + +2004-10-18 11:48 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: make sure output + path is used for target with canonical name + +2004-10-18 11:34 andy + + * bootstrap: ENH: Add check for previous bootstrap in the source + tree when doing out-of-source build + +2004-10-17 22:47 andy + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: BUG: Fix output to match the Dart + output + +2004-10-17 22:47 andy + + * Source/CTest/cmCTestTestHandler.cxx: ENH: Cleanups and unify + output + +2004-10-17 22:46 andy + + * Source/kwsys/CMakeLists.txt: ENH: Specify full path to the + executable + +2004-10-17 22:46 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add method to get the + relative path to source or build + +2004-10-17 19:45 andy + + * Source/CTest/: cmCTestCoverageHandler.cxx, + cmCTestCoverageHandler.h: ENH: Update to the new coverage code. + It may not be perfect yet, but it is a start + +2004-10-17 19:02 andy + + * Tests/CTestTest/test.cmake.in: ENH: Propagate more things + +2004-10-17 18:50 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + method to find file in parent directories if it exists + +2004-10-17 18:50 andy + + * Tests/CTestTest/test.cmake.in: ENH: Propagate MEMORYCHECK_COMMAND + and COVERAGE_COMMAND to the CTest test + +2004-10-17 18:49 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Handle coverage errors + +2004-10-15 09:24 king + + * Source/: cmake.cxx, cmake.h: ENH: Added --check-rerun option to + allow a runtime check of whether a new generate should really be + done. + +2004-10-15 09:23 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + FileTimeCompare method to compare file modification times. + Currently the resolution is limited to one second. + +2004-10-15 08:57 king + + * Source/cmLocalUnixMakefileGenerator2.cxx: ENH: Added generation + of rule to build object file. + +2004-10-14 16:50 hoffman + + * Source/cmLocalGenerator.cxx: BUG: make sure all returns for + ConvertToRelativeOutputPath get passed by ConvertToOutputPath + +2004-10-14 15:09 hoffman + + * Source/cmLocalGenerator.cxx: BUG: now that system tools relative + path works, clean up the convert to relative output path code + +2004-10-14 11:59 hoffman + + * Source/cmLocalKdevelopGenerator.cxx: COMP: remove warning + +2004-10-14 11:46 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h: BUG: allow split + string to know if it is separating a path + +2004-10-13 11:37 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h: BUG: fix and comment + relative path funciton + +2004-10-12 18:29 andy + + * Modules/Dart.cmake: ENH: If dart or ctest are not found, use + ctest. For default drop location etc, support http submit (just + set DROP_METHOD to http. Only look for tclsh if DART_ROOT is set + +2004-10-12 10:57 hoffman + + * bootstrap, Source/CMakeLists.txt: allow kdevelop for cygwin + +2004-10-12 10:22 hoffman + + * Source/cmLocalKdevelopGenerator.cxx: BUG: remove bad headers + +2004-10-12 09:50 hoffman + + * bootstrap, Source/cmake.cxx: BUG: do not build kdevlop stuff when + bootstrapping + +2004-10-11 16:35 andy + + * Source/cmLocalKdevelopGenerator.cxx: ENH: Support not writing + files to the source tree. Generate single project file for whole + project, some other little cleanups + +2004-10-11 15:25 andy + + * Source/cmLocalKdevelopGenerator.cxx: BUG: Fix generated XML + +2004-10-11 14:47 andy + + * Source/CMakeLists.txt: STYLE: Remove anoying message + +2004-10-11 13:57 andy + + * Source/cmCTest.cxx: BUG: On Windows, remove extra CR characters. + Hopefully this will result in not duplicated new-lines + +2004-10-11 11:57 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix split program from args to + not get stuck in an infinite loop in some cases + +2004-10-11 11:55 hoffman + + * Modules/CMakeTestCXXCompiler.cmake: ENH: make sure the c++ + compiler is a c++ compiler + +2004-10-11 11:47 hoffman + + * bootstrap: ENH: add kdev to bootstrap + +2004-10-11 11:32 hoffman + + * Source/: CMakeLists.txt, cmGlobalKdevelopGenerator.cxx, + cmGlobalKdevelopGenerator.h, cmLocalKdevelopGenerator.cxx, + cmLocalKdevelopGenerator.h, cmake.cxx: NEW: add kdevelop patch + from Alexander Neundorf + +2004-10-11 08:02 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ERR: Replaced + std::string with kwsys_stl::string for portability. + +2004-10-10 12:14 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + method to retrieve parent directory and for checking if directory + is a subdirectory of another directory + +2004-10-06 12:41 hoffman + + * ChangeLog.manual, Source/cmAddExecutableCommand.cxx: FIX: merge + from main tree mac bundle fix + +2004-10-06 12:25 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx, Source/cmCTest.h: ENH: + merge from main tree fix for build overview page + +2004-10-05 16:16 andy + + * Source/CMakeLists.txt: ERR: Too much commits + +2004-10-05 16:14 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, CTest/CMakeLists.txt, + CTest/cmCTestSubmit.cxx: PERF: Several cleanups, and remove need + for Curl directory to be in include path + +2004-10-05 11:37 hoffman + + * Source/cmake.cxx: FIX: correctly handle if path table can not + open + +2004-10-05 11:29 hoffman + + * bootstrap: ENH: pick native compilers first, and aCC before CC + +2004-10-05 10:59 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix realpath problem and unix + slashes + +2004-10-05 10:13 andy + + * Source/CTest/cmCTestSubmit.cxx: ERR: Fix TRUE build problem and + replace error couts with cerrs + +2004-10-05 10:00 andy + + * Source/cmCTest.cxx: ERR: Fix Windows build + +2004-10-05 09:25 martink + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: COMP: fix + some compile issues with insert + +2004-10-05 09:01 martink + + * Source/cmake.cxx: COMP: fix bad include file + +2004-10-05 08:49 andy + + * bootstrap: ERR: Fix bootstrap + +2004-10-05 08:33 andy + + * Modules/: CheckTypeSize.c.in, CheckTypeSize.cmake, + CheckTypeSize.c: ENH: Add option of adding random include files + before doing CheckTypeSize + +2004-10-05 08:32 andy + + * Modules/CheckIncludeFiles.cmake: ENH: When test fails, write out + the output + +2004-10-04 16:15 king + + * Source/: cmLocalUnixMakefileGenerator2.cxx, + cmLocalUnixMakefileGenerator2.h: ENH: Started new makefile + generator implementation. It will temporarily be called + cmLocalUnixMakefileGenerator2 until it is ready to replace the + original completely. + +2004-10-04 12:31 martink + + * CMake.rtf, Source/cmake.cxx, Source/cmake.h, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in: + ENH: Mathieus support for path conversions + +2004-10-04 12:02 andy + + * Tests/CTestTest/test.cmake.in: BUG: Use kwsys from the source + tree + +2004-10-04 08:06 andy + + * Tests/CTestTest/test.cmake.in: ENH: Better sorting of results + +2004-10-03 07:27 andy + + * Tests/CTestTest/test.cmake.in: BUG: Fix problem with spaces in + the path + +2004-10-03 07:14 andy + + * Source/ctest.cxx: BUG: Attempt to remove memory leak + +2004-10-01 13:23 andy + + * Source/CTest/cmCTestBuildHandler.cxx: BUG: Add regular expression + to vector + +2004-10-01 13:10 andy + + * Tests/CTestTest/test.cmake.in: ENH: Use existing CTest and cmake + +2004-10-01 12:21 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h: ENH: Add CTEST_EXECUTABLE_NAME to + CTest scripting. This way you do not have to specify ctest + executable in CTEST_COMMAND, but just a variable + +2004-10-01 11:36 king + + * Source/kwsys/testProcess.c: ERR: Added missing include of + string.h + +2004-10-01 11:13 andy + + * Tests/CTestTest/test.cmake.in: ENH: Let us recognize it on the + dashboard + +2004-09-30 18:45 andy + + * Source/CMakeLists.txt: ENH: Cleanup CTest test + +2004-09-30 18:45 andy + + * Tests/CTestTest/test.cmake.in: ENH: Do kwsys instead of CMake + +2004-09-30 18:06 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestBuildHandler.h: + ERR: Fix for non-gcc/icc compilers + +2004-09-30 17:42 king + + * Source/kwsys/testProcess.c: ENH: Added optional display of output + for tests. Avoid printing alot of output for test 6. + +2004-09-30 17:27 andy + + * Source/CTest/cmCTestBuildHandler.h: ERR: Fix error + +2004-09-30 16:24 andy + + * bootstrap: BUG: Check if the compiler is gnu. If it is, do not do + special platform tests. Fixes Bug #1215 - bootstrap uses native + flags with gnu compiler on OSF + +2004-09-30 16:20 andy + + * Source/CTest/: cmCTestBuildHandler.cxx, cmCTestBuildHandler.h: + ENH: Add support for SourceFile and LineNumber + +2004-09-29 16:07 hoffman + + * Source/: cmCTest.h, cmCacheManager.cxx, cmCacheManager.h, + cmDynamicLoader.cxx, cmGlobalGenerator.cxx, + cmLoadCacheCommand.cxx, cmLocalUnixMakefileGenerator.cxx, + cmMakefile.cxx, cmTarget.cxx, cmakewizard.cxx: ENH: shorten the + symbols a bit and remove maps of std::string for map of + cmStdString + +2004-09-29 14:14 andy + + * Source/CTest/: cmCTestTestHandler.cxx, cmCTestTestHandler.h: BUG: + Remove maximum size of test output + +2004-09-29 13:21 andy + + * Source/kwsys/SystemTools.hxx.in: ERR: Fix Windows build + +2004-09-29 12:20 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + kwsys/SystemTools.cxx, kwsys/SystemTools.hxx.in: ENH: Move + permissions code to kwsys so that copyfile can use it. Fixes Bug + #1133 - cmake -E copy file dir sets the wrong permissions on the + destination directory + +2004-09-29 11:52 andy + + * Source/CTest/cmCTestScriptHandler.cxx: BUG: If extra update + failes, continue with dashboard. Closes Bug #894 - Fatal CVS + update error kills test, and is not reported + +2004-09-29 11:18 andy + + * Source/kwsys/SystemTools.cxx: ENH: When copy file, if the output + file exits, delete it first + +2004-09-29 08:58 andy + + * Source/kwsys/CMakeLists.txt: ENH: Allow CMake to use + CommandLineArguments without warning + +2004-09-29 08:34 andy + + * Source/kwsys/CommandLineArguments.hxx.in: ENH: Add lots of + comments + +2004-09-29 07:56 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Add access to last argument + parsed + +2004-09-28 17:51 andy + + * CMakeLists.txt: ENH: Enable Command Line Arguments + +2004-09-28 17:51 andy + + * Source/CTest/: cmCTestScriptHandler.cxx, cmCTestScriptHandler.h: + ENH: Move all extracting of variables to ExtractVariables. This + way it is easy to know what variables are used + +2004-09-28 11:34 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Add accessor for Argv0 + +2004-09-28 09:00 andy + + * Source/CTest/: cmCTestScriptHandler.h, cmCTestScriptHandler.cxx: + ENH: Add some documentation + +2004-09-27 16:33 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: make sure release + flags are replaced + +2004-09-27 15:21 hoffman + + * Source/CMakeLists.txt: ENH: allow for a different jni.h to enable + java testing + +2004-09-27 15:15 hoffman + + * Source/CMakeLists.txt: ENH: allow for a different jni.h to enable + java testing + +2004-09-27 15:11 hoffman + + * Source/CMakeLists.txt: space in path problem + +2004-09-27 14:39 hoffman + + * Source/CMakeLists.txt: ENH: use jni.h to determine java version + +2004-09-27 14:35 hoffman + + * CMakeLists.txt, ChangeLog.manual, Source/cmCTest.cxx, + Utilities/Release/cmake_release.sh: merge from main tree and + change version to 2.0.4 + +2004-09-27 14:21 hoffman + + * Source/CMakeLists.txt: ENH: use jni.h to determine java version + +2004-09-27 13:36 andy + + * Source/cmCTest.cxx: BUG: If notes file is missing, create empty + notes file with error message + +2004-09-27 13:03 hoffman + + * Tests/Fortran/CMakeLists.txt: clean up output of test and force + verbose makefiles + +2004-09-27 11:36 hoffman + + * Modules/CMakeJavaCompiler.cmake.in, + Modules/CMakeJavaInformation.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: make sure java jar + files are not libfoo.jar but are just foo.jar + +2004-09-27 11:03 hoffman + + * Source/CMakeLists.txt: ENH: better message for skipping java + +2004-09-27 09:49 andy + + * Modules/Documentation.cmake: ENH: Replace INCLUDE(Find...) with + FIND_PACKAGE(...) + +2004-09-24 16:54 hoffman + + * Source/CMakeLists.txt: ENH: use correct args for test of java + +2004-09-24 16:34 hoffman + + * Tests/Java/: CMakeCheckJavaPath.java, CMakeLists.txt: try and get + this java test to work + +2004-09-24 16:34 hoffman + + * Source/CMakeLists.txt: ENH: only use newer java for testing + +2004-09-24 15:40 hoffman + + * Tests/Java/: CMakeCheckJavaPath.java, CMakeLists.txt: ENH: add + some java code to try and find the system path + +2004-09-24 14:37 hoffman + + * Modules/: CMakeCXXInformation.cmake, + CMakeFortranInformation.cmake, + CMakeSystemSpecificInformation.cmake: BUG: LINK_FLAGS are now all + LINK_(LANG)_FLAGS + +2004-09-24 11:35 martink + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: fix crash with vs6 + +2004-09-24 11:34 martink + + * Source/CMakeLists.txt: ENH: check for all parts of java + +2004-09-24 11:05 hoffman + + * Tests/Java/CMakeLists.txt: ENH: remove classpath so that this + test passes with older java compilers that clober the system + class path with the -classpath option + +2004-09-24 10:07 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: replace all enabled + languages in rule vars + +2004-09-24 09:34 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: change ignore function so that + it first checks to see if the extension has a language + +2004-09-24 09:11 hoffman + + * Modules/Platform/Darwin.cmake: ENH: use c++ with c++ and c flags + with c + +2004-09-24 08:39 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: correctly ignore files + +2004-09-23 17:49 hoffman + + * Source/CMakeLists.txt: temporary fix to try and get a clean + dashboard + +2004-09-23 15:02 andy + + * Source/kwsys/CommandLineArguments.cxx: ERR: Fix memory problem + +2004-09-23 11:53 andy + + * Source/kwsys/CommandLineArguments.cxx: STYLE: Only allocate as + much space as needed + +2004-09-23 11:45 andy + + * Source/kwsys/CommandLineArguments.cxx: ENH: Make + GetRemainingArguments actually work + +2004-09-23 11:44 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: only replace the language + being used in expand rule variables + +2004-09-23 09:11 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: STYLE: remove warning + +2004-09-23 09:08 hoffman + + * Source/cmTryCompileCommand.cxx: remove warning + +2004-09-23 08:51 hoffman + + * Modules/CMakeRCInformation.cmake, Source/cmGlobalGenerator.cxx: + ENH: fix problems with .def and RC files + +2004-09-23 08:20 hoffman + + * CMakeLists.txt: ENH: make sure cmake has 2.0 + +2004-09-23 07:53 andy + + * bootstrap: ENH: Attempt to detect a non-parallel make + +2004-09-22 17:50 hoffman + + * Source/cmTarget.cxx: BUG: fix perfered linker language code + +2004-09-22 17:41 hoffman + + * Tests/Java/CMakeLists.txt: use verbose makefiles + +2004-09-22 16:51 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: make it verbose + +2004-09-22 16:44 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: fix compilation + +2004-09-22 15:14 hoffman + + * Source/cmProjectCommand.cxx: remove warnings + +2004-09-22 14:52 hoffman + + * Modules/CMakeJavaInformation.cmake: BUG: let the generator quote + the path + +2004-09-22 14:42 hoffman + + * Modules/CMakeCCompiler.cmake.in, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeCommonLanguageInclude.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeDetermineRCCompiler.cmake, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/CMakeJavaCompiler.cmake.in, + Modules/CMakeJavaInformation.cmake, + Modules/CMakeRCCompiler.cmake.in, + Modules/CMakeRCInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestJavaCompiler.cmake, + Modules/CMakeTestRCCompiler.cmake, Modules/Platform/AIX.cmake, + Modules/Platform/FreeBSD.cmake, Modules/Platform/HP-UX.cmake, + Modules/Platform/IRIX.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/Linux-como.cmake, Modules/Platform/Linux.cmake, + Modules/Platform/MP-RAS.cmake, Modules/Platform/NetBSD.cmake, + Modules/Platform/OSF1.cmake, Modules/Platform/RISCos.cmake, + Modules/Platform/SunOS.cmake, Modules/Platform/ULTRIX.cmake, + Modules/Platform/UNIX_SV.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/CMakeLists.txt, + Source/cmCommands.cxx, Source/cmEnableLanguageCommand.cxx, + Source/cmEnableLanguageCommand.h, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, Source/cmInstallFilesCommand.cxx, + Source/cmInstallProgramsCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmProjectCommand.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTryCompileCommand.cxx, + Source/cmTryRunCommand.cxx, Tests/Fortran/CMakeLists.txt, + Tests/Java/A.java, Tests/Java/CMakeLists.txt, + Tests/Java/HelloWorld.java: ENH: major changes to support + addition of languages from cmake modules directory. + +2004-09-22 10:06 hoffman + + * Source/CMakeLists.txt: ENH: only try to use fortran if the + generator is make based + +2004-09-22 08:50 hoffman + + * Modules/CMakeFortranCompiler.cmake.in: BUG: fix GNU check + variable and add new variables used by enable language + +2004-09-21 12:51 hoffman + + * Source/cmListFileLexer.h: merge from main tree + +2004-09-21 12:47 hoffman + + * ChangeLog.manual, Source/cmListFileLexer.c, + Source/cmListFileLexer.in.l, Tests/StringFileTest/CMakeLists.txt: + merge from main tree + +2004-09-20 14:39 hoffman + + * Modules/FindJava.cmake: ENH: look for java in more places + +2004-09-20 13:47 hoffman + + * Source/: cmGlobalGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: branch only fix for + VSExternalInclude + +2004-09-20 08:51 king + + * Source/cmListFileLexer.c, Source/cmListFileLexer.in.l, + Tests/StringFileTest/CMakeLists.txt: BUG#1179: Fix for syntax in + unquoted arguments. + +2004-09-17 16:46 hoffman + + * ChangeLog.manual, Source/CMakeLists.txt, + Source/cmForEachCommand.cxx, Source/cmGlob.cxx, Source/cmGlob.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmIncludeExternalMSProjectCommand.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmWin32ProcessExecution.cxx, + Source/cmWin32ProcessExecution.h, Source/cmakemain.cxx, + Source/kwsys/SystemTools.cxx, + Tests/VSExternalInclude/CMakeLists.txt, + Tests/VSExternalInclude/main.cpp, + Tests/VSExternalInclude/Lib1/CMakeLists.txt, + Tests/VSExternalInclude/Lib1/lib1.cpp, + Tests/VSExternalInclude/Lib1/lib1.h, + Tests/VSExternalInclude/Lib2/CMakeLists.txt, + Tests/VSExternalInclude/Lib2/lib2.cpp, + Tests/VSExternalInclude/Lib2/lib2.h: merge from main tree + +2004-09-17 16:00 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: merge from main tree + bug 1041 + +2004-09-17 15:57 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: fix for bug 1041, + _MBCS sometimes added for UNIICODE which is bad + +2004-09-17 09:14 hoffman + + * Modules/CMakeJavaCompiler.cmake.in: BUG: commit bug 1123 + +2004-09-17 09:01 hoffman + + * Source/cmProjectCommand.h: BUG: 1163 fix documentation + +2004-09-16 17:16 hoffman + + * Source/cmFileCommand.cxx: merge from main tree fix bug 1122 + +2004-09-16 17:13 andy + + * Source/CTest/cmCTestBuildHandler.cxx: ENH: Attempt to handle + Intel's remarks. Close Bug #1156 - Better support for icc + 'remark' + +2004-09-16 12:39 andy + + * Source/kwsys/SystemTools.cxx: ENH: Add missing include + +2004-09-16 10:58 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + method to retrieve the terminal width + +2004-09-16 10:49 andy + + * Source/kwsys/CommandLineArguments.cxx: ENH: a bit more cleanup. + The help should really be replaced by something like + cmDocumentation + +2004-09-16 10:48 martink + + * Source/cmGlobalVisualStudio6Generator.cxx, + Tests/VSExternalInclude/CMakeLists.txt: BUG: fix VSExternal for + visual studio 6 + +2004-09-16 10:27 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Condense help string, add + support for setting line length and make it work + +2004-09-15 15:15 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx: BUG: fix external project + command for VS 7 and 71 + +2004-09-15 14:08 andy + + * Source/: cmGlob.cxx, cmGlob.h: ENH: Remove double slash + +2004-09-15 13:33 andy + + * Source/cmGlob.cxx: BUG: Attempt to fix bug on Windows (and apple) + where files returned are all lowercase + +2004-09-15 13:31 andy + + * Source/cmForEachCommand.cxx: BUG: Propagate file name and line + number inside FOREACH. Fixes Bug #1169 - Erro messages inside + FOREACH have bad filename and line number + +2004-09-15 13:03 hoffman + + * Source/cmGlobalVisualStudio7Generator.cxx: ENH: fix for vs 70 + generator + +2004-09-15 12:07 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmIncludeExternalMSProjectCommand.cxx, + cmLocalVisualStudio7Generator.cxx: ENH: clean up of + INCLUDE_EXTERNAL_MSPROJECT contributed by Clinton Stimpson + +2004-09-15 11:31 hoffman + + * Source/: cmGlobalGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: make sure env CC and CXX + are not set for VS IDE builds + +2004-09-15 10:35 martink + + * Tests/VSExternalInclude/CMakeLists.txt: ENH: produce better + output + +2004-09-15 10:32 martink + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineFortranCompiler.cmake: ENH: do not check for gnu + for visual studio + +2004-09-15 09:22 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Move callback structure out of + the public interface. Also block the warning on Visual Studio + Debug + +2004-09-14 16:34 hoffman + + * Tests/VSExternalInclude/: CMakeLists.txt: ENH: add a test for + external projects + +2004-09-14 16:01 hoffman + + * Source/CMakeLists.txt, Tests/VSExternalInclude/CMakeLists.txt, + Tests/VSExternalInclude/main.cpp, + Tests/VSExternalInclude/Lib1/CMakeLists.txt, + Tests/VSExternalInclude/Lib1/lib1.cpp, + Tests/VSExternalInclude/Lib1/lib1.h, + Tests/VSExternalInclude/Lib2/CMakeLists.txt, + Tests/VSExternalInclude/Lib2/lib2.cpp, + Tests/VSExternalInclude/Lib2/lib2.h: ENH: add a test for external + projects + +2004-09-14 14:05 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmIncludeExternalMSProjectCommand.cxx: bug fixes for external + projects + +2004-09-14 11:48 martink + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ERR: Fix borland build + +2004-09-14 11:39 andy + + * Source/kwsys/CommandLineArguments.cxx: ERR: Add missing include + +2004-09-14 10:34 andy + + * Source/kwsys/: CommandLineArguments.cxx, + CommandLineArguments.hxx.in: ENH: Use const correctness for + arguments + +2004-09-14 09:19 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: fix include external + project bug + +2004-09-13 19:06 andy + + * Source/kwsys/: CommandLineArguments.cxx, + testCommandLineArguments.cxx: ERR: More missing ios and includes + +2004-09-13 18:57 andy + + * Source/kwsys/CommandLineArguments.cxx: ERR: Fix IOS namespace + +2004-09-13 16:15 andy + + * Source/kwsys/: CMakeLists.txt, CommandLineArguments.cxx, + CommandLineArguments.hxx.in, testCommandLineArguments.cxx: ENH: + Move command line argument parsing code to kwsys + +2004-09-10 14:40 hoffman + + * Source/: cmCTest.cxx, cmakemain.cxx: ENH: fix warning correctly + +2004-09-10 11:19 andy + + * CMakeLists.txt: ENH: Add warning messages if curses library is + not found + +2004-09-10 11:15 andy + + * Modules/FindQt.cmake: ENH: Use FIND_PACKAGE instead of + INCLUDE(Find... + +2004-09-10 08:42 martink + + * Source/cmCTest.cxx: fix dash8 warning + +2004-09-10 08:30 martink + + * Source/CTest/cmCTestTestHandler.h: fix HPUX bugs + +2004-09-09 16:05 hoffman + + * Modules/Platform/Linux-ifort.cmake: add ifort support + +2004-09-09 12:58 hoffman + + * Source/: cmCTest.cxx, cmakemain.cxx: WAR: remove a warning on i64 + +2004-09-09 11:50 hoffman + + * Modules/Platform/HP-UX.cmake: try to fix fortran on hp + +2004-09-09 10:52 martink + + * Source/CTest/cmCTestTestHandler.cxx: missing include + +2004-09-09 09:31 martink + + * Source/CTest/cmCTestCoverageHandler.cxx: missing include + +2004-09-09 08:41 martink + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestCoverageHandler.cxx, CTest/cmCTestCoverageHandler.h, + CTest/cmCTestTestHandler.cxx, CTest/cmCTestTestHandler.h, + CTest/cmCTestUpdateHandler.cxx: more cleanup of ctest + +2004-09-08 17:53 hoffman + + * Tests/Fortran/CMakeLists.txt: ENH: add more output for fortran so + I can figure out what is going on with other fortran compilers + +2004-09-08 10:41 hoffman + + * Source/: cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h: + BUG: don't close the pipes too early + +2004-09-07 16:55 hoffman + + * Source/: cmCacheManager.cxx, cmDumpDocumentation.cxx, + cmEnableTestingCommand.cxx, cmExportLibraryDependencies.cxx, + cmGlobalCodeWarriorGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalUnixMakefileGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, cmMakefile.cxx, + cmTryCompileCommand.cxx, cmUseMangledMesaCommand.cxx, + cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx: ENH: add + better error reporting for file open failures + +2004-09-07 16:03 hoffman + + * Source/: cmWin32ProcessExecution.cxx, kwsys/SystemTools.cxx: Fix + leaked file and registry descriptors + +2004-09-07 12:51 martink + + * Source/: cmCTest.h, cmCTest.cxx: duh errors + +2004-09-07 11:45 martink + + * Source/: cmCTest.cxx, cmCTest.h: more warnings + +2004-09-07 11:28 martink + + * Source/CTest/cmCTestScriptHandler.cxx: more warnings + +2004-09-07 10:46 martink + + * Source/cmCTest.cxx: more cleanup + +2004-09-07 10:37 martink + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestBuildHandler.cxx, CTest/cmCTestBuildHandler.h: more + cleanup + +2004-09-07 09:17 martink + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + CTest/cmCTestConfigureHandler.cxx, + CTest/cmCTestConfigureHandler.h, CTest/cmCTestScriptHandler.cxx, + CTest/cmCTestScriptHandler.h, CTest/cmCTestUpdateHandler.cxx, + CTest/cmCTestUpdateHandler.h: some bug fixes for my recent + checkins and some more cleanup + +2004-09-06 14:43 martink + + * Source/CTest/cmCTestScriptHandler.cxx: another platform fix + +2004-09-06 14:17 martink + + * Source/CTest/cmCTestScriptHandler.h: another platform fix + +2004-09-06 13:54 martink + + * Source/cmCTest.cxx: jesus + +2004-09-06 13:37 martink + + * Source/CMakeLists.txt: oops + +2004-09-06 12:49 martink + + * Source/kwsys/SystemTools.cxx: fix warning + +2004-09-06 12:46 martink + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h: starting cleanup + of ctest + +2004-09-06 12:46 martink + + * Source/cmGlobalGenerator.cxx: warning fix + +2004-09-06 12:45 martink + + * Source/CTest/: cmCTestScriptHandler.cxx, cmCTestScriptHandler.h: + broke out part of test scripting into seperate class + +2004-09-03 15:47 hoffman + + * ChangeLog.manual, Modules/CMakeTestForFreeVC.cxx, + Modules/Platform/Windows-cl.cmake: merge from main tree fix for + free vc tools + +2004-09-03 15:19 hoffman + + * Modules/: CMakeTestForFreeVC.cxx, Platform/Windows-cl.cmake: ENH + better test for free VC tools + +2004-09-03 13:49 hoffman + + * Source/cmGlobalCodeWarriorGenerator.cxx: remove warning + +2004-09-03 13:48 hoffman + + * Source/cmGlobalCodeWarriorGenerator.cxx: fix for darwin + +2004-09-03 13:24 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator.cxx: ENH: remove warnings + +2004-09-03 12:03 hoffman + + * Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeFortranCompiler.cmake.in, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx: + ENH: define language extensions in cmake files and not hard + coded, also fix trycompile problem + +2004-09-03 12:01 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: check for ms free command + line tools + +2004-08-31 18:51 king + + * Source/cmListFileCache.cxx: BUG: Fixed line number of end of file + error message. + +2004-08-31 18:39 king + + * Source/: cmListFileCache.cxx, cmListFileLexer.c, + cmListFileLexer.h, cmListFileLexer.in.l: BUG#1049: Added error + message when file ends in an unterminated string. + +2004-08-31 10:41 king + + * Source/cmFileCommand.cxx: BUG: Fix crash when CMAKE_DEBUG_POSTFIX + is not set. + +2004-08-31 10:20 andy + + * DartConfig.cmake: ENH: Cleanups + +2004-08-31 08:25 king + + * Source/kwsys/kwsys_ios_iosfwd.h.in: ERR: Removed inclusion of + fstream header. This file is meant as a compatibility header for + iosfwd and therefore should not include any other header. + Whatever was fixed by adding the include of fstream here should + be fixed by other means. + +2004-08-30 15:15 hoffman + + * ChangeLog.manual, Source/cmCTest.cxx: merge fixes from main tree + +2004-08-30 14:07 hoffman + + * ChangeLog.manual, Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, Source/cmMakefile.cxx: + fix RUN_TESTS and generated header files merge from main tree + +2004-08-30 14:01 hoffman + + * ChangeLog.manual, Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/cmSystemTools.h, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/PathDialog.cpp, + Utilities/Release/cmake_release.sh: merge from main tree + +2004-08-30 13:50 hoffman + + * Source/: cmSystemTools.h, MFCDialog/CMakeSetupDialog.cpp, + kwsys/SystemTools.cxx: BUG: fixes for mingw and CMakesetup with + spaces in the source directory + +2004-08-30 12:14 hoffman + + * Modules/Platform/Windows-gcc.cmake: Make sure cmake uses + consistent module prefixes + +2004-08-27 09:55 hoffman + + * Source/cmMakefile.h: ENH: remove warning + +2004-08-27 08:41 hoffman + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalBorlandMakefileGenerator.h, + cmGlobalCodeWarriorGenerator.cxx, cmGlobalCodeWarriorGenerator.h, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h, + cmProjectCommand.cxx: ENH: try to initialize all languages at the + same time + +2004-08-26 22:52 andy + + * Modules/: CMakeBackwardCompatibilityC.cmake, + CMakeBackwardCompatibilityCXX.cmake, Documentation.cmake, + FindFLTK.cmake, FindGLU.cmake, FindGnuplot.cmake, + FindOpenGL.cmake, FindPNG.cmake, FindPerl.cmake, + FindPythonLibs.cmake, FindQt.cmake, FindSelfPackers.cmake, + FindTCL.cmake, FindThreads.cmake, FindUnixCommands.cmake, + FindVTK.cmake, FindWget.cmake, FindX11.cmake, + FindwxWidgets.cmake, FindwxWindows.cmake, + TestForANSIStreamHeaders.cmake, UseVTK40.cmake, + Use_wxWindows.cmake, UsewxWidgets.cmake, + Platform/CYGWIN-g77.cmake: ENH: Cleanup. Use relative path to + modules + +2004-08-26 21:43 hoffman + + * Modules/Platform/SunOS.cmake: hack to try and fix sun platform + +2004-08-26 18:00 king + + * Docs/cmake-mode.el: BUG: Only count block open tokens if they are + followed by an open paren. + +2004-08-26 17:49 hoffman + + * Source/cmTryCompileCommand.cxx: ENH: try compiles in CXX require + C to be enabled as well + +2004-08-26 16:34 hoffman + + * Modules/CMakeDetermineFortranCompiler.cmake, + Source/CMakeLists.txt: ENH: try to find fortran compiler before + adding the test + +2004-08-26 16:11 hoffman + + * Source/CMakeLists.txt: ENH: try to find fortran compiler before + adding the test + +2004-08-26 16:00 hoffman + + * Source/CMakeLists.txt: remove test fortran for now + +2004-08-26 15:55 hoffman + + * Source/CMakeLists.txt: Add a fortran test if there is a fortran + compiler + +2004-08-26 15:50 hoffman + + * Modules/CMakeDetermineFortranCompiler.cmake, + Source/CMakeLists.txt: Add a fortran test if there is a fortran + compiler + +2004-08-26 14:55 hoffman + + * Modules/CMake.cmake, Modules/CMakeCInformation.cmake, + Modules/CMakeCXXInformation.cmake, + Modules/CMakeCommonLanguageInclude.cmake, + Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeFortranInformation.cmake, + Modules/CMakeGenericSystem.cmake, + Modules/CMakeJavaCompiler.cmake.in, + Modules/CMakeJavaInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/Platform/AIX.cmake, Modules/Platform/BSDOS.cmake, + Modules/Platform/CYGWIN.cmake, Modules/Platform/Darwin.cmake, + Modules/Platform/FreeBSD.cmake, Modules/Platform/HP-UX.cmake, + Modules/Platform/IRIX.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/MP-RAS.cmake, + Modules/Platform/NetBSD.cmake, Modules/Platform/OSF1.cmake, + Modules/Platform/OpenBSD.cmake, Modules/Platform/RISCos.cmake, + Modules/Platform/SCO_SV.cmake, Modules/Platform/SINIX.cmake, + Modules/Platform/SunOS.cmake, Modules/Platform/True64.cmake, + Modules/Platform/ULTRIX.cmake, Modules/Platform/UNIX_SV.cmake, + Modules/Platform/UnixWare.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows-ifort.cmake, + Modules/Platform/Xenix.cmake, Source/CMakeLists.txt, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmListFileCache.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmProjectCommand.cxx, Source/cmTryCompileCommand.cxx, + Source/cmake.cxx, Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/Fortran/CMakeLists.txt: ENH: more uniform approach to + enable language, one step closer to being able to enable a + language without modifing cmake source code + +2004-08-26 09:45 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Make default date shorter + +2004-08-25 12:42 hoffman + + * Source/cmCTest.cxx: ENH: better error display for failure + +2004-08-25 08:44 hoffman + + * Source/cmCTest.cxx: ENH: produce better error message for missing + variables in -S mode + +2004-08-24 11:30 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Fix the list of + targets. The base target name now includes the MACOSX_BUNDLE path + +2004-08-24 11:17 andy + + * Source/cmAddExecutableCommand.cxx: BUG: If macdir does not end + with '/' then add it always, not just when adding current + directory + +2004-08-23 14:33 andy + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: ENH: + Implement PreLoad.cmake feature for CMakeSetup + +2004-08-23 14:09 hoffman + + * Source/CTest/CMakeLists.txt: fix syntax + +2004-08-23 13:45 hoffman + + * CMakeLists.txt, Source/CTest/CMakeLists.txt: ENH: fix out of the + box build on sgi to match dashboards + +2004-08-23 11:33 hoffman + + * Modules/FindJava.cmake: BUG: 1107 add extra place to look for + java + +2004-08-23 11:29 martink + + * Source/cmCTest.cxx: now will check out src dir if it has the necc + info + +2004-08-23 11:21 hoffman + + * Modules/FindJava.cmake: BUG: 1107 add extra place to look for + java + +2004-08-19 12:51 andy + + * Source/cmCTest.cxx: ENH: Handle gmake error message + +2004-08-18 09:28 andy + + * Modules/CMakeSystemSpecificInformation.cmake: BUG: Unly set gcc + flags for C compiler if CMAKE_COMPILER_IS_GNUCC is set + +2004-08-18 08:52 andy + + * Source/cmCTest.cxx: BUG: When GetNightlyTime returns past time, + fix everything. Also, return correct time when printing + +2004-08-17 19:18 andy + + * Modules/Platform/Darwin-xlc.cmake: ENH: Initial import for Darwin + using xlC + +2004-08-17 16:13 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: Reload + PreLoad.cmake every time you do configure + +2004-08-17 15:36 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: Enable preload for + ccmake + +2004-08-17 15:36 andy + + * Source/: cmake.cxx, cmake.h: ENH: Move PreLoad.cmake code to + public method so that ccmake and CMakeSetup can call it + +2004-08-17 14:23 andy + + * Source/cmCTest.cxx: BUG: Attempt to fix timezone problem where + start time appears one day before the actual start time. Also add + verbosity to GetNightlyTime + +2004-08-16 09:03 king + + * Utilities/Release/config_IRIX64: BUG: Need to set HAVE_LIBCRYPTO + to 0 instead of letting the test be done. + +2004-08-11 20:36 hoffman + + * Source/cmCTest.cxx: fix it + +2004-08-11 16:58 hoffman + + * Source/: cmAbstractFilesCommand.cxx, cmAddExecutableCommand.cxx, + cmCreateTestSourceList.cxx, cmGlobalCodeWarriorGenerator.cxx, + cmGlobalGenerator.cxx, cmGlobalUnixMakefileGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmUtilitySourceCommand.cxx: + ENH: use GetRequiredDefinition instead of GetDefinition and crash + +2004-08-11 16:57 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: ENH: change RUN_TESTS to use + -C and not -D also use GetRequiredDefinition where needed + +2004-08-11 16:37 hoffman + + * Source/cmCTest.cxx: ENH: fixes for RUN_TESTS from visual studio + IDE, fprintf does not print right away, so std::cerr had to be + used. Also, allow .\ to start the config type + +2004-08-11 16:35 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestFortranCompiler.cmake, Source/cmSystemTools.cxx: + ENH: minor fortran fixes + +2004-08-11 09:31 hoffman + + * CMakeLists.txt, ChangeLog.manual, DartConfig.cmake, + Docs/cmake-mode.el, Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeVS8FindMake.cmake, Modules/Dart.cmake, + Modules/FindDoxygen.cmake, Modules/FindFLTK.cmake, + Modules/FindKDE.cmake, Modules/FindQt.cmake, + Modules/FindSWIG.cmake, Modules/UseSWIG.cmake, + Source/CMakeLists.txt, Source/cmAuxSourceDirectoryCommand.h, + Source/cmCTest.cxx, Source/cmCTest.h, Source/cmCommands.cxx, + Source/cmCreateTestSourceList.cxx, Source/cmDynamicLoader.cxx, + Source/cmExecProgramCommand.cxx, Source/cmFLTKWrapUICommand.cxx, + Source/cmFileCommand.cxx, Source/cmGetTargetPropertyCommand.h, + Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmLinkLibrariesCommand.cxx, + Source/cmListFileLexer.c, Source/cmListFileLexer.in.l, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapUICommand.cxx, + Source/cmSubdirCommand.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, + Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTryRunCommand.cxx, Source/cmUseMangledMesaCommand.cxx, + Source/cmWin32ProcessExecution.cxx, Source/cmake.cxx, + Source/cmakewizard.h, Source/CTest/cmCTestSubmit.cxx, + Source/CTest/cmCTestSubmit.h, + Source/CursesDialog/cmCursesMainForm.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/PathDialog.cpp, Source/kwsys/CMakeLists.txt, + Source/kwsys/ProcessUNIX.c, Source/kwsys/SystemTools.cxx, + Templates/CMakeWindowsSystemConfig.cmake, + Templates/TestDriver.cxx.in, Tests/Simple/CMakeLists.txt, + Tests/SimpleInstall/CMakeLists.txt, Tests/SimpleInstall/inst.cxx, + Tests/SimpleInstall/lib4.cxx, Tests/SimpleInstall/lib4.h, + Tests/SimpleInstall/TestSubDir/CMakeLists.txt, + Tests/SimpleInstall/TestSubDir/TSD.cxx, + Tests/SimpleInstall/TestSubDir/TSD.h, + Tests/SimpleInstall/TestSubDir/TSD_utils.cxx, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstallS2/lib4.cxx, + Tests/SimpleInstallS2/lib4.h, + Tests/SimpleInstallS2/TestSubDir/CMakeLists.txt, + Tests/SimpleInstallS2/TestSubDir/TSD.cxx, + Tests/SimpleInstallS2/TestSubDir/TSD.h, + Tests/SimpleInstallS2/TestSubDir/TSD_utils.cxx, + Utilities/Doxygen/CMakeLists.txt, + Utilities/Release/cmake_release.sh: Moving latest release branch + to CMake-2-0-3. + +2004-08-09 18:39 martink + + * Source/cmIncludeCommand.cxx: ENH: Allow user to overwrite + Platforms files + +2004-08-09 18:20 martink + + * Modules/Platform/Windows-icl.cmake: ENH: Initial import + +2004-08-09 17:42 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix for try run failing on + some cygwin builds. Allow a driver letter to start a full path + on cygwin + +2004-08-09 13:03 hoffman + + * Source/cmMakefile.cxx: BUG: fix bug where custom command + generated .h files do not get the header_file_only flag set + +2004-08-06 15:05 hoffman + + * Tests/Fortran/: CMakeLists.txt, hello.f: ENH: initial fortran + +2004-08-06 14:51 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/CMakeDetermineFortranCompiler.cmake, + Modules/CMakeFortranCompiler.cmake.in, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestFortranCompiler.cmake, + Modules/Platform/CYGWIN-g77.cmake, Modules/Platform/g77.cmake, + Source/cmGlobalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmTryCompileCommand.cxx: ENH: initial fortran support + +2004-08-05 11:59 hoffman + + * Modules/FindQt.cmake: ENH: remove verbose QT message + +2004-08-05 11:51 king + + * Source/cmAddExecutableCommand.cxx: ERR: Replacing hack call to + CONFIGURE_FILE command with direct call to + m_Makefile->ConfigureFile. + +2004-08-05 10:27 king + + * ChangeLog.manual, Source/cmGlobalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: BUG#427: Merging fix to + CMake 2.0 release branch. + +2004-08-05 10:17 king + + * Source/: cmGlobalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx: + BUG#427: Generated makefiles need to have targets with canonical + names for each executable and library target in order for + try-compiles to work correctly when specifying the target. + +2004-08-05 09:29 king + + * ChangeLog.manual, Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmGlobalCodeWarriorGenerator.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmTryRunCommand.cxx: Merging fixes from main tree. See + ChangeLog.manual section on 2.0.4 for details. + +2004-08-05 09:17 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Fixed crash when + CMAKE_CXX_STACK_SIZE is not defined. + +2004-08-04 17:24 king + + * Source/cmMakefile.cxx: BUG: Fix crash when adding a custom + command to a source file that cannot be created. + +2004-08-04 17:21 hoffman + + * Source/cmTryRunCommand.cxx: ENH: allow debug of tryrun + +2004-08-04 16:33 king + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmGlobalCodeWarriorGenerator.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmMakefile.cxx: BUG: + CMAKE_TRY_COMPILE_CONFIGURATION should be obtained from the + cmMakefile instance for the listfile containing the TRY_COMPILE + call, not the top level listfile. + +2004-08-04 14:34 king + + * Source/cmMakefile.cxx: ERR: Removed duplicate default arguments. + +2004-08-04 13:05 hoffman + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: fix incorrect + selection of visual studio generator + +2004-08-04 10:45 king + + * Source/: cmCPluginAPI.cxx, cmForEachCommand.cxx, + cmListFileCache.cxx, cmListFileCache.h, cmMacroCommand.cxx, + cmMakefile.cxx, cmMakefile.h: ENH: Added support for special + variables CMAKE_CURRENT_LIST_FILE and CMAKE_CURRENT_LIST_LINE + that evaluate to the file name and line number in which they + appear. This implements the feature request from bug 1012. + +2004-08-04 10:00 king + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: BUG: Fixed + typo in name of MSVC 8 registry key. + +2004-08-04 08:50 andy + + * Source/cmIfCommand.cxx: ERR: Fix warnings and memory leak + +2004-08-03 10:20 hoffman + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: create a + server that does not use vtkPVApplication or tcl wrapping. Move + several classes from GUI/Client to Servers/Filters. Remove use of + PARAVIEW_NEW_SOURCE_ORGANIZATION define. + +2004-08-03 08:13 andy + + * Source/: cmIfCommand.cxx, cmIfCommand.h: BUG: When regular + expression failes to compile, produce error: Fixes part of Bug + #1025 - CMake silently ignores regular expression failure + +2004-08-02 08:36 andy + + * Source/cmCTest.cxx: BUG: these flags do not take arguments, so + they do not really need to check if they are last. Fixes Bug + #1020 - ctest doesn't parse its options correctly + +2004-07-30 15:50 andy + + * Source/: cmInstallFilesCommand.h, cmInstallProgramsCommand.h, + cmInstallTargetsCommand.h: ENH: Since install works on Windows + too, remove the UNIX + +2004-07-30 09:42 hoffman + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: change + version to 2.0.3 + +2004-07-29 17:15 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add some documentation, and + make sure that the flag given to -D -T or -M is valid. Fixes Bug + #1015 - Documentation: ctest -D + +2004-07-29 17:07 andy + + * Modules/Dart.cmake: ENH: Add MemCheck to the list of Make + targets. Closes Bug #1016 - Testing targets in Makefile + +2004-07-29 15:26 andy + + * Source/cmCTest.cxx: ENH: Add AIX linker error + +2004-07-29 14:45 hoffman + + * ChangeLog.manual, Modules/Dart.cmake, Source/cmCTest.cxx, + Source/cmCTest.h, Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmTarget.cxx, Source/cmake.cxx, + Source/CTest/cmCTestSubmit.cxx, Source/kwsys/SystemTools.cxx: + merges from main tree + +2004-07-29 14:19 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Source/cmTarget.cxx, Source/cmakewizard.h: merge from main tree, + comment spelling fixes + +2004-07-29 11:46 king + + * ChangeLog.manual, Source/cmLinkLibrariesCommand.cxx, + Source/cmTargetLinkLibrariesCommand.cxx: BUG: Fixed crash when + optimized/debug argument to a link-libraries command is not + followed by a value. + +2004-07-29 11:43 king + + * Source/: cmTargetLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.cxx: BUG: Fixed crash when optimized/debug + argument is not followed by a value. + +2004-07-29 11:11 andy + + * Tests/X11/CMakeLists.txt: ERR: Fix test to use post CMAKE_X_LIBS + variables + +2004-07-29 10:22 king + + * ChangeLog.manual: ENH: Added changes for + cmAuxSourceDirectoryCommand.h and cmGetTargetPropertyCommand.h + +2004-07-28 08:12 king + + * Source/: cmGetTargetPropertyCommand.h: ENH: Added documentation + of LOCATION target property. + +2004-07-27 13:40 hoffman + + * Source/cmake.cxx: BUG: fix for bug 971, pick a better generator + from the command line + +2004-07-27 08:52 andy + + * Modules/Dart.cmake: DOC: Fix typo + +2004-07-27 08:49 andy + + * Source/CTest/cmCTestSubmit.cxx: BUG: Allow submit and trigger url + to contain ?. Fixes Bug #997 - CTest cannot handle URLs which + contain a "?" + +2004-07-27 08:48 andy + + * Modules/Dart.cmake: ENH: Allow project to overwrite + CMAKE_SYSTEM_NAME part of default BUILDNAME + +2004-07-26 16:59 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Source/cmMakefile.cxx, Source/cmTarget.cxx, Source/cmakewizard.h: + BUG: fix for bug 998, fix spelling errors + +2004-07-26 16:00 andy + + * Source/cmCTest.cxx: ENH: Support Threading Problem in memcheck + +2004-07-26 15:52 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add maximum size of test + output + +2004-07-24 19:58 king + + * Source/: cmAuxSourceDirectoryCommand.h: ENH: Added warning about + using this command to avoid listing sources for a library by + hand. It is supposed to be used only for Templates directories. + +2004-07-22 11:20 hoffman + + * ChangeLog.manual, Modules/FindFLTK.cmake, Modules/FindQt.cmake, + Source/cmCTest.cxx, Source/cmDynamicLoader.cxx, + Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx, + Source/cmUseMangledMesaCommand.cxx, Source/cmake.cxx, + Source/CursesDialog/cmCursesMainForm.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Templates/CMakeWindowsSystemConfig.cmake, + Templates/TestDriver.cxx.in: merge from main tree + +2004-07-22 10:59 hoffman + + * Modules/: FindFLTK.cmake, FindQt.cmake: BUG: put back flags to + maintain backwards compatibility + +2004-07-20 16:18 andy + + * Source/: cmCTest.cxx, cmCTest.h: BUG: Encode current time so that + on some international computers xslt will not break. Also, for + continuous, do not repeat if there were locally modified files or + conflict, but only when things actually update + +2004-07-20 11:09 andy + + * Source/kwsys/SystemTools.cxx: BUG: If source and destination is + the same file, then do not copy file always + +2004-07-20 11:07 andy + + * Source/cmMakefile.cxx: ENH: When running cmake with PreLoad make + sure CMAKE_CURRENT_SOURCE/BINARY_DIR works + +2004-07-20 11:02 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: remove deletes + +2004-07-19 13:01 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: fix for 981 cursor + returns to correct place in help screen + +2004-07-19 13:00 hoffman + + * Source/cmDynamicLoader.cxx: bug fix for 986 + +2004-07-16 16:02 hoffman + + * Source/cmake.cxx: ENH: add a message at the end of the cmake run + telling the user where things were written. + +2004-07-16 15:18 hoffman + + * Templates/TestDriver.cxx.in: make sure tests flush output + +2004-07-15 14:38 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: sort flags, and + fix order and case problems and add a few more + +2004-07-15 13:53 martink + + * Source/cmCTest.cxx: better error warning exceptions + +2004-07-14 19:53 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: remove warnings + +2004-07-14 16:10 hoffman + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: ENH: use a map to fill out + flags, and keep command line consistent with the GUI + +2004-07-14 16:09 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: Fix browse button to use + correct windows style initial directory + +2004-07-13 17:33 king + + * Source/kwsys/testProcess.c: BUG: Fixed off-by-one error in test6 + function. + +2004-07-13 17:27 king + + * Source/kwsys/: testProcess.c, CMakeLists.txt: ENH: Added test for + runaway output. + +2004-07-13 16:50 king + + * Source/kwsys/ProcessWin32.c: ENH: Re-arranged handling of the two + threads per pipe to improve readability of code. + +2004-07-13 16:23 king + + * Source/kwsys/ProcessWin32.c: BUG: Fix for read pipe wakeup when + child is writing alot of data and may fill the pipe buffer before + WriteFile is called. + +2004-07-13 11:06 martink + + * Source/: cmCTest.cxx, cmCTest.h: submit elapsed times as well + +2004-07-13 10:03 andy + + * Modules/FindQt.cmake: BUG: These regular expressions were wrong + because \\t does not match tab. Also, this fix prevents whole + file to be dumped to the cache + +2004-07-09 15:38 hoffman + + * Modules/FindQt.cmake: merge in fixes from neundorf at kde org, + bug 869 + +2004-07-09 14:18 hoffman + + * Source/: cmMakefile.cxx, cmUseMangledMesaCommand.cxx: BUG: fix + spelling errors BUG 952 + +2004-07-09 13:50 hoffman + + * Source/cmGlobalCodeWarriorGenerator.cxx, + Templates/CMakeDotNetSystemConfig.cmake, + Templates/CMakeWindowsSystemConfig.cmake: BUG: remove unused + variable CMAKE_OBJECT_FILE_SUFFIX from cmake + +2004-07-09 11:49 king + + * Source/kwsys/ProcessUNIX.c: ERR: Fixed missing return warning. + Code was not reachable anyway. + +2004-07-09 09:12 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: remove double + include flags for rc resouce compiles + +2004-07-07 18:15 king + + * Source/kwsys/ProcessWin32.c: ENH: Added windows implementation of + Disown/Detach. + +2004-07-07 17:46 king + + * Source/kwsys/ProcessUNIX.c: BUG: Do not disown if process has + already been killed or the timeout expired. Also need to call + kwsysProcessCleanup to disown. + +2004-07-07 17:27 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added kwsysProcess_Disown an kwsysProcess_Option_Detach to allow + detached processes to be created. Currently implemented only on + UNIX. + +2004-07-07 17:09 hoffman + + * ChangeLog.manual, DartConfig.cmake, + Modules/CMakeVS8FindMake.cmake, Modules/FindSWIG.cmake, + Modules/UseSWIG.cmake, Source/CMakeLists.txt, Source/cmCTest.cxx, + Source/cmCTest.h, Source/cmExecProgramCommand.cxx, + Source/cmFileCommand.cxx, Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmMakefile.cxx, + Source/cmQTWrapUICommand.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTryRunCommand.cxx, + Source/cmWin32ProcessExecution.cxx, Source/cmake.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/kwsys/CMakeLists.txt, Source/kwsys/ProcessUNIX.c, + Source/kwsys/SystemTools.cxx, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/inst.cxx, Tests/SimpleInstall/lib4.cxx, + Tests/SimpleInstall/lib4.h, + Tests/SimpleInstall/TestSubDir/CMakeLists.txt, + Tests/SimpleInstall/TestSubDir/TSD.cxx, + Tests/SimpleInstall/TestSubDir/TSD.h, + Tests/SimpleInstall/TestSubDir/TSD_utils.cxx, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstallS2/lib4.cxx, + Tests/SimpleInstallS2/lib4.h, + Tests/SimpleInstallS2/TestSubDir/CMakeLists.txt, + Tests/SimpleInstallS2/TestSubDir/TSD.cxx, + Tests/SimpleInstallS2/TestSubDir/TSD.h, + Tests/SimpleInstallS2/TestSubDir/TSD_utils.cxx: merge from main + tree, see ChangeLog.manual for changes + +2004-07-07 16:09 andy + + * Source/cmCTest.cxx: BUG: LastMemCheck is not really an XML file + +2004-07-07 13:03 king + + * Source/kwsys/ProcessUNIX.c: ERR: Using KWSYSPE_PIPE_BUFFER_SIZE + in place of separate bufferSize constant for consistency. + +2004-07-05 12:16 hoffman + + * Modules/CMakeVS8FindMake.cmake, + Modules/Platform/Windows-cl.cmake, Source/CMakeLists.txt, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio8Generator.cxx, + Source/cmGlobalVisualStudio8Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmake.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp: ENH: add support for + VCExpress 2005 + +2004-07-04 00:05 hoffman + + * Source/kwsys/ProcessUNIX.c: no c++ comments in c + +2004-07-03 12:00 hoffman + + * Source/kwsys/ProcessUNIX.c: fix for hp build + +2004-07-02 17:39 king + + * Source/kwsys/CMakeLists.txt: BUG: Need a C-only library for C + tests. + +2004-07-02 16:39 king + + * Source/kwsys/ProcessUNIX.c: BUG#392: Implementation of process + tree killing for systems with /proc filesystem. + +2004-07-02 16:29 king + + * Source/: cmCTest.cxx, cmCTest.h: BUG#969: Partially fixed by at + least using the timeout for the individual calls to + RunSingleCommand from within the inner ctest instance. This + should be modified to incrementally adjust remaining time. + +2004-07-02 16:27 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Made + RunSingleCommand take a double as its timeout length. + +2004-07-02 14:09 king + + * Source/cmFileCommand.cxx: BUG: Fixed generation of installation + manifest to account for library versioning symlinks. Also + removed DESTDIR prefix from generated manifest. + +2004-07-02 14:08 king + + * Source/cmLocalGenerator.cxx: BUG: install_manifest.txt should be + overwritten each time the install is run. + +2004-07-02 13:39 king + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ERR: Removed debugging code from + test. + +2004-07-02 11:51 andy + + * Source/cmFileCommand.cxx: BUG: If the destination is the same as + source, do not copy file. Fixes Bug #956 - make install broken + +2004-07-02 09:57 andy + + * Source/cmake.cxx: ENH: Also read PreLoad.cmake from the binary + tree + +2004-06-30 11:31 hoffman + + * Source/: cmMakefile.cxx, kwsys/SystemTools.cxx: ENH: add + CMAKE_FILE_PATH, CMAKE_PROGRAM_PATH, CMAKE_LIBRARY_PATH, and + search them first, PATH second, and last the paths listed in the + FIND call + +2004-06-30 08:59 andy + + * Source/cmFileCommand.cxx: ERR: Fix typo + +2004-06-29 16:40 hoffman + + * Source/cmQTWrapUICommand.cxx: ENH: remove QT_WRAP_UI flag + +2004-06-29 10:22 hoffman + + * Modules/FindSWIG.cmake: BUG: make sure if swig is found, we know + it is found + +2004-06-29 09:23 andy + + * Source/cmFileCommand.cxx, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Better handling of + debug postfix and fix the test + +2004-06-28 16:39 andy + + * Source/cmFileCommand.cxx, Source/cmGlobalGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ERR: Fix visual studio + install + +2004-06-28 14:39 andy + + * Source/cmFileCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalGenerator.h, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/inst.cxx, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstall/lib4.cxx, + Tests/SimpleInstall/lib4.h, Tests/SimpleInstallS2/lib4.cxx, + Tests/SimpleInstallS2/lib4.h: BUG: Implement installing of shared + library versioning and add test for the whole thing + +2004-06-28 11:14 andy + + * Modules/UseSWIG.cmake: BUG: Add more comments and fix + CMAKE_SWIG_FLAGS + +2004-06-28 09:08 andy + + * Modules/FindSWIG.cmake: BUG: Replace MATCHES with STREQUAL for + better checking, better checking for existence of swig directory, + verify if required flag was set, support fedora's location of + swig. Fixes Bug #955 - Swig on fedora and Bug #954 - + FIND_PACKAGE(SWIG REQUIRED) + +2004-06-26 08:40 hoffman + + * Modules/UseSWIG.cmake: BUG: SWIG_FLAGS was ignored by the add + swig source to module command + +2004-06-25 14:04 andy + + * CMakeLists.txt: ENH: Build expat as a part of default build + +2004-06-25 14:04 andy + + * Utilities/cmexpat/: .NoDartCoverage, CMakeLists.txt, COPYING, + ascii.h, asciitab.h, cm_expat_mangle.h, expat.h, + expatConfig.h.in, expatDllConfig.h.in, iasciitab.h, latin1tab.h, + nametab.h, utf8tab.h, xmlparse.c, xmlrole.c, xmlrole.h, xmltok.c, + xmltok.h, xmltok_impl.c, xmltok_impl.h, xmltok_ns.c: ENH: Initial + import of expat + +2004-06-24 09:05 hoffman + + * Source/cmWin32ProcessExecution.cxx: ENH: remove warning on + borland + +2004-06-24 08:57 hoffman + + * Source/cmExecProgramCommand.cxx: BUG: exec program should not + fail if it can not exec the program, but should only set the + return value to -1 and set the output to the reason for the + failure. + +2004-06-23 16:34 hoffman + + * Source/: cmExecProgramCommand.cxx, cmSystemTools.cxx, + cmSystemTools.h, cmTryRunCommand.cxx, + cmWin32ProcessExecution.cxx: BUG: fix spaces in path on mingw, + and change EXEC_PROGRAM to return false when it does not run, + also do not convert the directory to an output path for + EXEC_PROGRAM as this is done by the process execution, and doing + it twice may cause trouble on some shells. + +2004-06-23 16:15 hoffman + + * Modules/Platform/Windows-cl.cmake: C++ compiler is not set for c + only projects + +2004-06-23 10:13 king + + * Source/: cmCacheManager.cxx, CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h: ENH: Adding MODIFIED property to + cache values that have been changed by the user. + +2004-06-22 17:23 hoffman + + * Source/cmSystemTools.cxx: BUG: fix spaces in path with mingw and + custom commands + +2004-06-21 12:59 hoffman + + * ChangeLog.manual: update changes for release 2.0.2 + +2004-06-21 12:48 hoffman + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: change + version on branch + +2004-06-21 12:48 hoffman + + * CMakeLists.txt: change minimum cmake + +2004-06-18 15:47 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: merge from main tree, + remove automatic -I for source + +2004-06-18 15:47 hoffman + + * Source/cmSubdirCommand.h: merge from main tree, fix docs + +2004-06-18 15:46 hoffman + + * Modules/FindFLTK.cmake, Modules/FindQt.cmake, + Source/cmFLTKWrapUICommand.cxx, Source/cmQTWrapCPPCommand.cxx: + merge from main tree, remove useless variables + +2004-06-18 15:14 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Added special hack + for VTK 4.0-4.4 to re-enable automatic addition of current source + directory to -I path. + +2004-06-18 15:01 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Added special hack + for VTK 4.0-4.4 to re-enable automatic addition of current source + directory to -I path. + +2004-06-18 13:04 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Need to preserve + automatic addition of source tree to -I path if + CMAKE_BACKWARDS_COMPATIBILITY is set to below 2.0. + +2004-06-18 13:00 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Fixed typo. + +2004-06-18 12:56 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Need to preserve + automatic addition of source tree to -I path if + CMAKE_BACKWARDS_COMPATIBILITY is set to below 2.0. + +2004-06-18 10:54 king + + * Docs/: cmake-mode.el: BUG: Fixed parsing of unquoted arguments to + allow double-quotes within the argument. + +2004-06-18 10:51 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: BUG: Fixed + parsing of unquoted arguments to allow double-quotes within the + argument. + +2004-06-16 09:45 hoffman + + * Source/cmSubdirCommand.h: clean up documentation + +2004-06-16 09:43 hoffman + + * Source/cmFLTKWrapUICommand.cxx, Source/cmQTWrapCPPCommand.cxx, + Modules/FindFLTK.cmake, Modules/FindQt.cmake: clean up commands + so they don't need extra variable + +2004-06-15 11:52 king + + * Source/cmLocalUnixMakefileGenerator.cxx: Removing automatic + addition of a -I path for the current source directory. This is + not consistent with the Visual Studio generators which do not + provide this path. It should not be added anyway because it is + adding an include path not requested by the CMakeLists.txt code. + The code I'm removing was originally added in revision 1.17 of + cmUnixMakefileGenerator.cxx as a part of several other changes + and has a commit log entry of + + "some bug fixes" + + It was propagated from their to cmLocalUnixMakefileGenerator.cxx. + Since all our projects build in the VS IDE without this include + path, it should not be needed. Users can easily fix problems + caused by this by adding + + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + + to their CMakeLists.txt code. This was often necessary + previously when a project was originally written on a Unix system + and then built with Visual Studio. + +2004-06-15 08:32 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: merge from main tree, fix + GetCurrentDirectory problem + +2004-06-15 08:30 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: fix include order because of + GetCurrentDirectory define and windows.h problem + +2004-06-14 13:25 hoffman + + * Modules/FindKDE.cmake: merge from main tree, new module + +2004-06-14 12:29 hoffman + + * Utilities/Doxygen/CMakeLists.txt: merge from main tree + +2004-06-14 12:28 hoffman + + * Source/: cmIfCommand.cxx, cmIfCommand.h: merge from main tree, + add STRGREATER + +2004-06-14 12:28 hoffman + + * Source/cmCommands.cxx: merge from main tree, fix bootstrap on mac + +2004-06-14 12:27 hoffman + + * Modules/FindFLTK.cmake: merge from main tree, look for both Fl.h + and Fl.H + +2004-06-14 12:21 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: merge from main tree, + use cmake to install itself, when building cmake + +2004-06-14 12:20 hoffman + + * Source/cmIfCommand.cxx: merge from main tree, fix compound if + crash on unix + +2004-06-14 12:19 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: merge from main tree, use + correct path for sub projects + +2004-06-14 12:18 hoffman + + * Source/cmCTest.cxx: merge from main tree, more -I stuff + +2004-06-14 12:18 hoffman + + * Source/CMakeLists.txt: merge from main tree, do not use regex for + directoires + +2004-06-14 12:17 hoffman + + * Modules/FindDoxygen.cmake: ENH: better find for doxygen + +2004-06-14 12:16 hoffman + + * Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx, + Templates/DLLHeader.dsptemplate: ENH: add NDEBUG to windows + release builds for both ide and nmake + +2004-06-14 12:02 martink + + * Source/: cmIfCommand.h, cmIfCommand.cxx: added strequal + +2004-06-14 11:24 andy + + * Tests/CTestTest/test.cmake.in: ENH: Handle spaces in the path + +2004-06-14 11:23 andy + + * Source/cmCommands.cxx: ERR: On Mac we need + GET_SOURCE_FILE_PROPERTY for building curl + +2004-06-14 10:46 hoffman + + * Modules/FindKDE.cmake: ENH: add FindKDE from Alex from kde.org + +2004-06-14 10:36 hoffman + + * Modules/FindFLTK.cmake: fix for bug 915 + +2004-06-14 10:28 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: BUG: fix sub project path + problem + +2004-06-11 15:27 martink + + * CMakeLists.txt, CMakeSystemConfig.txt.in, + CMakeWindowsSystemConfig.txt, ChangeLog.manual, ChangeLog.txt, + DartConfig.cmake, bootstrap, Docs/cmake-mode.el, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeImportBuildSettings.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, Modules/CMakeTestGNU.c, + Modules/CheckForPthreads.c, Modules/CheckFunctionExists.c, + Modules/CheckIncludeFile.cmake, + Modules/CheckIncludeFileCXX.cmake, Modules/CheckTypeSize.c, + Modules/CheckTypeSize.cmake, Modules/CheckVariableExists.c, + Modules/Dart.cmake, Modules/DartConfiguration.tcl.in, + Modules/FindDCMTK.cmake, Modules/FindGLUT.cmake, + Modules/FindGTK.cmake, Modules/FindITK.cmake, + Modules/FindJNI.cmake, Modules/FindMFC.cmake, + Modules/FindOpenGL.cmake, Modules/FindPHP4.cmake, + Modules/FindPerlLibs.cmake, Modules/FindPike.cmake, + Modules/FindPythonLibs.cmake, Modules/FindQt.cmake, + Modules/FindRuby.cmake, Modules/FindSWIG.cmake, + Modules/FindTCL.cmake, Modules/FindTclsh.cmake, + Modules/FindVTK.cmake, Modules/FindwxWidgets.cmake, + Modules/FindwxWindows.cmake, Modules/MacOSXBundleInfo.plist.in, + Modules/TestBigEndian.c, Modules/UseSWIG.cmake, + Modules/UsewxWidgets.cmake, Modules/Platform/Darwin.cmake, + Modules/Platform/HP-UX.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/OSF1.cmake, + Modules/Platform/SunOS.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, Source/CMakeLists.txt, + Source/TODO, Source/cmAddCustomCommandCommand.h, + Source/cmAddCustomTargetCommand.cxx, + Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h, Source/cmAddTestCommand.cxx, + Source/cmCMakeMinimumRequired.h, Source/cmCPluginAPI.cxx, + Source/cmCPluginAPI.h, Source/cmCTest.cxx, Source/cmCTest.h, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmCommand.h, Source/cmCommands.cxx, + Source/cmConfigure.cmake.h.in, Source/cmConfigureFileCommand.cxx, + Source/cmConfigureFileCommand.h, + Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Source/cmDocumentation.cxx, + Source/cmDocumentation.h, Source/cmDynamicLoader.cxx, + Source/cmElseCommand.h, Source/cmEnableTestingCommand.cxx, + Source/cmEnableTestingCommand.h, Source/cmEndForEachCommand.cxx, + Source/cmEndForEachCommand.h, Source/cmEndIfCommand.h, + Source/cmExecProgramCommand.h, + Source/cmExportLibraryDependencies.cxx, + Source/cmFLTKWrapUICommand.cxx, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmFindFileCommand.h, + Source/cmFindLibraryCommand.h, Source/cmFindPackageCommand.cxx, + Source/cmFindPackageCommand.h, Source/cmFindPathCommand.cxx, + Source/cmFindPathCommand.h, Source/cmFindProgramCommand.h, + Source/cmForEachCommand.cxx, Source/cmForEachCommand.h, + Source/cmGeneratedFileStream.h, + Source/cmGetCMakePropertyCommand.cxx, + Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmGetDirectoryPropertyCommand.h, + Source/cmGetFilenameComponentCommand.h, + Source/cmGetSourceFilePropertyCommand.cxx, + Source/cmGetTargetPropertyCommand.cxx, Source/cmGlob.cxx, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, Source/cmIfCommand.cxx, + Source/cmIfCommand.h, Source/cmIncludeCommand.cxx, + Source/cmIncludeCommand.h, Source/cmInstallTargetsCommand.cxx, + Source/cmInstallTargetsCommand.h, + Source/cmLinkLibrariesCommand.cxx, + Source/cmLinkLibrariesCommand.h, Source/cmListFileCache.cxx, + Source/cmListFileCache.h, Source/cmListFileLexer.c, + Source/cmListFileLexer.h, Source/cmListFileLexer.in.l, + Source/cmLoadCacheCommand.h, Source/cmLoadCommandCommand.cxx, + Source/cmLocalCodeWarriorGenerator.cxx, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMacroCommand.cxx, Source/cmMacroCommand.h, + Source/cmMakeDepend.cxx, Source/cmMakeDirectoryCommand.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmMessageCommand.h, Source/cmOptionCommand.cxx, + Source/cmOutputRequiredFilesCommand.h, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapCPPCommand.h, + Source/cmQTWrapUICommand.cxx, Source/cmQTWrapUICommand.h, + Source/cmRemoveCommand.h, Source/cmRemoveDefinitionsCommand.cxx, + Source/cmRemoveDefinitionsCommand.h, + Source/cmSeparateArgumentsCommand.h, Source/cmSetCommand.h, + Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSetSourceFilesPropertiesCommand.cxx, + Source/cmSetTargetPropertiesCommand.h, + Source/cmSiteNameCommand.cxx, Source/cmSourceFile.cxx, + Source/cmSourceFilesCommand.cxx, Source/cmStandardIncludes.h, + Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Source/cmSubdirCommand.cxx, Source/cmSubdirCommand.h, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTargetLinkLibrariesCommand.h, + Source/cmTryCompileCommand.cxx, Source/cmTryCompileCommand.h, + Source/cmUseMangledMesaCommand.h, + Source/cmVTKMakeInstantiatorCommand.cxx, + Source/cmVTKWrapJavaCommand.h, Source/cmVTKWrapPythonCommand.h, + Source/cmVTKWrapTclCommand.h, Source/cmWin32ProcessExecution.cxx, + Source/cmWrapExcludeFilesCommand.cxx, + Source/cmWriteFileCommand.cxx, Source/cmWriteFileCommand.h, + Source/cmake.cxx, Source/cmake.h, Source/cmakemain.cxx, + Source/cmaketest.cxx, Source/cmakewizard.cxx, + Source/cmakewizard.h, Source/ctest.cxx, + Source/CTest/cmCTestSubmit.cxx, Source/CTest/cmCTestSubmit.h, + Source/CursesDialog/ccmake.cxx, + Source/CursesDialog/cmCursesMainForm.cxx, + Source/CursesDialog/cmCursesPathWidget.cxx, + Source/CursesDialog/cmCursesStringWidget.cxx, + Source/MFCDialog/CMakeCommandLineInfo.cpp, + Source/MFCDialog/CMakeLists.txt, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, + Source/MFCDialog/PathDialog.cpp, + Source/MFCDialog/PropertyList.cpp, + Source/MFCDialog/PropertyList.h, Source/MFCDialog/StdAfx.h, + Source/MFCDialog/resource.h, Source/WXDialog/cmWXMainFrame.cxx, + Source/kwsys/Base64.c, Source/kwsys/Base64.h.in, + Source/kwsys/CMakeLists.txt, Source/kwsys/Configure.h.in, + Source/kwsys/Configure.hxx.in, Source/kwsys/Copyright.txt, + Source/kwsys/Directory.cxx, Source/kwsys/Directory.hxx.in, + Source/kwsys/EncodeExecutable.c, Source/kwsys/Process.h.in, + Source/kwsys/ProcessFwd9x.c, Source/kwsys/ProcessUNIX.c, + Source/kwsys/ProcessWin32.c, Source/kwsys/RegularExpression.cxx, + Source/kwsys/RegularExpression.hxx.in, + Source/kwsys/SystemTools.cxx, Source/kwsys/SystemTools.hxx.in, + Source/kwsys/kwsysHeaderDump.pl, + Source/kwsys/kwsysPlatformCxxTests.cmake, + Source/kwsys/kwsysPlatformCxxTests.cxx, + Source/kwsys/kwsysPrivate.h, Source/kwsys/kwsys_ios_fstream.h.in, + Source/kwsys/kwsys_ios_iosfwd.h.in, + Source/kwsys/kwsys_ios_iostream.h.in, + Source/kwsys/kwsys_ios_sstream.h.in, Source/kwsys/kwsys_std.h.in, + Source/kwsys/kwsys_std_fstream.h.in, + Source/kwsys/kwsys_std_iosfwd.h.in, + Source/kwsys/kwsys_std_iostream.h.in, + Source/kwsys/kwsys_std_sstream.h.in, Source/kwsys/kwsys_stl.h.in, + Source/kwsys/test1.cxx, Source/kwsys/testIOS.cxx, + Source/kwsys/testProcess.c, Templates/CMakeLists.txt, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, Templates/TestDriver.cxx.in, + Templates/install-sh, Templates/staticLibHeader.dsptemplate, + Tests/COnly/CMakeLists.txt, Tests/CommandLineTest/CMakeLists.txt, + Tests/CommandLineTest/PreLoad.cmake, + Tests/Complex/CMakeLists.txt, Tests/Complex/VarTests.cmake, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/Complex/Library/file2.cxx, + Tests/Complex/Library/testConly.c, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/VarTests.cmake, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/file2.cxx, + Tests/ComplexOneConfig/Library/testConly.c, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/VarTests.cmake, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/file2.cxx, + Tests/ComplexRelativePaths/Library/testConly.c, + Tests/CustomCommand/CMakeLists.txt, + Tests/CustomCommand/generator.cxx, + Tests/CustomCommand/wrapper.cxx, Tests/Jump/CMakeLists.txt, + Tests/Jump/Executable/CMakeLists.txt, + Tests/Jump/Executable/jumpExecutable.cxx, + Tests/Jump/Library/CMakeLists.txt, + Tests/Jump/Library/Shared/CMakeLists.txt, + Tests/Jump/Library/Shared/jumpShared.cxx, + Tests/Jump/Library/Static/CMakeLists.txt, + Tests/Jump/Library/Static/jumpStatic.cxx, + Tests/LinkLineOrder/Two.c, Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommand/CMakeCommands/cmTestCommand.c, + Tests/LoadCommandOneConfig/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c, + Tests/PreOrder/CMakeLists.txt, Tests/PreOrder/simple.cxx, + Tests/PreOrder/Library/CMakeLists.txt, + Tests/PreOrder/Library/simpleLib.cxx, + Tests/Simple/CMakeLists.txt, Tests/Simple/simpleWe.cpp, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/PostInstall.cmake, + Tests/SimpleInstall/PreInstall.cmake, Tests/SimpleInstall/foo.c, + Tests/SimpleInstall/foo.h, Tests/SimpleInstall/inst.cxx, + Tests/SimpleInstall/lib1.cxx, Tests/SimpleInstall/lib1.h, + Tests/SimpleInstall/lib2.cxx, Tests/SimpleInstall/lib2.h, + Tests/SimpleInstall/lib3.cxx, Tests/SimpleInstall/lib3.h, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/PostInstall.cmake, + Tests/SimpleInstallS2/PreInstall.cmake, + Tests/SimpleInstallS2/foo.c, Tests/SimpleInstallS2/foo.h, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstallS2/lib1.cxx, + Tests/SimpleInstallS2/lib1.h, Tests/SimpleInstallS2/lib2.cxx, + Tests/SimpleInstallS2/lib2.h, Tests/SimpleInstallS2/lib3.cxx, + Tests/SimpleInstallS2/lib3.h, + Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/InputFile.h.in, Tests/SubDir/CMakeLists.txt, + Tests/SubDir/vcl_algorithm+vcl_pair+double.foo.c, + Tests/SubDir/AnotherSubdir/pair+int.int.c, + Tests/SubDir/AnotherSubdir/secondone.c, + Tests/SubDir/AnotherSubdir/testfromsubdir.c, + Tests/SubDir/Examples/CMakeLists.txt, + Tests/SubDir/Examples/example1/CMakeLists.txt, + Tests/SubDir/Examples/example1/example1.cxx, + Tests/SubDir/Examples/example2/CMakeLists.txt, + Tests/SubDir/Examples/example2/example2.cxx, + Tests/SubDir/Executable/CMakeLists.txt, + Tests/SubDir/Executable/test.cxx, + Tests/SubDir/ThirdSubDir/pair+int.int1.c, + Tests/SubDir/ThirdSubDir/pair_p_int.int1.c, + Tests/SubDir/ThirdSubDir/testfromauxsubdir.c, + Tests/SubDir/ThirdSubDir/thirdone.c, + Tests/SwigTest/CMakeLists.txt, Tests/SwigTest/example.cxx, + Tests/SwigTest/example.h, Tests/SwigTest/example.i, + Tests/SwigTest/runme.php4, Tests/SwigTest/runme.pike, + Tests/SwigTest/runme.pl, Tests/SwigTest/runme.py, + Tests/SwigTest/runme.rb, Tests/SwigTest/runme.tcl, + Tests/SwigTest/runme2.tcl, + Tests/SystemInformation/CMakeLists.txt, + Tests/SystemInformation/DumpInformation.cxx, + Tests/TryCompile/CMakeLists.txt, Tests/UseWX/CMakeLists.txt, + Tests/UseWX/WX.cxx, Tests/Wrapping/CMakeLists.txt, + Tests/Wrapping/vtkTestMoc.h, Utilities/Doxygen/CMakeLists.txt, + Utilities/Doxygen/doxyfile.in, + Utilities/Release/cmake_release.sh, + Utilities/Release/config_IRIX64, + Utilities/Release/release_dispatch.sh: updated to 2.0.1 + +2004-06-11 15:07 hoffman + + * Source/cmIfCommand.cxx: BUG: fix crash for if statment due to bad + microsoft docs on deque BUG id 917 + +2004-06-09 18:56 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG#891: When building + CMake itself, use the new cmake to install so that the current + cmake can be overwritten. + +2004-06-09 18:01 martink + + * Source/CMakeLists.txt: ERR: Do not use the binary directory as a + regular expression. + +2004-06-09 17:36 martink + + * Source/cmCTest.cxx: BUG: Files in top-level directory of source + tree were not reported in updates log. + +2004-06-09 11:30 andy + + * DartConfig.cmake: ENH: Cleanups + +2004-06-09 11:19 andy + + * Source/cmCTest.cxx: BUG: Even if update fails it should produce + valid XML + +2004-06-09 10:37 andy + + * DartConfig.cmake: ENH: Use viewcvs instead of cvsweb + +2004-06-08 17:36 martink + + * Source/cmCTest.cxx: support for floating ponit strides + +2004-06-08 17:26 barre + + * Modules/FindDoxygen.cmake, Utilities/Doxygen/CMakeLists.txt: a) + new version of tools like Doxygen and Graphviz now set install + path info in win32 registery. use it. b) remove DOT_PATH, it was + polluting the cache (can be computed from DOT, update + CMakeLists.txt accordingly if DOT_PATH is not defined) + +2004-06-07 21:41 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: undo last bug fix because it + breaks cmake, rebuild_cache on ParaView gets tons of errors about + not being able to create the bin directory + +2004-06-07 13:55 king + + * Source/kwsys/SystemTools.cxx: BUG: Do not create a directory on + top of a file. + +2004-06-07 12:35 hoffman + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestSubmit.cxx, + CTest/cmCTestSubmit.h: merge from main tree, add support for scp + submit + +2004-06-07 09:54 hoffman + + * Modules/FindFLTK.cmake: merge from main tree, fix order of + libraries + +2004-06-07 09:50 hoffman + + * Tests/Simple/CMakeLists.txt: merge from main tree + +2004-06-07 09:49 hoffman + + * Source/kwsys/SystemTools.cxx: merge from main tree, fix find + library so it does not find directories + +2004-06-07 09:48 hoffman + + * Source/cmMakefile.cxx: merge from main tree, detect problems + writting files + +2004-06-07 09:47 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: merger from main tree, + fix subdir preorder + +2004-06-07 09:46 hoffman + + * Source/cmLocalGenerator.cxx: merge from main tree, fix install + with subdir and not exepath + +2004-06-07 09:46 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmLocalVisualStudio7Generator.cxx: merge from main tree, fix + crash in external project include + +2004-06-07 09:45 hoffman + + * Source/cmCreateTestSourceList.cxx: merge from main tree, do not + write test driver each time cmake is run + +2004-06-07 09:44 hoffman + + * Source/: cmCTest.cxx, cmCTest.h: ENH: changes from main tree, + some different -I options, CTEST_DASHBOARD_ROOT computation, some + more error and warning matches + +2004-06-07 08:51 andy + + * Source/CTest/cmCTestSubmit.cxx: ERR: Remove warning + +2004-06-04 14:59 king + + * Source/kwsys/CMakeLists.txt: ERR: Do not add the library if no + sources are used. + +2004-06-03 19:12 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ERR: Remove testinf of PREORDER + on Windows + +2004-06-03 17:09 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ERR: Try to fix simple install on + vs6 + +2004-06-03 14:54 hoffman + + * Modules/FindFLTK.cmake: Fix for bug 903 change order of fltk + libraries + +2004-06-02 13:39 andy + + * Source/: cmCTest.cxx, cmCTest.h, CTest/cmCTestSubmit.cxx, + CTest/cmCTestSubmit.h: ENH: Implement scp submission + +2004-06-01 14:08 king + + * Modules/Platform/: HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + OSF1.cmake, Windows-bcc32.cmake, gcc.cmake: BUG#895: Adding + -DNDEBUG to C and C++ flags for release builds. + +2004-06-01 12:55 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstall/TestSubDir/CMakeLists.txt, + SimpleInstall/TestSubDir/TSD.cxx, SimpleInstall/TestSubDir/TSD.h, + SimpleInstall/TestSubDir/TSD_utils.cxx, + SimpleInstallS2/CMakeLists.txt, + SimpleInstallS2/TestSubDir/CMakeLists.txt, + SimpleInstallS2/TestSubDir/TSD.cxx, + SimpleInstallS2/TestSubDir/TSD.h, + SimpleInstallS2/TestSubDir/TSD_utils.cxx: ENH: More elaborate + install test + +2004-06-01 12:19 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: make sure find library does + not find directories + +2004-06-01 12:07 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: fix for 871, include + external should work for 7.1 and 7.0 + +2004-06-01 11:30 andy + + * Source/cmLocalGenerator.cxx: ENH: Fix bug in cmake install when + exec/librayr output path not defined. Closes Bug #899 - subdir + INSTALL_TARGETS INSTALL_PROGRAMS dont work + +2004-06-01 09:58 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Fix preorder. This + caused preorder to not work and the test passed because of + jump-over rule + +2004-05-28 15:02 martink + + * Source/: cmCTest.cxx, cmCTest.h: ctest -S support for multiple + ctest command arguments + +2004-05-27 12:56 andy + + * Source/cmCreateTestSourceList.cxx: BUG: When creating a test + driver, do not remove the old file, so if nothing changes, it + will not rebuild. Fixes Bug #885 - cmCreateTestSource overwrite + file when running cmake + +2004-05-27 12:53 andy + + * Source/cmMakefile.cxx: ENH: Detect if there were problems writing + file + +2004-05-27 11:21 king + + * Utilities/Release/cmake_release.sh: Updated to not include CVS + directories in cygwin package. + +2004-05-26 15:27 martink + + * Source/cmCTest.cxx: added another error string and change the -I + option some + +2004-05-25 14:34 martink + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: merges from + the main tree + +2004-05-25 11:31 martink + + * Modules/CMakeImportBuildSettings.cmake, Modules/FindQt.cmake, + Modules/UseSWIG.cmake, Source/cmCTest.cxx, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmGeneratedFileStream.h, + Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmMacroCommand.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetDirectoryPropertiesCommand.h, + Source/cmSystemTools.cxx, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, Source/MFCDialog/resource.h, + Tests/CommandLineTest/CMakeLists.txt, + Tests/Simple/CMakeLists.txt, Tests/TryCompile/CMakeLists.txt: + merges from the main tree + +2004-05-25 11:20 martink + + * Modules/CMakeImportBuildSettings.cmake, Source/cmCTest.cxx: + better error message + +2004-05-21 11:52 hoffman + + * Source/cmSystemTools.cxx: ENH: speed up for NOTFOUND + +2004-05-21 09:51 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: fix rerun of cmake + command + +2004-05-20 21:27 hoffman + + * Source/cmSystemTools.cxx: BUG: back out change due to broken + dashboard + +2004-05-20 17:33 hoffman + + * Source/cmSystemTools.cxx: ENH: remove regex use where strcmp is + faster + +2004-05-20 16:56 andy + + * Modules/UseSWIG.cmake, Source/cmGetDirectoryPropertyCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSetDirectoryPropertiesCommand.cxx, + Source/cmSetDirectoryPropertiesCommand.h: ENH: Implement + additional make clean files as a directory property instead of + cmake variable + +2004-05-20 16:39 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: allow cursor to be + changed by the OS + +2004-05-20 16:35 hoffman + + * Tests/TryCompile/CMakeLists.txt: BUG: dont put the output of a + try compile in the output because visual stduio 7 ide will thing + there were errors + +2004-05-20 16:29 hoffman + + * Source/: cmGeneratedFileStream.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: BUG: make sure global generate + is done when cmakelist file chagnes, also make sure guids are + stored in the cache so the .sln file does not change every time + +2004-05-20 16:26 hoffman + + * Modules/FindQt.cmake: ENH: look for qtmoc in some other places + +2004-05-20 15:08 martink + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + MFCDialog/CMakeSetup.rc, MFCDialog/CMakeSetupDialog.cpp, + MFCDialog/CMakeSetupDialog.h, MFCDialog/resource.h: updates to + gui to delete cache + +2004-05-20 13:15 martink + + * Source/cmCTest.cxx: added error + +2004-05-19 16:04 hoffman + + * Source/cmMacroCommand.cxx: ENH: make it run much faster + +2004-05-18 15:40 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: make sure + ADDITIONAL_MAKE_CLEAN_FILES works with spaces in the path and is + converted to the correct native path type + +2004-05-18 15:39 hoffman + + * Source/: cmEndForEachCommand.cxx, cmForEachCommand.cxx: merge + from main tree, detect missing endforeach + +2004-05-18 15:39 hoffman + + * Source/: cmDocumentation.cxx, cmakemain.cxx: merge from main + tree, move doc stuff around so it does not give cmake docs to + ctest + +2004-05-18 15:38 hoffman + + * Source/cmCTest.cxx: merge from main tree, add some more obscure + options to ctest + +2004-05-18 15:37 hoffman + + * Modules/UseSWIG.cmake: BUG: 835 fix + +2004-05-18 15:37 hoffman + + * Modules/CMakeTestGNU.c: BUG: 825 fix + +2004-05-18 14:33 hoffman + + * Modules/CMakeTestGNU.c: BUG: fix problem where cmake thinks the + intel compiler is gnu + +2004-05-17 16:31 hoffman + + * Modules/UseSWIG.cmake: ENH: append to the list of clean files, + don't just set them + +2004-05-17 15:56 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: change + ADDITIONAL_MAKE_CLEAN_FILES to work with spaces in the path and + on windows with no spaces + +2004-05-17 15:55 hoffman + + * Modules/UseSWIG.cmake: BUG: Bug #835 fix, add swig generated + files to clean target + +2004-05-13 16:17 hoffman + + * ChangeLog.manual: add a hand edited changelog + +2004-05-13 13:41 martink + + * Source/cmCTest.cxx: new feature for continuous clean once + +2004-05-13 13:07 king + + * Utilities/Release/cmake_release.sh: Removed support for + wxCMakeSetup dialog. + +2004-05-13 10:34 hoffman + + * Source/kwsys/: Base64.h.in, CMakeLists.txt, Process.h.in, + ProcessWin32.c, ProcessWin32Kill.c, ProcessWin32Kill.h.in, + kwsysHeaderDump.pl: Merge changes from the main tree, fix a bug + in the process kill code + +2004-05-13 10:08 king + + * Source/kwsys/ProcessWin32.c: BUG: Do not wait for children to + exit when killing them. Sometimes they do not really die. + +2004-05-12 15:34 martink + + * Source/cmEndForEachCommand.cxx: fix warning + +2004-05-12 14:32 martink + + * Source/: cmEndForEachCommand.cxx, cmForEachCommand.cxx: better + error checking for FOREACH + +2004-05-12 08:46 king + + * Utilities/Release/cmake_release.sh: ENH: Updated for 2.0.0 + release tag. + +2004-05-10 18:06 andy + + * Source/CMakeLists.txt, Tests/CTestTest/CMakeLists.txt, + Tests/CTestTest/test.cmake.in, + Tests/CommandLineTest/CMakeLists.txt: ENH: Add some ctest + coverage + +2004-05-10 17:53 andy + + * Source/: cmDocumentation.cxx, cmakemain.cxx: BUG: Move + documentation so that it does not apear in ctest + +2004-05-10 17:44 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add a way to force ctest to + be a new process + +2004-05-10 16:58 king + + * Utilities/Release/cmake_release.sh: ENH: Added support for using + cvs checkout instead of cvs export. + +2004-05-10 16:55 will + + * Source/cmCTest.cxx: ENH: Added regex. + +2004-05-10 16:40 king + + * Source/: cmLocalUnixMakefileGenerator.cxx: BUG: Need to recognize + -B linker options. + +2004-05-10 15:49 king + + * Utilities/Release/release_dispatch.sh: ENH: Adding release + dispatch script. + +2004-05-10 15:48 king + + * Utilities/Release/: cmake_release.sh, config_CYGWIN_NT-5.1, + config_Linux, cygwin-package.sh.in: ENH: Updated to latest + version from 1.8 branch. + +2004-05-10 14:54 king + + * Source/kwsys/: CMakeLists.txt, ProcessWin32.c, + ProcessWin32Kill.c, ProcessWin32Kill.h.in: ENH: Adding native + windows process tree kill to ProcessWin32.c. This replaces the + ProcessWin32Kill.c implementation. + +2004-05-10 13:38 king + + * Source/kwsys/: Base64.h.in, ProcessWin32.c: ERR: Avoiding + namespace pollution: kw_sys -> kwsys_ns. Also undefining the + macro at the correct time. + +2004-05-10 13:15 king + + * Source/kwsys/kwsysHeaderDump.pl: ENH: Renaming kwsys macro to + kwsys_ns to work around borland preprocessor bug. + +2004-05-10 13:10 king + + * Source/kwsys/: Process.h.in, ProcessWin32Kill.h.in: ERR: Avoiding + namespace pollution: kw_sys -> kwsys_ns. Also undefining the + macro at the correct time. + +2004-05-10 12:45 hoffman + + * Modules/FindGTK.cmake, Modules/Platform/OSF1.cmake, + Source/cmCTest.cxx, Source/cmCTest.h, Source/cmIfCommand.cxx, + Source/cmLocalGenerator.cxx, Source/cmake.cxx, Source/ctest.cxx, + Source/kwsys/Base64.h.in, Source/kwsys/CMakeLists.txt, + Source/kwsys/Process.h.in, Source/kwsys/ProcessWin32.c, + Source/kwsys/ProcessWin32Kill.c, + Source/kwsys/ProcessWin32Kill.h.in, Source/kwsys/SystemTools.cxx, + Templates/TestDriver.cxx.in: merge from main tree + +2004-05-10 12:08 hoffman + + * Source/kwsys/ProcessWin32Kill.c: ENH: remove extra include for + compile with mingw + +2004-05-10 12:06 hoffman + + * Source/kwsys/: CMakeLists.txt, ProcessWin32Kill.c, + ProcessWin32Kill.cxx: ENH: change to c code so it can be built + with mingw + +2004-05-10 11:04 hoffman + + * Source/kwsys/ProcessWin32Kill.cxx: ENH: remove unused include + file so it will build with mingw + +2004-05-10 10:20 martink + + * Source/cmCTest.cxx: fix for config type passing between ctests + +2004-05-09 12:27 martink + + * Source/cmCTest.cxx: some cleanup and fix for PVLocal + +2004-05-08 14:55 hoffman + + * Templates/TestDriver.cxx.in: BUG: remove debug pop hacks, also + remove duplicate call to argvc function + +2004-05-07 14:22 andy + + * Source/kwsys/: Base64.h.in, Process.h.in, ProcessWin32.c, + ProcessWin32Kill.h.in: ERR: On Borland preprocessor goes into + recursion which adds some weid spaces in the include name. This + fixes it + +2004-05-07 13:26 hoffman + + * Source/ctest.cxx: ENH: better documentation + +2004-05-07 12:53 hoffman + + * Source/: cmCTest.cxx, cmCTest.h: ENH: add the ability to block + popup error dialogs in tests on windows + +2004-05-07 12:52 hoffman + + * Source/kwsys/ProcessWin32.c: BUG: make sure the correct state is + set for expired processes + +2004-05-07 11:24 martink + + * Source/cmCTest.cxx: missing header for unix + +2004-05-07 10:50 martink + + * Source/: cmCTest.cxx, cmCTest.h: updated testingoptions for + continuous dashboards + +2004-05-07 10:16 hoffman + + * Modules/FindGTK.cmake: Add a missing dollar sign + +2004-05-07 08:35 martink + + * Templates/TestDriver.cxx.in: fix warning maybe + +2004-05-06 16:06 hoffman + + * Source/cmLocalGenerator.cxx: BUG: make sure install works with + spaces in the path + +2004-05-06 15:34 king + + * Source/kwsys/: CMakeLists.txt, ProcessWin32.c, + ProcessWin32Kill.cxx, ProcessWin32Kill.h.in: ENH: Adding process + tree killing for Win32 process execution. + +2004-05-06 14:30 king + + * Source/kwsys/Process.h.in: ERR: Added units to SetTimeout + documentation. + +2004-05-06 10:30 hoffman + + * Source/cmCTest.cxx: BUG: fix ctest so that the search path for + test executables produces better output and does not use config + dir when it is not set + +2004-05-06 10:29 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: fix collapse full path to + handle a file in the root directory + +2004-05-06 09:47 martink + + * Source/cmIfCommand.cxx: horrible hack + +2004-05-06 08:51 martink + + * Templates/TestDriver.cxx.in: fix warning + +2004-05-05 11:41 martink + + * Source/cmCTest.cxx: fix for in source testing + +2004-05-05 10:41 martink + + * Modules/Platform/OSF1.cmake: a guess at some OSF compiler flags + +2004-05-05 10:23 hoffman + + * ChangeLog.txt: change log up-to 2.0 branch point + +2004-05-05 10:21 hoffman + + * ChangeLog.txt: ENH: add new change log marking 2.0 branch + +2004-05-05 10:19 hoffman + + * CMakeLists.txt, Source/cmCPluginAPI.h: ENH: move version to 2.1 + for cvs because 2.0 has been branched + +2004-05-05 10:17 hoffman + + * CMakeLists.txt, Source/cmCPluginAPI.h, + Utilities/Release/cmake_release.sh: ENH: move version numbers to + cmake 2.0 for branch + +2004-05-05 10:13 andy + + * Source/: cmCTest.cxx, cmake.cxx: ENH: Remove memory leak + +2004-05-04 14:24 hoffman + + * Source/CMakeLists.txt, Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: fix tests + to work with in source builds + +2004-05-04 14:18 martink + + * Source/cmCTest.cxx: support in source builds and arg passing + +2004-05-04 11:24 andy + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: ENH: Only mangle object + files if CMAKE_MANGLE_OBJECT_FILE_NAMES is set. Only on borland + for now. + +2004-05-04 09:16 martink + + * Source/cmIfCommand.cxx: fix warning + +2004-05-03 17:51 andy + + * Tests/SwigTest/CMakeLists.txt: ENH: Cleanup example a bit + +2004-05-03 16:38 andy + + * Source/cmCTest.cxx: ENH: After running test clear results for + memory checking + +2004-05-03 16:36 andy + + * Source/cmCTest.cxx: ENH: Skip tests that do not have defects + +2004-05-03 16:35 andy + + * Modules/: CheckTypeSize.c, CheckTypeSize.cmake: ENH: support + STDDEF and cleanup + +2004-05-03 15:33 martink + + * Source/cmIfCommand.cxx: minor backwards fix + +2004-05-03 12:34 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix to make spaces + in paths work for jump over with borland and nmake on second + build + +2004-05-03 12:02 andy + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: Remove + warning + +2004-05-03 10:10 king + + * Source/cmStringCommand.h: ENH: Documented use of \1 syntax in + replace expression. + +2004-05-03 08:52 hoffman + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: fix + warnings in test + +2004-05-02 11:50 hoffman + + * Tests/: LinkLineOrder/Two.c, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: remove + warnings in tests + +2004-05-01 22:05 hoffman + + * Source/ctest.cxx: BUG: putenv syntax was wrong and caused a crash + on the SGI + +2004-05-01 10:08 martink + + * Source/: cmIfCommand.cxx, cmIfCommand.h: better if expression + support + +2004-05-01 10:07 martink + + * Modules/FindOpenGL.cmake: fix to find opengl on some osf systems + +2004-05-01 09:57 andy + + * Source/cmCTest.cxx: ERR: Remove warning about shadow variables + +2004-04-30 18:21 andy + + * Tests/: Complex/Library/testConly.c, + ComplexOneConfig/Library/testConly.c, + ComplexRelativePaths/Library/testConly.c, + SubDir/ThirdSubDir/testfromauxsubdir.c: ENH: Remove warnings + +2004-04-30 17:28 andy + + * Tests/Simple/simpleWe.cpp: ENH: Remove warning + +2004-04-30 15:17 andy + + * Source/ctest.cxx: ENH: Add environment variable that Dart sets so + that tests can know they are being tested from Dart/CTest + +2004-04-30 14:27 hoffman + + * Tests/SwigTest/CMakeLists.txt: ENH: link in more than just python + +2004-04-30 14:14 andy + + * Source/cmCTest.cxx: ENH: Report filename of the note + +2004-04-30 13:41 andy + + * Modules/FindSWIG.cmake: ENH: More paths + +2004-04-30 12:54 hoffman + + * Modules/FindSWIG.cmake: ENH: add another place to look for + swig.exe + +2004-04-30 12:52 hoffman + + * Modules/FindSWIG.cmake: ENH: try to find swig.exe in SWIG_DIR + +2004-04-30 12:36 andy + + * Source/cmCTest.cxx: ENH: Add support for notes in Testing/Notes + subdirectory. This way test can write notes that will be reported + +2004-04-30 12:17 andy + + * Tests/SwigTest/: CMakeLists.txt, example.cxx, example.h, + example.i, runme.php4, runme.pike, runme.pl, runme.py, runme.rb, + runme.tcl, runme2.tcl: ENH: Here is test for swig module + +2004-04-30 12:11 andy + + * Modules/: FindPHP4.cmake, FindPerlLibs.cmake, FindPike.cmake, + FindRuby.cmake, FindSWIG.cmake, UseSWIG.cmake: ENH: Initial + import of swig. Start working towards Bug #749 - Add swig support + module to cmake + +2004-04-30 11:36 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: remove duplicate + depend on cache file and use of make variable in make target + +2004-04-30 11:36 hoffman + + * Templates/TestDriver.cxx.in: ENH: remove unused variable + +2004-04-30 10:32 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove warnings + +2004-04-30 08:02 hoffman + + * Templates/CMakeLists.txt: BUG: add missing install file + +2004-04-29 17:44 king + + * Source/kwsys/CMakeLists.txt: ENH: Added automatic adjustment of + C++ flags to include -timplicit_local and -no_implicit_include + for the Compaq compiler on OSF. + +2004-04-29 17:41 andy + + * Source/cmMacroCommand.cxx, Source/cmMacroCommand.h, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: Add ARGV and ARGN + support to MACRO command. ARGV is the list of all arguments and + ARGN is the list of all nonexpected arguments + +2004-04-29 15:12 andy + + * Source/cmForEachCommand.cxx, Source/cmForEachCommand.h, + Tests/StringFileTest/CMakeLists.txt: ENH: Add RANGE support to + FOREACH + +2004-04-29 14:51 andy + + * Source/: cmCTest.cxx, cmStandardIncludes.h: BUG: Add a safety + check so that you cannot send cmOStringStream.str() to other + stream and produce the funky hex number. This makes it impossible + to compile such a code. Adding that exposed a whole bunch of + places in CMake where streams were used wrongly + +2004-04-29 13:25 andy + + * Source/kwsys/SystemTools.cxx: BUG: Most of time when asking if + file exists, we actually want to read it... Should fix Bug #809 - + FIND_INCLUDE should check readability + +2004-04-29 13:13 hoffman + + * Source/MFCDialog/StdAfx.h: ENH: remove warning + +2004-04-29 12:33 hoffman + + * Source/: cmGetTargetPropertyCommand.cxx, + cmLocalUnixMakefileGenerator.cxx: ENH: remove warnings + +2004-04-29 10:26 hoffman + + * Source/cmake.cxx: BUG: fix crash from bug id 806 + +2004-04-28 14:25 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: remove warning + +2004-04-28 13:40 hoffman + + * Source/: cmAddExecutableCommand.h, MFCDialog/CMakeLists.txt: BUG: + fix for bug 121 add some docs for MFC flag + +2004-04-28 13:21 hoffman + + * Modules/Platform/Darwin.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for bug 116 + platform files can now specify directories that should not be + added by CMAKE + +2004-04-28 12:31 hoffman + + * Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Templates/TestDriver.cxx.in: + ENH: make test driver more flexible by using a configured file + instead of generating all the code. fixes bug 28 + +2004-04-28 10:52 andy + + * Source/cmake.cxx, Tests/CommandLineTest/CMakeLists.txt, + Tests/CommandLineTest/PreLoad.cmake: ENH: Add support for + automatically preloaded cmake file. Closes Bug #802 - Add auto + preload file support in CMake + +2004-04-28 10:15 andy + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: Encode object files with + funny characters in the name. It should fix Bug #418 - Borland + 5.5.1, Templates/*.cxx files with '+' chars used in execs + +2004-04-28 10:09 hoffman + + * Tests/: Complex/VarTests.cmake, Complex/Executable/complex.cxx, + ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/Executable/complex.cxx: ENH: add a test for + EQUAL in if + +2004-04-28 10:05 andy + + * Tests/SubDir/ThirdSubDir/: pair_p_int.int1.c, + testfromauxsubdir.c: ENH: More special cases + +2004-04-28 10:00 hoffman + + * Modules/: CheckIncludeFile.cmake, CheckIncludeFileCXX.cmake: ENH: + fixes for optional flag arguments to check include macros + +2004-04-28 09:59 hoffman + + * Source/cmIfCommand.cxx: BUG: fix logic in EQUAL if test + +2004-04-28 09:52 hoffman + + * Modules/CheckIncludeFileCXX.cmake: BUG: fix for bug 80, check + include cxx now has an optional argument that can is added to the + cxx flags + +2004-04-28 09:51 hoffman + + * Source/: cmIfCommand.cxx, cmIfCommand.h: ENH: add a numeric EQUAL + to the IF statment, very useful for variable arguments in MACROS + +2004-04-27 14:16 andy + + * Source/kwsys/: Base64.c, Base64.h.in, CMakeLists.txt, + Configure.h.in, Configure.hxx.in, Copyright.txt, Directory.cxx, + Directory.hxx.in, EncodeExecutable.c, Process.h.in, + ProcessFwd9x.c, ProcessUNIX.c, ProcessWin32.c, README.txt, + RegularExpression.cxx, RegularExpression.hxx.in, SystemTools.cxx, + SystemTools.hxx.in, kwsysHeaderDump.pl, + kwsysPlatformCxxTests.cmake, kwsysPlatformCxxTests.cxx, + kwsysPrivate.h, kwsys_ios_fstream.h.in, kwsys_ios_iosfwd.h.in, + kwsys_ios_iostream.h.in, kwsys_ios_sstream.h.in, kwsys_stl.h.in, + test1.cxx, testIOS.cxx, testProcess.c: ENH: Move to VolView + branch + +2004-04-27 12:03 andy + + * Source/cmGetTargetPropertyCommand.cxx, + Tests/CustomCommand/CMakeLists.txt: ENH: Add LOCATION to + GET_TARGET_PROPERTY. Closes Bug #34 - Add to GET_TARGET_PROPERTY + location of target + +2004-04-27 12:02 andy + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + ENH: GetSafeDefinition is now in cmMakefile + +2004-04-27 11:30 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Add method to get + definition even if it does not exists + +2004-04-27 11:08 andy + + * Tests/CustomCommand/: generator.cxx, wrapper.cxx: ERR: Remove + warnings from tests + +2004-04-27 09:22 andy + + * Source/cmSourceFile.cxx, Tests/SubDir/CMakeLists.txt, + Tests/SubDir/vcl_algorithm+vcl_pair+double.foo.c, + Tests/SubDir/AnotherSubdir/pair+int.int.c, + Tests/SubDir/AnotherSubdir/secondone.c, + Tests/SubDir/AnotherSubdir/testfromsubdir.c, + Tests/SubDir/ThirdSubDir/pair+int.int1.c, + Tests/SubDir/ThirdSubDir/testfromauxsubdir.c, + Tests/SubDir/ThirdSubDir/thirdone.c: BUG: Fix aus source dir and + add better testing of it + +2004-04-27 08:30 hoffman + + * Source/: cmLoadCommandCommand.cxx, cmMacroCommand.cxx: WRN: + remove warnings + +2004-04-26 18:51 andy + + * Source/cmCTest.cxx: ENH: Another one of those nasty hex numbers + in the ctest output + +2004-04-26 18:49 andy + + * Tests/SubDir/AnotherSubdir/: secondone.c, testfromsubdir.c: ENH: + Add extra test files + +2004-04-26 17:45 hoffman + + * Source/cmLoadCommandCommand.cxx: ENH: fix for bug id 27, add a + signal handler for crashes in loaded commands + +2004-04-26 17:32 andy + + * Source/CMakeLists.txt, Source/cmSourceFile.cxx, + Tests/SubDir/CMakeLists.txt, Tests/SubDir/Executable/test.cxx: + ENH: When source file is in subdirectory put object file in + subdirectory. Fixes Bug #290 - Source files in subdirectories + should produce object files in subdirectories + +2004-04-26 13:42 andy + + * Modules/FindTCL.cmake: ENH: Add TCL_FOUND + +2004-04-26 13:42 andy + + * Templates/: CMakeLists.txt, install-sh: ENH: With new install + framework we don't need install-sh any more + +2004-04-26 13:42 andy + + * Tests/SystemInformation/: CMakeLists.txt, DumpInformation.cxx: + ENH:Add test for GET/SET_DIRECTORY_PROPERTY + +2004-04-26 11:23 andy + + * Source/: cmake.cxx, cmake.h: BUG: Fix resolving of infinite loops + while CMakeSetup/ccmake still running + +2004-04-26 11:12 martink + + * Tests/: Complex/CMakeLists.txt, Complex/Executable/complex.cxx, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx: added tests for var + args with macros + +2004-04-26 11:11 martink + + * Source/: cmMacroCommand.cxx, cmMacroCommand.h: macros now support + varargs + +2004-04-26 11:00 king + + * Modules/FindITK.cmake, Modules/FindVTK.cmake, + Source/cmFindPackageCommand.cxx: BUG#682: Adding environment + variable check to FIND_PACKAGE command. + +2004-04-26 10:49 king + + * Source/cmFindPackageCommand.cxx: STYLE: Removed trailing + whitespace. + +2004-04-26 10:19 king + + * Modules/: CheckVariableExists.c: BUG#502: Do not let optimizing + compilers think the symbol exists. Require the symbol by making + the return value depend on it to force linking. + +2004-04-23 16:26 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate: BUG: fix for bug 769 + CMAKE_STANDARD_LIBRARIES now used in ides + +2004-04-23 16:20 andy + + * Source/: cmCommands.cxx, cmGetDirectoryPropertyCommand.cxx, + cmGetDirectoryPropertyCommand.h, cmMakefile.h, + cmSetDirectoryPropertiesCommand.cxx, + cmSetDirectoryPropertiesCommand.h: ENH: Add + GET/SET_DIRECTORY_PROPERTY/PROPERTIES commands so that we can + change include directories and get all sorts of things. Closes + Bug #25 - Get_CMAKE_PROPERTIES + +2004-04-23 13:12 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Source/cmLocalVisualStudio7Generator.cxx: ENH: add verbose make + abilility to visual studio 7 + +2004-04-23 12:52 hoffman + + * Source/CMakeLists.txt, Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSubdirCommand.cxx, + Tests/PreOrder/CMakeLists.txt, Tests/PreOrder/simple.cxx, + Tests/PreOrder/Library/CMakeLists.txt, + Tests/PreOrder/Library/simpleLib.cxx: ENH: add SUBDIR PREORDER + and fix clean for non-relative paths + +2004-04-23 10:03 andy + + * Source/: cmAddExecutableCommand.cxx, cmAddExecutableCommand.h: + ENH: Unify with other variables + +2004-04-23 09:12 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: ENH: allow verbose + makefile flag to remove nologo from all commands so you can see + them in visual studio 6 + +2004-04-23 08:50 king + + * Source/cmCTest.cxx: ERR: Fixed unused variable assignment + warning. + +2004-04-22 18:04 andy + + * Source/cmCTest.cxx: ENH: Add DynamicAnalisys support. The old + Purify is still available through --compatibility-mode + +2004-04-22 17:23 hoffman + + * Modules/: FindwxWidgets.cmake, UsewxWidgets.cmake: BUG: fix for + bug 618 + +2004-04-22 17:20 hoffman + + * Modules/FindGLUT.cmake: BUG: fix for bug 743 + +2004-04-22 17:08 hoffman + + * Modules/FindGTK.cmake: BUG: fix for bug 607 + +2004-04-22 16:58 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Templates/staticLibHeader.dsptemplate: ENH: add support for + static library property STATIC_LIBRARY_FLAGS + +2004-04-22 16:16 hoffman + + * Modules/FindDCMTK.cmake: ENH: contribution from Ian Scott, + thanks. + +2004-04-22 15:59 martink + + * Modules/FindOpenGL.cmake: update comments + +2004-04-22 14:38 hoffman + + * Source/cmTarget.cxx: ENH: add a property for HAS_CXX to a target + that will force the use of a c++ compiler in the linking of an + executable that contains only c code + +2004-04-22 14:11 andy + + * Source/kwsys/SystemTools.cxx: ERR: Verify that getenv returned + something before using it + +2004-04-22 13:37 martink + + * Source/cmAddCustomCommandCommand.h: update docs + +2004-04-22 13:24 hoffman + + * Source/: cmFindLibraryCommand.h, cmFindPathCommand.cxx, + cmFindPathCommand.h, cmMakefile.cxx, kwsys/SystemTools.cxx, + kwsys/SystemTools.hxx.in: BUG: fix for 301 CMAKE_LIBRARY_PATH and + CMAKE_INCLUDE_PATH env vars now used in FIND_LIBRARY and + FIND_PATH in addtion to and before PATH + +2004-04-22 11:12 hoffman + + * Modules/FindwxWindows.cmake: BUG: fix bad if statements + +2004-04-22 09:44 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG 178: make top level + cmakelist file a source in ALL_BUILD + +2004-04-21 17:54 andy + + * Source/cmGlobalVisualStudio71Generator.cxx: ERR: Fix install on + VS71 + +2004-04-21 16:23 king + + * Source/: cmListFileLexer.c, cmListFileLexer.h, + cmListFileLexer.in.l: ENH: Added cmListFileLexer_SetString method + to allow a string to be parsed as input. + +2004-04-21 16:07 hoffman + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: add dep + +2004-04-21 15:09 hoffman + + * Modules/FindwxWindows.cmake: ENH: fix for mingw + +2004-04-21 11:42 andy + + * Source/cmFileCommand.cxx: BUG: Put all files to manifest + +2004-04-21 11:36 king + + * Source/cmAddCustomTargetCommand.cxx: BUG: Fixed check of number + of arguments. + +2004-04-21 11:33 king + + * Modules/: FindITK.cmake, FindVTK.cmake: ENH: Terminate with a + FATAL_ERROR if FIND_PACKAGE command was called with REQUIRED + argument and package was not found. + +2004-04-21 11:32 andy + + * Source/cmLocalGenerator.cxx: ENH: Do preinstall and postinstall + script even if the target is not installed + +2004-04-21 10:34 andy + + * Source/: cmakemain.cxx, ctest.cxx: ENH: Report error and exit + when the current directory is not specified + +2004-04-21 10:33 andy + + * Source/kwsys/SystemTools.cxx: BUG: Prevent crash when the current + working directory cannot be established + +2004-04-20 18:28 andy + + * Source/cmSystemTools.cxx: BUG: If the line ends without new-line + character, Split should still return something + +2004-04-19 17:21 andy + + * Source/cmCTest.cxx: RNH: Support NoDartCoverage in the binary + directorory + +2004-04-19 10:36 king + + * Source/: cmFindPackageCommand.cxx, cmFindPackageCommand.h: + ENH#696: Adding REQUIRED option to FIND_PACKAGE command. It will + terminate the cmake configure step if the package is not found. + +2004-04-18 14:41 andy + + * Source/: cmFileCommand.cxx, cmFileCommand.h, + cmGlobalGenerator.cxx, cmMakefile.cxx, cmMakefile.h, + cmWriteFileCommand.cxx, cmWriteFileCommand.h, cmake.cxx, cmake.h: + ENH: Add check for infinite loops. Make sure that files written + using WRITE_FILE and FILE WRITE are not used as input files. + Fixes Bug #678 - WRITE_FILE and FILE(WRITE...) lead to infinite + loops + +2004-04-18 13:16 andy + + * Source/: cmLocalUnixMakefileGenerator.cxx, cmSourceFile.cxx: ENH: + Add support for adding object files and sources. This way you can + use external program such as assembler or fortran to generate + object files. Also star of fixing: Bug #757 - add .o file as a + source file + +2004-04-16 14:55 martink + + * Source/cmCTest.cxx: better args handling for -I options + +2004-04-16 14:52 martink + + * Source/: cmCTest.cxx, cmCTest.h: better args handling for -I + option + +2004-04-16 13:36 andy + + * Source/cmCTest.cxx: ENH: Better reporting of what tests failed + and write a file with failed tests + +2004-04-16 09:50 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug 91 + +2004-04-15 16:11 andy + + * Source/CursesDialog/cmCursesStringWidget.cxx: ENH: Add support + for HOME and END keys. Also fix Bug #666 - In CCMake when + deleting something, it does not stop at the beginning of line + +2004-04-15 15:46 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: Prevent deleting + not existing variables and therefore prevent crash. Fixes: Bug + #750 - CCMake crashes when deleting all variables + +2004-04-15 13:59 andy + + * Tests/: Complex/CMakeLists.txt, Complex/Executable/complex.cxx, + Complex/Library/CMakeLists.txt, Complex/Library/file2.cxx, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/file2.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/file2.cxx: ENH: Add test for + REMOVE_DEFINITION + +2004-04-15 13:58 andy + + * Source/: cmCommands.cxx, cmMakefile.cxx, cmMakefile.h, + cmRemoveDefinitionsCommand.cxx, cmRemoveDefinitionsCommand.h: + ENH: ADD REMOVE_DEFINITION command. Fix feature request: Bug #182 + - Add opposite to ADD_DEFINITIONS + +2004-04-15 13:15 hoffman + + * Source/cmOptionCommand.cxx: BUG: fix for 282 + +2004-04-15 13:09 andy + + * Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Templates/CMakeLists.txt: ENH: Handle make install target on + Visual Studio 6 and 7 and install templates + +2004-04-15 12:07 andy + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: Ok, that is it. Remove old + install and replace it with new + +2004-04-15 11:55 hoffman + + * Modules/FindMFC.cmake: BUG: fix for bug 506 + +2004-04-15 11:38 hoffman + + * Source/cmSiteNameCommand.cxx: BUG: fix for bug 689 + +2004-04-15 08:22 hoffman + + * Modules/: CheckForPthreads.c, CheckFunctionExists.c, + CheckTypeSize.c, CheckVariableExists.c, TestBigEndian.c: ENH: fix + tests for non-ansi c on hp and remove warnings for ansi c + +2004-04-14 17:02 hoffman + + * Modules/FindITK.cmake: BUG: fix for bug 608 + +2004-04-14 16:58 hoffman + + * Source/cmGlobalVisualStudio7Generator.cxx: BUG: fix external + projects for vc7 + +2004-04-14 15:56 hoffman + + * Modules/: CheckFunctionExists.c, TestBigEndian.c: ENH: remove + warnings from try compiles + +2004-04-14 14:25 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Renamed + --help-list-commands to --help-command-list and split --help + [command] into separate --help and --help-command cmd options. + +2004-04-14 13:40 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Added + --help-list-commands option. + +2004-04-14 08:55 hoffman + + * Source/cmCTest.cxx: ENH: remove warning + +2004-04-13 18:27 hoffman + + * Source/cmCTest.cxx: ENH: fix warning + +2004-04-13 16:32 hoffman + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: ENH: add the ability + to run a limited sub-set of the tests + +2004-04-12 21:01 hoffman + + * Modules/FindGTK.cmake: BUG: fix for bug 593 + +2004-04-09 09:53 andy + + * Source/cmCTest.cxx: BUG: Display string not some weird pointer + +2004-04-09 08:37 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: add full path + libraries to the depend information + +2004-04-08 17:13 andy + + * Modules/MacOSXBundleInfo.plist.in, + Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h: ENH: Improve Mac OSX bundle + support + +2004-04-07 12:07 martink + + * Source/cmLocalVisualStudio7Generator.cxx: fix problem with custom + command + +2004-04-07 09:58 hoffman + + * Source/cmTarget.cxx: ENH: remove warnings on sgi + +2004-04-05 10:35 king + + * DartConfig.cmake: ERR: Need to use latest testing configuration + even on branch. + +2004-04-02 13:21 king + + * Source/cmTarget.cxx: BUG: _LINK_TYPE cache variable should never + be switched from optimized to debug or vice versa. + +2004-04-02 09:43 hoffman + + * Source/CMakeLists.txt, Tests/Jump/Library/Shared/CMakeLists.txt: + ENH: fix for apple + +2004-04-02 08:09 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix warning and + shadow variable + +2004-04-01 16:07 martink + + * Source/cmCTest.cxx: fix for missing valid images + +2004-04-01 15:28 king + + * Source/kwsys/ProcessFwd9x.c: ENH: Added comment for future work + to make forwarding executable always statically linked. + +2004-04-01 14:37 andy + + * Source/cmCTest.cxx: BUG: Fix bug on windows. You cannot cout + std::string directly + +2004-04-01 14:11 andy + + * Source/: cmCTest.cxx, CTest/cmCTestSubmit.cxx, + CTest/cmCTestSubmit.h: ENH: Add logging of submitting + +2004-04-01 09:59 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix non relative + paths + +2004-04-01 08:59 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for non + relative paths with spaces in the path + +2004-03-31 16:44 king + + * Modules/FindTclsh.cmake: ENH: Added registry check for + ActiveState Tcl 8.4.6. + +2004-03-31 11:26 andy + + * Source/cmCTest.cxx: ENH: Reduce number of + GetCurrentWorkingDirectory + +2004-03-31 11:24 andy + + * Source/cmCTest.cxx: ENH: Change to the new directory + +2004-03-31 10:01 hoffman + + * Source/: CMakeLists.txt, cmLocalGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h, + cmake.cxx: ENH: make relative paths optional and default off, and + add a test for them + +2004-03-29 13:16 king + + * Source/MFCDialog/PropertyList.cpp: BUG#724: Merging 1.27->1.28 + changes to CMake 1.8 branch. + +2004-03-29 13:15 king + + * Source/MFCDialog/PropertyList.cpp: BUG#724: Preserving current + working directory during file selection. + +2004-03-29 12:51 king + + * Source/cmConfigureFileCommand.cxx: BUG#485: Fixing on CMake 1.8 + branch. + +2004-03-29 12:04 king + + * Source/: cmSystemTools.h, cmTryCompileCommand.cxx: BUG#679: + Merging fix to CMake 1.8 branch. + +2004-03-28 17:59 andy + + * Source/: cmFileCommand.cxx, cmLocalGenerator.cxx: ENH: When + installing project, write manifest + +2004-03-28 16:36 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Add a way to clean + additional files + +2004-03-28 16:00 andy + + * Source/: cmConfigureFileCommand.cxx, cmConfigureFileCommand.h, + cmMakefile.cxx: ENH: If configure file fails do not create + directory + +2004-03-28 10:14 andy + + * Source/cmIncludeCommand.cxx: ERR: Remove debug + +2004-03-28 10:14 andy + + * Source/cmLocalGenerator.cxx: BUG: Support paths with spaces + +2004-03-28 09:46 andy + + * Source/: cmIncludeCommand.h, cmSetTargetPropertiesCommand.h: DOC: + Fix comment + +2004-03-27 20:59 andy + + * Source/cmLocalGenerator.cxx, + Source/cmSetTargetPropertiesCommand.h, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/PostInstall.cmake, + Tests/SimpleInstall/PreInstall.cmake, + Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/PostInstall.cmake, + Tests/SimpleInstallS2/PreInstall.cmake: ENH: Add pre and post + install script support + +2004-03-27 19:52 andy + + * Source/cmIncludeCommand.cxx, Source/cmIncludeCommand.h, + Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt: ENH: Add support for + importing modules without specifying path + +2004-03-27 19:52 andy + + * Source/cmFindPackageCommand.cxx: ERR: That slash is unnecessary + +2004-03-27 13:20 starreveld + + * Modules/FindOpenGL.cmake: ERR: Shouldn't be adding xlibs to + opengllibs on osx + +2004-03-25 16:06 martink + + * Source/cmCTest.cxx: coverage change that will probably end in an + infinite loop + +2004-03-25 08:45 king + + * Source/: cmLinkLibrariesCommand.h, + cmTargetLinkLibrariesCommand.h: ENH: Clarified documentation for + LINK_LIBRARIES and TARGET_LINK_LIBRARIES. + +2004-03-24 16:31 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Added support to + library flags parser for -Wl and -R options. + +2004-03-23 15:02 king + + * Modules/Platform/Windows-cl.cmake: ERR: Fixed incorrect + documentation for CMAKE_CXX_WARNING_LEVEL. Submitted by David + Cole. + +2004-03-20 20:37 andy + + * Source/cmCTest.cxx: ENH: Fix warning + +2004-03-19 14:48 king + + * Source/cmTryCompileCommand.cxx: ENH: Clarified recursive + TRY_COMPILE error message. + +2004-03-19 09:34 andy + + * Source/cmCTest.cxx: ERR: Fix warnings about wrong format + +2004-03-18 09:52 andy + + * Source/cmCTest.cxx: ERR: Fix build on broken C++ compiles with no + != operator for std::string + +2004-03-17 11:30 andy + + * Source/: cmCTest.cxx, cmCTest.h: BUG: change directory before + running test and remember test number + +2004-03-17 09:42 berk + + * Source/: cmSystemTools.h, cmTryCompileCommand.cxx: BUG: When + error occurs, try compiles should still work + +2004-03-17 08:20 andy + + * Source/cmCTest.h: ERR: On some compilers structure inside class + cannot reference private typdefs from the same class + +2004-03-16 12:54 king + + * Source/cmExportLibraryDependencies.cxx: ERR: Added missing + include for auto_ptr. + +2004-03-15 14:54 andy + + * Source/kwsys/CMakeLists.txt: ENH: Always include KWSys header + files directory + +2004-03-15 10:44 king + + * Source/cmExportLibraryDependencies.cxx: BUG#675: If not + appending, do copy-if-different on exported file. + +2004-03-15 09:35 andy + + * Source/cmCTest.h: ERR: Fix build + +2004-03-14 12:28 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add support for future tags + +2004-03-14 11:23 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Count tests while they go. + Also in the logs report more stuff like elapsed time etc. + +2004-03-12 14:43 king + + * Source/kwsys/ProcessUNIX.c: ERR: SIGSEGV == SIGBUS on BeOS. + +2004-03-10 14:33 hoffman + + * Source/: cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h: ENH: update vs71 generator to + support excluded subdirs + +2004-03-09 16:28 hoffman + + * Source/CMakeLists.txt, Source/cmEnableTestingCommand.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalGenerator.cxx, Source/cmLocalGenerator.h, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSubdirCommand.cxx, + Source/cmSubdirCommand.h, Tests/SubDir/Executable/test.cxx: ENH: + add new subdirectory exclude from top option + +2004-03-09 16:20 hoffman + + * Tests/SubDir/: CMakeLists.txt, Examples/CMakeLists.txt, + Examples/example1/CMakeLists.txt, Examples/example1/example1.cxx, + Examples/example2/CMakeLists.txt, Examples/example2/example2.cxx, + Executable/CMakeLists.txt, Executable/test.cxx: ENH: create new + test to test subdir exclude + +2004-03-09 12:31 andy + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: Properly build + WIN32 executables + +2004-03-09 07:50 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Try to remove warning + +2004-03-08 22:24 andy + + * Source/cmInstallTargetsCommand.h: ENH: Add comment about + RUNTIME_DIRECTORY + +2004-03-08 19:05 andy + + * Source/: cmConfigureFileCommand.cxx, cmMakefile.cxx, + cmMakefile.h: ENH: Move implementation of configure_file to + cmMakefile, so that other classes can use it + +2004-03-04 10:05 king + + * Source/cmStringCommand.cxx, Source/cmStringCommand.h, + Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/InputFile.h.in: ENH: Added STRING(CONFIGURE + ...) command. + +2004-03-03 18:18 king + + * Source/: cmConfigureFileCommand.cxx, cmMakefile.cxx, + cmMakefile.h: ENH: Moved variable and #cmakedefine replacement + from cmConfigureFileCommand.cxx to a ConfigureString method on + cmMakefile. This will give other commands access to the + configuration code. + +2004-02-29 15:13 andy + + * Tests/COnly/CMakeLists.txt: ERR: Too much commits + +2004-02-29 15:13 andy + + * Source/cmMakefile.cxx, Tests/COnly/CMakeLists.txt: ERR: Fix + GetModulesFile + +2004-02-29 14:23 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Handle backticks as + a valid library + +2004-02-29 09:53 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Cleanup and remove + warning + +2004-02-29 09:51 andy + + * Source/cmLocalCodeWarriorGenerator.cxx: ERR: Fix build on Mac + +2004-02-28 18:59 andy + + * Modules/MacOSXBundleInfo.plist.in, + Source/cmAddExecutableCommand.cxx, Source/cmCPluginAPI.cxx, + Source/cmFindPackageCommand.cxx, Source/cmLocalGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmTarget.h: ENH: Styart working on + bundles support and abstract WIN32_EXECUTABLE + +2004-02-24 18:48 andy + + * Source/cmSystemTools.cxx: ERR: Fix crash. We should check output + before appending to it + +2004-02-24 10:05 andy + + * Source/: cmCTest.cxx, cmCTest.h: BUG: CVS update fix. If the CVS + command was not set there was no indication that something went + wrong. Now it will make sure it does. Also start working on + multiple configuration scripts + +2004-02-24 10:04 andy + + * Source/cmSystemTools.cxx: ENH: Put Process execution errors in + output and honor verbosity + +2004-02-23 09:56 andy + + * Source/: cmCTest.cxx, cmLocalGenerator.cxx: ENH: Improve coverage + support and add more verbosity + +2004-02-23 09:54 king + + * Source/kwsys/Directory.cxx: ERR: Merging 1.7->1.9 changes to + CMake 1.8 branch. + +2004-02-23 09:53 king + + * Source/MFCDialog/PathDialog.cpp: ERR: Merging 1.2 -> 1.3 warning + fix to CMake 1.8 branch. + +2004-02-22 22:07 andy + + * Source/: cmCMakeMinimumRequired.h, cmConfigureFileCommand.h, + cmElseCommand.h, cmEndIfCommand.h, cmExecProgramCommand.h, + cmFindFileCommand.h, cmFindLibraryCommand.h, cmFindPathCommand.h, + cmFindProgramCommand.h, cmGetFilenameComponentCommand.h, + cmMakeDirectoryCommand.h, cmRemoveCommand.h, + cmSeparateArgumentsCommand.h, cmWriteFileCommand.h: ENH: Make + more commands scriptable + +2004-02-22 22:06 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: Prevent crash when + deleting the last cache item + +2004-02-22 13:14 andy + + * Source/: cmCPluginAPI.cxx, cmFLTKWrapUICommand.cxx, + cmGetCMakePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.cxx, cmLoadCacheCommand.h, + cmOutputRequiredFilesCommand.h, cmQTWrapCPPCommand.h, + cmQTWrapUICommand.h, cmSetSourceFilesPropertiesCommand.cxx, + cmSourceFilesCommand.cxx, cmUseMangledMesaCommand.h, + cmVTKMakeInstantiatorCommand.cxx, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h, + cmWrapExcludeFilesCommand.cxx: ENH: Cleanups + +2004-02-20 14:46 andy + + * Source/cmake.cxx, Source/cmakemain.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Ok, when doing cmake + -P you should not have to squish filename next to -P, There + should be space between + +2004-02-20 09:25 andy + + * Source/cmCTest.cxx: ENH: Handle wrong library on sun and no + project on visual studio 7 + +2004-02-19 10:33 andy + + * Source/CMakeLists.txt: ENH: Comment out test + +2004-02-19 10:32 andy + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: Cleanup + +2004-02-19 10:29 andy + + * Source/cmIfCommand.h: ENH: Make IF command scriptable + +2004-02-19 10:28 king + + * Docs/cmake-mode.el: BUG: Fixed identification of ( and ) tokens + to avoid finding them in string literals. + +2004-02-19 09:35 andy + + * Source/cmMacroCommand.h: ENH: Macro should be scriptable + +2004-02-19 09:35 andy + + * Source/cmCTest.cxx: ERR: Do not exit when find bad custom files. + +2004-02-17 08:35 hoffman + + * Source/cmDynamicLoader.cxx: BUG: don't crash when loading a + module that does not exist + +2004-02-16 10:57 martink + + * Source/MFCDialog/PathDialog.cpp: shut up unfixable warning + +2004-02-16 10:48 hoffman + + * Source/: cmConfigure.cmake.h.in, cmDynamicLoader.cxx: ENH: use + cmake variables for cmDynamicLoader to figure out library prefix + and extensions + +2004-02-16 09:50 hoffman + + * Modules/Platform/Windows-gcc.cmake, Source/cmDynamicLoader.cxx: + BUG: fix mingw module load tests + +2004-02-14 16:55 hoffman + + * Modules/Platform/Windows-gcc.cmake: shared modules are not linked + so do not use lib prefix + +2004-02-13 10:51 hoffman + + * Modules/Platform/Windows-gcc.cmake, Source/kwsys/SystemTools.cxx: + ENH: change mingw to use libfoo.dll instead of foo.dll since it + can link to them + +2004-02-12 21:44 andy + + * Source/cmFileCommand.cxx: ENH: Add DESTDIR support + +2004-02-12 13:38 king + + * Source/kwsys/Directory.cxx: ERR: Fixed use of _findfirst for MSVC + 6. + +2004-02-12 11:23 martink + + * Source/kwsys/Directory.cxx: fix incorrect signature for findfirst + +2004-02-12 09:13 hoffman + + * Source/kwsys/SystemTools.cxx, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: Fix install test fail on + mingw + +2004-02-12 08:58 andy + + * Source/kwsys/SystemTools.cxx: BUG: Like cygwin, mingw does not + produce .lib file for shared libraries, so search for dll when + searching for library + +2004-02-11 10:56 andy + + * Source/cmCTest.cxx: ERR: Remove warning + +2004-02-11 08:28 andy + + * Source/kwsys/SystemTools.cxx, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: On Cygwin shared + libraries have only .dll file no .lib file, so when finding + library on cygwin, search also for .dll. Also fix SimpleInstall + test on cygwin + +2004-02-10 15:53 andy + + * Source/cmCTest.cxx: ERR: Use filepath followed by filename not + another filepath + +2004-02-10 15:51 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add logging of tests while + running. This way you can actually see the output as it goes + +2004-02-09 16:40 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Some cleanup and try to fix + Visual Studio builds + +2004-02-09 15:34 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: -l or whatever + should be at beginning of line. + +2004-02-09 11:33 andy + + * Source/CMakeLists.txt, Tests/SimpleInstall/inst.cxx, + Tests/SimpleInstallS2/inst.cxx: ENH: Some systems do not handle + spaces in the path + +2004-02-08 20:08 andy + + * Source/CMakeLists.txt, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Install stage2 to + handle runtime problem + +2004-02-08 13:23 andy + + * Source/cmCTest.cxx: ENH: Attempt to support tests in funky + subdirectories + +2004-02-08 12:04 andy + + * Source/CMakeLists.txt, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Add second part of + SimpleInstall + +2004-02-06 16:43 king + + * Source/cmGlob.cxx: BUG#480: Merging 1.10->1.11 changes to 1.8 + branch. + +2004-02-06 15:26 andy + + * Source/cmGlob.cxx: ENH: When nor specifying full path, make sure + it actually works, on broken filesystems fix case of files. + +2004-02-06 15:18 andy + + * Source/cmFileCommand.cxx: ENH: Handle script mode + +2004-02-06 13:47 andy + + * Source/: cmEndForEachCommand.h, cmForEachCommand.h, + cmStringCommand.h: ENH: Make more commands scriptable + +2004-02-06 10:49 andy + + * Modules/FindJNI.cmake: ENH: Better finding of JNI + +2004-02-05 10:12 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ERR: Fix test on windows with + network paths + +2004-02-04 09:42 berk + + * Tests/: SimpleInstall/foo.c, SimpleInstall/foo.h, + SimpleInstall/inst.cxx, SimpleInstallS2/foo.c, + SimpleInstallS2/foo.h, SimpleInstallS2/inst.cxx: ENH: Fix test on + HP-UX + +2004-02-03 11:23 andy + + * Source/cmFileCommand.cxx: ENH: Fix support for debug postfix + +2004-02-03 10:53 andy + + * Source/: cmFileCommand.cxx, cmLocalGenerator.cxx, cmSetCommand.h: + ENH: Add support for install postfix + +2004-02-03 10:25 andy + + * Source/cmLocalGenerator.cxx: ENH: Cleanup output + +2004-02-03 09:26 andy + + * Source/cmLocalUnixMakefileGenerator.cxx, + Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstallS2/CMakeLists.txt: ENH: Fix ADD_DEPENDENCIES + on Unix makefiles and fix SimpleInstall test not to link the + module + +2004-02-02 18:23 andy + + * Tests/: SimpleInstall/CMakeLists.txt, + SimpleInstallS2/CMakeLists.txt: ENH: Make test work on windows + +2004-02-02 18:23 andy + + * Source/cmCTest.cxx: ENH: Propagate build type + +2004-02-01 16:48 andy + + * Tests/: SimpleInstall/lib2.h, SimpleInstall/lib3.h, + SimpleInstallS2/lib2.h, SimpleInstallS2/lib3.h: ENH: Fix exports + +2004-02-01 12:53 andy + + * Source/CMakeLists.txt, Tests/SimpleInstall/CMakeLists.txt, + Tests/SimpleInstall/foo.c, Tests/SimpleInstall/foo.h, + Tests/SimpleInstall/inst.cxx, Tests/SimpleInstall/lib1.cxx, + Tests/SimpleInstall/lib1.h, Tests/SimpleInstall/lib2.cxx, + Tests/SimpleInstall/lib2.h, Tests/SimpleInstall/lib3.cxx, + Tests/SimpleInstall/lib3.h, Tests/SimpleInstallS2/CMakeLists.txt, + Tests/SimpleInstallS2/foo.c, Tests/SimpleInstallS2/foo.h, + Tests/SimpleInstallS2/inst.cxx, Tests/SimpleInstallS2/lib1.cxx, + Tests/SimpleInstallS2/lib1.h, Tests/SimpleInstallS2/lib2.cxx, + Tests/SimpleInstallS2/lib2.h, Tests/SimpleInstallS2/lib3.cxx, + Tests/SimpleInstallS2/lib3.h: ENH: Add install test + +2004-01-29 10:29 hoffman + + * Source/cmCTest.cxx: BUG: keep output + +2004-01-29 09:01 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: remove depend on + CMakeCache for rebuild_cache target to avoid double rebuild cache + +2004-01-28 13:17 hoffman + + * Source/cmCTest.cxx: BUG: After running builtin ctest, go back to + the original directory + +2004-01-28 11:22 andy + + * Source/cmLocalGenerator.cxx: ERR: Remove cout + +2004-01-28 10:59 king + + * Source/kwsys/ProcessWin32.c: BUG: Corrected detection of + exceptional exit code. + +2004-01-28 10:59 king + + * Source/kwsys/testProcess.c: ENH: Added exception string to + abnormal termination report. + +2004-01-28 09:47 martink + + * Source/cmCTest.cxx: Including exception string in test's error + output. + +2004-01-28 08:11 andy + + * Source/cmFileCommand.cxx: ERR: Remove warning about unused + variable + +2004-01-27 17:12 hoffman + + * Source/cmaketest.cxx: remove old file + +2004-01-27 17:12 hoffman + + * Source/cmCTest.cxx: ENH: add a dynamic loader flush cache + +2004-01-27 17:11 andy + + * Source/cmCTest.cxx: ENH: Only display the precontext or + postcontext up to the next or previous warning or error + +2004-01-27 14:51 hoffman + + * Source/cmSystemTools.cxx: BUG: fix FMM + +2004-01-27 12:37 andy + + * Source/: cmFileCommand.cxx, cmInstallTargetsCommand.cxx, + cmLocalGenerator.cxx, cmLocalGenerator.h, cmTarget.h, + MFCDialog/CMakeLists.txt: ENH: Make install on windows seems to + work now + +2004-01-27 09:53 andy + + * Source/cmFileCommand.cxx: ERR: Fix build on Mingw. Looks like + Mingw is more like visual studio... Thanks Fred Wheeler + +2004-01-27 09:42 martink + + * Source/cmCTest.cxx: fix for backup restore + +2004-01-27 09:05 andy + + * Source/cmFileCommand.cxx: ERR: And yet another set of constants + for file permissions + +2004-01-27 09:05 andy + + * Source/: cmStandardIncludes.h, cmSystemTools.h: ERR: Properly + handle mode_t on borland + +2004-01-26 17:52 andy + + * Source/cmStandardIncludes.h: ERR Fix borland + +2004-01-26 16:29 andy + + * Source/cmLocalGenerator.cxx: BUG: Fix for spaces in path + +2004-01-26 16:24 andy + + * Source/: cmFileCommand.cxx, cmLocalGenerator.cxx: ENH: Several + windows bugs and fixes + +2004-01-26 16:05 andy + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: Add unix style + install in file command + +2004-01-26 15:50 andy + + * Source/: cmConfigureFileCommand.cxx, cmSystemTools.cxx, + cmSystemTools.h: ENH: Preserve permissions when copying files + +2004-01-26 15:03 andy + + * Source/: cmStandardIncludes.h, cmSystemTools.cxx: ERR: Fix build + problems on Visual Studio 6 + +2004-01-26 14:55 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add code for + setting and getting permissions + +2004-01-26 14:41 andy + + * Source/: cmCTest.cxx, cmSystemTools.cxx: ENH: Improve calling of + RunSingle command and fix compile error + +2004-01-26 14:00 hoffman + + * Source/cmSystemTools.cxx: ENH: forgot return value + +2004-01-26 13:57 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add support for + CTestCustom.ctest, which modifies some behavior of ctest + +2004-01-26 13:32 hoffman + + * Source/: cmCTest.cxx, cmGlobalGenerator.cxx, cmSystemTools.cxx, + cmSystemTools.h, cmake.cxx, cmake.h: BUG: fix put/get env + problems + +2004-01-26 13:32 hoffman + + * Source/kwsys/ProcessWin32.c: ENH: fix for build on cygwin mingw + +2004-01-25 19:30 andy + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h: ERR: Fix std:: + namespace + +2004-01-25 19:25 andy + + * Source/: cmGlobalGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h: ENH: Start adding new installation framework + +2004-01-24 12:52 king + + * Tests/Jump/Executable/CMakeLists.txt: BUG: Due to backward + ordering, Visual Studio GUIs need the link directories for the + libraries the first time. + +2004-01-23 15:17 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: .lib from a .dll + should go in m_LibraryOutputPath not m_ExecutableOutputPath + +2004-01-23 13:43 hoffman + + * Tests/Jump/Library/Shared/CMakeLists.txt: BUG: libdir was set + wrong on windows + +2004-01-23 13:43 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: jump over feature + was not working for windows + +2004-01-23 13:19 andy + + * DartConfig.cmake: ENH: Fix url + +2004-01-23 13:01 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for debug + flags into project files + +2004-01-23 13:01 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: more fixes for + relative path stuff + +2004-01-23 12:46 andy + + * DartConfig.cmake: ENH: Add nightly reporting + +2004-01-23 12:40 hoffman + + * Modules/CMakeDetermineCCompiler.cmake: ENH: use CFLAGS for + testing for gnu + +2004-01-23 11:26 andy + + * DartConfig.cmake: ENH: More continuous e-mail stuff + +2004-01-23 11:22 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: convert the .o + files to not have ./ + +2004-01-23 09:54 king + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: BUG: Fix to build rule generation + with relative paths. + +2004-01-23 09:48 king + + * DartConfig.cmake: ENH: Improving CMake continuous dashboards. + Sending continuous email for all kinds of failures. + +2004-01-23 09:44 martink + + * Source/: cmCTest.cxx, cmCTest.h: fixes to backup restore options + +2004-01-23 08:53 king + + * Source/cmLocalGenerator.cxx: STYLE: Deleted trailing whitespace. + +2004-01-23 08:51 king + + * Source/CMakeLists.txt: ERR: Fixed project name for Jump tests. + +2004-01-22 14:44 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c: ERR: Fixed function + prototypes with zero arguments to be C-style. + +2004-01-22 11:16 andy + + * Source/kwsys/ProcessUNIX.c: BUG: If working directory does not + exists, exit + +2004-01-22 11:10 andy + + * Source/cmCTest.cxx: BUG: If at least one test fails, the percent + cannot be greater than 99 + +2004-01-22 10:54 king + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: BUG: Fix jump-over-and-build for + missing libraries when the relative path to the library is + different between the source and destination of the jump. + +2004-01-22 10:51 king + + * Tests/Jump/Library/: CMakeLists.txt, jumpShared.cxx, + jumpStatic.cxx, Shared/CMakeLists.txt, Shared/jumpShared.cxx, + Static/CMakeLists.txt, Static/jumpStatic.cxx: ENH: Improved test + to have a different relative path name for libraries between the + Executable and Library directories. + +2004-01-22 10:36 king + + * Source/CMakeLists.txt: ENH: Added JumpWithLibOut and JumpNoLibOut + to test whether jumping over to build a missing library works. + +2004-01-22 10:30 king + + * Source/: cmake.cxx, kwsys/SystemTools.cxx: BUG: + CopyFileIfDifferent should return success if the files did not + differ or if the copy succeeded. It should return failure only + if the files were different and the copy failed. + +2004-01-22 10:23 king + + * Tests/Jump/Library/CMakeLists.txt: ERR: Fixed post-build rule to + copy shared library correctly. + +2004-01-22 09:56 king + + * Tests/Jump/: CMakeLists.txt, Executable/CMakeLists.txt, + Executable/jumpExecutable.cxx, Library/CMakeLists.txt, + Library/jumpShared.cxx, Library/jumpStatic.cxx: ENH: Adding test + for jumping over and building a missing library. + +2004-01-21 18:39 andy + + * Modules/CMakeDefaultMakeRuleVariables.cmake: ENH: This will + probably break some obscure version of gcc, but until then, + everybody doing profiling will be happy + +2004-01-21 15:55 king + + * Source/cmSystemTools.cxx: BUG: ::Stdout method should flush cout + after writing data. + +2004-01-21 15:12 king + + * Modules/CMakeTestCCompiler.cmake: BUG#530: Merging 1.9 -> 1.10 + changes to CMake 1.8 branch. + +2004-01-21 15:11 king + + * Modules/CMakeTestCCompiler.cmake: BUG#530: Using #error to report + a nice error message if the C compiler is set to a C++ compiler. + +2004-01-21 15:08 king + + * Modules/TestBigEndian.c: BUG: Use return statement instead of + exit. + +2004-01-21 15:07 martink + + * Source/kwsys/ProcessUNIX.c: merge from the main tree + +2004-01-21 14:43 king + + * Source/cmCTest.cxx: BUG: empty method on std string is a test, + and does not set the string to empty. + +2004-01-21 14:27 hoffman + + * Source/cmCTest.cxx: BUG: fix leak + +2004-01-21 14:06 king + + * Source/cmCTest.cxx: BUG: Fixed buffer size in MakeXMLSafe. + +2004-01-21 13:38 andy + + * Source/kwsys/ProcessUNIX.c: BUG: Fix valgrind error. If working + directory is not set do not do chdir + +2004-01-21 09:49 hoffman + + * Source/cmCTest.cxx: BUG: if a test is not found, it should fail + +2004-01-21 09:25 hoffman + + * Source/cmCTest.cxx: ENH: make sure tests that are not run fail, + and make sure that it does not try to run directories with the + same name as tests + +2004-01-20 14:36 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: bug fix for IBM + broken xlC 6.0.0.4 compiler + +2004-01-20 14:35 hoffman + + * Source/cmSystemTools.cxx: ENH: dont do relative paths when + nothing is relative + +2004-01-19 09:30 king + + * Source/kwsys/testProcess.c: ERR: Fixed unused argument warning. + +2004-01-19 09:30 king + + * Source/kwsys/CMakeLists.txt: ERR: Must include Dart module after + PROJECT command. + +2004-01-17 12:47 king + + * Source/kwsys/CMakeLists.txt: ENH: Added Dart testing + configuration. + +2004-01-17 12:46 king + + * Source/kwsys/testProcess.c: ENH: Added a recursive process + execution test. + +2004-01-16 14:00 martink + + * Source/cmCTest.cxx: fix so that ctest is run even with bad cmake + result + +2004-01-15 17:07 andy + + * Source/cmCTest.cxx: ENH: Handle spaces in the dart output of test + +2004-01-15 14:04 king + + * Modules/Platform/Windows-bcc32.cmake: BUG#518: Merging 1.30->1.31 + changes to CMake 1.8 branch. + +2004-01-15 13:57 andy + + * Modules/Platform/Windows-bcc32.cmake: ENH: Fix typos about + copying exe flags to shared flags and to modules. Bug #518 - On + borland, initial flags for bulding module are wrong + +2004-01-15 08:50 king + + * Source/cmSystemTools.cxx: ENH: Added more error state checks to + RunSingleCommand. + +2004-01-13 12:28 andy + + * Source/cmCTest.cxx: ERR: Do not ignore argument after nocmake + +2004-01-13 11:22 hoffman + + * Source/: cmCTest.cxx, cmCTest.h: ENH: add no cmake option + +2004-01-13 09:05 king + + * Modules/CMakeDetermineCCompiler.cmake: BUG: Merging 1.23->1.25 + changes to 1.8 branch for correct setting of MINGW flag on cygwin + with -mno-cygwin flag. + +2004-01-13 09:01 king + + * Modules/FindTclsh.cmake: Merging 1.6->1.7 changes to 1.8 branch + to improve automatic finding of Tcl. + +2004-01-13 09:01 king + + * Modules/FindTCL.cmake: Merging 1.30->1.31 changes to 1.8 branch + to improve automatic finding of Tcl. + +2004-01-13 09:00 hoffman + + * Modules/CMakeDetermineCCompiler.cmake: BUG: use the flags when + testing for type of gnu compiler + +2004-01-12 16:16 hoffman + + * Source/kwsys/SystemTools.cxx: BUG: try to get access to work on + borland + +2004-01-12 13:53 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: use access over stat for + performance + +2004-01-12 13:30 andy + + * Source/: cmCTest.cxx, kwsys/SystemTools.cxx: ENH: Only look for + executable until found + +2004-01-12 11:07 hoffman + + * Source/MFCDialog/PropertyList.cpp: BUG: make sure property list + is cleared between cache loadings + +2004-01-09 15:57 barre + + * Modules/: FindTCL.cmake, FindTclsh.cmake: ENH: make it a bit + smarter at finding stuff: now you need only to set *ONE* of + (TCL|TK)_INCLUDE_PATH, (TCL|TK)_LIBRARY, TCL_TCLSH and the rest + will be found. + +2004-01-09 14:14 hoffman + + * Source/cmCTest.cxx: ENH: clean up the output some more + +2004-01-09 14:05 hoffman + + * Source/cmCTest.cxx: ENH: clean up output + +2004-01-09 13:35 hoffman + + * Source/: cmCTest.cxx, cmCTest.h: ENH: add an ability to specify a + build run directory + +2004-01-09 12:35 hoffman + + * Source/cmCTest.cxx: ENH: clean up output + +2004-01-09 12:28 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: add a local target + for libraries as well as executables + +2004-01-09 11:23 king + + * CMakeLists.txt, Modules/CMakeDetermineSystem.cmake, + Modules/CMakeFindFrameworks.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, Modules/Dart.cmake, + Modules/FindOpenGL.cmake, Modules/FindPythonLibs.cmake, + Modules/FindQt.cmake, Modules/FindTCL.cmake, + Modules/Platform/Windows-cl.cmake, Source/cmCTest.cxx, + Source/cmCreateTestSourceList.cxx, + Source/cmGlobalCodeWarriorGenerator.cxx, + Source/cmGlobalGenerator.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmLinkLibrariesCommand.cxx, + Source/cmLocalCodeWarriorGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmOptionCommand.cxx, Source/cmQTWrapCPPCommand.cxx, + Source/cmSiteNameCommand.cxx, Source/cmStringCommand.cxx, + Source/cmTarget.cxx, Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTryCompileCommand.cxx, Source/cmTryCompileCommand.h, + Source/kwsys/SystemTools.cxx, Utilities/Release/cmake_release.sh, + Utilities/Release/config_Linux, + Utilities/Release/cygwin-package.sh.in: ENH: Merged Release-1-8-2 + -> Release-1-8-3 changes to CMake-LatestRelease branch. + +2004-01-09 10:13 king + + * Source/cmCTest.cxx: BUG: Updated warning regex to match in more + cases. + +2004-01-09 08:54 hoffman + + * Source/cmCTest.cxx: BUG: if the build fails then the test fails + +2004-01-09 07:22 hoffman + + * Source/CMakeLists.txt: BUG: fix arguments to wxwindows test + +2004-01-08 15:54 hoffman + + * Source/MFCDialog/CMakeCommandLineInfo.cpp: BUG: make sure + relative paths in command line options are expanded + +2004-01-08 09:59 hoffman + + * Source/: cmCTest.cxx, cmGlobalGenerator.cxx, cmake.cxx: BUG: make + sure null terminator is in the right place for putenv static char + array + +2004-01-08 09:23 king + + * Source/cmake.cxx: BUG: Fix environment variable setting. + +2004-01-08 09:19 king + + * Source/cmGlobalGenerator.cxx: BUG: Fix environment variable + setting. + +2004-01-08 08:19 hoffman + + * Source/: cmCTest.cxx: ENH: remove warning + +2004-01-07 16:24 hoffman + + * Source/cmCTest.cxx: temp remove of optimization internal ctest + use putenv causing trouble on cygwin + +2004-01-07 16:15 hoffman + + * Source/cmCTest.cxx: ENH: print errors when they are there + +2004-01-07 14:22 hoffman + + * Source/cmCTest.cxx: BUG: initialize ivar + +2004-01-07 13:27 martink + + * Source/cmCreateTestSourceList.cxx: merge fix from main tree + +2004-01-07 13:20 hoffman + + * Source/cmCTest.cxx: BUG: fix command line parser bug + +2004-01-07 12:50 hoffman + + * Source/cmCTest.cxx: ENH: remove warning + +2004-01-07 11:31 hoffman + + * Source/cmCTest.cxx: ENH: remove warnings + +2004-01-07 11:24 hoffman + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, + cmSystemTools.cxx, cmSystemTools.h, cmWin32ProcessExecution.cxx, + cmake.cxx, ctest.cxx: ENH: add new feature to ctest so that it + can cmake, build and run a test executable + +2004-01-07 09:22 king + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: Fixed crash in + extern MSVC project support. + +2004-01-07 09:22 hoffman + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: fix crash in + external dsp include + +2004-01-07 09:10 king + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: Fixed crash in + extern MSVC project support. + +2004-01-07 09:08 hoffman + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: fix crash + +2004-01-07 09:07 king + + * Source/cmCTest.cxx: BUG: Added missing Generator attributes to + submitted XML files. + +2004-01-07 08:37 martink + + * Modules/Dart.cmake: merge change from main tree + +2004-01-06 19:13 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: ENH: Improve notes + support (now you can specify them with the rest of the command + line), improve reading of configuration file (now it actually + rereads configuration file after running + update/configure/build...). Remember the model + (nightly/experimental) across runs + +2004-01-06 16:56 king + + * Source/kwsys/: kwsys_std.h.in, kwsys_std_fstream.h.in, + kwsys_std_iosfwd.h.in, kwsys_std_iostream.h.in, + kwsys_std_sstream.h.in: ENH: Removing empty source file now that + makefile dependencies should have updated. + +2004-01-06 16:18 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx: + ENH: fix for hp make and relative paths never have targets with a + ./ at the start of the name + +2004-01-06 15:06 king + + * Utilities/Release/config_Linux: Fixed build for new machine. + +2004-01-06 13:21 king + + * Utilities/Release/config_Linux: ENH: Updated configuration for + new build location. + +2004-01-05 16:29 martink + + * Source/cmGlob.cxx: fix for glob command + +2004-01-05 15:30 king + + * Source/cmFindPackageCommand.cxx: BUG: Fixed typo in error + message. + +2004-01-05 13:20 king + + * Utilities/Release/cmake_release.sh: ENH: Updated TAG for 1.8.3 + release. + +2004-01-05 13:19 king + + * CMakeLists.txt, CMakeSystemConfig.txt.in, + CMakeWindowsSystemConfig.txt, bootstrap, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeImportBuildSettings.cmake, Modules/CMakeLists.txt, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, Modules/CMakeTestGNU.c, + Modules/CheckTypeSize.cmake, Modules/CheckVariableExists.cmake, + Modules/Dart.cmake, Modules/FindGTK.cmake, Modules/FindJNI.cmake, + Modules/FindJava.cmake, Modules/FindLATEX.cmake, + Modules/FindPythonLibs.cmake, Modules/FindTCL.cmake, + Modules/FindTclsh.cmake, Modules/FindThreads.cmake, + Modules/FindWish.cmake, Modules/FindwxWindows.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForSTDNamespace.cmake, Modules/Platform/AIX.cmake, + Modules/Platform/BSDOS.cmake, Modules/Platform/Darwin.cmake, + Modules/Platform/FreeBSD.cmake, Modules/Platform/HP-UX.cmake, + Modules/Platform/IRIX.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/MP-RAS.cmake, Modules/Platform/NetBSD.cmake, + Modules/Platform/OSF1.cmake, Modules/Platform/OpenBSD.cmake, + Modules/Platform/RISCos.cmake, Modules/Platform/SCO_SV.cmake, + Modules/Platform/SINIX.cmake, Modules/Platform/SunOS.cmake, + Modules/Platform/True64.cmake, Modules/Platform/ULTRIX.cmake, + Modules/Platform/UNIX_SV.cmake, Modules/Platform/UnixWare.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows.cmake, Modules/Platform/Xenix.cmake, + Modules/Platform/gcc.cmake, Source/CMakeLists.txt, + Source/cmAddCustomTargetCommand.cxx, Source/cmAddTestCommand.cxx, + Source/cmCPluginAPI.h, Source/cmCTest.cxx, Source/cmCTest.h, + Source/cmCacheManager.cxx, Source/cmCommands.cxx, + Source/cmDynamicLoader.cxx, Source/cmFindFileCommand.h, + Source/cmFindLibraryCommand.h, Source/cmFindPathCommand.h, + Source/cmFindProgramCommand.h, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmLoadCommandCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmQTWrapCPPCommand.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTryCompileCommand.h, Source/cmWin32ProcessExecution.cxx, + Source/cmake.cxx, Source/cmakemain.cxx, Source/cmakewizard.cxx, + Source/cmakewizard.h, Source/CTest/cmCTestSubmit.cxx, + Source/CursesDialog/ccmake.cxx, Source/MFCDialog/CMakeSetup.cpp, + Source/WXDialog/CMakeLists.txt, Source/kwsys/ProcessUNIX.c, + Source/kwsys/ProcessWin32.c, Source/kwsys/SystemTools.cxx, + Templates/EXEWinHeader.dsptemplate, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Utilities/CMakeLists.txt, Utilities/Release/cmake_release.sh, + Utilities/Release/config_AIX, + Utilities/Release/config_CYGWIN_NT-5.1, + Utilities/Release/config_Darwin, Utilities/Release/config_HP-UX, + Utilities/Release/config_IRIX64, Utilities/Release/config_Linux, + Utilities/Release/config_OSF1, Utilities/Release/config_SunOS, + Utilities/Release/cygwin-package.sh.in: ENH: Merging CMake + Release-1-8-2 to CMake-LatestRelease. + +2004-01-05 12:58 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG#416: Merging + 1.49->1.50 changes to 1.8 branch. + +2004-01-05 12:53 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fix for long lines with + post build rules + +2004-01-05 11:22 king + + * Source/cmQTWrapCPPCommand.cxx: BUG#421: Merging 1.16->1.17 + changes to 1.8 branch. + +2004-01-05 11:13 andy + + * Source/cmQTWrapCPPCommand.cxx, Tests/Wrapping/CMakeLists.txt, + Tests/Wrapping/vtkTestMoc.h: BUG: Fix dependency to input file + for QT_WRAP_CPP. Bug #421 - QT_WRAP_CPP + +2004-01-05 11:02 king + + * Source/kwsys/kwsysPlatformCxxTests.cmake: ERR: Removed use of + FILE command and using WRITE_FILE instead. We would still like + CMake 1.6 to be able to build CMake CVS, and kwsys is used. + +2004-01-05 10:26 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: reduce flicker + +2004-01-02 17:24 hoffman + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + PropertyList.cpp, PropertyList.h: ENH: fix bug with advanced + items loosing edit and do a better job sorting + +2004-01-02 10:23 martink + + * Modules/Dart.cmake: fix for multiple nexted projects + +2003-12-31 08:56 andy + + * bootstrap: ERR: Fix bootstrap for the changes in kwsys + +2003-12-30 17:15 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cxx, kwsys_ios_fstream.h.in, + kwsys_ios_iosfwd.h.in, kwsys_ios_iostream.h.in, + kwsys_ios_sstream.h.in: ENH: Renamed KWSYS_IOS_HAVE_* macros to + KWSYS_IOS_USE_* to be more readable in the C++ sources. + +2003-12-30 16:23 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c, + test1.cxx: ENH: Added GetExceptionString method to provide an + error description when GetState returns Exception. + +2003-12-30 14:33 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Removed stray + debugging statement left from merge. + +2003-12-30 13:40 king + + * Source/kwsys/SystemTools.cxx: ERR: Use of kwsys_stl was merged + from main tree. The CMake 1.8 branch still uses kwsys_std. + +2003-12-30 13:39 king + + * Source/kwsys/SystemTools.cxx: BUG: Merging 1.30->1.31 changes to + CMake 1.8 branch. + +2003-12-30 13:38 king + + * Source/kwsys/SystemTools.cxx: BUG: CollapseFullPath was calling + SplitProgramPath before changing the working directory to + in_base. + +2003-12-30 10:26 king + + * Source/cmSystemTools.cxx: BUG: Do not call + cmsysProcess_GetErrorString unless GetState returns State_Error. + +2003-12-30 08:41 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx: + BUG: borland make treats ./target and target as different also + convert to outputpathrelative may get passed a quoted path + +2003-12-30 07:55 andy + + * Source/cmCTest.cxx: ENH: Remove warnings about unused variables + +2003-12-29 16:35 martink + + * Source/cmEnableTestingCommand.h: sets variable now + +2003-12-29 16:27 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: only generate test + target when enabled + +2003-12-29 16:27 martink + + * Source/cmEnableTestingCommand.cxx: sets variable now + +2003-12-29 16:19 king + + * Modules/: CMakeFindFrameworks.cmake, FindPythonLibs.cmake, + FindTCL.cmake: BUG#423: Merged fix to 1.8 branch. + +2003-12-29 16:18 king + + * Modules/: CMakeFindFrameworks.cmake, FindPythonLibs.cmake, + FindTCL.cmake: BUG#423: Fixed search for frameworks on OSX. + +2003-12-29 16:15 king + + * Source/cmSiteNameCommand.cxx: BUG#407: Merged fix to 1.8 branch. + +2003-12-29 16:10 andy + + * Source/cmSiteNameCommand.cxx: ENH: Do not use nslookup. All we + really care is hostname. If somebody wants something fancy, just + set it yourself. Fixes Bug #407 - nslookup is being deprecated + for Red Hat and Fedora distributions + +2003-12-29 15:37 king + + * Source/cmOptionCommand.cxx: BUG#408: Merged fix to 1.8 branch. + +2003-12-29 15:26 andy + + * Source/cmOptionCommand.cxx: ERR: Fix problems with OPTION and -D + on command line. Fix Bug #408 - Using -D without a type does not + always work + +2003-12-29 15:15 king + + * Modules/CMakeDetermineSystem.cmake: BUG#426: Merged fix to 1.8 + branch. + +2003-12-29 15:14 king + + * Modules/FindQt.cmake: BUG#425: Merged fix to 1.8 branch. + +2003-12-29 14:55 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx: + BUG: use ./ infront of the current directory + +2003-12-29 14:26 andy + + * Modules/CMakeDetermineSystem.cmake: ERR: On systems where uname + does not support -p, try -m. Fixes Bug #426 - + CMAKE_SYSTEM_PROCESSOR unknown and inconsistent + +2003-12-29 14:19 andy + + * Modules/FindQt.cmake: ENH: Add QT_ASSISTANTCLIENT_LIBRARY + support. Fixes Bug #425 - Suggsted mod to FindQt.cmake to handle + qassistantclient.lib + +2003-12-29 13:41 king + + * Source/cmGlobalGenerator.cxx: BUG#427: Merged fix to 1.8 branch. + +2003-12-29 13:37 king + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmLinkLibrariesCommand.cxx, + cmLocalCodeWarriorGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmTarget.cxx, + cmTargetLinkLibrariesCommand.cxx: BUG#445: Merging fix to 1.8 + branch. + +2003-12-29 13:32 king + + * Source/cmStringCommand.cxx: BUG#452: Merging 1.10->1.11 changes + to 1.8 branch. + +2003-12-29 13:31 king + + * Source/cmStringCommand.cxx: BUG#452: Fix to argument checking for + TOUPPER and TOLOWER subcommands. + +2003-12-29 13:26 king + + * Modules/FindOpenGL.cmake: BUG: Added missing include path to + search. + +2003-12-29 13:14 king + + * Source/kwsys/SystemTools.cxx: ERR: Removed ftime ambiguity + created by poor C++ standard headers provided by Borland 5.5. + +2003-12-26 15:02 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: ENH: Add option to + submit notes. Implements Bug #465 - Add notes support to CTest + +2003-12-26 15:00 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: BUG: For + consistency, use cmStdString. Also, there was a bug in + SplitString which make it lose the first character. + +2003-12-24 15:02 andy + + * Source/cmLocalGenerator.cxx: BUG: On Windows network paths do not + really work as regular paths, so when the binary directory is on + the network, we will not support relative paths + +2003-12-24 13:17 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: use cd pwd trick + for path for libnames + +2003-12-24 10:51 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: use full paths via + pwd for -L paths on unix shells + +2003-12-24 10:07 kmorel + + * Source/kwsys/kwsys_ios_iosfwd.h.in: Fixed a problem where + ifstream was not the same as kwsys_ios::ifstream on MSVC 6.0. + +2003-12-24 09:19 andy + + * Source/cmCTest.cxx: ENH: Fix coverage to actually work and add + support for .NoDartCoverage + +2003-12-23 15:01 hoffman + + * Source/: cmLocalGenerator.cxx, cmTryCompileCommand.cxx, + cmake.cxx, cmake.h: BUG: keep more of the case information + +2003-12-23 13:31 hoffman + + * Source/cmLocalGenerator.cxx: BUG: fix for vtk build + +2003-12-23 11:03 king + + * bootstrap: ENH: Merging changes from KWSys-IOS-bp to + KWSys-IOS-b2t-1-mp to main tree. This corresponds to the same + merge in KWSys. Fixes for bootstrapping on cygwin are also + included. + +2003-12-23 11:03 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, Directory.cxx, + RegularExpression.cxx, RegularExpression.hxx.in, SystemTools.cxx, + SystemTools.hxx.in, kwsysPlatformCxxTests.cmake, + kwsysPlatformCxxTests.cxx, kwsys_ios_fstream.h.in, + kwsys_ios_iosfwd.h.in, kwsys_ios_iostream.h.in, + kwsys_ios_sstream.h.in, kwsys_std.h.in, kwsys_std_fstream.h.in, + kwsys_std_iosfwd.h.in, kwsys_std_iostream.h.in, + kwsys_std_sstream.h.in, kwsys_stl.h.in, test1.cxx, testIOS.cxx: + ENH: Merging changes from KWSys-IOS-bp to KWSys-IOS-b2t-1-mp to + main tree. This introduces separate kwsys_ios and kwsys_stl + macros needed to support all platforms. + +2003-12-23 10:44 king + + * bootstrap: BUG: Fixed 3rd C++ test to use endl correctly. Fixed + incorrect spelling of appropriate. + +2003-12-23 10:39 andy + + * bootstrap: ENH: Some cleanups and attempt to fix cygwin problem + +2003-12-23 10:16 andy + + * bootstrap: ENH: Some cleanups, add settings comment to kwsys + header files. Add proper dependency to kwsys headers + +2003-12-23 09:53 king + + * bootstrap: BUG: Fixed use of KWSYS_IOS_HAVE_SSTREAM test result + for cmConfigure. + +2003-12-23 09:31 king + + * bootstrap: BUG: Moved use of KWSYS_IOS test results to after the + tests are performed. Also cleaned up ordering of some tests. + +2003-12-23 09:17 andy + + * bootstrap: ENH: support new KWSYS with IOS + +2003-12-22 16:21 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmSystemTools.cxx: ENH: add + relative paths to visual studio 6 and 7 project files + +2003-12-22 15:16 hoffman + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + ENH: move relative path to parent generator class + +2003-12-22 14:17 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: make new relative + rpath work with spaces + +2003-12-22 13:59 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: use fullpaths based + on the actual current directory + +2003-12-22 13:15 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: use a full path for + rpath + +2003-12-22 12:24 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h, cmSystemTools.cxx, + cmSystemTools.h, cmake.cxx: ENH: add support for relative paths + in makefiles + +2003-12-22 11:20 king + + * Source/kwsys/: CMakeLists.txt, kwsysPlatformCxxTests.cxx: ENH: + All platform tests are now in kwsysPlatformCxxTests.cxx. This + makes the listfile code much more readable. + +2003-12-20 13:32 king + + * Source/kwsys/: CMakeLists.txt, testIOS.cxx: ENH: Added testIOS + for kwsys_ios testing. + +2003-12-20 13:31 king + + * Source/kwsys/kwsys_ios_sstream.h.in: ERR: Fixed istringstream to + work with MSVC 6 old streams. + +2003-12-20 12:44 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsysPlatformCxxTests.cxx, kwsys_ios_fstream.h.in, + kwsys_ios_iosfwd.h.in, kwsys_ios_iostream.h.in, + kwsys_ios_sstream.h.in: ENH: Shortened and grouped IOS and STL + feature macro names. + +2003-12-19 16:56 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, Directory.cxx, + RegularExpression.cxx, RegularExpression.hxx.in, SystemTools.cxx, + SystemTools.hxx.in, kwsysPlatformCxxTests.cmake, + kwsysPlatformCxxTests.cxx, kwsys_ios_fstream.h.in, + kwsys_ios_iosfwd.h.in, kwsys_ios_iostream.h.in, + kwsys_ios_sstream.h.in, kwsys_std.h.in, kwsys_std_fstream.h.in, + kwsys_std_iosfwd.h.in, kwsys_std_iostream.h.in, + kwsys_std_sstream.h.in, kwsys_stl.h.in, test1.cxx: ENH: Split + kwsys_std into kwsys_ios and kwsys_stl in order to avoid std + namespace pollution and support more platforms. + +2003-12-18 18:04 andy + + * Source/cmCTest.cxx: ENH: Even better. Only replace when path + longer than 20 characters. Also replace parent directory. That + way it will replace for related projects. + +2003-12-18 17:42 andy + + * Source/cmCTest.cxx: ENH: Attempt to cleanup the build output + +2003-12-18 17:36 martink + + * Source/cmCTest.cxx: bug fix + +2003-12-18 13:40 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Remove debug + +2003-12-18 13:17 andy + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalCodeWarriorGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Fix Bug #445 - Same + library in multiple projects can cause problems + +2003-12-18 13:04 andy + + * Source/: cmLinkLibrariesCommand.cxx, + cmLocalUnixMakefileGenerator.cxx, cmTarget.cxx, + cmTargetLinkLibrariesCommand.cxx: BUG: Fix Bug #445 - Same + library in multiple projects can cause problems + +2003-12-17 09:42 andy + + * Modules/Dart.cmake: ENH: Mark things as advanced + +2003-12-17 09:40 andy + + * Source/cmCTest.cxx: ERR: Remove debug + +2003-12-17 09:25 andy + + * Source/cmCTest.cxx: ENH: Add more error regular expressions + +2003-12-17 08:49 king + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: BUG#439: + Merging fix to 1.8 branch. + +2003-12-17 08:45 king + + * Modules/Platform/Windows-cl.cmake: BUG#438: Merging fix to 1.8 + branch. + +2003-12-17 08:36 martink + + * Source/cmCTest.cxx: better ctest driver and return codes + +2003-12-17 08:30 king + + * Source/kwsys/SystemTools.hxx.in: ERR: std -> kwsys_std. + +2003-12-17 08:21 martink + + * Modules/Platform/Windows-cl.cmake: fix in quoting + +2003-12-16 17:30 andy + + * Source/cmCTest.cxx: ENH: Purify support should work now. + +2003-12-16 17:20 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added SetPipeShared method to allow stdout and stderr pipes to be + shared with the parent process. + +2003-12-16 16:19 andy + + * Source/cmCTest.cxx: ENH: Add suppression file support for + valgrind + +2003-12-16 16:19 andy + + * Modules/: Dart.cmake, DartConfiguration.tcl.in: ENH: Add + suppression file + +2003-12-16 15:55 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Added + GetEnv method. + +2003-12-16 15:38 king + + * Source/kwsys/CMakeLists.txt: ENH: Updated copyright. + +2003-12-16 15:37 king + + * Source/kwsys/CMakeLists.txt: ERR: SystemTools now depends on + Directory. + +2003-12-16 14:43 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Several cleanups and + attempt to do purify support + +2003-12-16 14:26 martink + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: is there any + chance thiswill work on all platforms hmmm added removeAdirectory + +2003-12-16 13:18 andy + + * Source/cmCTest.cxx: ENH: Cleanup output + +2003-12-15 18:44 andy + + * Source/cmCTest.cxx: ERR: Fix coverage on gcc 2.95 + +2003-12-15 18:32 andy + + * Source/cmCTest.cxx: ERR: Ok, think before commit... This fixes + two build problems. The missing brace and the std::string + signature is different on gcc 2.95 and gcc 3.3. + +2003-12-15 18:03 andy + + * Source/cmCTest.cxx: ERR: Inner loop used the same counter as + outer. Broke coverage code + +2003-12-15 17:28 andy + + * Source/: cmCTest.cxx, cmCTest.h: ERR: STD fixes + +2003-12-15 17:25 andy + + * Modules/Dart.cmake, Modules/DartConfiguration.tcl.in, + Source/cmCTest.cxx, Source/cmCTest.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/ctest.cxx, + Source/CTest/cmCTestSubmit.cxx, Source/CTest/cmCTestSubmit.h, + Source/CursesDialog/cmCursesPathWidget.cxx: ENH: Add initial + memory check support which works for Valgrind + +2003-12-15 16:30 king + + * Source/kwsys/: Base64.c, Base64.h.in, Configure.h.in, + Configure.hxx.in, Copyright.txt, Directory.cxx, Directory.hxx.in, + EncodeExecutable.c, Process.h.in, ProcessFwd9x.c, ProcessUNIX.c, + ProcessWin32.c, RegularExpression.cxx, RegularExpression.hxx.in, + SystemTools.cxx, SystemTools.hxx.in, kwsysHeaderDump.pl, + kwsysPrivate.h, kwsys_std.h.in, kwsys_std_fstream.h.in, + kwsys_std_iosfwd.h.in, kwsys_std_iostream.h.in, + kwsys_std_sstream.h.in, test1.cxx, testProcess.c: ENH: Updated + copyright. + +2003-12-15 12:56 martink + + * Source/cmCreateTestSourceList.cxx: fix compiler warning + +2003-12-15 12:02 hoffman + + * Source/cmCTest.cxx: ENH: fix for gcc 3.1 + +2003-12-14 13:48 king + + * Source/kwsys/ProcessWin32.c: STYLE: Fixed typo on comment. + +2003-12-14 13:47 king + + * Source/kwsys/ProcessWin32.c: ENH: Using CreateFile with + FILE_FLAG_DELETE_ON_CLOSE to automatically delete the Win9x + forwarding executable even if the parent process crashes. + +2003-12-14 13:44 king + + * Source/kwsys/kwsysPrivate.h: ENH: Added KWSYS_NAMESPACE_STRING + macro. + +2003-12-14 13:03 king + + * Source/kwsys/Configure.h.in: BUG: Fixed dllimport. + +2003-12-13 14:19 king + + * Source/kwsys/ProcessUNIX.c: ERR: Added include of sys/stat.h for + open functions mode bits. + +2003-12-13 14:13 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added SetPipeFile method to allow the process pipeline stdin, + stdout, and stderr to be redirected from/to files. + +2003-12-13 10:36 king + + * Source/kwsys/: ProcessUNIX.c, ProcessWin32.c: ENH: Code is now + robust to New method returning NULL. + +2003-12-12 15:42 king + + * Modules/Platform/IRIX64.cmake: ENH: Added + CMAKE_SHARED_LIBRARY_SONAME_C_FLAG and + CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG settings to enable shared + library version support for SGI. + +2003-12-12 14:44 king + + * Modules/Platform/HP-UX.cmake: ENH: Added + CMAKE_SHARED_LIBRARY_SONAME_FLAG setting to enable shared library + version support for HP-UX. + +2003-12-12 14:34 king + + * Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/Platform/SunOS.cmake, + Source/cmLocalUnixMakefileGenerator.cxx, + Modules/Platform/Linux.cmake: ENH: Using separate + CMAKE_SHARED_LIBRARY_SONAME flags for C and CXX. + +2003-12-12 14:20 king + + * Modules/Platform/SunOS.cmake: ENH: Added + CMAKE_SHARED_LIBRARY_SONAME_FLAG setting to enable shared library + version support for SunOS. + +2003-12-12 09:12 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeCXXCompiler.cmake.in, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake: + ENH: reduce the number of times gnu is tested for + +2003-12-12 08:09 martink + + * Source/cmCTest.cxx: now can do extra updates + +2003-12-11 15:38 hoffman + + * Source/cmGlobalGenerator.cxx: BUG:427 trycompile target must be + exe + +2003-12-11 10:11 hoffman + + * Source/cmTryCompileCommand.cxx: BUG: need a dummy first argument + to cmake + +2003-12-11 08:57 martink + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: fix to + the signature and argument parsing + +2003-12-10 19:47 andy + + * Source/: cmake.cxx, cmakemain.cxx: ENH: Argument for script mode + is -P (process) and take out the automatic script mode + +2003-12-10 08:55 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: BUG: roll back change for + variable used in path + +2003-12-09 14:33 king + + * Modules/FindOpenGL.cmake: ENH: Adding /usr/include/w32api for + OpenGL header search. + +2003-12-09 11:44 king + + * Source/kwsys/SystemTools.cxx: BUG: File comparison on windows + must test the volume serial number as well as the file index. + +2003-12-09 10:33 martink + + * DartConfig.cmake: move start time up one hour + +2003-12-09 09:16 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: ERR: Removed + YY_BREAK statements after return statements because they are + unreachable. + +2003-12-09 09:11 king + + * Source/: cmListFileLexer.c, cmListFileLexer.in.l: ERR: Added + missing static keyword to cmListFileLexerSetToken and + cmListFileLexerAppend definitions. + +2003-12-09 08:32 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: use variables for output + paths + +2003-12-09 08:22 martink + + * Source/cmCTest.cxx: some updates to handle inline cache files and + environment variables + +2003-12-08 18:05 king + + * Source/cmSystemTools.cxx: BUG: Reimplemented ExpandListArguments + to properly handle escaped backslashes that occur right before + semicolons. This is important for lists of paths ending in + backslashes on windows. + +2003-12-08 16:10 martink + + * Source/cmSystemTools.cxx: bug fix to escaped semicolons in + arguments + +2003-12-08 15:05 king + + * Source/cmListFileLexer.in.l: ERR: Fixed comment about how to run + flex to reflect new name of this file. + +2003-12-08 14:20 king + + * Source/: cmListFileLexer.in.l, cmListFileLexer.l: ERR: Renaming + cmListFileLexer.l to cmListFileLexer.in.l to avoid make programs + trying to run lex automatically whn building cmListFileLexer.c. + +2003-12-08 14:11 andy + + * bootstrap: ENH: Fix bootstrap to handle lex parser + +2003-12-08 13:40 king + + * Source/: cmListFileLexer.c, cmListFileLexer.l: ERR: We must + define YY_NO_UNISTD_H to build on windows. + +2003-12-08 13:36 king + + * Source/: CMakeLists.txt, cmListFileCache.cxx, cmListFileCache.h, + cmListFileLexer.c, cmListFileLexer.h, cmListFileLexer.l: ENH: + Using lex-based tokenizer and a simple recursive-descent parser + in place of the old hand-coded parser for CMake listfiles. + +2003-12-08 11:35 king + + * Source/kwsys/CMakeLists.txt: STYLE: Removed trailing whitespace. + +2003-12-08 11:31 king + + * Source/cmake.cxx: ENH: Improved error messages when source tree + does not have a CMakeLists.txt file. No matter how many cases we + check, there always seems to be a user that finds a case that + gives a confusing error message... + +2003-12-08 11:23 andy + + * Modules/Dart.cmake, Modules/DartConfiguration.tcl.in, + Source/cmCTest.cxx: ENH: Improve coverage on systems with + multiple gcov commands + +2003-12-07 14:09 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Cleaned up pipe numbering. + +2003-12-05 16:39 king + + * Source/cmCTest.cxx: ENH: Using cmListFileCache to read the + DartTestfile instead of duplicating the parse loop. + +2003-12-05 14:51 king + + * Source/kwsys/kwsys_std.h.in: ERR: Need to include Configure.hxx + to get kwsys_std definition. + +2003-12-05 11:53 king + + * Source/: cmCTest.cxx, cmSystemTools.cxx, kwsys/Process.h.in, + kwsys/ProcessUNIX.c, kwsys/ProcessWin32.c, kwsys/test1.cxx, + kwsys/testProcess.c: ENH: Removed pipe selection argument from + WaitForData method in kwsysProcess. This greatly simplifies its + use. + +2003-12-05 11:37 king + + * Source/kwsys/: Process.h.in, ProcessFwd9x.c, ProcessWin32.c: + STYLE: Removed trailing whitespace. + +2003-12-05 11:19 king + + * Source/kwsys/ProcessWin32.c: BUG: Process startup-info struct + dwFlags were being set incorrectly due to a change in statement + order. + +2003-12-05 10:45 king + + * Docs/cmake-mode.el: ENH: New indentation implementation to + support multi-line strings. + +2003-12-04 14:34 king + + * Docs/cmake-mode.el: STYLE: Removed trailing whitespace. + +2003-12-04 13:56 king + + * Source/kwsys/ProcessUNIX.c: ERR: Added missing static storage + class specifier for kwsysProcessCreate. + +2003-12-03 14:16 martink + + * Source/cmCTest.cxx: some fixes to test harnes + +2003-12-03 13:37 king + + * Source/kwsys/ProcessUNIX.c: ERR: Some platforms define stdin, + stdout, and stderr as macros. Renaming these symbols to StdIn, + StdOut, and StdErr. + +2003-12-03 09:20 king + + * Source/kwsys/: Process.h.in, ProcessFwd9x.c, ProcessUNIX.c, + ProcessWin32.c: ENH: Merged changes from KWSys-MultiProcess-bp to + KWSys-MultiProcess-b2t-1-mp to main tree. This introduces + support for process pipelines. + +2003-12-03 09:12 king + + * Source/kwsys/Process.h.in: ERR: Added missing macro definition + for kwsysProcess_AddCommand. + +2003-12-02 17:23 king + + * Utilities/Release/cmake_release.sh: ENH: Added documentation + about location of cmCPluginAPI.h in cygwin package. + +2003-12-02 17:16 king + + * Utilities/Release/cygwin-package.sh.in: BUG: No longer need to + copy Copyright.txt into doc directory. It is done by the cmake + installation. + +2003-12-02 17:14 king + + * Utilities/Release/cygwin-package.sh.in: BUG: Need to pass + datadir/docdir/mandir to bootstrap script instead of writing in + the cache. + +2003-12-02 16:57 king + + * Utilities/Release/cygwin-package.sh.in: ENH: Cygwin now uses + /usr/share/doc instead of /usr/doc. + +2003-12-02 16:57 king + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: ENH: Updating + version number to 1.8.3. + +2003-12-02 16:50 martink + + * Source/cmCTest.cxx: better error handling + +2003-12-01 19:25 martink + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: a start on the + dashboard driver + +2003-12-01 13:07 king + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + BUG#411: Merged fix to 1.8 branch. + +2003-12-01 13:06 king + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + BUG#411: Re-ordering statements so errors show up in + CMakeError.log. + +2003-11-28 15:37 king + + * Source/kwsys/ProcessWin32.c: ENH: Cleaned up implementation of + stderr and win9x forwarding executable error pipe. + +2003-11-28 14:21 king + + * Source/kwsys/ProcessWin32.c: ENH: Removing special termination + pipe from Windows implementation. It does not need it because + WaitForMultipleObjects can wait with a timeout for the process to + terminate. This is not the case in UNIX because waitpid has no + timeout, so we need the termination pipe there. + +2003-11-28 14:08 king + + * Source/kwsys/ProcessWin32.c: BUG: Removed stray debugging code + that caused win9x mode to always be used. + +2003-11-28 14:02 king + + * Source/kwsys/ProcessWin32.c: ENH: Added special termination pipe + to allow timeout to work for processes that close their output + pipes. + +2003-11-28 13:07 king + + * Source/kwsys/ProcessWin32.c: ENH: Error messages from the + forwarding executable are now read completely even if they are + reported in multiple blocks. + +2003-11-28 12:58 king + + * Source/kwsys/ProcessWin32.c: BUG: Fixed error message when + process control structure initialization runs out of memory. + +2003-11-28 12:52 king + + * Source/kwsys/ProcessWin32.c: ERR: Removed useless if(command) in + AddString. + +2003-11-28 12:47 king + + * Source/kwsys/ProcessWin32.c: ENH: Renamed CMPE_* to KWSYSPE_* for + consistency with ProcessUNIX.c. + +2003-11-28 12:42 king + + * Source/kwsys/ProcessUNIX.c: BUG: When a child fails to exec, we + need to read the entire error message, not just the first block. + +2003-11-28 12:31 king + + * Source/kwsys/ProcessUNIX.c: ENH: UNIX implementation of process + pipeline. + +2003-11-28 10:08 king + + * Source/kwsys/ProcessUNIX.c: ENH: Implemented SetCommand and + AddCommand for multiple process support. + +2003-11-28 09:48 king + + * Source/kwsys/: ProcessUNIX.c: STYLE: Removed trailing whitespace. + +2003-11-27 23:08 king + + * Source/kwsys/: Process.h.in, ProcessFwd9x.c, ProcessWin32.c: ENH: + Windows implementation of process pipeline. + +2003-11-27 10:28 king + + * Source/cmake.cxx: BUG: cmake_symlink_library should return the + accumulated result, not just 0. + +2003-11-26 17:59 king + + * Modules/Platform/Linux.cmake: ENH: Adding implementation of + shared library version support on UNIX. This addresses the + feature request described in bug#32. + +2003-11-26 17:52 king + + * Modules/CMakeDefaultMakeRuleVariables.cmake: ENH: Adding + implementation of shared library version support on UNIX. This + addresses the feature request described in bug#32. + +2003-11-26 17:38 king + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: ENH: Adding implementation of + shared library version support on UNIX. This addresses the + feature request described in bug#32. + +2003-11-26 17:34 king + + * Source/cmake.cxx: BUG: The cmake_symlink_library command needs to + remove existing files before creating links. + +2003-11-26 16:38 king + + * Source/cmake.cxx: ENH: Added undocumented cmake_symlink_library + to help with building versioned shared libraries. + +2003-11-26 16:15 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: remove more warnings + +2003-11-26 16:12 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: remove warnings + +2003-11-26 16:11 king + + * Source/cmSystemTools.cxx: ERR: Fixed unused parameter warnings. + +2003-11-26 16:04 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx: ENH: fix some warnings + +2003-11-26 14:52 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + CreateSymlink method. + +2003-11-26 14:30 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: remove removecache entry + call + +2003-11-26 14:29 hoffman + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h: + ENH: generate a sln and dsw file for each sub project in a + project + +2003-11-26 11:41 king + + * Source/: cmCTest.cxx, cmSystemTools.cxx: BUG: Do not use + std::string to accumulate output. Use std::vector instead. This + is much better at memory management. + +2003-11-25 16:14 king + + * Utilities/Release/cmake_release.sh: STYLE: Removed trailing + whitepsace. + +2003-11-24 15:51 king + + * Utilities/Release/cmake_release.sh: BUG: osx_install should make + the Resources directory before copying files into it. + +2003-11-24 14:04 king + + * Modules/FindPythonLibs.cmake: BUG#266: Merging 1.16->1.18 changes + to 1.8 branch. + +2003-11-24 14:01 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#393: Merging + 1.40->1.41 changes to 1.8 branch. + +2003-11-21 14:13 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#393: Adding XML + escaping for additional per-source compile flags. + +2003-11-21 13:12 hoffman + + * Modules/FindPythonLibs.cmake: BUG: remove junk code + +2003-11-20 15:41 king + + * Modules/FindPythonLibs.cmake: BUG#266: Added cygwin names for the + library. Module now documents output as PYTHON_LIBRARIES instead + of PYTHON_LIBRARY. + +2003-11-20 15:31 king + + * Modules/FindPythonLibs.cmake: STYLE: Removed trailing whitespace. + +2003-11-20 15:30 king + + * Modules/Platform/: AIX.cmake, BSDOS.cmake, Darwin.cmake, + FreeBSD.cmake, HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + MP-RAS.cmake, NetBSD.cmake, OSF1.cmake, OpenBSD.cmake, + RISCos.cmake, SCO_SV.cmake, SINIX.cmake, SunOS.cmake, + True64.cmake, ULTRIX.cmake, UNIX_SV.cmake, UnixWare.cmake, + Windows-gcc.cmake, Xenix.cmake, gcc.cmake: BUG#383: Merged fix to + 1.8 branch. + +2003-11-14 10:44 hoffman + + * Modules/Platform/: AIX.cmake, BSDOS.cmake, Darwin.cmake, + FreeBSD.cmake, HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + MP-RAS.cmake, NetBSD.cmake, OSF1.cmake, OpenBSD.cmake, + RISCos.cmake, SCO_SV.cmake, SINIX.cmake, SunOS.cmake, + True64.cmake, ULTRIX.cmake, UNIX_SV.cmake, UnixWare.cmake, + Windows-gcc.cmake, Xenix.cmake, gcc.cmake: BUG: fix for bug 383 + gcc flags are now always set if the compiler is gnu + +2003-11-13 15:54 king + + * Source/cmAddCustomTargetCommand.cxx: BUG#321: Merged 1.13->1.14 + changes to 1.8 branch. + +2003-11-13 14:45 martink + + * Source/cmAddCustomTargetCommand.cxx: fixed argument parsing + +2003-11-13 13:52 king + + * Source/: cmFindFileCommand.h, cmFindLibraryCommand.h, + cmFindPathCommand.h, cmFindProgramCommand.h: ENH: Documentation + improvements from main tree. + +2003-11-13 13:51 king + + * Source/: cmFindFileCommand.h, cmFindLibraryCommand.h, + cmFindPathCommand.h, cmFindProgramCommand.h: ENH: Documentation + improvements. + +2003-11-13 12:43 king + + * Modules/FindGTK.cmake: BUG#299: Merged 1.8->1.9 changes to 1.8 + branch. + +2003-11-12 17:44 king + + * Modules/FindGTK.cmake: BUG#299: GTK_gmodule_LIBRARY is optional + just like GTK_gthread_LIBRARY. + +2003-11-12 16:53 king + + * Modules/TestForANSIForScope.cmake: BUG#374: Merging 1.10->1.11 + changes to 1.8 branch. + +2003-11-12 16:53 king + + * Modules/TestForSTDNamespace.cmake: BUG#374: Merging 1.9->1.10 + changes to 1.8 branch. + +2003-11-12 16:51 king + + * Modules/: TestForANSIForScope.cmake, TestForSTDNamespace.cmake: + BUG#374: Adding OUTPUT_VARIABLE OUTPUT to TRY_COMPILE commands. + +2003-11-12 14:57 king + + * Source/cmMakeDepend.cxx: BUG#373: Merging 1.39->1.40 to 1.8 + branch. + +2003-11-12 14:20 hoffman + + * Source/cmMakeDepend.cxx: BUG: fix for bug 373 make depend problem + +2003-11-12 14:17 king + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG#371: Merging + 1.19->1.20 changes to 1.8 branch. + +2003-11-12 14:17 king + + * Source/cmGlobalVisualStudio7Generator.cxx: BUG#371: Merging + 1.17->1.18 changes to 1.8 branch. + +2003-11-12 14:06 andy + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: ENH: Bug #371 - Add build + configuration for try compiles using cmake variable + +2003-11-12 10:03 king + + * Modules/Dart.cmake: BUG#199: Merging 1.45->1.46 changes to 1.8 + branch. + +2003-11-12 10:00 king + + * Modules/Dart.cmake: BUG#199: If + DART_EXPERIMENTAL_USE_PROJECT_NAME is set, the PROJECT_NAME will + be included in the name of the Experimental and + ExperimentalSubmit targets. + +2003-11-11 12:53 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#363: Merged + 1.39->1.40 changes to 1.8 branch. + +2003-11-11 12:51 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for 363, + VCMIDLTool not used for idl files + +2003-11-11 12:51 king + + * Source/cmCTest.cxx: BUG#344: Merged 1.66->1.67 to 1.8 branch. + +2003-11-11 12:36 andy + + * Source/cmCTest.cxx: BUG: Handle -C properly for executables that + are not in the project; Fix Bug #344 - ctest -C Debug + +2003-11-11 11:42 king + + * Source/cmCTest.h: BUG#259: Merging 1.16->1.18 changes to 1.8 + branch. + +2003-11-11 11:42 king + + * Source/cmCTest.cxx: BUG#259: Merging 1.62->1.63 and 1.64->1.66 + changes to 1.8 branch. + +2003-11-11 11:41 king + + * Source/cmAddTestCommand.cxx: BUG#259: Merging 1.18->1.20 changes + to 1.8 branch. + +2003-11-06 16:38 andy + + * Source/cmCTest.cxx: ENH: Add warning exception for VTK type + warning blocking + +2003-11-05 15:02 andy + + * Utilities/Doxygen/doxyfile.in: ENH: Handle kwsys properly + +2003-11-05 15:02 andy + + * Utilities/Doxygen/CMakeLists.txt: ENH: Cleanup. We do not really + need to use vtk for documentation. We only need utilities/doxygen + directory + +2003-11-05 13:03 king + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: BUG#346: Merging fix + from main tree to 1.8 branch. + +2003-11-05 11:18 hoffman + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for bug 346, + borland should now support dash in the path + +2003-11-05 10:46 king + + * Source/cmCTest.cxx: BUG#259: Fix for spaces in paths to + executable added to previous fixes for this bug. + +2003-11-05 10:13 king + + * Modules/: FindTclsh.cmake, FindWish.cmake: BUG#322: Merging fix + from main tree to 1.8 branch. + +2003-11-04 12:50 king + + * Source/cmCTest.cxx: BUG#323: Merging fix from main tree to 1.8 + branch. + +2003-11-04 11:19 hoffman + + * Source/cmCTest.cxx: BUG: fix for bug 323 + +2003-11-04 09:45 king + + * Source/cmMakefile.cxx: BUG: Merging changes from revision 1.236 + to 1.237 to 1.8 branch. + +2003-11-04 09:44 king + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: Merging changes + from revisions 1.41 to 1.47 to 1.8 branch. + +2003-11-04 09:36 king + + * Modules/: FindTclsh.cmake, FindWish.cmake: ENH: Adding registry + entries to search path. + +2003-11-04 09:06 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG#318: Merging fix + from main tree to 1.8 branch. + +2003-11-04 09:03 king + + * Source/CTest/cmCTestSubmit.cxx: BUG#320: Merging fix from main + tree to 1.8 branch. + +2003-11-04 09:01 king + + * Source/cmQTWrapCPPCommand.cxx: BUG#319: Merging fix from main + tree (1.15->1.16) to 1.8 branch. + +2003-11-04 09:00 king + + * Source/kwsys/: ProcessWin32.c, RegularExpression.cxx: ERR: + Removed extra variable assignments. + +2003-11-04 08:56 king + + * Source/kwsys/ProcessWin32.c: BUG: Removed CloseHandle in case of + error in DuplicateHandle. According to documentation, + DuplicateHandle will close the source handle regardless of error + condition. + +2003-11-04 08:50 king + + * Source/cmAddTestCommand.cxx: BUG: Cannot add extra escapes for + backslashes because it makes the behavior inconsistent with + previous versions of cmake. + +2003-11-03 16:59 andy + + * Source/CTest/cmCTestSubmit.cxx: BUG: This fixes problem when + submitting bugs on Mac: Bug #320 - When st_size in stat is 64 bit + ctest does not submit + +2003-11-03 15:57 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, cmMakefile.cxx: BUG: + hack fix for problem of MS vs 6 and custom target commands + +2003-11-03 15:53 andy + + * Source/cmQTWrapCPPCommand.cxx: BUG: Fix Bug #319 - Change in + QT_WRAP_CPP's behaviour + +2003-11-03 15:38 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Cleanup parsing of argument + to help fix Bug #259 - CMake does not quote correctly in + DartTestfile.txt + +2003-11-03 15:19 king + + * Source/cmAddTestCommand.cxx: BUG#259: ADD_TEST command generated + in DartTestfile.txt now quotes/escapes all arguments. + +2003-11-03 11:01 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: fix for debug libs + not using output path + +2003-10-31 17:22 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG#318: + cmake.check_depends now collects all dependencies for + cmake.depends and then uses a single rule. + +2003-10-31 17:05 king + + * Modules/Platform/Windows-cl.cmake: BUG#317: Merging 1.23->1.24 + changes to 1.8 branch. + +2003-10-31 17:01 king + + * Templates/EXEWinHeader.dsptemplate: BUG#316: Merged 1.15->1.16 + changes from main tree to 1.8 branch. + +2003-10-31 16:56 hoffman + + * Modules/Platform/Windows-cl.cmake: BUG: fix for bug# 317 + +2003-10-31 16:55 andy + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate, + Tests/COnly/CMakeLists.txt: ENH: Attempt to add debug library + postfix for visual studio 6 + +2003-10-31 16:53 hoffman + + * Templates/EXEWinHeader.dsptemplate: Fix for BUG: 316 + +2003-10-31 12:55 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Merged all changes + from main tree up to revision 1.39. + +2003-10-31 09:31 andy + + * Source/cmCTest.cxx: ENH: Report when having conflicts + +2003-10-30 16:12 king + + * Source/: cmake.cxx: BUG#313: Improving error message when no + CMakeLists.txt file is found in the source tree. + +2003-10-30 14:27 king + + * Source/cmAddTestCommand.cxx: BUG: Backing out previous change + until a deeper problem can be investigated. + +2003-10-30 14:00 king + + * Source/cmAddTestCommand.cxx: BUG#259: Do not double quote + arguments if they are already quoted when writing + DartTestfile.txt. + +2003-10-30 13:47 king + + * Source/cmTryCompileCommand.h: BUG#163: Merging 1.12->1.13 changes + to 1.8 branch for 1.8.2 release. + +2003-10-30 13:46 king + + * Source/cmTryCompileCommand.h: BUG#163: Added documentation of + OUTPUT_VARIABLE argument. + +2003-10-30 13:35 king + + * Modules/FindLATEX.cmake: BUG#262: Merging fix from main tree + 1.8->1.9 to 1.8 branch for 1.8.2 release. + +2003-10-30 13:33 king + + * Modules/FindLATEX.cmake: BUG#262: Marking DVIPDF_CONVERTER as + advanced. + +2003-10-30 13:18 king + + * Source/cmake.cxx: BUG#311: Merging 1.141->1.142 changes to 1.8 + branch for 1.8.2 release. + +2003-10-30 13:16 king + + * Source/cmCTest.cxx: BUG#310: Merging 1.60->1.61 from main tree to + 1.8 branch. + +2003-10-30 10:05 andy + + * Source/cmCTest.cxx: BUG: Fix Bug #310 - CTest sends wrong time to + cvs on Windows + +2003-10-29 19:48 andy + + * Source/: cmake.cxx, cmakemain.cxx, cmSystemTools.cxx, + cmSystemTools.h: ENH: Ok, no more argument needed for script mode + +2003-10-29 09:56 andy + + * Source/cmGlobalGenerator.cxx: ENH: More scripting changes + +2003-10-29 09:43 andy + + * Source/: cmake.cxx, cmake.h, cmMakefile.cxx, cmakemain.cxx: ENH: + Start includding the scripting support + +2003-10-29 08:58 andy + + * Source/: cmCommand.h, cmMessageCommand.h, cmIncludeCommand.h: + ENH: Start includding the scripting support + +2003-10-28 15:26 andy + + * Source/cmake.cxx: ENH: Command should also be quoted + +2003-10-28 13:22 king + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + BUG#303: Merged fix from main tree to 1.8 branch for 1.8.2 + release. + +2003-10-28 13:19 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#200: Merged fix to + 1.8 branch for 1.8.2 release. + +2003-10-28 11:55 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: add preprocessor + flags to resource compiler + +2003-10-28 11:06 hoffman + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + BUG: fix for bug 303 pass makeflags to sub makes + +2003-10-25 18:21 andy + + * Utilities/Doxygen/doxyfile.in: ENH: Add all subdirectories + +2003-10-17 16:19 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: make sure -M flags + are not duplicated and are only set in the xml + +2003-10-17 16:10 king + + * Modules/CMakeDetermineCXXCompiler.cmake: BUG#276: Merge fix for + spaces in path from main tree. + +2003-10-17 16:09 king + + * Modules/CMakeDetermineCXXCompiler.cmake: BUG: Fixed same + spaces-in-paths problem for CMakeTestGNU.c as in + CMakeDetermineCCompiler.cmake. + +2003-10-17 16:08 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for unicode + and for /D -D + +2003-10-17 07:45 andy + + * Source/WXDialog/cmWXMainFrame.cxx: ENH: Fix problem with wx 2.4 + +2003-10-16 19:16 andy + + * Tests/UseWX/: CMakeLists.txt, WX.cxx: ENH: We do not really need + streams. Also fix the test on windows + +2003-10-16 19:15 andy + + * Source/CMakeLists.txt: ENH: Enable test on windows + +2003-10-16 17:51 king + + * Modules/Platform/Windows-cl.cmake: BUG#78: Merged fix from main + tree (1.22->1.23). + +2003-10-16 13:42 king + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: ENH: Updating + version number for 1.8.2 release. + +2003-10-16 13:09 king + + * Modules/: CMakeDetermineJavaCompiler.cmake, FindJNI.cmake, + FindJava.cmake, FindTCL.cmake: BUG#281: Merging fix from main + tree. See bug report for revision changes. + +2003-10-16 13:06 king + + * Source/cmCTest.cxx: BUG#278: Merging fix from main tree + (1.59->1.60) to 1.8 branch for 1.8.2 release. + +2003-10-16 11:05 barre + + * Modules/: CMakeDetermineJavaCompiler.cmake, FindJNI.cmake, + FindJava.cmake, FindTCL.cmake: FIX: for Windows users, it seems + logical to favor native win32 installation before Cygwin ones. + Otherwise you can end up with bad mixes (part of the java tools + were picked from the SDK, part from Cygwin) + +2003-10-16 10:32 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: ENH: allow UNICODE to be + specifed in the cxx flags and if not default to MBCS + +2003-10-16 10:10 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: allow users to + change to unicode + +2003-10-16 07:49 andy + + * Source/cmCTest.cxx: ENH: Handle all white spaces, fix problem on + cygwin + +2003-10-15 23:42 hoffman + + * Modules/Platform/Windows-cl.cmake, + Source/cmLocalVisualStudio7Generator.cxx: BUG: fix for bug 78 + should be on 1.8 branch + +2003-10-15 10:19 king + + * Modules/Platform/Darwin.cmake: BUG#277: Fix from main tree 1.5 -> + 1.6 merged to 1.8 branch. Will be included in 1.8.2 release. + +2003-10-15 10:14 king + + * Modules/Platform/Darwin.cmake: ERR: Old -flat_namespace + -undefined suppress flags for CMAKE_SHARED_MODULE_CREATE_C_FLAGS + should be included when CMAKE_BACKWARDS_COMPATIBILITY is 1.6 or + lower. + +2003-10-15 10:06 king + + * bootstrap: BUG#168: Merged fix for HP-UX ansi C flags as second + part of the fix for this bug to 1.8 branch. 1.24 -> 1.25. + +2003-10-15 10:01 king + + * Source/kwsys/SystemTools.cxx: BUG#263: Merged search path + ordering fix from main tree to CMake 1.8 branch. 1.22 -> 1.24. + +2003-10-15 09:56 king + + * Source/cmTargetLinkLibrariesCommand.cxx: BUG#201: Merged warning + suppression support from main tree to 1.8 branch. 1.16->1.17. + +2003-10-15 09:53 king + + * Modules/CheckTypeSize.cmake: Documentation fix from main tree. + 1.11->1.12. + +2003-10-15 09:52 king + + * Modules/CheckVariableExists.cmake: BUG: Merged trivial fix from + main tree. 1.10 -> 1.11. + +2003-10-15 09:49 king + + * Modules/CMakeDetermineCCompiler.cmake: BUG#263: Merged fix for + system paths in ar and ranlib find commands to 1.8 branch. Will + be included in 1.8.2 + +2003-10-15 09:26 king + + * Source/cmQTWrapCPPCommand.cxx: BUG#186: Merged fix from trunk to + branch. + +2003-10-15 09:18 king + + * Modules/CMakeDetermineCCompiler.cmake: BUG#276: Merge fix for + spaces in path from main tree. + +2003-10-14 22:30 king + + * Modules/CMakeDetermineCCompiler.cmake: BUG: Fix for spaces in + path when loading CMakeTestGNU.c. + +2003-10-13 16:04 andy + + * Source/CMakeLists.txt, Tests/UseWX/CMakeLists.txt, + Tests/UseWX/WX.cxx: ENH: Add test for FindwxWindows. Thanks to: + Mathieu Malaterre + +2003-10-13 15:27 andy + + * Modules/CheckTypeSize.cmake: ENH: Documentation fix + +2003-10-13 11:58 king + + * Modules/Platform/Windows-cl.cmake: BUG#269: Fix for spaces in + paths. Will be included in 1.8.2 release. + +2003-10-13 11:32 andy + + * Modules/Platform/Windows-cl.cmake: ERR: allow spaces in the path + +2003-10-11 08:12 king + + * Modules/CheckVariableExists.cmake: BUG: Message describing + variable was using result variable. + +2003-10-09 15:52 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Source/kwsys/SystemTools.cxx: ENH: put the system path after the + paths specified on to the FIND command + +2003-10-07 13:45 king + + * Utilities/Release/cmake_release.sh: Updated cygwin dependencies. + +2003-10-07 09:50 king + + * Utilities/Release/config_CYGWIN_NT-5.1: GCC 2.95 is no longer + available on cygwin. + +2003-10-02 14:50 andy + + * Source/cmTargetLinkLibrariesCommand.cxx: ENH: Add + CMAKE_IGNORE_DEPENDENCIES_ORDERING to prevent warnings about + dependency problems + +2003-09-26 11:27 king + + * Modules/CMakeImportBuildSettings.cmake: BUG: Comparison of build + tool should be case-insensitive. + +2003-09-26 11:15 king + + * Modules/CMakeImportBuildSettings.cmake: BUG: Comparison of build + tool should be case-insensitive. + +2003-09-24 17:51 andy + + * Source/cmQTWrapUICommand.cxx: ENH: Fix comment + +2003-09-24 17:51 andy + + * Tests/Wrapping/CMakeLists.txt: ENH: Better testing + +2003-09-24 17:50 andy + + * Source/cmQTWrapCPPCommand.cxx: BUG: Fix Bug #186 - QT_WRAP_UI + uses the path twice + +2003-09-24 11:10 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#191: Merging fix + into 1.8 branch for inclusion in 1.8.2 release. + +2003-09-24 11:03 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Check for whether + to use CMAKE_EXE_LINKER_FLAGS should look both for EXECUTABLE and + WIN32_EXECUTABLE targets. + +2003-09-23 13:58 king + + * Source/cmCTest.cxx: BUG#185: Merged fix from main tree to 1.8 + branch. Change will be included in 1.8.2 release. + +2003-09-23 13:49 andy + + * Source/cmCTest.cxx: ENH: Add missing newline Bug #185 - CTest + exceptions output is missing new line + +2003-09-18 11:05 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove /tmp_mnt in collapse + full path + +2003-09-15 15:58 king + + * bootstrap: BUG: Need to check for -Ae flag on HP-UX cc compiler. + Needed for ANSI C compilation. + +2003-09-02 13:49 king + + * bootstrap: BUG#168: Using C compiler to build .c files during + bootstrap instead of C++ compiler. + +2003-09-02 13:27 king + + * bootstrap: BUG: Must use C compiler to compile C files during + bootstrap, not C++ compiler. + +2003-08-29 09:38 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Merged more fixes from + main tree. + +2003-08-28 16:22 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: make sure exe output path + is used for dep hack stuff + +2003-08-28 16:10 martink + + * Source/cmLocalVisualStudio6Generator.cxx: bad evil nasty ken + +2003-08-28 16:06 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: fix to executable depends for + custom commands + +2003-08-28 15:02 king + + * Utilities/Release/config_IRIX64: ERR: Don't need separate -n32 + and -64 binaries. + +2003-08-28 14:58 hoffman + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: BUG: remove + bundle_loader stuff it did not work with spaces in the path and + is not needed for this test + +2003-08-28 14:55 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Merged fix for bug with + custom commands depending on executables from main tree. + +2003-08-28 14:52 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: fix bug with custom + commands depending on executables + +2003-08-28 14:03 king + + * CMakeLists.txt, Utilities/Release/cmake_release.sh: ENH: Updated + for 1.8.1 release number. + +2003-08-27 20:35 starreveld + + * Modules/Platform/Darwin.cmake, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: ENH: remove + the -flat_namespace and -undefined suppress hacks from ENH: + CMAKE_SHARED_MODULE_CREATE_C_FLAGS ENH: and fix the complex + example to specify a -bundle loader for the ENH: shared module + that it builds. + +2003-08-27 17:45 hoffman + + * Source/cmWin32ProcessExecution.cxx: ENH: remove warnings from use + of NULL + +2003-08-27 16:50 king + + * CMakeLists.txt, CMakeSystemConfig.txt.in, + CMakeWindowsSystemConfig.txt, bootstrap, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, Modules/CMakeTestGNU.c, + Modules/FindThreads.cmake, Modules/FindwxWindows.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows-gcc.cmake, + Modules/Platform/Windows.cmake, Source/CMakeLists.txt, + Source/TODO, Source/cmCacheManager.cxx, Source/cmCommands.cxx, + Source/cmDynamicLoader.cxx, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmLoadCommandCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmWin32ProcessExecution.cxx, Source/cmake.cxx, + Source/kwsys/SystemTools.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Utilities/CMakeLists.txt: ENH: Merging changes from trunk into + 1.8 branch. + + 1.) MinGW support (beta) 2.) make VERBOSE=1 3.) FindThreads.cmake + fix 4.) FindwxWindows.cmake fix 5.) + CMakeSystemSpecificInformation.cmake typo fix 6.) bootstrap + spaces-in-path fix + +2003-08-27 16:42 hoffman + + * Modules/Platform/Windows-gcc.cmake, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: ENH: MinGW + build now passes all the tests + +2003-08-27 16:08 king + + * Utilities/Release/: cmake_release.sh, config_AIX, config_Darwin, + config_HP-UX, config_IRIX64, config_Linux, config_OSF1, + config_SunOS, cygwin-package.sh.in: Merging release script + changes from 1.8 branch to main tree. + +2003-08-27 16:02 king + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + ERR: Fixed typo in comment. + +2003-08-27 08:29 king + + * Source/cmake.cxx: ERR: Fixed placement of code introduced by a + patch from main tree. Somehow it ended up on the wrong lines. + +2003-08-26 17:13 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Added support for + "make VERBOSE=1" to run one-time verbose make runs without + changing CMAKE_VERBOSE_MAKEFILE. + +2003-08-26 15:08 king + + * Source/: cmake.cxx, cmakemain.cxx, cmakewizard.cxx, + cmakewizard.h: BUG#164: Fixed crash of cmake -i when CMAKE_ROOT + cannot be found. Made resulting error message cleaner. + +2003-08-26 15:06 king + + * Source/: cmake.cxx, cmakemain.cxx, cmakewizard.cxx, + cmakewizard.h: BUG: Fixed crash of cmake -i when CMAKE_ROOT + cannot be found. Made resulting error message cleaner. + +2003-08-22 12:53 king + + * CMakeLists.txt, Source/CMakeLists.txt, Utilities/CMakeLists.txt: + ENH: Moved decision to build MFCDialog up to top level. It is + used in both the Source and Utilities directories. + +2003-08-22 11:56 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: remove ifdef code + and use makefile definitions + +2003-08-22 11:56 hoffman + + * Modules/Platform/Windows-gcc.cmake: ENH: add configure file for + gcc under windows + +2003-08-22 09:52 andy + + * bootstrap, Modules/FindThreads.cmake: ERR: Reorganize to try to + fix the -pthread problem on some systems + +2003-08-21 16:22 hoffman + + * Modules/CMakeCCompiler.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, Modules/CMakeTestGNU.c, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows.cmake, Source/CMakeLists.txt, + Source/cmDynamicLoader.cxx, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmWin32ProcessExecution.cxx, Source/cmake.cxx, + Source/kwsys/SystemTools.cxx: ENH: add the unix makefile + generator as an option from the windows GUI, this builds with + mingw, cygwin, and combinations of make cl, bcc32 + +2003-08-21 13:26 andy + + * Modules/FindwxWindows.cmake: ERR: If WX_CONFIG_LIBS are , then + you get weird cmake error. This should fix it + +2003-08-21 09:23 hoffman + + * Source/TODO: [no log message] + +2003-08-20 12:59 king + + * Source/: cmakemain.cxx, CursesDialog/ccmake.cxx, + MFCDialog/CMakeSetup.cpp: ENH: Added documentation of specifying + an existing build tree as an argument. + +2003-08-19 11:02 andy + + * Source/cmLoadCommandCommand.cxx: ERR: Fix crash of cmake on + broken load commands + +2003-08-19 10:50 king + + * Modules/Platform/: IRIX64.cmake: ENH: Improved default choice of + -64 compiler/linker flags based on how cmake was built. + +2003-08-19 10:29 andy + + * Source/cmLoadCommandCommand.cxx: BUG: LastError can return 0, so + handle that case + +2003-08-19 09:41 king + + * bootstrap: BUG: Merged cmake_make_processor error message to 1.8 + branch. + +2003-08-19 09:40 king + + * Source/: cmCTest.cxx, cmCTest.h: BUG: Merged fixes for bugs 146, + 152, and 153 to 1.8 branch. + +2003-08-19 09:39 king + + * Source/cmCacheManager.cxx: BUG#154: Merged fix to 1.8 branch. + +2003-08-19 09:39 king + + * Source/cmake.cxx: ERR: Fixed warnings. + +2003-08-19 09:33 king + + * Source/kwsys/SystemTools.cxx: ERR: Merged warning fix from main + tree to CMake 1.8 branch. + +2003-08-19 09:32 king + + * Source/kwsys/ProcessUNIX.c: ProcessUNIX.c + +2003-08-19 09:32 king + + * Source/kwsys/ProcessWin32.c: BUG: Merged error message fix to + CMake 1.8 branch. + +2003-08-19 09:27 king + + * Modules/FindLATEX.cmake: BUG#156: Fixed typo psd2pdf -> ps2pdf. + Will be included in 1.8.1 release. + +2003-08-19 09:12 king + + * Utilities/Release/: cmake_release.sh, config_IRIX64: Added + LDFLAGS support. + +2003-08-19 09:06 king + + * Utilities/Release/config_IRIX64: ENH: Added configuration of both + -64 and -n32 builds. + +2003-08-19 09:05 king + + * Utilities/Release/cmake_release.sh: ENH: Added support for + configuration of install tree. + +2003-08-19 08:53 andy + + * Modules/FindLATEX.cmake: BUG: Fix Bug #156 - ps2pdf is not found + on linux + +2003-08-18 14:31 andy + + * Source/: cmCTest.cxx, cmCTest.h: BUG: Report failed as failed... + +2003-08-18 14:06 andy + + * Source/cmake.cxx: ENH: Remove unused variable + +2003-08-18 14:05 andy + + * Source/cmCacheManager.cxx: BUG: Fixed Bug #154 - Uninitialized + type initialized value cache variables should return value + +2003-08-18 11:30 andy + + * Source/: cmCTest.cxx, cmCTest.h: BUG: Fix Bug #153 - CTest does + not detect tests that are not found and Bug #153 - CTest does not + detect tests that are not found + +2003-08-17 12:24 hoffman + + * Source/kwsys/SystemTools.cxx: ENH: remove warning and unneeded + cast + +2003-08-15 08:41 andy + + * Source/cmCTest.cxx: BUG: Fix test reporting + +2003-08-14 13:34 andy + + * Source/cmCTest.cxx: ENH: Fix verbose output, fix error message, + and fix the exit code check + +2003-08-14 09:09 hoffman + + * Source/cmake.cxx: ENH: remove a warning + +2003-08-13 18:17 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Better error reporting + +2003-08-13 18:08 king + + * Source/kwsys/ProcessWin32.c: ENH: Made error message consistent + between win9x and non-win9x version of error reporting. + +2003-08-13 14:21 king + + * Source/kwsys/ProcessUNIX.c: ENH: Treating SIGBUS as a fault by + default. + +2003-08-12 17:24 king + + * Source/cmSystemTools.cxx: BUG: Do not hide console when run from + ctest. + +2003-08-12 17:18 andy + + * Source/cmSystemTools.cxx: ENH: Fix hidden console for ctest + +2003-08-12 17:17 king + + * Utilities/Release/cmake_release.sh: Redoing 1.8.0. + +2003-08-12 16:37 king + + * Utilities/Release/cmake_release.sh: Disable use of libdl by curl. + +2003-08-12 16:35 king + + * Utilities/Release/: config_AIX, config_Darwin, config_HP-UX, + config_IRIX64, config_Linux, config_OSF1, config_SunOS: ENH: + Using write_standard_cache to shorten config files. + +2003-08-12 16:35 king + + * Utilities/Release/cmake_release.sh: ENH: Unix builds should not + use reentrant versions of network calls. + +2003-08-11 18:24 king + + * Utilities/Release/config_Darwin: ENH: Updated for new wx version. + +2003-08-11 18:21 king + + * Utilities/Release/cmake_release.sh: BUG: CMake.app directory is + now in bin, not Source. + +2003-08-11 18:14 king + + * Utilities/Release/cygwin-package.sh.in: BUG: Tests are run by + bin/ctest instead of Source/ctest. + +2003-08-11 17:58 king + + * Utilities/Release/: cmake_release.sh, config_IRIX64, + config_Linux: ENH: Added support for parallel build during + release. + +2003-08-11 17:53 andy + + * bootstrap: ENH: Add error message for make missing + +2003-08-11 17:41 king + + * Utilities/Release/cmake_release.sh: BUG: Test for build needs to + look for bin/ccmake, not Source/ccmake. + +2003-08-11 17:35 king + + * Utilities/Release/: cmake_release.sh, config_Darwin, + config_HP-UX, config_IRIX64, config_SunOS: Merge from 1.8 branch. + +2003-08-11 17:35 king + + * Source/WXDialog/CMakeLists.txt: BUG: Need to check both + CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE and CMAKE_WX_CONFIG. + +2003-08-11 17:34 king + + * Source/cmCommands.cxx: BUG: Bootstrapping with wxWindows support + needs SEPARATE_ARGUMENTS command. + +2003-08-11 17:34 king + + * Modules/CMakeLists.txt: ENH: Installing readme.txt in Modules + directory to be consistent with windows. + +2003-08-11 17:10 king + + * Source/WXDialog/CMakeLists.txt: BUG: Need to use + CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE in place of CMAKE_WX_CONFIG + if it is set. + +2003-08-11 16:55 king + + * Utilities/Release/config_Darwin: Fixed wx location. + +2003-08-11 16:43 king + + * Source/cmCommands.cxx: BUG: Bootstrapping with wxWindows support + requires SEPARATE_ARGUMENTS command in bootstrapped executable. + +2003-08-11 16:31 king + + * Utilities/Release/config_HP-UX: ENH: Cleaned up link of dld. + +2003-08-11 16:31 king + + * Utilities/Release/config_SunOS: ENH: Switching to system + compiler. + +2003-08-11 15:27 king + + * Utilities/Release/cmake_release.sh: Using bootstrap instead of + configure. + +2003-08-11 15:22 king + + * Utilities/Release/cmake_release.sh: ENH: Allow config files to + specify a make. + +2003-08-11 15:21 king + + * Utilities/Release/config_IRIX64: ENH: Enabling parallel build. + +2003-08-11 15:16 king + + * Utilities/Release/cmake_release.sh: BUG: Location of ctest has + changed to bin, not Source. + +2003-08-11 15:15 king + + * Utilities/Release/config_Darwin: Updated for new FindwxWindows. + +2003-08-11 15:07 king + + * Utilities/Release/cmake_release.sh: Update from 1.8 branch. + +2003-08-11 15:06 king + + * Utilities/Release/config_Darwin: Updated for new location of + wxWindows. + +2003-08-11 15:02 king + + * Utilities/Release/config_Darwin: Updated for new location of + wxWindows. + +2003-08-11 15:01 king + + * Utilities/Release/cmake_release.sh: ENH: Updated for new FTP + directory structure. + +2003-08-11 14:56 king + + * Modules/CMakeLists.txt: ENH: Installing readme.txt in modules to + be consistent with windows. + +2003-08-11 14:44 martink + + * Source/: cmMakefile.cxx: added beta release support + +2003-08-11 14:41 martink + + * CMakeLists.txt, Source/cmCPluginAPI.h: version 19 + +2003-08-11 14:37 martink + + * CMakeLists.txt, Source/cmCPluginAPI.h, + Utilities/Release/cmake_release.sh: added version + +2003-08-11 12:20 andy + + * Source/ctest.cxx: ENH: Add documentation for -D and add missing + targets + +2003-08-11 12:18 andy + + * Source/: cmCTest.cxx, CTest/cmCTestSubmit.cxx: ENH: Cleanup the + output + +2003-08-11 12:17 andy + + * Modules/Dart.cmake: ENH: Take Purify out because it is not + implemented yet + +2003-08-11 09:47 andy + + * Source/cmCTest.cxx: ENH: Remove debug + +2003-08-10 18:30 martink + + * Source/: cmAbstractFilesCommand.h, cmAddCustomCommandCommand.h, + cmAddCustomTargetCommand.h, cmAddDefinitionsCommand.h, + cmAddDependenciesCommand.h, cmAddExecutableCommand.h, + cmAddLibraryCommand.h, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.h, cmBuildCommand.h, + cmBuildNameCommand.h, cmCMakeMinimumRequired.cxx, + cmCMakeMinimumRequired.h, cmCTest.cxx, cmCacheManager.cxx, + cmCommand.h, cmConfigureFileCommand.h, cmCreateTestSourceList.h, + cmEnableTestingCommand.h, cmEndForEachCommand.h, + cmExecProgramCommand.h, cmExportLibraryDependencies.h, + cmFLTKWrapUICommand.h, cmFileCommand.h, cmFindFileCommand.cxx, + cmFindFileCommand.h, cmFindLibraryCommand.h, + cmFindPackageCommand.h, cmFindPathCommand.h, + cmFindProgramCommand.cxx, cmFindProgramCommand.h, + cmForEachCommand.h, cmGetCMakePropertyCommand.h, + cmGetSourceFilePropertyCommand.h, cmGetTargetPropertyCommand.h, + cmGlob.cxx, cmITKWrapTclCommand.h, cmIfCommand.h, + cmIncludeCommand.h, cmIncludeDirectoryCommand.h, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.h, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.h, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.h, + cmLoadCommandCommand.h, cmLocalUnixMakefileGenerator.cxx, + cmMacroCommand.h, cmMakeDirectoryCommand.h, cmMakefile.cxx, + cmMakefile.h, cmMarkAsAdvancedCommand.h, cmMessageCommand.h, + cmOptionCommand.h, cmOutputRequiredFilesCommand.h, + cmProjectCommand.h, cmQTWrapCPPCommand.h, cmQTWrapUICommand.h, + cmRemoveCommand.h, cmSeparateArgumentsCommand.h, cmSetCommand.h, + cmSetSourceFilesPropertiesCommand.h, + cmSetTargetPropertiesCommand.h, cmSiteNameCommand.h, + cmSourceFile.h, cmSourceFilesCommand.h, + cmSourceFilesRemoveCommand.h, cmSourceGroupCommand.h, + cmStringCommand.h, cmSubdirCommand.h, cmSubdirDependsCommand.h, + cmSystemTools.cxx, cmTarget.h, cmTargetLinkLibrariesCommand.h, + cmTryCompileCommand.h, cmTryRunCommand.h, + cmUseMangledMesaCommand.h, cmUtilitySourceCommand.h, + cmVTKMakeInstantiatorCommand.h, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h, + cmVariableRequiresCommand.h, cmWin32ProcessExecution.cxx, + cmWrapExcludeFilesCommand.h, cmWriteFileCommand.h, cmake.cxx, + cmake.h, cmakewizard.cxx, cmakewizard.h: removed redundent + includes + +2003-08-10 16:01 martink + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h, cmSourceFile.cxx: + removed duplicate includes + +2003-08-10 16:00 martink + + * Source/cmMakefile.cxx: removed duplicate include + +2003-08-09 19:37 andy + + * Source/cmCTest.cxx: ERR: Rename some variables to remove shadow + warning + +2003-08-08 18:28 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add regression images + support + +2003-08-08 17:10 andy + + * Source/cmCTest.cxx: ENH: Better output and use RunMakeCommand for + configure + +2003-08-08 11:59 andy + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, CMakeDetermineSystem.cmake, + CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake, + CMakeVS6FindMake.cmake, CMakeVS71FindMake.cmake, + CMakeVS7FindMake.cmake, CheckFunctionExists.cmake, + CheckIncludeFile.cmake, CheckIncludeFileCXX.cmake, + CheckIncludeFiles.cmake, CheckLibraryExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake, + FindHTMLHelp.cmake, FindMFC.cmake, TestBigEndian.cmake, + TestCXXAcceptsFlag.cmake, TestForANSIForScope.cmake, + TestForSTDNamespace.cmake: ENH: Cleanups and add missing + CMakeOutput.log and CMakeError.log appending. Close Bug #136 - + Verify that all modules that do try compile produce + CMakeError.log and CMakeOutput.log + +2003-08-08 11:19 martink + + * Source/cmStandardIncludes.h: added stdio + +2003-08-08 10:40 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fid post build iue on + vs6 utility targets + +2003-08-08 10:20 andy + + * Tests/SystemInformation/DumpInformation.cxx: EHN: Also display + Configure.h and Configure.hxx from cmsys + +2003-08-08 10:07 andy + + * Source/cmMakefile.cxx: ENH: When fixing cache value with + uninitialized type, collapse full paths for PATH and FILEPATH. + Closes Bug #82 - Specifying relative path when entering path can + break things + +2003-08-08 09:26 andy + + * Source/cmMakefile.cxx: ENH: Handle untyped but initialized values + for boolean AddCacheDefinition. Closes Bug #118 - Specifying + cache entries with -D should not need the type + +2003-08-08 09:22 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h: ENH: Get accessor + for cache value as boolean + +2003-08-08 09:17 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: remove shadowed variable + +2003-08-08 09:14 king + + * Source/cmFindPackageCommand.cxx: ERR: Fixed use of != operator + for std::string on old broken compilers. + +2003-08-08 08:48 andy + + * Source/cmakemain.cxx: ENH: Add help for cmake -E + +2003-08-08 08:48 andy + + * Source/cmCTest.cxx: ENH: Flush the output file, to make more nice + output for tail -f + +2003-08-07 19:23 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Add displaying of dots when + building project. Also, file is now written as the output is + produced, so, tail -f works, baby... + +2003-08-07 19:00 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Abstract + parsing of arguments so that I can use it in other places + +2003-08-07 18:44 andy + + * Source/cmaketest.cxx: ENH: More verbose + +2003-08-07 17:43 king + + * Source/ctest.cxx: ENH: Clarification of help dumped when no + arguments are given and no test file is found. + +2003-08-07 16:54 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: fix the test + +2003-08-07 16:50 king + + * Source/cmFindPackageCommand.cxx: ENH: Added compatability for + capitalization of _DIR and _FOUND variables in cmake 1.6. + +2003-08-07 16:32 andy + + * Modules/FindLATEX.cmake: ENH: Add PDFLaTeX and LaTeX2HTML. Closes + Bug #132 - Add pdflatex and html2latex to FindLATEX.cmake + +2003-08-07 16:26 andy + + * Source/: cmVariableWatch.cxx, cmVariableWatch.h: ENH: Add remove + watch + +2003-08-07 16:25 andy + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: Fix dependencies for + curses dialog + +2003-08-07 16:11 king + + * Source/cmake.cxx: BUG: Fixed typo in error message. + +2003-08-07 16:09 andy + + * CMakeLists.txt, Source/CMakeLists.txt, + Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmTargetLinkLibrariesCommand.h, + Source/CTest/CMakeLists.txt: ENH: Report an error when + ADD_LIBRARY and TARGET_LINK_LIBRARIES are in the wrong order and + fix CMakeLists files to actually work + +2003-08-07 16:04 hoffman + + * Tests/Complex/CMakeLists.txt, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Source/cmIncludeExternalMSProjectCommand.cxx: ENH: improve + coverage + +2003-08-07 15:39 andy + + * Source/kwsys/ProcessWin32.c: ENH: Cast into apropriate type to + remove warning + +2003-08-07 14:37 andy + + * Source/cmQTWrapUICommand.cxx: ENH: Use the new signature + +2003-08-07 14:37 andy + + * Tests/Wrapping/CMakeLists.txt: ENH: More verbose test + +2003-08-07 14:10 hoffman + + * Modules/Platform/Windows-cl.cmake: BUG: fix for main in a library + on windows with nmake + +2003-08-07 11:53 king + + * Source/cmLocalUnixMakefileGenerator.h: ENH: Added convenience + signature to OutputMakeRule. + +2003-08-07 11:42 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Makefiles now have + rules to do a global generate if the CMake listfiles have + changed. Necessary for when try-compiles are added to a + listfile. + +2003-08-07 09:19 hoffman + + * Modules/FindMPI.cmake, Source/cmLocalVisualStudio7Generator.cxx: + BUG: fix for bugs 125 - 128, and a fix for the bug introduced by + the bug fix for but 92. & was being replaced with &, but + after double quote was replaced with " causing it to be + &quot. Also add more search paths for mpi + +2003-08-06 19:19 andy + + * Source/cmMakefile.cxx: ENH: oops, initialize variable + +2003-08-06 18:54 andy + + * Source/cmGetCMakePropertyCommand.cxx, + Source/cmGetCMakePropertyCommand.h, Source/cmMacroCommand.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Tests/SystemInformation/CMakeLists.txt, + Tests/SystemInformation/DumpInformation.cxx: ENH: Add option to + retrieve list of macros. Close Bug #25 - Get_CMAKE_PROPERTIES + +2003-08-06 18:43 king + + * Source/cmDocumentation.cxx: BUG: Don't use -V as a version + option. It conflicts with ctest. + +2003-08-06 18:41 king + + * Source/cmake.cxx: ENH: Removed old argument processing code that + never does anything. + +2003-08-06 18:39 king + + * Source/: cmakewizard.cxx, CursesDialog/cmCursesMainForm.cxx: + BUG#129: Fixed load/save of CMakeCache.txt when it is not in the + current directory. + +2003-08-06 17:58 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: If + CMAKE_EDIT_COMMAND is not specified, use cmake -i + +2003-08-06 17:52 andy + + * bootstrap: ENH: Add rebuild_cache + +2003-08-06 17:32 andy + + * Modules/FindThreads.cmake: ENH: On apple use -lpthreads + +2003-08-06 15:22 king + + * Source/: cmInstallFilesCommand.h, cmInstallProgramsCommand.h: + ENH: Tweaked whitespace in documentation of command. + +2003-08-06 15:18 king + + * Source/cmAddCustomCommandCommand.h: ENH: Tweaked whitespace in + documentation of command. + +2003-08-06 15:12 king + + * Source/CursesDialog/ccmake.cxx: ENH: Added SEE ALSO support for + generated unix manpage. + +2003-08-06 15:10 king + + * Source/CMakeLists.txt: BUG: We don't want to install cmaketest on + UNIX or windows. It is for internal CMake testing only. We + should probably fold its functionality into ctest anyway. + +2003-08-06 15:03 king + + * Source/ctest.cxx, Utilities/CMakeLists.txt: ENH: Added + documentation for ctest. + +2003-08-06 14:49 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmakemain.cxx, + CursesDialog/ccmake.cxx, MFCDialog/CMakeSetup.cpp: ENH: Added + configuration of name of executable in man page header and + version banner. + +2003-08-06 13:48 king + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: If a directory is + specified on the command line that is not an existing build tree, + we should still use any -G option that was given to set the + generator. + +2003-08-06 13:48 king + + * Source/cmSystemTools.cxx: ENH: Hide windows for processes run by + RunSingleCommand. + +2003-08-06 13:41 king + + * Source/kwsys/SystemTools.cxx: Fixed indentation + +2003-08-06 12:52 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: do not output make + install rules on windows because they do not work + +2003-08-06 11:51 king + + * Source/cmaketest.cxx: BUG: Fixed spacing error in message. + +2003-08-06 10:42 king + + * Source/CMakeLists.txt: ENH: Install test is now enabled when + CMAKE_INSTALL_PREFIX is CMake_BINARY_DIR/Tests/TestInstall/Prefix + to keep test in one directory. + +2003-08-06 10:39 king + + * Source/CMakeLists.txt, Tests/TestInstall.sh.in: ENH: Added + Install test. It is enabled when the CMAKE_INSTALL_PREFIX is + CMake_BINARY_DIR/InstallTest. + +2003-08-06 10:15 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Fix install problem + +2003-08-06 09:27 king + + * Source/kwsys/ProcessWin32.c: BUG: Need to provide stdin to child + processes. + +2003-08-05 18:25 king + + * Tests/CommandLineTest/CMakeLists.txt: ENH: Added test of + --copyright and --version arguments for coverage. + +2003-08-05 18:22 king + + * Tests/CommandLineTest/CMakeLists.txt: ENH: Added test of --help + [command] form of help option for coverage. + +2003-08-05 18:10 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Added + support to --help to print help for a single command. + +2003-08-05 17:39 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Fixed + implementation of long dependency list support. The proxy target + must have a corresponding file to work correctly. Instead of + using a proxy target, we now just list one line for each + dependency and then print one copy of the build rule at the end. + +2003-08-05 16:51 king + + * Source/cmake.cxx: ENH: Clarified source directory mismatch + message. + +2003-08-05 16:36 king + + * Source/: cmake.cxx, cmake.h: ENH#61: cmake and ccmake now support + passing the path to a CMakeCache.txt file as an argument. Its + settings will be loaded. + +2003-08-05 16:04 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG#92 - Added XML + escaping for <, >, and &. + +2003-08-05 15:20 andy + + * Tests/SystemInformation/DumpInformation.cxx: BUG: Open as ascii + to remove extra new lines + +2003-08-05 15:10 king + + * Source/kwsys/: ProcessFwd9x.c, ProcessWin32.c: ENH: Added + show/hide window support. + +2003-08-05 14:27 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c: ENH: + Added SetOption/GetOption methods for platform-specific options. + +2003-08-05 13:53 king + + * Source/kwsys/ProcessUNIX.c: BUG: Can't close stdin. + +2003-08-05 11:34 king + + * Source/kwsys/ProcessUNIX.c: BUG: Added missing + zero-initialization of struct sigaction. + +2003-08-05 09:55 martink + + * Modules/: CMakeTestNMakeCLVersion.c, Platform/Windows-cl.cmake: + added test for whether pdbtype should be used for nmake + +2003-08-05 09:07 king + + * Source/kwsys/ProcessUNIX.c: BUG: GetErrorString should return + ErrorMessage buffer, not the pipe buffer. + +2003-08-05 09:07 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: minor fix + +2003-08-05 08:49 martink + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: added outputEcho method and fixed + make help for nmake and borland + +2003-08-04 17:08 king + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + ERR: Fixed typeo tests->test. + +2003-08-04 15:35 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: added make help target + first cut + +2003-08-04 14:34 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for debug libs on + UNIX + +2003-08-04 11:48 andy + + * Source/cmSystemTools.cxx: ENH: Improve paths on windows + +2003-08-04 07:55 andy + + * Source/cmSystemTools.cxx: ENH: Fix escaping on windows + +2003-08-04 07:12 andy + + * Source/cmSystemTools.cxx: ENH: Fix argument parsing on UNIX with + spaces + +2003-08-03 22:41 andy + + * Source/cmSiteNameCommand.cxx: ENH: Use new RunCommand + +2003-08-03 22:36 andy + + * Source/: cmCTest.cxx, cmCTest.h: ENH: Use new RunCommand + +2003-08-03 22:34 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmake.cxx, cmaketest.cxx: + ENH: Use the new RunCommand + +2003-08-03 22:33 andy + + * Source/: cmBuildNameCommand.cxx, cmTryRunCommand.cxx, + cmSiteNameCommand.cxx: ENH: Use the new signature + +2003-08-03 22:32 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add back the + kwsysProcess RunCommand, now is in parallel + +2003-08-03 20:47 andy + + * Source/cmGetCMakePropertyCommand.cxx, + Source/cmGetCMakePropertyCommand.h, Source/cmake.h, + Tests/SystemInformation/CMakeLists.txt, + Tests/SystemInformation/DumpInformation.cxx: ENH: Add accessor + for the list of commands + +2003-08-02 09:33 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h, cmMakefile.cxx: + BUG: Fix problem with uninitialized variables + +2003-08-01 19:13 andy + + * Modules/FindQt.cmake, Tests/Wrapping/CMakeLists.txt: ENH: Make it + work for QT 2.3 non commercial on windows + +2003-08-01 18:53 andy + + * Source/cmQTWrapUICommand.cxx: ENH: Make out of source work on + Windows + +2003-08-01 18:52 andy + + * Tests/Wrapping/CMakeLists.txt: ENH: Add more debug + +2003-08-01 18:52 andy + + * Source/CMakeLists.txt: ENH: Fix test for Visual Studio + +2003-08-01 17:11 andy + + * Modules/FindThreads.cmake: ENH: MAke it work on FreeBSD + +2003-08-01 16:48 andy + + * Modules/: CheckForPthreads.c, FindThreads.cmake: ENH: Do better + test for pthreads + +2003-08-01 16:48 andy + + * Modules/FindQt.cmake: ENH: Fix indentation + +2003-08-01 16:47 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Remove debug + +2003-08-01 15:41 hoffman + + * Tests/: Complex/Executable/complex.file.cxx, + ComplexOneConfig/Executable/complex.file.cxx, + ComplexRelativePaths/Executable/complex.file.cxx: add missing + file + +2003-08-01 15:33 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Dependency lists + are now split into multiple make lines to allow longer lists on + limited make programs. + +2003-08-01 15:33 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Add support for + -pthread + +2003-08-01 15:27 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Adding link flags + to an executable that links to shared libraries must be done for + both EXECUTABLE and WIN32_EXECUTABLE targets. + +2003-08-01 14:34 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt: BUG (85): + allow . to be in the name of an executable + +2003-08-01 14:10 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h, cmMakefile.cxx, + cmake.cxx: ENH: Allow specifying cmake variables on the command + line without specifying the type Bug #118 - Specifying cache + entries with -D should not need the type + +2003-08-01 14:10 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: all Makefiles now have + both full path to exe and short version + +2003-08-01 13:54 martink + + * Source/cmUtilitySourceCommand.cxx: fix for utility command + without EXECUTABLE_OUTPUT_PATH + +2003-08-01 13:24 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Syntax cleanup + +2003-08-01 13:13 hoffman + + * Source/: cmGlobalNMakeMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + ENH: allow lib prefix for to stay for nmake and borland make as + it is not a system prefix + +2003-08-01 13:00 martink + + * CMakeLists.txt: change lib path back to empty + +2003-08-01 12:49 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Fix echo's to use + @echo. This way verbose mode does not print twice: Bug #45 - add + @ from echo commands + +2003-08-01 11:58 martink + + * CMakeLists.txt: made more options advanced + +2003-08-01 09:18 andy + + * Tests/Wrapping/CMakeLists.txt: ERR: Only link qt to qt executable + +2003-08-01 09:11 martink + + * Source/cmExportLibraryDependencies.cxx: fix for bug # 101 + +2003-08-01 08:47 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: more reverting back + +2003-07-31 16:43 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: when creating rule + files remove the IntDir + +2003-07-31 16:30 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: fix for spaces + +2003-07-31 15:32 hoffman + + * Source/cmTarget.cxx: ENH: add support for OBJECT_DEPENDS for + visual studio + +2003-07-31 14:46 martink + + * Source/cmMakefile.cxx: bug fix for bug # 117 + +2003-07-31 13:15 andy + + * Modules/FindwxWindows.cmake: made a minor bugfix on my + FindwxWindows.cmake. I capsulated the regular expression + matching for the libdrs with another IF (line 355). By: Jan + Woetzel + +2003-07-31 08:55 andy + + * Source/WXDialog/CMakeLists.txt: ENH: Fix wx test + +2003-07-31 08:50 andy + + * Tests/Wrapping/CMakeLists.txt: ERR: Attempt to fix wrapping on + Windows + +2003-07-31 08:33 andy + + * Tests/Wrapping/Wrap.c: ENH: Fix problem on HP. Whay should K&R be + default? + +2003-07-30 15:38 andy + + * Modules/FindQt.cmake: ENH: when linking in QT, we should also + link DL, since QT uses them + +2003-07-30 13:39 andy + + * Modules/FindQt.cmake: ENH: QT if it is multi threaded should link + in threads + +2003-07-30 13:28 andy + + * Tests/Wrapping/: CMakeLists.txt, foo.ui.in: ENH: Really test uic + and perform configured uic test + +2003-07-30 13:27 andy + + * Source/cmQTWrapUICommand.cxx: ENH: Allow qt ui files being it the + binary dir. Bug #110 - QT_WRAP_UI problem on out-of-source builds + +2003-07-30 13:14 andy + + * Source/WXDialog/CMakeLists.txt: ENH: Revert back + +2003-07-30 13:11 andy + + * Source/: cmaketest.cxx, WXDialog/CMakeLists.txt: ENH: Also fail + when make failsSource/cmaketest.cxx + +2003-07-30 13:10 andy + + * Tests/Wrapping/: CMakeLists.txt, Wrap.c: ENH: Add executable for + wrapping test, so that make stage actually passes + +2003-07-29 18:06 andy + + * Source/cmGlob.cxx: ENH: Speedup globbing and attempt to fix + cygwin problem + +2003-07-29 17:15 andy + + * Modules/FindQt.cmake: ENH: Use FindX11 when doing Qt on unix + +2003-07-29 13:36 andy + + * Modules/Use_wxWindows.cmake: ENH: Add Use file for wxWindows. + Thanks Jan Woetzel + +2003-07-29 07:41 andy + + * Modules/FindwxWindows.cmake: ENH: Improved find module. Thank you + Jan Woetzel + +2003-07-29 07:01 andy + + * Source/cmAddCustomCommandCommand.cxx: ENH: Fix typo: Bug #100 - + Spelling correction to an error message + +2003-07-28 18:12 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, cmMakeDepend.cxx, + cmMakeDepend.h: ENH: performance fixes for network depends + +2003-07-28 14:43 hoffman + + * Source/: cmSourceGroupCommand.cxx, cmSourceGroupCommand.h: ENH: + put back old style call to SOURCE_GROUP, no need to break things + for this + +2003-07-28 13:40 hoffman + + * Source/cmake.cxx: BUG: make sure initial cache file read only + reads one file, and does not look for CMakeLists.txt files on the + entire disk + +2003-07-25 13:39 hoffman + + * Source/cmake.cxx: add a better message for the GUI if no + CMakeLists.txt file is found. + +2003-07-25 12:50 hoffman + + * Tests/Wrapping/CMakeLists.txt: for unix add x11 and pthreads for + qt + +2003-07-24 11:53 andy + + * Source/cmGlob.cxx: ENH: Remove warning + +2003-07-24 11:37 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for utility depends + bug#76 + +2003-07-24 11:33 king + + * Source/CMakeLists.txt, Tests/FindPackageTest/CMakeLists.txt, + Tests/FindPackageTest/FindPackageTest.cxx: ENH: Added + FindPackageTest to improve coverage. + +2003-07-24 11:32 king + + * Source/: cmFindPackageCommand.cxx, cmFindPackageCommand.h: ENH: + Implemented QUIET argument propagation to FOO_FIND_QUIETLY + setting in FindFOO.cmake module that is found. + +2003-07-24 11:24 king + + * Source/MFCDialog/CMakeCommandLineInfo.cpp: BUG: Fix for network + path argument parsing. + +2003-07-24 11:12 andy + + * Source/cmGlob.cxx: ENH: On windows handle network paths + +2003-07-24 11:06 king + + * Modules/FindVTK.cmake: ENH: Improved error message for VTK_DIR + not found to refer to it as a cache entry. Some users thought + this was supposed to be an environment variable. + +2003-07-24 10:58 king + + * Source/CMakeLists.txt, Source/cmDumpDocumentation.cxx, + Tests/CommandLineTest/CMakeLists.txt, + Tests/CommandLineTest/CommandLineTest.cxx, + Tests/StringFileTest/CMakeLists.txt: ENH: Added CommandLineTest + to add coverage for command line arguments to cmake executables. + This replaces the old DumpDocumentation test. + +2003-07-23 18:01 andy + + * Tests/StringFileTest/CMakeLists.txt: ENH: More coverage + +2003-07-23 17:59 king + + * Utilities/CMakeLists.txt: ENH: Added build of documentation for + CMakeSetup. + +2003-07-23 17:40 king + + * Source/MFCDialog/CMakeSetup.cpp: ENH: Added support for + documentation options. + +2003-07-23 17:31 king + + * Source/MFCDialog/: CMakeCommandLineInfo.cpp, + CMakeCommandLineInfo.h: ENH: Added construction of original + command line in argc/argv style. + +2003-07-23 17:28 king + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h: ENH: + Improved behavior when run with arguments from the command line. + +2003-07-23 17:27 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: + CheckOptions now takes const argv. + +2003-07-23 15:45 king + + * Source/cmSourceGroupCommand.cxx: ENH: Added backwards + compatability. + +2003-07-23 15:32 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx, + cmSourceGroup.cxx, cmSourceGroup.h, cmSourceGroupCommand.cxx, + cmSourceGroupCommand.h: ENH: Fully implemented SOURCE_GROUP + command. + +2003-07-23 14:31 andy + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: ENH: Fix compatibility + +2003-07-23 10:39 king + + * Source/cmSourceGroupCommand.cxx: BUG: Fixed off-by-one error in + file list loop. Fix submitted by David A. Karr. + +2003-07-23 10:26 andy + + * Source/cmGlob.cxx: ENH: On windows and apple handle + lowercase/upercase file name problem + +2003-07-23 09:10 king + + * Tests/StringFileTest/CMakeLists.txt: ENH: Added more verbose + output of what globbing results. + +2003-07-23 08:58 king + + * Utilities/CMakeLists.txt: BUG: Don't install ccmake documentation + if no ccmake was built. + +2003-07-23 08:37 king + + * bootstrap: ENH: Adding forced settings for prefix, docdir, + mandir, and datadir. + +2003-07-22 17:09 andy + + * DartConfig.cmake: ENH: Direct link to cmake bugs + +2003-07-22 13:53 andy + + * Source/cmCPluginAPI.cxx: ERR: Fix error on bad C++ compiler that + do not handle return void + +2003-07-22 13:15 andy + + * Source/cmTarget.cxx: BUG: Fix copy/paste typo + +2003-07-22 13:14 andy + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: ENH: Add DisplayStatus + +2003-07-22 12:21 andy + + * Tests/: LoadCommand/LoadedCommand.cxx, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: ENH: More + coverage + +2003-07-22 11:17 andy + + * Tests/StringFileTest/CMakeLists.txt: ENH: More coverage + +2003-07-22 10:45 andy + + * Tests/StringFileTest/CMakeLists.txt: ENH: Increase coverage + +2003-07-21 17:14 king + + * Utilities/CMakeLists.txt: ENH: Added generation of ccmake + documentation on UNIX. + +2003-07-21 17:13 king + + * Source/CursesDialog/ccmake.cxx: ENH: Added introduction paragraph + to documentation. + +2003-07-21 16:38 king + + * CMakeLists.txt, bootstrap, Modules/CMakeLists.txt, + Modules/Platform/CMakeLists.txt, Source/CMakeLists.txt, + Source/cmCommands.cxx, Source/cmConfigure.cmake.h.in, + Source/cmake.cxx, Templates/CMakeLists.txt, + Utilities/CMakeLists.txt: ENH: Added optional configuration of + data/doc/man dirs. This will be useful for package maintainers. + +2003-07-21 16:37 king + + * Source/: InitialConfigureFlags.cmake.in, cmConfigure.h.in: + Removing old file. This was used by old configure script which + has been removed. + +2003-07-21 15:29 andy + + * Source/cmGlob.cxx, Tests/StringFileTest/CMakeLists.txt: ENH: fix + glob on windows and add glob recurse test + +2003-07-21 15:02 king + + * Source/CMakeLists.txt: ENH: Added generation of cmake + documentation during build preocess. + +2003-07-21 14:58 king + + * Source/cmDocumentation.cxx: BUG: Text dump of documentation + should be in ascii mode. + +2003-07-21 14:57 king + + * Source/cmAddCustomTargetCommand.h: BUG: Fixed documentation + formatting. + +2003-07-21 14:44 andy + + * Source/: cmSourceFilesCommand.cxx, cmSourceFilesCommand.h: ENH: + Use new deprecation mechanism + +2003-07-21 14:43 andy + + * Source/cmFileCommand.h: ENH: Fix comment + +2003-07-21 14:42 andy + + * Source/: cmCommand.h, cmMakefile.cxx: ENH: Initial framework for + deprecated commands + +2003-07-21 13:48 andy + + * Tests/StringFileTest/CMakeLists.txt: ENH: add more coverage tests + +2003-07-21 13:46 andy + + * Source/cmGlob.cxx: ENH: Handle ^ as [^fu] + +2003-07-17 14:56 andy + + * Tests/StringFileTest/CMakeLists.txt: ENH: Add additional new line + after the string to match the change in file command + +2003-07-17 14:56 andy + + * Source/cmFileCommand.cxx: ENH: Remove extra new line after the + written string + +2003-07-17 14:54 andy + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake, + CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckIncludeFileCXX.cmake, CheckIncludeFiles.cmake, + CheckLibraryExists.cmake, CheckSymbolExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake, + TestBigEndian.cmake, TestCXXAcceptsFlag.cmake: ENH: Extra new + line after output + +2003-07-16 15:38 hoffman + + * Modules/CMakeDetermineSystem.cmake, Source/cmGlobalGenerator.cxx: + ENH: set CMAKE_SYSTEM_VERSION for windows + +2003-07-16 14:52 king + + * Source/: cmFindPackageCommand.cxx, cmFindPackageCommand.h: ENH: + Added QUIET optional argument to block error message when _DIR + variable is not set. Also removed upper-casing of package name. + +2003-07-16 11:38 king + + * Tests/SystemInformation/: DumpInformation.cxx, + DumpInformation.h.in: ENH: Added dump of more files. Improved + robustness of dump. + +2003-07-15 12:52 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: remove local broken + implementation of convert to windows path + +2003-07-15 12:52 hoffman + + * Source/cmAddCustomCommandCommand.cxx: ENH: better error checking + +2003-07-14 10:33 king + + * Source/cmMakefile.cxx: BUG: Custom commands should have variables + expanded before comparing with previously added custom commands. + +2003-07-14 10:13 martink + + * Source/cmFLTKWrapUICommand.cxx: some updates + +2003-07-14 09:44 martink + + * Source/cmFLTKWrapUICommand.cxx: some updates + +2003-07-14 09:31 martink + + * Source/: cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h: some + updates + +2003-07-14 09:15 andy + + * Source/: cmFileCommand.cxx, cmFileCommand.h, cmGlob.cxx, + cmGlob.h: ENH: Recurse subdirectories + +2003-07-11 17:21 king + + * bootstrap: ENH: Removed cmsys include directory from bootstrap + build of kwsys. It is no longer needed. + +2003-07-11 16:29 king + + * Utilities/Release/cmake_release.sh: BUG: Update of release + utilities must maintain tag. + +2003-07-11 14:14 andy + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake, + CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckIncludeFileCXX.cmake, CheckIncludeFiles.cmake, + CheckLibraryExists.cmake, CheckSymbolExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake, Dart.cmake, + TestBigEndian.cmake, TestCXXAcceptsFlag.cmake: ENH: Replace + WRITE_FILE with FILE(WRITE and FILE(APPEND. Replace + MAKE_DIRECTORY with FILE(MAKE_DIRECTORY, replace STRING(ASCII + things + +2003-07-10 23:22 king + + * Source/cmake.h: ERR: Removed duplicate generator documentation.e + +2003-07-10 23:15 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmakemain.cxx: + ENH: Added SEE ALSO section to generated man page. Minor + formatting improvements for generated text-only documentation. + +2003-07-10 23:14 king + + * Source/cmake.h: ENH: Added CMAKE_STANDARD_INTRODUCTION macro + defining standard documentation for inclusion in every binary's + documentation. + +2003-07-10 23:14 king + + * Source/cmGlobalUnixMakefileGenerator.cxx: ENH: Wrote basic + description in full documentation block. + +2003-07-10 14:48 andy + + * Tests/StringFileTest/StringFile.cxx: ENH: Add missing include + +2003-07-10 14:46 king + + * Source/kwsys/CMakeLists.txt: ERR: Generated source files need + access to kwsysPrivate.h. Just copy it to the build tree. + +2003-07-10 14:35 andy + + * Source/cmStringCommand.cxx: ERR: Remove unused variable + +2003-07-10 14:32 king + + * Source/kwsys/: Base64.c, CMakeLists.txt, Directory.cxx, + EncodeExecutable.c, ProcessUNIX.c, ProcessWin32.c, + RegularExpression.cxx, SystemTools.cxx, kwsysPrivate.h: ENH: + Added use of KWSYS_HEADER macro in c and cxx files to include + kwsys headers through their configured namespace. + +2003-07-10 14:29 andy + + * Tests/StringFileTest/CMakeLists.txt, + Tests/StringFileTest/InputFile.h.in, + Tests/StringFileTest/StringFile.cxx, Source/CMakeLists.txt: ENH: + Add test for string and file commands + +2003-07-10 13:25 andy + + * Source/: cmStringCommand.cxx, cmStringCommand.h: ENH: Add upper + and lower case support. Close Bug #79 - STRING TOUPPER and + TOLOWER + +2003-07-09 17:25 king + + * Source/cmSystemTools.cxx: ENH: Added escape support for ( and ). + +2003-07-09 17:17 king + + * Source/: cmListFileCache.cxx, cmSystemTools.cxx: ENH: Added + support for # characters inside quoted arguments and for escaping + # in a non-quoted argument. Improved parsing speed by not + compiling regular expressions on blank lines. + +2003-07-09 16:18 king + + * Source/kwsys/ProcessUNIX.c: ERR: Using strncpy instead of + snprintf for portability. + +2003-07-08 16:33 andy + + * Source/: cmFileCommand.cxx, cmFileCommand.h: ENH: Add + MAKE_DIRECTORY and modify documentation + +2003-07-08 16:27 andy + + * Source/cmGlob.cxx: ENH: Remove commented code + +2003-07-08 14:18 andy + + * bootstrap, Source/CMakeLists.txt, Source/cmFileCommand.cxx, + Source/cmFileCommand.h, Source/cmGlob.cxx, Source/cmGlob.h: ENH: + Add globbing to FILE command + +2003-07-08 13:27 king + + * Source/cmMakefile.cxx: BUG#65: Fixed inheritance of + CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR. + +2003-07-08 13:12 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h: ENH: + allow cancel and display of progress during cpu intensive + configure steps + +2003-07-08 09:21 andy + + * Source/kwsys/CMakeLists.txt: ENH: Fix example + +2003-07-08 00:28 king + + * Source/cmDocumentation.cxx: ERR: Added missing std::. + +2003-07-07 23:20 king + + * CMakeLists.txt, Source/cmDocumentation.cxx, + Source/cmDumpDocumentation.cxx, Source/cmStandardIncludes.h: ENH: + Improved name of cmake version variables. They are now + CMake_VERSION (major.minor) and CMake_VERSION_FULL + (major.minor.patch). + +2003-07-07 22:54 king + + * Source/cmStringCommand.h: BUG: Removed extra newlines from help + text. + +2003-07-07 22:44 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmakemain.cxx, + CursesDialog/ccmake.cxx: ENH: Added support to write multiple + help options with one command line. Output files can now also be + specified for the help options. + +2003-07-07 22:41 king + + * Source/kwsys/CMakeLists.txt: ERR: Removed useless set. + +2003-07-07 22:41 king + + * Source/cmCommands.cxx: ENH: Made ADD_DEPENDENCIES available from + bootstrapped cmake. It will be needed to build cmake. + +2003-07-07 21:52 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h, + cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalBorlandMakefileGenerator.h, + cmGlobalCodeWarriorGenerator.cxx, cmGlobalCodeWarriorGenerator.h, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmake.cxx, cmake.h, + cmakemain.cxx: ENH: Registered global generators are now kept in + a table in the cmake instance. Added support for documentation + with a Generators section. + +2003-07-07 18:27 king + + * Source/cmSystemTools.cxx: BUG: Parsing of arguments from string + by RunCommand before passing to Process execution does not work + with backslashes in path names. Until this is fixed, we cannot + use Process execution from kwsys. + +2003-07-07 17:52 andy + + * bootstrap: ENH: Fix bootstrap to include ProcessUNIX.c + +2003-07-07 17:47 andy + + * Source/: cmCommands.cxx, cmFileCommand.cxx, cmFileCommand.h: ENH: + Start working on a general file manipulation command + +2003-07-07 17:45 andy + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Add + optional argument to GetLineFromStream which can let the caller + know whether there was a new line character at the end of the + line that was just read + +2003-07-07 13:36 andy + + * Docs/cmake-syntax.vim: Initial import of VIM syntax highlighting + file + +2003-07-07 09:38 king + + * Source/kwsys/ProcessWin32.c: ENH: Made call to FormatMessage more + robust. + +2003-07-07 09:16 king + + * Source/cmSystemTools.cxx: ENH: Using new Process + SetWorkingDirectory method instead of manually implementing it. + +2003-07-07 09:12 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c: ENH: Implemented + SetWorkingDirectory method. + +2003-07-07 09:10 king + + * Source/kwsys/ProcessWin32.c: ENH: Implemented SetWorkingDirectory + method on Windows. + +2003-07-07 08:41 king + + * Source/cmSystemTools.cxx: ENH: Using kwsys Process implementation + to implement RunCommand. + +2003-07-07 08:36 andy + + * Source/kwsys/: Process.h.in, ProcessUNIX.c: ENH: Start working on + Working Directory support + +2003-07-06 20:40 king + + * Source/kwsys/ProcessWin32.c: ENH: Using GetTempPath instead of + TEMP environment variable to get a location to write the Win9x + forwarding executable. + +2003-07-03 18:33 king + + * Source/kwsys/ProcessWin32.c: BUG: Argument parsers do not always + remove double quotes from around an argument that has no spaces. + +2003-07-03 12:50 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: ENH: add linker flags + +2003-07-03 11:39 hoffman + + * Source/cmCreateTestSourceList.cxx: ENH: null terminate at the end + of the list + +2003-07-03 07:58 king + + * Source/kwsys/CMakeLists.txt: BUG: Install target for standard + header wrappers must point at the std subdirectory in the + installation. + +2003-07-02 10:48 andy + + * DartConfig.cmake: ENH: Add proper links to bugtracker + +2003-07-02 10:37 andy + + * DartConfig.cmake: ENH: Add links to bugtracker + +2003-07-02 08:35 king + + * Source/kwsys/ProcessWin32.c: ERR: Added cast to remove warning. + We know the length of the string will not be beyond 2^31. + +2003-07-01 13:32 king + + * Source/kwsys/Base64.c: ERR: Added casts to remove type conversion + warnings. Pointer differences can be 64-bit, but unsigned long + is 32-bit on many platforms. We know we are not traversing more + data than can be handled by an unsigned long, though, because the + length argument is an unsigned long. + +2003-07-01 13:27 king + + * Source/kwsys/: ProcessFwd9x.c, ProcessWin32.c: ERR: Should use %p + to pass HANDLE values on a command line, not %d. + +2003-07-01 13:27 king + + * Source/kwsys/SystemTools.cxx: ERR: Removed unreachable code. + +2003-07-01 11:40 king + + * Source/kwsys/: Base64.h.in, Process.h.in: ERR: Reduced + requirements on preprocessor for export macro due to limitations + of Mac preprocessor. The preprocessor can be fixed by using + -no-cpp-precomp, but we don't want to require that option for + every source file that includes our headers. + +2003-07-01 08:54 king + + * Source/kwsys/EncodeExecutable.c: ERR: Added explicit cast from + size_t to int. We know that the data will not be out of range. + +2003-06-30 10:50 andy + + * bootstrap: ERR: Fix changes in kwsys for Configure.h and + StandardIncludes.hxx + +2003-06-30 10:44 andy + + * Source/kwsys/: Base64.c, ProcessFwd9x.c, ProcessWin32.c: ERR: + Remove warnings on Windows + +2003-06-30 10:30 king + + * Source/kwsys/: Base64.h.in, CMakeLists.txt, Configure.h.in, + Directory.cxx, Directory.hxx.in, EncodeExecutable.c, + Process.h.in, ProcessWin32.c, RegularExpression.cxx, + RegularExpression.hxx.in, SystemTools.hxx.in: ENH: Added DLL + support. + +2003-06-30 10:12 martink + + * Tests/CustomCommand/CMakeLists.txt: modified code to match cmake + mode + +2003-06-30 10:07 king + + * Source/kwsys/StandardIncludes.hxx.in: Removing old file. + +2003-06-30 09:56 andy + + * bootstrap: ENH: Fix checking for C++ compiler on Mac, remove + cmConfigure.h.tmp, so that nothing bad can happen if configure is + interrupted, reports kwsys sources in cmConfigure.h + +2003-06-30 08:49 king + + * Source/kwsys/Base64.h.in: ENH: Updated comments for doxygen. + +2003-06-30 08:48 king + + * Source/kwsys/Base64.c: BUG: Should define KWSYS_IN_BASE64_C, not + KWSYS_IN_PROCESS_C. + +2003-06-30 08:48 king + + * Source/kwsys/CMakeLists.txt: ENH: Using FOREACH to shorten + enabling of C components. + +2003-06-29 21:42 andy + + * CMakeLists.txt, Source/kwsys/Base64.c, Source/kwsys/Base64.h.in, + Source/kwsys/CMakeLists.txt: ENH: Initial import of Base64 + +2003-06-29 20:30 king + + * CMakeLists.txt: ENH: Enabling build of kwsys's Process class. + This will be needed for ctest. + +2003-06-29 20:20 king + + * Docs/cmake-mode.el: ENH: Added comment-region support. + +2003-06-27 09:48 king + + * CMakeLists.txt: ERR: Disabling multiply defined symbols warning + for linking executables on IRIX. The compiler's prelinker does + not add weak symbols, so template instantiations are duplicated. + +2003-06-27 08:46 martink + + * Source/: cmAuxSourceDirectoryCommand.cxx, + cmTryCompileCommand.cxx: fix compiler warnings + +2003-06-26 13:39 king + + * Source/kwsys/CMakeLists.txt: ENH: Updated documentation to + describe enabling of classes. + +2003-06-26 09:44 andy + + * bootstrap: ENH: Attempt to handle OSF compiler flags + +2003-06-25 09:32 king + + * Source/kwsys/testProcess.c: ERR: Fixed use of non-constant + initializer. + +2003-06-25 08:29 king + + * Source/kwsys/Directory.cxx: ERR: Fixed conversion warning. + +2003-06-24 21:37 lorensen + + * Source/kwsys/SystemTools.cxx: ERR: portability. + +2003-06-24 16:35 martink + + * Source/kwsys/SystemTools.cxx: compiler fix + +2003-06-24 15:24 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: moved depend code into + cmTarget + +2003-06-24 15:21 martink + + * Source/: cmMakefile.cxx, cmMakefile.h, kwsys/SystemTools.cxx: + performance improvements + +2003-06-24 15:11 martink + + * Source/cmMacroCommand.cxx: performance improvements + +2003-06-24 15:10 martink + + * Source/: cmTarget.cxx, cmTarget.h: moved function into cmTarget + +2003-06-24 10:16 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ERR: Renamed + superclass typedef from SystemTools to Superclass to avoid + conflict across platforms. + +2003-06-24 09:02 king + + * Source/kwsys/SystemTools.cxx: ERR: std->kwsys_std. + +2003-06-24 08:19 king + + * Source/cmSystemTools.h: ERR: Typedefs are not inherited on SGI + and Borland. + +2003-06-23 16:26 martink + + * Source/: cmForEachCommand.cxx, cmMacroCommand.cxx: perf + improvement + +2003-06-23 16:25 martink + + * Source/cmCustomCommand.h: performance improvement + +2003-06-23 14:10 king + + * CMakeLists.txt, bootstrap, Source/CMakeLists.txt, + Source/cmBuildNameCommand.cxx, Source/cmCTest.cxx, + Source/cmCacheManager.cxx, Source/cmConfigureFileCommand.cxx, + Source/cmIfCommand.cxx, Source/cmListFileCache.cxx, + Source/cmLoadCacheCommand.cxx, + Source/cmLocalCodeWarriorGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmMakeDepend.cxx, Source/cmMakeDepend.h, + Source/cmMakefile.cxx, Source/cmRegularExpression.cxx, + Source/cmRegularExpression.h, Source/cmSiteNameCommand.cxx, + Source/cmSourceGroup.h, Source/cmStringCommand.cxx, + Source/cmSystemTools.cxx, Source/cmUseMangledMesaCommand.cxx, + Source/cmaketest.cxx: ENH: Merged use of the kwsys + RegularExpression class instead of cmRegularExpression. + +2003-06-23 14:05 king + + * Source/kwsys/RegularExpression.hxx.in: ERR: Fixed documentation + to read RegularExpression instead of cmRegularExpression. + +2003-06-23 11:16 martink + + * Source/cmTarget.cxx: removed some no longer required code + +2003-06-23 08:58 king + + * CMakeLists.txt, bootstrap, Source/CMakeLists.txt, + Source/cmAuxSourceDirectoryCommand.cxx, Source/cmDirectory.cxx, + Source/cmDirectory.h, Source/cmMakeDirectoryCommand.cxx, + Source/cmMakefile.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTryCompileCommand.cxx, + Source/CursesDialog/cmCursesPathWidget.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt: ENH: Merged + use of kwsys library. + +2003-06-23 08:58 king + + * Makefile.in, configure, configure.in, Source/Makefile.in: ENH: + Configure script now just invokes bootstrap script. + +2003-06-23 08:56 king + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: ENH: Removed + cmake-specific functions. + +2003-06-23 08:56 king + + * Source/kwsys/CMakeLists.txt: BUG: Need include regular expression + to match all files. + +2003-06-21 11:57 andy + + * bootstrap: ENH: Add copyright, cmConfigure.h is now touched only + when it is modified, remove some spaces from output, add + procedure that copies file and replaces atstring with another + string + +2003-06-20 20:33 martink + + * Source/cmMakefile.cxx: fix to expand variables in custom command + outputs and main dependencies + +2003-06-20 14:10 king + + * Source/kwsys/CMakeLists.txt: ENH: Changed configuration of header + directory to specify it without the namespace. + +2003-06-20 14:10 hoffman + + * Docs/cmake-mode.el: BUG: fix highlight for comments in multiple + buffers + +2003-06-20 13:56 martink + + * Source/cmMakefile.cxx: bug in not expanding variables for custom + commands in targets + +2003-06-20 11:23 martink + + * Source/cmMakefile.cxx: minor perf improvement + +2003-06-19 18:57 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + RegularExpression.hxx.in, SystemTools.hxx.in, + kwsys_std_fstream.h.in, kwsys_std_iosfwd.h.in, + kwsys_std_iostream.h.in, kwsys_std_sstream.h.in: ENH: Added full + configuration of namespace even for Configure.hxx macro + definitions. + +2003-06-19 16:23 hoffman + + * Docs/cmake-mode.el: add a comment + +2003-06-19 15:05 king + + * Docs/: cmake-indent.vim, cmake-mode.el: Added copyright. + +2003-06-19 14:37 andy + + * Docs/cmake-indent.vim: Initial import: indentation file for vim + +2003-06-19 14:30 king + + * Docs/cmake-mode.el: Minor tweaks for anal cases of indentation. + +2003-06-19 14:27 martink + + * Source/cmMakefile.cxx: bug fix for finding source files + +2003-06-19 14:27 martink + + * Source/: cmSystemTools.cxx, cmSystemTools.h: new function + +2003-06-19 14:17 king + + * Docs/cmake-mode.el: BUG: Don't open a block if a command starts + with IF in its name. + +2003-06-19 13:38 martink + + * Docs/cmake-mode.el: fix to use function-name + +2003-06-19 13:23 king + + * Docs/cmake-mode.el: Fixed slow regex for indentation. + +2003-06-19 11:11 king + + * Docs/cmake-mode.el: ENH: Wrote more robust regular expressions + for indenting. + +2003-06-19 11:07 martink + + * Docs/cmake-mode.el: emacs mode + +2003-06-18 17:28 king + + * Source/kwsys/kwsysHeaderDump.pl: Tool to dump macros for + redefining C header namespaces. + +2003-06-18 17:27 king + + * Source/kwsys/: CMakeLists.txt, testProcess.c: ENH: Added test for + Process implementation. + +2003-06-18 17:27 king + + * Source/kwsys/ProcessWin32.c: BUG: Must return Exception status + correctly. + +2003-06-18 17:19 king + + * Source/kwsys/ProcessUNIX.c: Removed Exception_Abort because there + is no windows version. Also made ExitValue consistent with + windows when a signal kills the process. + +2003-06-18 17:19 king + + * Source/kwsys/Process.h.in: Removed Exception_Abort because there + is no windows version. Also removed stray typedef keywords. + +2003-06-18 17:06 king + + * Source/kwsys/: Process.h.in, ProcessUNIX.c, ProcessWin32.c, + test1.cxx: ENH: Added documentation to interface. Finished + process exit code interpretation implementation prototype. + +2003-06-18 11:43 hoffman + + * Source/cmStringCommand.h: remove non-html safe stuff + +2003-06-18 09:13 hoffman + + * Source/cmMakefile.cxx: BUG: fix not being able to find generated + files in the binary tree + +2003-06-17 17:13 martink + + * Source/cmLocalVisualStudio7Generator.cxx: fix for bad assumption + on custom rules + +2003-06-17 16:54 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fix for bad assumption + +2003-06-17 15:13 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fix for bad assumption + +2003-06-16 10:20 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fix for vs6 rule files + +2003-06-13 16:59 king + + * Source/cmMakefile.cxx: BUG: Fixed translation of relative path + names to full path names. + +2003-06-13 16:47 king + + * Source/cmSetSourceFilesPropertiesCommand.cxx: BUG: Fixed crash + when source file cannot be looked up correctly. + +2003-06-13 14:15 king + + * Source/cmake.cxx: BUG: Fixed check for existence of + CMakeLists.txt file in top-level source directory before first + configure. + +2003-06-12 16:43 king + + * Modules/Platform/Windows-bcc32.cmake: BUG: Stack size in + generated programs should be 10 meg, not 256. + +2003-06-12 16:18 king + + * Source/kwsys/ProcessWin32.c: ERR: Added error check for malloc of + process control structure. + +2003-06-12 15:58 king + + * Source/kwsys/ProcessWin32.c: ERR: Using GetCurrentProcessId + instead of _getpid so we don't need to include the system + process.h header. Also creating pipe threads with 1K stacks to + save memory. + +2003-06-11 11:00 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Uninitialized + std::string returns bad pointers from c_str() on some platforms. + +2003-06-11 10:21 king + + * Source/kwsys/CMakeLists.txt: ENH: EXECUTABLE_OUTPUT_PATH is now + always set to get around cmake 1.6.7 dependency problems. Moved + default header directory inside the build tree instead of up one + level. User projects can now set the header directory. + +2003-06-11 10:11 hoffman + + * Modules/CMakeDetermineSystem.cmake: ENH: add processor type of + win32 + +2003-06-11 10:07 hoffman + + * Modules/: CMakeDetermineSystem.cmake, CMakeSystem.cmake.in: ENH: + add CMAKE_SYSTEM_PROCESSOR + +2003-06-11 09:45 king + + * Source/kwsys/CMakeLists.txt: ERR: Added custom command that takes + advantage of new syntax. + +2003-06-11 09:44 king + + * Source/kwsys/ProcessWin32.c: ERR: Removed unused variables. + +2003-06-11 09:44 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: When executable + output path is not set, we still need to generate the full path + to the executable target. + +2003-06-10 17:39 king + + * Source/kwsys/CMakeLists.txt: ERR: Added work-around for cmake + 1.6.7 bug in borland makefile generator. + +2003-06-10 16:56 king + + * Source/kwsys/CMakeLists.txt: BUG: Need to add ANSI C flags for + some platforms. + +2003-06-10 16:55 king + + * Source/kwsys/ProcessUNIX.c: ERR: Added static specifier to static + function definitions to quiet warnings on HP compiler. + +2003-06-10 16:15 king + + * Source/kwsys/ProcessWin32.c: BUG: Don't show a console + application's window. + +2003-06-10 15:50 king + + * Source/kwsys/test1.cxx: ENH: Added use of process execution. + +2003-06-10 15:46 king + + * Source/kwsys/: CMakeLists.txt, EncodeExecutable.c, Process.h.in, + ProcessFwd9x.c, ProcessUNIX.c, ProcessWin32.c: ENH: Added Process + execution implementation. + +2003-06-10 15:45 king + + * Source/kwsys/SystemTools.cxx: ENH: Moved disabling of warnings to + after kwsys includes. + +2003-06-10 15:44 king + + * Source/kwsys/kwsys_std.h.in: ENH: Disabled warning 4786. + +2003-06-06 09:58 andy + + * Modules/FindVTK.cmake: BUG: When VTK is not found, it should be + fatal error + +2003-06-06 09:57 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: When only loading + ccmake cache, do not allow generate + +2003-06-06 09:06 martink + + * Source/cmCreateTestSourceList.cxx: undid change because other + changes make it no longer neccesary + +2003-06-05 16:45 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: more custom command + +2003-06-05 16:12 martink + + * Source/cmMakefile.cxx: more changes to support full paths + +2003-06-05 15:28 martink + + * Source/cmMakefile.cxx: perf improvement + +2003-06-05 15:18 martink + + * Source/cmMakefile.cxx: more changes to handle full paths + correctly + +2003-06-05 14:48 martink + + * Source/cmQTWrapUICommand.cxx: minor update for new custom + commands + +2003-06-05 14:40 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx, cmTarget.cxx: + more crazt changes source files now must match with full path + +2003-06-05 14:37 martink + + * Source/cmITKWrapTclCommand.cxx: updated for new custom command + +2003-06-05 14:37 martink + + * Source/cmCreateTestSourceList.cxx: minor fix + +2003-06-04 19:04 martink + + * Source/cmMakefile.cxx: hopeful fix for backwards compat + +2003-06-04 18:50 martink + + * Source/cmLocalVisualStudio6Generator.cxx: minor fix + +2003-06-04 16:06 martink + + * Source/cmMakefile.cxx: tricky fix for backwards compat + +2003-06-04 14:25 hoffman + + * Tests/CustomCommand/: generator.cxx, wrapper.cxx: minor fixes + +2003-06-04 14:01 hoffman + + * Source/cmMakefile.cxx: better error reporting + +2003-06-04 14:00 hoffman + + * Source/cmMakefile.cxx: ENH: allow duplicate commands with the + same output to be reduced automatically to one command + +2003-06-04 13:55 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: bug fix for vs6 custom + commands + +2003-06-04 13:54 hoffman + + * Templates/UtilityHeader.dsptemplate: fix for new custom commands + +2003-06-04 13:42 hoffman + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, + cmLocalVisualStudio7Generator.cxx, cmMakefile.cxx: ENH: allow + duplicate commands with the same output to be reduced + automatically to one command + +2003-06-04 11:46 hoffman + + * Source/cmAddCustomCommandCommand.h: command should nto be + inherited + +2003-06-04 10:46 hoffman + + * Tests/Wrapping/CMakeLists.txt: minor fix + +2003-06-04 10:13 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: bug fix + +2003-06-04 09:02 hoffman + + * Tests/CustomCommand/: CMakeLists.txt, generator.c, generator.cxx, + wrapper.c, wrapper.cxx: fixes for HP + +2003-06-04 09:00 king + + * bootstrap: ERR: Cannot use iostream.h for strict C++ compiler + sanity check. Using a small class instead. + +2003-06-04 08:42 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: compielr warnings + +2003-06-04 08:40 martink + + * Source/cmMakefile.cxx: compielr errors on como + +2003-06-03 14:55 martink + + * Source/: cmCustomCommand.cxx, cmLocalUnixMakefileGenerator.cxx, + cmMakefile.cxx, cmSourceGroup.cxx: warning fixes + +2003-06-03 14:45 hoffman + + * Modules/Dart.cmake: ENH: add all targets for dashboard build + types + +2003-06-03 10:47 martink + + * Source/: cmAddCustomCommandCommand.h: better docs + +2003-06-03 10:33 martink + + * Tests/CustomCommand/: CMakeLists.txt, doc1.tex, foo.in, + generator.c, wrapper.c, wrapped.h: new test + +2003-06-03 10:30 martink + + * Source/: CMakeLists.txt, cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmCPluginAPI.cxx, cmCPluginAPI.h, + cmCustomCommand.cxx, cmCustomCommand.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakefile.cxx, cmMakefile.h, + cmSetSourceFilesPropertiesCommand.cxx, cmSourceFile.h, + cmSourceGroup.cxx, cmSourceGroup.h, cmSystemTools.cxx, + cmSystemTools.h, cmTarget.h: yikes added new custom command + support + +2003-06-02 16:37 martink + + * Docs/: CMake04.rtf, CMake12p2.rtf, CMake14.rtf, CMake16.rtf: add + release docs to cvs + +2003-05-29 15:30 martink + + * Source/: cmGetSourceFilePropertyCommand.cxx, + cmGetTargetPropertyCommand.cxx: minor bug fix + +2003-05-29 11:14 andy + + * Source/CursesDialog/: ccmake.cxx, cmCursesMainForm.cxx, + cmCursesMainForm.h: ENH: On envocation of ccmake check if + directories are correct, but do not rerun configure + +2003-05-29 11:14 andy + + * Source/: cmake.cxx, cmake.h: ENH: Abstract pre configure check in + a separate method + +2003-05-29 09:34 hoffman + + * Source/: cmCTest.cxx, cmRegularExpression.cxx, + cmSetSourceFilesPropertiesCommand.cxx, cmTarget.cxx: ENH: remove + warnings from borland 6 compiler + +2003-05-28 15:52 andy + + * Source/CursesDialog/ccmake.cxx: ENH: Do not do configure first + time. This way ccmake loads fast. + +2003-05-28 09:21 hoffman + + * Source/: cmCTest.cxx, cmDynamicLoader.cxx, + cmGlobalVisualStudio71Generator.cxx, cmSystemTools.cxx, + CTest/cmCTestSubmit.cxx: Remove some borland 6 warnings + +2003-05-28 07:53 andy + + * Modules/FindQt.cmake: ENH: More locations + +2003-05-24 10:07 hoffman + + * Source/: cmAbstractFilesCommand.cxx, cmEndIfCommand.cxx, + cmGlobalGenerator.cxx, cmIfCommand.cxx, cmSourceFilesCommand.cxx, + cmSourceFilesRemoveCommand.cxx, cmTarget.cxx, + cmWrapExcludeFilesCommand.cxx: ENH: add stdlib.h for portability + to borland 6 + +2003-05-23 16:40 hoffman + + * Source/: cmCTest.cxx, cmMakefile.cxx, cmStringCommand.cxx, + cmake.cxx: ENH: add some includes for borland 6 + +2003-05-23 09:35 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: ENH: add LDFLAGS as + an initial value for all linker flags, good for -64 + +2003-05-19 13:41 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for .def files and + nmake and spaces in the path + +2003-05-16 16:33 king + + * Modules/: TestForAnsiForScope.cxx: ERR: Removed warning for + unused variable. + +2003-05-16 15:20 king + + * Source/: cmLocalUnixMakefileGenerator.cxx: BUG: When building a C + executable, we should add CMAKE_SHARED_LIBRARY_C_FLAGS, not + CMAKE_SHARED_LIBRARY_LINK_FLAGS. The latter is already added by + the link line procedure. + +2003-05-16 15:18 king + + * Modules/Platform/: AIX.cmake: BUG: Need -brtl when creating + shared libraries. Also added -bexpall (AIX equivalent to Linux's + -rdynamic) when building executables. + +2003-05-15 15:15 king + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: Don't report an + error of output was generated but no error was set. Merging from + trunk to 1.6 branch. + +2003-05-15 15:05 king + + * Source/cmGlobalVisualStudio6Generator.cxx: Removed useless + lower-casing and improved error message. Merged from trunk to + 1.6 branch. + +2003-05-15 14:58 king + + * Modules/FindFLTK.cmake: Looking in another place (merge from + trunk). + +2003-05-15 14:54 king + + * Source/CursesDialog/cmCursesStringWidget.cxx: Attempt to fix SGI + ccmake problem (thank you Clint Miller). Merging from trunk to + 1.6 branch. + +2003-05-15 14:45 king + + * Source/cmMacroCommand.cxx: BUG: Merging fix from trunk into 1.6 + branch. Report a missing ENDMACRO. + +2003-05-15 09:35 andy + + * bootstrap: Several fixes before bootstrap is ready for + prime-time: 1. Add --version flag to display version of CMake 2. + Add comments to explain what is going on 3. Move CMAKE_ROOT_DIR + and CMAKE_BOOTSTRAP to cmConfigure.h 4. Forward CC, CXX, and MAKE + to cmake 5. Add more instructions + +2003-05-14 15:38 king + + * Utilities/Release/cmake_release.sh: Updated for 1.6.7 release. + +2003-05-14 14:14 king + + * Source/cmMakefile.h, Source/WXDialog/CMakeLists.txt, + Utilities/Release/cmake_release.sh: ENH: Updated version number + to 1.6.7 from 1.6.6. + +2003-05-14 12:10 king + + * Source/cmGlobalGenerator.cxx: BUG: Work-around for SGI MipsPro + bug where #error doesn't return an error to make. Merged onto + 1.6 branch from trunk. + +2003-05-14 12:06 king + + * Source/cmGlobalGenerator.cxx: BUG: Work-around for SGI MipsPro + bug where #error doesn't return an error to make. + +2003-05-14 10:34 king + + * Source/MFCDialog/: CMakeSetupDialog.cpp: ENH: Default generator + selection for VS 7.1 added. + +2003-05-14 09:27 andy + + * bootstrap: ENH: Add parallel build support, fix bug in verbose + and clean output when adding arguments + +2003-05-14 09:19 andy + + * bootstrap: ENH: Add better error reporting + +2003-05-14 08:45 king + + * Source/cmake.cxx: BUG: Need to remove the MAKEFLAGS when cmake + starts. If cmake is run from inside make, we don't want the + try-compiles to inherit the makeflags. + +2003-05-14 08:40 king + + * Source/cmake.cxx: ERR: Fixed string literal->char* conversion + warning. + +2003-05-13 16:51 king + + * Source/cmake.cxx: BUG: Need to remove the MAKEFLAGS when cmake + starts. If cmake is run from inside make, we don't want the + try-compiles to inherit the makeflags. + +2003-05-13 16:10 king + + * Source/: cmGlobalGenerator.cxx, cmake.cxx: ENH: When the + initially configured generator is invalid, allow the user to + change the generator without deleting the cache by hand. + +2003-05-13 14:26 king + + * Source/: cmGlobalGenerator.cxx: ENH: Improved error message when + a wrong generator is selected. + +2003-05-13 14:05 king + + * Source/cmDynamicLoader.cxx: ERR: Removed unused parameter. + +2003-05-13 13:54 king + + * Source/cmSystemTools.cxx: ERR: Removed unused variable from + previous merge. + +2003-05-13 13:52 king + + * Source/: cmCacheManager.cxx, cmConfigureFileCommand.cxx, + cmListFileCache.cxx, cmLocalVisualStudio6Generator.cxx, + cmMakeDepend.cxx, cmOutputRequiredFilesCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmUseMangledMesaCommand.cxx: + BUG: Using GetLineFromStream instead of getline due to buggy + stream implementations on some platforms. Merged from trunk into + branch 1.6. + +2003-05-13 13:26 hoffman + + * Modules/CMakeVS71FindMake.cmake, Source/CMakeLists.txt, + Source/cmGlobalVisualStudio71Generator.cxx, + Source/cmGlobalVisualStudio71Generator.h, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, Source/cmake.cxx: ENH: + Adding VS 7.1 generator to 1.6 branch. + +2003-05-13 12:04 king + + * Modules/CheckIncludeFiles.cmake, Modules/CheckSymbolExists.cmake, + Modules/FindCABLE.cmake, Modules/Platform/SunOS.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalVisualStudio6Generator.cxx, + Source/cmLocalVisualStudio7Generator.cxx, + Source/cmLocalVisualStudio7Generator.h, + Source/cmRemoveCommand.cxx, Source/cmStringCommand.h, + Source/cmaketest.cxx, Source/MFCDialog/CMakeSetupDialog.cpp, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: BUG: Merged + fixes from main tree into 1.6 branch. + +2003-05-13 11:42 hoffman + + * Source/cmGlobalVisualStudio71Generator.h: Change name of 71 + generator + +2003-05-13 09:50 king + + * Source/kwsys/SystemTools.cxx: ERR: Removed use of std::string != + operator due to bug in SGI compiler's library. + +2003-05-13 09:42 king + + * Source/kwsys/CMakeLists.txt: ERR: Test for ansi streams may need + to use iosfwd for test because some compilers provide an iostream + header that is old streams. + +2003-05-13 08:38 king + + * Source/kwsys/SystemTools.cxx: ERR: Added forward declarations of + system functions for como compiler. + +2003-05-12 13:43 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, + kwsys_std_fstream.h.in, kwsys_std_iosfwd.h.in, + kwsys_std_iostream.h.in, kwsys_std_sstream.h.in: ENH: Added + KWSYS_FORCE_OLD_STREAMS option to force use of non-ansi stream + headers even if they are available. + +2003-05-12 13:33 king + + * Source/kwsys/: CMakeLists.txt, StandardIncludes.hxx.in: ENH: + Removed old (unused) StandardIncludes header. + +2003-05-12 13:27 king + + * Source/kwsys/kwsys_std_iosfwd.h.in: ERR: Need to move forward + declarations of non-ansi streams into std namespace when it is + available. + +2003-05-12 13:15 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, SystemTools.cxx, + SystemTools.hxx.in, kwsys_std.h.in, kwsys_std_fstream.h.in, + kwsys_std_iosfwd.h.in, kwsys_std_iostream.h.in, + kwsys_std_sstream.h.in: ENH: Added wrappers around the std stream + headers to make them look like ansi streams on all platforms. + +2003-05-09 15:47 hoffman + + * Modules/CMakeVS71FindMake.cmake: add find make program for 71 + +2003-05-09 09:32 hoffman + + * Modules/Platform/Windows-bcc32.cmake: BUG: remove typo from file + +2003-05-08 16:59 hoffman + + * Source/: CMakeLists.txt, cmGlobalVisualStudio71Generator.cxx, + cmGlobalVisualStudio71Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmake.cxx: add support for vs 71 + +2003-05-08 16:52 king + + * Source/CMakeLists.txt: ERR: Fixed arguments to kwsys's ADD_TEST + call for msvc6. + +2003-05-08 16:48 king + + * Source/kwsys/CMakeLists.txt: BUG: Need to invert test result for + ansi string stream. + +2003-05-08 14:49 king + + * Source/CMakeLists.txt: ENH: Added kwsys test. + +2003-05-08 14:46 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, Directory.cxx, + Directory.hxx.in, RegularExpression.hxx.in, + StandardIncludes.hxx.in, kwsys_std.h.in: ENH: Reduced header + dependencies and cleaned up inclusion of standard headers. + +2003-05-08 14:17 king + + * Source/kwsys/: CMakeLists.txt, README.itk, README.txt, test1.cxx: + ENH: Setup for testing as a stand-alone project. + +2003-05-08 09:55 hoffman + + * Modules/Platform/Windows-bcc32.cmake: BUG: fix for borland win32 + exe builds + +2003-05-08 09:43 martink + + * Modules/Platform/: Windows-bcc32.cmake: BUG: remove -H flags as + they cause crashes on oldwww + +2003-05-06 10:16 andy + + * Source/ctest.cxx: ERR: Remove warning + +2003-05-05 10:24 hoffman + + * Modules/Platform/Windows-bcc32.cmake: ENH: change the default + borland stack size + +2003-05-05 10:23 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: BUG: add linker flags + for modules + +2003-05-05 10:23 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: remove 64 bit + warnings + +2003-05-05 09:54 andy + + * Modules/CheckIncludeFiles.cmake: ERR: Remove warning for main + returning void. + +2003-05-05 08:42 andy + + * Source/: CMakeLists.txt, cmaketest.cxx, cmaketest.h.in: BUG: Fix + some dependencies for location of executables + +2003-05-05 08:42 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Add support for + make test even for fresh build of cmake + +2003-05-03 16:15 andy + + * Source/WXDialog/CMakeLists.txt: Fix location of test + +2003-05-02 14:05 martink + + * Modules/Dart.cmake: fixed andy sloppy code again + +2003-05-02 13:57 andy + + * Modules/Dart.cmake, Modules/DartConfiguration.tcl.in, + Source/CMakeLists.txt, Source/ctest.cxx: ENH: Fix some dart + issues. Now it works fine without dart. + +2003-05-02 13:56 andy + + * Source/cmake.cxx: ENH: New location of cmake binaries + +2003-05-02 13:54 andy + + * Source/cmaketest.cxx: ENH: New location of cmake + +2003-05-02 13:54 andy + + * Source/CTest/cmCTestSubmit.cxx: ENH: Be just a bit more verbose + +2003-05-02 11:29 andy + + * CMakeLists.txt, Source/CMakeLists.txt: ENH: Executables should go + to the bin directory + +2003-05-01 07:56 andy + + * Source/CTest/cmCTestSubmit.cxx: ERR: Remove warnings + +2003-04-30 07:32 andy + + * Source/cmake.h: ERR: Run should return a value + +2003-04-29 17:23 andy + + * Source/: CMakeLists.txt, CTest/CMakeLists.txt: ENH: Make Curl + code to be built by default + +2003-04-29 10:07 andy + + * Source/cmakemain.cxx: ENH: Add argument -N which prevents CMake + from doing configure and generate. This should be improved at + some point that it will do all the error checking such as whether + the CMakeLists.txt exists etc. It should essentially load cache, + go through cmake lists, but not modify cache and other files in + the build directory. The second feature is ability to display + cache values. You run with argument -L (or -LH /-LA / -LAH) and + it will display all nonadvanced cached variables (-L) / all + cached variable (-LA) / and cached variables with corresponding + help string (-LH -LAH). + +2003-04-29 10:04 andy + + * Source/: cmake.cxx, cmake.h: ENH: Add additional optional + argument to Run. If it is true, it will only set paths and load + cache. It will not do configure and gfenerate + +2003-04-29 10:02 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h: ENH: Add method to + convert from CacheEntryType to string + +2003-04-28 13:16 martink + + * Source/cmMacroCommand.cxx: better error reporting + +2003-04-25 15:16 andy + + * Source/: CTest/CMakeLists.txt, CMakeLists.txt: ENH: Enable CTest + to be build as a part of CMake + +2003-04-25 14:52 andy + + * Source/ctest.cxx: ENH: Rename option -D to -C because we will use + -D later + +2003-04-25 14:51 andy + + * Source/cmCommands.cxx: ERR: Set source files properties is needed + for Curl build + +2003-04-25 14:50 andy + + * Source/CTest/cmCTestSubmit.cxx: ERR: Remove warning because SCP + not implemented + +2003-04-24 13:25 berk + + * Source/: cmSystemTools.cxx: minor fix + +2003-04-23 17:24 jjomier + + * Source/kwsys/Directory.hxx.in: FIX: warnings, disabling 4786 + +2003-04-23 13:58 martink + + * Source/CTest/CMakeLists.txt: fix some incldue paths + +2003-04-22 16:10 king + + * Modules/FindCABLE.cmake: ENH: Updated search paths to newest + values from Cable. + +2003-04-22 14:32 andy + + * bootstrap: ENH: Add SGI -LANG:std support + +2003-04-18 10:01 andy + + * Source/cmCTest.cxx: ENH: Cleanup + +2003-04-18 10:00 andy + + * Source/cmCTest.cxx: Even better error detection on AIX + +2003-04-18 09:48 andy + + * Source/cmCTest.cxx: Better AIX detection + +2003-04-17 15:20 andy + + * Source/cmCTest.cxx: This is really an error + +2003-04-17 13:13 andy + + * bootstrap: Support LDFLAGS + +2003-04-17 13:13 andy + + * Source/cmCTest.cxx: ENH: Add AIX warerr + +2003-04-17 11:59 martink + + * Source/cmLocalCodeWarriorGenerator.cxx: warning fix hopefully + +2003-04-17 11:17 andy + + * DartConfig.cmake: More attempt to make continuous email work + +2003-04-17 08:47 martink + + * Source/cmDynamicLoader.cxx: fix one warning + +2003-04-17 08:23 andy + + * DartConfig.cmake: Attempt to enable sending of e-mails from + continuous + +2003-04-17 08:03 hoffman + + * Source/cmCommands.cxx: BUG: fix compile error on windows because + of windows.h + +2003-04-17 08:02 andy + + * CMakeLists.txt, bootstrap, configure, configure.in: BUG: Rename + Bootstrap directory to Bootstrap.cmk, so that on platforms such + as Windows and Mac OSX it will break during in-source build + +2003-04-16 17:06 andy + + * DartConfig.cmake: ENH: cleanup + +2003-04-16 16:20 martink + + * Source/cmDynamicLoader.cxx: fix one warning + +2003-04-16 16:17 martink + + * Source/cmCommands.cxx: streamline bootstrap + +2003-04-16 15:40 martink + + * Source/cmake.cxx: minor fix + +2003-04-16 14:47 martink + + * Source/: CMakeLists.txt, cmLocalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.h, cmake.cxx: add COdeWarrior back in + for testing + +2003-04-16 14:13 andy + + * Source/cmDynamicLoader.cxx: Attempt to make unloading work on OSX + +2003-04-16 13:41 andy + + * Source/cmCTest.cxx: Fix update output + +2003-04-16 13:33 hoffman + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: ENH: add a double try + compile to fix crazy make on hp + +2003-04-11 18:05 kentwilliams + + * Source/kwsys/SystemTools.cxx: took out an orphan endif + +2003-04-11 16:22 kentwilliams + + * Source/kwsys/: SystemTools.hxx.in, SystemTools.cxx: remove + redundant function and eliminate need for strcasecmp + +2003-04-11 13:36 king + + * Source/kwsys/README.itk: ENH: Added documentation for ITK. + +2003-04-11 07:27 lorensen + + * Source/kwsys/SystemTools.cxx: ERR: Borland fix for stricmp. ERR: + removed itk dependencies. + +2003-04-10 13:41 kentwilliams + + * Source/kwsys/: SystemTools.cxx, SystemTools.hxx.in: Removed + platform-specific functions from Code/IO/itkIOCommon, fixed code + to use kwsys/SystemTools + +2003-04-10 09:07 andy + + * Source/cmCTest.cxx: Do safe division instead of fixing result + +2003-04-10 09:03 king + + * Source/kwsys/SystemTools.cxx: ERR: Removed unused parameter and + truncated debug symbol warnings. + +2003-04-09 08:08 andy + + * Source/cmCTest.cxx: Attempt to fix FIXNUM + +2003-04-08 13:14 king + + * Source/kwsys/SystemTools.cxx: ERR: Fixed typo. + cmRegularExpression -> RegularExpression. + +2003-04-08 13:10 king + + * Source/kwsys/: CMakeLists.txt, Configure.hxx.in, Directory.cxx, + Directory.hxx.in, RegularExpression.cxx, + RegularExpression.hxx.in, StandardIncludes.hxx.in, + SystemTools.cxx, SystemTools.hxx.in: ENH: Added kwsys library for + platform-independent system tools. + +2003-04-08 10:57 andy + + * Source/: cmCTest.cxx, cmCTest.h: Remove nan and inf, use + iostreams to set precision, fix file name, and remove bogus files + +2003-04-08 07:16 andy + + * Source/cmCTest.cxx: Remove push_back on string. Why can't STL be + standard? + +2003-04-07 18:21 andy + + * Source/: cmCTest.cxx, cmCTest.h: Some cov improvements and better + esc + +2003-04-07 12:20 andy + + * Source/cmaketest.cxx: We should really just call make and not + make all + +2003-04-04 10:56 king + + * Source/cmSetCommand.h: ENH: Added CACHE entry types to + documentation string. + +2003-04-04 10:05 king + + * Modules/FindFLTK.cmake: ENH: Added /usr/local/lib/fltk + +2003-04-03 18:40 andy + + * bootstrap: Better support for spaces in paths + +2003-04-03 08:44 andy + + * Source/cmSystemTools.cxx: Try differentiating extensions + +2003-04-02 22:48 king + + * Source/: cmake.cxx, cmake.h, cmakemain.cxx, + CursesDialog/ccmake.cxx: ENH: Improved documentation. Also + modified behavior of "cmake" to not configure a project in the + current directory unless . is given. + +2003-04-02 22:44 king + + * Source/cmDocumentation.cxx: ENH: Running with zero arguments now + produces usage. + +2003-04-02 09:19 andy + + * Source/: cmCTest.cxx, cmCTest.h: Url escape password + +2003-04-02 09:19 andy + + * Source/CTest/cmCTestSubmit.cxx: On verbose, be more verbose + +2003-04-02 09:01 andy + + * Tests/Wrapping/qtwrappingmain.cxx: If display is not set, do not + attempt to run application + +2003-04-02 08:45 andy + + * Modules/FindQt.cmake: Add QT on debian + +2003-04-01 15:31 andy + + * Source/cmCTest.cxx: Fix cov. problems, ignore nonascii char. + Propagate verbosity + +2003-04-01 15:30 andy + + * Source/CTest/: cmCTestSubmit.cxx, cmCTestSubmit.h: Controle + verbosity + +2003-04-01 13:29 king + + * Source/cmSystemTools.cxx: BUG: strlen(buffer) from getline may be + 2 less than gcount on windows because both the CR and LF + characters may be removed. + +2003-03-28 13:42 andy + + * Modules/CheckSymbolExists.cmake: New design of CheckSymbolExists + pretty much replaces all other ones. + + For example: + + CHECK_HEADER_EXISTS("type.h" HAVE_TYPE_H) is: + CHECK_SYMBOL_EXISTS(main "type.h" HAVE_TYPE_H) + + CHECK_LIBRARY_EXISTS("nsl" gethostname HAVE_LIBNSL) would be + SET(CMAKE_REQUIRED_LIBRARIES "nsl") + CHECK_SYMBOL_EXISTS(gethostname "netdb.h" HAVE_LIBNSL) + + ... + +2003-03-27 15:52 andy + + * Source/: cmLocalVisualStudio6Generator.cxx, cmSystemTools.cxx, + cmUseMangledMesaCommand.cxx: Remove warnings + +2003-03-27 15:29 andy + + * bootstrap: Initial import of bootstrap for CMake + +2003-03-27 13:03 hoffman + + * Modules/Platform/SunOS.cmake: Fix gnu c and Sun CC mix + +2003-03-27 12:49 andy + + * CMakeLists.txt: Some more preparations for new bootstrap system + +2003-03-27 12:24 andy + + * Source/: cmCacheManager.cxx, cmConfigureFileCommand.cxx, + cmListFileCache.cxx, cmLocalVisualStudio6Generator.cxx, + cmMakeDepend.cxx, cmOutputRequiredFilesCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmUseMangledMesaCommand.cxx: + Implement GetLineFromStream that actually works and use it + instead of getline + +2003-03-26 10:45 andy + + * Source/cmStandardIncludes.h, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: Remove bogus flags + from cmStandardIncludes and make complex test pass + +2003-03-21 11:33 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: BUG: fix REMOVE test + +2003-03-21 11:24 hoffman + + * Source/cmRemoveCommand.cxx: BUG: fix broken command + +2003-03-20 11:27 andy + + * Source/cmCTest.cxx: Fix problem with network paths + +2003-03-20 10:12 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Support cmake in + directory with space + +2003-03-20 09:47 andy + + * Source/cmCTest.cxx: BUG: used wrong counters + +2003-03-19 18:28 andy + + * Source/cmCTest.cxx: More regex + +2003-03-19 16:35 andy + + * Source/: cmCTest.cxx, cmCTest.h: Add start + +2003-03-19 16:25 andy + + * Source/cmCTest.cxx: Move files to different location and fix time + +2003-03-19 16:11 andy + + * Source/: cmCTest.cxx, cmCTest.h: Fix for visual studio + +2003-03-19 10:16 king + + * Source/cmStringCommand.h: BUG: Command should be inherited. + +2003-03-18 11:47 king + + * Utilities/Release/: config_Linux: ENH: Updated to do release + build on ringworld. Needed for old glibc support. + +2003-03-17 14:29 andy + + * Tests/Simple/: CMakeLists.txt, simple.cxx, simpleCLib.c, + simpleWe.cpp: Improve test + +2003-03-17 13:26 andy + + * Tests/Simple/: CMakeLists.txt, simpleCLib.c: Add testing for when + C sources are compiled with C++ compiler + +2003-03-17 11:21 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: If there was no error, + do not say that there was one + +2003-03-17 10:00 king + + * Modules/FindGTK.cmake: BUG: Fixed ENDIF ordering. + +2003-03-17 09:57 king + + * Modules/CheckSymbolExists.cmake: BUG: Fixed syntax of file + generated for test. + +2003-03-17 09:29 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: fix crash with force cxx + type + +2003-03-17 09:15 hoffman + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: force cxx compiler for cxx + files + +2003-03-17 08:25 andy + + * Tests/SystemInformation/: CMakeLists.txt, DumpInformation.cxx, + DumpInformation.h.in: Display Cache and all variables + +2003-03-16 20:33 andy + + * Modules/CheckSymbolExists.cmake: Prevent CMake from putting ; in + the file + +2003-03-16 20:25 andy + + * Modules/FindGTK.cmake: More variables advanced + +2003-03-16 20:23 andy + + * Modules/FindGTK.cmake: Add gthread library + +2003-03-15 10:04 hoffman + + * Source/cmTarget.cxx: BUG: HasCXX did not use GetFileFormat and + was broken + +2003-03-14 15:44 hoffman + + * Modules/FindGTK.cmake: BUG: bad if statement order + +2003-03-14 15:06 hoffman + + * Source/cmGlobalVisualStudio6Generator.cxx: better error message + +2003-03-14 12:00 hoffman + + * Modules/Platform/Windows-cl.cmake: force c++ for c++ files + +2003-03-14 12:00 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx: use c flags with c and + not cxx flags, also force c++ for c files + +2003-03-14 11:59 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: Force c++ builds for + c++ files + +2003-03-14 11:58 hoffman + + * Source/cmMakefile.cxx: make sure M is after m + +2003-03-14 10:54 king + + * Source/cmMakefile.cxx: BUG: c extension must come before C. + +2003-03-14 10:38 king + + * Source/cmMakefile.cxx: BUG: c must precede C. + +2003-03-13 16:31 king + + * Utilities/Release/config_Linux: Merging from 1.6 again. + +2003-03-13 16:30 king + + * Utilities/Release/config_Linux: BUG: Need to link statically + against curses. + +2003-03-13 15:59 king + + * Utilities/Release/: cmake_release.sh, config_Linux: Merging from + 1.6 release branch. + +2003-03-13 15:58 king + + * Utilities/Release/cmake_release.sh: BUG: Need to checkout + ReleaseUtilities with same tag. + +2003-03-13 15:47 king + + * Utilities/Release/: cmake_release.sh: ENH: Updated for 1.6.6 + release. + +2003-03-13 15:46 king + + * Modules/Platform/: SunOS.cmake: BUG: Don't use -nostdlib option + to link shared libraries. Just use gcc -shared, even for C++ + libraries. + +2003-03-13 13:28 king + + * Source/cmMakefile.cxx: BUG: Added missing cc extension for Source + Files group. + +2003-03-13 13:03 king + + * Source/cmMakefile.cxx: BUG: Don't duplicate SUBDIRS. + +2003-03-13 13:01 king + + * Source/cmMakefile.cxx: ENH: Added header file extensions. + +2003-03-13 12:59 martink + + * Source/cmMakefile.cxx: allow the same subdir to be added twice + +2003-03-13 12:48 andy + + * Source/cmMakefile.cxx: Fix regular expressions + +2003-03-13 12:24 andy + + * Source/: cmMakefile.cxx, cmSystemTools.cxx: Synchronize extension + lists + +2003-03-13 11:53 king + + * Source/CursesDialog/form/fld_attr.c: BUG: Fixed forms for HP. + +2003-03-13 11:51 king + + * Modules/TestForSTDNamespace.cmake: BUG: Don't repeat test. + +2003-03-13 11:49 king + + * Modules/CheckTypeSize.cmake: BUG: Don't test type size more than + once. + +2003-03-13 11:48 king + + * Source/cmSystemTools.cxx: BUG: FindLibrary should not accept a + directory even if the exact specified name exists. + +2003-03-13 11:46 king + + * Source/cmake.cxx: BUG: Fixed crash when + CMAKE_BACKWARDS_COMPATIBILITY is deleted. + +2003-03-13 11:34 king + + * Source/MFCDialog/CMakeSetup.rc: BUG: Fixed tab ordering in + dialog. + +2003-03-13 11:33 king + + * Source/: cmMakefile.h, WXDialog/CMakeLists.txt: ENH: Updated + version for 1.6.6 release. + +2003-03-13 11:31 king + + * Utilities/Release/config_Linux: ERR: Need to do shared libc link + with static C++ library to have safe dl loading on linux. + +2003-03-13 08:44 king + + * Source/cmSystemTools.cxx: BUG: FindLibrary should not accept a + directory even if the exact specified name exists. + +2003-03-11 17:35 hoffman + + * Modules/TestForSTDNamespace.cmake: BUG: fix test not to run every + time + +2003-03-11 15:25 hoffman + + * Source/cmDynamicLoader.cxx, Source/CTest/CMakeLists.txt, + Source/CursesDialog/form/fld_attr.c, + Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt: BUG: fixes for hp + +2003-03-09 18:16 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Remove warnings + +2003-03-07 15:30 andy + + * Source/cmCTest.cxx: More XML + +2003-03-07 11:53 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Remove warning + +2003-03-07 11:45 andy + + * Source/cmCTest.cxx: Fix xml + +2003-03-07 11:27 andy + + * Source/CursesDialog/: cmCursesMainForm.cxx, cmCursesMainForm.h: + Add searching of variables + +2003-03-06 15:32 andy + + * Modules/Dart.cmake: On borland and cygwin remove .EXE + +2003-03-06 12:31 andy + + * Source/cmGetCMakePropertyCommand.cxx: Remove warning + +2003-03-06 11:20 andy + + * Source/cmCommands.cxx, Source/cmGetCMakePropertyCommand.cxx, + Source/cmGetCMakePropertyCommand.h, + Tests/SystemInformation/CMakeLists.txt: Add command for accessing + cmake properties. At this point the only properties are VARIABLES + and CACHE_VARIABLES. Also add test for this feature + +2003-03-06 11:19 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: Add method which returns a + list of all variables + +2003-03-06 11:18 andy + + * Source/cmCacheManager.h: Cache manager should be able to take no + arguments + +2003-03-06 10:32 king + + * Modules/CheckTypeSize.cmake: BUG: Should test HAVE_ + before repeating test, not just whether is set. + +2003-03-05 17:08 andy + + * Source/cmCTest.cxx: oops... Forgot the main step + +2003-03-03 13:58 andy + + * Modules/Dart.cmake: Add Update and configure steps where missing + +2003-03-03 13:57 andy + + * Source/cmCTest.cxx: Fix typo + +2003-03-03 09:32 andy + + * Modules/Dart.cmake: Start cleaning global namespace + +2003-03-03 09:29 andy + + * CMakeLists.txt: BUG: Should be use the host CMake's dart file + +2003-02-28 13:00 andy + + * Source/cmCTest.cxx: Ifdef code that is missing + +2003-02-28 12:42 andy + + * Modules/CheckSymbolExists.cmake, Source/cmCTest.cxx: Fix update + date and cleanup + +2003-02-28 11:31 andy + + * Source/cmCTest.cxx: Add configure step + +2003-02-27 14:48 andy + + * Modules/Dart.cmake: On windows but not on borland, look at + cmake_build_tool instead of compiler to determine build name. + Otherwise they will all be cl + +2003-02-27 11:54 andy + + * Modules/Dart.cmake: Use more condense buildname. If this works + fine we can make cmBuildName command deprecated + +2003-02-27 10:53 king + + * Source/WXDialog/cmWXMainFrame.cxx: Remove warning about shadowing + variable (merging andy's change to head) + +2003-02-25 12:36 andy + + * Source/WXDialog/cmWXMainFrame.cxx: Remove warning about shadowing + variable + +2003-02-24 11:02 king + + * Source/cmake.cxx: BUG: Fixed crash when + CMAKE_BACKWARDS_COMPATIBILITY is deleted between configures. + +2003-02-21 15:52 king + + * Source/MFCDialog/CMakeSetup.rc: BUG: Fixed tab ordering of gui + components. + +2003-02-20 17:38 andy + + * Modules/Dart.cmake: Use simple defaults if DartConfig does not + exist. This way you can use dart to build any project + +2003-02-20 10:46 king + + * Modules/CMakeVS6FindMake.cmake: BUG: Fix registry entry name. + +2003-02-20 10:44 hoffman + + * Modules/CMakeVS6FindMake.cmake: BUG: look for msdev in the right + place + +2003-02-20 09:40 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: better default generator + choice + +2003-02-20 09:40 king + + * Utilities/Release/cmake_release.sh: ENH: Updated for 1.6.5 + release. + +2003-02-20 08:55 king + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for correct path + style in depend file + +2003-02-20 08:52 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for correct path + style in depend file + +2003-02-20 08:47 king + + * Modules/TestForANSIForScope.cmake: BUG: Don't test every time for + "for" scope. + +2003-02-20 08:42 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Fix problem with + lib in the name of library. If there was lib in the name of + library, then on Windows (where there is not lib prefix), cmake + split the name wrongly. This only manifested when full path to + the library is specified. + +2003-02-20 08:41 hoffman + + * Modules/TestForANSIForScope.cmake: remove commented code + +2003-02-20 08:38 king + + * Modules/CheckSymbolExists.cmake: BUG: Fixed return 0 through void + type. + +2003-02-20 08:37 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: ENH: Removed creation of extra + CMAKE_C_COMPILER_FULLPATH and CMAKE_CXX_COMPILER_FULLPATH cache + entries. + +2003-02-20 08:34 king + + * Source/cmGlobalVisualStudio7Generator.cxx: BUG: Added missing + paren to generated file. + +2003-02-20 08:32 king + + * Source/cmaketest.cxx: BUG: Fix lower-casing of compiler for + win98. + +2003-02-20 08:30 king + + * Source/cmMakefile.h, Source/WXDialog/CMakeLists.txt, + Utilities/Release/cmake_release.sh: ENH: Updated for version + 1.6.5. + +2003-02-20 08:28 king + + * Source/cmFindPackageCommand.h: BUG: This command must be + inherited. + +2003-02-20 08:23 king + + * Modules/FindFLTK.cmake: BUG: Removed reference to CMake 1.4 + compatability variable. + +2003-02-20 07:55 king + + * Source/cmDumpDocumentation.cxx: ERR: Added missing return. + +2003-02-19 17:37 king + + * Source/CMakeLists.txt: ENH: Using new --all-for-coverage of + DumpDocumentation to improve coverage. + +2003-02-19 17:36 king + + * Source/cmDumpDocumentation.cxx: ENH: Added option to dump all + documentation (coverage). + +2003-02-19 17:10 king + + * Modules/FindFLTK.cmake: BUG: Removed use of cmake 1.4 + compatability variable. + +2003-02-19 12:54 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Fix problem with + lib in the name of library. If there was lib in the name of + library, then on Windows (where there is not lib prefix), cmake + split the name wrongly. This only manifested when full path to + the library is specified. + +2003-02-19 08:52 king + + * Source/cmDocumentation.cxx: ERR: Fixed signed/unsigned warning. + +2003-02-18 20:54 king + + * Source/cmDumpDocumentation.cxx: ENH: Updated to use + cmDocumentation class. + +2003-02-18 20:42 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h, cmakemain.cxx, + CursesDialog/ccmake.cxx: ENH: Re-implemented document generation + class to be more organized and more robust. + +2003-02-18 20:40 king + + * Source/cmAddCustomCommandCommand.h: Fix to documentation + formatting: removed extra newline. + +2003-02-18 16:24 hoffman + + * Source/cmGlobalVisualStudio7Generator.cxx: ENH: fix for vs 7 + beta1 + +2003-02-17 15:47 king + + * Source/cmFindPackageCommand.h: BUG: This command must be + inherited. + +2003-02-17 10:30 andy + + * Modules/CheckSymbolExists.cmake: Fix return value problem + +2003-02-17 09:59 andy + + * Source/CursesDialog/cmCursesStringWidget.cxx: Attempt to fix SGI + ccmake problem (thank you Clint Miller) + +2003-02-17 09:56 andy + + * Source/cmDocumentation.cxx: Minor documentation fixes + +2003-02-17 09:42 king + + * Source/cmakemain.cxx: ENH: Added executable-specific command-line + options. + +2003-02-17 09:42 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Added + header before list of commands in generated docs. Made options + more intuitive. + +2003-02-16 11:57 king + + * Source/cmDocumentation.cxx: ERR: Use of stream format flags is + hard to make portable. Manually implementing justification. + +2003-02-15 22:36 king + + * Source/cmDocumentation.cxx: ERR: Use of std::ios::fmtflags is not + portable to older compilers. + +2003-02-14 18:47 king + + * Source/: cmAbstractFilesCommand.h, cmAddCustomCommandCommand.h, + cmAddCustomTargetCommand.h, cmAddDefinitionsCommand.h, + cmAddDependenciesCommand.h, cmAddExecutableCommand.h, + cmAddLibraryCommand.h, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.h, cmBuildCommand.h, + cmBuildNameCommand.h, cmConfigureFileCommand.h, + cmCreateTestSourceList.h, cmElseCommand.h, + cmEnableTestingCommand.h, cmEndForEachCommand.h, + cmEndIfCommand.h, cmExecProgramCommand.h, + cmExportLibraryDependencies.h, cmFLTKWrapUICommand.h, + cmFindFileCommand.h, cmFindLibraryCommand.h, + cmFindPackageCommand.h, cmFindPathCommand.h, + cmFindProgramCommand.h, cmForEachCommand.h, + cmGetFilenameComponentCommand.h, + cmGetSourceFilePropertyCommand.h, cmGetTargetPropertyCommand.h, + cmITKWrapTclCommand.h, cmIfCommand.h, cmIncludeCommand.h, + cmIncludeDirectoryCommand.h, cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.h, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.h, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.h, + cmLoadCacheCommand.h, cmLoadCommandCommand.h, cmMacroCommand.h, + cmMakeDirectoryCommand.h, cmMarkAsAdvancedCommand.h, + cmMessageCommand.h, cmOptionCommand.h, + cmOutputRequiredFilesCommand.h, cmProjectCommand.h, + cmQTWrapCPPCommand.h, cmQTWrapUICommand.h, cmRemoveCommand.h, + cmSeparateArgumentsCommand.h, cmSetCommand.h, + cmSetSourceFilesPropertiesCommand.h, + cmSetTargetPropertiesCommand.h, cmSiteNameCommand.h, + cmSourceFilesCommand.h, cmSourceFilesRemoveCommand.h, + cmSourceGroupCommand.h, cmStringCommand.h, cmSubdirCommand.h, + cmSubdirDependsCommand.h, cmTargetLinkLibrariesCommand.h, + cmTryCompileCommand.h, cmTryRunCommand.h, + cmUseMangledMesaCommand.h, cmUtilitySourceCommand.h, + cmVTKMakeInstantiatorCommand.h, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.h, + cmVariableRequiresCommand.h, cmWrapExcludeFilesCommand.h, + cmWriteFileCommand.h: ENH: Cleaned up documentation and formatted + it for use by cmDocumentation. + +2003-02-14 16:16 king + + * Source/cmDocumentation.cxx: ENH: Improved formatting of + plain-text help to add a blank line before the beginning of a + preformatted section. + +2003-02-14 13:28 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Further + improved formatting. HTML/man/help now all have a consistent + appearance. + +2003-02-14 13:06 king + + * Source/: cmDocumentation.cxx, cmDocumentation.h: ENH: Improved + formatting of documentation. + +2003-02-14 11:13 martink + + * Source/cmaketest.cxx: Lowercase has a bad signiture, so I have to + live with it + +2003-02-14 10:56 king + + * Source/cmSystemTools.cxx: ERR: Added missing include for msvc. + +2003-02-14 10:53 king + + * Source/: CMakeLists.txt, Makefile.in, cmDocumentation.cxx, + cmDocumentation.h, cmStandardIncludes.h, cmSystemTools.cxx, + cmSystemTools.h, cmake.cxx, cmake.h, cmakemain.cxx, + CursesDialog/ccmake.cxx: ENH: Added cmDocumentation class to + generate various forms of documentation. Each executable will be + able to generate its own documentation. + +2003-02-14 10:40 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: ENH: move full path compiler to + internal and not just advanced + +2003-02-14 09:54 hoffman + + * Modules/TestForANSIForScope.cmake, Source/cmCacheManager.cxx, + Source/cmConfigureFileCommand.cxx, + Source/cmConfigureFileCommand.h, Source/cmIncludeCommand.h, + Source/cmLocalUnixMakefileGenerator.cxx, Source/cmMakefile.h, + Source/cmMarkAsAdvancedCommand.h, + Source/cmUseMangledMesaCommand.cxx, + Source/cmVariableRequiresCommand.cxx, + Source/cmVariableRequiresCommand.h: spelling errors + +2003-02-14 09:25 hoffman + + * CMake.rtf: fix spelling errors + +2003-02-13 21:57 king + + * CMakeLists.txt, configure, configure.in, Source/CMakeLists.txt, + Source/cmConfigure.cmake.h.in, Source/cmConfigure.h.in, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmStandardIncludes.h, Source/WXDialog/CMakeLists.txt: ENH: + Centralized setting of CMake version number to top-level CMake + listfile. + +2003-02-13 12:03 king + + * Utilities/Release/cmake_release.sh: ENH: Merged updates for 1.6.4 + release. + +2003-02-13 11:57 king + + * Modules/FindJNI.cmake: BUG: Fix find of JNI on Mac OSX 10.2. + +2003-02-13 11:54 king + + * Source/cmMakefile.h, Source/WXDialog/CMakeLists.txt, + Utilities/Release/cmake_release.sh: ENH: Updated for 1.6.4 + release. + +2003-02-13 11:52 king + + * Modules/UseVTKConfig40.cmake: BUG: Copy of _LIB_DEPENDS variables + needs to be double-quoted. + +2003-02-13 11:50 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for spaces in + paths in library path + +2003-02-13 11:47 king + + * Source/cmFindLibraryCommand.cxx: BUG: Use + cmSystemTools::IsNOTFOUND. + +2003-02-12 13:43 andy + + * Source/: cmCTest.cxx, cmakemain.cxx: Try to fix update + +2003-02-12 09:26 andy + + * Source/cmCTest.cxx: Write individual too + +2003-02-11 14:49 andy + + * Modules/FindJNI.cmake: Ok, now it finds JNI on Mac OSX 10.2 + +2003-02-11 13:56 andy + + * Modules/FindJNI.cmake: Fix typo + +2003-02-11 13:53 andy + + * Modules/FindJNI.cmake: Add missing location + +2003-02-11 13:37 andy + + * Modules/FindJNI.cmake: Improve searching for java files on OSX + +2003-02-11 13:34 andy + + * Source/cmSetTargetPropertiesCommand.h: Fix comment + +2003-02-11 09:50 king + + * Modules/: FindMangledMesa.cmake, FindOSMesa.cmake: Moving this + very specific module to VTK. + +2003-02-11 09:19 andy + + * Source/: cmCTest.cxx, cmCTest.h: Fix cont and remove comments + +2003-02-10 23:19 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: Start working on cont + +2003-02-10 22:00 hoffman + + * Tests/TryCompile/CMakeLists.txt: ENH: add more testing for ansi + for scopes + +2003-02-10 21:56 hoffman + + * Modules/TestForANSIForScope.cmake: clean up check for for scope + test + +2003-02-10 21:52 andy + + * Source/: cmCTest.cxx, cmCTest.h, ctest.cxx: Fix date issues with + different models + +2003-02-10 16:20 hoffman + + * Source/CMakeLists.txt, Tests/TryCompile/CMakeLists.txt: ENH: add + a new test for TRY_COMPILE + +2003-02-10 13:19 hoffman + + * Tests/TryCompile/: CMakeLists.txt, fail.c, pass.c: ENH: add a new + test to test try compile + +2003-02-10 11:08 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Running "make test" + can now have ARGS specified on the command line. These ARGS are + passed to ctest. + +2003-02-09 16:11 king + + * Utilities/Release/cmake_release.sh: ERR: Removed extra &&. + +2003-02-08 10:24 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h: Fix for include + optional + +2003-02-08 10:23 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for spaces in + paths in library path + +2003-02-07 16:29 king + + * Modules/UseVTKConfig40.cmake: BUG: Copying _LIB_DEPENDS variables + requires double-quoted argument. + +2003-02-07 14:04 king + + * Source/: cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, + cmLocalUnixMakefileGenerator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMakefile.cxx, + cmSetSourceFilesPropertiesCommand.h, + cmSetTargetPropertiesCommand.h, cmSystemTools.cxx, + cmSystemTools.h: Several fixes/improvements: + + - Fixed CollapseFullPath to work on relative paths with base + paths + not in the current working directory. + - INCLUDE command now supports relative paths (using above + fix). + - Added ABSOLUTE option to GET_FILENAME_COMPONENT command to + unwind symlinks and relative paths. + - Fixed libName_EXPORTS macro definition to be valid C + identifier. + - Added DEFINE_SYMBOL target propterty for customizing the + export symbol. + - Implemented LINK_FLAGS target propterty for libraries in VC6 + and VC7. + + Several of these fixes were contributed by Gareth Jones. + +2003-02-07 11:47 hoffman + + * Source/CTest/CMakeLists.txt: Remove warnings on AIX + +2003-02-07 11:03 andy + + * Source/CTest/cmCTestSubmit.cxx: Do not reuse connection as that + feature seems to be broken + +2003-02-07 11:03 andy + + * Source/cmCTest.cxx: Fix update return status + +2003-02-07 10:34 hoffman + + * Source/cmSystemTools.cxx: ENH: spelling error fix + +2003-02-07 10:18 hoffman + + * Source/cmFindLibraryCommand.cxx: BUG: use IsNOTFOUND + +2003-02-07 10:05 king + + * Utilities/Release/cmake_release.sh: ERR: Removed stray && from + end of line. + +2003-02-07 00:09 andy + + * Source/: cmCTest.cxx, cmCTest.h: Add updating support + +2003-02-06 17:48 hoffman + + * CMakeLists.txt: tell the aix linker not to give warnings with + -bhalt:5 + +2003-02-06 15:18 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: added option to shut off + automatic rebuilding + +2003-02-06 10:49 king + + * Source/CMakeLists.txt: ENH: Comeau C++ has been added for nightly + testing. It does not support shared libraries, so we cannot run + the complex tests. + +2003-02-06 08:45 king + + * Source/WXDialog/CMakeLists.txt: BUG: We want AppleInfo.plist from + our source tree, not the version of CMake running the build. + +2003-02-05 22:26 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + cmTryCompileCommand.cxx: add better testing for unlink + +2003-02-05 18:05 king + + * Source/cmCreateTestSourceList.cxx: BUG: Generate 0 into test + driver instead of NULL. + +2003-02-05 16:56 king + + * Utilities/Release/cmake_release.sh: ENH: Added win32_zipfile and + win32_upload commands. + +2003-02-05 16:53 king + + * Utilities/Release/cmake_release.sh: ENH: Added win32_zipfile and + win32_upload commands. + +2003-02-05 16:17 king + + * Source/WXDialog/CMakeLists.txt: BUG: AppleInfo.plist should come + from build tree. + +2003-02-05 15:14 king + + * Utilities/Release/cmake_release.sh: BUG: Updated release tag for + 1.6.3. + +2003-02-05 15:07 king + + * Source/cmMakefile.h, Source/WXDialog/CMakeLists.txt, + Utilities/Release/cmake_release.sh: ENH: Updated to version + 1.6.3. + +2003-02-05 15:05 king + + * Modules/CMakeSystemSpecificInformation.cmake: ENH: + CMAKE_INSTALL_PREFIX should not be advanced on UNIX. + +2003-02-05 15:02 king + + * Modules/Platform/HP-UX.cmake: BUG: Optimization flags use + + prefix, not -. + +2003-02-05 15:01 king + + * Source/CursesDialog/cmCursesLongMessageForm.cxx: BUG: Fixed crash + when messages are too long. + +2003-02-05 15:00 king + + * Source/MFCDialog/PropertyList.cpp: BUG: Fixed GUI for new + NOTFOUND checks. + +2003-02-05 14:58 king + + * Source/cmGlobalGenerator.cxx: BUG: Bug in NOTFOUND error + reporting logic. + +2003-02-05 14:55 hoffman + + * Modules/Platform/HP-UX.cmake: fix default release flags for hp + +2003-02-05 14:55 king + + * Source/: cmCacheManager.cxx, cmCacheManager.h: ENH: Better error + checking for cache iterator. + +2003-02-05 13:24 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: add a check for -NOTFOUND + +2003-02-04 15:37 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: move cmake install + out of advanced + +2003-02-04 15:37 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: add better testing for + notfound + +2003-02-04 14:37 berk + + * Modules/: FindMangledMesa.cmake, FindOSMesa.cmake: Created + modules for Mesa headers and libraries. + +2003-02-04 14:31 hoffman + + * Source/CursesDialog/cmCursesLongMessageForm.cxx: BUG: don't let + the messages get too big + +2003-02-04 14:01 martink + + * Source/: cmCacheManager.h, cmCacheManager.cxx: safer operation of + iterators + +2003-02-04 09:50 andy + + * Source/cmVTKWrapJavaCommand.cxx: Oops, std namespace + +2003-02-04 09:48 andy + + * Source/cmVTKWrapJavaCommand.cxx: Generate java dependency files + +2003-02-03 23:08 king + + * Utilities/Release/: cmake_release.sh: ENH: Improved robustness of + remote invocation. Added more documentation. + +2003-02-03 22:46 king + + * Utilities/Release/: cmake_release.sh: ENH: Added documentation + and usage. + +2003-02-03 13:31 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: add a better test for + lib deps + +2003-02-03 12:02 king + + * Utilities/Release/cmake_release.sh: ENH: Updated version to + 1.6.2. + +2003-02-03 12:01 king + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindPackageCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmFindProgramCommand.h, cmGetFilenameComponentCommand.cxx, + cmGlobalGenerator.cxx, cmITKWrapTclCommand.cxx, cmSourceFile.cxx, + cmSystemTools.cxx, cmSystemTools.h: ENH: Added new NOTFOUND + notification feature. + +2003-02-03 11:50 king + + * Source/: cmMakefile.h, WXDialog/CMakeLists.txt: ENH: Updated from + version 1.6.1 to 1.6.2. + +2003-02-03 11:49 king + + * Source/cmExportLibraryDependencies.cxx: BUG: Removed generation + of stray paren. + +2003-02-03 09:53 king + + * Source/cmExportLibraryDependencies.cxx: BUG: Removed generation + of stray paren. + +2003-02-02 22:32 king + + * Source/CursesDialog/cmCursesStandardIncludes.h: ENH: Cleaned up + sgi unreferenced warning hack. + +2003-02-02 11:45 hoffman + + * Source/cmGlobalGenerator.cxx: fix warning + +2003-02-01 16:39 hoffman + + * Source/cmMakefile.cxx: ENH: fix warning + +2003-02-01 16:39 hoffman + + * Source/cmAddLibraryCommand.h: ENH: fix doc line + +2003-02-01 16:27 hoffman + + * Source/CursesDialog/cmCursesStandardIncludes.h: BUG: add missing + ; + +2003-01-31 15:01 hoffman + + * Modules/FindOpenGL.cmake: ENH: add checking for NOTFOUND + +2003-01-31 14:39 hoffman + + * Modules/FindOpenGL.cmake, Source/cmGlobalGenerator.cxx: ENH: add + checking for NOTFOUND + +2003-01-31 13:50 hoffman + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindPackageCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmFindProgramCommand.h, cmGetFilenameComponentCommand.cxx, + cmGlobalGenerator.cxx, cmITKWrapTclCommand.cxx, + cmIncludeDirectoryCommand.cxx, cmLinkLibrariesCommand.cxx, + cmMakefile.cxx, cmSourceFile.cxx, cmSystemTools.cxx, + cmSystemTools.h, cmTargetLinkLibrariesCommand.cxx: ENH: add + checking for NOTFOUND + +2003-01-31 13:24 king + + * Source/cmMakefile.h, Source/WXDialog/CMakeLists.txt, + Utilities/Release/cmake_release.sh: ENH: Updated to version 1.6.1 + from 1.6.0. + +2003-01-31 13:18 king + + * Source/cmWin32ProcessExecution.cxx: Merge from HEAD. Use process + output for error reporting instead of stdout. + +2003-01-31 13:04 king + + * Modules/FindLATEX.cmake: ENH: Changes to work on windows. Merged + from HEAD. + +2003-01-31 11:52 king + + * Modules/FindFLTK.cmake: BUG: Need FIND_PROGRAM instead of + FIND_FILE to find fluid.exe. + +2003-01-31 11:49 king + + * Modules/FindPerl.cmake: ENH: Added ActivePerl/804 as a search + path. + +2003-01-31 11:44 king + + * Modules/CMakeSystemSpecificInformation.cmake: ERR: Removed stray + double quote. + +2003-01-31 11:41 king + + * Utilities/Release/cmake_release.sh: ENH: Another merge from + branch 1.6. + +2003-01-31 11:40 king + + * Modules/FindX11.cmake: BUG: Fix for cygwin's X11. + +2003-01-31 11:36 king + + * Source/cmakewizard.cxx: ENH: cmake -i on HP needs printf instead + of cout. + +2003-01-31 11:35 king + + * Source/: CMakeLists.txt: BUG: Change install location of + cmCPluginAPI header. + +2003-01-31 08:47 martink + + * Source/CursesDialog/cmCursesStandardIncludes.h: fixed warnings + +2003-01-30 14:34 andy + + * Source/: cmIncludeDirectoryCommand.cxx, + cmLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.cxx: Add + some error checking for missing include directories and link + libraries + +2003-01-30 14:34 andy + + * Modules/CMakeSystemSpecificInformation.cmake: Remove extra quote + +2003-01-30 13:19 hoffman + + * Source/cmakewizard.cxx: BUG: can not mix cout and fgets on hp + +2003-01-30 11:50 king + + * Source/CursesDialog/cmCursesStandardIncludes.h: ERR: Fixing + attempt to remove warnings. + +2003-01-29 14:20 king + + * Source/CursesDialog/cmCursesStandardIncludes.h: ERR: Another + attempt to get rid of unreferenced inline function warnings on + SGI. + +2003-01-29 13:56 king + + * Utilities/Release/cmake_release.sh: ENH: Use * instead of + directory list for installation tarball. + +2003-01-29 13:46 king + + * Utilities/Release/cmake_release.sh: BUG: Need to include the + include directory from the installation. + +2003-01-29 09:06 andy + + * Modules/FindX11.cmake: Attempt to fix build problem on some + platforms + +2003-01-28 15:48 hoffman + + * Source/cmFindFileCommand.h: ENH: better docs + +2003-01-28 15:44 hoffman + + * Modules/: FindFLTK.cmake, FindQt.cmake: ENH: change FIND_FILE to + FIND_PROGRAM + +2003-01-28 08:53 andy + + * Modules/FindLATEX.cmake: Make things work on unix and add DVIPDF + +2003-01-27 12:25 andy + + * Source/cmWin32ProcessExecution.cxx: Fix output variable and + remove this->m_ to be only m_ + +2003-01-27 12:18 andy + + * Source/cmWin32ProcessExecution.cxx: Move errors to output + variable + +2003-01-24 17:40 king + + * Utilities/Release/cygwin-package.sh.in: ENH: Merged more changes + from 1.6 branch. + +2003-01-24 17:34 king + + * Utilities/Release/cygwin-package.sh.in: ENH: Added testing to + packaging script. + +2003-01-24 15:48 king + + * Utilities/Release/cmake_release.sh: ENH: Merged more changes from + 1.6 branch. + +2003-01-24 15:02 king + + * Utilities/Release/cmake_release.sh: ENH: Added cygwin_upload + function. + +2003-01-24 14:40 king + + * Utilities/Release/: cmake_release.sh, config_AIX, config_Darwin, + config_IRIX64, config_Linux, config_OSF1, config_SunOS: ENH: + Merged 1.6-branch changes to release scripts. + +2003-01-24 14:29 king + + * Utilities/Release/: config_AIX, config_Darwin, config_IRIX64, + config_Linux, config_OSF1, config_SunOS: ENH: Use verbose + makefile during release build. + +2003-01-24 13:55 king + + * Utilities/Release/cmake_release.sh: ENH: Updated checkout + revision to Release-1-6-0 tag. + +2003-01-24 13:53 king + + * Modules/Platform/: HP-UX.cmake: BUG: Added missing link flag to + export symbols from an executable. + +2003-01-24 11:50 king + + * Source/WXDialog/CMakeLists.txt: ENH: Updated for cmake 1.6.0 + release. + +2003-01-24 11:49 king + + * Utilities/Release/cmake_release.sh: ENH: Updated for 1.6.0 + release over 1.6.beta2. + +2003-01-24 11:45 king + + * Utilities/: cmake_release_config_darwin, + cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_osf, + cmake_release_config_sun, cmake_release_cygwin.sh, + cmake_release_unix_config.sh, cmake_release_version.sh: ENH: + Removing old release scripts. CMake 1.6 now has its own copy of + the release scripts. + +2003-01-24 11:45 king + + * Utilities/: cmake-cygwin-package.sh, cmake_release_unix_build.sh, + cmake_release_unix_package.sh, Release/cmake_release.sh, + Release/config_AIX, Release/config_CYGWIN_NT-5.1, + Release/config_Darwin, Release/config_HP-UX, + Release/config_IRIX64, Release/config_Linux, Release/config_OSF1, + Release/config_SunOS, Release/cygwin-package.sh.in: ENH: Release + branch should contain its own release scripts. + +2003-01-24 11:41 king + + * Utilities/Release/: cmake_release.sh, config_AIX, config_Darwin, + config_HP-UX, config_Linux, config_OSF1, config_SunOS: ENH: + Enabled testing during release build. + +2003-01-24 10:33 king + + * Source/CursesDialog/cmCursesStandardIncludes.h: ERR: Fixed + unreferenced termios declaration warning. + +2003-01-23 10:42 barre + + * Modules/FindLATEX.cmake: no message + +2003-01-23 10:37 barre + + * Modules/FindLATEX.cmake: FIX: - rename some entries (COMPILE -> + COMPILER, and the converters -> _CONVERTER) - make sure that + Window system are given a chance to find Latex and the converters + if MikTex and GhostScript are installed (but not in the PATH) + +2003-01-23 10:36 barre + + * Modules/FindPerl.cmake: FIX: the current version of Perl is 5.8 + +2003-01-23 10:35 barre + + * Source/cmGetFilenameComponentCommand.cxx: FIX: this command was + not processing its arg to expand registery values + +2003-01-22 15:00 martink + + * Modules/Platform/gcc.cmake: joins from the main tree + +2003-01-22 14:59 martink + + * Modules/Platform/gcc.cmake: minor change to default compile flags + +2003-01-22 14:49 martink + + * Modules/: FindMPEG2.cmake, FindSDL.cmake: merge from branch + +2003-01-22 14:33 hoffman + + * Source/cmGlobalGenerator.h: ENH: merge from branch + +2003-01-22 14:21 hoffman + + * Tests/X11/CMakeLists.txt: ENH: merge from head + +2003-01-22 14:20 hoffman + + * Utilities/Doxygen/doc_makeall.sh.in: merge from main tree + +2003-01-22 14:20 hoffman + + * Source/cmGlobalGenerator.cxx: merge from main tree, test for + working c and c++ compilers + +2003-01-22 14:17 hoffman + + * Templates/: cconfigure, cconfigure.in, cxxconfigure, + cxxconfigure.in: merge with main branch and remove unused scripts + +2003-01-22 14:13 hoffman + + * Modules/FindAndImportCMakeProject.cmake: moved to c++ command + +2003-01-22 12:38 martink + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + joins from the main tree + +2003-01-22 12:31 martink + + * Source/: cmCommands.cxx, cmFindPathCommand.cxx, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, cmMakefile.cxx, cmMakefile.h, + cmake.cxx: joins from the main tree + +2003-01-22 12:29 hoffman + + * Modules/: CMakeTestCCompiler.cmake, CMakeTestCXXCompiler.cmake: + ENH: only run test for working c and cxx compiler once + +2003-01-22 12:28 martink + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, + Modules/CheckIncludeFiles.cmake, Modules/FindFLTK.cmake, + Modules/FindImageMagick.cmake, Modules/FindTclsh.cmake, + Modules/FindVTK.cmake, Modules/FindX11.cmake, + Modules/Platform/CYGWIN.cmake, Source/cmMessageCommand.cxx, + Source/cmMessageCommand.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/CursesDialog/ccmake.cxx, + Source/CursesDialog/cmCursesMainForm.cxx, + Source/CursesDialog/cmCursesMainForm.h, + Source/cmExportLibraryDependencies.cxx, + Source/cmExportLibraryDependencies.h, + Source/cmFindPackageCommand.cxx, Source/cmFindPackageCommand.h: + joins from the main tree + +2003-01-22 11:44 martink + + * Source/cmLocalVisualStudio6Generator.cxx: fixed spelling mistake + +2003-01-22 11:27 martink + + * Source/CursesDialog/ccmake.cxx: spelling fix + +2003-01-22 11:21 martink + + * Modules/FindOpenGL.cmake: merge from branch + +2003-01-22 11:16 martink + + * Modules/LinkQT.cmake: removed since no longer used + +2003-01-22 11:11 martink + + * Modules/FindLATEX.cmake: merge branch change into main tree + +2003-01-22 10:40 king + + * Source/cmFindPackageCommand.cxx: ENH: Added support for looking + through CMAKE_MODULE_PATH to locate Find.cmake modules. + +2003-01-22 10:33 king + + * Source/: cmake.cxx, CursesDialog/ccmake.cxx, + CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h: BUG: Fixed crash when CMAKE_ROOT + cannot be found. + +2003-01-22 09:34 hoffman + + * Source/cmake.cxx: BUG: fix command line to take -G only + +2003-01-22 09:28 king + + * Source/cmGlobalVisualStudio6Generator.cxx: BUG: CMake 1.4 + configured projects did not build with new CMake. + +2003-01-21 17:15 king + + * Source/: cmCommands.cxx, cmFindPackageCommand.cxx, + cmFindPackageCommand.h: ENH: Added FIND_PACKAGE command prototyp. + +2003-01-21 16:46 king + + * Source/cmake.cxx: BUG: Use CMakeDefaultMakeRuleVariables.cmake to + locate modules directory instead of FindVTK.cmake. + +2003-01-21 15:03 king + + * Modules/FindVTK.cmake: ENH: Updated documentation. + +2003-01-21 14:01 andy + + * Modules/CheckIncludeFiles.cmake: This list can be really long. + Only display the variable name + +2003-01-21 12:50 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeTestCCompiler.cmake, + Modules/CMakeTestCXXCompiler.cmake, Source/cmGlobalGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, Source/cmMakefile.cxx, + Source/cmMessageCommand.cxx, Source/cmMessageCommand.h, + Source/cmSystemTools.cxx, Source/cmSystemTools.h: add a fatal + error, and make sure c and c++ compilers work before using them + +2003-01-21 12:41 hoffman + + * Modules/Platform/CYGWIN.cmake: use export all symbols on cygwin + +2003-01-21 10:59 barre + + * Modules/FindImageMagick.cmake: IMPORTANT FIX: be extra-careful + here on WIN32, we do NOT want CMake to look in the system's PATH + env var to search for ImageMagick's convert.exe, otherwise it is + going to pick Microsoft Window's own convert.exe, which is used + to convert FAT partitions to NTFS format ! Depending on the + options passed to convert.exe, there is a good chance you would + kiss your hard-disk good-bye. + +2003-01-20 21:15 ibanez + + * Modules/FindLATEX.cmake: ENH: PS2PDF_COMPILE added. It looks for + ps2pdf. + +2003-01-20 19:17 king + + * Source/cmMakefile.cxx: BUG: Fix for custom commands with spaces + in paths. The arguments were not having spaces escaped. + +2003-01-20 18:54 king + + * Source/: cmLocalUnixMakefileGenerator.cxx: BUG: Fixed typo in + previous fix. + +2003-01-20 18:52 king + + * Source/: cmLocalUnixMakefileGenerator.cxx: BUG: Fixed directory + creation for spaces in install path. + +2003-01-20 16:59 hoffman + + * Source/cmCommands.cxx, Source/cmExportLibraryDependencies.cxx, + Source/cmExportLibraryDependencies.h, Source/cmGlobalGenerator.h, + Source/cmMakefile.h, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: add a new command + that allows exports of library dependencies from a project to a + file + +2003-01-20 14:39 will + + * Modules/FindX11.cmake: BUG: fix missed CMAKE to X11 variable name + +2003-01-19 11:42 king + + * Source/cmSystemTools.cxx: ENH: Improved CopyFile error messages. + +2003-01-18 11:34 king + + * Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Templates/install-sh: BUG: + Fixed make install to handle library prefix/suffix settings. + Also fixed support for spaces in paths during make install. + +2003-01-17 18:14 king + + * Modules/: FindVTK.cmake: BUG: Fix for application of + expand-list-variables. + +2003-01-17 18:01 king + + * Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Templates/install-sh: ENH: + Support for spaces in paths during make install. + +2003-01-17 17:19 king + + * Modules/FindAndImportCMakeProject.cmake: ENH: Adding + FIND_AND_IMPORT_CMAKE_PROJECT macro. + +2003-01-17 15:15 king + + * Utilities/Release/cmake_release.sh: ENH: Added sanity check for + setting of WX_RESOURCES by config_Darwin for osx_install. + +2003-01-17 13:35 king + + * Utilities/Release/: cmake_release.sh, config_Darwin: ENH: + Prototype for OSX packaging. + +2003-01-17 13:35 king + + * Utilities/Release/cmake_release.sh: ENH: Cygwin package is now + created in a Cygwin subdirectory. + +2003-01-17 13:14 king + + * Source/WXDialog/CMakeLists.txt: ENH: Updated version number for + 1.6.beta2 release. + +2003-01-17 12:51 andy + + * Source/WXDialog/CMakeLists.txt: Fix version + +2003-01-17 11:57 king + + * Utilities/Release/: cmake-cygwin-package.sh, cmake_release.sh, + cygwin-package.sh.in: ENH: Renamed cmake-cygwin-package.sh to + cygwin-package.sh.in and removed executable permission so it + cannot be run accidentally. It must be run after being renamed + to cmake-${VERSION}-${RELEASE}. + +2003-01-17 11:55 king + + * Utilities/Release/cmake_release.sh: ENH: clean now removes the + entire release root directory. + +2003-01-17 11:51 king + + * Utilities/: cmake-cygwin-package.sh, cmake_release_config_aix, + cmake_release_config_darwin, cmake_release_config_hpux, + cmake_release_config_irix, cmake_release_config_linux, + cmake_release_config_osf, cmake_release_config_sun, + cmake_release_cygwin.sh, cmake_release_unix_build.sh, + cmake_release_unix_config.sh, cmake_release_unix_package.sh, + cmake_release_version.sh: ENH: Removing old release scripts and + config files. + +2003-01-17 11:42 king + + * Utilities/Release/config_OSF1: ENH: Adding OSF release + configuration. + +2003-01-17 11:05 king + + * Utilities/Release/cmake_release.sh: ENH: Added cygwin release + support. + +2003-01-17 10:30 king + + * Utilities/Release/cmake-cygwin-package.sh: ENH: Adding cygwin + packaging script to release directory. + +2003-01-17 10:28 hoffman + + * Source/cmFindPathCommand.cxx, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: remove + trailing slash from findpath command + +2003-01-17 10:28 hoffman + + * Tests/SystemInformation/: DumpInformation.cxx, + SystemInformation.in: add some more prints + +2003-01-17 10:21 king + + * Utilities/Release/config_Linux: ENH: Removed old setting. + +2003-01-17 10:21 king + + * Utilities/Release/config_CYGWIN_NT-5.1: ENH: Cygwin release + configuration. + +2003-01-17 09:52 king + + * Utilities/Release/cmake_release.sh: ENH: Added support for full + remote packaging and copying back to local machine. Added + support for uploading to FTP server. + +2003-01-17 09:20 king + + * Utilities/Release/config_HP-UX: ENH: Linking with + -a,archive_shared instead of -a,archive so that the shared curses + library can be used. + +2003-01-17 09:15 king + + * Utilities/Release/config_AIX: ERR: Can't build release static on + aix. + +2003-01-17 09:08 hoffman + + * Utilities/Release/config_AIX: Add AIX config file + +2003-01-17 08:56 andy + + * Source/cmCTest.cxx: Remove warning about %e and %T + +2003-01-16 15:47 martink + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: fix for + compilers that need _ + +2003-01-16 14:59 andy + + * Source/cmCTest.cxx: Add aix warning + +2003-01-16 14:15 andy + + * DartConfig.cmake: Add selection of drop method + +2003-01-16 14:05 barre + + * Utilities/Doxygen/doc_makeall.sh.in: FIX: HHC is now + HTML_HELP_COMPILER + +2003-01-16 13:31 ibanez + + * Modules/FindFLTK.cmake: FIX: Quotes added around the list of libs + to be added in Apple. + +2003-01-16 13:24 ibanez + + * Modules/FindFLTK.cmake: ENH: Platform dependent libraries added + for APPLE. + +2003-01-16 13:02 andy + + * Source/CTest/cmCTestSubmit.cxx: Try to fix aix problem + +2003-01-16 12:45 andy + + * Source/CTest/cmCTestSubmit.cxx: Add proxy support for triggering + +2003-01-16 12:38 hoffman + + * Modules/FindFLTK.cmake: ENH: fix for borland and cygwin + +2003-01-16 12:30 andy + + * Source/CTest/cmCTestSubmit.cxx: Improve submtitting using http + +2003-01-16 09:57 andy + + * Source/CTest/cmCTestSubmit.cxx: Improve build, now it should + build on mac and other platforms where include file depend on + each other + +2003-01-16 08:40 hoffman + + * Source/cmMakefile.h: add back GetCMakeInstance + +2003-01-16 08:31 hoffman + + * Source/cmMakefile.h: fix duplicate member on branch + +2003-01-16 08:28 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: add the config + directory to look for the loadable module + +2003-01-15 19:24 king + + * Utilities/Release/cmake_release.sh: BUG: error_log function + should return 1 to stop execution of rest of script. + +2003-01-15 19:20 king + + * Utilities/Release/cmake_release.sh: ENH: Renamed package command + to binary_tarball for clarity. + +2003-01-15 19:17 king + + * Utilities/Release/: cmake_release.sh, config_HP-UX: ENH: Release + script now exports PATH and LD_LIBRARY_PATH to remove the burden + from the configuration scripts. + +2003-01-15 19:14 king + + * Utilities/Release/config_HP-UX: BUG: Attempt to fix remote + invocation. + +2003-01-15 19:04 king + + * Utilities/Release/config_HP-UX: ENH: Enabling verbose makefile + generation for hp-ux build. This will ease hand-fixing of the + build of ccmake. + +2003-01-15 19:02 king + + * Utilities/Release/cmake_release.sh: ENH: Cleaned up remote + invocation. + +2003-01-15 18:51 king + + * Utilities/Release/cmake_release.sh: ENH: Improved clean target. + +2003-01-15 18:48 king + + * Utilities/Release/cmake_release.sh: BUG: Finished clean target + and fixed grep for cvsroot in ~/.cvspass. + +2003-01-15 18:44 king + + * Utilities/Release/cmake_release.sh: BUG: CVS login command is + login, not cvs_login. + +2003-01-15 18:43 king + + * Utilities/Release/config_aix: ERR: Removed old config file. + +2003-01-15 18:42 king + + * Utilities/Release/: cmake_release.sh, config_Darwin, + config_HP-UX, config_IRIX64, config_Linux, config_SunOS, + config_aix: ENH: New release script prototype. + +2003-01-15 18:28 ibanez + + * Modules/FindFLTK.cmake: ENH: Libraries are not marked as ADVANCED + now. + +2003-01-15 18:02 king + + * Source/cmMakefile.h: ERR: Removed duplicate declaration. + +2003-01-15 17:45 hoffman + + * Source/cmMakefile.h: ENH: fix for ibm build + +2003-01-15 17:31 hoffman + + * Source/CMakeLists.txt, Source/cmaketest.cxx, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/Complex/Library/moduleFile.c, + Tests/Complex/Library/moduleFile.h, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/moduleFile.c, + Tests/ComplexOneConfig/Library/moduleFile.h, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/moduleFile.c, + Tests/ComplexRelativePaths/Library/moduleFile.h: ENH: add testing + for modules and one two config modes for cmaketest + +2003-01-15 17:02 hoffman + + * Tests/: LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt: use module on + all platforms + +2003-01-15 15:32 hoffman + + * Modules/FindOpenGL.cmake: fix from head + +2003-01-15 15:02 hoffman + + * Modules/FindOpenGL.cmake: BUG: fix for OSX with x11 gl stuff + +2003-01-15 13:25 hoffman + + * Modules/Platform/Windows-bcc32.cmake: merge with head fix for + borland flag and bad set statment + +2003-01-15 13:22 hoffman + + * Modules/Platform/Windows-bcc32.cmake: BUG: fix flags for borland + link shared and module + +2003-01-15 13:14 hoffman + + * Modules/FindOpenGL.cmake: BUG: make sure set command has proper + quoting + +2003-01-15 13:12 hoffman + + * Modules/FindOpenGL.cmake: quote the variable + +2003-01-15 11:59 hoffman + + * Modules/FindTclsh.cmake: look for cygtcl83 + +2003-01-15 11:32 king + + * CMakeLists.txt: ENH: Merge of backward compatability changes from + trunk. + +2003-01-15 11:17 king + + * Utilities/cmake_release_version.sh: ENH: Updated version for + 1.6.beta2 release. + +2003-01-15 11:03 martink + + * Source/cmMakefile.h: updated patch level + +2003-01-14 22:10 andy + + * Source/CTest/: cmCTestSubmit.cxx, cmCTestSubmit.h: Add support + for http submit. Also, add support for proxy, but it does not + work yet. + +2003-01-14 22:10 andy + + * Source/cmCTest.cxx: Add support for http submit + +2003-01-14 09:53 andy + + * Source/: cmMakefile.cxx, cmMakefile.h: Make GetCMakeInstance + private and clean cxx file + +2003-01-13 10:15 martink + + * Modules/CheckSymbolExists.cmake: join from head + +2003-01-13 10:11 martink + + * Modules/FindQt.cmake: merge from branch + +2003-01-13 10:07 martink + + * Modules/Platform/Linux-como.cmake: joined to head + +2003-01-13 10:04 martink + + * Source/cmLocalVisualStudio6Generator.cxx, + Tests/Complex/Library/testConly.c, + Tests/ComplexOneConfig/Library/testConly.c, + Tests/ComplexRelativePaths/Library/testConly.c: joined to head + +2003-01-13 09:30 hoffman + + * Source/cmLocalVisualStudio6Generator.cxx, + Tests/Complex/Library/testConly.c, + Tests/ComplexOneConfig/Library/testConly.c, + Tests/ComplexRelativePaths/Library/testConly.c: BUG: fix + CMAKE_C_FLAGS for visual studio 6, and add a test case + +2003-01-13 09:27 martink + + * Modules/CheckIncludeFileCXX.cmake: joined to head + +2003-01-13 09:24 martink + + * Modules/FindPNG.cmake: fixed typo + +2003-01-13 09:22 martink + + * Modules/: TestForANSIForScope.cmake, TestForSTDNamespace.cmake: + joined to head + +2003-01-13 09:12 martink + + * Modules/: CMakeVS6BackwardCompatibility.cmake, + CMakeVS7BackwardCompatibility.cmake, CheckTypeSize.cmake, + FindX11.cmake: joined to head + +2003-01-13 09:09 martink + + * Source/cmake.cxx, Source/cmake.h, Modules/FindOpenGL.cmake, + Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeBackwardCompatibilityCXX.cmake: joined to head + +2003-01-13 09:06 martink + + * Source/: cmMakefile.cxx, cmVariableWatch.h: joined to head + +2003-01-13 09:02 martink + + * Source/: cmGlobalGenerator.cxx, + cmLocalVisualStudio6Generator.cxx: joined to head + +2003-01-13 08:51 martink + + * Source/cmAbstractFilesCommand.cxx: joined + +2003-01-13 08:50 martink + + * Source/CMakeLists.txt: added install target + +2003-01-13 08:14 andy + + * Source/cmLocalVisualStudio6Generator.cxx: Add space between + arguments + +2003-01-12 22:28 andy + + * Modules/CheckSymbolExists.cmake: Add macro for checking if symbol + exists + +2003-01-12 10:50 andy + + * Source/cmLocalVisualStudio6Generator.cxx: Use C flags too. Not + exactly the right solution but it will have to do for now. + +2003-01-11 21:47 andy + + * Source/CTest/: cmCTestSubmit.cxx, cmCTestSubmit.h: Add triggering + +2003-01-11 21:47 andy + + * Source/cmCTest.cxx: Fix time output and add triggering + +2003-01-11 10:57 andy + + * Source/CMakeLists.txt: Fix testing of curl on windows + +2003-01-10 20:22 andy + + * Source/CMakeLists.txt: Add curl testing + +2003-01-10 17:31 hoffman + + * CMakeLists.txt: ENH: make it work with cmake 1.6 with no + backwards compatibility + +2003-01-10 11:07 martink + + * Source/cmGlobalGenerator.cxx: fix warnings + +2003-01-10 09:02 martink + + * Source/cmake.cxx: compiler warning + +2003-01-10 07:50 andy + + * Source/CTest/cmCTestSubmit.cxx: Method should return something + +2003-01-09 15:54 martink + + * Modules/FindOpenGL.cmake: better fix for win32 + +2003-01-09 14:00 martink + + * Modules/FindOpenGL.cmake: update to not put PROJECT_SOURCE_DIR as + OPENGL_PATH + +2003-01-09 12:18 martink + + * Source/: cmake.cxx, cmake.h, cmGlobalGenerator.cxx, + cmGlobalGenerator.h: fix bug in env settings + +2003-01-09 11:35 martink + + * Source/: cmMakefile.cxx, cmVariableWatch.h: more option on var + watches + +2003-01-09 11:34 martink + + * Modules/CheckTypeSize.cmake: minor fix to backw compat + +2003-01-09 11:32 hoffman + + * Source/cmGlobalGenerator.cxx: fix warning + +2003-01-09 11:28 hoffman + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h: restore the + environment for cxx and cc in global generator + +2003-01-09 11:27 hoffman + + * Source/cmVariableWatch.h: use cmstdstring in maps + +2003-01-09 09:16 hoffman + + * Source/cmVariableWatch.h: fix syntax for addwatch + +2003-01-09 08:50 martink + + * Modules/: CMakeVS6BackwardCompatibility.cmake, + CMakeVS7BackwardCompatibility.cmake: added big endian stuff + +2003-01-09 08:47 martink + + * Source/cmGlobalGenerator.cxx: only load bw compat if + CMAKE_BACK... is set + +2003-01-09 08:47 martink + + * Source/cmake.cxx: added watches for access of bw compat vars + +2003-01-09 08:44 martink + + * Source/cmAbstractFilesCommand.cxx: now complains more + +2003-01-08 14:41 hoffman + + * Utilities/cmake_release_config_aix: release script for aix + +2003-01-08 13:24 andy + + * Source/: CMakeLists.txt, Makefile.in, cmMakefile.cxx, + cmMakefile.h, cmVariableWatch.cxx, cmVariableWatch.h, cmake.cxx, + cmake.h: Add variable watch support on the branch + +2003-01-08 13:24 andy + + * Source/cmTryCompileCommand.cxx: Merge try compile fixes to branch + +2003-01-08 12:59 andy + + * Source/: CMakeLists.txt, Makefile.in, cmMakefile.cxx, + cmMakefile.h, cmVariableWatch.cxx, cmVariableWatch.h, cmake.cxx, + cmake.h: Add option of watching variables + +2003-01-08 12:12 hoffman + + * Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CheckIncludeFileCXX.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForSTDNamespace.cmake, + Source/cmTryCompileCommand.cxx: ENH: only force the use of ansi + flags in backwards mode + +2003-01-08 11:58 iscott + + * Modules/FindQt.cmake: mark all variables advanced + +2003-01-08 11:53 andy + + * Tests/X11/CMakeLists.txt: Change name of variable + +2003-01-08 11:45 andy + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindX11.cmake: Fix + FindX11 to match convention + +2003-01-08 10:48 iscott + + * Modules/: FindMPEG2.cmake, FindPNG.cmake, FindSDL.cmake, + LinkQT.cmake: LinkQT.cmake has been deprecated for ages, removed + it now. Fixed mistake in FindPNG.cmake Donated FindMPEG2 and + FindSDL from VXL. + +2003-01-07 22:24 andy + + * Source/CTest/: cmCTestSubmit.cxx, cmCTestSubmit.h: Implement FTP + uploading + +2003-01-07 22:23 andy + + * Source/CTest/CMakeLists.txt: Add more places to search for + library, also include curl directory when compiling + +2003-01-07 22:23 andy + + * Source/cmCTest.cxx: New signature + +2003-01-07 15:04 hoffman + + * CMakeLists.txt: ENH: fix install of cmake.1 + +2003-01-07 14:57 hoffman + + * CMakeLists.txt: fix reg ex for install cmake man + +2003-01-07 13:52 martink + + * Source/CMakeLists.txt: adde dinstall for cmCPluginAPI.h + +2003-01-07 13:19 hoffman + + * CMakeLists.txt, Templates/CMakeLists.txt: ENH: fix install and + initial prefix + +2003-01-07 13:05 hoffman + + * Templates/CMakeLists.txt: ENH: fix install target for templates + +2003-01-07 12:54 hoffman + + * Templates/: cconfigure, cconfigure.in, cxxconfigure, + cxxconfigure.in: remove unused files + +2003-01-07 12:05 hoffman + + * CMakeLists.txt: use bootstrap initial flags + +2003-01-07 10:22 king + + * Utilities/cmake_release_config_irix: BUG: Version number on rolle + is 6.4, not 6.5. + +2003-01-06 23:13 andy + + * Source/: cmCTest.cxx, cmCTest.h: Work on submitting + +2003-01-06 23:07 andy + + * Source/CTest/: CMakeLists.txt, cmCTestSubmit.cxx, + cmCTestSubmit.h: Start working on improved test + +2003-01-06 16:09 king + + * Utilities/cmake_release_config_hpux: ERR: Fixes for linking + statically with -ldld. + +2003-01-06 15:41 hoffman + + * ChangeLog.txt: ENH: update change log for new version + +2003-01-06 15:21 king + + * Utilities/cmake_release_config_sun: ERR: Fix for building static + with -ldl on sun. + +2003-01-06 14:56 king + + * Utilities/cmake_release_config_linux: ERR: Fixed typo. + +2003-01-06 14:30 biddi + + * Source/cmVTKWrapTclCommand.cxx: Fix a problem with TCL wrapping + if the source files have a relative path. The dependency is not + correctly handled + +2003-01-06 14:27 king + + * Utilities/: cmake_release_config_hpux, + cmake_release_config_linux, cmake_release_config_sun: ENH: + Updated for static executable. + +2003-01-06 11:31 king + + * Utilities/cmake_release_version.sh: ENH: Updated for 1.6 beta 1 + release. + +2003-01-06 11:23 king + + * Utilities/: cmake_release_config_darwin, + cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_osf, + cmake_release_config_sun, cmake_release_cygwin.sh, + cmake_release_unix_config.sh, cmake_release_version.sh: ENH: + Updated for CMake 1.6 release. Version number is now in a single + file that is sourced by all others. + +2003-01-06 10:58 martink + + * Source/: cmCPluginAPI.h: updated version + +2003-01-06 10:58 king + + * Source/WXDialog/CMakeLists.txt: ERR: Fixed space problem for OSX + and Rez. + +2003-01-06 10:43 martink + + * CMake.rtf: updated docs + +2003-01-06 10:37 king + + * Source/WXDialog/CMakeLists.txt: ENH: Fixed space problem for Rez. + +2003-01-06 09:39 martink + + * Source/: cmMakefile.h: update version + +2003-01-06 09:36 martink + + * Source/cmMakefile.h: updated version + +2003-01-06 09:32 king + + * Modules/Platform/Linux-como.cmake: ENH: Added shared library + settings. + +2003-01-06 09:04 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: ENH: look for AIX compiler as + well + +2003-01-06 08:39 hoffman + + * Modules/Platform/OSF1.cmake: add shared path for OSF + +2003-01-05 11:24 hoffman + + * Modules/Platform/OSF1.cmake: BUG: revert back to rpath, + +2003-01-03 20:26 andy + + * Modules/CheckTypeSize.cmake: Remove debug + +2003-01-03 20:03 andy + + * Modules/: CheckFunctionExists.cmake, CheckLibraryExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake: Fix problems with + required flags + +2003-01-03 19:21 andy + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckIncludeFiles.cmake, CheckLibraryExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake: Add required + flags + +2003-01-03 17:36 king + + * Modules/FindPythonLibs.cmake: ENH: Find python framework on Mac + OSX. + +2003-01-03 16:23 hoffman + + * Modules/Platform/OSF1.cmake: try to fix rpath on OSF + +2003-01-03 16:14 andy + + * Tests/COnly/libc2.h: Fix problem with test on Borland + +2003-01-03 08:12 hoffman + + * Modules/Platform/SunOS.cmake: BUG: bad rpath flag for suns + +2003-01-02 10:27 king + + * Source/cmCPluginAPI.h: ENH: Changed magic numbers to reserved. + Added CMAKE_VERSION_MAJOR and CMAKE_VERSION_MINOR macros to allow + commands to do conditional compilation across multiple versions + of CMake. + +2003-01-02 09:57 king + + * Modules/CMakeBackwardCompatibilityC.cmake: BUG: Don't add + -I/usr/include as an X_CFLAGS setting. + +2003-01-02 09:57 king + + * Modules/FindX11.cmake: BUG: Fixed ordering of X11 search. + +2003-01-02 09:06 andy + + * Tests/COnly/CMakeLists.txt: Rename libraries from c1 to testc1 + +2003-01-02 08:51 hoffman + + * Modules/Platform/: AIX.cmake, OSF1.cmake, SunOS.cmake: clean up + some c/cxx issues + +2003-01-01 18:00 andy + + * Modules/CheckIncludeFiles.cmake: Add macro for checking if a + swequence of includes can be includes + +2003-01-01 17:35 andy + + * Tests/COnly/CMakeLists.txt: Test conversion from ascii to string + +2003-01-01 17:34 andy + + * Source/: cmStringCommand.cxx, cmStringCommand.h: Add a way to + convert ascii to string + +2003-01-01 16:25 andy + + * Modules/: CheckFunctionExists.cmake, CheckLibraryExists.cmake, + CheckTypeSize.cmake, CheckVariableExists.cmake: To prevent cmake + from breaking up arguments, put quotes around them + +2003-01-01 15:02 andy + + * Modules/CheckVariableExists.cmake: Add a way to add custom + libraries to the mix. Also add status reporting + +2003-01-01 15:01 andy + + * Modules/: CheckFunctionExists.cmake, CheckLibraryExists.cmake, + CheckTypeSize.cmake: Add a way to add custom libraries to the mix + +2003-01-01 14:26 andy + + * Tests/COnly/: libc2.c, libc2.h: Shared library should export + symbols on windows + +2002-12-31 15:22 andy + + * Tests/COnly/: CMakeLists.txt, conly.c, libc1.c, libc1.h, libc2.c, + libc2.h: Test also stating and shared libraries + +2002-12-31 13:08 king + + * Modules/: CMakeDefaultMakeRuleVariables.cmake, + Platform/Darwin.cmake, Platform/HP-UX.cmake, + Platform/Linux-como.cmake, Platform/Windows-bcc32.cmake, + Platform/Windows-cl.cmake: ENH: Added to link rules. + +2002-12-31 12:59 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: When there are no + link flags, we want an empty string, not a null pointer. + +2002-12-31 12:41 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: Support LINK_FLAGS + property for static libraries. + +2002-12-30 11:48 hoffman + + * Modules/Platform/AIX.cmake: ENH: fix shared libraries on AIX + +2002-12-30 11:02 king + + * Modules/CMakeBackwardCompatibilityC.cmake, Modules/CheckSizeOf.c, + Modules/CheckSizeOf.cmake, Modules/CheckTypeSize.c, + Modules/CheckTypeSize.cmake, Tests/LoadCommand/CMakeLists.txt, + Tests/LoadCommandOneConfig/CMakeLists.txt: ENH: Renamed + Modules/CheckSizeOf to Modules/CheckTypeSize for consistency with + the macro name that is defined by the module. + +2002-12-30 08:18 andy + + * Source/cmSystemTools.cxx: Fix problem on windows with network + paths + +2002-12-30 07:47 hoffman + + * Source/: cmAbstractFilesCommand.h, cmAddCustomCommandCommand.h, + cmAddCustomTargetCommand.h, cmAddDefinitionsCommand.h, + cmAddExecutableCommand.h, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.h, cmBuildCommand.h, + cmBuildNameCommand.h, cmFLTKWrapUICommand.h: ENH: clean up docs + some + +2002-12-27 11:14 starreveld + + * Modules/FindPythonLibs.cmake: ENH: find python framework and + include files on OSX + +2002-12-26 19:59 andy + + * Modules/CMakeJavaCompiler.cmake.in: If there is no java compiler + report error on ADD_JAVA_LIBRARY + +2002-12-26 13:58 andy + + * Modules/Platform/Windows-cl.cmake: Add missing closing bracket + +2002-12-23 12:19 hoffman + + * Source/cmSystemTools.h: ENH: fix for AIX + +2002-12-23 09:51 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: WAR: remove warinings + +2002-12-23 09:25 hoffman + + * Source/cmSystemTools.cxx: ENH: handle // in the path + +2002-12-22 15:19 hoffman + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: ENH: fixes for borland + with spaces in the path + +2002-12-22 11:50 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: clean up warning and use + more short paths + +2002-12-22 10:09 barre + + * Modules/: Documentation.cmake, FindHTMLHelp.cmake, FindHhc.cmake: + ENH: it's time to create a real Microsoft HTML Help Workshop + CMake module + +2002-12-21 11:14 hoffman + + * Source/: cmGetTargetPropertyCommand.cxx, + cmGetTargetPropertyCommand.h, cmSetTargetPropertiesCommand.cxx, + cmSetTargetPropertiesCommand.h: ENH: add target properties files + +2002-12-20 17:15 hoffman + + * Source/cmCommands.cxx, Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: ENH: add + target properties + +2002-12-20 16:15 king + + * Source/cmVTKWrapTclCommand.cxx: ERR: Tcl_PkgProvide takes char*, + so we cannot pass a string literal to it. + +2002-12-20 12:59 king + + * Modules/Platform/Windows-cl.cmake, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Templates/CMakeVisualStudio6Configurations.cmake: ENH: Visual + Studio 6 and 7 generators now set CMAKE_CONFIGURATION_TYPES to be + a semicolon-separated list of configurations that will be built. + +2002-12-20 11:56 barre + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindX11.cmake: FIX: + make CMAKE_X_LIBS and CMAKE_X_CFLAGS advanced + +2002-12-20 11:20 hoffman + + * Source/cmGlobalUnixMakefileGenerator.cxx: ENH: add a check to + make sure cmake can find the c or C++ compiler for trycompile + +2002-12-20 11:20 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: fix for backwards + compatibility + +2002-12-20 10:23 martink + + * Source/: cmSourceFilesCommand.cxx, cmake.cxx: testing more + agressive compatability settings + +2002-12-20 09:43 king + + * Modules/FindTCL.cmake: ENH: Use the Mac -framework for Tk if it + is available. + +2002-12-20 09:42 king + + * Modules/FindTCL.cmake: ENH: Use the Mac -framework for Tcl if it + is available. + +2002-12-19 15:34 hoffman + + * Source/cmGlobalGenerator.cxx: BUG: enable the languages when not + running in global mode + +2002-12-19 12:51 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: better docs + +2002-12-19 12:51 hoffman + + * Modules/Platform/Windows-cl.cmake: ENH: make linker flags use + init values so users can set them from the cache + +2002-12-18 16:58 king + + * Source/cmVTKWrapTclCommand.cxx: ENH: Tcl packages now + Tcl_PkgProvide their own name and version. + +2002-12-18 10:52 king + + * Modules/Platform/gcc.cmake: ENH: Adding build type flags for C. + +2002-12-18 09:38 king + + * Source/CMakeLists.txt, Tests/X11/CMakeLists.txt: ERR: Project + name and executable name should match for consistency in the X11 + test. + +2002-12-17 17:05 king + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: ENH: Added return type + int to ExecuteCommand. + +2002-12-17 14:55 king + + * Source/cmFLTKWrapUICommand.cxx: BUG: Need at least 2 arguments, + not exactly 2. + +2002-12-17 14:55 king + + * Source/cmListFileCache.h: ERR: Added operator != for SGI. + +2002-12-17 14:54 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeDetermineJavaCompiler.cmake, CMakeDetermineSystem.cmake, + CMakeSystemSpecificInformation.cmake, CheckFunctionExists.cmake, + CheckIncludeFile.cmake, CheckIncludeFileCXX.cmake, + CheckLibraryExists.cmake, CheckSizeOf.cmake, + CheckVariableExists.cmake, TestBigEndian.cmake, + TestCXXAcceptsFlag.cmake, TestForANSIForScope.cmake, + TestForSTDNamespace.cmake: ENH: use CMAKE_ROOT and not PROJECT_ + for try compile stuff, this allows projects within projects to + have different languages + +2002-12-17 13:28 king + + * Source/CMakeLists.txt, Tests/X11/CMakeLists.txt: BUG: Renamed X11 + test executable to useX11 to avoid conflict with name of library. + +2002-12-17 12:56 martink + + * Source/cmLocalVisualStudio6Generator.cxx: better handling of + Module + +2002-12-17 12:11 andy + + * Source/cmake.cxx: Save directories when doing global build + +2002-12-17 11:58 king + + * Source/cmMacroCommand.cxx: ENH: Improved error message for macro + invoked with incorrect number of arguments. + +2002-12-17 11:57 king + + * Source/cmTryCompileCommand.cxx: ENH: TryCompile should produce a + verbose makefile. + +2002-12-17 11:55 king + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindX11.cmake: ENH: + FindX11.cmake module now almost fully duplicates old configure + functionality. + +2002-12-17 10:04 martink + + * Source/cmLocalVisualStudio7Generator.cxx: some clean up in link + directories + +2002-12-16 21:19 andy + + * Source/: CMakeLists.txt, cmCTest.cxx, cmCTest.h, ctest.cxx, + ctest.h: Split ctest into two three files + +2002-12-16 18:28 king + + * Source/cmLocalVisualStudio7Generator.cxx: BUG: Cannot remove + quotes from defined flags. + +2002-12-16 12:13 andy + + * Source/cmake.cxx: Fix switching from local to global generation + when cmake version changes or when things change inside version + +2002-12-16 11:10 king + + * Source/cmake.cxx: ENH: Added copy_if_different option to -E flag. + +2002-12-16 09:39 king + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: BUG: Fixed quotes in output + paths. + +2002-12-15 13:45 andy + + * Source/: ctest.cxx, ctest.h: Add support for only showing what + will be done. This way you can for example get a list of all + tests: ctest -N or list of all tests that match regex: ctest -N + -R regex + +2002-12-13 17:35 king + + * Tests/: Complex/CMakeLists.txt, + Complex/cmTestGeneratedHeader.h.in, + Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestGeneratedHeader.h.in, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestGeneratedHeader.h.in, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx: ENH: Added test for + generated header included by non-generated source. + +2002-12-13 17:34 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: Need source file + and OBJECT_DEPENDS as dependencies of an object file. + +2002-12-13 16:16 king + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, + cmSetSourceFilesPropertiesCommand.cxx: ENH: Added source file + property OBJECT_DEPENDS to support generated header files + included in non-generated sources. + +2002-12-13 14:58 king + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckIncludeFileCXX.cmake, CheckLibraryExists.cmake, + CheckSizeOf.cmake, CheckVariableExists.cmake: ENH: Don't repeat + check even if answer was no. + +2002-12-13 09:52 martink + + * Source/cmIfCommand.cxx: made more strict + +2002-12-13 09:27 martink + + * Source/: ctest.cxx, cmCPluginAPI.cxx: fixed warnings + +2002-12-13 09:18 king + + * Source/: cmFunctionBlocker.h, cmIfCommand.h: ERR: Fixed unused + parameter warning. + +2002-12-12 17:48 hoffman + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: Make try + compile add a depend to re-run cmake if its source chagnes + +2002-12-12 12:02 king + + * Utilities/: cmake_release_config_darwin, + cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_osf, + cmake_release_config_sun, cmake_release_cygwin.sh: ENH: Updated + for 1.4.7 release. + +2002-12-12 11:51 martink + + * Source/cmMakefile.h: updated to patch7 + +2002-12-12 11:36 king + + * Source/: cmListFileCache.cxx, cmListFileCache.h, + cmMacroCommand.cxx, cmMakefile.cxx, cmMakefile.h, ctest.cxx: ENH: + Improved filename/line number reporting in error message. Macro + invocations now chain up the error message. + +2002-12-12 10:25 king + + * Modules/CMakeTestGNU.c: ERR: Fixed syntax errors for picky + preprocessors. + +2002-12-12 10:25 king + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: ERR: Need double-quotes around + expression to be mached in IF command. + +2002-12-12 10:10 king + + * Tests/: Complex/CMakeLists.txt, Complex/VarTests.cmake, + ComplexOneConfig/CMakeLists.txt, ComplexOneConfig/VarTests.cmake, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/VarTests.cmake: BUG: Can't double-quote + foreach arguments. + +2002-12-12 08:42 martink + + * Tests/Wrapping/CMakeLists.txt: now uses SET instead of + SOURCE_LIST command + +2002-12-11 18:20 king + + * Source/cmListFileCache.cxx: BUG: Multi-line functions must also + increment line number, not the pointer. + +2002-12-11 18:15 king + + * Source/cmEndForEachCommand.h: ERR: Dummy InitialPass + implementation must return a value. + +2002-12-11 18:13 king + + * Source/: cmAbstractFilesCommand.cxx, + cmAddCustomCommandCommand.cxx, cmAddCustomTargetCommand.cxx, + cmAddDefinitionsCommand.cxx, cmAddDependenciesCommand.cxx, + cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx, + cmAddTestCommand.cxx, cmCPluginAPI.cxx, cmCommand.h, + cmCreateTestSourceList.cxx, cmEndForEachCommand.cxx, + cmEndForEachCommand.h, cmFindFileCommand.cxx, + cmFindLibraryCommand.cxx, cmFindPathCommand.cxx, + cmFindProgramCommand.cxx, cmForEachCommand.cxx, + cmForEachCommand.h, cmFunctionBlocker.h, cmITKWrapTclCommand.cxx, + cmIfCommand.cxx, cmIfCommand.h, cmIncludeDirectoryCommand.cxx, + cmInstallProgramsCommand.cxx, cmInstallTargetsCommand.cxx, + cmLinkDirectoriesCommand.cxx, cmLinkLibrariesCommand.cxx, + cmListFileCache.cxx, cmListFileCache.h, cmLoadCacheCommand.cxx, + cmLoadCommandCommand.cxx, cmLocalUnixMakefileGenerator.cxx, + cmMacroCommand.cxx, cmMacroCommand.h, cmMakefile.cxx, + cmMakefile.h, cmMarkAsAdvancedCommand.cxx, cmMessageCommand.cxx, + cmProjectCommand.cxx, cmRemoveCommand.cxx, + cmSetSourceFilesPropertiesCommand.cxx, cmSourceFilesCommand.cxx, + cmSourceFilesRemoveCommand.cxx, cmSubdirCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx, + cmTargetLinkLibrariesCommand.cxx, cmUtilitySourceCommand.cxx, + cmVariableRequiresCommand.cxx, cmWriteFileCommand.cxx, ctest.cxx: + ENH: Moved ExpandListVariables out of individual commands. + Argument evaluation rules are now very consistent. Double quotes + can always be used to create exactly one argument, regardless of + contents inside. + +2002-12-11 14:18 martink + + * Source/CMakeSetup.dsw: removed dsw file + +2002-12-11 14:16 martink + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: added a Free method + +2002-12-11 14:15 king + + * Source/: cmCreateTestSourceList.cxx, cmSystemTools.cxx: ENH: + Improved implementation of MSVC debug hook to only add the hook + if DART_TEST_FROM_DART is set in the environment. This is better + than always adding the hook and testing the environment from the + callback. + +2002-12-11 12:09 andy + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: Add check so that java + projects build without C++ + +2002-12-11 11:49 king + + * Source/: cmDumpDocumentation.cxx, cmSystemTools.cxx, + cmSystemTools.h, cmakemain.cxx, cmaketest.cxx, cmw9xcom.cxx, + ctest.cxx: ENH: Added cmSystemTools::EnableMSVCDebugHook() to + prevent error dialogs when CMake is invoked by Dart. + +2002-12-11 11:32 king + + * Source/cmCreateTestSourceList.cxx: ENH: Generate code to setup + MSVC debug library hook. The test driver program will not + display error dialogs if DART_TEST_FROM_DART is set in the + environment. + +2002-12-11 10:34 andy + + * Modules/CMakeDetermineJavaCompiler.cmake, + Modules/CMakeJavaCompiler.cmake.in, Source/cmGlobalGenerator.cxx: + Add java support + +2002-12-10 17:52 andy + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h: Add support for comments on + custom commands in visual studio 6 + +2002-12-10 17:43 andy + + * Source/: cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: Add support for comments on + custom commands in visual studio 7 + +2002-12-10 16:46 andy + + * Source/: cmCustomCommand.cxx, cmCustomCommand.h, cmMakefile.cxx, + cmMakefile.h, cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmLocalUnixMakefileGenerator.cxx, + cmSourceGroup.cxx, cmSourceGroup.h: Add comment support, so that + you can see in build process what the custom command does + +2002-12-10 16:45 andy + + * Source/: cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h: Allow target with no command + +2002-12-10 16:08 hoffman + + * Source/: cmOutputRequiredFilesCommand.cxx, + cmOutputRequiredFilesCommand.h: BUG: update for changes in + cmMakeDepend + +2002-12-10 16:01 hoffman + + * Source/: cmITKWrapTclCommand.cxx, cmITKWrapTclCommand.h: ENH: + update use of makedepend + +2002-12-10 15:55 hoffman + + * Source/: cmITKWrapTclCommand.cxx, cmITKWrapTclCommand.h: ENH: + update to new style MakeDepend + +2002-12-10 14:51 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: FIX: drag&drop on CMake + icon was not working anymore. - the cmake instance had to be + created before accessing the cache (doh) - the cache iterator was + not queried properly (seems the API changed) + +2002-12-10 14:12 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: make sure empty depends + are not used + +2002-12-10 14:10 martink + + * Source/: cmOutputRequiredFilesCommand.cxx, + cmOutputRequiredFilesCommand.h: updated for changes in Depend + Calcs + +2002-12-10 13:59 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: do not output empty + depends + +2002-12-10 13:36 andy + + * Source/ctest.cxx: Remove warning + +2002-12-10 10:34 hoffman + + * Source/: cmMakeDepend.cxx, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: BUG: fix compile flags for source + files, and fix depend bug for cmake 14 branch + +2002-12-10 09:34 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: remove cerr + +2002-12-10 09:28 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h, cmMakeDepend.cxx: BUG: fix bug + in depends + +2002-12-09 16:23 andy + + * Source/cmaketest.cxx: Add to usage + +2002-12-09 16:22 andy + + * Modules/FindPythonLibs.cmake: Better search for python + +2002-12-09 14:33 king + + * Modules/CMakeImportBuildSettings.cmake: ENH: Using only filename + without path or extension for comparing build tools. + +2002-12-09 10:07 hoffman + + * Source/MFCDialog/: CMakeSetup.cpp, CMakeSetupDialog.cpp, + CMakeSetupDialog.h: clean up leaks + +2002-12-09 08:27 hoffman + + * Modules/: CMakeVS6BackwardCompatibility.cmake, + CMakeVS7BackwardCompatibility.cmake: use win32 threads for win32 + +2002-12-08 22:36 andy + + * Source/: ctest.cxx, ctest.h: Initial addition of coverage + +2002-12-08 22:35 andy + + * Source/cmSystemTools.cxx: Fix bug in globbing. Now it actually + uses only files or directories that result in globbing not the + ones that were is the vector before + +2002-12-08 22:33 andy + + * Source/: cmGlobalGenerator.cxx, cmLocalUnixMakefileGenerator.cxx: + Rename variable to remove warning + +2002-12-08 14:25 starreveld + + * Templates/CMakeLists.txt: ERR: Remove references to files removed + 4 days ago + +2002-12-06 16:03 hoffman + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + CMakeSetupDialog.h: ENH: move version to title bar + +2002-12-06 15:35 hoffman + + * Source/: cmGlobalUnixMakefileGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmMakefile.cxx: ENH: fix IntDir + jump and build problem + +2002-12-06 11:43 hoffman + + * Source/cmGlobalGenerator.cxx: ENH: set the CXX and CC environment + vars + +2002-12-06 10:16 hoffman + + * Modules/CMakeDetermineCCompiler.cmake: BUG: fix C compiler init + +2002-12-06 10:09 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: clean up compiler picking code + +2002-12-06 10:02 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Source/cmGlobalVisualStudio6Generator.cxx: fix for generator + picked compilers + +2002-12-05 16:53 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: use correct path type + for check_cache file + +2002-12-05 16:52 hoffman + + * Source/cmDynamicLoader.cxx: fix free before use + +2002-12-05 15:54 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: add status bar and help + for items + +2002-12-05 15:48 hoffman + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + PropertyList.cpp: ENH: add status bar and help for items + +2002-12-05 14:56 hoffman + + * Source/: cmCacheManager.cxx, cmLocalUnixMakefileGenerator.cxx: + ENH: add a rule to automatically re-run cmake from the top if the + CMakeCache.txt file is changed + +2002-12-05 14:24 andy + + * Source/Makefile.in: Better dependencies for bootstrap + +2002-12-05 13:44 hoffman + + * Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeVS6BackwardCompatibility.cmake, + Modules/CMakeVS6FindMake.cmake, + Modules/CMakeVS7BackwardCompatibility.cmake, + Modules/CMakeVS7FindMake.cmake, Modules/Dart.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalBorlandMakefileGenerator.h, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.h, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.h, + Source/cmGlobalVisualStudio6Generator.cxx, + Source/cmGlobalVisualStudio6Generator.h, + Source/cmGlobalVisualStudio7Generator.cxx, + Source/cmGlobalVisualStudio7Generator.h, + Source/cmLocalVisualStudio6Generator.cxx: ENH: unify + EnableLanguage across all generators + +2002-12-05 11:55 andy + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.cxx, LoadCommand/LoadedCommand.h.in, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommandOneConfig/LoadedCommand.h.in: Speedup the test + +2002-12-05 11:42 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: make sure OK can not + be hit first time around + +2002-12-05 11:09 martink + + * Source/cmGlobalVisualStudio7Generator.h: use InAll target setting + to determine what targets are in the default build + +2002-12-05 10:47 king + + * Modules/: FindVTK.cmake, UseVTK40.cmake, + UseVTKBuildSettings40.cmake, UseVTKConfig40.cmake: ENH: Added + support for finding/using VTK 4.0 without using its UseVTK.cmake + file that does a LOAD_CACHE. + +2002-12-05 10:34 king + + * Modules/CMakeImportBuildSettings.cmake: BUG: Fix for string + comparison when one string is empty. + +2002-12-05 09:46 king + + * Modules/: CMakeBuildSettings.cmake.in, + CMakeExportBuildSettings.cmake, CMakeImportBuildSettings.cmake: + ENH: Adding CMAKE_EXPORT_BUILD_SETTINGS and + CMAKE_IMPORT_BUILD_SETTINGS macro. + +2002-12-05 08:30 martink + + * Source/cmGlobalVisualStudio7Generator.cxx: use InAll target + setting to determine what targets are in the default build + +2002-12-04 18:44 king + + * Source/: cmStringCommand.cxx, cmStringCommand.h: ENH: Added + COMPARE modes to STRING command. + +2002-12-04 16:59 king + + * Modules/CMakeUnixFindMake.cmake: BUG: Removed stray debugging + message. + +2002-12-04 14:18 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: When a full path to + a library cannot be parsed, just add the whole path to the link + line. If it isn't a valid path, the linker will complain. + +2002-12-04 10:57 hoffman + + * Modules/CMakeUnixFindMake.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx, Source/cmake.cxx, + Source/cmake.h: BUG: fix get make command problems. + +2002-12-04 10:44 martink + + * Source/cmake.cxx: added CMAKE_BACKWARDS_COMPATIBILITY entry + +2002-12-04 10:25 martink + + * Source/cmLinkLibrariesCommand.h: updated comment + +2002-12-03 16:19 hoffman + + * Modules/CMakeBorlandFindMake.cmake, + Modules/CMakeNMakeFindMake.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CMakeUnixFindMake.cmake, Modules/Platform/CYGWIN.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.cxx: determine + CMAKE_MAKE_PROGRAM in EnableLanguage + +2002-12-03 15:23 hoffman + + * Source/CMakeLists.txt, + Source/cmLocalBorlandMakefileGenerator.cxx, + Source/cmLocalBorlandMakefileGenerator.h, + Source/cmLocalNMakeMakefileGenerator.cxx, + Source/cmLocalNMakeMakefileGenerator.h, + Templates/CCMakeSystemConfig.cmake.in, + Templates/CMakeBorlandWindowsSystemConfig.cmake, + Templates/CMakeNMakeWindowsSystemConfig.cmake, + Templates/CXXCMakeSystemConfig.cmake.in: remove unused files + +2002-12-03 14:32 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: remove code warrior and + fixed GUI isues + +2002-12-03 14:27 martink + + * Source/MFCDialog/CMakeSetup.rc: remove code warrior and fixed GUI + isues + +2002-12-03 14:15 ibanez + + * Modules/FindImageMagick.cmake: Module to find tools from the + ImageMagick package. These tools are useful for converting image + formats. + +2002-12-03 14:09 martink + + * Source/: CMakeLists.txt, Makefile.in, cmake.cxx, + MFCDialog/CMakeSetup.rc, MFCDialog/CMakeSetupDialog.cpp, + MFCDialog/CMakeSetupDialog.h: remove code warrior and fixed GUI + isues + +2002-12-03 13:46 ibanez + + * Modules/FindFLTK.cmake: ENH: description of variables now follows + other style in other .cmake files. + +2002-12-03 13:44 ibanez + + * Modules/FindGLUT.cmake: ENH: Description of variables now + specifies that the full path is required. + +2002-12-03 12:59 martink + + * Source/cmMakefile.cxx: fix purify FMR + +2002-12-03 11:23 martink + + * CMakeLists.txt: bug fix and some cleanup + +2002-12-03 11:21 martink + + * Tests/.NoDartCoverage: clean up coverage some + +2002-12-03 10:47 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/Platform/Linux-como.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: correctly place both + LINK_FLAGS and CXX_LINK_FLAGS and C_LINK_FLAGS into all the rules + +2002-12-03 09:59 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake: use LINK_FLAGS not C + and CXX LINK_FLAGS + +2002-12-02 16:35 martink + + * Source/cmStringCommand.cxx: fix compile warning + +2002-12-02 16:15 hoffman + + * Source/cmMakefile.cxx: add project command even if inheriting + +2002-12-02 16:08 hoffman + + * Source/cmListFileCache.cxx: ENH: put the project command at the + front of the project + +2002-12-02 15:59 martink + + * Source/: cmFindLibraryCommand.cxx, cmMakefile.cxx, cmMakefile.h, + cmSystemTools.cxx, cmSystemTools.h: removed cmMakefile depend + from cmSystemTools + +2002-12-02 15:43 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: ENH: remove forced + enable language call because a PROJECT command is now added to + each project + +2002-12-02 15:37 hoffman + + * Source/: cmListFileCache.cxx, cmMakefile.cxx: ENH: remove cerr + calls + +2002-12-02 15:30 hoffman + + * Source/: cmListFileCache.cxx, cmListFileCache.h, cmMakefile.cxx: + ENH: add PROJECT command if there is not one + +2002-12-02 15:03 martink + + * Source/cmIfCommand.cxx: minor fix + +2002-12-02 13:18 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: add a space around + the compile flags + +2002-12-02 10:33 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix compile flags + for a single file + +2002-11-29 18:56 andy + + * Source/cmGlobalUnixMakefileGenerator.cxx: Fix problem on unix + with space + +2002-11-29 16:35 andy + + * Source/cmSystemTools.cxx: When cd-jing into directory, if + directory has space, it should put quotes around. I guess we + could just put quotes around all the time + +2002-11-28 23:45 ibanez + + * Modules/FindFLTK.cmake: ENH: FLTK 1.1.1 under Windows links now + with the comctl32 library. + +2002-11-27 07:42 andy + + * Tests/ObjC++/CMakeLists.txt: Add missing library. The test should + be linked to framework Cocoa + +2002-11-27 07:41 andy + + * Source/cmSystemTools.cxx: Add objective C++ file in the list of + C++ files. This may be wrong, but it will fix problems on Mac for + now + +2002-11-26 19:02 starreveld + + * Source/CMakeLists.txt: Add ObjC++ test for OSX + +2002-11-26 19:01 starreveld + + * Tests/ObjC++/: CMakeLists.txt, objc++.mm: + Test for ObjC++ on OSX machines only + +2002-11-26 09:37 andy + + * Source/cmTryCompileCommand.cxx: Remove warning + +2002-11-25 17:57 andy + + * Modules/FindwxWindows.cmake: Change priorities + +2002-11-22 16:59 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: fix for paths with + spaces and borland + +2002-11-22 16:18 hoffman + + * Modules/Platform/Windows-bcc32.cmake: change flags for borland + +2002-11-22 15:44 andy + + * Source/cmLocalVisualStudio6Generator.cxx: Revert back to 1.5, + since it is fixed in ConvertToOutputPath and this breaks Windows + 98 + +2002-11-22 09:45 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Rename local variable + +2002-11-21 23:54 hoffman + + * Source/cmLocalVisualStudio7Generator.cxx: add support for + CMAKE_C_FLAGS and handle quotes in CMAKE_CXX_FLAGS + +2002-11-21 16:11 hoffman + + * Source/cmTryCompileCommand.cxx: fix for c flags + +2002-11-21 16:03 hoffman + + * Source/: cmTryCompileCommand.cxx: fix flag setting + +2002-11-21 15:36 hoffman + + * Modules/Platform/CYGWIN.cmake: remove debug stuff + +2002-11-21 15:15 hoffman + + * Source/cmTryCompileCommand.cxx: move compile defs to cxx and c + flags + +2002-11-21 14:59 hoffman + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: clean up + entire temp directory + +2002-11-21 14:45 hoffman + + * Modules/: CheckIncludeFileCXX.cmake, + TestForANSIStreamHeaders.cmake: try to fix check for ansi stream + +2002-11-21 14:32 hoffman + + * Modules/CheckIncludeFileCXX.cmake: fix order + +2002-11-21 14:24 hoffman + + * Modules/TestForSTDNamespace.cmake: fix order + +2002-11-21 14:11 hoffman + + * Modules/CheckIncludeFileCXX.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForANSIStreamHeaders.cmake, + Modules/TestForSTDNamespace.cmake, + Source/cmTryCompileCommand.cxx: move ansi cxx flags stuff out of + try compile and into cmake files + +2002-11-21 13:37 hoffman + + * Source/cmSystemTools.cxx: fix network paths with spaces + +2002-11-21 13:28 hoffman + + * Modules/CMakeBackwardCompatibilityCXX.cmake: have to cache + ansi_cxxflags + +2002-11-21 12:59 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, + TestCXXAcceptsFlag.cmake: spelling error + +2002-11-21 12:52 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, DummyCXXFile.cxx, + TestCXXAcceptsFlag.cmake, Platform/IRIX64.cmake, + Platform/OSF1.cmake: add checks for ansi flags and not hard code + them + +2002-11-21 12:26 andy + + * Source/cmLocalVisualStudio6Generator.cxx: Fix for network paths + with space + +2002-11-21 12:26 andy + + * Source/ctest.cxx: Fix for network paths + +2002-11-21 11:46 barre + + * Modules/CMakeSystemSpecificInformation.cmake: FUX: those vars + need to be ADVANCED + +2002-11-21 10:11 king + + * Modules/: CheckVariableExists.c, CheckVariableExists.cmake: ENH: + Added CHECK_VARIABLE_EXISTS macro. + +2002-11-21 10:03 king + + * Source/CursesDialog/cmCursesMainForm.cxx: ERR: Fixed string + literal to char* warnings. + +2002-11-21 08:45 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/Platform/CYGWIN.cmake, + Source/cmLocalUnixMakefileGenerator.cxx, + Tests/SystemInformation/SystemInformation.in: fix for create + shared library + +2002-11-21 08:19 martink + + * Tests/LinkLineOrder/: Exec1.c, Exec2.c, NoDepB.c, NoDepC.c, + NoDepE.c, NoDepF.c, NoDepX.c, NoDepY.c, NoDepZ.c, One.c: + converted c plus plus comments + +2002-11-21 08:12 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: ENH: fix for module + run time flag + +2002-11-20 18:18 hoffman + + * Source/: cmCacheManager.h, cmSystemTools.cxx: rename foo + variables to better names + +2002-11-20 18:00 king + + * Source/: cmLoadCacheCommand.cxx, cmLoadCacheCommand.h: ENH: Added + READ_WITH_PREFIX option to LOAD_CACHE command. This allows + reading of cache values from another cache without actually + creating local copies of the cache entires. The values are + stored as prefixed local makefile variables. + +2002-11-20 16:23 king + + * Modules/FindVTK.cmake: ENH: Added support to find VTK 4.0. + +2002-11-20 15:23 hoffman + + * Modules/CMakeCCompiler.cmake.in: BUG: use CMAKE_COMPILER_IS_GNUCC + not CMAKE_COMPILER_IS_GNUGCC + +2002-11-20 14:40 ibanez + + * Modules/FindLATEX.cmake: ENH: Now also locates the "makeindex" + program. + +2002-11-20 14:11 king + + * Modules/FindVTK.cmake: ENH: Only search VTK_INSTALL_PATH if + USE_INSTALLED_VTK is on. Only search VTK_BINARY_PATH if + USE_BUILT_VTK is on. + +2002-11-20 13:37 king + + * Modules/FindVTK.cmake: ENH: New implementation of FindVTK to take + advantage of VTKConfig.cmake. Also provides more powerful search + path mechanism, and requires only one cache entry in user + project. + +2002-11-20 12:58 king + + * Source/cmSystemTools.cxx: BUG: Attempt to fix CopyFile problem + using flush before check for success. + +2002-11-20 09:06 king + + * Source/cmGetFilenameComponentCommand.cxx: ERR: Fixed + signed/unsigned warning. + +2002-11-20 09:06 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Fixed unused + parameter warning. + +2002-11-20 09:04 martink + + * Tests/LinkLineOrder/NoDepA.c: fixed comments to be c style not c + plus plus + +2002-11-19 18:17 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Source/cmGetFilenameComponentCommand.cxx, + Source/cmGetFilenameComponentCommand.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h: allow flags to be in the CC and CXX + environment variables + +2002-11-19 18:01 perera + + * Source/CMakeLists.txt, Source/cmMakefile.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, + Tests/LinkLineOrder/CMakeLists.txt, Tests/LinkLineOrder/Exec1.c, + Tests/LinkLineOrder/Exec2.c, Tests/LinkLineOrder/NoDepA.c, + Tests/LinkLineOrder/NoDepB.c, Tests/LinkLineOrder/NoDepC.c, + Tests/LinkLineOrder/NoDepE.c, Tests/LinkLineOrder/NoDepF.c, + Tests/LinkLineOrder/NoDepX.c, Tests/LinkLineOrder/NoDepY.c, + Tests/LinkLineOrder/NoDepZ.c, Tests/LinkLineOrder/One.c, + Tests/LinkLineOrder/Two.c: BUG: the dependency analysis would + incorrectly alphabetically re-order the link lines, which affects + external libraries pulled up from deep within the dependency + tree. Fixed by preserving order everywhere. + +2002-11-19 15:55 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: fixes to better honor env CC and + CXX + +2002-11-19 14:40 hoffman + + * Source/cmSystemTools.cxx: ENH: add some better output when copy + file fails + +2002-11-19 14:40 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: fix some warnings + +2002-11-19 13:19 andy + + * Source/CursesDialog/cmCursesPathWidget.cxx: Add / after directory + name when doing tab completion + +2002-11-19 13:09 andy + + * Source/CursesDialog/: cmCursesMainForm.cxx, cmCursesMainForm.h: + Add progress to ccmake + +2002-11-19 12:20 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: BUG: fix CFLAGS + +2002-11-19 12:18 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: BUG: fix handling of CXX + +2002-11-19 09:12 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: fix warning + +2002-11-19 09:01 martink + + * Source/cmSystemTools.cxx: fix in warning + +2002-11-18 16:29 andy + + * Source/CursesDialog/: cmCursesMainForm.cxx, cmCursesMainForm.h: + Initial add of progress + +2002-11-18 15:14 hoffman + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindThreads.cmake: + BUG: fix for thread and cache override + +2002-11-18 10:52 andy + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckLibraryExists.cmake, CheckSizeOf.cmake, + TestForANSIForScope.cmake, TestForANSIStreamHeaders.cmake, + TestForSTDNamespace.cmake: Add more messages, make messages look + the same, add checks if test was already successfull + +2002-11-18 10:51 andy + + * Modules/CMakeSystemSpecificInformation.cmake: If system detection + fails, make copy of CMakeCache + +2002-11-18 09:08 hoffman + + * Tests/SystemInformation/SystemInformation.in: add print for + compiler is gnu + +2002-11-17 17:28 martink + + * Source/: cmake.cxx, cmLocalUnixMakefileGenerator.cxx: fix some + compiler warnings hopefully + +2002-11-15 17:45 hoffman + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix for borland run + time dll + +2002-11-15 16:00 hoffman + + * Modules/Platform/SunOS.cmake: fix for sun + +2002-11-15 13:17 martink + + * Source/cmake.cxx: fixed bad source directory bug + +2002-11-15 12:54 martink + + * Source/cmIfCommand.cxx: fixed compiler warning + +2002-11-15 10:07 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: ENH: add back + install prefix + +2002-11-15 09:30 hoffman + + * Modules/FindThreads.cmake: fix thread logic + +2002-11-15 09:16 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: ENH: add CFLAGS and + CXXFLAGS + +2002-11-15 07:42 andy + + * Source/cmakemain.cxx: Oops, std namespace + +2002-11-14 18:18 andy + + * Source/WXDialog/: cmWXMainFrame.cxx, cmWXMainFrame.h, + wxCMakeSetup.cxx: Add progress reporting + +2002-11-14 17:12 andy + + * Source/cmakemain.cxx: Add Progress support + +2002-11-14 16:29 berk + + * Modules/Platform/HP-UX.cmake: temp fix for hp + +2002-11-14 16:29 hoffman + + * Source/TODO: [no log message] + +2002-11-14 16:12 berk + + * Modules/Platform/HP-UX.cmake: fix flags for hp + +2002-11-14 14:06 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: Fix compile flags on c + files in static liobraries on windows + +2002-11-14 11:33 andy + + * Modules/CMakeSystemSpecificInformation.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix flags for c + compiler on windows + +2002-11-14 11:16 martink + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: added another func + +2002-11-14 11:03 martink + + * Source/: cmCPluginAPI.h, cmCPluginAPI.cxx: added another func + +2002-11-14 09:38 andy + + * Modules/: FindJNI.cmake, FindJava.cmake, FindPythonLibs.cmake: + Clean find for Python, add find for python 2.2 on windows, + cleanup java on windows and add java 1.4 support + +2002-11-14 09:38 berk + + * Source/cmLocalUnixMakefileGenerator.cxx: Added missing space. + +2002-11-14 09:37 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: Fix building on NMake. + Use short paths + +2002-11-14 08:59 hoffman + + * Modules/Platform/Windows-bcc32.cmake: BUG: fix for missing temp + file variable + +2002-11-13 23:36 hoffman + + * Modules/Platform/Windows-bcc32.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: reorder tWR so that it + does not crash with shared + +2002-11-13 20:14 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: add support for borland + run time flag for shared builds + +2002-11-13 20:11 hoffman + + * Modules/Platform/Windows-bcc32.cmake: fix shared builds on + borland and add debug stuff for makefiles + +2002-11-13 18:27 hoffman + + * Source/: cmLocalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.h: BUG: fix for build out of dir for + windows + +2002-11-13 16:31 hoffman + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckLibraryExists.cmake, CheckSizeOf.cmake: ENH: add status + messages + +2002-11-13 15:59 martink + + * Source/: cmLocalUnixMakefileGenerator.cxx, cmMakefile.cxx, + cmMakefile.h, cmMessageCommand.cxx, cmMessageCommand.h: ENH: + space fixes and add a status option to message command + +2002-11-13 15:32 martink + + * Modules/Platform/Windows-bcc32.cmake: ENH: move -P flag from + cxxflags to the compile line for cxx files + +2002-11-13 15:20 hoffman + + * Source/: cmGlobalUnixMakefileGenerator.cxx, cmake.cxx, cmake.h: + ENH: check to make sure cmake matches the cmake used to generate + the cache + +2002-11-13 14:51 hoffman + + * Modules/Platform/Windows-bcc32.cmake: ENH: use correct run time + library for borland + +2002-11-13 14:31 hoffman + + * Source/: cmCacheManager.cxx, cmGlobalUnixMakefileGenerator.cxx: + ENH: force a global generate if the cache version does not match + the running cmake + +2002-11-13 13:19 berk + + * Source/Makefile.in: BUG: add missing depend rules for hp make + +2002-11-13 11:49 hoffman + + * Modules/FindX11.cmake: fix for nsl library and X11 + +2002-11-13 11:36 hoffman + + * Modules/: CMakeBackwardCompatibilityC.cmake, FindX11.cmake: fix + for nsl library and X11 + +2002-11-13 11:25 hoffman + + * Modules/Platform/Windows-bcc32.cmake: BUG: fix order of link line + for creating shared libraries + +2002-11-12 19:39 king + + * Modules/CheckFunctionExists.cmake: BUG: Fixed doc string on + generated variable. + +2002-11-12 16:58 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix path problems + +2002-11-12 16:27 will + + * Modules/FindX11.cmake: Backwards compatibility. Andy and Bill + made me add socket library. + +2002-11-12 15:24 hoffman + + * Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Source/cmLocalUnixMakefileGenerator.cxx: ENH: add .def file + support + +2002-11-12 14:48 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: change to new + variables + +2002-11-12 14:19 hoffman + + * Modules/: CMakeBackwardCompatibilityC.cmake, + CheckLibraryExists.cmake, FindThreads.cmake: add find threads + check + +2002-11-12 14:18 hoffman + + * Tests/SystemInformation/: CMakeLists.txt, DumpInformation.cxx, + DumpInformation.h.in, SystemInformation.in: clean up test for + html output + +2002-11-12 13:06 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: fix reg expression + +2002-11-12 12:47 king + + * Source/cmLocalUnixMakefileGenerator.cxx: [no log message] + +2002-11-12 10:47 barre + + * Modules/FindOpenGL.cmake: FIX: minor fix, OPENGL_INCLUDE_PATH was + set 2 times + +2002-11-12 09:33 hoffman + + * Tests/SystemInformation/DumpInformation.cxx: [no log message] + +2002-11-12 09:31 hoffman + + * Tests/SystemInformation/CMakeLists.txt: fix project name + +2002-11-12 09:12 hoffman + + * Modules/: CMakeSystemSpecificInformation.cmake, + Platform/CYGWIN.cmake, Platform/Windows-bcc32.cmake, + Platform/Windows-cl.cmake: Set CMAKE_BUILD_TOOL + +2002-11-11 18:10 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, Source/CMakeLists.txt, + Source/TODO, Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h: ENH: fix up several + problems with new stuff + +2002-11-11 18:07 hoffman + + * Tests/SystemInformation/: CMakeLists.txt, DumpInformation.cxx, + DumpInformation.h.in, SystemInformation.in: new test + +2002-11-11 17:00 hoffman + + * Modules/Platform/OSF1.cmake: Fix for OSF + +2002-11-11 13:15 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: Fix regular expressions + to be able to handle windows libraries + +2002-11-11 12:31 hoffman + + * Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, Modules/CMakeSystem.cmake.in, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/Platform/HP-UX.cmake, Modules/Platform/IRIX.cmake, + Modules/Platform/IRIX64.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, Modules/Platform/gcc.cmake, + Source/TODO, Source/cmGlobalUnixMakefileGenerator.cxx: clean up + flags with _init flags + +2002-11-11 11:43 hoffman + + * Modules/: CMakeLists.txt, Platform/CMakeLists.txt: add install + stuff for platform directory + +2002-11-11 09:11 hoffman + + * Modules/Platform/Darwin.cmake: ENH: fix for darwin modules + +2002-11-10 10:02 hoffman + + * Modules/Platform/: HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + Windows-bcc32.cmake, Windows-cl.cmake, gcc.cmake: BUG: fix + setting of c flags + +2002-11-09 13:43 hoffman + + * Modules/Platform/: HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + Windows-bcc32.cmake, Windows-cl.cmake, gcc.cmake: fix for + cxxflags + +2002-11-08 18:07 king + + * Modules/Platform/Linux-como.cmake: ENH: Adding support for comeau + C++ compiler. + +2002-11-08 18:06 king + + * Modules/: CMakeSystemSpecificInformation.cmake, + Platform/HP-UX.cmake, Platform/IRIX.cmake, Platform/IRIX64.cmake, + Platform/Linux.cmake, Platform/Windows-bcc32.cmake, + Platform/Windows-cl.cmake, Platform/gcc.cmake: ENH: Moved caching + of C*_FLAGS* settings down to + CMakeSystemSpecificInformation.cmake. The platform files can set + the defaults on the first run, and then the settings are cached + at the end. + +2002-11-08 18:05 king + + * Source/cmSetCommand.cxx: BUG: A variable is not in the cache if + it is UNINITIALIZED. + +2002-11-08 18:05 king + + * Source/cmGlobalCodeWarriorGenerator.cxx: ERR: Removed use of + NULL. + +2002-11-08 18:05 king + + * Source/cmSystemTools.cxx: ERR: Added missing include. + +2002-11-08 17:24 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake: store the compiler in the cache + +2002-11-08 15:46 hoffman + + * CMakeLists.txt, Modules/CMakeBackwardCompatibilityCXX.cmake, + Modules/CMakeCCompiler.cmake.in, + Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakePrintSystemInformation.cmake, + Modules/CMakeSystem.cmake.in, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CYGWIN.cmake, Modules/CheckIncludeFile.cxx.in, + Modules/CheckIncludeFileCXX.cmake, + Modules/TestForANSIForScope.cmake, + Modules/TestForAnsiForScope.cxx, + Modules/TestForSTDNamespace.cmake, + Modules/TestForSTDNamespace.cxx, Modules/Windows.cmake, + Modules/Platform/AIX.cmake, Modules/Platform/BSDOS.cmake, + Modules/Platform/CYGWIN.cmake, Modules/Platform/Darwin.cmake, + Modules/Platform/FreeBSD.cmake, Modules/Platform/HP-UX.cmake, + Modules/Platform/IRIX.cmake, Modules/Platform/IRIX64.cmake, + Modules/Platform/Linux.cmake, Modules/Platform/MP-RAS.cmake, + Modules/Platform/NetBSD.cmake, Modules/Platform/OSF1.cmake, + Modules/Platform/OpenBSD.cmake, Modules/Platform/RISCos.cmake, + Modules/Platform/SCO_SV.cmake, Modules/Platform/SINIX.cmake, + Modules/Platform/SunOS.cmake, Modules/Platform/True64.cmake, + Modules/Platform/ULTRIX.cmake, Modules/Platform/UNIX_SV.cmake, + Modules/Platform/UnixWare.cmake, + Modules/Platform/Windows-bcc32.cmake, + Modules/Platform/Windows-cl.cmake, + Modules/Platform/Windows.cmake, Modules/Platform/Xenix.cmake, + Modules/Platform/gcc.cmake, Source/CMakeLists.txt, Source/TODO, + Source/cmExecProgramCommand.cxx, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalGenerator.cxx, Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.h, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.h, Source/cmIfCommand.cxx, + Source/cmLoadCommandCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Source/cmMakefile.cxx, + Source/cmStandardIncludes.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTryCompileCommand.cxx, + Source/cmWin32ProcessExecution.cxx, + Source/cmWin32ProcessExecution.h, Source/ctest.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp: Complete rework of + makefile generators expect trouble + +2002-11-08 13:28 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, + CMakeSystemSpecificInformation.cmake, + Platform/Windows-bcc32.cmake, Platform/Windows-cl.cmake: [no log + message] + +2002-11-08 11:31 hoffman + + * Source/ctest.cxx: fix ctest + +2002-11-08 11:30 hoffman + + * Modules/: AIX.cmake, BSDOS.cmake, + CMakeSystemSpecificInformation.cmake, CYGWIN.cmake, Darwin.cmake, + FreeBSD.cmake, HP-UX.cmake, IRIX.cmake, IRIX64.cmake, + Linux.cmake, MP-RAS.cmake, NetBSD.cmake, OSF1.cmake, + OpenBSD.cmake, RISCos.cmake, SCO_SV.cmake, SINIX.cmake, + SunOS.cmake, True64.cmake, ULTRIX.cmake, UNIX_SV.cmake, + UnixWare.cmake, Windows-bcc32.cmake, Windows-cl.cmake, + Windows.cmake, Xenix.cmake, gcc.cmake, Platform/AIX.cmake, + Platform/BSDOS.cmake, Platform/CYGWIN.cmake, + Platform/Darwin.cmake, Platform/FreeBSD.cmake, + Platform/HP-UX.cmake, Platform/IRIX.cmake, Platform/IRIX64.cmake, + Platform/Linux.cmake, Platform/MP-RAS.cmake, + Platform/NetBSD.cmake, Platform/OSF1.cmake, + Platform/OpenBSD.cmake, Platform/RISCos.cmake, + Platform/SCO_SV.cmake, Platform/SINIX.cmake, + Platform/SunOS.cmake, Platform/True64.cmake, + Platform/ULTRIX.cmake, Platform/UNIX_SV.cmake, + Platform/UnixWare.cmake, Platform/Windows-bcc32.cmake, + Platform/Windows-cl.cmake, Platform/Windows.cmake, + Platform/Xenix.cmake, Platform/gcc.cmake: move to platform + directory + +2002-11-08 11:09 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake: hp fixes + +2002-11-08 10:40 hoffman + + * Modules/HP-UX.cmake: hp fixes + +2002-11-08 10:29 hoffman + + * Modules/HP-UX.cmake: hp fixes + +2002-11-08 10:22 hoffman + + * Modules/CMakeSystemSpecificInformation.cmake, + Modules/HP-UX.cmake, Source/cmLocalUnixMakefileGenerator.cxx: hp + fixes + +2002-11-08 08:47 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, HP-UX.cmake, + TestForANSIForScope.cmake: ENH: fix for hp and remove some + messages + +2002-11-07 17:45 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, + TestForANSIForScope.cmake, TestForAnsiForScope.cxx, + TestForSTDNamespace.cxx: [no log message] + +2002-11-07 17:26 hoffman + + * Modules/TestForANSIForScope.cmake: [no log message] + +2002-11-07 17:21 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, HP-UX.cmake, + TestForAnsiForScope.cxx, TestForSTDNamespace.cmake, + TestForSTDNamespace.cxx: [no log message] + +2002-11-07 11:43 hoffman + + * Modules/Windows-cl.cmake, Source/cmExecProgramCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: win32 apps and crash on + sun + +2002-11-07 09:22 king + + * Source/cmStringCommand.cxx: ERR: Fixed signed/unsigned warnings. + +2002-11-07 09:15 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Revert + +2002-11-07 09:04 andy + + * Source/: cmake.cxx, cmake.h: Revert back + +2002-11-07 09:01 andy + + * Source/WXDialog/ReadMe.Mac.txt: Add readme for mac + +2002-11-06 23:25 hoffman + + * Source/: cmGlobalNMakeMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx: clean up echos + +2002-11-06 23:06 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/Windows-bcc32.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h: borland mostly working, + tests are passing, no command to file stuff yet + +2002-11-06 18:40 king + + * Modules/FindITK.cmake: ENH: Enhanced FindITK supporting use of + ITK from an install tree or a build tree. Only one cache entry + is brought into user's project, called "ITK_DIR". This is the + location of an ITKConfig.cmake file from which other settings are + loaded. + +2002-11-06 18:05 king + + * Source/cmStringCommand.cxx, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: BUG: Fixed + STRING(REGEX REPLACE ...) and added better test. + +2002-11-06 17:35 king + + * Source/cmCommands.cxx, Source/cmStringCommand.cxx, + Source/cmStringCommand.h, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: Added STRING + command. + +2002-11-06 17:04 hoffman + + * Modules/Windows-bcc32.cmake: borland config + +2002-11-06 16:59 king + + * Source/: cmRegularExpression.cxx, cmRegularExpression.h: ENH: + compile method now returns whether compilation succeeded. + +2002-11-06 16:30 hoffman + + * Modules/Windows-cl.cmake, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h: borland getting closer + +2002-11-06 16:05 andy + + * Source/WXDialog/CMakeLists.txt, Templates/AppleInfo.plist: Use + CMake icon on Mac + +2002-11-06 14:56 andy + + * CMakeIcon.icns, Source/WXDialog/CMakeIcon.icns: Add Mac icon + +2002-11-06 14:54 andy + + * CMakeIcon.icns: Add CMake icon + +2002-11-06 14:53 andy + + * Source/WXDialog/CMakeIcon.gif: Remove background and make bigger + +2002-11-06 14:44 andy + + * Source/WXDialog/CMakeIcon.gif: Bigger icon + +2002-11-06 14:33 andy + + * Source/WXDialog/: CMakeIcon.gif, CMakeIcon.xpm, + cmWXMainFrame.cxx: Start adding CMake icon + +2002-11-06 13:06 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, ctest.cxx: Move the + hi-res time to system tools + +2002-11-06 12:04 andy + + * Source/: cmake.cxx, cmake.h, CursesDialog/cmCursesMainForm.cxx: + In certain cases, try to guess the source directory, so that you + can run cmake or ccmake without specifying source dir + +2002-11-06 11:36 andy + + * Source/: cmSystemTools.cxx, CursesDialog/cmCursesPathWidget.cxx: + Remove warning + +2002-11-06 11:20 barre + + * Source/cmMakeDepend.cxx: FIX: a / was appended without checking + if there wasn't one already. + +2002-11-06 08:52 andy + + * Tests/X11/X11.c: Try to fix test + +2002-11-05 23:07 hoffman + + * Source/: TODO, cmLocalUnixMakefileGenerator.cxx: remove warning + +2002-11-05 22:55 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, IRIX64.cmake: ranlib + trouble + +2002-11-05 22:44 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, IRIX.cmake, + IRIX64.cmake: fix for no ranlib + +2002-11-05 18:11 hoffman + + * CMakeLists.txt, Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeSystem.cmake.in, Modules/IRIX64.cmake: remove debug + message statements + +2002-11-05 18:06 hoffman + + * Modules/: IRIX64.cmake: [no log message] + +2002-11-05 17:57 hoffman + + * Modules/IRIX64.cmake, Source/cmLocalUnixMakefileGenerator.cxx: + [no log message] + +2002-11-05 17:55 hoffman + + * CMakeLists.txt: debug + +2002-11-05 17:49 hoffman + + * Modules/CMakeDefaultMakeRuleVariables.cmake: enh: add to + link libs + +2002-11-05 17:31 hoffman + + * Modules/: CYGWIN.cmake, IRIX.cmake, IRIX64.cmake, gcc.cmake: add + flags + +2002-11-05 17:20 andy + + * Modules/FindX11.cmake: Make things advanced + +2002-11-05 17:05 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: add cxx flags to link + exe + +2002-11-05 15:49 hoffman + + * Modules/: HP-UX.cmake, IRIX64.cmake, OSF1.cmake: add ansi flags + +2002-11-05 14:33 hoffman + + * Modules/: IRIX.cmake, IRIX64.cmake, SunOS.cmake: [no log message] + +2002-11-05 14:10 hoffman + + * Modules/: AIX.cmake, BSDOS.cmake, Darwin.cmake, FreeBSD.cmake, + HP-UX.cmake, IRIX.cmake, MP-RAS.cmake, NetBSD.cmake, OSF1.cmake, + OpenBSD.cmake, RISCos.cmake, SCO_SV.cmake, SINIX.cmake, + SunOS.cmake, True64.cmake, ULTRIX.cmake, UNIX_SV.cmake, + UnixWare.cmake, Xenix.cmake: ENH: add all the OS files + +2002-11-05 13:35 andy + + * Source/CursesDialog/ccmake.cxx: Cleanup + +2002-11-05 11:52 hoffman + + * Modules/Linux.cmake: add linux config file + +2002-11-05 11:31 hoffman + + * Modules/: CMakeSystemSpecificInformation.cmake, Windows.cmake: + add check for sstream + +2002-11-05 11:02 hoffman + + * Modules/: CMakeBackwardCompatibilityCXX.cmake, + CheckIncludeFile.cxx.in, CheckIncludeFileCXX.cmake: add check for + sstream + +2002-11-05 10:45 hoffman + + * Source/: cmGlobalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx: fix backwards compat enable and + remove full path target + +2002-11-05 09:38 andy + + * Source/WXDialog/CMakeLists.txt: More mac fixes + +2002-11-05 08:52 andy + + * Source/CursesDialog/: cmCursesFilePathWidget.cxx, + cmCursesFilePathWidget.h, cmCursesPathWidget.cxx, + cmCursesStringWidget.cxx: Reparent file path widget, add tab + completion support to path anf file path widget + +2002-11-05 08:51 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: Add a simple + globbing of files and directories + +2002-11-05 07:15 andy + + * Modules/FindX11.cmake, Tests/X11/CMakeLists.txt: Try to fix + FindX11 + +2002-11-05 07:06 andy + + * Tests/X11/X11.c: Simplify + +2002-11-04 19:45 king + + * Source/cmITKWrapTclCommand.cxx: ENH: Added generation of + --gccxml-compiler argument to GCC-XML for msvc6, msvc7, and nmake + makefiles generators. + +2002-11-04 17:37 andy + + * Source/CursesDialog/: cmCursesPathWidget.cxx, + cmCursesPathWidget.h, cmCursesStringWidget.cxx, + cmCursesStringWidget.h: Start working on adding tab support + +2002-11-04 16:59 andy + + * Source/cmWin32ProcessExecution.cxx: Fix windows process execution + so that it pops up the windows + +2002-11-04 16:26 hoffman + + * Modules/CMakeCCompiler.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/Windows-cl.cmake, Modules/Windows.cmake, Source/TODO, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTryCompileCommand.cxx: nmake + passing tests + +2002-11-04 15:21 andy + + * Source/WXDialog/CMakeLists.txt: Get the Mac resources done + +2002-11-04 15:01 andy + + * Source/WXDialog/CMakeLists.txt: Minor fixes + +2002-11-04 15:01 andy + + * Source/cmWriteFileCommand.cxx: Make directory if it does not + exist yet + +2002-11-04 14:50 andy + + * Source/WXDialog/CMakeLists.txt, Templates/AppleInfo.plist: + Attempt to automate apple gui generation + +2002-11-04 13:09 andy + + * Source/WXDialog/cmWXMainFrame.cxx: Try to fix generator problems + on Mac + +2002-11-04 11:54 andy + + * Tests/X11/X11.c: Fix test + +2002-11-04 10:13 hoffman + + * Source/TODO: [no log message] + +2002-11-04 10:11 hoffman + + * CMakeLists.txt, Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakePrintSystemInformation.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/Windows-cl.cmake, Modules/Windows.cmake, + Source/CMakeLists.txt, + Source/cmGlobalBorlandMakefileGenerator.cxx, + Source/cmGlobalNMakeMakefileGenerator.cxx, + Source/cmIfCommand.cxx, Source/cmLocalUnixMakefileGenerator.cxx: + nmake almost working + +2002-11-03 18:18 andy + + * Tests/X11/X11.c: Try to make test to run + +2002-11-01 23:00 hoffman + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + CMakeSetupDialog.h, resource.h: ENH: better resize + +2002-11-01 22:57 hoffman + + * Source/CMakeLists.txt: make qt stuff advanced + +2002-10-31 10:36 andy + + * Templates/CCMakeSystemConfig.cmake.in: Revert X11 stuff until + other steps are done + +2002-10-29 15:58 andy + + * Tests/X11/X11.c: Print message on system without X11 + +2002-10-29 15:54 andy + + * Tests/X11/: CMakeLists.txt, X11.c: Add Windows code + +2002-10-29 15:47 andy + + * Modules/FindX11.cmake: Now it should work + +2002-10-29 15:46 andy + + * Source/CMakeLists.txt, Tests/X11/CMakeLists.txt, Tests/X11/X11.c: + Add test for X11 + +2002-10-29 15:03 hoffman + + * Modules/CMakeCXXCompiler.cmake.in, + Modules/CMakeDefaultMakeRuleVariables.cmake, + Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeDetermineCXXCompiler.cmake, + Modules/CMakeDetermineSystem.cmake, + Modules/CMakePrintSystemInformation.cmake, + Modules/CMakeSystem.cmake.in, + Modules/CMakeSystemSpecificInformation.cmake, + Modules/CYGWIN.cmake, Source/cmGlobalGenerator.cxx, + Source/cmGlobalGenerator.h, + Source/cmGlobalNMakeMakefileGenerator.h, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmGlobalUnixMakefileGenerator.h, + Source/cmLoadCommandCommand.cxx, + Source/cmLocalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.h, Source/cmMakefile.cxx, + Source/cmSystemTools.cxx, Tests/Testing/CMakeLists.txt: branch + checkin of working cygwin build for generator cleanup and removal + of configure + +2002-10-29 13:34 andy + + * Templates/CCMakeSystemConfig.cmake.in: Remove X11 stuff + +2002-10-29 13:34 andy + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckLibraryExists.cmake, CheckSizeOf.cmake, TestBigEndian.cmake: + Add append to write_file + +2002-10-29 13:32 andy + + * Source/: cmWriteFileCommand.cxx, cmWriteFileCommand.h: Add flag + to WRITE_FILE to append + +2002-10-29 13:30 andy + + * Modules/CMakeBackwardCompatibilityC.cmake: Do this the right way + +2002-10-29 13:30 andy + + * Modules/FindX11.cmake: This should substitute configure part that + finds X11 + +2002-10-28 10:29 king + + * Source/cmITKWrapTclCommand.cxx: ENH: Added generation of + --gccxml-cxxflags option to complement --gccxml-compiler. + +2002-10-25 16:47 hoffman + + * Modules/CMakeDetermineCCompiler.cmake, + Modules/CMakeSystemSpecificInformation.cmake, + Source/cmGlobalUnixMakefileGenerator.cxx, + Source/cmLocalUnixMakefileGenerator.cxx: [no log message] + +2002-10-25 16:13 hoffman + + * Modules/CMakeCXXCompiler.cmake.in: [no log message] + +2002-10-25 15:46 king + + * Utilities/cmake_release_cygwin.sh: ENH: Updated for cmake 1.4.6 + package. Added automatic conversion of setup.hint to unix + newlines. + +2002-10-25 14:34 hoffman + + * Modules/: CMakeCCompiler.cmake.in, CMakeDetermineCCompiler.cmake: + [no log message] + +2002-10-25 14:25 hoffman + + * Source/: cmGlobalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h: + test on unix + +2002-10-25 14:13 king + + * Utilities/: cmake_release_config_darwin, + cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_osf, + cmake_release_config_sun, cmake_release_cygwin.sh: ENH: Updated + for 1.4.6 release. + +2002-10-25 14:08 hoffman + + * Modules/: CMakeDefaultMakeRuleVariables.cmake, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineSystem.cmake, CMakeSystemSpecificInformation.cmake: + [no log message] + +2002-10-24 15:39 hoffman + + * Source/cmake.cxx: BUG: fix stack limit size on mac OSX + +2002-10-24 13:39 andy + + * Modules/CMakeBackwardCompatibilityC.cmake: Add check for big + endian in backward compatibility scripts + +2002-10-24 11:58 martink + + * Source/cmMakefile.h: updated patch level to 6 + +2002-10-24 11:48 martink + + * Source/cmBorlandMakefileGenerator.cxx: fix support for Win32 + execs + +2002-10-24 10:58 andy + + * Source/cmSubdirCommand.cxx: Subdirs reports an error if the + subdirectory does not exists + +2002-10-24 10:23 andy + + * Source/cmMakefile.cxx: Try to remove some warnings + +2002-10-23 18:03 king + + * Source/: cmAbstractFilesCommand.cxx, cmAbstractFilesCommand.h, + cmAddCustomCommandCommand.cxx, cmAddCustomCommandCommand.h, + cmAddCustomTargetCommand.cxx, cmAddCustomTargetCommand.h, + cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmAddDependenciesCommand.cxx, cmAddDependenciesCommand.h, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddTestCommand.cxx, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.cxx, cmAuxSourceDirectoryCommand.h, + cmBuildCommand.cxx, cmBuildCommand.h, cmBuildNameCommand.cxx, + cmBuildNameCommand.h, cmCMakeMinimumRequired.cxx, + cmCMakeMinimumRequired.h, cmCPluginAPI.cxx, cmCPluginAPI.h, + cmCacheManager.cxx, cmCacheManager.h, cmCommand.h, + cmCommands.cxx, cmCommands.h, cmConfigureFileCommand.cxx, + cmConfigureFileCommand.h, cmCreateTestSourceList.cxx, + cmCreateTestSourceList.h, cmCustomCommand.cxx, cmCustomCommand.h, + cmData.h, cmDirectory.cxx, cmDirectory.h, + cmDumpDocumentation.cxx, cmDynamicLoader.cxx, cmDynamicLoader.h, + cmElseCommand.cxx, cmElseCommand.h, cmEnableTestingCommand.cxx, + cmEnableTestingCommand.h, cmEndForEachCommand.cxx, + cmEndForEachCommand.h, cmEndIfCommand.cxx, cmEndIfCommand.h, + cmExecProgramCommand.cxx, cmExecProgramCommand.h, + cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h, + cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindLibraryCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h, + cmFindProgramCommand.cxx, cmFindProgramCommand.h, + cmForEachCommand.cxx, cmForEachCommand.h, cmFunctionBlocker.h, + cmGeneratedFileStream.h, cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, + cmGetSourceFilePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.h, + cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalBorlandMakefileGenerator.h, + cmGlobalCodeWarriorGenerator.cxx, cmGlobalCodeWarriorGenerator.h, + cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, cmITKWrapTclCommand.cxx, + cmITKWrapTclCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeCommand.h, + cmIncludeDirectoryCommand.cxx, cmIncludeDirectoryCommand.h, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.cxx, + cmInstallFilesCommand.h, cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.cxx, + cmInstallTargetsCommand.h, cmLinkDirectoriesCommand.cxx, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.h, cmListFileCache.cxx, cmListFileCache.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h, + cmLoadCommandCommand.cxx, cmLoadCommandCommand.h, + cmLocalBorlandMakefileGenerator.cxx, + cmLocalBorlandMakefileGenerator.h, + cmLocalCodeWarriorGenerator.cxx, cmLocalCodeWarriorGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h, + cmLocalNMakeMakefileGenerator.cxx, + cmLocalNMakeMakefileGenerator.h, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h, cmMacroCommand.cxx, + cmMacroCommand.h, cmMakeDepend.cxx, cmMakeDepend.h, + cmMakeDirectoryCommand.cxx, cmMakeDirectoryCommand.h, + cmMakefile.cxx, cmMakefile.h, cmMarkAsAdvancedCommand.cxx, + cmMarkAsAdvancedCommand.h, cmMessageCommand.cxx, + cmMessageCommand.h, cmOptionCommand.cxx, cmOptionCommand.h, + cmOutputRequiredFilesCommand.cxx, cmOutputRequiredFilesCommand.h, + cmProjectCommand.cxx, cmProjectCommand.h, cmQTWrapCPPCommand.cxx, + cmQTWrapCPPCommand.h, cmQTWrapUICommand.cxx, cmQTWrapUICommand.h, + cmRegularExpression.cxx, cmRegularExpression.h, + cmRemoveCommand.cxx, cmRemoveCommand.h, + cmSeparateArgumentsCommand.cxx, cmSeparateArgumentsCommand.h, + cmSetCommand.cxx, cmSetCommand.h, + cmSetSourceFilesPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, cmSiteNameCommand.cxx, + cmSiteNameCommand.h, cmSourceFile.cxx, cmSourceFile.h, + cmSourceFilesCommand.cxx, cmSourceFilesCommand.h, + cmSourceFilesRemoveCommand.cxx, cmSourceFilesRemoveCommand.h, + cmSourceGroup.cxx, cmSourceGroup.h, cmSourceGroupCommand.cxx, + cmSourceGroupCommand.h, cmStandardIncludes.h, + cmSubdirCommand.cxx, cmSubdirCommand.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx, cmTarget.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h, + cmTryCompileCommand.cxx, cmTryCompileCommand.h, + cmTryRunCommand.cxx, cmTryRunCommand.h, + cmUseMangledMesaCommand.cxx, cmUseMangledMesaCommand.h, + cmUtilitySourceCommand.cxx, cmUtilitySourceCommand.h, + cmVTKMakeInstantiatorCommand.cxx, cmVTKMakeInstantiatorCommand.h, + cmVTKWrapJavaCommand.cxx, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.cxx, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h, + cmVariableRequiresCommand.cxx, cmVariableRequiresCommand.h, + cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h, + cmWrapExcludeFilesCommand.cxx, cmWrapExcludeFilesCommand.h, + cmWriteFileCommand.cxx, cmWriteFileCommand.h, cmake.cxx, cmake.h, + cmakemain.cxx, cmaketest.cxx, cmakewizard.cxx, cmakewizard.h, + cmw9xcom.cxx, ctest.cxx, ctest.h, CursesDialog/ccmake.cxx, + CursesDialog/cmCursesBoolWidget.cxx, + CursesDialog/cmCursesBoolWidget.h, + CursesDialog/cmCursesCacheEntryComposite.cxx, + CursesDialog/cmCursesCacheEntryComposite.h, + CursesDialog/cmCursesDummyWidget.cxx, + CursesDialog/cmCursesDummyWidget.h, + CursesDialog/cmCursesFilePathWidget.cxx, + CursesDialog/cmCursesFilePathWidget.h, + CursesDialog/cmCursesForm.cxx, CursesDialog/cmCursesForm.h, + CursesDialog/cmCursesLabelWidget.cxx, + CursesDialog/cmCursesLabelWidget.h, + CursesDialog/cmCursesLongMessageForm.cxx, + CursesDialog/cmCursesLongMessageForm.h, + CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h, + CursesDialog/cmCursesPathWidget.cxx, + CursesDialog/cmCursesPathWidget.h, + CursesDialog/cmCursesStandardIncludes.h, + CursesDialog/cmCursesStringWidget.cxx, + CursesDialog/cmCursesStringWidget.h, + CursesDialog/cmCursesWidget.cxx, CursesDialog/cmCursesWidget.h, + MFCDialog/CMakeCommandLineInfo.h, MFCDialog/CMakeSetup.h, + MFCDialog/CMakeSetupDialog.h, MFCDialog/MakeHelp.h, + MFCDialog/PathDialog.h, MFCDialog/PropertyList.h, + MFCDialog/StdAfx.h, WXDialog/cmWXCacheProperty.cxx, + WXDialog/cmWXCacheProperty.h, WXDialog/cmWXCommandLineInfo.cxx, + WXDialog/cmWXCommandLineInfo.h, WXDialog/cmWXMainFrame.cxx, + WXDialog/cmWXMainFrame.h, WXDialog/wxCMakeSetup.cxx: ENH: Added + reference to Copyright.txt. Removed old reference to ITK + copyright. Changed program name to CMake instead of Insight in + source file header. Also removed tabs. + +2002-10-23 16:57 hoffman + + * Source/: cmExecProgramCommand.cxx, cmExecProgramCommand.h: ENH: + if output variable turn verbose off + +2002-10-23 16:53 hoffman + + * Modules/: CMakeCCompiler.cmake.in, + CMakeDefaultMakeRuleVariables.cmake, + CMakeDetermineCCompiler.cmake, CMakeDetermineCXXCompiler.cmake, + CMakeDetermineSystem.cmake, CMakePrintSystemInformation.cmake, + CMakeSystem.cmake.in, CMakeSystemSpecificInformation.cmake, + CYGWIN.cmake: closer to removing autoconf + +2002-10-23 16:43 king + + * Source/CursesDialog/form/frm_driver.c: ERR: Another attempt to + remove warnings from missing prototypes. + +2002-10-22 18:17 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, CMakeTestGNU.c, Windows.cmake: + test for gnu compiler + +2002-10-22 15:04 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeSystemSpecificInformation.cmake, CYGWIN.cmake: [no log + message] + +2002-10-22 10:36 hoffman + + * Source/cmLocalBorlandMakefileGenerator.cxx: BUG: make sure win32 + exes are win32 + +2002-10-22 10:34 hoffman + + * Modules/: CMakeDetermineCCompiler.cmake, + CMakeDetermineCXXCompiler.cmake, CMakeDetermineSystem.cmake, + CMakeSystemSpecificInformation.cmake: new cmake based + configuration + +2002-10-18 15:51 andy + + * Source/ctest.cxx: When in verbose mode print test command + +2002-10-18 12:08 andy + + * Source/cmWin32ProcessExecution.h: Improve comment + +2002-10-17 10:50 andy + + * Source/: CursesDialog/cmCursesMainForm.cxx, + cmCreateTestSourceList.cxx, cmDirectory.cxx, + cmFindProgramCommand.cxx, cmGlobalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmSystemTools.cxx, + cmUseMangledMesaCommand.cxx: Rename variables to remove warnings + +2002-10-16 13:30 martink + + * Source/cmVTKWrapTclCommand.cxx: update to handle tcl 84 + +2002-10-16 11:48 martink + + * Source/CursesDialog/cmCursesLongMessageForm.cxx: fix compiler + warnings + +2002-10-16 11:41 martink + + * Source/CursesDialog/form/fty_regex.c: fix compiler warnings + +2002-10-16 11:37 martink + + * Source/CursesDialog/form/: fty_alnum.c, fty_alpha.c, fty_int.c, + fty_ipv4.c, fty_num.c: fix compiler warnings + +2002-10-16 11:32 martink + + * Source/CursesDialog/: cmCursesMainForm.cxx, ccmake.cxx: fixed a + warning + +2002-10-16 11:24 martink + + * Source/CursesDialog/cmCursesLongMessageForm.cxx: fixed a warning + +2002-10-16 11:20 martink + + * Source/CursesDialog/: cmCursesForm.h, cmCursesLabelWidget.cxx: + fixed a warning + +2002-10-16 11:16 martink + + * Source/CursesDialog/: cmCursesBoolWidget.cxx, + cmCursesDummyWidget.cxx: fixed a warning + +2002-10-16 10:53 king + + * Source/CursesDialog/form/frm_driver.c: ENH: Another attempt to + fix OSF warnings. Also removed TABS. + +2002-10-16 08:49 andy + + * Source/ctest.cxx: Remove unused variable + +2002-10-15 14:33 martink + + * Source/cmLoadCommandCommand.cxx: better warning message + +2002-10-15 11:45 martink + + * Source/cmLoadCommandCommand.cxx: better warning message + +2002-10-15 07:20 andy + + * Source/ctest.cxx: Remove std::hex as it does not seems to work on + SGI, attempt to fix ftime problem on borland + +2002-10-14 18:33 andy + + * Source/ctest.cxx: Fix namespace, typo, and make ftime work on + windows + +2002-10-14 15:11 andy + + * Source/: ctest.cxx, ctest.h: Even more cleanups, fix time on + certain platforms such as windows, cygwin, and linux. Hopefully + we can add entries for other platforms until try_compile works. + Also escape certain characters for xml. + +2002-10-14 09:30 andy + + * Source/ctest.cxx: More cleanups, fix prexontext and log number + +2002-10-13 23:07 andy + + * Source/: ctest.cxx, ctest.h: Add LastBuild.log file, fix some + minor problems in output, modify output a bit... + +2002-10-11 13:17 martink + + * Source/cmLocalCodeWarriorGenerator.cxx: compiler warning + +2002-10-11 11:22 iscott + + * Modules/Dart.cmake: Add option to control number of errors sent + to dashbaord + +2002-10-11 10:16 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added Split + method to cmSystemTools to split a string into lines on its + newlines. + +2002-10-11 10:14 king + + * Modules/FindCABLE.cmake: BUG: Should not load + CMAKE_INSTALL_PREFIX from the cache. + +2002-10-11 08:36 king + + * Source/cmStandardIncludes.h: ERR: istrstream and istringstream + need to be pulled into namespace std on the SGI. + +2002-10-10 11:08 andy + + * Source/cmWin32ProcessExecution.cxx: Fix network build + +2002-10-10 10:45 barre + + * Modules/FindJava.cmake, Templates/CCMakeSystemConfig.cmake.in, + Templates/CMakeBorlandWindowsSystemConfig.cmake, + Templates/CMakeDotNetSystemConfig.cmake, + Templates/CMakeNMakeWindowsSystemConfig.cmake, + Templates/CMakeWindowsSystemConfig.cmake, + Templates/CXXCMakeSystemConfig.cmake.in: ENH: mark some vars as + advanced (and resort the list) + +2002-10-10 10:43 king + + * Source/: cmCMakeMinimumRequired.cxx, + cmLocalBorlandMakefileGenerator.cxx, + cmLocalNMakeMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx, cmStandardIncludes.h, + cmSystemTools.cxx, cmVTKMakeInstantiatorCommand.cxx, cmake.cxx, + ctest.cxx: ENH: Renamed cmStringStream to cmOStringStream and + added cmIStringStream. Removed cmInputStringStream. + +2002-10-10 09:41 andy + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.cxx, cmStandardIncludes.h: Remove + compile error and remove some warnings + +2002-10-10 09:02 king + + * Utilities/cmake_release_config_osf: ENH: Updated for actual + build. + +2002-10-10 08:25 martink + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.cxx: fixed some compiler warnings + +2002-10-10 08:23 andy + + * Source/ctest.cxx: Remove warning + +2002-10-10 08:11 andy + + * Source/: cmSetCommand.cxx, WXDialog/cmWXMainFrame.cxx: Remove + warning + +2002-10-10 08:11 andy + + * Source/: cmStandardIncludes.h, ctest.cxx: Try to use platform + independent input string stream + +2002-10-09 17:47 martink + + * Source/: cmDynamicLoader.cxx, cmaketest.cxx: Remove memory leak + caused by cmDynamicLoader not being deleted properly + +2002-10-09 16:26 andy + + * Source/WXDialog/: cmWXMainFrame.cxx, cmWXMainFrame.h: Try to add + enter support + +2002-10-09 15:54 martink + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: added test of SET + CACHE FORCE + +2002-10-09 15:48 martink + + * Source/: cmSetCommand.cxx, cmSetCommand.h: added FORCE option + +2002-10-09 15:36 martink + + * Source/CursesDialog/ccmake.cxx: fix for OSF + +2002-10-09 15:24 barre + + * Source/cmGlobalGenerator.cxx: ENH: update the progress when + generating is "done". + +2002-10-09 13:49 martink + + * Source/cmGlobalCodeWarriorGenerator.h: changed name + +2002-10-09 13:47 andy + + * Modules/FindwxWindows.cmake: Add some search paths + +2002-10-09 13:37 martink + + * Source/cmake.cxx: added Code Warrior dev + +2002-10-09 13:31 martink + + * Source/: Makefile.in, CMakeLists.txt: added build for Code + Warrior + +2002-10-09 13:30 martink + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.cxx, cmLocalCodeWarriorGenerator.h: + some updates + +2002-10-08 22:54 andy + + * Source/: ctest.cxx, ctest.h: Reorganization, cleanup and some + improvement in dart emulation + +2002-10-08 22:00 andy + + * Source/: ctest.cxx, ctest.h: Add parsing of warnings and errors + +2002-10-08 20:02 andy + + * Source/: ctest.cxx, ctest.h: Add configure option and fix + potential bug in other targets. Now the run command is actually + run with directory, so eventually we should be able to run this + from a subdirectory + +2002-10-08 15:55 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: new plugin + API + +2002-10-08 15:55 martink + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h, + cmLoadCommandCommand.cxx: some mods to the plugin API + +2002-10-08 10:53 hoffman + + * Source/cmExecProgramCommand.cxx: BUG: get all the output + including the last character + +2002-10-07 16:23 martink + + * CMakeLists.txt: added header dep + +2002-10-07 09:20 andy + + * Tests/COnly/: foo.c, foo.h: Fix problem on HP + +2002-10-07 09:16 martink + + * Source/cmIfCommand.cxx: minor fix to allow if with no arguments + +2002-10-07 08:23 andy + + * Source/cmGlobalVisualStudio6Generator.cxx: Suppress output of + trycompile + +2002-10-06 21:25 andy + + * Source/ctest.cxx: Fix update so that it actually updates the + source directory, + +2002-10-06 21:24 andy + + * Source/cmSystemTools.cxx: Fix for run command on windows. If you + specify command in quotes but not full path, it should still work + +2002-10-06 20:44 andy + + * Source/ctest.cxx: Add missing namespace + +2002-10-06 20:44 andy + + * Source/cmSystemTools.cxx: Revert back. Does not seems to work on + Windows + +2002-10-06 20:36 andy + + * Source/: ctest.cxx, ctest.h: Add some minimal Dart capability to + ctest. For example now you can actually use ctest to build + projects, do cvs update on all platforms. This is especially cool + for Visual Studio where you do not want to load the whole + development environment just to build your project. + +2002-10-06 18:56 andy + + * Source/cmSystemTools.cxx: Check if directory was actually created + +2002-10-06 15:10 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: ENH: nmake now + uses incremental linking as Msdev does. Faster build (linking a + static vtk.exe or paraview.exe could take more than 10 minutes) + +2002-10-06 12:12 andy + + * Source/cmTarget.cxx, Tests/COnly/CMakeLists.txt, + Tests/COnly/conly.c, Tests/COnly/foo.c, Tests/COnly/foo.h: If you + specify header file as source, it should still use C compiler and + not CXX. Also fix COnly test so that it make sure that this still + works... + +2002-10-05 10:24 andy + + * Source/: cmSystemTools.cxx, cmWin32ProcessExecution.h: Fix + borland build. Borland Run command should be static, since it is + called with no object... + +2002-10-04 18:16 andy + + * Source/: cmMakefile.cxx, cmMakefile.h, cmRegularExpression.cxx, + cmRegularExpression.h, cmSourceGroupCommand.cxx: Try to improve + source group interface + +2002-10-04 14:01 andy + + * Source/cmCacheManager.cxx: Remove tabs + +2002-10-04 12:56 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: FIX: re-enable the OK + button in RunCmake() when everything is done. + +2002-10-04 12:30 andy + + * Source/cmCacheManager.cxx: Fix reading of advanced values from + CMakeCache + +2002-10-04 11:42 martink + + * Source/: cmLocalCodeWarriorGenerator.h, + cmGlobalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.cxx: updates + +2002-10-04 11:33 barre + + * DartConfig.cmake: ENH: my opinion is that it should be ADVANCED. + Few people build the doc. + +2002-10-04 10:47 andy + + * Source/cmSystemTools.cxx: Add missing argument + +2002-10-04 10:38 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h: Cleanup + RunCOmmand code and move borland one to vtkWin32ProcessExecution, + so that it is all in one place... Add timeout option whihc does + not work yet, but it should not produce warning any more + +2002-10-04 08:59 martink + + * Source/cmLocalGenerator.cxx: always set PROJECT_SOURCE_DIR etc + +2002-10-03 16:40 martink + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.cxx: some fixes + +2002-10-03 15:14 martink + + * Source/: cmGlobalCodeWarriorGenerator.cxx, + cmGlobalCodeWarriorGenerator.h, cmLocalCodeWarriorGenerator.cxx, + cmLocalCodeWarriorGenerator.h: under development + +2002-10-02 17:46 martink + + * Source/cmWin32ProcessExecution.cxx: Revert to fix win 9x + +2002-10-02 17:31 king + + * Source/: cmGlobalUnixMakefileGenerator.cxx, cmStandardIncludes.h: + ENH: Added explicit declarations of some C functions that are + hard to get from standard headers in como + (www.comeaucomputing.com) strict mode. + +2002-10-02 17:23 king + + * Source/cmIncludeCommand.cxx: BUG: Must return false after an + error of incorrect arguments. + +2002-10-02 17:22 king + + * Source/: cmIfCommand.cxx, cmIfCommand.h: BUG: STRLESS and + STRGREATER need to treat non-existent definitions as strings. + +2002-10-02 17:16 andy + + * Source/cmWin32ProcessExecution.cxx: Cleanup and try to unify with + the other code + +2002-10-02 17:14 andy + + * Source/cmSystemTools.cxx: Cleanup + +2002-10-02 16:42 ibanez + + * Modules/CMakeLists.txt: ENH: Adding install of .in and .c + modules. + +2002-10-02 11:35 martink + + * Source/cmLocalBorlandMakefileGenerator.cxx: Remove unnecessary + new line + +2002-10-02 11:15 martink + + * Source/cmSystemTools.cxx: Fix bug in borland run command + +2002-10-02 11:14 martink + + * Source/cmake.cxx: Produce only one output + +2002-10-01 18:37 king + + * Source/cmITKWrapTclCommand.cxx: ENH: Added support to pass the + gccxml program location to cable if ITK_GCCXML_EXECUTABLE is set + on m_Makefile. + +2002-10-01 15:56 andy + + * Modules/: TestBigEndian.c, TestBigEndian.cmake: Add test for big + endian + +2002-10-01 13:04 martink + + * Source/cmWin32ProcessExecution.cxx: Fix grouping of arguments on + Windows 98 + +2002-10-01 13:04 martink + + * Source/cmLocalVisualStudio6Generator.cxx: Fix a bug in generator. + This one is good: This bug is only present on Windows 98, but + since RunCommand did not work, it never showed on the + dashboard... In any case commands in Visual studio 6 should be in + windows style slashes + +2002-10-01 13:00 martink + + * Source/cmw9xcom.cxx: Put quotes around arguments if they have + spaces and no quotes + +2002-10-01 12:59 martink + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: Remove bogus exec_program + +2002-10-01 10:12 ibanez + + * Modules/FindFLTK.cmake: ENH: removed "USE_FLTK_VERSION_1.1" in + favor of "FLTK_VERSION_1.1" to avoid confusions. + +2002-10-01 07:28 andy + + * Source/: Makefile.in, cmakemain.cxx: Remove dependency to dynamic + loader during bootstrap + +2002-09-30 22:26 ibanez + + * Modules/FindFLTK.cmake: ENH: Version 1.1 is considered to be the + default. + +2002-09-30 21:34 king + + * Source/CursesDialog/cmCursesMainForm.cxx: ERR: Fixed bad sentence + in error message. + +2002-09-30 16:46 andy + + * Source/cmake.cxx: Fix bug in chdir; Who did this anyway... + +2002-09-30 16:25 hoffman + + * Source/: Makefile.in, cmDynamicLoader.cxx, cmakemain.cxx, + MFCDialog/CMakeSetup.cpp: BUG: fix load command stuff for cygwin + and cleanup at exit + +2002-09-30 15:05 martink + + * Source/cmWin32ProcessExecution.h: Add some more comments + +2002-09-30 15:00 martink + + * Source/cmWin32ProcessExecution.cxx: Cleanups and hopefully now it + works on all windows platforms + +2002-09-30 14:01 martink + + * Source/cmake.cxx: Set comspec substitute the right way + +2002-09-30 14:00 martink + + * Source/ctest.cxx: Set comspec substitute + +2002-09-30 13:59 martink + + * Source/cmw9xcom.cxx: Add spaces + +2002-09-30 12:24 ibanez + + * Modules/FindLATEX.cmake: Configuratiion for finding LaTeX + related executables. + +2002-09-30 11:41 andy + + * Source/: CMakeLists.txt, cmSystemTools.cxx, cmake.cxx, + cmw9xcom.cxx: Another attempt on Windows 98 + +2002-09-30 11:00 andy + + * Source/cmSystemTools.cxx: Attempt to unify the code + +2002-09-30 10:47 andy + + * Source/cmSystemTools.cxx: Fix bug in printing + +2002-09-30 07:55 andy + + * Source/cmWin32ProcessExecution.cxx: Remove warnings and fix + potential bug + +2002-09-30 07:09 andy + + * Source/cmSystemTools.cxx, + Templates/CMakeBorlandWindowsSystemConfig.cmake: Make borland + pass all the tests on XP (and 2000?) + +2002-09-29 22:10 andy + + * Source/cmSystemTools.cxx: Remove debug + +2002-09-29 21:57 andy + + * Source/cmSystemTools.cxx: It is late and it at least seems to + work better than before... + +2002-09-29 21:55 andy + + * Source/: cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h: + Fix for it to compile on "all" windows platforms... + +2002-09-29 21:48 andy + + * Source/cmSystemTools.cxx: Simplify debugging by resetting error + code + +2002-09-29 14:09 martink + + * Source/: cmWin32ProcessExecution.cxx, cmWin32ProcessExecution.h: + possible fix for warnings + +2002-09-29 14:09 martink + + * Source/cmake.cxx: compiler warnings + +2002-09-27 17:28 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx: Add two + cmake commands -E echo for echoing strings and -E comspec for + workaround of bug of windows 9x; add another implementation of + run command on windows which should work... + +2002-09-27 17:26 andy + + * Source/: CMakeLists.txt, cmWin32ProcessExecution.cxx, + cmWin32ProcessExecution.h: Add class for process execution on + Windows + +2002-09-27 17:16 andy + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: Use cmake echo + +2002-09-27 16:23 martink + + * Source/: cmCreateTestSourceList.cxx, cmInstallFilesCommand.cxx, + cmInstallProgramsCommand.cxx, cmIncludeDirectoryCommand.cxx: + removed some includes + +2002-09-27 16:19 martink + + * Source/: cmTarget.cxx, cmTarget.h, cmCommand.h, + cmEnableTestingCommand.cxx, cmEndForEachCommand.cxx, + cmForEachCommand.cxx, cmAddTestCommand.cxx, + cmAuxSourceDirectoryCommand.cxx, cmElseCommand.cxx, + cmEndIfCommand.cxx, cmIfCommand.cxx, cmAbstractFilesCommand.cxx, + cmAddDependenciesCommand.cxx, cmAddLibraryCommand.cxx, + cmInstallTargetsCommand.cxx, cmMacroCommand.cxx, + cmMessageCommand.cxx, cmWriteFileCommand.cxx, + cmAddExecutableCommand.cxx: removed some includes + +2002-09-27 16:19 hoffman + + * Source/: cmSetCommand.cxx, cmSetCommand.h: BUG: fix doc string + and allow a variable to be promoted from non-cache to cache + +2002-09-27 16:18 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: remove unused stuff + +2002-09-27 15:52 martink + + * Source/cmMakefile.h: new patch + +2002-09-27 14:12 andy + + * Templates/: CCMakeSystemConfig.cmake.in, cconfigure, + cconfigure.in: Cleanup configure scripts + +2002-09-26 15:13 martink + + * Source/: cmake.h, cmake.cxx, cmGlobalGenerator.cxx, + cmGlobalGenerator.h, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/resource.h: added + progress + +2002-09-26 13:52 martink + + * Source/cmMakefile.cxx: minor memory fix + +2002-09-25 17:25 andy + + * Modules/: CheckFunctionExists.cmake, CheckIncludeFile.cmake, + CheckLibraryExists.cmake: Set variable to either 1 or empty + string instead of TRUE and FALSE + +2002-09-25 10:38 andy + + * Modules/CheckLibraryExists.cmake: Cleanup + +2002-09-25 10:08 andy + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.h.in, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.h.in: Check for library + +2002-09-25 10:08 andy + + * Modules/: CheckFunctionExists.cmake, CheckLibraryExists.cmake, + CheckSizeOf.cmake: Fix modules for recent changes + +2002-09-25 10:07 andy + + * Source/: cmGlobalUnixMakefileGenerator.cxx, + cmTryCompileCommand.cxx: Several changes: COMPILE_DEFINITIONS is + now depricated. If you want to specify some, use CMAKE_FLAGS + -DCMAKE_DEFINITIONS:STRING=...; same goes for libraries, include + path, ... It now detects wether the file is C or C++ and uses the + apropriate project command, it also does the right thing when + doing try_compile, so it does not execute configure for every + single try_compile + +2002-09-25 09:31 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: Use file format + detection + +2002-09-25 09:30 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h: Add detection of + file format from extension + +2002-09-25 07:47 andy + + * Source/WXDialog/cmWXMainFrame.cxx: Remove warnings + +2002-09-25 07:46 andy + + * Source/cmGlobalGenerator.cxx: Attempt to make NMake quiet during + TRY_COMPILE + +2002-09-24 18:34 andy + + * Source/: ctest.cxx, ctest.h: Add verbose flag -V, which makes the + output of tests to be displayed; also add help to ctest + +2002-09-24 17:58 andy + + * Modules/CMakeBackwardCompatibilityC.cmake, + Modules/CMakeBackwardCompatibilityCXX.cmake, + Source/cmGlobalUnixMakefileGenerator.cxx: Improve backward + compatibility, so that all backward compatibility stuff is in two + modules; fix invoking of try_compile; add checking for header + files and sizes of types + +2002-09-24 17:37 andy + + * Source/cmSystemTools.cxx: Add support for mac dylib + +2002-09-24 16:36 andy + + * Modules/: CheckLibraryExists.cmake, CheckLibraryExists.lists.in: + Initial attempt to check if library exists + +2002-09-24 16:20 andy + + * Source/WXDialog/: cmWXMainFrame.cxx, cmWXMainFrame.h: Some GUI + improvements and fix the way dirty is being set, so that if there + are no cache values, dirty is not set + +2002-09-24 16:20 andy + + * Modules/CheckSizeOf.cmake: Improve check size of. Now it checks + for some header files before trying to check types + +2002-09-24 14:49 king + + * Source/: cmEndIfCommand.cxx, cmIfCommand.cxx: [no log message] + +2002-09-24 14:22 king + + * Utilities/cmake_release_config_osf: ENH: Adding prototype release + config script for OSF. + +2002-09-24 14:18 king + + * Utilities/cmake_release_config_cygwin: ERR: Removed old cygwin + release config file. A separate script is now used. + +2002-09-24 13:24 martink + + * Source/cmake.cxx: fixed memory leak + +2002-09-24 13:17 martink + + * Source/cmTryRunCommand.cxx: always convert to output path + +2002-09-24 10:47 hoffman + + * Utilities/: cmake-cygwin-package.sh, cmake_release_cygwin.sh: use + /usr/bin/find and uname for cygwin version + +2002-09-24 10:30 andy + + * Source/cmLoadCommandCommand.cxx: Cleanup + +2002-09-24 10:24 andy + + * Source/: cmDynamicLoader.cxx, cmDynamicLoader.h: Add accessor for + Flushing cache + +2002-09-24 09:51 hoffman + + * Source/cmLocalUnixMakefileGenerator.cxx: one rule per line so + borland make does not die + +2002-09-24 09:50 hoffman + + * Source/cmLocalBorlandMakefileGenerator.cxx: handle long commands + +2002-09-24 09:24 hoffman + + * Source/: cmDynamicLoader.cxx, cmGlobalGenerator.cxx: fix for + cygwin and nmake that does not define WIN32 + +2002-09-23 21:14 king + + * Utilities/: cmake-cygwin-package.sh, cmake-cygwin.README, + cmake_release_cygwin.sh, setup.hint: ENH: Added cygwin packaging + scripts. The setup.hint and cmake.README files required by + Cygwin are generated automatically. + +2002-09-23 17:24 andy + + * Tests/: LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt: Fix problem + +2002-09-23 17:20 king + + * Utilities/cmake_release_unix_package.sh: ENH: Added to generated + README the typical install locaiton of /usr/local. + +2002-09-23 16:57 andy + + * Source/cmDynamicLoader.cxx: Fix cache for non void* types + +2002-09-23 16:24 andy + + * Source/cmDynamicLoader.cxx: Keep track of libraries so that you + can load them as many times as you want... + +2002-09-23 15:57 andy + + * Source/cmaketest.cxx: Cleanup + +2002-09-23 15:56 andy + + * Tests/: LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: Some minor + fixes for mac + +2002-09-23 15:54 andy + + * Source/cmLocalUnixMakefileGenerator.cxx: Fix generation of C only + modules + +2002-09-23 15:53 andy + + * Source/cmDynamicLoader.cxx: Fix extension and suffix for modules + on mac + +2002-09-23 14:57 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: cleanup + +2002-09-23 14:57 martink + + * Source/: cmCPluginAPI.h, cmLoadCommandCommand.cxx: cleaned up API + +2002-09-23 14:11 andy + + * Tests/: LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt: Fix test so + that it will work on HP + +2002-09-23 14:04 andy + + * Source/cmTryCompileCommand.cxx: Fix HP build + +2002-09-23 13:32 andy + + * Source/: cmSystemTools.cxx, cmTryCompileCommand.cxx, + WXDialog/cmWXCommandLineInfo.cxx, WXDialog/cmWXMainFrame.cxx, + WXDialog/wxCMakeSetup.cxx: Try to remove some warnings + +2002-09-23 13:11 andy + + * Source/cmLoadCommandCommand.cxx: Fix loading of module for + borland + +2002-09-23 12:23 andy + + * Source/cmGlobalGenerator.cxx: Try to fix borland and nmake try + compile + +2002-09-23 11:06 andy + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h, + cmTryRunCommand.cxx: Abstract cleaning of files and add code that + deletes files from Debug subdirectory + +2002-09-23 11:05 andy + + * Source/cmGlobalVisualStudio6Generator.cxx: Remove debug stuff + +2002-09-23 10:01 andy + + * Modules/FindwxWindows.cmake: Fix comments + +2002-09-23 09:58 andy + + * Source/cmLocalVisualStudio7Generator.cxx: Try to fix quoted + definitions + +2002-09-23 09:41 martink + + * Source/cmIfCommand.cxx: hopefull another fix to if statements + +2002-09-23 09:07 andy + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h: Attempt to fix Visual studio 6 + comiling + +2002-09-23 08:51 king + + * Utilities/cmake_release_unix_package.sh: BUG: Creating source + tarball should not affect current directory. + +2002-09-23 08:44 king + + * Utilities/: cmake_release_config_darwin, + cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_sun: ENH: + Incremented version to 1.4.5. + +2002-09-22 10:08 martink + + * Source/cmLocalVisualStudio7Generator.cxx: defines cannot have + quotes in them + +2002-09-22 09:53 martink + + * Source/: cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: some try compile fixes + +2002-09-22 07:52 martink + + * Source/: cmWriteFileCommand.cxx, + CursesDialog/cmCursesMainForm.cxx: compiler warning + +2002-09-21 07:29 andy + + * Source/cmWriteFileCommand.cxx: Fix namespace problem + +2002-09-20 15:45 andy + + * Source/WXDialog/wxincludes.h: Add missing include + +2002-09-20 15:01 andy + + * Modules/CheckFunctionExists.cmake, + Modules/CheckIncludeFile.cmake, Modules/CheckSizeOf.cmake, + Source/WXDialog/cmWXMainFrame.cxx: Fix tests for new trycompile + and tryrun + +2002-09-20 15:01 andy + + * Source/: cmMakefile.cxx, cmMakefile.h, cmTryCompileCommand.cxx, + cmTryRunCommand.cxx: Add GetLocal on cmMakefile and on local + builds do not perform tests + +2002-09-20 14:17 andy + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.h.in, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.h.in: Include more testing + +2002-09-20 14:16 andy + + * Modules/: CheckIncludeFile.c.in, CheckIncludeFile.cmake: Simplify + checking for headers + +2002-09-20 13:40 andy + + * Modules/: CheckIncludeFile.c.in, CheckIncludeFile.cmake: Add + macro which checks if the header file exists + +2002-09-20 13:40 andy + + * Modules/CheckFunctionExists.cmake: Fix comment + +2002-09-20 13:17 andy + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.cxx, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommand/LoadedCommand.h.in, + LoadCommandOneConfig/LoadedCommand.h.in: Fix test so that it does + some modules testing by checking for some functions and some size + of types + +2002-09-20 13:16 andy + + * Modules/: CheckFunctionExists.c, CheckFunctionExists.cmake, + CheckSizeOf.c, CheckSizeOf.cmake: Add two commonly used modules. + First one checks if the function exists, the second one checks + the size of type + +2002-09-20 13:15 andy + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmMakefile.cxx, cmMakefile.h, cmTryCompileCommand.cxx: Add option + of TRY_COMPILE to store the output of compilation so that if the + output fails you can display it or store it in the file + +2002-09-20 13:14 andy + + * Source/: cmCommands.cxx, cmWriteFileCommand.cxx, + cmWriteFileCommand.h: Add WRITE_FILE command, which writes string + to a file + +2002-09-20 10:06 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: removed c++ + style comments + +2002-09-20 09:53 andy + + * Source/WXDialog/wxincludes.h: Fix includes + +2002-09-20 08:07 martink + + * Source/: cmTryRunCommand.h, cmTryRunCommand.cxx: compiler + warnings + +2002-09-19 17:35 andy + + * Source/WXDialog/CMakeLists.txt: Add test for gui + +2002-09-19 17:35 andy + + * Source/WXDialog/cmWXCommandLineInfo.cxx: Fix arguments + +2002-09-19 17:35 andy + + * Source/WXDialog/wxCMakeSetup.cxx: Allow argument Q + +2002-09-19 17:23 andy + + * Source/WXDialog/: cmWXMainFrame.cxx, cmWXMainFrame.h: Add support + for exiting after loading + +2002-09-19 17:20 andy + + * Source/WXDialog/: cmWXCommandLineInfo.cxx, cmWXCommandLineInfo.h: + Add option -Q for existing after loading + +2002-09-19 16:12 hoffman + + * Source/cmBorlandMakefileGenerator.cxx: ENH: allow for long + command lines + +2002-09-19 16:09 andy + + * Source/cmMakefile.cxx: Remove unnecessary disabling of output + +2002-09-19 16:07 andy + + * Source/cmTryRunCommand.cxx: Fix tryrun to work on Linux + +2002-09-19 15:01 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: use single line depend + rules for borland compiler + +2002-09-19 14:59 hoffman + + * Source/cmMSDotNETGenerator.cxx: ENH: add include to rc, and + newline to custom commnad + +2002-09-19 14:59 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx: ENH: add include to rc + +2002-09-19 14:58 hoffman + + * Source/CMakeLists.txt: ENH: fix bad endif + +2002-09-19 14:58 hoffman + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + staticLibHeader.dsptemplate: ENH: add include paths to rc + +2002-09-19 14:40 andy + + * Source/cmSystemTools.cxx: Supress standard error when running + command + +2002-09-19 14:36 andy + + * Source/cmTryCompileCommand.cxx: Fix try compile with second + signature, remove cmake lists from cache so that multiple tests + work + +2002-09-19 14:35 andy + + * Source/cmSystemTools.h: Add a way to check if run command output + is disabled + +2002-09-19 14:35 andy + + * Source/cmMakefile.cxx: When doing try compile disable output + +2002-09-19 14:34 andy + + * Source/: cmListFileCache.cxx, cmListFileCache.h: Add a way to + remove files from cache + +2002-09-19 11:06 andy + + * Source/cmTryRunCommand.cxx: Fix compile problem + +2002-09-19 11:01 martink + + * Source/cmTryRunCommand.cxx: minor cleanup + +2002-09-19 11:00 andy + + * Source/WXDialog/wxincludes.h: Fix all defines on Windows + +2002-09-19 10:56 andy + + * Source/WXDialog/CMakeLists.txt: Fix executable to be WIN32 on + windows + +2002-09-19 10:25 andy + + * Modules/FindwxWindows.cmake: Fix find wxWindows + +2002-09-19 09:49 martink + + * Source/: cmCommands.cxx, cmTryCompileCommand.cxx, + cmTryCompileCommand.h: updated to try compile + +2002-09-19 09:48 martink + + * Source/: cmTryRunCommand.cxx, cmTryRunCommand.h: new command + +2002-09-19 09:48 andy + + * Source/WXDialog/CMakeLists.txt: Remove unnecessary message + +2002-09-19 09:47 andy + + * Source/CMakeLists.txt: Add option for building wxWindows GUI for + CMake + +2002-09-19 09:47 andy + + * Source/WXDialog/: CMakeLists.txt, cmWXCacheProperty.cxx, + cmWXCacheProperty.h, cmWXCommandLineInfo.cxx, + cmWXCommandLineInfo.h, cmWXMainFrame.cxx, cmWXMainFrame.h, + wxCMakeSetup.cxx, wxincludes.h: Initial import of wxWindows + dialog + +2002-09-19 09:42 andy + + * Modules/FindwxWindows.cmake: Improve searching for wxWindows + +2002-09-18 14:30 andy + + * Source/MFCDialog/CMakeSetupDialog.cpp: Fix callback for the new + API + +2002-09-18 14:18 andy + + * Source/: cmSystemTools.cxx, cmSystemTools.h, + CursesDialog/ccmake.cxx: Improve message handler to include + client data. + +2002-09-18 11:38 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: test passing + CMAKE_FLAGS + +2002-09-18 11:37 martink + + * Source/: cmMakefile.cxx, cmMakefile.h, cmTryCompileCommand.cxx, + cmTryCompileCommand.h: now Try compile can include CMAKE_FLAGS + +2002-09-18 11:36 martink + + * Source/cmLoadCommandCommand.cxx: better error reporting + +2002-09-18 10:40 king + + * Source/cmSetCommand.cxx: ENH: If SET(VAR) is called with no other + arguments, remove the definition of VAR. + +2002-09-18 10:39 king + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Added + RemoveDefinition method. + +2002-09-18 09:53 barre + + * Source/cmVTKWrapTclCommand.cxx: FIX: better support for the + Tcl/Tk 8.4 pre-release + +2002-09-18 08:15 andy + + * Modules/FindGTK.cmake: GL should not be a completely necessary + thing for finding GTK. This will find gtk and GL but also just + GTK + +2002-09-18 08:13 andy + + * Source/cmakewizard.cxx: Remove unnecessary variable + +2002-09-18 08:07 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: removed target + +2002-09-17 15:41 king + + * Modules/CMakeLists.txt: ENH: Adding installation of TRY_COMPILE + tests. + +2002-09-17 15:41 king + + * Source/cmTryCompileCommand.cxx: BUG: Generated CMakeLists.txt + file needs to take CMAKE_ANSI_CXXFLAGS into account. + +2002-09-17 14:40 king + + * Source/cmLocalUnixMakefileGenerator.cxx: ERR: Fixed typo: + INSTALL_PROGRAMS -> INSTALL_PROGRAM. + +2002-09-17 14:20 martink + + * Source/CursesDialog/cmCursesMainForm.cxx: some cmake api changees + +2002-09-17 14:19 andy + + * Source/cmakewizard.cxx: Strip the string that user answers + +2002-09-17 14:18 barre + + * Source/cmVTKWrapTclCommand.cxx: ENH: add support for Tcl/Tk 8.4.0 + +2002-09-17 14:12 martink + + * Source/cmake.h: updated comments + +2002-09-17 14:09 king + + * Source/cmLocalUnixMakefileGenerator.cxx: BUG: INSTALL_DATA should + be INSTALL_PROGRAMS for program install targets. + +2002-09-17 14:04 martink + + * Source/CursesDialog/cmCursesMainForm.cxx: some cmake api changees + +2002-09-17 13:59 martink + + * Source/: cmMakefile.cxx, cmake.cxx, cmake.h, cmakewizard.cxx, + MFCDialog/CMakeSetupDialog.cpp: cleaned up some of the cmake + interface + +2002-09-17 13:59 martink + + * Source/CMakeLists.txt: new test + +2002-09-17 13:48 andy + + * Source/cmakewizard.cxx: Replace getline with fgets since getline + does not seems to work properly on Mac OSX + +2002-09-17 11:48 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + cmMarkAsAdvancedCommand.cxx: Fix problems with advanced not being + marked. + +2002-09-17 10:56 king + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h, + cmInstallProgramsCommand.cxx, cmInstallProgramsCommand.h, + cmLocalUnixMakefileGenerator.cxx: ENH: Improved implementation of + INSTALL_FILES and INSTALL_PROGRAMS commands. Source paths can + now be relative or full paths, and don't need to be in the same + directory as the CMakeLists.txt file. + +2002-09-17 10:38 martink + + * Tests/: LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: added + Destructor + +2002-09-17 10:38 martink + + * Source/: cmCPluginAPI.h, cmLoadCommandCommand.cxx: added + destructor to loaded commands + +2002-09-17 09:17 martink + + * Modules/TestForANSIStreamHeaders.cmake: slight change in + signature for TryCompile + +2002-09-17 09:16 martink + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmTryCompileCommand.cxx, cmTryCompileCommand.h: slight change in + signature + +2002-09-17 09:16 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: some cleanup + +2002-09-17 08:29 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommandOneConfig/CMakeLists.txt: minor fix in error message + +2002-09-16 16:27 martink + + * Tests/: LoadCommand/CMakeLists.txt, + LoadCommand/LoadedCommand.cxx, + LoadCommand/CMakeCommands/CMakeLists.txt, + LoadCommand/CMakeCommands/cmTestCommand.c, + LoadCommandOneConfig/CMakeLists.txt, + LoadCommandOneConfig/LoadedCommand.cxx, + LoadCommandOneConfig/CMakeCommands/CMakeLists.txt, + LoadCommandOneConfig/CMakeCommands/cmTestCommand.c: load command + test + +2002-09-15 09:54 martink + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddDependenciesCommand.cxx, cmCacheManager.cxx, + cmExecProgramCommand.cxx, cmFLTKWrapUICommand.cxx, + cmListFileCache.cxx, cmaketest.cxx, ctest.cxx: remove unused + variables + +2002-09-15 09:42 martink + + * Source/: cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx: updated to use + ConfigureFinalPass + +2002-09-15 08:53 martink + + * Source/: cmLocalGenerator.cxx, cmLocalGenerator.h, + cmGlobalGenerator.cxx: changed handling of FinalPass + +2002-09-15 08:53 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: changed when final pass + is done + +2002-09-15 08:52 martink + + * Source/: cmMakefile.h, cmMakefile.cxx: renamed GenerateMakefile + to ConfigureFinalPass + +2002-09-14 10:59 martink + + * Source/CursesDialog/cmCursesMainForm.cxx: removed extra Generate + that was screwing things up + +2002-09-14 08:47 martink + + * Source/cmGlobalGenerator.cxx: fixed warning + +2002-09-13 19:23 martink + + * Source/cmGlobalGenerator.cxx: made less verbose + +2002-09-13 19:23 martink + + * Modules/TestForANSIStreamHeaders.cmake: removed messages + +2002-09-13 16:38 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + FileIsFullPath test method. + +2002-09-13 13:48 martink + + * Source/: cmGlobalGenerator.cxx, cmMakefile.cxx, cmake.h: some + fixes for try compile + +2002-09-13 11:09 martink + + * Templates/: CXXCMakeSystemConfig.cmake.in, cxxconfigure, + cxxconfigure.in: now uses TryCompile + +2002-09-13 11:05 martink + + * Source/cmGlobalNMakeMakefileGenerator.h: minor fix + inEnableLanguages + +2002-09-13 11:01 martink + + * Source/: cmTryCompileCommand.cxx: fix to the cleanup code + +2002-09-13 10:42 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalNMakeMakefileGenerator.h, + cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, cmMakefile.cxx, + cmTryCompileCommand.cxx: better trycompile and enable langiages + +2002-09-13 10:41 martink + + * Source/cmake.cxx: better try compile + +2002-09-13 10:40 martink + + * Modules/TestForANSIStreamHeaders.cmake: removed messages + +2002-09-13 09:51 andy + + * configure, configure.in: Improve bootstrapping on Unix, so that + it bootstraps in the subdirectory. This prevents from compiler + files being reused and you can do make clean... + +2002-09-13 09:49 iscott + + * Modules/FindQt.cmake: Make QT variables advanced + +2002-09-13 08:15 martink + + * Source/: cmEndIfCommand.cxx, cmLocalUnixMakefileGenerator.cxx: + compiler warning + +2002-09-13 08:12 martink + + * Source/MFCDialog/CMakeSetup.cpp: duh + +2002-09-13 05:39 iscott + + * Modules/FindQt.cmake: Need to use $ENV{} to access environment + variables + +2002-09-12 16:36 martink + + * Modules/TestForANSIStreamHeaders.cmake: some cleanup + +2002-09-12 14:37 martink + + * Source/cmake.cxx: uninitialized var + +2002-09-12 13:55 andy + + * Source/cmaketest.cxx: Remove unnecessary include + +2002-09-12 13:42 andy + + * Source/cmakemain.cxx: Remove unnecessary include + +2002-09-12 13:19 bettingf + + * Tests/Wrapping/CMakeLists.txt, Source/CMakeLists.txt: added + include of FindQT.cmake + +2002-09-12 11:47 martink + + * Source/: cmMakefileGenerator.cxx, cmMakefileGenerator.h, + CMakeLists.txt: new arch + +2002-09-12 11:44 martink + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, + cmMSProjectGenerator.cxx, cmMSProjectGenerator.h, + cmDSWWriter.cxx, cmDSWWriter.h, cmDSPWriter.cxx, cmDSPWriter.h, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmBorlandMakefileGenerator.cxx, cmBorlandMakefileGenerator.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: new arch + +2002-09-12 11:38 bettingf + + * Source/CMakeLists.txt: added test for QTWrapUI called qtwrapping + +2002-09-12 11:37 bettingf + + * Tests/Wrapping/: qtwrappingmain.cxx, CMakeLists.txt: corrected + test for QTWrapUI + +2002-09-12 11:14 martink + + * Modules/: TestForANSIStreamHeaders.cmake, + TestForANSIStreamHeaders.cxx: new try compile module + +2002-09-12 11:13 andy + + * Source/cmCacheManager.cxx: Oops, too fast commit; add missing ; + +2002-09-12 11:12 andy + + * Source/cmCacheManager.cxx: Add more error checking + +2002-09-12 11:08 martink + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: another + signature for Try_Compile + +2002-09-12 11:08 martink + + * Source/: cmMakefile.cxx, cmake.cxx, cmake.h: added a flag if a + cmake is in try compile + +2002-09-12 09:56 andy + + * Source/cmMarkAsAdvancedCommand.cxx: Fix mark as advanced. Now it + should work properly + +2002-09-12 09:00 andy + + * Source/: cmakewizard.cxx, cmakewizard.h: Simplify code. Since we + access cache entry through the iterator, we do not need the cache + manager any more + +2002-09-12 08:56 andy + + * Source/cmCacheManager.h: Fix build problem on Sun + +2002-09-11 16:44 bettingf + + * Source/cmQTWrapUICommand.cxx: corrected the generated lists .h in + header list and .cxx in sources list + +2002-09-11 16:43 bettingf + + * Source/cmLocalUnixMakefileGenerator.cxx: added generation of the + GENERATED_QT_FILES list for make clean + +2002-09-11 16:41 bettingf + + * Tests/Wrapping/CMakeLists.txt: added test for QTWrapUI + +2002-09-11 16:40 bettingf + + * Tests/Wrapping/: qtwrappingmain.cxx, qtwrapping.ui: test for + QTWarpUI + +2002-09-11 16:12 king + + * Source/cmCacheManager.cxx: BUG: GetCacheValue must check if value + is UNINITIALIZED. If so, pretend it doesn't exist. + +2002-09-11 15:13 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Fix bug in ccmake which + made it crash when all cache values were deleted + +2002-09-11 15:04 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Fix problem with ccmake + crashing on empty caches + +2002-09-11 14:38 andy + + * Source/MFCDialog/CMakeSetupDialog.cpp: Fix MFC GUI + +2002-09-11 14:38 andy + + * Source/cmCacheManager.cxx: Fix find and remove check for + uninitialized entries + +2002-09-11 14:08 andy + + * Source/cmCacheManager.cxx: Function strcasecmp is not portable + +2002-09-11 14:05 andy + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, cmMakefile.cxx, + cmMarkAsAdvancedCommand.cxx, cmVariableRequiresCommand.cxx, + cmakewizard.cxx, cmakewizard.h, + CursesDialog/cmCursesCacheEntryComposite.cxx, + CursesDialog/cmCursesCacheEntryComposite.h, + CursesDialog/cmCursesMainForm.cxx: Couple of changes: cache + variables now have a map of properties. ADVANCED and HELPSTRING + are now properties of cache variable, IsAdvanced is gone, so is + GetCacheEntry, since cache entries are now all private. To access + them, you use the iterator. -ADVANCED cache entries are gone and + are replaced by the property of cache variables. The cache file + still looks the same, but the -ADVANCED cache entries are created + when writing file. MarkAsAdvanced and VariableRequires are fixed. + So are curses gui and wizard + +2002-09-11 13:27 andy + + * Templates/CCMakeSystemConfig.cmake.in: Remove Mark_AS_ADVANCED + for some variables that do not exist + +2002-09-11 12:52 martink + + * Source/cmMakefile.cxx: minor fix in try compile code + +2002-09-11 09:54 king + + * Source/: CMakeLists.txt, cmDynamicLoader.cxx, cmDynamicLoader.h, + cmDynamicLoaderC.c: ENH: Pointer-to-function to pointer-to-data + casts are not even allowed in strict C. Re-implemented this + conversion in pure C++ using a casting trick with an extra level + of indirection. + +2002-09-11 08:52 king + + * Source/cmDynamicLoaderC.c: ERR: Removed C++-style comments, used + C-style instead. + +2002-09-10 17:24 king + + * Source/cmake.cxx: ERR: Added missing include of stdio.h for + sprintf. + +2002-09-10 16:52 martink + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: updated + signature + +2002-09-10 16:52 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: updated makefile moved + commands into cmake and fixed try compile + +2002-09-10 16:51 martink + + * Source/cmDumpDocumentation.cxx: moved dump docs into cmake + +2002-09-10 16:51 martink + + * Source/: cmake.h, cmake.cxx: moved commands into cmake + +2002-09-10 16:49 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h: modified TryCompile + +2002-09-10 15:46 king + + * Source/: CMakeLists.txt, cmDynamicLoader.cxx, cmDynamicLoader.h, + cmDynamicLoaderC.c: ERR: Cast from pointer-to-data to + pointer-to-function is not allowed in C++. The cast needed by + cmDynamicLoader::GetSymbolAddress is now hidden in a C file. + +2002-09-10 15:40 king + + * Source/cmGlobalUnixMakefileGenerator.cxx: ERR: Fixes for comeau + compiler. NULL is a pointer of type void*, and cannot be + compared directly with other pointer types. We use 0 instead. + Also changed putenv to setenv for comeau on linux. + +2002-09-10 15:40 king + + * Source/cmStandardIncludes.h: ENH: Added definition of _BSD_SOURCE + to enable proper use of POSIX functions on comeau in linux. + +2002-09-10 15:38 king + + * Source/cmSystemTools.cxx: ERR: Fix for borland on linux. We + cannot directly compare the st_dev and st_ino members of struct + stat. Use memcmp instead. + +2002-09-10 15:37 king + + * Source/cmLocalGenerator.cxx: ERR: Removed stray semi-colon. + +2002-09-10 15:36 king + + * Source/: cmMakefile.cxx, cmRegularExpression.cxx, + cmRegularExpression.h, cmMakeDepend.cxx, + cmLoadCommandCommand.cxx, cmCPluginAPI.cxx: ERR: Fixes for comeau + compiler. NULL is a pointer of type void*, and cannot be + compared directly with other pointer types. We use 0 instead. + +2002-09-10 15:36 king + + * Source/cmake.cxx: ERR: Fix for borland on linux. + +2002-09-10 13:32 barre + + * Modules/FindOpenGL.cmake: FIX: typo + bring back the + OPENGL_gl_LIBRARY path that can be used to find GLU (was wiped + out from FindGLU) + +2002-09-10 12:49 martink + + * Source/CMakeLists.txt: removed extra ENDIF + +2002-09-10 10:35 king + + * configure, configure.in: ERR: Went back to old-style test for + -LANG:std on the SGI. + +2002-09-10 10:16 martink + + * Source/: cmEndIfCommand.cxx, cmIfCommand.cxx: better error + checking on If statements + +2002-09-10 10:02 king + + * configure, configure.in: ERR: AC_SUBST replaced with AC_DEFINE. + Needed to get configure script to correctly setup cmConfigure.h. + +2002-09-10 09:51 king + + * Source/cmCommands.cxx: ERR: Removed accidental commit. + +2002-09-10 09:50 king + + * configure, configure.in, Source/cmCommands.cxx: BUG: Missing + AC_SUBST commands added. + +2002-09-09 09:50 hoffman + + * Modules/FindOpenGL.cmake: Adding GLU to the OPENGL_LIBRARIES only + if it is found. + +2002-09-08 10:15 martink + + * Source/: cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio7Generator.cxx, cmake.cxx: compiler warnings + +2002-09-07 21:25 martink + + * Source/: cmGlobalGenerator.cxx, + cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio7Generator.cxx: compiler warnings + +2002-09-07 21:22 martink + + * Source/cmLocalGenerator.h: compiler warning + +2002-09-07 21:18 martink + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmLocalBorlandMakefileGenerator.cxx: fix for borland compilers + +2002-09-06 18:05 king + + * Source/cmVTKWrapTclCommand.cxx: ERR: Fix for borland in generated + code. vtkCommand is ambiguously both a function and a class. + +2002-09-06 17:19 king + + * configure, configure.in, Templates/cconfigure, + Templates/cconfigure.in, Templates/cxxconfigure, + Templates/cxxconfigure.in: ENH: Improved configure test + implementations by using AC_TRY_COMPILE. + +2002-09-06 16:30 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: updated to fix the long + depend line issue on Borland + +2002-09-06 14:03 starreveld + + * Modules/FindOpenGL.cmake: + ERR: Fix opengl finding on osx + +2002-09-06 13:56 barre + + * Modules/FindTCL.cmake: ENH: make stub stuff ADVANCED + +2002-09-06 13:04 martink + + * Source/: cmMakefile.cxx, cmMakefile.h, cmakemain.cxx, + cmakewizard.cxx, CMakeLists.txt, Makefile.in, + cmGlobalGenerator.cxx, cmGlobalUnixMakefileGenerator.cxx, + cmLocalUnixMakefileGenerator.cxx: new arch + +2002-09-06 13:00 martink + + * Source/: MFCDialog/CMakeSetupDialog.cpp, + MFCDialog/CMakeSetupDialog.h, cmaketest.cxx, cmake.cxx, cmake.h: + new arch + +2002-09-06 13:00 martink + + * Source/CursesDialog/: ccmake.cxx, cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesMainForm.h: new architecture + +2002-09-06 11:47 hoffman + + * Templates/CMakeBorlandWindowsSystemConfig.cmake: fix comment + +2002-09-06 11:00 iscott + + * Modules/readme.txt: Add important missing word to documentation + +2002-09-06 10:55 iscott + + * Modules/readme.txt: More detailed information about consistent + FindXXX.cmake files + +2002-09-06 10:47 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: use :: rule and not a + long line extension + +2002-09-06 09:24 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: minor fix + +2002-09-06 08:33 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: minor fixes + +2002-09-05 12:00 iscott + + * Modules/: FindFLTK.cmake, FindGLUT.cmake, FindGTK.cmake, + FindOpenGL.cmake, FindX11.cmake: Hide lots of values in the + advanced list Fix some bugs OpenGL always needs X11 on Unix + +2002-09-05 09:04 martink + + * Source/cmLocalGenerator.h: made destructor virtual + +2002-09-05 08:22 martink + + * Source/cmDynamicLoader.cxx: removed some couts + +2002-09-04 15:46 martink + + * Source/cmCacheManager.h: made method public + +2002-09-04 15:28 martink + + * Source/cmLocalUnixMakefileGenerator.cxx: fixes + +2002-09-04 15:24 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, cmLocalGenerator.cxx, + cmLocalGenerator.h: updates + +2002-09-04 15:22 martink + + * Source/: cmGlobalVisualStudio6Generator.cxx, + cmGlobalVisualStudio6Generator.h, + cmLocalVisualStudio6Generator.cxx, + cmLocalVisualStudio6Generator.h, + cmGlobalVisualStudio7Generator.cxx, + cmGlobalVisualStudio7Generator.h, + cmLocalVisualStudio7Generator.cxx, + cmLocalVisualStudio7Generator.h: new arch + +2002-09-04 15:22 martink + + * Source/: cmGlobalBorlandMakefileGenerator.cxx, + cmGlobalBorlandMakefileGenerator.h, + cmLocalBorlandMakefileGenerator.cxx, + cmLocalBorlandMakefileGenerator.h: first cut a new arch + +2002-09-04 11:17 martink + + * Tests/Wrapping/CMakeLists.txt: fixed test for new cmake + +2002-09-04 09:24 king + + * Modules/FindOpenGL.cmake: ERR: Still need to define + OPENGL_INCLUDE_PATH in addition to the standard + OPENGL_INCLUDE_DIR for backward compatability. + +2002-09-03 12:29 iscott + + * Modules/FindMFC.cmake: A simple FindMFC module for consistency + +2002-09-03 10:41 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: use windows paths for + utility depends + +2002-09-03 10:41 hoffman + + * Source/cmMSDotNETGenerator.cxx: BUG: bug for more than one custom + commands + +2002-09-03 09:14 iscott + + * Modules/Dart.cmake: Dart now has a configure option + +2002-09-03 09:00 iscott + + * Modules/FindPNG.cmake: I copied a bit too much VXL functionality + here. Oops + +2002-09-03 08:33 iscott + + * Modules/FindPerl.cmake: Added PERL_FOUND + +2002-09-03 08:24 iscott + + * Modules/FindMPEG.cmake: Add an MPEG finder in the new format - + functionality copied from VXL. + +2002-09-03 06:10 iscott + + * Modules/: FindAVIFile.cmake, FindGLU.cmake, FindGLUT.cmake, + FindJPEG.cmake, FindOpenGL.cmake, FindPNG.cmake, FindTIFF.cmake, + FindX11.cmake: Fixed mistake in comments Transferred OPENGL + finding logic in from VXL Added Some backwards compatibility with + CMake1.4 + +2002-09-02 17:34 iscott + + * Modules/: FindFLTK.cmake, FindGTK.cmake: Moved FLTK and GTK to + new FindXXX scheme. Imported some functionality from VXL + +2002-09-02 17:33 iscott + + * Modules/FindX11.cmake: small bug fixes + +2002-09-02 17:29 iscott + + * Source/cmFLTKWrapUICommand.cxx: FLTK_FLUID_EXE -> + FLTK_FLUID_EXECUTABLE because Module files are moving to + consistent scheme + +2002-09-02 16:59 iscott + + * Modules/: FindQt.cmake, FindTIFF.cmake: Fix Bugs + +2002-09-02 16:24 iscott + + * Modules/FindZLIB.cmake: This file should not be empty + +2002-09-02 15:49 iscott + + * Modules/: FindZLIB.cmake, FindZLib.cmake: Moved FindZLib.cmake to + FindZLIB.cmake + +2002-09-02 15:46 iscott + + * Modules/: FindPNG.cmake, FindX11.cmake, FindZLib.cmake: Copied + the X11 PNG and ZLIB functoinality from VXL + +2002-09-02 14:08 iscott + + * Modules/: FindPNG.cmake, FindZLib.cmake: Adding Zlib and PNG find + modules in the new format + +2002-09-02 12:58 iscott + + * Modules/FindTIFF.cmake: This Find Module is in the new style + +2002-09-02 12:05 iscott + + * Modules/: FindJPEG.cmake, FindQt.cmake, FindWget.cmake, + FindZLib.cmake: Add helpful message for QT Windows users Add + FindZLib in new format Move FindJPEG and FINDWGET over to new + scheme + +2002-09-02 07:03 iscott + + * Modules/FindAVIFile.cmake, Modules/FindQt.cmake, + Modules/LinkQT.cmake, Modules/readme.txt, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapUICommand.cxx: + Define a single expected format for the values defined in every + FindXXX.cmake file. Upgrade all the QT functionality to use the + new FindXXX.cmake format Add a module for AVIFile. + +2002-08-30 16:01 martink + + * Source/: cmGlobalUnixMakefileGenerator.cxx, + cmGlobalUnixMakefileGenerator.h, + cmLocalUnixMakefileGenerator.cxx, cmLocalUnixMakefileGenerator.h, + cmGlobalNMakeMakefileGenerator.cxx, + cmGlobalNMakeMakefileGenerator.h, + cmLocalNMakeMakefileGenerator.cxx, + cmLocalNMakeMakefileGenerator.h: in progress + +2002-08-30 16:00 martink + + * Source/: cmGlobalGenerator.cxx, cmGlobalGenerator.h, + cmLocalGenerator.cxx, cmLocalGenerator.h: in progress checkin + +2002-08-30 09:54 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: add rpcrt4.lib + because of CMakeLib needing it + +2002-08-29 09:45 martink + + * Source/cmCPluginAPI.cxx: extern C fixes + +2002-08-28 16:35 martink + + * Source/CursesDialog/: ccmake.cxx, cmCursesMainForm.cxx, + cmCursesMainForm.h: some changes in cachemanager and singletons + +2002-08-28 16:34 martink + + * Source/cmaketest.cxx: no more singletons + +2002-08-28 16:33 martink + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: now needs dynlib + support + +2002-08-28 15:08 king + + * Utilities/: cmake_release_config_cygwin, + cmake_release_unix_build.sh, cmake_release_unix_config.sh, + cmake_release_unix_package.sh: ENH: Moved build of source tarball + to package script. + +2002-08-28 14:51 martink + + * Source/: cmCPluginAPI.cxx, cmCacheManager.cxx, cmCacheManager.h, + cmCommands.cxx, cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmLoadCacheCommand.cxx, cmLoadCommandCommand.cxx, + cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, + cmMSProjectGenerator.cxx, cmMSProjectGenerator.h, cmMakefile.cxx, + cmMakefile.h, cmMakefileGenerator.cxx, cmMakefileGenerator.h, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h, + cmVariableRequiresCommand.cxx, cmake.cxx, cmake.h, cmakemain.cxx, + cmakewizard.cxx, cmakewizard.h, MFCDialog/CMakeSetup.cpp, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h, + MFCDialog/PropertyList.cpp, MFCDialog/PropertyList.h: changed + cache manager and registered generators to no longer be + singletons + +2002-08-28 14:49 martink + + * Source/: cmTryCompileCommand.cxx, cmTryCompileCommand.h: an early + checking not complete + +2002-08-28 14:33 hoffman + + * Source/cmBorlandMakefileGenerator.cxx, + Source/cmMSDotNETGenerator.cxx, + Source/cmNMakeMakefileGenerator.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: ENH: add include paths to + rc program for resource generation + +2002-08-28 10:43 king + + * Utilities/setup.hint: ENH: Incremented version number for 1.4-4 + +2002-08-28 10:40 king + + * Utilities/: cmake-cygwin.README, setup.hint: ENH: Adding cygwin + installation files to branch. + +2002-08-28 10:28 hoffman + + * Utilities/: cmake-cygwin.README, cmake_release_config_cygwin, + setup.hint: [no log message] + +2002-08-28 09:30 king + + * Utilities/cmake_release_config_darwin: Switched to release branch + tag instead of sticky tag. + +2002-08-28 09:27 king + + * Utilities/cmake_release_config_darwin: ENH: Adding release + configuration for darwin. + +2002-08-28 09:07 king + + * Utilities/cmake_release_unix_package.sh: BUG: Don't erase tarball + directory in packaging step in case there is a source tarball + there. + +2002-08-28 09:04 hoffman + + * Utilities/: cmake_release_unix_config.sh, + cmake_release_unix_package.sh: cygwin release + +2002-08-28 08:51 king + + * Utilities/: cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_sun: ENH: + Updated release script configuration for CMake release 1.4.4. + +2002-08-27 14:45 andy + + * Source/cmSourceFile.cxx: Fix bug in trying to set stding with + null + +2002-08-27 09:43 hoffman + + * Source/: CMakeLists.txt, cmLoadCommandCommand.cxx: ENH: fix + warnings + +2002-08-27 08:36 martink + + * Source/: CMakeLists.txt, cmCommands.cxx: fixed bootstrap build to + not use LoadCOmmandCOmmand + +2002-08-26 15:22 martink + + * Source/: cmGetSourceFilePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.h: updated to match the SET + +2002-08-26 15:20 martink + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: added new form of Set source + file properties command + +2002-08-26 10:52 martink + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h, cmCommands.cxx, + cmLoadCommandCommand.cxx: now uses stubs + +2002-08-26 08:53 martink + + * Source/cmSetSourceFilesPropertiesCommand.cxx: fixed bug maybe + +2002-08-23 17:00 hoffman + + * Templates/cxxconfigure, Templates/cxxconfigure.in, configure, + configure.in: try another flag for the dec compiler... + +2002-08-23 16:25 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: no more dll for plugin + +2002-08-23 16:15 martink + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: remoevd shared + lib + +2002-08-23 16:12 martink + + * Source/: cmCPluginAPI.h, cmCacheManager.h, cmDirectory.h, + cmRegularExpression.h, cmStandardIncludes.h, cmSystemTools.h, + cmake.h, CMakeLists.txt, cmListFileCache.h, cmMakefile.h, + cmMakefileGenerator.h, cmakewizard.h: removed shared lib support + +2002-08-23 16:12 martink + + * Source/cmaketest.cxx: memory issue + +2002-08-23 15:11 martink + + * Source/: cmVTKMakeInstantiatorCommand.cxx, cmCacheManager.h, + cmCPluginAPI.cxx: compiler warnings + +2002-08-23 13:47 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: BUG: fix for + cygwin + +2002-08-23 13:46 hoffman + + * Source/: CMakeLists.txt, cmCacheManager.cxx, cmCacheManager.h, + cmake.cxx, cmake.h, cmakemain.cxx, cmaketest.cxx, + CursesDialog/CMakeLists.txt, CursesDialog/form/CMakeLists.txt, + MFCDialog/CMakeSetup.cpp: BUG: add explicit clean up of the + cachemanager at exit of programs, so dll destruction is not a + problem. + +2002-08-23 09:09 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: remove use of + getpropertyasbool + +2002-08-22 17:06 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: fix for borland and a + shared CMakeLib + +2002-08-22 16:57 hoffman + + * Tests/: Complex/CMakeLists.txt, + Complex/Executable/CMakeLists.txt, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: BUG: fix for + borland and a shared CMakeLib + +2002-08-22 16:16 hoffman + + * Source/CMakeLists.txt: BUG: borland needs to have + BUILD_SHARED_LIBS on for executables to work with c++ + +2002-08-22 15:58 martink + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: complex test + needs the dll + +2002-08-22 14:41 martink + + * Source/cmCPluginAPI.cxx: minor warning fix + +2002-08-22 14:40 iscott + + * Modules/: FindAVIFile.cmake, readme.txt: Some more explanation of + a consistent scheme + +2002-08-22 11:37 hoffman + + * configure, configure.in, Templates/cxxconfigure, + Templates/cxxconfigure.in: BUG: fix for OSF compiler to use ansi + mode for streams + +2002-08-22 11:12 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: BUG: use c flags for + cprograms, and do not use large command lines for linking + +2002-08-22 09:17 martink + + * Source/cmCPluginAPI.cxx: fixed some warnings + +2002-08-22 09:11 martink + + * Source/cmSetSourceFilesPropertiesCommand.cxx: fixed some warnings + +2002-08-22 09:10 martink + + * Source/cmCPluginAPI.h: fixed nested comment + +2002-08-22 08:25 martink + + * Source/CursesDialog/CMakeLists.txt: added lib + +2002-08-21 15:52 king + + * Utilities/cmake_release_unix_package.sh: ENH: Added -files to end + of internal binary tarball to distinguish from the outer + tarball's name. + +2002-08-21 15:37 martink + + * Source/CursesDialog/cmCursesMainForm.cxx: minor fixes for new + cache api + +2002-08-21 13:15 martink + + * Source/: cmMakefile.cxx, cmMakefile.h, cmCPluginAPI.cxx: minor + bug + +2002-08-21 12:02 martink + + * Source/MFCDialog/: CMakeLists.txt, CMakeSetupDialog.cpp: support + for dll + +2002-08-21 12:01 martink + + * Source/: cmMakefileGenerator.h, cmMakefile.h: dll support + +2002-08-21 12:00 martink + + * Source/cmRegularExpression.h: made into dll + +2002-08-21 11:59 martink + + * Source/: cmake.h, cmakewizard.h, cmakewizard.cxx: support for + plugins + +2002-08-21 11:58 martink + + * Source/: cmLoadCommandCommand.cxx, cmLoadCommandCommand.h: adding + plugin support + +2002-08-21 11:58 martink + + * Source/: cmDynamicLoader.cxx, cmDynamicLoader.h: added plugin + support + +2002-08-21 11:55 martink + + * Source/: cmStandardIncludes.h, CMakeLists.txt, + cmCacheManager.cxx, cmCacheManager.h, cmDirectory.h, + cmSystemTools.h, cmListFileCache.h: made CMakeLib shared on + windows + +2002-08-21 11:54 martink + + * Source/: cmCPluginAPI.cxx, cmCPluginAPI.h: added C Plugin API + first cut + +2002-08-21 09:45 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: BUG: use c compiler for link + of c programs, and use temp file nmake syntax for linking c and + c++ programs + +2002-08-19 15:40 iscott + + * Modules/: FindQt.cmake, LinkQT.cmake: I have tested this with + VXL/our internal code, and it works for me. + +2002-08-19 10:05 iscott + + * Modules/FindQt.cmake: I first go at a consistent FindXXX.cmake + file + +2002-08-16 11:20 martink + + * Source/cmMacroCommand.cxx: minor fix + +2002-08-16 11:17 martink + + * Source/: cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, + cmSetSourceFilesPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, cmSourceFile.cxx, + cmSourceFile.h, cmSourceFilesCommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx, cmGetSourceFilePropertyCommand.cxx, + cmWrapExcludeFilesCommand.cxx, cmCreateTestSourceList.cxx, + cmAbstractFilesCommand.cxx, cmAuxSourceDirectoryCommand.cxx, + cmBorlandMakefileGenerator.cxx, cmDSPWriter.cxx, + cmFLTKWrapUICommand.cxx, cmMSDotNETGenerator.cxx, + cmMakeDepend.cxx, cmNMakeMakefileGenerator.cxx, cmTarget.cxx, + cmUnixMakefileGenerator.cxx, cmVTKMakeInstantiatorCommand.cxx: + modified how source files store properties + +2002-08-16 09:45 king + + * Source/cmVTKMakeInstantiatorCommand.cxx: ERR: unsigned int -> + size_t. + +2002-08-16 09:31 king + + * Source/cmVTKMakeInstantiatorCommand.cxx: ENH: Changed check for + which version of instantiators to generate to look for definition + of VTK_USE_INSTANTIATOR_NEW instead of an extra argument to + VTK_MAKE_INSTANTIATOR. + +2002-08-15 15:01 king + + * Source/: cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h: BUG: Added + backward-compatability. The old instantiator style will be used + unless the argument USE_INSTANTIATOR_NEW is given to tell the + command to make use of the instantiator new functions exported + from each class's implementation file. + +2002-08-15 14:39 king + + * Source/: cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h: ENH: Improved generated + instantiator to use extern declarations to wrappers around the + New() methods. This avoids the need to include each class's + header in an instantiator source. The instantiator class + implementations can now fit in a single source file that compiles + quickly. + +2002-08-15 09:34 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: ENH: add -DWIN32 flag for + builds + +2002-08-14 11:44 ibanez + + * Modules/FindFLTK.cmake: ENH: Platform dependent libraries added. + +2002-08-13 15:47 martink + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: added macro test + +2002-08-13 15:46 martink + + * Source/: cmCommands.cxx, cmMacroCommand.cxx, cmMacroCommand.h: + added new command + +2002-08-13 10:46 martink + + * Source/: cmExecProgramCommand.h, cmExecProgramCommand.cxx: merge + from main tree + +2002-08-13 10:08 martink + + * CMakeLists.txt: added man page + +2002-08-13 10:05 martink + + * Source/cmCreateTestSourceList.cxx: some warning and purify fixes + +2002-08-13 10:04 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: IF Else improvements + +2002-08-13 10:03 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: merges from the main + branch + +2002-08-13 10:02 martink + + * Source/cmRemoveCommand.cxx: merge from main branch + +2002-08-13 10:01 martink + + * Copyright.txt: merge from the main branch + +2002-08-13 10:00 martink + + * cmake.1: updated from main branch + +2002-08-13 09:59 martink + + * Modules/: FindFLTK.cmake, FindTCL.cmake: updates from the main + branch + +2002-08-12 08:39 martink + + * Source/cmElseCommand.cxx: compiler warning + +2002-08-09 12:00 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmMakefile.cxx: + better IF ELSE handling + +2002-08-09 10:04 barre + + * Modules/FindTCL.cmake: FIX: fix commit messup (this change was + committed to the branch instead of the main tree, thus was + wiped-out later) + +2002-08-09 08:33 barre + + * Modules/FindwxWindows.cmake: FIX: - WINDOWS does not exist, use + WIN32 (or defineWINDOWS if cygwin can not be used inUnix mode?), + - fix an un-closed IF, - use same prefix for vars (and make it + advanced) + +2002-08-09 07:55 andy + + * Modules/FindwxWindows.cmake: This hopefully finds wxWindows on + UNIX + +2002-08-08 15:30 andy + + * Modules/FindwxWindows.cmake: Add UNIX support for WXWINDOWS + +2002-08-08 15:29 andy + + * Source/: cmExecProgramCommand.cxx, cmExecProgramCommand.h: Add + return value support and add documentation + +2002-08-08 15:14 king + + * Copyright.txt: ENH: Updated copyright. + +2002-08-08 15:13 andy + + * Source/: cmExecProgramCommand.cxx, cmExecProgramCommand.h: Add + option of storing output to the variable + +2002-08-08 13:41 barre + + * Modules/FindwxWindows.cmake: ENH: first stab at wxWindows support + (win32) + +2002-08-08 12:49 king + + * CMakeLists.txt: ENH: Adding installation for man page. + +2002-08-08 12:30 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: handle .exe extension + for cygwin + +2002-08-08 11:58 king + + * cmake.1: ENH: Initial checkin of unix manpage. + +2002-08-08 08:51 martink + + * Source/cmCreateTestSourceList.cxx: fixed some compiler warnings + and leaks + +2002-08-07 18:12 king + + * Utilities/: cmake_release_config_hpux, cmake_release_config_irix, + cmake_release_config_linux, cmake_release_config_sun, + cmake_release_unix.sh, cmake_release_unix_build.sh, + cmake_release_unix_config.sh, cmake_release_unix_package.sh: ENH: + Split install script into two parts. Added basic support for + adding more files to the distribution and creating packages. + +2002-08-07 11:01 martink + + * Source/cmCreateTestSourceList.cxx: fixed some compiler warnings + and leaks + +2002-08-07 10:30 martink + + * Source/cmCreateTestSourceList.cxx: fixed some compiler warnings + and leaks + +2002-08-05 18:08 ibanez + + * Modules/FindFLTK.cmake: ENH: Images library added. Names for + debuggin versions in windows added. + +2002-08-05 09:51 martink + + * Source/cmRemoveCommand.cxx: minor fix + +2002-08-02 13:43 ibanez + + * Modules/FindFLTK.cmake: FIX: names styles for fltkgl and + fltkforms are different in windows and linux. Both styles + are now searched taking advantage of the NAMES option in + FIND_LIBRARY. + +2002-08-02 12:51 martink + + * Source/cmLinkDirectoriesCommand.cxx: duhhhhhh + +2002-08-02 08:50 martink + + * Source/: cmFindLibraryCommand.cxx, cmLinkLibrariesCommand.cxx, + MFCDialog/CMakeSetupDialog.cpp, cmMakefile.h: updates from the + main tree + +2002-08-01 23:05 barre + + * Source/cmFindLibraryCommand.cxx: FIX: put ExpandRegistryValue() + back (seems to have been removed accidentally I guess in 1.25) + +2002-08-01 16:23 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: FIX: stupid pb fixed + (close to being medieval'ed by The Ken) + +2002-08-01 15:58 martink + + * Source/cmLinkDirectoriesCommand.cxx: no longer need an argument + +2002-08-01 09:50 martink + + * Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Source/cmMakefile.h, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.h, Source/cmSystemTools.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, Source/cmVTKWrapTclCommand.cxx, + Source/cmake.cxx, Source/MFCDialog/CMakeCommandLineInfo.cpp, + Source/MFCDialog/CMakeCommandLineInfo.h, + Source/MFCDialog/CMakeSetup.cpp, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/TestDriver/CMakeLists.txt, Tests/TestDriver/test1.cxx, + Tests/TestDriver/test2.cxx, Tests/TestDriver/testArgs.h, + Tests/TestDriver/subdir/test3.cxx: merges from the main branch + +2002-08-01 08:41 martink + + * Modules/: FindGLU.cmake, FindJNI.cmake, FindOpenGL.cmake, + FindTCL.cmake: merges from the main tree + +2002-07-31 13:45 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: BUG: fix jump to directory and build + for nmake if library path is not set. combine + OutputBuildExecutableInDir and OutputBuildLibraryInDir into + OutputBuildTargetInDir + +2002-07-31 11:08 martink + + * Tests/TestDriver/testArgs.h: minor fix for c tests + +2002-07-31 11:07 martink + + * Source/cmCreateTestSourceList.cxx: fixed support for C test + programs + +2002-07-31 10:34 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: FIX: ConvertToOutputPath + puts "" around path. Not compatible with GUI use. + +2002-07-31 09:29 barre + + * Source/cmCreateTestSourceList.cxx: FIX: is enough to + get malloc()/free() + +2002-07-30 16:19 martink + + * Tests/TestDriver/: CMakeLists.txt, test1.cxx, test2.cxx, + subdir/test3.cxx: updated to mods in command + +2002-07-30 16:18 martink + + * Source/: cmCreateTestSourceList.cxx, cmCreateTestSourceList.h: + updated to handle extensions + +2002-07-30 10:33 barre + + * Source/cmCreateTestSourceList.cxx: FIX: la commande créait du + code C++. Du code C devrait faire l'affaire. + +2002-07-30 10:23 barre + + * Source/cmCreateTestSourceList.cxx: FIX: la commande créait du + code C++. Du code C devrait faire l'affaire. + +2002-07-29 09:46 barre + + * Modules/: FindTCL.cmake: ENH: change the search path order (if + several Tcl/Tk are installed, the "current" version is likely to + be the one that is bound to the wish/tclsh found in the PATH) + +2002-07-26 14:06 barre + + * Modules/: FindTCL.cmake: ENH: clean the module, add debug libs + +2002-07-26 10:14 king + + * Source/: cmITKWrapTclCommand.cxx, cmITKWrapTclCommand.h: BUG: + Only one generated Tcl wrapper source was getting added to the + package's library. + +2002-07-26 09:54 king + + * Source/cmVTKWrapTclCommand.cxx: BUG: Generated call to + Tcl_CreateCommand for vtkCommand should cast pointer to extern + "C" version. + +2002-07-25 16:47 king + + * Source/cmVTKWrapTclCommand.cxx: BUG: Generated vtkCommand + prototype cannot be extern "C" because it may not match with the + version in VTK. + +2002-07-25 16:41 andy + + * Source/cmSystemTools.cxx: Ok, now cd will work on windows + +2002-07-25 16:25 will + + * Source/cmVTKWrapTclCommand.cxx: fixed warning + +2002-07-25 11:17 barre + + * Modules/FindTCL.cmake: FIX: the stub libs were not searched + +2002-07-25 11:10 barre + + * Modules/FindTCL.cmake: FIX: the stub libs were not searched + +2002-07-25 09:16 martink + + * Source/cmMakefile.cxx: makefile now does not ignore NOTFOUND libs + and includes + +2002-07-25 08:00 martink + + * Source/cmMakefile.cxx: makefile now ignores NOTFOUND libs and + includes + +2002-07-22 11:03 king + + * Utilities/cmake_release_config_irix: ENH: Added release script + configuration for IRIX build. + +2002-07-22 10:57 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: better Drag&Drop, and + change source dir automatically when build dir is changed in the + GUI + +2002-07-22 10:40 martink + + * Source/cmMakefile.h: updated to patch 1 + +2002-07-22 10:34 martink + + * Templates/CXXCMakeSystemConfig.cmake.in: better docs and support + for mising args + +2002-07-22 10:33 martink + + * Source/cmMakefile.cxx: now replaces args even if not defined + +2002-07-22 10:31 martink + + * Source/: cmAddDefinitionsCommand.cxx, + cmIncludeDirectoryCommand.cxx, cmLinkLibrariesCommand.cxx, + cmTargetLinkLibrariesCommand.cxx: allows less arguments changes + from main tree + +2002-07-22 10:00 martink + + * Source/: cmIncludeDirectoryCommand.cxx, + cmLinkLibrariesCommand.cxx: allows no arguments + +2002-07-21 19:12 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: add Drag & Drop + (directory, file, or CMakeCache), support for Shortcut too + +2002-07-21 15:56 barre + + * Source/MFCDialog/: CMakeCommandLineInfo.cpp, + CMakeCommandLineInfo.h, CMakeSetupDialog.cpp, CMakeSetupDialog.h: + ENH: add Drag & Drop (directory, file, or CMakeCache), support + for Shortcut too + +2002-07-20 08:55 martink + + * Source/cmAddDefinitionsCommand.cxx: modified to accept no + arguments + +2002-07-19 15:49 martink + + * Templates/CXXCMakeSystemConfig.cmake.in: fixed some empty + descriptions + +2002-07-19 14:42 martink + + * Source/cmMakefile.cxx: full variable replacement and removal or + empty arguments + +2002-07-19 14:40 martink + + * Source/cmTargetLinkLibrariesCommand.cxx: does not need a second + argument + +2002-07-18 18:43 starreveld + + * Modules/: FindGLU.cmake, FindOpenGL.cmake: ERR: remove automatic + Carbon framework on osx + +2002-07-17 16:33 martink + + * Source/cmInstallFilesCommand.cxx: fix for install with paths + +2002-07-17 15:57 martink + + * Source/cmInstallFilesCommand.cxx: fixe for files with paths + +2002-07-17 11:53 andy + + * Source/cmake.cxx: Fix changing of directories using cmSystemTools + RunCommand feature + +2002-07-17 10:52 martink + + * Source/: cmForEachCommand.cxx, cmForEachCommand.h, + cmMakefile.cxx: fix for IF statements inside of Foreach loops + +2002-07-17 10:48 martink + + * Source/cmForEachCommand.cxx, Source/cmForEachCommand.h, + Source/cmMakefile.cxx, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: fixed if statements + inside a foreach + +2002-07-16 17:42 king + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: Added test for + IF inside a FOREACH. + +2002-07-15 11:37 king + + * Utilities/cmake_release_config_hpux: ENH: Adding release script + configuration for HPUX.e + +2002-07-15 11:13 king + + * Utilities/cmake_release_config_sun: ENH: Added release + configuration file for Sun. + +2002-07-15 10:48 king + + * Utilities/: cmake_release_config_linux, cmake_release_unix.sh: + ENH: Made release script more generic for creating static and + shared releases. + +2002-07-15 10:09 king + + * Utilities/cmake_release_config_linux: ENH: Release script + configuration file for linux. + +2002-07-15 10:08 king + + * Utilities/cmake_release_unix.sh: ENH: Protoype unix release + script. + +2002-07-15 09:55 king + + * Templates/CMakeLists.txt: ERR: CXXCMakeSystemConfig.cmake and + CCMakeSystemConfig.cmake need .in extension. + +2002-07-15 09:46 king + + * Source/cmInstallFilesCommand.cxx: BUG: Only the last extension + should be removed. + +2002-07-15 09:45 king + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h: BUG: + INSTALL_FILES command should remove the extension of a file + before adding the user provided extension. + +2002-07-15 09:44 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added + GetFilenameWithoutLastExtension. + +2002-07-15 09:23 king + + * Templates/CMakeLists.txt: ERR: Install for + CXXCMakeSystemConfig.cmake and CCMakeSystemConfig.cmake need .in + extension. + +2002-07-15 09:22 king + + * Modules/FindJNI.cmake: ENH: Added /usr/local/lib/java search + paths. + +2002-07-15 08:44 martink + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h: fix + install target + +2002-07-12 11:17 martink + + * Modules/FindJava.cmake: merged module into branch + +2002-07-12 11:10 martink + + * Source/cmIfCommand.cxx: minor warning fix + +2002-07-11 14:58 martink + + * Source/cmIfCommand.cxx: fix warning + +2002-07-11 14:25 martink + + * Source/cmMakefile.cxx: merge from the main tree + +2002-07-11 14:20 hoffman + + * Source/cmMakefile.cxx: BUG: fix for compile with hp + +2002-07-11 14:03 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmIfCommand.h, + cmMakefile.cxx, cmMakefile.h: merged some updates, the IF + checking + +2002-07-11 13:58 martink + + * Source/: cmUnixMakefileGenerator.cxx, cmVTKWrapTclCommand.cxx, + cmake.cxx: updates from the main tree + +2002-07-10 16:07 martink + + * Source/cmVTKWrapTclCommand.cxx: fix warning on Sun + +2002-07-10 14:34 andy + + * Source/cmake.cxx: Add command that runs program in given + directory + +2002-07-10 11:38 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmIfCommand.h, + cmMakefile.cxx, cmMakefile.h: better error handling with if + statements + +2002-07-10 09:33 andy + + * Source/cmUnixMakefileGenerator.cxx: Fix problem when using NMake. + This generated lines without space so nmake got all confused + +2002-07-08 09:30 andy + + * Modules/FindJava.cmake: Add module that finds java executables. + This module should find java, javac, and jar. + +2002-07-02 09:58 martink + + * configure, configure.in: merges from main tree + +2002-07-02 09:56 martink + + * Modules/FindFLTK.cmake: merges with main tree + +2002-07-02 09:54 martink + + * Source/: cmAuxSourceDirectoryCommand.cxx, + cmBorlandMakefileGenerator.cxx, cmCMakeMinimumRequired.cxx, + cmConfigure.cmake.h.in, cmConfigure.h.in, + cmCreateTestSourceList.cxx, cmCreateTestSourceList.h, + cmDSWWriter.cxx, cmElseCommand.cxx, cmEnableTestingCommand.h, + cmFLTKWrapUICommand.cxx, cmFindLibraryCommand.cxx, + cmFunctionBlocker.h, cmGetFilenameComponentCommand.cxx, + cmITKWrapTclCommand.cxx, cmIfCommand.cxx, cmIfCommand.h, + cmInstallFilesCommand.cxx, cmLinkLibrariesCommand.cxx, + cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, cmMakeDepend.cxx, + cmMakeDepend.h, cmMakefile.cxx, cmMakefile.h, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, cmSourceFile.cxx, + cmSourceFile.h, cmSourceFilesCommand.cxx, + cmSourceFilesRemoveCommand.cxx, cmStandardIncludes.h, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx, + cmTargetLinkLibrariesCommand.cxx, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmVTKMakeInstantiatorCommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx, cmWrapExcludeFilesCommand.cxx, + cmake.cxx, cmake.h, ctest.cxx: massive merge from main tree + +2002-07-02 09:33 martink + + * Source/: cmFindLibraryCommand.cxx, cmMakefile.h, + cmSystemTools.cxx, cmSystemTools.h: updates + +2002-07-02 08:24 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: fixed warning + +2002-07-01 08:49 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmIfCommand.h: + consolidated IF handling and added checks for bad arguments + +2002-06-30 13:53 martink + + * Source/: cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx: + fixed commands that were setting definitions in final pass to set + definitions in initial pass + +2002-06-29 20:04 martink + + * Source/: cmQTWrapCPPCommand.cxx, cmVTKWrapJavaCommand.cxx, + cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx: fixed + commands that were setting definitions in final pass to set + definitions in initial pass + +2002-06-28 10:29 andy + + * Source/cmVTKWrapPythonCommand.cxx: Remove another warning in the + python wrapping + +2002-06-28 10:18 martink + + * Source/cmSourceFile.h: performance fix + +2002-06-28 09:43 andy + + * Source/cmVTKWrapPythonCommand.cxx: Add removing of warnings and + add comment about the file being generated in CMake + +2002-06-28 09:21 martink + + * Source/cmAuxSourceDirectoryCommand.cxx: bug fix for aux src dirs + +2002-06-28 08:57 martink + + * Source/: cmMakefile.cxx, cmSourceFile.h: minor cleanup + +2002-06-27 21:17 martink + + * Source/: cmMakefile.cxx, cmSourceFile.h: performance inprovements + +2002-06-27 16:47 martink + + * Source/cmMakefile.cxx: bug fix + +2002-06-27 16:42 martink + + * Source/: cmMakefile.cxx, cmSourceFilesCommand.cxx: bug fix + +2002-06-27 16:25 martink + + * Source/cmSourceFilesCommand.cxx: bug fix + +2002-06-27 16:05 martink + + * Tests/Simple/CMakeLists.txt: a minor fix to make my life easier + +2002-06-27 15:57 martink + + * Source/cmAuxSourceDirectoryCommand.cxx, + Source/cmCreateTestSourceList.cxx, Source/cmDSWWriter.cxx, + Source/cmFLTKWrapUICommand.cxx, + Source/cmGetFilenameComponentCommand.cxx, + Source/cmITKWrapTclCommand.cxx, Source/cmInstallFilesCommand.cxx, + Source/cmLinkLibrariesCommand.cxx, + Source/cmMSDotNETGenerator.cxx, Source/cmMakeDepend.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmQTWrapCPPCommand.cxx, Source/cmQTWrapUICommand.cxx, + Source/cmSourceFilesCommand.cxx, + Source/cmSourceFilesRemoveCommand.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmTarget.cxx, + Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmVTKMakeInstantiatorCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, + Source/cmWrapExcludeFilesCommand.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: removed all + source lists from the system and made them vectors. Also appended + _CMAKE_PATH to the end of the automatic cache entries for + executables and libraries. Odds of all these changes working are + slim but cmake builds and passes all its tests. VTK40 starts + building + +2002-06-27 09:35 king + + * Source/: cmake.cxx, cmake.h: BUG: CMake crashed if it failed to + find its own executable. Also added better error messages when + this occurs. + +2002-06-25 09:59 hoffman + + * Tests/Simple/CMakeLists.txt: add a test with no extension + +2002-06-25 09:59 hoffman + + * Source/cmTarget.cxx: BUG: try to tell the difference between + variables with sources and other variables + +2002-06-25 09:18 king + + * Source/cmStandardIncludes.h: BUG: Result from ostrstream::str() + can be a null pointer. + +2002-06-24 18:19 king + + * Source/cmStandardIncludes.h: BUG: Attempt to fix + ostrstream::str() wrapper for broken platforms. + +2002-06-24 16:42 martink + + * Source/cmTarget.cxx: modified to handle src list vectors without + proper dollar signs + +2002-06-24 14:07 martink + + * Source/ctest.cxx: BUG: make sure windows paths are used for the + command or it will not work for win 98 + +2002-06-21 11:35 martink + + * Templates/: CXXCMakeSystemConfig.cmake.in, cxxconfigure, + cxxconfigure.in: now looks for stringstream as well, from the + main tree + +2002-06-21 11:25 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: fixed if matches bug + +2002-06-21 10:31 king + + * Source/cmStandardIncludes.h: ERR: using declaration to move + streams into std namespace needs to bring up ostrstream and + ostringstream, not strstream and stringstream. + +2002-06-21 10:26 king + + * Source/CursesDialog/form/frm_driver.c: ERR: Removed most of the + repeated curses declarations. The cause errors on other + platforms. Grrrr.. + +2002-06-21 09:25 king + + * Source/CursesDialog/form/frm_driver.c: ERR: Added function + declarations from curses.h. They are not present on some + platforms. Fixes warnings about implicit declarations. + +2002-06-21 09:00 king + + * Tests/: Complex/cmTestConfigure.h.in, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/cmTestConfigure.h.in: ENH: Added + configuration of CMAKE_NO_ANSI_STRING_STREAM. It is defined when + the sstream header does not exist. + +2002-06-21 08:42 king + + * configure, Templates/cxxconfigure: ERR: Ran autoconf on + corresponding fixes to configure.in and cxxconfigure.in. + +2002-06-21 08:39 hoffman + + * Templates/cxxconfigure.in: fix for sstream + +2002-06-21 08:38 hoffman + + * configure.in: fix to sstring stuff + +2002-06-20 10:39 hoffman + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: modified MATCHES to + handle non variables + +2002-06-20 10:20 king + + * Source/cmStandardIncludes.h: ERR: cmStringStream is taking the + functionality of ostringstream and ostrstream, not stringstream + and strstream. + +2002-06-20 10:19 king + + * Templates/CXXCMakeSystemConfig.cmake.in: BUG: + CMAKE_NO_ANSI_STRING_STREAM needs to be copied from the + cxxconfigure results. + +2002-06-19 15:21 king + + * Source/: cmBorlandMakefileGenerator.cxx, + cmCMakeMinimumRequired.cxx, cmConfigure.cmake.h.in, + cmConfigure.h.in, cmNMakeMakefileGenerator.cxx, + cmStandardIncludes.h, cmSystemTools.cxx, + cmUnixMakefileGenerator.cxx, cmVTKMakeInstantiatorCommand.cxx, + cmake.cxx: ENH: Added cmStringStream class to wrap + std::stringstream or std::strstream depending on the platform. + The interface is that of std::stringstream, so no "ends" or + "rdbuf()->freeze(0)" lines are needed. + +2002-06-19 15:09 king + + * configure, Templates/cxxconfigure: ENH: Re-ran autoconf to + include changes to corresponding configure input. This adds a + test for the availability of sstream. + +2002-06-19 15:05 king + + * configure.in, Templates/cxxconfigure.in: ENH: Added test for + sstream header. Defines CMAKE_NO_ANSI_STRING_STREAM if the + header doesn't exist. + +2002-06-19 14:35 barre + + * Source/cmSystemTools.cxx: ENH: FindLibrary supports .Net specific + lib dirs + +2002-06-19 13:49 martink + + * Source/: cmCreateTestSourceList.cxx, cmCreateTestSourceList.h, + cmEnableTestingCommand.h, cmFunctionBlocker.h, cmMakefile.h, + cmTarget.cxx: merges from main tree + +2002-06-19 13:28 martink + + * Source/cmSourceFile.cxx: modified create test source to create a + vector + +2002-06-19 13:14 martink + + * Modules/: Dart.cmake, FindGLU.cmake, FindGLUT.cmake, + FindJNI.cmake, FindOpenGL.cmake, FindTclsh.cmake, FindX11.cmake: + update dfrom main tree + +2002-06-19 12:51 martink + + * Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Source/cmSourceFile.cxx, + Source/cmTarget.cxx, Tests/TestDriver/CMakeLists.txt: modified + create test source to create a vector + +2002-06-19 08:57 king + + * Source/CursesDialog/form/fty_alpha.c: ERR: Fixed unused parameter + warning. + +2002-06-19 07:28 hoffman + + * CMakeLists.txt, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: [no log message] + +2002-06-18 17:20 king + + * Source/: cmEnableTestingCommand.h, cmFunctionBlocker.h, + cmMakefile.cxx, cmSystemTools.cxx, cmTarget.cxx: ERR: Fixed + compiler warnings. + +2002-06-18 17:20 king + + * Source/CursesDialog/: ccmake.cxx, cmCursesBoolWidget.cxx, + cmCursesDummyWidget.cxx, cmCursesForm.h, cmCursesLabelWidget.cxx, + cmCursesLongMessageForm.cxx, cmCursesMainForm.cxx: ERR: Fixed + compiler warnings about unused parameters. + +2002-06-18 17:19 king + + * Source/CursesDialog/form/: frm_driver.c, frm_req_name.c, + fty_alnum.c, fty_int.c, fty_ipv4.c, fty_num.c, fty_regex.c: ERR: + Fixed compiler warnings when using strict ansi. + +2002-06-18 16:43 martink + + * Modules/Dart.cmake: fixed another bug + +2002-06-18 16:35 martink + + * Modules/Dart.cmake: fixed bug + +2002-06-18 16:32 king + + * Source/ctest.cxx: ERR: Fix for fprintf format warning. + +2002-06-18 16:30 king + + * Source/CursesDialog/form/frm_data.c: ERR: Attempt to fix warning + on OSF about implicit declaration of winnstr. + +2002-06-18 14:26 barre + + * Modules/FindGLUT.cmake: ENH: add more paths for the HP + +2002-06-18 08:54 hoffman + + * CMakeLists.txt, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: try and fix link + problem on dec + +2002-06-17 13:43 andy + + * Modules/FindJNI.cmake: Add debian Java paths + +2002-06-17 13:07 barre + + * Modules/: FindGLU.cmake, FindGLUT.cmake: FIX: GLU and GLUT flags + for Mac OSX + +2002-06-14 16:49 barre + + * Modules/: FindCABLE.cmake, FindTclsh.cmake, FindX11.cmake: ENH: + clean modules (doc, make stuff advanced, etc.) + +2002-06-14 16:38 hoffman + + * Modules/Dart.cmake: ENH: change so that on all make based systems + all dart targets are added + +2002-06-14 11:46 barre + + * Modules/: FindGLU.cmake, FindGLUT.cmake: ENH: use + OPENGL_LIBRARY_PATH as additional search path + +2002-06-14 11:45 barre + + * Modules/FindOpenGL.cmake: ENH: define OPENGL_LIBRARY_PATH (path + to OPENGL_LIBRARY) so that it can be used to search for other + OpenGL-related libs + +2002-06-14 11:31 barre + + * Modules/FindGLU.cmake: FIX: bug, the wrong include file was + searched. + +2002-06-14 10:37 barre + + * Source/: cmFindLibraryCommand.cxx, cmSystemTools.cxx, + cmSystemTools.h: ENH: FindLibrary can now use the makefile to add + some compiler-specific lib search path (depending on the + generator). + +2002-06-14 10:35 barre + + * Modules/FindGLUT.cmake: ENH/FIX: Glut should be found, not set. + Add search path for Cygwin + +2002-06-13 14:45 barre + + * Modules/FindGLUT.cmake: FIX: comply with the way OpenGL libs are + set in FindOpenGL and FindGLU + +2002-06-13 11:48 barre + + * Modules/: FindGLU.cmake, FindGLUT.cmake, FindOpenGL.cmake: ENH: + make all OpenGL libs advanced, and add support for glu lib with + Borland + +2002-06-12 09:46 hoffman + + * Source/MFCDialog/CMakeSetup.cpp: fix warning + +2002-06-11 14:54 martink + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: some + fixes for dot net and spaces + +2002-06-11 14:25 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: use lower case and not short path for + uniq paths on window + +2002-06-11 14:25 hoffman + + * Source/cmMSDotNETGenerator.cxx: only allow unique configurations + +2002-06-11 14:15 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h: BUG: fix + dot net for paths with spaces + +2002-06-11 12:16 hoffman + + * Source/cmMSDotNETGenerator.cxx: BUG: RelativePath should not be + quoted in output files even if it has spaces + +2002-06-11 11:19 martink + + * Source/cmUnixMakefileGenerator.cxx: some win98 depend problems + +2002-06-11 11:01 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: don't use short paths in + the output + +2002-06-11 10:43 hoffman + + * Source/cmUnixMakefileGenerator.cxx: use short path to get unique + path names for depend path output + +2002-06-11 09:14 hoffman + + * Source/CursesDialog/: ccmake.cxx, cmCursesMainForm.cxx: ERR: + Fixed sun CC warnings. + +2002-06-10 14:21 martink + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h, CMakeLists.txt: joins + with the head + +2002-06-10 14:19 martink + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h: now includes current + include files directory when searching for files it includes + +2002-06-10 11:33 hoffman + + * Source/CMakeLists.txt: BUG: cmake needs it's own directory for + includes, so depends work + +2002-06-10 09:50 hoffman + + * ChangeLog.txt: new changes for 1.4 + +2002-06-10 09:35 martink + + * Source/cmMakefile.h: updated revision + +2002-06-10 09:33 martink + + * Modules/: FindGLUT.cmake, FindPythonLibs.cmake: updated from main + branch + +2002-06-10 08:53 andy + + * Modules/FindPythonLibs.cmake: Oops, forgot the library name + +2002-06-10 08:52 andy + + * Modules/FindPythonLibs.cmake: Add search for python 2.2 + +2002-06-07 08:39 ibanez + + * Modules/FindFLTK.cmake: FIX: {} were missing around + FLTK_*_LIBRARY. + +2002-06-06 17:49 ibanez + + * Modules/FindFLTK.cmake: FIX: The final test is done now over + FLTK_LIBRARY instead of FLTK_LIBRARY_PATH + +2002-06-06 15:28 ibanez + + * Modules/FindFLTK.cmake: ENH: Support for FLTK1.1 and FLTK1.0.11 + added. An option allows to select between the two versions. + +2002-06-06 15:00 martink + + * CMake.rtf: updates + +2002-06-06 11:53 hoffman + + * Source/: Makefile.borland: ENH: remove borland bootstrap makefile + +2002-06-06 08:49 hoffman + + * Modules/FindGLUT.cmake: fix for glut on win32 + +2002-06-05 13:31 martink + + * Source/cmMakefile.h: updated revision + +2002-06-05 13:30 martink + + * Source/cmMakefile.h: updated rev + +2002-06-05 13:24 martink + + * Source/MFCDialog/CMakeSetup.dsp: now uses bootstrap + +2002-06-05 13:22 martink + + * Source/ccommand.cxx: merged ccommand into cmake + +2002-06-05 09:11 martink + + * Source/: CMakeLib.dsp, DumpDocumentation.dsp, ccommand.dsp, + cmake.dsp, ctest.dsp: uses executabke bootstrap + +2002-06-03 13:40 martink + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: changed CCOMMAND to + CMAKE + +2002-06-03 13:08 martink + + * Source/CMakeLists.txt, Source/cmBorlandMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.cxx, Source/cmake.cxx, + Source/cmake.h, Source/cmakemain.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: removed ccommand use + cmake now + +2002-06-03 11:06 martink + + * CMake.rtf: updated + +2002-06-03 10:25 hoffman + + * Source/: cmMakefile.cxx, cmTarget.cxx: ENH: only add _LIB_DEPEND + information for libraries and modules + +2002-05-31 08:39 martink + + * Source/cmSystemTools.cxx: fixed bug in get short path for quoted + paths + +2002-05-29 15:00 perera + + * Source/cmTarget.cxx: BUG: never make a target depend on itself. + This was causing unnecessary library duplication, resulting in + link errors on some platforms. + +2002-05-29 09:56 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: MAKEFLAGS does not need + to be passed on command line. It is automatically set by make in + environment for recursive call. + +2002-05-28 08:56 martink + + * Source/: cmake.cxx, cmake.h: remobed bootstrap + +2002-05-28 08:50 martink + + * bootstrap.exe, ccommand.exe: different bootstrap command + +2002-05-27 10:29 barre + + * Tests/: Complex/VarTests.cmake, Complex/Executable/complex.cxx, + ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/Executable/complex.cxx: ENH: add tests for + LESS, GREATER, STRLESS, STRGREATER (IF command) + +2002-05-23 13:27 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: increse coverage + +2002-05-23 13:23 hoffman + + * Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Tests/Complex/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: increase + coverage + +2002-05-23 13:04 hoffman + + * Tests/: Complex/CMakeLists.txt, + Complex/cmTestConfigureEscape.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigureEscape.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigureEscape.h.in, + ComplexRelativePaths/Executable/complex.cxx: add a test for + escape quotes and configure file + +2002-05-23 10:36 martink + + * bootstrap.exe, ccommand.exe: added win32 bootstrap support + +2002-05-23 10:34 martink + + * Source/: cmDSWWriter.cxx, cmMSDotNETGenerator.cxx: only add test + target if testing is enabled and ctest is found + +2002-05-23 10:33 martink + + * Source/cmake.cxx: minor bootstap fixes + +2002-05-23 10:32 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmIfCommand.h: adde + less greater + +2002-05-22 13:20 hoffman + + * Source/cmAddCustomCommandCommand.cxx: ENH: add list expansion + back + +2002-05-22 09:48 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSProjectGenerator.cxx, + cmUnixMakefileGenerator.cxx: ENH: enable cxx by default if no + languages have been enabled + +2002-05-22 09:48 hoffman + + * Source/cmSystemTools.cxx: ENH: better comment processing + +2002-05-22 09:47 hoffman + + * Source/: ctest.cxx, ctest.h: ENH: fix depend problem + +2002-05-18 16:09 starreveld + + * Modules/FindOpenGL.cmake: find openGL in Carbon + +2002-05-15 17:23 martink + + * Source/: cmake.cxx, cmake.h: added initial attempt to support + win32 bootstrapping + +2002-05-15 11:11 berk + + * Source/cmSystemTools.cxx: RunCommand now checks whether the + process died abnormally (on Unix) + +2002-05-14 08:42 andy + + * Modules/FindWish.cmake: Add better detection of wish 8.2 + +2002-05-12 11:32 barre + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: add + no_system_path option to FindProgram so that the PATH is ignored + +2002-05-12 11:31 barre + + * Source/: cmFindProgramCommand.cxx, cmFindProgramCommand.h: + ENH/FIX: add NO_SYSTEM_PATH option + fix command usage + +2002-05-12 11:31 barre + + * Source/cmFindLibraryCommand.h: FIX: command usage + +2002-05-11 22:28 perera + + * Source/cmTarget.cxx: FIX: Remove assert since it was breaking + IRIX builds. + +2002-05-10 14:06 millerjv + + * Source/cmTarget.cxx: FIX: Const reference to a set needs a + const_iterator. (.NET build error) + +2002-05-10 13:35 perera + + * Source/CMakeLists.txt, Source/cmTarget.cxx, Source/cmTarget.h, + Tests/Dependency/CMakeLists.txt, + Tests/Dependency/Eight/CMakeLists.txt, + Tests/Dependency/Eight/EightSrc.c, + Tests/Dependency/Exec2/CMakeLists.txt, + Tests/Dependency/Exec2/ExecMain.c, + Tests/Dependency/Exec3/CMakeLists.txt, + Tests/Dependency/Exec3/ExecMain.c, + Tests/Dependency/Exec4/CMakeLists.txt, + Tests/Dependency/Exec4/ExecMain.c, + Tests/Dependency/Seven/CMakeLists.txt, + Tests/Dependency/Seven/SevenSrc.c, Tests/LinkLine/CMakeLists.txt, + Tests/LinkLine/Exec.c, Tests/LinkLine/One.c, + Tests/LinkLine/Two.c: BUG: Correct some of the dependency + analysis code. - Make sure the original link line is untouched - + Avoid duplicating the link line when supporting version < 1.4 - + Make sure the cyclic dependencies and such are output correctly + in complicated cases. - Avoid outputing dependencies that are + already satisfied on the original link line when possible. + +2002-05-10 08:54 king + + * Source/cmSystemTools.cxx: ERR: Added variable initializer. + +2002-05-09 09:33 hoffman + + * Source/: cmDSWWriter.cxx, cmMSDotNETGenerator.cxx, cmTarget.cxx, + cmTarget.h, cmUnixMakefileGenerator.cxx: ENH: change set + to set to avoid long symbols that crash ar on + solaris + +2002-05-08 17:45 king + + * Tests/Wrapping/: CMakeLists.txt, itkWrapperConfig.cxx: ENH: Added + coverage test for ITK_WRAP_TCL. Doesn't actually invoke CABLE. + +2002-05-08 17:45 king + + * Source/cmITKWrapTclCommand.cxx: ENH: Added dependency hack to + support wrapping test. + +2002-05-08 17:37 king + + * Source/cmITKWrapTclCommand.cxx: BUG: Need to use + CMAKE_CXX_COMPILER, not CXX, to get the C++ compiler name. + +2002-05-08 13:11 king + + * Source/: cmCommands.cxx, cmITKWrapTclCommand.cxx, + cmITKWrapTclCommand.h: ENH: Added ITK Tcl wrapping command. + +2002-05-08 10:27 martink + + * Source/Makefile.borland: ENH: add clean command + +2002-05-08 09:43 hoffman + + * Source/MFCDialog/CMakeCommandLineInfo.cpp: ENH: take cmake style + command line options so edit_cache works + +2002-05-08 09:05 hoffman + + * Source/cmake.cxx: ENH: fix cmake to work without ccommand. + +2002-05-08 08:46 hoffman + + * Source/cmBorlandMakefileGenerator.cxx: BUG: short path does not + work on bcc32 + +2002-05-07 11:03 hoffman + + * Source/CursesDialog/ccmake.cxx: ENH: add -B option to specify the + build directory, so make edit_cache will work + +2002-05-07 09:11 hoffman + + * Source/cmUnixMakefileGenerator.cxx: WNG: remove a warning + +2002-05-07 09:03 hoffman + + * CMake.rtf: ENH: update with docs about the targets + +2002-05-07 09:02 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx, cmUnixMakefileGenerator.cxx, + cmake.cxx: ENH: add an edit_cache target that runs ccmake or + CMakeSetup + +2002-05-03 18:10 hoffman + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: fix borland test + +2002-05-03 16:34 hoffman + + * Source/: cmMakefile.cxx, cmTarget.cxx, cmTarget.h: ENH: rework + library depend stuff + +2002-05-03 00:27 perera + + * Source/CMakeLists.txt, Source/cmTarget.cxx, Source/cmTarget.h, + Tests/Dependency/CMakeLists.txt: - bug fix where paths weren't + being output when LIB_OUT_PATH *isn't* used - test case for above + mentioned bug - more comments. Comments are good. + +2002-05-02 19:09 hoffman + + * Source/cmTarget.cxx: check for optimized or debug library adds + +2002-05-02 16:13 hoffman + + * Source/: cmTarget.cxx, cmTarget.h: remove canonical conversion + for lib names + +2002-05-02 15:56 hoffman + + * Source/: cmMakefile.cxx, cmMakefile.h, cmTarget.cxx: make it + backwards compatible with old cmake + +2002-05-02 15:10 hoffman + + * Source/CMakeLists.txt, Source/cmMakefile.cxx, + Source/cmTarget.cxx, Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: Debug + optimized cache fixes + +2002-05-02 13:41 perera + + * Source/: cmTarget.cxx, cmTarget.h: BUG: The library paths should + stay with the libraries during dependency analysis. + +2002-05-02 13:17 hoffman + + * Source/cmAddLibraryCommand.cxx, Source/cmAddLibraryCommand.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmTargetLinkLibrariesCommand.cxx, + Source/cmUnixMakefileGenerator.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/Dependency/Exec/CMakeLists.txt, + Tests/Dependency/Six/CMakeLists.txt: ENH: change LINK_LIBRARY to + add to targets + +2002-05-02 08:54 andy + + * configure, configure.in: Revert to make it work again + +2002-05-02 08:46 andy + + * configure, configure.in: Improve bootstrap on UNIX. Now it + bootstraps into a separate directory. + +2002-05-02 02:27 perera + + * Source/cmTarget.cxx: BUG: if a_LIBS_DEPENDS exists but is empty, + there are no explicit dependencies. + +2002-05-01 22:03 millerjv + + * Source/MFCDialog/PropertyList.cpp: FIX: If current selection was + "NOTFOUND", then selecting the browser would crash since a + "/" could not be found in the current selection. + +2002-05-01 16:33 perera + + * Source/cmAddLibraryCommand.cxx, Source/cmAddLibraryCommand.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmTarget.cxx, + Tests/Dependency/CMakeLists.txt: ENH: Make the LinkLibraries + command contribute dependencies towards AddLibraries. + +2002-05-01 16:24 perera + + * Tests/Dependency/: CMakeLists.txt, Exec/CMakeLists.txt, + Exec/ExecMain.c, Six/CMakeLists.txt, Six/SixASrc.c, + Six/SixBSrc.c: ENH: Make the LinkLibraries command contribute + dependencies towards AddLibraries. + +2002-05-01 14:00 perera + + * Source/CMakeLists.txt, Source/cmDSPWriter.cxx, + Source/cmDSWWriter.cxx, Source/cmMSDotNETGenerator.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmNMakeMakefileGenerator.cxx, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmUnixMakefileGenerator.cxx, + Tests/Dependency/CMakeLists.txt, + Tests/Dependency/Exec/CMakeLists.txt, + Tests/Dependency/Exec/ExecMain.c, + Tests/Dependency/Five/CMakeLists.txt, + Tests/Dependency/Five/FiveSrc.c, + Tests/Dependency/Four/CMakeLists.txt, + Tests/Dependency/Four/FourSrc.c, + Tests/Dependency/NoDepA/CMakeLists.txt, + Tests/Dependency/NoDepA/NoDepASrc.c, + Tests/Dependency/NoDepB/CMakeLists.txt, + Tests/Dependency/NoDepB/NoDepBSrc.c, + Tests/Dependency/NoDepC/CMakeLists.txt, + Tests/Dependency/NoDepC/NoDepCSrc.c, + Tests/Dependency/Three/CMakeLists.txt, + Tests/Dependency/Three/ThreeSrc.c, + Tests/Dependency/Two/CMakeLists.txt, + Tests/Dependency/Two/TwoSrc.c: ENH: Add library dependency + analysis. + +2002-05-01 11:34 berk + + * Source/CursesDialog/: ccmake.cxx, + cmCursesCacheEntryComposite.cxx, cmCursesCacheEntryComposite.h, + cmCursesMainForm.cxx, cmCursesMainForm.h: The entry widgets are + now created with what is initially available on the terminal. + +2002-05-01 10:12 berk + + * Source/: cmIncludeCommand.cxx, cmMakefile.cxx: Reformatted the + error printed by cmMakefile. + +2002-04-30 21:48 hoffman + + * Source/CMakeLists.txt: ENH: allow cmake tests to be run without + dart. + +2002-04-30 17:49 hoffman + + * CMakeLists.txt, Source/CMakeLists.txt: create tests without Dart + +2002-04-30 17:45 hoffman + + * Source/cmVTKMakeInstantiatorCommand.cxx: ENH: replace freeze with + delete + +2002-04-30 16:58 hoffman + + * Templates/: cconfigure, cconfigure.in: ENH: remove -fPIC for AIX + gnu + +2002-04-30 15:33 hoffman + + * Source/cmMSDotNETGenerator.cxx: ENH: fix relwithdebinfo + +2002-04-30 14:01 hoffman + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: add test for + SEPARATE_ARGUMENTS + +2002-04-30 14:00 hoffman + + * Source/: cmCommands.cxx, cmSeparateArgumentsCommand.cxx, + cmSeparateArgumentsCommand.h: ENH: add new command to separate + space separated arguments + +2002-04-30 14:00 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, cmCacheManager.cxx: ENH: + do not use count, find for map lookup + +2002-04-30 12:58 hoffman + + * Source/cmMakefile.cxx: ENH: improve speed of GetSource function + +2002-04-30 08:09 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: look for -l anywhere in + link library entry not just the begining of the line + +2002-04-29 10:23 hoffman + + * Source/cmMakefile.cxx: BUG: make sure link directories are not + duplicated + +2002-04-29 09:20 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: remove warning about + changing generators + +2002-04-29 08:27 hoffman + + * Templates/: cconfigure, cconfigure.in: use multiple rpath options + for sgi + +2002-04-28 16:14 perera + + * Source/: cmLinkLibrariesCommand.cxx, + cmTargetLinkLibrariesCommand.cxx: ENH: Make it unnecessary to + ever specify LINK_DIRECTORIES for any library generated in this + project, even when LIBRARY_OUTPUT_PATH is set. + +2002-04-26 21:45 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: remove redirections for + output of make commands as some things are lost + +2002-04-26 12:43 hoffman + + * Source/cmUnixMakefileGenerator.cxx: COM: just fix up a comment + +2002-04-26 12:42 hoffman + + * Templates/CCMakeSystemConfig.cmake.in: correct c flags for shared + links + +2002-04-26 12:21 hoffman + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CCMakeSystemConfig.cmake.in, + Templates/CMakeSystemConfig.cmake.in: BUG: fix shared links for + cc on hp + +2002-04-26 09:55 hoffman + + * Source/cmBuildNameCommand.cxx: ENH: fix build name + +2002-04-26 09:35 hoffman + + * Source/cmSiteNameCommand.cxx: ENH: look for nslookup and hostname + in the right places + +2002-04-26 09:22 will + + * CMake.pdf: ENH:New pdf for CMake + +2002-04-26 09:17 martink + + * CMake.rtf: updated for 1.4 + +2002-04-26 09:11 martink + + * Source/cmSourceFilesRemoveCommand.cxx: dprecated + +2002-04-26 08:59 martink + + * Source/Makefile.borland: fixed up again duh + +2002-04-25 16:29 martink + + * Source/Makefile.borland: updated to build ccommand + +2002-04-25 15:40 hoffman + + * Modules/Dart.cmake, Source/cmSiteNameCommand.cxx: fix up hostname + for windows + +2002-04-25 13:11 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: give a warning when + switching generators to match the cache + +2002-04-25 13:09 hoffman + + * Source/cmake.cxx: ENH: check for mismatched generators + +2002-04-25 07:59 hoffman + + * Source/: ccommand.cxx, cmCMakeMinimumRequired.cxx, + cmOptionCommand.cxx: WAR: remove warnings for .NET compiler + +2002-04-24 10:08 andy + + * Source/: .cvsignore, MFCDialog/.cvsignore: Add cvsignore so that + you do not see visual stufio files when you do cvs update + +2002-04-23 16:16 berk + + * Source/: cmake.cxx, CursesDialog/ccmake.cxx, + CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h: Exit ccmake on fatal errors. + +2002-04-23 12:18 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: clean up depend output + +2002-04-23 11:33 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: add depends for utility + targets + +2002-04-22 15:16 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake, + Templates/CMakeWindowsSystemConfig.cmake, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.cxx: ENH: make CMake less + verbose/precious + +2002-04-22 15:05 perera + + * Source/CursesDialog/: CMakeLists.txt, form/CMakeLists.txt: BUG: + Changed from SOURCE_FILES to SET + +2002-04-22 14:29 barre + + * Source/cmNMakeMakefileGenerator.cxx: ENH: need CMAKE_LINKER_FLAGS + +2002-04-22 14:22 barre + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: ENH: make CMake less verbose/precious + +2002-04-22 14:18 martink + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: duhZ + +2002-04-22 11:51 martink + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/CMakeLists.txt, + Complex/Executable/cmVersion.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/cmVersion.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/cmVersion.h.in, + ComplexRelativePaths/Executable/complex.cxx: fixed for remove + COMMAND + +2002-04-22 11:50 martink + + * Source/: CMakeLists.txt, cmCommands.cxx, cmRemoveCommand.cxx, + cmRemoveCommand.h: updated for 1.4 + +2002-04-22 11:49 martink + + * Source/MFCDialog/CMakeLists.txt: updated + +2002-04-19 15:28 hoffman + + * Source/cmTargetLinkLibrariesCommand.cxx, + Tests/Simple/CMakeLists.txt, Tests/Simple/simple.cxx, + Tests/Simple/simpleLib.cxx: BUG: add link directories for target + link libraries and add a test for it + +2002-04-19 14:03 martink + + * Source/: cmAbstractFilesCommand.cxx, cmSourceFilesCommand.cxx, + cmWrapExcludeFilesCommand.cxx: added deprecated warnings for + version 1.4 or later + +2002-04-19 13:05 hoffman + + * Source/cmCMakeMinimumRequired.h: ENH: fix doc line + +2002-04-19 12:49 martink + + * Source/cmNMakeMakefileGenerator.cxx: renamed unix to unixPath for + compile error + +2002-04-19 11:49 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: BUG: fix short path on files + that do not exist + +2002-04-19 09:00 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: try to make sure a + depend file only has one rule + +2002-04-19 08:27 hoffman + + * Source/: cmSystemTools.cxx, cmake.cxx: BUG: fix SameFile function + for windows, and compare source directories + +2002-04-18 16:13 martink + + * Source/cmUnixMakefileGenerator.cxx: BUG: work with spaces in the + path + +2002-04-18 15:58 andy + + * Source/cmUnixMakefileGenerator.cxx: Make quotes and echos to work + on unix (hopefully) + +2002-04-18 15:58 andy + + * Modules/FindMPI.cmake: Add mpi search paths for Debian + +2002-04-18 14:51 hoffman + + * Source/cmake.cxx: ENH: use home not start + +2002-04-18 14:19 hoffman + + * Source/cmake.cxx: ENH: check for mis-matched source directories + +2002-04-18 13:44 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: quote the echo commands + +2002-04-18 13:12 hoffman + + * Source/cmSystemTools.cxx: BUG: do escaped semi-colon better + +2002-04-18 12:02 hoffman + + * Source/cmMessageCommand.cxx, Source/cmSystemTools.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: add ability to + escape semi-colons + +2002-04-18 11:52 martink + + * configure, configure.in: ENH: handle spaces in paths for cygwin + bootstrap + +2002-04-18 07:58 hoffman + + * Source/cmCMakeMinimumRequired.cxx: BUG: add missing include + +2002-04-18 07:57 hoffman + + * Source/: CMakeLib.dsp, Makefile.borland: BUG: fix bootstrap build + makefiles + +2002-04-17 16:16 hoffman + + * Source/cmAbstractFilesCommand.cxx, + Source/cmAddCustomCommandCommand.cxx, + Source/cmCMakeMinimumRequired.cxx, + Source/cmCMakeMinimumRequired.h, Source/cmCommands.cxx, + Source/cmOptionCommand.cxx, Tests/Complex/CMakeLists.txt, + Tests/Complex/cmTestConfigure.h.in, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/CMakeLists.txt, + Tests/ComplexRelativePaths/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: backwards + compatible for VTK 4.0, add cmake version requires + +2002-04-17 14:58 king + + * Tests/Wrapping/CMakeLists.txt: ENH: Removed tests for commands + that no longer exist. + +2002-04-17 14:54 king + + * Source/: CMakeLists.txt, Makefile.in, cmCableClassSet.cxx, + cmCableClassSet.h, cmCableClassSetCommand.cxx, + cmCableClassSetCommand.h, cmCableWrapTclCommand.cxx, + cmCableWrapTclCommand.h, cmCommands.cxx, + cmConfigureGccXmlCommand.cxx, cmConfigureGccXmlCommand.h, + cmMakefile.cxx: ENH: Removed out-of-date commands CABLE_WRAP_TCL + CABLE_CLASS_SET and CONFIGURE_GCCXML + +2002-04-17 14:52 king + + * Modules/FindCABLE.cmake: ENH: Updated for latest Cable from CVS. + Old alpha version of Cable is no longer supported. + +2002-04-17 14:51 king + + * Modules/FindGCCXML.cmake: ENH: Updated for version 0.2 of + GCC-XML. + +2002-04-17 14:39 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: use convert to output + path for depend files + +2002-04-17 08:28 hoffman + + * Modules/FindOpenGL.cmake: better to find mac opengl + +2002-04-17 08:15 hoffman + + * Templates/: CCMakeSystemConfig.cmake.in, + CXXCMakeSystemConfig.cmake.in: more advanced values + +2002-04-17 08:09 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: ENH: more coverage + +2002-04-16 13:48 barre + + * Source/cmSystemTools.cxx: Syntax seemed to be confusing according + to the Bill + +2002-04-16 09:28 barre + + * Source/ccommand.cxx: FIX: warning + +2002-04-15 09:09 hoffman + + * Source/cmSystemTools.cxx: use stream not sprintf + +2002-04-15 08:48 barre + + * Source/cmSystemTools.cxx: ENH: FilesDiffer checks for 0 byte + files + +2002-04-14 15:32 barre + + * Source/cmSystemTools.cxx: ENH: more paranoid checkings + +2002-04-12 13:28 barre + + * Source/MFCDialog/CMakeSetup.rc: ENH: make GUI slighlty larger to + accomodate long paths + +2002-04-12 12:05 barre + + * Source/cmSystemTools.cxx: FIX: iostream binary flag should be + used for cygwin too + +2002-04-12 09:57 barre + + * Source/cmSystemTools.cxx: FIX: fix UMR + +2002-04-11 18:59 barre + + * Source/ccommand.cxx: ENH: also displays command output + +2002-04-11 18:17 barre + + * Source/ccommand.cxx: can be used to time commands (time() & + clock()) + +2002-04-11 17:02 hoffman + + * Source/cmFindFileCommand.h, Source/cmFindLibraryCommand.h, + Source/cmFindPathCommand.h, Source/cmFindProgramCommand.h, + Source/cmIncludeCommand.cxx, Source/cmListFileCache.cxx, + Source/cmMakefile.cxx, Source/cmSystemTools.cxx, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/complex.cxx: ENH: speed + improvements + +2002-04-11 16:58 starreveld + + * Source/cmUnixMakefileGenerator.cxx: + + Allow modules to build properly again. (broken when Cxx testing + was added) + +2002-04-11 11:30 barre + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: increase + coverage + +2002-04-11 10:29 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: clean up utility rule generation + +2002-04-11 10:11 barre + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: use target as + source if source is empty + +2002-04-11 10:05 barre + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h: ENH: use target as source if source + is empty + +2002-04-11 09:53 barre + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: FIX: echo pb, make Nmake gen use + Unix gen, factorize stuff in Unix gen + +2002-04-10 17:33 barre + + * Tests/: Complex/Executable/complex.cxx, + Complex/Library/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: add a test to + check if more than one post-build command can be attached. it + fails right now. + +2002-04-10 16:45 andy + + * Source/cmUnixMakefileGenerator.cxx: Fix problem with custom + commands on unix + +2002-04-10 12:13 king + + * Source/cmaketest.cxx: ERR: UseIt() missing return type. + +2002-04-10 11:23 hoffman + + * Tests/: Complex/Library/testConly.c, + ComplexOneConfig/Library/testConly.c, + ComplexRelativePaths/Library/testConly.c: ENH: only check flag on + unix + +2002-04-10 08:38 hoffman + + * Source/cmaketest.cxx: fix warning + +2002-04-09 12:22 hoffman + + * Tests/: Complex/Library/testConly.h, + ComplexOneConfig/Library/testConly.h, + ComplexRelativePaths/Library/testConly.h, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: check for + compile flags and add back c flag to unix generator + +2002-04-09 12:15 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: check for compile flags + and add back c flag to unix generator + +2002-04-09 12:02 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + Complex/Library/testConly.c, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/testConly.c, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/testConly.c: ENH: check for compile + flags and add back c flag to unix generator + +2002-04-09 11:33 barre + + * DartConfig.cmake: ENH: quick stab at a rollup button + +2002-04-09 10:19 hoffman + + * Tests/: Complex/Library/testConly.c, Complex/Library/testConly.h, + ComplexOneConfig/Library/testConly.c, + ComplexOneConfig/Library/testConly.h, + ComplexRelativePaths/Library/testConly.c, + ComplexRelativePaths/Library/testConly.h: correct exports for + windows + +2002-04-09 09:37 hoffman + + * Tests/: Complex/Library/sharedFile.h, + ComplexOneConfig/Library/sharedFile.h, + ComplexRelativePaths/Library/sharedFile.h: c not c++ comment + +2002-04-09 08:55 hoffman + + * DartConfig.cmake: change EST to EDT + +2002-04-08 19:31 biddi + + * Source/cmSystemTools.cxx: ERR: ReplaceString didn't work properly + if replace was longer than with as length added to start pos on + next search was replaceLength instead of withLength + +2002-04-08 15:01 hoffman + + * Templates/: CXXCMakeSystemConfig.cmake.in, cconfigure, + cconfigure.in: [no log message] + +2002-04-08 13:36 hoffman + + * Source/cmExecProgramCommand.cxx, + Source/cmUnixMakefileGenerator.cxx, + Templates/CCMakeSystemConfig.cmake.in, + Templates/CXXCMakeSystemConfig.cmake.in, Templates/cconfigure, + Templates/cconfigure.in, Templates/cxxconfigure, + Templates/cxxconfigure.in, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/Complex/Library/testConly.c, + Tests/Complex/Library/testConly.h, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/testConly.c, + Tests/ComplexOneConfig/Library/testConly.h, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/testConly.c, + Tests/ComplexRelativePaths/Library/testConly.h: ENH: use separate + vars for creating c++ and c shared libraries and add a test for c + libraries + +2002-04-05 12:08 hoffman + + * Source/cmProjectCommand.cxx: expand ; args + +2002-04-05 10:51 martink + + * Modules/Dart.cmake: improved finding purify on windows to use + registry + +2002-04-05 09:39 hoffman + + * Source/: Makefile.borland, cmaketest.cxx, cmaketest.h.in: ENH: + make sure the test tests the right cmake, and not the cmake used + to bootstrap this cmake + +2002-04-05 07:22 hoffman + + * Tests/TestDriver/testArgs.h: ENH: add missing file + +2002-04-04 16:53 hoffman + + * Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Tests/TestDriver/CMakeLists.txt: + ENH: add the ability to process command line arguments in the + test driver before the test driver gets them + +2002-04-04 11:01 hoffman + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CXXCMakeSystemConfig.cmake.in, Templates/cxxconfigure, + Templates/cxxconfigure.in: ENH: separate the ar program for cxx + and c + +2002-04-04 10:08 hoffman + + * Templates/CMakeLists.txt: update install information + +2002-04-04 09:04 hoffman + + * Templates/: cxxconfigure, cxxconfigure.in: BUG: add system + command back into script + +2002-04-03 16:14 hoffman + + * Source/cmExecProgramCommand.cxx, Source/cmExecProgramCommand.h, + Source/cmNMakeMakefileGenerator.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmaketest.cxx, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: fix more space + problems, you can add args to the ExecProgram command separatly + now + +2002-04-03 13:53 andy + + * Modules/FindTCL.cmake: More places to find TCL/TK for example on + Debian + +2002-04-02 15:42 hoffman + + * CMake.rtf, Example/Demo/CMakeLists.txt, + Example/Hello/CMakeLists.txt, Source/CMakeLists.txt, + Source/cmBorlandMakefileGenerator.cxx, + Source/cmBorlandMakefileGenerator.h, Source/cmDSWWriter.cxx, + Source/cmMSDotNETGenerator.cxx, Source/cmMSDotNETGenerator.h, + Source/cmMSProjectGenerator.cxx, Source/cmMSProjectGenerator.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmMakefileGenerator.cxx, Source/cmMakefileGenerator.h, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.h, Source/cmProjectCommand.cxx, + Source/cmProjectCommand.h, Source/cmSetCommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.h, Source/cmTarget.cxx, + Source/cmTarget.h, Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, Source/cmake.cxx, + Templates/cconfigure, Templates/cconfigure.in, + Templates/cxxconfigure, Templates/cxxconfigure.in, + Tests/COnly/CMakeLists.txt, Tests/COnly/conly.c, + Templates/configure, Templates/configure.in, + Templates/CCMakeSystemConfig.cmake.in, + Templates/CXXCMakeSystemConfig.cmake.in: ENH: add enable language + support for PROJECT command, this means that a C only project can + be built with cmake, even without a cxx compiler + +2002-04-01 14:58 barre + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: add test for + registry-related functions (win32) + +2002-04-01 14:50 hoffman + + * Source/cmSystemTools.cxx: ENH: fix for regkey and ; separation + +2002-04-01 13:34 barre + + * Source/: ccommand.cxx, cmSystemTools.cxx, cmSystemTools.h: ENH: + add functions to API (read, write, delete registry key value) + +2002-04-01 08:08 andy + + * Modules/FindVTK.cmake: More finds for VTK + +2002-03-31 11:43 andy + + * Modules/FindVTK.cmake: Add some more locations of VTK + +2002-03-30 17:17 barre + + * Source/: cmAbstractFilesCommand.cxx, cmSetCommand.cxx: FIX: get + rid of warnings + +2002-03-29 18:07 ibanez + + * Modules/FindFLTK.cmake: ENH: HAS_FLTK variable added. + FLTK_WRAP_UI command made INTERNAL. + +2002-03-29 16:25 barre + + * Source/cmCreateTestSourceList.cxx: FIX: should compare to 0, not + NULL + +2002-03-29 16:03 barre + + * Source/: ctest.cxx, ctest.h: ENH: if -R or -E was used, displays + also the name of the tests that passed. + +2002-03-29 15:41 barre + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: FIX: fix dummy lib name for + Unix + +2002-03-29 15:02 barre + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + Complex/Executable/CMakeLists.txt, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + Complex/Library/cmTestLibraryConfigure.h.in, + Complex/Library/dummy, Complex/Library/empty.h, + Complex/Library/file2.cxx, Complex/Library/file2.h, + ComplexOneConfig/Library/cmTestLibraryConfigure.h.in, + ComplexOneConfig/Library/dummy, ComplexOneConfig/Library/empty.h, + ComplexOneConfig/Library/file2.cxx, + ComplexOneConfig/Library/file2.h, + ComplexRelativePaths/Library/cmTestLibraryConfigure.h.in, + ComplexRelativePaths/Library/dummy, + ComplexRelativePaths/Library/empty.h, + ComplexRelativePaths/Library/file2.cxx, + ComplexRelativePaths/Library/file2.h, + Complex/Library/fileFlags.cxx, + ComplexOneConfig/Library/fileFlags.cxx, + ComplexRelativePaths/Library/fileFlags.cxx: ENH: fix tests + +2002-03-29 14:31 hoffman + + * Source/cmMSDotNETGenerator.cxx: output list bug + +2002-03-29 14:22 hoffman + + * Tests/: Complex/Library/cmTestLibraryConfigure.h.in, + ComplexOneConfig/Library/cmTestLibraryConfigure.h.in, + ComplexRelativePaths/Library/cmTestLibraryConfigure.h.in: [no log + message] + +2002-03-29 14:20 hoffman + + * Source/cmAbstractFilesCommand.cxx, + Source/cmAddCustomCommandCommand.cxx, + Source/cmAddCustomTargetCommand.cxx, + Source/cmAddDefinitionsCommand.cxx, + Source/cmAddDependenciesCommand.cxx, Source/cmAddTestCommand.cxx, + Source/cmCableClassSetCommand.cxx, + Source/cmCableWrapTclCommand.cxx, Source/cmCommands.cxx, + Source/cmCreateTestSourceList.cxx, + Source/cmFLTKWrapUICommand.cxx, Source/cmFindFileCommand.cxx, + Source/cmFindLibraryCommand.cxx, Source/cmFindPathCommand.cxx, + Source/cmFindProgramCommand.cxx, + Source/cmGetSourceFilePropertyCommand.cxx, + Source/cmGetSourceFilePropertyCommand.h, + Source/cmIncludeDirectoryCommand.cxx, + Source/cmInstallFilesCommand.cxx, + Source/cmInstallProgramsCommand.cxx, + Source/cmInstallTargetsCommand.cxx, + Source/cmLinkDirectoriesCommand.cxx, + Source/cmLoadCacheCommand.cxx, Source/cmMakeDirectoryCommand.cxx, + Source/cmMarkAsAdvancedCommand.cxx, + Source/cmOutputRequiredFilesCommand.cxx, + Source/cmProjectCommand.cxx, Source/cmQTWrapCPPCommand.cxx, + Source/cmQTWrapUICommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.cxx, + Source/cmSetSourceFilesPropertiesCommand.h, + Source/cmSiteNameCommand.cxx, Source/cmSourceFilesCommand.cxx, + Source/cmSourceFilesFlagsCommand.cxx, + Source/cmSourceFilesFlagsCommand.h, + Source/cmSourceFilesRemoveCommand.cxx, + Source/cmSubdirCommand.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmUseMangledMesaCommand.cxx, + Source/cmUseMangledMesaCommand.h, + Source/cmUtilitySourceCommand.cxx, + Source/cmVTKMakeInstantiatorCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, + Source/cmVariableRequiresCommand.cxx, + Source/cmWrapExcludeFilesCommand.cxx, + Tests/Complex/Executable/CMakeLists.txt, + Tests/Complex/Executable/complex.cxx, + Tests/ComplexOneConfig/Executable/CMakeLists.txt, + Tests/ComplexOneConfig/Executable/complex.cxx, + Tests/ComplexRelativePaths/Executable/CMakeLists.txt, + Tests/ComplexRelativePaths/Executable/complex.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/Complex/Library/file2.cxx, Tests/Complex/Library/file2.h, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/file2.cxx, + Tests/ComplexOneConfig/Library/file2.h, + Tests/ComplexRelativePaths/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/file2.cxx, + Tests/ComplexRelativePaths/Library/file2.h: make sure ; expansion + is done in all commands + +2002-03-29 11:12 hoffman + + * Tests/TestDriver/: CMakeLists.txt, test1.cxx, testExtraStuff.cxx, + testExtraStuff2.cxx, testExtraStuff3.cxx: ENH: add test for set + to create source lists + +2002-03-29 11:11 hoffman + + * Source/cmAddExecutableCommand.cxx: fix const problem + +2002-03-29 11:04 hoffman + + * Source/: cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx, + cmSetCommand.cxx, cmSetCommand.h: ENH: add ability to use ; + separated lists in SET and expand them for addexecutable and + addlibrary + +2002-03-29 11:03 hoffman + + * Source/cmGetSourceFilePropertyCommand.h: fix docs + +2002-03-29 10:56 barre + + * Source/: cmMessageCommand.cxx, cmMessageCommand.h: ENH: Add + SEND_ERROR flag to MESSAGE so that an error can be raised within + a CMakeList file + +2002-03-29 10:07 hoffman + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: more tests + +2002-03-29 10:06 hoffman + + * Source/: cmAbstractFilesCommand.cxx, + cmBorlandMakefileGenerator.cxx, cmCommands.cxx, + cmCreateTestSourceList.cxx, cmDSPWriter.cxx, + cmFLTKWrapUICommand.cxx, cmGetSourceFilePropertyCommand.cxx, + cmGetSourceFilePropertyCommand.h, cmInstallFilesCommand.cxx, + cmMSDotNETGenerator.cxx, cmMakeDepend.cxx, cmMakefile.cxx, + cmMakefile.h, cmNMakeMakefileGenerator.cxx, + cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, + cmSetSourceFilesPropertiesCommand.cxx, + cmSetSourceFilesPropertiesCommand.h, cmSourceFile.cxx, + cmSourceFilesCommand.cxx, cmSourceFilesFlagsCommand.cxx, + cmTarget.cxx, cmTarget.h, cmUnixMakefileGenerator.cxx, + cmVTKMakeInstantiatorCommand.cxx, cmVTKWrapJavaCommand.cxx, + cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx, + cmWrapExcludeFilesCommand.cxx, cmaketest.cxx, cmaketest.h.in: + ENH: major change, the cmMakefile now contains a master list of + cmSourceFile objects, the source lists reference the list via + pointers, also you can now set properties on a file, like compile + flags, abstract, etc. + +2002-03-29 08:42 barre + + * Source/cmCreateTestSourceList.cxx: FIX: tolower is in + !, frenchy + +2002-03-28 11:43 barre + + * Source/cmCreateTestSourceList.cxx: ENH: perform case insensitive + comparison on test names + +2002-03-27 16:19 barre + + * Source/cmCreateTestSourceList.cxx: FIX: cmSourceFile::SetName was + not called correctly for the test source files + +2002-03-27 15:52 barre + + * Source/cmCreateTestSourceList.cxx: ENH: small formatting enh + +2002-03-27 13:54 barre + + * Tests/: Complex/VarTests.cmake, Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: ENH: add a more + stressing FOREACH test. + +2002-03-27 13:46 barre + + * Source/CMakeLists.txt, Tests/TestDriver/CMakeLists.txt, + Tests/TestDriver/test3.cxx, Tests/TestDriver/subdir/test3.cxx: + ENH: add testdriver test with source file in subdir + +2002-03-27 10:55 barre + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: FIX: do not use + CMAKE_CFG_INTDIR, just use LINK_DIRECTORIES + +2002-03-27 10:54 barre + + * Tests/: Testing/CMakeLists.txt, Wrapping/CMakeLists.txt: FIX: do + not need CMakeLib + +2002-03-26 18:06 barre + + * Source/cmCreateTestSourceList.cxx: ENH: keep the name of the test + as close to the source file (only the function name is cleaned + up) + +2002-03-26 17:53 barre + + * Source/cmCreateTestSourceList.cxx: ENH: add -R (similar to ctest + but use substr instead of regexp). indent. + +2002-03-26 16:45 barre + + * Source/: cmForEachCommand.h, cmFunctionBlocker.h, cmMakefile.cxx: + FIX: foreach function-blockers were using expanded args. Add + virtual func to specify if function blocker needs them expanded + or not. + +2002-03-26 16:44 barre + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: + ExpandListArguments(): empty elements in semi-colon-separated + string-list can now be ignored. + +2002-03-26 16:42 barre + + * Source/cmCreateTestSourceList.cxx: ENH: now supports tests inside + sub-dirs + +2002-03-26 14:42 barre + + * Tests/Wrapping/CMakeLists.txt: ENH: USE_MANGLED_MESA is more + careful now. Try to trick it again. + +2002-03-26 14:41 barre + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + Testing/CMakeLists.txt, Wrapping/CMakeLists.txt: ENH: Use + ${CMAKE_CFG_INTDIR} instead of hardcoded RelInfo, Debug, Release, + etc. + +2002-03-26 12:55 hoffman + + * Source/cmUseMangledMesaCommand.cxx: ENH: add error checking for + mmesa + +2002-03-26 12:38 hoffman + + * Source/: ccommand.cxx, cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx: ENH: use ccommand for del on + windows + +2002-03-26 12:38 hoffman + + * Source/cmaketest.cxx: ENH: show output when running tests + +2002-03-26 12:37 hoffman + + * Source/cmCreateTestSourceList.cxx: ENH: if no arguments are given + and there is only one test, then run it + +2002-03-25 17:03 martink + + * Source/cmake.cxx: removed quotes from cmake and ccommand + executable to be consistant + +2002-03-25 16:24 barre + + * Source/cmForEachCommand.cxx: ENH: support semi-colon format (list + of args as string) + +2002-03-25 15:59 barre + + * Source/: ccommand.cxx, cmSystemTools.cxx: ENH: cmCopyFile ; the + path to the destination file will be created ; second arg can be + a directory. + +2002-03-25 15:58 barre + + * Templates/: CMakeDotNetSystemConfig.cmake, + CMakeWindowsSystemConfig.cmake: Add suffixes + +2002-03-20 16:18 hoffman + + * Source/CMakeLists.txt, Source/cmCommands.cxx, + Source/cmCreateTestSourceList.cxx, + Source/cmCreateTestSourceList.h, Source/cmaketest.cxx, + Tests/TestDriver/CMakeLists.txt, Tests/TestDriver/test1.cxx, + Tests/TestDriver/test2.cxx, Tests/TestDriver/test3.cxx: ENH: add + new command to create a test driver + +2002-03-20 13:16 hoffman + + * CMakeLists.txt, Source/CMakeLists.txt, + Source/FLTKDialog/CMakeLists.txt, + Source/FLTKDialog/CMakeSetupGUI.fl, + Source/FLTKDialog/CMakeSetupGUIImplementation.cxx, + Source/FLTKDialog/CMakeSetupGUIImplementation.h, + Source/FLTKDialog/FLTKDialog.cxx, + Source/FLTKDialog/FLTKDialog.dsp, + Source/FLTKDialog/FLTKPropertyItemRow.cxx, + Source/FLTKDialog/FLTKPropertyItemRow.h, + Source/FLTKDialog/FLTKPropertyList.cxx, + Source/FLTKDialog/FLTKPropertyList.h, + Source/FLTKDialog/Makefile.in: ENH: remove fltk dialog as it is + no longer supported + +2002-03-19 12:25 andy + + * Source/ccommand.cxx: Return error on copy + +2002-03-18 11:59 andy + + * Source/ccommand.cxx: Remove warning about sign and unsigned + +2002-03-15 15:42 andy + + * Source/: CMakeLists.txt, CMakeSetup.dsw, ccommand.cxx, + ccommand.dsp, cmake.cxx: Add ccommand for executing commands on + the system, so by using ADD_CUSTOM_COMMAND, you can make rules to + do some system commands during build. Currently supported + commands are copy and remove. Others will follow. + +2002-03-15 13:20 perera + + * Source/cmSourceFilesFlagsCommand.cxx: BUG: The source file may be + specified with an extension. + +2002-03-15 10:43 martink + + * Source/ctest.cxx: less noisy about changing directories + +2002-03-15 09:40 berk + + * Templates/CMakeSystemConfig.cmake.in: There can be multiple ansi + flags now + +2002-03-15 09:23 hoffman + + * Templates/configure: HP add Ae flag + +2002-03-15 09:14 berk + + * Templates/configure.in: Added better support for HPux + +2002-03-14 16:04 hoffman + + * Source/cmMakefile.cxx: ENH: add .in as a header file type, as it + can not be compiled + +2002-03-14 16:03 hoffman + + * Source/CMakeLists.txt: BUG: .h not two .cxx files + +2002-03-14 14:59 hoffman + + * Source/cmSystemTools.cxx: BUG: fix RunCommand again... back to + system, but with GetShortPath + +2002-03-14 14:59 hoffman + + * Source/cmDSPWriter.cxx: BUG: fix for paths with spaces + +2002-03-14 14:58 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h: BUG: fix for files with dashes in + them + +2002-03-14 11:11 hoffman + + * Source/: cmConfigureGccXmlCommand.cxx, cmExecProgramCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmaketest.cxx, ctest.cxx: + ENH: overhaul of RunCommand on windows, if only win32 had + popen... + +2002-03-13 15:29 hoffman + + * Source/MFCDialog/: CMakeSetup.cpp, CMakeSetupDialog.cpp, + PathDialog.cpp: Remove warnings + +2002-03-13 14:23 martink + + * Source/: cmDSPWriter.cxx, cmDSWWriter.cxx: ENH: closer to working + with spaces in the path + +2002-03-13 10:25 hoffman + + * Source/: CMakeLists.txt, cmAuxSourceDirectoryCommand.cxx, + cmCableClassSet.cxx, cmCableClassSet.h, cmDirectory.cxx, + cmDirectory.h, cmFLTKWrapUICommand.cxx, cmFindFileCommand.cxx, + cmFindLibraryCommand.cxx, cmFindPathCommand.cxx, + cmFindProgramCommand.cxx, cmMSDotNETGenerator.cxx, + cmMakefile.cxx, cmNMakeMakefileGenerator.cxx, + cmQTWrapCPPCommand.cxx, cmQTWrapUICommand.cxx, + cmRegularExpression.cxx, cmSourceGroup.cxx, cmSystemTools.cxx, + cmVTKMakeInstantiatorCommand.cxx, cmVTKWrapJavaCommand.cxx, + cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx, + cmaketest.cxx, ctest.cxx: ENH: remove several compiler warnings + +2002-03-12 10:16 king + + * Templates/: configure, configure.in: ENH: Added test for explicit + instantiation support. + +2002-03-11 16:04 hoffman + + * Source/cmOptionCommand.cxx: ENH: add error checking for option + commands with too many arguments + +2002-03-11 12:11 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h: ENH: add + support for .def files + +2002-03-11 08:11 hoffman + + * Source/cmMSDotNETGenerator.cxx: BUG: make sure libraries do not + depend on themselves + +2002-03-10 18:24 hoffman + + * Templates/: configure, configure.in: ENH: try to get crazy dec + cxx to work again... one more time + +2002-03-10 10:02 hoffman + + * Templates/: configure, configure.in: ENH: try to get crazy dec + cxx to work again... + +2002-03-08 13:12 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: more dec silly + stuff + +2002-03-08 11:01 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: more stupid dec cxx + tricks... + +2002-03-08 08:19 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: add one more + stupid function call for the dec cxx compiler... + +2002-03-08 07:25 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: try to fix dec cxx + +2002-03-07 22:07 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: add more junk + for the dec cxx compiler to force it to instantiate stuff + +2002-03-07 12:13 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: use the string + class to force the dec compiler to instantiate some templates + +2002-03-07 10:41 barre + + * Source/CMakeLists.txt: Build cmaketest even if testing if OFF (so + that it can be used externally) + +2002-03-06 17:58 barre + + * Source/: ctest.cxx, ctest.h: ENH: add -E option (exclude tests + matching a regexp) + +2002-03-06 16:30 barre + + * Source/: CMakeLists.txt, cmaketest.cxx: ENH: add cmaketest to + install targets (so that it can be used in other projects) and + pass the rest of its command-line args to cmake + +2002-03-06 10:44 hoffman + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: build type should + not be advanced + +2002-03-06 10:11 hoffman + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt: ENH: add test for + semi-colon separated lists of libraries + +2002-03-06 10:10 hoffman + + * Source/: cmLinkLibrariesCommand.cxx, cmMSDotNETGenerator.cxx, + cmSystemTools.cxx, cmSystemTools.h, + cmTargetLinkLibrariesCommand.cxx: ENH: add suport for semi-colon + separated list variables + +2002-03-05 18:41 hoffman + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomTargetCommand.cxx, cmAddDefinitionsCommand.cxx, + cmAddDependenciesCommand.cxx, cmAddExecutableCommand.cxx, + cmAddLibraryCommand.cxx, cmAddTestCommand.cxx, + cmBuildCommand.cxx, cmCableClassSetCommand.cxx, + cmCableWrapTclCommand.cxx, cmConfigureFileCommand.cxx, + cmElseCommand.cxx, cmEndIfCommand.cxx, cmExecProgramCommand.cxx, + cmFindFileCommand.cxx, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmGetFilenameComponentCommand.cxx, cmIfCommand.cxx, + cmIncludeCommand.cxx, cmIncludeExternalMSProjectCommand.cxx, + cmInstallFilesCommand.cxx, cmInstallProgramsCommand.cxx, + cmLoadCacheCommand.cxx, cmMakeDirectoryCommand.cxx, + cmMakefile.cxx, cmMessageCommand.cxx, cmOptionCommand.cxx, + cmOutputRequiredFilesCommand.cxx, cmSetCommand.cxx, + cmSourceFilesCommand.cxx, cmSubdirCommand.cxx, cmSystemTools.cxx, + cmUnixMakefileGenerator.cxx, cmUseMangledMesaCommand.cxx, + cmVTKMakeInstantiatorCommand.cxx: ENH: expand variables in + arguments before the commands get them + +2002-03-05 18:25 hoffman + + * Source/cmSystemTools.cxx: BUG: get the correct return value from + pclose + +2002-03-04 15:00 hoffman + + * Tests/: Complex/Library/fileFlags.cxx, + ComplexOneConfig/Library/fileFlags.cxx, + ComplexRelativePaths/Library/fileFlags.cxx: ENH: add support for + per file flags + +2002-03-04 14:12 hoffman + + * Source/: cmCommands.cxx, cmDSPWriter.cxx, cmDSPWriter.h, + cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, cmSourceFile.h, + cmSourceGroup.cxx, cmSourceGroup.h, cmUnixMakefileGenerator.cxx, + cmSourceFilesFlagsCommand.cxx, cmSourceFilesFlagsCommand.h: ENH: + add file specific compile flags + +2002-03-04 14:11 hoffman + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: add a test for + per file flags + +2002-03-01 15:49 king + + * Source/: cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h: ENH: Added support for including + extra files in generated header to get access to export macros of + derived projects. + +2002-03-01 09:00 hoffman + + * Templates/: CMakeBorlandWindowsSystemConfig.cmake, + CMakeDotNetSystemConfig.cmake, + CMakeNMakeWindowsSystemConfig.cmake, CMakeSystemConfig.cmake.in, + CMakeWindowsSystemConfig.cmake, configure, configure.in: ENH: add + some OS/compiler variables + +2002-02-28 15:58 hoffman + + * Modules/Dart.cmake: ENH: add VERBOSE_BUILD to options + +2002-02-28 15:57 hoffman + + * Source/cmakewizard.cxx: check bool values and prefere off + +2002-02-28 15:42 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h: use xml + output quotes for paths + +2002-02-28 15:06 hoffman + + * Templates/: configure, configure.in: change hp checks to all hps + and not just version 10 + +2002-02-28 11:15 hoffman + + * Source/cmSystemTools.cxx: BUG: look for exe path as well. + +2002-02-28 10:41 hoffman + + * Source/cmSystemTools.cxx: ENH: look for .com files before .exe + +2002-02-28 08:45 hoffman + + * Templates/CMakeDotNetSystemConfig.cmake: find path to devenv + +2002-02-28 07:50 hoffman + + * Templates/CMakeDotNetSystemConfig.cmake: ENH: add build name to + the cache with a default value for dot net + +2002-02-27 18:11 hoffman + + * Source/cmMSDotNETGenerator.cxx, Source/cmSystemTools.cxx, + Templates/CMakeDotNetSystemConfig.cmake: clean up in dot net + +2002-02-26 15:15 hoffman + + * Source/: ctest.cxx, ctest.h: add command line option -D for + config directory to run + +2002-02-26 15:14 hoffman + + * Source/: cmDSWWriter.cxx, cmMSDotNETGenerator.cxx: ENH: add + RUN_TESTS + +2002-02-26 11:46 barre + + * Source/cmAddTestCommand.cxx: FIX: command now expands args during + the first pass (found through FOREACH example) + +2002-02-26 10:11 hoffman + + * Templates/CMakeDotNetSystemConfig.cmake: [no log message] + +2002-02-26 08:56 hoffman + + * Source/cmCableClassSet.cxx: BUG: fix type problem size_type is + unsigned + +2002-02-25 18:14 hoffman + + * Source/: cmBuildCommand.cxx, cmDirectory.h, + cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, + cmRegularExpression.h, cmSystemTools.cxx: ENH: dot net almost + working + +2002-02-25 16:57 barre + + * Source/cmAddExecutableCommand.cxx: FIX: command now expands *all* + args (found through FOREACH example) + +2002-02-25 15:22 barre + + * Tests/Testing/: CMakeLists.txt, Sub/CMakeLists.txt, + Sub/Sub2/CMakeLists.txt, Sub/Sub2/testing2.cxx: ENH: provide a + test for today's ReadListFile() bug fix + +2002-02-25 15:06 barre + + * Source/cmMakefile.cxx: FIX: although a CMakeLists.txt file could + be searched up 'n' level in the directory tree, ReadListFile() + always implied a CMakeLists.txt file was up *one* level. + +2002-02-25 13:20 hoffman + + * Modules/FindDart.cmake: ENH: look for Dart in c: + +2002-02-25 12:47 hoffman + + * Source/MFCDialog/PathDialog.h: ENH: fix warning + +2002-02-25 11:58 barre + + * Source/cmSubdirCommand.cxx: ENH: Expand vars in SUBDIRS + +2002-02-25 10:47 hoffman + + * Source/cmSystemTools.cxx: BUG: fix remove of cygdrive path stuff + +2002-02-23 10:00 king + + * Source/cmSystemTools.cxx: ERR: std::ios::binary is only needed + for Windows platforms, and isn't supported for all UNIX + platforms. + +2002-02-22 15:40 hoffman + + * Source/: cmAddTestCommand.cxx, cmSystemTools.cxx, + cmUnixMakefileGenerator.cxx: ENH: fix for spaces in paths on unix + +2002-02-22 13:38 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, cmDSPWriter.cxx, + cmExecProgramCommand.cxx, cmMSDotNETGenerator.cxx, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmSystemTools.cxx, cmSystemTools.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmaketest.cxx: ENH: big change in the + path handling, one function CreateOutputPath is used to escape + spaces and convert to the native path type + +2002-02-22 10:08 king + + * Source/cmSystemTools.cxx: ENH: Another attempt at getting + cmCopyFile to work correctly. The previous implementation was + correct, but didn't work on HPUX due to stream library bugs. + This implementation will hopefully work everywhere. + +2002-02-21 17:32 hoffman + + * Source/cmSystemTools.cxx: BUG: fix copy file for HP + +2002-02-21 16:06 barre + + * Source/: ctest.cxx, ctest.h: ENH: Since each test can send a lot + of text to stderr/stdout, ctest now displays the list of tests + that failed at the end of the process. + +2002-02-21 15:55 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmBorlandMakefileGenerator.h, cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: ENH: add + a virtual CreateMakeVariable to shorten makefile variables for + borland make + +2002-02-21 08:53 berk + + * Source/cmake.dsp: Argh + +2002-02-21 08:43 hoffman + + * Source/cmaketest.cxx: add ifdef for windows function + +2002-02-20 15:27 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: dot net port + +2002-02-20 15:26 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmaketest.cxx: close to dot net + working + +2002-02-20 09:16 berk + + * Source/cmake.dsp: Bill forgot to add a library to the release + target. + +2002-02-19 17:56 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h: ENH: + getting closer + +2002-02-19 11:53 hoffman + + * Source/: Makefile.borland, CMakeLists.txt: ENH: add dotnet stuff + +2002-02-19 10:23 ibanez + + * Source/FLTKDialog/FLTKDialog.cxx: FIX: FLTK includes should use + ".H" instead of ".h" + +2002-02-19 09:43 hoffman + + * Source/MFCDialog/CMakeSetup.rc: fix spacing on text + +2002-02-19 09:43 hoffman + + * Source/: CMakeLib.dsp, CMakeLists.txt: add dot net stuff to + cmakelists file and dsp file + +2002-02-18 17:41 hoffman + + * Source/: cmMSDotNETGenerator.cxx, cmMSDotNETGenerator.h, + cmSLNWriter.cxx, cmSLNWriter.h, cmVCProjWriter.cxx, + cmVCProjWriter.h: getting closer but still not working dot net + support + +2002-02-18 14:50 hoffman + + * Source/MFCDialog/CMakeSetup.dsp: [no log message] + +2002-02-18 14:36 hoffman + + * Source/: CMakeLib.dsp, cmMSDotNETGenerator.cxx, + cmMSDotNETGenerator.h, cmSLNWriter.cxx, cmSLNWriter.h, + cmSystemTools.cxx, cmVCProjWriter.cxx, cmVCProjWriter.h, + cmake.cxx, cmake.dsp: ENH: first pass at dot net support + +2002-02-18 14:09 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: ENH: fix for borland tlib files with + dash in them problem. + +2002-02-14 10:03 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: only depend subdir builds on TARGETS, not all sub dir + operations, we do not want to build when doing a make depend + +2002-02-14 10:01 hoffman + + * configure, configure.in, Templates/configure, + Templates/configure.in: ENH: do not use O2 g as default flags + +2002-02-14 09:31 barre + + * DartConfig.cmake: ENH: Add PROJECT_URL + +2002-02-13 18:57 barre + + * DartConfig.cmake: ENH: Doxygen page + +2002-02-13 18:50 barre + + * Utilities/Doxygen/doc_makeall.sh.in: FIX: remove that good ol' + exit 0; + +2002-02-13 18:32 barre + + * Utilities/Doxygen/doc_makeall.sh.in: FIX: update html archive + filename + +2002-02-13 18:28 barre + + * Utilities/Doxygen/: CMakeLists.txt, authors.txt, + doc_makeall.sh.in, doxyfile.in: ENH: Contribution graphs + +2002-02-13 16:17 barre + + * Source/CursesDialog/form/.NoDartCoverage: This dir should not be + covered (form distrib) + +2002-02-12 17:38 barre + + * Tests/Wrapping/: CMakeLists.txt, dummy: ENH: Trick VTK_WRAP_JAVA + in a better way (avoid CUSTOM_TARGET) + +2002-02-11 09:20 hoffman + + * Source/MFCDialog/: CMakeSetup.rc, PropertyList.cpp, + PropertyList.h, resource.h: ENH: add IGNORE option for cache + values + +2002-02-08 15:52 hoffman + + * Source/cmSystemTools.cxx: BUG: fix CollapseFullPath so a trailing + slash is not added to directories + +2002-02-07 11:39 andy + + * Templates/CMakeSystemConfig.cmake.in: ERR: Cache bigendian + +2002-02-07 11:28 martink + + * Source/cmMakefile.h: next patch + +2002-02-07 11:27 martink + + * Templates/CMakeSystemConfig.cmake.in: value needed to be cached + +2002-02-06 12:14 hoffman + + * Source/cmake.cxx: ENH: add ends at end of string + +2002-02-06 10:50 hoffman + + * Source/: cmSystemTools.cxx, cmSystemTools.h: add bool return + value so diagnostics are easier + +2002-02-06 10:42 hoffman + + * Source/cmAuxSourceDirectoryCommand.cxx: BUG: remove depend on + directory because it is not supported by all makes + +2002-02-04 22:00 hoffman + + * Source/CursesDialog/CMakeLists.txt: ENH: use target link + libraries and add the link directory for cmform + +2002-02-04 18:41 barre + + * Modules/: Documentation.cmake, FindGnuplot.cmake: Add module to + find gnuplot + +2002-02-04 08:28 iscott + + * Source/cmAuxSourceDirectoryCommand.cxx: the generated + makefiles/DSPfiles now depend on the aux source directory's last + modified date. + +2002-02-01 13:08 berk + + * Source/cmake.cxx: Using cmSystemTools::Error() instead of cerr. + +2002-02-01 13:07 berk + + * Source/cmUnixMakefileGenerator.cxx: Better support for parallel + builds. Subdirs depend on their parent. + +2002-02-01 09:28 hoffman + + * CMakeLists.txt, Source/CMakeLists.txt: use CMake_SOURCE and not + CMAKE_ROOT + +2002-01-31 15:16 blezek + + * Modules/FindPythonLibs.cmake: ENH: Adding search path's for + PYTHON_LIBRARY + +2002-01-31 10:32 hoffman + + * Source/: CMakeLists.txt, CursesDialog/CMakeLists.txt: try to get + this working for dec cxx default compiler options + +2002-01-30 11:23 hoffman + + * Source/cmStandardIncludes.h: ENH: fix for dec compiler, they + still do not have the correct ansi stream library + +2002-01-25 09:06 king + + * Source/CursesDialog/form/: fld_def.c, frm_data.c, frm_def.c, + frm_driver.c: ERR: Corrected assertions of pointers to remove + warnings. + +2002-01-24 14:15 berk + + * Source/cmSystemTools.cxx: BUG: fix for network paths + +2002-01-23 11:58 hoffman + + * Source/cmMakefile.h: patch 2 release to fix dsp header problem + +2002-01-23 11:52 hoffman + + * Source/cmDSPWriter.cxx: BUG: allow .h files to be added to the + sources + +2002-01-23 10:56 barre + + * Source/cmaketest.cxx: ENH: run CMake a second time. The first + time it is run, some cache values are computed. The second time + it is run, some commands check if the value is already in the + cache and return that value instead of re-computing it. Therefore + this ENH: a) make sure that this specific code is tested, b) + increase coverage. + +2002-01-22 17:18 king + + * Modules/FindVTK.cmake: ENH: Added option of disabling error + message when VTK is not found. + +2002-01-22 15:55 barre + + * Tests/: Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + Complex/Executable/Temp/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Executable/Temp/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Executable/Temp/CMakeLists.txt, + Testing/CMakeLists.txt, Testing/Sub/CMakeLists.txt: Just rename + dir + +2002-01-22 15:50 barre + + * Tests/: Complex/CMakeCache.txt, ComplexOneConfig/CMakeCache.txt, + ComplexRelativePaths/CMakeCache.txt, Complex/CMakeLists.txt, + Complex/Cache/CMakeCache.txt, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/Cache/CMakeCache.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/Cache/CMakeCache.txt: ENH: Move + CMakeCache.txt to Cache/ directory to avoid any in-source build + pb. + +2002-01-22 14:15 millerjv + + * Modules/Dart.cmake: ENH: New variables CVS_UPDATE_OPTIONS, + DART_TESTING_TIMEOUT + +2002-01-22 13:30 barre + + * Tests/: Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: Coverage for + OUTPUT_REQUIRED_FILES + +2002-01-22 10:17 king + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + cmLoadCacheCommand.cxx, cmMakefile.cxx, cmake.cxx: ERR: Removed + cmCacheManager::DefineCache method. It is no longer needed. + +2002-01-22 07:37 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: flags already there, just + not working + +2002-01-22 07:18 hoffman + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt: BUG: must use ANSI flags for + complex test now. + +2002-01-21 15:39 will + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + FLTKDialog.cxx, FLTKPropertyItemRow.cxx, FLTKPropertyList.cxx: + ENH:Updated copyright + +2002-01-21 15:30 barre + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: Add warnings/infos + +2002-01-21 15:30 barre + + * Tests/Wrapping/CMakeLists.txt: Add coverage for + VTK_MAKE_INSTANTIATOR + +2002-01-21 15:30 will + + * Source/: cmAbstractFilesCommand.cxx, cmAbstractFilesCommand.h, + cmAddCustomCommandCommand.cxx, cmAddCustomCommandCommand.h, + cmAddCustomTargetCommand.cxx, cmAddCustomTargetCommand.h, + cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmAddDependenciesCommand.cxx, cmAddDependenciesCommand.h, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddTestCommand.cxx, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.cxx, cmAuxSourceDirectoryCommand.h, + cmBorlandMakefileGenerator.cxx, cmBorlandMakefileGenerator.h, + cmBuildCommand.cxx, cmBuildCommand.h, cmBuildNameCommand.cxx, + cmBuildNameCommand.h, cmCableClassSet.cxx, cmCableClassSet.h, + cmCableClassSetCommand.cxx, cmCableClassSetCommand.h, + cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h, + cmCacheManager.cxx, cmCacheManager.h, cmCommand.h, + cmCommands.cxx, cmCommands.h, cmConfigureFileCommand.cxx, + cmConfigureFileCommand.h, cmConfigureGccXmlCommand.cxx, + cmConfigureGccXmlCommand.h, cmCustomCommand.cxx, + cmCustomCommand.h, cmDSPWriter.cxx, cmDSPWriter.h, + cmDSWWriter.cxx, cmDSWWriter.h, cmData.h, cmDirectory.cxx, + cmDirectory.h, cmDumpDocumentation.cxx, cmElseCommand.cxx, + cmElseCommand.h, cmEnableTestingCommand.cxx, + cmEnableTestingCommand.h, cmEndForEachCommand.cxx, + cmEndForEachCommand.h, cmEndIfCommand.cxx, cmEndIfCommand.h, + cmExecProgramCommand.cxx, cmExecProgramCommand.h, + cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h, + cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindLibraryCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h, + cmFindProgramCommand.cxx, cmFindProgramCommand.h, + cmForEachCommand.cxx, cmForEachCommand.h, cmFunctionBlocker.h, + cmGeneratedFileStream.h, cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeCommand.h, + cmIncludeDirectoryCommand.cxx, cmIncludeDirectoryCommand.h, + cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.cxx, + cmInstallFilesCommand.h, cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.cxx, + cmInstallTargetsCommand.h, cmLinkDirectoriesCommand.cxx, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.h, cmListFileCache.cxx, cmListFileCache.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h, + cmMSProjectGenerator.cxx, cmMSProjectGenerator.h, + cmMakeDepend.cxx, cmMakeDepend.h, cmMakeDirectoryCommand.cxx, + cmMakeDirectoryCommand.h, cmMakefile.cxx, cmMakefile.h, + cmMakefileGenerator.cxx, cmMakefileGenerator.h, + cmMarkAsAdvancedCommand.cxx, cmMarkAsAdvancedCommand.h, + cmMessageCommand.cxx, cmMessageCommand.h, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmOptionCommand.cxx, cmOptionCommand.h, + cmOutputRequiredFilesCommand.cxx, cmOutputRequiredFilesCommand.h, + cmProjectCommand.cxx, cmProjectCommand.h, cmQTWrapCPPCommand.cxx, + cmQTWrapCPPCommand.h, cmQTWrapUICommand.cxx, cmQTWrapUICommand.h, + cmRegularExpression.cxx, cmRegularExpression.h, cmSetCommand.cxx, + cmSetCommand.h, cmSiteNameCommand.cxx, cmSiteNameCommand.h, + cmSourceFile.cxx, cmSourceFile.h, cmSourceFilesCommand.cxx, + cmSourceFilesCommand.h, cmSourceFilesRemoveCommand.cxx, + cmSourceFilesRemoveCommand.h, cmSourceGroup.cxx, cmSourceGroup.h, + cmSourceGroupCommand.cxx, cmSourceGroupCommand.h, + cmStandardIncludes.h, cmSubdirCommand.cxx, cmSubdirCommand.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmSystemTools.cxx, cmSystemTools.h, cmTarget.cxx, cmTarget.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h, + cmUseMangledMesaCommand.cxx, cmUseMangledMesaCommand.h, + cmUtilitySourceCommand.cxx, cmUtilitySourceCommand.h, + cmVTKMakeInstantiatorCommand.cxx, cmVTKMakeInstantiatorCommand.h, + cmVTKWrapJavaCommand.cxx, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.cxx, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h, + cmVariableRequiresCommand.cxx, cmVariableRequiresCommand.h, + cmWrapExcludeFilesCommand.cxx, cmWrapExcludeFilesCommand.h, + cmake.cxx, cmake.h, cmakemain.cxx, cmaketest.cxx, + cmakewizard.cxx, cmakewizard.h, ctest.cxx, ctest.h, + CursesDialog/ccmake.cxx, CursesDialog/cmCursesBoolWidget.cxx, + CursesDialog/cmCursesBoolWidget.h, + CursesDialog/cmCursesCacheEntryComposite.cxx, + CursesDialog/cmCursesCacheEntryComposite.h, + CursesDialog/cmCursesDummyWidget.cxx, + CursesDialog/cmCursesDummyWidget.h, + CursesDialog/cmCursesFilePathWidget.cxx, + CursesDialog/cmCursesFilePathWidget.h, + CursesDialog/cmCursesForm.cxx, CursesDialog/cmCursesForm.h, + CursesDialog/cmCursesLabelWidget.cxx, + CursesDialog/cmCursesLabelWidget.h, + CursesDialog/cmCursesLongMessageForm.cxx, + CursesDialog/cmCursesLongMessageForm.h, + CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h, + CursesDialog/cmCursesPathWidget.cxx, + CursesDialog/cmCursesPathWidget.h, + CursesDialog/cmCursesStandardIncludes.h, + CursesDialog/cmCursesStringWidget.cxx, + CursesDialog/cmCursesStringWidget.h, + CursesDialog/cmCursesWidget.cxx, CursesDialog/cmCursesWidget.h, + FLTKDialog/CMakeSetupGUIImplementation.h, + FLTKDialog/FLTKPropertyItemRow.h, FLTKDialog/FLTKPropertyList.h, + MFCDialog/CMakeCommandLineInfo.h, MFCDialog/CMakeSetup.h, + MFCDialog/CMakeSetupDialog.h, MFCDialog/MakeHelp.h, + MFCDialog/PathDialog.h, MFCDialog/PropertyList.h, + MFCDialog/StdAfx.h, MFCDialog/resource.h: ENH:Updated copyright + +2002-01-21 15:11 will + + * Copyright.txt: ENH:Formal copyright notice + +2002-01-21 11:39 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: remove warning from hpux + make + +2002-01-21 10:38 hoffman + + * Source/cmaketest.cxx: ENH: check the return value of the test + program to be run + +2002-01-21 10:22 barre + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: Comment test + OUTPUT_REQUIRED + +2002-01-21 10:11 hoffman + + * Source/: cmSourceFile.cxx, cmSourceFilesCommand.cxx, + cmSourceFilesRemoveCommand.cxx: BUG: fix generated files with no + extension bug + +2002-01-20 02:21 barre + + * Tests/: Complex/VarTests.cmake, ComplexOneConfig/VarTests.cmake, + ComplexRelativePaths/VarTests.cmake: More IF coverage + +2002-01-20 01:58 barre + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, Complex/VarTests.cmake, + ComplexOneConfig/VarTests.cmake, + ComplexRelativePaths/VarTests.cmake, + Complex/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx, + Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt, + Complex/Library/empty.h, ComplexOneConfig/Library/empty.h, + ComplexRelativePaths/Library/empty.h, Testing/CMakeLists.txt, + Wrapping/vtkExcluded.h, Wrapping/vtkIncluded.h: Increase + Coverage. + +2002-01-20 01:05 barre + + * Tests/Wrapping/: CMakeLists.txt, fltk1.fl: Add coverage for QT + and FLTK wrappers. Also MANGLED_MESA + +2002-01-20 00:12 barre + + * Tests/: Complex/CMakeCache.txt, Complex/CMakeLists.txt, + Complex/VarTests.cmake, Complex/cmTestConfigure.h.in, + ComplexOneConfig/CMakeCache.txt, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/CMakeCache.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/cmTestConfigure.h.in, + Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt: More tests + + coverage + +2002-01-20 00:11 barre + + * Tests/Testing/: CMakeLists.txt, DartConfig.cmake: More coverage + + include Dart.cmake to maximize chance nslookup/hostname are found + +2002-01-20 00:11 barre + + * Tests/Wrapping/: CMakeLists.txt, hints, vtkExcluded.cxx, + vtkExcluded.h, vtkIncluded.cxx, vtkIncluded.h: Add test for + VTK_WRAP_* + +2002-01-20 00:06 barre + + * Source/cmLoadCacheCommand.h: Typo + +2002-01-19 21:24 barre + + * Tests/: Complex/CMakeLists.txt, Complex/VarTests.cmake, + Complex/cmTestConfigure.h.in, Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + ComplexOneConfig/CMakeLists.txt, ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + Testing/CMakeLists.txt, Testing/testing.cxx, + Wrapping/CMakeLists.txt, Wrapping/wrapping.cxx: Add + documentation, comments. Move some 'Complex' sub-tests into 2 new + 'Wrapping' and 'Testing' tests. + +2002-01-19 21:23 barre + + * Source/CMakeLists.txt: Add 2 new tests + +2002-01-19 21:22 barre + + * Source/cmSiteNameCommand.cxx: FIX: if the 'hostname' and + 'nslookup' commands were not found from their HOSTNAME and + NSLOOKUP cache definition, hard-coded values were used instead, + thus causing pb if the corresponding progs were not in the PATH + (RunCommand). Now use FindProgram() to be sure to find both, + otherwise do nothing and set the site name to "unknown" + (arbitrary. could be empty string ? or error ?). + +2002-01-18 23:38 hoffman + + * Source/cmCableClassSet.cxx: BUG: make sure regex match has a + string to match + +2002-01-18 20:33 barre + + * Source/cmExecProgramCommand.cxx: Fix: "cd arg2 ; arg1" not + working. OK with &&. Also should prevent from: "cd + non_existing_dir_oops && rm -fr *" + +2002-01-18 20:32 barre + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, Complex/VarTests.cmake, + Complex/VarTests.txt, ComplexOneConfig/VarTests.cmake, + ComplexOneConfig/VarTests.txt, + ComplexRelativePaths/VarTests.cmake, + ComplexRelativePaths/VarTests.txt, + Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx: ENH: Increase test + + coverage + +2002-01-18 19:22 barre + + * Tests/: Complex/CMakeCache.txt, ComplexOneConfig/CMakeCache.txt, + ComplexRelativePaths/CMakeCache.txt: ENH: Increase test + + coverage. This is not a bug, this cache is used for test. + +2002-01-18 19:21 barre + + * Tests/: Complex/CMakeLists.txt, ComplexOneConfig/CMakeLists.txt, + ComplexRelativePaths/CMakeLists.txt, + Complex/cmTestConfigure.h.in, Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt: ENH: Increase test + + coverage + +2002-01-18 19:21 barre + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: RemoveFile + returns if the file was removed or not + +2002-01-18 17:01 barre + + * Source/cmLibraryCommand.h: Unused and deprecated class. Goodbye. + +2002-01-18 16:59 martink + + * Source/cmIfCommand.cxx: bug fix + +2002-01-18 16:45 hoffman + + * Source/cmIfCommand.cxx: fix if logic for null defs + +2002-01-18 15:54 martink + + * Source/: cmSourceFilesCommand.cxx, cmSourceFilesCommand.h: + required for utilties + +2002-01-18 15:51 martink + + * Source/: cmUnixMakefileGenerator.h, cmUnixMakefileGenerator.cxx: + fix for utilties + +2002-01-18 15:39 andy + + * Source/cmSourceFilesRemoveCommand.cxx, + Tests/Complex/Library/CMakeLists.txt, + Tests/ComplexOneConfig/Library/CMakeLists.txt, + Tests/ComplexRelativePaths/Library/CMakeLists.txt: Add GENERATED + to cmSourceFilesRemoveCommand + +2002-01-18 15:32 martink + + * Source/cmAddCustomCommandCommand.cxx: revert to old behaviour + +2002-01-18 15:31 barre + + * Tests/: Complex/Library/CMakeLists.txt, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexRelativePaths/Library/CMakeLists.txt: Fix: create_file.cxx + is not GENERATED, it exists (so that it can be removed, until + SOURCE_FILES_REMOVE is synced with SOURCE_FILES) + +2002-01-18 15:18 martink + + * Source/cmSiteNameCommand.cxx: minor bug fix + +2002-01-18 15:16 martink + + * Source/cmMakefile.h: bug fixes + +2002-01-18 14:44 martink + + * Source/: cmCableClassSet.cxx, cmBuildNameCommand.cxx: bug fixes + +2002-01-18 14:38 martink + + * Source/cmBuildCommand.cxx: compiler warning + +2002-01-18 14:07 barre + + * Source/cmake.cxx: Fix: escaping spaces was preventing a value + with space to be passed correctly + +2002-01-18 13:37 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: merged if MATCHES + fix + +2002-01-18 13:30 martink + + * Source/: cmUnixMakefileGenerator.h, cmUnixMakefileGenerator.cxx: + some fixes to recent screwerd up changes + +2002-01-18 12:03 barre + + * Tests/: Complex/CMakeLists.txt, Complex/VarTests.txt, + Complex/cmTestConfigure.h.in, ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/VarTests.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/VarTests.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + Complex/Library/create_file.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/create_file.cxx, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/create_file.cxx: Increase coverage, + add tests + +2002-01-18 11:48 barre + + * Source/cmExecProgramCommand.cxx: Fix bug: was expanding second + arg even if not passed. crashed + +2002-01-18 11:38 barre + + * Source/: cmVariableRequiresCommand.h, cmExecProgramCommand.h: Fix + typo + +2002-01-18 11:37 barre + + * Source/: cmBuildNameCommand.cxx, cmSiteNameCommand.cxx: Fix: + argument was not used. + +2002-01-18 11:36 barre + + * Source/cmBuildCommand.h: Fix typo (second argument was not + reported) + +2002-01-18 11:36 barre + + * Source/cmBuildCommand.cxx: no message + +2002-01-18 10:28 hoffman + + * Source/cmCableClassSet.cxx: AIX compiler fix private to public + +2002-01-18 10:27 hoffman + + * Source/cmElseCommand.cxx: BUG: GetDefiniton can return null + +2002-01-18 09:02 barre + + * Tests/: Complex/simple.cxx, ComplexOneConfig/simple.cxx, + ComplexRelativePaths/simple.cxx: Is not used (see Simple test) + +2002-01-18 07:05 hoffman + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: ENH: remove unused + and non-standard io.h file + +2002-01-18 07:04 hoffman + + * Source/cmIfCommand.cxx: BUG: fix null pointer read if def is not + defined + +2002-01-17 16:36 barre + + * Tests/: Complex/Executable/complex.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/Executable/complex.cxx: Fix: displays msg if + passed for custom command + +2002-01-17 16:35 barre + + * Source/cmaketest.cxx: FIX: need a 'make clean' before 'make all' + otherwise the post-build custom-command are not run (since a lib + might be up to date already for ex.). + +2002-01-17 15:49 barre + + * Tests/: Complex/CMakeLists.txt, Complex/cmTestConfigure.h.in, + ComplexOneConfig/CMakeLists.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + Complex/Library/create_file.cxx, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/create_file.cxx, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/create_file.cxx: ENH: tests + ADD_DEPENDENCIES and ADD_CUSTOM_COMMAND + +2002-01-17 15:46 barre + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + Fix so that ADD_DEPENDENCIES work (the Utilities dependencies + were not output) + +2002-01-17 14:11 andy + + * Source/: cmSourceFilesCommand.cxx, cmSourceFilesCommand.h: Add + option of adding generated files to source list + +2002-01-17 12:54 hoffman + + * Source/cmDSPWriter.cxx: ENH: only output each link path once + +2002-01-17 10:48 king + + * Source/cmMakefile.h: ERR: Missing forward declaration of + cmMakeDepend added. + +2002-01-17 09:28 hoffman + + * Source/cmDSPWriter.cxx: BUG: allow header files to be added to + the dsp file + +2002-01-16 17:29 barre + + * Source/cmAddCustomCommandCommand.cxx: Remove hack. + +2002-01-16 17:26 andy + + * Source/cmAddCustomCommandCommand.cxx: Hack to make it work almost + like before + +2002-01-16 15:53 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: add silent and suffixes + to check depend file + +2002-01-16 15:00 hoffman + + * Source/cmConfigureFileCommand.cxx: BUG: make sure non cmakedef + lines are not skipped + +2002-01-16 12:45 hoffman + + * Source/cmConfigureFileCommand.cxx: ENH: do not undef cmakedefine + stuff, just comment out the line + +2002-01-15 17:21 berk + + * Source/cmUnixMakefileGenerator.cxx: Improved performance by + removing implicit rules. + +2002-01-15 16:20 martink + + * CMake.pdf, CMake.rtf: updated + +2002-01-15 16:19 will + + * CMake.pdf: ENH:Support v1.2 + +2002-01-15 16:15 hoffman + + * CMake.rtf: public to www.cmake.org + +2002-01-15 15:56 will + + * CMake.pdf: ENH:Docs for version 1.2 + +2002-01-15 15:52 hoffman + + * CMake.rtf: update for next version + +2002-01-15 15:50 martink + + * Source/cmMakefile.h: next release + +2002-01-15 15:46 martink + + * Source/cmMakefile.h: next release + +2002-01-15 15:38 hoffman + + * ChangeLog.txt: log for relase 1.2 + +2002-01-15 15:29 millerjv + + * Modules/Dart.cmake: ENH: Added DELIVER_CONTINUOUS_EMAIL as an + advanced cache entry. + +2002-01-15 13:20 berk + + * Source/: cmFindPathCommand.cxx, cmFindProgramCommand.cxx: FIX: + Entry doc. should never be overwritten. This may cause cmake to + be re-run very often. + +2002-01-14 19:08 hoffman + + * Source/cmDSPWriter.cxx: ENH: do not depend on the .dsp file but + rather depend on .dsp.cmake and if the .dsp actually changes, + then write it, so clean and rebuild will not cause many reloads + +2002-01-14 18:52 hoffman + + * Source/cmCacheManager.cxx: ENH: try to keep the dsp files from + changing between each write + +2002-01-14 16:28 hoffman + + * Source/cmUnixMakefileGenerator.cxx: remove extra logic not needed + anymore because of better depends + +2002-01-14 16:02 berk + + * Source/cmUnixMakefileGenerator.cxx: Quote echo + +2002-01-14 14:49 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: Curses was being + used without initialization. + +2002-01-12 22:55 hoffman + + * Source/cmBorlandMakefileGenerator.cxx: BUG: use borland run time + dll for shared builds to avoid crashes + +2002-01-11 10:55 hoffman + + * Templates/configure: ENH: add support for AIX shared libraries + with gcc + +2002-01-11 10:54 hoffman + + * Templates/configure.in: ENH: add support for shared libraries + with gcc on AIX + +2002-01-10 18:09 hoffman + + * Source/CMakeLists.txt: ENH: make the fltk build default to OFF, + it fails on too many linux machines with the default build + +2002-01-10 18:09 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: BUG: fix build of library in + other directory if it is not there + +2002-01-10 16:22 andy + + * Source/cmConfigureFileCommand.cxx: Add space to output + +2002-01-09 17:22 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: make it a modal dialog + +2002-01-08 17:18 hoffman + + * Source/cmBorlandMakefileGenerator.cxx: BUG: need a larger default + page size + +2002-01-08 17:18 hoffman + + * Source/cmDSPWriter.cxx: BUG: need spaces around linker options + +2002-01-08 13:32 hoffman + + * Source/cmDSPWriter.cxx, Templates/CMakeWindowsSystemConfig.cmake: + ENH: add CMAKE_EXTRA_LINK_FLAGS to dsp generator + +2002-01-08 12:57 hoffman + + * Templates/: configure, configure.in: ENH: use +Z not +z for pic + and use -fPIC for gcc + +2002-01-08 12:53 hoffman + + * Templates/: configure, configure.in: ENH: add -L/usr/lib for hp + so shared libs find that directory before the pa1.1 directory + +2002-01-07 17:29 barre + + * Modules/FindVTK.cmake: More user friendly (built tree is + automatically used). + +2002-01-07 16:30 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: BUG: not all displayed + messages are errors + +2002-01-07 15:49 perera + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx, cmake.h: + Rolling back symbolic path changes until it works on Windows. + +2002-01-07 14:12 hoffman + + * Templates/configure: Add sizeof some types support + +2002-01-07 14:07 andy + + * Templates/: configure.in, CMakeBorlandWindowsSystemConfig.cmake, + CMakeNMakeWindowsSystemConfig.cmake, CMakeSystemConfig.cmake.in, + CMakeWindowsSystemConfig.cmake: Add sizeof some types support + +2002-01-07 13:47 hoffman + + * Templates/: configure, configure.in: use -shared for sunos build + +2002-01-06 14:59 perera + + * Source/: cmSystemTools.cxx, cmSystemTools.h, cmake.cxx, cmake.h: + ENH: Add an invocation that maintains symbolic paths to the + source and binary trees, mainly for systems with automounted + network drives. ENH: CollapseFullPath() no longer adds a + trailing "/" to directory paths. + +2002-01-04 09:23 martink + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp: added + release version + +2002-01-03 16:02 andy + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h: Fix add custom command so that it + actually executes the code + +2002-01-03 14:19 martink + + * Source/: cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx: + minor fixes + +2002-01-03 14:05 martink + + * Source/cmVTKWrapTclCommand.cxx: minor fix + +2002-01-03 13:56 martink + + * Source/cmVTKWrapTclCommand.cxx: minor fix + +2002-01-03 09:34 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: expand vars nwo for + exists test + +2002-01-02 16:46 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx, cmIfCommand.h: added + exists option for if statement + +2002-01-02 16:45 martink + + * Source/: cmake.cxx, CursesDialog/cmCursesLongMessageForm.cxx, + CursesDialog/cmCursesMainForm.cxx: prints the relese version + +2002-01-02 16:44 martink + + * Source/cmMakefile.h: added release verison to cmMakefile + +2002-01-02 11:54 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: BUG: put back recursive call to make + for checking sources + +2001-12-31 12:02 berk + + * Source/cmUnixMakefileGenerator.cxx: Type || should have been && + +2001-12-31 11:54 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: ENH: remove one call to make, and + clean echo stuff a bit + +2001-12-30 17:18 berk + + * Source/cmUnixMakefileGenerator.cxx: BUG: fix long depend list + because it gets cut on the hp: I may look like berk, but it is + bill H. + +2001-12-28 17:01 hoffman + + * Source/MFCDialog/MakeHelp.cpp: ENH: use the correct case + +2001-12-28 17:00 hoffman + + * Source/MFCDialog/CMakeSetup.dsp: DO NOT USE INCREMENTAL + +2001-12-28 17:00 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: ENH: + remove the rule to run make depend from the top with each change + in any cmakelist file. Instead, run make depend in the current + directory if a source file changes, or if a .h file changes or is + removed + +2001-12-28 15:58 perera + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx, cmUnixMakefileGenerator.cxx: BUG: + Don't generate build rules for header files. + +2001-12-28 15:56 perera + + * Source/cmMakefile.cxx: BUG: .txx are not source files. They + contain template code which can only be compiled when included in + a regular .cxx file. By themselves, they cause do not cause code + to be generated. + +2001-12-28 15:54 perera + + * Source/cmSourceFile.cxx: ENH: Classify a file as source or header + even when the extension is given explicitly. + +2001-12-28 15:37 hoffman + + * CMakeLists.txt: remove bad ADD_DEPENDENCIES commands + +2001-12-28 12:40 hoffman + + * Source/CMakeLists.txt: ERR: remove bad ADD_DEPENDENCIES commands + +2001-12-27 14:55 hoffman + + * Source/cmIfCommand.cxx: remove warning + +2001-12-27 13:55 hoffman + + * Source/cmAddDependenciesCommand.cxx: ENH: add error checking + +2001-12-21 18:25 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: Fix: the generator choice + value was hardcoded and overrode the value passed as a + command-line param (desktop shortcuts) + +2001-12-21 16:19 barre + + * Source/MFCDialog/: CMakeSetupDialog.cpp: Fix: vars that have just + become ADVANCED should be removed from the GUI + +2001-12-21 15:39 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: BUG: fix so you can remove a + directory in the source tree, and clean up echo of commands + +2001-12-21 15:11 martink + + * Source/CursesDialog/: cmCursesBoolWidget.cxx, + cmCursesBoolWidget.h, cmCursesDummyWidget.cxx, + cmCursesDummyWidget.h, cmCursesForm.h, cmCursesLabelWidget.cxx, + cmCursesLabelWidget.h, cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesMainForm.h, + cmCursesStringWidget.cxx, cmCursesStringWidget.h, + cmCursesWidget.cxx, cmCursesWidget.h: update interface + +2001-12-21 15:10 martink + + * Source/cmake.cxx: add patch hack + +2001-12-21 14:54 martink + + * Source/: cmBuildCommand.cxx, cmSystemTools.cxx, ctest.cxx: fix + for dos files on UNIX make -k and flush in ctest + +2001-12-21 14:44 martink + + * Modules/: FindCurses.cmake, FindJNI.cmake, FindMPI.cmake, + FindPythonLibs.cmake: general improvements + +2001-12-21 14:40 barre + + * Modules/: FindVTK.cmake: Change so that different flavours of VTK + might be chosen by the user. See full instructions in that file. + +2001-12-21 14:40 martink + + * configure.in, configure: fixed for SGI CC + +2001-12-21 14:39 martink + + * Templates/: CMakeBorlandWindowsSystemConfig.cmake, + CMakeNMakeWindowsSystemConfig.cmake, + CMakeWindowsSystemConfig.cmake, DLLHeader.dsptemplate, configure, + configure.in, staticLibHeader.dsptemplate: variety of bug fixes + +2001-12-21 09:55 ibanez + + * Source/cmFLTKWrapUICommand.cxx: ENH: No longer tries to create a + directory for the output + +2001-12-21 09:07 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: add support for DESTDIR + in install targets + +2001-12-21 00:01 perera + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in: ENH: Add option to disable + use of -rpath. + +2001-12-20 17:00 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx: ENH: fix for win98 check for + directory existence + +2001-12-20 16:10 barre + + * Modules/: FindTclsh.cmake, FindWish.cmake, FindTCL.cmake: ENH: + ADVANCED was not propagated to the new sub-mods + +2001-12-20 15:46 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: ENH: add make silent flag for nmake + and move .SILENT: directive to top of makefile + +2001-12-20 15:45 barre + + * Modules/: FindFLTK.cmake: ENH: mark everything ADVANCED + +2001-12-20 15:45 hoffman + + * Source/cmBorlandMakefileGenerator.cxx: ENH: use better command + for creating static library + +2001-12-20 15:44 hoffman + + * Templates/: CMakeBorlandWindowsSystemConfig.cmake, + CMakeNMakeWindowsSystemConfig.cmake, + CMakeWindowsSystemConfig.cmake: BUG: must use CACHE values in + these + +2001-12-20 15:22 barre + + * Modules/FindVTK.cmake: ENH: Also look for 4.2, 4.1, 4.0 + +2001-12-20 15:17 barre + + * Modules/FindVTK.cmake: ENH: Also look for 4.2, 4.1, 4.0 + +2001-12-20 08:16 hoffman + + * Example/Demo/demo.cxx: remove fancy cxx stuff from the example + +2001-12-19 21:51 barre + + * Modules/FindJNI.cmake: ENH: Make everything ADVANCED + +2001-12-19 18:45 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmBorlandMakefileGenerator.h, cmNMakeMakefileGenerator.cxx, + cmUnixMakefileGenerator.cxx: ENH: add silent mode for makefile + builds and fix borland and nmake after the depend stuff + +2001-12-19 15:26 hoffman + + * Source/: CMakeLists.txt, cmaketest.cxx: add example to tests + +2001-12-19 15:25 hoffman + + * Example/: CMakeLists.txt, Demo/CMakeLists.txt, Demo/demo.cxx, + Demo/demo_b.cxx, Hello/CMakeLists.txt, Hello/hello.cxx, + Hello/hello.h: move example into the source tree so it will + work... + +2001-12-19 11:38 barre + + * Modules/FindTCL.cmake: default ActiveState Tcl install dir is now + C:/Tcl + +2001-12-19 08:35 hoffman + + * Source/cmVTKMakeInstantiatorCommand.cxx: change ostrstream to + strstream + +2001-12-19 08:26 hoffman + + * Templates/configure, Templates/configure.in, configure, + configure.in: check for LANG:std + +2001-12-18 21:00 hoffman + + * configure, configure.in, Templates/configure, + Templates/configure.in: -LANG:std should be default on sgi for + ansi CXX Flags + +2001-12-18 20:32 hoffman + + * Templates/staticLibHeader.dsptemplate: fix comment + +2001-12-18 17:30 hoffman + + * Templates/: configure, configure.in: syntax error + +2001-12-18 17:17 hoffman + + * Templates/configure: use cxx compiler on sgi to build static libs + +2001-12-18 17:16 hoffman + + * Templates/configure.in: use cxx compiler to build static libs on + sgi + +2001-12-18 16:21 martink + + * Modules/FindJNI.cmake: bad spelling of java + +2001-12-18 14:55 king + + * Source/cmIfCommand.cxx: ENH: Added error reporting for missing + arguments to ENDIF. + +2001-12-18 13:35 berk + + * Source/CursesDialog/cmCursesBoolWidget.cxx: Fixed warning. + +2001-12-18 11:35 king + + * Source/: cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h: ENH: Improved flexibility of + command by allowing specificiation of separate input and outputs + source lists. Multiple input source lists are now also allowed. + +2001-12-18 10:21 king + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx, cmUnixMakefileGenerator.cxx: ENH: + Improved dependency generation. If any cmake.depends is out of + date, all of them in the tree are re-generated. This is + necessary in certain cases when CMakeLists.txt files change. + +2001-12-18 09:51 king + + * Source/cmElseCommand.cxx: ENH: Added option to IF command to test + if a command exists. Syntax is IF(COMMAND name-of-command). + +2001-12-18 09:39 king + + * Source/: cmIfCommand.cxx, cmMakefile.cxx, cmMakefile.h: ENH: + Added option to IF command to test if a command exists. Syntax + is IF(COMMAND name-of-command). + +2001-12-18 09:16 king + + * Source/cmMakefile.cxx: BUG: Existing projects have cache entries + with the same name as the command they adjust (VTK_WRAP_JAVA in + VTK, for example). Setting the command name as a variable is too + dangerous. + +2001-12-17 17:44 andy + + * Source/cmSystemTools.cxx: Better handling of new lines when + moving from dos to unix + +2001-12-17 16:20 king + + * Source/: cmCommands.cxx, cmVTKMakeInstantiatorCommand.cxx, + cmVTKMakeInstantiatorCommand.h: ENH: Adding VTK_MAKE_INSTANTIATOR + command. This command will be used by VTK kits to register their + classes with vtkInstantiator. + +2001-12-17 16:19 king + + * Source/cmMakefile.cxx: ENH: Each cmake command now adds a cmake + variable of its own name, set to ON. This allows constructs in + CMakeLists.txt files like: IF(FOO_COMMAND) FOO_COMMAND() + ENDIF(FOO_COMMAND) This provides the option to add CMake commands + for extra functionality without breaking compatability with + earlier versions of CMake. + +2001-12-17 11:30 hoffman + + * Templates/: CMakeNMakeWindowsSystemConfig.cmake, + DLLHeader.dsptemplate: remove stack stuff + +2001-12-17 11:28 hoffman + + * Templates/CMakeWindowsSystemConfig.cmake: use a better compiler + name + +2001-12-17 11:15 hoffman + + * Source/cmDSPWriter.cxx: ENH: allow custom commands for files that + msdev knows about + +2001-12-16 18:52 barre + + * Source/cmVTKWrapPythonCommand.cxx: Wrap abstract class too, as + per David Gobbi's request (for the sake of the internal + documentation features of python"). + +2001-12-14 22:41 hoffman + + * Source/cmBuildCommand.cxx: use -i not -k for make + +2001-12-13 13:28 berk + + * Source/CursesDialog/: cmCursesBoolWidget.cxx, + cmCursesBoolWidget.h, cmCursesDummyWidget.cxx, + cmCursesDummyWidget.h, cmCursesForm.h, cmCursesLabelWidget.cxx, + cmCursesLabelWidget.h, cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesMainForm.h, + cmCursesStringWidget.cxx, cmCursesStringWidget.h, + cmCursesWidget.cxx, cmCursesWidget.h: Updated toolbar. + +2001-12-12 18:27 hoffman + + * Source/CMakeLists.txt: ENH: allow local changes + +2001-12-12 13:57 berk + + * Modules/FindMPI.cmake: Added doc. + +2001-12-12 12:05 king + + * Modules/FindCurses.cmake: ENH: Added /lib to curses search path. + +2001-12-12 11:51 berk + + * Modules/FindMPI.cmake: Added support for a 2nd mpi library + (usually mpi++) + +2001-12-11 15:59 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: cmake.depends files of + zero size were not being re-written in some cases. Added a + comment output to the top of the file so it will be re-written + every time. + +2001-12-11 14:09 blezek + + * Modules/FindPythonLibs.cmake: ENH: Adding /usr/*/python1.5 for + RedHat 7.1/Python 1.5 users + +2001-12-11 12:29 hoffman + + * Source/cmSubdirDependsCommand.cxx: remove warning + +2001-12-11 10:42 hoffman + + * Source/: cmUnixMakefileGenerator.cxx: check for empty library + output path + +2001-12-11 10:39 hoffman + + * Source/ctest.cxx: ENH: add flush + +2001-12-11 02:21 ibanez + + * Source/: cmFLTKWrapUICommand.h, cmFLTKWrapUICommand.cxx: FIX: The + command was modified it uses now a target and a source list + composed of .fl files. The names of the generated .cxx files are + added internally to the Sources list of the target. + +2001-12-11 02:17 ibanez + + * Source/: cmUnixMakefileGenerator.cxx, cmTarget.h: FIX: + GENERATED_CODE type is no longer needed: generated code is not a + Target. + +2001-12-11 02:15 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, CMakeSetupGUI.h: ENH: + These files are now generated from the .fl file by FLTK_WRAP_UI + command. + +2001-12-11 02:14 ibanez + + * Source/FLTKDialog/CMakeLists.txt: FIX: FLTK_WRAP_UI command + modified. + +2001-12-10 12:10 king + + * Modules/FindTclsh.cmake: ENH: Added more filenames for tclsh + program. Also now only looks for cygtclsh80 if under cygwin. + +2001-12-10 12:04 king + + * Modules/FindTclsh.cmake: ENH: Added more filenames for tclsh + program. Also now only looks for cygtclsh80 if under cygwin. + +2001-12-10 12:02 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: LIBRARY_OUTPATH_PATH may + be "set" to the null string, in which case it should be ignored. + +2001-12-10 11:27 king + + * Source/: cmMakefile.cxx, cmMakefile.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmUnixMakefileGenerator.cxx: ENH: Parallel build support is now + automatic. SUBDIR_DEPENDS command now does nothing. Also fixed + a bug in CMakeLists.txt file inheritance when a directory level + is skipped. + +2001-12-10 11:03 king + + * Source/: cmMakefile.cxx, cmMakefile.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmUnixMakefileGenerator.cxx: ENH: SUBDIR_DEPENDS command now does + nothing. The parallel build functionality is now automatic. + Dependencies are setup to force the same build order as a single + threaded build, but multiple files in the same directory can be + built simultaneously. Also fixed bug with inheriting + CMakeLists.txt files when a directory level is skipped. + +2001-12-08 21:17 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + merge bug fixes to release + +2001-12-08 21:16 hoffman + + * Source/cmCacheManager.cxx: merge bug fixes to release, mistaken + comment in cache + +2001-12-08 21:10 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: if LIBRARY_OUTPUT_PATH + is set, then use the fullpath for a remote target + +2001-12-08 20:49 hoffman + + * Source/cmUnixMakefileGenerator.h: WAR: remove warning + +2001-12-07 19:11 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: executable extension + wrong for ctest search, and was not looking in Debug and Release + +2001-12-07 18:27 berk + + * Source/cmCacheManager.cxx: If an entry starts with // (network + paths), double quote it. + +2001-12-07 18:15 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: the rule for generating + a library no longer has the full path, and so the dependency + targets shouldn't, either. + +2001-12-07 18:12 berk + + * Source/cmCacheManager.cxx: Comments start with TWO leading + slashes not _one_ + +2001-12-07 16:06 martink + + * Source/cmMakefile.h: version rev + +2001-12-07 16:01 martink + + * Source/cmMakefile.h: release 10 + +2001-12-07 15:47 hoffman + + * Source/cmCacheManager.cxx, Source/cmMarkAsAdvancedCommand.cxx, + Source/cmMarkAsAdvancedCommand.h, + Source/MFCDialog/CMakeSetupDialog.cpp, + Templates/CMakeBorlandWindowsSystemConfig.cmake: ENH: add mark as + not advanced to mark as advanced + +2001-12-07 14:57 hoffman + + * ChangeLog.txt: yet another release + +2001-12-07 14:31 hoffman + + * Source/cmaketest.cxx: ENH: convert to windows paths + +2001-12-07 13:10 hoffman + + * Source/cmaketest.cxx: ENH: use windows paths to run commands and + escape spaces + +2001-12-07 10:58 hoffman + + * Source/: cmBorlandMakefileGenerator.cxx, + cmNMakeMakefileGenerator.cxx, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: ENH: add custom commands for targets + +2001-12-07 10:32 barre + + * Templates/CMakeBorlandWindowsSystemConfig.cmake: Remove "unused + var" warning from C_FLAGS + +2001-12-06 20:04 barre + + * Source/cmNMakeMakefileGenerator.cxx: Do not output library search + path if the library path option/flag is empty + add + CMAKE_LINKER_HIDE_PARAMETERS since some linkers just do not + support the @<< syntax + +2001-12-06 20:02 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: Add + CMAKE_LINKER_HIDE_PARAMETERS since some linkers just do not + support the @<< syntax + +2001-12-06 17:40 andy + + * Source/CursesDialog/cmCursesMainForm.cxx: Fix bug with string + +2001-12-06 17:09 hoffman + + * Source/cmakewizard.cxx: ENH: call convert to unix slashes for + path and filepath entries + +2001-12-06 17:07 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: Added support for ~. + +2001-12-06 16:50 martink + + * Source/cmSystemTools.cxx: handle tildas + +2001-12-06 13:32 barre + + * Source/cmUnixMakefileGenerator.cxx: Lib path should be converted + to native path too. + +2001-12-06 13:31 barre + + * Source/: cmBorlandMakefileGenerator.cxx, + cmBorlandMakefileGenerator.h, cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h: Fix the command quoting pb (remove + m_QuoteNextCommand), move ConvertToNativePath to NMake gen + +2001-12-06 11:52 martink + + * Modules/Dart.cmake: better use of modules + +2001-12-06 11:52 martink + + * Modules/FindDart.cmake: better docs + +2001-12-06 11:52 martink + + * Modules/FindTCL.cmake: now broken into pieces + +2001-12-06 11:51 martink + + * Modules/: FindTclsh.cmake, FindWish.cmake: new modules + +2001-12-06 11:49 martink + + * Source/CursesDialog/ccmake.cxx: Cleaning last line at exit. + +2001-12-06 10:24 martink + + * Templates/CMakeSystemConfig.cmake.in: made install prefix non + advanced + +2001-12-05 16:05 barre + + * Source/MFCDialog/CMakeSetupDialog.cpp: If Shift is pressed with + 'OK', then don't quit + +2001-12-05 15:36 perera + + * Modules/FindTCL.cmake: ENH: add more possible names for + executables. + +2001-12-05 15:28 barre + + * Source/: cmNMakeMakefileGenerator.cxx, cmCacheManager.cxx, + MFCDialog/CMakeSetupDialog.cpp: Add single quotes feature. + +2001-12-05 15:00 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: Add single quotes + feature. + +2001-12-05 12:07 martink + + * Source/cmMakefile.h: up version + +2001-12-05 11:59 martink + + * Source/cmMakefile.h: up version + +2001-12-05 11:38 hoffman + + * ChangeLog.txt: new version + +2001-12-05 11:37 will + + * CMake.pdf: updated from rtf + +2001-12-05 11:32 hoffman + + * CMake.rtf: ENH: update cvs path + +2001-12-04 18:49 starreveld + + * Templates/: configure, configure.in: + + Add the flat_namespace and undefined suppress flags to OSX builds + +2001-12-04 17:28 hoffman + + * Source/cmSystemTools.cxx: ENH: remove /tmp_mnt from all paths in + convert to unix slashes + +2001-12-04 16:19 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: Fixed outdated comment + +2001-12-04 15:55 hoffman + + * Templates/CMakeBorlandWindowsSystemConfig.cmake: add tWM to c + flags as well as CXX flags + +2001-12-04 15:53 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: Fixed overflow problem. + +2001-12-04 15:16 hoffman + + * Templates/CMakeBorlandWindowsSystemConfig.cmake: ENH: add -tWM to + default flags for compilation + +2001-12-04 12:03 hoffman + + * Source/cmUnixMakefileGenerator.cxx: crazy fix for putenv, and + native path called on custom command paths + +2001-12-04 11:20 berk + + * Source/CursesDialog/cmCursesStandardIncludes.h: replacing clear() + +2001-12-04 11:16 berk + + * Source/CursesDialog/: ccmake.cxx, cmCursesForm.cxx, + cmCursesForm.h, cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesStringWidget.cxx: Added debugging. + +2001-12-04 10:55 barre + + * Modules/: Documentation.cmake, FindCygwin.cmake, + FindDoxygen.cmake, FindHhc.cmake, FindPerl.cmake, + FindSelfPackers.cmake, FindUnixCommands.cmake, FindWget.cmake: + Remove unneeded test and code duplication. Add WIN32 test. Make + all ADVANCED. + +2001-12-04 10:54 barre + + * Modules/Dart.cmake: Remove code duplication. Call FindTcl.cmake, + which also does the ADVANCED stuff. + +2001-12-04 10:53 barre + + * Modules/FindTCL.cmake: Make shells also ADVANCED + +2001-12-04 10:27 barre + + * Modules/FindPythonLibs.cmake: Make vars ADVANCED for WIN32 (same + as Tcl) + +2001-12-04 10:11 hoffman + + * Source/CursesDialog/form/frm_driver.c: no c++ comments in c code, + duhhhh + +2001-12-03 19:58 hoffman + + * Source/CursesDialog/form/frm_driver.c: ENH: AIX seems to define + lines and columns as macros, I undefed them + +2001-12-03 18:04 hoffman + + * Templates/CMakeBorlandWindowsSystemConfig.cmake: ENH: fix crashes + in console apps + +2001-12-03 17:47 hoffman + + * Source/cmVariableRequiresCommand.cxx: ENH: let people know the + variable is advanced + +2001-12-03 17:01 hoffman + + * Modules/FindOpenGL.cmake, Source/cmBorlandMakefileGenerator.cxx, + Templates/CMakeBorlandWindowsSystemConfig.cmake: ENH: fix + debugging with borland + +2001-12-03 17:00 hoffman + + * Source/cmake.cxx: ENH: add -C load cache file option + +2001-12-03 15:59 barre + + * Source/MFCDialog/: CMakeSetupDialog.cpp, + CMakeCommandLineInfo.cpp, CMakeCommandLineInfo.h: Add /A and /G + command-line param to carry the value of "Show Advanced" and + generator name in desktop shortcuts + +2001-12-03 15:55 martink + + * Source/ctest.cxx: minor fix for not found executables + +2001-12-03 15:48 hoffman + + * CMake.rtf: [no log message] + +2001-12-03 15:11 berk + + * Source/: cmake.cxx: Fixed help. + +2001-12-03 13:05 hoffman + + * Source/Makefile.borland: add wizard + +2001-12-03 09:39 hoffman + + * CMake.rtf: update docs some + +2001-12-02 18:22 ibanez + + * Source/cmFLTKWrapUICommand.cxx: ENH: AddCustomCommand register + now multiple outputs. Auxiliary variable manage the output + directory where FLTK generated code is going to be writen. + +2001-11-30 17:20 barre + + * Source/: cmBuildCommand.cxx, cmDSPWriter.cxx, cmDSWWriter.cxx, + cmIfCommand.cxx, cmUnixMakefileGenerator.cxx, cmake.cxx: fix + warning for Borland build + +2001-11-30 16:51 hoffman + + * Source/cmakewizard.h: [no log message] + +2001-11-30 16:48 hoffman + + * Source/CMakeLib.dsp, Source/CMakeLists.txt, + Source/Makefile.borland, Source/Makefile.in, + Source/cmBorlandMakefileGenerator.cxx, + Source/cmBorlandMakefileGenerator.h, + Source/cmBorlandMakefileGenerator2.cxx, + Source/cmBorlandMakefileGenerator2.h, + Source/cmForEachCommand.cxx, Source/cmake.cxx, + Source/cmakemain.cxx, Source/cmakewizard.cxx, + Templates/CMakeBorlandWindowsSystemConfig.cmake, + Templates/CMakeWindowsBorlandConfig.cmake, + Templates/CMakeWindowsBorlandConfig2.cmake: new borland generator + moved into place + +2001-11-30 16:27 hoffman + + * Source/: cmBorlandMakefileGenerator.cpp, + cmBorlandMakefileGenerator.h: Replace with nmake subclassed + generator + +2001-11-30 16:05 barre + + * Source/: cmBorlandMakefileGenerator2.cxx, + cmNMakeMakefileGenerator.cxx, cmUnixMakefileGenerator.cxx: Add + options for library manager (lib). + +2001-11-30 16:04 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: Add options for + library manager (lib). Alpha sort + +2001-11-30 15:55 berk + + * Modules/FindTCL.cmake: Unix users are smarter. + +2001-11-30 15:04 berk + + * Source/CursesDialog/: cmCursesMainForm.cxx, + cmCursesStringWidget.cxx: Improving interface. + +2001-11-30 14:50 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: print cmake running + message to cerr + +2001-11-30 14:33 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake, + Source/cmNMakeMakefileGenerator.cxx: Add linker flags for each + build type + +2001-11-30 14:24 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: Better documentation. + +2001-11-30 14:16 berk + + * Source/CursesDialog/cmCursesMainForm.cxx: Better documentation. + +2001-11-30 13:59 berk + + * Source/CursesDialog/: cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesStringWidget.cxx: Improved help. + +2001-11-30 13:53 berk + + * Templates/CMakeSystemConfig.cmake.in: Removed unused options. + +2001-11-30 13:10 barre + + * Templates/CMakeNMakeWindowsSystemConfig.cmake: CMAKE_ANSI_CFLAGS + is used by VTK, so it should be set in the NMake config so that + it gets expanded (even to "") + +2001-11-30 13:09 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: fix library suffix + +2001-11-30 12:41 hoffman + + * Source/cmUnixMakefileGenerator.cxx: remove suffix rules + +2001-11-30 12:05 hoffman + + * Source/cmUnixMakefileGenerator.cxx: add new suffix rules + +2001-11-30 11:34 berk + + * Source/CursesDialog/: ccmake.cxx, cmCursesLongMessageForm.cxx, + cmCursesMainForm.cxx, cmCursesStandardIncludes.h: Can non use + clear because it is undef'ed. + +2001-11-30 10:58 berk + + * Source/CursesDialog/ccmake.cxx: Fixed warning. + +2001-11-30 10:54 berk + + * Source/CursesDialog/: ccmake.cxx, cmCursesMainForm.cxx: Fixed + warning. + +2001-11-30 10:51 berk + + * Source/CursesDialog/: cmCursesMainForm.h, cmCursesMainForm.cxx: + Since it is being used as an array size in another file, it is + not possible to initialize MAX_WIDTH in a .cxx file. + +2001-11-30 10:41 hoffman + + * Source/cmUnixMakefileGenerator.cxx: fix warning + +2001-11-30 10:39 berk + + * Source/CursesDialog/: cmCursesLongMessageForm.cxx, + cmCursesLongMessageForm.h: Missed std:: + +2001-11-30 10:28 berk + + * Source/CursesDialog/cmCursesMainForm.h: Missed std:: + +2001-11-30 10:27 berk + + * Templates/CMakeSystemConfig.cmake.in: CMAKE_WORDS_BIGENDIAN + should not be in the cache. + +2001-11-30 10:23 berk + + * Modules/FindPythonLibs.cmake: PYTHON_DEBUG_LIBRARY is only used + on Windows. + +2001-11-30 09:19 barre + + * Templates/CMakeSystemConfig.cmake.in: fix: If documentation + added, then need cache type + +2001-11-29 23:45 berk + + * Source/CursesDialog/: cmCursesLongMessageForm.cxx, + cmCursesLongMessageForm.h: opps I forgot to add these + +2001-11-29 23:24 hoffman + + * Source/Makefile.borland, Source/cmBorlandMakefileGenerator2.cxx, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in, + Templates/CMakeWindowsBorlandConfig2.cmake: ENH: fix various + problems caused by the generalization of nmake generator + +2001-11-29 20:59 barre + + * Source/cmBorlandMakefileGenerator2.cxx, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, + Templates/CMakeNMakeWindowsSystemConfig.cmake, + Templates/CMakeSystemConfig.cmake.in, + Templates/CMakeWindowsBorlandConfig2.cmake, + Templates/CMakeWindowsSystemConfig.cmake: Nmake build: move most + of hard-coded values to config parameters + +2001-11-29 16:44 berk + + * Source/: cmListFileCache.cxx, cmSystemTools.cxx, cmSystemTools.h, + ctest.cxx, CursesDialog/CMakeLists.txt, CursesDialog/ccmake.cxx, + CursesDialog/cmCursesCacheEntryComposite.cxx, + CursesDialog/cmCursesCacheEntryComposite.h, + CursesDialog/cmCursesForm.h, CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h: Improvements to the curses + interface. + +2001-11-29 15:14 hoffman + + * Source/MFCDialog/CMakeSetup.cpp: ENH: fix memory leaks + +2001-11-29 14:51 barre + + * Source/cmNMakeMakefileGenerator.cxx: Fix space pb (embended, then + escaped) + +2001-11-29 09:22 hoffman + + * Source/Makefile.borland: add bootstrap makefile for borland + compiler + +2001-11-29 09:09 hoffman + + * Source/CMakeLists.txt, Source/cmBorlandMakefileGenerator2.cxx, + Source/cmakewizard.cxx, + Templates/CMakeWindowsBorlandConfig2.cmake: fix for shared libs + and borland + +2001-11-29 01:51 ibanez + + * Source/cmUnixMakefileGenerator.cxx: ENH: GENERATED_CODE case + added to switch. + +2001-11-29 01:48 ibanez + + * Source/cmTarget.h: ENH: A type of target was added for + representing GENERATED_CODE + +2001-11-29 01:46 ibanez + + * Source/cmFLTKWrapUICommand.cxx: ENH: Custom commands are now + builded. + +2001-11-28 18:07 hoffman + + * Source/CMakeLib.dsp, Source/cmBorlandMakefileGenerator2.cxx, + Source/cmBorlandMakefileGenerator2.h, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.h, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, + Templates/CMakeWindowsBorlandConfig2.cmake: ENH: borland + generator 2 is working more or less + +2001-11-28 14:45 ibanez + + * Source/cmFLTKWrapUICommand.cxx: ENH: Command simplified in order + to construct a Source list of .cxx from a source list of .fl + GUI files. + +2001-11-28 14:44 ibanez + + * Source/cmFLTKWrapUICommand.h: ENH: The command was simplified to + generate a source list of cxx from a source list of .fl GUI + files. + +2001-11-28 12:49 barre + + * Modules/FindPythonLibs.cmake: Fynd Python debug lib in usual libs + dir too + +2001-11-28 11:12 hoffman + + * Source/: CMakeLists.txt, cmBorlandMakefileGenerator2.cxx, + cmBorlandMakefileGenerator2.h, cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmake.cxx: add new borland generator + +2001-11-28 10:51 hoffman + + * Source/cmaketest.cxx: [no log message] + +2001-11-28 07:15 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: bug: fix same path comparison when + short paths are used + +2001-11-28 07:14 hoffman + + * Source/cmMarkAsAdvancedCommand.cxx: fix warning + +2001-11-27 19:38 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: FIX: When + switching from one project to another the CacheGUI wasn't being + cleared. Values from one project were mixed into the other. + +2001-11-27 17:53 berk + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: ENH: nmake generator much closer to + working with spaces + +2001-11-27 17:32 berk + + * Source/cmMakefile.cxx: ENH: expand variables in a command before + escaping spaces in the command + +2001-11-27 17:31 berk + + * Source/cmOptionCommand.cxx: ENH: do not write over existing cache + values even doc strings to avoid changing the cache file + +2001-11-27 16:12 berk + + * Source/cmDSPWriter.cxx: remove unused include + +2001-11-27 15:34 martink + + * Source/MFCDialog/CMakeSetup.rc: adjusted spacing + +2001-11-27 15:33 martink + + * Source/cmLinkLibrariesCommand.cxx: removed extra lib paths to + avoid finding old libs + +2001-11-27 15:32 martink + + * Modules/FindTCL.cmake: made some vars advanced + +2001-11-27 15:20 martink + + * Modules/Dart.cmake: made some vars advanced + +2001-11-27 00:03 ibanez + + * Source/cmCommands.cxx: ENH: Command for running FLTK's UI tool + "Fluid" was added. + +2001-11-27 00:02 ibanez + + * Source/cmUnixMakefileGenerator.cxx: ENH: Support for FLTK Fluid + tool added. + +2001-11-26 23:57 ibanez + + * Modules/FindFLTK.cmake: ENH: Support for running FLUID was added. + +2001-11-26 22:40 ibanez + + * Source/: cmFLTKWrapUICommand.cxx, cmFLTKWrapUICommand.h: Command + for invoking FLTK's code generator "Fluid" during the building + process + +2001-11-26 18:26 hoffman + + * Modules/Dart.cmake, Source/CMakeLists.txt, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmCommands.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmUnixMakefileGenerator.cxx, + Source/cmakewizard.cxx, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, Source/MFCDialog/resource.h, + Templates/CMakeSystemConfig.cmake.in, + Templates/CMakeWindowsSystemConfig.cmake, + Source/cmMarkAsAdvancedCommand.cxx, + Source/cmMarkAsAdvancedCommand.h: ENH: add advanced variable + types and command line wizard gui + +2001-11-26 18:24 hoffman + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindLibraryCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h, + cmFindProgramCommand.cxx, cmFindProgramCommand.h: ENH: add + possibility to add doc strings to varibles created by find type + commands + +2001-11-26 16:32 berk + + * Source/cmCacheManager.cxx: Oops. The wrong version of the + duplicate code was kept. Loaded cache values were not made + internal. + +2001-11-26 15:45 berk + + * Modules/FindTCL.cmake: TK_INTERNAL_PATH is only needed on + Windows. + +2001-11-26 11:32 martink + + * Source/: cmSystemTools.cxx, cmSystemTools.h: removed warning + messages + +2001-11-26 11:31 martink + + * Source/cmIfCommand.cxx: better error messages + +2001-11-24 18:47 barre + + * Modules/Dart.cmake: I want to be able to start/end + experimental-only dashboards + +2001-11-21 17:45 hoffman + + * Source/: cmCacheManager.cxx, cmDSPWriter.cxx, + cmNMakeMakefileGenerator.cxx, cmSystemTools.cxx, cmSystemTools.h, + cmUnixMakefileGenerator.cxx, cmake.cxx, cmaketest.cxx: NMake with + spaces in directories + +2001-11-21 11:35 andy + + * Source/cmCacheManager.cxx: Fix the current directory check for + NMake + +2001-11-21 08:47 hoffman + + * Source/cmake.cxx: ENH: clean up command line arguments + +2001-11-21 08:46 hoffman + + * Source/: cmQTWrapUICommand.cxx, cmVariableRequiresCommand.cxx: + WAR: fix warning + +2001-11-20 17:50 hoffman + + * Source/: cmCacheManager.cxx, cmCacheManager.h, cmake.cxx, + cmake.h: ENH: add command line arguments to set cache entries + +2001-11-20 17:27 berk + + * Source/cmNMakeMakefileGenerator.cxx: ENH: closer to working with + spaces in source directory + +2001-11-20 17:27 berk + + * Source/cmaketest.cxx: BUG: fix memory leak + +2001-11-20 17:26 berk + + * Source/cmDSPWriter.cxx: BUG: fix for spaces in path to + CMakeList.txt file + +2001-11-20 08:28 hoffman + + * Source/: cmStandardIncludes.h, CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesStandardIncludes.h: define hacks and such + for the dec compiler + +2001-11-19 17:52 hoffman + + * Source/: cmCommands.cxx, cmSystemTools.cxx, cmSystemTools.h, + cmVariableRequiresCommand.cxx, cmVariableRequiresCommand.h, + MFCDialog/CMakeSetupDialog.cpp: ENH: add new command + VARIABLE_REQUIRES for better debugging of list files + +2001-11-19 09:34 hoffman + + * Source/: cmVariableRequiresCommand.cxx, + cmVariableRequiresCommand.h: [no log message] + +2001-11-19 09:20 hoffman + + * Source/MFCDialog/CMakeLists.txt: ENH: remove unused source files + +2001-11-16 16:42 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: look for cmake test with + .exe if nmake + +2001-11-16 16:29 hoffman + + * Source/MFCDialog/: CMakeLists.txt, CMakeSetup.dsp, CMakeSetup.rc, + CMakeSetupDialog.cpp, CMakeSetupDialog.h, MakeHelp.cpp, + MakeHelp.h, resource.h: face lift for GUI and some more help + +2001-11-16 16:28 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: ENH: fix for dll builds + +2001-11-16 13:08 bettingf + + * Source/cmUnixMakefileGenerator.cxx: Added a make depend in the + clean rule to refresh the dependencies + +2001-11-16 10:14 bettingf + + * Source/cmUnixMakefileGenerator.cxx: undo the last change because + of problem with some versions of make + +2001-11-16 09:40 bettingf + + * Modules/FindQt.cmake: fixed QT_UIC_EXE name + +2001-11-16 09:04 bettingf + + * Source/cmUnixMakefileGenerator.cxx: added the deletion of + cmake.depends in the cleaning so that it is recomputed even + source files (i.e. .cxx or .h) are generated + +2001-11-16 09:03 bettingf + + * Source/cmMakeDepend.cxx: Now adds dependency if the file doesn't + exist but will be created during the compilation + +2001-11-16 09:01 bettingf + + * Source/: cmQTWrapUICommand.cxx, cmQTWrapUICommand.h: corrected + path problem and added moc compilation too + +2001-11-15 22:10 hoffman + + * Source/Makefile.in: remove depend on star dot h as it is not + really needed and breaks some versions of gmake + +2001-11-15 18:18 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: ENH: use crazy temp files + for long command lines + +2001-11-15 17:45 hoffman + + * Source/cmNMakeMakefileGenerator.cxx: ENH: remove debug prints + +2001-11-15 17:11 hoffman + + * Modules/Dart.cmake, Source/cmBuildCommand.cxx, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.h, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, + Templates/CMakeNMakeWindowsSystemConfig.cmake, + Templates/CMakeSystemConfig.cmake.in, + Templates/CMakeWindowsBorlandConfig.cmake, + Templates/CMakeWindowsSystemConfig.cmake: closer to nmake + working, added CMAKE_MAKE_COMMAND instead of MAKECOMMAND used by + Dart, nmake makefiles work with borland make and nmake + +2001-11-15 14:54 millerjv + + * Modules/Dart.cmake: ENH: New make targets for Continuous builds. + Added a NightlyStart and NightlyUpdate target for unix builds as + well. + +2001-11-15 14:52 millerjv + + * DartConfig.cmake: ENH: Changed Nightly start time + +2001-11-15 09:55 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h, cmUnixMakefileGenerator.h, cmake.cxx: + ENH: fix library builds with nmake + +2001-11-15 09:00 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: wrong shortname used + +2001-11-15 08:43 hoffman + + * Source/cmaketest.cxx: BUG: fix build for cygwin + +2001-11-15 08:42 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: avoid .cxx.o names... + +2001-11-14 18:12 hoffman + + * Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, Source/cmake.cxx, + Source/cmaketest.cxx, Source/cmaketest.h.in, + Templates/CMakeNMakeWindowsSystemConfig.cmake: Closer to nmake + build + +2001-11-14 18:11 hoffman + + * Source/: cmNMakeMakefileGenerator.cxx, + cmNMakeMakefileGenerator.h: closer to nmake build + +2001-11-14 14:39 barre + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + CMakeSetupDialog.h, resource.h: Quick addition: "Create shortcut" + menu entry. + +2001-11-14 10:21 hoffman + + * Templates/CMakeNMakeWindowsSystemConfig.cmake, + Source/cmNMakeMakefileGenerator.cxx, + Source/cmNMakeMakefileGenerator.h, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h: nmake support + +2001-11-14 09:56 king + + * Source/CursesDialog/ccmake.cxx: ERR: Re-ordered includes to fix + macro conflict for gcc 3.0. + +2001-11-14 09:55 king + + * Source/CursesDialog/form/frm_driver.c: ERR: Fixed compiler + warning for gcc 3.0. + +2001-11-14 09:22 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: remove debug statements + +2001-11-14 08:49 hoffman + + * Source/FLTKDialog/CMakeSetupGUI.cxx: ENH: remove warning + +2001-11-13 18:23 hoffman + + * Source/: CMakeLib.dsp, CMakeLists.txt, + cmNMakeMakefileGenerator.cxx, cmNMakeMakefileGenerator.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: start + work on nmake generator + +2001-11-13 15:54 hoffman + + * Source/: cmUnixMakefileGenerator.h, cmUnixMakefileGenerator.cxx: + clean up object file build rule, and do not attempt to remove + link_directories that are in the build tree + +2001-11-13 14:22 martink + + * Source/: CMakeLists.txt, CursesDialog/CMakeLists.txt: fixes to + curses stuff + +2001-11-13 12:42 hoffman + + * Source/CursesDialog/form/fty_num.c: warnings + +2001-11-13 12:38 hoffman + + * Source/: cmCacheManager.cxx, cmForEachCommand.cxx, + cmIncludeExternalMSProjectCommand.cxx, cmMakefile.cxx, + cmSystemTools.cxx, cmUnixMakefileGenerator.cxx, + FLTKDialog/CMakeSetupGUI.cxx, FLTKDialog/CMakeSetupGUI.h, + FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: clean up + warnings + +2001-11-13 12:25 hoffman + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, FLTKPropertyItemRow.cxx: + WAR: fix compile warnings + +2001-11-13 12:21 hoffman + + * Source/cmAddDependenciesCommand.h: ENH: fix spelling error + +2001-11-13 12:21 hoffman + + * Source/CursesDialog/cmCursesMainForm.cxx: ENH: remove warnings + +2001-11-12 15:37 king + + * Source/cmMakeDepend.cxx: ENH: + cmMakeDepend::GenerateDependInformation will now use hints + regardless of whether the actual file exists. This can be used + to add dependencies to .h files which are generated but included + in hand-written .cxx files. If the .cxx does exist, though, it + will be used first, and the hints will be used afterward. + +2001-11-12 09:21 martink + + * Source/cmDSPWriter.cxx: minor fix + +2001-11-10 23:01 ibanez + + * Modules/FindX11.cmake: Module to search for the installation + of X11 + +2001-11-09 16:16 berk + + * Source/CursesDialog/: CMakeLists.txt, ccmake.cxx, ccurses.cxx: + Renaming ccurses to ccmake. + +2001-11-09 16:15 barre + + * Modules/FindSelfPackers.cmake: Self-packers + +2001-11-09 16:05 berk + + * Source/: CMakeLists.txt, CursesDialog/CMakeLists.txt, + CursesDialog/cmCursesStandardIncludes.h, + CursesDialog/form/frm_driver.c, CursesDialog/form/frm_req_name.c: + Trying to fix curses. + +2001-11-09 13:00 martink + + * Source/cmDSPWriter.cxx, Source/cmDSPWriter.h, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: support for custom targets + on exe and lib + +2001-11-09 12:08 bettingf + + * Modules/FindQt.cmake: support for compilation of .ui files into + .h and .cxx files + +2001-11-09 12:07 bettingf + + * Source/: cmQTWrapCPPCommand.cxx, cmQTWrapCPPCommand.h: cleanups + +2001-11-09 12:02 bettingf + + * Source/: cmQTWrapUICommand.h, cmQTWrapUICommand.cxx, + cmCommands.cxx, cmUnixMakefileGenerator.cxx: support for + compilation of .ui files into .h and .cxx files + +2001-11-09 10:42 barre + + * Source/cmAddCustomCommandCommand.cxx: SOURCE, COMMAND, TARGET are + required now + +2001-11-09 10:37 barre + + * Source/cmAddCustomCommandCommand.h: SOURCE, COMMAND, TARGET are + required now + +2001-11-09 10:33 barre + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h: Reimplement code. Since a custom + command is very flexible and might be extended in the future, + make all arguments prefixed with arg type, make ordering + irrelevant and potentially all args optional. + +2001-11-08 17:30 berk + + * Source/CursesDialog/form/: frm_driver.c, frm_req_name.c: Trying + to fix curses problems. + +2001-11-08 17:25 berk + + * Source/CursesDialog/form/: frm_driver.c, frm_req_name.c: Fixing + problems with curses headers. + +2001-11-08 17:17 berk + + * Source/CursesDialog/form/: frm_driver.c, frm_req_name.c: Trying + to fix curses problems. + +2001-11-08 17:10 berk + + * Source/CursesDialog/form/form.h: Oops. + +2001-11-08 17:03 berk + + * CMakeLists.txt, Source/CursesDialog/CMakeLists.txt, + Source/CursesDialog/form/CMakeLists.txt, + Source/CursesDialog/form/form.h, + Source/CursesDialog/form/nc_alloc.h: Changes to remove warnings + and fix dependencies. + +2001-11-08 15:09 martink + + * Source/cmDSWWriter.cxx: a better fix maybe + +2001-11-08 14:44 hoffman + + * Source/cmDSWWriter.cxx: make sure custom targets are in the + ALL_BUILD + +2001-11-08 14:34 barre + + * Source/cmAddCustomCommandCommand.cxx: Fix number of params and + expand vars in all args + +2001-11-08 11:50 barre + + * Source/cmSourceFilesCommand.cxx: Fix bug. Was using unexpanded + var instead of copy + +2001-11-08 11:40 barre + + * Source/cmAddLibraryCommand.cxx: Break the "to infinity and + beyond" stuff + +2001-11-08 10:48 barre + + * Source/cmAddLibraryCommand.cxx: Expand var in srclist name too + +2001-11-08 10:40 barre + + * Source/cmSourceFilesCommand.cxx: Expand var in name too + +2001-11-08 09:16 barre + + * Source/cmAddDependenciesCommand.cxx: Expand variables in all + target args + +2001-11-08 08:42 berk + + * Source/cmUnixMakefileGenerator.cxx: Needed to replace srcdir to + make install targets work. + +2001-11-07 17:12 hoffman + + * Templates/: configure, configure.in: put back + CMAKE_TEMPLATE_FLAGS + +2001-11-07 17:04 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: no +=+ + +2001-11-07 16:47 andy + + * Source/: cmAddCustomCommandCommand.cxx, + cmAddCustomCommandCommand.h, cmCommands.cxx: Added accessor for + add custom command + +2001-11-07 16:07 barre + + * Modules/FindUnixCommands.cmake: Add cp (CP) + +2001-11-07 15:57 hoffman + + * configure, configure.in, Source/cmUnixMakefileGenerator.cxx, + Templates/configure, Templates/configure.in: remove template + flags from cmake, no ptused, or -instance=static + +2001-11-07 15:57 hoffman + + * Source/CursesDialog/cmCursesStandardIncludes.h: Trying to fix + curses problems with some systems. + +2001-11-07 15:01 berk + + * Source/CursesDialog/cmCursesStandardIncludes.h: Trying to fix + build problems related to curses. + +2001-11-07 14:55 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: use full source name for + c code as well as c++ + +2001-11-07 14:44 hoffman + + * Source/CursesDialog/ccurses.cxx: use cmake as the executable for + cmake and not ccurses + +2001-11-07 14:44 hoffman + + * Source/cmUnixMakefileGenerator.cxx: make sure default_target is + first + +2001-11-07 13:46 hoffman + + * CMakeLists.txt: ENH: add ansi flag for c compiler + +2001-11-07 12:23 hoffman + + * Source/cmMessageCommand.cxx: Allow multiline messages + +2001-11-07 09:54 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + Clean up a bit more + +2001-11-07 09:29 hoffman + + * Source/cmCacheManager.cxx: One more time... case does not matter + on cygwin + +2001-11-06 16:14 hoffman + + * Source/cmExecProgramCommand.h: ENH: fix doc string + +2001-11-06 15:29 bettingf + + * Source/: cmQTWrapCPPCommand.cxx, cmUnixMakefileGenerator.cxx: add + cleaning of QT generated files when make clean is used + +2001-11-06 12:03 hoffman + + * Source/CursesDialog/: ccurses.cxx, cmCursesMainForm.cxx, + cmCursesMainForm.h: ENH: tell cmake object where cmake is + +2001-11-06 09:35 hoffman + + * Source/: cmCableWrapTclCommand.cxx, cmQTWrapCPPCommand.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx: BUG: CustomCommand has to use full path + to Source file now + +2001-11-06 08:40 hoffman + + * Source/CursesDialog/form/: fld_type.c, form.h: Removed a function + which used va_start (did not compile on Sun with gcc) + +2001-11-05 22:10 berk + + * Source/CursesDialog/: ccurses.cxx, cmCursesBoolWidget.cxx, + cmCursesLabelWidget.cxx, cmCursesMainForm.cxx, + cmCursesMainForm.h, cmCursesStringWidget.cxx: Many improvements. + +2001-11-05 16:38 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: use full paths for + object compile rules + +2001-11-05 15:55 berk + + * Source/: CMakeLists.txt, CursesDialog/cmCursesMainForm.cxx: + Re-enabling curses support. + +2001-11-05 15:39 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: change to work with + nmake + +2001-11-05 13:22 berk + + * Modules/FindCurses.cmake, Source/CursesDialog/CMakeLists.txt, + Source/CursesDialog/cmCursesForm.h, + Source/CursesDialog/cmCursesLabelWidget.h, + Source/CursesDialog/cmCursesMainForm.h, + Source/CursesDialog/cmCursesWidget.h, + Source/CursesDialog/form/frm_driver.c, + Source/CursesDialog/form/frm_req_name.c, + Source/CursesDialog/cmCursesStandardIncludes.h: HPUX support. + +2001-11-05 12:57 lorensen + + * Source/cmIncludeExternalMSProjectCommand.cxx: ERR: ^M's removed. + +2001-11-05 11:52 berk + + * Source/CursesDialog/form/: CMakeLists.txt, READ.ME, eti.h, + fld_arg.c, fld_attr.c, fld_current.c, fld_def.c, fld_dup.c, + fld_ftchoice.c, fld_ftlink.c, fld_info.c, fld_just.c, fld_link.c, + fld_max.c, fld_move.c, fld_newftyp.c, fld_opts.c, fld_pad.c, + fld_page.c, fld_stat.c, fld_type.c, fld_user.c, form.h, + form.priv.h, frm_cursor.c, frm_data.c, frm_def.c, frm_driver.c, + frm_hook.c, frm_opts.c, frm_page.c, frm_post.c, frm_req_name.c, + frm_scale.c, frm_sub.c, frm_user.c, frm_win.c, fty_alnum.c, + fty_alpha.c, fty_enum.c, fty_int.c, fty_ipv4.c, fty_num.c, + fty_regex.c, llib-lform, mf_common.h, nc_alloc.h: Adding form + library. + +2001-11-05 11:52 berk + + * Source/: CMakeLists.txt, CursesDialog/CMakeLists.txt, + CursesDialog/cmCursesCacheEntryComposite.h, + CursesDialog/cmCursesLabelWidget.h, + CursesDialog/cmCursesMainForm.cxx, + CursesDialog/cmCursesMainForm.h, CursesDialog/cmCursesWidget.h: + Fixing problems on Sun (name collusions between STL and curses) + and disabling curses temporarily. + +2001-11-05 10:42 andy + + * Source/CMakeLists.txt: Fix the IF IF problem + +2001-11-05 08:37 berk + + * Source/CursesDialog/: ccurses.cxx, + cmCursesCacheEntryComposite.cxx, cmCursesCacheEntryComposite.h, + cmCursesLabelWidget.h, cmCursesMainForm.cxx, cmCursesMainForm.h, + cmCursesWidget.h: ERR: To include cmake headers, one should use + ../ + +2001-11-05 05:43 pcp + + * Source/: cmDSPWriter.cxx, cmDSWWriter.cxx: switched + string::compare to strncmp + +2001-11-04 18:10 berk + + * Source/CursesDialog/cmCursesMainForm.h: Need to include standard + headers. + +2001-11-04 18:05 berk + + * Source/CursesDialog/: CMakeLists.txt, cmCursesBoolWidget.h, + cmCursesCacheEntryComposite.h, cmCursesDummyWidget.h, + cmCursesFilePathWidget.h, cmCursesForm.h, cmCursesLabelWidget.h, + cmCursesMainForm.h, cmCursesPathWidget.h, cmCursesStringWidget.h, + cmCursesWidget.h, ccurses.cxx, cmCursesBoolWidget.cxx, + cmCursesCacheEntryComposite.cxx, cmCursesDummyWidget.cxx, + cmCursesFilePathWidget.cxx, cmCursesForm.cxx, + cmCursesLabelWidget.cxx, cmCursesMainForm.cxx, + cmCursesPathWidget.cxx, cmCursesStringWidget.cxx, + cmCursesWidget.cxx: Adding curses support. + +2001-11-04 18:00 berk + + * Modules/FindCurses.cmake, Source/CMakeLists.txt: Adding curses + support. + +2001-11-02 22:32 barre + + * Source/: cmIncludeDirectoryCommand.cxx, + cmIncludeDirectoryCommand.h, cmMakefile.cxx, cmMakefile.h: Add + optional BEFORE param to INCLUDE_DIRECTORIES so that include dirs + can be specified before the actual include dirs + +2001-11-02 16:44 barre + + * Utilities/Doxygen/: CMakeLists.txt, doc_makeall.sh.in: Update + +2001-11-02 16:43 barre + + * Modules/: Documentation.cmake, DocumentationVTK.cmake, + FindCygwin.cmake, FindPerl.cmake, FindUnixCommands.cmake, + FindWget.cmake: Move usual Unix commands to FindUnixCommands, use + FingCygwin in other modules + +2001-11-02 16:05 barre + + * Utilities/: CMakeLists.txt, Doxygen/CMakeLists.txt, + Doxygen/doc_makeall.sh.in, Doxygen/doxyfile.in: Doxygen doc + generator + +2001-11-02 16:01 barre + + * CMakeLists.txt: Doxygen doc generator + +2001-11-02 15:26 blezek + + * Modules/Dart.cmake: ENH: More Experimental targets for unix + +2001-11-02 11:19 pcp + + * Source/: cmDSWWriter.cxx, cmIncludeExternalMSProjectCommand.cxx, + cmDSPWriter.cxx: allow more than one external MS project + +2001-11-02 09:18 andy + + * Source/cmCacheManager.cxx: On win32 path is all in lower case now + +2001-11-01 18:37 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: clean up interface and change build in current directory to + build the depend file first + +2001-11-01 18:36 hoffman + + * Source/cmCacheManager.cxx: BUG: use collapse full path when + testing cache directory + +2001-11-01 18:36 hoffman + + * Source/cmDSPWriter.cxx: ENH: IntDir to INTDIR + +2001-11-01 13:09 barre + + * Source/: cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx: + Expand vars in exe and lib name + +2001-11-01 10:42 hoffman + + * Source/cmCacheManager.cxx: ENH: clean up drive letter check + +2001-10-31 18:56 king + + * Source/: cmCableClassSet.cxx, cmCableClassSet.h: ENH: Added + automatic detection of >> sequences in template names and + replacement with "> >" in the output. + +2001-10-31 18:56 king + + * Source/cmStandardIncludes.h: ENH: Replaced cmStdString + implementation to make it more transparently a std:string. + +2001-10-31 07:03 pcp + + * Source/: cmCommands.cxx, cmDSPWriter.cxx, cmDSWWriter.cxx, + cmDSWWriter.h, cmIncludeExternalMSProjectCommand.cxx, + cmIncludeExternalMSProjectCommand.h: INCLUDE_EXTERNAL_MSPROJECT + command + +2001-10-30 18:32 ibanez + + * Source/FLTKDialog/: FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h: FIX: Reverted to use + FillCacheManagerFromGUI(). + +2001-10-30 14:36 andy + + * Source/cmCacheManager.cxx: Fix the problem on windows of capital + or lower case drive letter for CMAKE_CACHEFILE_DIR + +2001-10-30 14:15 andy + + * Source/cmCacheManager.cxx: Change CMAKE_CURRENT_CWD to + CMAKE_CACHEFILE_DIR and change the messages + +2001-10-30 14:05 hoffman + + * Source/: cmConfigureFileCommand.cxx, cmConfigureFileCommand.h, + cmMakefile.cxx, cmMakefile.h: ENH: add an option to configure + file command that allows for only expansion of at variables and + not dollar variables + +2001-10-30 04:33 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: FIX: In order + to disable a button in fl_choice, a 0 pointer must be sent + instead of "". + +2001-10-29 21:22 ibanez + + * Source/FLTKDialog/: FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h: ENH: FillCacheManagerFromGUI() was + replaced by SaveFromCacheGUI() to ensure that changes on the + GUI are directly update in the config file. + +2001-10-29 21:20 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: fl_ask + replaced by fl_choice in FLTKCallback. + +2001-10-29 10:41 hoffman + + * Source/: cmSystemTools.cxx, + FLTKDialog/CMakeSetupGUIImplementation.cxx, + MFCDialog/CMakeSetupDialog.cpp: ENH: use callback not ifdef for + MFC message box errors + +2001-10-29 10:19 hoffman + + * Source/: cmCacheManager.cxx, cmSystemTools.cxx, cmSystemTools.h, + FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: add callback for + message display + +2001-10-28 18:52 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, CMakeSetupGUI.fl: ENH: + Button were renamed : "Configure", "OK" and "Cancel" as the MFC + version. + +2001-10-27 23:47 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, CMakeSetupGUI.fl, + CMakeSetupGUI.h, CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h, FLTKPropertyItemRow.cxx, + FLTKPropertyList.cxx, FLTKPropertyList.h: ENH: Updated with + respect to MFC CMakeSetup. New cache entries are now colored + in red. The browsers for recent directories only popup if + there is at least one in the list. + +2001-10-26 18:21 hoffman + + * Modules/FindITK.cmake: [no log message] + +2001-10-26 17:06 berk + + * Templates/: CMakeSystemConfig.cmake.in, configure, configure.in: + added CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION + +2001-10-26 15:42 hoffman + + * Source/: cmConfigureFileCommand.cxx, cmMakefile.h, cmaketest.cxx: + add dependency for configure files and use short path in WIN32 + cmake test + +2001-10-26 14:35 hoffman + + * Modules/FindVTK.cmake: use find_file and not just a set for + USE_VTK_FILE + +2001-10-26 11:22 barre + + * Modules/DocumentationVTK.cmake: VTK documentation framework + +2001-10-26 09:29 andy + + * Source/cmCacheManager.cxx: Added check if the binary directory + changed. If it did, it will print the warning message + +2001-10-24 20:37 barre + + * Modules/FindCygwin.cmake: Add GZIP (gzip) + +2001-10-24 20:33 barre + + * Modules/FindCygwin.cmake: Add TAR (path to tar or gtar) + +2001-10-24 17:51 berk + + * Source/cmUnixMakefileGenerator.cxx: ENH: allow -framework as a + complete entry in the link line for Mac OSX + +2001-10-24 15:51 berk + + * DartConfig.cmake: public no longer has anonymous ftp. + +2001-10-24 09:41 king + + * Modules/FindGCCXML.cmake: ENH: Improved FIND_PROGRAM call to find + the executable in PREFIX/share/GCC_XML, the new standard install + location. + +2001-10-23 18:30 barre + + * Modules/FindCygwin.cmake: Cygwin mod + +2001-10-23 17:49 barre + + * Source/: cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h: The result of this utility + command can now be optionally added to the cache + +2001-10-23 17:47 barre + + * Modules/FindDoxygen.cmake: Find Graphivz's dot too + +2001-10-23 17:06 barre + + * Modules/: FindDoxygen.cmake, FindWget.cmake: Add Doxygen and Wget + modules. Very simple. But might be more complex later, so let's + use them asap + +2001-10-23 16:55 barre + + * Modules/: FindHhc.cmake, FindPerl.cmake: Modules to find Perl and + the HTML Help Compiler + +2001-10-19 10:07 barre + + * Source/cmEnableTestingCommand.h: Add warning regarding the + location of ENABLE_TESTING (should be in the top CMakeList.txt, + otherwise Dart is lost) + +2001-10-18 18:01 barre + + * Source/cmSiteNameCommand.cxx: SITE_NAME should return the most + qualified name of the host. If nslookup works, now the domain is + appended to the hostname (whereas it *replaced* the host name + before) + +2001-10-18 13:51 iscott + + * Source/cmQTWrapCPPCommand.cxx: Detect error and output useful + message Previously it would have got confused about the + destinationSourceGroup + +2001-10-18 13:03 iscott + + * Source/cmFindFileCommand.cxx: This command should always set the + cahce variabel to a filepath not a path + +2001-10-17 15:11 barre + + * Source/cmProjectCommand.cxx: Add PROJECT_NAME to the set of + definitions + +2001-10-16 15:40 iscott + + * Modules/FindQt.cmake: fixed some stupid mistakes I thought I had + tested these - honest + +2001-10-16 15:32 iscott + + * Modules/: FindQt.cmake, LinkQT.cmake: Some simple modules for + finding and linking qt + +2001-10-15 18:37 hoffman + + * Source/cmMessageCommand.cxx: ENH: expand variables in message + command output + +2001-10-15 18:36 hoffman + + * Source/cmSourceFile.cxx: ENH: clean up error report for source + files not found + +2001-10-15 14:19 iscott + + * CMake.rtf, Source/cmCommands.cxx, Source/cmQTWrapCPPCommand.cxx, + Source/cmQTWrapCPPCommand.h: added a QT_WRAP_CPP command + +2001-10-11 17:20 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Improved parsing of + GCCXML_FLAGS to improve generation of gccxml rule. Also added + ADD_DEFINITIONS arguments to the generated rule. + +2001-10-11 14:57 andy + + * Source/cmCacheManager.cxx: Added removing of spaces in + CMakeCache.txt in front of comments and variables + +2001-10-10 10:22 hoffman + + * Source/cmCacheManager.cxx: ENH: add a warning comment for cache + values that can not be changed because they are always loaded + from another cache + +2001-10-09 22:18 biddi + + * Source/cmBorlandMakefileGenerator.cpp: FIX: Same as last checkin + except applies to bpi files as wellas lib files If we can't find + it - and it's not a target - and it has no path already + specified, it must be in OUTDIRLIB from another makefile in the + same project ! (What this really means is the lib paths are + correctly specified) + +2001-10-09 10:25 hoffman + + * Source/cmSystemTools.cxx: ENH: better fix for dos return in + lines, use the regular expression and don't edit the input line + +2001-10-05 17:31 hoffman + + * Source/cmSystemTools.cxx: ENH: clean up returns from input, so we + can read dos files on unix + +2001-10-04 09:32 starreveld + + * Templates/: configure, configure.in: + + ERR: remove undefined warning for compatibility with new 10.1 + linker + +2001-10-03 15:49 hoffman + + * Modules/Dart.cmake, Source/CMakeLists.txt, Source/cmake.cxx, + Source/cmaketest.cxx: ENH: fixes for borland compiler testing + +2001-10-03 11:36 king + + * Modules/FindCABLE.cmake: ENH: Changed CABLE_BUILD_DIR to look for + cableVersion.h instead of cable.README.txt. + +2001-10-02 23:10 biddi + + * Source/cmBorlandMakefileGenerator.cpp: FIX:if we can't find it - + and it's not a target - and it has no path already specified, it + must be in OUTDIRLIB from another makefile in the same project ! + (What this really means is the lib paths are correctly specified) + +2001-10-02 17:28 hoffman + + * Source/: cmListFileCache.cxx, cmMakefile.cxx, cmSystemTools.cxx, + cmSystemTools.h, ctest.cxx: ENH: add better error reports in + parsing cmake files, like what file has the error + +2001-10-01 13:35 martink + + * Source/: cmMakefile.h: version + +2001-10-01 13:26 hoffman + + * ChangeLog.txt: [no log message] + +2001-10-01 11:55 hoffman + + * Source/cmaketest.cxx: BUG: add missing include + +2001-10-01 10:14 hoffman + + * Source/: cmaketest.cxx, MFCDialog/CMakeSetupDialog.cpp: ENH: + change checkboxes back to pull down menus, remove leak + +2001-09-29 11:12 hoffman + + * Source/cmSystemTools.cxx: BUG: fix full path for file in current + directory + +2001-09-28 13:35 berk + + * Source/cmSystemTools.cxx: BUG: fix realpath problem again... + +2001-09-28 12:14 berk + + * Source/cmSystemTools.cxx: BUG: separate path from file name + before calling realpath + +2001-09-28 10:40 hoffman + + * Source/: cmSystemTools.cxx, cmUnixMakefileGenerator.cxx: BUG: get + correct library name + +2001-09-28 10:34 hoffman + + * CMakeLists.txt: BUG: optional in wrong order + +2001-09-28 09:57 hoffman + + * CMakeLists.txt: make the include of the initial config flags + optional, for builds that do not use configure + +2001-09-27 16:50 hoffman + + * Source/: cmSystemTools.cxx, cmUnixMakefileGenerator.cxx: BUG: use + realpath instead of cd/pwd + +2001-09-27 15:54 hoffman + + * CMakeLists.txt, Source/CMakeLists.txt: BUG: fix install prefix + +2001-09-27 14:58 hoffman + + * configure, configure.in, Source/CMakeLists.txt, + Source/InitialConfigureFlags.cmake.in: ENH: pass prefix from + configure into cmake + +2001-09-26 16:23 berk + + * Modules/Dart.cmake: Typo. + +2001-09-25 14:39 martink + + * Modules/FindVTK.cmake: changes to chamghe + +2001-09-25 14:39 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: improved registry handling + +2001-09-25 11:06 martink + + * Source/cmVTKWrapTclCommand.cxx: memory leak + +2001-09-21 11:48 martink + + * Modules/FindVTK.cmake: better install targets + +2001-09-21 09:40 king + + * Source/cmSystemTools.cxx: BUG: CopyFile should return immediately + after an error occurs. + +2001-09-20 17:31 martink + + * Modules/FindVTK.cmake: updates + +2001-09-20 16:43 berk + + * Source/ctest.cxx: handle spaces in commands and args + +2001-09-20 15:29 martink + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PropertyList.cpp, + PropertyList.h: ENH: check for values that switch to internal, + can happen with a load cache command + +2001-09-20 15:08 hoffman + + * Source/: cmAbstractFilesCommand.cxx, cmAbstractFilesCommand.h, + cmAddCustomTargetCommand.cxx, cmAddCustomTargetCommand.h, + cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmAddDependenciesCommand.cxx, cmAddDependenciesCommand.h, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddTestCommand.cxx, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.cxx, cmAuxSourceDirectoryCommand.h, + cmBuildCommand.cxx, cmBuildCommand.h, cmBuildNameCommand.cxx, + cmBuildNameCommand.h, cmCableClassSetCommand.cxx, + cmCableClassSetCommand.h, cmCableWrapTclCommand.cxx, + cmCableWrapTclCommand.h, cmCommand.h, cmConfigureFileCommand.cxx, + cmConfigureFileCommand.h, cmConfigureGccXmlCommand.cxx, + cmConfigureGccXmlCommand.h, cmElseCommand.cxx, cmElseCommand.h, + cmEnableTestingCommand.h, cmEndForEachCommand.cxx, + cmEndForEachCommand.h, cmEndIfCommand.cxx, cmEndIfCommand.h, + cmExecProgramCommand.cxx, cmExecProgramCommand.h, + cmFindFileCommand.cxx, cmFindFileCommand.h, + cmFindLibraryCommand.cxx, cmFindLibraryCommand.h, + cmFindPathCommand.cxx, cmFindPathCommand.h, + cmFindProgramCommand.cxx, cmFindProgramCommand.h, + cmForEachCommand.cxx, cmForEachCommand.h, + cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeCommand.h, + cmIncludeDirectoryCommand.cxx, cmIncludeDirectoryCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.cxx, + cmInstallFilesCommand.h, cmInstallProgramsCommand.cxx, + cmInstallProgramsCommand.h, cmInstallTargetsCommand.cxx, + cmInstallTargetsCommand.h, cmLibraryCommand.h, + cmLinkDirectoriesCommand.cxx, cmLinkDirectoriesCommand.h, + cmLinkLibrariesCommand.cxx, cmLinkLibrariesCommand.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h, + cmMakeDirectoryCommand.cxx, cmMakeDirectoryCommand.h, + cmMakefile.cxx, cmMakefile.h, cmMessageCommand.cxx, + cmMessageCommand.h, cmOptionCommand.cxx, cmOptionCommand.h, + cmOutputRequiredFilesCommand.cxx, cmOutputRequiredFilesCommand.h, + cmProjectCommand.cxx, cmProjectCommand.h, cmSetCommand.cxx, + cmSetCommand.h, cmSiteNameCommand.cxx, cmSiteNameCommand.h, + cmSourceFilesCommand.cxx, cmSourceFilesCommand.h, + cmSourceFilesRemoveCommand.cxx, cmSourceFilesRemoveCommand.h, + cmSourceGroupCommand.cxx, cmSourceGroupCommand.h, + cmSubdirCommand.cxx, cmSubdirCommand.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h, + cmUseMangledMesaCommand.cxx, cmUseMangledMesaCommand.h, + cmUtilitySourceCommand.cxx, cmUtilitySourceCommand.h, + cmVTKWrapJavaCommand.cxx, cmVTKWrapJavaCommand.h, + cmVTKWrapPythonCommand.cxx, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h, + cmWrapExcludeFilesCommand.cxx, cmWrapExcludeFilesCommand.h: ENH: + change InitialPass to take a const reference to the argument + string, to avoid changes to the file cache + +2001-09-20 13:44 martink + + * Source/cmMakefile.cxx: BUG: make a copy of the arguments before + passing them to Execute + +2001-09-20 12:00 martink + + * CMake.rtf: fixed some problems + +2001-09-20 10:57 king + + * Modules/FindCABLE.cmake: ENH: Added support for finding cable + when it is built in a configuration subdirectory by MSVC. + +2001-09-20 10:54 king + + * Source/: cmFindFileCommand.cxx, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h: ENH: Added + cmSystemTools::GlobDirs function to allow wildcards in paths + (like /foo/bar/*). + +2001-09-20 10:53 king + + * Source/cmSetCommand.cxx: ENH: Added extra newline in an error + message to improve readability. + +2001-09-20 10:27 martink + + * Modules/FindVTK.cmake: minor changes + +2001-09-20 09:11 martink + + * Modules/: FindVTK.cmake, UseVTKIncludes.cmake, + UseVTKLibraries.cmake: removed some VTK stuff + +2001-09-19 14:52 martink + + * Modules/: FindVTK.cmake, UseVTKIncludes.cmake, + UseVTKLibraries.cmake: updated to how FindVTK works + +2001-09-19 14:20 martink + + * Source/cmMakefile.h: version rev to 95 + +2001-09-19 14:20 martink + + * Source/cmMakefile.h: version rev to 94 + +2001-09-18 10:45 hoffman + + * ChangeLog.txt: [no log message] + +2001-09-18 10:38 will + + * CMake.pdf: ENH:Updated documentation + +2001-09-17 17:40 hoffman + + * CMake.rtf: ENH: update for new version + +2001-09-17 16:36 hoffman + + * Source/: cmUseMangledMesaCommand.cxx, cmUseMangledMesaCommand.h: + ENH: change to take a path as input + +2001-09-17 16:34 hoffman + + * Source/cmFindFileCommand.cxx: BUG: fix return when file is not + found + +2001-09-17 14:16 king + + * Modules/FindCABLE.cmake: ENH: Added find support for looking at + Cable's build directory if the user sets the CABLE_BUILD_DIR + cache entry. + +2001-09-17 13:58 hoffman + + * Source/: cmCommands.cxx, cmUseMangledMesaCommand.cxx, + cmUseMangledMesaCommand.h: ENH: add Use mangled mesa command + +2001-09-17 12:07 blezek + + * Modules/Dart.cmake: ENH: NightlyCoverage got lost + +2001-09-14 16:36 martink + + * Source/: cmVTKWrapTclCommand.cxx, cmVTKWrapJavaCommand.cxx, + cmVTKWrapPythonCommand.cxx: now uses five argument version of + wrap commands + +2001-09-14 16:26 hoffman + + * Source/: cmMakefileGenerator.cxx, cmStandardIncludes.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h, + cmakemain.cxx, MFCDialog/CMakeSetupDialog.cpp: remove memory + leaks + +2001-09-14 15:18 hoffman + + * Source/cmDSPWriter.cxx: fix error in cygwin + +2001-09-14 15:18 hoffman + + * Source/cmListFileCache.h: initialize class + +2001-09-14 15:18 hoffman + + * Source/: cmMakefileGenerator.cxx, cmMakefileGenerator.h: add + support for clean up + +2001-09-14 10:14 martink + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityHeader.dsptemplate, + staticLibHeader.dsptemplate: made Debug the default configuration + +2001-09-14 08:34 barre + + * Modules/FindTCL.cmake: move cygtclsh80 to the end of list, + otherwise it might be found while the non-cygwin wish8x.exe will + be found too. If wish8x.exe is found, then the non-cygwin + tclsh8x.exe must be found too. + +2001-09-13 14:45 martink + + * Modules/Dart.cmake: added back some targets for UNIX + +2001-09-13 11:27 martink + + * Source/: cmSystemTools.h, cmSystemTools.cxx: added shortest ext + function + +2001-09-12 17:09 lorensen + + * Source/cmSiteNameCommand.cxx: ENH: drop the case of the site + name. This makes it consistent with Dart's usage. + +2001-09-12 17:09 lorensen + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added LowerCase + method. + +2001-09-12 15:18 king + + * Source/: cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h: ENH: + Added parsing of gccxml flags into separate arguments for setting + the custom command. This is necessary since the custom command + now takes a vector of individual command line options instead of + a single string. + +2001-09-11 21:46 biddi + + * Templates/CMakeWindowsBorlandConfig.cmake: ERR: Spelling + +2001-09-11 21:45 biddi + + * Source/: cmBorlandMakefileGenerator.cpp, + cmBorlandMakefileGenerator.h, cmSystemTools.cxx: ERR: Change to + EscapeSpaces forces rework of Borland generator Add clause + to prevent adding quotes when they're already present, then stuff + them onto all lib paths to prevent forward slashes causing + trouble. + +2001-09-11 20:00 biddi + + * Source/: cmBorlandMakefileGenerator.cpp, + cmBorlandMakefileGenerator.h: ENH: Major fix of the Borland + generator which addresses the problem of libraries with + dependencies (other libraries) not linking when required. + Dependency checking required the full path to be supplied to each + file when they're not in the current directory (very tedious). + All seems to be working nicely now. + +2001-09-11 19:58 biddi + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Add a findfile + routine (as opposed to find executable or library) which doesn't + add any extensions - Borland make needs full paths to certain + dependencies otherwise linking doesn't work properly + (dependencies aren't checked) + +2001-09-11 15:17 martink + + * Source/ctest.cxx: updated testing + +2001-09-11 14:58 martink + + * Source/cmDSPWriter.cxx: include fixes + +2001-09-11 14:43 martink + + * Modules/Dart.cmake: reduced the number of targets + +2001-09-11 14:42 martink + + * Source/cmaketest.cxx: bug in testing code + +2001-09-11 13:44 hoffman + + * Source/cmBorlandMakefileGenerator.cpp: BUG: fix build with + non-borland compiler + +2001-09-11 13:40 martink + + * Source/cmDSPWriter.cxx: fix for include paths + +2001-09-10 15:11 martink + + * Modules/Dart.cmake: reduced targets and merged tclsh commands + +2001-09-10 15:11 martink + + * Source/: cmCableWrapTclCommand.cxx, cmDSPWriter.cxx, + cmMakefile.cxx, cmMakefile.h, cmSystemTools.cxx, + cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx: various windows fixes + +2001-09-10 11:03 berk + + * Source/CMakeLists.txt: Typo in link command. + +2001-09-08 12:09 biddi + + * Source/: cmBorlandMakefileGenerator.cpp, + cmBorlandMakefileGenerator.h: ERR: Forgot to put back a backslash + +2001-09-08 10:02 biddi + + * Source/cmBorlandMakefileGenerator.cpp: ERR: LINK_DIR must ot have + backslah at end. Fix plus cleanup of some code. + +2001-09-07 10:08 martink + + * Source/cmDirectory.cxx: fixed bug in mismatched directory opens + consuming file descriptors + +2001-09-07 09:40 king + + * Source/cmConfigureGccXmlCommand.cxx: ENH: Removed addition of + compiler support directory include option since the + find_*_options scripts now include it automatically. + +2001-09-06 18:02 hoffman + + * Source/: CMakeLists.txt, cmBorlandMakefileGenerator.cpp: BUG: + clean up lib and exe output paths + +2001-09-06 17:28 hoffman + + * Source/CMakeLib.dsp, Source/cmBorlandMakefileGenerator.cpp, + Source/cmBorlandMakefileGenerator.h, + Source/cmMSProjectGenerator.h, Source/cmMakefileGenerator.cxx, + Source/cmMakefileGenerator.h, Source/cmUnixMakefileGenerator.h, + Source/cmake.cxx, Source/cmake.h, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, Source/MFCDialog/resource.h, + Templates/CMakeWindowsBorlandConfig.cmake: ENH: integrate borland + support + +2001-09-04 16:29 biddi + + * Source/cmBorlandMakefileGenerator.cpp, + Source/cmBorlandMakefileGenerator.h, + Templates/CMakeWindowsBorlandConfig.cmake: NEW: First check in of + Borland Makefile Generator and template stuff + +2001-09-04 16:07 hoffman + + * Source/: cmAddCustomTargetCommand.cxx, cmCustomCommand.cxx, + cmCustomCommand.h, cmDSPWriter.cxx, cmDSWWriter.cxx, + cmMakefile.cxx, cmMakefile.h, cmSourceGroup.cxx, cmSourceGroup.h, + cmVTKWrapJavaCommand.cxx: ENH: separate command from its + arguments in the custom command. This allows the generator on + windows to change the slashes for just the command + +2001-09-01 17:13 biddi + + * Source/cmBuildCommand.cxx: ENH: Added a clause for Borland + compiler compatibility + +2001-09-01 16:56 barre + + * Source/cmDSPWriter.cxx: Convert path format back to Windows + slashes syntax. Mandatory for Win98 build. + +2001-09-01 16:55 barre + + * Source/cmSystemTools.cxx: fix comment pb + +2001-09-01 16:13 biddi + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Windows and + Unix slash conversions return a char*, clean function seperated + from Convert function + +2001-09-01 16:12 biddi + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: ExpandVariables + functions return a char * for convenience + +2001-08-31 21:10 starreveld + + * Source/cmUnixMakefileGenerator.cxx: + + ENH: Generate compile lines for .m, .M, and .mm files (ObjC and + ObjC++) + +2001-08-30 17:32 hoffman + + * Source/cmMakefile.cxx: BUG: fix incorrect deletion of function + blockers + +2001-08-30 16:19 martink + + * Source/: cmMakefile.h: version rev + +2001-08-30 16:06 hoffman + + * ChangeLog, ChangeLog.txt: [no log message] + +2001-08-30 15:54 hoffman + + * ChangeLog.txt: ENH: add autogenerated changelog + +2001-08-29 17:21 hoffman + + * Source/cmake.cxx: opps + +2001-08-29 17:11 king + + * Source/cmConfigureGccXmlCommand.cxx: BUG: GCCXML_FLAGS found from + find_gcc_options or find_mpro_options should have the trailing + newline stripped from the string. + +2001-08-29 17:10 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Updated generated + dependencies since cable's installation directory now uses + separate CxxTypes and WrapTclFacility subdirecories for includes. + +2001-08-29 17:08 king + + * Modules/FindCABLE.cmake: ENH: Updated library finding code to + handle new cable installation directory structure. It now uses + separate directories for CxxTypes and WrapTclFacility headers. + +2001-08-29 16:42 martink + + * Source/: ctest.cxx, ctest.h: added regexp option + +2001-08-29 16:13 hoffman + + * Source/: CMakeLib.dsp, DumpDocumentation.dsp, cmake.dsp, + ctest.dsp: remove /ZI + +2001-08-29 15:57 hoffman + + * Source/: cmake.cxx, cmaketest.cxx: ENH: run cmake from cmaketest + +2001-08-29 10:47 king + + * Source/cmMakefile.h: ENH: Added a const version of + GetLinkLibraries(). + +2001-08-29 10:46 king + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: Proper dependencies between shared libraries now exist in + the generated makefiles. If a shared library links to another, + the other will be built before the link is attempted. + +2001-08-29 09:57 hoffman + + * Source/cmMakefile.cxx: clean up a bit + +2001-08-29 09:44 berk + + * Source/cmSystemTools.cxx: BUG: fix out of bounds read on string + in mkdir + +2001-08-29 09:26 perera + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Special value + IGNORE behaves like NOTFOUND, but makes FindLibrary, etc, _not_ + search for a library, etc. + +2001-08-28 18:35 hoffman + + * Source/cmListFileCache.h: remove warning + +2001-08-28 18:28 hoffman + + * Source/: CMakeLib.dsp, CMakeLists.txt, CMakeSetup.dsw, + Makefile.in, cmListFileCache.cxx, cmListFileCache.h, + cmMakefile.cxx: ENH: add caching for the input CMakeList.txt + files, 2X speed up + +2001-08-28 18:27 hoffman + + * Source/cmDSPWriter.cxx: BUG: put spaces in /I paths + +2001-08-28 18:02 starreveld + + * Source/: cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmMakefile.cxx, cmMakefile.h, cmTarget.h, + cmUnixMakefileGenerator.cxx: + + Changes to allow MODULE type target for a shared library + +2001-08-28 18:01 starreveld + + * Templates/: CMakeSystemConfig.cmake.in, configure, configure.in: + + Changes to allow a MODULE target for a shared library. + +2001-08-28 16:04 martink + + * CMakeLists.txt, Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: minor fix + +2001-08-28 14:55 martink + + * Source/: cmDSPWriter.cxx, cmSystemTools.cxx, cmSystemTools.h: + better network build support + +2001-08-28 13:49 starreveld + + * Templates/: configure, configure.in: + + Added support for Darwin (OSX) + +2001-08-28 10:57 hoffman + + * Modules/FindTCL.cmake: ENH: support for cygwin + +2001-08-28 10:57 hoffman + + * Source/: cmSystemTools.cxx, cmUnixMakefileGenerator.cxx: BUG: fix + for broken apple mkdir and general clean up of MakeDirectory + command + +2001-08-27 15:48 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: fix switch projects + not saving cache correctly + +2001-08-27 15:19 martink + + * Source/cmDSPWriter.cxx: support for network path link libraries + +2001-08-27 14:44 hoffman + + * Source/: cmMakefile.cxx, cmMakefile.h, + cmUnixMakefileGenerator.cxx: ENH: change expand variables to use + GetDefinition + +2001-08-27 14:38 hoffman + + * configure, configure.in: [no log message] + +2001-08-27 14:35 hoffman + + * configure, configure.in, Source/Makefile.in: ENH: clean up sgi + build and use non-broken autoconf + +2001-08-27 12:24 hoffman + + * configure, Source/cmUnixMakefileGenerator.cxx, + Templates/configure: [no log message] + +2001-08-27 11:03 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: set CXX and CC when + running configure from cmake + +2001-08-27 10:23 martink + + * Source/ctest.cxx: better formatted output + +2001-08-27 10:22 hoffman + + * Templates/: configure, configure.in: ENH: use ANSI_CXXFLAGS for + testing compiler + +2001-08-27 10:11 hoffman + + * CMakeLists.txt, Templates/CMakeSystemConfig.cmake.in, + Templates/configure, Templates/configure.in, + Tests/Complex/CMakeLists.txt, + Tests/ComplexOneConfig/CMakeLists.txt, + Tests/ComplexRelativePaths/CMakeLists.txt: ENH: sgi -LANG:std + +2001-08-27 10:07 berk + + * Source/CMakeSetup.dsw: ken added dependancy to build everything + +2001-08-25 12:31 martink + + * Source/: CMakeSetup.dsw, ctest.dsp: added ctest to win32 + +2001-08-24 17:50 hoffman + + * Templates/: configure, configure.in: [no log message] + +2001-08-24 17:30 hoffman + + * Templates/: CMakeSystemConfig.cmake.in, configure, configure.in: + ENH: more sgi -LANG stuff + +2001-08-24 17:25 hoffman + + * configure, configure.in: auto detect lang:std: + +2001-08-24 17:17 hoffman + + * Source/Makefile.in: ENH: build for sgi CC out of box + +2001-08-24 17:12 hoffman + + * configure, configure.in: auto detect lang:std: + +2001-08-24 17:00 hoffman + + * configure, configure.in: auto detect lang:std: + +2001-08-24 16:51 hoffman + + * configure, configure.in: auto detect lang:std: + +2001-08-24 15:54 hoffman + + * Tests/: Complex/cmTestConfigure.h.in, + Complex/Executable/complex.cxx, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/Executable/complex.cxx, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/Executable/complex.cxx: BUG: fix complex + test for old compilers + +2001-08-24 15:45 hoffman + + * configure, configure.in, Tests/Complex/cmTestConfigure.h.in, + Tests/ComplexOneConfig/cmTestConfigure.h.in, + Tests/ComplexRelativePaths/cmTestConfigure.h.in: BUG: fix for SGI + Native compiler + +2001-08-24 15:41 hoffman + + * Templates/: configure, configure.in: BUG: fix flag for building + shared on HP + +2001-08-23 18:30 perera + + * Source/: cmAddTestCommand.cxx, cmAddTestCommand.h: BUG: ADD_TEST + now only does stuff if ENABLE_TESTING has been run. + +2001-08-23 18:02 hoffman + + * Source/: cmMakefile.cxx, cmSystemTools.cxx, cmSystemTools.h: ENH: + improve coverage + +2001-08-23 17:40 hoffman + + * Source/: CMakeLists.txt, cmDumpDocumentation.cxx, cmMakefile.cxx, + cmMakefile.h: ENH: add dump documentation test + +2001-08-23 16:28 king + + * Source/: cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h: ENH: + Each cmCableWrapTclCommand instance now uses a single + cmMakeDepend object for dependencies for all the gccxml input + files it generates. This should significantly improve generation + time. + +2001-08-23 16:24 hoffman + + * Source/cmaketest.cxx: BUG: run make all on unix not make exename + +2001-08-23 16:00 hoffman + + * Source/: CMakeLists.txt, cmStandardIncludes.h, cmaketest.cxx, + ctest.cxx: ENH: add more testing + +2001-08-23 13:57 hoffman + + * Tests/: Complex/CMakeLists.txt, Complex/VarTests.txt, + Complex/cmTestConfigure.h.in, Complex/simple.cxx, + Complex/Executable/CMakeLists.txt, + Complex/Executable/complex.cxx, Complex/Library/CMakeLists.txt, + Complex/Library/file2.cxx, Complex/Library/file2.h, + Complex/Library/sharedFile.cxx, Complex/Library/sharedFile.h, + Complex/Library/ExtraSources/file1.cxx, + Complex/Library/ExtraSources/file1.h, + ComplexOneConfig/CMakeLists.txt, ComplexOneConfig/VarTests.txt, + ComplexOneConfig/cmTestConfigure.h.in, + ComplexOneConfig/simple.cxx, + ComplexOneConfig/Executable/CMakeLists.txt, + ComplexOneConfig/Executable/complex.cxx, + ComplexOneConfig/Library/CMakeLists.txt, + ComplexOneConfig/Library/file2.cxx, + ComplexOneConfig/Library/file2.h, + ComplexOneConfig/Library/sharedFile.cxx, + ComplexOneConfig/Library/sharedFile.h, + ComplexOneConfig/Library/ExtraSources/file1.cxx, + ComplexOneConfig/Library/ExtraSources/file1.h, + ComplexRelativePaths/CMakeLists.txt, + ComplexRelativePaths/VarTests.txt, + ComplexRelativePaths/cmTestConfigure.h.in, + ComplexRelativePaths/simple.cxx, + ComplexRelativePaths/Executable/CMakeLists.txt, + ComplexRelativePaths/Executable/complex.cxx, + ComplexRelativePaths/Library/CMakeLists.txt, + ComplexRelativePaths/Library/file2.cxx, + ComplexRelativePaths/Library/file2.h, + ComplexRelativePaths/Library/sharedFile.cxx, + ComplexRelativePaths/Library/sharedFile.h, + ComplexRelativePaths/Library/ExtraSources/file1.cxx, + ComplexRelativePaths/Library/ExtraSources/file1.h: ENH: try to + get better test coverage + +2001-08-23 13:12 martink + + * Source/ctest.cxx: also check path for test executables + +2001-08-23 11:39 martink + + * Source/ctest.cxx: fixed format + +2001-08-23 11:32 martink + + * Source/cmUnixMakefileGenerator.cxx: better ctest support + +2001-08-23 11:12 martink + + * Source/: CMakeLists.txt, cmSystemTools.cxx, cmSystemTools.h, + cmUnixMakefileGenerator.cxx, ctest.cxx, ctest.h: added test + driver for make test target + +2001-08-22 16:33 martink + + * Source/cmDSPWriter.cxx: ENH: do not put a rule in to rebuild the + ALL_BUILD.dsp file, as it is not possible... + +2001-08-22 11:58 hoffman + + * Source/: cmCableClassSet.h, cmCableWrapTclCommand.cxx, + cmCacheManager.cxx, cmCacheManager.h, cmMakeDepend.h, + cmMakefile.h, cmSourceGroup.h, cmStandardIncludes.h, cmTarget.h, + cmUnixMakefileGenerator.cxx: ENH: change all maps of string to be + maps of cmStdString, to reduce symbol length in object files. + +2001-08-22 11:26 hoffman + + * Source/cmMakefile.h: BUG: shorten length of symbols + +2001-08-22 10:12 berk + + * Source/cmDSPWriter.cxx: OUTDIR->IntDir + +2001-08-22 08:21 hoffman + + * Source/MFCDialog/CMakeLists.txt: BUG: add missing + CMakeCommandLineInfo + +2001-08-21 17:41 barre + + * Source/MFCDialog/CMakeSetup.dsp: CMakeSetup now handles + command-line arguments (ex: /H=source_dir /B=build_dir) + +2001-08-21 17:38 barre + + * Source/MFCDialog/: CMakeSetup.cpp, CMakeSetupDialog.cpp, + CMakeSetupDialog.h, CMakeCommandLineInfo.cpp, + CMakeCommandLineInfo.h: CMakeSetup now handles command-line + arguments (ex: /H=source_dir /B=build_dir) + +2001-08-21 11:04 starreveld + + * Source/cmMakefile.cxx: + + Added support for .mm source files (ObjC++) + +2001-08-20 13:32 hoffman + + * Templates/: configure, configure.in: BUG: fix check for no std:: + +2001-08-20 09:23 hoffman + + * Source/cmSetCommand.cxx: BUG: cmSystemTools::CollapseFullPath is + a bad thing to call on the compiler which is a filepath + +2001-08-19 19:11 barre + + * Source/cmOptionCommand.cxx: Allow option value to be expanded + (thus, we can use the value of another option as default) + +2001-08-19 12:14 barre + + * Source/cmMakefile.cxx: gcc and MSVC clash on + basic_string::compare(), let's try substr() + +2001-08-19 07:36 barre + + * Source/cmSetCommand.cxx: If the value is a path, collapse it + (cleaner) + +2001-08-18 17:57 hoffman + + * Templates/: configure, configure.in: BUG: get the flags right + +2001-08-18 12:51 barre + + * Source/cmMakefile.cxx, Modules/FindDart.cmake: Support for + $ENV{VAR} syntax (lookup in the environment vars) + +2001-08-17 17:11 martink + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: backwards MATCHES in + if and else statements + +2001-08-16 18:01 hoffman + + * Templates/configure: ENH: default for cygwin should be pthreads + +2001-08-16 17:42 hoffman + + * Templates/: CMakeSystemConfig.cmake.in, + CMakeWindowsSystemConfig.cmake, configure, configure.in: ENH: add + CMAKE_USE_WIN32_THREADS to the possible thread types + +2001-08-16 11:41 berk + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h: Adding new options + to LoadCache. + +2001-08-15 13:40 berk + + * Source/: cmCacheManager.cxx, cmCacheManager.h, + cmLoadCacheCommand.cxx: 1. Added EXCLUDE option to LOAD_CACHE. + 2. Entries brought in from another cache are now marked as + internal. + +2001-08-15 13:23 martink + + * Modules/FindDart.cmake: looks at same level + +2001-08-15 10:03 hoffman + + * Templates/: configure, configure.in: ENH: make pthreads the + default for cygwin + +2001-08-14 17:18 king + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h, + cmInstallProgramsCommand.cxx, cmInstallProgramsCommand.h, + cmMakefile.cxx: ENH: Improved INSTALL_FILES and INSTALL_PROGRAMS + commands to allow each call to the command in a single directory + to specify a different install path. + +2001-08-13 16:04 martink + + * Modules/Dart.cmake: removed grep + +2001-08-10 15:52 martink + + * Source/: cmVTKWrapTclCommand.cxx, cmMakefile.h: now creates + output directories + +2001-08-09 15:35 hoffman + + * CMake.pdf: ENH: update pdf to rtf + +2001-08-09 15:23 hoffman + + * CMake.rtf: ENH: add some docs for sgi CC + +2001-08-09 14:58 berk + + * Source/: cmElseCommand.cxx, cmIfCommand.cxx: BUG: or and and were + inverted. + +2001-08-09 11:12 hoffman + + * ChangeLog: add generated ChangeLog file. Should be updated each + time a new version is made + +2001-08-09 11:08 martink + + * Source/: cmMakefile.h: updated version + +2001-08-09 11:07 martink + + * README: out of date + +2001-08-09 09:33 hoffman + + * Source/cmConfigure.cmake.h.in: BUG: add in for scope variable + +2001-08-08 14:25 martink + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: update to + new style of cache access + +2001-08-08 13:14 hoffman + + * Source/: cmSiteNameCommand.cxx, cmUtilitySourceCommand.cxx: BUG: + can not Add a definition that you just got + +2001-08-08 11:54 hoffman + + * configure, configure.in, Source/cmBuildCommand.cxx, + Source/cmBuildNameCommand.cxx, Source/cmCableWrapTclCommand.cxx, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmConfigure.h.in, Source/cmConfigureGccXmlCommand.cxx, + Source/cmDSPWriter.cxx, Source/cmDSWWriter.cxx, + Source/cmFindFileCommand.cxx, Source/cmFindLibraryCommand.cxx, + Source/cmFindPathCommand.cxx, Source/cmFindProgramCommand.cxx, + Source/cmLinkLibrariesCommand.cxx, + Source/cmMSProjectGenerator.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmOptionCommand.cxx, + Source/cmProjectCommand.cxx, Source/cmSetCommand.cxx, + Source/cmSiteNameCommand.cxx, Source/cmStandardIncludes.h, + Source/cmSystemTools.cxx, Source/cmUnixMakefileGenerator.cxx, + Source/cmUtilitySourceCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Templates/CMakeSystemConfig.cmake.in, Templates/configure, + Templates/configure.in: ENH: big change, only allow commands + access to the cache via the cmMakefile class and GetDefinition, + also the cmMakefile is the only way for commands to add to the + cache. Also, some changes to configure.in that check for for + scoping + +2001-08-07 15:49 hoffman + + * Source/: cmStandardIncludes.h, cmSystemTools.cxx: ENH: compile + with broken 720 SGI C++ compiler + +2001-08-07 13:46 hoffman + + * Source/cmMakefile.cxx: ENH: html output for docs + +2001-08-07 13:15 hoffman + + * CMake.rtf: ENH: update documents with current commands and new + GUI + +2001-08-07 08:47 king + + * CMakeLists.txt: ERR: CMakeLogo.gif has been moved to the root + directory of the source so that the Web and Web/Art directories + are not needed here. + +2001-08-07 08:46 king + + * CMakeLogo.gif: ENH: CMakeLogo for Dart to use on testing web + page. + +2001-08-06 17:01 martink + + * Source/: cmElseCommand.cxx, cmElseCommand.h, cmIfCommand.cxx, + cmIfCommand.h: added new if commands + +2001-08-06 15:11 king + + * CMake.pdf, CMake.rtf: Re-adding doc files. They were + accidentally removed due to a symlink from the CMake/Web + directory when it was removed. + +2001-08-06 15:01 king + + * CMake.pdf, CMake.rtf: Removing Web directory from CMake. It is + moving to a separate, parallel CVS module called "CMakeWeb" + +2001-08-03 15:47 king + + * Source/: cmConfigureFileCommand.cxx, cmConfigureFileCommand.h: + ENH: Added 'IMMEDIATE' option to CONFIGURE_FILE command to force + file copy and configuration on the initial pass so that current + variable values are used. + +2001-08-02 17:27 king + + * Source/: cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h: ENH: + Added use of a class's tag to generate a better set of filenames + for its wrapper configuration, xml, and generated files. This + should also prevent half the classes from re-wrapping when a new + one is inserted in the middle. + +2001-08-02 14:42 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: Generated link line for + shared libraries had CMAKE_CXX_FLAGS instead of CMAKE_CXXFLAGS + (note underscore). + +2001-08-02 14:10 king + + * Source/cmMakefile.cxx: BUG: Fixed off-by-one error in + ExpandVariablesInString for case of $ or @ as last character of + string. + +2001-08-02 09:07 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: We don't want to output + -I/usr/include in the INCLUDE_FLAGS variable. This causes + problems with finding system headers in the wrong places for + certain standard library implementations. + +2001-08-01 16:14 king + + * Source/: cmCommands.cxx, cmMakefile.cxx, cmMakefile.h, + cmSubdirDependsCommand.cxx, cmSubdirDependsCommand.h, + cmUnixMakefileGenerator.cxx: ENH: Added SUBDIR_DEPENDS command + and corresponding support code. This command allows + specification that a set of subdirectories be built before a + particular directory. + +2001-08-01 16:13 king + + * Source/cmAddDefinitionsCommand.cxx: BUG: Needed to expand + variables of definitions. + +2001-08-01 16:12 king + + * Source/cmInstallFilesCommand.cxx: BUG: Need to expand variables + when a regular expression is specified. + +2001-08-01 16:11 king + + * Modules/FindCABLE.cmake: ENH: Support to find CABLE utility if it + is installed. + +2001-08-01 11:19 king + + * Modules/FindTCL.cmake: ENH: Added tk library names tk8.4 tk8.3 + tk8.2 and tk8.0 to correspond to tk84 tk83 tk82 and tk80. + TK_LIBRARY should now be found on more platforms. + +2001-07-31 11:29 king + + * Source/cmCommands.cxx, Source/cmDSPWriter.cxx, + Source/cmDSWWriter.cxx, Source/cmInstallFilesCommand.cxx, + Source/cmInstallProgramsCommand.cxx, + Source/cmInstallProgramsCommand.h, Source/cmMakefile.cxx, + Source/cmTarget.cxx, Source/cmTarget.h, + Source/cmUnixMakefileGenerator.cxx, Templates/CMakeLists.txt: + ENH: Added INSTALL_PROGRAMS command and corresponding support. + This involved splitting cmTarget::INSTALL into INSTALL_FILES and + INSTALL_PROGRAMS enum values. INSTALL_FILES no longer adds + execute permission. The INSTALL_PROGRAMS commnad takes either a + list of explicit names, or a regex. It will not expand source + lists like the INSTALL_FILES command will. + +2001-07-30 12:21 king + + * Source/cmCableClassSet.cxx: ERR: + ElementCombinationGenerator::ReplacePortion needs to be a friend + of ElementCombinationGenerator so that it can get access to + ElementCombinationGenerator::Substitution. Also fixed one minor + problem for HP build. + +2001-07-30 11:34 king + + * Source/: cmCableClassSet.cxx, cmCableWrapTclCommand.cxx, + cmDSPWriter.cxx, cmMakeDepend.cxx, cmMakefile.cxx, cmMakefile.h, + cmUnixMakefileGenerator.cxx: BUG: Changed include and link + directory paths in cmMakefile back to std::vector because there + is an order dependency. Only cmMakefile::AddIncludeDirectory and + cmMakefile::AddLinkDirectory should be called to add directories + to the paths. They make sure the paths are unique as they are + inserted. + +2001-07-30 07:18 scottim + + * Source/: cmCableClassSet.cxx, cmCableWrapTclCommand.cxx, + cmDSPWriter.cxx, cmMakeDepend.cxx, cmMakefile.cxx, cmMakefile.h, + cmUnixMakefileGenerator.cxx: Removed the Uniquification of the + include and link directory list in FinalPass, and achieved the + same effect by makein m_LinkDirectores and m_IncludeDirectories a + set rather than vector + +2001-07-27 16:29 hoffman + + * Source/cmMakefile.cxx: ENH: Re-implemented + ExpandVariablesInString to significantly improve performance. + +2001-07-27 13:06 scottim + + * Source/: cmMakefile.cxx, cmMakefile.h: MAkefile now strips + duplicate directores from the libraries and include paths + +2001-07-26 11:07 king + + * Source/: cmCableClassSet.cxx, cmCableClassSet.h, + cmCableClassSetCommand.cxx, cmCableWrapTclCommand.cxx: ENH: Added + cable class-set expansion and tagging for alternate name + generation. This should make the generated wrappers much easier + to setup and use. + +2001-07-26 10:18 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PropertyList.cpp: ENH: + change the logic of disabling the ok button a bit + +2001-07-26 09:47 berk + + * CMakeLists.txt: ENH: Updated regexp for tracing dependencies in + FLTK dialog. + +2001-07-26 08:36 martink + + * Source/cmMakefile.h: fixed warnings + +2001-07-25 18:30 hoffman + + * Source/: cmMakefile.cxx, cmMakefile.h, cmake.cxx, cmake.h, + MFCDialog/CMakeDialog.h, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h, + MFCDialog/PropertyList.cpp, MFCDialog/PropertyList.h, + MFCDialog/resource.h: ENH: rework GUI with configure/OK/Cancel + +2001-07-25 16:53 martink + + * Source/: cmCommands.cxx, cmFunctionBlocker.h, cmIfCommand.cxx, + cmIfCommand.h, cmMakefile.cxx, cmMakefile.h: added for each + command + +2001-07-25 16:52 martink + + * Source/: cmEndForEachCommand.cxx, cmEndForEachCommand.h, + cmForEachCommand.cxx, cmForEachCommand.h: new commands + +2001-07-25 09:40 berk + + * Source/cmCacheManager.cxx: Removing trailing spaces after cache + entry value. + +2001-07-24 16:46 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PropertyList.cpp, + PropertyList.h, resource.h: BUG: fix on scroll with buttons + +2001-07-24 16:16 king + + * Source/cmDSPWriter.cxx: BUG: Fixed dependency generation to work + for when there are many, many dependencies. Output is now easier + to ready anyway because each dependency is on its own line. + +2001-07-23 14:43 king + + * Source/: cmConfigureGccXmlCommand.cxx, + cmConfigureGccXmlCommand.h: BUG: CompilerIsMipsPro needs to + redirect stderr to stdout so that the test output can be checked. + +2001-07-23 11:54 king + + * Source/: cmConfigureGccXmlCommand.cxx, + cmConfigureGccXmlCommand.h: ENH: Added support for UNIX + compilers. GCC and MIPSpro are supported. + +2001-07-23 11:53 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added support + for non-verbose mode output from running a command. This can be + used when it is expected that the command may fail. + +2001-07-23 11:07 king + + * Source/: cmCommands.cxx, cmConfigureGccXmlCommand.cxx, + cmConfigureGccXmlCommand.h: ENH: Added CONFIGURE_GCCXML command + to do hard work of configuring GCCXML's flags for the current + compiler. Currently only implemented correctly for Visual C++ in + Windows. + +2001-07-23 11:06 king + + * Modules/FindGCCXML.cmake: ENH: Module to find and configure + GCCXML and GCCXML_FLAGS. + +2001-07-20 11:41 millerjv + + * Modules/Dart.cmake: ENH: Added Purify targets + +2001-07-20 09:20 millerjv + + * Modules/Dart.cmake: ENH: Added purify command. + +2001-07-20 04:56 scottim + + * Templates/DLLHeader.dsptemplate: adding what I think is a missing + /pdbtype:sept + +2001-07-19 14:31 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, CMakeSetupGUI.fl, + CMakeSetupGUI.h, CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h, FLTKDialog.cxx: ENH: Save and Load + of recent Source and Binary directories added. + +2001-07-18 16:45 martink + + * Source/cmMakefile.h: updated version + +2001-07-18 11:40 martink + + * Source/cmSystemTools.cxx: limit library search to appropriate + extensions + +2001-07-18 10:17 hoffman + + * Modules/Dart.cmake: BUG: enable testing even if not tcl found + +2001-07-17 15:41 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Added generation of + dependencies on the CMake-generated input to gcc-xml so that + re-generation of wrappers will occur if a header changes. + +2001-07-17 15:41 king + + * Source/cmMakeDepend.cxx: BUG: Need to expand variables in search + paths in case it hasn't been done yet by the makefile. + +2001-07-17 15:09 king + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h, + cmOutputRequiredFilesCommand.cxx, cmUnixMakefileGenerator.cxx: + ENH: Hacked together a new implementation of the dependency + generator code. This should support finding dependencies for + individual files without doing them for the entire makefile. Use + cmMakeDepend::FindDependencies() to do this. + +2001-07-17 09:54 king + + * Modules/CMakeLists.txt, Modules/FindDart.cmake, + Modules/FindJNI.cmake, Modules/FindPythonLibs.cmake, + Modules/FindTCL.cmake, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Templates/configure, + Templates/configure.in: ENH: Added support for using + backslash-style escaping in CMakeLists.txt file arguments. This + allows double quotes to be used in arguments. + +2001-07-16 18:40 perera + + * Source/: cmAuxSourceDirectoryCommand.cxx, cmMakefile.cxx, + cmMakefile.h, cmSourceFile.cxx, cmSourceFile.h, + cmSourceFilesCommand.cxx, cmSourceFilesRemoveCommand.cxx, + cmTarget.cxx: ENH: Source and header file extensions are in + variables in cmMakefile. AUX_SOURCE_DIRECTORY will only add + files that have a "source" extension. + +2001-07-16 15:19 ibanez + + * Modules/: FindGLU.cmake, FindGLUT.cmake: Search path for + OpenGL related libraries + +2001-07-16 10:17 hoffman + + * Templates/: CMakeSystemConfig.cmake.in, configure, configure.in: + ENH: add a variable for CMAKE_COMPILER_IS_GNUCXX + +2001-07-16 10:15 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: make sure cache is + cleared + +2001-07-16 10:14 hoffman + + * Source/: cmMakefile.cxx, cmSourceFile.cxx: ENH: add support for + mac osx + +2001-07-15 21:10 barre + + * Modules/FindPythonLibs.cmake: update include/lib path to Python + (Linux) + +2001-07-12 19:48 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h, + PropertyList.cpp, PropertyList.h: ENH: add a check to avoid + quitting before rebuilding + +2001-07-11 13:30 martink + + * Source/: cmMakefile.h: version num + +2001-07-11 13:06 martink + + * Source/MFCDialog/CMakeSetupDialog.cpp: fixed up resizing info + +2001-07-11 12:12 hoffman + + * Source/cmSystemTools.cxx: BUG: make sure find program does not + find directories + +2001-07-10 17:13 hoffman + + * Source/: cmIncludeCommand.cxx, cmLoadCacheCommand.cxx: BUG: + remove iostream.h includes + +2001-07-10 16:20 berk + + * Source/cmUnixMakefileGenerator.cxx: Unnecessary variable + +2001-07-10 16:20 berk + + * Source/cmMakefile.cxx: Better error checking. + +2001-07-10 14:29 hoffman + + * Templates/: configure, configure.in: BUG: fix excape of * for + cmake + +2001-07-10 13:57 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: When splitting a full + path library into separate -L and -l parts, the -l part may not + have a "lib" prefix on cygwin. + +2001-07-10 12:09 king + + * Source/cmake.cxx: ENH: Removing automatic setting of + BUILD_SHARED_LIBS. Projects that support this should explicitly + declare it with the OPTION command, or set its libraries to + shared or static directly on each ADD_LIBRARY command. + +2001-07-10 11:56 berk + + * Modules/Dart.cmake: Checking if tclshcommand is defined before + running it. + +2001-07-10 11:46 king + + * Source/cmUnixMakefileGenerator.cxx: ENH: Added + -D(library_name)_EXPORTS to build rules for sources that are + going to be linked into a shared library. This allows dllexport + setup for DLL building on cygwin. It may also come in handy in + unix in the future. This corresponds to the same definition + added by the dll dsp template in windows. + +2001-07-10 09:23 martink + + * Source/cmBuildNameCommand.cxx: changes to better handle old + values or hand set values + +2001-07-09 12:46 nobody + + * DartConfig.cmake: Disabled doxygen and gnats + +2001-07-08 17:54 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: library extension goes + after library name, not before + +2001-07-06 14:41 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: some clean up, and better checking to see if we are building + cmake + +2001-07-06 14:11 hoffman + + * configure, configure.in: ENH: run make depend + +2001-07-06 12:46 will + + * Source/cmCommand.h: ERR:Spelling mistake + +2001-07-06 09:22 king + + * Source/cmStandardIncludes.h: ENH: Warning 4503 disable for MSVC. + +2001-07-05 18:15 hoffman + + * Templates/: configure, configure.in: BUG: fix flags for cygwin + and shared builds + +2001-07-05 17:52 hoffman + + * Source/cmSystemTools.cxx: ENH: add better error output + +2001-07-05 12:03 hoffman + + * Source/cmUnixMakefileGenerator.cxx, Templates/configure, + Templates/configure.in: BUG: fix solaris problems in install and + ar + +2001-07-03 10:53 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Removed -fsyntax-only flag + from call to gcc-xml. It should be part of GCCXML_FLAGS. + +2001-07-03 05:27 scottim + + * Source/cmDSPWriter.cxx, Templates/CMakeWindowsSystemConfig.cmake, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: Renamed the + ReleaseWithDebugInfo Build configuration to RelWithDebInfo, + because msdev does simple matching on build target, and + specifying either Release or Debug builds would also build + ReleaseWithDebugInfo + +2001-07-02 16:52 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: When outputting relative + path of .o, the relative path of the source file must also be + written (not full path). + +2001-07-02 16:30 millerjv + + * Source/cmBuildNameCommand.cxx: FIX: BuildName removes path to + compiler and converts any illegal characters + +2001-07-02 15:57 king + + * Source/: cmCommands.cxx, cmBuildSharedLibrariesCommand.cxx, + cmBuildSharedLibrariesCommand.h: ENH: Removed deprecated command + completely. + +2001-07-02 15:38 king + + * Source/: cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmDSWWriter.cxx, cmMakefile.cxx, + cmMakefile.h, cmTarget.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: ENH: Added support for selection of + static/shared build on a per-library basis. + +2001-07-02 14:38 martink + + * Source/cmake.cxx: better arg support + +2001-07-02 14:03 berk + + * Source/: cmVTKWrapJavaCommand.h, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.h: Should not be inherited. + +2001-07-02 14:03 berk + + * Source/: cmVTKWrapJavaCommand.cxx, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx: Better error checking. + +2001-07-02 14:02 berk + + * Source/cmConfigureFileCommand.cxx: Wrong place for fout + +2001-06-29 16:46 martink + + * Source/cmConfigureFileCommand.cxx: better configure file command + +2001-06-29 16:06 nobody + + * CMakeLists.txt: added logo + +2001-06-29 09:53 martink + + * Source/cmaketest.cxx: minor compile fix + +2001-06-29 09:30 hoffman + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in, Templates/configure, + Templates/configure.in: BUG: break up CMAKE_AR into program and + ARGS + +2001-06-28 17:45 hoffman + + * configure, configure.in, Source/cmSystemTools.cxx, + Source/cmUnixMakefileGenerator.cxx, Templates/configure, + Templates/configure.in: ENH: various fixes to allow bootstrap on + sunos with CC + +2001-06-28 16:45 hoffman + + * Source/cmEnableTestingCommand.cxx: fixed Dart issue + +2001-06-28 15:27 hoffman + + * Templates/CMakeSystemConfig.cmake.in: set values in the cache not + just the current makefile + +2001-06-28 15:11 berk + + * Source/FLTKDialog/FLTKPropertyItemRow.cxx: Undefined symbol + +2001-06-28 15:08 berk + + * Source/cmUnixMakefileGenerator.cxx: Special rules for + out-of-package source files. + +2001-06-28 14:53 hoffman + + * Source/FLTKDialog/: CMakeLists.txt, + CMakeSetupGUIImplementation.cxx, FLTKPropertyItemRow.cxx, + FLTKPropertyList.cxx: BUG: fix for sgi compiler + +2001-06-28 14:38 hoffman + + * Templates/: configure, configure.in: BUG: pass flags to compiler + during configure + +2001-06-28 14:27 hoffman + + * Templates/: configure, configure.in: BUG: pass flags to compiler + during configure + +2001-06-28 14:01 hoffman + + * Source/cmSourceFilesCommand.cxx: BUG: find files in + subdirectories + +2001-06-28 11:42 hoffman + + * Source/cmStandardIncludes.h: fix for scope on hp + +2001-06-28 11:40 hoffman + + * Source/cmSystemTools.cxx: BUG: check size of path error, HP + gcount problem + +2001-06-27 17:19 berk + + * Source/cmSourceFilesCommand.cxx: Added variable expansion. + +2001-06-27 16:18 martink + + * Source/cmMakefile.h: updated version to 0.3 + +2001-06-27 16:17 martink + + * Source/cmMakefile.h: updated version to 0.2 + +2001-06-27 16:14 martink + + * Source/cmUnixMakefileGenerator.cxx: ENH: fix install when + executable and lib path set + +2001-06-27 15:42 hoffman + + * configure, configure.in, Source/CMakeLists.txt, + Source/cmSystemTools.cxx, Source/cmUnixMakefileGenerator.cxx, + Source/cmake.cxx, Templates/install-sh: ENH: fix install for + cygwin, build cmake from configure + +2001-06-27 15:13 king + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + BUG: Check for building shared libraries should read from the + make file's setting, not directly from the cache. + +2001-06-27 15:09 king + + * Source/cmDSPWriter.cxx: BUG: Check for building shared libraries + should read from makefile's setting, not directly from the cache. + +2001-06-27 13:16 martink + + * CMake.rtf: updated for 0.2 + +2001-06-27 13:12 martink + + * Source/: cmLinkLibrariesCommand.h, cmSubdirCommand.h: + documentation change + +2001-06-27 12:09 perera + + * Source/cmUnixMakefileGenerator.cxx: ENH: Use ${MAKE} instead of + make for dependent library rules + +2001-06-27 11:49 martink + + * Source/cmCommands.cxx: alphabetized + +2001-06-27 11:35 martink + + * Source/cmake.cxx: added help options + +2001-06-27 09:17 martink + + * Source/: cmSystemTools.cxx, cmaketest.cxx, cmaketest.h.in: minor + fixes to testing + +2001-06-27 09:16 martink + + * Source/CMakeLists.txt: mod to the testing + +2001-06-27 09:16 martink + + * CMakeLists.txt: added dependencies for testing + +2001-06-26 16:44 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: convert to unix slashes + on browse, remove font and color junk + +2001-06-26 16:19 hoffman + + * Source/cmake.dsp: BUG: change to dos mode + +2001-06-26 13:41 martink + + * Modules/Dart.cmake: update for CMake changes + +2001-06-26 13:23 martink + + * Source/: CMakeLists.txt, cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmBuildCommand.cxx, + MFCDialog/CMakeLists.txt: modified how paths are escaped, added + depends + +2001-06-26 10:01 martink + + * Source/: cmAddDependenciesCommand.cxx, + cmAddDependenciesCommand.h, cmCommands.cxx: added add + dependencies command + +2001-06-26 09:55 martink + + * Source/MFCDialog/: CMakeSetup.rc, CMakeSetupDialog.cpp, + CMakeSetupDialog.h: better GUI resize and combo box fixes + +2001-06-25 13:34 millerjv + + * Source/: cmBuildNameCommand.cxx, cmSiteNameCommand.cxx: FIX: + added AddDefinition() to store site name and build name in + makefile. Also stripped white space from the result of + hostname. + +2001-06-25 10:59 martink + + * CMakeLists.txt: made cmake write its execs into CMake/Source + +2001-06-22 14:53 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: shared libraries should + not depend on other shared libraries, they get relinked too + often. + +2001-06-22 14:53 hoffman + + * Source/cmMakefile.cxx: ENH: put back stdio.h to get sprintf + +2001-06-22 14:23 biddi + + * Source/cmCommands.cxx: ERR: Serious problems with my CVS. How did + this get committed? + +2001-06-22 12:19 king + + * Source/cmSystemTools.cxx: BUG: Wrote correct implementation of + cmCopyFile. + +2001-06-22 12:18 king + + * Source/cmake.cxx: BUG: Fixed generation of cMakeRoot in one case. + +2001-06-22 12:18 king + + * Source/cmStandardIncludes.h: ENH: Added string.h include. + +2001-06-22 12:17 king + + * Source/cmMakefile.cxx: ERR: Removed stray standard header + include. They should be added to cmStandardIncludes.h + +2001-06-22 12:17 king + + * Source/cmIncludeCommand.cxx: BUG: Added missing newline in error + message. + +2001-06-22 11:32 martink + + * Source/cmMakefile.cxx: removed stricmp + +2001-06-22 11:28 martink + + * Source/CMakeLists.txt: escape quotes on cmaketest.h.in + +2001-06-22 11:15 martink + + * Source/: cmConfigureFileCommand.cxx, cmConfigureFileCommand.h: + added escape quotes option + +2001-06-22 11:14 martink + + * Source/: cmMakefile.cxx, cmMakefile.h: added escape quotes option + in replace strings + +2001-06-22 10:21 martink + + * Source/: cmSystemTools.cxx, cmSystemTools.h: added escape quote + method + +2001-06-22 09:58 biddi + + * Source/: cmCommands.cxx, cmSourceFilesRemoveCommand.cxx, + cmSourceFilesRemoveCommand.h: ENH: Added new command + SOURCE_FILES_REMOVE which can be used to take files out of the + build. Especially useful when certain compilers choke on the odd + file. + +2001-06-22 09:47 biddi + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Added + RemoveSource(...) to complement AddSource. New command + SOURCE_FILES_REMOVE uses it and can be used to take files out of + the build + +2001-06-22 09:27 martink + + * Source/cmaketest.cxx: namespace issues + +2001-06-21 17:55 hoffman + + * Source/cmDSWWriter.cxx: allow no name project + +2001-06-21 17:53 martink + + * Source/CMakeLists.txt: better testing + +2001-06-21 17:53 martink + + * Source/: cmSystemTools.cxx, cmSystemTools.h: adde changeDirectory + +2001-06-21 17:52 martink + + * Source/: cmaketest.cxx, cmaketest.h.in: new test driver + +2001-06-21 17:52 martink + + * Tests/Simple/: CMakeLists.txt, simple.cxx: new tests + +2001-06-21 17:41 hoffman + + * Source/cmake.cxx: BUG: fix for unix + +2001-06-21 17:25 hoffman + + * Source/cmake.cxx: ENH: clean up + +2001-06-21 17:20 hoffman + + * Source/cmake.cxx: ENH: look in the PREFIX dir for the modules + +2001-06-21 16:34 hoffman + + * Source/: cmConfigure.cmake.h.in, cmake.cxx: ENH: better ability + to find cmake program + +2001-06-21 15:57 martink + + * Templates/CMakeLists.txt: minor install fix + +2001-06-21 15:54 martink + + * Source/cmUnixMakefileGenerator.cxx: better permission handling + +2001-06-21 15:02 king + + * Source/: cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmMakeDepend.cxx, + cmMakeDepend.h, cmMakefile.cxx, cmMakefile.h, + cmUnixMakefileGenerator.cxx: ENH: Extended + INCLUDE_REGULAR_EXPRESSION to allow selective complaints about + missing dependencies. + +2001-06-21 15:02 king + + * Source/CMakeLists.txt: ENH: Added BUILD_FLTK_GUI option (defaults + to ON). + +2001-06-21 13:48 hoffman + + * Source/: CMakeLists.txt, cmSourceFile.cxx, cmStandardIncludes.h: + BUG: fix bootstrap build on unix + +2001-06-21 12:43 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + FLTKPropertyItemRow.cxx, FLTKPropertyItemRow.h: ENH: Update the + cacheManager from the GUI after each callback. Only load + the cache from disk if the binary path has changed. + +2001-06-21 12:31 hoffman + + * CMakeLists.txt: ENH: add include regexp + +2001-06-21 12:19 martink + + * Source/FLTKDialog/CMakeLists.txt: added install target + +2001-06-21 12:01 martink + + * CMakeLists.txt, Makefile.in, configure, configure.in, install-sh, + Modules/CMakeLists.txt, Source/cmInstallFilesCommand.cxx, + Source/cmInstallFilesCommand.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmake.cxx, + Templates/CMakeLists.txt, Templates/install-sh: better install + support + +2001-06-21 10:58 hoffman + + * Templates/CMakeSystemConfig.cmake.in: BUG: remove quotes + +2001-06-21 10:36 hoffman + + * Source/: cmIncludeCommand.cxx, cmIncludeCommand.h: ENH: add + optional include and only allow one file per INCLUDE + +2001-06-21 10:17 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: INTERNAL + properties are not display any longer in the GUI + +2001-06-21 09:56 ibanez + + * Source/FLTKDialog/FLTKPropertyItemRow.cxx: ENH: The cache is not + saved now after every modification of the GUI + +2001-06-21 09:45 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + FLTKPropertyItemRow.cxx: ENH: Clearing and redrawing the property + list after a build to load the new cache. + +2001-06-21 08:41 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + FLTKPropertyItemRow.cxx, FLTKPropertyItemRow.h, + FLTKPropertyList.cxx, FLTKPropertyList.h: ENH: PropertyRows have + now a reference to CMakeSetupGUI and save the cache at each + callback action + +2001-06-21 07:37 ibanez + + * Source/FLTKDialog/: CMakeLists.txt, CMakeSetupGUI.cxx, + CMakeSetupGUI.fl, CMakeSetupGUI.h, + CMakeSetupGUIImplementation.cxx, FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h: ENH: PropertyNameButton was removed. + PropertyRow manages all the callbacks now + +2001-06-21 07:35 ibanez + + * Source/FLTKDialog/: FLTKPropertyNameButtonWithHelp.h, + FLTKPropertyNameButtonWithHelp.cxx: Removed: now the help string + is managed by the PropertyRow class + +2001-06-20 17:03 hoffman + + * Source/: FLTKDialog/CMakeLists.txt, MFCDialog/CMakeLists.txt: + ENH: add CMakeSetup as a target + +2001-06-20 16:49 hoffman + + * Source/CMakeLists.txt, Source/cmDSPWriter.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: ENH: boot strap mfc gui + and support for MFC + +2001-06-20 13:56 hoffman + + * Source/CMakeLists.txt, Source/cmConfigure.cmake.h.in, + Source/cmSourceFile.cxx, Source/cmStandardIncludes.h, + Source/cmake.cxx, Source/FLTKDialog/CMakeLists.txt, + Source/FLTKDialog/CMakeSetupGUIImplementation.cxx, + Templates/CMakeSystemConfig.cmake.in, Templates/configure, + Templates/configure.in: ENH: fix cmake so it can boot strap + itself better + +2001-06-19 16:29 hoffman + + * Modules/FindFLTK.cmake: [no log message] + +2001-06-19 16:10 hoffman + + * Source/: CMakeLists.txt, FLTKDialog/CMakeLists.txt, + FLTKDialog/CMakeSetupGUIImplementation.cxx, + FLTKDialog/FLTKPropertyNameButtonWithHelp.cxx: ENH: build fltk + cmake on unix with bootstrap + +2001-06-19 16:05 king + + * Makefile.in: BUG: Exectuable installation must set permissions to + 755 in case installer has a umask like 007. + +2001-06-19 15:50 king + + * Source/: cmBuildSharedLibrariesCommand.cxx, cmake.cxx: ENH: CMake + now always adds the BUILD_SHARED_LIBS cache entry. The + BUILD_SHARED_LIBRARIES command that used to be used is now + deprecated. + +2001-06-19 15:49 hoffman + + * Source/FLTKDialog/CMakeLists.txt: ENH: add bootstrap support for + building fltk + +2001-06-19 15:33 hoffman + + * Source/: CMakeLists.txt, FLTKDialog/CMakeSetupGUI.cxx, + MFCDialog/CMakeSetupDialog.cpp: ENH: add bootstrap support for + building fltk + +2001-06-19 14:32 hoffman + + * Source/MFCDialog/: CMakeDialog.h, CMakeSetup.rc, + CMakeSetupDialog.cpp, CMakeSetupDialog.h, resource.h: ENH: add + resize ability to dialog and fix tab stop orders + +2001-06-19 12:03 king + + * Source/: cmCableCloseNamespaceCommand.cxx, + cmCableCloseNamespaceCommand.h, cmCableCommand.cxx, + cmCableCommand.h, cmCableData.cxx, cmCableData.h, + cmCableDefineSetCommand.cxx, cmCableDefineSetCommand.h, + cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCableOpenNamespaceCommand.cxx, + cmCableOpenNamespaceCommand.h, cmCablePackageCommand.cxx, + cmCablePackageCommand.h, cmCablePackageEntryCommand.cxx, + cmCablePackageEntryCommand.h, cmCableSourceFilesCommand.cxx, + cmCableSourceFilesCommand.h, cmCableWrapCommand.cxx, + cmCableWrapCommand.h, cmCommands.cxx: ENH: Removing old-style + cable commands related to the instantiation functionality which + has now been removed from cable. + +2001-06-19 12:01 king + + * Source/cmOutputRequiredFilesCommand.cxx: ERR: Removed unused + variable. + +2001-06-19 07:41 millerjv + + * Source/: cmAddTestCommand.cxx, cmEnableTestingCommand.cxx: ENH: + Changed generated filename to DartTestfile.txt + +2001-06-18 17:26 hoffman + + * Source/cmSystemTools.cxx: BUG: use pclose not fclose + +2001-06-18 16:54 perera + + * Source/cmLinkLibrariesCommand.cxx: ENH: LINK_LIBRARIES(abc) will + automatically add the path to abc to the link directories, if the + path is known. + +2001-06-18 15:35 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: remove unused + +2001-06-18 15:32 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: create directories in + the right place + +2001-06-18 15:31 hoffman + + * Source/cmake.cxx: ENH: move EXECUTABLE_OUTPUT_PATH and + LIBRARY_OUTPUT_PATH initial creation to after the CMakeLists.txt + files have been parsed + +2001-06-18 13:16 martink + + * Modules/Dart.cmake: out of source dart support + +2001-06-15 17:57 hoffman + + * Source/cmUnixMakefileGenerator.cxx: ENH: do not add anything from + the current directory to the depends + +2001-06-15 10:35 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: fixed so that empty + library paths are ignored + +2001-06-15 07:51 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h, FLTKDialog.cxx, + FLTKPropertyNameButtonWithHelp.cxx: ENH: Absolute path to cmake + resolved + +2001-06-15 07:49 ibanez + + * Source/FLTKDialog/Makefile.in: ENH: Getting headers and libs for + FLTK and OpenGL + +2001-06-14 17:06 biddi + + * Source/cmSourceFile.cxx: ERR: allow *.cpp as well as *.cxx etc + etc + +2001-06-14 14:32 berk + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + FLTKPropertyItemRow.cxx, FLTKPropertyItemRow.h, + FLTKPropertyList.cxx, FLTKPropertyNameButtonWithHelp.cxx, + FLTKPropertyNameButtonWithHelp.h: Include directory names are + Case sensitive in Unix. + +2001-06-14 11:45 martink + + * Source/CMakeLib.dsp: added make depend on win32 + +2001-06-14 10:19 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: fix it so that if a + Makefile is out of date for some reason, it is only built once, + it was doing it twice. + +2001-06-14 09:10 martink + + * CMakeLists.txt, DartConfig.cmake: modified testing + +2001-06-13 17:50 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: fix so it does not jump + into the current directory for inital target builds + +2001-06-13 17:03 hoffman + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h, + cmake.cxx: ENH: fix EXECUTABLE_OUTPUT_PATH and + LIBRARY_OUTPUT_PATH for unix + +2001-06-13 16:15 martink + + * Modules/FindDart.cmake: used to find the dart testing system + +2001-06-13 14:49 martink + + * CMakeLists.txt: minor dart change + +2001-06-13 13:53 martink + + * Source/: cmTarget.cxx, cmTarget.h: duh + +2001-06-13 13:49 martink + + * CMakeLists.txt, Source/cmTarget.cxx, Source/cmTarget.h: minor cvs + web changeCMakeLists.txt + +2001-06-13 10:28 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: Search + for cmake executable full path added (window/unix) + +2001-06-13 00:16 ibanez + + * Source/FLTKDialog/: FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h, FLTKPropertyList.cxx, FLTKPropertyList.h, + FLTKPropertyNameButtonWithHelp.cxx, + FLTKPropertyNameButtonWithHelp.h: ENH: Added popup menu for + removing a property. Some style changes + +2001-06-12 18:44 ibanez + + * Source/FLTKDialog/: FLTKPropertyItemRow.cxx, + FLTKPropertyItemRow.h, Makefile.in: ENH: Added help blobs that + popup when the mouse is left on top of the property name + +2001-06-12 18:43 ibanez + + * Source/FLTKDialog/: FLTKPropertyNameButtonWithHelp.cxx, + FLTKPropertyNameButtonWithHelp.h: Class derived from Fl_Button + with added help blobs + +2001-06-12 14:15 perera + + * Source/cmUnixMakefileGenerator.cxx, Templates/configure, + Templates/configure.in: BUG: SHLIB_LINK was being used when + linking static executables. Missing comma in RUNTIME_FLAG for + IRIX. ENH: User supplied SHLIB_CFLAGS (-fPIC, etc) will override + configure detected flags + +2001-06-12 13:30 martink + + * CMakeLists.txt, Source/CMakeLists.txt: support testing + +2001-06-12 12:22 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: CMake's configure needs + to run with the current directory as the project's binary + directory. + +2001-06-12 12:20 king + + * Source/FLTKDialog/: CMakeSetupGUI.h, + CMakeSetupGUIImplementation.cxx, CMakeSetupGUIImplementation.h: + ERR: Needed virtual destructor to correspond to virtual + functions. Also added several std:: qualifiers to string. + +2001-06-12 11:55 martink + + * Source/: cmakemain.cxx: cmake does not require two arguments + +2001-06-12 11:12 martink + + * Source/cmCommands.cxx: removed old added new + +2001-06-12 11:08 martink + + * Source/cmCommands.cxx: removed old added new + +2001-06-12 11:08 martink + + * Source/: cmOutputRequiredFilesCommand.cxx, + cmOutputRequiredFilesCommand.h: added new command + +2001-06-12 11:08 martink + + * Source/: cmConfigureFileNoAutoconf.cxx, + cmConfigureFileNoAutoconf.h, cmTestsCommand.cxx, + cmTestsCommand.h: removed old commands + +2001-06-12 10:59 king + + * Source/: cmMakeDepend.cxx, cmUnixMakefileGenerator.cxx: BUG: + Dependency hints must be removed by the makefile generator before + adding the dependencies generated by cmMakeDepend. + +2001-06-12 10:45 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: There was no dependency + for library targets on their required libraries. (Hopefully + there aren't any cyclic dependencies for libraries.) + CMAKE_SHLIB_LINK is now used for executable targets. + +2001-06-12 09:00 martink + + * Source/: cmMakeDepend.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmMakeDepend.cxx: some cleanup to the + make depend process + +2001-06-12 08:34 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, CMakeSetupGUI.fl, + CMakeSetupGUI.h, CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h, FLTKPropertyItemRow.cxx: ENH: + Paths are now expanded for environment variables and made + absolute. The binary directory is created if it doesn't + exist. + +2001-06-12 08:31 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: WIN32_EXECUTABLE targets + were not being installed on unix properly. They are supposed to + be treated just like any other EXECUTABLE target. + +2001-06-12 08:30 king + + * Source/cmake.cxx: ERR: int -> unsigned int. + +2001-06-11 21:50 ibanez + + * Modules/FindFLTK.cmake: ENH: Added the path used in SuSe Linux + 7.1 + +2001-06-11 19:14 millerjv + + * Modules/Dart.cmake: Modified for new Dart source tree + +2001-06-11 18:00 martink + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: minor fix in + error checking + +2001-06-11 17:09 king + + * Modules/FindTCL.cmake: ENH: Added check for tcl8.4 (as against + tcl84), tcl8.3, tcl8.2, and tcl8.0 when finding the TCL_LIBRARY. + +2001-06-11 16:47 martink + + * Source/cmMakefile.h: added some const versions of get methods + +2001-06-11 15:31 millerjv + + * Modules/Testing.cmake: Changed Testing.cmake to Dart.cmake + +2001-06-11 15:28 millerjv + + * Modules/Dart.cmake: Rename Testing.cmake to Dart.cmake + +2001-06-11 10:18 king + + * Source/cmSystemTools.cxx: BUG: Fixed regular expression used to + match registry entries. The expression now matches everything + after a [HKEY until the first ']' is encountered. + +2001-06-11 02:10 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cxx: ENH: Waiting + cursor color were reversed + +2001-06-11 01:20 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h: ENH: CMake invokation is working. + +2001-06-10 21:36 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cxx, + CMakeSetupGUIImplementation.h: ENH: Cache saving added + +2001-06-10 18:27 ibanez + + * Source/cmSystemTools.cxx: DOC: Added a comment about the risk of + using tempnam in Unix, as opposed to using mkstemp. + +2001-06-10 18:25 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cpp, + CMakeSetupGUIImplementation.cpp, FLTKPropertyList.cpp, + FLTKDialog.cpp: .cpp renamed as .cxx + +2001-06-10 18:23 ibanez + + * Source/FLTKDialog/FLTKPropertyItemRow.h: Class to manage + every row in the GUI scrolling, corresponding to a + single property + +2001-06-10 18:23 ibanez + + * Source/FLTKDialog/Makefile.in: Template for the Makefile + +2001-06-10 18:21 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cxx, + CMakeSetupGUIImplementation.cxx, FLTKDialog.cxx, + FLTKPropertyItemRow.cxx, FLTKPropertyList.cxx: ENH: cpp renamed + cxx. Copy of data to and from the GUI is working + +2001-06-10 18:19 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.fl, CMakeSetupGUI.h, + CMakeSetupGUIImplementation.h, FLTKPropertyList.h: ENH: Added + Fl_Tiles as row for holding property data. Data to and from the + GUI is working + +2001-06-09 20:54 king + + * Source/cmCableWrapTclCommand.cxx: BUG: Changed custom command + generation to not use full path of output file from cable. + +2001-06-08 14:40 king + + * Source/: cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h: ENH: + Added proper request for/generation of CABLE, GCCXML, and + GCCXML_FLAGS cache entries. This also allowed the correct + generation of gccxml rules. + +2001-06-08 14:38 king + + * Source/cmDSPWriter.cxx: BUG: Removed generation of stray # Begin + Custom Build line. + +2001-06-08 00:18 perera + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in, Templates/configure, + Templates/configure.in: ENH: Runtime library search paths can be + added to the link lines for on shared builds. + +2001-06-07 16:48 martink + + * CMake.pdf.gz: replaced with pdf version + +2001-06-07 16:45 will + + * CMake.pdf: updated docs + +2001-06-07 16:34 martink + + * CMake.doc.gz: checked in rtf version + +2001-06-07 16:24 martink + + * CMake.rtf: updated docs + +2001-06-07 14:52 hoffman + + * Source/cmAddTestCommand.cxx, Source/cmCablePackageCommand.cxx, + Source/cmCableWrapTclCommand.cxx, Source/cmCacheManager.cxx, + Source/cmCacheManager.h, Source/cmDSWWriter.cxx, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmSystemTools.h, Source/cmTarget.h, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUtilitySourceCommand.cxx, + Source/cmVTKWrapJavaCommand.cxx, + Source/cmVTKWrapPythonCommand.cxx, + Source/cmVTKWrapTclCommand.cxx, Source/cmake.cxx, + Source/MFCDialog/CMakeSetupDialog.cpp, + Templates/CMakeWindowsSystemConfig.cmake: ENH: move utilities to + targets from makefile, and add versioning to cache + +2001-06-07 12:22 king + + * Source/cmEnableTestingCommand.cxx: BUG: ENABLE_TESTING command + may need to create output directory before writing the + CMakeTestfile into it since it is invoked before the makefile + generator runs. + +2001-06-07 11:36 scottim + + * Source/cmDSPWriter.cxx, Templates/CMakeWindowsSystemConfig.cmake, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/UtilityHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: adding a "Release with + debugging Info" build to CMake for NT + +2001-06-07 10:16 king + + * Source/cmCableWrapTclCommand.cxx: ERR: Fixed generation of source + name and directory for cmSourceFiles of generated Tcl wrapper + files. Changed extension of generated gcc-xml input c++ file to + be .cc so that GCC will recognize it, but MsDev will still allow + a custom command on it. + +2001-06-07 08:50 millerjv + + * Source/cmConfigureFileNoAutoconf.cxx: FIX: Chaned error message + to match command + +2001-06-06 16:45 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Changed generation of + gccxml command to write out define and include flags explicitly + instead of using CMAKE_CXX_FLAGS and INCLUDE_FLAGS variables. + This should help it run when gccxml is not the compiler that will + build the generated wrappers. + +2001-06-06 16:14 millerjv + + * Source/cmAddTestCommand.cxx: FIX: InitialPass() seg fault on + std::copy and FinalPass() was not appending to the file + +2001-06-06 13:58 martink + + * Source/: cmAddTestCommand.cxx, cmAddTestCommand.h, + cmCommands.cxx, cmConfigureFileNoAutoconf.cxx, + cmEnableTestingCommand.cxx, cmEnableTestingCommand.h, + cmMakefile.cxx, cmMakefile.h, cmTestsCommand.cxx: added enable + testing deprecated some commands + +2001-06-06 13:55 hoffman + + * Source/CMakeLib.dsp: [no log message] + +2001-06-06 13:48 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h, cmDSWMakefile.cxx, cmDSWMakefile.h, + cmDSWWriter.cxx, cmDSWWriter.h, cmMSProjectGenerator.cxx, + cmMSProjectGenerator.h: ENH: rename DSWMakefile and DSPMakefile + to DSWWriter and DSPWriter + +2001-06-06 13:19 hoffman + + * Source/: cmAbstractFilesCommand.cxx, cmAbstractFilesCommand.h, + cmAddCustomTargetCommand.cxx, cmAddCustomTargetCommand.h, + cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddTestCommand.cxx, cmAddTestCommand.h, + cmAuxSourceDirectoryCommand.cxx, cmAuxSourceDirectoryCommand.h, + cmBuildCommand.cxx, cmBuildCommand.h, cmBuildNameCommand.cxx, + cmBuildNameCommand.h, cmBuildSharedLibrariesCommand.cxx, + cmBuildSharedLibrariesCommand.h, cmCableClassSetCommand.cxx, + cmCableClassSetCommand.h, cmCableCloseNamespaceCommand.cxx, + cmCableCloseNamespaceCommand.h, cmCableDefineSetCommand.cxx, + cmCableDefineSetCommand.h, cmCableOpenNamespaceCommand.cxx, + cmCableOpenNamespaceCommand.h, cmCablePackageCommand.cxx, + cmCablePackageCommand.h, cmCablePackageEntryCommand.cxx, + cmCablePackageEntryCommand.h, cmCableWrapTclCommand.cxx, + cmCableWrapTclCommand.h, cmCommand.h, cmConfigureFileCommand.cxx, + cmConfigureFileCommand.h, cmConfigureFileNoAutoconf.cxx, + cmConfigureFileNoAutoconf.h, cmElseCommand.cxx, cmElseCommand.h, + cmEndIfCommand.cxx, cmEndIfCommand.h, cmExecProgramCommand.cxx, + cmExecProgramCommand.h, cmFindFileCommand.cxx, + cmFindFileCommand.h, cmFindLibraryCommand.cxx, + cmFindLibraryCommand.h, cmFindPathCommand.cxx, + cmFindPathCommand.h, cmFindProgramCommand.cxx, + cmFindProgramCommand.h, cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, cmIfCommand.cxx, cmIfCommand.h, + cmIncludeCommand.cxx, cmIncludeCommand.h, + cmIncludeDirectoryCommand.cxx, cmIncludeDirectoryCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmInstallFilesCommand.cxx, + cmInstallFilesCommand.h, cmInstallTargetsCommand.cxx, + cmInstallTargetsCommand.h, cmLibraryCommand.h, + cmLinkDirectoriesCommand.cxx, cmLinkDirectoriesCommand.h, + cmLinkLibrariesCommand.cxx, cmLinkLibrariesCommand.h, + cmLoadCacheCommand.cxx, cmLoadCacheCommand.h, + cmMakeDirectoryCommand.cxx, cmMakeDirectoryCommand.h, + cmMakefile.cxx, cmMessageCommand.cxx, cmMessageCommand.h, + cmOptionCommand.cxx, cmOptionCommand.h, cmProjectCommand.cxx, + cmProjectCommand.h, cmSetCommand.cxx, cmSetCommand.h, + cmSiteNameCommand.cxx, cmSiteNameCommand.h, + cmSourceFilesCommand.cxx, cmSourceFilesCommand.h, + cmSourceGroupCommand.cxx, cmSourceGroupCommand.h, + cmSubdirCommand.cxx, cmSubdirCommand.h, + cmTargetLinkLibrariesCommand.cxx, cmTargetLinkLibrariesCommand.h, + cmTestsCommand.cxx, cmTestsCommand.h, cmUtilitySourceCommand.cxx, + cmUtilitySourceCommand.h, cmVTKWrapJavaCommand.cxx, + cmVTKWrapJavaCommand.h, cmVTKWrapPythonCommand.cxx, + cmVTKWrapPythonCommand.h, cmVTKWrapTclCommand.cxx, + cmVTKWrapTclCommand.h, cmWrapExcludeFilesCommand.cxx, + cmWrapExcludeFilesCommand.h: ENH: rename Invoke to InitialPass + +2001-06-06 13:18 hoffman + + * Source/MFCDialog/PropertyList.cpp: BUG: PATH options should not + remove the file part of the path... + +2001-06-06 11:02 millerjv + + * Source/cmMakefile.cxx: Change name of file created from Testfile + to CMakeTestfile.txt + +2001-06-06 09:44 martink + + * Source/cmSystemTools.cxx: better regexp for reg entries + +2001-06-06 09:43 martink + + * Modules/FindJNI.cmake: better tests + +2001-06-06 07:47 millerjv + + * Source/cmMakefile.cxx: FIX: forgot to close the files + +2001-06-05 22:54 perera + + * Source/cmUnixMakefileGenerator.cxx: ENH: Compress the library + search directories so that each appears only once. + +2001-06-05 20:34 millerjv + + * Source/cmCommands.cxx: ENH: Added AddTest command + +2001-06-05 20:34 millerjv + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: Added AddTest, and + GenerateTestfile routines + +2001-06-05 20:32 millerjv + + * Source/: cmAddTestCommand.cxx, cmAddTestCommand.h: New cmake + command to specify a single test + +2001-06-05 17:46 berk + + * Source/cmVTKWrapPythonCommand.cxx: Module name between Unix and + Windows got switched by mistake. + +2001-06-05 17:41 biddi + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Some tweaks, + hacks and #ifdefs required to compile cmake on Borland C++Builder + +2001-06-05 17:29 hoffman + + * Source/MFCDialog/CMakeSetup.dsp: ENH: add PathDialog + +2001-06-05 17:26 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PathDialog.cpp, + PathDialog.h, PropertyList.cpp: ENH: add better path chooser + dialog + +2001-06-05 15:48 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: BUG: fix EXE and LIB + path problems + +2001-06-04 18:24 hoffman + + * Source/: cmDSWMakefile.cxx, cmDSWWriter.cxx: STYLE: line too long + +2001-06-04 18:24 hoffman + + * Source/cmMessageCommand.cxx: ENH: print all arguments + +2001-06-04 18:23 hoffman + + * Source/cmSetCommand.cxx: ENH: add better error checking + +2001-06-04 17:17 martink + + * Source/: cmFindIncludeCommand.cxx, cmFindIncludeCommand.h: + removed find include command + +2001-06-04 17:16 martink + + * Source/cmCommands.cxx: removed find include command finally added + message + +2001-06-04 16:55 martink + + * Source/: cmSystemTools.cxx, cmSystemTools.h: new message command + +2001-06-04 16:55 martink + + * Source/: cmMessageCommand.cxx, cmMessageCommand.h: new command + +2001-06-04 16:45 martink + + * Source/cmVTKWrapPythonCommand.cxx: unused variable + +2001-06-04 15:46 barre + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityHeader.dsptemplate, + staticLibHeader.dsptemplate: the "Release" target is not the + default. + +2001-06-04 11:34 hoffman + + * Source/: cmGeneratedFileStream.h, cmUnixMakefileGenerator.cxx: + ENH: try to better handle control-c during make Makefiles + +2001-06-04 10:18 hoffman + + * Source/: cmCacheManager.cxx, cmDSWMakefile.cxx, cmDSWWriter.cxx, + cmFunctionBlocker.h, cmMSProjectGenerator.cxx, cmMakefile.cxx, + cmMakefileGenerator.h, MFCDialog/CMakeSetupDialog.cpp: BUG: clean + up memory leaks. + +2001-06-01 13:54 martink + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: fix for network + includ paths + +2001-06-01 13:29 berk + + * Source/cmVTKWrapPythonCommand.cxx: Fixing the module name for + Unix. + +2001-05-31 15:48 hoffman + + * Source/: cmake.cxx, MFCDialog/CMakeSetupDialog.cpp: BUG: fix edit + of directories + +2001-05-31 14:15 berk + + * Source/cmVTKWrapPythonCommand.cxx: Should not use decl if not on + Windows. + +2001-05-30 15:56 hoffman + + * Source/cmakemain.cxx: BUG: add missing file + +2001-05-30 15:36 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: remove unused + includes + +2001-05-30 15:28 hoffman + + * Source/: CMakeLib.dsp, Makefile.in, cmMSProjectGenerator.cxx, + cmake.cxx, cmake.dsp, cmake.h, MFCDialog/CMakeSetup.dsp, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h: + ENH: change MFC gui to use cmake class + +2001-05-29 14:16 perera + + * Source/cmUnixMakefileGenerator.cxx: BUG: Now only one makefile + rule is generated per depenency. This eliminates a number of + warnings. + +2001-05-25 17:19 geoff + + * Source/cmSetCommand.cxx: bug meaning that set(a b) just set a to + "" and not to b + +2001-05-25 15:33 king + + * Source/cmSystemTools.cxx: BUG: Fixed stupid error in the hack I + just checked in. + +2001-05-25 15:32 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: WIN32 executable target + rules are now generated in unix the same as any other executable + (instead of not at all). + +2001-05-25 15:27 barre + + * Templates/CMakeWindowsSystemConfig.cmake: better help + +2001-05-25 15:27 barre + + * Source/MFCDialog/PropertyList.cpp: display the property name in + the help box + +2001-05-25 14:31 king + + * Source/cmSystemTools.cxx: BUG: Added hack to + cmSystemTools::GetPath to make its algorithm correctly parse off + the last entry of the system PATH environment variable. + +2001-05-25 14:27 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: Fixed logic that splits + a full path library link into the -L and -l pieces to not write + out a -l by itself if the file regular expression does not match. + +2001-05-25 07:31 millerjv + + * Modules/Testing.cmake: BUG: missing quote on a custom command + +2001-05-24 21:17 barre + + * Source/: cmSystemTools.cxx, cmSystemTools.h: New functions used + to extract the components of a full filename. + +2001-05-24 21:14 barre + + * Source/cmFindPathCommand.cxx: The path found is now collapsed + (cleaner). + +2001-05-24 21:13 barre + + * Source/: cmGetFilenameComponentCommand.cxx, + cmGetFilenameComponentCommand.h, cmCommands.cxx: Welcome to + cmGetFilenameComponentCommand ("Get a specific component of a + full filename") + +2001-05-24 21:12 barre + + * Source/CMakeLib.dsp: Welcome to cmGetFilenameComponentCommand + +2001-05-24 21:11 barre + + * Modules/FindTCL.cmake: Try to find tclsh or wish and use that + path to find the include or lib directory. TK_INTERNAL_PATH is + searched too (path to tkWinInt.h) + +2001-05-24 19:17 barre + + * Source/cmSystemTools.cxx: optimize ConvertToUnixSlashes a little + bit, and use it in MakeDirectory (code was duplicated) + +2001-05-24 17:51 king + + * Templates/CMakeSystemConfig.cmake.in: ERR: VAR type entry missing + after CACHE for CMAKE_TEMPLATE_FLAGS. + +2001-05-24 14:59 barre + + * Source/: cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h: updated + to handle Tk commands compiled/linked separately. Useful for VTK + Tk widgets for example. + +2001-05-24 13:45 millerjv + + * Modules/Testing.cmake: Project independent setting for testing + +2001-05-24 13:40 barre + + * Source/: cmSystemTools.cxx, cmSystemTools.h: new Capitalized + function. Will be used in the VTK Tcl wrapper for example (in a + more portable way). + +2001-05-24 13:35 hoffman + + * Source/MFCDialog/CMakeSetup.rc: [no log message] + +2001-05-24 12:57 hoffman + + * Modules/FindOpenGL.cmake, Source/cmSetCommand.cxx, + Source/cmSetCommand.h, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Templates/CMakeSystemConfig.cmake.in, + Templates/CMakeWindowsSystemConfig.cmake: ENH: change the syntax + of the SET command, fix the combo box for larger strings + +2001-05-24 11:47 martink + + * Source/: cmMakefile.h, cmake.cxx, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/resource.h: added + version number + +2001-05-24 10:32 barre + + * Templates/DLLHeader.dsptemplate: removed hardcoded VTKDLL + +2001-05-24 10:00 barre + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, staticLibHeader.dsptemplate: slight + change in the order of the options (right-most takes precedence) + +2001-05-23 20:16 millerjv + + * Source/cmBuildCommand.cxx: Changed Windows build command to build + Release + +2001-05-23 18:31 barre + + * Templates/DLLHeader.dsptemplate: Intermediate Dir was wrong + +2001-05-23 18:22 barre + + * Templates/CMakeWindowsSystemConfig.cmake: /Gz => /GZ + +2001-05-23 18:19 barre + + * Templates/CMakeWindowsSystemConfig.cmake: removed /O2 from debug + +2001-05-23 17:19 hoffman + + * Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Templates/CMakeWindowsSystemConfig.cmake, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: ENH: create + CMAKE_CXX_FLAGS_[Buildtype] flags + +2001-05-23 16:33 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: add compute systeminfo + +2001-05-23 16:31 martink + + * Source/cmMSProjectGenerator.cxx: bug finding windows template + file + +2001-05-23 16:28 martink + + * Source/: cmSystemTools.cxx, cmake.cxx: command line fixes for + win32 + +2001-05-23 16:09 barre + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityHeader.dsptemplate, + staticLibHeader.dsptemplate: ReleaseMinSize => MinSizeRel + +2001-05-23 15:53 hoffman + + * Templates/DLLHeader.dsptemplate: BUG: remove vtkCommon + +2001-05-23 15:49 martink + + * Source/cmake.cxx: fixed quoted cmake + +2001-05-23 14:44 hoffman + + * Source/cmSystemTools.cxx: ENH: add better error message + +2001-05-23 14:33 geoff + + * Source/cmake.dsp: DSPs have to be binary + +2001-05-23 14:05 hoffman + + * Templates/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityHeader.dsptemplate, + staticLibHeader.dsptemplate: ENH: change Release Minsize to + MinSizeRel, add MinSizeRel to dll template + +2001-05-23 13:16 king + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: Added INSTALL + target to switch in OutputDSPFile. Also added a default that + prints out an error message so that anyone who adds a target + doesn't forget to update the switch. + +2001-05-23 12:02 martink + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, cmDSWMakefile.cxx, + cmDSWWriter.cxx: install fixes for win32 + +2001-05-23 11:53 martink + + * Source/: cmMakefile.cxx, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: added install target support + +2001-05-23 11:34 ibanez + + * Modules/FindVTK.cmake: Module to search for VTK include and + library paths + +2001-05-23 11:29 martink + + * Source/: cmInstallFilesCommand.cxx, cmInstallFilesCommand.h, + cmInstallTargetsCommand.cxx, cmInstallTargetsCommand.h, + cmCommands.cxx, cmTarget.cxx, cmTarget.h: added install rules + +2001-05-23 11:27 martink + + * Templates/CMakeSystemConfig.cmake.in: added prefix to config + +2001-05-23 10:47 hoffman + + * Source/cmGeneratedFileStream.h: BUG: remove warning + +2001-05-23 10:47 hoffman + + * Source/cmake.dsp: BUG: fix output directory + +2001-05-23 10:01 martink + + * Source/cmProjectCommand.cxx: added PROJECT_SOURCE_DIR + +2001-05-23 09:35 hoffman + + * Source/cmTarget.cxx: ENH: allow duplicate libraries + +2001-05-22 20:45 barre + + * Templates/UtilityHeader.dsptemplate: Template now uses + EXECUTABLE_OUTPUT_PATH too. + +2001-05-22 20:44 barre + + * Templates/EXEWinHeader.dsptemplate: PROP BASE and PROP were + inverted + +2001-05-22 20:36 barre + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: Seems to me that + EXEWinHeader was not searched in the right place. + +2001-05-22 17:49 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: do not include /usr/lib + in -L + +2001-05-22 13:52 hoffman + + * Source/Makefile.in: fix CXXFLAGS + +2001-05-22 13:42 hoffman + + * Source/Makefile.in: [no log message] + +2001-05-22 13:40 hoffman + + * configure, configure.in: use cxxflags in test builds + +2001-05-22 13:22 hoffman + + * Source/Makefile.in, Source/cmUnixMakefileGenerator.cxx, + Templates/configure, Templates/configure.in: BUG: fix depends and + CXXFLAGS passing + +2001-05-22 12:38 barre + + * Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Templates/DLLHeader.dsptemplate, Templates/EXEHeader.dsptemplate, + Templates/EXEWinHeader.dsptemplate, + Templates/staticLibHeader.dsptemplate: fixed some of the + LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH problems. + +2001-05-22 11:15 martink + + * dummy.in: no longer used + +2001-05-22 10:43 ibanez + + * Source/FLTKDialog/FLTKDialog.dsp: ENH: PropertyList class added + +2001-05-22 10:43 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cpp, + CMakeSetupGUIImplementation.h: ENH: Added support for the + fltk::PropertyList class + +2001-05-22 10:42 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cpp, CMakeSetupGUI.fl, + CMakeSetupGUI.h: Added interactions with the PropertyList + class + +2001-05-22 10:41 ibanez + + * Source/FLTKDialog/: FLTKPropertyList.cpp, FLTKPropertyList.h: + Class to manage the list of properties displayed on the scroller + +2001-05-21 16:43 king + + * Makefile.in: ERR: Added missing @srcdir@ and modified install + expressions to include *.cmake* files instead of just *.cmake + files (for .in). + +2001-05-21 16:21 king + + * Source/cmCableWrapTclCommand.cxx: ENH: Converted to new Class and + Group tags in place of WrapperSet and Groups tags. + +2001-05-21 16:10 hoffman + + * Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in: fix for hp x11 and gl + +2001-05-21 15:16 hoffman + + * Modules/FindOpenGL.cmake, Source/cmSystemTools.cxx: fix opengl on + hp + +2001-05-21 14:42 martink + + * Source/MFCDialog/: CMakeSetup.rc, res/CMakeSetupDialog.ico: icon + updates + +2001-05-21 14:36 martink + + * Source/MFCDialog/: CMakeSetup.rc, resource.h: new icon + +2001-05-21 14:17 hoffman + + * Source/cmake.cxx: BUG: remove declaration without variable + +2001-05-21 14:01 hoffman + + * configure, configure.in, Source/Makefile.in, + Source/cmBuildNameCommand.cxx, + Source/cmUnixMakefileGenerator.cxx, + Templates/CMakeSystemConfig.cmake.in: clean up for build on its + own + +2001-05-21 11:43 martink + + * Source/cmake.dsp: release fix + +2001-05-21 11:34 martink + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + CMakeSetupCMD.dsp: collapsed into cmake.cxx + +2001-05-21 11:32 martink + + * Source/cmake.dsp: new dsp + +2001-05-21 11:13 martink + + * Source/cmake.cxx: bug fix in finding CMAKE_ROOT + +2001-05-21 11:10 martink + + * Makefile.in: added install target + +2001-05-21 10:47 hoffman + + * Source/: cmBuildNameCommand.cxx, cmSetCommand.cxx, + MFCDialog/CMakeDialog.h, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h, + MFCDialog/resource.h: BUG: fix compiler name + +2001-05-21 09:50 martink + + * Source/: CMakeSetup.dsw, cmake.cxx, + MFCDialog/CMakeSetupDialog.cpp: updated for out of tree builds + +2001-05-21 09:32 martink + + * Makefile.in, configure, configure.in, install-sh: out of place + cmake + +2001-05-21 09:32 martink + + * CMakeSystemConfig.cmake.in, configure.in.sample, + Source/Makefile.in, Source/cmMakefile.cxx, + Source/cmUnixMakefileGenerator.cxx, Source/cmake.cxx: new out of + place builds + +2001-05-21 09:31 martink + + * Templates/: CMakeSystemConfig.cmake.in, configure, configure.in: + new structure + +2001-05-18 16:45 hoffman + + * CMakeSystemConfig.cmake.in, Source/cmUnixMakefileGenerator.cxx: + ENH: add support for X11 + +2001-05-18 16:30 martink + + * Source/cmUnixMakefileGenerator.cxx: duh + +2001-05-18 15:25 martink + + * Source/: cmake.cxx, cmake.h: new command + +2001-05-18 15:23 martink + + * Source/cmSystemTools.h: minor whitespace change + +2001-05-18 15:22 martink + + * Source/cmMSProjectGenerator.cxx: compiler fix + +2001-05-18 15:20 martink + + * Source/: cmMSProjectGenerator.cxx, cmMSProjectGenerator.h, + cmMakefileGenerator.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: changes for cmake to live outside of + the source tree + +2001-05-18 13:04 hoffman + + * CMakeSystemConfig.cmake.in, Source/cmSetCommand.cxx: ENH: allow + cache to override config file + +2001-05-18 11:48 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: fix link of executables + +2001-05-18 11:12 martink + + * Source/cmMakefileGenerator.h: added SetLocal method + +2001-05-18 11:09 martink + + * Source/: cmMSProjectGenerator.cxx, cmMSProjectGenerator.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: added + SetLocal method + +2001-05-18 10:15 hoffman + + * CMakeSystemConfig.cmake.in, Source/cmUnixMakefileGenerator.cxx: + BUG: quote the compiler and other options + +2001-05-17 17:43 hoffman + + * Source/: CMakeBuildTargets.cxx, Makefile.in: compile source dir + into cmake + +2001-05-17 15:48 will + + * Source/cmSystemTools.cxx: ERR:Bad #ifdef's + +2001-05-17 12:38 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.cpp: ENH: Added + Methods for loading the cache + +2001-05-17 12:37 ibanez + + * Source/FLTKDialog/FLTKDialog.cpp: ENH: Load the cache at start + +2001-05-17 12:36 ibanez + + * Source/FLTKDialog/CMakeSetupGUIImplementation.h: ENH: Added + methods to load the cache + +2001-05-17 12:36 martink + + * Source/: DLLFooter.dsptemplate, DLLHeader.dsptemplate, + EXEFooter.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityFooter.dsptemplate, + UtilityHeader.dsptemplate, staticLibFooter.dsptemplate, + staticLibHeader.dsptemplate: moved into Template directory + +2001-05-17 12:25 martink + + * CMakeMakefileTemplate.in, CMakeMaster.make.in, + CMakeRules.make.in, CMakeSimpleRules.make.in, + CMakeTargets.make.in, CMakeTopMakefileTemplate.in, + CMakeVariables.make.in, CMakeWindowsSystemConfig.cmake: no longer + used + +2001-05-17 12:14 martink + + * Source/CMakeBuildTargets.cxx: unix fix + +2001-05-17 12:08 martink + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + cmCablePackageCommand.cxx, cmDSPMakefile.cxx, cmDSPWriter.cxx, + cmMakefile.cxx, cmUnixMakefileGenerator.cxx, + MFCDialog/CMakeSetupDialog.cpp: half checked in changes for + CMAKE_ROOT + +2001-05-17 12:04 martink + + * Templates/: CMakeWindowsSystemConfig.cmake, + DLLFooter.dsptemplate, DLLHeader.dsptemplate, + EXEFooter.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, UtilityFooter.dsptemplate, + UtilityHeader.dsptemplate, staticLibFooter.dsptemplate, + staticLibHeader.dsptemplate: new directory + +2001-05-17 12:02 ibanez + + * Source/FLTKDialog/FLTKDialog.dsp: VC++ Project file to + construct the FLTK GUI for CMake + +2001-05-17 12:02 ibanez + + * Source/FLTKDialog/FLTKDialog.cpp: Main file that + instantiates the GUI class and run it. + +2001-05-17 12:01 ibanez + + * Source/FLTKDialog/: CMakeSetupGUIImplementation.cpp, + CMakeSetupGUIImplementation.h: Implementation of the virtual + Callbacks declared in the GUI + +2001-05-17 12:00 ibanez + + * Source/FLTKDialog/: CMakeSetupGUI.cpp, CMakeSetupGUI.h: File + generated by FLTK FLUID containing the implementation of the GUI + +2001-05-17 11:58 ibanez + + * Source/FLTKDialog/CMakeSetupGUI.fl: GUI description file + used by FLTK interactive tool : FLUID + +2001-05-17 11:44 hoffman + + * Source/: cmCableWrapTclCommand.cxx, cmConfigure.h.in, + cmGeneratedFileStream.h, cmStandardIncludes.h: BUG: fix to + compile on hp with aCC + +2001-05-17 11:22 king + + * Source/cmCableWrapTclCommand.cxx: Renamed gccxml input/output + files to drop _tcl qualification. + +2001-05-16 18:10 hoffman + + * CMakeSystemConfig.cmake.in: ENH: fix for sunCC + +2001-05-16 18:08 hoffman + + * Source/: cmCacheManager.cxx, cmUnixMakefileGenerator.cxx: BUG: + fix for sun compiler + +2001-05-16 17:43 king + + * Source/: cmCableClassSet.cxx, cmCableClassSet.h: ERR: Removed use + of member templates. + +2001-05-16 17:18 king + + * Source/cmUnixMakefileGenerator.cxx: ERR: int -> unsigned int + +2001-05-16 17:18 king + + * Source/cmGeneratedFileStream.h: ERR: const error fixed. + +2001-05-16 17:11 king + + * Source/CMakeLib.dsp: ENH: Added cmCableClassSet.cxx to build. + +2001-05-16 17:11 king + + * Source/cmGeneratedFileStream.h: ERR: Added is_open() check in + cmGeneratedFileStream::operator bool() so that implicit + conversion to bool is not used. + +2001-05-16 17:11 king + + * Source/cmCableClassSet.cxx: ERR: Removed dynamic_cast so that + RTTI isn't required. + +2001-05-16 16:41 king + + * Source/: Makefile.in, cmCableClassSet.cxx, cmCableClassSet.h, + cmCableClassSetCommand.cxx, cmCableClassSetCommand.h, + cmCableWrapTclCommand.cxx, cmCableWrapTclCommand.h, + cmCommands.cxx: ENH: Adding CABLE_CLASS_SET and CABLE_WRAP_TCL + commands. They cannot yet be used with the main branch of CABLE, + though. + +2001-05-16 16:40 king + + * Source/cmGeneratedFileStream.h: ENH: cmGeneratedFileStream class + added to simplify copy-if-different usage on generated files. + +2001-05-16 15:43 hoffman + + * configure.in.sample: [no log message] + +2001-05-16 15:15 hoffman + + * CMakeSystemConfig.cmake.in, Source/Makefile.in, + Source/cmBuildNameCommand.cxx, + Source/cmBuildSharedLibrariesCommand.cxx, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmProjectCommand.cxx, Source/cmSetCommand.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, + Source/MFCDialog/CMakeSetupDialog.cpp: ENH: unify make process on + unix + +2001-05-16 09:19 king + + * Source/: cmData.h, cmMakefile.cxx, cmMakefile.h: ENH: Added + cmData and corresponding DataMap in cmMakefile to allow commands + to register arbitrary extra data with the makefile without + modifying the cmMakefile class definition. + +2001-05-15 13:14 martink + + * Source/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + EXEWinHeader.dsptemplate, cmDSPMakefile.cxx, cmDSPWriter.cxx, + staticLibHeader.dsptemplate: added output directory support + +2001-05-14 16:47 barre + + * Source/cmSystemTools.cxx: Changed separator between registry key + and its value. Change regexp for registry key. + +2001-05-14 16:46 barre + + * Modules/FindTCL.cmake: Changed separator between registry key and + its value. + +2001-05-14 10:36 hoffman + + * Source/cmSystemTools.cxx: ENH: put back lost changes from r1.38 + +2001-05-12 07:29 barre + + * Source/cmSystemTools.cxx: fix + => += bug reported by A. Perera + +2001-05-11 17:41 barre + + * Source/MFCDialog/res/CMakeSetupDialog.ico: I know, there are more + serious things to do :) A new icon. The previous one has not be + overwritten, it's in there too. + +2001-05-11 17:22 barre + + * Source/cmSystemTools.cxx: Extended the registry key regexp + +2001-05-11 17:11 barre + + * Modules/FindTCL.cmake: Add 8.4 and registry support + +2001-05-11 17:11 barre + + * Source/cmSystemTools.cxx: Add support for a specific value name + in a registry key + +2001-05-11 14:49 geoff + + * Source/cmCacheManager.cxx: Cache file is a bit prettier + +2001-05-11 14:39 hoffman + + * Source/: cmCableSourceFilesCommand.cxx, cmSystemTools.cxx, + cmUnixMakefileGenerator.cxx: BUG: fix find library for unix + +2001-05-11 13:58 barre + + * Modules/FindPythonLibs.cmake: NAMES syntax + +2001-05-11 13:52 martink + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: fix for expanding + library vars + +2001-05-11 12:30 barre + + * Source/cmFindLibraryCommand.cxx: Fix help string when NAMES was + used (forgot the case when there is no name) + +2001-05-11 12:13 barre + + * Source/cmFindLibraryCommand.cxx: Fix help string when NAMES was + used + +2001-05-11 11:45 king + + * Source/cmFindLibraryCommand.cxx: ERR: int -> unsigned int. + +2001-05-11 11:39 hoffman + + * CMakeVariables.make.in, Source/cmFindLibraryCommand.cxx: BUG: add + back thread library + +2001-05-11 11:07 martink + + * Source/cmFindProgramCommand.cxx: expands reg values + +2001-05-11 10:52 martink + + * Source/: EXEHeader.dsptemplate, cmAddExecutableCommand.cxx, + cmAddExecutableCommand.h, cmDSPMakefile.cxx, cmDSPMakefile.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmMakefile.cxx, cmMakefile.h, + cmSystemTools.cxx, cmSystemTools.h, cmUnixMakefileGenerator.cxx, + EXEWinHeader.dsptemplate: added registry entry support and + windows app support + +2001-05-11 10:27 martink + + * Modules/: FindJNI.cmake, FindPythonLibs.cmake: minor fixes and + new python module + +2001-05-11 10:04 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: fix gui problem + +2001-05-10 17:22 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/PropertyList.cpp: BUG: + fix up gui with values that stay around too long + +2001-05-10 16:21 geoff + + * Source/cmMakefile.cxx: definitions should now be overwritten if + they already exist + +2001-05-10 15:50 hoffman + + * Source/cmSystemTools.cxx: BUG: fix unix path search + +2001-05-10 15:32 martink + + * Source/cmTarget.cxx: fix for expaning libraries prior to + generating dsp + +2001-05-10 14:30 geoff + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: Reads and uses + MSPROJECT_TEMPLATE_DIRECTORY if it exists + +2001-05-10 14:02 king + + * CMake.doc: BUG: Removing this file. It has been replaced by + CMake.doc.gz to get around a problem with CVS. + +2001-05-10 13:52 martink + + * Source/cmTarget.h: added win32 executable option + +2001-05-10 12:25 king + + * CMake.doc.gz: Testing strange cvs problem with .doc files. + +2001-05-10 12:05 king + + * CMake.pdf, CMake.pdf.gz: BUG: Removing old CMake.pdf and adding + the gzipped version, CMake.pdf.gz because of file size problems + with cvs. + +2001-05-10 11:20 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: Removed stray debugging + output statement. Also renamed some variables for clarity. + +2001-05-10 11:19 king + + * Source/cmSystemTools.cxx: ERR: RunCommand method needed return in + unix. + +2001-05-10 11:18 king + + * Source/: cmFindLibraryCommand.cxx, cmFindProgramCommand.cxx: ERR: + Removed unused variable + +2001-05-10 09:45 king + + * CMakeVariables.make.in: BUG: ANSI_CFLAGS -> CMAKE_ANSI_CFLAGS + +2001-05-09 18:00 geoff + + * Source/: EXEHeader.dsptemplate, cmDSPMakefile.cxx, + cmDSPWriter.cxx: ADD LINK32s are now on multiple lines because VC + breaks otherwise + +2001-05-09 17:38 barre + + * Modules/FindTCL.cmake: ENH: add 8.3 support + +2001-05-09 16:17 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: BUG: escape spaces + before adding .lib + +2001-05-09 16:08 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: escape spaces + +2001-05-09 15:48 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: only add .lib + if no .lib exists + +2001-05-09 14:53 hoffman + + * Modules/FindFLTK.cmake, Modules/FindGTK.cmake, + Modules/FindJNI.cmake, Modules/FindJPEG.cmake, + Modules/FindMPI.cmake, Modules/FindTCL.cmake, Source/cmCommand.h, + Source/cmFindLibraryCommand.cxx, Source/cmFindLibraryCommand.h, + Source/cmFindProgramCommand.cxx, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmUnixMakefileGenerator.cxx: ENH: + change find library and find program to look for more than one + name + +2001-05-09 13:44 hoffman + + * Source/cmCableDefineSetCommand.cxx: BUG: match called on invalid + number + +2001-05-09 13:22 martink + + * CMakeMaster.make.in, CMakeRules.make.in, + CMakeSystemConfig.cmake.in, CMakeTopMakefileTemplate.in, + CMakeVariables.make.in, configure.in.sample, Source/Makefile.in: + cleaned up configure some + +2001-05-09 11:15 millerjv + + * Source/cmCacheManager.cxx: FIX: only clear the cache on a load + when the load needs to read internal values. Otherwise, it is + assumed that we are reading another projects cache. + +2001-05-09 10:13 hoffman + + * Source/MFCDialog/PropertyList.cpp: BUG: fix crash + +2001-05-09 09:52 hoffman + + * Source/cmConfigureFileCommand.cxx: BUG: fix use beyond end of + array + +2001-05-09 08:51 martink + + * Source/: cmCommands.cxx, cmLoadCacheCommand.cxx, + cmLoadCacheCommand.h, cmSourceFile.cxx: added load cache command + and fixed source file + +2001-05-08 17:37 king + + * Source/cmCacheManager.cxx: ERR: LoadCache needed to return a + value. + +2001-05-08 17:04 martink + + * Source/: cmCacheManager.cxx, cmCacheManager.h: added ability to + load another cache + +2001-05-08 17:03 martink + + * Source/cmProjectCommand.cxx: now adds src and bin dir into cache + +2001-05-08 16:20 martink + + * Source/cmVTKWrapTclCommand.cxx: fixed bug in init code + +2001-05-08 16:01 hoffman + + * configure.in.sample: clean up + +2001-05-08 13:40 hoffman + + * Source/MFCDialog/PropertyList.cpp: ENH: add initial path support + for file choosers + +2001-05-08 11:40 martink + + * Source/cmTargetLinkLibrariesCommand.cxx: BUG: added arg0 to link + libraries + +2001-05-08 10:16 ibanez + + * Modules/FindFLTK.cmake: Module to search the path for FLTK + library ( http://www.fltk.org ) + +2001-05-07 18:14 king + + * Source/: cmAddExecutableCommand.cxx, cmAddLibraryCommand.cxx, + cmMakefile.cxx: ENH: Moved cache entry addition into + cmMakefile::AddLibrary and AddExecutable so that commands do not + have to add it explicitly. + +2001-05-07 18:11 hoffman + + * CMakeSystemConfig.cmake.in, Source/CMakeBuildTargets.cxx, + Source/Makefile.in, Source/cmCacheManager.cxx, + Source/cmCommands.cxx, Source/cmConfigureFile.cxx, + Source/cmConfigureFile.h, Source/cmConfigureFileCommand.cxx, + Source/cmConfigureFileCommand.h, Source/cmExecProgram.cxx, + Source/cmExecProgram.h, Source/cmExecProgramCommand.cxx, + Source/cmExecProgramCommand.h, Source/cmMakeDirectoryCommand.cxx, + Source/cmMakeDirectoryCommand.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmSystemTools.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h: ENH: call configure from cmake + +2001-05-07 10:02 blezek + + * Source/cmConfigureFile.cxx: BUG: Removing Remove Variables call + +2001-05-07 09:16 geoff + + * configure.in.sample: Under FreeBSD: should be + CMAKE_SHLIB_BUILD_FLAGS and not CMAKE_SHLIB_LINK_FLAGS. + CMakeSystemConfig.cmake not being made + +2001-05-05 11:28 hoffman + + * Source/cmAddExecutableCommand.cxx: BUG: add internal cache entry + for executables, so depends can work + +2001-05-05 11:03 hoffman + + * Source/: cmAddTargetCommand.cxx, cmAddTargetCommand.h, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.h, + cmCommands.cxx, cmLibraryCommand.cxx: BUG: add removed command, + and sort the order in cmCommands.cxx + +2001-05-04 17:00 martink + + * Source/: cmMakefile.cxx, cmUnixMakefileGenerator.cxx: fixes for + untiltiy targets in all + +2001-05-04 16:44 blezek + + * Source/cmBuildNameCommand.cxx: ENH: Proper build name + +2001-05-04 16:43 blezek + + * Source/cmSiteNameCommand.cxx: ENH: Correct sitename + +2001-05-04 15:50 martink + + * Source/: cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmAddTargetCommand.cxx, + cmAddTargetCommand.h, cmDSWMakefile.cxx, cmDSWWriter.cxx, + cmMakefile.cxx, cmMakefile.h, cmTarget.h, + cmVTKWrapJavaCommand.cxx: option to make utilities in the all + target + +2001-05-04 14:53 hoffman + + * CMakeSystemConfig.cmake.in, CMakeWindowsSystemConfig.cmake: ENH: + move to cmake for itkConfigure.h.in + +2001-05-04 12:52 martink + + * Source/cmVTKWrapJavaCommand.cxx: updates + +2001-05-04 11:35 geoff + + * Modules/: FindGTK.cmake, FindJPEG.cmake: INCLUDE these to find + the relevant libraries + +2001-05-04 11:34 hoffman + + * Source/: cmAddCustomTargetCommand.cxx, + cmAddCustomTargetCommand.h, cmBuildCommand.cxx, cmBuildCommand.h, + cmBuildNameCommand.cxx, cmBuildNameCommand.h, cmExecProgram.cxx, + cmExecProgram.h, cmSiteNameCommand.cxx, cmSiteNameCommand.h: ENH: + move testing stuff to cmake from configure, good bye dashboard... + :) + +2001-05-04 11:30 hoffman + + * CMakeRules.make.in, CMakeSystemConfig.txt.in, + CMakeWindowsSystemConfig.txt, Source/cmAddTargetCommand.cxx, + Source/cmAddTargetCommand.h, Source/cmCacheManager.cxx, + Source/cmCommands.cxx, Source/cmDSWMakefile.cxx, + Source/cmDSWWriter.cxx, Source/cmFindProgramCommand.cxx, + Source/cmMakefile.cxx, Source/cmOptionCommand.cxx, + Source/cmOptionCommand.h, Source/cmSourceGroup.cxx, + Source/cmSourceGroup.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmUnixMakefileGenerator.cxx, + Source/MFCDialog/CMakeSetup.rc: ENH: move testing stuff to cmake + from configure, good bye dashboard... :) + +2001-05-04 10:44 king + + * Source/cmSystemTools.cxx: ENH: Added support to EscapeSpaces to + use double quotes on windows. + +2001-05-04 10:44 king + + * Source/cmCablePackageCommand.cxx: ENH: Added use of CMAKE cache + entry for generating the DSP/makefile build rules. + +2001-05-04 10:44 king + + * Source/: cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h: ENH: Added use of CMAKE cache entry for generating + the DSP build rules. + +2001-05-04 10:13 martink + + * Modules/FindJNI.cmake: minor fixes + +2001-05-04 09:56 martink + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: fixed custom command + rule + +2001-05-04 09:47 martink + + * Modules/FindJNI.cmake: new module + +2001-05-04 09:39 martink + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, cmSourceGroup.cxx, + cmSourceGroup.h, cmVTKWrapJavaCommand.cxx: better custom rules + +2001-05-04 08:46 martink + + * Source/: cmFunctionBlocker.h, cmIfCommand.cxx, cmIfCommand.h, + cmMakefile.cxx, cmVTKWrapJavaCommand.cxx: better If checks + +2001-05-04 08:45 martink + + * Source/: cmSourceFilesRequireCommand.cxx, + cmSourceFilesRequireCommand.h, cmUnixDefinesCommand.cxx, + cmUnixDefinesCommand.h, cmUnixLibrariesCommand.cxx, + cmUnixLibrariesCommand.h, cmWin32DefinesCommand.cxx, + cmWin32DefinesCommand.h, cmWin32IncludeDirectoryCommand.cxx, + cmWin32IncludeDirectoryCommand.h, cmWin32LibrariesCommand.cxx, + cmWin32LibrariesCommand.h: removed old functions + +2001-05-03 16:55 king + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + MFCDialog/CMakeSetupDialog.cpp: ENH: Added generation of internal + CMAKE cache entry with path to command-line CMake executable. + +2001-05-03 16:55 king + + * Source/: cmFindProgramCommand.cxx, cmSystemTools.cxx, + cmSystemTools.h: ENH: Added cmSystemTools::FindProgram() and + full-path detection utilities. + +2001-05-03 15:27 martink + + * Source/: cmCommands.cxx, cmVTKWrapJavaCommand.cxx, + cmVTKWrapJavaCommand.h: minor fixes + +2001-05-03 11:04 martink + + * Source/cmCommands.cxx: removed deprecated commands + +2001-05-03 10:58 martink + + * CMakeSystemConfig.cmake.in: better config info + +2001-05-03 10:35 martink + + * Source/cmConfigureFile.cxx: now support cmakedefine + +2001-05-03 08:53 martink + + * CMakeSystemConfig.txt.in, CMakeWindowsSystemConfig.txt: uses + cmake commands now + +2001-05-03 08:52 martink + + * CMakeSystemConfig.cmake.in, CMakeSystemConfig.txt.in, + CMakeWindowsSystemConfig.cmake, CMakeWindowsSystemConfig.txt, + Source/cmMakefile.cxx, Source/cmMakefile.h: system config uses + cmake commands now + +2001-05-02 17:33 martink + + * Modules/FindMPI.cmake: minor fixes + +2001-05-02 17:07 martink + + * Modules/FindMPI.cmake: new module + +2001-05-02 14:08 martink + + * Modules/FindOpenGL.cmake: simple module + +2001-05-02 11:53 martink + + * Modules/FindTCL.cmake: finds tk as well + +2001-05-02 11:53 martink + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx: cache loaded + into makefile + +2001-05-01 17:52 martink + + * Source/: cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx: + fixed bug in limiting to source lists + +2001-05-01 17:37 king + + * Source/: cmCableDefineSetCommand.cxx, cmCableDefineSetCommand.h, + cmCableWrapCommand.cxx, cmCableWrapCommand.h: ENH: Changed + cmCableWrapCommand to inherit from cmCableDefineSetCommand since + they do almost exactly the same thing. Added a GetXmlTag virtual + function to both classes to return what XML tag to generate in + the set's output. cmCableDefineSetCommand generates a "Set" tag, + and cmCableWrapCommand generates a "WrapperSet" tag. What is + inside the tags is still generated by the cmCableDefineSetCommand + superclass. + +2001-05-01 17:35 king + + * Source/: cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCablePackageEntryCommand.cxx, + cmCablePackageEntryCommand.h, cmCableSourceFilesCommand.cxx, + cmCableSourceFilesCommand.h: ENH: Changed WriteConfiguration back + to const because it doesn't need to report errors anymore. + +2001-05-01 17:12 hoffman + + * Source/: UtilityFooter.dsptemplate, UtilityHeader.dsptemplate: + ADD: add utiltity templates + +2001-05-01 16:55 hoffman + + * configure.in.sample, Source/cmAddTargetCommand.cxx, + Source/cmDSPMakefile.cxx, Source/cmDSPMakefile.h, + Source/cmDSPWriter.cxx, Source/cmDSPWriter.h, + Source/cmDSWMakefile.cxx, Source/cmDSWMakefile.h, + Source/cmDSWWriter.cxx, Source/cmDSWWriter.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, Source/cmTarget.h, + Source/cmUnixMakefileGenerator.cxx: ENH: implement ADD_TARGET + command, and add an ALL_BUILD target + +2001-05-01 16:34 martink + + * Source/: cmMakefile.cxx, MFCDialog/CMakeSetupDialog.cpp: cache + now loaded into makefile + +2001-05-01 16:28 martink + + * Source/: cmCacheManager.cxx, cmCacheManager.h: added method to + puch cache into makefile defines + +2001-05-01 16:27 martink + + * Source/cmIfCommand.cxx: slight bug in If command I think + +2001-05-01 11:28 martink + + * Modules/FindTCL.cmake: first module + +2001-05-01 11:16 martink + + * Source/: cmCommands.cxx, cmElseCommand.cxx, cmIfCommand.cxx, + cmIfCommand.h, cmSetCommand.cxx, cmSetCommand.h, + cmVTKWrapPythonCommand.cxx, cmVTKWrapTclCommand.cxx: new set + command and IF NOT + +2001-04-30 14:56 martink + + * Source/: cmElseCommand.cxx, cmFindFileCommand.cxx, + cmFindLibraryCommand.cxx, cmFindPathCommand.cxx, cmIfCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h: bug fixes + +2001-04-30 11:51 king + + * Source/cmCablePackageCommand.cxx: BUG: Fixed output of + CMakeLists.txt path in cable_config.xml dependency list for unix. + Needed to escape spaces instead of enclosing in double quotes. + +2001-04-30 11:29 king + + * Source/cmMakefile.h: ERR: Removed a conflict that was checked in. + +2001-04-30 10:52 anonymous + + * Source/: cmCommands.cxx, cmDSPMakefile.cxx, cmDSPMakefile.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmIncludeCommand.cxx, + cmIncludeCommand.h, cmMakefile.cxx, cmMakefile.h: New command: + INCLUDE(somefile.txt) + +2001-04-30 10:44 martink + + * Source/: cmCommands.cxx, cmDSPMakefile.cxx, cmDSPWriter.cxx, + cmDSWMakefile.cxx, cmDSWWriter.cxx, cmFindIncludeCommand.cxx, + cmFindLibraryCommand.cxx, cmLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.h, cmMakefile.cxx, cmMakefile.h, + cmTarget.cxx, cmTarget.h, cmTargetLinkLibrariesCommand.cxx, + cmTargetLinkLibrariesCommand.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h: added TARGET_LINK_LIBRARY command and + support for debug and release libraries to link against + +2001-04-27 14:57 king + + * Source/cmUnixMakefileGenerator.cxx: ERR: Renamed CustomCommands + to BuildRules to match change in cmSourceGroup. + +2001-04-27 14:52 king + + * Source/cmCablePackageCommand.cxx: BUG: Removed output of GCC_XML + rules when the command cannot be found. + +2001-04-27 14:51 king + + * Source/: cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h, cmSourceGroup.cxx, cmSourceGroup.h: BUG: Removed + output of dual rules for source files that are processed by both + the compiler and by a custom command. Also removed generation of + duplicate CMakeLists.txt in the project files. + +2001-04-27 14:40 martink + + * CMakeSystemConfig.txt.in, CMakeWindowsSystemConfig.txt: get + system info into cmake + +2001-04-27 14:25 martink + + * Source/: cmConfigureFile.cxx, cmConfigureFile.h: added configure + file + +2001-04-27 11:53 hoffman + + * configure.in.sample: BUG: run cache build with each configure + +2001-04-27 11:36 hoffman + + * CMakeRules.make.in, Source/cmMakefile.cxx: BUG: fix inplace + builds + +2001-04-27 11:03 hoffman + + * Source/cmMakefile.cxx: ENH: fix in source build with non-gnu + +2001-04-27 09:32 hoffman + + * Source/cmMakefile.cxx: ENH: add output when creating files + +2001-04-27 09:30 martink + + * Source/: cmFindFileCommand.cxx, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx: better help strings + +2001-04-27 09:13 will + + * Source/cmAuxSourceDirectoryCommand.h: ENH:New copyright + +2001-04-27 08:46 martink + + * CMakeVariables.make.in: removed old junk + +2001-04-27 08:01 will + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmAddExecutableCommand.cxx, cmAddExecutableCommand.h, + cmAddLibraryCommand.cxx, cmAddLibraryCommand.h, + cmAddTargetCommand.cxx, cmAddTargetCommand.h, + cmAuxSourceDirectoryCommand.cxx, + cmBuildSharedLibrariesCommand.cxx, + cmCableCloseNamespaceCommand.cxx, cmCableCloseNamespaceCommand.h, + cmCableCommand.cxx, cmCableCommand.h, cmCableData.cxx, + cmCableData.h, cmCableDefineSetCommand.cxx, + cmCableDefineSetCommand.h, cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCableOpenNamespaceCommand.cxx, + cmCableOpenNamespaceCommand.h, cmCablePackageCommand.cxx, + cmCablePackageCommand.h, cmCablePackageEntryCommand.cxx, + cmCablePackageEntryCommand.h, cmCableSourceFilesCommand.cxx, + cmCableSourceFilesCommand.h, cmCableWrapCommand.cxx, + cmCableWrapCommand.h, cmCacheManager.cxx, cmCacheManager.h, + cmCommand.h, cmCommands.h, cmConfigureFileNoAutoconf.cxx, + cmConfigureFileNoAutoconf.h, cmCustomCommand.cxx, + cmCustomCommand.h, cmDSPMakefile.cxx, cmDSPMakefile.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmDSWMakefile.cxx, + cmDSWMakefile.h, cmDSWWriter.cxx, cmDSWWriter.h, cmDirectory.cxx, + cmDirectory.h, cmElseCommand.cxx, cmElseCommand.h, + cmEndIfCommand.cxx, cmEndIfCommand.h, cmFindFileCommand.cxx, + cmFindFileCommand.h, cmFindIncludeCommand.cxx, + cmFindIncludeCommand.h, cmFindLibraryCommand.cxx, + cmFindLibraryCommand.h, cmFindProgramCommand.cxx, + cmFindProgramCommand.h, cmFunctionBlocker.h, cmIfCommand.cxx, + cmIfCommand.h, cmIncludeDirectoryCommand.cxx, + cmIncludeDirectoryCommand.h, + cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmLibraryCommand.cxx, + cmLibraryCommand.h, cmLinkDirectoriesCommand.cxx, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.cxx, + cmLinkLibrariesCommand.h, cmMSProjectGenerator.cxx, + cmMSProjectGenerator.h, cmMakeDepend.cxx, cmMakeDepend.h, + cmMakefile.cxx, cmMakefile.h, cmMakefileGenerator.cxx, + cmMakefileGenerator.h, cmOptionCommand.cxx, cmOptionCommand.h, + cmProjectCommand.cxx, cmProjectCommand.h, + cmRegularExpression.cxx, cmRegularExpression.h, cmSourceFile.cxx, + cmSourceFile.h, cmSourceFilesCommand.cxx, cmSourceFilesCommand.h, + cmSourceFilesRequireCommand.cxx, cmSourceFilesRequireCommand.h, + cmSourceGroup.cxx, cmSourceGroup.h, cmSourceGroupCommand.cxx, + cmSourceGroupCommand.h, cmStandardIncludes.h, + cmSubdirCommand.cxx, cmSubdirCommand.h, cmSystemTools.cxx, + cmSystemTools.h, cmTarget.cxx, cmTarget.h, cmTestsCommand.cxx, + cmTestsCommand.h, cmUnixDefinesCommand.cxx, + cmUnixDefinesCommand.h, cmUnixLibrariesCommand.cxx, + cmUnixLibrariesCommand.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmUtilitySourceCommand.cxx, + cmUtilitySourceCommand.h, cmVTKWrapPythonCommand.cxx, + cmVTKWrapTclCommand.cxx, cmWin32DefinesCommand.cxx, + cmWin32DefinesCommand.h, cmWin32IncludeDirectoryCommand.cxx, + cmWin32IncludeDirectoryCommand.h, cmWin32LibrariesCommand.cxx, + cmWin32LibrariesCommand.h, cmWrapExcludeFilesCommand.cxx, + cmWrapExcludeFilesCommand.h: ENH:New copyright + +2001-04-27 07:55 will + + * Source/: cmAbstractFilesCommand.cxx, cmAbstractFilesCommand.h: + ENH:Copyright + +2001-04-26 16:22 martink + + * Source/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h, cmDSWMakefile.cxx, cmDSWWriter.cxx, + cmLinkLibrariesCommand.cxx, cmLinkLibrariesCommand.h, + cmMakefile.cxx, cmMakefile.h, cmUnixMakefileGenerator.cxx, + cmVTKWrapPythonCommand.cxx, MFCDialog/CMakeSetup.rc, + MFCDialog/resource.h: support for debug and opt libraries + +2001-04-26 15:41 martink + + * Source/: cmOptionCommand.cxx, cmOptionCommand.h: better help + +2001-04-26 15:27 king + + * Source/: cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCablePackageCommand.cxx, + cmCablePackageEntryCommand.cxx, cmCablePackageEntryCommand.h, + cmCableSourceFilesCommand.cxx, cmCableSourceFilesCommand.h, + cmCableWrapCommand.cxx, cmCableWrapCommand.h: ENH: Changed + WriteConfiguration to non-const so it can do error checking. + Added parsing and output of a name for each WrapperSet generated + from a CABLE_WRAP command. + +2001-04-26 14:53 hoffman + + * Source/: cmAddLibraryCommand.cxx, + cmBuildSharedLibrariesCommand.cxx, cmCacheManager.cxx, + cmCacheManager.h, cmFindFileCommand.cxx, + cmFindIncludeCommand.cxx, cmFindLibraryCommand.cxx, + cmFindPathCommand.cxx, cmFindProgramCommand.cxx, + cmOptionCommand.cxx, cmUtilitySourceCommand.cxx, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/PropertyList.cpp, + MFCDialog/PropertyList.h: ENH: add help for cache entries + +2001-04-26 10:49 martink + + * Source/: cmCacheManager.cxx, cmElseCommand.cxx, cmIfCommand.cxx, + cmSystemTools.cxx, cmSystemTools.h: some fixes for If commands + +2001-04-26 09:38 martink + + * Source/: CMakeSetup.dsw, DumpDocumentation.dsp, cmCommands.cxx, + cmDSPMakefile.cxx, cmDSPWriter.cxx, cmDSPMakefile.h, + cmDSPWriter.h, cmFindFileCommand.cxx, cmFindIncludeCommand.cxx, + cmFindIncludeCommand.h, cmFindLibraryCommand.cxx, + cmFindLibraryCommand.h, cmFindPathCommand.cxx, + cmFindPathCommand.h, cmMakefile.cxx, cmMakefile.h, + cmUnixMakefileGenerator.cxx: bug fixes + +2001-04-25 19:01 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: set initial build to + source dir + +2001-04-25 18:53 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: add error checking + for empty build dir + +2001-04-25 16:09 hoffman + + * configure.in.sample, Source/Makefile.in, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmMakefile.cxx, Source/MFCDialog/CMakeDialog.h, + Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, + Source/MFCDialog/PropertyList.cpp, + Source/MFCDialog/PropertyList.h: ENH: clean up cmake GUI and + remove the parsing of CMakeLists.txt files by configure + +2001-04-25 11:47 martink + + * Source/: cmElseCommand.h, cmEndIfCommand.h, cmIfCommand.h: rules + were not inherited when they should be + +2001-04-25 09:39 king + + * Source/cmUnixMakefileGenerator.cxx: BUG: Fixed output of + dependencies. It needs to loop over the makefile's targets, not + the source lists. + +2001-04-25 09:37 king + + * Source/cmMakeDepend.cxx: STYLE: Updated comments for name change + cmClassFile->cmSourceFile + +2001-04-25 09:33 martink + + * CMake.doc: updated the docs some + +2001-04-24 17:33 king + + * Source/cmUnixMakefileGenerator.cxx: ERR: cmClassFile.h -> + cmSourceFile.h include change. + +2001-04-24 16:49 martink + + * Source/: cmClassFile.cxx, cmClassFile.h: many fixes and cleanup + and features + +2001-04-24 16:46 martink + + * Source/: CMakeLib.dsp, Makefile.in, cmAbstractFilesCommand.cxx, + cmAuxSourceDirectoryCommand.cxx, cmCablePackageCommand.cxx, + cmCableSourceFilesCommand.cxx, cmCacheManager.cxx, + cmCacheManager.h, cmCommands.cxx, cmDSPMakefile.cxx, + cmDSPMakefile.h, cmDSPWriter.cxx, cmDSPWriter.h, + cmMakeDepend.cxx, cmMakeDepend.h, cmMakefile.cxx, cmMakefile.h, + cmOptionCommand.cxx, cmSourceFilesCommand.cxx, + cmSourceFilesRequireCommand.cxx, cmTarget.h, + cmUnixDefinesCommand.cxx, cmUnixLibrariesCommand.cxx, + cmUnixMakefileGenerator.cxx, cmWin32DefinesCommand.cxx, + cmWin32IncludeDirectoryCommand.cxx, cmWin32LibrariesCommand.cxx, + cmWrapExcludeFilesCommand.cxx, MFCDialog/CMakeSetupDialog.cpp, + cmVTKWrapPythonCommand.cxx, cmVTKWrapPythonCommand.h, + cmVTKWrapTclCommand.cxx, cmVTKWrapTclCommand.h, cmSourceFile.cxx, + cmSourceFile.h, cmTarget.cxx, cmWrapTclCommand.cxx, + cmWrapTclCommand.h: many fixes and cleanup and features + +2001-04-24 14:19 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, PropertyList.cpp, + PropertyList.h: BUG: fix duplicate property items + +2001-04-24 13:32 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h, + PropertyList.cpp: BUG: fix cache updates + +2001-04-24 12:40 hoffman + + * Source/: cmBuildSharedLibrariesCommand.cxx, cmCacheManager.cxx, + cmCacheManager.h, cmMakefile.cxx, cmMakefile.h, + cmOptionCommand.cxx, cmWrapTclCommand.cxx, + MFCDialog/CMakeSetupDialog.cpp: BUG: fix build directory problem + +2001-04-24 09:45 king + + * CMakeVariables.make.in: ERR: Removed extra SRC_OBJ reference. + The variable is no longer used. + +2001-04-23 16:40 hoffman + + * Source/: CMakeLib.dsp, cmCacheManager.cxx, cmCacheManager.h, + cmDSWMakefile.cxx, cmDSWWriter.cxx, cmSourceGroup.h, + cmStandardIncludes.h, cmWindowsConfigure.cxx, + cmWindowsConfigure.h, MFCDialog/CMakeDialog.h, + MFCDialog/CMakeSetup.dsp, MFCDialog/CMakeSetup.rc, + MFCDialog/CMakeSetupDialog.cpp, MFCDialog/CMakeSetupDialog.h, + MFCDialog/PropertyList.cpp, MFCDialog/PropertyList.h, + MFCDialog/resource.h: ENH: new GUI editor for cmake cache file + +2001-04-23 16:34 martink + + * Source/: cmCommands.cxx, cmWrapTclCommand.cxx: added option + command + +2001-04-23 16:33 martink + + * Source/: cmOptionCommand.cxx, cmOptionCommand.h: new command + +2001-04-23 13:58 blezek + + * CMakeRules.make.in, Source/cmUnixMakefileGenerator.cxx: BUG: + Clean was not doing it's job + +2001-04-23 10:23 king + + * Source/cmIfCommand.h: ERR: Added virtual destructor to complement + virtual functions in cmIfFunctionBlocker. + +2001-04-19 17:39 martink + + * Source/: cmAddDefinitionsCommand.cxx, cmAddDefinitionsCommand.h, + cmCommands.cxx, cmElseCommand.cxx, cmElseCommand.h, + cmEndIfCommand.cxx, cmEndIfCommand.h, cmFunctionBlocker.h, + cmIfCommand.cxx, cmIfCommand.h, cmMakefile.cxx, cmMakefile.h: + added if else endif add definition + +2001-04-19 13:28 martink + + * Source/: cmCablePackageCommand.cxx, cmCustomCommand.h, + cmDSPMakefile.cxx, cmDSPWriter.cxx, cmDSWMakefile.cxx, + cmDSWWriter.cxx, cmMakefile.cxx, cmSourceGroup.cxx, cmTarget.h, + cmUnixMakefileGenerator.cxx: cleaned up the coding style made + ivars private etc + +2001-04-18 08:01 king + + * Source/cmMakeDepend.cxx: ERR: We can't assume a vector iterator + is a pointer. It must be dereferenced to get a reference to the + element, and then we can take the address of that to get a + pointer. "i" becomes "&*i" + +2001-04-17 07:42 king + + * Source/cmUnixMakefileGenerator.cxx: ERR: Removed unused variable. + +2001-04-16 15:40 hoffman + + * Source/: cmStandardIncludes.h, cmSystemTools.cxx: BUG: fix small + compile issues on HP aCC + +2001-04-16 12:31 king + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h: ENH: Changed m_Indices + to an stl set and renamed it to m_IndexSet. Using a set results + in a significant performance increase and reduction in memory + usage. + +2001-04-16 10:15 millerjv + + * Source/cmAddLibraryCommand.cxx: FIX: allow ADD_LIBRARY with no + source list + +2001-04-16 10:01 martink + + * Source/: cmCablePackageCommand.cxx, cmMakefile.h: fixed cable + package issue + +2001-04-12 15:34 martink + + * Source/: Makefile.in, cmAddLibraryCommand.cxx, + cmCacheManager.cxx, cmCacheManager.h, cmMakefile.h, + cmUnixMakefileGenerator.cxx, cmWrapTclCommand.cxx: some bug fixes + +2001-04-12 09:55 king + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: Added individual library linkage output so that shared + libraries will not try to link against themselves. + +2001-04-12 09:49 martink + + * Source/: cmExecutablesCommand.cxx, cmExecutablesCommand.h: + removed old rules + +2001-04-11 16:34 king + + * Source/cmUnixMakefileGenerator.cxx: ENH: Generation now sets up + proper linking of shared libraries to each other. + +2001-04-11 15:43 king + + * CMakeMaster.make.in: ERR: Needed to switch point where + CMakeTargets.make is included so that Variables will be available + to the targets file. + +2001-04-11 14:58 martink + + * Source/CMakeLib.dsp, Source/CMakeSetupCMD.dsp, + Source/Makefile.in, Source/cmAbstractFilesCommand.cxx, + Source/cmAddExecutableCommand.cxx, + Source/cmAddExecutableCommand.h, Source/cmAddLibraryCommand.cxx, + Source/cmAddLibraryCommand.h, + Source/cmAuxSourceDirectoryCommand.cxx, + Source/cmAuxSourceDirectoryCommand.h, Source/cmCableCommand.cxx, + Source/cmCableData.cxx, Source/cmCableData.h, + Source/cmCablePackageCommand.cxx, Source/cmCablePackageCommand.h, + Source/cmCableSourceFilesCommand.cxx, Source/cmClassFile.cxx, + Source/cmClassFile.h, Source/cmCommands.cxx, + Source/cmCustomCommand.cxx, Source/cmCustomCommand.h, + Source/cmDSPMakefile.cxx, Source/cmDSPMakefile.h, + Source/cmDSPWriter.cxx, Source/cmDSPWriter.h, + Source/cmDSWMakefile.cxx, Source/cmDSWMakefile.h, + Source/cmDSWWriter.cxx, Source/cmDSWWriter.h, + Source/cmMakeDepend.cxx, Source/cmMakeDepend.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmSourceFilesCommand.cxx, Source/cmSourceFilesCommand.h, + Source/cmSourceFilesRequireCommand.cxx, + Source/cmSourceFilesRequireCommand.h, Source/cmSourceGroup.cxx, + Source/cmSourceGroup.h, Source/cmTarget.h, + Source/cmTestsCommand.cxx, Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, + Source/cmWrapExcludeFilesCommand.cxx, + Source/cmWrapTclCommand.cxx, Source/cmWrapTclCommand.h, + CMakeRules.make.in: major changes to support multiple libraries + and source lists + +2001-04-10 15:26 king + + * Source/DLLHeader.dsptemplate: ENH: Need BUILD_SHARED_LIBRARIES + defined for making windows DLLs. + +2001-04-09 10:56 king + + * Source/cmCablePackageCommand.cxx: ERR: Added double-quotes around + command name before arguments are appended. + +2001-04-09 10:53 king + + * Source/cmUnixMakefileGenerator.cxx: ERR: Missed one EscapeSpaces + call. + +2001-04-09 10:31 king + + * Source/: cmCableCommand.cxx, cmDSPMakefile.cxx, cmDSPWriter.cxx, + cmSystemTools.cxx, cmSystemTools.h, cmUnixMakefileGenerator.cxx, + cmUtilitySourceCommand.cxx: ERR: Corrected use of double-quotes + to be compatible with UNIX make. Now double quotes (windows) or + escape sequences for spaces (unix) are added when dependencies + are output. + +2001-04-09 09:44 king + + * Source/: cmCableCommand.cxx, cmDSPMakefile.cxx, cmDSPWriter.cxx, + cmUtilitySourceCommand.cxx: ENH: Added support for spaces in the + output directory names. Spaces in the input directory name may + work also, but are untested. + +2001-04-06 17:01 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, cmDSPMakefile.h, + cmDSPWriter.h, cmDSWMakefile.cxx, cmDSWWriter.cxx: BUG: fix + depends for libraries and executables in the same dir + +2001-04-06 14:51 hoffman + + * Source/: cmFindIncludeCommand.cxx, cmFindLibraryCommand.cxx, + cmMakefile.cxx: ENH: better error reporting, and add NOTFOUND + into cache for library and file find + +2001-04-06 12:00 martink + + * Source/cmFindIncludeCommand.h: fixed the documentation some + +2001-04-06 08:28 millerjv + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: FIX: configurations + list needed to be reset for each dsp file created + +2001-04-04 09:33 millerjv + + * Source/: EXEHeader.dsptemplate, staticLibHeader.dsptemplate: FIX: + returned to using /O2 optimization level and put a pragma in the + netlib code that could not handle the /Og component of /O2 + +2001-03-28 11:49 king + + * Source/cmSystemTools.cxx: ERR: Blank line regular expression + updated to allow whitespace on the line. + +2001-03-23 14:27 king + + * Source/: cmCableSourceFilesCommand.cxx, + cmCableSourceFilesCommand.h: ENH: Added support for + CABLE_SOURCE_FILES to refer to files that are not in the current + directory. The include path is searched for the files. + +2001-03-21 15:52 king + + * Source/cmStandardIncludes.h: ERR: Added pragma to disable symbol + length warning for Intel compiler. + +2001-03-20 13:48 king + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ERR: Small bug in + generated DSP file fixed. A custom command environment variable + has been replaced with explicity writing out the command. + +2001-03-20 13:20 king + + * Source/: CMakeLib.dsp, Makefile.in, cmCableCommand.cxx, + cmCablePackageCommand.cxx, cmCommands.cxx, cmDSPMakefile.cxx, + cmDSPMakefile.h, cmDSPWriter.cxx, cmDSPWriter.h, cmMakefile.cxx, + cmMakefile.h, cmSourceGroup.cxx, cmSourceGroup.h, + cmSourceGroupCommand.cxx, cmSourceGroupCommand.h, + cmUnixMakefileGenerator.cxx, cmWrapTclCommand.cxx: ENH: Added + SOURCE_GROUP command and corresponding support code. This + command allows CMakeLists files to specify how sources are + organized into groups in the generated DSP files and makefiles. + +2001-03-19 11:47 millerjv + + * Source/EXEHeader.dsptemplate: ENH: ignore unused libary warnings, + removed /force + +2001-03-19 11:02 king + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: Added text + files group to DSP output. CMakeLists.txt is duplicated in this + group and outside, but fixing this will require a reorganization + of custom rule generation. I should get to that soon. + +2001-03-19 11:01 king + + * Source/cmCableCommand.cxx: ERR: Changed generation of rule to + generate cable_config.xml to be produced differently for windows + and unix. + +2001-03-19 11:00 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ERR: Removed + functions I just added. They don't belong here (yet?). + +2001-03-19 10:09 king + + * Source/cmCableCommand.cxx: ENH: Added generation of a rule to + re-run CMake if the cable_config.xml file is missing. + +2001-03-19 10:09 king + + * Source/: cmSystemTools.cxx, cmSystemTools.h: ENH: Added functions + to get information about the CMake executable on each platform. + +2001-03-16 11:14 king + + * Source/: cmCableData.cxx, cmCableData.h: ERR: Re-ordered + declaration of members v. order of initialization on the + constructor to match each other. + +2001-03-16 11:04 king + + * Source/: cmCableData.cxx, cmCableData.h: BUG: Rearranged cable + config file open to do open in construction of m_OutputFile. + Fixes problem on SGI with opening the file. + +2001-03-16 09:25 king + + * Source/: cmCableDefineSetCommand.cxx, + cmCableSourceFilesCommand.cxx: ENH: Changed generated includes to + not have full path specified. + +2001-03-15 18:09 king + + * Source/: cmCommands.cxx, cmIncludeRegularExpressionCommand.cxx, + cmIncludeRegularExpressionCommand.h, cmMakeDepend.cxx, + cmMakeDepend.h, cmMakefile.cxx, cmMakefile.h: ENH: Added + INCLUDE_REGULAR_EXPRESSION command to set regular expression used + in dependency checking. + +2001-03-15 14:46 king + + * Source/: cmCableDefineSetCommand.cxx, cmCableDefineSetCommand.h: + ENH: Added SOURCE_FILES syntax to CABLE_DEFINE_SET command. + +2001-03-15 14:33 king + + * Source/: cmMakefile.cxx, cmMakefile.h: BUG: Moved definition of + CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR to be as soon as their + information is known. + +2001-03-15 10:42 king + + * Source/: cmCablePackageCommand.cxx, cmCablePackageCommand.h: BUG: + Fixed segfault when CABLE_PACKAGE is only CABLE command. Related + to order of virtual destructor calls. + +2001-03-14 17:49 king + + * Source/cmStandardIncludes.h: ERR: Added for-loop scoping hack for + CMake sources on MSVC + +2001-03-14 16:34 king + + * Source/cmSystemTools.cxx: ENH: Added support for comments inside + function calls and indented comments. + +2001-03-13 18:01 king + + * Source/: cmCableDefineSetCommand.cxx, cmCableDefineSetCommand.h: + ENH: Added support for element tag specification with syntax + tag:element as an argument to the CABLE_DEFINE_SET command. A + single colon with nothing to its left will result in an empty + tag. + +2001-03-13 09:33 king + + * Source/cmWrapTclCommand.cxx: ERR: Less-than-zero test replaced + with greater-than-zero since we want zero arguments. + +2001-03-12 18:30 king + + * Source/: cmCommand.h, cmSystemTools.cxx, cmSystemTools.h: ENH: + Improved error handling when GetError is called on a command that + has not called SetError. + +2001-03-12 10:10 geoff + + * Source/: cmCommands.cxx, cmWin32IncludeDirectoryCommand.cxx, + cmWin32IncludeDirectoryCommand.h: Include directories under Win32 + only (inherited by subdirs) + +2001-03-09 16:56 king + + * Source/: DLLHeader.dsptemplate, EXEHeader.dsptemplate, + cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h, staticLibHeader.dsptemplate: ENH: Finished + Simplifying dsptemplate processing with in place of separate + Release, Debug, ReleaseDLL, ... configurations. + +2001-03-09 15:35 king + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, + staticLibHeader.dsptemplate: ERR: Fixed library path problem for + ReleaseMinSize build. should now be used in place of separate + Release, Debug, and ReleaseMinSize. + +2001-03-09 14:35 king + + * Source/EXEHeader.dsptemplate: ERR: Fixed header template for + Release MinSize builds. + +2001-03-09 11:34 king + + * Source/EXEHeader.dsptemplate: ENH: Added Release MinSize + configuration for executables. + +2001-03-09 11:33 king + + * Source/cmUtilitySourceCommand.h: ENH: Made UTILITY_SOURCE command + inherited, just like FIND_PROGRAM. + +2001-03-09 11:16 king + + * Source/cmCablePackageCommand.cxx: ERR: Missing initalization of a + cmClassFile::m_HeaderFileOnly fixed. + +2001-03-09 10:53 king + + * Source/: cmDSWMakefile.cxx, cmDSWWriter.cxx, cmMakefile.cxx, + cmMakefile.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmUtilitySourceCommand.cxx: ENH: Added + utility dependency support. Now a project can depend on other + executables as well as link libraries. + +2001-03-09 10:52 king + + * Source/: cmCableCommand.cxx, cmCableData.cxx: ERR: Added + automatic creation of directory for cable_config.xml file and + corresponding error reporting. + +2001-03-09 10:52 king + + * Source/cmCablePackageCommand.cxx: ENH: Added proper dependency + generation for a package on cable executable. + +2001-03-08 18:24 king + + * Source/: cmMakefile.cxx, cmUtilitySourceCommand.cxx: ERR: + Replaced CMAKE_CFG= with CMAKE_CFG_OUTDIR= to fix windows + behavior. + +2001-03-08 18:13 king + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: Added output of + custom rules for XML sources. + +2001-03-08 17:38 king + + * Source/cmUnixMakefileGenerator.cxx: ENH: Added output of defines + flags as part of INCLUDE_FLAGS. + +2001-03-08 17:31 king + + * Source/cmUnixMakefileGenerator.cxx: ENH: Added output of a custom + command's m_Source as a dependency. + +2001-03-08 17:31 king + + * Source/cmUnixDefinesCommand.cxx: ERR: Minor wording error in + output message. + +2001-03-08 17:30 king + + * Source/cmCablePackageCommand.cxx: ENH: Creation of generator rule + now properly uses the custom command's m_Source member. + +2001-03-08 16:13 king + + * Source/: cmCableCommand.cxx, cmCableData.cxx, cmCableData.h, + cmCablePackageCommand.cxx, cmCablePackageCommand.h, + cmCableSourceFilesCommand.cxx, cmCableSourceFilesCommand.h: ENH: + Added creation of custom rules for generating CABLE packages. + +2001-03-08 16:12 king + + * Source/: cmMakeDepend.cxx, cmMakeDepend.h: ENH: Added support for + finding dependencies for files that don't exist. Dependency + recursion begins with hints provided in the cmClassFile for a + file if it doesn't exist. + +2001-03-08 11:30 king + + * Source/cmCableSourceFilesCommand.cxx: ENH: Added .txx detection + for Header block output. + +2001-03-08 10:30 king + + * Source/: cmCommands.cxx, cmMakefile.cxx, cmMakefile.h, + cmSystemTools.cxx, cmSystemTools.h, cmUtilitySourceCommand.cxx, + cmUtilitySourceCommand.h: ENH: Added UTILITY_SOURCE command for + specifying where a 3rd party utility's source is located when it + is included in the distribution of a project. + +2001-03-07 13:33 king + + * Source/cmCableCommand.cxx: ERR: Commented out experimental code + that was accidentally checked in. + +2001-03-07 13:23 king + + * Source/cmCableCommand.cxx: ENH: Added Cable to Utilities and + appropriate CMakeLists.txt changes. Moved VXLNumerics link out + of source's root directory and into separate entries for Code and + Testing directories. This prevents linking of all programs (like + Cable) with the numerics library. + +2001-03-02 16:04 king + + * Source/: cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h: + ENH: Added custom rule support to cmUnixMakefileGenerator. + +2001-03-02 13:47 will + + * Source/cmUnixMakefileGenerator.cxx: BUG: repeat all -l options to + avoid having to worry about link order. + +2001-03-02 12:27 king + + * Source/: cmCableCommand.cxx, cmCableData.cxx, cmCableData.h: ENH: + CABLE config file (config_cable.xml) should now be opened in the + output directory. + +2001-03-01 16:47 king + + * Source/: cmCableCloseNamespaceCommand.cxx, + cmCableCloseNamespaceCommand.h, cmCableCommand.cxx, + cmCableCommand.h, cmCableData.cxx, cmCableData.h, + cmCableDefineSetCommand.cxx, cmCableDefineSetCommand.h, + cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCableOpenNamespaceCommand.cxx, + cmCableOpenNamespaceCommand.h, cmCablePackageCommand.cxx, + cmCablePackageCommand.h, cmCablePackageEntryCommand.cxx, + cmCablePackageEntryCommand.h, cmCableSourceFilesCommand.cxx, + cmCableSourceFilesCommand.h, cmCableWrapCommand.cxx, + cmCableWrapCommand.h, cmCommands.cxx: ENH: Change to new CABLE + command architecture. CABLE configuration code is now generated + on the first pass, during the Invoke() calls. + +2001-02-28 17:50 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx, cmDSPMakefile.h, + cmDSPWriter.h, cmDSWMakefile.cxx, cmDSWWriter.cxx: BUG: fix + circular depends on libraries and remove depends for static + libraries + +2001-02-28 09:34 king + + * Source/: cmCableCommand.cxx, cmCableCommand.h, cmCableData.cxx, + cmCableData.h, cmCableDefineSetCommand.cxx, + cmCableDefineSetCommand.h, cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCommands.cxx: ENH: CABIL -> CABLE + rename. + +2001-02-27 16:50 martink + + * Source/: cmDSPMakefile.cxx, cmDSPMakefile.h, cmDSPWriter.cxx, + cmDSPWriter.h, cmDSWMakefile.cxx, cmDSWWriter.cxx: many + enhancements including dll support + +2001-02-27 16:49 martink + + * Source/cmWrapTclCommand.cxx: bug fixes + +2001-02-27 16:49 martink + + * Source/cmCommands.cxx: added new commands + +2001-02-27 16:48 martink + + * Source/cmClassFile.h: added wrap exclude ivar + +2001-02-27 16:48 martink + + * Source/: cmBuildSharedLibrariesCommand.cxx, + cmBuildSharedLibrariesCommand.h, cmWrapExcludeFilesCommand.cxx, + cmWrapExcludeFilesCommand.h: new commands + +2001-02-27 16:46 martink + + * Source/: DLLFooter.dsptemplate, DLLHeader.dsptemplate: dll build + rules + +2001-02-27 16:44 martink + + * Source/staticLibHeader.dsptemplate: change in options for much + smaller libraries + +2001-02-27 16:28 king + + * Source/: cmCableCommand.h, cmCableDefineSetCommand.cxx, + cmCableDefineSetCommand.h, cmCableInstantiateClassCommand.cxx, + cmCableInstantiateClassCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCommands.cxx: ENH: Implemented + automatic tag generation for CABIL_DEFINE_SET command. Added tag + output to WriteConfiguration methods. Added + CABIL_INSTANTIATE_CLASS command to generate explicit class + template instantiation configuration output. + +2001-02-27 15:41 king + + * Source/cmSystemTools.cxx: ENH/BUG: Improved function parsing to + allow just about anything inside a double-quoted argument. Also + fixed parsing of lines with both quoted and non-quoted arguments. + +2001-02-27 12:00 lorensen + + * Source/cmSystemTools.cxx: ENH: mask on mkdir set to 777. + +2001-02-27 12:00 lorensen + + * Source/CMakeBuildTargets.cxx: ERR: missing std:: on cout. + +2001-02-26 20:58 millerjv + + * Source/staticLibHeader.dsptemplate: FIX: added /GR to MinSize + build to avoid warnings about dynamic cast + +2001-02-26 18:20 king + + * Source/cmCableInstantiateCommand.cxx: ERR: Fixed configuration + file output to open file in output directory. + +2001-02-26 18:16 king + + * Source/cmWrapTclCommand.cxx: int -> unsigned int + +2001-02-26 18:00 king + + * Source/: cmCableCommand.cxx, cmCableCommand.h, cmCableData.cxx, + cmCableData.h, cmCableDefineSetCommand.cxx, + cmCableDefineSetCommand.h, cmCableInstantiateCommand.cxx, + cmCableInstantiateCommand.h, cmCommands.cxx: ENH: Added CABIL + commands for configuration file generation. + +2001-02-26 17:58 king + + * Source/cmMakefile.h: ENH: Added GetUsedCommands() method. + +2001-02-26 17:58 king + + * Source/cmStandardIncludes.h: ERR: fsream.h -> fstream.h + +2001-02-26 17:17 martink + + * Source/: cmCommands.cxx, cmDSPMakefile.cxx, cmDSPMakefile.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmMakefile.h: a variety of fixes + and enhancements + +2001-02-26 17:17 martink + + * Source/: cmWrapTclCommand.cxx, cmWrapTclCommand.h: very early + version of a wrapper + +2001-02-26 17:15 martink + + * Source/: cmClassFile.cxx, cmClassFile.h: added functionality, + fixed bug if no file existed and with header files + +2001-02-26 17:14 martink + + * Source/: cmFindProgramCommand.cxx, cmFindProgramCommand.h: fixed + bug and modified functionality + +2001-02-26 17:13 martink + + * Source/: cmFindFileCommand.cxx, cmFindFileCommand.h: new command + +2001-02-26 13:25 king + + * Source/cmMakefile.cxx: ERR: Fixed unknown command output error + message for spacing. + +2001-02-26 12:07 king + + * Source/: cmAbstractFilesCommand.h, cmAddTargetCommand.h, + cmAuxSourceDirectoryCommand.h, cmCommand.h, + cmExecutablesCommand.h, cmFindIncludeCommand.h, + cmFindLibraryCommand.h, cmFindProgramCommand.h, + cmIncludeDirectoryCommand.h, cmLibraryCommand.h, + cmLinkDirectoriesCommand.h, cmLinkLibrariesCommand.h, + cmProjectCommand.h, cmSourceFilesCommand.h, + cmSourceFilesRequireCommand.h, cmSubdirCommand.h, + cmTestsCommand.h, cmUnixDefinesCommand.h, + cmUnixLibrariesCommand.h, cmWin32DefinesCommand.h, + cmWin32LibrariesCommand.h: ENH: Added safe downcast support + (without RTTI) to cmCommand and its subclasses. + +2001-02-23 10:40 king + + * Source/: cmAbstractFilesCommand.cxx, cmCommand.h, cmCommands.h, + cmConfigureFileNoAutoconf.h, cmFindIncludeCommand.cxx, + cmFindLibraryCommand.cxx, cmFindProgramCommand.cxx, + cmMakefile.cxx, cmUnixMakefileGenerator.cxx: ERR: Fixed warnings + (int->unsigned int and a few others). + +2001-02-22 19:37 hoffman + + * configure.in.sample: ENH: update sample + +2001-02-22 19:31 hoffman + + * Source/cmSystemTools.cxx: BUG: remove debug print + +2001-02-22 19:23 hoffman + + * Source/CMakeBuildTargets.cxx, Source/Makefile.in, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmConfigureFileNoAutoconf.cxx, Source/cmDSPMakefile.cxx, + Source/cmDSPWriter.cxx, Source/cmDSWMakefile.cxx, + Source/cmDSWWriter.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmStandardIncludes.h, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/MFCDialog/CMakeSetupDialog.cpp, CMakeRules.make.in, + CMakeTopMakefileTemplate.in, Source/cmConfigure.h.in: ENH: add + CMakeCache.txt support + +2001-02-20 14:12 hoffman + + * Source/cmSystemTools.cxx: ENH: remove relative and extra paths in + CMakeLists.txt files + +2001-02-20 12:25 hoffman + + * CMakeRules.make.in: BUG: fix for in source build + +2001-02-19 15:13 hoffman + + * CMakeMakefileTemplate.in, MakefileTemplate.in, + configure.in.sample, Source/CMakeBuildTargets.cxx, + Source/CMakeSetupCMD.cxx, Source/Makefile.in, + Source/cmCacheManager.cxx, Source/cmCacheManager.h, + Source/cmCommand.h, Source/cmDSWMakefile.cxx, + Source/cmDSWWriter.cxx, Source/cmFindIncludeCommand.cxx, + Source/cmFindLibraryCommand.cxx, Source/cmFindProgramCommand.cxx, + Source/cmIncludeDirectoryCommand.cxx, Source/cmMakefile.cxx, + Source/cmRegularExpression.h, Source/cmSystemTools.cxx, + Source/cmUnixMakefileGenerator.cxx, + Source/cmUnixMakefileGenerator.h, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/resource.h: ENH: first pass at cache, clean up + the unix generator, clean up configure.in some + +2001-02-18 13:02 hoffman + + * configure.in.sample: ENH: add a smaple configure.in for CMake + based projects + +2001-02-18 12:47 hoffman + + * configure.in.sample: ENH: add a smaple configure.in for CMake + based projects + +2001-02-16 15:34 hoffman + + * Source/cmCacheManager.h: ENH: clean up comments some + +2001-02-16 15:01 will + + * CMake.pdf: ENH:Added pdf file + +2001-02-16 11:52 martink + + * CMake.doc: clean up docs + +2001-02-16 11:34 martink + + * Source/: cmConfigureFileNoAutoconf.cxx, cmDSWMakefile.cxx, + cmDSWWriter.cxx, cmFindIncludeCommand.cxx, + cmFindLibraryCommand.cxx, cmFindLibraryCommand.h, + cmFindProgramCommand.cxx, cmMakefile.cxx, cmMakefile.h, + cmSystemTools.cxx, cmSystemTools.h: ENH: add new commands fro + find library and find program + +2001-02-15 13:30 martink + + * CMakeRules.make.in, CMakeVariables.make.in, + Source/CMakeBuildTargets.cxx, Source/CMakeSetupCMD.cxx, + Source/cmClassFile.cxx, Source/cmClassFile.h, + Source/cmConfigureFileNoAutoconf.h, Source/cmDSPMakefile.cxx, + Source/cmDSPWriter.cxx, Source/cmDSWMakefile.cxx, + Source/cmDSWWriter.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmProjectCommand.cxx, + Source/cmProjectCommand.h, Source/MFCDialog/CMakeSetupDialog.cpp: + some cleanup and fixes + +2001-02-14 12:58 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: set output directory + correctly + +2001-02-14 12:26 hoffman + + * Source/cmMakeDepend.cxx: ENH: fix depend segfault + +2001-02-13 18:49 hoffman + + * Source/: cmConfigureFileNoAutoconf.cxx, cmMakefile.cxx: ENH: new + vnl + +2001-02-13 16:48 hoffman + + * Source/: cmMakefile.cxx, cmMakefile.h: ENH: add configure style + @var@ expansion + +2001-02-12 19:49 hoffman + + * Source/: CMakeBuildTargets.cxx, Makefile.in, cmCommands.cxx, + cmConfigureFileNoAutoconf.cxx, cmConfigureFileNoAutoconf.h, + cmConfigureHeaderCommand.cxx, cmConfigureHeaderCommand.h, + cmMakefile.cxx, cmMakefile.h, cmStandardIncludes.h, + cmSystemTools.cxx, MFCDialog/CMakeSetupDialog.cpp, cmCommands.h: + ENH: get rid of special msc configure file + +2001-02-12 14:42 hoffman + + * Source/: CMakeLib.dsp, CMakeSetup.dsw, CMakeSetupCMD.dsp, + MFCDialog/CMakeSetup.dsp: ENH: share a .lib with the command line + and mfc versions. + +2001-02-12 14:26 hoffman + + * Source/: CMakeLib.dsp, CMakeSetup.dsw, CMakeSetupCMD.cxx, + CMakeSetupCMD.dsp, Makefile.in, cmCacheManager.cxx, + cmCacheManager.h, cmCommands.cxx, cmConfigureHeaderCommand.cxx, + cmConfigureHeaderCommand.h, cmDSWMakefile.cxx, cmDSWWriter.cxx, + cmMSProjectGenerator.h, MFCDialog/CMakeSetup.dsp, + MFCDialog/CMakeSetupDialog.cpp: ENH: add cache manager class, + move all commands into cmCommands.cxx to speed up compile times, + share a .lib with the command line and mfc versions. + +2001-02-06 17:01 hoffman + + * Source/staticLibHeader.dsptemplate: ENH: add /GX /Zm1000 + +2001-02-06 16:48 hoffman + + * Source/staticLibHeader.dsptemplate: ENH: min size build + +2001-02-06 10:52 hoffman + + * Source/staticLibHeader.dsptemplate: ENH: put back /Zm1000 so we + can build large files + +2001-02-06 08:56 millerjv + + * Source/staticLibHeader.dsptemplate: FIX: remove precompiled + header settings + +2001-02-06 08:54 millerjv + + * Source/EXEHeader.dsptemplate: FIX: added /force to link options + and removed precompiled header usage + +2001-01-25 15:48 millerjv + + * Source/: EXEHeader.dsptemplate, staticLibHeader.dsptemplate: BUG: + backed off on the compiler optimization used. Instead of using + /O2, we now use all the components of /Ox (/Ob1 /Oi /Ot /Oy /Gs) + except for /Og + +2001-01-22 10:00 will + + * Source/CMakeSetupCMD.dsp: BUG: convert to dos format + +2001-01-22 09:49 will + + * Source/: CMakeSetup.dsw, CMakeSetupCMD.dsp, + MFCDialog/CMakeSetup.dsp: BUG: make dsp and dsw files binary + +2001-01-18 13:43 will + + * README: ENH:Commands not rules + +2001-01-18 12:06 will + + * Source/Makefile.in: ERR:Oops, use SimpleRule not SimpleCommand + +2001-01-18 11:51 will + + * CMakeCommands.make.in, CMakeMaster.make.in, CMakeRules.make.in, + CMakeSimpleCommands.make.in, CMakeSimpleRules.make.in: ERR:Oops, + renamed back + +2001-01-18 11:20 will + + * CMakeCommands.make.in, CMakeMaster.make.in, CMakeRules.make.in, + CMakeSimpleCommands.make.in, CMakeSimpleRules.make.in, + Source/CMakeSetupCMD.dsp, Source/Makefile.in, + Source/cmAbstractFilesCommand.cxx, + Source/cmAbstractFilesCommand.h, Source/cmAbstractFilesRule.cxx, + Source/cmAbstractFilesRule.h, Source/cmAddTargetCommand.cxx, + Source/cmAddTargetCommand.h, Source/cmAddTargetRule.cxx, + Source/cmAddTargetRule.h, Source/cmAuxSourceDirectoryCommand.cxx, + Source/cmAuxSourceDirectoryCommand.h, + Source/cmAuxSourceDirectoryRule.cxx, + Source/cmAuxSourceDirectoryRule.h, Source/cmCommand.h, + Source/cmDumpDocumentation.cxx, Source/cmExecutablesCommand.cxx, + Source/cmExecutablesCommand.h, Source/cmExecutablesRule.cxx, + Source/cmExecutablesRule.h, Source/cmFindIncludeCommand.cxx, + Source/cmFindIncludeCommand.h, Source/cmFindIncludeRule.cxx, + Source/cmFindIncludeRule.h, Source/cmFindLibraryCommand.cxx, + Source/cmFindLibraryCommand.h, Source/cmFindLibraryRule.cxx, + Source/cmFindLibraryRule.h, Source/cmFindProgramCommand.cxx, + Source/cmFindProgramCommand.h, Source/cmFindProgramRule.cxx, + Source/cmFindProgramRule.h, Source/cmIncludeDirectoryCommand.cxx, + Source/cmIncludeDirectoryCommand.h, + Source/cmIncludeDirectoryRule.cxx, + Source/cmIncludeDirectoryRule.h, Source/cmLibraryCommand.cxx, + Source/cmLibraryCommand.h, Source/cmLibraryRule.cxx, + Source/cmLibraryRule.h, Source/cmLinkDirectoriesCommand.cxx, + Source/cmLinkDirectoriesCommand.h, + Source/cmLinkDirectoriesRule.cxx, Source/cmLinkDirectoriesRule.h, + Source/cmLinkLibrariesCommand.cxx, + Source/cmLinkLibrariesCommand.h, Source/cmLinkLibrariesRule.cxx, + Source/cmLinkLibrariesRule.h, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmMakefileGenerator.h, + Source/cmProjectCommand.cxx, Source/cmProjectCommand.h, + Source/cmProjectRule.cxx, Source/cmProjectRule.h, + Source/cmRuleMaker.h, Source/cmSourceFilesCommand.cxx, + Source/cmSourceFilesCommand.h, + Source/cmSourceFilesRequireCommand.cxx, + Source/cmSourceFilesRequireCommand.h, + Source/cmSourceFilesRequireRule.cxx, + Source/cmSourceFilesRequireRule.h, Source/cmSourceFilesRule.cxx, + Source/cmSourceFilesRule.h, Source/cmSubdirCommand.cxx, + Source/cmSubdirCommand.h, Source/cmSubdirRule.cxx, + Source/cmSubdirRule.h, Source/cmSystemTools.h, + Source/cmTestsCommand.cxx, Source/cmTestsCommand.h, + Source/cmTestsRule.cxx, Source/cmTestsRule.h, + Source/cmUnixDefinesCommand.cxx, Source/cmUnixDefinesCommand.h, + Source/cmUnixDefinesRule.cxx, Source/cmUnixDefinesRule.h, + Source/cmUnixLibrariesCommand.cxx, + Source/cmUnixLibrariesCommand.h, Source/cmUnixLibrariesRule.cxx, + Source/cmUnixLibrariesRule.h, Source/cmWin32DefinesCommand.cxx, + Source/cmWin32DefinesCommand.h, Source/cmWin32DefinesRule.cxx, + Source/cmWin32DefinesRule.h, Source/cmWin32LibrariesCommand.cxx, + Source/cmWin32LibrariesCommand.h, + Source/cmWin32LibrariesRule.cxx, Source/cmWin32LibrariesRule.h, + Source/MFCDialog/CMakeSetup.dsp: ENH:Reworked CMake for + consistency + +2001-01-12 14:35 will + + * README, Source/cmAbstractFilesRule.h, Source/cmAddTargetRule.h, + Source/cmAuxSourceDirectoryRule.h, Source/cmExecutablesRule.h, + Source/cmFindIncludeRule.h, Source/cmFindLibraryRule.h, + Source/cmFindProgramRule.h, Source/cmIncludeDirectoryRule.h, + Source/cmLibraryRule.h, Source/cmLinkDirectoriesRule.h, + Source/cmLinkLibrariesRule.h, Source/cmMakefile.cxx, + Source/cmProjectRule.h, Source/cmRuleMaker.h, + Source/cmSourceFilesRequireRule.h, Source/cmSourceFilesRule.h, + Source/cmSubdirRule.h, Source/cmTestsRule.h, + Source/cmUnixDefinesRule.h, Source/cmUnixLibrariesRule.h, + Source/cmWin32DefinesRule.h, Source/cmWin32LibrariesRule.h: + ENH:Tweaks to dump documentation + +2001-01-12 14:05 hoffman + + * Source/: cmDSPMakefile.cxx, cmDSPWriter.cxx: ENH: add define + flags in the right place + +2001-01-12 13:49 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: ENH: allow continue if + missing MSC configure file + +2001-01-12 13:48 hoffman + + * Source/cmSystemTools.cxx: BUG: add check for missing ) on + function + +2001-01-12 13:07 will + + * README, Source/cmAuxSourceDirectoryRule.h, + Source/cmIncludeDirectoryRule.h, Source/cmLinkLibrariesRule.h, + Source/cmProjectRule.h, Source/cmSourceFilesRequireRule.h, + Source/cmSubdirRule.h, Source/cmUnixDefinesRule.h, + Source/cmWin32DefinesRule.h: ENH:Tweaks to dump documentation + +2001-01-12 12:49 will + + * Source/: cmAddTargetRule.h, cmMakefile.cxx: ENH:Tweaks to + documentation + +2001-01-12 12:49 will + + * README: ENH:Updated for rule-based CMake + +2001-01-12 12:42 will + + * Source/: cmDumpDocumentation.cxx, cmMakefile.cxx, cmMakefile.h: + ENH:Simple program dumps out internal documentation for CMake + +2001-01-12 07:43 will + + * README: README + +2001-01-11 16:19 will + + * doxygen.config: ENH:Doxygenated CMake + +2001-01-11 14:55 will + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + cmAbstractFilesRule.cxx, cmClassFile.cxx, cmDSPMakefile.cxx, + cmDSPWriter.cxx, cmDSWMakefile.cxx, cmDSWWriter.cxx, + cmExecutablesRule.cxx, cmFindIncludeRule.cxx, + cmFindLibraryRule.cxx, cmFindProgramRule.cxx, + cmIncludeDirectoryRule.cxx, cmLibraryRule.cxx, + cmLinkDirectoriesRule.cxx, cmLinkLibrariesRule.cxx, + cmMSProjectGenerator.cxx, cmMakeDepend.cxx, cmMakefile.cxx, + cmMakefileGenerator.cxx, cmProjectRule.cxx, + cmSourceFilesRequireRule.cxx, cmSourceFilesRule.cxx, + cmSubdirRule.cxx, cmSystemTools.cxx, cmTestsRule.cxx, + cmUnixDefinesRule.cxx, cmUnixLibrariesRule.cxx, + cmWin32DefinesRule.cxx, cmWin32LibrariesRule.cxx: + ENH:Documentation and cleanups + +2001-01-11 14:47 will + + * Source/: CMakeSetupCMD.cxx, cmAddTargetRule.cxx, + cmAuxSourceDirectoryRule.cxx, cmClassFile.h, cmDSWMakefile.cxx, + cmDSWMakefile.h, cmDSWWriter.cxx, cmDSWWriter.h, cmDirectory.h, + cmFindProgramRule.h, cmMSProjectGenerator.cxx, + cmMSProjectGenerator.h, cmMakeDepend.h, cmMakefile.h, + cmMakefileGenerator.h, cmRegularExpression.cxx, + cmRegularExpression.h, cmStandardIncludes.h, cmSystemTools.cxx, + cmSystemTools.h, cmUnixMakefileGenerator.cxx, + cmUnixMakefileGenerator.h, cmWindowsConfigure.cxx, + cmWindowsConfigure.h: ENH:Documentation and cleanups + +2001-01-11 11:35 blezek + + * Source/: cmWin32DefinesRule.cxx, cmWin32LibrariesRule.cxx: BUG: + Broken on non WIN32 platforms, changed SetEnableOff to EnabledOff + +2001-01-11 08:04 will + + * Source/: cmFindIncludeRule.h, cmFindLibraryRule.h, + cmFindProgramRule.h, cmIncludeDirectoryRule.h, cmLibraryRule.h, + cmLinkDirectoriesRule.h, cmLinkLibrariesRule.h, cmProjectRule.h, + cmSourceFilesRequireRule.h, cmSourceFilesRule.h, cmSubdirRule.h, + cmTestsRule.h, cmUnixDefinesRule.h, cmUnixLibrariesRule.h, + cmWin32DefinesRule.h, cmWin32LibrariesRule.h: ENH:Added + documentation; clean-up + +2001-01-10 17:29 will + + * Source/: cmExecutablesRule.h, cmFindIncludeRule.h: ENH:Beginning + clean up; adding documentation + +2001-01-10 17:13 will + + * Source/cmAuxSourceDirectoryRule.h: ENH:Beginning clean up; adding + documentation + +2001-01-10 17:05 will + + * Source/: cmAbstractFilesRule.h, cmAddTargetRule.h, + cmAuxSourceDirectoryRule.h, cmDSPMakefile.h, cmDSPWriter.h, + cmExecutablesRule.h, cmFindIncludeRule.h, cmFindLibraryRule.h, + cmFindProgramRule.h, cmIncludeDirectoryRule.h, cmLibraryRule.h, + cmLinkDirectoriesRule.h, cmLinkLibrariesRule.h, cmProjectRule.h, + cmRuleMaker.h, cmSourceFilesRequireRule.h, cmSourceFilesRule.h, + cmSubdirRule.h, cmTestsRule.h, cmUnixDefinesRule.cxx, + cmUnixDefinesRule.h, cmUnixLibrariesRule.cxx, + cmUnixLibrariesRule.h, cmWin32DefinesRule.h, + cmWin32LibrariesRule.h: ENH:Beginning clean up; adding + documentation + +2001-01-09 15:13 hoffman + + * Source/cmUnixMakefileGenerator.cxx: BUG: look for -l and -L only + at the begining of a link string + +2001-01-05 13:52 blezek + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx: BUG: main can + not be void under ANSI C++ + +2001-01-05 13:49 blezek + + * Source/cmMakefileGenerator.cxx: BUG: Looking for + cmMakeFileGenerator.h rather than cmMakefileGenerator.h + +2001-01-05 11:41 hoffman + + * Source/: CMakeBuildTargets.cxx, CMakeSetupCMD.cxx, + CMakeSetupCMD.dsp, Makefile.in, cmAbstractFilesRule.cxx, + cmAbstractFilesRule.h, cmAddTargetRule.cxx, cmAddTargetRule.h, + cmAuxSourceDirectoryRule.cxx, cmAuxSourceDirectoryRule.h, + cmClassFile.cxx, cmClassFile.h, cmCollectFlags.cxx, + cmCollectFlags.h, cmDSPMakefile.cxx, cmDSPMakefile.h, + cmDSPWriter.cxx, cmDSPWriter.h, cmDSWMakefile.cxx, + cmDSWWriter.cxx, cmDSWMakefile.h, cmDSWWriter.h, cmDirectory.cxx, + cmDirectory.h, cmExecutablesRule.cxx, cmExecutablesRule.h, + cmFindIncludeRule.cxx, cmFindIncludeRule.h, + cmFindLibraryRule.cxx, cmFindLibraryRule.h, + cmFindProgramRule.cxx, cmFindProgramRule.h, + cmIncludeDirectoryRule.cxx, cmIncludeDirectoryRule.h, + cmLibraryRule.cxx, cmLibraryRule.h, cmLinkDirectoriesRule.cxx, + cmLinkDirectoriesRule.h, cmLinkLibrariesRule.cxx, + cmLinkLibrariesRule.h, cmMSProjectGenerator.cxx, + cmMSProjectGenerator.h, cmMakeDepend.cxx, cmMakeDepend.h, + cmMakefile.cxx, cmMakefile.h, cmMakefileGenerator.cxx, + cmMakefileGenerator.h, cmProjectRule.cxx, cmProjectRule.h, + cmRegularExpression.cxx, cmRegularExpression.h, cmRuleMaker.h, + cmSourceFilesRequireRule.cxx, cmSourceFilesRequireRule.h, + cmSourceFilesRule.cxx, cmSourceFilesRule.h, cmStandardIncludes.h, + cmSubdirRule.cxx, cmSubdirRule.h, cmSystemTools.cxx, + cmSystemTools.h, cmTestsRule.cxx, cmTestsRule.h, + cmUnixDefinesRule.cxx, cmUnixDefinesRule.h, + cmUnixLibrariesRule.cxx, cmUnixLibrariesRule.h, + cmUnixMakefile.cxx, cmUnixMakefile.h, + cmUnixMakefileGenerator.cxx, cmUnixMakefileGenerator.h, + cmWin32DefinesRule.cxx, cmWin32DefinesRule.h, + cmWin32LibrariesRule.cxx, cmWin32LibrariesRule.h, + cmWindowsConfigure.cxx, cmWindowsConfigure.h, + MFCDialog/CMakeSetup.dsp, MFCDialog/CMakeSetupDialog.cpp: ENH: + rework cmake, added ruleMaker classes and changed the syntax of + the CMakeLists.txt files. + +2000-12-07 15:45 blezek + + * Source/cmMakefile.cxx: ENH: Added TESTS target + +2000-11-22 11:02 hoffman + + * Source/cmMakeDepend.cxx: BUG: remove bogus warning about not + finding a depend file, if there are no include paths + +2000-11-10 17:13 hoffman + + * Source/MFCDialog/CMakeSetupDialog.cpp: BUG: fix inplace build + +2000-11-09 10:41 will + + * README, Source/cmCollectFlags.cxx, Source/cmCollectFlags.h, + Source/cmWindowsConfigure.cxx: ENH:Changed CMAKE_SOURCE_ROOT to + CMAKE_SOURCE_DIR + +2000-11-03 16:38 hoffman + + * README: [no log message] + +2000-11-03 16:37 hoffman + + * Source/MFCDialog/: CMakeSetupDialog.cpp, CMakeSetupDialog.h: ENH: + add ability to run from different directories + +2000-11-02 11:13 hoffman + + * Source/cmMakefile.cxx: BUG: make sure SOURCE_FILES starts at the + begining of line + +2000-11-02 10:56 blezek + + * CMakeVariables.make.in: ENH: Moved @JAVA@ to @JAVACOMMAND@ + +2000-11-02 10:24 will + + * README, Source/cmClassFile.cxx, Source/cmMakefile.cxx: + ENH:Reworked CMake to clearer indicate what the variables do + +2000-10-25 17:18 hoffman + + * Source/: cmSystemTools.cxx: BUG: remove tabs from classnames + +2000-10-04 09:58 lorensen + + * CMakeVariables.make.in: Enh: Added TCLSH + +2000-10-02 14:21 blezek + + * Source/CMakeBuildTargets.cxx: BUG: if the path to your source + directory has a -S in it, it will be picked up as the source + directory by the command line parser, because it matches -S at + any character position in the argements. Bad, should have used + getopt, except that it is not cross platform. + +2000-10-02 13:50 blezek + + * CMakeVariables.make.in: ENH: Support for XML builds and Dashboard + +2000-09-28 12:43 blezek + + * README: ENH: Added note about VERBATIM targets in CMakeList.txt + +2000-09-27 15:01 hoffman + + * CMakeMaster.make.in, CMakeRules.make.in, CMakeVariables.make.in, + README, Source/cmDSWMakefile.cxx, Source/cmDSWMakefile.h, + Source/cmDSWWriter.cxx, Source/cmDSWWriter.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmUnixMakefile.cxx, Source/cmUnixMakefile.h: ENH: change + ME to LIBRARY and added PROJECT, also remove ITK stuff and + replaced with CMake + +2000-09-21 13:45 hoffman + + * README, Source/CMakeBuildTargets.cxx, Source/CMakeSetupCMD.cxx, + Source/cmCollectFlags.cxx, Source/cmCollectFlags.h, + Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Source/cmDSWMakefile.cxx, Source/cmDSWWriter.cxx, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmUnixMakefile.cxx, + Source/itkVC60Configure.cxx, Source/itkVC60Configure.h: ENH: + clean up code, and varible names + +2000-09-18 10:19 hoffman + + * Source/cmUnixMakefile.cxx: BUG: remove cout + +2000-09-18 09:19 hoffman + + * CMakeRules.make.in, CMakeVariables.make.in, README, + Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Source/cmMakeDepend.cxx, Source/cmUnixMakefile.cxx, + Source/cmWindowsConfigure.cxx, Source/cmWindowsConfigure.h, + Source/MFCDialog/CMakeSetup.dsp, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/resource.h: ENH: added a config setup file for + CMakeSetup. Cleaned up the names of the source and binary + directories + +2000-09-18 07:27 hoffman + + * Source/: CMakeSetupCMD.dsp, MFCDialog/CMakeSetup.dsp: ENH: remove + unused files + +2000-09-12 06:44 hoffman + + * CMakeRules.make.in, CMakeVariables.make.in: BUG: fix build in + place source directory + +2000-09-12 05:37 hoffman + + * Source/: cmCollectFlags.cxx, cmCollectFlags.h: NEW: class to + collect all the flags from parent directories + +2000-09-12 05:30 hoffman + + * CMakeMaster.make.in, CMakeRules.make.in, CMakeTargets.make.in, + CMakeVariables.make.in, MakefileTemplate.in, README, + Source/CMakeBuildTargets.cxx, Source/CMakeSetup.cxx, + Source/CMakeSetup.dsw, Source/CMakeSetupCMD.cxx, + Source/CMakeSetupCMD.dsp, Source/Makefile.in, + Source/cmClassFile.cxx, Source/cmClassFile.h, + Source/cmDSPBuilder.cxx, Source/cmDSPBuilder.h, + Source/cmDSPMakefile.cxx, Source/cmDSPWriter.cxx, + Source/cmDSWBuilder.cxx, Source/cmDSWBuilder.h, + Source/cmDSWMakefile.cxx, Source/cmDSWMakefile.h, + Source/cmDSWWriter.cxx, Source/cmDSWWriter.h, + Source/cmMakeDepend.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmPCBuilder.cxx, + Source/cmPCBuilder.h, Source/cmSystemTools.cxx, + Source/cmSystemTools.h, Source/cmUnixMakefile.cxx, + Source/cmUnixMakefile.h, Source/cmWindowsConfigure.h, + Source/itkVC60Configure.h, Source/MFCDialog/CMakeDialog.cpp, + Source/MFCDialog/CMakeSetup.dsp, + Source/MFCDialog/CMakeSetupDialog.cpp: ENH: CMake and configure + now use SUBDIRS in CMakeLists.txt to find all the directories of + the system. + +2000-09-01 10:43 hoffman + + * Source/: EXEHeader.dsptemplate, cmSystemTools.cxx: BUG: fix + release build on windows + +2000-08-31 14:26 hoffman + + * CMakeVariables.make.in, Source/cmUnixMakefile.cxx: BUG: fix build + of lib.a problem + +2000-08-31 14:15 hoffman + + * Source/: CMakeSetup.dsw, cmDSPMakefile.cxx, cmDSPWriter.cxx: BUG: + fix name of command line version in dsp files + +2000-08-31 13:54 hoffman + + * CMakeSimpleRules.make, CMakeSimpleRules.make.in: BUG: fix for out + of source build + +2000-08-31 13:52 hoffman + + * CMakeSimpleRules.make: ENH: fix for Sgi make + +2000-08-31 09:36 hoffman + + * CMakeRules.make.in, Source/Makefile.in, + Source/cmUnixMakefile.cxx: ENH: fix for SGI make + +2000-08-31 06:36 hoffman + + * CMakeVariables.make.in, README: ENH: clean things up a bit + +2000-08-30 13:59 hoffman + + * Source/cmDirectory.cxx, Source/cmDirectory.h, + MakefileTemplate.in: ENH: add ability to compile all the files in + a sub-directory + +2000-08-30 13:35 hoffman + + * CMakeRules.make.in, CMakeVariables.make.in, README, + Source/CMakeSetupCMD.dsp, Source/Makefile.in, + Source/cmClassFile.cxx, Source/cmDSPMakefile.cxx, + Source/cmDSPWriter.cxx, Source/cmDSWMakefile.cxx, + Source/cmDSWWriter.cxx, Source/cmMakefile.cxx, + Source/cmMakefile.h, Source/cmUnixMakefile.cxx, + Source/MFCDialog/CMakeSetup.dsp, + Source/MFCDialog/CMakeSetupDialog.cpp: ENH: move from tools and + create working CMake program + +2000-08-29 15:26 hoffman + + * CMakeMaster.make.in, CMakeRules.make.in, CMakeVariables.make.in, + Source/CMakeBuildTargets.cxx, Source/CMakeSetup.cxx, + Source/CMakeSetup.dsw, Source/CMakeSetupCMD.cxx, + Source/CMakeSetupCMD.dsp, Source/EXEFooter.dsptemplate, + Source/EXEHeader.dsptemplate, Source/Makefile.in, + Source/cmClassFile.cxx, Source/cmClassFile.h, + Source/cmDSPBuilder.cxx, Source/cmDSPBuilder.h, + Source/cmDSPMakefile.cxx, Source/cmDSPMakefile.h, + Source/cmDSPWriter.cxx, Source/cmDSPWriter.h, + Source/cmDSWBuilder.cxx, Source/cmDSWBuilder.h, + Source/cmDSWMakefile.cxx, Source/cmDSWMakefile.h, + Source/cmDSWWriter.cxx, Source/cmDSWWriter.h, + Source/cmMakeDepend.cxx, Source/cmMakeDepend.h, + Source/cmMakefile.cxx, Source/cmMakefile.h, + Source/cmPCBuilder.cxx, Source/cmPCBuilder.h, + Source/cmRegularExpression.cxx, Source/cmRegularExpression.h, + Source/cmSystemTools.cxx, Source/cmSystemTools.h, + Source/cmUnixMakefile.cxx, Source/cmUnixMakefile.h, + Source/cmWindowsConfigure.cxx, Source/cmWindowsConfigure.h, + Source/itkVC60Configure.cxx, Source/itkVC60Configure.h, + Source/staticLibFooter.dsptemplate, + Source/staticLibHeader.dsptemplate, + Source/MFCDialog/CMakeDialog.cpp, Source/MFCDialog/CMakeDialog.h, + Source/MFCDialog/CMakeSetup.cpp, Source/MFCDialog/CMakeSetup.dsp, + Source/MFCDialog/CMakeSetup.h, Source/MFCDialog/CMakeSetup.rc, + Source/MFCDialog/CMakeSetupDialog.cpp, + Source/MFCDialog/CMakeSetupDialog.h, Source/MFCDialog/StdAfx.cpp, + Source/MFCDialog/StdAfx.h, Source/MFCDialog/resource.h, + Source/MFCDialog/res/CMakeSetupDialog.ico, + Source/MFCDialog/res/CMakeSetupDialog.rc2, README: NEW: move from + tools and config to create CMake + +2000-08-29 10:56 hoffman + + * CMakeMaster.make.in, CMakeRules.make.in, CMakeVariables.make.in, + dummy.in: [no log message] + diff --git a/CompileFlags.cmake b/CompileFlags.cmake new file mode 100755 index 000000000..59f335d87 --- /dev/null +++ b/CompileFlags.cmake @@ -0,0 +1,44 @@ +#----------------------------------------------------------------------------- +# set some special flags for different compilers +# +IF(CMAKE_GENERATOR MATCHES "Visual Studio 7") + SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7") +IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") +INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake) + +# Disable deprecation warnings for standard C functions. +IF(MSVC80 OR MSVC90) + ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE) +ENDIF(MSVC80 OR MSVC90) + +#silence duplicate symbol warnings on AIX +IF(CMAKE_SYSTEM MATCHES "AIX.*") + IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ") + ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_SYSTEM MATCHES "AIX.*") + +IF(CMAKE_SYSTEM MATCHES "IRIX.*") + IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include") + SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15") + ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*") + +IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") + IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") + ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") + +# use the ansi CXX compile flag for building cmake +IF (CMAKE_ANSI_CXXFLAGS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") +ENDIF (CMAKE_ANSI_CXXFLAGS) + +IF (CMAKE_ANSI_CFLAGS) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") +ENDIF (CMAKE_ANSI_CFLAGS) diff --git a/Copyright.txt b/Copyright.txt new file mode 100644 index 000000000..834c45710 --- /dev/null +++ b/Copyright.txt @@ -0,0 +1,50 @@ +CMake was initially developed by Kitware with the following sponsorship: + + * National Library of Medicine at the National Institutes of Health + as part of the Insight Segmentation and Registration Toolkit (ITK). + + * US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel + Visualization Initiative. + + * National Alliance for Medical Image Computing (NAMIC) is funded by the + National Institutes of Health through the NIH Roadmap for Medical Research, + Grant U54 EB005149. + + * Kitware, Inc. + +The CMake copyright is as follows: + +Copyright (c) 2002 Kitware, Inc., Insight Consortium +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. + + * The names of Kitware, Inc., the Insight Consortium, or the names of + any consortium members, or of any contributors, may not be used to + endorse or promote products derived from this software without + specific prior written permission. + + * Modified source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS OR 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. + +See also the CMake web site: http://www.cmake.org for more information. diff --git a/DartConfig.cmake b/DartConfig.cmake new file mode 100644 index 000000000..367d98a91 --- /dev/null +++ b/DartConfig.cmake @@ -0,0 +1,61 @@ +# Dashboard is opened for submissions for a 24 hour period starting at +# the specified NIGHLY_START_TIME. Time is specified in 24 hour format. +SET (NIGHTLY_START_TIME "21:00:00 EDT") + +# Dart server to submit results (used by client) +IF(NOT DROP_METHOD) + SET(DROP_METHOD http) +ENDIF(NOT DROP_METHOD) +IF(DROP_METHOD MATCHES http) + SET (DROP_SITE "public.kitware.com") + SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi") +ELSE(DROP_METHOD MATCHES http) + IF(DROP_METHOD MATCHES xmlrpc) + SET (DROP_SITE "http://www.na-mic.org:8081") + SET (DROP_LOCATION "CMake") + SET (COMPRESS_SUBMISSION ON) + ELSE(DROP_METHOD MATCHES xmlrpc) + SET (DROP_SITE "public.kitware.com") + SET (DROP_LOCATION "/incoming") + SET (DROP_SITE_USER "ftpuser") + SET (DROP_SITE_PASSWORD "public") + ENDIF(DROP_METHOD MATCHES xmlrpc) +ENDIF(DROP_METHOD MATCHES http) + +SET (TRIGGER_SITE + "http://${DROP_SITE}/cgi-bin/Submit-CMake-TestingResults.cgi") + +# Project Home Page +SET (PROJECT_URL "http://www.cmake.org") + +# Dart server configuration +SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/cmake-rollup-dashboard.sh") +SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/") +SET (CVS_WEB_CVSROOT "CMake") + +OPTION(BUILD_DOXYGEN "Build source documentation using doxygen" "Off") +SET (DOXYGEN_CONFIG "${PROJECT_BINARY_DIR}/doxygen.config" ) +MARK_AS_ADVANCED(BUILD_DOXYGEN) +SET (USE_DOXYGEN "On") +SET (DOXYGEN_URL "${PROJECT_URL}/doc/nightly/html/" ) + +SET (USE_GNATS "On") +SET (GNATS_WEB_URL "${PROJECT_URL}/Bug/query.php?projects=2&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery") + +# Continuous email delivery variables +SET (CONTINUOUS_FROM "cmake-dashboard@public.kitware.com") +SET (SMTP_MAILHOST "public.kitware.com") +SET (CONTINUOUS_MONITOR_LIST "cmake-dashboard@public.kitware.com") +SET (CONTINUOUS_BASE_URL "${PROJECT_URL}/Testing") + +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES ON) +SET (DELIVER_BROKEN_BUILD_EMAIL "Continuous Nightly") +SET (EMAIL_FROM "cmake-dashboard@public.kitware.com") +SET (DARTBOARD_BASE_URL "${PROJECT_URL}/Testing") + +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_CONFIGURE_FAILURES 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_ERRORS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_WARNINGS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_NOT_RUNS 1) +SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES 1) + diff --git a/DartLocal.conf.in b/DartLocal.conf.in new file mode 100755 index 000000000..e28cb187f --- /dev/null +++ b/DartLocal.conf.in @@ -0,0 +1,121 @@ +ExpectedBuilds: \ +{andoria.kitware Linux-g++3.4-KDevelop} \ +{andoria.kitware Linux-g++3.4-SVN} \ +{DASH1.kitware Win32-nmake71} \ +{DASH1.kitware Win32-vs71} \ +{DASH1.kitware Win32-vs71Rel} \ +{DASH1.kitware zRel24-Win32-nmake71} \ +{DASH1.kitware zRel24-Win32-vs71} \ +{DASH11.kitware zRel24-Win32-nmake71} \ +{dash14.kitware Win32-bcc5.6} \ +{dash14.kitware Win32-cygwin} \ +{dash14.kitware Win32-mingw} \ +{dash14.kitware zRel24-Win32-bcc5.6} \ +{dash17.kitware Linux-g++4.0} \ +{dash1win64.kitware Win64-vs80} \ +{dash1win98.kitware Win32-vs60} \ +{DASH2.kitware Win32-nmake70} \ +{DASH2.kitware Win32-vs70} \ +{DASH2.kitware Win32-vs70-InPlace} \ +{DASH2.kitware zRel24-Win32-nmake70} \ +{DASH2.kitware zRel24-Win32-vs70} \ +{DASH3.kitware Win32-nmake60} \ +{DASH3.kitware Win32-vs60} \ +{DASH3.kitware zRel24-Win32-nmake60} \ +{DASH3.kitware zRel24-Win32-vs60} \ +{dash4.kitware Win32-bcc5.8} \ +{DASH5.kitware Linux-gcc332-InPlace} \ +{DASH5.kitware zRel24-Linix-gcc332} \ +{DASH6.kitware zRel24-Linix-gcc332} \ +{dash8.kitware Linux64-g++} \ +{dash8.kitware Linux64-g++332} \ +{dash8.kitware Linux64-g++341} \ +{dash8.kitware zRel24-Linux64-g++} \ +{dash8.kitware zRel24-Linux64-g++332} \ +{dashmacmini1.kitware Darwin-Tiger-Xcode21} \ +{dashmacmini1.kitware zRel24-Darwin-Tiger-g++} \ +{dashmacmini2.kitware DarwinIntel-g++} \ +{dashmacmini2.kitware DarwinIntel-Universal} \ +{dashmacmini2.kitware Darwin-Tiger-Xcode21-univ} \ +{dashmacmini3.kitware Darwin-LeopardIntel-g++} \ +{dashmacmini3.kitware Darwin-LeopardIntel-Universal} \ +{dashmacmini3.kitware Darwin-Leopard-Xcode21-univ} \ +{dashsgi1.kitware IRIX32-CC} \ +{dashsgi1.kitware IRIX64-CC} \ +{dashsun1.kitware SunOS-CC} \ +{dashsun1.kitware SunOS-CC-64} \ +{dashsun1.kitware SunOS-gcc34-64} \ +{destiny.kitware HP-UX-aCC} \ +{destiny.kitware HP-UX-aCC-gmake} \ +{devqnx.acfr.usyd.edu.au qnx-V3.3.5-gcc_ntox86} \ +{grayson.kitware Win32-nmake80} \ +{heart HP-UXia64-aCC} \ +{hythloth.kitware Linux64-bullseye-cov} \ +{hythloth.kitware Linux64-suncc-5.9} \ +{hythloth.kitware Linux-nightly-win32-release} \ +{insight.journal.kitware KWStyle} \ +{iris.elemtech IRIX64-CC64-7.4} \ +{iris.elemtech IRIX64-CC-7.4} \ +{JET.kitware Linux-valgrind2} \ +{krondor.kitware Darwin-c++} \ +{krondor.kitware zRel24-Darwin-c++} \ +{midworld.kitware DarwinG5-g++} \ +{midworld.kitware DarwinG5-XCode15} \ +{midworld.kitware zRel24-DarwinG5-g++} \ +{pre.vision.cs.rpi.edu FreeBSD-CC-gmake} \ +{pre.vision.cs.rpi.edu FreeBSD-CC-make} \ +{RogueResearch3 Mac10.5-CMake-gcc-dbg-ppc} \ +{RogueResearch3 Mac10.5-CMake-gcc-dbg-ppc64} \ +{RogueResearch3 Mac10.5-CMake-gcc-rel-ppc} \ +{RogueResearch3 Mac10.5-CMake-gcc-rel-ppc64} \ +{RogueResearch3 Mac10.5-CMake-Xcode-dbg-ppc} \ +{RogueResearch3 Mac10.5-CMake-Xcode-dbg-ppc64} \ +{RogueResearch4 Mac10.5-CMake-gcc-dbg-i386} \ +{RogueResearch4 Mac10.5-CMake-gcc-dbg-rosetta} \ +{RogueResearch4 Mac10.5-CMake-gcc-rel-i386} \ +{tick.rz.uni-augsburg.de LinuxPPC-g++3.3} \ +{tick.rz.uni-augsburg.de LinuxPPC-g++3.4} \ +{trinsic.kitware Win32-mingw} \ +{r06n01.pbm.ihost.com AIX53-xlC} \ +{r06n01.pbm.ihost.com zRel24-AIX53-xlC} \ +{valhalla.kitware Win32-wcl386} + +#{devqnx.acfr.usyd.edu.au qnx-V3.3.5-gcc_ntox86 } \ +#{mr-orange.obtech.net gentoo-linux-x86\_64-gcc-4.0.2 } \ +#{G5.Nfsnet.Org Darwin8.3-gcc4} \ + +# commas in names do not work for expected builds.... + +#{G4.Nfsnet.Org Darwin-c++} \ +#{salmon.nlm.nih.gov Darwin8.7-gcc4} \ + +#{crd.ge.com Solaris-gcc343} \ +#{crd.ge.com Linux-icc81} \ +#{crd.ge.com Windows-bcc32} \ +#{crd.ge.com Windows-nmake71} \ +#{crd.ge.com Windows-nmake60} \ + +#{dash16.kitware Linux-g++4.0} \ +#{styx Linuxia64-g++} \ +#{crd.ge.com Cygwin-gcc344} \ +#{valhalla.kitware Win32-bccRel} \ +#{valhalla.kitware Win32-bcc} \ +#{valhalla.kitware Win32-g++} \ +#{valhalla.kitware Win32-nmake60} \ +#{valhalla.kitware Win32-nmake70} \ +#{valhalla.kitware Win32-vs60} \ +#{valhalla.kitware Win32-vs70} +#{crd.ge.com FreeBSD-gcc321} \ +#{crd.ge.com Linux-gcc320} \ + +#{cogattaca.kitware LinuxWin32-g++-Werror} \ +#{cogattaca.kitware LinuxWin32-g++} \ + +#{dash8.kitware Win64-icl80} \ +#{dash8.kitware zLRB-Win64-icl80} \ + +#{hythloth.kitware Linux-icc-8.1} \ + +CompressionMode: ALL +CompressionCommand: /bin/gzip +CompressionType: gzip diff --git a/Docs/cmake-indent.vim b/Docs/cmake-indent.vim new file mode 100644 index 000000000..6c5d3340f --- /dev/null +++ b/Docs/cmake-indent.vim @@ -0,0 +1,93 @@ +" ============================================================================= +" +" Program: CMake - Cross-Platform Makefile Generator +" Module: $RCSfile: cmake-indent.vim,v $ +" Language: VIM +" Date: $Date: 2008-01-16 16:53:53 $ +" Version: $Revision: 1.9 $ +" +" ============================================================================= + +" Vim indent file +" Language: CMake (ft=cmake) +" Author: Andy Cedilnik +" Maintainer: Karthik Krishnan +" Last Change: $Date: 2008-01-16 16:53:53 $ +" Version: $Revision: 1.9 $ +" +" Licence: The CMake license applies to this file. See +" http://www.cmake.org/HTML/Copyright.html +" This implies that distribution with Vim is allowed + +if exists("b:did_indent") + finish +endif +let b:did_indent = 1 + +setlocal indentexpr=CMakeGetIndent(v:lnum) +setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( + +" Only define the function once. +if exists("*CMakeGetIndent") + finish +endif + +fun! CMakeGetIndent(lnum) + let this_line = getline(a:lnum) + + " Find a non-blank line above the current line. + let lnum = a:lnum + let lnum = prevnonblank(lnum - 1) + let previous_line = getline(lnum) + + " Hit the start of the file, use zero indent. + if lnum == 0 + return 0 + endif + + let ind = indent(lnum) + + let or = '\|' + " Regular expressions used by line indentation function. + let cmake_regex_comment = '#.*' + let cmake_regex_identifier = '[A-Za-z][A-Za-z0-9_]*' + let cmake_regex_quoted = '"\([^"\\]\|\\.\)*"' + let cmake_regex_arguments = '\(' . cmake_regex_quoted . + \ or . '\$(' . cmake_regex_identifier . ')' . + \ or . '[^()\\#"]' . or . '\\.' . '\)*' + + let cmake_indent_comment_line = '^\s*' . cmake_regex_comment + let cmake_indent_blank_regex = '^\s*$' + let cmake_indent_open_regex = '^\s*' . cmake_regex_identifier . + \ '\s*(' . cmake_regex_arguments . + \ '\(' . cmake_regex_comment . '\)\?$' + + let cmake_indent_close_regex = '^' . cmake_regex_arguments . + \ ')\s*' . + \ '\(' . cmake_regex_comment . '\)\?$' + + let cmake_indent_begin_regex = '^\s*\(IF\|MACRO\|FOREACH\|ELSE\|ELSEIF\|WHILE\|FUNCTION\)\s*(' + let cmake_indent_end_regex = '^\s*\(ENDIF\|ENDFOREACH\|ENDMACRO\|ELSE\|ELSEIF\|ENDWHILE\|ENDFUNCTION\)\s*(' + + " Add + if previous_line =~? cmake_indent_comment_line " Handle comments + let ind = ind + else + if previous_line =~? cmake_indent_begin_regex + let ind = ind + &sw + endif + if previous_line =~? cmake_indent_open_regex + let ind = ind + &sw + endif + endif + + " Subtract + if this_line =~? cmake_indent_end_regex + let ind = ind - &sw + endif + if previous_line =~? cmake_indent_close_regex + let ind = ind - &sw + endif + + return ind +endfun diff --git a/Docs/cmake-mode.el b/Docs/cmake-mode.el new file mode 100644 index 000000000..0fbecb76d --- /dev/null +++ b/Docs/cmake-mode.el @@ -0,0 +1,241 @@ +;============================================================================= +; +; Program: CMake - Cross-Platform Makefile Generator +; Module: $RCSfile: cmake-mode.el,v $ +; +; Copyright (c) 2000-$Date: 2008-03-11 14:54:40 $ Kitware, Inc., Insight Consortium. All rights reserved. +; See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. +; +; This software is distributed WITHOUT ANY WARRANTY; without even +; the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +; PURPOSE. See the above copyright notices for more information. +; +;============================================================================= +;;; cmake-mode.el --- major-mode for editing CMake sources + +;------------------------------------------------------------------------------ + +;;; Commentary: + +;; Provides syntax highlighting and indentation for CMakeLists.txt and +;; *.cmake source files. +;; +;; Add this code to your .emacs file to use the mode: +;; +;; (setq load-path (cons (expand-file-name "/dir/with/cmake-mode") load-path)) +;; (require 'cmake-mode) +;; (setq auto-mode-alist +;; (append '(("CMakeLists\\.txt\\'" . cmake-mode) +;; ("\\.cmake\\'" . cmake-mode)) +;; auto-mode-alist)) + +;------------------------------------------------------------------------------ + +;;; Code: + +;; +;; Regular expressions used by line indentation function. +;; +(defconst cmake-regex-blank "^[ \t]*$") +(defconst cmake-regex-comment "#.*") +(defconst cmake-regex-paren-left "(") +(defconst cmake-regex-paren-right ")") +(defconst cmake-regex-argument-quoted + "\"\\([^\"\\\\]\\|\\\\\\(.\\|\n\\)\\)*\"") +(defconst cmake-regex-argument-unquoted + "\\([^ \t\r\n()#\"\\\\]\\|\\\\.\\)\\([^ \t\r\n()#\\\\]\\|\\\\.\\)*") +(defconst cmake-regex-token (concat "\\(" cmake-regex-comment + "\\|" cmake-regex-paren-left + "\\|" cmake-regex-paren-right + "\\|" cmake-regex-argument-unquoted + "\\|" cmake-regex-argument-quoted + "\\)")) +(defconst cmake-regex-indented (concat "^\\(" + cmake-regex-token + "\\|" "[ \t\r\n]" + "\\)*")) +(defconst cmake-regex-block-open + "^\\(IF\\|MACRO\\|FOREACH\\|ELSE\\|ELSEIF\\|WHILE\\|FUNCTION\\)$") +(defconst cmake-regex-block-close + "^[ \t]*\\(ENDIF\\|ENDFOREACH\\|ENDMACRO\\|ELSE\\|ELSEIF\\|ENDWHILE\\|ENDFUNCTION\\)[ \t]*(") + +;------------------------------------------------------------------------------ + +;; +;; Helper functions for line indentation function. +;; +(defun cmake-line-starts-inside-string () + "Determine whether the beginning of the current line is in a string." + (if (save-excursion + (beginning-of-line) + (let ((parse-end (point))) + (beginning-of-buffer) + (nth 3 (parse-partial-sexp (point) parse-end)) + ) + ) + t + nil + ) + ) + +(defun cmake-find-last-indented-line () + "Move to the beginning of the last line that has meaningful indentation." + (let ((point-start (point)) + region) + (forward-line -1) + (setq region (buffer-substring-no-properties (point) point-start)) + (while (and (not (bobp)) + (or (looking-at cmake-regex-blank) + (not (and (string-match cmake-regex-indented region) + (= (length region) (match-end 0)))))) + (forward-line -1) + (setq region (buffer-substring-no-properties (point) point-start)) + ) + ) + ) + +;------------------------------------------------------------------------------ + +;; +;; Line indentation function. +;; +(defun cmake-indent () + "Indent current line as CMAKE code." + (interactive) + (beginning-of-line) + (if (cmake-line-starts-inside-string) + () + (if (bobp) + (indent-line-to 0) + (let ((point-start (point)) + token cur-indent) + + (save-excursion + ; Search back for the last indented line. + (cmake-find-last-indented-line) + + ; Start with the indentation on this line. + (setq cur-indent (current-indentation)) + + ; Search forward counting tokens that adjust indentation. + (while (re-search-forward cmake-regex-token point-start t) + (setq token (match-string 0)) + (if (string-match (concat "^" cmake-regex-paren-left "$") token) + (setq cur-indent (+ cur-indent cmake-tab-width)) + ) + (if (string-match (concat "^" cmake-regex-paren-right "$") token) + (setq cur-indent (- cur-indent cmake-tab-width)) + ) + (if (and + (string-match cmake-regex-block-open token) + (looking-at (concat "[ \t]*" cmake-regex-paren-left)) + ) + (setq cur-indent (+ cur-indent cmake-tab-width)) + ) + ) + ) + + ; If this is the end of a block, decrease indentation. + (if (looking-at cmake-regex-block-close) + (setq cur-indent (- cur-indent cmake-tab-width)) + ) + + ; Indent this line by the amount selected. + (if (< cur-indent 0) + (indent-line-to 0) + (indent-line-to cur-indent) + ) + ) + ) + ) + ) + +;------------------------------------------------------------------------------ + +;; +;; Helper functions for buffer +;; +(defun unscreamify-cmake-buffer () + "Convert all CMake commands to lowercase in buffer." + (interactive) + (setq save-point (point)) + (goto-char (point-min)) + (while (re-search-forward "^\\([ \t]*\\)\\(\\w+\\)\\([ \t]*(\\)" nil t) + (replace-match + (concat + (match-string 1) + (downcase (match-string 2)) + (match-string 3)) + t)) + (goto-char save-point) + ) + +;------------------------------------------------------------------------------ + +;; +;; Keyword highlighting regex-to-face map. +;; +(defconst cmake-font-lock-keywords + (list '("^[ \t]*\\(\\w+\\)[ \t]*(" 1 font-lock-function-name-face)) + "Highlighting expressions for CMAKE mode." + ) + +;------------------------------------------------------------------------------ + +;; +;; Syntax table for this mode. Initialize to nil so that it is +;; regenerated when the cmake-mode function is called. +;; +(defvar cmake-mode-syntax-table nil "Syntax table for cmake-mode.") +(setq cmake-mode-syntax-table nil) + +;; +;; User hook entry point. +;; +(defvar cmake-mode-hook nil) + +;; +;; Indentation increment. +;; +(defvar cmake-tab-width 2) + +;------------------------------------------------------------------------------ + +;; +;; CMake mode startup function. +;; +(defun cmake-mode () + "Major mode for editing CMake listfiles." + (interactive) + (kill-all-local-variables) + (setq major-mode 'cmake-mode) + (setq mode-name "CMAKE") + + ; Create the syntax table + (setq cmake-mode-syntax-table (make-syntax-table)) + (set-syntax-table cmake-mode-syntax-table) + (modify-syntax-entry ?_ "w" cmake-mode-syntax-table) + (modify-syntax-entry ?\( "()" cmake-mode-syntax-table) + (modify-syntax-entry ?\) ")(" cmake-mode-syntax-table) + (modify-syntax-entry ?# "<" cmake-mode-syntax-table) + (modify-syntax-entry ?\n ">" cmake-mode-syntax-table) + + ; Setup font-lock mode. + (make-local-variable 'font-lock-defaults) + (setq font-lock-defaults '(cmake-font-lock-keywords)) + + ; Setup indentation function. + (make-local-variable 'indent-line-function) + (setq indent-line-function 'cmake-indent) + + ; Setup comment syntax. + (make-local-variable 'comment-start) + (setq comment-start "#") + + ; Run user hooks. + (run-hooks 'cmake-mode-hook)) + +; This file provides cmake-mode. +(provide 'cmake-mode) + +;;; cmake-mode.el ends here diff --git a/Docs/cmake-syntax.vim b/Docs/cmake-syntax.vim new file mode 100644 index 000000000..f01e7ad0e --- /dev/null +++ b/Docs/cmake-syntax.vim @@ -0,0 +1,89 @@ +" ============================================================================= +" +" Program: CMake - Cross-Platform Makefile Generator +" Module: $RCSfile: cmake-syntax.vim,v $ +" Language: VIM +" Date: $Date: 2008-01-16 16:53:53 $ +" Version: $Revision: 1.9 $ +" +" ============================================================================= + +" Vim syntax file +" Language: CMake +" Author: Andy Cedilnik +" Maintainer: Karthik Krishnan +" Last Change: $Date: 2008-01-16 16:53:53 $ +" Version: $Revision: 1.9 $ +" +" Licence: The CMake license applies to this file. See +" http://www.cmake.org/HTML/Copyright.html +" This implies that distribution with Vim is allowed + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore +syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained +syn region cmakeComment start="#" end="$" contains=cmakeTodo +syn region cmakeRegistry start=/\[/ end=/]/ + \ contained oneline contains=CONTAINED,cmakeTodo,cmakeEscaped +syn region cmakeVariableValue start=/\${/ end=/}/ + \ contained oneline contains=CONTAINED,cmakeTodo +syn region cmakeEnvironment start=/\$ENV{/ end=/}/ + \ contained oneline contains=CONTAINED,cmakeTodo +syn region cmakeString start=/"/ end=/"/ + \ contains=CONTAINED,cmakeTodo,cmakeOperators +syn region cmakeArguments start=/(/ end=/)/ + \ contains=ALLBUT,cmakeArguments,cmakeTodo +syn keyword cmakeSystemVariables + \ WIN32 UNIX APPLE CYGWIN BORLAND MINGW MSVC MSVC_IDE MSVC60 MSVC70 MSVC71 MSVC80 +syn keyword cmakeOperators + \ ABSOLUTE AND BOOL CACHE COMMAND DEFINED DOC EQUAL EXISTS EXT FALSE GREATER INTERNAL LESS MATCHES NAME NAMES NAME_WE NOT OFF ON OR PATH PATHS PROGRAM STREQUAL STRGREATER STRING STRLESS TRUE + \ contained +syn keyword cmakeDeprecated ABSTRACT_FILES BUILD_NAME SOURCE_FILES SOURCE_FILES_REMOVE VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WRAP_EXCLUDE_FILES + \ nextgroup=cmakeArguments + +" The keywords are generated as: cmake --help-command-list | tr "\n" " " +syn keyword cmakeStatement + \ ADD_CUSTOM_COMMAND ADD_CUSTOM_TARGET ADD_DEFINITIONS ADD_DEPENDENCIES ADD_EXECUTABLE ADD_LIBRARY ADD_SUBDIRECTORY ADD_TEST AUX_SOURCE_DIRECTORY BUILD_COMMAND BUILD_NAME CMAKE_MINIMUM_REQUIRED CONFIGURE_FILE CREATE_TEST_SOURCELIST ELSE ELSEIF ENABLE_LANGUAGE ENABLE_TESTING ENDFOREACH ENDFUNCTION ENDIF ENDMACRO ENDWHILE EXEC_PROGRAM EXECUTE_PROCESS EXPORT_LIBRARY_DEPENDENCIES FILE FIND_FILE FIND_LIBRARY FIND_PACKAGE FIND_PATH FIND_PROGRAM FLTK_WRAP_UI FOREACH FUNCTION GET_CMAKE_PROPERTY GET_DIRECTORY_PROPERTY GET_FILENAME_COMPONENT GET_SOURCE_FILE_PROPERTY GET_TARGET_PROPERTY GET_TEST_PROPERTY IF INCLUDE INCLUDE_DIRECTORIES INCLUDE_EXTERNAL_MSPROJECT INCLUDE_REGULAR_EXPRESSION INSTALL INSTALL_FILES INSTALL_PROGRAMS INSTALL_TARGETS LINK_DIRECTORIES LINK_LIBRARIES LIST LOAD_CACHE LOAD_COMMAND MACRO MAKE_DIRECTORY MARK_AS_ADVANCED MATH MESSAGE OPTION OUTPUT_REQUIRED_FILES PROJECT QT_WRAP_CPP QT_WRAP_UI REMOVE REMOVE_DEFINITIONS SEPARATE_ARGUMENTS SET SET_DIRECTORY_PROPERTIES SET_SOURCE_FILES_PROPERTIES SET_TARGET_PROPERTIES SET_TESTS_PROPERTIES SITE_NAME SOURCE_GROUP STRING SUBDIR_DEPENDS SUBDIRS TARGET_LINK_LIBRARIES TRY_COMPILE TRY_RUN USE_MANGLED_MESA UTILITY_SOURCE VARIABLE_REQUIRES VTK_MAKE_INSTANTIATOR VTK_WRAP_JAVA VTK_WRAP_PYTHON VTK_WRAP_TCL WHILE WRITE_FILE + \ nextgroup=cmakeArguments +syn keyword cmakeTodo + \ TODO FIXME XXX + \ contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cmake_syntax_inits") + if version < 508 + let did_cmake_syntax_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + + HiLink cmakeStatement Statement + HiLink cmakeComment Comment + HiLink cmakeString String + HiLink cmakeVariableValue Type + HiLink cmakeRegistry Underlined + HiLink cmakeArguments Identifier + HiLink cmakeArgument Constant + HiLink cmakeEnvironment Special + HiLink cmakeOperators Operator + HiLink cmakeMacro PreProc + HiLink cmakeError Error + HiLink cmakeTodo TODO + HiLink cmakeEscaped Special + + delcommand HiLink +endif + +let b:current_syntax = "cmake" + +"EOF" diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt new file mode 100644 index 000000000..8ee7d721e --- /dev/null +++ b/Example/CMakeLists.txt @@ -0,0 +1,10 @@ +# The name of our project is "HELLO". CMakeLists files in this project can +# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and +# to the root binary directory of the project as ${HELLO_BINARY_DIR}. +project (HELLO) + +# Recurse into the "Hello" and "Demo" subdirectories. This does not actually +# cause another cmake executable to run. The same process will walk through +# the project's entire directory structure. +add_subdirectory (Hello) +add_subdirectory (Demo) diff --git a/Example/Demo/CMakeLists.txt b/Example/Demo/CMakeLists.txt new file mode 100644 index 000000000..477700fab --- /dev/null +++ b/Example/Demo/CMakeLists.txt @@ -0,0 +1,12 @@ +# Make sure the compiler can find include files from our Hello library. +include_directories (${HELLO_SOURCE_DIR}/Hello) + +# Make sure the linker can find the Hello library once it is built. +link_directories (${HELLO_BINARY_DIR}/Hello) + +# Add executable called "helloDemo" that is built from the source files +# "demo.cxx" and "demo_b.cxx". The extensions are automatically found. +add_executable (helloDemo demo.cxx demo_b.cxx) + +# Link the executable to the Hello library. +target_link_libraries (helloDemo Hello) diff --git a/Example/Demo/demo.cxx b/Example/Demo/demo.cxx new file mode 100644 index 000000000..31de0386c --- /dev/null +++ b/Example/Demo/demo.cxx @@ -0,0 +1,10 @@ +#include "hello.h" + +extern Hello hello; + +int main() +{ + hello.Print(); + + return 0; +} diff --git a/Example/Demo/demo_b.cxx b/Example/Demo/demo_b.cxx new file mode 100644 index 000000000..08a232913 --- /dev/null +++ b/Example/Demo/demo_b.cxx @@ -0,0 +1,3 @@ +#include "hello.h" + +Hello hello; diff --git a/Example/Hello/CMakeLists.txt b/Example/Hello/CMakeLists.txt new file mode 100644 index 000000000..879f4e5b1 --- /dev/null +++ b/Example/Hello/CMakeLists.txt @@ -0,0 +1,3 @@ +# Create a library called "Hello" which includes the source file "hello.cxx". +# The extension is already found. Any number of sources could be listed here. +add_library (Hello hello.cxx) diff --git a/Example/Hello/hello.cxx b/Example/Hello/hello.cxx new file mode 100644 index 000000000..7107cc555 --- /dev/null +++ b/Example/Hello/hello.cxx @@ -0,0 +1,7 @@ +#include "hello.h" +#include + +void Hello::Print() +{ + printf("Hello, World!\n"); +} diff --git a/Example/Hello/hello.h b/Example/Hello/hello.h new file mode 100644 index 000000000..b17d68343 --- /dev/null +++ b/Example/Hello/hello.h @@ -0,0 +1,11 @@ +#ifndef _hello_h +#define _hello_h + + +class Hello +{ +public: + void Print(); +}; + +#endif diff --git a/Modules/AddFileDependencies.cmake b/Modules/AddFileDependencies.cmake new file mode 100644 index 000000000..0ea64708a --- /dev/null +++ b/Modules/AddFileDependencies.cmake @@ -0,0 +1,16 @@ +# - ADD_FILE_DEPENDENCIES(source_file depend_files...) +# Adds the given files as dependencies to source_file +# + +MACRO(ADD_FILE_DEPENDENCIES _file) + + GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS) + IF (_deps) + SET(_deps ${_deps} ${ARGN}) + ELSE (_deps) + SET(_deps ${ARGN}) + ENDIF (_deps) + + SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}") + +ENDMACRO(ADD_FILE_DEPENDENCIES) diff --git a/Modules/CMake.cmake b/Modules/CMake.cmake new file mode 100755 index 000000000..7689bd924 --- /dev/null +++ b/Modules/CMake.cmake @@ -0,0 +1,4 @@ + +# 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 new file mode 100644 index 000000000..fb44b102a --- /dev/null +++ b/Modules/CMakeASM-ATTInformation.cmake @@ -0,0 +1,4 @@ +SET(ASM_DIALECT "-ATT") +SET(CMAKE_ASM${ASM_DIALECT}_SOURCE_FILE_EXTENSIONS s;S;asm) +INCLUDE(CMakeASMInformation) +SET(ASM_DIALECT) diff --git a/Modules/CMakeASMCompiler.cmake.in b/Modules/CMakeASMCompiler.cmake.in new file mode 100644 index 000000000..230805bf4 --- /dev/null +++ b/Modules/CMakeASMCompiler.cmake.in @@ -0,0 +1,11 @@ +SET(CMAKE_ASM@ASM_DIALECT@_COMPILER "@_CMAKE_ASM_COMPILER@") +SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ARG1 "@_CMAKE_ASM_COMPILER_ARG1@") +SET(CMAKE_AR "@CMAKE_AR@") +SET(CMAKE_RANLIB "@CMAKE_RANLIB@") +SET(CMAKE_LINKER "@CMAKE_LINKER@") +SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_LOADED 1) +SET(CMAKE_ASM@ASM_DIALECT@_COMPILER_ENV_VAR "@_CMAKE_ASM_COMPILER_ENV_VAR@") + +SET(CMAKE_ASM@ASM_DIALECT@_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_ASM@ASM_DIALECT@_LINKER_PREFERENCE 0) + diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake new file mode 100644 index 000000000..998962f97 --- /dev/null +++ b/Modules/CMakeASMInformation.cmake @@ -0,0 +1,61 @@ +MESSAGE(STATUS "Loaded CMakeASM${ASM_DIALECT}Information - ASM${ASM_DIALECT} support is still experimental, please report issues") + +IF(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) + +SET(CMAKE_INCLUDE_FLAG_ASM${ASM_DIALECT} "-I") # -I + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE) + +IF("${CMAKE_BASE_NAME}" STREQUAL "as") + SET(CMAKE_BASE_NAME gas) +ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as") + +INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL) + +IF(CMAKE_SYSTEM_PROCESSOR) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +ENDIF(CMAKE_SYSTEM_PROCESSOR) +IF(NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) +ENDIF(NOT _INCLUDED_FILE) + +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +IF(NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL) +ENDIF(NOT _INCLUDED_FILE) + +IF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS) + SET(CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS s;S;asm) +ENDIF(NOT CMAKE_ASM@ASM_DIALECT@_SOURCE_FILE_EXTENSIONS) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o ") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY + " cr " + " ") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE) + SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE + " -o ") +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE) + +# to be done +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) + +IF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) + SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) + + +SET(CMAKE_ASM${ASM_DIALECT}_INFOMATION_LOADED 1) + diff --git a/Modules/CMakeAddNewLanguage.txt b/Modules/CMakeAddNewLanguage.txt new file mode 100755 index 000000000..203c39dfe --- /dev/null +++ b/Modules/CMakeAddNewLanguage.txt @@ -0,0 +1,17 @@ +CMakeDetermine(LANG)Compiler.cmake -> this should find the compiler for LANG and configure CMake(LANG)Compiler.cmake.in + +CMake(LANG)Compiler.cmake.in -> used by CMakeDetermine(LANG)Compiler.cmake + This file is used to store compiler information and is copied down into try + compile directories so that try compiles do not need to re-determine and test the LANG + +CMakeTest(LANG)Compiler.cmake -> test the compiler and set: + SET(CMAKE_(LANG)_COMPILER_WORKS 1 CACHE INTERNAL "") + +CMake(LANG)Information.cmake -> set up rule variables for LANG : + CMAKE_(LANG)_CREATE_SHARED_LIBRARY + CMAKE_(LANG)_CREATE_SHARED_MODULE + CMAKE_(LANG)_CREATE_STATIC_LIBRARY + CMAKE_(LANG)_COMPILE_OBJECT + CMAKE_(LANG)_LINK_EXECUTABLE + + diff --git a/Modules/CMakeBackwardCompatibilityC.cmake b/Modules/CMakeBackwardCompatibilityC.cmake new file mode 100644 index 000000000..033338453 --- /dev/null +++ b/Modules/CMakeBackwardCompatibilityC.cmake @@ -0,0 +1,71 @@ + +# Nothing here yet +IF(CMAKE_GENERATOR MATCHES "Visual Studio 7") + INCLUDE(CMakeVS7BackwardCompatibility) + SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7") +IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + INCLUDE(CMakeVS6BackwardCompatibility) + SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + +IF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) + INCLUDE (CheckTypeSize) + CHECK_TYPE_SIZE(int CMAKE_SIZEOF_INT) + CHECK_TYPE_SIZE(long CMAKE_SIZEOF_LONG) + CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P) + CHECK_TYPE_SIZE(char CMAKE_SIZEOF_CHAR) + CHECK_TYPE_SIZE(short CMAKE_SIZEOF_SHORT) + CHECK_TYPE_SIZE(float CMAKE_SIZEOF_FLOAT) + CHECK_TYPE_SIZE(double CMAKE_SIZEOF_DOUBLE) + + INCLUDE (CheckIncludeFile) + CHECK_INCLUDE_FILE("limits.h" CMAKE_HAVE_LIMITS_H) + CHECK_INCLUDE_FILE("unistd.h" CMAKE_HAVE_UNISTD_H) + CHECK_INCLUDE_FILE("pthread.h" CMAKE_HAVE_PTHREAD_H) + + INCLUDE (CheckIncludeFiles) + CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SYS_PRCTL_H) + + INCLUDE (TestBigEndian) + TEST_BIG_ENDIAN(CMAKE_WORDS_BIGENDIAN) + INCLUDE (FindX11) + + IF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") + SET (CMAKE_X_CFLAGS "" CACHE STRING "X11 extra flags.") + ELSE("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") + SET (CMAKE_X_CFLAGS "-I${X11_X11_INCLUDE_PATH}" CACHE STRING + "X11 extra flags.") + ENDIF("${X11_X11_INCLUDE_PATH}" MATCHES "^/usr/include$") + SET (CMAKE_X_LIBS "${X11_LIBRARIES}" CACHE STRING + "Libraries and options used in X11 programs.") + SET (CMAKE_HAS_X "${X11_FOUND}" CACHE INTERNAL "Is X11 around.") + + INCLUDE (FindThreads) + + SET (CMAKE_THREAD_LIBS "${CMAKE_THREAD_LIBS_INIT}" CACHE STRING + "Thread library used.") + + SET (CMAKE_USE_PTHREADS "${CMAKE_USE_PTHREADS_INIT}" CACHE BOOL + "Use the pthreads library.") + + SET (CMAKE_USE_WIN32_THREADS "${CMAKE_USE_WIN32_THREADS_INIT}" CACHE BOOL + "Use the win32 thread library.") + + SET (CMAKE_HP_PTHREADS ${CMAKE_HP_PTHREADS_INIT} CACHE BOOL + "Use HP pthreads.") + + SET (CMAKE_USE_SPROC ${CMAKE_USE_SPROC_INIT} CACHE BOOL + "Use sproc libs.") +ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) + +MARK_AS_ADVANCED( +CMAKE_HP_PTHREADS +CMAKE_THREAD_LIBS +CMAKE_USE_PTHREADS +CMAKE_USE_SPROC +CMAKE_USE_WIN32_THREADS +CMAKE_X_CFLAGS +CMAKE_X_LIBS +) + diff --git a/Modules/CMakeBackwardCompatibilityCXX.cmake b/Modules/CMakeBackwardCompatibilityCXX.cmake new file mode 100644 index 000000000..29dabc60e --- /dev/null +++ b/Modules/CMakeBackwardCompatibilityCXX.cmake @@ -0,0 +1,40 @@ +# - define a bunch of backwards compatibility variables +# CMAKE_ANSI_CXXFLAGS - flag for ansi c++ +# CMAKE_HAS_ANSI_STRING_STREAM - has +# INCLUDE(TestForANSIStreamHeaders) +# INCLUDE(CheckIncludeFileCXX) +# INCLUDE(TestForSTDNamespace) +# INCLUDE(TestForANSIForScope) +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) + INCLUDE(TestCXXAcceptsFlag) + SET(CMAKE_TRY_ANSI_CXX_FLAGS "") + IF(CMAKE_SYSTEM MATCHES "IRIX.*") + SET(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std") + ENDIF(CMAKE_SYSTEM MATCHES "IRIX.*") + IF(CMAKE_SYSTEM MATCHES "OSF.*") + SET(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname") + ENDIF(CMAKE_SYSTEM MATCHES "OSF.*") + # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see + # if the compiler accepts it + IF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+") + CHECK_CXX_ACCEPTS_FLAG(${CMAKE_TRY_ANSI_CXX_FLAGS} CMAKE_CXX_ACCEPTS_FLAGS) + # if the compiler liked the flag then set CMAKE_ANSI_CXXFLAGS + # to the flag + IF(CMAKE_CXX_ACCEPTS_FLAGS) + SET(CMAKE_ANSI_CXXFLAGS ${CMAKE_TRY_ANSI_CXX_FLAGS} CACHE INTERNAL + "What flags are required by the c++ compiler to make it ansi." ) + ENDIF(CMAKE_CXX_ACCEPTS_FLAGS) + ENDIF( CMAKE_TRY_ANSI_CXX_FLAGS MATCHES ".+") + ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}") + INCLUDE(TestForANSIStreamHeaders) + INCLUDE(CheckIncludeFileCXX) + INCLUDE(TestForSTDNamespace) + INCLUDE(TestForANSIForScope) + INCLUDE(TestForSSTREAM) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_SAVE}") +ENDIF(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) + diff --git a/Modules/CMakeBorlandFindMake.cmake b/Modules/CMakeBorlandFindMake.cmake new file mode 100755 index 000000000..7efc1c2d0 --- /dev/null +++ b/Modules/CMakeBorlandFindMake.cmake @@ -0,0 +1,3 @@ +SET (CMAKE_MAKE_PROGRAM "make" CACHE STRING + "Program used to build from makefiles.") +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) diff --git a/Modules/CMakeBuildSettings.cmake.in b/Modules/CMakeBuildSettings.cmake.in new file mode 100644 index 000000000..b018ada96 --- /dev/null +++ b/Modules/CMakeBuildSettings.cmake.in @@ -0,0 +1,29 @@ +# This file has been automatically generated by CMake. DO NOT EDIT! +# It contains the build configuration for @PROJECT_NAME@. The command +# CMAKE_EXPORT_BUILD_SETTINGS(...) was used by @PROJECT_NAME@ to +# generate this file. Another project can use +# CMAKE_IMPORT_BUILD_SETTINGS(...) to load the build configuration +# from this file. The contents of this file may be different across +# versions of CMake. The values set here should not be used by user +# code. + +SET(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "@CMAKE_MAJOR_VERSION@") +SET(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "@CMAKE_MINOR_VERSION@") +SET(CMAKE_BUILD_SETTING_PROJECT_NAME "@PROJECT_NAME@") + +SET(CMAKE_BUILD_SETTING_C_COMPILER "@CMAKE_C_COMPILER@") +SET(CMAKE_BUILD_SETTING_C_FLAGS "@CMAKE_C_FLAGS@") +SET(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@") +SET(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@") +SET(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@") +SET(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@") + +SET(CMAKE_BUILD_SETTING_CXX_COMPILER "@CMAKE_CXX_COMPILER@") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS "@CMAKE_CXX_FLAGS@") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@") + +SET(CMAKE_BUILD_SETTING_BUILD_TYPE "@CMAKE_BUILD_TYPE@") +SET(CMAKE_BUILD_SETTING_BUILD_TOOL "@CMAKE_BUILD_TOOL@") diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in new file mode 100644 index 000000000..e334c471d --- /dev/null +++ b/Modules/CMakeCCompiler.cmake.in @@ -0,0 +1,36 @@ +SET(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") +SET(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") +SET(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") +SET(CMAKE_C_PLATFORM_ID "@CMAKE_C_PLATFORM_ID@") +SET(CMAKE_AR "@CMAKE_AR@") +SET(CMAKE_RANLIB "@CMAKE_RANLIB@") +SET(CMAKE_COMPILER_IS_GNUCC @CMAKE_COMPILER_IS_GNUCC@) +SET(CMAKE_C_COMPILER_LOADED 1) +SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) +SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) +IF(CMAKE_COMPILER_IS_CYGWIN) + SET(CYGWIN 1) + SET(UNIX 1) +ENDIF(CMAKE_COMPILER_IS_CYGWIN) + +SET(CMAKE_C_COMPILER_ENV_VAR "CC") + +IF(CMAKE_COMPILER_IS_MINGW) + SET(MINGW 1) +ENDIF(CMAKE_COMPILER_IS_MINGW) +SET(CMAKE_C_COMPILER_ID_RUN 1) +SET(CMAKE_C_SOURCE_FILE_EXTENSIONS c) +SET(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +SET(CMAKE_C_SIZEOF_DATA_PTR "@CMAKE_C_SIZEOF_DATA_PTR@") +SET(CMAKE_C_COMPILER_ABI "@CMAKE_C_COMPILER_ABI@") + +IF(CMAKE_C_SIZEOF_DATA_PTR) + SET(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +ENDIF(CMAKE_C_SIZEOF_DATA_PTR) + +IF(CMAKE_C_COMPILER_ABI) + SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +ENDIF(CMAKE_C_COMPILER_ABI) diff --git a/Modules/CMakeCCompilerABI.c b/Modules/CMakeCCompilerABI.c new file mode 100644 index 000000000..f73e7fcc3 --- /dev/null +++ b/Modules/CMakeCCompilerABI.c @@ -0,0 +1,28 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#ifdef __CLASSIC_C__ +# define const +#endif + +/*--------------------------------------------------------------------------*/ + +#include "CMakeCompilerABI.h" + +/*--------------------------------------------------------------------------*/ + +/* Make sure the information strings are referenced. */ +#define REQUIRE(x) (&x[0] != &require) + +int main() +{ + const char require = 0; + return + ( + REQUIRE(info_sizeof_dptr) +#if defined(ABI_ID) + && REQUIRE(info_abi) +#endif + ); +} diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in new file mode 100644 index 000000000..ecbe431b7 --- /dev/null +++ b/Modules/CMakeCCompilerId.c.in @@ -0,0 +1,84 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +/* Provide main() so the program can link. */ +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#ifdef ID_VOID_MAIN +void main() {} +#else +int main() { return 0; } +#endif + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + +#elif defined(__WATCOMC__) +# define COMPILER_ID "Watcom" + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + +#elif defined(__IBMC__) +# define COMPILER_ID "VisualAge" + +#elif defined(__PGI) +# define COMPILER_ID "PGI" + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + +#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +/* Analog Devices C++ compiler for Blackfin, TigerSHARC and + SHARC (21000) DSPs */ +# define COMPILER_ID "ADSP" + +/* IAR Systems compiler for embedded systems. + http://www.iar.com + Not supported yet by CMake +#elif defined(__IAR_SYSTEMS_ICC__) +# define COMPILER_ID "IAR" */ + +/* sdcc, the small devices C compiler for embedded systems, + http://sdcc.sourceforge.net */ +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + +#elif defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" + +/* This compiler is either not known or is too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" + +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; + +@CMAKE_C_COMPILER_ID_PLATFORM_CONTENT@ diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake new file mode 100755 index 000000000..e3a8d9343 --- /dev/null +++ b/Modules/CMakeCInformation.cmake @@ -0,0 +1,175 @@ + +# 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. +# It also loads a system - compiler - processor (or target hardware) +# specific file, which is mainly useful for crosscompiling and embedded systems. + +# some compilers use different extensions (e.g. sdcc uses .rel) +# so set the extension here first so it can be overridden by the compiler specific file +IF(UNIX) + SET(CMAKE_C_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_C_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE) +IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_BASE_NAME gcc) +ENDIF(CMAKE_COMPILER_IS_GNUCC) + + +# load a hardware specific file, mostly useful for embedded compilers +IF(CMAKE_SYSTEM_PROCESSOR) + IF(CMAKE_C_COMPILER_ID) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) + ENDIF(CMAKE_C_COMPILER_ID) + IF (NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) + ENDIF (NOT _INCLUDED_FILE) +ENDIF(CMAKE_SYSTEM_PROCESSOR) + + +# load the system- and compiler specific files +IF(CMAKE_C_COMPILER_ID) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +ENDIF(CMAKE_C_COMPILER_ID) +IF (NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +ENDIF (NOT _INCLUDED_FILE) + + +# 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. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_C) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_C}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_C) + + +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +IF(NOT CMAKE_MODULE_EXISTS) + SET(CMAKE_SHARED_MODULE_C_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_MODULE_EXISTS) + +SET(CMAKE_C_FLAGS_INIT "$ENV{CFLAGS} ${CMAKE_C_FLAGS_INIT}") +# avoid just having a space as the initial value for the cache +IF(CMAKE_C_FLAGS_INIT STREQUAL " ") + SET(CMAKE_C_FLAGS_INIT) +ENDIF(CMAKE_C_FLAGS_INIT STREQUAL " ") +SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_INIT}" CACHE STRING + "Flags used by the compiler during all build types.") + +IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) +# default build type is none + IF(NOT CMAKE_NO_BUILD_TYPE) + SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") + ENDIF(NOT CMAKE_NO_BUILD_TYPE) + SET (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG_INIT}" CACHE STRING + "Flags used by the compiler during debug builds.") + SET (CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL_INIT}" CACHE STRING + "Flags used by the compiler during release minsize builds.") + SET (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE_INIT}" CACHE STRING + "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING + "Flags used by the compiler during Release with Debug Info builds.") +ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + +IF(CMAKE_C_STANDARD_LIBRARIES_INIT) + SET(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES_INIT}" + CACHE STRING "Libraries linked by defalut with all C applications.") + MARK_AS_ADVANCED(CMAKE_C_STANDARD_LIBRARIES) +ENDIF(CMAKE_C_STANDARD_LIBRARIES_INIT) + +INCLUDE(CMakeCommonLanguageInclude) + +# now define the following rule variables + +# CMAKE_C_CREATE_SHARED_LIBRARY +# CMAKE_C_CREATE_SHARED_MODULE +# CMAKE_C_CREATE_STATIC_LIBRARY +# CMAKE_C_COMPILE_OBJECT +# CMAKE_C_LINK_EXECUTABLE + +# variables supplied by the generator at use time +# +# the target without the suffix +# +# +# +# +# + +# C compiler information +# +# +# +# + +# Static library tools +# +# + + +# create a C shared library +IF(NOT CMAKE_C_CREATE_SHARED_LIBRARY) + SET(CMAKE_C_CREATE_SHARED_LIBRARY + " -o ") +ENDIF(NOT CMAKE_C_CREATE_SHARED_LIBRARY) + +# create a C shared module just copy the shared library rule +IF(NOT CMAKE_C_CREATE_SHARED_MODULE) + SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY}) +ENDIF(NOT CMAKE_C_CREATE_SHARED_MODULE) + +# create a C static library +IF(NOT CMAKE_C_CREATE_STATIC_LIBRARY) + SET(CMAKE_C_CREATE_STATIC_LIBRARY + " cr " + " ") +ENDIF(NOT CMAKE_C_CREATE_STATIC_LIBRARY) + +# compile a C file into an object file +IF(NOT CMAKE_C_COMPILE_OBJECT) + SET(CMAKE_C_COMPILE_OBJECT + " -o -c ") +ENDIF(NOT CMAKE_C_COMPILE_OBJECT) + +IF(NOT CMAKE_C_LINK_EXECUTABLE) + SET(CMAKE_C_LINK_EXECUTABLE + " -o ") +ENDIF(NOT CMAKE_C_LINK_EXECUTABLE) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG) + SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP) + SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_C_FLAG_SEP) + +IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG) + SET(CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_C_FLAG) + +MARK_AS_ADVANCED( +CMAKE_C_FLAGS +CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELWITHDEBINFO +) +SET(CMAKE_C_INFORMATION_LOADED 1) + + diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in new file mode 100644 index 000000000..81380c9ef --- /dev/null +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -0,0 +1,36 @@ +SET(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") +SET(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") +SET(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") +SET(CMAKE_CXX_PLATFORM_ID "@CMAKE_CXX_PLATFORM_ID@") +SET(CMAKE_AR "@CMAKE_AR@") +SET(CMAKE_RANLIB "@CMAKE_RANLIB@") +SET(CMAKE_COMPILER_IS_GNUCXX @CMAKE_COMPILER_IS_GNUCXX@) +SET(CMAKE_CXX_COMPILER_LOADED 1) +SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) +SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) +IF(CMAKE_COMPILER_IS_CYGWIN) + SET(CYGWIN 1) + SET(UNIX 1) +ENDIF(CMAKE_COMPILER_IS_CYGWIN) + +SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +IF(CMAKE_COMPILER_IS_MINGW) + SET(MINGW 1) +ENDIF(CMAKE_COMPILER_IS_MINGW) +SET(CMAKE_CXX_COMPILER_ID_RUN 1) +SET(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm) +SET(CMAKE_CXX_LINKER_PREFERENCE 30) + +# Save compiler ABI information. +SET(CMAKE_CXX_SIZEOF_DATA_PTR "@CMAKE_CXX_SIZEOF_DATA_PTR@") +SET(CMAKE_CXX_COMPILER_ABI "@CMAKE_CXX_COMPILER_ABI@") + +IF(CMAKE_CXX_SIZEOF_DATA_PTR) + SET(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +ENDIF(CMAKE_CXX_SIZEOF_DATA_PTR) + +IF(CMAKE_CXX_COMPILER_ABI) + SET(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +ENDIF(CMAKE_CXX_COMPILER_ABI) diff --git a/Modules/CMakeCXXCompilerABI.cpp b/Modules/CMakeCXXCompilerABI.cpp new file mode 100644 index 000000000..7fb361887 --- /dev/null +++ b/Modules/CMakeCXXCompilerABI.cpp @@ -0,0 +1,24 @@ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +/*--------------------------------------------------------------------------*/ + +#include "CMakeCompilerABI.h" + +/*--------------------------------------------------------------------------*/ + +/* Make sure the information strings are referenced. */ +#define REQUIRE(x) (&x[0] != &require) + +int main() +{ + const char require = 0; + return + ( + REQUIRE(info_sizeof_dptr) +#if defined(ABI_ID) + && REQUIRE(info_abi) +#endif + ); +} diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in new file mode 100644 index 000000000..060c7e9c1 --- /dev/null +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -0,0 +1,72 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +/* Provide main() so the program can link. */ +int main() { return 0; } + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + +#elif defined(__WATCOMC__) +# define COMPILER_ID "Watcom" + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + +#elif defined(__IBMCPP__) +# define COMPILER_ID "VisualAge" + +#elif defined(__PGI) +# define COMPILER_ID "PGI" + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + +#elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +/* Analog Devices C++ compiler for Blackfin, TigerSHARC and + SHARC (21000) DSPs */ +# define COMPILER_ID "ADSP" + +#elif defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" + +/* This compiler is either not known or is too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" + +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; + +@CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT@ diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake new file mode 100755 index 000000000..65c590248 --- /dev/null +++ b/Modules/CMakeCXXInformation.cmake @@ -0,0 +1,243 @@ + +# 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. +# It also loads a system - compiler - processor (or target hardware) +# specific file, which is mainly useful for crosscompiling and embedded systems. + +# some compilers use different extensions (e.g. sdcc uses .rel) +# so set the extension here first so it can be overridden by the compiler specific file +IF(UNIX) + SET(CMAKE_CXX_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_CXX_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) + + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE) +# since the gnu compiler has several names force g++ +IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_BASE_NAME g++) +ENDIF(CMAKE_COMPILER_IS_GNUCXX) + + +# load a hardware specific file, mostly useful for embedded compilers +IF(CMAKE_SYSTEM_PROCESSOR) + IF(CMAKE_CXX_COMPILER_ID) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) + ENDIF(CMAKE_CXX_COMPILER_ID) + IF (NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL) + ENDIF (NOT _INCLUDED_FILE) +ENDIF(CMAKE_SYSTEM_PROCESSOR) + +# load the system- and compiler specific files +IF(CMAKE_CXX_COMPILER_ID) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE) +ENDIF(CMAKE_CXX_COMPILER_ID) +IF (NOT _INCLUDED_FILE) + INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) +ENDIF (NOT _INCLUDED_FILE) + + +# 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. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + + +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +IF(NOT CMAKE_MODULE_EXISTS) + SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}) +ENDIF(NOT CMAKE_MODULE_EXISTS) +# Create a set of shared library variable specific to C++ +# For 90% of the systems, these are the same flags as the C versions +# so if these are not set just copy the flags from the c version +IF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS) + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS) + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS) + +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) + SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) +ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP) + +IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG) + SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG) + SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP) + SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP) + +IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG) + SET(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG) + +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH) + SET(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH}) +ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH) + +IF(NOT CMAKE_INCLUDE_FLAG_CXX) + SET(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C}) +ENDIF(NOT CMAKE_INCLUDE_FLAG_CXX) + +IF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX) + SET(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C}) +ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_CXX) + +# repeat for modules +IF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS) + SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS) + SET(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_CXX_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG) + SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_FLAG}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) + SET(CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP) + +# Initialize CXX link type selection flags from C versions. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + IF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS + ${CMAKE_${type}_LINK_STATIC_C_FLAGS}) + ENDIF(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS) + IF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS) + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS + ${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS}) + ENDIF(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS) +ENDFOREACH(type) + +# add the flags to the cache based +# on the initial values computed in the platform/*.cmake files +# use _INIT variables so that this only happens the first time +# and you can set these flags in the cmake cache +SET(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}") +# avoid just having a space as the initial value for the cache +IF(CMAKE_CXX_FLAGS_INIT STREQUAL " ") + SET(CMAKE_CXX_FLAGS_INIT) +ENDIF(CMAKE_CXX_FLAGS_INIT STREQUAL " ") +SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING + "Flags used by the compiler during all build types.") + +IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + SET (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING + "Flags used by the compiler during debug builds.") + SET (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING + "Flags used by the compiler during release minsize builds.") + SET (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING + "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING + "Flags used by the compiler during Release with Debug Info builds.") + +ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + +IF(CMAKE_CXX_STANDARD_LIBRARIES_INIT) + SET(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}" + CACHE STRING "Libraries linked by defalut with all C++ applications.") + MARK_AS_ADVANCED(CMAKE_CXX_STANDARD_LIBRARIES) +ENDIF(CMAKE_CXX_STANDARD_LIBRARIES_INIT) + +INCLUDE(CMakeCommonLanguageInclude) + +# now define the following rules: +# CMAKE_CXX_CREATE_SHARED_LIBRARY +# CMAKE_CXX_CREATE_SHARED_MODULE +# CMAKE_CXX_CREATE_STATIC_LIBRARY +# CMAKE_CXX_COMPILE_OBJECT +# CMAKE_CXX_LINK_EXECUTABLE + +# variables supplied by the generator at use time +# +# the target without the suffix +# +# +# +# +# + +# CXX compiler information +# +# +# +# + +# Static library tools +# +# + + +# create a shared C++ library +IF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY) + SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o ") +ENDIF(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY) + +# create a c++ shared module copy the shared library rule by default +IF(NOT CMAKE_CXX_CREATE_SHARED_MODULE) + SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) +ENDIF(NOT CMAKE_CXX_CREATE_SHARED_MODULE) + + +# create a C++ static library +IF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY) + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " cr " + " ") +ENDIF(NOT CMAKE_CXX_CREATE_STATIC_LIBRARY) + +# compile a C++ file into an object file +IF(NOT CMAKE_CXX_COMPILE_OBJECT) + SET(CMAKE_CXX_COMPILE_OBJECT + " -o -c ") +ENDIF(NOT CMAKE_CXX_COMPILE_OBJECT) + +IF(NOT CMAKE_CXX_LINK_EXECUTABLE) + SET(CMAKE_CXX_LINK_EXECUTABLE + " -o ") +ENDIF(NOT CMAKE_CXX_LINK_EXECUTABLE) + +MARK_AS_ADVANCED( +CMAKE_BUILD_TOOL +CMAKE_VERBOSE_MAKEFILE +CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_DEBUG) + +SET(CMAKE_CXX_INFORMATION_LOADED 1) + diff --git a/Modules/CMakeCommonLanguageInclude.cmake b/Modules/CMakeCommonLanguageInclude.cmake new file mode 100755 index 000000000..373a9a338 --- /dev/null +++ b/Modules/CMakeCommonLanguageInclude.cmake @@ -0,0 +1,94 @@ + +# 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. + +SET (CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS_INIT} $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker.") + + +IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) +# default build type is none + IF(NOT CMAKE_NO_BUILD_TYPE) + SET (CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE_INIT} CACHE STRING + "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.") + ENDIF(NOT CMAKE_NO_BUILD_TYPE) + + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING + "Flags used by the linker during debug builds.") + + SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT} CACHE STRING + "Flags used by the linker during release minsize builds.") + + SET (CMAKE_EXE_LINKER_FLAGS_RELEASE ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING + "Flags used by the linker during release builds.") + + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO + ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING + "Flags used by the linker during Release with Debug Info builds.") + + SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT} CACHE STRING + "Flags used by the linker during debug builds.") + + SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL ${CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT} + CACHE STRING + "Flags used by the linker during release minsize builds.") + + SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE ${CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT} CACHE STRING + "Flags used by the linker during release builds.") + + SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO + ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING + "Flags used by the linker during Release with Debug Info builds.") + + SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG ${CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT} CACHE STRING + "Flags used by the linker during debug builds.") + + SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL ${CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT} + CACHE STRING + "Flags used by the linker during release minsize builds.") + + SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE ${CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT} CACHE STRING + "Flags used by the linker during release builds.") + + SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO + ${CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT} CACHE STRING + "Flags used by the linker during Release with Debug Info builds.") + +ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) +# shared linker flags +SET (CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS_INIT} $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker during the creation of dll's.") + +# module linker flags +SET (CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS_INIT} $ENV{LDFLAGS} + CACHE STRING "Flags used by the linker during the creation of modules.") + +SET(CMAKE_BUILD_TOOL ${CMAKE_MAKE_PROGRAM} CACHE INTERNAL + "What is the target build tool cmake is generating for.") + + +MARK_AS_ADVANCED( +CMAKE_BUILD_TOOL +CMAKE_VERBOSE_MAKEFILE + +CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO + +CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO + +CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO + +) + diff --git a/Modules/CMakeCompilerABI.h b/Modules/CMakeCompilerABI.h new file mode 100644 index 000000000..8980abb5a --- /dev/null +++ b/Modules/CMakeCompilerABI.h @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------*/ + +/* Size of a pointer-to-data in bytes. */ +#define SIZEOF_DPTR (sizeof(void*)) +const char info_sizeof_dptr[] = { + 'I', 'N', 'F', 'O', ':', 's', 'i', 'z', 'e', 'o', 'f', '_', 'd', 'p', 't', 'r', '[', + ('0' + ((SIZEOF_DPTR / 10)%10)), + ('0' + (SIZEOF_DPTR % 10)), + ']','\0'}; + +/*--------------------------------------------------------------------------*/ + +/* Application Binary Interface. */ +#if defined(__sgi) && defined(_ABIO32) +# define ABI_ID "ELF O32" +#elif defined(__sgi) && defined(_ABIN32) +# define ABI_ID "ELF N32" +#elif defined(__sgi) && defined(_ABI64) +# define ABI_ID "ELF 64" +#elif defined(__ELF__) +# define ABI_ID "ELF" +#endif + +#if defined(ABI_ID) +static char const info_abi[] = "INFO:abi[" ABI_ID "]"; +#endif diff --git a/Modules/CMakeConfigurableFile.in b/Modules/CMakeConfigurableFile.in new file mode 100644 index 000000000..4cf74a12b --- /dev/null +++ b/Modules/CMakeConfigurableFile.in @@ -0,0 +1,2 @@ +@CMAKE_CONFIGURABLE_FILE_CONTENT@ + diff --git a/Modules/CMakeDependentOption.cmake b/Modules/CMakeDependentOption.cmake new file mode 100644 index 000000000..2183191cd --- /dev/null +++ b/Modules/CMakeDependentOption.cmake @@ -0,0 +1,37 @@ +# - Macro to provide an option dependent on other options. +# This macro presents an option to the user only if a set of other +# conditions are true. When the option is not presented a default +# value is used, but any value set by the user is preserved for when +# the option is presented again. +# Example invocation: +# CMAKE_DEPENDENT_OPTION(USE_FOO "Use Foo" ON +# "USE_BAR;NOT USE_ZOT" OFF) +# If USE_BAR is true and USE_ZOT is false, this provides an option called +# USE_FOO that defaults to ON. Otherwise, it sets USE_FOO to OFF. If +# 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. +MACRO(CMAKE_DEPENDENT_OPTION option doc default depends force) + IF(${option}_ISSET MATCHES "^${option}_ISSET$") + SET(${option}_AVAILABLE 1) + FOREACH(d ${depends}) + STRING(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}") + IF(${CMAKE_DEPENDENT_OPTION_DEP}) + ELSE(${CMAKE_DEPENDENT_OPTION_DEP}) + SET(${option}_AVAILABLE 0) + ENDIF(${CMAKE_DEPENDENT_OPTION_DEP}) + ENDFOREACH(d) + IF(${option}_AVAILABLE) + OPTION(${option} "${doc}" "${default}") + SET(${option} "${${option}}" CACHE BOOL "${doc}" FORCE) + ELSE(${option}_AVAILABLE) + IF(${option} MATCHES "^${option}$") + ELSE(${option} MATCHES "^${option}$") + SET(${option} "${${option}}" CACHE INTERNAL "${doc}") + ENDIF(${option} MATCHES "^${option}$") + SET(${option} ${force}) + ENDIF(${option}_AVAILABLE) + ELSE(${option}_ISSET MATCHES "^${option}_ISSET$") + SET(${option} "${${option}_ISSET}") + ENDIF(${option}_ISSET MATCHES "^${option}_ISSET$") +ENDMACRO(CMAKE_DEPENDENT_OPTION) diff --git a/Modules/CMakeDetermineASM-ATTCompiler.cmake b/Modules/CMakeDetermineASM-ATTCompiler.cmake new file mode 100644 index 000000000..71e98c289 --- /dev/null +++ b/Modules/CMakeDetermineASM-ATTCompiler.cmake @@ -0,0 +1,6 @@ +# determine the compiler to use for ASM using AT&T syntax + +SET(ASM_DIALECT "-ATT") +SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT ${_CMAKE_TOOLCHAIN_PREFIX}gas ${_CMAKE_TOOLCHAIN_PREFIX}as) +INCLUDE(CMakeDetermineASMCompiler) +SET(ASM_DIALECT) diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake new file mode 100644 index 000000000..44bd234d8 --- /dev/null +++ b/Modules/CMakeDetermineASMCompiler.cmake @@ -0,0 +1,77 @@ +# determine the compiler to use for ASM programs + +IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) + # prefer the environment variable ASM + IF($ENV{ASM${ASM_DIALECT}} MATCHES ".+") + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT "$ENV{ASM${ASM_DIALECT}}") + ENDIF($ENV{ASM${ASM_DIALECT}} MATCHES ".+") + + # finally list compilers to try + IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT}) + ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}as ${_CMAKE_TOOLCHAIN_PREFIX}gas) + ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_INIT) + + # Find the compiler. + IF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) + FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "Assembler" NO_DEFAULT_PATH) + ENDIF (_CMAKE_USER_CXX_COMPILER_PATH OR _CMAKE_USER_C_COMPILER_PATH) + FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER_LIST} DOC "Assembler") + +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 + # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE + # + # if a compiler was specified by the user but without path, + # now try to find it with the full path + # if it is found, force it into the cache, + # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" + GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH) + IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH) + FIND_PROGRAM(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH NAMES ${CMAKE_ASM${ASM_DIALECT}_COMPILER}) + MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH) + IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER ${CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH} CACHE FILEPATH "Assembler" FORCE) + ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_WITH_PATH) + ENDIF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH) +ENDIF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER) +MARK_AS_ADVANCED(CMAKE_ASM${ASM_DIALECT}_COMPILER) + +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 +# the other tools of the toolchain usually have the same prefix +IF (NOT _CMAKE_TOOLCHAIN_PREFIX) + GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME_WE) + IF (COMPILER_BASENAME MATCHES "^(.+-)g?as") + STRING(REGEX REPLACE "^(.+-)g?as" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}") + ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?as") +ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX) + +INCLUDE(CMakeFindBinUtils) + +SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR "ASM") + +IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) + MESSAGE(STATUS "Found assembler: ${CMAKE_ASM${ASM_DIALECT}_COMPILER}") +ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) + MESSAGE(STATUS "Didn't find assembler") +ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER) + + +SET(_CMAKE_ASM_COMPILER "${CMAKE_ASM${ASM_DIALECT}_COMPILER}") +SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}") +SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}") + +# configure variables set in this file for fast reload later on +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY) + +SET(_CMAKE_ASM_COMPILER) +SET(_CMAKE_ASM_COMPILER_ARG1) +SET(_CMAKE_ASM_COMPILER_ENV_VAR) diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake new file mode 100644 index 000000000..ffe0703f0 --- /dev/null +++ b/Modules/CMakeDetermineCCompiler.cmake @@ -0,0 +1,149 @@ + +# determine the compiler to use for C programs +# NOTE, a generator may set CMAKE_C_COMPILER before +# loading this file to force a compiler. +# use environment variable CC first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator +# as a default compiler +# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used +# as prefix for the tools (e.g. arm-elf-gcc, arm-elf-ar etc.). This works +# currently with the GNU crosscompilers. +# +# Sets the following variables: +# CMAKE_C_COMPILER +# CMAKE_AR +# CMAKE_RANLIB +# CMAKE_COMPILER_IS_GNUCC +# +# If not already set before, it also sets +# _CMAKE_TOOLCHAIN_PREFIX + +IF(NOT CMAKE_C_COMPILER) + SET(CMAKE_CXX_COMPILER_INIT NOTFOUND) + + # prefer the environment variable CC + IF($ENV{CC} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_C_COMPILER_INIT $ENV{CC} PROGRAM PROGRAM_ARGS CMAKE_C_FLAGS_ENV_INIT) + IF(CMAKE_C_FLAGS_ENV_INIT) + SET(CMAKE_C_COMPILER_ARG1 "${CMAKE_C_FLAGS_ENV_INIT}" CACHE STRING "First argument to C compiler") + ENDIF(CMAKE_C_FLAGS_ENV_INIT) + IF(NOT EXISTS ${CMAKE_C_COMPILER_INIT}) + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CC:\n$ENV{CC}.") + ENDIF(NOT EXISTS ${CMAKE_C_COMPILER_INIT}) + ENDIF($ENV{CC} MATCHES ".+") + + # next try prefer the compiler specified by the generator + IF(CMAKE_GENERATOR_CC) + IF(NOT CMAKE_C_COMPILER_INIT) + SET(CMAKE_C_COMPILER_INIT ${CMAKE_GENERATOR_CC}) + ENDIF(NOT CMAKE_C_COMPILER_INIT) + ENDIF(CMAKE_GENERATOR_CC) + + # finally list compilers to try + IF(CMAKE_C_COMPILER_INIT) + SET(CMAKE_C_COMPILER_LIST ${CMAKE_C_COMPILER_INIT}) + ELSE(CMAKE_C_COMPILER_INIT) + SET(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}gcc ${_CMAKE_TOOLCHAIN_PREFIX}cc cl bcc xlc) + ENDIF(CMAKE_C_COMPILER_INIT) + + # Find the compiler. + IF (_CMAKE_USER_CXX_COMPILER_PATH) + FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} PATHS ${_CMAKE_USER_CXX_COMPILER_PATH} DOC "C compiler" NO_DEFAULT_PATH) + ENDIF (_CMAKE_USER_CXX_COMPILER_PATH) + FIND_PROGRAM(CMAKE_C_COMPILER NAMES ${CMAKE_C_COMPILER_LIST} DOC "C compiler") + + IF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) + SET(CMAKE_C_COMPILER "${CMAKE_C_COMPILER_INIT}" CACHE FILEPATH "C compiler" FORCE) + ENDIF(CMAKE_C_COMPILER_INIT AND NOT CMAKE_C_COMPILER) +ELSE(NOT CMAKE_C_COMPILER) + + # we only get here if CMAKE_C_COMPILER was specified using -D or a pre-made CMakeCache.txt + # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE + # if CMAKE_C_COMPILER is a list of length 2, use the first item as + # CMAKE_C_COMPILER and the 2nd one as CMAKE_C_COMPILER_ARG1 + + LIST(LENGTH CMAKE_C_COMPILER _CMAKE_C_COMPILER_LIST_LENGTH) + IF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2) + LIST(GET CMAKE_C_COMPILER 1 CMAKE_C_COMPILER_ARG1) + LIST(GET CMAKE_C_COMPILER 0 CMAKE_C_COMPILER) + ENDIF("${_CMAKE_C_COMPILER_LIST_LENGTH}" EQUAL 2) + + # if a compiler was specified by the user but without path, + # now try to find it with the full path + # if it is found, force it into the cache, + # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" + # if the C compiler already had a path, reuse it for searching the CXX compiler + GET_FILENAME_COMPONENT(_CMAKE_USER_C_COMPILER_PATH "${CMAKE_C_COMPILER}" PATH) + IF(NOT _CMAKE_USER_C_COMPILER_PATH) + FIND_PROGRAM(CMAKE_C_COMPILER_WITH_PATH NAMES ${CMAKE_C_COMPILER}) + MARK_AS_ADVANCED(CMAKE_C_COMPILER_WITH_PATH) + IF(CMAKE_C_COMPILER_WITH_PATH) + SET(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_WITH_PATH} CACHE STRING "C compiler" FORCE) + ENDIF(CMAKE_C_COMPILER_WITH_PATH) + ENDIF(NOT _CMAKE_USER_C_COMPILER_PATH) +ENDIF(NOT CMAKE_C_COMPILER) +MARK_AS_ADVANCED(CMAKE_C_COMPILER) + +IF (NOT _CMAKE_TOOLCHAIN_LOCATION) + GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_C_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 +# the other tools of the toolchain usually have the same prefix +IF (NOT _CMAKE_TOOLCHAIN_PREFIX) + GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME_WE) + IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc") + STRING(REGEX REPLACE "^(.+-)g?cc" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}") + ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc") +ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX) + + +# Build a small source file to identify the compiler. +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_C_COMPILER_ID_RUN 1) + SET(CMAKE_C_PLATFORM_ID "Windows") + + # TODO: Set the compiler id. It is probably MSVC but + # the user may be using an integrated Intel compiler. + # SET(CMAKE_C_COMPILER_ID "MSVC") +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + +IF(NOT CMAKE_C_COMPILER_ID_RUN) + SET(CMAKE_C_COMPILER_ID_RUN 1) + + # Each entry in this list is a set of extra flags to try + # adding to the compile line to see if it helps produce + # a valid identification file. + SET(CMAKE_C_COMPILER_ID_TEST_FLAGS + # Try compiling to an object file only. + "-c" + ) + + # Try to identify the compiler. + SET(CMAKE_C_COMPILER_ID) + FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in + CMAKE_C_COMPILER_ID_PLATFORM_CONTENT) + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) + CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c) + + # Set old compiler and platform id variables. + IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") + SET(CMAKE_COMPILER_IS_GNUCC 1) + ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") + IF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW") + SET(CMAKE_COMPILER_IS_MINGW 1) + ELSEIF("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin") + SET(CMAKE_COMPILER_IS_CYGWIN 1) + ENDIF("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW") +ENDIF(NOT CMAKE_C_COMPILER_ID_RUN) + +INCLUDE(CMakeFindBinUtils) + +# configure variables set in this file for fast reload later on +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in + "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCCompiler.cmake" + @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 + ) + +SET(CMAKE_C_COMPILER_ENV_VAR "CC") diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake new file mode 100644 index 000000000..b02403481 --- /dev/null +++ b/Modules/CMakeDetermineCXXCompiler.cmake @@ -0,0 +1,159 @@ + +# determine the compiler to use for C++ programs +# NOTE, a generator may set CMAKE_CXX_COMPILER before +# loading this file to force a compiler. +# use environment variable CXX first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_CXX which can be defined by a generator +# as a default compiler +# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used +# as prefix for the tools (e.g. arm-elf-g++, arm-elf-ar etc.) +# +# Sets the following variables: +# CMAKE_CXX_COMPILER +# CMAKE_COMPILER_IS_GNUCXX +# CMAKE_AR +# CMAKE_RANLIB +# +# If not already set before, it also sets +# _CMAKE_TOOLCHAIN_PREFIX + +IF(NOT CMAKE_CXX_COMPILER) + SET(CMAKE_CXX_COMPILER_INIT NOTFOUND) + + # prefer the environment variable CXX + IF($ENV{CXX} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_CXX_COMPILER_INIT $ENV{CXX} PROGRAM PROGRAM_ARGS CMAKE_CXX_FLAGS_ENV_INIT) + IF(CMAKE_CXX_FLAGS_ENV_INIT) + SET(CMAKE_CXX_COMPILER_ARG1 "${CMAKE_CXX_FLAGS_ENV_INIT}" CACHE STRING "First argument to CXX compiler") + ENDIF(CMAKE_CXX_FLAGS_ENV_INIT) + IF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT}) + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable CXX:\n$ENV{CXX}.\n${CMAKE_CXX_COMPILER_INIT}") + ENDIF(NOT EXISTS ${CMAKE_CXX_COMPILER_INIT}) + ENDIF($ENV{CXX} MATCHES ".+") + + # next prefer the generator specified compiler + IF(CMAKE_GENERATOR_CXX) + IF(NOT CMAKE_CXX_COMPILER_INIT) + SET(CMAKE_CXX_COMPILER_INIT ${CMAKE_GENERATOR_CXX}) + ENDIF(NOT CMAKE_CXX_COMPILER_INIT) + ENDIF(CMAKE_GENERATOR_CXX) + + # finally list compilers to try + IF(CMAKE_CXX_COMPILER_INIT) + SET(CMAKE_CXX_COMPILER_LIST ${CMAKE_CXX_COMPILER_INIT}) + ELSE(CMAKE_CXX_COMPILER_INIT) + SET(CMAKE_CXX_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ CC aCC cl bcc xlC) + ENDIF(CMAKE_CXX_COMPILER_INIT) + + # Find the compiler. + IF (_CMAKE_USER_C_COMPILER_PATH) + FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} PATHS ${_CMAKE_USER_C_COMPILER_PATH} DOC "C++ compiler" NO_DEFAULT_PATH) + ENDIF (_CMAKE_USER_C_COMPILER_PATH) + FIND_PROGRAM(CMAKE_CXX_COMPILER NAMES ${CMAKE_CXX_COMPILER_LIST} DOC "C++ compiler") + + IF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER) + SET(CMAKE_CXX_COMPILER "${CMAKE_CXX_COMPILER_INIT}" CACHE FILEPATH "C++ compiler" FORCE) + ENDIF(CMAKE_CXX_COMPILER_INIT AND NOT CMAKE_CXX_COMPILER) +ELSE(NOT CMAKE_CXX_COMPILER) + +# we only get here if CMAKE_CXX_COMPILER was specified using -D or a pre-made CMakeCache.txt +# (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE +# +# if CMAKE_CXX_COMPILER is a list of length 2, use the first item as +# CMAKE_CXX_COMPILER and the 2nd one as CMAKE_CXX_COMPILER_ARG1 + + LIST(LENGTH CMAKE_CXX_COMPILER _CMAKE_CXX_COMPILER_LIST_LENGTH) + IF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2) + LIST(GET CMAKE_CXX_COMPILER 1 CMAKE_CXX_COMPILER_ARG1) + LIST(GET CMAKE_CXX_COMPILER 0 CMAKE_CXX_COMPILER) + ENDIF("${_CMAKE_CXX_COMPILER_LIST_LENGTH}" EQUAL 2) + +# if a compiler was specified by the user but without path, +# now try to find it with the full path +# if it is found, force it into the cache, +# if not, don't overwrite the setting (which was given by the user) with "NOTFOUND" +# if the CXX compiler already had a path, reuse it for searching the C compiler + GET_FILENAME_COMPONENT(_CMAKE_USER_CXX_COMPILER_PATH "${CMAKE_CXX_COMPILER}" PATH) + IF(NOT _CMAKE_USER_CXX_COMPILER_PATH) + FIND_PROGRAM(CMAKE_CXX_COMPILER_WITH_PATH NAMES ${CMAKE_CXX_COMPILER}) + MARK_AS_ADVANCED(CMAKE_CXX_COMPILER_WITH_PATH) + IF(CMAKE_CXX_COMPILER_WITH_PATH) + SET(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_WITH_PATH} CACHE STRING "CXX compiler" FORCE) + ENDIF(CMAKE_CXX_COMPILER_WITH_PATH) + ENDIF(NOT _CMAKE_USER_CXX_COMPILER_PATH) +ENDIF(NOT CMAKE_CXX_COMPILER) +MARK_AS_ADVANCED(CMAKE_CXX_COMPILER) + +IF (NOT _CMAKE_TOOLCHAIN_LOCATION) + GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_CXX_COMPILER}" PATH) +ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION) + +# if we have a g++ cross compiler, they have usually some prefix, like +# e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++ +# the other tools of the toolchain usually have the same prefix +IF (NOT _CMAKE_TOOLCHAIN_PREFIX) + GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME_WE) + IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+") + STRING(REGEX REPLACE "^(.+-)[gc]\\+\\+" "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}") + ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+") +ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX) + +# This block was used before the compiler was identified by building a +# source file. Unless g++ crashes when building a small C++ +# executable this should no longer be needed. +# +# The g++ that comes with BeOS 5 segfaults if you run "g++ -E" +# ("gcc -E" is fine), which throws up a system dialog box that hangs cmake +# until the user clicks "OK"...so for now, we just assume it's g++. +# IF(BEOS) +# SET(CMAKE_COMPILER_IS_GNUCXX 1) +# SET(CMAKE_COMPILER_IS_GNUCXX_RUN 1) +# ENDIF(BEOS) + +# Build a small source file to identify the compiler. +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_CXX_COMPILER_ID_RUN 1) + SET(CMAKE_CXX_PLATFORM_ID "Windows") + + # TODO: Set the compiler id. It is probably MSVC but + # the user may be using an integrated Intel compiler. + # SET(CMAKE_CXX_COMPILER_ID "MSVC") +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") +IF(NOT CMAKE_CXX_COMPILER_ID_RUN) + SET(CMAKE_CXX_COMPILER_ID_RUN 1) + + # Each entry in this list is a set of extra flags to try + # adding to the compile line to see if it helps produce + # a valid identification file. + SET(CMAKE_CXX_COMPILER_ID_TEST_FLAGS + # Try compiling to an object file only. + "-c" + ) + + # Try to identify the compiler. + SET(CMAKE_CXX_COMPILER_ID) + FILE(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in + CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT) + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) + CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp) + + # Set old compiler and platform id variables. + IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + IF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW") + SET(CMAKE_COMPILER_IS_MINGW 1) + ELSEIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin") + SET(CMAKE_COMPILER_IS_CYGWIN 1) + ENDIF("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW") +ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN) + +INCLUDE(CMakeFindBinUtils) + +# configure all variables set in this file +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake + @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 + ) + +SET(CMAKE_CXX_COMPILER_ENV_VAR "CXX") diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake new file mode 100644 index 000000000..3fd06a957 --- /dev/null +++ b/Modules/CMakeDetermineCompilerABI.cmake @@ -0,0 +1,49 @@ + +# 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. + +FUNCTION(CMAKE_DETERMINE_COMPILER_ABI lang src) + IF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED) + MESSAGE(STATUS "Detecting ${lang} compiler ABI info") + + # Compile the ABI identification source. + SET(BIN "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeDetermineCompilerABI_${lang}.bin") + TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED + ${CMAKE_BINARY_DIR} ${src} + OUTPUT_VARIABLE OUTPUT + COPY_FILE "${BIN}" + ) + + # Load the resulting information strings. + IF(CMAKE_DETERMINE_${lang}_ABI_COMPILED) + MESSAGE(STATUS "Detecting ${lang} compiler ABI info - done") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") + FILE(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[") + FOREACH(info ${ABI_STRINGS}) + IF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*") + STRING(REGEX REPLACE ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*" "\\1" ABI_SIZEOF_DPTR "${info}") + ENDIF("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*") + IF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*") + STRING(REGEX REPLACE ".*INFO:abi\\[([^]]*)\\].*" "\\1" ABI_NAME "${info}") + ENDIF("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*") + ENDFOREACH(info) + + IF(ABI_SIZEOF_DPTR) + SET(CMAKE_${lang}_SIZEOF_DATA_PTR "${ABI_SIZEOF_DPTR}" PARENT_SCOPE) + SET(CMAKE_SIZEOF_VOID_P "${ABI_SIZEOF_DPTR}" PARENT_SCOPE) + ENDIF(ABI_SIZEOF_DPTR) + + IF(ABI_NAME) + SET(CMAKE_${lang}_COMPILER_ABI "${ABI_NAME}" PARENT_SCOPE) + SET(CMAKE_INTERNAL_PLATFORM_ABI "${ABI_NAME}" PARENT_SCOPE) + ENDIF(ABI_NAME) + + ELSE(CMAKE_DETERMINE_${lang}_ABI_COMPILED) + MESSAGE(STATUS "Detecting ${lang} compiler ABI info - failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Detecting ${lang} compiler ABI info failed to compile with the following output:\n${OUTPUT}\n\n") + ENDIF(CMAKE_DETERMINE_${lang}_ABI_COMPILED) + ENDIF(NOT DEFINED CMAKE_DETERMINE_${lang}_ABI_COMPILED) +ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ABI) diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake new file mode 100644 index 000000000..dfbaefbb7 --- /dev/null +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -0,0 +1,225 @@ + +# 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__COMPILER_ID and CMAKE__PLATFORM_ID + +FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) + # Make sure the compiler arguments are clean. + STRING(STRIP "${CMAKE_${lang}_COMPILER_ARG1}" CMAKE_${lang}_COMPILER_ID_ARG1) + + # Make sure user-specified compiler flags are used. + IF(CMAKE_${lang}_FLAGS) + SET(CMAKE_${lang}_COMPILER_ID_FLAGS ${CMAKE_${lang}_FLAGS}) + ELSE(CMAKE_${lang}_FLAGS) + SET(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}}) + ENDIF(CMAKE_${lang}_FLAGS) + STRING(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}") + + # Compute the directory in which to run the test. + SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang}) + + # Try building with no extra flags and then try each set + # of helper flags. Stop when the compiler is identified. + FOREACH(flags "" ${CMAKE_${lang}_COMPILER_ID_TEST_FLAGS}) + IF(NOT CMAKE_${lang}_COMPILER_ID) + CMAKE_DETERMINE_COMPILER_ID_BUILD("${lang}" "${flags}" "${src}") + FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES}) + CMAKE_DETERMINE_COMPILER_ID_CHECK("${lang}" "${CMAKE_${lang}_COMPILER_ID_DIR}/${file}" "${src}") + ENDFOREACH(file) + ENDIF(NOT CMAKE_${lang}_COMPILER_ID) + ENDFOREACH(flags) + + # if the format is unknown after all files have been checked, put "Unknown" in the cache + IF(NOT CMAKE_EXECUTABLE_FORMAT) + SET(CMAKE_EXECUTABLE_FORMAT "Unknown" CACHE INTERNAL "Executable file format") + ENDIF(NOT CMAKE_EXECUTABLE_FORMAT) + + # Display the final identification result. + IF(CMAKE_${lang}_COMPILER_ID) + MESSAGE(STATUS "The ${lang} compiler identification is " + "${CMAKE_${lang}_COMPILER_ID}") + ELSE(CMAKE_${lang}_COMPILER_ID) + MESSAGE(STATUS "The ${lang} compiler identification is unknown") + ENDIF(CMAKE_${lang}_COMPILER_ID) + + SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) + SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) +ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID) + +#----------------------------------------------------------------------------- +# Function to write the compiler id source file. +FUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE lang src) + FILE(READ ${CMAKE_ROOT}/Modules/${src}.in ID_CONTENT_IN) + STRING(CONFIGURE "${ID_CONTENT_IN}" ID_CONTENT_OUT @ONLY) + FILE(WRITE ${CMAKE_${lang}_COMPILER_ID_DIR}/${src} "${ID_CONTENT_OUT}") +ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_WRITE) + +#----------------------------------------------------------------------------- +# Function to build the compiler id source file and look for output +# files. +FUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src) + # Create a clean working directory. + FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR}) + FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR}) + CMAKE_DETERMINE_COMPILER_ID_WRITE("${lang}" "${src}") + + # Construct a description of this test case. + SET(COMPILER_DESCRIPTION + "Compiler: ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_ARG1} +Build flags: ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} +Id flags: ${testflags} +") + + # Compile the compiler identification source. + IF(COMMAND EXECUTE_PROCESS) + EXECUTE_PROCESS( + COMMAND ${CMAKE_${lang}_COMPILER} + ${CMAKE_${lang}_COMPILER_ID_ARG1} + ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} + ${testflags} + "${src}" + WORKING_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR} + OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT + ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT + RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT + ) + ELSE(COMMAND EXECUTE_PROCESS) + EXEC_PROGRAM( + ${CMAKE_${lang}_COMPILER} ${CMAKE_${lang}_COMPILER_ID_DIR} + ARGS ${CMAKE_${lang}_COMPILER_ID_ARG1} + ${CMAKE_${lang}_COMPILER_ID_FLAGS_LIST} + ${testflags} + \"${src}\" + OUTPUT_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT + RETURN_VALUE CMAKE_${lang}_COMPILER_ID_RESULT + ) + ENDIF(COMMAND EXECUTE_PROCESS) + + # Check the result of compilation. + IF(CMAKE_${lang}_COMPILER_ID_RESULT) + # Compilation failed. + SET(MSG + "Compiling the ${lang} compiler identification source file \"${src}\" failed. +${COMPILER_DESCRIPTION} +The output was: +${CMAKE_${lang}_COMPILER_ID_RESULT} +${CMAKE_${lang}_COMPILER_ID_OUTPUT} + +") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}") + #IF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL) + # MESSAGE(FATAL_ERROR "${MSG}") + #ENDIF(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL) + + # No output files should be inspected. + SET(COMPILER_${lang}_PRODUCED_FILES) + ELSE(CMAKE_${lang}_COMPILER_ID_RESULT) + # Compilation succeeded. + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Compiling the ${lang} compiler identification source file \"${src}\" succeeded. +${COMPILER_DESCRIPTION} +The output was: +${CMAKE_${lang}_COMPILER_ID_RESULT} +${CMAKE_${lang}_COMPILER_ID_OUTPUT} + +") + + # Find the executable produced by the compiler, try all files in the + # binary dir. + FILE(GLOB COMPILER_${lang}_PRODUCED_FILES + RELATIVE ${CMAKE_${lang}_COMPILER_ID_DIR} + ${CMAKE_${lang}_COMPILER_ID_DIR}/*) + LIST(REMOVE_ITEM COMPILER_${lang}_PRODUCED_FILES "${src}") + FOREACH(file ${COMPILER_${lang}_PRODUCED_FILES}) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Compilation of the ${lang} compiler identification source \"" + "${src}\" produced \"${file}\"\n\n") + ENDFOREACH(file) + + IF(NOT COMPILER_${lang}_PRODUCED_FILES) + # No executable was found. + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Compilation of the ${lang} compiler identification source \"" + "${src}\" did not produce an executable in \"" + "${CMAKE_${lang}_COMPILER_ID_DIR}\".\n\n") + ENDIF(NOT COMPILER_${lang}_PRODUCED_FILES) + ENDIF(CMAKE_${lang}_COMPILER_ID_RESULT) + + # Return the files produced by the compilation. + SET(COMPILER_${lang}_PRODUCED_FILES "${COMPILER_${lang}_PRODUCED_FILES}" PARENT_SCOPE) +ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_BUILD lang testflags src) + +#----------------------------------------------------------------------------- +# Function to extract the compiler id from an executable. +FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) + # Look for a compiler id if not yet known. + IF(NOT CMAKE_${lang}_COMPILER_ID) + # Read the compiler identification string from the executable file. + SET(COMPILER_ID) + SET(PLATFORM_ID) + FILE(STRINGS ${file} + CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:") + SET(HAVE_COMPILER_TWICE 0) + FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS}) + IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*") + IF(COMPILER_ID) + SET(COMPILER_ID_TWICE 1) + ENDIF(COMPILER_ID) + STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1" + COMPILER_ID "${info}") + ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*") + IF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*") + STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1" + PLATFORM_ID "${info}") + ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*") + ENDFOREACH(info) + + # Check if a valid compiler and platform were found. + IF(COMPILER_ID AND NOT COMPILER_ID_TWICE) + SET(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") + SET(CMAKE_${lang}_PLATFORM_ID "${PLATFORM_ID}") + ENDIF(COMPILER_ID AND NOT COMPILER_ID_TWICE) + + # Check the compiler identification string. + IF(CMAKE_${lang}_COMPILER_ID) + # The compiler identification was found. + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "The ${lang} compiler identification is ${CMAKE_${lang}_COMPILER_ID}, found in \"" + "${file}\"\n\n") + ELSE(CMAKE_${lang}_COMPILER_ID) + # The compiler identification could not be found. + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "The ${lang} compiler identification could not be found in \"" + "${file}\"\n\n") + ENDIF(CMAKE_${lang}_COMPILER_ID) + ENDIF(NOT CMAKE_${lang}_COMPILER_ID) + + # try to figure out the executable format: ELF, COFF, Mach-O + IF(NOT CMAKE_EXECUTABLE_FORMAT) + FILE(READ ${file} CMAKE_EXECUTABLE_MAGIC LIMIT 4 HEX) + + # ELF files start with 0x7f"ELF" + IF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46") + SET(CMAKE_EXECUTABLE_FORMAT "ELF" CACHE INTERNAL "Executable file format") + ENDIF("${CMAKE_EXECUTABLE_MAGIC}" STREQUAL "7f454c46") + +# # COFF (.exe) files start with "MZ" +# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....") +# SET(CMAKE_EXECUTABLE_FORMAT "COFF" CACHE STRING "Executable file format") +# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "4d5a....") +# +# # Mach-O files start with CAFEBABE or FEEDFACE, according to http://radio.weblogs.com/0100490/2003/01/28.html +# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe") +# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format") +# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "cafebabe") +# IF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface") +# SET(CMAKE_EXECUTABLE_FORMAT "MACHO" CACHE STRING "Executable file format") +# ENDIF("${CMAKE_EXECUTABLE_MAGIC}" MATCHES "feedface") + + ENDIF(NOT CMAKE_EXECUTABLE_FORMAT) + + # Return the information extracted. + SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) + SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) + SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE) +ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang) diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake new file mode 100755 index 000000000..defb5a7f8 --- /dev/null +++ b/Modules/CMakeDetermineFortranCompiler.cmake @@ -0,0 +1,144 @@ + +# determine the compiler to use for Fortran programs +# NOTE, a generator may set CMAKE_Fortran_COMPILER before +# loading this file to force a compiler. +# use environment variable FC first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_FC which can be defined by a generator +# as a default compiler + +IF(NOT CMAKE_Fortran_COMPILER) + # prefer the environment variable CC + IF($ENV{FC} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_Fortran_COMPILER_INIT $ENV{FC} PROGRAM PROGRAM_ARGS CMAKE_Fortran_FLAGS_ENV_INIT) + IF(CMAKE_Fortran_FLAGS_ENV_INIT) + SET(CMAKE_Fortran_COMPILER_ARG1 "${CMAKE_Fortran_FLAGS_ENV_INIT}" CACHE STRING "First argument to Fortran compiler") + ENDIF(CMAKE_Fortran_FLAGS_ENV_INIT) + IF(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) + ELSE(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable FC:\n$ENV{FC}.") + ENDIF(EXISTS ${CMAKE_Fortran_COMPILER_INIT}) + ENDIF($ENV{FC} MATCHES ".+") + + # next try prefer the compiler specified by the generator + IF(CMAKE_GENERATOR_FC) + IF(NOT CMAKE_Fortran_COMPILER_INIT) + SET(CMAKE_Fortran_COMPILER_INIT ${CMAKE_GENERATOR_FC}) + ENDIF(NOT CMAKE_Fortran_COMPILER_INIT) + ENDIF(CMAKE_GENERATOR_FC) + + # finally list compilers to try + IF(CMAKE_Fortran_COMPILER_INIT) + SET(CMAKE_Fortran_COMPILER_LIST ${CMAKE_Fortran_COMPILER_INIT}) + ELSE(CMAKE_Fortran_COMPILER_INIT) + # Known compilers: + # f77/f90/f95: generic compiler names + # g77: GNU Fortran 77 compiler + # gfortran: putative GNU Fortran 95+ compiler (in progress) + # fort77: native F77 compiler under HP-UX (and some older Crays) + # frt: Fujitsu F77 compiler + # pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers + # xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers + # lf95: Lahey-Fujitsu F95 compiler + # fl32: Microsoft Fortran 77 "PowerStation" compiler + # af77: Apogee F77 compiler for Intergraph hardware running CLIX + # epcf90: "Edinburgh Portable Compiler" F90 + # fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha + # ifc: Intel Fortran 95 compiler for Linux/x86 + # efc: Intel Fortran 95 compiler for IA64 + # + # The order is 95 or newer compilers first, then 90, + # then 77 or older compilers, gnu is always last in the group, + # so if you paid for a compiler it is picked by default. + # NOTE for testing purposes this list is DUPLICATED in + # CMake/Source/CMakeLists.txt, IF YOU CHANGE THIS LIST, + # PLEASE UPDATE THAT FILE AS WELL! + SET(CMAKE_Fortran_COMPILER_LIST + ifort ifc efc f95 pgf95 lf95 xlf95 fort gfortran g95 f90 + pgf90 xlf90 epcf90 fort77 frt pgf77 xlf fl32 af77 g77 f77 + ) + ENDIF(CMAKE_Fortran_COMPILER_INIT) + + # Find the compiler. + FIND_PROGRAM(CMAKE_Fortran_COMPILER NAMES ${CMAKE_Fortran_COMPILER_LIST} DOC "Fortran compiler") + IF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) + SET(CMAKE_Fortran_COMPILER "${CMAKE_Fortran_COMPILER_INIT}" CACHE FILEPATH "Fortran compiler" FORCE) + ENDIF(CMAKE_Fortran_COMPILER_INIT AND NOT CMAKE_Fortran_COMPILER) +ENDIF(NOT CMAKE_Fortran_COMPILER) + +MARK_AS_ADVANCED(CMAKE_Fortran_COMPILER) + +# Build a small source file to identify the compiler. +IF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + SET(CMAKE_Fortran_COMPILER_ID_RUN 1) + SET(CMAKE_Fortran_PLATFORM_ID "Windows") + + # TODO: Set the compiler id. It is probably MSVC but + # the user may be using an integrated Intel compiler. + # SET(CMAKE_Fortran_COMPILER_ID "MSVC") +ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio") + +IF(NOT CMAKE_Fortran_COMPILER_ID_RUN) + SET(CMAKE_Fortran_COMPILER_ID_RUN 1) + + # Each entry in this list is a set of extra flags to try + # adding to the compile line to see if it helps produce + # a valid identification executable. + SET(CMAKE_Fortran_COMPILER_ID_TEST_FLAGS + # Try compiling to an object file only. + "-c" + + # Intel on windows does not preprocess by default. + "-fpp" + ) + + # Try to identify the compiler. + SET(CMAKE_Fortran_COMPILER_ID) + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake) + CMAKE_DETERMINE_COMPILER_ID(Fortran FFLAGS CMakeFortranCompilerId.F90) + + # Fall back to old is-GNU test. + IF(NOT CMAKE_Fortran_COMPILER_ID) + EXEC_PROGRAM(${CMAKE_Fortran_COMPILER} + ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN) + IF(NOT CMAKE_COMPILER_RETURN) + IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" ) + SET(CMAKE_Fortran_COMPILER_ID "GNU") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran compiler is GNU succeeded with " + "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n") + ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" ) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran compiler is GNU failed with " + "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n") + ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" ) + IF(NOT CMAKE_Fortran_PLATFORM_ID) + IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" ) + SET(CMAKE_Fortran_PLATFORM_ID "MinGW") + ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" ) + IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" ) + SET(CMAKE_Fortran_PLATFORM_ID "Cygwin") + ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" ) + ENDIF(NOT CMAKE_Fortran_PLATFORM_ID) + ENDIF(NOT CMAKE_COMPILER_RETURN) + ENDIF(NOT CMAKE_Fortran_COMPILER_ID) + + # Set old compiler and platform id variables. + IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") + SET(CMAKE_COMPILER_IS_GNUG77 1) + ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU") + IF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW") + SET(CMAKE_COMPILER_IS_MINGW 1) + ELSEIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "Cygwin") + SET(CMAKE_COMPILER_IS_CYGWIN 1) + ENDIF("${CMAKE_Fortran_PLATFORM_ID}" MATCHES "MinGW") +ENDIF(NOT CMAKE_Fortran_COMPILER_ID_RUN) + +INCLUDE(CMakeFindBinUtils) + +# configure variables set in this file for fast reload later on +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeFortranCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeFortranCompiler.cmake + @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 + ) +SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC") diff --git a/Modules/CMakeDetermineJavaCompiler.cmake b/Modules/CMakeDetermineJavaCompiler.cmake new file mode 100644 index 000000000..f221447d1 --- /dev/null +++ b/Modules/CMakeDetermineJavaCompiler.cmake @@ -0,0 +1,85 @@ + +# determine the compiler to use for Java programs +# NOTE, a generator may set CMAKE_Java_COMPILER before +# loading this file to force a compiler. + +IF(NOT CMAKE_Java_COMPILER) + # prefer the environment variable CC + IF($ENV{JAVA_COMPILER} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_Java_COMPILER_INIT $ENV{JAVA_COMPILER} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) + IF(CMAKE_Java_FLAGS_ENV_INIT) + SET(CMAKE_Java_COMPILER_ARG1 "${CMAKE_Java_FLAGS_ENV_INIT}" CACHE STRING "First argument to Java compiler") + ENDIF(CMAKE_Java_FLAGS_ENV_INIT) + IF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_COMPILER:\n$ENV{JAVA_COMPILER}.") + ENDIF(NOT EXISTS ${CMAKE_Java_COMPILER_INIT}) + ENDIF($ENV{JAVA_COMPILER} MATCHES ".+") + + IF($ENV{JAVA_RUNTIME} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_Java_RUNTIME_INIT $ENV{JAVA_RUNTIME} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) + IF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_RUNTIME:\n$ENV{JAVA_RUNTIME}.") + ENDIF(NOT EXISTS ${CMAKE_Java_RUNTIME_INIT}) + ENDIF($ENV{JAVA_RUNTIME} MATCHES ".+") + + IF($ENV{JAVA_ARCHIVE} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_Java_ARCHIVE_INIT $ENV{JAVA_ARCHIVE} PROGRAM PROGRAM_ARGS CMAKE_Java_FLAGS_ENV_INIT) + IF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) + MESSAGE(SEND_ERROR "Could not find compiler set in environment variable JAVA_ARCHIVE:\n$ENV{JAVA_ARCHIVE}.") + ENDIF(NOT EXISTS ${CMAKE_Java_ARCHIVE_INIT}) + ENDIF($ENV{JAVA_ARCHIVE} MATCHES ".+") + + 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" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin" + /usr/bin + /usr/lib/java/bin + /usr/share/java/bin + /usr/local/bin + /usr/local/java/bin + /usr/java/j2sdk1.4.2_04 + /usr/lib/j2sdk1.4-sun/bin + /usr/lib/j2sdk1.5-sun/bin + ) + # if no compiler has been specified yet, then look for one + IF(CMAKE_Java_COMPILER_INIT) + SET(CMAKE_Java_COMPILER ${CMAKE_Java_COMPILER_INIT} CACHE PATH "Java Compiler") + ELSE(CMAKE_Java_COMPILER_INIT) + FIND_PROGRAM(CMAKE_Java_COMPILER + NAMES javac + PATHS ${Java_BIN_PATH} + ) + ENDIF(CMAKE_Java_COMPILER_INIT) + + # if no runtime has been specified yet, then look for one + IF(CMAKE_Java_RUNTIME_INIT) + SET(CMAKE_Java_RUNTIME ${CMAKE_Java_RUNTIME_INIT} CACHE PATH "Java Compiler") + ELSE(CMAKE_Java_RUNTIME_INIT) + FIND_PROGRAM(CMAKE_Java_RUNTIME + NAMES java + PATHS ${Java_BIN_PATH} + ) + ENDIF(CMAKE_Java_RUNTIME_INIT) + + # if no archive has been specified yet, then look for one + IF(CMAKE_Java_ARCHIVE_INIT) + SET(CMAKE_Java_ARCHIVE ${CMAKE_Java_ARCHIVE_INIT} CACHE PATH "Java Compiler") + ELSE(CMAKE_Java_ARCHIVE_INIT) + FIND_PROGRAM(CMAKE_Java_ARCHIVE + NAMES jar + PATHS ${Java_BIN_PATH} + ) + ENDIF(CMAKE_Java_ARCHIVE_INIT) +ENDIF(NOT CMAKE_Java_COMPILER) +MARK_AS_ADVANCED(CMAKE_Java_COMPILER) + +# configure variables set in this file for fast reload later on +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeJavaCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeJavaCompiler.cmake IMMEDIATE @ONLY) +SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER") diff --git a/Modules/CMakeDetermineRCCompiler.cmake b/Modules/CMakeDetermineRCCompiler.cmake new file mode 100755 index 000000000..1bea04ae1 --- /dev/null +++ b/Modules/CMakeDetermineRCCompiler.cmake @@ -0,0 +1,48 @@ + +# determine the compiler to use for C programs +# NOTE, a generator may set CMAKE_C_COMPILER before +# loading this file to force a compiler. +# use environment variable CCC first if defined by user, next use +# the cmake variable CMAKE_GENERATOR_CC which can be defined by a generator +# as a default compiler +IF(NOT CMAKE_RC_COMPILER) + # prefer the environment variable CC + IF($ENV{RC} MATCHES ".+") + GET_FILENAME_COMPONENT(CMAKE_RC_COMPILER_INIT $ENV{RC} PROGRAM PROGRAM_ARGS CMAKE_RC_FLAGS_ENV_INIT) + IF(CMAKE_RC_FLAGS_ENV_INIT) + SET(CMAKE_RC_COMPILER_ARG1 "${CMAKE_RC_FLAGS_ENV_INIT}" CACHE STRING "First argument to RC compiler") + ENDIF(CMAKE_RC_FLAGS_ENV_INIT) + IF(EXISTS ${CMAKE_RC_COMPILER_INIT}) + ELSE(EXISTS ${CMAKE_RC_COMPILER_INIT}) + MESSAGE(FATAL_ERROR "Could not find compiler set in environment variable RC:\n$ENV{RC}.") + ENDIF(EXISTS ${CMAKE_RC_COMPILER_INIT}) + ENDIF($ENV{RC} MATCHES ".+") + + # next try prefer the compiler specified by the generator + IF(CMAKE_GENERATOR_RC) + IF(NOT CMAKE_RC_COMPILER_INIT) + SET(CMAKE_RC_COMPILER_INIT ${CMAKE_GENERATOR_RC}) + ENDIF(NOT CMAKE_RC_COMPILER_INIT) + ENDIF(CMAKE_GENERATOR_RC) + + # finally list compilers to try + IF(CMAKE_RC_COMPILER_INIT) + SET(CMAKE_RC_COMPILER_LIST ${CMAKE_RC_COMPILER_INIT}) + ELSE(CMAKE_RC_COMPILER_INIT) + SET(CMAKE_RC_COMPILER_LIST rc) + ENDIF(CMAKE_RC_COMPILER_INIT) + + # Find the compiler. + FIND_PROGRAM(CMAKE_RC_COMPILER NAMES ${CMAKE_RC_COMPILER_LIST} DOC "RC compiler") + IF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) + SET(CMAKE_RC_COMPILER "${CMAKE_RC_COMPILER_INIT}" CACHE FILEPATH "RC compiler" FORCE) + ENDIF(CMAKE_RC_COMPILER_INIT AND NOT CMAKE_RC_COMPILER) +ENDIF(NOT CMAKE_RC_COMPILER) + +MARK_AS_ADVANCED(CMAKE_RC_COMPILER) + + +# configure variables set in this file for fast reload later on +CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeRCCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeRCCompiler.cmake IMMEDIATE) +SET(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake new file mode 100644 index 000000000..aa3b59b38 --- /dev/null +++ b/Modules/CMakeDetermineSystem.cmake @@ -0,0 +1,154 @@ + +# 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 +# CMAKE_SYSTEM - ${CMAKE_SYSTEM}-${CMAKE_SYSTEM_VERSION}, for windows: ${CMAKE_SYSTEM} +# +# Expected uname -s output: +# +# AIX AIX +# BSD/OS BSD/OS +# FreeBSD FreeBSD +# HP-UX HP-UX +# IRIX IRIX +# Linux Linux +# NetBSD NetBSD +# OpenBSD OpenBSD +# OFS/1 (Digital Unix) OSF1 +# SCO OpenServer 5 SCO_SV +# SCO UnixWare 7 UnixWare +# SCO UnixWare (pre release 7) UNIX_SV +# SCO XENIX Xenix +# Solaris SunOS +# SunOS SunOS +# Tru64 Tru64 +# Ultrix ULTRIX +# cygwin CYGWIN_NT-5.1 +# MacOSX Darwin + + +# find out on which system cmake runs +IF(CMAKE_HOST_UNIX) + FIND_PROGRAM(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin ) + IF(CMAKE_UNAME) + EXEC_PROGRAM(uname ARGS -s OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_NAME) + EXEC_PROGRAM(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION) + IF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + RETURN_VALUE val) + ELSE(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") + EXEC_PROGRAM(uname ARGS -p OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + RETURN_VALUE val) + IF("${val}" GREATER 0) + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + RETURN_VALUE val) + ENDIF("${val}" GREATER 0) + ENDIF(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux") + # check the return of the last uname -m or -p + IF("${val}" GREATER 0) + SET(CMAKE_HOST_SYSTEM_PROCESSOR "unknown") + ENDIF("${val}" GREATER 0) + SET(CMAKE_UNAME ${CMAKE_UNAME} CACHE INTERNAL "uname command") + # processor may have double quote in the name, and that needs to be removed + STRING(REGEX REPLACE "\"" "" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") + STRING(REGEX REPLACE "/" "_" CMAKE_HOST_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") + ENDIF(CMAKE_UNAME) +ELSE(CMAKE_HOST_UNIX) + IF(CMAKE_HOST_WIN32) + SET (CMAKE_HOST_SYSTEM_NAME "Windows") + SET (CMAKE_HOST_SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITECTURE}") + ENDIF(CMAKE_HOST_WIN32) +ENDIF(CMAKE_HOST_UNIX) + +# if a toolchain file is used, the user wants to cross compile. +# in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_* +# variables around so they can be used in CMakeLists.txt. +# In all other cases, the host and target platform are the same. +IF(CMAKE_TOOLCHAIN_FILE) + # at first try to load it as path relative to the directory from which cmake has been run + INCLUDE("${CMAKE_BINARY_DIR}/${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE) + IF(NOT _INCLUDED_TOOLCHAIN_FILE) + # if the file isn't found there, check the default locations + INCLUDE("${CMAKE_TOOLCHAIN_FILE}" OPTIONAL RESULT_VARIABLE _INCLUDED_TOOLCHAIN_FILE) + ENDIF(NOT _INCLUDED_TOOLCHAIN_FILE) + + IF(_INCLUDED_TOOLCHAIN_FILE) + SET(CMAKE_TOOLCHAIN_FILE "${_INCLUDED_TOOLCHAIN_FILE}" CACHE FILEPATH "The CMake toolchain file" FORCE) + ELSE(_INCLUDED_TOOLCHAIN_FILE) + MESSAGE(FATAL_ERROR "Could not find toolchain file: ${CMAKE_TOOLCHAIN_FILE}") + SET(CMAKE_TOOLCHAIN_FILE "NOTFOUND" CACHE FILEPATH "The CMake toolchain file" FORCE) + ENDIF(_INCLUDED_TOOLCHAIN_FILE) +ENDIF(CMAKE_TOOLCHAIN_FILE) + + +# if CMAKE_SYSTEM_NAME is here already set, either it comes from a toolchain file +# or it was set via -DCMAKE_SYSTEM_NAME=... +# if that's the case, assume we are crosscompiling +IF(CMAKE_SYSTEM_NAME) + IF(NOT DEFINED CMAKE_CROSSCOMPILING) + SET(CMAKE_CROSSCOMPILING TRUE) + ENDIF(NOT DEFINED CMAKE_CROSSCOMPILING) + SET(PRESET_CMAKE_SYSTEM_NAME TRUE) +ELSE(CMAKE_SYSTEM_NAME) + SET(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}") + SET(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") + SET(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") + SET(CMAKE_CROSSCOMPILING FALSE) + SET(PRESET_CMAKE_SYSTEM_NAME FALSE) +ENDIF(CMAKE_SYSTEM_NAME) + + +MACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX) + IF(NOT ${_PREFIX}_NAME) + SET(${_PREFIX}_NAME "UnknownOS") + ENDIF(NOT ${_PREFIX}_NAME) + + # fix for BSD/OS , remove the / + IF(${_PREFIX}_NAME MATCHES BSD.OS) + SET(${_PREFIX}_NAME BSDOS) + ENDIF(${_PREFIX}_NAME MATCHES BSD.OS) + + # fix for CYGWIN which has windows version in it + IF(${_PREFIX}_NAME MATCHES CYGWIN) + SET(${_PREFIX}_NAME CYGWIN) + ENDIF(${_PREFIX}_NAME MATCHES CYGWIN) + + # set CMAKE_SYSTEM to the CMAKE_SYSTEM_NAME + SET(${_PREFIX} ${${_PREFIX}_NAME}) + # if there is a CMAKE_SYSTEM_VERSION then add a -${CMAKE_SYSTEM_VERSION} + IF(${_PREFIX}_VERSION) + SET(${_PREFIX} ${${_PREFIX}}-${${_PREFIX}_VERSION}) + ENDIF(${_PREFIX}_VERSION) + +ENDMACRO(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX) + +ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM) +ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_HOST_SYSTEM) + +# this file is also executed from cpack, then we don't need to generate these files +# in this case there is no CMAKE_BINARY_DIR +IF(CMAKE_BINARY_DIR) + # write entry to the log file + IF(PRESET_CMAKE_SYSTEM_NAME) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "The target system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "The host system is: ${CMAKE_HOST_SYSTEM_NAME} - ${CMAKE_HOST_SYSTEM_VERSION} - ${CMAKE_HOST_SYSTEM_PROCESSOR}\n") + ELSE(PRESET_CMAKE_SYSTEM_NAME) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n") + ENDIF(PRESET_CMAKE_SYSTEM_NAME) + + # if a toolchain file is used, it needs to be included in the configured file, + # so settings done there are also available if they don't go in the cache and in TRY_COMPILE() + SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED) + IF(DEFINED CMAKE_TOOLCHAIN_FILE) + SET(INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED "INCLUDE(\"${CMAKE_TOOLCHAIN_FILE}\")") + ENDIF(DEFINED CMAKE_TOOLCHAIN_FILE) + + # configure variables set in this file for fast reload, the template file is defined at the top of this file + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeSystem.cmake + IMMEDIATE @ONLY) + +ENDIF(CMAKE_BINARY_DIR) diff --git a/Modules/CMakeExportBuildSettings.cmake b/Modules/CMakeExportBuildSettings.cmake new file mode 100644 index 000000000..0c71efa03 --- /dev/null +++ b/Modules/CMakeExportBuildSettings.cmake @@ -0,0 +1,12 @@ +# - export build settings from a project. +# CMAKE_EXPORT_BUILD_SETTINGS(SETTINGS_FILE) +# macro defined to export the build settings for use by another project. +# SETTINGS_FILE - the file into which the settings are to be stored. +MACRO(CMAKE_EXPORT_BUILD_SETTINGS SETTINGS_FILE) + IF(${SETTINGS_FILE} MATCHES ".+") + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeBuildSettings.cmake.in + ${SETTINGS_FILE} @ONLY IMMEDIATE) + ELSE(${SETTINGS_FILE} MATCHES ".+") + MESSAGE(SEND_ERROR "CMAKE_EXPORT_BUILD_SETTINGS called with no argument.") + ENDIF(${SETTINGS_FILE} MATCHES ".+") +ENDMACRO(CMAKE_EXPORT_BUILD_SETTINGS) diff --git a/Modules/CMakeFindBinUtils.cmake b/Modules/CMakeFindBinUtils.cmake new file mode 100644 index 000000000..9d76e75e9 --- /dev/null +++ b/Modules/CMakeFindBinUtils.cmake @@ -0,0 +1,76 @@ + +# search for additional tools required for C/C++ (and other languages ?) +# +# If the internal cmake variable _CMAKE_TOOLCHAIN_PREFIX is set, this is used +# as prefix for the tools (e.g. arm-elf-gcc etc.) +# If the cmake variable _CMAKE_TOOLCHAIN_LOCATION is set, the compiler is +# searched only there. The other tools are at first searched there, then +# also in the default locations. +# +# Sets the following variables: +# CMAKE_AR +# CMAKE_RANLIB +# CMAKE_LINKER +# CMAKE_STRIP +# CMAKE_INSTALL_NAME_TOOL + +# on UNIX, cygwin and mingw + + +# if it's the MS C/CXX compiler, search for link +IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") + + FIND_PROGRAM(CMAKE_LINKER NAMES link PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_LINKER NAMES link) + + MARK_AS_ADVANCED(CMAKE_LINKER) + +# in all other cases search for ar, ranlib, etc. +ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") + + FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_AR NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ar) + + FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_RANLIB NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ranlib) + IF(NOT CMAKE_RANLIB) + SET(CMAKE_RANLIB : CACHE INTERNAL "noop for ranlib") + ENDIF(NOT CMAKE_RANLIB) + + FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_STRIP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}strip) + + FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_LINKER NAMES ${_CMAKE_TOOLCHAIN_PREFIX}ld) + + FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_NM NAMES ${_CMAKE_TOOLCHAIN_PREFIX}nm) + + FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_OBJDUMP NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objdump) + + FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_OBJCOPY NAMES ${_CMAKE_TOOLCHAIN_PREFIX}objcopy) + + MARK_AS_ADVANCED(CMAKE_AR CMAKE_RANLIB CMAKE_STRIP CMAKE_LINKER CMAKE_NM CMAKE_OBJDUMP CMAKE_OBJCOPY) + +ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC" + OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio") + + +# on Apple there really should be install_name_tool +IF(APPLE) + FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool PATHS ${_CMAKE_TOOLCHAIN_LOCATION} NO_DEFAULT_PATH) + FIND_PROGRAM(CMAKE_INSTALL_NAME_TOOL NAMES install_name_tool) + + IF(NOT CMAKE_INSTALL_NAME_TOOL) + MESSAGE(FATAL_ERROR "Could not find install_name_tool, please check your installation.") + ENDIF(NOT CMAKE_INSTALL_NAME_TOOL) + + MARK_AS_ADVANCED(CMAKE_INSTALL_NAME_TOOL) +ENDIF(APPLE) diff --git a/Modules/CMakeFindFrameworks.cmake b/Modules/CMakeFindFrameworks.cmake new file mode 100644 index 000000000..3a47eb0b1 --- /dev/null +++ b/Modules/CMakeFindFrameworks.cmake @@ -0,0 +1,19 @@ +# - helper module to find OSX frameworks + +IF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED) + SET(CMAKE_FIND_FRAMEWORKS_INCLUDED 1) + MACRO(CMAKE_FIND_FRAMEWORKS fwk) + SET(${fwk}_FRAMEWORKS) + IF(APPLE) + FOREACH(dir + ~/Library/Frameworks/${fwk}.framework + /Library/Frameworks/${fwk}.framework + /System/Library/Frameworks/${fwk}.framework + /Network/Library/Frameworks/${fwk}.framework) + IF(EXISTS ${dir}) + SET(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir}) + ENDIF(EXISTS ${dir}) + ENDFOREACH(dir) + ENDIF(APPLE) + ENDMACRO(CMAKE_FIND_FRAMEWORKS) +ENDIF(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED) diff --git a/Modules/CMakeFindWMake.cmake b/Modules/CMakeFindWMake.cmake new file mode 100755 index 000000000..4353d6515 --- /dev/null +++ b/Modules/CMakeFindWMake.cmake @@ -0,0 +1,3 @@ +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 new file mode 100755 index 000000000..417edc5f7 --- /dev/null +++ b/Modules/CMakeFindXCode.cmake @@ -0,0 +1,6 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES xcodebuild + PATHS + /usr/bin + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) diff --git a/Modules/CMakeForceCompiler.cmake b/Modules/CMakeForceCompiler.cmake new file mode 100644 index 000000000..c47301190 --- /dev/null +++ b/Modules/CMakeForceCompiler.cmake @@ -0,0 +1,49 @@ +# This module defines macros intended for use by cross-compiling +# toolchain files when CMake is not able to automatically detect the +# compiler identification. +# +# Macro CMAKE_FORCE_C_COMPILER has the following signature: +# CMAKE_FORCE_C_COMPILER( ) +# It sets CMAKE_C_COMPILER to the given compiler and the cmake +# internal variable CMAKE_C_COMPILER_ID to the given compiler-id. +# It also bypasses the check for working compiler and basic compiler +# information tests. +# +# Macro CMAKE_FORCE_CXX_COMPILER has the following signature: +# CMAKE_FORCE_CXX_COMPILER( ) +# It sets CMAKE_CXX_COMPILER to the given compiler and the cmake +# internal variable CMAKE_CXX_COMPILER_ID to the given compiler-id. +# It also bypasses the check for working compiler and basic compiler +# information tests. +# +# So a simple toolchain file could look like this: +# INCLUDE (CMakeForceCompiler) +# SET(CMAKE_SYSTEM_NAME Generic) +# CMAKE_FORCE_C_COMPILER (chc12 MetrowerksHicross) +# CMAKE_FORCE_CXX_COMPILER (chc12 MetrowerksHicross) + +MACRO(CMAKE_FORCE_C_COMPILER compiler id) + SET(CMAKE_C_COMPILER "${compiler}") + SET(CMAKE_C_COMPILER_ID_RUN TRUE) + SET(CMAKE_C_COMPILER_ID ${id}) + SET(CMAKE_C_COMPILER_WORKS TRUE) + SET(CMAKE_C_COMPILER_FORCED TRUE) + + # Set old compiler id variables. + IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") + SET(CMAKE_COMPILER_IS_GNUCC 1) + ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") +ENDMACRO(CMAKE_FORCE_C_COMPILER) + +MACRO(CMAKE_FORCE_CXX_COMPILER compiler id) + SET(CMAKE_CXX_COMPILER "${compiler}") + SET(CMAKE_CXX_COMPILER_ID_RUN TRUE) + SET(CMAKE_CXX_COMPILER_ID ${id}) + SET(CMAKE_CXX_COMPILER_WORKS TRUE) + SET(CMAKE_CXX_COMPILER_FORCED TRUE) + + # Set old compiler id variables. + IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + ENDIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") +ENDMACRO(CMAKE_FORCE_CXX_COMPILER) diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in new file mode 100755 index 000000000..65cfda7a9 --- /dev/null +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -0,0 +1,29 @@ +SET(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@") +SET(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@") +SET(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") +SET(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") +SET(CMAKE_AR "@CMAKE_AR@") +SET(CMAKE_RANLIB "@CMAKE_RANLIB@") +SET(CMAKE_COMPILER_IS_GNUG77 @CMAKE_COMPILER_IS_GNUG77@) +SET(CMAKE_Fortran_COMPILER_LOADED 1) +SET(CMAKE_COMPILER_IS_MINGW @CMAKE_COMPILER_IS_MINGW@) +SET(CMAKE_COMPILER_IS_CYGWIN @CMAKE_COMPILER_IS_CYGWIN@) +IF(CMAKE_COMPILER_IS_CYGWIN) + SET(CYGWIN 1) + SET(UNIX 1) +ENDIF(CMAKE_COMPILER_IS_CYGWIN) + +SET(CMAKE_Fortran_COMPILER_ENV_VAR "FC") + +IF(CMAKE_COMPILER_IS_MINGW) + SET(MINGW 1) +ENDIF(CMAKE_COMPILER_IS_MINGW) +SET(CMAKE_Fortran_COMPILER_ID_RUN 1) +SET(CMAKE_Fortran_SOURCE_FILE_EXTENSIONS f;F;f77;F77;f90;F90;for;For;FOR;f95;F95) +SET(CMAKE_Fortran_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +SET(CMAKE_Fortran_LINKER_PREFERENCE 20) +IF(UNIX) + SET(CMAKE_Fortran_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_Fortran_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) diff --git a/Modules/CMakeFortranCompilerId.F90.in b/Modules/CMakeFortranCompilerId.F90.in new file mode 100644 index 000000000..870c204fc --- /dev/null +++ b/Modules/CMakeFortranCompilerId.F90.in @@ -0,0 +1,78 @@ +PROGRAM CMakeFortranCompilerId +! Identify the compiler +#if defined(__INTEL_COMPILER) || defined(__ICC) + PRINT *, 'INFO:compiler[Intel]' +#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95) + PRINT *, 'INFO:compiler[SunPro]' +#elif defined(__GNUC__) + PRINT *, 'INFO:compiler[GNU]' +#elif defined(__IBM__) || defined(__IBMC__) + PRINT *, 'INFO:compiler[VisualAge]' +#elif defined(_COMPILER_VERSION) + PRINT *, 'INFO:compiler[MIPSpro]' +! This compiler is either not known or is too old to define an +! identification macro. Try to identify the platform and guess that +! it is the native compiler. +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:compiler[VisualAge]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:compiler[MIPSpro]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:compiler[HP]' +#else + PRINT *, 'INFO:compiler[]' +#endif + +! Identify the platform +#if defined(__linux) || defined(__linux__) || defined(linux) + PRINT *, 'INFO:platform[Linux]' +#elif defined(__CYGWIN__) + PRINT *, 'INFO:platform[Cygwin]' +#elif defined(__MINGW32__) + PRINT *, 'INFO:platform[MinGW]' +#elif defined(__APPLE__) + PRINT *, 'INFO:platform[Darwin]' +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) + PRINT *, 'INFO:platform[Windows]' +#elif defined(__FreeBSD__) || defined(__FreeBSD) + PRINT *, 'INFO:platform[FreeBSD]' +#elif defined(__NetBSD__) || defined(__NetBSD) + PRINT *, 'INFO:platform[NetBSD]' +#elif defined(__OpenBSD__) || defined(__OPENBSD) + PRINT *, 'INFO:platform[OpenBSD]' +#elif defined(__sun) || defined(sun) + PRINT *, 'INFO:platform[SunOS]' +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) + PRINT *, 'INFO:platform[AIX]' +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) + PRINT *, 'INFO:platform[IRIX]' +#elif defined(__hpux) || defined(__hpux__) + PRINT *, 'INFO:platform[HP-UX]' +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) + PRINT *, 'INFO:platform[BeOS]' +#elif defined(__QNX__) || defined(__QNXNTO__) + PRINT *, 'INFO:platform[QNX]' +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) + PRINT *, 'INFO:platform[Tru64]' +#elif defined(__riscos) || defined(__riscos__) + PRINT *, 'INFO:platform[RISCos]' +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) + PRINT *, 'INFO:platform[SINIX]' +#elif defined(__UNIX_SV__) + PRINT *, 'INFO:platform[UNIX_SV]' +#elif defined(__bsdos__) + PRINT *, 'INFO:platform[BSDOS]' +#elif defined(_MPRAS) || defined(MPRAS) + PRINT *, 'INFO:platform[MP-RAS]' +#elif defined(__osf) || defined(__osf__) + PRINT *, 'INFO:platform[OSF1]' +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) + PRINT *, 'INFO:platform[SCO_SV]' +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) + PRINT *, 'INFO:platform[ULTRIX]' +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) + PRINT *, 'INFO:platform[Xenix]' +#else + PRINT *, 'INFO:platform[]' +#endif +END PROGRAM diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake new file mode 100755 index 000000000..d760de39a --- /dev/null +++ b/Modules/CMakeFortranInformation.cmake @@ -0,0 +1,182 @@ + +# 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. + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER} NAME_WE) +# since the gnu compiler has several names force g++ +IF(CMAKE_COMPILER_IS_GNUG77) + SET(CMAKE_BASE_NAME g77) +ENDIF(CMAKE_COMPILER_IS_GNUG77) +IF(CMAKE_Fortran_COMPILER_ID) + IF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake) + SET(CMAKE_BASE_NAME ${CMAKE_Fortran_COMPILER_ID}-Fortran) + ENDIF(EXISTS ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_ID}-Fortran.cmake) +ENDIF(CMAKE_Fortran_COMPILER_ID) +SET(CMAKE_SYSTEM_AND_Fortran_COMPILER_INFO_FILE + ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) + +# 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. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_Fortran) + + +# Fortran needs cmake to do a requires step during its build process to +# catch any modules +SET(CMAKE_NEEDS_REQUIRES_STEP_Fortran_FLAG 1) + +# Create a set of shared library variable specific to Fortran +# For 90% of the systems, these are the same flags as the C versions +# so if these are not set just copy the flags from the c version +IF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) + SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) + SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_Fortran_FLAGS) + +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) + SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS}) +ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG) + +IF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP) + +IF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) + SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG}) +ENDIF(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG) + +# repeat for modules +IF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) + SET(CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_CREATE_Fortran_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) + SET(CMAKE_SHARED_MODULE_Fortran_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS}) +ENDIF(NOT CMAKE_SHARED_MODULE_Fortran_FLAGS) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG) + SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG) + +IF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP) + SET(CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP}) +ENDIF(NOT CMAKE_SHARED_MODULE_RUNTIME_Fortran_FLAG_SEP) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) + SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG) + +IF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) + SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP}) +ENDIF(NOT CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG_SEP) + +IF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) + SET(CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_Fortran_FLAG}) +ENDIF(NOT CMAKE_EXECUTABLE_RPATH_LINK_Fortran_FLAG) + +IF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH) + SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH}) +ENDIF(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_Fortran_WITH_RUNTIME_PATH) + +IF(NOT CMAKE_INCLUDE_FLAG_Fortran) + SET(CMAKE_INCLUDE_FLAG_Fortran ${CMAKE_INCLUDE_FLAG_C}) +ENDIF(NOT CMAKE_INCLUDE_FLAG_Fortran) + +IF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran) + SET(CMAKE_INCLUDE_FLAG_SEP_Fortran ${CMAKE_INCLUDE_FLAG_SEP_C}) +ENDIF(NOT CMAKE_INCLUDE_FLAG_SEP_Fortran) + +SET(CMAKE_VERBOSE_MAKEFILE FALSE CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.") + +SET(CMAKE_Fortran_FLAGS_INIT "$ENV{FFLAGS} ${CMAKE_Fortran_FLAGS_INIT}") +# avoid just having a space as the initial value for the cache +IF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ") + SET(CMAKE_Fortran_FLAGS_INIT) +ENDIF(CMAKE_Fortran_FLAGS_INIT STREQUAL " ") +SET (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS_INIT}" CACHE STRING + "Flags for Fortran compiler.") + +INCLUDE(CMakeCommonLanguageInclude) + +# now define the following rule variables +# CMAKE_Fortran_CREATE_SHARED_LIBRARY +# CMAKE_Fortran_CREATE_SHARED_MODULE +# CMAKE_Fortran_CREATE_STATIC_LIBRARY +# CMAKE_Fortran_COMPILE_OBJECT +# CMAKE_Fortran_LINK_EXECUTABLE + +# create a Fortran shared library +IF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY) + SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + " -o ") +ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_LIBRARY) + +# create a Fortran shared module just copy the shared library rule +IF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE) + SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}) +ENDIF(NOT CMAKE_Fortran_CREATE_SHARED_MODULE) + +# create a Fortran static library +IF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY) + SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY + " cr " + " ") +ENDIF(NOT CMAKE_Fortran_CREATE_STATIC_LIBRARY) + +# compile a Fortran file into an object file +IF(NOT CMAKE_Fortran_COMPILE_OBJECT) + SET(CMAKE_Fortran_COMPILE_OBJECT + " -o -c ") +ENDIF(NOT CMAKE_Fortran_COMPILE_OBJECT) + +# link a fortran program +IF(NOT CMAKE_Fortran_LINK_EXECUTABLE) + SET(CMAKE_Fortran_LINK_EXECUTABLE + " -o ") +ENDIF(NOT CMAKE_Fortran_LINK_EXECUTABLE) + +IF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT) + SET(CMAKE_Fortran_STANDARD_LIBRARIES "${CMAKE_Fortran_STANDARD_LIBRARIES_INIT}" + CACHE STRING "Libraries linked by defalut with all Fortran applications.") + MARK_AS_ADVANCED(CMAKE_Fortran_STANDARD_LIBRARIES) +ENDIF(CMAKE_Fortran_STANDARD_LIBRARIES_INIT) + +IF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + SET (CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG_INIT}" CACHE STRING + "Flags used by the compiler during debug builds.") + SET (CMAKE_Fortran_FLAGS_MINSIZEREL "${CMAKE_Fortran_FLAGS_MINSIZEREL_INIT}" CACHE STRING + "Flags used by the compiler during release minsize builds.") + SET (CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE_INIT}" CACHE STRING + "Flags used by the compiler during release builds (/MD /Ob1 /Oi /Ot /Oy /Gs will produce slightly less optimized but smaller files).") + SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO "${CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING + "Flags used by the compiler during Release with Debug Info builds.") + +ENDIF(NOT CMAKE_NOT_USING_CONFIG_FLAGS) + +MARK_AS_ADVANCED( +CMAKE_Fortran_FLAGS +CMAKE_Fortran_FLAGS_DEBUG +CMAKE_Fortran_FLAGS_MINSIZEREL +CMAKE_Fortran_FLAGS_RELEASE +CMAKE_Fortran_FLAGS_RELWITHDEBINFO) + +# set this variable so we can avoid loading this more than once. +SET(CMAKE_Fortran_INFORMATION_LOADED 1) diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake new file mode 100755 index 000000000..d66e809a9 --- /dev/null +++ b/Modules/CMakeGenericSystem.cmake @@ -0,0 +1,80 @@ +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 +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty +SET(CMAKE_INCLUDE_FLAG_C "-I") # -I +SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty +SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/" +SET(CMAKE_LINK_LIBRARY_FLAG "-l") + +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so +SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe +SET(CMAKE_DL_LIBS "dl") + +SET(CMAKE_FIND_LIBRARY_PREFIXES "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a") + +# basically all general purpose OSs support shared libs +SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE) + +SET (CMAKE_SKIP_RPATH "NO" CACHE BOOL + "If set, runtime paths are not added when using shared libraries.") + +SET(CMAKE_INIT_VALUE FALSE) +IF(CMAKE_GENERATOR MATCHES "KDevelop3") + SET(CMAKE_INIT_VALUE TRUE) +ENDIF(CMAKE_GENERATOR MATCHES "KDevelop3") +SET(CMAKE_VERBOSE_MAKEFILE ${CMAKE_INIT_VALUE} CACHE BOOL "If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make. This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.") + +IF(CMAKE_GENERATOR MATCHES "Makefiles") + SET(CMAKE_COLOR_MAKEFILE ON CACHE BOOL + "Enable/Disable color output during build." + ) + MARK_AS_ADVANCED(CMAKE_COLOR_MAKEFILE) +ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") + +# Set a variable to indicate whether the value of CMAKE_INSTALL_PREFIX +# was initialized by the block below. This is useful for user +# projects to change the default prefix while still allowing the +# command line to override it. +IF(NOT DEFINED CMAKE_INSTALL_PREFIX) + SET(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT 1) +ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX) + +# Choose a default install prefix for this platform. +IF(CMAKE_HOST_UNIX) + SET(CMAKE_INSTALL_PREFIX "/usr/local" + CACHE PATH "Install path prefix, prepended onto install directories.") +ELSE(CMAKE_HOST_UNIX) + IF("$ENV{ProgramFiles}" MATCHES "^$") + IF("$ENV{SystemDrive}" MATCHES "^$") + SET(CMAKE_GENERIC_PROGRAM_FILES "C:/Program Files") + ELSE("$ENV{SystemDrive}" MATCHES "^$") + SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{SystemDrive}/Program Files") + ENDIF("$ENV{SystemDrive}" MATCHES "^$") + ELSE("$ENV{ProgramFiles}" MATCHES "^$") + SET(CMAKE_GENERIC_PROGRAM_FILES "$ENV{ProgramFiles}") + ENDIF("$ENV{ProgramFiles}" MATCHES "^$") + SET(CMAKE_INSTALL_PREFIX + "${CMAKE_GENERIC_PROGRAM_FILES}/${PROJECT_NAME}" + CACHE PATH "Install path prefix, prepended onto install directories.") + SET(CMAKE_GENERIC_PROGRAM_FILES) + + # Make sure the prefix uses forward slashes. + STRING(REGEX REPLACE "\\\\" "/" + CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") +ENDIF(CMAKE_HOST_UNIX) + +MARK_AS_ADVANCED( + CMAKE_SKIP_RPATH + CMAKE_VERBOSE_MAKEFILE +) + +# always include the gcc compiler information +INCLUDE(Platform/gcc) diff --git a/Modules/CMakeImportBuildSettings.cmake b/Modules/CMakeImportBuildSettings.cmake new file mode 100644 index 000000000..cad78980b --- /dev/null +++ b/Modules/CMakeImportBuildSettings.cmake @@ -0,0 +1,250 @@ +# - import build settings from another project +# CMAKE_IMPORT_BUILD_SETTINGS(SETTINGS_FILE) +# macro defined to import the build settings from another project. +# SETTINGS_FILE is a file created by the other project's call to the +# CMAKE_EXPORT_BUILD_SETTINGS macro, see CMakeExportBuildSettings. +MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) + IF(${SETTINGS_FILE} MATCHES ".+") + # Load the settings. + INCLUDE(${SETTINGS_FILE}) + + # Check the CMake version that stored the settings. + IF(${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION} + GREATER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) + MESSAGE(SEND_ERROR + "${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using CMake " + "${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION}, " + "but this is CMake${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}. " + "Please upgrade CMake to a more recent version.") + ENDIF(${CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION}.${CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION} + GREATER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) + + # Check the build tool. + SET(CMAKE_BUILD_TOOL1 "") + IF(CMAKE_BUILD_TOOL) + GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL1 ${CMAKE_BUILD_TOOL} NAME_WE) + STRING(TOLOWER ${CMAKE_BUILD_TOOL1} CMAKE_BUILD_TOOL1) + ENDIF(CMAKE_BUILD_TOOL) + SET(CMAKE_BUILD_TOOL2 "") + IF(CMAKE_BUILD_SETTING_BUILD_TOOL) + GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL2 ${CMAKE_BUILD_SETTING_BUILD_TOOL} NAME_WE) + STRING(TOLOWER ${CMAKE_BUILD_TOOL2} CMAKE_BUILD_TOOL2) + ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL) + STRING(COMPARE NOTEQUAL "x${CMAKE_BUILD_TOOL1}" "x${CMAKE_BUILD_TOOL2}" + CMAKE_BUILD_TOOL_MISMATCH) + + IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$") + SET(CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO 1) + ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$") + IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^devenv$") + SET(CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO 1) + ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^devenv$") + + # Check the C++ compiler setting. If it is empty, the imported + # project is not a C++ project, and doesn't need a matching compiler. + IF(CMAKE_BUILD_SETTING_CXX_COMPILER) + IF(WIN32) + STRING(TOLOWER "x${CMAKE_CXX_COMPILER}" COMPARE_CXX_LOCAL) + STRING(TOLOWER "x${CMAKE_BUILD_SETTING_CXX_COMPILER}" COMPARE_CXX_REMOTE) + STRING(COMPARE NOTEQUAL "${COMPARE_CXX_LOCAL}" "${COMPARE_CXX_REMOTE}" + CMAKE_CXX_COMPILER_MISMATCH) + ELSE(WIN32) + STRING(COMPARE NOTEQUAL + "x${CMAKE_CXX_COMPILER}" "x${CMAKE_BUILD_SETTING_CXX_COMPILER}" + CMAKE_CXX_COMPILER_MISMATCH) + ENDIF(WIN32) + ENDIF(CMAKE_BUILD_SETTING_CXX_COMPILER) + + # Check the C build variation flags. + STRING(COMPARE NOTEQUAL + "x${CMAKE_C_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}" + CMAKE_C_FLAGS_DEBUG_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_C_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}" + CMAKE_C_FLAGS_RELEASE_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_C_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}" + CMAKE_C_FLAGS_MINSIZEREL_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_C_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}" + CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH) + + # Check the C++ build variation flags. + STRING(COMPARE NOTEQUAL + "x${CMAKE_CXX_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}" + CMAKE_CXX_FLAGS_DEBUG_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_CXX_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}" + CMAKE_CXX_FLAGS_RELEASE_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_CXX_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}" + CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH) + STRING(COMPARE NOTEQUAL + "x${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}" + CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH) + + # Check the build type. + SET(CMAKE_BUILD_TYPE_MISMATCH 0) + IF(WIN32) + IF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) + STRING(COMPARE NOTEQUAL + "x${CMAKE_BUILD_TYPE}" "x${CMAKE_BUILD_SETTING_BUILD_TYPE}" + CMAKE_BUILD_TYPE_MISMATCH) + ENDIF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) + ENDIF(WIN32) + + # Build tool must match on Windows. + IF(WIN32) + IF(CMAKE_BUILD_TOOL_MISMATCH) + MESSAGE(SEND_ERROR + "This project, ${PROJECT_NAME}, depends on the project " + "${CMAKE_BUILD_SETTING_PROJECT_NAME}. Unfortunately " + "${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using " + "\"${CMAKE_BUILD_TOOL2}\", but you are trying to build " + "${PROJECT_NAME} using \"${CMAKE_BUILD_TOOL1}\"." + "In order for this build to succeed, both projects must be " + "built with the same Generator. To change the Generator you " + "are using for the project ${PROJECT_NAME}, you must " + "delete the cache, and then rerun cmake and this " + "time select the same Generator that was used to build " + "${CMAKE_BUILD_SETTING_PROJECT_NAME}. If " + "${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using a " + "generator that you do not have (for example it was built " + "with Visual Studio 6 and you only have 7) then you will " + "need to select a different version of " + "${CMAKE_BUILD_SETTING_PROJECT_NAME} or rebuild " + "${CMAKE_BUILD_SETTING_PROJECT_NAME} with the correct " + "generator. ") + ENDIF(CMAKE_BUILD_TOOL_MISMATCH) + ENDIF(WIN32) + + # Enforce the C++ compiler setting. + # CMAKE_OVERRIDE_COMPILER_MISMATCH allow advanced user to override cmake detection of + # compiler mismatch between imported projects. Typical case on UNIX could be: + # 1. Compile a project with g++-3.3 while the imported project was configured + # using the 'c++' alias (which at the time meant g++-3.3) + # 2. This variable also becomes handy when the project your are importing has been + # compiled with a compiler you do not have access to, but offer a compatible ABI with + # yours. + # WARNING: Do not use this variable with C++ compiler with incompatible ABI + IF(CMAKE_CXX_COMPILER_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_CXX_COMPILER to " + "\"${CMAKE_BUILD_SETTING_CXX_COMPILER}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. This is required " + "because C++ projects must use the same compiler. " + "If this message appears for more than one imported project, " + "you have conflicting C++ compilers and will have to " + "re-build one of those projects. Was set to ${CMAKE_CXX_COMPILER}") + SET(CMAKE_CXX_COMPILER ${CMAKE_BUILD_SETTING_CXX_COMPILER} + CACHE STRING "C++ compiler imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_CXX_COMPILER_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + # Enforce the build type. + IF(CMAKE_BUILD_TYPE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_BUILD_TYPE to " + "\"${CMAKE_BUILD_SETTING_BUILD_TYPE}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. This is required " + "because projects must use the same compiler settings. " + "If this message appears for more than one imported project, " + "you have conflicting compiler settings and will have to " + "re-build one of those projects.") + SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_SETTING_BUILD_TYPE} + CACHE STRING "Build type imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_BUILD_TYPE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + # Enforce the C build variation flags. + + IF(CMAKE_C_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_DEBUG to " + "\"${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_C_FLAGS_DEBUG ${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG} + CACHE STRING "C DEBUG flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_C_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_C_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_RELEASE to " + "\"${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_C_FLAGS_RELEASE ${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE} + CACHE STRING "C RELEASE flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_C_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_C_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_MINSIZEREL to " + "\"${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_C_FLAGS_MINSIZEREL ${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL} + CACHE STRING "C MINSIZEREL flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_C_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_C_FLAGS_RELWITHDEBINFO to " + "\"${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO ${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO} + CACHE STRING "C RELWITHDEBINFO flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + # Enforce the C++ build variation flags. + + IF(CMAKE_CXX_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_DEBUG to " + "\"${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG} + CACHE STRING "C++ DEBUG flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_CXX_FLAGS_DEBUG_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_CXX_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_RELEASE to " + "\"${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_CXX_FLAGS_RELEASE ${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE} + CACHE STRING "C++ RELEASE flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_CXX_FLAGS_RELEASE_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_MINSIZEREL to " + "\"${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL} + CACHE STRING "C++ MINSIZEREL flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + MESSAGE("Warning: CMake is forcing CMAKE_CXX_FLAGS_RELWITHDEBINFO to " + "\"${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}\" to match that imported " + "from ${CMAKE_BUILD_SETTING_PROJECT_NAME}. " + "If this message appears for more than one imported project, " + "you have conflicting options and will have to " + "re-build one of those projects.") + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO} + CACHE STRING "C++ RELWITHDEBINFO flags imported from ${CMAKE_BUILD_SETTING_PROJECT_NAME}." FORCE) + ENDIF(CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH AND NOT CMAKE_OVERRIDE_COMPILER_MISMATCH) + + ELSE(${SETTINGS_FILE} MATCHES ".+") + MESSAGE(SEND_ERROR "CMAKE_IMPORT_BUILD_SETTINGS called with no argument.") + ENDIF(${SETTINGS_FILE} MATCHES ".+") +ENDMACRO(CMAKE_IMPORT_BUILD_SETTINGS) diff --git a/Modules/CMakeJavaCompiler.cmake.in b/Modules/CMakeJavaCompiler.cmake.in new file mode 100644 index 000000000..79c9288bc --- /dev/null +++ b/Modules/CMakeJavaCompiler.cmake.in @@ -0,0 +1,13 @@ +SET(CMAKE_Java_COMPILER "@CMAKE_Java_COMPILER@") +SET(CMAKE_Java_COMPILER_ARG1 "@CMAKE_Java_COMPILER_ARG1@") +SET(CMAKE_Java_RUNTIME "@CMAKE_Java_RUNTIME@") +SET(CMAKE_Java_ARCHIVE "@CMAKE_Java_ARCHIVE@") +SET(CMAKE_Java_COMPILER_LOADED 1) + +SET(CMAKE_Java_SOURCE_FILE_EXTENSIONS java) +SET(CMAKE_Java_LINKER_PREFERENCE 40) +SET(CMAKE_Java_OUTPUT_EXTENSION .class) +SET(CMAKE_Java_OUTPUT_EXTENSION_REPLACE 1) +SET(CMAKE_STATIC_LIBRARY_PREFIX_Java "") +SET(CMAKE_STATIC_LIBRARY_SUFFIX_Java ".jar") +SET(CMAKE_Java_COMPILER_ENV_VAR "JAVA_COMPILER") diff --git a/Modules/CMakeJavaInformation.cmake b/Modules/CMakeJavaInformation.cmake new file mode 100755 index 000000000..4febed4e5 --- /dev/null +++ b/Modules/CMakeJavaInformation.cmake @@ -0,0 +1,41 @@ +# 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. +# But, it should still be after the platform file so changes can +# be made to those values. + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE) + +IF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + INCLUDE(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX}) +ENDIF(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX) + +# this is a place holder if java needed flags for javac they would go here. +IF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY) +# IF(WIN32) +# SET(class_files_mask "*.class") +# ELSE(WIN32) + SET(class_files_mask ".") +# ENDIF(WIN32) + + SET(CMAKE_Java_CREATE_STATIC_LIBRARY + " -cf -C ${class_files_mask}") + # "${class_files_mask}" should really be "" but compling a *.java + # file can create more than one *.class file... +ENDIF(NOT CMAKE_Java_CREATE_STATIC_LIBRARY) + +# compile a Java file into an object file +IF(NOT CMAKE_Java_COMPILE_OBJECT) + SET(CMAKE_Java_COMPILE_OBJECT + " -d ") +ENDIF(NOT CMAKE_Java_COMPILE_OBJECT) + +# set java include flag option and the separator for multiple include paths +SET(CMAKE_INCLUDE_FLAG_Java "-classpath ") +IF(WIN32 AND NOT CYGWIN) + SET(CMAKE_INCLUDE_FLAG_SEP_Java ";") +ELSE(WIN32 AND NOT CYGWIN) + SET(CMAKE_INCLUDE_FLAG_SEP_Java ":") +ENDIF(WIN32 AND NOT CYGWIN) diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt new file mode 100644 index 000000000..4ce6118a1 --- /dev/null +++ b/Modules/CMakeLists.txt @@ -0,0 +1,12 @@ +# just install the modules +# new file added, force rerunning cmake + +SUBDIRS(Platform) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cmake$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cpp$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.cxx$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.in$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.c$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.h$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules .*\\.F90$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules readme\\.txt$) diff --git a/Modules/CMakeMSYSFindMake.cmake b/Modules/CMakeMSYSFindMake.cmake new file mode 100755 index 000000000..5a9a34293 --- /dev/null +++ b/Modules/CMakeMSYSFindMake.cmake @@ -0,0 +1,6 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM make + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MSYS-1.0_is1;Inno Setup: App Path]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\MinGW;InstallLocation]/bin" + c:/msys/1.0/bin /msys/1.0/bin) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) diff --git a/Modules/CMakeMinGWFindMake.cmake b/Modules/CMakeMinGWFindMake.cmake new file mode 100755 index 000000000..2ad029832 --- /dev/null +++ b/Modules/CMakeMinGWFindMake.cmake @@ -0,0 +1,10 @@ +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) +FIND_PROGRAM(CMAKE_SH sh.exe ) +IF(CMAKE_SH) + MESSAGE(FATAL_ERROR "sh.exe was found in your PATH, here:\n${CMAKE_SH}\nFor MinGW make to work correctly sh.exe must NOT be in your path.\nRun cmake from a shell that does not have sh.exe in your PATH.\nIf you want to use a UNIX shell, then use MSYS Makefiles.\n") + SET(CMAKE_MAKE_PROGRAM NOTFOUND) +ENDIF(CMAKE_SH) + +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM CMAKE_SH) diff --git a/Modules/CMakeNMakeFindMake.cmake b/Modules/CMakeNMakeFindMake.cmake new file mode 100755 index 000000000..13befca8f --- /dev/null +++ b/Modules/CMakeNMakeFindMake.cmake @@ -0,0 +1,3 @@ +SET (CMAKE_MAKE_PROGRAM "nmake" CACHE STRING + "Program used to build from makefiles.") +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in new file mode 100644 index 000000000..1f1fca6ff --- /dev/null +++ b/Modules/CMakePlatformId.h.in @@ -0,0 +1,83 @@ +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; diff --git a/Modules/CMakePrintSystemInformation.cmake b/Modules/CMakePrintSystemInformation.cmake new file mode 100644 index 000000000..2b9ecdae4 --- /dev/null +++ b/Modules/CMakePrintSystemInformation.cmake @@ -0,0 +1,33 @@ +# - print system information +# This file can be used for diagnostic purposes +# just include it in a project to see various internal CMake +# variables. + +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}") +MESSAGE("CMAKE_CXX_COMPILER is ${CMAKE_CXX_COMPILER}") + + +MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}") +MESSAGE("CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS is ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}") +MESSAGE("CMAKE_DL_LIBS is ${CMAKE_DL_LIBS}") +MESSAGE("CMAKE_SHARED_LIBRARY_PREFIX is ${CMAKE_SHARED_LIBRARY_PREFIX}") +MESSAGE("CMAKE_SHARED_LIBRARY_SUFFIX is ${CMAKE_SHARED_LIBRARY_SUFFIX}") +MESSAGE("CMAKE_COMPILER_IS_GNUGCC = ${CMAKE_COMPILER_IS_GNUGCC}") +MESSAGE("CMAKE_COMPILER_IS_GNUCXX = ${CMAKE_COMPILER_IS_GNUCXX}") + +MESSAGE("CMAKE_CXX_CREATE_SHARED_LIBRARY is ${CMAKE_CXX_CREATE_SHARED_LIBRARY}") +MESSAGE("CMAKE_CXX_CREATE_SHARED_MODULE is ${CMAKE_CXX_CREATE_SHARED_MODULE}") +MESSAGE("CMAKE_CXX_CREATE_STATIC_LIBRARY is ${CMAKE_CXX_CREATE_STATIC_LIBRARY}") +MESSAGE("CMAKE_CXX_COMPILE_OBJECT is ${CMAKE_CXX_COMPILE_OBJECT}") +MESSAGE("CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_CXX_LINK_EXECUTABLE}") + +MESSAGE("CMAKE_C_CREATE_SHARED_LIBRARY is ${CMAKE_C_CREATE_SHARED_LIBRARY}") +MESSAGE("CMAKE_C_CREATE_SHARED_MODULE is ${CMAKE_C_CREATE_SHARED_MODULE}") +MESSAGE("CMAKE_C_CREATE_STATIC_LIBRARY is ${CMAKE_C_CREATE_STATIC_LIBRARY}") +MESSAGE("CMAKE_C_COMPILE_OBJECT is ${CMAKE_C_COMPILE_OBJECT}") +MESSAGE("CMAKE_C_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}") + +MESSAGE("CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE}") +MESSAGE("CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE ${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE}") diff --git a/Modules/CMakeRCCompiler.cmake.in b/Modules/CMakeRCCompiler.cmake.in new file mode 100755 index 000000000..93bc8502e --- /dev/null +++ b/Modules/CMakeRCCompiler.cmake.in @@ -0,0 +1,6 @@ +SET(CMAKE_RC_COMPILER "@CMAKE_RC_COMPILER@") +SET(CMAKE_RC_COMPILER_ARG1 "@CMAKE_RC_COMPILER_ARG1@") +SET(CMAKE_RC_COMPILER_LOADED 1) +SET(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc) +SET(CMAKE_RC_OUTPUT_EXTENSION .res) +SET(CMAKE_RC_COMPILER_ENV_VAR "RC") diff --git a/Modules/CMakeRCInformation.cmake b/Modules/CMakeRCInformation.cmake new file mode 100755 index 000000000..dcef7ee1b --- /dev/null +++ b/Modules/CMakeRCInformation.cmake @@ -0,0 +1,33 @@ + +# 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. + +GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_RC_COMPILER} NAME_WE) +SET(CMAKE_SYSTEM_AND_RC_COMPILER_INFO_FILE + ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake) +INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL) + + +SET (CMAKE_RC_FLAGS "$ENV{RCFLAGS} ${CMAKE_RC_FLAGS_INIT}" CACHE STRING + "Flags for Fortran compiler.") + +# These are the only types of flags that should be passed to the rc +# command, if COMPILE_FLAGS is used on a target this will be used +# to filter out any other flags +SET(CMAKE_RC_FLAG_REGEX "^[-/](D|I)") + +# now define the following rule variables +# CMAKE_RC_COMPILE_OBJECT +SET(CMAKE_INCLUDE_FLAG_RC "-I") +# compile a Resource file into an object file +IF(NOT CMAKE_RC_COMPILE_OBJECT) + SET(CMAKE_RC_COMPILE_OBJECT + " /fo ") +ENDIF(NOT CMAKE_RC_COMPILE_OBJECT) + +MARK_AS_ADVANCED( +CMAKE_RC_FLAGS +) +# set this variable so we can avoid loading this more than once. +SET(CMAKE_RC_INFORMATION_LOADED 1) diff --git a/Modules/CMakeSystem.cmake.in b/Modules/CMakeSystem.cmake.in new file mode 100644 index 000000000..a9f3a552d --- /dev/null +++ b/Modules/CMakeSystem.cmake.in @@ -0,0 +1,15 @@ +@INCLUDE_CMAKE_TOOLCHAIN_FILE_IF_REQUIRED@ + +SET(CMAKE_SYSTEM "@CMAKE_SYSTEM@") +SET(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") +SET(CMAKE_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@") +SET(CMAKE_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@") + +SET(CMAKE_HOST_SYSTEM "@CMAKE_HOST_SYSTEM@") +SET(CMAKE_HOST_SYSTEM_NAME "@CMAKE_HOST_SYSTEM_NAME@") +SET(CMAKE_HOST_SYSTEM_VERSION "@CMAKE_HOST_SYSTEM_VERSION@") +SET(CMAKE_HOST_SYSTEM_PROCESSOR "@CMAKE_HOST_SYSTEM_PROCESSOR@") + +SET(CMAKE_CROSSCOMPILING "@CMAKE_CROSSCOMPILING@") + +SET(CMAKE_SYSTEM_LOADED 1) diff --git a/Modules/CMakeSystemSpecificInformation.cmake b/Modules/CMakeSystemSpecificInformation.cmake new file mode 100644 index 000000000..561f5e31e --- /dev/null +++ b/Modules/CMakeSystemSpecificInformation.cmake @@ -0,0 +1,50 @@ + +# 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. + +# before cmake 2.6 these variables were set in cmMakefile.cxx. This is still +# done to keep scripts and custom language and compiler modules working. +# But they are reset here and set again in the platform files for the target +# platform, so they can be used for testing the target platform instead +# of testing the host platform. +SET(APPLE ) +SET(UNIX ) +SET(CYGWIN ) +SET(WIN32 ) + + +# include Generic system information +INCLUDE(CMakeGenericSystem) + +# 2. now include SystemName.cmake file to set the system specific information +SET(CMAKE_SYSTEM_INFO_FILE Platform/${CMAKE_SYSTEM_NAME}) + +INCLUDE(${CMAKE_SYSTEM_INFO_FILE} OPTIONAL RESULT_VARIABLE _INCLUDED_SYSTEM_INFO_FILE) + +IF(NOT _INCLUDED_SYSTEM_INFO_FILE) + MESSAGE("System is unknown to cmake, create:\n${CMAKE_SYSTEM_INFO_FILE}" + " to use this system, please send your config file to " + "cmake@www.cmake.org so it can be added to cmake") + IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) + CONFIGURE_FILE(${CMAKE_BINARY_DIR}/CMakeCache.txt + ${CMAKE_BINARY_DIR}/CopyOfCMakeCache.txt COPYONLY) + MESSAGE("You CMakeCache.txt file was copied to CopyOfCMakeCache.txt. " + "Please send that file to cmake@www.cmake.org.") + ENDIF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt) +ENDIF(NOT _INCLUDED_SYSTEM_INFO_FILE) + + +# for most systems a module is the same as a shared library +# so unless the variable CMAKE_MODULE_EXISTS is set just +# copy the values from the LIBRARY variables +# this has to be done after the system information has been loaded +IF(NOT CMAKE_MODULE_EXISTS) + SET(CMAKE_SHARED_MODULE_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}") + SET(CMAKE_SHARED_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}") + SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG}) + SET(CMAKE_SHARED_MODULE_RUNTIME_C_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP}) +ENDIF(NOT CMAKE_MODULE_EXISTS) + + +SET(CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED 1) diff --git a/Modules/CMakeTestASM-ATTCompiler.cmake b/Modules/CMakeTestASM-ATTCompiler.cmake new file mode 100644 index 000000000..3844f5bda --- /dev/null +++ b/Modules/CMakeTestASM-ATTCompiler.cmake @@ -0,0 +1,9 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +SET(ASM_DIALECT "-ATT") +INCLUDE(CMakeTestASMCompiler) +SET(ASM_DIALECT) diff --git a/Modules/CMakeTestASMCompiler.cmake b/Modules/CMakeTestASMCompiler.cmake new file mode 100644 index 000000000..534b74be2 --- /dev/null +++ b/Modules/CMakeTestASMCompiler.cmake @@ -0,0 +1,11 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +IF(CMAKE_ASM${ASM_DIALECT}_COMPILER) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 1 CACHE INTERNAL "") +ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER) + SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS 0 CACHE INTERNAL "") +ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER) diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake new file mode 100755 index 000000000..0eac2fc00 --- /dev/null +++ b/Modules/CMakeTestCCompiler.cmake @@ -0,0 +1,59 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +IF(NOT CMAKE_C_COMPILER_WORKS) + MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER}") + FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c + "#ifdef __cplusplus\n" + "# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n" + "#endif\n" + "#if defined(__CLASSIC_C__)\n" + "int main(argc, argv)\n" + " int argc;\n" + " char* argv[];\n" + "#else\n" + "int main(int argc, char* argv[])\n" + "#endif\n" + "{ return argc-1;}\n") + TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c + OUTPUT_VARIABLE OUTPUT) + SET(C_TEST_WAS_RUN 1) +ENDIF(NOT CMAKE_C_COMPILER_WORKS) + +IF(NOT CMAKE_C_COMPILER_WORKS) + MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- broken") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the C compiler works failed with " + "the following output:\n${OUTPUT}\n\n") + MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" " + "is not able to compile a simple test program.\nIt fails " + "with the following output:\n ${OUTPUT}\n\n" + "CMake will not be able to correctly generate this project.") +ELSE(NOT CMAKE_C_COMPILER_WORKS) + IF(C_TEST_WAS_RUN) + MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the C compiler works passed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF(C_TEST_WAS_RUN) + SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "") + + IF(CMAKE_C_COMPILER_FORCED) + # The compiler configuration was forced by the user. + # Assume the user has configured all compiler information. + ELSE(CMAKE_C_COMPILER_FORCED) + # Try to identify the ABI and configure it into CMakeCCompiler.cmake + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) + CMAKE_DETERMINE_COMPILER_ABI(C ${CMAKE_ROOT}/Modules/CMakeCCompilerABI.c) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/CMakeCCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCCompiler.cmake + @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 + ) + ENDIF(CMAKE_C_COMPILER_FORCED) +ENDIF(NOT CMAKE_C_COMPILER_WORKS) + diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake new file mode 100755 index 000000000..47a315a7f --- /dev/null +++ b/Modules/CMakeTestCXXCompiler.cmake @@ -0,0 +1,51 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +IF(NOT CMAKE_CXX_COMPILER_WORKS) + MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER}") + FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx + "#ifndef __cplusplus\n" + "# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n" + "#endif\n" + "int main(){return 0;}\n") + TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx + OUTPUT_VARIABLE OUTPUT) + SET(CXX_TEST_WAS_RUN 1) +ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) + +IF(NOT CMAKE_CXX_COMPILER_WORKS) + MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- broken") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the CXX compiler works failed with " + "the following output:\n${OUTPUT}\n\n") + MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" " + "is not able to compile a simple test program.\nIt fails " + "with the following output:\n ${OUTPUT}\n\n" + "CMake will not be able to correctly generate this project.") +ELSE(NOT CMAKE_CXX_COMPILER_WORKS) + IF(CXX_TEST_WAS_RUN) + MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the CXX compiler works passed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF(CXX_TEST_WAS_RUN) + SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "") + + IF(CMAKE_CXX_COMPILER_FORCED) + # The compiler configuration was forced by the user. + # Assume the user has configured all compiler information. + ELSE(CMAKE_CXX_COMPILER_FORCED) + # Try to identify the ABI and configure it into CMakeCXXCompiler.cmake + INCLUDE(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerABI.cmake) + CMAKE_DETERMINE_COMPILER_ABI(CXX ${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/CMakeCXXCompiler.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXCompiler.cmake + @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0 + ) + ENDIF(CMAKE_CXX_COMPILER_FORCED) +ENDIF(NOT CMAKE_CXX_COMPILER_WORKS) diff --git a/Modules/CMakeTestForFreeVC.cxx b/Modules/CMakeTestForFreeVC.cxx new file mode 100755 index 000000000..e580c1f6b --- /dev/null +++ b/Modules/CMakeTestForFreeVC.cxx @@ -0,0 +1,3 @@ +#include + +int main(){return 0;} diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake new file mode 100755 index 000000000..cc8c565e6 --- /dev/null +++ b/Modules/CMakeTestFortranCompiler.cmake @@ -0,0 +1,66 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +IF(NOT CMAKE_Fortran_COMPILER_WORKS) + MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER}") + FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f " + PROGRAM TESTFortran + PRINT *, 'Hello' + END + ") + TRY_COMPILE(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f + OUTPUT_VARIABLE OUTPUT) + SET(FORTRAN_TEST_WAS_RUN 1) +ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS) + +IF(NOT CMAKE_Fortran_COMPILER_WORKS) + MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- broken") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran compiler works failed with " + "the following output:\n${OUTPUT}\n\n") + MESSAGE(FATAL_ERROR "The Fortran compiler \"${CMAKE_Fortran_COMPILER}\" " + "is not able to compile a simple test program.\nIt fails " + "with the following output:\n ${OUTPUT}\n\n" + "CMake will not be able to correctly generate this project.") +ELSE(NOT CMAKE_Fortran_COMPILER_WORKS) + IF(FORTRAN_TEST_WAS_RUN) + MESSAGE(STATUS "Check for working Fortran compiler: ${CMAKE_Fortran_COMPILER} -- works") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran compiler works passed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF(FORTRAN_TEST_WAS_RUN) + SET(CMAKE_Fortran_COMPILER_WORKS 1 CACHE INTERNAL "") +ENDIF(NOT CMAKE_Fortran_COMPILER_WORKS) + +IF(CMAKE_Fortran_COMPILER_WORKS) + # Test for Fortran 90 support by using an f90-specific construct. + IF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90) + ELSE(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90) + MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90") + FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 " + PROGRAM TESTFortran90 + stop = 1 ; do while ( stop .eq. 0 ) ; end do + END PROGRAM TESTFortran90 + ") + TRY_COMPILE(CMAKE_Fortran_COMPILER_SUPPORTS_F90 ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompilerF90.f90 + OUTPUT_VARIABLE OUTPUT) + IF(CMAKE_Fortran_COMPILER_SUPPORTS_F90) + MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- yes") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran compiler supports Fortran 90 passed with " + "the following output:\n${OUTPUT}\n\n") + SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 1 CACHE INTERNAL "") + ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F90) + MESSAGE(STATUS "Checking whether ${CMAKE_Fortran_COMPILER} supports Fortran 90 -- no") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran compiler supports Fortran 90 failed with " + "the following output:\n${OUTPUT}\n\n") + SET(CMAKE_Fortran_COMPILER_SUPPORTS_F90 0 CACHE INTERNAL "") + ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F90) + ENDIF(DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F90) +ENDIF(CMAKE_Fortran_COMPILER_WORKS) diff --git a/Modules/CMakeTestGNU.c b/Modules/CMakeTestGNU.c new file mode 100644 index 000000000..933e5a212 --- /dev/null +++ b/Modules/CMakeTestGNU.c @@ -0,0 +1,9 @@ +#if defined(__GNUC__) && !defined(__INTEL_COMPILER) +void THIS_IS_GNU(); +#endif +#ifdef __MINGW32__ +void THIS_IS_MINGW(); +#endif +#ifdef __CYGWIN__ +void THIS_IS_CYGWIN(); +#endif diff --git a/Modules/CMakeTestJavaCompiler.cmake b/Modules/CMakeTestJavaCompiler.cmake new file mode 100755 index 000000000..a682307cf --- /dev/null +++ b/Modules/CMakeTestJavaCompiler.cmake @@ -0,0 +1,7 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. +SET(CMAKE_Java_COMPILER_WORKS 1 CACHE INTERNAL "") diff --git a/Modules/CMakeTestNMakeCLVersion.c b/Modules/CMakeTestNMakeCLVersion.c new file mode 100644 index 000000000..3cece2a63 --- /dev/null +++ b/Modules/CMakeTestNMakeCLVersion.c @@ -0,0 +1,2 @@ +VERSION=_MSC_VER + diff --git a/Modules/CMakeTestRCCompiler.cmake b/Modules/CMakeTestRCCompiler.cmake new file mode 100755 index 000000000..a8eeaa385 --- /dev/null +++ b/Modules/CMakeTestRCCompiler.cmake @@ -0,0 +1,10 @@ + +# 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 +# is set and cmake stops processing commands and will not generate +# any makefiles or projects. + +# For now there is no way to do a try compile on just a .rc file +# so just do nothing in here. +SET(CMAKE_RC_COMPILER_WORKS 1 CACHE INTERNAL "") diff --git a/Modules/CMakeUnixFindMake.cmake b/Modules/CMakeUnixFindMake.cmake new file mode 100755 index 000000000..4272c2108 --- /dev/null +++ b/Modules/CMakeUnixFindMake.cmake @@ -0,0 +1,2 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make smake) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) diff --git a/Modules/CMakeVS6BackwardCompatibility.cmake b/Modules/CMakeVS6BackwardCompatibility.cmake new file mode 100755 index 000000000..13665f7d7 --- /dev/null +++ b/Modules/CMakeVS6BackwardCompatibility.cmake @@ -0,0 +1,13 @@ + +# 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") +SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type") +SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type") +SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type") +SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type") +SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type") +SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL + "Does the compiler support ansi for scope.") +SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.") +SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes") diff --git a/Modules/CMakeVS6FindMake.cmake b/Modules/CMakeVS6FindMake.cmake new file mode 100755 index 000000000..e0719cdee --- /dev/null +++ b/Modules/CMakeVS6FindMake.cmake @@ -0,0 +1,10 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES msdev + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin + "c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin" + "c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin" + "/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC60 1) diff --git a/Modules/CMakeVS71FindMake.cmake b/Modules/CMakeVS71FindMake.cmake new file mode 100644 index 000000000..666c83dc1 --- /dev/null +++ b/Modules/CMakeVS71FindMake.cmake @@ -0,0 +1,11 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES devenv + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VS;EnvironmentDirectory] + "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" + "c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE" + "c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE" + "/Program Files/Microsoft Visual Studio .NET/Common7/IDE/" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC71 1) diff --git a/Modules/CMakeVS7BackwardCompatibility.cmake b/Modules/CMakeVS7BackwardCompatibility.cmake new file mode 100755 index 000000000..49b564603 --- /dev/null +++ b/Modules/CMakeVS7BackwardCompatibility.cmake @@ -0,0 +1,13 @@ + +# 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") +SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type") +SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type") +SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type") +SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type") +SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type") +SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL + "Does the compiler support ansi for scope.") +SET (CMAKE_USE_WIN32_THREADS TRUE CACHE BOOL "Use the win32 thread library.") +SET (CMAKE_WORDS_BIGENDIAN 0 CACHE INTERNAL "endianness of bytes") diff --git a/Modules/CMakeVS7FindMake.cmake b/Modules/CMakeVS7FindMake.cmake new file mode 100755 index 000000000..2d12267ae --- /dev/null +++ b/Modules/CMakeVS7FindMake.cmake @@ -0,0 +1,10 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES devenv + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory] + "c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE" + "c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE" + "/Program Files/Microsoft Visual Studio .NET/Common7/IDE/" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC70 1) diff --git a/Modules/CMakeVS8FindMake.cmake b/Modules/CMakeVS8FindMake.cmake new file mode 100755 index 000000000..d6ca4aa5f --- /dev/null +++ b/Modules/CMakeVS8FindMake.cmake @@ -0,0 +1,16 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES VCExpress devenv + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup\\VS;EnvironmentDirectory] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup;Dbghelp_path] + "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio 8/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio8/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 8/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio8/Common7/IDE" + "/Program Files/Microsoft Visual Studio 8/Common7/IDE/" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC80 1) +SET(MSVC_VERSION 1400) diff --git a/Modules/CMakeVS9FindMake.cmake b/Modules/CMakeVS9FindMake.cmake new file mode 100755 index 000000000..a2c8e7214 --- /dev/null +++ b/Modules/CMakeVS9FindMake.cmake @@ -0,0 +1,16 @@ +FIND_PROGRAM(CMAKE_MAKE_PROGRAM + NAMES VCExpress devenv + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;EnvironmentDirectory] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup;Dbghelp_path] + "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio 9/Common7/IDE" + "$ENV{ProgramFiles}/Microsoft Visual Studio9/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9/Common7/IDE" + "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE" + "/Program Files/Microsoft Visual Studio 9/Common7/IDE/" + ) +MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM) +SET(MSVC90 1) +SET(MSVC_VERSION 1500) diff --git a/Modules/COPYING-CMAKE-SCRIPTS b/Modules/COPYING-CMAKE-SCRIPTS new file mode 100644 index 000000000..4b417765f --- /dev/null +++ b/Modules/COPYING-CMAKE-SCRIPTS @@ -0,0 +1,22 @@ +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.DS_Store.in b/Modules/CPack.DS_Store.in new file mode 100755 index 0000000000000000000000000000000000000000..5be0eeb180e736fd49c5745bcd42616374344970 GIT binary patch literal 12292 zcmeHL%}-N75T6A^kXjLt5KZJI98KP%;sNTxTG2{O&}f8{gnm5Alh`CS@irvZA(;d1jU<4QeMt~7u1Q>z80|ESJD;hZ9f8We< z&j>IA|0M#dJ~(KKrz~$7u1g0xeFXsTgIE*B!)gHTSe~-HWjJO)!kB^^Q(>*p-F7p$NS?3oUE5HZzw7n@Y1Xszht*k3G#L0S8ag^J!-{x zM#^I7JBzX&tOb76Nw{aN z_O0pty5=ZNdP_2Fl>D04J!GOW@k-%<9;ozZvQ^|o2|B1f<-A2+h|YWpCVus{EUO!C zp`?!3k?6_R8{}mr(lvP*bfVvuAHVB|ezt~qOirerU&c(7llK@48dLGmiI2T#Jv8|G zCH1d-#a^zMtt9W){Aw*($TovQQbn0eH-fNGOIp{-gLe|Ai}(_ESU#4Kp(--!B9kSZ z#W?lDDhsK};t0*^AUqv}r-JZI5S|U9BRRWpj*{?zIQA1$Cs#F4jIQF$RB%QDoTjWk zArfb(wh+qvZY?132)fS{w$^U+klncO1;0Ogf#kQmbgL-*|F6==#0YdE&}&2!>i&Nn z6_39IbYjF3M&MsZK=jSun@?kx_HNy=U-kCtpsk`QQhF`JwFx@?f(x!+%)z5qdZp_? zRq>SNEyE!J@rM8n19yx7BftnS0*nA7zz8q`i~u9R2rvSS03*N%FanIgA4T8?E&L#F literal 0 HcmV?d00001 diff --git a/Modules/CPack.Description.plist.in b/Modules/CPack.Description.plist.in new file mode 100644 index 000000000..3d1147686 --- /dev/null +++ b/Modules/CPack.Description.plist.in @@ -0,0 +1,12 @@ + + + + + IFPkgDescriptionTitle + @CPACK_PACKAGE_NAME@ + IFPkgDescriptionVersion + @CPACK_PACKAGE_VERSION@ + IFPkgDescriptionDescription + @CPACK_PACKAGE_DESCRIPTION@ + + diff --git a/Modules/CPack.Info.plist.in b/Modules/CPack.Info.plist.in new file mode 100644 index 000000000..da4872b67 --- /dev/null +++ b/Modules/CPack.Info.plist.in @@ -0,0 +1,37 @@ + + + + + +IFMajorVersion +@CPACK_PACKAGE_VERSION_MAJOR@ +IFMinorVersion +@CPACK_PACKAGE_VERSION_MINOR@ +IFPkgFlagAllowBackRev + +IFPkgFlagAuthorizationAction +AdminAuthorization +IFPkgFlagDefaultLocation +@CPACK_PACKAGE_DEFAULT_LOCATION@ +IFPkgFlagInstallFat + +IFPkgFlagIsRequired + +IFPkgFlagOverwritePermissions + +IFPkgFlagRelocatable +<@CPACK_PACKAGE_RELOCATABLE@/> +IFPkgFlagRestartAction +NoRestart +IFPkgFlagRootVolumeOnly + +IFPkgFlagUpdateInstalledLanguages + +IFPkgFlagUseUserMask + +IFPkgFormatVersion +0.10000000149011612 +CFBundleIdentifier +com.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@.@CPACK_PACKAGE_VERSION@ + + diff --git a/Modules/CPack.OSXScriptLauncher.in b/Modules/CPack.OSXScriptLauncher.in new file mode 100755 index 0000000000000000000000000000000000000000..a3e1737e9ef7d1d8b1ed2c5a47904c2a28c0f7d4 GIT binary patch literal 1345804 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 z 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%0A(D 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

);lE1QN{twwLu1c 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 sXSOKNT6%v!m!;=zGs%(YF&%&sx#l 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 + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + @CPACK_PACKAGE_FILE_NAME@ + CFBundleGetInfoString + @CPACK_APPLE_GUI_INFO_STRING@ + CFBundleIconFile + @CPACK_APPLE_GUI_ICON@ + CFBundleIdentifier + @CPACK_APPLE_GUI_IDENTIFIER@ + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLongVersionString + @CPACK_APPLE_GUI_LONG_VERSION_STRING@ + CFBundleName + @CPACK_APPLE_GUI_BUNDLE_NAME@ + CFBundlePackageType + APPL + CFBundleShortVersionString + @CPACK_APPLE_GUI_SHORT_VERSION_STRING@ + CFBundleSignature + ???? + CFBundleVersion + @CPACK_APPLE_GUI_BUNDLE_VERSION@ + CSResourcesFileMapped + + LSRequiresCarbon + + NSHumanReadableCopyright + @CPACK_APPLE_GUI_COPYRIGHT@ + + diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in new file mode 100755 index 000000000..fc3444abf --- /dev/null +++ b/Modules/CPack.RuntimeScript.in @@ -0,0 +1,66 @@ +#!/bin/sh +# +# Modified from: Aaron Voisine + +CWD="`dirname \"$0\"`" +TMP=/tmp/$UID/TemporaryItems + +version=`sw_vers -productVersion` +if [ "$?" == "0" ]; then + major=${version%%\.*} + rest=${version#*\.} + minor=${rest%%\.*} + build=${rest#*\.} +else + major=10 + minor=4 + build=0 +fi + +echo $version +echo "Major = $major" +echo "Minor = $minor" +echo "Build = $build" + + +# if 10.5 or greater, then all the open-x11 stuff need not occur +if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then +ps -wx -ocommand | grep -e '[X]11.app' > /dev/null +if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then + echo "rm -f ~/.xinitrc" > ~/.xinitrc + sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc +fi + +mkdir -p $TMP +cat << __END_OF_GETDISPLAY_SCRIPT__ > "$TMP/getdisplay.sh" +#!/bin/sh +mkdir -p "$TMP" + +if [ "\$DISPLAY"x == "x" ]; then + echo :0 > "$TMP/display" +else + echo \$DISPLAY > "$TMP/display" +fi +__END_OF_GETDISPLAY_SCRIPT__ +chmod +x "$TMP/getdisplay.sh" +rm -f $TMP/display +open-x11 $TMP/getdisplay.sh || \ +open -a XDarwin $TMP/getdisplay.sh || \ +echo ":0" > $TMP/display + +while [ "$?" == "0" -a ! -f $TMP/display ]; +do + #echo "Waiting for display $TMP/display" + sleep 1; +done +export "DISPLAY=`cat $TMP/display`" + +ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11 + +cd ~/ +echo "$@" > /tmp/arguments.log +if echo $1 | grep -- "^-psn_"; then + shift +fi +fi +exec "$CWD/bin/@CPACK_EXECUTABLE_NAME@" "$@" > /tmp/slicer.output 2>&1 diff --git a/Modules/CPack.STGZ_Header.sh.in b/Modules/CPack.STGZ_Header.sh.in new file mode 100644 index 000000000..3b50e74ee --- /dev/null +++ b/Modules/CPack.STGZ_Header.sh.in @@ -0,0 +1,141 @@ +#!/bin/sh + +# Display usage +cpack_usage() +{ + cat < /dev/null 2> /dev/null; then + cpack_usage + fi + if echo $a | grep "^--version" > /dev/null 2> /dev/null; then + cpack_version + exit 2 + fi + if echo $a | grep "^--include-subdir" > /dev/null 2> /dev/null; then + cpack_include_subdir=TRUE + fi + if echo $a | grep "^--exclude-subdir" > /dev/null 2> /dev/null; then + cpack_include_subdir=FALSE + fi + if echo $a | grep "^--skip-license" > /dev/null 2> /dev/null; then + cpack_skip_license=TRUE + fi +done + +if [ "x${cpack_include_subdir}x" != "xx" -o "x${cpack_skip_license}x" = "xTRUEx" ] +then + interactive=FALSE +fi + +cpack_version +echo "This is a self-extracting archive." +toplevel="`pwd`" +if [ "x${cpack_prefix_dir}x" != "xx" ] +then + toplevel="${cpack_prefix_dir}" +fi + +echo "The archive will be extracted to: ${toplevel}" + +if [ "x${interactive}x" = "xTRUEx" ] +then + echo "" + echo "If you want to stop extracting, please press ." + + if [ "x${cpack_skip_license}x" != "xTRUEx" ] + then + more << ____cpack__here_doc____ +@CPACK_RESOURCE_FILE_LICENSE_CONTENT@ +____cpack__here_doc____ + echo + echo "Do you accept the license? [yN]: " + read line leftover + case ${line} in + y* | Y*) + cpack_license_accepted=TRUE;; + *) + echo "License not accepted. Exiting ..." + exit 1;; + esac + fi + + if [ "x${cpack_include_subdir}x" = "xx" ] + then + echo "By default the @CPACK_PACKAGE_NAME@ will be installed in:" + echo " \"${toplevel}/@CPACK_PACKAGE_FILE_NAME@\"" + echo "Do you want to include the subdirectory @CPACK_PACKAGE_FILE_NAME@?" + echo "Saying no will install in: \"${toplevel}\" [Yn]: " + read line leftover + cpack_include_subdir=TRUE + case ${line} in + n* | N*) + cpack_include_subdir=FALSE + esac + fi +fi + +if [ "x${cpack_include_subdir}x" = "xTRUEx" ] +then + toplevel="${toplevel}/@CPACK_PACKAGE_FILE_NAME@" + mkdir -p "${toplevel}" +fi +echo +echo "Using target directory: ${toplevel}" +echo "Extracting, please wait..." +echo "" + +# take the archive portion of this file and pipe it to tar +# the NUMERIC parameter in this command should be one more +# than the number of lines in this header file +# there are tails which don't understand the "-n" argument, e.g. on SunOS +# OTOH there are tails which complain when not using the "-n" argument (e.g. GNU) +# so at first try to tail some file to see if tail fails if used with "-n" +# if so, don't use "-n" +use_new_tail_syntax="-n" +tail $use_new_tail_syntax +1 "$0" > /dev/null 2> /dev/null || use_new_tail_syntax="" + +tail $use_new_tail_syntax +###CPACK_HEADER_LENGTH### "$0" | gunzip | (cd "${toplevel}" && tar xf -) || cpack_echo_exit "Problem unpacking the @CPACK_PACKAGE_FILE_NAME@" + +echo "Unpacking finished successfully" + +exit 0 +#----------------------------------------------------------- +# Start of TAR.GZ file +#-----------------------------------------------------------; + diff --git a/Modules/CPack.VolumeIcon.icns.in b/Modules/CPack.VolumeIcon.icns.in new file mode 100644 index 0000000000000000000000000000000000000000..c59217eaef6405e760eacd70925335c6ecc04ac4 GIT binary patch literal 45739 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 DDjG{{ literal 0 HcmV?d00001 diff --git a/Modules/CPack.background.png.in b/Modules/CPack.background.png.in new file mode 100644 index 0000000000000000000000000000000000000000..3fa92b5097a0e1dbc1b3b62ea991691b8b9af147 GIT binary patch literal 50482 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..--. +cpack_set_if_not_set(CPACK_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}") +cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_DIRECTORY + "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") +cpack_set_if_not_set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY + "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}") +cpack_set_if_not_set(CPACK_PACKAGE_DEFAULT_LOCATION "/") +cpack_set_if_not_set(CPACK_PACKAGE_RELOCATABLE "true") + +# always force to exactly "true" or "false" for CPack.Info.plist.in: +if(CPACK_PACKAGE_RELOCATABLE) + set(CPACK_PACKAGE_RELOCATABLE "true") +else(CPACK_PACKAGE_RELOCATABLE) + set(CPACK_PACKAGE_RELOCATABLE "false") +endif(CPACK_PACKAGE_RELOCATABLE) + +macro(cpack_check_file_exists file description) + if(NOT EXISTS "${file}") + message(SEND_ERROR "CPack ${description} file: \"${file}\" could not be found.") + endif(NOT EXISTS "${file}") +endmacro(cpack_check_file_exists) + +cpack_check_file_exists("${CPACK_PACKAGE_DESCRIPTION_FILE}" "package description") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_LICENSE}" "license resource") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_README}" "readme resource") +cpack_check_file_exists("${CPACK_RESOURCE_FILE_WELCOME}" "welcome resource") + +macro(cpack_optional_append _list _cond _item) + if(${_cond}) + set(${_list} ${${_list}} ${_item}) + endif(${_cond}) +endmacro(cpack_optional_append _list _cond _item) + +# Provide options to choose generators +# we might check here if the required tools for the generates exist +# and set the defaults according to the results +if(NOT CPACK_GENERATOR) + if(UNIX) + if(CYGWIN) + option(CPACK_BINARY_CYGWIN "Enable to build Cygwin binary packages" ON) + else(CYGWIN) + if(APPLE) + option(CPACK_BINARY_PACKAGEMAKER "Enable to build PackageMaker packages" ON) + option(CPACK_BINARY_OSXX11 "Enable to build OSX X11 packages" OFF) + else(APPLE) + option(CPACK_BINARY_TZ "Enable to build TZ packages" ON) + endif(APPLE) + option(CPACK_BINARY_STGZ "Enable to build STGZ packages" ON) + option(CPACK_BINARY_TGZ "Enable to build TGZ packages" ON) + option(CPACK_BINARY_TBZ2 "Enable to build TBZ2 packages" ON) + option(CPACK_BINARY_DEB "Enable to build Debian packages" OFF) + option(CPACK_BINARY_RPM "Enable to build RPM packages" OFF) + option(CPACK_BINARY_NSIS "Enable to build NSIS packages" OFF) + endif(CYGWIN) + else(UNIX) + option(CPACK_BINARY_NSIS "Enable to build NSIS packages" ON) + option(CPACK_BINARY_ZIP "Enable to build ZIP packages" ON) + endif(UNIX) + + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_PACKAGEMAKER PackageMaker) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_OSXX11 OSXX11) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_CYGWIN CygwinBinary) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_DEB DEB) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_RPM RPM) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_NSIS NSIS) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_STGZ STGZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TGZ TGZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TBZ2 TBZ2) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_TZ TZ) + cpack_optional_append(CPACK_GENERATOR CPACK_BINARY_ZIP ZIP) + +endif(NOT CPACK_GENERATOR) + +# Provide options to choose source generators +if(NOT CPACK_SOURCE_GENERATOR) + if(UNIX) + if(CYGWIN) + option(CPACK_SOURCE_CYGWIN "Enable to build Cygwin source packages" ON) + else(CYGWIN) + option(CPACK_SOURCE_TBZ2 "Enable to build TBZ2 source packages" ON) + option(CPACK_SOURCE_TGZ "Enable to build TGZ source packages" ON) + option(CPACK_SOURCE_TZ "Enable to build TZ source packages" ON) + option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" OFF) + endif(CYGWIN) + else(UNIX) + option(CPACK_SOURCE_ZIP "Enable to build ZIP source packages" ON) + endif(UNIX) + + cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_CYGWIN CygwinSource) + cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TGZ TGZ) + cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TBZ2 TBZ2) + cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_TZ TZ) + cpack_optional_append(CPACK_SOURCE_GENERATOR CPACK_SOURCE_ZIP ZIP) +endif(NOT CPACK_SOURCE_GENERATOR) + +# mark the above options as advanced +mark_as_advanced(CPACK_BINARY_CYGWIN CPACK_BINARY_PACKAGEMAKER CPACK_BINARY_OSXX11 + CPACK_BINARY_STGZ CPACK_BINARY_TGZ CPACK_BINARY_TBZ2 + CPACK_BINARY_DEB CPACK_BINARY_RPM CPACK_BINARY_TZ + CPACK_BINARY_NSIS CPACK_BINARY_ZIP + CPACK_SOURCE_CYGWIN CPACK_SOURCE_TBZ2 CPACK_SOURCE_TGZ + CPACK_SOURCE_TZ CPACK_SOURCE_ZIP) + +# Set some other variables +cpack_set_if_not_set(CPACK_INSTALL_CMAKE_PROJECTS + "${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/") +cpack_set_if_not_set(CPACK_CMAKE_GENERATOR "${CMAKE_GENERATOR}") +cpack_set_if_not_set(CPACK_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}") + +cpack_set_if_not_set(CPACK_NSIS_DISPLAY_NAME "@CPACK_PACKAGE_INSTALL_DIRECTORY@") + +cpack_set_if_not_set(CPACK_OUTPUT_CONFIG_FILE + "${CMAKE_BINARY_DIR}/CPackConfig.cmake") + +cpack_set_if_not_set(CPACK_SOURCE_OUTPUT_CONFIG_FILE + "${CMAKE_BINARY_DIR}/CPackSourceConfig.cmake") + +cpack_set_if_not_set(CPACK_SET_DESTDIR OFF) +cpack_set_if_not_set(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +cpack_set_if_not_set(CPACK_NSIS_INSTALLER_ICON_CODE "") +cpack_set_if_not_set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "") + +cpack_encode_variables() +configure_file("${cpack_input_file}" "${CPACK_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) + +# Generate source file +cpack_set_if_not_set(CPACK_SOURCE_INSTALLED_DIRECTORIES + "${CMAKE_SOURCE_DIR};/") +cpack_set_if_not_set(CPACK_SOURCE_TOPLEVEL_TAG "${CPACK_SYSTEM_NAME}-Source") +cpack_set_if_not_set(CPACK_SOURCE_PACKAGE_FILE_NAME + "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source") +cpack_set_if_not_set(CPACK_SOURCE_IGNORE_FILES + "/CVS/;/\\\\\\\\.svn/;\\\\\\\\.swp$;\\\\\\\\.#;/#") +SET(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_SOURCE_INSTALL_CMAKE_PROJECTS}") +SET(CPACK_INSTALLED_DIRECTORIES "${CPACK_SOURCE_INSTALLED_DIRECTORIES}") +SET(CPACK_GENERATOR "${CPACK_SOURCE_GENERATOR}") +SET(CPACK_TOPLEVEL_TAG "${CPACK_SOURCE_TOPLEVEL_TAG}") +SET(CPACK_PACKAGE_FILE_NAME "${CPACK_SOURCE_PACKAGE_FILE_NAME}") +SET(CPACK_IGNORE_FILES "${CPACK_SOURCE_IGNORE_FILES}") +SET(CPACK_STRIP_FILES "${CPACK_SOURCE_STRIP_FILES}") + +cpack_encode_variables() +configure_file("${cpack_source_input_file}" + "${CPACK_SOURCE_OUTPUT_CONFIG_FILE}" @ONLY IMMEDIATE) diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake new file mode 100644 index 000000000..190aa3438 --- /dev/null +++ b/Modules/CPackDeb.cmake @@ -0,0 +1,115 @@ + +# CPack script for creating Debian package +# Author: Mathieu Malaterre +# +# http://wiki.debian.org/HowToPackageForDebian + +IF(CMAKE_BINARY_DIR) + MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.") +ENDIF(CMAKE_BINARY_DIR) + +IF(NOT UNIX) + MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.") +ENDIF(NOT UNIX) + +# Let's define the control file found in debian package: + +# Binary package: +# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles + +# DEBIAN/control +# debian policy enforce lower case for package name +# Package: (mandatory) +IF(NOT CPACK_DEBIAN_PACKAGE_NAME) + STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_DEBIAN_PACKAGE_NAME) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_NAME) + +# Version: (mandatory) +IF(NOT CPACK_DEBIAN_PACKAGE_VERSION) + IF(NOT CPACK_PACKAGE_VERSION) + MESSAGE(FATAL_ERROR "Debian package requires a package version") + ENDIF(NOT CPACK_PACKAGE_VERSION) + SET(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_VERSION) + +# Architecture: (mandatory) +IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) + # There is no such thing as i686 architecture on debian, you should use i386 instead + # $ dpkg --print-architecture + FIND_PROGRAM(DPKG_CMD dpkg) + IF(NOT DPKG_CMD) + MESSAGE(STATUS "Can not find dpkg in your path, default to i386.") + SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) + ENDIF(NOT DPKG_CMD) + EXECUTE_PROCESS(COMMAND "${DPKG_CMD}" --print-architecture + OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE) + +# have a look at GET_PROPERTY(result GLOBAL PROPERTY ENABLED_FEATURES), +# this returns the successful FIND_PACKAGE() calls, maybe this can help +# Depends: +# You should set: DEBIAN_PACKAGE_DEPENDS +# TODO: automate 'objdump -p | grep NEEDED' +IF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) + MESSAGE(STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS not set, the package will have no dependencies.") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_DEPENDS) + +# Maintainer: (mandatory) +IF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER) + IF(NOT CPACK_PACKAGE_CONTACT) + MESSAGE(FATAL_ERROR "Debian package requires a maintainer for a package, set CPACK_PACKAGE_CONTACT or CPACK_DEBIAN_PACKAGE_MAINTAINER") + ENDIF(NOT CPACK_PACKAGE_CONTACT) + SET(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_MAINTAINER) + +# Description: (mandatory) +IF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + MESSAGE(FATAL_ERROR "Debian package requires a summary for a package, set CPACK_PACKAGE_DESCRIPTION_SUMMARY or CPACK_DEBIAN_PACKAGE_DESCRIPTION") + ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) +ENDIF(NOT CPACK_DEBIAN_PACKAGE_DESCRIPTION) + +# Section: (recommended) +IF(NOT CPACK_DEBIAN_PACKAGE_SECTION) + SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_SECTION) + +# Priority: (recommended) +IF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY) + SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +ENDIF(NOT CPACK_DEBIAN_PACKAGE_PRIORITY ) + +# Recommends: +# You should set: CPACK_DEBIAN_PACKAGE_RECOMMENDS + +# Suggests: +# You should set: CPACK_DEBIAN_PACKAGE_SUGGESTS + +# CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA +# This variable allow advanced user to add custom script to the control.tar.gz (inside the .deb archive) +# Typical examples are: +# - conffiles +# - postinst +# - postrm +# - prerm" +# Usage: +# SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA +# "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm") + + +# For debian source packages: +# debian/control +# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-sourcecontrolfiles + +# .dsc +# http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-debiansourcecontrolfiles + +# Builds-Depends: +#IF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS) +# SET(CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS +# "debhelper (>> 5.0.0), libncurses5-dev, tcl8.4" +# ) +#ENDIF(NOT CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake new file mode 100644 index 000000000..3160a4a71 --- /dev/null +++ b/Modules/CPackRPM.cmake @@ -0,0 +1,227 @@ +# CPack script for creating RPM package +# Author: Eric Noulard with the help of Alexander Neundorf. +# All variables used by CPackRPM begins with CPACK_RPM_ prefix +# +# Here comes the list of used variables: +# + +IF(CMAKE_BINARY_DIR) + MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used by CPack internally.") +ENDIF(CMAKE_BINARY_DIR) + +IF(NOT UNIX) + MESSAGE(FATAL_ERROR "CPackRPM.cmake may only be used under UNIX.") +ENDIF(NOT UNIX) + +# rpmbuild is the basic command for building RPM package +# it may be a simple (symbolic) link to rpmb command. +FIND_PROGRAM(RPMBUILD_EXECUTABLE rpmbuild) + +IF(NOT RPMBUILD_EXECUTABLE) + MESSAGE(FATAL_ERROR "RPM package requires rpmbuild executable") +ENDIF(NOT RPMBUILD_EXECUTABLE) + +IF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*") + MESSAGE(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.") +ENDIF(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*") + +# If rpmbuild is found +# we try to discover alien since we may be on non RPM distro like Debian. +# In this case we may try to to use more advanced features +# like generating RPM directly from DEB using alien. +# FIXME feature not finished (yet) +FIND_PROGRAM(ALIEN_EXECUTABLE alien) +IF(ALIEN_EXECUTABLE) + MESSAGE(STATUS "alien found, we may be on a Debian based distro.") +ENDIF(ALIEN_EXECUTABLE) + +# +# Use user-defined RPM specific variables value +# or generate reasonable default value from +# CPACK_xxx generic values. +# The variables comes from the needed (mandatory or not) +# values found in the RPM specification file aka ".spec" file. +# The variables which may/should be defined are: +# + +# CPACK_RPM_PACKAGE_SUMMARY (mandatory) +IF(NOT CPACK_RPM_PACKAGE_SUMMARY) + # if neither var is defined lets use the name as summary + IF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_SUMMARY) + ELSE(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) + SET(CPACK_RPM_PACKAGE_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}) + ENDIF(NOT CPACK_PACKAGE_DESCRIPTION_SUMMARY) +ENDIF(NOT CPACK_RPM_PACKAGE_SUMMARY) + +# CPACK_RPM_PACKAGE_NAME (mandatory) +IF(NOT CPACK_RPM_PACKAGE_NAME) + STRING(TOLOWER "${CPACK_PACKAGE_NAME}" CPACK_RPM_PACKAGE_NAME) +ENDIF(NOT CPACK_RPM_PACKAGE_NAME) + +# CPACK_RPM_PACKAGE_VERSION (mandatory) +IF(NOT CPACK_RPM_PACKAGE_VERSION) + IF(NOT CPACK_PACKAGE_VERSION) + MESSAGE(FATAL_ERROR "RPM package requires a package version") + ENDIF(NOT CPACK_PACKAGE_VERSION) + SET(CPACK_RPM_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) +ENDIF(NOT CPACK_RPM_PACKAGE_VERSION) + +# CPACK_RPM_PACKAGE_ARCHITECTURE (optional) +IF(NOT CPACK_RPM_PACKAGE_ARCHITECTURE) + # FIXME This should be obtained through 'arch' command + # but is it --really necessary-- ? + SET(CPACK_RPM_PACKAGE_ARCHITECTURE i386) +ENDIF(NOT CPACK_RPM_PACKAGE_ARCHITECTURE) + +# CPACK_RPM_PACKAGE_RELEASE +# The RPM release is the numbering of the RPM package ITSELF +# this is the version of the PACKAGING and NOT the version +# of the CONTENT of the package. +# You may well need to generate a new RPM package release +# without changing the version of the packaged software. +# This is the case when the packaging is buggy (not) the software :=) +# If not set, 1 is a good candidate +IF(NOT CPACK_RPM_PACKAGE_RELEASE) + SET(CPACK_RPM_PACKAGE_RELEASE 1) +ENDIF(NOT CPACK_RPM_PACKAGE_RELEASE) + +# CPACK_RPM_PACKAGE_LICENSE +IF(NOT CPACK_RPM_PACKAGE_LICENSE) + SET(CPACK_RPM_PACKAGE_LICENSE "unknown") +ENDIF(NOT CPACK_RPM_PACKAGE_LICENSE) + +# CPACK_RPM_PACKAGE_GROUP +IF(NOT CPACK_RPM_PACKAGE_GROUP) + SET(CPACK_RPM_PACKAGE_GROUP "unknown") +ENDIF(NOT CPACK_RPM_PACKAGE_GROUP) + +# CPACK_RPM_PACKAGE_VENDOR +IF(NOT CPACK_RPM_PACKAGE_VENDOR) + IF(CPACK_PACKAGE_VENDOR) + SET(CPACK_RPM_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") + ELSE(CPACK_PACKAGE_VENDOR) + SET(CPACK_RPM_PACKAGE_VENDOR "unknown") + ENDIF(CPACK_PACKAGE_VENDOR) +ENDIF(NOT CPACK_RPM_PACKAGE_VENDOR) + +# CPACK_RPM_PACKAGE_SOURCE +# The name of the source tarball in case we generate +# a source RPM + +# CPACK_RPM_PACKAGE_DESCRIPTION +# The variable content may be either +# - explicitely given by tthe user or +# - filled with the content of CPACK_PACKAGE_DESCRIPTION_FILE +# if it is defined +# - set to a default value +# +IF (NOT CPACK_RPM_PACKAGE_DESCRIPTION) + IF (CPACK_PACKAGE_DESCRIPTION_FILE) + FILE(READ ${CPACK_PACKAGE_DESCRIPTION_FILE} CPACK_RPM_PACKAGE_DESCRIPTION) + ELSE (CPACK_PACKAGE_DESCRIPTION_FILE) + SET(CPACK_RPM_PACKAGE_DESCRIPTION "no package description available") + ENDIF (CPACK_PACKAGE_DESCRIPTION_FILE) +ENDIF (NOT CPACK_RPM_PACKAGE_DESCRIPTION) + +# CPACK_RPM_USER_BINARY_SPECFILE +# FIXME when this is set then CPack should us the +# user provided file. + +# Now we may create the RPM build tree structure +SET(CPACK_RPM_ROOTDIR "${CPACK_TOPLEVEL_DIRECTORY}") +MESSAGE(STATUS "CPackRPM:: Using CPACK_RPM_ROOTDIR=${CPACK_RPM_ROOTDIR}") +# Prepare RPM build tree +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/tmp) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/BUILD) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/RPMS) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SOURCES) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SPECS) +FILE(MAKE_DIRECTORY ${CPACK_RPM_ROOTDIR}/SRPMS) + +#SET(CPACK_RPM_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${CPACK_RPM_PACKAGE_VERSION}-${CPACK_RPM_PACKAGE_RELEASE}-${CPACK_RPM_PACKAGE_ARCHITECTURE}.rpm") +SET(CPACK_RPM_FILE_NAME "${CPACK_OUTPUT_FILE_NAME}") +# it seems rpmbuild can't handle spaces in the path +# neither escaping (as below) nor putting quotes around the path seem to help +#STRING(REGEX REPLACE " " "\\\\ " CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") +SET(CPACK_RPM_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}") + + +SET(CPACK_RPM_BINARY_SPECFILE "${CPACK_RPM_ROOTDIR}/SPECS/${CPACK_RPM_PACKAGE_NAME}.spec") +IF(CPACK_RPM_USER_BINARY_SPECFILE) + # User may have specified SPECFILE just use it + MESSAGE("CPackRPM: Will use user specified spec file: ${CPACK_RPM_USER_BINARY_SPECFILE}") + # Note that user provided file is processed for @var replacement + CONFIGURE_FILE(${CPACK_RPM_USER_BINARY_SPECFILE} ${CPACK_RPM_BINARY_SPECFILE} @ONLY) +ELSE(CPACK_RPM_USER_BINARY_SPECFILE) + # No User specified spec file generate a valid one using var values + IF(CPACK_RPM_PACKAGE_DEBUG) + MESSAGE("CPackRPM:: CPACK_TOPLEVEL_DIRECTORY = ${CPACK_TOPLEVEL_DIRECTORY}") + MESSAGE("CPackRPM:: CPACK_TOPLEVEL_TAG = ${CPACK_TOPLEVEL_TAG}") + MESSAGE("CPackRPM:: CPACK_TEMPORARY_DIRECTORY= ${PACK_TEMPORARY_DIRECTORY}") + MESSAGE("CPackRPM:: CPACK_OUTPUT_FILE_NAME = ${CPACK_OUTPUT_FILE_NAME}") + MESSAGE("CPackRPM:: CPACK_OUTPUT_FILE_PATH = ${CPACK_OUTPUT_FILE_PATH}") + MESSAGE("CPackRPM:: CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}") + MESSAGE("CPackRPM:: CPACK_RPM_BINARY_SPECFILE = ${CPACK_RPM_BINARY_SPECFILE}") + MESSAGE("CPackRPM:: CPACK_PACKAGE_INSTALL_DIRECTORY = ${PACK_PACKAGE_INSTALL_DIRECTORY}") + MESSAGE("CPackRPM ::CPACK_TEMPORARY_PACKAGE_FILE_NAME = ${CPACK_TEMPORARY_PACKAGE_FILE_NAME}") + ENDIF(CPACK_RPM_PACKAGE_DEBUG) + FILE(WRITE ${CPACK_RPM_BINARY_SPECFILE} + "# -*- rpm-spec -*- +Buildroot: ${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME} +Summary: ${CPACK_RPM_PACKAGE_SUMMARY} +Name: ${CPACK_RPM_PACKAGE_NAME} +Version: ${CPACK_RPM_PACKAGE_VERSION} +Release: ${CPACK_RPM_PACKAGE_RELEASE} +License: ${CPACK_RPM_PACKAGE_LICENSE} +Group: ${CPACK_RPM_PACKAGE_GROUP} +Vendor: ${CPACK_RPM_PACKAGE_VENDOR} + +#%define prefix ${CMAKE_INSTALL_PREFIX} +%define _rpmdir ${CPACK_RPM_DIRECTORY} +%define _rpmfilename ${CPACK_RPM_FILE_NAME} +%define _unpackaged_files_terminate_build 0 +%define _topdir ${CPACK_RPM_DIRECTORY} + +%description +${CPACK_RPM_PACKAGE_DESCRIPTION} + +# This is a shortcutted spec file +# generated by CMake RPM generator +# we skip the _prepn _build and _install +# steps because CPack does that for us +#%prep + +#%build + +#%install + +%clean + +%files +%defattr(-,root,root,-) +#%dir %{prefix} +#%{prefix}/* +/* + +%changelog +* Tue Aug 16 2007 Erk + Generated by CPack RPM Generator and associated macros +") + +ENDIF(CPACK_RPM_USER_BINARY_SPECFILE) + + +IF(RPMBUILD_EXECUTABLE) + # Now call rpmbuild using the SPECFILE + EXECUTE_PROCESS( + COMMAND "${RPMBUILD_EXECUTABLE}" -bb "${CPACK_RPM_BINARY_SPECFILE}" + WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}" + ERROR_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.err" + OUTPUT_FILE "${CPACK_TOPLEVEL_DIRECTORY}/rpmbuild.out") +ELSE(RPMBUILD_EXECUTABLE) + IF(ALIEN_EXECUTABLE) + MESSAGE(FATAL_ERROR "RPM packaging through alien not done (yet)") + ENDIF(ALIEN_EXECUTABLE) +ENDIF(RPMBUILD_EXECUTABLE) diff --git a/Modules/CPackZIP.cmake b/Modules/CPackZIP.cmake new file mode 100644 index 000000000..4a6585694 --- /dev/null +++ b/Modules/CPackZIP.cmake @@ -0,0 +1,27 @@ +IF(CMAKE_BINARY_DIR) + MESSAGE(FATAL_ERROR "CPackZIP.cmake may only be used by CPack internally.") +ENDIF(CMAKE_BINARY_DIR) + +FIND_PROGRAM(ZIP_EXECUTABLE wzzip PATHS "$ENV{ProgramFiles}/WinZip") +IF(ZIP_EXECUTABLE) + SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -P \"\" @") + SET(CPACK_ZIP_NEED_QUOTES TRUE) +ENDIF(ZIP_EXECUTABLE) + +IF(NOT ZIP_EXECUTABLE) + FIND_PROGRAM(ZIP_EXECUTABLE 7z PATHS "$ENV{ProgramFiles}/7-Zip") + IF(ZIP_EXECUTABLE) + SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" a -tzip \"\" @") + SET(CPACK_ZIP_NEED_QUOTES TRUE) + ENDIF(ZIP_EXECUTABLE) +ENDIF(NOT ZIP_EXECUTABLE) + +IF(NOT ZIP_EXECUTABLE) + FIND_PACKAGE(Cygwin) + FIND_PROGRAM(ZIP_EXECUTABLE zip PATHS "${CYGWIN_INSTALL_PATH}/bin") + IF(ZIP_EXECUTABLE) + SET(CPACK_ZIP_COMMAND "\"${ZIP_EXECUTABLE}\" -r \"\" . -i@") + SET(CPACK_ZIP_NEED_QUOTES FALSE) + ENDIF(ZIP_EXECUTABLE) +ENDIF(NOT ZIP_EXECUTABLE) + diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake new file mode 100644 index 000000000..10d6ff51f --- /dev/null +++ b/Modules/CTest.cmake @@ -0,0 +1,212 @@ +# - Configure a project for testing with CTest/Dart +# This file configures a project to use the CTest/Dart +# testing/dashboard process. This module should be included +# in the CMakeLists.txt file at the top of a project. Typical usage: +# INCLUDE(CTest) +# IF(BUILD_TESTING) +# # ... testing related CMake code ... +# ENDIF(BUILD_TESTING) +# The BUILD_TESTING option is created by the CTest module to determine +# whether testing support should be enabled. The default is ON. + +OPTION(BUILD_TESTING "Build the testing tree." ON) + +# function to turn generator name into a version string +# like vs7 vs71 vs8 vs9 +FUNCTION(GET_VS_VERSION_STRING generator var) + STRING(REGEX REPLACE "Visual Studio ([0-9][0-9]?)($|.*)" "\\1" NUMBER "${generator}") + IF("${generator}" MATCHES "Visual Studio 7 .NET 2003") + SET(ver_string "vs71") + ELSE("${generator}" MATCHES "Visual Studio 7 .NET 2003") + SET(ver_string "vs${NUMBER}") + ENDIF("${generator}" MATCHES "Visual Studio 7 .NET 2003") + SET(${var} ${ver_string} PARENT_SCOPE) +ENDFUNCTION(GET_VS_VERSION_STRING) + +IF(BUILD_TESTING) + # Setup some auxilary macros + MACRO(SET_IF_NOT_SET var val) + IF(NOT DEFINED "${var}") + SET("${var}" "${val}") + ENDIF(NOT DEFINED "${var}") + ENDMACRO(SET_IF_NOT_SET) + + MACRO(SET_IF_SET var val) + IF(NOT "${val}" MATCHES "^$") + SET("${var}" "${val}") + ENDIF(NOT "${val}" MATCHES "^$") + ENDMACRO(SET_IF_SET) + + MACRO(SET_IF_SET_AND_NOT_SET var val) + IF(NOT "${val}" MATCHES "^$") + SET_IF_NOT_SET("${var}" "${val}") + ENDIF(NOT "${val}" MATCHES "^$") + ENDMACRO(SET_IF_SET_AND_NOT_SET) + + # Make sure testing is enabled + ENABLE_TESTING() + + IF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") + INCLUDE("${PROJECT_SOURCE_DIR}/CTestConfig.cmake") + SET_IF_SET_AND_NOT_SET(NIGHTLY_START_TIME "${CTEST_NIGHTLY_START_TIME}") + SET_IF_SET_AND_NOT_SET(DROP_METHOD "${CTEST_DROP_METHOD}") + SET_IF_SET_AND_NOT_SET(DROP_SITE "${CTEST_DROP_SITE}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_USER "${CTEST_DROP_SITE_USER}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_PASSWORD "${CTEST_DROP_SITE_PASWORD}") + SET_IF_SET_AND_NOT_SET(DROP_SITE_MODE "${CTEST_DROP_SITE_MODE}") + SET_IF_SET_AND_NOT_SET(DROP_LOCATION "${CTEST_DROP_LOCATION}") + SET_IF_SET_AND_NOT_SET(TRIGGER_SITE "${CTEST_TRIGGER_SITE}") + SET_IF_SET_AND_NOT_SET(UPDATE_TYPE "${CTEST_UPDATE_TYPE}") + ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/CTestConfig.cmake") + + # the project can have a DartConfig.cmake file + IF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") + INCLUDE("${PROJECT_SOURCE_DIR}/DartConfig.cmake") + ELSE(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") + + # Dashboard is opened for submissions for a 24 hour period starting at + # the specified NIGHTLY_START_TIME. Time is specified in 24 hour format. + SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT") + SET_IF_NOT_SET(DROP_METHOD "http") + + # Dart server to submit results (used by client) + # There should be an option to specify submit method, but I will leave it + # commented until we decide what to do with it. + # SET(DROP_METHOD "http" CACHE STRING "Set the CTest submit method. Valid options are http and ftp") + IF(DROP_METHOD MATCHES http) + SET_IF_NOT_SET (DROP_SITE "public.kitware.com") + SET_IF_NOT_SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi") + ELSE(DROP_METHOD MATCHES http) + SET_IF_NOT_SET (DROP_SITE "public.kitware.com") + SET_IF_NOT_SET (DROP_LOCATION "/incoming") + SET_IF_NOT_SET (DROP_SITE_USER "anonymous") + SET_IF_NOT_SET (DROP_SITE_PASSWORD "random@someplace.com") + SET_IF_NOT_SET (DROP_SITE_MODE "active") + ENDIF(DROP_METHOD MATCHES http) + SET_IF_NOT_SET (TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Random-TestingResults.cgi") + SET_IF_NOT_SET (COMPRESS_SUBMISSION ON) + + # Dart server configuration + SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/random-rollup-dashboard.sh") + #SET (CVS_WEB_URL "") + #SET (CVS_WEB_CVSROOT "") + + #SET (USE_DOXYGEN "Off") + #SET (DOXYGEN_URL "" ) + ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") + SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT") + + # make program just needs to use CMAKE_MAKE_PROGRAM which is required + # to be defined by cmake + SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM}) + + FIND_PROGRAM(CVSCOMMAND cvs ) + SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING + "Options passed to the cvs update command.") + FIND_PROGRAM(SVNCOMMAND svn) + + IF(NOT UPDATE_TYPE) + IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") + SET(UPDATE_TYPE cvs) + ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") + IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") + SET(UPDATE_TYPE svn) + ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") + ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") + ENDIF(NOT UPDATE_TYPE) + + IF(NOT UPDATE_TYPE) + IF(NOT __CTEST_UPDATE_TYPE_COMPLAINED) + SET(__CTEST_UPDATE_TYPE_COMPLAINED 1 CACHE INTERNAL "Already complained about update type.") + MESSAGE(STATUS "CTest cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work.") + ENDIF(NOT __CTEST_UPDATE_TYPE_COMPLAINED) + ENDIF(NOT UPDATE_TYPE) + + IF(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]") + SET(UPDATE_COMMAND "${CVSCOMMAND}") + SET(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}") + ELSE(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]") + IF(UPDATE_TYPE MATCHES "[Ss][Vv][Nn]") + SET(UPDATE_COMMAND "${SVNCOMMAND}") + SET(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}") + ENDIF(UPDATE_TYPE MATCHES "[Ss][Vv][Nn]") + ENDIF(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]") + + SET(DART_TESTING_TIMEOUT 1500 CACHE STRING + "Maximum time allowed before CTest will kill the test.") + + FIND_PROGRAM(MEMORYCHECK_COMMAND + NAMES purify valgrind boundscheck + PATHS + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]" + DOC "Path to the memory checking command, used for memory error detection." + ) + SET(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH + "File that contains suppressions for the memory checker") + FIND_PROGRAM(SCPCOMMAND scp DOC + "Path to scp command, used by CTest for submitting results to a Dart server" + ) + FIND_PROGRAM(COVERAGE_COMMAND gcov DOC + "Path to the coverage program that CTest uses for performing coverage inspection" + ) + + # set the site name + SITE_NAME(SITE) + # set the build name + IF(NOT BUILDNAME) + SET(DART_COMPILER "${CMAKE_CXX_COMPILER}") + IF(NOT DART_COMPILER) + SET(DART_COMPILER "${CMAKE_C_COMPILER}") + ENDIF(NOT DART_COMPILER) + IF(NOT DART_COMPILER) + SET(DART_COMPILER "unknown") + ENDIF(NOT DART_COMPILER) + IF(WIN32) + SET(DART_NAME_COMPONENT "NAME_WE") + ELSE(WIN32) + SET(DART_NAME_COMPONENT "NAME") + ENDIF(WIN32) + IF(NOT BUILD_NAME_SYSTEM_NAME) + SET(BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}") + ENDIF(NOT BUILD_NAME_SYSTEM_NAME) + IF(WIN32) + SET(BUILD_NAME_SYSTEM_NAME "Win32") + ENDIF(WIN32) + IF(UNIX OR BORLAND) + GET_FILENAME_COMPONENT(DART_CXX_NAME + "${CMAKE_CXX_COMPILER}" ${DART_NAME_COMPONENT}) + ELSE(UNIX OR BORLAND) + GET_FILENAME_COMPONENT(DART_CXX_NAME + "${CMAKE_BUILD_TOOL}" ${DART_NAME_COMPONENT}) + ENDIF(UNIX OR BORLAND) + IF(DART_CXX_NAME MATCHES "msdev") + SET(DART_CXX_NAME "vs60") + ENDIF(DART_CXX_NAME MATCHES "msdev") + IF(DART_CXX_NAME MATCHES "devenv") + GET_VS_VERSION_STRING("${CMAKE_GENERATOR}" DART_CXX_NAME) + ENDIF(DART_CXX_NAME MATCHES "devenv") + SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}") + ENDIF(NOT BUILDNAME) + # set the build command + BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} ) + + MARK_AS_ADVANCED( + COVERAGE_COMMAND + CVSCOMMAND + SVNCOMMAND + CVS_UPDATE_OPTIONS + SVN_UPDATE_OPTIONS + MAKECOMMAND + MEMORYCHECK_COMMAND + MEMORYCHECK_SUPPRESSIONS_FILE + PURIFYCOMMAND + SCPCOMMAND + SITE + ) + # BUILDNAME + IF(NOT RUN_FROM_DART) + SET(RUN_FROM_CTEST_OR_DART 1) + INCLUDE(CTestTargets) + SET(RUN_FROM_CTEST_OR_DART) + ENDIF(NOT RUN_FROM_DART) +ENDIF(BUILD_TESTING) diff --git a/Modules/CTestTargets.cmake b/Modules/CTestTargets.cmake new file mode 100644 index 000000000..87f581988 --- /dev/null +++ b/Modules/CTestTargets.cmake @@ -0,0 +1,69 @@ +IF(NOT RUN_FROM_CTEST_OR_DART) + MESSAGE(FATAL_ERROR "Do not incldue CTestTargets.cmake directly") +ENDIF(NOT RUN_FROM_CTEST_OR_DART) + +# make directories in the binary tree +FILE(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/Testing/Temporary) +GET_FILENAME_COMPONENT(CMAKE_HOST_PATH ${CMAKE_COMMAND} PATH) +SET(CMAKE_TARGET_PATH ${EXECUTABLE_OUTPUT_PATH}) +FIND_PROGRAM(CMAKE_CTEST_COMMAND ctest ${CMAKE_HOST_PATH} ${CMAKE_TARGET_PATH}) +MARK_AS_ADVANCED(CMAKE_CTEST_COMMAND) + +# Use CTest +# configure files + +IF(CTEST_NEW_FORMAT) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/CTestConfiguration.ini ) +ELSE(CTEST_NEW_FORMAT) + CONFIGURE_FILE( + ${CMAKE_ROOT}/Modules/DartConfiguration.tcl.in + ${PROJECT_BINARY_DIR}/DartConfiguration.tcl ) +ENDIF(CTEST_NEW_FORMAT) + +# +# Section 3: +# +# Custom targets to perform dashboard builds and submissions. +# These should NOT need to be modified from project to project. +# + +SET(__conf_types "") +IF(CMAKE_CONFIGURATION_TYPES) + # We need to pass the configuration type on the test command line. + SET(__conf_types -C "${CMAKE_CFG_INTDIR}") +ENDIF(CMAKE_CONFIGURATION_TYPES) + +# Add convenience targets. Do this at most once in case of nested +# projects. +DEFINE_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED + BRIEF_DOCS "Internal property used by CTestTargets module." + FULL_DOCS "Set by the CTestTargets module to track addition of testing targets." + ) +GET_PROPERTY(_CTEST_TARGETS_ADDED GLOBAL PROPERTY CTEST_TARGETS_ADDED) +IF(NOT _CTEST_TARGETS_ADDED) + SET_PROPERTY(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) + + # For all generators add basic testing targets. + FOREACH(mode Experimental Nightly Continuous NightlyMemoryCheck) + ADD_CUSTOM_TARGET(${mode} + ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode} + ) + ENDFOREACH(mode) + + # For Makefile generators add more granular targets. + IF("${CMAKE_GENERATOR}" MATCHES Make) + # Make targets for Experimental builds + FOREACH(mode Nightly Experimental Continuous) + FOREACH(testtype + Start Update Configure Build Test Coverage MemCheck Submit + # missing purify + ) + ADD_CUSTOM_TARGET(${mode}${testtype} + ${CMAKE_CTEST_COMMAND} ${__conf_types} -D ${mode}${testtype} + ) + ENDFOREACH(testtype) + ENDFOREACH(mode) + ENDIF("${CMAKE_GENERATOR}" MATCHES Make) +ENDIF(NOT _CTEST_TARGETS_ADDED) diff --git a/Modules/CheckCCompilerFlag.cmake b/Modules/CheckCCompilerFlag.cmake new file mode 100644 index 000000000..b084399af --- /dev/null +++ b/Modules/CheckCCompilerFlag.cmake @@ -0,0 +1,21 @@ +# - Check whether the C compiler supports a given flag. +# CHECK_C_COMPILER_FLAG(FLAG VARIABLE) +# +# FLAG - the compiler flag +# VARIABLE - variable to store the result + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckCSourceCompiles) + +MACRO (CHECK_C_COMPILER_FLAG _FLAG _RESULT) + SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + CHECK_C_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}) + SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") +ENDMACRO (CHECK_C_COMPILER_FLAG) + diff --git a/Modules/CheckCSourceCompiles.cmake b/Modules/CheckCSourceCompiles.cmake new file mode 100755 index 000000000..46f860593 --- /dev/null +++ b/Modules/CheckCSourceCompiles.cmake @@ -0,0 +1,60 @@ +# - Check if the source code provided in the SOURCE argument compiles. +# CHECK_C_SOURCE_COMPILES(SOURCE VAR) +# - macro which checks if the source code compiles +# SOURCE - source code to try to compile +# VAR - variable to store whether the source code compiled +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_COMPILE(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + IF(${VAR}) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ELSE(${VAR}) + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF(${VAR}) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_C_SOURCE_COMPILES) + diff --git a/Modules/CheckCSourceRuns.cmake b/Modules/CheckCSourceRuns.cmake new file mode 100755 index 000000000..c5455ae10 --- /dev/null +++ b/Modules/CheckCSourceRuns.cmake @@ -0,0 +1,74 @@ +# - Check if the source code provided in the SOURCE argument compiles and runs. +# CHECK_C_SOURCE_RUNS(SOURCE VAR) +# - macro which checks if the source code runs +# SOURCE - source code to try to compile +# VAR - variable to store the result, 1 for success, empty for failure +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_C_SOURCE_RUNS SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_C_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}" + COMPILE_OUTPUT_VARIABLE OUTPUT) + # if it did not compile make the return value fail code of 1 + IF(NOT ${VAR}_COMPILED) + SET(${VAR}_EXITCODE 1) + ENDIF(NOT ${VAR}_COMPILED) + # if the return value was 0 then it worked + IF("${${VAR}_EXITCODE}" EQUAL 0) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}}\n" + "Source file was:\n${SOURCE}\n") + ELSE("${${VAR}_EXITCODE}" EQUAL 0) + IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "${${VAR}_EXITCODE}") + ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}_EXITCODE}\n" + "Source file was:\n${SOURCE}\n") + + ENDIF("${${VAR}_EXITCODE}" EQUAL 0) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_C_SOURCE_RUNS) + diff --git a/Modules/CheckCXXCompilerFlag.cmake b/Modules/CheckCXXCompilerFlag.cmake new file mode 100644 index 000000000..43ea9a64e --- /dev/null +++ b/Modules/CheckCXXCompilerFlag.cmake @@ -0,0 +1,21 @@ +# - Check whether the CXX compiler supports a given flag. +# CHECK_CXX_COMPILER_FLAG(FLAG VARIABLE) +# +# FLAG - the compiler flag +# VARIABLE - variable to store the result + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckCXXSourceCompiles) + +MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT) + SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}") + SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}") + CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT}) + SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}") +ENDMACRO (CHECK_CXX_COMPILER_FLAG) + diff --git a/Modules/CheckCXXSourceCompiles.cmake b/Modules/CheckCXXSourceCompiles.cmake new file mode 100755 index 000000000..e5c3eccb9 --- /dev/null +++ b/Modules/CheckCXXSourceCompiles.cmake @@ -0,0 +1,60 @@ +# - Check if the source code provided in the SOURCE argument compiles. +# CHECK_CXX_SOURCE_COMPILES(SOURCE VAR) +# - macro which checks if the source code compiles +# SOURCE - source code to try to compile +# VAR - variable to store whether the source code compiled +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_COMPILE(${VAR} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + IF(${VAR}) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ELSE(${VAR}) + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Source file was:\n${SOURCE}\n") + ENDIF(${VAR}) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_CXX_SOURCE_COMPILES) + diff --git a/Modules/CheckCXXSourceRuns.cmake b/Modules/CheckCXXSourceRuns.cmake new file mode 100755 index 000000000..b0c9ba52f --- /dev/null +++ b/Modules/CheckCXXSourceRuns.cmake @@ -0,0 +1,74 @@ +# - Check if the source code provided in the SOURCE argument compiles and runs. +# CHECK_CXX_SOURCE_RUNS(SOURCE VAR) +# - macro which checks if the source code compiles +# SOURCE - source code to try to compile +# VAR - variable to store the result, 1 for success, empty for failure +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_CXX_SOURCE_RUNS SOURCE VAR) + IF("${VAR}" MATCHES "^${VAR}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-D${VAR} ${CMAKE_REQUIRED_FLAGS}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FILE(WRITE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx" + "${SOURCE}\n") + + MESSAGE(STATUS "Performing Test ${VAR}") + TRY_RUN(${VAR}_EXITCODE ${VAR}_COMPILED + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/src.cxx + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH} + "${CHECK_CXX_SOURCE_COMPILES_ADD_LIBRARIES}" + "${CHECK_CXX_SOURCE_COMPILES_ADD_INCLUDES}" + COMPILE_OUTPUT_VARIABLE OUTPUT) + + # if it did not compile make the return value fail code of 1 + IF(NOT ${VAR}_COMPILED) + SET(${VAR}_EXITCODE 1) + ENDIF(NOT ${VAR}_COMPILED) + # if the return value was 0 then it worked + IF("${${VAR}_EXITCODE}" EQUAL 0) + SET(${VAR} 1 CACHE INTERNAL "Test ${VAR}") + MESSAGE(STATUS "Performing Test ${VAR} - Success") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}}\n" + "Source file was:\n${SOURCE}\n") + ELSE("${${VAR}_EXITCODE}" EQUAL 0) + IF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "${${VAR}_EXITCODE}") + ELSE(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + SET(${VAR} "" CACHE INTERNAL "Test ${VAR}") + ENDIF(CMAKE_CROSSCOMPILING AND "${${VAR}_EXITCODE}" MATCHES "FAILED_TO_RUN") + + MESSAGE(STATUS "Performing Test ${VAR} - Failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" + "${OUTPUT}\n" + "Return value: ${${VAR}_EXITCODE}\n" + "Source file was:\n${SOURCE}\n") + ENDIF("${${VAR}_EXITCODE}" EQUAL 0) + ENDIF("${VAR}" MATCHES "^${VAR}$") +ENDMACRO(CHECK_CXX_SOURCE_RUNS) + diff --git a/Modules/CheckForPthreads.c b/Modules/CheckForPthreads.c new file mode 100644 index 000000000..a846567ff --- /dev/null +++ b/Modules/CheckForPthreads.c @@ -0,0 +1,38 @@ +#include +#include +#include + +void* runner(void*); + +int res = 0; +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + pthread_t tid[2]; + pthread_create(&tid[0], 0, runner, (void*)1); + pthread_create(&tid[1], 0, runner, (void*)2); + +#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.) + usleep(1); // for strange behavior on single-processor sun +#endif + + pthread_join(tid[0], 0); + pthread_join(tid[1], 0); + if(ac > 1000){return *av[0];} + return res; +} + +void* runner(void* args) +{ + int cc; + for ( cc = 0; cc < 10; cc ++ ) + { + printf("%d CC: %d\n", (int)args, cc); + } + res ++; + return 0; +} diff --git a/Modules/CheckFortranFunctionExists.cmake b/Modules/CheckFortranFunctionExists.cmake new file mode 100644 index 000000000..4106a0693 --- /dev/null +++ b/Modules/CheckFortranFunctionExists.cmake @@ -0,0 +1,50 @@ +# - Check if the Fortran function exists. +# CHECK_FORTRAN_FUNCTION_EXISTS(FUNCTION VARIABLE) +# - macro which checks if the Fortran function exists +# FUNCTION - the name of the Fortran function +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link +# + +macro(CHECK_FORTRAN_FUNCTION_EXISTS FUNCTION VARIABLE) + if(NOT DEFINED ${VARIABLE}) + message(STATUS "Looking for Fortran ${FUNCTION}") + if(CMAKE_REQUIRED_LIBRARIES) + set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + else(CMAKE_REQUIRED_LIBRARIES) + set(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif(CMAKE_REQUIRED_LIBRARIES) + FILE(WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f + " + program TESTFortran + external ${FUNCTION} + end + " + ) + try_compile(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + if(${VARIABLE}) + set(${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") + message(STATUS "Looking for Fortran ${FUNCTION} - found") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n") + else(${VARIABLE}) + message(STATUS "Looking for Fortran ${FUNCTION} - not found") + set(${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}") + file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + endif(${VARIABLE}) + endif(NOT DEFINED ${VARIABLE}) +endmacro(CHECK_FORTRAN_FUNCTION_EXISTS) diff --git a/Modules/CheckFunctionExists.c b/Modules/CheckFunctionExists.c new file mode 100644 index 000000000..607b3e8c6 --- /dev/null +++ b/Modules/CheckFunctionExists.c @@ -0,0 +1,23 @@ +#ifdef CHECK_FUNCTION_EXISTS + +char CHECK_FUNCTION_EXISTS(); +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + CHECK_FUNCTION_EXISTS(); + if(ac > 1000) + { + return *av[0]; + } + return 0; +} + +#else /* CHECK_FUNCTION_EXISTS */ + +# error "CHECK_FUNCTION_EXISTS has to specify the function" + +#endif /* CHECK_FUNCTION_EXISTS */ diff --git a/Modules/CheckFunctionExists.cmake b/Modules/CheckFunctionExists.cmake new file mode 100644 index 000000000..e319a8137 --- /dev/null +++ b/Modules/CheckFunctionExists.cmake @@ -0,0 +1,54 @@ +# - Check if the function exists. +# CHECK_FUNCTION_EXISTS(FUNCTION VARIABLE) +# - macro which checks if the function exists +# FUNCTION - the name of the function +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(MACRO_CHECK_FUNCTION_DEFINITIONS + "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") + MESSAGE(STATUS "Looking for ${FUNCTION}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/CheckFunctionExists.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS} + "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + "${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + IF(${VARIABLE}) + SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}") + MESSAGE(STATUS "Looking for ${FUNCTION} - found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the function ${FUNCTION} exists passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for ${FUNCTION} - not found") + SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the function ${FUNCTION} exists failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_FUNCTION_EXISTS) diff --git a/Modules/CheckIncludeFile.c.in b/Modules/CheckIncludeFile.c.in new file mode 100644 index 000000000..ddfbee8be --- /dev/null +++ b/Modules/CheckIncludeFile.c.in @@ -0,0 +1,13 @@ +#include <${CHECK_INCLUDE_FILE_VAR}> + +#ifdef __CLASSIC_C__ +int main() +{ + return 0; +} +#else +int main(void) +{ + return 0; +} +#endif diff --git a/Modules/CheckIncludeFile.cmake b/Modules/CheckIncludeFile.cmake new file mode 100644 index 000000000..cfb692149 --- /dev/null +++ b/Modules/CheckIncludeFile.cmake @@ -0,0 +1,63 @@ +# - Check if the include file exists. +# CHECK_INCLUDE_FILE(INCLUDE VARIABLE) +# - macro which checks the include file exists. +# INCLUDE - name of include file +# VARIABLE - variable to return result +# +# an optional third argument is the CFlags to add to the compile line +# or you can use CMAKE_REQUIRED_FLAGS +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# +MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILE_C_INCLUDE_DIRS) + ENDIF(CMAKE_REQUIRED_INCLUDES) + SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS}) + SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c IMMEDIATE) + MESSAGE(STATUS "Looking for ${INCLUDE}") + IF(${ARGC} EQUAL 3) + SET(CMAKE_C_FLAGS_SAVE ${CMAKE_C_FLAGS}) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARGV2}") + ENDIF(${ARGC} EQUAL 3) + + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} + "${CHECK_INCLUDE_FILE_C_INCLUDE_DIRS}" + OUTPUT_VARIABLE OUTPUT) + + IF(${ARGC} EQUAL 3) + SET(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_SAVE}) + ENDIF(${ARGC} EQUAL 3) + + IF(${VARIABLE}) + MESSAGE(STATUS "Looking for ${INCLUDE} - found") + SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the include file ${INCLUDE} " + "exists passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for ${INCLUDE} - not found") + SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the include file ${INCLUDE} " + "exists failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_INCLUDE_FILE) diff --git a/Modules/CheckIncludeFile.cxx.in b/Modules/CheckIncludeFile.cxx.in new file mode 100644 index 000000000..40441f15a --- /dev/null +++ b/Modules/CheckIncludeFile.cxx.in @@ -0,0 +1,6 @@ +#include <${CHECK_INCLUDE_FILE_VAR}> + +int main() +{ + return 0; +} diff --git a/Modules/CheckIncludeFileCXX.cmake b/Modules/CheckIncludeFileCXX.cmake new file mode 100644 index 000000000..548515b9f --- /dev/null +++ b/Modules/CheckIncludeFileCXX.cmake @@ -0,0 +1,63 @@ +# - Check if the include file exists. +# CHECK_INCLUDE_FILE_CXX(INCLUDE VARIABLE) +# +# INCLUDE - name of include file +# VARIABLE - variable to return result +# +# An optional third argument is the CFlags to add to the compile line +# or you can use CMAKE_REQUIRED_FLAGS. +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# +MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS) + ENDIF(CMAKE_REQUIRED_INCLUDES) + SET(MACRO_CHECK_INCLUDE_FILE_FLAGS ${CMAKE_REQUIRED_FLAGS}) + SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE}) + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.cxx.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx IMMEDIATE) + MESSAGE(STATUS "Looking for C++ include ${INCLUDE}") + IF(${ARGC} EQUAL 3) + SET(CMAKE_CXX_FLAGS_SAVE ${CMAKE_CXX_FLAGS}) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARGV2}") + ENDIF(${ARGC} EQUAL 3) + + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFile.cxx + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILE_FLAGS} + "${CHECK_INCLUDE_FILE_CXX_INCLUDE_DIRS}" + OUTPUT_VARIABLE OUTPUT) + + IF(${ARGC} EQUAL 3) + SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_SAVE}) + ENDIF(${ARGC} EQUAL 3) + + IF(${VARIABLE}) + MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - found") + SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the include file ${INCLUDE} " + "exists passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for C++ include ${INCLUDE} - not found") + SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the include file ${INCLUDE} " + "exists failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_INCLUDE_FILE_CXX) diff --git a/Modules/CheckIncludeFiles.cmake b/Modules/CheckIncludeFiles.cmake new file mode 100644 index 000000000..bf791e7ed --- /dev/null +++ b/Modules/CheckIncludeFiles.cmake @@ -0,0 +1,59 @@ +# - Check if the files can be included +# +# CHECK_INCLUDE_FILES(INCLUDE VARIABLE) +# +# INCLUDE - list of files to include +# VARIABLE - variable to return result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories + +MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILES_INCLUDE_DIRS "-DINCLUDE_DIRECTORIES=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILES_INCLUDE_DIRS) + ENDIF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_INCLUDE_FILES_CONTENT "/* */\n") + SET(MACRO_CHECK_INCLUDE_FILES_FLAGS ${CMAKE_REQUIRED_FLAGS}) + FOREACH(FILE ${INCLUDE}) + SET(CMAKE_CONFIGURABLE_FILE_CONTENT + "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n") + ENDFOREACH(FILE) + SET(CMAKE_CONFIGURABLE_FILE_CONTENT + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n\nint main(){return 0;}\n") + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c" @ONLY IMMEDIATE) + + MESSAGE(STATUS "Looking for include files ${VARIABLE}") + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckIncludeFiles.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_INCLUDE_FILES_FLAGS} + "${CHECK_INCLUDE_FILES_INCLUDE_DIRS}" + OUTPUT_VARIABLE OUTPUT) + IF(${VARIABLE}) + MESSAGE(STATUS "Looking for include files ${VARIABLE} - found") + SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if files ${INCLUDE} " + "exist passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.") + SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if files ${INCLUDE} " + "exist failed with the following output:\n" + "${OUTPUT}\nSource:\n${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_INCLUDE_FILES) diff --git a/Modules/CheckLibraryExists.cmake b/Modules/CheckLibraryExists.cmake new file mode 100644 index 000000000..1e8a6bfed --- /dev/null +++ b/Modules/CheckLibraryExists.cmake @@ -0,0 +1,52 @@ +# - Check if the function exists. +# CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE) +# +# LIBRARY - the name of the library you are looking for +# FUNCTION - the name of the function +# LOCATION - location where the library should be found +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION + "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}") + MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}") + SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY}) + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_LIBRARY_EXISTS_LIBRARIES + ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES}) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/CheckFunctionExists.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION} + -DLINK_DIRECTORIES:STRING=${LOCATION} + "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) + + IF(${VARIABLE}) + MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found") + SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " + "passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found") + SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the function ${FUNCTION} exists in the ${LIBRARY} " + "failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_LIBRARY_EXISTS) diff --git a/Modules/CheckLibraryExists.lists.in b/Modules/CheckLibraryExists.lists.in new file mode 100644 index 000000000..741b87d72 --- /dev/null +++ b/Modules/CheckLibraryExists.lists.in @@ -0,0 +1,8 @@ +PROJECT(CHECK_LIBRARY_EXISTS) + + +ADD_DEFINITIONS(-DCHECK_FUNCTION_EXISTS=${CHECK_LIBRARY_EXISTS_FUNCTION}) +LINK_DIRECTORIES(${CHECK_LIBRARY_EXISTS_LOCATION}) +ADD_EXECUTABLE(CheckLibraryExists ${CHECK_LIBRARY_EXISTS_SOURCE}) +TARGET_LINK_LIBRARIES(CheckLibraryExists ${CHECK_LIBRARY_EXISTS_LIBRARY}) + diff --git a/Modules/CheckSizeOf.cmake b/Modules/CheckSizeOf.cmake new file mode 100644 index 000000000..3820d4c52 --- /dev/null +++ b/Modules/CheckSizeOf.cmake @@ -0,0 +1,4 @@ +MESSAGE(SEND_ERROR + "Modules/CheckSizeOf.cmake has been removed. " + "Use Modules/CheckTypeSize.cmake instead. This " + "compatability check may be removed before the next release!") diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake new file mode 100644 index 000000000..f8a7d32af --- /dev/null +++ b/Modules/CheckStructHasMember.cmake @@ -0,0 +1,39 @@ +# - Check if the given struct or class has the specified member variable +# CHECK_STRUCT_HAS_MEMBER (STRUCT MEMBER HEADER VARIABLE) +# +# STRUCT - the name of the struct or class you are interested in +# MEMBER - the member which existence you want to check +# HEADER - the header(s) where the prototype should be declared +# VARIABLE - variable to store the result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# +# Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC) + + +INCLUDE(CheckCSourceCompiles) + +MACRO (CHECK_STRUCT_HAS_MEMBER _STRUCT _MEMBER _HEADER _RESULT) + SET(_INCLUDE_FILES) + FOREACH (it ${_HEADER}) + SET(_INCLUDE_FILES "${_INCLUDE_FILES}#include <${it}>\n") + ENDFOREACH (it) + + SET(_CHECK_STRUCT_MEMBER_SOURCE_CODE " +${_INCLUDE_FILES} +int main() +{ + ${_STRUCT}* tmp; + tmp->${_MEMBER}; + return 0; +} +") + CHECK_C_SOURCE_COMPILES("${_CHECK_STRUCT_MEMBER_SOURCE_CODE}" ${_RESULT}) + +ENDMACRO (CHECK_STRUCT_HAS_MEMBER) + diff --git a/Modules/CheckSymbolExists.cmake b/Modules/CheckSymbolExists.cmake new file mode 100755 index 000000000..99b891891 --- /dev/null +++ b/Modules/CheckSymbolExists.cmake @@ -0,0 +1,70 @@ +# - Check if the symbol exists in include files +# CHECK_SYMBOL_EXISTS(SYMBOL FILES VARIABLE) +# +# SYMBOL - symbol +# FILES - include files to check +# VARIABLE - variable to return result +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_SYMBOL_EXISTS SYMBOL FILES VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(CMAKE_CONFIGURABLE_FILE_CONTENT "/* */\n") + SET(MACRO_CHECK_SYMBOL_EXISTS_FLAGS ${CMAKE_REQUIRED_FLAGS}) + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_SYMBOL_EXISTS_LIBS + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_SYMBOL_EXISTS_LIBS) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CMAKE_SYMBOL_EXISTS_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ELSE(CMAKE_REQUIRED_INCLUDES) + SET(CMAKE_SYMBOL_EXISTS_INCLUDES) + ENDIF(CMAKE_REQUIRED_INCLUDES) + FOREACH(FILE ${FILES}) + SET(CMAKE_CONFIGURABLE_FILE_CONTENT + "${CMAKE_CONFIGURABLE_FILE_CONTENT}#include <${FILE}>\n") + ENDFOREACH(FILE) + SET(CMAKE_CONFIGURABLE_FILE_CONTENT + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\nvoid cmakeRequireSymbol(int dummy,...){(void)dummy;}\nint main()\n{\n#ifndef ${SYMBOL}\n cmakeRequireSymbol(0,&${SYMBOL});\n#endif\n return 0;\n}\n") + + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c" @ONLY) + + MESSAGE(STATUS "Looking for ${SYMBOL}") + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS + -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_SYMBOL_EXISTS_FLAGS} + "${CHECK_SYMBOL_EXISTS_LIBS}" + "${CMAKE_SYMBOL_EXISTS_INCLUDES}" + OUTPUT_VARIABLE OUTPUT) + IF(${VARIABLE}) + MESSAGE(STATUS "Looking for ${SYMBOL} - found") + SET(${VARIABLE} 1 CACHE INTERNAL "Have symbol ${SYMBOL}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the ${SYMBOL} " + "exist passed with the following output:\n" + "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n" + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Looking for ${SYMBOL} - not found.") + SET(${VARIABLE} "" CACHE INTERNAL "Have symbol ${SYMBOL}") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the ${SYMBOL} " + "exist failed with the following output:\n" + "${OUTPUT}\nFile ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckSymbolExists.c:\n" + "${CMAKE_CONFIGURABLE_FILE_CONTENT}\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_SYMBOL_EXISTS) diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake new file mode 100644 index 000000000..cc5dcebce --- /dev/null +++ b/Modules/CheckTypeSize.cmake @@ -0,0 +1,104 @@ +# - Check sizeof a type +# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY]) +# Check if the type exists and determine size of type. if the type +# exists, the size will be stored to the variable. This also +# calls check_include_file for sys/types.h stdint.h +# and stddef.h, setting HAVE_SYS_TYPES_H, HAVE_STDINT_H, +# and HAVE_STDDEF_H. This is because many types are stored +# in these include files. +# VARIABLE - variable to store size if the type exists. +# HAVE_${VARIABLE} - does the variable exists or not +# BUILTIN_TYPES_ONLY - The third argument is optional and if +# it is set to the string BUILTIN_TYPES_ONLY +# this macro will not check for any header files. +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_INCLUDES = list of include directories +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +# These variables are referenced in CheckTypeSizeC.c so we have +# to check for them. + +include(CheckIncludeFile) + +MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) + IF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY") + check_include_file(sys/types.h HAVE_SYS_TYPES_H) + check_include_file(stdint.h HAVE_STDINT_H) + check_include_file(stddef.h HAVE_STDDEF_H) + ENDIF(NOT "${ARGV2}" STREQUAL "BUILTIN_TYPES_ONLY") + + IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + MESSAGE(STATUS "Check size of ${TYPE}") + SET(CHECK_TYPE_SIZE_TYPE "${TYPE}") + SET(MACRO_CHECK_TYPE_SIZE_FLAGS + "${CMAKE_REQUIRED_FLAGS}") + FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H) + IF("${def}") + SET(MACRO_CHECK_TYPE_SIZE_FLAGS + "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}") + ENDIF("${def}") + ENDFOREACH(def) + SET(CHECK_TYPE_SIZE_PREINCLUDE) + SET(CHECK_TYPE_SIZE_PREMAIN) + SET(CHECK_TYPE_SIZE_ADD_LIBRARIES) + SET(CHECK_TYPE_SIZE_ADD_INCLUDES) + + FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES}) + SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n") + ENDFOREACH(def) + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_TYPE_SIZE_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ENDIF(CMAKE_REQUIRED_LIBRARIES) + IF(CMAKE_REQUIRED_INCLUDES) + SET(CHECK_TYPE_SIZE_ADD_INCLUDES + "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}") + ENDIF(CMAKE_REQUIRED_INCLUDES) + + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSizeC.c.in" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c" IMMEDIATE @ONLY) + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c" + CHECK_TYPE_SIZE_FILE_CONTENT) + TRY_COMPILE(HAVE_${VARIABLE} + ${CMAKE_BINARY_DIR} + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckTypeSizeC.c" + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS} + "${CHECK_TYPE_SIZE_ADD_LIBRARIES}" + "${CHECK_TYPE_SIZE_ADD_INCLUDES}" + OUTPUT_VARIABLE OUTPUT + COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin" ) + + IF(HAVE_${VARIABLE}) + FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize.bin" + CMAKE_CHECKTYPESIZE_STRINGS LIMIT_COUNT 2 REGEX "INFO:sizeof") + + SET(CMAKE_CHECKTYPESIZE_FIRST_RESULT "FIRST_LOOP") + FOREACH(info ${CMAKE_CHECKTYPESIZE_STRINGS}) + IF("${info}" MATCHES ".*INFO:sizeof\\[0*([^]]*)\\].*") + STRING(REGEX REPLACE ".*INFO:sizeof\\[0*([^]]*)\\].*" "\\1" ${VARIABLE} "${info}") + ENDIF("${info}" MATCHES ".*INFO:sizeof\\[0*([^]]*)\\].*") + IF("${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "FIRST_LOOP") + SET(CMAKE_CHECKTYPESIZE_FIRST_RESULT "${${VARIABLE}}") + ENDIF("${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "FIRST_LOOP") + IF(NOT "${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "${${VARIABLE}}") + MESSAGE(SEND_ERROR "CHECK_TYPE_SIZE found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !") + ENDIF(NOT "${CMAKE_CHECKTYPESIZE_FIRST_RESULT}" STREQUAL "${${VARIABLE}}") + + ENDFOREACH(info ${CMAKE_CHECKTYPESIZE_STRINGS}) + MESSAGE(STATUS "Check size of ${TYPE} - done") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n") + ELSE(HAVE_${VARIABLE}) + MESSAGE(STATUS "Check size of ${TYPE} - failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSizeC.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n") + SET(${VARIABLE}) + ENDIF(HAVE_${VARIABLE}) + SET(${VARIABLE} "${${VARIABLE}}" CACHE INTERNAL "Result of CHECK_TYPE_SIZE" FORCE) + ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") +ENDMACRO(CHECK_TYPE_SIZE) diff --git a/Modules/CheckTypeSizeC.c.in b/Modules/CheckTypeSizeC.c.in new file mode 100644 index 000000000..c25b69dcb --- /dev/null +++ b/Modules/CheckTypeSizeC.c.in @@ -0,0 +1,47 @@ +#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@ +#ifdef CHECK_TYPE_SIZE_TYPE + +@CHECK_TYPE_SIZE_PREINCLUDE@ +#ifdef HAVE_SYS_TYPES_H +# include +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_STDINT_H +# include +#endif /* HAVE_STDINT_H */ + +#ifdef HAVE_STDDEF_H +# include +#endif /* HAVE_STDDEF_H */ + +@CHECK_TYPE_SIZE_PREMAIN@ + +#ifdef __CLASSIC_C__ +# define const +#endif + +#define SIZE (sizeof(@CHECK_TYPE_SIZE_TYPE@)) +const char info_sizeof[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','o','f','[', + ('0' + ((SIZE / 10000)%10)), + ('0' + ((SIZE / 1000)%10)), + ('0' + ((SIZE / 100)%10)), + ('0' + ((SIZE / 10)%10)), + ('0' + (SIZE % 10)), + ']','\0'}; + + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + return (&info_sizeof[0] != &info_sizeof[0]); +} + +#else /* CHECK_TYPE_SIZE_TYPE */ + +# error "CHECK_TYPE_SIZE_TYPE has to specify the type" + +#endif /* CHECK_TYPE_SIZE_TYPE */ diff --git a/Modules/CheckVariableExists.c b/Modules/CheckVariableExists.c new file mode 100644 index 000000000..752f6e486 --- /dev/null +++ b/Modules/CheckVariableExists.c @@ -0,0 +1,20 @@ +#ifdef CHECK_VARIABLE_EXISTS + +extern int CHECK_VARIABLE_EXISTS; + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + if(ac > 1000){return *av[0];} + return CHECK_VARIABLE_EXISTS; +} + +#else /* CHECK_VARIABLE_EXISTS */ + +# error "CHECK_VARIABLE_EXISTS has to specify the variable" + +#endif /* CHECK_VARIABLE_EXISTS */ diff --git a/Modules/CheckVariableExists.cmake b/Modules/CheckVariableExists.cmake new file mode 100644 index 000000000..a6cdc01fc --- /dev/null +++ b/Modules/CheckVariableExists.cmake @@ -0,0 +1,48 @@ +# - Check if the variable exists. +# CHECK_VARIABLE_EXISTS(VAR VARIABLE) +# +# VAR - the name of the variable +# VARIABLE - variable to store the result +# +# This macro is only for C variables. +# +# The following variables may be set before calling this macro to +# modify the way the check is run: +# +# CMAKE_REQUIRED_FLAGS = string of compile command line flags +# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar) +# CMAKE_REQUIRED_LIBRARIES = list of libraries to link + +MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE) + IF("${VARIABLE}" MATCHES "^${VARIABLE}$") + SET(MACRO_CHECK_VARIABLE_DEFINITIONS + "-DCHECK_VARIABLE_EXISTS=${VAR} ${CMAKE_REQUIRED_FLAGS}") + MESSAGE(STATUS "Looking for ${VAR}") + IF(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}") + ELSE(CMAKE_REQUIRED_LIBRARIES) + SET(CHECK_VARIABLE_EXISTS_ADD_LIBRARIES) + ENDIF(CMAKE_REQUIRED_LIBRARIES) + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/CheckVariableExists.c + COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_VARIABLE_DEFINITIONS} + "${CHECK_VARIABLE_EXISTS_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT) + IF(${VARIABLE}) + SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}") + MESSAGE(STATUS "Looking for ${VAR} - found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the variable ${VAR} exists passed with the following output:\n" + "${OUTPUT}\n\n") + ELSE(${VARIABLE}) + SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}") + MESSAGE(STATUS "Looking for ${VAR} - not found") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the variable ${VAR} exists failed with the following output:\n" + "${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$") +ENDMACRO(CHECK_VARIABLE_EXISTS) diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake new file mode 100644 index 000000000..a20deaedb --- /dev/null +++ b/Modules/Dart.cmake @@ -0,0 +1,110 @@ +# - Configure a project for testing with CTest or old Dart Tcl Client +# This file is the backwards-compatibility version of the CTest module. +# It supports using the old Dart 1 Tcl client for driving dashboard +# submissions as well as testing with CTest. This module should be included +# in the CMakeLists.txt file at the top of a project. Typical usage: +# INCLUDE(Dart) +# IF(BUILD_TESTING) +# # ... testing related CMake code ... +# ENDIF(BUILD_TESTING) +# The BUILD_TESTING option is created by the Dart module to determine +# whether testing support should be enabled. The default is ON. + +# This file configures a project to use the Dart testing/dashboard process. +# It is broken into 3 sections. +# +# Section #1: Locate programs on the client and determine site and build name +# Section #2: Configure or copy Tcl scripts from the source tree to build tree +# Section #3: Custom targets for performing dashboard builds. +# +# +OPTION(BUILD_TESTING "Build the testing tree." ON) + +IF(BUILD_TESTING) + FIND_PACKAGE(Dart QUIET) + + # + # Section #1: + # + # CMake commands that will not vary from project to project. Locates programs + # on the client and configure site name and build name. + # + + SET(RUN_FROM_DART 1) + INCLUDE(CTest) + SET(RUN_FROM_DART) + + FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip + DOC "Path to program used to compress files for transfer to the dart server") + FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable") + FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.") + OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes." + OFF) + OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 ) + OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 ) + + SET(VERBOSE_BUILD ${DART_VERBOSE_BUILD}) + SET(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT}) + SET(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT}) + SET (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?") + + MARK_AS_ADVANCED( + COMPRESSIONCOMMAND + DART_BUILD_ERROR_REPORT_LIMIT + DART_BUILD_WARNING_REPORT_LIMIT + DART_TESTING_TIMEOUT + DART_VERBOSE_BUILD + DELIVER_CONTINUOUS_EMAIL + GUNZIPCOMMAND + JAVACOMMAND + ) + + SET(HAVE_DART) + IF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in") + SET(HAVE_DART 1) + ENDIF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in") + + # + # Section #2: + # + # Make necessary directories and configure testing scripts + # + # find a tcl shell command + IF(HAVE_DART) + FIND_PACKAGE(Tclsh) + ENDIF(HAVE_DART) + + + IF (HAVE_DART) + # make directories in the binary tree + FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard" + "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}") + + # configure files + CONFIGURE_FILE( + "${DART_ROOT}/Source/Client/Dart.conf.in" + "${PROJECT_BINARY_DIR}/DartConfiguration.tcl" ) + + # + # Section 3: + # + # Custom targets to perform dashboard builds and submissions. + # These should NOT need to be modified from project to project. + # + + # add testing targets + SET(DART_EXPERIMENTAL_NAME Experimental) + IF(DART_EXPERIMENTAL_USE_PROJECT_NAME) + SET(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}") + ENDIF(DART_EXPERIMENTAL_USE_PROJECT_NAME) + ENDIF (HAVE_DART) + + SET(RUN_FROM_CTEST_OR_DART 1) + INCLUDE(CTestTargets) + SET(RUN_FROM_CTEST_OR_DART) +ENDIF(BUILD_TESTING) + +# +# End of Dart.cmake +# + diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in new file mode 100644 index 000000000..3ff6a59d0 --- /dev/null +++ b/Modules/DartConfiguration.tcl.in @@ -0,0 +1,62 @@ +# This file is configured by CMake automatically as DartConfiguration.tcl +# If you choose not to use CMake, this file may be hand configured, by +# filling in the required variables. + + +# Configuration directories and files +SourceDirectory: @PROJECT_SOURCE_DIR@ +BuildDirectory: @PROJECT_BINARY_DIR@ + +# Site is something like machine.domain, i.e. pragmatic.crd +Site: @SITE@ + +# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ +BuildName: @BUILDNAME@ + +# Submission information +IsCDash: @CTEST_DROP_SITE_CDASH@ +DropSite: @DROP_SITE@ +DropLocation: @DROP_LOCATION@ +DropSiteUser: @DROP_SITE_USER@ +DropSitePassword: @DROP_SITE_PASSWORD@ +DropSiteMode: @DROP_SITE_MODE@ +DropMethod: @DROP_METHOD@ +TriggerSite: @TRIGGER_SITE@ +ScpCommand: @SCPCOMMAND@ + +# Dashboard start time +NightlyStartTime: @NIGHTLY_START_TIME@ + +# Commands for the build/test/submit cycle +ConfigureCommand: "@CMAKE_COMMAND@" "@PROJECT_SOURCE_DIR@" +MakeCommand: @MAKECOMMAND@ + +# CVS options +# Default is "-d -P -A" +CVSCommand: @CVSCOMMAND@ +CVSUpdateOptions: @CVS_UPDATE_OPTIONS@ + +# Subversion options +SVNCommand: @SVNCOMMAND@ +SVNUpdateOptions: @SVN_UPDATE_OPTIONS@ + +# Generic update command +UpdateCommand: @UPDATE_COMMAND@ +UpdateOptions: @UPDATE_OPTIONS@ +UpdateType: @UPDATE_TYPE@ + +# Dynamic analisys and coverage +PurifyCommand: @PURIFYCOMMAND@ +ValgrindCommand: @VALGRIND_COMMAND@ +ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@ +MemoryCheckCommand: @MEMORYCHECK_COMMAND@ +MemoryCheckCommandOptions: @MEMORYCHECK_COMMAND_OPTIONS@ +MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@ +CoverageCommand: @COVERAGE_COMMAND@ + +# Testing options +# TimeOut is the amount of time in seconds to wait for processes +# to complete during testing. After TimeOut seconds, the +# process will be summaily terminated. +# Currently set to 25 minutes +TimeOut: @DART_TESTING_TIMEOUT@ diff --git a/Modules/Documentation.cmake b/Modules/Documentation.cmake new file mode 100644 index 000000000..73998be8a --- /dev/null +++ b/Modules/Documentation.cmake @@ -0,0 +1,39 @@ +# - DocumentationVTK.cmake +# This file provides support for the VTK documentation framework. +# It relies on several tools (Doxygen, Perl, etc). + +# +# Build the documentation ? +# +OPTION(BUILD_DOCUMENTATION "Build the documentation (Doxygen)." OFF) +MARK_AS_ADVANCED(BUILD_DOCUMENTATION) + +IF (BUILD_DOCUMENTATION) + + # + # Check for the tools + # + FIND_PACKAGE(UnixCommands) + FIND_PACKAGE(Doxygen) + FIND_PACKAGE(Gnuplot) + FIND_PACKAGE(HTMLHelp) + FIND_PACKAGE(Perl) + FIND_PACKAGE(Wget) + + OPTION(DOCUMENTATION_HTML_HELP + "Build the HTML Help file (CHM)." OFF) + + OPTION(DOCUMENTATION_HTML_TARZ + "Build a compressed tar archive of the HTML doc." OFF) + + MARK_AS_ADVANCED( + DOCUMENTATION_HTML_HELP + DOCUMENTATION_HTML_TARZ + ) + + # + # The documentation process is controled by a batch file. + # We will probably need bash to create the custom target + # + +ENDIF (BUILD_DOCUMENTATION) diff --git a/Modules/DummyCXXFile.cxx b/Modules/DummyCXXFile.cxx new file mode 100755 index 000000000..f8b643afb --- /dev/null +++ b/Modules/DummyCXXFile.cxx @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Modules/FLTKCompatibility.cmake b/Modules/FLTKCompatibility.cmake new file mode 100644 index 000000000..0a4226063 --- /dev/null +++ b/Modules/FLTKCompatibility.cmake @@ -0,0 +1 @@ +INCLUDE(CheckIncludeFile) diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake new file mode 100644 index 000000000..788ad02a3 --- /dev/null +++ b/Modules/FeatureSummary.cmake @@ -0,0 +1,64 @@ +# - Macros for generating a summary of enabled/disabled features +# +# PRINT_ENABLED_FEATURES() +# Print a summary of all enabled features. By default all successfull +# FIND_PACKAGE() calls will appear here, except the ones which used the QUIET keyword. +# Additional features can be added by appending an entry to the global ENABLED_FEATURES +# property. If SET_FEATURE_INFO() is used for that feature, the output will be much +# more informative. +# +# PRINT_DISABLED_FEATURES() +# Same as PRINT_ENABLED_FEATURES(), but for disabled features. It can be extended +# the same way by adding to the global property DISABLED_FEATURES. +# +# SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ] ) +# Use this macro to set up information about the named feature, which will +# then be displayed by PRINT_ENABLED/DISABLED_FEATURES(). +# Example: SET_FEATURE_INFO(LibXml2 "XML processing library." "http://xmlsoft.org/") +# + + +MACRO(SET_FEATURE_INFO _name _desc) + SET(_url "${ARGV2}") + SET(_comment "${ARGV3}") + SET_PROPERTY(GLOBAL PROPERTY ${_name}_DESCRIPTION "${_desc}" ) + IF(_url MATCHES ".+") + SET_PROPERTY(GLOBAL PROPERTY ${_name}_URL "${_url}" ) + ENDIF(_url MATCHES ".+") + IF(_comment MATCHES ".+") + SET_PROPERTY(GLOBAL PROPERTY ${_name}_COMMENT "${_comment}" ) + ENDIF(_comment MATCHES ".+") +ENDMACRO(SET_FEATURE_INFO) + + +MACRO(_PRINT_FEATURES _property _text) + SET(_currentFeatureText "${_text}") + GET_PROPERTY(_EnabledFeatures GLOBAL PROPERTY ${_property}) + FOREACH(_currentFeature ${_EnabledFeatures}) + SET(_currentFeatureText "${_currentFeatureText}\n${_currentFeature}") + GET_PROPERTY(_info GLOBAL PROPERTY ${_currentFeature}_DESCRIPTION) + IF(_info) + SET(_currentFeatureText "${_currentFeatureText} , ${_info}") + ENDIF(_info) + GET_PROPERTY(_info GLOBAL PROPERTY ${_currentFeature}_URL) + IF(_info) + SET(_currentFeatureText "${_currentFeatureText} , <${_info}>") + ENDIF(_info) + GET_PROPERTY(_info GLOBAL PROPERTY ${_currentFeature}_COMMENT) + IF(_info) + SET(_currentFeatureText "${_currentFeatureText} , ${_info}") + ENDIF(_info) + ENDFOREACH(_currentFeature) + MESSAGE(STATUS "${_currentFeatureText}\n") +ENDMACRO(_PRINT_FEATURES) + + +MACRO(PRINT_ENABLED_FEATURES) + _PRINT_FEATURES( ENABLED_FEATURES "Enabled features:") +ENDMACRO(PRINT_ENABLED_FEATURES) + + +MACRO(PRINT_DISABLED_FEATURES) + _PRINT_FEATURES( DISABLED_FEATURES "Disabled features:") +ENDMACRO(PRINT_DISABLED_FEATURES) + diff --git a/Modules/FindASPELL.cmake b/Modules/FindASPELL.cmake new file mode 100644 index 000000000..d43ea9d8e --- /dev/null +++ b/Modules/FindASPELL.cmake @@ -0,0 +1,30 @@ +# - Try to find ASPELL +# Once done this will define +# +# ASPELL_FOUND - system has ASPELL +# ASPELL_INCLUDE_DIR - the ASPELL include directory +# ASPELL_LIBRARIES - The libraries needed to use ASPELL +# ASPELL_DEFINITIONS - Compiler switches required for using ASPELL + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES) + # Already in cache, be silent + SET(ASPELL_FIND_QUIETLY TRUE) +ENDIF (ASPELL_INCLUDE_DIR AND ASPELL_LIBRARIES) + +FIND_PATH(ASPELL_INCLUDE_DIR aspell.h ) + +FIND_LIBRARY(ASPELL_LIBRARIES NAMES aspell aspell-15 libaspell-15 libaspell) + +# handle the QUIETLY and REQUIRED arguments and set ASPELL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASPELL DEFAULT_MSG ASPELL_LIBRARIES ASPELL_INCLUDE_DIR) + + +MARK_AS_ADVANCED(ASPELL_INCLUDE_DIR ASPELL_LIBRARIES) diff --git a/Modules/FindAVIFile.cmake b/Modules/FindAVIFile.cmake new file mode 100644 index 000000000..f393bc33f --- /dev/null +++ b/Modules/FindAVIFile.cmake @@ -0,0 +1,39 @@ +# - Locate AVIFILE library and include paths +# AVIFILE (http://avifile.sourceforge.net/)is a set of libraries for +# i386 machines +# to use various AVI codecs. Support is limited beyond Linux. Windows +# provides native AVI support, and so doesn't need this library. +# This module defines +# AVIFILE_INCLUDE_DIR, where to find avifile.h , etc. +# AVIFILE_LIBRARIES, the libraries to link against +# AVIFILE_DEFINITIONS, definitions to use when compiling +# AVIFILE_FOUND, If false, don't try to use AVIFILE + +IF (UNIX) + + FIND_PATH(AVIFILE_INCLUDE_DIR avifile.h + /usr/local/avifile/include + /usr/local/include/avifile + /usr/include + ) + + FIND_LIBRARY(AVIFILE_AVIPLAY_LIBRARY aviplay + /usr/local/avifile/lib + /usr/local/lib + /usr/lib + ) + +ENDIF (UNIX) + +SET (AVIFILE_FOUND "NO") + +IF(AVIFILE_INCLUDE_DIR) + IF(AVIFILE_AVIPLAY_LIBRARY) + SET( AVIFILE_LIBRARIES ${AVIFILE_AVIPLAY_LIBRARY} ) + SET( AVIFILE_FOUND "YES" ) + SET( AVIFILE_DEFINITIONS "") + + ENDIF(AVIFILE_AVIPLAY_LIBRARY) +ENDIF(AVIFILE_INCLUDE_DIR) + + diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake new file mode 100644 index 000000000..fca885a5f --- /dev/null +++ b/Modules/FindBLAS.cmake @@ -0,0 +1,338 @@ +# - Find BLAS library +# This module finds an installed fortran library that implements the BLAS +# linear-algebra interface (see http://www.netlib.org/blas/). +# The list of libraries searched for is taken +# from the autoconf macro file, acx_blas.m4 (distributed at +# http://ac-archive.sourceforge.net/ac-archive/acx_blas.html). +# +# This module sets the following variables: +# BLAS_FOUND - set to true if a library implementing the BLAS interface +# is found +# BLAS_LINKER_FLAGS - uncached list of required linker flags (excluding -l +# and -L). +# BLAS_LIBRARIES - uncached list of libraries (using full path name) to +# link against to use BLAS +# BLAS95_LIBRARIES - uncached list of libraries (using full path name) # to link against to use BLAS95 interface +# + +include(CheckFortranFunctionExists) + +macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list) +# This macro checks for the existence of the combination of fortran libraries +# given by _list. If the combination is found, this macro checks (using the +# Check_Fortran_Function_Exists macro) whether can link against that library +# combination using the name of a routine given by _name using the linker +# flags given by _flags. If the combination of libraries is found and passes +# the link test, LIBRARIES is set to the list of complete library paths that +# have been found. Otherwise, LIBRARIES is set to FALSE. + +# N.B. _prefix is the prefix applied to the names of all cached variables that +# are generated internally and marked advanced by this macro. + +set(_libraries_work TRUE) +set(${LIBRARIES}) +set(_combined_name) +foreach(_library ${_list}) + set(_combined_name ${_combined_name}_${_library}) + + if(_libraries_work) + + if ( WIN32 ) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ENV LIB + ) + endif ( WIN32 ) + + if ( APPLE ) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH + ) + + else ( APPLE ) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH + ) + endif( APPLE ) + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif(_libraries_work) +endforeach(_library ${_list}) +if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}}) + #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + set(CMAKE_REQUIRED_LIBRARIES) + mark_as_advanced(${_prefix}${_combined_name}_WORKS) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) +endif(_libraries_work) +if(NOT _libraries_work) + set(${LIBRARIES} FALSE) +endif(NOT _libraries_work) +#message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endmacro(Check_Fortran_Libraries) + +set(BLAS_LINKER_FLAGS) +set(BLAS_LIBRARIES) +set(BLAS95_LIBRARIES) + + + +if(NOT BLAS_LIBRARIES) + # BLAS in ATLAS library? (http://math-atlas.sourceforge.net/) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + cblas_dgemm + "" + "cblas;f77blas;atlas" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in PhiPACK libraries? (requires generic BLAS lib, too) +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "sgemm;dgemm;blas" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in Alpha CXML library? +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "cxml" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in Alpha DXML library? (now called CXML, see above) +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "dxml" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in Sun Performance library? +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "-xlic_lib=sunperf" + "sunperf;sunmath" + ) + if(BLAS_LIBRARIES) + set(BLAS_LINKER_FLAGS "-xlic_lib=sunperf") + endif(BLAS_LIBRARIES) + +endif(NOT BLAS_LIBRARIES) + +# BLAS in SCSL library? (SGI/Cray Scientific Library) +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "scsl" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in SGIMATH library? +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "complib.sgimath" + ) +endif(NOT BLAS_LIBRARIES) + +# BLAS in IBM ESSL library? (requires generic BLAS lib, too) +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "essl;blas" + ) +endif(NOT BLAS_LIBRARIES) + + + + +#BLAS in intel mkl 10 library? (em64t 64bit) +if(NOT BLAS_LIBRARIES) +check_fortran_libraries( +BLAS_LIBRARIES +BLAS +sgemm +"" +"mkl_intel_lp64;mkl_intel_thread;mkl_core;guide;pthread" +) +endif(NOT BLAS_LIBRARIES) +if(NOT BLAS95_LIBRARIES) +check_fortran_libraries( +BLAS95_LIBRARIES +BLAS +sgemm +"" +"mkl_blas95;mkl_intel_lp64;mkl_intel_thread;mkl_core;guide;pthread" +) +endif(NOT BLAS95_LIBRARIES) + +### windows version of intel mkl 10 + +if(NOT BLAS_LIBRARIES) +check_fortran_libraries( +BLAS_LIBRARIES +BLAS +SGEMM +"" +"mkl_c_dll;mkl_intel_thread_dll;mkl_core_dll;libguide40" +) +endif(NOT BLAS_LIBRARIES) + +if(NOT BLAS95_LIBRARIES) +check_fortran_libraries( +BLAS95_LIBRARIES +BLAS +sgemm +"" +"mkl_blas95;mkl_intel_c;mkl_intel_thread;mkl_core;libguide40" +) +endif(NOT BLAS95_LIBRARIES) + + +# linux 32 bit +if(NOT BLAS95_LIBRARIES) +check_fortran_libraries( +BLAS95_LIBRARIES +BLAS +sgemm +"" +"mkl_blas95;mkl_intel;mkl_intel_thread;mkl_core;guide;pthread" +) +endif(NOT BLAS95_LIBRARIES) + + +#older vesions of intel mkl libs + +# BLAS in intel mkl library? (shared) +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "mkl;guide;pthread" + ) +endif(NOT BLAS_LIBRARIES) + + +#BLAS in intel mkl library? (static, 32bit) +if(NOT BLAS_LIBRARIES) +check_fortran_libraries( +BLAS_LIBRARIES +BLAS +sgemm +"" +"mkl_ia32;guide;pthread" +) +endif(NOT BLAS_LIBRARIES) + +#BLAS in intel mkl library? (static, em64t 64bit) +if(NOT BLAS_LIBRARIES) +check_fortran_libraries( +BLAS_LIBRARIES +BLAS +sgemm +"" +"mkl_em64t;guide;pthread" +) +endif(NOT BLAS_LIBRARIES) + + +#BLAS in acml library? +if(NOT BLAS_LIBRARIES) +check_fortran_libraries( +BLAS_LIBRARIES +BLAS +sgemm +"" +"acml" +) +endif(NOT BLAS_LIBRARIES) + +# Apple BLAS library? +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + cblas_dgemm + "" + "Accelerate" + ) + + endif(NOT BLAS_LIBRARIES) + + if ( NOT BLAS_LIBRARIES ) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + cblas_dgemm + "" + "vecLib" + ) + endif ( NOT BLAS_LIBRARIES ) + + +# Generic BLAS library? +if(NOT BLAS_LIBRARIES) + check_fortran_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "blas" + ) +endif(NOT BLAS_LIBRARIES) + + +if(BLAS_LIBRARIES) + set(BLAS_FOUND TRUE) +else(BLAS_LIBRARIES) + set(BLAS_FOUND FALSE) +endif(BLAS_LIBRARIES) + +if(NOT BLAS_FIND_QUIETLY) + if(BLAS_FOUND) + message(STATUS "A library with BLAS API found.") + else(BLAS_FOUND) + if(BLAS_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with BLAS API not found. Please specify library location." + ) + else(BLAS_FIND_REQUIRED) + message(STATUS + "A library with BLAS API not found. Please specify library location." + ) + endif(BLAS_FIND_REQUIRED) + endif(BLAS_FOUND) +endif(NOT BLAS_FIND_QUIETLY) diff --git a/Modules/FindBZip2.cmake b/Modules/FindBZip2.cmake new file mode 100644 index 000000000..584203844 --- /dev/null +++ b/Modules/FindBZip2.cmake @@ -0,0 +1,35 @@ +# - Try to find BZip2 +# Once done this will define +# +# BZIP2_FOUND - system has BZip2 +# BZIP2_INCLUDE_DIR - the BZip2 include directory +# BZIP2_LIBRARIES - Link these to use BZip2 +# 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, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) + SET(BZip2_FIND_QUIETLY TRUE) +ENDIF (BZIP2_INCLUDE_DIR AND BZIP2_LIBRARIES) + +FIND_PATH(BZIP2_INCLUDE_DIR bzlib.h ) + +FIND_LIBRARY(BZIP2_LIBRARIES NAMES bz2 bzip2 ) + +# handle the QUIETLY and REQUIRED arguments and set BZip2_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(BZip2 DEFAULT_MSG BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) + +IF (BZIP2_FOUND) + INCLUDE(CheckLibraryExists) + CHECK_LIBRARY_EXISTS(${BZIP2_LIBRARIES} BZ2_bzCompressInit "" BZIP2_NEED_PREFIX) +ENDIF (BZIP2_FOUND) + +MARK_AS_ADVANCED(BZIP2_INCLUDE_DIR BZIP2_LIBRARIES) + diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake new file mode 100644 index 000000000..ab00fcc72 --- /dev/null +++ b/Modules/FindBoost.cmake @@ -0,0 +1,571 @@ +# - Try to find Boost include dirs and libraries +# Usage of this module as follows: +# +# SET(Boost_USE_STATIC_LIBS ON) +# SET(Boost_USE_MULTITHREAD OFF) +# FIND_PACKAGE( Boost 1.34.1 COMPONENTS date_time filesystem iostreams ... ) +# +# The Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of +# boost version numbers that should be taken into account when searching +# for the libraries. Unfortunately boost puts the version number into the +# actual filename for the libraries, so this might be needed in the future +# when new Boost versions are released. +# +# Currently this module searches for the following version numbers: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, 1.36.0, +# 1.36.1 +# +# The components list needs to be the actual names of boost libraries, that is +# the part of the actual library files that differ on different libraries. So +# its "date_time" for "libboost_date_time...". Anything else will result in +# errors +# +# You can provide a minimum version number that should be used. If you provide this +# version number and specify the REQUIRED attribute, this module will fail if it +# can't find the specified or a later version. If you specify a version number this is +# automatically put into the considered list of version numbers and thus doesn't need +# to be specified in the Boost_ADDITIONAL_VERSIONS variable +# +# Variables used by this module, they can change the default behaviour and need to be set +# before calling find_package: +# Boost_USE_MULTITHREAD Can be set to OFF to use the non-multithreaded +# boost libraries. Defaults to ON. +# Boost_USE_STATIC_LIBS Can be set to ON to force the use of the static +# boost libraries. Defaults to OFF. +# Boost_ADDITIONAL_VERSIONS A list of version numbers to use for searching +# the boost include directory. The default list +# of version numbers is: +# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, +# 1.35, 1.35.0, 1.35.1, 1.36.0, 1.36.1 +# If you want to look for an older or newer +# version set this variable to a list of +# strings, where each string contains a number, i.e. +# SET(Boost_ADDITIONAL_VERSIONS "0.99.0" "1.35.0") +# BOOST_ROOT Preferred installation prefix for searching for Boost, +# set this if the module has problems finding the proper Boost installation +# BOOST_INCLUDEDIR Set this to the include directory of Boost, if the +# module has problems finding the proper Boost installation +# BOOST_LIBRARYDIR Set this to the lib directory of Boost, if the +# module has problems finding the proper Boost installation +# +# The last three variables are available also as environment variables +# +# +# Variables defined by this module: +# +# Boost_FOUND System has Boost, this means the include dir was found, +# as well as all the libraries specified in the COMPONENTS list +# Boost_INCLUDE_DIRS Boost include directories, not cached +# Boost_INCLUDE_DIR This is almost the same as above, but this one is cached and may be +# modified by advanced users +# Boost_LIBRARIES Link these to use the Boost libraries that you specified, not cached +# Boost_LIBRARY_DIRS The path to where the Boost library files are. +# Boost_VERSION The version number of the boost libraries that have been found, +# same as in version.hpp from Boost +# Boost_LIB_VERSION The version number in filename form as its appended to the library filenames +# Boost_MAJOR_VERSION major version number of boost +# Boost_MINOR_VERSION minor version number of boost +# Boost_SUBMINOR_VERSION subminor version number of boost +# Boost_LIB_DIAGNOSTIC_DEFINITIONS Only set on windows. Can be used with add_definitions +# to print diagnostic information about the automatic +# linking done on windows. + +# For each component you list the following variables are set. +# ATTENTION: The component names need to be in lower case, just as the boost +# library names however the cmake variables use upper case for the component +# part. So you'd get Boost_SERIALIZATION_FOUND for example. +# +# Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found. +# Boost_${COMPONENT}_LIBRARY The absolute path of the Boost library "component". +# Boost_${COMPONENT}_LIBRARY_DEBUG The absolute path of the debug version of the +# Boost library "component". +# Boost_${COMPONENT}_LIBRARY_RELEASE The absolute path of the release version of the +# Boost library "component" +# +# Copyright (c) 2006-2008 Andreas Schneider +# Copyright (c) 2007 Wengo +# Copyright (c) 2007 Mike Jackson +# Copyright (c) 2008 Andreas Pakulat +# +# Redistribution AND use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + +# this module required CMake 2.5 for the Boost_FIND_VERSION stuff + +# this must not be done in find modules, it changes the policy settings, which may have been +# set in the projects cmake files. +# beside that this module comes with cmake, so the cmake version is always correct, Alex +# CMAKE_MINIMUM_REQUIRED(VERSION "2.6" FATAL_ERROR) + +# MESSAGE(STATUS "Finding Boost libraries.... ") + +OPTION(Boost_USE_MULTITHREADED "Use the multithreaded versions of the boost libraries" ON) + +SET( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS} "1.36.1" "1.36.0" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0" "1.34" "1.33.1" "1.33.0" "1.33" ) + + +############################################ +# +# Check the existence of the libraries. +# +############################################ +# This macro was taken directly from the FindQt4.cmake file that is included +# with the CMake distribution. This is NOT my work. All work was done by the +# original authors of the FindQt4.cmake file. Only minor modifications were +# made to remove references to Qt and make this file more generally applicable +######################################################################### + +MACRO (_Boost_ADJUST_LIB_VARS basename) + IF (Boost_INCLUDE_DIR ) + #MESSAGE(STATUS "Adjusting ${basename} ") + + IF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE) + + # if only the release version was found, set the debug variable also to the release version + IF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + SET(Boost_${basename}_LIBRARY_DEBUG ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE}) + ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + SET(Boost_${basename}_LIBRARY_RELEASE ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_DEBUG}) + SET(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_DEBUG}) + ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE) + + IF (Boost_${basename}_LIBRARY) + SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") + GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH) + SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory") + SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Was the boost boost ${basename} library found") + ENDIF (Boost_${basename}_LIBRARY) + + ENDIF (Boost_INCLUDE_DIR ) + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( + Boost_${basename}_LIBRARY + Boost_${basename}_LIBRARY_RELEASE + Boost_${basename}_LIBRARY_DEBUG + ) +ENDMACRO (_Boost_ADJUST_LIB_VARS) + +#------------------------------------------------------------------------------- + + +SET( _boost_IN_CACHE TRUE) +IF(Boost_INCLUDE_DIR) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( _boost_IN_CACHE FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) +ELSE(Boost_INCLUDE_DIR) + SET( _boost_IN_CACHE FALSE) +ENDIF(Boost_INCLUDE_DIR) + +IF (_boost_IN_CACHE) + # in cache already + SET(Boost_FOUND TRUE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + _Boost_ADJUST_LIB_VARS( ${COMPONENT} ) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${COMPONENT}_LIBRARY}) + ENDFOREACH(COMPONENT) + SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR}) + IF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + ENDIF(Boost_VERSION AND NOT "${Boost_VERSION}" STREQUAL "0") +ELSE (_boost_IN_CACHE) + # Need to search for boost + + IF(WIN32) + # In windows, automatic linking is performed, so you do not have to specify the libraries. + # If you are linking to a dynamic runtime, then you can choose to link to either a static or a + # dynamic Boost library, the default is to do a static link. You can alter this for a specific + # library "whatever" by defining BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to + # be linked dynamically. Alternatively you can force all Boost libraries to dynamic link by + # defining BOOST_ALL_DYN_LINK. + + # This feature can be disabled for Boost library "whatever" by defining BOOST_WHATEVER_NO_LIB, + # or for all of Boost by defining BOOST_ALL_NO_LIB. + + # If you want to observe which libraries are being linked against then defining + # BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time + # a library is selected for linking. + SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC" CACHE STRING "Boost diagnostic define") + ENDIF(WIN32) + + + SET(_boost_INCLUDE_SEARCH_DIRS + C:/boost/include + "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}" + # D: is very often the cdrom drive, IF you don't have a + # cdrom inserted it will popup a very annoying dialog + #D:/boost/include + /sw/local/include + ) + + SET(_boost_LIBRARIES_SEARCH_DIRS + C:/boost/lib + "C:/Program Files/boost/boost_${Boost_FIND_VERSION_MAJOR}_${Boost_FIND_VERSION_MINOR}_${Boost_FIND_VERSION_PATCH}/lib" + /sw/local/lib + ) + + IF( NOT $ENV{BOOST_ROOT} STREQUAL "" ) + SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS}) + SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_ROOT}/lib ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( NOT $ENV{BOOST_ROOT} STREQUAL "" ) + + IF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + SET(_boost_INCLUDE_SEARCH_DIRS $ENV{BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( NOT $ENV{BOOST_INCLUDEDIR} STREQUAL "" ) + + IF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + SET(_boost_LIBRARIES_SEARCH_DIRS $ENV{BOOST_LIBRARYDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" ) + + IF( BOOST_ROOT ) + IF( WIN32 ) + SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT} ${_boost_INCLUDE_SEARCH_DIRS}) + ELSE( WIN32 ) + SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( WIN32 ) + SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_ROOT}/lib ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_ROOT ) + + IF( BOOST_INCLUDEDIR ) + SET(_boost_INCLUDE_SEARCH_DIRS ${BOOST_INCLUDEDIR} ${_boost_INCLUDE_SEARCH_DIRS}) + ENDIF( BOOST_INCLUDEDIR ) + + IF( BOOST_LIBRARYDIR ) + SET(_boost_LIBRARIES_SEARCH_DIRS ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS}) + ENDIF( BOOST_LIBRARYDIR ) + + #Try first in our own include search paths (e.g. BOOST_ROOT) + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + IF( NOT Boost_INCLUDE_DIR ) + + # Add in a path suffix, based on the required version, ideally we could + # read this from version.hpp, but for that to work we'd need to know the include + # dir already + SET(_boost_PATH_SUFFIX + boost-${_boost_VER} + ) + + IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + + + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + PATHS ${_boost_INCLUDE_SEARCH_DIRS} + PATH_SUFFIXES ${_boost_PATH_SUFFIX} + NO_DEFAULT_PATH + ) + + ENDIF( NOT Boost_INCLUDE_DIR ) + ENDFOREACH(_boost_VER) + + # If nothing is found search again using system default paths + FOREACH(_boost_VER ${_boost_TEST_VERSIONS}) + IF( NOT Boost_INCLUDE_DIR ) + + # Add in a path suffix, based on the required version, ideally we could + # read this from version.hpp, but for that to work we'd need to know the include + # dir already + SET(_boost_PATH_SUFFIX + boost-${_boost_VER} + ) + + IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ELSEIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+") + STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2" _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX}) + ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+") + + FIND_PATH(Boost_INCLUDE_DIR + NAMES boost/config.hpp + PATH_SUFFIXES ${_boost_PATH_SUFFIX} + ) + + ENDIF( NOT Boost_INCLUDE_DIR ) + ENDFOREACH(_boost_VER) + IF(Boost_INCLUDE_DIR) + # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp + # Read the whole file: + # + SET(BOOST_VERSION 0) + SET(BOOST_LIB_VERSION "") + FILE(READ "${Boost_INCLUDE_DIR}/boost/version.hpp" _boost_VERSION_HPP_CONTENTS) + + STRING(REGEX REPLACE ".*#define BOOST_VERSION ([0-9]+).*" "\\1" Boost_VERSION "${_boost_VERSION_HPP_CONTENTS}") + STRING(REGEX REPLACE ".*#define BOOST_LIB_VERSION \"([0-9_]+)\".*" "\\1" Boost_LIB_VERSION "${_boost_VERSION_HPP_CONTENTS}") + + SET(Boost_LIB_VERSION ${Boost_LIB_VERSION} CACHE INTERNAL "The library version string for boost libraries") + SET(Boost_VERSION ${Boost_VERSION} CACHE INTERNAL "The version number for boost libraries") + + IF(NOT "${Boost_VERSION}" STREQUAL "0") + MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") + MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") + MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + + ENDIF(NOT "${Boost_VERSION}" STREQUAL "0") + ENDIF(Boost_INCLUDE_DIR) + + + #Setting some more suffixes for the library + SET (Boost_LIB_PREFIX "") + IF ( WIN32 AND Boost_USE_STATIC_LIBS ) + SET (Boost_LIB_PREFIX "lib") + ENDIF ( WIN32 AND Boost_USE_STATIC_LIBS ) + SET (_boost_COMPILER "-gcc") + IF (MSVC71) + SET (_boost_COMPILER "-vc71") + ENDIF(MSVC71) + IF (MSVC80) + SET (_boost_COMPILER "-vc80") + ENDIF(MSVC80) + IF (MSVC90) + SET (_boost_COMPILER "-vc90") + ENDIF (MSVC90) + IF (MINGW) + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS --version + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.[0-9] .*" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + SET (_boost_COMPILER "-mgw${_boost_COMPILER_VERSION}") + ENDIF(MINGW) + IF (CYGWIN) + SET (_boost_COMPILER "-gcc") + ENDIF (CYGWIN) + IF (UNIX) + IF (APPLE) + SET (_boost_COMPILER "") + ELSE (APPLE) + IF (NOT CMAKE_COMPILER_IS_GNUCC) + # This is for the intel compiler + SET (_boost_COMPILER "-il") + ELSE (NOT CMAKE_COMPILER_IS_GNUCC) + #find out the version of gcc being used. + EXEC_PROGRAM(${CMAKE_CXX_COMPILER} + ARGS --version + OUTPUT_VARIABLE _boost_COMPILER_VERSION + ) + STRING(REGEX REPLACE ".* ([0-9])\\.([0-9])\\.[0-9] .*" "\\1\\2" + _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + SET (_boost_COMPILER "-gcc${_boost_COMPILER_VERSION}") + ENDIF (NOT CMAKE_COMPILER_IS_GNUCC) + ENDIF (APPLE) + ENDIF(UNIX) + + SET (_boost_MULTITHREADED "-mt") + + IF( NOT Boost_USE_MULTITHREADED ) + SET (_boost_MULTITHREADED "") + ENDIF( NOT Boost_USE_MULTITHREADED ) + + SET( _boost_STATIC_TAG "") + IF (WIN32) + IF(MSVC) + SET (_boost_ABI_TAG "g") + ENDIF(MSVC) + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_STATIC_TAG "-s") + ENDIF( Boost_USE_STATIC_LIBS ) + ENDIF(WIN32) + SET (_boost_ABI_TAG "${_boost_ABI_TAG}d") + + # ------------------------------------------------------------------------ + # Begin finding boost libraries + # ------------------------------------------------------------------------ + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT) + SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" ) + SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND") + + # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES + IF( Boost_USE_STATIC_LIBS ) + SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + IF(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ELSE(WIN32) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF(WIN32) + ENDIF( Boost_USE_STATIC_LIBS ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} + PATHS ${_boost_LIBRARIES_SEARCH_DIRS} + NO_DEFAULT_PATH + ) + + IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} ) + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT} + ) + ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE} ) + + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} + PATHS ${_boost_LIBRARIES_SEARCH_DIRS} + NO_DEFAULT_PATH + ) + + IF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} ) + FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG + NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG} + ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG} + ) + ENDIF( NOT ${Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG} ) + _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT}) + IF( Boost_USE_STATIC_LIBS ) + SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES}) + ENDIF( Boost_USE_STATIC_LIBS ) + ENDFOREACH(COMPONENT) + # ------------------------------------------------------------------------ + # End finding boost libraries + # ------------------------------------------------------------------------ + + SET(Boost_INCLUDE_DIRS + ${Boost_INCLUDE_DIR} + ) + + # MESSAGE(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}") + # MESSAGE(STATUS "Boost_LIBRARIES: ${Boost_LIBRARIES}") + + SET(Boost_FOUND FALSE) + IF(Boost_INCLUDE_DIR) + SET( Boost_FOUND TRUE ) + IF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" ) + SET( Boost_FOUND FALSE ) + ELSE( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" ) + IF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" ) + SET( Boost_FOUND FALSE ) + ELSE( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" ) + IF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" ) + SET( Boost_FOUND FALSE ) + ENDIF( Boost_FIND_VERSION_PATCH AND Boost_VERSION_SUBMINOR LESS "${Boost_FIND_VERSION_PATCH}" ) + ENDIF( Boost_FIND_VERSION_MINOR AND Boost_VERSION_MINOR LESS "${Boost_FIND_VERSION_MINOR}" ) + ENDIF( Boost_FIND_VERSION_MAJOR AND Boost_VERSION_MAJOR LESS "${Boost_FIND_VERSION_MAJOR}" ) + set(_boost_CHECKED_COMPONENT FALSE) + FOREACH(COMPONENT ${Boost_FIND_COMPONENTS}) + STRING(TOUPPER ${COMPONENT} COMPONENT) + set(_boost_CHECKED_COMPONENT TRUE) + IF(NOT Boost_${COMPONENT}_FOUND) + SET( Boost_FOUND FALSE) + ENDIF(NOT Boost_${COMPONENT}_FOUND) + ENDFOREACH(COMPONENT) + IF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + # Compatibility Code for backwards compatibility with CMake 2.4 + + # Look for the boost library path. + # Note that the user may not have installed any libraries + # so it is quite possible the Boost_LIBRARY_PATH may not exist. + SET(_boost_LIB_DIR ${Boost_INCLUDE_DIR}) + + IF("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF ("${_boost_LIB_DIR}" MATCHES "boost-[0-9]+") + + IF("${_boost_LIB_DIR}" MATCHES "/include$") + # Strip off the trailing "/include" in the path. + GET_FILENAME_COMPONENT(_boost_LIB_DIR ${_boost_LIB_DIR} PATH) + ENDIF("${_boost_LIB_DIR}" MATCHES "/include$") + + IF(EXISTS "${_boost_LIB_DIR}/lib") + SET (_boost_LIB_DIR ${_boost_LIB_DIR}/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/lib") + IF(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR ${_boost_LIB_DIR}/stage/lib) + ELSE(EXISTS "${_boost_LIB_DIR}/stage/lib") + SET(_boost_LIB_DIR "") + ENDIF(EXISTS "${_boost_LIB_DIR}/stage/lib") + ENDIF(EXISTS "${_boost_LIB_DIR}/lib") + + IF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + SET(Boost_LIBRARY_DIRS ${_boost_LIB_DIR} CACHE FILEPATH "Boost library directory") + ENDIF(_boost_LIB_DIR AND EXISTS "${_boost_LIB_DIR}") + + ENDIF( NOT Boost_LIBRARY_DIRS AND NOT _boost_CHECKED_COMPONENT ) + + ELSE(Boost_INCLUDE_DIR) + SET( Boost_FOUND FALSE) + ENDIF(Boost_INCLUDE_DIR) + + IF (Boost_FOUND) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + ENDIF(NOT Boost_FIND_QUIETLY) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE(STATUS "Found the following Boost libraries:") + ENDIF(NOT Boost_FIND_QUIETLY) + FOREACH ( COMPONENT ${Boost_FIND_COMPONENTS} ) + STRING( TOUPPER ${COMPONENT} UPPERCOMPONENT ) + IF ( Boost_${UPPERCOMPONENT}_FOUND ) + IF (NOT Boost_FIND_QUIETLY) + MESSAGE (STATUS " ${COMPONENT}") + ENDIF(NOT Boost_FIND_QUIETLY) + SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${UPPERCOMPONENT}_LIBRARY}) + ENDIF ( Boost_${UPPERCOMPONENT}_FOUND ) + ENDFOREACH(COMPONENT) + ELSE (Boost_FOUND) + IF (Boost_FIND_REQUIRED) + MESSAGE(STATUS "Boost version required: ${Boost_FIND_VERSION}. Found: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") + MESSAGE(FATAL_ERROR "Couldn't find the Boost libraries and/or include directory, or the version found is too old. Please install the Boost libraries AND development packages. You can set BOOST_ROOT, BOOST_INCLUDEDIR and BOOST_LIBRARYDIR to help find Boost.") + ENDIF(Boost_FIND_REQUIRED) + ENDIF(Boost_FOUND) + + # Under Windows, automatic linking is performed, so no need to specify the libraries. + IF (WIN32) + IF (NOT MINGW) + SET(Boost_LIBRARIES "") + ENDIF (NOT MINGW) + ENDIF(WIN32) + + # show the Boost_INCLUDE_DIRS AND Boost_LIBRARIES variables only in the advanced view + MARK_AS_ADVANCED(Boost_INCLUDE_DIR + Boost_INCLUDE_DIRS + Boost_LIBRARY_DIRS + Boost_USE_MULTITHREADED + ) +ENDIF(_boost_IN_CACHE) + diff --git a/Modules/FindCABLE.cmake b/Modules/FindCABLE.cmake new file mode 100644 index 000000000..5bcbc67f8 --- /dev/null +++ b/Modules/FindCABLE.cmake @@ -0,0 +1,68 @@ +# - Find CABLE +# This module finds if CABLE is installed and determines where the +# include files and libraries are. This code sets the following variables: +# +# CABLE the path to the cable executable +# CABLE_TCL_LIBRARY the path to the Tcl wrapper library +# CABLE_INCLUDE_DIR the path to the include directory +# +# To build Tcl wrappers, you should add shared library and link it to +# ${CABLE_TCL_LIBRARY}. You should also add ${CABLE_INCLUDE_DIR} as +# an include directory. + +IF(NOT CABLE) + FIND_PATH(CABLE_BUILD_DIR cableVersion.h) +ENDIF(NOT CABLE) + +IF(CABLE_BUILD_DIR) + LOAD_CACHE(${CABLE_BUILD_DIR} + EXCLUDE + BUILD_SHARED_LIBS + LIBRARY_OUTPUT_PATH + EXECUTABLE_OUTPUT_PATH + MAKECOMMAND + CMAKE_INSTALL_PREFIX + INCLUDE_INTERNALS + CABLE_LIBRARY_PATH + CABLE_EXECUTABLE_PATH) + + IF(CABLE_LIBRARY_PATH) + FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + ${CABLE_LIBRARY_PATH} + ${CABLE_LIBRARY_PATH}/*) + ELSE(CABLE_LIBRARY_PATH) + FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + ${CABLE_BINARY_DIR}/CableTclFacility + ${CABLE_BINARY_DIR}/CableTclFacility/*) + ENDIF(CABLE_LIBRARY_PATH) + + IF(CABLE_EXECUTABLE_PATH) + FIND_PROGRAM(CABLE NAMES cable PATHS + ${CABLE_EXECUTABLE_PATH} + ${CABLE_EXECUTABLE_PATH}/*) + ELSE(CABLE_EXECUTABLE_PATH) + FIND_PROGRAM(CABLE NAMES cable PATHS + ${CABLE_BINARY_DIR}/Executables + ${CABLE_BINARY_DIR}/Executables/*) + ENDIF(CABLE_EXECUTABLE_PATH) + + FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h + ${CABLE_SOURCE_DIR}) +ELSE(CABLE_BUILD_DIR) + # Find the cable executable in the path. + FIND_PROGRAM(CABLE NAMES cable) + + # Get the path where the executable sits, but without the executable + # name on it. + GET_FILENAME_COMPONENT(CABLE_ROOT_BIN ${CABLE} PATH) + + # Find the cable include directory in a path relative to the cable + # executable. + FIND_PATH(CABLE_INCLUDE_DIR CableTclFacility/ctCalls.h + ${CABLE_ROOT_BIN}/../include/Cable) + + # Find the WrapTclFacility library in a path relative to the cable + # executable. + FIND_LIBRARY(CABLE_TCL_LIBRARY NAMES CableTclFacility PATHS + ${CABLE_ROOT_BIN}/../lib/Cable) +ENDIF(CABLE_BUILD_DIR) diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake new file mode 100644 index 000000000..25a056aed --- /dev/null +++ b/Modules/FindCURL.cmake @@ -0,0 +1,27 @@ +# - Find curl +# Find the native CURL headers and libraries. +# +# CURL_INCLUDE_DIRS - where to find curl/curl.h, etc. +# CURL_LIBRARIES - List of libraries when using curl. +# CURL_FOUND - True if curl found. + +# Look for the header file. +FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h) +MARK_AS_ADVANCED(CURL_INCLUDE_DIR) + +# Look for the library. +FIND_LIBRARY(CURL_LIBRARY NAMES curl) +MARK_AS_ADVANCED(CURL_LIBRARY) + +# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR) + +IF(CURL_FOUND) + SET(CURL_LIBRARIES ${CURL_LIBRARY}) + SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR}) +ELSE(CURL_FOUND) + SET(CURL_LIBRARIES) + SET(CURL_INCLUDE_DIRS) +ENDIF(CURL_FOUND) diff --git a/Modules/FindCVS.cmake b/Modules/FindCVS.cmake new file mode 100644 index 000000000..ee3d86378 --- /dev/null +++ b/Modules/FindCVS.cmake @@ -0,0 +1,56 @@ +# The module defines the following variables: +# CVS_EXECUTABLE - path to cvs command line client +# CVS_FOUND - true if the command line client was found +# Example usage: +# find_package(CVS) +# if(CVS_FOUND) +# message("CVS found: ${CVS_EXECUTABLE}") +# endif(CVS_FOUND) + +# CVSNT + +get_filename_component( + CVSNT_TypeLib_Win32 + "[HKEY_CLASSES_ROOT\\TypeLib\\{2BDF7A65-0BFE-4B1A-9205-9AB900C7D0DA}\\1.0\\0\\win32]" + PATH) + +get_filename_component( + CVSNT_Services_EventMessagePath + "[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Eventlog\\Application\\cvsnt;EventMessageFile]" + PATH) + +# WinCVS (in case CVSNT was installed in the same directory) + +get_filename_component( + WinCVS_Folder_Command + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Folder\\shell\\wincvs\\command]" + PATH) + +# TortoiseCVS (in case CVSNT was installed in the same directory) + +get_filename_component( + TortoiseCVS_Folder_Command + "[HKEY_CLASSES_ROOT\\CVS\\shell\\open\\command]" + PATH) + +get_filename_component( + TortoiseCVS_DefaultIcon + "[HKEY_CLASSES_ROOT\\CVS\\DefaultIcon]" + PATH) + +find_program(CVS_EXECUTABLE cvs + ${TortoiseCVS_DefaultIcon} + ${TortoiseCVS_Folder_Command} + ${WinCVS_Folder_Command} + ${CVSNT_Services_EventMessagePath} + ${CVSNT_TypeLib_Win32} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\CVS\\Pserver;InstallPath]" + DOC "CVS command line client" + ) +mark_as_advanced(CVS_EXECUTABLE) + +# Handle the QUIETLY and REQUIRED arguments and set CVS_FOUND to TRUE if +# all listed variables are TRUE + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(CVS DEFAULT_MSG CVS_EXECUTABLE) diff --git a/Modules/FindCups.cmake b/Modules/FindCups.cmake new file mode 100644 index 000000000..143cae980 --- /dev/null +++ b/Modules/FindCups.cmake @@ -0,0 +1,48 @@ +# - Try to find the Cups printing system +# Once done this will define +# +# CUPS_FOUND - system has Cups +# CUPS_INCLUDE_DIR - the Cups include directory +# CUPS_LIBRARIES - Libraries needed to use Cups +# 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, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +INCLUDE(CheckLibraryExists) + +FIND_PATH(CUPS_INCLUDE_DIR cups/cups.h ) + +FIND_LIBRARY(CUPS_LIBRARIES NAMES cups ) + +IF (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES) + SET(CUPS_FOUND TRUE) + + # ippDeleteAttribute is new in cups-1.1.19 (and used by kdeprint) + CHECK_LIBRARY_EXISTS(cups ippDeleteAttribute "" CUPS_HAS_IPP_DELETE_ATTRIBUTE) + IF (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE AND NOT CUPS_HAS_IPP_DELETE_ATTRIBUTE) + SET(CUPS_FOUND FALSE) + ENDIF (CUPS_REQUIRE_IPP_DELETE_ATTRIBUTE AND NOT CUPS_HAS_IPP_DELETE_ATTRIBUTE) + +ELSE (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES) + SET(CUPS_FOUND FALSE) +ENDIF (CUPS_INCLUDE_DIR AND CUPS_LIBRARIES) + +IF (CUPS_FOUND) + IF (NOT Cups_FIND_QUIETLY) + MESSAGE(STATUS "Found Cups: ${CUPS_LIBRARIES}") + ENDIF (NOT Cups_FIND_QUIETLY) +ELSE (CUPS_FOUND) + SET(CUPS_LIBRARIES ) + IF (Cups_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find Cups") + ENDIF (Cups_FIND_REQUIRED) +ENDIF (CUPS_FOUND) + + +MARK_AS_ADVANCED(CUPS_INCLUDE_DIR CUPS_LIBRARIES) + diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake new file mode 100644 index 000000000..3eb54e5f5 --- /dev/null +++ b/Modules/FindCurses.cmake @@ -0,0 +1,123 @@ +# - Find the curses include file and library +# +# CURSES_FOUND - system has Curses +# CURSES_INCLUDE_DIR - the Curses include directory +# CURSES_LIBRARIES - The libraries needed to use Curses +# CURSES_HAVE_CURSES_H - true if curses.h is available +# CURSES_HAVE_NCURSES_H - true if ncurses.h is available +# CURSES_HAVE_NCURSES_NCURSES_H - true if ncurses/ncurses.h is available +# CURSES_HAVE_NCURSES_CURSES_H - true if ncurses/curses.h is available +# CURSES_LIBRARY - set for backwards compatibility with 2.4 CMake +# +# Set CURSES_NEED_NCURSES to TRUE before the FIND_PACKAGE() command if NCurses +# functionality is required. + +FIND_LIBRARY(CURSES_LIBRARY NAMES curses ) + +FIND_LIBRARY(CURSES_NCURSES_LIBRARY NAMES ncurses ) + +SET(CURSES_USE_NCURSES FALSE) + +IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_LIBRARY) + SET(CURSES_USE_NCURSES TRUE) +ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_LIBRARY) + + +# Not sure the logic is correct here. +# If NCurses is required, use the function wsyncup() to check if the library +# has NCurses functionality (at least this is where it breaks on NetBSD). +# If wsyncup is in curses, use this one. +# If not, try to find ncurses and check if this has the symbol. +# Once the ncurses library is found, search the ncurses.h header first, but +# some web pages also say that even with ncurses there is not always a ncurses.h: +# http://osdir.com/ml/gnome.apps.mc.devel/2002-06/msg00029.html +# So at first try ncurses.h, if not found, try to find curses.h under the same +# prefix as the library was found, if still not found, try curses.h with the +# default search paths. +IF(CURSES_LIBRARY AND CURSES_NEED_NCURSES) + INCLUDE(CheckLibraryExists) + CHECK_LIBRARY_EXISTS("${CURSES_LIBRARY}" wsyncup "" CURSES_CURSES_HAS_WSYNCUP) + + IF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP) + CHECK_LIBRARY_EXISTS("${CURSES_NCURSES_LIBRARY}" wsyncup "" CURSES_NCURSES_HAS_WSYNCUP) + IF( CURSES_NCURSES_HAS_WSYNCUP) + SET(CURSES_USE_NCURSES TRUE) + ENDIF( CURSES_NCURSES_HAS_WSYNCUP) + ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP) + +ENDIF(CURSES_LIBRARY AND CURSES_NEED_NCURSES) + + +IF(NOT CURSES_USE_NCURSES) + FIND_FILE(CURSES_HAVE_CURSES_H curses.h ) + FIND_PATH(CURSES_INCLUDE_PATH curses.h ) + + GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_LIBRARY}" PATH) + GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH) +ELSE(NOT CURSES_USE_NCURSES) +# we need to find ncurses + GET_FILENAME_COMPONENT(_cursesLibDir "${CURSES_NCURSES_LIBRARY}" PATH) + GET_FILENAME_COMPONENT(_cursesParentDir "${_cursesLibDir}" PATH) + + FIND_FILE(CURSES_HAVE_NCURSES_H ncurses.h) + FIND_FILE(CURSES_HAVE_NCURSES_NCURSES_H ncurses/ncurses.h) + FIND_FILE(CURSES_HAVE_NCURSES_CURSES_H ncurses/curses.h) + FIND_FILE(CURSES_HAVE_CURSES_H curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH) + FIND_FILE(CURSES_HAVE_CURSES_H curses.h) + + FIND_PATH(CURSES_NCURSES_INCLUDE_PATH ncurses.h ncurses/ncurses.h ncurses/curses.h) + FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h PATHS "${_cursesParentDir}/include" NO_DEFAULT_PATH) + FIND_PATH(CURSES_NCURSES_INCLUDE_PATH curses.h) + + SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH}") + SET(FORCE_ARG "") + IF("${CURSES_LIBRARY}" STREQUAL "CURSES_LIBRARY-NOTFOUND") + SET(FORCE_ARG "FORCE") + ENDIF("${CURSES_LIBRARY}" STREQUAL "CURSES_LIBRARY-NOTFOUND") + SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" CACHE FILEPATH "path to curses" ${FORCE_ARG}) +ENDIF(NOT CURSES_USE_NCURSES) + + +FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr PATHS "${_cursesLibDir}" NO_DEFAULT_PATH) +FIND_LIBRARY(CURSES_EXTRA_LIBRARY cur_colr ) + +FIND_LIBRARY(CURSES_FORM_LIBRARY form PATHS "${_cursesLibDir}" NO_DEFAULT_PATH) +FIND_LIBRARY(CURSES_FORM_LIBRARY form ) + +# Need to provide the *_LIBRARIES +SET(CURSES_LIBRARIES ${CURSES_LIBRARY}) + +IF(CURSES_EXTRA_LIBRARY) + SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_EXTRA_LIBRARY}) +ENDIF(CURSES_EXTRA_LIBRARY) + +IF(CURSES_FORM_LIBRARY) + SET(CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_FORM_LIBRARY}) +ENDIF(CURSES_FORM_LIBRARY) + +# Proper name is *_INCLUDE_DIR +SET(CURSES_INCLUDE_DIR ${CURSES_INCLUDE_PATH}) + +# handle the QUIETLY and REQUIRED arguments and set CURSES_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Curses DEFAULT_MSG CURSES_LIBRARY CURSES_INCLUDE_PATH) + +# for compatibility +SET(FORM_LIBRARY "${CURSES_FORM_LIBRARY}") + +MARK_AS_ADVANCED( + CURSES_INCLUDE_PATH + CURSES_LIBRARY + CURSES_CURSES_INCLUDE_PATH + CURSES_LIBRARY + CURSES_NCURSES_INCLUDE_PATH + CURSES_NCURSES_LIBRARY + CURSES_EXTRA_LIBRARY + FORM_LIBRARY + CURSES_LIBRARIES + CURSES_INCLUDE_DIR + CURSES_CURSES_HAS_WSYNCUP + CURSES_NCURSES_HAS_WSYNCUP + ) + diff --git a/Modules/FindCygwin.cmake b/Modules/FindCygwin.cmake new file mode 100644 index 000000000..def439e50 --- /dev/null +++ b/Modules/FindCygwin.cmake @@ -0,0 +1,14 @@ +# - this module looks for Cygwin +# + +IF (WIN32) + FIND_PATH(CYGWIN_INSTALL_PATH + cygwin.bat + "C:/Cygwin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2\\/;native]" + ) + + MARK_AS_ADVANCED( + CYGWIN_INSTALL_PATH + ) +ENDIF (WIN32) diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake new file mode 100755 index 000000000..5a35d2441 --- /dev/null +++ b/Modules/FindDCMTK.cmake @@ -0,0 +1,129 @@ +# - find DCMTK libraries +# + +# DCMTK_INCLUDE_DIR - Directories to include to use DCMTK +# DCMTK_LIBRARIES - Files to link against to use DCMTK +# DCMTK_FOUND - If false, don't try to use DCMTK +# DCMTK_DIR - (optional) Source directory for DCMTK +# +# DCMTK_DIR can be used to make it simpler to find the various include +# 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. +# +# Written for VXL by Amitha Perera. +# + +FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h + ${DCMTK_DIR}/config/include ${DCMTK_DIR}/include +) + +FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h + ${DCMTK_DIR}/ofstd/include ${DCMTK_DIR}/include/ofstd +) + +FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd + ${DCMTK_DIR}/ofstd/libsrc + ${DCMTK_DIR}/ofstd/libsrc/Release + ${DCMTK_DIR}/ofstd/libsrc/Debug + ${DCMTK_DIR}/ofstd/Release + ${DCMTK_DIR}/ofstd/Debug + ${DCMTK_DIR}/lib +) + + +FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h + ${DCMTK_DIR}/dcmdata/include + ${DCMTK_DIR}/include/dcmdata +) + +FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata + ${DCMTK_DIR}/dcmdata/libsrc + ${DCMTK_DIR}/dcmdata/libsrc/Release + ${DCMTK_DIR}/dcmdata/libsrc/Debug + ${DCMTK_DIR}/dcmdata/Release + ${DCMTK_DIR}/dcmdata/Debug + ${DCMTK_DIR}/lib +) + + +FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h + ${DCMTK_DIR}/dcmimgle/include + ${DCMTK_DIR}/include/dcmimgle +) + +FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle + ${DCMTK_DIR}/dcmimgle/libsrc + ${DCMTK_DIR}/dcmimgle/libsrc/Release + ${DCMTK_DIR}/dcmimgle/libsrc/Debug + ${DCMTK_DIR}/dcmimgle/Release + ${DCMTK_DIR}/dcmimgle/Debug + ${DCMTK_DIR}/lib +) + +FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb +${DCMTK_DIR}/imagectn/libsrc/Release +${DCMTK_DIR}/imagectn/libsrc/ +${DCMTK_DIR}/imagectn/libsrc/Debug +) + +FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet +${DCMTK_DIR}/dcmnet/libsrc/Release +${DCMTK_DIR}/dcmnet/libsrc/Debug +${DCMTK_DIR}/dcmnet/libsrc/ +) + + +IF( DCMTK_config_INCLUDE_DIR + AND DCMTK_ofstd_INCLUDE_DIR + AND DCMTK_ofstd_LIBRARY + AND DCMTK_dcmdata_INCLUDE_DIR + AND DCMTK_dcmdata_LIBRARY + AND DCMTK_dcmimgle_INCLUDE_DIR + AND DCMTK_dcmimgle_LIBRARY ) + + SET( DCMTK_FOUND "YES" ) + SET( DCMTK_INCLUDE_DIR + ${DCMTK_config_INCLUDE_DIR} + ${DCMTK_ofstd_INCLUDE_DIR} + ${DCMTK_dcmdata_INCLUDE_DIR} + ${DCMTK_dcmimgle_INCLUDE_DIR} + ) + + SET( DCMTK_LIBRARIES + ${DCMTK_dcmimgle_LIBRARY} + ${DCMTK_dcmdata_LIBRARY} + ${DCMTK_ofstd_LIBRARY} + ${DCMTK_config_LIBRARY} + ) + + IF(DCMTK_imagedb_LIBRARY) + SET( DCMTK_LIBRARIES + ${DCMTK_LIBRARIES} + ${DCMTK_imagedb_LIBRARY} + ) + ENDIF(DCMTK_imagedb_LIBRARY) + + IF(DCMTK_dcmnet_LIBRARY) + SET( DCMTK_LIBRARIES + ${DCMTK_LIBRARIES} + ${DCMTK_dcmnet_LIBRARY} + ) + ENDIF(DCMTK_dcmnet_LIBRARY) + + IF( WIN32 ) + SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 ) + ENDIF( WIN32 ) + +ENDIF( DCMTK_config_INCLUDE_DIR + AND DCMTK_ofstd_INCLUDE_DIR + AND DCMTK_ofstd_LIBRARY + AND DCMTK_dcmdata_INCLUDE_DIR + AND DCMTK_dcmdata_LIBRARY + AND DCMTK_dcmimgle_INCLUDE_DIR + AND DCMTK_dcmimgle_LIBRARY ) + +IF( NOT DCMTK_FOUND ) + SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." ) + MARK_AS_ADVANCED( DCMTK_DIR ) +ENDIF( NOT DCMTK_FOUND ) diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake new file mode 100644 index 000000000..35f6eb82c --- /dev/null +++ b/Modules/FindDart.cmake @@ -0,0 +1,16 @@ +# - Find DART +# This module looks for the dart testing software and sets DART_ROOT +# to point to where it found it. +# + +FIND_PATH(DART_ROOT README.INSTALL + $ENV{DART_ROOT} + ${PROJECT_SOURCE_DIR}/Dart + /usr/share/Dart + C:/Dart + "$ENV{ProgramFiles}/Dart" + "C:/Program Files/Dart" + ${PROJECT_SOURCE_DIR}/../Dart + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath] + DOC "If you have Dart installed, where is it located?" + ) diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake new file mode 100644 index 000000000..b489a4900 --- /dev/null +++ b/Modules/FindDoxygen.cmake @@ -0,0 +1,102 @@ +# - This module looks for Doxygen and the path to Graphviz's dot +# Doxygen is a documentation generation tool see http://www.doxygen.org +# With the OS X GUI version, it likes to be installed to /Applications and +# it contains the doxygen executable in the bundle. In the versions I've +# seen, it is located in Resources, but in general, more often binaries are +# located in MacOS. This code sets the following variables: +# DOXYGEN_EXECUTABLE = The path to the doxygen command. +# DOXYGEN_DOT_EXECUTABLE = The path to the dot program used by doxygen. +# DOXYGEN_DOT_PATH = The path to dot not including the executable +# DOXYGEN = same as DOXYGEN_EXECUTABLE for backwards compatibility +# DOT = same as DOXYGEN_DOT_EXECUTABLE for backwards compatibility + +# The official Doxygen.app that is distributed for OS X uses non-standard +# conventions. Instead of the command-line "doxygen" tool being placed in +# Doxygen.app/Contents/MacOS, "Doxywizard" is placed there instead and +# "doxygen" is actually placed in Contents/Resources. This is most likely +# to accomodate people who double-click on the Doxygen.app package and expect +# to see something happen. However, the CMake backend gets horribly confused +# by this. Once CMake sees the bundle, it indiscrimately uses Doxywizard +# as the executable to use. The only work-around I have found is to disable +# the app-bundle feature for only this command. +# Save the old setting +SET(TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE ${CMAKE_FIND_APPBUNDLE}) +# Disable the App-bundle detection feature +SET(CMAKE_FIND_APPBUNDLE "NEVER") +# For backwards compatibility support +# DOXYGEN_FIND_QUIETLY, but it should have been +# Doxygen_FIND_QUIETLY. +IF(Doxygen_FIND_QUIETLY) + SET(DOXYGEN_FIND_QUIETLY TRUE) +ENDIF(Doxygen_FIND_QUIETLY) + +IF (NOT DOXYGEN_FIND_QUIETLY) + MESSAGE(STATUS "Looking for doxygen...") +ENDIF (NOT DOXYGEN_FIND_QUIETLY) + +FIND_PROGRAM(DOXYGEN_EXECUTABLE + NAMES doxygen + PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\doxygen_is1;Inno Setup: App Path]/bin" + /Applications/Doxygen.app/Contents/Resources + /Applications/Doxygen.app/Contents/MacOS + DOC "Doxygen documentation generation tool (http://www.doxygen.org)" +) + +IF (DOXYGEN_EXECUTABLE) + SET (DOXYGEN_FOUND "YES") + IF (NOT DOXYGEN_FIND_QUIETLY) + MESSAGE(STATUS "Looking for doxygen... - found ${DOXYGEN_EXECUTABLE}") + ENDIF (NOT DOXYGEN_FIND_QUIETLY) +ELSE (DOXYGEN_EXECUTABLE) + IF (NOT DOXYGEN_FIND_QUIETLY) + IF (DOXYGEN_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Looking for doxygen... - NOT found") + ELSE (DOXYGEN_FIND_REQUIRED) + MESSAGE(STATUS "Looking for doxygen... - NOT found") + ENDIF (DOXYGEN_FIND_REQUIRED) + ENDIF (NOT DOXYGEN_FIND_QUIETLY) +ENDIF (DOXYGEN_EXECUTABLE) + +# In the older versions of OS X Doxygen, dot was included with the +# Doxygen bundle. But the new versions place make you download Graphviz.app +# which contains dot in its bundle. +IF (NOT DOXYGEN_FIND_QUIETLY) + MESSAGE(STATUS "Looking for dot tool...") +ENDIF (NOT DOXYGEN_FIND_QUIETLY) + +FIND_PROGRAM(DOXYGEN_DOT_EXECUTABLE + NAMES dot + PATHS "$ENV{ProgramFiles}/ATT/Graphviz/bin" + "C:/Program Files/ATT/Graphviz/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ATT\\Graphviz;InstallPath]/bin + /Applications/Graphviz.app/Contents/MacOS + /Applications/Doxygen.app/Contents/Resources + /Applications/Doxygen.app/Contents/MacOS + DOC "Graphviz Dot tool for using Doxygen" +) + +IF (NOT DOXYGEN_FIND_QUIETLY) + IF (DOXYGEN_DOT_EXECUTABLE) + MESSAGE(STATUS "Looking for dot tool... - found ${DOXYGEN_DOT_EXECUTABLE}") + # The Doxyfile wants the path to Dot, not the entire path and executable + GET_FILENAME_COMPONENT(DOXYGEN_DOT_PATH "${DOXYGEN_DOT_EXECUTABLE}" PATH CACHE) + ELSE (DOXYGEN_DOT_EXECUTABLE) + MESSAGE(STATUS "Looking for dot tool... - NOT found") + ENDIF (DOXYGEN_DOT_EXECUTABLE) +ENDIF (NOT DOXYGEN_FIND_QUIETLY) + + +# Restore the old app-bundle setting setting +SET(CMAKE_FIND_APPBUNDLE ${TEMP_DOXYGEN_SAVE_CMAKE_FIND_APPBUNDLE}) + +# Backwards compatibility for CMake4.3 and less +SET (DOXYGEN ${DOXYGEN_EXECUTABLE} ) +SET (DOT ${DOXYGEN_DOT_EXECUTABLE} ) + +MARK_AS_ADVANCED( + DOXYGEN_FOUND + DOXYGEN_EXECUTABLE + DOXYGEN_DOT_FOUND + DOXYGEN_DOT_EXECUTABLE + DOXYGEN_DOT_PATH + ) diff --git a/Modules/FindEXPAT.cmake b/Modules/FindEXPAT.cmake new file mode 100644 index 000000000..ee5b2fafe --- /dev/null +++ b/Modules/FindEXPAT.cmake @@ -0,0 +1,28 @@ +# - Find expat +# Find the native EXPAT headers and libraries. +# +# EXPAT_INCLUDE_DIRS - where to find expat.h, etc. +# EXPAT_LIBRARIES - List of libraries when using expat. +# EXPAT_FOUND - True if expat found. + +# Look for the header file. +FIND_PATH(EXPAT_INCLUDE_DIR NAMES expat.h) + +# Look for the library. +FIND_LIBRARY(EXPAT_LIBRARY NAMES expat) + +# handle the QUIETLY and REQUIRED arguments and set EXPAT_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(EXPAT DEFAULT_MSG EXPAT_LIBRARY EXPAT_INCLUDE_DIR) + +# Copy the results to the output variables. +IF(EXPAT_FOUND) + SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY}) + SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR}) +ELSE(EXPAT_FOUND) + SET(EXPAT_LIBRARIES) + SET(EXPAT_INCLUDE_DIRS) +ENDIF(EXPAT_FOUND) + +MARK_AS_ADVANCED(EXPAT_INCLUDE_DIR EXPAT_LIBRARY) diff --git a/Modules/FindFLTK.cmake b/Modules/FindFLTK.cmake new file mode 100644 index 000000000..d16cf737f --- /dev/null +++ b/Modules/FindFLTK.cmake @@ -0,0 +1,244 @@ +# - Find the native FLTK includes and library +# The following settings are defined +# FLTK_FLUID_EXECUTABLE, where to find the Fluid tool +# FLTK_WRAP_UI, This enables the FLTK_WRAP_UI command +# FLTK_INCLUDE_DIR, where to find include files +# FLTK_LIBRARIES, list of fltk libraries +# FLTK_FOUND, Don't use FLTK if false. +# The following settings should not be used in general. +# FLTK_BASE_LIBRARY = the full path to fltk.lib +# FLTK_GL_LIBRARY = the full path to fltk_gl.lib +# FLTK_FORMS_LIBRARY = the full path to fltk_forms.lib +# FLTK_IMAGES_LIBRARY = the full path to fltk_images.lib + +# Platform dependent libraries required by FLTK +IF(WIN32) + IF(NOT CYGWIN) + IF(BORLAND) + SET( FLTK_PLATFORM_DEPENDENT_LIBS import32 ) + ELSE(BORLAND) + SET( FLTK_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 ) + ENDIF(BORLAND) + ENDIF(NOT CYGWIN) +ENDIF(WIN32) + +IF(UNIX) + INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake) + SET( FLTK_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm) +ENDIF(UNIX) + +IF(APPLE) + SET( FLTK_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") +ENDIF(APPLE) + +IF(CYGWIN) + SET( FLTK_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32) +ENDIF(CYGWIN) + +# If FLTK_INCLUDE_DIR is already defined we assigne its value to FLTK_DIR +IF(FLTK_INCLUDE_DIR) + SET(FLTK_DIR ${FLTK_INCLUDE_DIR}) +ENDIF(FLTK_INCLUDE_DIR) + + +# If FLTK has been built using CMake we try to find everything directly +SET(FLTK_DIR_STRING "directory containing FLTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.") + +# Search only if the location is not already known. +IF(NOT FLTK_DIR) + # Get the system search path as a list. + IF(UNIX) + STRING(REGEX MATCHALL "[^:]+" FLTK_DIR_SEARCH1 "$ENV{PATH}") + ELSE(UNIX) + STRING(REGEX REPLACE "\\\\" "/" FLTK_DIR_SEARCH1 "$ENV{PATH}") + ENDIF(UNIX) + STRING(REGEX REPLACE "/;" ";" FLTK_DIR_SEARCH2 ${FLTK_DIR_SEARCH1}) + + # Construct a set of paths relative to the system search path. + SET(FLTK_DIR_SEARCH "") + FOREACH(dir ${FLTK_DIR_SEARCH2}) + SET(FLTK_DIR_SEARCH ${FLTK_DIR_SEARCH} "${dir}/../lib/fltk") + ENDFOREACH(dir) + + # + # Look for an installation or build tree. + # + FIND_PATH(FLTK_DIR FLTKConfig.cmake + # Look for an environment variable FLTK_DIR. + $ENV{FLTK_DIR} + + # Look in places relative to the system executable search path. + ${FLTK_DIR_SEARCH} + + # Look in standard UNIX install locations. + /usr/local/lib/fltk + /usr/lib/fltk + /usr/local/include + /usr/include + /usr/local/fltk + /usr/X11R6/include + + # Read from the CMakeSetup registry entries. It is likely that + # FLTK will have been recently built. + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] + + # Help the user find it if we cannot. + DOC "The ${FLTK_DIR_STRING}" + ) +ENDIF(NOT FLTK_DIR) + +# If FLTK was found, load the configuration file to get the rest of the +# settings. +IF(FLTK_DIR) + + # Check if FLTK was built using CMake + IF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake) + SET(FLTK_BUILT_WITH_CMAKE 1) + ENDIF(EXISTS ${FLTK_DIR}/FLTKConfig.cmake) + + IF(FLTK_BUILT_WITH_CMAKE) + SET(FLTK_FOUND 1) + INCLUDE(${FLTK_DIR}/FLTKConfig.cmake) + + # Fluid + IF(FLUID_COMMAND) + SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") + ELSE(FLUID_COMMAND) + FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid PATHS + ${FLTK_EXECUTABLE_DIRS} + ${FLTK_EXECUTABLE_DIRS}/RelWithDebInfo + ${FLTK_EXECUTABLE_DIRS}/Debug + ${FLTK_EXECUTABLE_DIRS}/Release + NO_SYSTEM_PATH) + ENDIF(FLUID_COMMAND) + # MARK_AS_ADVANCED(FLTK_FLUID_EXECUTABLE) + + SET(FLTK_INCLUDE_DIR ${FLTK_DIR}) + LINK_DIRECTORIES(${FLTK_LIBRARY_DIRS}) + + SET(FLTK_BASE_LIBRARY fltk) + SET(FLTK_GL_LIBRARY fltk_gl) + SET(FLTK_FORMS_LIBRARY fltk_forms) + SET(FLTK_IMAGES_LIBRARY fltk_images) + + # Add the extra libraries + LOAD_CACHE(${FLTK_DIR} + READ_WITH_PREFIX + FL FLTK_USE_SYSTEM_JPEG + FL FLTK_USE_SYSTEM_PNG + FL FLTK_USE_SYSTEM_ZLIB + ) + + SET(FLTK_IMAGES_LIBS "") + IF(FLFLTK_USE_SYSTEM_JPEG) + SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_jpeg) + ENDIF(FLFLTK_USE_SYSTEM_JPEG) + IF(FLFLTK_USE_SYSTEM_PNG) + SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_png) + ENDIF(FLFLTK_USE_SYSTEM_PNG) + IF(FLFLTK_USE_SYSTEM_ZLIB) + SET(FLTK_IMAGES_LIBS ${FLTK_IMAGES_LIBS} fltk_zlib) + ENDIF(FLFLTK_USE_SYSTEM_ZLIB) + SET(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + + ELSE(FLTK_BUILT_WITH_CMAKE) + + # if FLTK was not built using CMake + # Find fluid executable. + FIND_PROGRAM(FLTK_FLUID_EXECUTABLE fluid ${FLTK_INCLUDE_DIR}/fluid) + + # Use location of fluid to help find everything else. + SET(FLTK_INCLUDE_SEARCH_PATH "") + SET(FLTK_LIBRARY_SEARCH_PATH "") + IF(FLTK_FLUID_EXECUTABLE) + GET_FILENAME_COMPONENT(FLTK_BIN_DIR "${FLTK_FLUID_EXECUTABLE}" PATH) + SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} + ${FLTK_BIN_DIR}/../include ${FLTK_BIN_DIR}/..) + SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} + ${FLTK_BIN_DIR}/../lib) + SET(FLTK_WRAP_UI 1) + ENDIF(FLTK_FLUID_EXECUTABLE) + + SET(FLTK_INCLUDE_SEARCH_PATH ${FLTK_INCLUDE_SEARCH_PATH} + /usr/local/include + /usr/include + /usr/local/fltk + /usr/X11R6/include + ) + + FIND_PATH(FLTK_INCLUDE_DIR FL/Fl.h ${FLTK_INCLUDE_SEARCH_PATH}) + + SET(FLTK_LIBRARY_SEARCH_PATH ${FLTK_LIBRARY_SEARCH_PATH} + /usr/lib + /usr/local/lib + /usr/local/fltk/lib + /usr/X11R6/lib + ${FLTK_INCLUDE_DIR}/lib + ) + + FIND_LIBRARY(FLTK_BASE_LIBRARY NAMES fltk fltkd + PATHS ${FLTK_LIBRARY_SEARCH_PATH}) + FIND_LIBRARY(FLTK_GL_LIBRARY NAMES fltkgl fltkgld fltk_gl + PATHS ${FLTK_LIBRARY_SEARCH_PATH}) + FIND_LIBRARY(FLTK_FORMS_LIBRARY NAMES fltkforms fltkformsd fltk_forms + PATHS ${FLTK_LIBRARY_SEARCH_PATH}) + FIND_LIBRARY(FLTK_IMAGES_LIBRARY NAMES fltkimages fltkimagesd fltk_images + PATHS ${FLTK_LIBRARY_SEARCH_PATH}) + + # Find the extra libraries needed for the fltk_images library. + IF(UNIX) + FIND_PROGRAM(FLTK_CONFIG_SCRIPT fltk-config PATHS ${FLTK_BIN_DIR}) + IF(FLTK_CONFIG_SCRIPT) + EXEC_PROGRAM(${FLTK_CONFIG_SCRIPT} ARGS --use-images --ldflags + OUTPUT_VARIABLE FLTK_IMAGES_LDFLAGS) + SET(FLTK_LIBS_EXTRACT_REGEX ".*-lfltk_images (.*) -lfltk.*") + IF("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") + STRING(REGEX REPLACE "${FLTK_LIBS_EXTRACT_REGEX}" "\\1" + FLTK_IMAGES_LIBS "${FLTK_IMAGES_LDFLAGS}") + STRING(REGEX REPLACE " +" ";" FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}") + # The EXEC_PROGRAM will not be inherited into subdirectories from + # the file that originally included this module. Save the answer. + SET(FLTK_IMAGES_LIBS "${FLTK_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + ENDIF("${FLTK_IMAGES_LDFLAGS}" MATCHES "${FLTK_LIBS_EXTRACT_REGEX}") + ENDIF(FLTK_CONFIG_SCRIPT) + ENDIF(UNIX) + + ENDIF(FLTK_BUILT_WITH_CMAKE) +ENDIF(FLTK_DIR) + + +SET(FLTK_FOUND 1) +FOREACH(var FLTK_FLUID_EXECUTABLE FLTK_INCLUDE_DIR + FLTK_BASE_LIBRARY FLTK_GL_LIBRARY + FLTK_FORMS_LIBRARY FLTK_IMAGES_LIBRARY) + IF(NOT ${var}) + SET(FLTK_FOUND 0) + ENDIF(NOT ${var}) +ENDFOREACH(var) + +IF(FLTK_FOUND) + SET(FLTK_LIBRARIES ${FLTK_IMAGES_LIBRARY} ${FLTK_IMAGES_LIBS} ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY} + ${FLTK_FORMS_LIBRARY} ) + IF(APPLE) + SET(FLTK_LIBRARIES ${FLTK_PLATFORM_DEPENDENT_LIBS} ${FLTK_LIBRARIES}) + ELSE(APPLE) + SET(FLTK_LIBRARIES ${FLTK_LIBRARIES} ${FLTK_PLATFORM_DEPENDENT_LIBS}) + ENDIF(APPLE) + + # The following deprecated settings are for compatibility with CMake 1.4 + SET (HAS_FLTK ${FLTK_FOUND}) + SET (FLTK_INCLUDE_PATH ${FLTK_INCLUDE_DIR}) + SET (FLTK_FLUID_EXE ${FLTK_FLUID_EXECUTABLE}) + SET (FLTK_LIBRARY ${FLTK_LIBRARIES}) +ENDIF(FLTK_FOUND) diff --git a/Modules/FindFLTK2.cmake b/Modules/FindFLTK2.cmake new file mode 100755 index 000000000..a43475813 --- /dev/null +++ b/Modules/FindFLTK2.cmake @@ -0,0 +1,268 @@ +# - Find the native FLTK2 includes and library +# The following settings are defined +# FLTK2_FLUID_EXECUTABLE, where to find the Fluid tool +# FLTK2_WRAP_UI, This enables the FLTK2_WRAP_UI command +# FLTK2_INCLUDE_DIR, where to find include files +# FLTK2_LIBRARIES, list of fltk2 libraries +# FLTK2_FOUND, Don't use FLTK2 if false. +# The following settings should not be used in general. +# FLTK2_BASE_LIBRARY = the full path to fltk2.lib +# FLTK2_GL_LIBRARY = the full path to fltk2_gl.lib +# FLTK2_IMAGES_LIBRARY = the full path to fltk2_images.lib + +SET (FLTK2_DIR $ENV{FLTK2_DIR} ) + +# Platform dependent libraries required by FLTK2 +IF(WIN32) + IF(NOT CYGWIN) + IF(BORLAND) + SET( FLTK2_PLATFORM_DEPENDENT_LIBS import32 ) + ELSE(BORLAND) + SET( FLTK2_PLATFORM_DEPENDENT_LIBS wsock32 comctl32 ) + ENDIF(BORLAND) + ENDIF(NOT CYGWIN) +ENDIF(WIN32) + +IF(UNIX) + INCLUDE(${CMAKE_ROOT}/Modules/FindX11.cmake) + SET( FLTK2_PLATFORM_DEPENDENT_LIBS ${X11_LIBRARIES} -lm) +ENDIF(UNIX) + +IF(APPLE) + SET( FLTK2_PLATFORM_DEPENDENT_LIBS "-framework Carbon -framework Cocoa -framework ApplicationServices -lz") +ENDIF(APPLE) + +IF(CYGWIN) + SET( FLTK2_PLATFORM_DEPENDENT_LIBS ole32 uuid comctl32 wsock32 supc++ -lm -lgdi32) +ENDIF(CYGWIN) + +# If FLTK2_INCLUDE_DIR is already defined we assigne its value to FLTK2_DIR +IF(FLTK2_INCLUDE_DIR) + SET(FLTK2_DIR ${FLTK2_INCLUDE_DIR}) +ELSE(FLTK2_INCLUDE_DIR) + SET(FLTK2_INCLUDE_DIR ${FLTK2_DIR}) +ENDIF(FLTK2_INCLUDE_DIR) + + +# If FLTK2 has been built using CMake we try to find everything directly +SET(FLTK2_DIR_STRING "directory containing FLTK2Config.cmake. This is either the root of the build tree, or PREFIX/lib/fltk for an installation.") + +# Search only if the location is not already known. +IF(NOT FLTK2_DIR) + # Get the system search path as a list. + IF(UNIX) + STRING(REGEX MATCHALL "[^:]+" FLTK2_DIR_SEARCH1 "$ENV{PATH}") + ELSE(UNIX) + STRING(REGEX REPLACE "\\\\" "/" FLTK2_DIR_SEARCH1 "$ENV{PATH}") + ENDIF(UNIX) + STRING(REGEX REPLACE "/;" ";" FLTK2_DIR_SEARCH2 ${FLTK2_DIR_SEARCH1}) + + # Construct a set of paths relative to the system search path. + SET(FLTK2_DIR_SEARCH "") + FOREACH(dir ${FLTK2_DIR_SEARCH2}) + SET(FLTK2_DIR_SEARCH ${FLTK2_DIR_SEARCH} "${dir}/../lib/fltk") + ENDFOREACH(dir) + + # + # Look for an installation or build tree. + # + FIND_PATH(FLTK2_DIR FLTK2Config.cmake + # Look for an environment variable FLTK2_DIR. + $ENV{FLTK2_DIR} + + # Look in places relative to the system executable search path. + ${FLTK2_DIR_SEARCH} + + # Look in standard UNIX install locations. + /usr/local/lib/fltk2 + /usr/lib/fltk2 + /usr/local/include + /usr/include + /usr/local/fltk2 + /usr/X11R6/include + + # Read from the CMakeSetup registry entries. It is likely that + # FLTK2 will have been recently built. + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] + + # Help the user find it if we cannot. + DOC "The ${FLTK2_DIR_STRING}" + ) + + IF(NOT FLTK2_DIR) + FIND_PATH(FLTK2_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH}) + ENDIF(NOT FLTK2_DIR) + +ENDIF(NOT FLTK2_DIR) + + +# If FLTK2 was found, load the configuration file to get the rest of the +# settings. +IF(FLTK2_DIR) + + # Check if FLTK2 was built using CMake + IF(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake) + SET(FLTK2_BUILT_WITH_CMAKE 1) + ENDIF(EXISTS ${FLTK2_DIR}/FLTK2Config.cmake) + + IF(FLTK2_BUILT_WITH_CMAKE) + SET(FLTK2_FOUND 1) + INCLUDE(${FLTK2_DIR}/FLTK2Config.cmake) + + # Fluid + IF(FLUID_COMMAND) + SET(FLTK2_FLUID_EXECUTABLE ${FLUID_COMMAND} CACHE FILEPATH "Fluid executable") + ELSE(FLUID_COMMAND) + FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 PATHS + ${FLTK2_EXECUTABLE_DIRS} + ${FLTK2_EXECUTABLE_DIRS}/RelWithDebInfo + ${FLTK2_EXECUTABLE_DIRS}/Debug + ${FLTK2_EXECUTABLE_DIRS}/Release + NO_SYSTEM_PATH) + ENDIF(FLUID_COMMAND) + + MARK_AS_ADVANCED(FLTK2_FLUID_EXECUTABLE) + SET( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} ) + + + + + SET(FLTK2_INCLUDE_DIR ${FLTK2_DIR}) + LINK_DIRECTORIES(${FLTK2_LIBRARY_DIRS}) + + SET(FLTK2_BASE_LIBRARY fltk2) + SET(FLTK2_GL_LIBRARY fltk2_gl) + SET(FLTK2_IMAGES_LIBRARY fltk2_images) + + # Add the extra libraries + LOAD_CACHE(${FLTK2_DIR} + READ_WITH_PREFIX + FL FLTK2_USE_SYSTEM_JPEG + FL FLTK2_USE_SYSTEM_PNG + FL FLTK2_USE_SYSTEM_ZLIB + ) + + SET(FLTK2_IMAGES_LIBS "") + IF(FLFLTK2_USE_SYSTEM_JPEG) + SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_jpeg) + ENDIF(FLFLTK2_USE_SYSTEM_JPEG) + IF(FLFLTK2_USE_SYSTEM_PNG) + SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_png) + ENDIF(FLFLTK2_USE_SYSTEM_PNG) + IF(FLFLTK2_USE_SYSTEM_ZLIB) + SET(FLTK2_IMAGES_LIBS ${FLTK2_IMAGES_LIBS} fltk2_zlib) + ENDIF(FLFLTK2_USE_SYSTEM_ZLIB) + SET(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk2_images library.") + + ELSE(FLTK2_BUILT_WITH_CMAKE) + + # if FLTK2 was not built using CMake + # Find fluid executable. + FIND_PROGRAM(FLTK2_FLUID_EXECUTABLE fluid2 ${FLTK2_INCLUDE_DIR}/fluid) + + # Use location of fluid to help find everything else. + SET(FLTK2_INCLUDE_SEARCH_PATH "") + SET(FLTK2_LIBRARY_SEARCH_PATH "") + IF(FLTK2_FLUID_EXECUTABLE) + SET( FLTK_FLUID_EXECUTABLE ${FLTK2_FLUID_EXECUTABLE} ) + GET_FILENAME_COMPONENT(FLTK2_BIN_DIR "${FLTK2_FLUID_EXECUTABLE}" PATH) + SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH} + ${FLTK2_BIN_DIR}/../include ${FLTK2_BIN_DIR}/..) + SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH} + ${FLTK2_BIN_DIR}/../lib) + SET(FLTK2_WRAP_UI 1) + ENDIF(FLTK2_FLUID_EXECUTABLE) + + SET(FLTK2_INCLUDE_SEARCH_PATH ${FLTK2_INCLUDE_SEARCH_PATH} + /usr/local/include + /usr/include + /usr/local/fltk2 + /usr/X11R6/include + ) + + FIND_PATH(FLTK2_INCLUDE_DIR fltk/run.h ${FLTK2_INCLUDE_SEARCH_PATH}) + + SET(FLTK2_LIBRARY_SEARCH_PATH ${FLTK2_LIBRARY_SEARCH_PATH} + /usr/lib + /usr/local/lib + /usr/local/fltk2/lib + /usr/X11R6/lib + ${FLTK2_INCLUDE_DIR}/lib + ) + + FIND_LIBRARY(FLTK2_BASE_LIBRARY NAMES fltk2 + PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) + FIND_LIBRARY(FLTK2_GL_LIBRARY NAMES fltk2_gl + PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) + FIND_LIBRARY(FLTK2_IMAGES_LIBRARY NAMES fltk2_images + PATHS ${FLTK2_LIBRARY_SEARCH_PATH}) + + # Find the extra libraries needed for the fltk_images library. + IF(UNIX) + FIND_PROGRAM(FLTK2_CONFIG_SCRIPT fltk2-config PATHS ${FLTK2_BIN_DIR}) + IF(FLTK2_CONFIG_SCRIPT) + EXEC_PROGRAM(${FLTK2_CONFIG_SCRIPT} ARGS --use-images --ldflags + OUTPUT_VARIABLE FLTK2_IMAGES_LDFLAGS) + SET(FLTK2_LIBS_EXTRACT_REGEX ".*-lfltk2_images (.*) -lfltk2.*") + IF("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}") + STRING(REGEX REPLACE "${FLTK2_LIBS_EXTRACT_REGEX}" "\\1" + FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LDFLAGS}") + STRING(REGEX REPLACE " +" ";" FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}") + # The EXEC_PROGRAM will not be inherited into subdirectories from + # the file that originally included this module. Save the answer. + SET(FLTK2_IMAGES_LIBS "${FLTK2_IMAGES_LIBS}" CACHE INTERNAL + "Extra libraries for fltk_images library.") + ENDIF("${FLTK2_IMAGES_LDFLAGS}" MATCHES "${FLTK2_LIBS_EXTRACT_REGEX}") + ENDIF(FLTK2_CONFIG_SCRIPT) + ENDIF(UNIX) + + ENDIF(FLTK2_BUILT_WITH_CMAKE) +ENDIF(FLTK2_DIR) + + +SET(FLTK2_FOUND 1) +FOREACH(var FLTK2_FLUID_EXECUTABLE FLTK2_INCLUDE_DIR + FLTK2_BASE_LIBRARY FLTK2_GL_LIBRARY + FLTK2_IMAGES_LIBRARY) + IF(NOT ${var}) + MESSAGE( STATUS "${var} not found" ) + SET(FLTK2_FOUND 0) + ENDIF(NOT ${var}) +ENDFOREACH(var) + + +IF(FLTK2_FOUND) + SET(FLTK2_LIBRARIES ${FLTK2_IMAGES_LIBRARY} ${FLTK2_IMAGES_LIBS} ${FLTK2_BASE_LIBRARY} ${FLTK2_GL_LIBRARY} ) + IF(APPLE) + SET(FLTK2_LIBRARIES ${FLTK2_PLATFORM_DEPENDENT_LIBS} ${FLTK2_LIBRARIES}) + ELSE(APPLE) + SET(FLTK2_LIBRARIES ${FLTK2_LIBRARIES} ${FLTK2_PLATFORM_DEPENDENT_LIBS}) + ENDIF(APPLE) + + # The following deprecated settings are for compatibility with CMake 1.4 + SET (HAS_FLTK2 ${FLTK2_FOUND}) + SET (FLTK2_INCLUDE_PATH ${FLTK2_INCLUDE_DIR}) + SET (FLTK2_FLUID_EXE ${FLTK2_FLUID_EXECUTABLE}) + SET (FLTK2_LIBRARY ${FLTK2_LIBRARIES}) +ELSE(FLTK2_FOUND) + # make FIND_PACKAGE friendly + IF(NOT FLTK2_FIND_QUIETLY) + IF(FLTK2_FIND_REQUIRED) + MESSAGE(FATAL_ERROR + "FLTK2 required, please specify its location with FLTK2_DIR.") + ELSE(FLTK2_FIND_REQUIRED) + MESSAGE(STATUS "FLTK2 was not found.") + ENDIF(FLTK2_FIND_REQUIRED) + ENDIF(NOT FLTK2_FIND_QUIETLY) +ENDIF(FLTK2_FOUND) + diff --git a/Modules/FindFreetype.cmake b/Modules/FindFreetype.cmake new file mode 100644 index 000000000..c128c47c8 --- /dev/null +++ b/Modules/FindFreetype.cmake @@ -0,0 +1,94 @@ +# - Locate FreeType library +# This module defines +# FREETYPE_LIBRARIES, the library to link against +# FREETYPE_FOUND, if false, do not try to link to FREETYPE +# FREETYPE_INCLUDE_DIRS, where to find headers. +# This is the concatenation of the paths: +# FREETYPE_INCLUDE_DIR_ft2build +# FREETYPE_INCLUDE_DIR_freetype2 +# +# $FREETYPE_DIR is an environment variable that would +# correspond to the ./configure --prefix=$FREETYPE_DIR +# used in building FREETYPE. + +# Created by Eric Wing. +# Modifications by Alexander Neundorf. +# This file has been renamed to "FindFreetype.cmake" instead of the correct +# "FindFreeType.cmake" in order to be compatible with the one from KDE4, Alex. + +# Ugh, FreeType seems to use some #include trickery which +# makes this harder than it should be. It looks like they +# put ft2build.h in a common/easier-to-find location which +# then contains a #include to a more specific header in a +# more specific location (#include ). +# Then from there, they need to set a bunch of #define's +# so you can do something like: +# #include FT_FREETYPE_H +# Unfortunately, using CMake's mechanisms like INCLUDE_DIRECTORIES() +# wants explicit full paths and this trickery doesn't work too well. +# I'm going to attempt to cut out the middleman and hope +# everything still works. +FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + $ENV{FREETYPE_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + + +FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h + PATHS + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include +) + +FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + $ENV{FREETYPE_DIR}/include/freetype2 + NO_DEFAULT_PATH +) + +FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h + /usr/local/X11R6/include + /usr/local/X11/include + /usr/X11/include + /sw/include + /opt/local/include + /usr/freeware/include + PATH_SUFFIXES freetype2 +) + +FIND_LIBRARY(FREETYPE_LIBRARY + NAMES freetype libfreetype freetype219 + PATHS + $ENV{FREETYPE_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(FREETYPE_LIBRARY + NAMES freetype libfreetype freetype219 + PATHS + /usr/local/X11R6 + /usr/local/X11 + /usr/X11 + /sw + /usr/freeware + PATH_SUFFIXES lib64 lib +) + +# set the user variables +IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) + SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}") +ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2) +SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}") + +# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) + + +MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build) diff --git a/Modules/FindGCCXML.cmake b/Modules/FindGCCXML.cmake new file mode 100644 index 000000000..594f970ee --- /dev/null +++ b/Modules/FindGCCXML.cmake @@ -0,0 +1,8 @@ +# - Find the GCC-XML front-end executable. +FIND_PROGRAM(GCCXML + NAMES gccxml + ../GCC_XML/gccxml + PATHS [HKEY_CURRENT_USER\\Software\\Kitware\\GCC_XML;loc] + "$ENV{ProgramFiles}/GCC_XML" + "C:/Program Files/GCC_XML" +) diff --git a/Modules/FindGDAL.cmake b/Modules/FindGDAL.cmake new file mode 100644 index 000000000..a92b04c63 --- /dev/null +++ b/Modules/FindGDAL.cmake @@ -0,0 +1,84 @@ +# Locate gdal +# This module defines +# GDAL_LIBRARY +# GDAL_FOUND, if false, do not try to link to gdal +# GDAL_INCLUDE_DIR, where to find the headers +# +# $GDALDIR is an environment variable that would +# correspond to the ./configure --prefix=$GDAL_DIR +# used in building gdal. +# +# Created by Eric Wing. I'm not a gdal user, but OpenSceneGraph uses it +# for osgTerrain so I whipped this module together for completeness. +# I actually don't know the conventions or where files are typically +# placed in distros. +# Any real gdal users are encouraged to correct this (but please don't +# break the OS X framework stuff when doing so which is what usually seems +# to happen). + +# This makes the presumption that you are include gdal.h like +# #include "gdal.h" + +FIND_PATH(GDAL_INCLUDE_DIR gdal.h + $ENV{GDAL_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + + + +FIND_PATH(GDAL_INCLUDE_DIR gdal.h + PATHS + ~/Library/Frameworks/gdal.framework/Headers + /Library/Frameworks/gdal.framework/Headers + /usr/local/include/gdal + /usr/local/include/GDAL + /usr/local/include + /usr/include/gdal + /usr/include/GDAL + /usr/include + /sw/include/gdal + /sw/include/GDAL + /sw/include # Fink + /opt/local/include/gdal + /opt/local/include/GDAL + /opt/local/include # DarwinPorts + /opt/csw/include/gdal + /opt/csw/include/GDAL + /opt/csw/include # Blastwave + /opt/include/gdal + /opt/include/GDAL + /opt/include +) + +FIND_LIBRARY(GDAL_LIBRARY + NAMES gdal GDAL + PATHS + $ENV{GDAL_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(GDAL_LIBRARY + NAMES gdal GDAL + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + /usr/freeware + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;GDAL_ROOT]/lib + PATH_SUFFIXES lib64 lib +) + +SET(GDAL_FOUND "NO") +IF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR) + SET(GDAL_FOUND "YES") +ENDIF(GDAL_LIBRARY AND GDAL_INCLUDE_DIR) + + + diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake new file mode 100644 index 000000000..305be6821 --- /dev/null +++ b/Modules/FindGIF.cmake @@ -0,0 +1,67 @@ +# This module defines +# GIF_LIBRARIES - libraries to link to in order to use GIF +# GIF_FOUND, if false, do not try to link +# GIF_INCLUDE_DIR, where to find the headers +# +# $GIF_DIR is an environment variable that would +# correspond to the ./configure --prefix=$GIF_DIR + +# Created by Eric Wing. +# Modifications by Alexander Neundorf + +FIND_PATH(GIF_INCLUDE_DIR gif_lib.h + PATHS + $ENV{GIF_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + + + +FIND_PATH(GIF_INCLUDE_DIR gif_lib.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /sw/include # Fink + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include + /usr/freeware/include +) + +# the gif library can have many names :-/ +SET(POTENTIAL_GIF_LIBS gif libgif ungif libungif giflib) + +FIND_LIBRARY(GIF_LIBRARY + NAMES ${POTENTIAL_GIF_LIBS} + PATHS + $ENV{GIF_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + + + +FIND_LIBRARY(GIF_LIBRARY + NAMES ${POTENTIAL_GIF_LIBS} + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + /usr/freeware + PATH_SUFFIXES lib64 lib +) + +# see readme.txt +SET(GIF_LIBRARIES ${GIF_LIBRARY}) + +# handle the QUIETLY and REQUIRED arguments and set GIF_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF DEFAULT_MSG GIF_LIBRARY GIF_INCLUDE_DIR) + +MARK_AS_ADVANCED(GIF_INCLUDE_DIR GIF_LIBRARY) diff --git a/Modules/FindGLU.cmake b/Modules/FindGLU.cmake new file mode 100644 index 000000000..fa56a5168 --- /dev/null +++ b/Modules/FindGLU.cmake @@ -0,0 +1,14 @@ + + +# Use of this file is deprecated, and is here for backwards compatibility with CMake 1.4 +# GLU library is now found by FindOpenGL.cmake +# +# + +INCLUDE(FindOpenGL) + +IF (OPENGL_GLU_FOUND) + SET (GLU_LIBRARY ${OPENGL_LIBRARIES}) + SET (GLU_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) +ENDIF (OPENGL_GLU_FOUND) + diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake new file mode 100644 index 000000000..74b7ff1d2 --- /dev/null +++ b/Modules/FindGLUT.cmake @@ -0,0 +1,78 @@ +# - try to find glut library and include files +# GLUT_INCLUDE_DIR, where to find GL/glut.h, etc. +# GLUT_LIBRARIES, the libraries to link against +# GLUT_FOUND, If false, do not try to use GLUT. +# Also defined, but not for general use are: +# GLUT_glut_LIBRARY = the full path to the glut library. +# GLUT_Xmu_LIBRARY = the full path to the Xmu library. +# GLUT_Xi_LIBRARY = the full path to the Xi Library. + +IF (WIN32) + FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h + PATHS ${GLUT_ROOT_PATH}/include ) + FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 + ${OPENGL_LIBRARY_DIR} + ${GLUT_ROOT_PATH}/Release + ) +ELSE (WIN32) + + IF (APPLE) + # These values for Apple could probably do with improvement. + FIND_PATH( GLUT_INCLUDE_DIR glut.h + /System/Library/Frameworks/GLUT.framework/Versions/A/Headers + ${OPENGL_LIBRARY_DIR} + ) + SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") + SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") + ELSE (APPLE) + + FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h + /usr/include/GL + /usr/openwin/share/include + /usr/openwin/include + /opt/graphics/OpenGL/include + /opt/graphics/OpenGL/contrib/libglut + ) + + FIND_LIBRARY( GLUT_glut_LIBRARY glut + /usr/openwin/lib + ) + + FIND_LIBRARY( GLUT_Xi_LIBRARY Xi + /usr/openwin/lib + ) + + FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu + /usr/openwin/lib + ) + + ENDIF (APPLE) + +ENDIF (WIN32) + +SET( GLUT_FOUND "NO" ) +IF(GLUT_INCLUDE_DIR) + IF(GLUT_glut_LIBRARY) + # Is -lXi and -lXmu required on all platforms that have it? + # If not, we need some way to figure out what platform we are on. + SET( GLUT_LIBRARIES + ${GLUT_glut_LIBRARY} + ${GLUT_Xmu_LIBRARY} + ${GLUT_Xi_LIBRARY} + ${GLUT_cocoa_LIBRARY} + ) + SET( GLUT_FOUND "YES" ) + + #The following deprecated settings are for backwards compatibility with CMake1.4 + SET (GLUT_LIBRARY ${GLUT_LIBRARIES}) + SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) + + ENDIF(GLUT_glut_LIBRARY) +ENDIF(GLUT_INCLUDE_DIR) + +MARK_AS_ADVANCED( + GLUT_INCLUDE_DIR + GLUT_glut_LIBRARY + GLUT_Xmu_LIBRARY + GLUT_Xi_LIBRARY + ) diff --git a/Modules/FindGTK.cmake b/Modules/FindGTK.cmake new file mode 100644 index 000000000..7d802415b --- /dev/null +++ b/Modules/FindGTK.cmake @@ -0,0 +1,152 @@ +# - try to find GTK (and glib) and GTKGLArea +# GTK_INCLUDE_DIR - Directories to include to use GTK +# GTK_LIBRARIES - Files to link against to use GTK +# GTK_FOUND - GTK was found +# GTK_GL_FOUND - GTK's GL features were found + +# don't even bother under WIN32 +IF(UNIX) + + FIND_PATH( GTK_gtk_INCLUDE_PATH NAMES gtk/gtk.h + PATH_SUFFIXES gtk-1.2 gtk12 + PATHS + /usr/openwin/share/include + /usr/openwin/include + /opt/gnome/include + ) + + # Some Linux distributions (e.g. Red Hat) have glibconfig.h + # and glib.h in different directories, so we need to look + # for both. + # - Atanas Georgiev + + FIND_PATH( GTK_glibconfig_INCLUDE_PATH NAMES glibconfig.h + PATHS + /usr/openwin/share/include + /usr/local/include/glib12 + /usr/lib/glib/include + /usr/local/lib/glib/include + /opt/gnome/include + /opt/gnome/lib/glib/include + ) + + FIND_PATH( GTK_glib_INCLUDE_PATH NAMES glib.h + PATH_SUFFIXES gtk-1.2 glib-1.2 glib12 + PATHS + /usr/openwin/share/include + /usr/lib/glib/include + /opt/gnome/include + ) + + FIND_PATH( GTK_gtkgl_INCLUDE_PATH NAMES gtkgl/gtkglarea.h + PATHS /usr/openwin/share/include + /opt/gnome/include + ) + + FIND_LIBRARY( GTK_gtkgl_LIBRARY gtkgl + /usr/openwin/lib + /opt/gnome/lib + ) + + # + # The 12 suffix is thanks to the FreeBSD ports collection + # + + FIND_LIBRARY( GTK_gtk_LIBRARY + NAMES gtk gtk12 + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + FIND_LIBRARY( GTK_gdk_LIBRARY + NAMES gdk gdk12 + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + FIND_LIBRARY( GTK_gmodule_LIBRARY + NAMES gmodule gmodule12 + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + FIND_LIBRARY( GTK_glib_LIBRARY + NAMES glib glib12 + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + FIND_LIBRARY( GTK_Xi_LIBRARY + NAMES Xi + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + FIND_LIBRARY( GTK_gthread_LIBRARY + NAMES gthread gthread12 + PATHS /usr/openwin/lib + /opt/gnome/lib + ) + + IF(GTK_gtk_INCLUDE_PATH + AND GTK_glibconfig_INCLUDE_PATH + AND GTK_glib_INCLUDE_PATH + AND GTK_gtk_LIBRARY + AND GTK_glib_LIBRARY) + + # Assume that if gtk and glib were found, the other + # supporting libraries have also been found. + + SET( GTK_FOUND "YES" ) + SET( GTK_INCLUDE_DIR ${GTK_gtk_INCLUDE_PATH} + ${GTK_glibconfig_INCLUDE_PATH} + ${GTK_glib_INCLUDE_PATH} ) + SET( GTK_LIBRARIES ${GTK_gtk_LIBRARY} + ${GTK_gdk_LIBRARY} + ${GTK_glib_LIBRARY} ) + + IF(GTK_gmodule_LIBRARY) + SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gmodule_LIBRARY}) + ENDIF(GTK_gmodule_LIBRARY) + IF(GTK_gthread_LIBRARY) + SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_gthread_LIBRARY}) + ENDIF(GTK_gthread_LIBRARY) + IF(GTK_Xi_LIBRARY) + SET(GTK_LIBRARIES ${GTK_LIBRARIES} ${GTK_Xi_LIBRARY}) + ENDIF(GTK_Xi_LIBRARY) + + IF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY) + SET( GTK_GL_FOUND "YES" ) + SET( GTK_INCLUDE_DIR ${GTK_INCLUDE_DIR} + ${GTK_gtkgl_INCLUDE_PATH} ) + SET( GTK_LIBRARIES ${GTK_gtkgl_LIBRARY} ${GTK_LIBRARIES} ) + MARK_AS_ADVANCED( + GTK_gtkgl_LIBRARY + GTK_gtkgl_INCLUDE_PATH + ) + ENDIF(GTK_gtkgl_INCLUDE_PATH AND GTK_gtkgl_LIBRARY) + + ENDIF(GTK_gtk_INCLUDE_PATH + AND GTK_glibconfig_INCLUDE_PATH + AND GTK_glib_INCLUDE_PATH + AND GTK_gtk_LIBRARY + AND GTK_glib_LIBRARY) + + MARK_AS_ADVANCED( + GTK_gdk_LIBRARY + GTK_glib_INCLUDE_PATH + GTK_glib_LIBRARY + GTK_glibconfig_INCLUDE_PATH + GTK_gmodule_LIBRARY + GTK_gthread_LIBRARY + GTK_Xi_LIBRARY + GTK_gtk_INCLUDE_PATH + GTK_gtk_LIBRARY + GTK_gtkgl_INCLUDE_PATH + GTK_gtkgl_LIBRARY + ) + +ENDIF(UNIX) + + + diff --git a/Modules/FindGettext.cmake b/Modules/FindGettext.cmake new file mode 100644 index 000000000..d1e3f9b93 --- /dev/null +++ b/Modules/FindGettext.cmake @@ -0,0 +1,65 @@ +# - Find GNU gettext tools +# This module looks for the GNU gettext tools. This module defines the +# following values: +# GETTEXT_MSGMERGE_EXECUTABLE: the full path to the msgmerge tool. +# GETTEXT_MSGFMT_EXECUTABLE: the full path to the msgfmt tool. +# GETTEXT_FOUND: True if gettext has been found. +# +# Additionally it provides the following macros: +# GETTEXT_CREATE_TRANSLATIONS ( outputFile [ALL] file1 ... fileN ) +# This will create a target "translations" which will convert the +# given input po files into the binary output mo file. If the +# ALL option is used, the translations will also be created when +# building the default target. + + + +FIND_PROGRAM(GETTEXT_MSGMERGE_EXECUTABLE msgmerge) + +FIND_PROGRAM(GETTEXT_MSGFMT_EXECUTABLE msgfmt) + +MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile) + + SET(_gmoFiles) + GET_FILENAME_COMPONENT(_potBasename ${_potFile} NAME_WE) + GET_FILENAME_COMPONENT(_absPotFile ${_potFile} ABSOLUTE) + + SET(_addToAll) + IF(${_firstPoFile} STREQUAL "ALL") + SET(_addToAll "ALL") + SET(_firstPoFile) + ENDIF(${_firstPoFile} STREQUAL "ALL") + + FOREACH (_currentPoFile ${ARGN}) + GET_FILENAME_COMPONENT(_absFile ${_currentPoFile} ABSOLUTE) + GET_FILENAME_COMPONENT(_abs_PATH ${_absFile} PATH) + GET_FILENAME_COMPONENT(_lang ${_absFile} NAME_WE) + SET(_gmoFile ${CMAKE_CURRENT_BINARY_DIR}/${_lang}.gmo) + + ADD_CUSTOM_COMMAND( + OUTPUT ${_gmoFile} + COMMAND ${GETTEXT_MSGMERGE_EXECUTABLE} --quiet --update --backup=none -s ${_absFile} ${_absPotFile} + COMMAND ${GETTEXT_MSGFMT_EXECUTABLE} -o ${_gmoFile} ${_absFile} + DEPENDS ${_absPotFile} ${_absFile} + ) + + INSTALL(FILES ${_gmoFile} DESTINATION share/locale/${_lang}/LC_MESSAGES RENAME ${_potBasename}.mo) + SET(_gmoFiles ${_gmoFiles} ${_gmoFile}) + + ENDFOREACH (_currentPoFile ) + + ADD_CUSTOM_TARGET(translations ${_addToAll} DEPENDS ${_gmoFiles}) + +ENDMACRO(GETTEXT_CREATE_TRANSLATIONS ) + +IF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) + SET(GETTEXT_FOUND TRUE) +ELSE (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) + SET(GETTEXT_FOUND FALSE) + IF (GetText_REQUIRED) + MESSAGE(FATAL_ERROR "GetText not found") + ENDIF (GetText_REQUIRED) +ENDIF (GETTEXT_MSGMERGE_EXECUTABLE AND GETTEXT_MSGFMT_EXECUTABLE ) + + + diff --git a/Modules/FindGnuplot.cmake b/Modules/FindGnuplot.cmake new file mode 100644 index 000000000..c12ebb70a --- /dev/null +++ b/Modules/FindGnuplot.cmake @@ -0,0 +1,28 @@ +# - this module looks for gnuplot +# +# Once done this will define +# +# GNUPLOT_FOUND - system has Gnuplot +# GNUPLOT_EXECUTABLE - the Gnuplot executable + +INCLUDE(FindCygwin) + +FIND_PROGRAM(GNUPLOT_EXECUTABLE + NAMES + gnuplot + pgnuplot + wgnupl32 + PATHS + ${CYGWIN_INSTALL_PATH}/bin +) + +# for compatibility +SET(GNUPLOT ${GNUPLOT_EXECUTABLE}) + +# handle the QUIETLY and REQUIRED arguments and set GNUPLOT_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gnuplot DEFAULT_MSG GNUPLOT_EXECUTABLE) + +MARK_AS_ADVANCED( GNUPLOT_EXECUTABLE ) + diff --git a/Modules/FindHSPELL.cmake b/Modules/FindHSPELL.cmake new file mode 100644 index 000000000..fa5c27559 --- /dev/null +++ b/Modules/FindHSPELL.cmake @@ -0,0 +1,32 @@ +# - Try to find HSPELL +# Once done this will define +# +# HSPELL_FOUND - system has HSPELL +# HSPELL_INCLUDE_DIR - the HSPELL include directory +# HSPELL_LIBRARIES - The libraries needed to use HSPELL +# HSPELL_DEFINITIONS - Compiler switches required for using HSPELL + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES) + # Already in cache, be silent + SET(HSPELL_FIND_QUIETLY TRUE) +ENDIF (HSPELL_INCLUDE_DIR AND HSPELL_LIBRARIES) + + +FIND_PATH(HSPELL_INCLUDE_DIR hspell.h ) + +FIND_LIBRARY(HSPELL_LIBRARIES NAMES hspell ) + +# handle the QUIETLY and REQUIRED arguments and set HSPELL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(HSPELL DEFAULT_MSG HSPELL_LIBRARIES HSPELL_INCLUDE_DIR) + + +MARK_AS_ADVANCED(HSPELL_INCLUDE_DIR HSPELL_LIBRARIES) + diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake new file mode 100644 index 000000000..faa35c445 --- /dev/null +++ b/Modules/FindHTMLHelp.cmake @@ -0,0 +1,41 @@ +# - This module looks for Microsoft HTML Help Compiler +# It defines: +# HTML_HELP_COMPILER : full path to the Compiler (hhc.exe) +# HTML_HELP_INCLUDE_PATH : include path to the API (htmlhelp.h) +# HTML_HELP_LIBRARY : full path to the library (htmlhelp.lib) +# + +IF(WIN32) + + FIND_PROGRAM(HTML_HELP_COMPILER + hhc + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + "$ENV{ProgramFiles}/HTML Help Workshop" + "C:/Program Files/HTML Help Workshop" + ) + + GET_FILENAME_COMPONENT(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH) + + FIND_PATH(HTML_HELP_INCLUDE_PATH + htmlhelp.h + "${HTML_HELP_COMPILER_PATH}/include" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" + "$ENV{ProgramFiles}/HTML Help Workshop/include" + "C:/Program Files/HTML Help Workshop/include" + ) + + FIND_LIBRARY(HTML_HELP_LIBRARY + htmlhelp + "${HTML_HELP_COMPILER_PATH}/lib" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" + "$ENV{ProgramFiles}/HTML Help Workshop/lib" + "C:/Program Files/HTML Help Workshop/lib" + ) + + MARK_AS_ADVANCED( + HTML_HELP_COMPILER + HTML_HELP_INCLUDE_PATH + HTML_HELP_LIBRARY + ) + +ENDIF(WIN32) diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake new file mode 100644 index 000000000..2e2b0341b --- /dev/null +++ b/Modules/FindITK.cmake @@ -0,0 +1,87 @@ +# - Find an ITK installation or build tree. + +# When ITK is found, the ITKConfig.cmake file is sourced to setup the +# location and configuration of ITK. Please read this file, or +# ITKConfig.cmake.in from the ITK source tree for the full list of +# definitions. Of particular interest is ITK_USE_FILE, a CMake source file +# that can be included to set the include directories, library directories, +# and preprocessor macros. In addition to the variables read from +# ITKConfig.cmake, this find module also defines +# ITK_DIR - The directory containing ITKConfig.cmake. +# This is either the root of the build tree, +# or the lib/InsightToolkit directory. +# This is the only cache entry. +# +# ITK_FOUND - Whether ITK was found. If this is true, +# ITK_DIR is okay. +# +# USE_ITK_FILE - The full path to the UseITK.cmake file. +# This is provided for backward +# compatability. Use ITK_USE_FILE +# instead. + + +SET(ITK_DIR_STRING "directory containing ITKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/InsightToolkit for an installation.") + +# Search only if the location is not already known. +IF(NOT ITK_DIR) + # Get the system search path as a list. + IF(UNIX) + STRING(REGEX MATCHALL "[^:]+" ITK_DIR_SEARCH1 "$ENV{PATH}") + ELSE(UNIX) + STRING(REGEX REPLACE "\\\\" "/" ITK_DIR_SEARCH1 "$ENV{PATH}") + ENDIF(UNIX) + STRING(REGEX REPLACE "/;" ";" ITK_DIR_SEARCH2 ${ITK_DIR_SEARCH1}) + + # Construct a set of paths relative to the system search path. + SET(ITK_DIR_SEARCH "") + FOREACH(dir ${ITK_DIR_SEARCH2}) + SET(ITK_DIR_SEARCH ${ITK_DIR_SEARCH} "${dir}/../lib/InsightToolkit") + ENDFOREACH(dir) + + # + # Look for an installation or build tree. + # + FIND_PATH(ITK_DIR ITKConfig.cmake + # Look for an environment variable ITK_DIR. + $ENV{ITK_DIR} + + # Look in places relative to the system executable search path. + ${ITK_DIR_SEARCH} + + # Look in standard UNIX install locations. + /usr/local/lib/InsightToolkit + /usr/lib/InsightToolkit + + # Read from the CMakeSetup registry entries. It is likely that + # ITK will have been recently built. + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] + + # Help the user find it if we cannot. + DOC "The ${ITK_DIR_STRING}" + ) +ENDIF(NOT ITK_DIR) + +# If ITK was found, load the configuration file to get the rest of the +# settings. +IF(ITK_DIR) + SET(ITK_FOUND 1) + INCLUDE(${ITK_DIR}/ITKConfig.cmake) + + # Set USE_ITK_FILE for backward-compatability. + SET(USE_ITK_FILE ${ITK_USE_FILE}) +ELSE(ITK_DIR) + SET(ITK_FOUND 0) + IF(ITK_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Please set ITK_DIR to the ${ITK_DIR_STRING}") + ENDIF(ITK_FIND_REQUIRED) +ENDIF(ITK_DIR) diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake new file mode 100644 index 000000000..66e54bcfe --- /dev/null +++ b/Modules/FindImageMagick.cmake @@ -0,0 +1,82 @@ +# - Find Image Magick +# This module finds if ImageMagick tools are installed and determines +# where the executables are. This code sets the following variables: +# +# IMAGEMAGICK_CONVERT_EXECUTABLE = +# the full path to the 'convert' utility +# IMAGEMAGICK_MOGRIFY_EXECUTABLE = +# the full path to the 'mogrify' utility +# IMAGEMAGICK_IMPORT_EXECUTABLE = +# the full path to the 'import' utility +# IMAGEMAGICK_MONTAGE_EXECUTABLE = +# the full path to the 'montage' utility +# IMAGEMAGICK_COMPOSITE_EXECUTABLE = +# the full path to the 'composite' utility +# + +IF (WIN32) + + # Try to find the ImageMagick binary path. + + FIND_PATH(IMAGEMAGICK_BINARY_PATH mogrify.exe + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ImageMagick\\Current;BinPath] + DOC "Path to the ImageMagick binary directory where all executable should be found." + ) + + # Be extra-careful here: we do NOT want CMake to look in the system's PATH + # env var to search for convert.exe, otherwise it is going to pick + # Window's own convert.exe, and you may say good-bye to your disk. + + FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE + NAMES convert + PATHS ${IMAGEMAGICK_BINARY_PATH} + NO_SYSTEM_PATH + DOC "Path to ImageMagick's convert executable. WARNING: note that this tool, named convert.exe, conflicts with Microsoft Window's own convert.exe, which is used to convert FAT partitions to NTFS format ! Therefore, be extra-careful and make sure the right convert.exe has been picked." + ) + +ELSE (WIN32) + + SET (IMAGEMAGICK_BINARY_PATH "") + + FIND_PROGRAM(IMAGEMAGICK_CONVERT_EXECUTABLE + NAMES convert + PATHS ${IMAGEMAGICK_BINARY_PATH} + DOC "Path to ImageMagick's convert executable." + ) + +ENDIF (WIN32) + +# Find mogrify, import, montage, composite + +FIND_PROGRAM(IMAGEMAGICK_MOGRIFY_EXECUTABLE + NAMES mogrify + PATHS ${IMAGEMAGICK_BINARY_PATH} + DOC "Path to ImageMagick's mogrify executable." +) + +FIND_PROGRAM(IMAGEMAGICK_IMPORT_EXECUTABLE + NAMES import + PATHS ${IMAGEMAGICK_BINARY_PATH} + DOC "Path to ImageMagick's import executable." +) + +FIND_PROGRAM(IMAGEMAGICK_MONTAGE_EXECUTABLE + NAMES montage + PATHS ${IMAGEMAGICK_BINARY_PATH} + DOC "Path to ImageMagick's montage executable." +) + +FIND_PROGRAM(IMAGEMAGICK_COMPOSITE_EXECUTABLE + NAMES composite + PATHS ${IMAGEMAGICK_BINARY_PATH} + DOC "Path to ImageMagick's composite executable." +) + +MARK_AS_ADVANCED( + IMAGEMAGICK_BINARY_PATH + IMAGEMAGICK_CONVERT_EXECUTABLE + IMAGEMAGICK_MOGRIFY_EXECUTABLE + IMAGEMAGICK_IMPORT_EXECUTABLE + IMAGEMAGICK_MONTAGE_EXECUTABLE + IMAGEMAGICK_COMPOSITE_EXECUTABLE +) diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake new file mode 100644 index 000000000..26f473473 --- /dev/null +++ b/Modules/FindJNI.cmake @@ -0,0 +1,146 @@ +# - Find JNI java libraries. +# This module finds if Java is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# JAVA_AWT_LIB_PATH = the path to the jawt library +# JAVA_JVM_LIB_PATH = the path to the jvm library +# JAVA_INCLUDE_PATH = the include path to jni.h +# JAVA_INCLUDE_PATH2 = the include path to jni_md.h +# JAVA_AWT_INCLUDE_PATH = the include path to jawt.h +# +GET_FILENAME_COMPONENT(java_install_version + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit;CurrentVersion]" NAME) +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/i386 + $ENV{JAVA_HOME}/jre/lib/amd64 + /usr/lib + /usr/local/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/java/jre/lib/amd64 + /usr/lib/jvm/java-6-sun-1.6.0.00/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 + ) +SET(JAVA_JVM_LIBRARY_DIRECTORIES) +FOREACH(dir ${JAVA_AWT_LIBRARY_DIRECTORIES}) + SET(JAVA_JVM_LIBRARY_DIRECTORIES + ${JAVA_JVM_LIBRARY_DIRECTORIES} + "${dir}" + "${dir}/client" + "${dir}/server" + ) +ENDFOREACH(dir) + + +SET(JAVA_AWT_INCLUDE_DIRECTORIES + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include" + $ENV{JAVA_HOME}/include + /usr/include + /usr/local/include + /usr/lib/java/include + /usr/local/lib/java/include + /usr/lib/jvm/java-6-sun-1.6.0.00/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 + ) + +FOREACH(JAVA_PROG "${JAVA_RUNTIME}" "${JAVA_COMPILE}" "${JAVA_ARCHIVE}") + GET_FILENAME_COMPONENT(jpath "${JAVA_PROG}" PATH) + FOREACH(JAVA_INC_PATH ../include ../java/include ../share/java/include) + IF(EXISTS ${jpath}/${JAVA_INC_PATH}) + SET(JAVA_AWT_INCLUDE_DIRECTORIES ${JAVA_AWT_INCLUDE_DIRECTORIES} "${jpath}/${JAVA_INC_PATH}") + ENDIF(EXISTS ${jpath}/${JAVA_INC_PATH}) + ENDFOREACH(JAVA_INC_PATH) + FOREACH(JAVA_LIB_PATH + ../lib ../jre/lib ../jre/lib/i386 + ../java/lib ../java/jre/lib ../java/jre/lib/i386 + ../share/java/lib ../share/java/jre/lib ../share/java/jre/lib/i386) + IF(EXISTS ${jpath}/${JAVA_LIB_PATH}) + SET(JAVA_AWT_LIBRARY_DIRECTORIES ${JAVA_AWT_LIBRARY_DIRECTORIES} "${jpath}/${JAVA_LIB_PATH}") + ENDIF(EXISTS ${jpath}/${JAVA_LIB_PATH}) + ENDFOREACH(JAVA_LIB_PATH) +ENDFOREACH(JAVA_PROG) + +IF(APPLE) + IF(EXISTS ~/Library/Frameworks/JavaVM.framework) + SET(JAVA_HAVE_FRAMEWORK 1) + ENDIF(EXISTS ~/Library/Frameworks/JavaVM.framework) + IF(EXISTS /Library/Frameworks/JavaVM.framework) + SET(JAVA_HAVE_FRAMEWORK 1) + ENDIF(EXISTS /Library/Frameworks/JavaVM.framework) + IF(EXISTS /System/Library/Frameworks/JavaVM.framework) + SET(JAVA_HAVE_FRAMEWORK 1) + ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework) + + IF(JAVA_HAVE_FRAMEWORK) + IF(NOT JAVA_AWT_LIBRARY) + SET (JAVA_AWT_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE) + ENDIF(NOT JAVA_AWT_LIBRARY) + + IF(NOT JAVA_JVM_LIBRARY) + SET (JAVA_JVM_LIBRARY "-framework JavaVM" CACHE FILEPATH "Java Frameworks" FORCE) + ENDIF(NOT JAVA_JVM_LIBRARY) + + IF(NOT JAVA_AWT_INCLUDE_PATH) + IF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h) + SET (JAVA_AWT_INCLUDE_PATH "/System/Library/Frameworks/JavaVM.framework/Headers" CACHE FILEPATH "jawt.h location" FORCE) + ENDIF(EXISTS /System/Library/Frameworks/JavaVM.framework/Headers/jawt.h) + ENDIF(NOT JAVA_AWT_INCLUDE_PATH) + + # If using "-framework JavaVM", prefer its headers *before* the others in + # JAVA_AWT_INCLUDE_DIRECTORIES... (*prepend* to the list here) + # + SET(JAVA_AWT_INCLUDE_DIRECTORIES + ~/Library/Frameworks/JavaVM.framework/Headers + /Library/Frameworks/JavaVM.framework/Headers + /System/Library/Frameworks/JavaVM.framework/Headers + ${JAVA_AWT_INCLUDE_DIRECTORIES} + ) + ENDIF(JAVA_HAVE_FRAMEWORK) +ELSE(APPLE) + FIND_LIBRARY(JAVA_AWT_LIBRARY jawt + PATHS ${JAVA_AWT_LIBRARY_DIRECTORIES} + ) + FIND_LIBRARY(JAVA_JVM_LIBRARY NAMES jvm JavaVM + PATHS ${JAVA_JVM_LIBRARY_DIRECTORIES} + ) +ENDIF(APPLE) + +# add in the include path +FIND_PATH(JAVA_INCLUDE_PATH jni.h + ${JAVA_AWT_INCLUDE_DIRECTORIES} +) + +FIND_PATH(JAVA_INCLUDE_PATH2 jni_md.h + ${JAVA_AWT_INCLUDE_DIRECTORIES} + ${JAVA_INCLUDE_PATH}/win32 + ${JAVA_INCLUDE_PATH}/linux +) + +FIND_PATH(JAVA_AWT_INCLUDE_PATH jawt.h + ${JAVA_AWT_INCLUDE_DIRECTORIES} + ${JAVA_INCLUDE_PATH} +) + +MARK_AS_ADVANCED( + JAVA_AWT_LIBRARY + JAVA_JVM_LIBRARY + JAVA_AWT_INCLUDE_PATH + JAVA_INCLUDE_PATH + JAVA_INCLUDE_PATH2 +) diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake new file mode 100644 index 000000000..3692ee1eb --- /dev/null +++ b/Modules/FindJPEG.cmake @@ -0,0 +1,28 @@ +# - Find JPEG +# Find the native JPEG includes and library +# This module defines +# JPEG_INCLUDE_DIR, where to find jpeglib.h, etc. +# JPEG_LIBRARIES, the libraries needed to use JPEG. +# JPEG_FOUND, If false, do not try to use JPEG. +# also defined, but not for general use are +# JPEG_LIBRARY, where to find the JPEG library. + +FIND_PATH(JPEG_INCLUDE_DIR jpeglib.h) + +SET(JPEG_NAMES ${JPEG_NAMES} jpeg) +FIND_LIBRARY(JPEG_LIBRARY NAMES ${JPEG_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(JPEG DEFAULT_MSG JPEG_LIBRARY JPEG_INCLUDE_DIR) + +IF(JPEG_FOUND) + SET(JPEG_LIBRARIES ${JPEG_LIBRARY}) +ENDIF(JPEG_FOUND) + +# Deprecated declarations. +SET (NATIVE_JPEG_INCLUDE_PATH ${JPEG_INCLUDE_DIR} ) +GET_FILENAME_COMPONENT (NATIVE_JPEG_LIB_PATH ${JPEG_LIBRARY} PATH) + +MARK_AS_ADVANCED(JPEG_LIBRARY JPEG_INCLUDE_DIR ) diff --git a/Modules/FindJasper.cmake b/Modules/FindJasper.cmake new file mode 100644 index 000000000..d83fe7bb7 --- /dev/null +++ b/Modules/FindJasper.cmake @@ -0,0 +1,38 @@ +# - Try to find the Jasper JPEG2000 library +# Once done this will define +# +# JASPER_FOUND - system has Jasper +# JASPER_INCLUDE_DIR - the Jasper include directory +# JASPER_LIBRARIES - The libraries needed to use Jasper + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +FIND_PACKAGE(JPEG) + +IF (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES) + # Already in cache, be silent + SET(Jasper_FIND_QUIETLY TRUE) +ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARIES AND JPEG_LIBRARIES) + +FIND_PATH(JASPER_INCLUDE_DIR jasper/jasper.h) + +FIND_LIBRARY(JASPER_LIBRARY NAMES jasper libjasper) + +IF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES) + SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} ) +ENDIF (JASPER_INCLUDE_DIR AND JASPER_LIBRARY AND JPEG_LIBRARIES) + +# handle the QUIETLY and REQUIRED arguments and set JASPER_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jasper DEFAULT_MSG JASPER_LIBRARY JASPER_INCLUDE_DIR JPEG_LIBRARIES) + +IF (JASPER_FOUND) + SET(JASPER_LIBRARIES ${JASPER_LIBRARY} ${JPEG_LIBRARIES} ) +ENDIF (JASPER_FOUND) + +MARK_AS_ADVANCED(JASPER_INCLUDE_DIR JASPER_LIBRARIES JASPER_LIBRARY) diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake new file mode 100644 index 000000000..a5944508c --- /dev/null +++ b/Modules/FindJava.cmake @@ -0,0 +1,51 @@ +# - Find Java +# This module finds if Java is installed and determines where the +# include files and libraries are. This code sets the following +# variables: +# +# JAVA_RUNTIME = the full path to the Java runtime +# JAVA_COMPILE = the full path to the Java compiler +# JAVA_ARCHIVE = the full path to the Java archiver +# +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" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.8;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.7;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.6;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin" + $ENV{JAVA_HOME}/bin + /usr/bin + /usr/lib/java/bin + /usr/share/java/bin + /usr/local/bin + /usr/local/java/bin + /usr/local/java/share/bin + /usr/java/j2sdk1.4.2_04 + /usr/lib/j2sdk1.4-sun/bin + /usr/java/j2sdk1.4.2_09/bin + /usr/lib/j2sdk1.5-sun/bin + /opt/sun-jdk-1.5.0.04/bin + ) +FIND_PROGRAM(JAVA_RUNTIME + NAMES java + PATHS ${JAVA_BIN_PATH} +) + +FIND_PROGRAM(JAVA_ARCHIVE + NAMES jar + PATHS ${JAVA_BIN_PATH} +) + +FIND_PROGRAM(JAVA_COMPILE + NAMES javac + PATHS ${JAVA_BIN_PATH} +) + +MARK_AS_ADVANCED( +JAVA_RUNTIME +JAVA_ARCHIVE +JAVA_COMPILE +) diff --git a/Modules/FindKDE3.cmake b/Modules/FindKDE3.cmake new file mode 100644 index 000000000..d8ef875c9 --- /dev/null +++ b/Modules/FindKDE3.cmake @@ -0,0 +1,272 @@ +# - Find the KDE3 include and library dirs, KDE preprocessors and define a some macros +# +# This module defines the following variables: +# KDE3_DEFINITIONS - compiler definitions required for compiling KDE software +# KDE3_INCLUDE_DIR - the KDE include directory +# KDE3_INCLUDE_DIRS - the KDE and the Qt include directory, for use with INCLUDE_DIRECTORIES() +# KDE3_LIB_DIR - the directory where the KDE libraries are installed, for use with LINK_DIRECTORIES() +# QT_AND_KDECORE_LIBS - this contains both the Qt and the kdecore library +# KDE3_DCOPIDL_EXECUTABLE - the dcopidl executable +# KDE3_DCOPIDL2CPP_EXECUTABLE - the dcopidl2cpp executable +# KDE3_KCFGC_EXECUTABLE - the kconfig_compiler executable +# KDE3_FOUND - set to TRUE if all of the above has been found +# +# The following user adjustable options are provided: +# +# KDE3_BUILD_TESTS - enable this to build KDE testcases +# +# +# It also adds the following macros (from KDE3Macros.cmake) +# SRCS_VAR is always the variable which contains the list of source files for your application or library. +# +# KDE3_AUTOMOC(file1 ... fileN) +# Call this if you want to have automatic moc file handling. +# This means if you include "foo.moc" in the source file foo.cpp +# a moc file for the header foo.h will be created automatically. +# You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES() +# to exclude some files in the list from being processed. +# +# KDE3_ADD_MOC_FILES(SRCS_VAR file1 ... fileN ) +# If you don't use the KDE3_AUTOMOC() macro, for the files +# listed here moc files will be created (named "foo.moc.cpp") +# +# KDE3_ADD_DCOP_SKELS(SRCS_VAR header1.h ... headerN.h ) +# Use this to generate DCOP skeletions from the listed headers. +# +# KDE3_ADD_DCOP_STUBS(SRCS_VAR header1.h ... headerN.h ) +# Use this to generate DCOP stubs from the listed headers. +# +# KDE3_ADD_UI_FILES(SRCS_VAR file1.ui ... fileN.ui ) +# Use this to add the Qt designer ui files to your application/library. +# +# KDE3_ADD_KCFG_FILES(SRCS_VAR file1.kcfgc ... fileN.kcfgc ) +# Use this to add KDE kconfig compiler files to your application/library. +# +# KDE3_INSTALL_LIBTOOL_FILE(target) +# This will create and install a simple libtool file for the given target. +# +# KDE3_ADD_EXECUTABLE(name file1 ... fileN ) +# Currently identical to ADD_EXECUTABLE(), may provide some advanced features in the future. +# +# KDE3_ADD_KPART(name [WITH_PREFIX] file1 ... fileN ) +# Create a KDE plugin (KPart, kioslave, etc.) from the given source files. +# If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't. +# It creates and installs an appropriate libtool la-file. +# +# KDE3_ADD_KDEINIT_EXECUTABLE(name file1 ... fileN ) +# Create a KDE application in the form of a module loadable via kdeinit. +# A library named kdeinit_ will be created and a small executable which links to it. +# +# The option KDE3_ENABLE_FINAL to enable all-in-one compilation is +# no longer supported. +# +# +# Author: Alexander Neundorf + +IF(NOT UNIX) + MESSAGE(FATAL_ERROR "Compiling KDE3 applications and libraries under Windows is not supported") +ENDIF(NOT UNIX) + + +SET(QT_MT_REQUIRED TRUE) +#SET(QT_MIN_VERSION "3.0.0") + +#this line includes FindQt.cmake, which searches the Qt library and headers +FIND_PACKAGE(Qt3 REQUIRED) +FIND_PACKAGE(X11 REQUIRED) + + +#add some KDE specific stuff +SET(KDE3_DEFINITIONS -DQT_CLEAN_NAMESPACE -D_GNU_SOURCE) + +#only on linux, but NOT e.g. on FreeBSD: +IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + SET (KDE3_DEFINITIONS ${KDE3_DEFINITIONS} -D_XOPEN_SOURCE=500 -D_BSD_SOURCE) + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") + SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -fno-exceptions -fno-check-new -fno-common") +ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux") + +# works on FreeBSD, NOT tested on NetBSD and OpenBSD +IF (CMAKE_SYSTEM_NAME MATCHES BSD) + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -ansi -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-common") + SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") +ENDIF (CMAKE_SYSTEM_NAME MATCHES BSD) + +# if no special buildtype is selected, add -O2 as default optimization +IF (NOT CMAKE_BUILD_TYPE) + SET ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") + SET ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") +ENDIF (NOT CMAKE_BUILD_TYPE) + + +#SET(CMAKE_SHARED_LINKER_FLAGS "-avoid-version -module -Wl,--no-undefined -Wl,--allow-shlib-undefined") +#SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") +#SET(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings -avoid-version -Wl,--no-undefined -lc") + +# all calls to FIND_PROGRAM/PATH/LIBRARY() follow the same scheme: +# at first try some special paths with the argument "NO_DEFAULT_PATH" +# so only these paths are checked +# this is followed by a second call to FIND_PROGRAM/PATH/LIBRARY() +# but this time without any paths and without NO_DEFAULT_PATH +# this second call will do nothing if the first call already found +# what it was looking for, if not, it will search only in the default +# directories (/usr, /usr/local, etc.) + +#now try to find some kde stuff +FIND_PROGRAM(KDECONFIG_EXECUTABLE NAMES kde-config PATHS + $ENV{KDEDIR}/bin + /opt/kde3/bin + /opt/kde/bin + NO_DEFAULT_PATH + ) + + +FIND_PROGRAM(KDECONFIG_EXECUTABLE kde-config) + + +SET(KDE3PREFIX) +IF(KDECONFIG_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --version + OUTPUT_VARIABLE kde_config_version ) + + STRING(REGEX MATCH "KDE: .\\." kde_version ${kde_config_version}) + IF (${kde_version} MATCHES "KDE: 3\\.") + EXECUTE_PROCESS(COMMAND ${KDECONFIG_EXECUTABLE} --prefix + OUTPUT_VARIABLE kdedir ) + STRING(REGEX REPLACE "\n" "" KDE3PREFIX "${kdedir}") + + ENDIF (${kde_version} MATCHES "KDE: 3\\.") +ENDIF(KDECONFIG_EXECUTABLE) + + + +# at first the KDE include direcory +# kpassdlg.h comes from kdeui and doesn't exist in KDE4 anymore +FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h + $ENV{KDEDIR}/include + ${KDE3PREFIX}/include + /opt/kde3/include + /opt/kde/include + /usr/include/kde + /usr/local/include/kde + NO_DEFAULT_PATH + ) + +FIND_PATH(KDE3_INCLUDE_DIR kpassdlg.h) + +#now the KDE library directory +FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore + PATHS + $ENV{KDEDIR}/lib + ${KDE3PREFIX}/lib + /opt/kde3/lib + /opt/kde/lib + NO_DEFAULT_PATH +) + +FIND_LIBRARY(KDE3_KDECORE_LIBRARY NAMES kdecore) + +SET(QT_AND_KDECORE_LIBS ${QT_LIBRARIES} ${KDE3_KDECORE_LIBRARY}) + +GET_FILENAME_COMPONENT(KDE3_LIB_DIR ${KDE3_KDECORE_LIBRARY} PATH ) + +IF(NOT KDE3_LIBTOOL_DIR) + IF(KDE3_KDECORE_LIBRARY MATCHES lib64) + SET(KDE3_LIBTOOL_DIR /lib64/kde3) + ELSE(KDE3_KDECORE_LIBRARY MATCHES lib64) + SET(KDE3_LIBTOOL_DIR /lib/kde3) + ENDIF(KDE3_KDECORE_LIBRARY MATCHES lib64) +ENDIF(NOT KDE3_LIBTOOL_DIR) + +#now search for the dcop utilities +FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl PATHS + $ENV{KDEDIR}/bin + ${KDE3PREFIX}/bin + /opt/kde3/bin + /opt/kde/bin + NO_DEFAULT_PATH + ) + +FIND_PROGRAM(KDE3_DCOPIDL_EXECUTABLE NAMES dcopidl) + +FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp PATHS + $ENV{KDEDIR}/bin + ${KDE3PREFIX}/bin + /opt/kde3/bin + /opt/kde/bin + NO_DEFAULT_PATH + ) + +FIND_PROGRAM(KDE3_DCOPIDL2CPP_EXECUTABLE NAMES dcopidl2cpp) + +FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler PATHS + $ENV{KDEDIR}/bin + ${KDE3PREFIX}/bin + /opt/kde3/bin + /opt/kde/bin + NO_DEFAULT_PATH + ) + +FIND_PROGRAM(KDE3_KCFGC_EXECUTABLE NAMES kconfig_compiler) + +# KDE3Macros.cmake contains all the KDE specific macros +INCLUDE(KDE3Macros) + + +#SET KDE3_FOUND +IF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE) + SET(KDE3_FOUND TRUE) +ELSE (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE) + SET(KDE3_FOUND FALSE) +ENDIF (KDE3_INCLUDE_DIR AND KDE3_LIB_DIR AND KDE3_DCOPIDL_EXECUTABLE AND KDE3_DCOPIDL2CPP_EXECUTABLE AND KDE3_KCFGC_EXECUTABLE) + + +MACRO (KDE3_PRINT_RESULTS) + IF(KDE3_INCLUDE_DIR) + MESSAGE(STATUS "Found KDE3 include dir: ${KDE3_INCLUDE_DIR}") + ELSE(KDE3_INCLUDE_DIR) + MESSAGE(STATUS "Didn't find KDE3 headers") + ENDIF(KDE3_INCLUDE_DIR) + + IF(KDE3_LIB_DIR) + MESSAGE(STATUS "Found KDE3 library dir: ${KDE3_LIB_DIR}") + ELSE(KDE3_LIB_DIR) + MESSAGE(STATUS "Didn't find KDE3 core library") + ENDIF(KDE3_LIB_DIR) + + IF(KDE3_DCOPIDL_EXECUTABLE) + MESSAGE(STATUS "Found KDE3 dcopidl preprocessor: ${KDE3_DCOPIDL_EXECUTABLE}") + ELSE(KDE3_DCOPIDL_EXECUTABLE) + MESSAGE(STATUS "Didn't find the KDE3 dcopidl preprocessor") + ENDIF(KDE3_DCOPIDL_EXECUTABLE) + + IF(KDE3_DCOPIDL2CPP_EXECUTABLE) + MESSAGE(STATUS "Found KDE3 dcopidl2cpp preprocessor: ${KDE3_DCOPIDL2CPP_EXECUTABLE}") + ELSE(KDE3_DCOPIDL2CPP_EXECUTABLE) + MESSAGE(STATUS "Didn't find the KDE3 dcopidl2cpp preprocessor") + ENDIF(KDE3_DCOPIDL2CPP_EXECUTABLE) + + IF(KDE3_KCFGC_EXECUTABLE) + MESSAGE(STATUS "Found KDE3 kconfig_compiler preprocessor: ${KDE3_KCFGC_EXECUTABLE}") + ELSE(KDE3_KCFGC_EXECUTABLE) + MESSAGE(STATUS "Didn't find the KDE3 kconfig_compiler preprocessor") + ENDIF(KDE3_KCFGC_EXECUTABLE) + +ENDMACRO (KDE3_PRINT_RESULTS) + + +IF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND) + #bail out if something wasn't found + KDE3_PRINT_RESULTS() + MESSAGE(FATAL_ERROR "Could NOT find everything required for compiling KDE 3 programs") + +ENDIF (KDE3_FIND_REQUIRED AND NOT KDE3_FOUND) + + +IF (NOT KDE3_FIND_QUIETLY) + KDE3_PRINT_RESULTS() +ENDIF (NOT KDE3_FIND_QUIETLY) + +#add the found Qt and KDE include directories to the current include path +SET(KDE3_INCLUDE_DIRS ${QT_INCLUDE_DIR} ${KDE3_INCLUDE_DIR}) + diff --git a/Modules/FindKDE4.cmake b/Modules/FindKDE4.cmake new file mode 100644 index 000000000..3d32fcc0d --- /dev/null +++ b/Modules/FindKDE4.cmake @@ -0,0 +1,74 @@ +# Find KDE4 and provide all necessary variables and macros to compile software for it. +# It looks for KDE 4 in the following directories in the given order: +# CMAKE_INSTALL_PREFIX +# KDEDIRS +# /opt/kde4 +# +# Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information. +# They are installed with the KDE 4 libraries in $KDEDIRS/share/apps/cmake/modules/. +# +# Author: Alexander Neundorf + +FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS) + +# when cross compiling, searching kde4-config in order to run it later on +# doesn't make a lot of sense. We'll have to do something about this. +# Searching always in the target environment ? Then we get at least the correct one, +# still it can't be used to run it. Alex + +# For KDE4 kde-config has been renamed to kde4-config +FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config + # the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended + PATH_SUFFIXES bin + PATHS + ${CMAKE_INSTALL_PREFIX} + ${_KDEDIRS} + /opt/kde4 + NO_DEFAULT_PATH + ONLY_CMAKE_FIND_ROOT_PATH + ) + +FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config ONLY_CMAKE_FIND_ROOT_PATH) + +IF (NOT KDE4_KDECONFIG_EXECUTABLE) + IF (KDE4_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config") + ENDIF (KDE4_FIND_REQUIRED) +ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE) + + +# when cross compiling, KDE4_DATA_DIR may be already preset +IF(NOT KDE4_DATA_DIR) + IF(CMAKE_CROSSCOMPILING) + # when cross compiling, don't run kde4-config but use its location as install dir + GET_FILENAME_COMPONENT(KDE4_DATA_DIR "${KDE4_KDECONFIG_EXECUTABLE}" PATH) + GET_FILENAME_COMPONENT(KDE4_DATA_DIR "${KDE4_DATA_DIR}" PATH) + ELSE(CMAKE_CROSSCOMPILING) + # then ask kde4-config for the kde data dirs + EXECUTE_PROCESS(COMMAND "${KDE4_KDECONFIG_EXECUTABLE}" --path data OUTPUT_VARIABLE _data_DIR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) + FILE(TO_CMAKE_PATH "${_data_DIR}" _data_DIR) + # then check the data dirs for FindKDE4Internal.cmake + FIND_PATH(KDE4_DATA_DIR cmake/modules/FindKDE4Internal.cmake ${_data_DIR}) + ENDIF(CMAKE_CROSSCOMPILING) +ENDIF(NOT KDE4_DATA_DIR) + +# if it has been found... +IF (KDE4_DATA_DIR) + + SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${KDE4_DATA_DIR}/cmake/modules) + + IF (KDE4_FIND_QUIETLY) + SET(_quiet QUIET) + ENDIF (KDE4_FIND_QUIETLY) + + IF (KDE4_FIND_REQUIRED) + SET(_req REQUIRED) + ENDIF (KDE4_FIND_REQUIRED) + + # use FindKDE4Internal.cmake to do the rest + FIND_PACKAGE(KDE4Internal ${_req} ${_quiet}) +ELSE (KDE4_DATA_DIR) + IF (KDE4_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "ERROR: cmake/modules/FindKDE4Internal.cmake not found in ${_data_DIR}") + ENDIF (KDE4_FIND_REQUIRED) +ENDIF (KDE4_DATA_DIR) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake new file mode 100644 index 000000000..5d9b278e7 --- /dev/null +++ b/Modules/FindLAPACK.cmake @@ -0,0 +1,196 @@ +# - Find LAPACK library +# This module finds an installed fortran library that implements the LAPACK +# linear-algebra interface (see http://www.netlib.org/lapack/). +# +# The approach follows that taken for the autoconf macro file, acx_lapack.m4 +# (distributed at http://ac-archive.sourceforge.net/ac-archive/acx_lapack.html). +# +# This module sets the following variables: +# LAPACK_FOUND - set to true if a library implementing the LAPACK interface +# is found +# LAPACK_LINKER_FLAGS - uncached list of required linker flags (excluding -l +# and -L). +# LAPACK_LIBRARIES - uncached list of libraries (using full path name) to +# link against to use LAPACK +# LAPACK95_LIBRARIES - uncached list of libraries (using full path name) to +# link against to use LAPACK95 + +# + +include(CheckFortranFunctionExists) +set(LAPACK_FOUND FALSE) + +macro(Check_Lapack_Libraries LIBRARIES _prefix _name _flags _list _blas) +# This macro checks for the existence of the combination of fortran libraries +# given by _list. If the combination is found, this macro checks (using the +# Check_Fortran_Function_Exists macro) whether can link against that library +# combination using the name of a routine given by _name using the linker +# flags given by _flags. If the combination of libraries is found and passes +# the link test, LIBRARIES is set to the list of complete library paths that +# have been found. Otherwise, LIBRARIES is set to FALSE. + +# N.B. _prefix is the prefix applied to the names of all cached variables that +# are generated internally and marked advanced by this macro. + +set(_libraries_work TRUE) +set(${LIBRARIES}) +set(_combined_name) +foreach(_library ${_list}) + set(_combined_name ${_combined_name}_${_library}) + + if(_libraries_work) +IF (WIN32) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS ENV LIB + ) +ENDIF (WIN32) + + if(APPLE) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV DYLD_LIBRARY_PATH + ) + else(APPLE) + find_library(${_prefix}_${_library}_LIBRARY + NAMES ${_library} + PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV LD_LIBRARY_PATH + ) + endif(APPLE) + + mark_as_advanced(${_prefix}_${_library}_LIBRARY) + set(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) + set(_libraries_work ${${_prefix}_${_library}_LIBRARY}) + endif(_libraries_work) +endforeach(_library ${_list}) + +if(_libraries_work) + # Test this combination of libraries. + set(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}} ${_blas}) + #message("DEBUG: CMAKE_REQUIRED_LIBRARIES = ${CMAKE_REQUIRED_LIBRARIES}") + check_fortran_function_exists(${_name} ${_prefix}${_combined_name}_WORKS) + set(CMAKE_REQUIRED_LIBRARIES) + mark_as_advanced(${_prefix}${_combined_name}_WORKS) + set(_libraries_work ${${_prefix}${_combined_name}_WORKS}) + #message("DEBUG: ${LIBRARIES} = ${${LIBRARIES}}") +endif(_libraries_work) + +if(NOT _libraries_work) + set(${LIBRARIES} FALSE) +endif(NOT _libraries_work) + +endmacro(Check_Lapack_Libraries) + + +set(LAPACK_LINKER_FLAGS) +set(LAPACK_LIBRARIES) +set(LAPACK95_LIBRARIES) + + +if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(BLAS) +else(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_package(BLAS REQUIRED) +endif(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + +if(BLAS_FOUND) + set(LAPACK_LINKER_FLAGS ${BLAS_LINKER_FLAGS}) + +#intel lapack + if(NOT LAPACK_LIBRARIES) + + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "mkl_lapack" + "${BLAS_LIBRARIES}" + ) + endif(NOT LAPACK_LIBRARIES) + + if(NOT LAPACK95_LIBRARIES) + check_lapack_libraries( + LAPACK95_LIBRARIES + LAPACK + cheev + "" + "mkl_lapack95" + "${BLAS_LIBRARIES}" + ) + endif(NOT LAPACK95_LIBRARIES) + +#acml lapack + if(NOT LAPACK_LIBRARIES) + + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "acml" + "${BLAS_LIBRARIES}" + ) +endif(NOT LAPACK_LIBRARIES) + + +# Apple LAPACK library? +if(NOT LAPACK_LIBRARIES) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "Accelerate" + "${BLAS_LIBRARIES}" + ) + endif(NOT LAPACK_LIBRARIES) + + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "vecLib" + "${BLAS_LIBRARIES}" + ) + endif ( NOT LAPACK_LIBRARIES ) + +# Generic LAPACK library? + if ( NOT LAPACK_LIBRARIES ) + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "lapack" + "${BLAS_LIBRARIES}" + ) + endif ( NOT LAPACK_LIBRARIES ) + +else(BLAS_FOUND) + message(STATUS "LAPACK requires BLAS") +endif(BLAS_FOUND) + +if(LAPACK_LIBRARIES) + set(LAPACK_FOUND TRUE) +else(LAPACK_LIBRARIES) + set(LAPACK_FOUND FALSE) +endif(LAPACK_LIBRARIES) + +if(NOT LAPACK_FIND_QUIETLY) + if(LAPACK_FOUND) + message(STATUS "A library with LAPACK API found.") + else(LAPACK_FOUND) + if(LAPACK_FIND_REQUIRED) + message(FATAL_ERROR + "A required library with LAPACK API not found. Please specify library location." + ) + else(LAPACK_FIND_REQUIRED) + message(STATUS + "A library with LAPACK API not found. Please specify library location." + ) + endif(LAPACK_FIND_REQUIRED) + endif(LAPACK_FOUND) +endif(NOT LAPACK_FIND_QUIETLY) diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake new file mode 100644 index 000000000..a02d9e179 --- /dev/null +++ b/Modules/FindLATEX.cmake @@ -0,0 +1,113 @@ +# - Find Latex +# This module finds if Latex is installed and determines where the +# executables are. This code sets the following variables: +# +# LATEX_COMPILER: path to the LaTeX compiler +# PDFLATEX_COMPILER: path to the PdfLaTeX compiler +# BIBTEX_COMPILER: path to the BibTeX compiler +# MAKEINDEX_COMPILER: path to the MakeIndex compiler +# DVIPS_CONVERTER: path to the DVIPS converter +# PS2PDF_CONVERTER: path to the PS2PDF converter +# LATEX2HTML_CONVERTER: path to the LaTeX2Html converter +# + +IF (WIN32) + + # Try to find the MikTex binary path (look for its package manager). + + FIND_PATH(MIKTEX_BINARY_PATH mpm.exe + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MiK\\MiKTeX\\CurrentVersion\\MiKTeX;Install Root]/miktex/bin" + DOC + "Path to the MikTex binary directory." + ) + MARK_AS_ADVANCED(MIKTEX_BINARY_PATH) + + # Try to find the GhostScript binary path (look for gswin32). + + GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00 + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\8.00;GS_DLL]" PATH + ) + + GET_FILENAME_COMPONENT(GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04 + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\AFPL Ghostscript\\7.04;GS_DLL]" PATH + ) + + FIND_PATH(GHOSTSCRIPT_BINARY_PATH gswin32.exe + ${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_8_00} + ${GHOSTSCRIPT_BINARY_PATH_FROM_REGISTERY_7_04} + DOC "Path to the GhostScript binary directory." + ) + MARK_AS_ADVANCED(GHOSTSCRIPT_BINARY_PATH) + + FIND_PATH(GHOSTSCRIPT_LIBRARY_PATH ps2pdf13.bat + "${GHOSTSCRIPT_BINARY_PATH}/../lib" + DOC "Path to the GhostScript library directory." + ) + MARK_AS_ADVANCED(GHOSTSCRIPT_LIBRARY_PATH) + +ENDIF (WIN32) + +FIND_PROGRAM(LATEX_COMPILER + NAMES latex + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +FIND_PROGRAM(PDFLATEX_COMPILER + NAMES pdflatex + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +FIND_PROGRAM(BIBTEX_COMPILER + NAMES bibtex + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +FIND_PROGRAM(MAKEINDEX_COMPILER + NAMES makeindex + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +FIND_PROGRAM(DVIPS_CONVERTER + NAMES dvips + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +FIND_PROGRAM(DVIPDF_CONVERTER + NAMES dvipdfm dvipdft dvipdf + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + +IF (WIN32) + FIND_PROGRAM(PS2PDF_CONVERTER + NAMES ps2pdf14.bat + PATHS ${GHOSTSCRIPT_LIBRARY_PATH} + ) +ELSE (WIN32) + FIND_PROGRAM(PS2PDF_CONVERTER + NAMES ps2pdf14 ps2pdf + ) +ENDIF (WIN32) + +FIND_PROGRAM(LATEX2HTML_CONVERTER + NAMES latex2html + PATHS ${MIKTEX_BINARY_PATH} + /usr/bin +) + + +MARK_AS_ADVANCED( + LATEX_COMPILER + PDFLATEX_COMPILER + BIBTEX_COMPILER + MAKEINDEX_COMPILER + DVIPS_CONVERTER + DVIPDF_CONVERTER + PS2PDF_CONVERTER + LATEX2HTML_CONVERTER +) diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake new file mode 100644 index 000000000..0de0586ec --- /dev/null +++ b/Modules/FindLibXml2.cmake @@ -0,0 +1,46 @@ +# - Try to find LibXml2 +# Once done this will define +# +# LIBXML2_FOUND - system has LibXml2 +# LIBXML2_INCLUDE_DIR - the LibXml2 include directory +# LIBXML2_LIBRARIES - the libraries needed to use LibXml2 +# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) + # in cache already + SET(LibXml2_FIND_QUIETLY TRUE) +ENDIF (LIBXML2_INCLUDE_DIR AND LIBXML2_LIBRARIES) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2Cflags) + SET(LIBXML2_DEFINITIONS ${_LibXml2Cflags}) +ENDIF (NOT WIN32) + +FIND_PATH(LIBXML2_INCLUDE_DIR libxml/xpath.h + PATHS + ${_LibXml2IncDir} + PATH_SUFFIXES libxml2 + ) + +FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2 + PATHS + ${_LibXml2LinkDir} + ) + +INCLUDE(FindPackageHandleStandardArgs) + +# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) + +MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES) + diff --git a/Modules/FindLibXslt.cmake b/Modules/FindLibXslt.cmake new file mode 100644 index 000000000..95c6819f8 --- /dev/null +++ b/Modules/FindLibXslt.cmake @@ -0,0 +1,45 @@ +# - Try to find LibXslt +# Once done this will define +# +# LIBXSLT_FOUND - system has LibXslt +# LIBXSLT_INCLUDE_DIR - the LibXslt include directory +# LIBXSLT_LIBRARIES - Link these to LibXslt +# LIBXSLT_DEFINITIONS - Compiler switches required for using LibXslt + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) + # in cache already + SET(LibXslt_FIND_QUIETLY TRUE) +ENDIF (LIBXSLT_INCLUDE_DIR AND LIBXSLT_LIBRARIES) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + INCLUDE(UsePkgConfig) + PKGCONFIG(libxslt _LibXsltIncDir _LibXsltLinkDir _LibXsltLinkFlags _LibXsltCflags) + SET(LIBXSLT_DEFINITIONS ${_LibXsltCflags}) +ENDIF (NOT WIN32) + +FIND_PATH(LIBXSLT_INCLUDE_DIR libxslt/xslt.h + ${_LibXsltIncDir} + ) + +FIND_LIBRARY(LIBXSLT_LIBRARIES NAMES xslt libxslt + PATHS + ${_LibXsltLinkDir} + ) + +INCLUDE(FindPackageHandleStandardArgs) + +# handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXslt DEFAULT_MSG LIBXSLT_LIBRARIES LIBXSLT_INCLUDE_DIR) + + +MARK_AS_ADVANCED(LIBXSLT_INCLUDE_DIR LIBXSLT_LIBRARIES) + diff --git a/Modules/FindLua50.cmake b/Modules/FindLua50.cmake new file mode 100644 index 000000000..dce483776 --- /dev/null +++ b/Modules/FindLua50.cmake @@ -0,0 +1,101 @@ +# Locate Lua library +# This module defines +# LUA_LIBRARIES, both lua and lualib +# LUA_FOUND, if false, do not try to link to Lua +# LUA_INCLUDE_DIR, where to find lua.h and lualib.h (and probably lauxlib.h) +# +# Note that the expected include convention is +# #include "lua.h" +# and not +# #include +# This is because, the lua location is not standardized and may exist +# in locations other than lua/ + + +FIND_PATH(LUA_INCLUDE_DIR lua.h + PATHS + $ENV{LUA_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include +) + +FIND_PATH(LUA_INCLUDE_DIR lua.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + PATH_SUFFIXES include/lua50 include/lua5.0 include/lua5 include/lua include +) + +FIND_LIBRARY(LUA_LIBRARY_lua + NAMES lua50 lua5.0 lua5 lua + PATHS + $ENV{LUA_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(LUA_LIBRARY_lua + NAMES lua50 lua5.0 lua5 lua + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +# In an OS X framework, lualib is usually included as part of the framework +# (like GLU in OpenGL.framework) +IF(${LUA_LIBRARY_lua} MATCHES "framework") + SET( LUA_LIBRARIES "${LUA_LIBRARY_lua}" CACHE STRING "Lua framework") +ELSE(${LUA_LIBRARY_lua} MATCHES "framework") + FIND_LIBRARY(LUA_LIBRARY_lualib + NAMES lualib50 lualib5.0 lualib5 lualib + PATHS + $ENV{LUALIB_DIR} + $ENV{LUA_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib + ) + + FIND_LIBRARY(LUA_LIBRARY_lualib + NAMES lualib50 lualib5.0 lualib5 lualib + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib + ) + IF(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua) + # include the math library for Unix + IF(UNIX AND NOT APPLE) + FIND_LIBRARY(MATH_LIBRARY_FOR_LUA m) + SET( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua};${MATH_LIBRARY_FOR_LUA}" CACHE STRING "This is the concatentation of lua and lualib libraries") + # For Windows and Mac, don't need to explicitly include the math library + ELSE(UNIX AND NOT APPLE) + SET( LUA_LIBRARIES "${LUA_LIBRARY_lualib};${LUA_LIBRARY_lua}" CACHE STRING "This is the concatentation of lua and lualib libraries") + ENDIF(UNIX AND NOT APPLE) + ENDIF(LUA_LIBRARY_lualib AND LUA_LIBRARY_lua) +ENDIF(${LUA_LIBRARY_lua} MATCHES "framework") + + +INCLUDE(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR) + +MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES) + diff --git a/Modules/FindLua51.cmake b/Modules/FindLua51.cmake new file mode 100644 index 000000000..0a82e8c66 --- /dev/null +++ b/Modules/FindLua51.cmake @@ -0,0 +1,74 @@ +# Locate Lua library +# This module defines +# LUA_LIBRARIES +# LUA_FOUND, if false, do not try to link to Lua +# LUA_INCLUDE_DIR, where to find lua.h +# +# Note that the expected include convention is +# #include "lua.h" +# and not +# #include +# This is because, the lua location is not standardized and may exist +# in locations other than lua/ + + +FIND_PATH(LUA_INCLUDE_DIR lua.h + PATHS + $ENV{LUA_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include +) + +FIND_PATH(LUA_INCLUDE_DIR lua.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + PATH_SUFFIXES include/lua51 include/lua5.1 include/lua include +) + +FIND_LIBRARY(LUA_LIBRARY + NAMES lua51 lua5.1 lua + PATHS + $ENV{LUA_DIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(LUA_LIBRARY + NAMES lua51 lua5.1 lua + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +IF(LUA_LIBRARY) + # include the math library for Unix + IF(UNIX AND NOT APPLE) + FIND_LIBRARY(LUA_MATH_LIBRARY m) + SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries") + # For Windows and Mac, don't need to explicitly include the math library + ELSE(UNIX AND NOT APPLE) + SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries") + ENDIF(UNIX AND NOT APPLE) +ENDIF(LUA_LIBRARY) + +INCLUDE(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if +# all listed variables are TRUE +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua50 DEFAULT_MSG LUA_LIBRARIES LUA_INCLUDE_DIR) + +MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY) + diff --git a/Modules/FindMFC.cmake b/Modules/FindMFC.cmake new file mode 100644 index 000000000..7e3bcc118 --- /dev/null +++ b/Modules/FindMFC.cmake @@ -0,0 +1,19 @@ +# - Find MFC on Windows +# Find the native MFC - i.e. decide if this is an MS VC box. +# MFC_FOUND - Was MFC support found +# You don't need to include anything or link anything to use it. + +# Assume no MFC support +SET( MFC_FOUND "NO" ) +# Add MFC support if win32 and not cygwin and not borland +IF( WIN32 ) + IF( NOT CYGWIN ) + IF( NOT BORLAND ) + IF( NOT MINGW ) + SET( MFC_FOUND "YES" ) + ENDIF( NOT MINGW ) + ENDIF( NOT BORLAND ) + ENDIF( NOT CYGWIN ) +ENDIF( WIN32 ) + + diff --git a/Modules/FindMPEG.cmake b/Modules/FindMPEG.cmake new file mode 100644 index 000000000..7b0760a17 --- /dev/null +++ b/Modules/FindMPEG.cmake @@ -0,0 +1,29 @@ +# - Find the native MPEG includes and library +# This module defines +# MPEG_INCLUDE_DIR, where to find MPEG.h, etc. +# MPEG_LIBRARIES, the libraries required to use MPEG. +# MPEG_FOUND, If false, do not try to use MPEG. +# also defined, but not for general use are +# MPEG_mpeg2_LIBRARY, where to find the MPEG library. +# MPEG_vo_LIBRARY, where to find the vo library. + +FIND_PATH(MPEG_INCLUDE_DIR mpeg2dec/include/video_out.h + /usr/local/livid +) + +FIND_LIBRARY(MPEG_mpeg2_LIBRARY mpeg2 + /usr/local/livid/mpeg2dec/libmpeg2/.libs +) + +FIND_LIBRARY( MPEG_vo_LIBRARY vo + /usr/local/livid/mpeg2dec/libvo/.libs +) + +# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG DEFAULT_MSG MPEG_INCLUDE_DIR MPEG_mpeg2_LIBRARY) + +IF(MPEG_FOUND) + SET( MPEG_LIBRARIES ${MPEG_mpeg2_LIBRARY} ${MPEG_vo_LIBRARY} ) +ENDIF(MPEG_FOUND) diff --git a/Modules/FindMPEG2.cmake b/Modules/FindMPEG2.cmake new file mode 100644 index 000000000..0ce75f5cd --- /dev/null +++ b/Modules/FindMPEG2.cmake @@ -0,0 +1,39 @@ +# - Find the native MPEG2 includes and library +# This module defines +# MPEG2_INCLUDE_DIR, path to mpeg2dec/mpeg2.h, etc. +# MPEG2_LIBRARIES, the libraries required to use MPEG2. +# MPEG2_FOUND, If false, do not try to use MPEG2. +# also defined, but not for general use are +# MPEG2_mpeg2_LIBRARY, where to find the MPEG2 library. +# MPEG2_vo_LIBRARY, where to find the vo library. + +FIND_PATH(MPEG2_INCLUDE_DIR mpeg2.h + /usr/local/livid +) + +FIND_LIBRARY(MPEG2_mpeg2_LIBRARY mpeg2 + /usr/local/livid/mpeg2dec/libmpeg2/.libs +) + +FIND_LIBRARY( MPEG2_vo_LIBRARY vo + /usr/local/livid/mpeg2dec/libvo/.libs +) + + +# handle the QUIETLY and REQUIRED arguments and set MPEG2_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPEG2 DEFAULT_MSG MPEG2_mpeg2_LIBRARY MPEG2_INCLUDE_DIR) + +IF(MPEG2_FOUND) + SET( MPEG2_LIBRARIES ${MPEG2_mpeg2_LIBRARY} + ${MPEG2_vo_LIBRARY}) + + #some native mpeg2 installations will depend + #on libSDL, if found, add it in. + INCLUDE( FindSDL.cmake ) + IF(SDL_FOUND) + SET( MPEG2_LIBRARIES ${MPEG2_LIBRARIES} ${SDL_LIBRARY}) + ENDIF(SDL_FOUND) +ENDIF(MPEG2_FOUND) + diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake new file mode 100644 index 000000000..d568c94d5 --- /dev/null +++ b/Modules/FindMPI.cmake @@ -0,0 +1,307 @@ +# - Message Passing Interface (MPI) module. +# +# The Message Passing Interface (MPI) is a library used to write +# high-performance parallel applications that use message passing, and +# is typically deployed on a cluster. MPI is a standard interface +# (defined by the MPI forum) for which many implementations are +# available. All of these implementations have somewhat different +# compilation approaches (different include paths, libraries to link +# against, etc.), and this module tries to smooth out those differences. +# +# This module will set the following variables: +# MPI_FOUND TRUE if we have found MPI +# MPI_COMPILE_FLAGS Compilation flags for MPI programs +# MPI_INCLUDE_PATH Include path(s) for MPI header +# MPI_LINK_FLAGS Linking flags for MPI programs +# MPI_LIBRARY First MPI library to link against (cached) +# MPI_EXTRA_LIBRARY Extra MPI libraries to link against (cached) +# MPI_LIBRARIES All libraries to link MPI programs against +# MPIEXEC Executable for running MPI programs +# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving it the +# number of processors to run on +# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly before the +# executable to run. +# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after all other flags. +# +# This module will attempt to auto-detect these settings, first by +# looking for a MPI compiler, which many MPI implementations provide +# as a pass-through to the native compiler to simplify the compilation +# of MPI programs. The MPI compiler is stored in the cache variable +# MPI_COMPILER, and will attempt to look for commonly-named drivers +# mpic++, mpicxx, mpiCC, or mpicc. If the compiler driver is found and +# recognized, it will be used to set all of the module variables. To +# skip this auto-detection, set MPI_LIBRARY and MPI_INCLUDE_PATH in +# the CMake cache. +# +# If no compiler driver is found or the compiler driver is not +# recognized, this module will then search for common include paths +# and library names to try to detect MPI. +# +# If CMake initially finds a different MPI than was intended, and you +# want to use the MPI compiler auto-detection for a different MPI +# implementation, set MPI_COMPILER to the MPI compiler driver you want +# to use (e.g., mpicxx) and then set MPI_LIBRARY to the string +# MPI_LIBRARY-NOTFOUND. When you re-configure, auto-detection of MPI +# will run again with the newly-specified MPI_COMPILER. +# +# When using MPIEXEC to execute MPI applications, you should typically +# use all of the MPIEXEC flags as follows: +# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS ${MPIEXEC_PREFLAGS} EXECUTABLE +# ${MPIEXEC_POSTFLAGS} ARGS +# where PROCS is the number of processors on which to execute the program, +# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the +# MPI program. + +# Try to find the MPI driver program +find_program(MPI_COMPILER + NAMES mpic++ mpicxx mpiCC mpicc + DOC "MPI compiler. Used only to detect MPI compilation flags.") +mark_as_advanced(MPI_COMPILER) + +find_program(MPIEXEC + NAMES mpiexec mpirun lamexec + DOC "Executable for running MPI programs.") + +set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.") +set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.") +set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.") +set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.") +mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS + MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS) + +if (MPI_INCLUDE_PATH AND MPI_LIBRARY) + # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in + # the cache, and we don't want to override those settings. +elseif (MPI_COMPILER) + # Check whether the -showme:compile option works. This indicates + # that we have either Open MPI or a newer version of LAM-MPI, and + # implies that -showme:link will also work. + exec_program(${MPI_COMPILER} + ARGS -showme:compile + OUTPUT_VARIABLE MPI_COMPILE_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + + if (MPI_COMPILER_RETURN EQUAL 0) + # If we appear to have -showme:compile, then we should also have + # -showme:link. Try it. + exec_program(${MPI_COMPILER} + ARGS -showme:link + OUTPUT_VARIABLE MPI_LINK_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + + # Note that we probably have -showme:incdirs and -showme:libdirs + # as well. + set(MPI_COMPILER_MAY_HAVE_INCLIBDIRS TRUE) + endif (MPI_COMPILER_RETURN EQUAL 0) + + if (MPI_COMPILER_RETURN EQUAL 0) + # Do nothing: we have our command lines now + else (MPI_COMPILER_RETURN EQUAL 0) + # Older versions of LAM-MPI have "-showme". Try it. + exec_program(${MPI_COMPILER} + ARGS -showme + OUTPUT_VARIABLE MPI_COMPILE_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + endif (MPI_COMPILER_RETURN EQUAL 0) + + if (MPI_COMPILER_RETURN EQUAL 0) + # Do nothing: we have our command lines now + else (MPI_COMPILER_RETURN EQUAL 0) + # MPICH uses "-show". Try it. + exec_program(${MPI_COMPILER} + ARGS -show + OUTPUT_VARIABLE MPI_COMPILE_CMDLINE + RETURN_VALUE MPI_COMPILER_RETURN) + endif (MPI_COMPILER_RETURN EQUAL 0) + + if (MPI_COMPILER_RETURN EQUAL 0) + # We have our command lines, but we might need to copy + # MPI_COMPILE_CMDLINE into MPI_LINK_CMDLINE, if the underlying + if (NOT MPI_LINK_CMDLINE) + SET(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE}) + endif (NOT MPI_LINK_CMDLINE) + else (MPI_COMPILER_RETURN EQUAL 0) + message(STATUS "Unable to determine MPI from MPI driver ${MPI_COMPILER}") + endif (MPI_COMPILER_RETURN EQUAL 0) +endif (MPI_INCLUDE_PATH AND MPI_LIBRARY) + +if (MPI_INCLUDE_PATH AND MPI_LIBRARY) + # Do nothing: we already have MPI_INCLUDE_PATH and MPI_LIBRARY in + # the cache, and we don't want to override those settings. +elseif (MPI_COMPILE_CMDLINE) + # Extract compile flags from the compile command line. + string(REGEX MATCHALL "-D([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}") + set(MPI_COMPILE_FLAGS_WORK) + foreach(FLAG ${MPI_ALL_COMPILE_FLAGS}) + if (MPI_COMPILE_FLAGS_WORK) + set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}") + else(MPI_COMPILE_FLAGS_WORK) + set(MPI_COMPILE_FLAGS_WORK ${FLAG}) + endif(MPI_COMPILE_FLAGS_WORK) + endforeach(FLAG) + + # Extract include paths from compile command line + string(REGEX MATCHALL "-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}") + set(MPI_INCLUDE_PATH_WORK) + foreach(IPATH ${MPI_ALL_INCLUDE_PATHS}) + string(REGEX REPLACE "^-I" "" IPATH ${IPATH}) + string(REGEX REPLACE "//" "/" IPATH ${IPATH}) + list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH}) + endforeach(IPATH) + + if (NOT MPI_INCLUDE_PATH_WORK) + if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS) + # The compile command line didn't have any include paths on it, + # but we may have -showme:incdirs. Use it. + exec_program(${MPI_COMPILER} + ARGS -showme:incdirs + OUTPUT_VARIABLE MPI_INCLUDE_PATH_WORK + RETURN_VALUE MPI_COMPILER_RETURN) + separate_arguments(MPI_INCLUDE_PATH_WORK) + endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS) + endif (NOT MPI_INCLUDE_PATH_WORK) + + if (NOT MPI_INCLUDE_PATH_WORK) + # If all else fails, just search for mpi.h in the normal include + # paths. + find_path(MPI_INCLUDE_PATH mpi.h) + set(MPI_INCLUDE_PATH_WORK ${MPI_INCLUDE_PATH}) + endif (NOT MPI_INCLUDE_PATH_WORK) + + # Extract linker paths from the link command line + string(REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}") + set(MPI_LINK_PATH) + foreach(LPATH ${MPI_ALL_LINK_PATHS}) + string(REGEX REPLACE "^-L" "" LPATH ${LPATH}) + string(REGEX REPLACE "//" "/" LPATH ${LPATH}) + list(APPEND MPI_LINK_PATH ${LPATH}) + endforeach(LPATH) + + if (NOT MPI_LINK_PATH) + if (MPI_COMPILER_MAY_HAVE_INCLIBDIRS) + # The compile command line didn't have any linking paths on it, + # but we may have -showme:libdirs. Use it. + exec_program(${MPI_COMPILER} + ARGS -showme:libdirs + OUTPUT_VARIABLE MPI_LINK_PATH + RETURN_VALUE MPI_COMPILER_RETURN) + separate_arguments(MPI_LINK_PATH) + endif (MPI_COMPILER_MAY_HAVE_INCLIBDIRS) + endif (NOT MPI_LINK_PATH) + + # Extract linker flags from the link command line + string(REGEX MATCHALL "-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}") + set(MPI_LINK_FLAGS_WORK) + foreach(FLAG ${MPI_ALL_LINK_FLAGS}) + if (MPI_LINK_FLAGS_WORK) + set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}") + else(MPI_LINK_FLAGS_WORK) + set(MPI_LINK_FLAGS_WORK ${FLAG}) + endif(MPI_LINK_FLAGS_WORK) + endforeach(FLAG) + + # Extract the set of libraries to link against from the link command + # line + string(REGEX MATCHALL "-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}") + + # Determine full path names for all of the libraries that one needs + # to link against in an MPI program + set(MPI_LIBRARIES) + foreach(LIB ${MPI_LIBNAMES}) + string(REGEX REPLACE "^-l" "" LIB ${LIB}) + set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE) + find_library(MPI_LIB ${LIB} PATHS ${MPI_LINK_PATH}) + if (MPI_LIB) + list(APPEND MPI_LIBRARIES ${MPI_LIB}) + else (MPI_LIB) + status(ERROR "Unable to find MPI library ${LIB}") + endif (MPI_LIB) + endforeach(LIB) + set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI detection" FORCE) + + # Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and + # MPI_EXTRA_LIBRARY. + list(LENGTH MPI_LIBRARIES MPI_NUMLIBS) + if (MPI_NUMLIBS GREATER 0) + list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK) + set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE) + else (MPI_NUMLIBS GREATER 0) + set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE STRING "MPI library to link against" FORCE) + endif (MPI_NUMLIBS GREATER 0) + if (MPI_NUMLIBS GREATER 1) + set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES}) + list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0) + set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE) + else (MPI_NUMLIBS GREATER 1) + set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE) + endif (MPI_NUMLIBS GREATER 1) + + # Set up all of the appropriate cache entries + set(MPI_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI compilation flags" FORCE) + set(MPI_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI include path" FORCE) + set(MPI_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI linking flags" FORCE) +else (MPI_COMPILE_CMDLINE) + find_path(MPI_INCLUDE_PATH mpi.h + /usr/local/include + /usr/include + /usr/include/mpi + /usr/local/mpi/include + "C:/Program Files/MPICH/SDK/Include" + "$ENV{SystemDrive}/Program Files/MPICH2/include" + "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Include" + ) + + # Decide between 32-bit and 64-bit libraries for Microsoft's MPI + if (CMAKE_CL_64) + set(MS_MPI_ARCH_DIR amd64) + else (CMAKE_CL_64) + set(MS_MPI_ARCH_DIR i386) + endif (CMAKE_CL_64) + + find_library(MPI_LIBRARY + NAMES mpi mpich msmpi + PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib + "C:/Program Files/MPICH/SDK/Lib" + "$ENV{SystemDrive}/Program Files/MPICH/SDK/Lib" + "$ENV{SystemDrive}/Program Files/Microsoft Compute Cluster Pack/Lib/${MS_MPI_ARCH_DIR}" + ) + find_library(MPI_LIBRARY + NAMES mpich2 + PATHS + "$ENV{SystemDrive}/Program Files/MPICH2/Lib") + + find_library(MPI_EXTRA_LIBRARY + NAMES mpi++ + PATHS /usr/lib /usr/local/lib /usr/local/mpi/lib + "C:/Program Files/MPICH/SDK/Lib" + DOC "Extra MPI libraries to link against.") + + set(MPI_COMPILE_FLAGS "" CACHE STRING "MPI compilation flags") + set(MPI_LINK_FLAGS "" CACHE STRING "MPI linking flags") +endif (MPI_INCLUDE_PATH AND MPI_LIBRARY) + +# on BlueGene/L the MPI lib is named libmpich.rts.a, there also these additional libs are required +if("${MPI_LIBRARY}" MATCHES "mpich.rts") + set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts) + set(MPI_LIBRARY ${MPI_LIBRARY} msglayer.rts devices.rts rts.rts devices.rts) +endif("${MPI_LIBRARY}" MATCHES "mpich.rts") + +# Set up extra variables to conform to +if (MPI_EXTRA_LIBRARY) + set(MPI_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY}) +else (MPI_EXTRA_LIBRARY) + set(MPI_LIBRARIES ${MPI_LIBRARY}) +endif (MPI_EXTRA_LIBRARY) + +if (MPI_INCLUDE_PATH AND MPI_LIBRARY) + set(MPI_FOUND TRUE) +else (MPI_INCLUDE_PATH AND MPI_LIBRARY) + set(MPI_FOUND FALSE) +endif (MPI_INCLUDE_PATH AND MPI_LIBRARY) + +include(FindPackageHandleStandardArgs) +# handle the QUIETLY and REQUIRED arguments +find_package_handle_standard_args(MPI DEFAULT_MSG MPI_LIBRARY MPI_INCLUDE_PATH) + +mark_as_advanced(MPI_INCLUDE_PATH MPI_COMPILE_FLAGS MPI_LINK_FLAGS MPI_LIBRARY + MPI_EXTRA_LIBRARY) diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake new file mode 100755 index 000000000..17e6f367f --- /dev/null +++ b/Modules/FindMatlab.cmake @@ -0,0 +1,106 @@ +# - this module looks for Matlab +# Defines: +# MATLAB_INCLUDE_DIR: include path for mex.h, engine.h +# MATLAB_LIBRARIES: required libraries: libmex, etc +# MATLAB_MEX_LIBRARY: path to libmex.lib +# MATLAB_MX_LIBRARY: path to libmx.lib +# MATLAB_ENG_LIBRARY: path to libeng.lib + + +SET(MATLAB_FOUND 0) +IF(WIN32) + IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") + SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc60") + ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") + IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7") + # Assume people are generally using 7.1, + # if using 7.0 need to link to: ../extern/lib/win32/microsoft/msvc70 + SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/msvc71") + ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 7") + IF(${CMAKE_GENERATOR} MATCHES "Borland") + # Same here, there are also: bcc50 and bcc51 directories + SET(MATLAB_ROOT "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/lib/win32/microsoft/bcc54") + ELSE(${CMAKE_GENERATOR} MATCHES "Borland") + MESSAGE(FATAL_ERROR "Generator not compatible: ${CMAKE_GENERATOR}") + ENDIF(${CMAKE_GENERATOR} MATCHES "Borland") + ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 7") + ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") + FIND_LIBRARY(MATLAB_MEX_LIBRARY + libmex + ${MATLAB_ROOT} + ) + FIND_LIBRARY(MATLAB_MX_LIBRARY + libmx + ${MATLAB_ROOT} + ) + FIND_LIBRARY(MATLAB_ENG_LIBRARY + libeng + ${MATLAB_ROOT} + ) + + FIND_PATH(MATLAB_INCLUDE_DIR + "mex.h" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\7.0;MATLABROOT]/extern/include" + ) +ELSE( WIN32 ) + IF(CMAKE_SIZEOF_VOID_P EQUAL 4) + # Regular x86 + SET(MATLAB_ROOT + /usr/local/matlab-7sp1/bin/glnx86/ + /opt/matlab-7sp1/bin/glnx86/ + $ENV{HOME}/matlab-7sp1/bin/glnx86/ + $ENV{HOME}/redhat-matlab/bin/glnx86/ + ) + ELSE(CMAKE_SIZEOF_VOID_P EQUAL 4) + # AMD64: + SET(MATLAB_ROOT + /usr/local/matlab-7sp1/bin/glnxa64/ + /opt/matlab-7sp1/bin/glnxa64/ + $ENV{HOME}/matlab7_64/bin/glnxa64/ + $ENV{HOME}/matlab-7sp1/bin/glnxa64/ + $ENV{HOME}/redhat-matlab/bin/glnxa64/ + ) + ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 4) + FIND_LIBRARY(MATLAB_MEX_LIBRARY + mex + ${MATLAB_ROOT} + ) + FIND_LIBRARY(MATLAB_MX_LIBRARY + mx + ${MATLAB_ROOT} + ) + FIND_LIBRARY(MATLAB_ENG_LIBRARY + eng + ${MATLAB_ROOT} + ) + FIND_PATH(MATLAB_INCLUDE_DIR + "mex.h" + "/usr/local/matlab-7sp1/extern/include/" + "/opt/matlab-7sp1/extern/include/" + "$ENV{HOME}/matlab-7sp1/extern/include/" + "$ENV{HOME}/redhat-matlab/extern/include/" + ) + +ENDIF(WIN32) + +# This is common to UNIX and Win32: +SET(MATLAB_LIBRARIES + ${MATLAB_MEX_LIBRARY} + ${MATLAB_MX_LIBRARY} + ${MATLAB_ENG_LIBRARY} +) + +IF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES) + SET(MATLAB_FOUND 1) +ENDIF(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES) + +MARK_AS_ADVANCED( + MATLAB_LIBRARIES + MATLAB_MEX_LIBRARY + MATLAB_MX_LIBRARY + MATLAB_ENG_LIBRARY + MATLAB_INCLUDE_DIR + MATLAB_FOUND + MATLAB_ROOT +) + diff --git a/Modules/FindMotif.cmake b/Modules/FindMotif.cmake new file mode 100755 index 000000000..e068202e4 --- /dev/null +++ b/Modules/FindMotif.cmake @@ -0,0 +1,31 @@ +# - Try to find Motif (or lesstif) +# Once done this will define: +# MOTIF_FOUND - system has MOTIF +# MOTIF_INCLUDE_DIR - incude paths to use Motif +# MOTIF_LIBRARIES - Link these to use Motif + +SET(MOTIF_FOUND 0) + +IF(UNIX) + FIND_PATH(MOTIF_INCLUDE_DIR + Xm/Xm.h + /usr/openwin/include + ) + + FIND_LIBRARY(MOTIF_LIBRARIES + Xm + /usr/openwin/lib + ) + +ENDIF(UNIX) + +# handle the QUIETLY and REQUIRED arguments and set MOTIF_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Motif DEFAULT_MSG MOTIF_LIBRARIES MOTIF_INCLUDE_DIR) + + +MARK_AS_ADVANCED( + MOTIF_INCLUDE_DIR + MOTIF_LIBRARIES +) diff --git a/Modules/FindOpenAL.cmake b/Modules/FindOpenAL.cmake new file mode 100755 index 000000000..8d2933c5f --- /dev/null +++ b/Modules/FindOpenAL.cmake @@ -0,0 +1,100 @@ +# Locate OpenAL +# This module defines +# OPENAL_LIBRARY +# OPENAL_FOUND, if false, do not try to link to OpenAL +# OPENAL_INCLUDE_DIR, where to find the headers +# +# $OPENALDIR is an environment variable that would +# correspond to the ./configure --prefix=$OPENALDIR +# used in building OpenAL. +# +# Created by Eric Wing. This was influenced by the FindSDL.cmake module. + +# This makes the presumption that you are include al.h like +# #include "al.h" +# and not +# #include +# The reason for this is that the latter is not entirely portable. +# Windows/Creative Labs does not by default put their headers in AL/ and +# OS X uses the convention . +# +# For Windows, Creative Labs seems to have added a registry key for their +# OpenAL 1.1 installer. I have added that key to the list of search paths, +# however, the key looks like it could be a little fragile depending on +# if they decide to change the 1.00.0000 number for bug fix releases. +# Also, they seem to have laid down groundwork for multiple library platforms +# which puts the library in an extra subdirectory. Currently there is only +# Win32 and I have hardcoded that here. This may need to be adjusted as +# platforms are introduced. +# The OpenAL 1.0 installer doesn't seem to have a useful key I can use. +# I do not know if the Nvidia OpenAL SDK has a registry key. +# +# For OS X, remember that OpenAL was added by Apple in 10.4 (Tiger). +# To support the framework, I originally wrote special framework detection +# code in this module which I have now removed with CMake's introduction +# of native support for frameworks. +# In addition, OpenAL is open source, and it is possible to compile on Panther. +# Furthermore, due to bugs in the initial OpenAL release, and the +# transition to OpenAL 1.1, it is common to need to override the built-in +# framework. +# Per my request, CMake should search for frameworks first in +# the following order: +# ~/Library/Frameworks/OpenAL.framework/Headers +# /Library/Frameworks/OpenAL.framework/Headers +# /System/Library/Frameworks/OpenAL.framework/Headers +# +# On OS X, this will prefer the Framework version (if found) over others. +# People will have to manually change the cache values of +# OPENAL_LIBRARY to override this selection or set the CMake environment +# CMAKE_INCLUDE_PATH to modify the search paths. + +FIND_PATH(OPENAL_INCLUDE_DIR al.h + PATHS + $ENV{OPENALDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include/AL include/OpenAL include +) + +FIND_PATH(OPENAL_INCLUDE_DIR al.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] + PATH_SUFFIXES include/AL include/OpenAL include +) + +FIND_LIBRARY(OPENAL_LIBRARY + NAMES OpenAL al openal OpenAL32 + PATHS + $ENV{OPENALDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 +) + +FIND_LIBRARY(OPENAL_LIBRARY + NAMES OpenAL al openal OpenAL32 + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\1.00.0000;InstallDir] + PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 +) + + +SET(OPENAL_FOUND "NO") +IF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR) + SET(OPENAL_FOUND "YES") +ENDIF(OPENAL_LIBRARY AND OPENAL_INCLUDE_DIR) + diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake new file mode 100644 index 000000000..edea06af5 --- /dev/null +++ b/Modules/FindOpenGL.cmake @@ -0,0 +1,136 @@ +# - Try to find OpenGL +# Once done this will define +# +# OPENGL_FOUND - system has OpenGL +# OPENGL_XMESA_FOUND - system has XMESA +# OPENGL_GLU_FOUND - system has GLU +# OPENGL_INCLUDE_DIR - the GL include directory +# OPENGL_LIBRARIES - Link these to use OpenGL and GLU +# +# If you want to use just GL you can use these values +# OPENGL_gl_LIBRARY - Path to OpenGL Library +# OPENGL_glu_LIBRARY - Path to GLU Library +# +# On OSX default to using the framework version of opengl +# People will have to change the cache values of OPENGL_glu_LIBRARY +# and OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX + +IF (WIN32) + IF (CYGWIN) + + FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h ) + + FIND_LIBRARY(OPENGL_gl_LIBRARY opengl32 ) + + FIND_LIBRARY(OPENGL_glu_LIBRARY glu32 ) + + ELSE (CYGWIN) + + IF(BORLAND) + SET (OPENGL_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32") + SET (OPENGL_glu_LIBRARY import32 CACHE STRING "GLU library for win32") + ELSE(BORLAND) + SET (OPENGL_gl_LIBRARY opengl32 CACHE STRING "OpenGL library for win32") + SET (OPENGL_glu_LIBRARY glu32 CACHE STRING "GLU library for win32") + ENDIF(BORLAND) + + ENDIF (CYGWIN) + +ELSE (WIN32) + + IF (APPLE) + + FIND_LIBRARY(OPENGL_gl_LIBRARY OpenGL DOC "OpenGL lib for OSX") + FIND_LIBRARY(OPENGL_glu_LIBRARY AGL DOC "AGL lib for OSX") + FIND_PATH(OPENGL_INCLUDE_DIR OpenGL/gl.h DOC "Include for OpenGL on OSX") + + ELSE(APPLE) + + # The first line below is to make sure that the proper headers + # are used on a Linux machine with the NVidia drivers installed. + # They replace Mesa with NVidia's own library but normally do not + # install headers and that causes the linking to + # fail since the compiler finds the Mesa headers but NVidia's library. + # Make sure the NVIDIA directory comes BEFORE the others. + # - Atanas Georgiev + + FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h + /usr/share/doc/NVIDIA_GLX-1.0/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include + ) + + FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h + /usr/share/doc/NVIDIA_GLX-1.0/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include + ) + + FIND_LIBRARY(OPENGL_gl_LIBRARY + NAMES GL MesaGL + PATHS /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib + ) + + # On Unix OpenGL most certainly always requires X11. + # Feel free to tighten up these conditions if you don't + # think this is always true. + # It's not true on OSX. + + IF (OPENGL_gl_LIBRARY) + IF(NOT X11_FOUND) + INCLUDE(FindX11) + ENDIF(NOT X11_FOUND) + IF (X11_FOUND) + IF (NOT APPLE) + SET (OPENGL_LIBRARIES ${X11_LIBRARIES}) + ENDIF (NOT APPLE) + ENDIF (X11_FOUND) + ENDIF (OPENGL_gl_LIBRARY) + + FIND_LIBRARY(OPENGL_glu_LIBRARY + NAMES GLU MesaGLU + PATHS ${OPENGL_gl_LIBRARY} + /opt/graphics/OpenGL/lib + /usr/openwin/lib + /usr/shlib + ) + + ENDIF(APPLE) +ENDIF (WIN32) + +SET( OPENGL_FOUND "NO" ) +IF(OPENGL_gl_LIBRARY) + + IF(OPENGL_xmesa_INCLUDE_DIR) + SET( OPENGL_XMESA_FOUND "YES" ) + ELSE(OPENGL_xmesa_INCLUDE_DIR) + SET( OPENGL_XMESA_FOUND "NO" ) + ENDIF(OPENGL_xmesa_INCLUDE_DIR) + + SET( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES}) + IF(OPENGL_glu_LIBRARY) + SET( OPENGL_GLU_FOUND "YES" ) + SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} ) + ELSE(OPENGL_glu_LIBRARY) + SET( OPENGL_GLU_FOUND "NO" ) + ENDIF(OPENGL_glu_LIBRARY) + + SET( OPENGL_FOUND "YES" ) + + # This deprecated setting is for backward compatibility with CMake1.4 + + SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES}) + +ENDIF(OPENGL_gl_LIBRARY) + +# This deprecated setting is for backward compatibility with CMake1.4 +SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) + +MARK_AS_ADVANCED( + OPENGL_INCLUDE_DIR + OPENGL_xmesa_INCLUDE_DIR + OPENGL_glu_LIBRARY + OPENGL_gl_LIBRARY +) diff --git a/Modules/FindOpenSSL.cmake b/Modules/FindOpenSSL.cmake new file mode 100644 index 000000000..0172df83c --- /dev/null +++ b/Modules/FindOpenSSL.cmake @@ -0,0 +1,70 @@ +# - Try to find the OpenSSL encryption library +# Once done this will define +# +# OPENSSL_FOUND - system has the OpenSSL library +# OPENSSL_INCLUDE_DIR - the OpenSSL include directory +# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL + +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +IF(OPENSSL_LIBRARIES) + SET(OpenSSL_FIND_QUIETLY TRUE) +ENDIF(OPENSSL_LIBRARIES) + +IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(LIB_FOUND 1) +ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + +FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) + +IF(WIN32 AND MSVC) + # /MD and /MDd are the standard values - if somone wants to use + # others, the libnames have to change here too + # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b + + FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) + FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) + + IF(MSVC_IDE) + IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) + ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl") + ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + ELSE(MSVC_IDE) + STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) + ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) + ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ENDIF(MSVC_IDE) + MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) +ELSE(WIN32 AND MSVC) + + FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD ) + +ENDIF(WIN32 AND MSVC) + +IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND TRUE) +ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND FALSE) +ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + +IF (OPENSSL_FOUND) + IF (NOT OpenSSL_FIND_QUIETLY) + MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + ENDIF (NOT OpenSSL_FIND_QUIETLY) +ELSE (OPENSSL_FOUND) + IF (OpenSSL_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") + ENDIF (OpenSSL_FIND_REQUIRED) +ENDIF (OPENSSL_FOUND) + +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + diff --git a/Modules/FindOpenThreads.cmake b/Modules/FindOpenThreads.cmake new file mode 100644 index 000000000..fc5cd3659 --- /dev/null +++ b/Modules/FindOpenThreads.cmake @@ -0,0 +1,164 @@ +# OpenThreads is a C++ based threading library. Its largest userbase +# seems to OpenSceneGraph so you might notice I accept OSGDIR as an +# environment path. +# I consider this part of the Findosg* suite used to find OpenSceneGraph +# components. +# Each component is separate and you must opt in to each module. +# +# Locate OpenThreads +# This module defines +# OPENTHREADS_LIBRARY +# OPENTHREADS_FOUND, if false, do not try to link to OpenThreads +# OPENTHREADS_INCLUDE_DIR, where to find the headers +# +# $OPENTHREADS_DIR is an environment variable that would +# correspond to the ./configure --prefix=$OPENTHREADS_DIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include + +# To make it easier for one-step automated configuration/builds, +# we leverage environmental paths. This is preferable +# to the -DVAR=value switches because it insulates the +# users from changes we may make in this script. +# It also offers a little more flexibility than setting +# the CMAKE_*_PATH since we can target specific components. +# However, the default CMake behavior will search system paths +# before anything else. This is problematic in the cases +# where you have an older (stable) version installed, but +# are trying to build a newer version. +# CMake doesn't offer a nice way to globally control this behavior +# so we have to do a nasty "double FIND_" in this module. +# The first FIND disables the CMAKE_ search paths and only checks +# the environmental paths. +# If nothing is found, then the second find will search the +# standard install paths. +# Explicit -DVAR=value arguments should still be able to override everything. + +FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread + PATHS + $ENV{OPENTHREADS_INCLUDE_DIR} + $ENV{OPENTHREADS_DIR}/include + $ENV{OPENTHREADS_DIR} + $ENV{OSG_INCLUDE_DIR} + $ENV{OSG_DIR}/include + $ENV{OSG_DIR} + $ENV{OSGDIR}/include + $ENV{OSGDIR} + NO_DEFAULT_PATH +) + + + +FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include + /usr/include + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include +) + + +FIND_LIBRARY(OPENTHREADS_LIBRARY + NAMES OpenThreads OpenThreadsWin32 + PATHS + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR}/lib64 + $ENV{OPENTHREADS_DIR}/lib + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR}/lib64 + $ENV{OSG_DIR}/lib + $ENV{OSG_DIR} + $ENV{OSGDIR}/lib64 + $ENV{OSGDIR}/lib + $ENV{OSGDIR} + NO_DEFAULT_PATH +) + + + +FIND_LIBRARY(OPENTHREADS_LIBRARY + NAMES OpenThreads OpenThreadsWin32 + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/lib64 + /usr/local/lib + /usr/lib64 + /usr/lib + /sw/lib64 + /sw/lib + /opt/local/lib64 + /opt/local/lib + /opt/csw/lib64 + /opt/csw/lib + /opt/lib64 + /opt/lib + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib +) + + +FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG + NAMES OpenThreadsd OpenThreadsWin32d + PATHS + $ENV{OPENTHREADS_DEBUG_LIBRARY_DIR} + $ENV{OPENTHREADS_LIBRARY_DIR} + $ENV{OPENTHREADS_DIR}/lib64 + $ENV{OPENTHREADS_DIR}/lib + $ENV{OPENTHREADS_DIR} + $ENV{OSG_LIBRARY_DIR} + $ENV{OSG_DIR}/lib64 + $ENV{OSG_DIR}/lib + $ENV{OSG_DIR} + $ENV{OSGDIR}/lib64 + $ENV{OSGDIR}/lib + $ENV{OSGDIR} + NO_DEFAULT_PATH +) + + + +FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG + NAMES OpenThreadsd OpenThreadsWin32d + PATHS + /usr/local/lib64 + /usr/local/lib + /usr/lib64 + /usr/lib + /sw/lib64 + /sw/lib + /opt/local/lib64 + /opt/local/lib + /opt/csw/lib64 + /opt/csw/lib + /opt/lib64 + /opt/lib + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib +) + + +IF(OPENTHREADS_LIBRARY) + IF(NOT OPENTHREADS_LIBRARY_DEBUG) + #MESSAGE("-- Warning Debug OpenThreads not found, using: ${OPENTHREADS_LIBRARY}") + #SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}") + SET(OPENTHREADS_LIBRARY_DEBUG "${OPENTHREADS_LIBRARY}" CACHE FILEPATH "Debug version of OpenThreads Library (use regular version if not available)" FORCE) + ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG) +ENDIF(OPENTHREADS_LIBRARY) + +SET(OPENTHREADS_FOUND "NO") +IF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY) + SET(OPENTHREADS_FOUND "YES") + # MESSAGE("-- Found OpenThreads: "${OPENTHREADS_LIBRARY}) +ENDIF(OPENTHREADS_INCLUDE_DIR AND OPENTHREADS_LIBRARY) + diff --git a/Modules/FindPHP4.cmake b/Modules/FindPHP4.cmake new file mode 100644 index 000000000..d4ccd1f00 --- /dev/null +++ b/Modules/FindPHP4.cmake @@ -0,0 +1,70 @@ +# - Find PHP4 +# This module finds if PHP4 is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# PHP4_INCLUDE_PATH = path to where php.h can be found +# PHP4_EXECUTABLE = full path to the php4 binary +# + +SET(PHP4_POSSIBLE_INCLUDE_PATHS + /usr/include/php4 + /usr/local/include/php4 + /usr/include/php + /usr/local/include/php + /usr/local/apache/php + ) + +SET(PHP4_POSSIBLE_LIB_PATHS + /usr/lib + ) + +FIND_PATH(PHP4_FOUND_INCLUDE_PATH main/php.h + ${PHP4_POSSIBLE_INCLUDE_PATHS}) + +IF(PHP4_FOUND_INCLUDE_PATH) + SET(php4_paths "${PHP4_POSSIBLE_INCLUDE_PATHS}") + FOREACH(php4_path Zend main TSRM) + SET(php4_paths ${php4_paths} "${PHP4_FOUND_INCLUDE_PATH}/${php4_path}") + ENDFOREACH(php4_path Zend main TSRM) + SET(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths") +ENDIF(PHP4_FOUND_INCLUDE_PATH) + +FIND_PROGRAM(PHP4_EXECUTABLE NAMES php4 php ) + +MARK_AS_ADVANCED( + PHP4_EXECUTABLE + PHP4_FOUND_INCLUDE_PATH + ) + +IF(APPLE) +# this is a hack for now + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace") + FOREACH(symbol + __efree + __emalloc + __estrdup + __object_init_ex + __zend_get_parameters_array_ex + __zend_list_find + __zval_copy_ctor + _add_property_zval_ex + _alloc_globals + _compiler_globals + _convert_to_double + _convert_to_long + _zend_error + _zend_hash_find + _zend_register_internal_class_ex + _zend_register_list_destructors_ex + _zend_register_resource + _zend_rsrc_list_get_rsrc_type + _zend_wrong_param_count + _zval_used_for_init + ) + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS},-U,${symbol}") + ENDFOREACH(symbol) +ENDIF(APPLE) + diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake new file mode 100644 index 000000000..fa1bcd3ef --- /dev/null +++ b/Modules/FindPNG.cmake @@ -0,0 +1,44 @@ +# - Find the native PNG includes and library +# +# This module defines +# PNG_INCLUDE_DIR, where to find png.h, etc. +# PNG_LIBRARIES, the libraries to link against to use PNG. +# PNG_DEFINITIONS - You should ADD_DEFINITONS(${PNG_DEFINITIONS}) before compiling code that includes png library files. +# PNG_FOUND, If false, do not try to use PNG. +# also defined, but not for general use are +# PNG_LIBRARY, where to find the PNG library. +# None of the above will be defined unles zlib can be found. +# PNG depends on Zlib +INCLUDE(FindZLIB) + +IF(ZLIB_FOUND) + FIND_PATH(PNG_PNG_INCLUDE_DIR png.h + /usr/local/include/libpng # OpenBSD + ) + + SET(PNG_NAMES ${PNG_NAMES} png libpng) + FIND_LIBRARY(PNG_LIBRARY NAMES ${PNG_NAMES} ) + + IF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) + # png.h includes zlib.h. Sigh. + SET(PNG_INCLUDE_DIR ${PNG_PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} ) + SET(PNG_LIBRARIES ${PNG_LIBRARY} ${ZLIB_LIBRARY}) + + IF (CYGWIN) + IF(BUILD_SHARED_LIBS) + # No need to define PNG_USE_DLL here, because it's default for Cygwin. + ELSE(BUILD_SHARED_LIBS) + SET (PNG_DEFINITIONS -DPNG_STATIC) + ENDIF(BUILD_SHARED_LIBS) + ENDIF (CYGWIN) + + ENDIF (PNG_LIBRARY AND PNG_PNG_INCLUDE_DIR) + +ENDIF(ZLIB_FOUND) + +# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PNG DEFAULT_MSG PNG_LIBRARY PNG_PNG_INCLUDE_DIR) + +MARK_AS_ADVANCED(PNG_PNG_INCLUDE_DIR PNG_LIBRARY ) diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake new file mode 100644 index 000000000..091954f0e --- /dev/null +++ b/Modules/FindPackageHandleStandardArgs.cmake @@ -0,0 +1,62 @@ +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... ) +# This macro is intended to be used in FindXXX.cmake modules files. +# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and +# it also sets the _FOUND variable. +# The package is found if all variables listed are TRUE. +# Example: +# +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) +# +# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and +# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. +# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, +# independent whether QUIET was used or not. +# If it is found, the location is reported using the VAR1 argument, so +# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out. +# If the second argument is DEFAULT_MSG, the message in the failure case will +# be "Could NOT find LibXml2", if you don't like this message you can specify +# your own custom failure message there. + +INCLUDE(FindPackageMessage) +FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 ) + + IF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + SET(_FAIL_MESSAGE "Could NOT find ${_NAME}") + ELSE("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + SET(_FAIL_MESSAGE "${_FAIL_MSG}") + ENDIF("${_FAIL_MSG}" STREQUAL "DEFAULT_MSG") + + STRING(TOUPPER ${_NAME} _NAME_UPPER) + + SET(DETAILS "") + SET(${_NAME_UPPER}_FOUND TRUE) + IF(NOT ${_VAR1}) + SET(${_NAME_UPPER}_FOUND FALSE) + ELSE(NOT ${_VAR1}) + SET(DETAILS "${DETAILS}[${${_VAR1}}]") + ENDIF(NOT ${_VAR1}) + + # check if all passed variables are valid + FOREACH(_CURRENT_VAR ${ARGN}) + IF(NOT ${_CURRENT_VAR}) + SET(${_NAME_UPPER}_FOUND FALSE) + ELSE(NOT ${_CURRENT_VAR}) + SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") + ENDIF(NOT ${_CURRENT_VAR}) + ENDFOREACH(_CURRENT_VAR) + + IF (${_NAME_UPPER}_FOUND) + FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_VAR1}}" "${DETAILS}") + ELSE (${_NAME_UPPER}_FOUND) + IF (${_NAME}_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${_FAIL_MESSAGE}") + ELSE (${_NAME}_FIND_REQUIRED) + IF (NOT ${_NAME}_FIND_QUIETLY) + MESSAGE(STATUS "${_FAIL_MESSAGE}") + ENDIF (NOT ${_NAME}_FIND_QUIETLY) + ENDIF (${_NAME}_FIND_REQUIRED) + ENDIF (${_NAME_UPPER}_FOUND) + + SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE) + +ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS) diff --git a/Modules/FindPackageMessage.cmake b/Modules/FindPackageMessage.cmake new file mode 100644 index 000000000..1106e0e87 --- /dev/null +++ b/Modules/FindPackageMessage.cmake @@ -0,0 +1,35 @@ +# FIND_PACKAGE_MESSAGE( "message for user" "find result details") +# +# This macro is intended to be used in FindXXX.cmake modules files. +# It will print a message once for each unique find result. +# This is useful for telling the user where a package was found. +# The first argument specifies the name (XXX) of the package. +# The second argument specifies the message to display. +# The third argument lists details about the find result so that +# if they change the message will be displayed again. +# The macro also obeys the QUIET argument to the find_package command. +# +# Example: +# +# IF(X11_FOUND) +# FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" +# "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") +# ELSE(X11_FOUND) +# ... +# ENDIF(X11_FOUND) + +FUNCTION(FIND_PACKAGE_MESSAGE pkg msg details) + # Avoid printing a message repeatedly for the same find result. + IF(NOT ${pkg}_FIND_QUIETLY) + SET(DETAILS_VAR FIND_PACKAGE_MESSAGE_DETAILS_${pkg}) + IF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") + # The message has not yet been printed. + MESSAGE(STATUS "${msg}") + + # Save the find details in the cache to avoid printing the same + # message again. + SET("${DETAILS_VAR}" "${details}" + CACHE INTERNAL "Details about finding ${pkg}") + ENDIF(NOT "${details}" STREQUAL "${${DETAILS_VAR}}") + ENDIF(NOT ${pkg}_FIND_QUIETLY) +ENDFUNCTION(FIND_PACKAGE_MESSAGE) diff --git a/Modules/FindPerl.cmake b/Modules/FindPerl.cmake new file mode 100644 index 000000000..b3c5e4feb --- /dev/null +++ b/Modules/FindPerl.cmake @@ -0,0 +1,37 @@ +# - Find perl +# this module looks for Perl +# +# PERL_EXECUTABLE - the full path to perl +# PERL_FOUND - If false, don't attempt to use perl. + +INCLUDE(FindCygwin) + +SET(PERL_POSSIBLE_BIN_PATHS + ${CYGWIN_INSTALL_PATH}/bin + ) + +IF(WIN32) + GET_FILENAME_COMPONENT( + ActivePerl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl;CurrentVersion]" + NAME) + SET(PERL_POSSIBLE_BIN_PATHS ${PERL_POSSIBLE_BIN_PATHS} + "C:/Perl/bin" + [HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActivePerl\\${ActivePerl_CurrentVersion}]/bin + ) +ENDIF(WIN32) + +FIND_PROGRAM(PERL_EXECUTABLE + NAMES perl + PATHS ${PERL_POSSIBLE_BIN_PATHS} + ) + +# Deprecated settings for compatibility with CMake1.4 +SET(PERL ${PERL_EXECUTABLE}) + +# handle the QUIETLY and REQUIRED arguments and set PERL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Perl DEFAULT_MSG PERL_EXECUTABLE) + +MARK_AS_ADVANCED(PERL_EXECUTABLE) diff --git a/Modules/FindPerlLibs.cmake b/Modules/FindPerlLibs.cmake new file mode 100644 index 000000000..884af6ec9 --- /dev/null +++ b/Modules/FindPerlLibs.cmake @@ -0,0 +1,64 @@ +# - Find Perl libraries +# This module finds if PERL is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# PERL_INCLUDE_PATH = path to where perl.h is found +# PERL_EXECUTABLE = full path to the perl binary +# + +SET(PERL_POSSIBLE_INCLUDE_PATHS + /usr/lib/perl/5.8.3/CORE + /usr/lib/perl/5.8.2/CORE + /usr/lib/perl/5.8.1/CORE + /usr/lib/perl/5.8.0/CORE + /usr/lib/perl/5.8/CORE + ) + +SET(PERL_POSSIBLE_LIB_PATHS + /usr/lib + ) + +FIND_PATH(PERL_INCLUDE_PATH perl.h + ${PERL_POSSIBLE_INCLUDE_PATHS}) + + +FIND_PROGRAM(PERL_EXECUTABLE perl ) + +IF(PERL_EXECUTABLE) + EXEC_PROGRAM(${PERL_EXECUTABLE} + ARGS -e "'use Config; print \$Config{libperl}, \"\\n\"'" + OUTPUT_VARIABLE PERL_LIBRARY_OUTPUT_VARIABLE + RETURN_VALUE PERL_LIBRARY_RETURN_VALUE + ) + IF(NOT PERL_LIBRARY_RETURN_VALUE) + FOREACH(path ${PERL_POSSIBLE_LIB_PATHS}) + SET(PERL_POSSIBLE_LIBRARY_NAME ${PERL_POSSIBLE_LIBRARY_NAME} "${path}/${PERL_LIBRARY_OUTPUT_VARIABLE}") + ENDFOREACH(path ${PERL_POSSIBLE_LIB_PATHS}) + ENDIF(NOT PERL_LIBRARY_RETURN_VALUE) + EXEC_PROGRAM(${PERL_EXECUTABLE} + ARGS -e "'use Config; print \$Config{cppflags}, \"\\n\"'" + OUTPUT_VARIABLE PERL_CPPFLAGS_OUTPUT_VARIABLE + RETURN_VALUE PERL_CPPFLAGS_RETURN_VALUE + ) + IF(NOT PERL_CPPFLAGS_RETURN_VALUE) + SET(PERL_EXTRA_C_FLAGS ${PERL_CPPFLAGS_OUTPUT_VARIABLE}) + ENDIF(NOT PERL_CPPFLAGS_RETURN_VALUE) +ENDIF(PERL_EXECUTABLE) + +FIND_LIBRARY(PERL_LIBRARY + NAMES ${PERL_POSSIBLE_LIBRARY_NAME} perl5.8.0 + PATHS ${PERL_POSSIBLE_LIB_PATHS} + ) + +# handle the QUIETLY and REQUIRED arguments and set PERLLIBS_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PerlLibs DEFAULT_MSG PERL_LIBRARY PERL_INCLUDE_PATH) + + +MARK_AS_ADVANCED( + PERL_INCLUDE_PATH + PERL_EXECUTABLE + PERL_LIBRARY + ) diff --git a/Modules/FindPhysFS.cmake b/Modules/FindPhysFS.cmake new file mode 100755 index 000000000..93e3b9914 --- /dev/null +++ b/Modules/FindPhysFS.cmake @@ -0,0 +1,59 @@ +# Locate PhysFS library +# This module defines +# PHYSFS_LIBRARY, the name of the library to link against +# PHYSFS_FOUND, if false, do not try to link to PHYSFS +# PHYSFS_INCLUDE_DIR, where to find physfs.h +# +# $PHYSFSDIR is an environment variable that would +# correspond to the ./configure --prefix=$PHYSFSDIR +# used in building PHYSFS. +# +# Created by Eric Wing. + +FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h + PATHS + $ENV{PHYSFSDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(PHYSFS_INCLUDE_DIR physfs.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + PATH_SUFFIXES include/physfs include +) + +FIND_LIBRARY(PHYSFS_LIBRARY + NAMES physfs + PATHS + $ENV{PHYSFSDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(PHYSFS_LIBRARY + NAMES physfs + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(PHYSFS_FOUND "NO") +IF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR) + SET(PHYSFS_FOUND "YES") +ENDIF(PHYSFS_LIBRARY AND PHYSFS_INCLUDE_DIR) + diff --git a/Modules/FindPike.cmake b/Modules/FindPike.cmake new file mode 100644 index 000000000..12985e835 --- /dev/null +++ b/Modules/FindPike.cmake @@ -0,0 +1,24 @@ +# - Find Pike +# This module finds if PIKE is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# PIKE_INCLUDE_PATH = path to where program.h is found +# PIKE_EXECUTABLE = full path to the pike binary +# + +FILE(GLOB PIKE_POSSIBLE_INCLUDE_PATHS + /usr/include/pike/* + /usr/local/include/pike/*) + +FIND_PATH(PIKE_INCLUDE_PATH program.h + ${PIKE_POSSIBLE_INCLUDE_PATHS}) + +FIND_PROGRAM(PIKE_EXECUTABLE + NAMES pike7.4 + ) + +MARK_AS_ADVANCED( + PIKE_EXECUTABLE + PIKE_INCLUDE_PATH + ) diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake new file mode 100755 index 000000000..ea72491a7 --- /dev/null +++ b/Modules/FindPkgConfig.cmake @@ -0,0 +1,360 @@ +# - a pkg-config module for CMake +# +# Usage: +# pkg_check_modules( [REQUIRED] []*) +# checks for all the given modules +# +# pkg_search_module( [REQUIRED] []*) +# checks for given modules and uses the first working one +# +# When the 'REQUIRED' argument was set, macros will fail with an error +# when module(s) could not be found +# +# It sets the following variables: +# PKG_CONFIG_FOUND ... true if pkg-config works on the system +# PKG_CONFIG_EXECUTABLE ... pathname of the pkg-config program +# _FOUND ... set to 1 if module(s) exist +# +# For the following variables two sets of values exist; first one is the +# common one and has the given PREFIX. The second set contains flags +# which are given out when pkgconfig was called with the '--static' +# option. +# _LIBRARIES ... only the libraries (w/o the '-l') +# _LIBRARY_DIRS ... the paths of the libraries (w/o the '-L') +# _LDFLAGS ... all required linker flags +# _LDFLAGS_OTHER ... all other linker flags +# _INCLUDE_DIRS ... the '-I' preprocessor flags (w/o the '-I') +# _CFLAGS ... all required cflags +# _CFLAGS_OTHER ... the other compiler flags +# +# = for common case +# = _STATIC for static linking +# +# There are some special variables whose prefix depends on the count +# of given modules. When there is only one module, stays +# unchanged. When there are multiple modules, the prefix will be +# changed to _: +# _VERSION ... version of the module +# _PREFIX ... prefix-directory of the module +# _INCLUDEDIR ... include-dir of the module +# _LIBDIR ... lib-dir of the module +# +# = when |MODULES| == 1, else +# = _ +# +# A parameter can have the following formats: +# {MODNAME} ... matches any version +# {MODNAME}>={VERSION} ... at least version is required +# {MODNAME}={VERSION} ... exactly version is required +# {MODNAME}<={VERSION} ... modules must not be newer than +# +# Examples +# pkg_check_modules (GLIB2 glib-2.0) +# +# pkg_check_modules (GLIB2 glib-2.0>=2.10) +# requires at least version 2.10 of glib2 and defines e.g. +# GLIB2_VERSION=2.10.3 +# +# pkg_check_modules (FOO glib-2.0>=2.10 gtk+-2.0) +# requires both glib2 and gtk2, and defines e.g. +# FOO_glib-2.0_VERSION=2.10.3 +# FOO_gtk+-2.0_VERSION=2.8.20 +# +# pkg_check_modules (XRENDER REQUIRED xrender) +# defines e.g.: +# XRENDER_LIBRARIES=Xrender;X11 +# XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp +# +# pkg_search_module (BAR libxml-2.0 libxml2 libxml>=2) + + +# Copyright (C) 2006 Enrico Scholz +# +# Redistribution and use, with or without modification, are permitted +# provided that the following conditions are met: +# +# 1. Redistributions must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# 2. 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. + + +### Common stuff #### +set(PKG_CONFIG_VERSION 1) +set(PKG_CONFIG_FOUND 0) + +find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable") +mark_as_advanced(PKG_CONFIG_EXECUTABLE) + +if(PKG_CONFIG_EXECUTABLE) + set(PKG_CONFIG_FOUND 1) +endif(PKG_CONFIG_EXECUTABLE) + + +# Unsets the given variables +macro(_pkgconfig_unset var) + set(${var} "" CACHE INTERNAL "") +endmacro(_pkgconfig_unset) + +macro(_pkgconfig_set var value) + set(${var} ${value} CACHE INTERNAL "") +endmacro(_pkgconfig_set) + +# Invokes pkgconfig, cleans up the result and sets variables +macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp) + set(_pkgconfig_invoke_result) + + execute_process( + COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist} + OUTPUT_VARIABLE _pkgconfig_invoke_result + RESULT_VARIABLE _pkgconfig_failed) + + if (_pkgconfig_failed) + set(_pkgconfig_${_varname} "") + _pkgconfig_unset(${_prefix}_${_varname}) + else(_pkgconfig_failed) + string(REGEX REPLACE "[\r\n]" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") + string(REGEX REPLACE " +$" "" _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") + + if (NOT ${_regexp} STREQUAL "") + string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}") + endif(NOT ${_regexp} STREQUAL "") + + separate_arguments(_pkgconfig_invoke_result) + + #message(STATUS " ${_varname} ... ${_pkgconfig_invoke_result}") + set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result}) + _pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}") + endif(_pkgconfig_failed) +endmacro(_pkgconfig_invoke) + +# Invokes pkgconfig two times; once without '--static' and once with +# '--static' +macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp) + _pkgconfig_invoke("${_pkglist}" ${_prefix} ${_varname} "${cleanup_regexp}" ${ARGN}) + _pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static ${ARGN}) +endmacro(_pkgconfig_invoke_dyn) + +# Splits given arguments into options and a package list +macro(_pkgconfig_parse_options _result _is_req) + set(${_is_req} 0) + + foreach(_pkg ${ARGN}) + if (_pkg STREQUAL "REQUIRED") + set(${_is_req} 1) + endif (_pkg STREQUAL "REQUIRED") + endforeach(_pkg ${ARGN}) + + set(${_result} ${ARGN}) + list(REMOVE_ITEM ${_result} "REQUIRED") +endmacro(_pkgconfig_parse_options) + +### +macro(_pkg_check_modules_internal _is_required _is_silent _prefix) + _pkgconfig_unset(${_prefix}_FOUND) + _pkgconfig_unset(${_prefix}_VERSION) + _pkgconfig_unset(${_prefix}_PREFIX) + _pkgconfig_unset(${_prefix}_INCLUDEDIR) + _pkgconfig_unset(${_prefix}_LIBDIR) + _pkgconfig_unset(${_prefix}_LIBS) + _pkgconfig_unset(${_prefix}_LIBS_L) + _pkgconfig_unset(${_prefix}_LIBS_PATHS) + _pkgconfig_unset(${_prefix}_LIBS_OTHER) + _pkgconfig_unset(${_prefix}_CFLAGS) + _pkgconfig_unset(${_prefix}_CFLAGS_I) + _pkgconfig_unset(${_prefix}_CFLAGS_OTHER) + _pkgconfig_unset(${_prefix}_STATIC_LIBDIR) + _pkgconfig_unset(${_prefix}_STATIC_LIBS) + _pkgconfig_unset(${_prefix}_STATIC_LIBS_L) + _pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS) + _pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER) + _pkgconfig_unset(${_prefix}_STATIC_CFLAGS) + _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I) + _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER) + + # create a better addressable variable of the modules and calculate its size + set(_pkg_check_modules_list ${ARGN}) + list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt) + + if(PKG_CONFIG_EXECUTABLE) + # give out status message telling checked module + if (NOT ${_is_silent}) + if (_pkg_check_modules_cnt EQUAL 1) + message(STATUS "checking for module '${_pkg_check_modules_list}'") + else(_pkg_check_modules_cnt EQUAL 1) + message(STATUS "checking for modules '${_pkg_check_modules_list}'") + endif(_pkg_check_modules_cnt EQUAL 1) + endif(NOT ${_is_silent}) + + set(_pkg_check_modules_packages) + set(_pkg_check_modules_failed) + + # iterate through module list and check whether they exist and match the required version + foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list}) + set(_pkg_check_modules_exist_query) + + # check whether version is given + if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") + string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") + string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op "${_pkg_check_modules_pkg}") + string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver "${_pkg_check_modules_pkg}") + else(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") + set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}") + set(_pkg_check_modules_pkg_op) + set(_pkg_check_modules_pkg_ver) + endif(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*") + + # handle the operands + if (_pkg_check_modules_pkg_op STREQUAL ">=") + list(APPEND _pkg_check_modules_exist_query --atleast-version) + endif(_pkg_check_modules_pkg_op STREQUAL ">=") + + if (_pkg_check_modules_pkg_op STREQUAL "=") + list(APPEND _pkg_check_modules_exist_query --exact-version) + endif(_pkg_check_modules_pkg_op STREQUAL "=") + + if (_pkg_check_modules_pkg_op STREQUAL "<=") + list(APPEND _pkg_check_modules_exist_query --max-version) + endif(_pkg_check_modules_pkg_op STREQUAL "<=") + + # create the final query which is of the format: + # * --atleast-version + # * --exact-version + # * --max-version + # * --exists + if (_pkg_check_modules_pkg_op) + list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}") + else(_pkg_check_modules_pkg_op) + list(APPEND _pkg_check_modules_exist_query --exists) + endif(_pkg_check_modules_pkg_op) + + _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION) + _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX) + _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR) + _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR) + + list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}") + list(APPEND _pkg_check_modules_packages "${_pkg_check_modules_pkg_name}") + + # execute the query + execute_process( + COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query} + RESULT_VARIABLE _pkgconfig_retval) + + # evaluate result and tell failures + if (_pkgconfig_retval) + if(NOT ${_is_silent}) + message(STATUS " package '${_pkg_check_modules_pkg}' not found") + endif(NOT ${_is_silent}) + + set(_pkg_check_modules_failed 1) + endif(_pkgconfig_retval) + endforeach(_pkg_check_modules_pkg) + + if(_pkg_check_modules_failed) + # fail when requested + if (${_is_required}) + message(SEND_ERROR "A required package was not found") + endif (${_is_required}) + else(_pkg_check_modules_failed) + # when we are here, we checked whether requested modules + # exist. Now, go through them and set variables + + _pkgconfig_set(${_prefix}_FOUND 1) + list(LENGTH _pkg_check_modules_packages pkg_count) + + # iterate through all modules again and set individual variables + foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages}) + # handle case when there is only one package required + if (pkg_count EQUAL 1) + set(_pkg_check_prefix "${_prefix}") + else(pkg_count EQUAL 1) + set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}") + endif(pkg_count EQUAL 1) + + _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION "" --modversion ) + _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX "" --variable=prefix ) + _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR "" --variable=includedir ) + _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR "" --variable=libdir ) + + message(STATUS " found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}") + endforeach(_pkg_check_modules_pkg) + + # set variables which are combined for multiple modules + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES "(^| )-l" --libs-only-l ) + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS "(^| )-L" --libs-only-L ) + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS "" --libs ) + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER "" --libs-only-other ) + + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS "(^| )-I" --cflags-only-I ) + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS "" --cflags ) + _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER "" --cflags-only-other ) + endif(_pkg_check_modules_failed) + else(PKG_CONFIG_EXECUTABLE) + if (${_is_required}) + message(SEND_ERROR "pkg-config tool not found") + endif (${_is_required}) + endif(PKG_CONFIG_EXECUTABLE) +endmacro(_pkg_check_modules_internal) + +### +### User visible macros start here +### + +### +macro(pkg_check_modules _prefix _module0) + # check cached value + if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) + _pkgconfig_parse_options (_pkg_modules _pkg_is_required "${_module0}" ${ARGN}) + _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules}) + + _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) + endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) +endmacro(pkg_check_modules) + +### +macro(pkg_search_module _prefix _module0) + # check cached value + if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) + set(_pkg_modules_found 0) + _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN}) + + message(STATUS "checking for one of the modules '${_pkg_modules_alt}'") + + # iterate through all modules and stop at the first working one. + foreach(_pkg_alt ${_pkg_modules_alt}) + if(NOT _pkg_modules_found) + _pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}") + endif(NOT _pkg_modules_found) + + if (${_prefix}_FOUND) + set(_pkg_modules_found 1) + endif(${_prefix}_FOUND) + endforeach(_pkg_alt) + + if (NOT ${_prefix}_FOUND) + if(${_pkg_is_required}) + message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found") + endif(${_pkg_is_required}) + endif(NOT ${_prefix}_FOUND) + + _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION}) + endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION} OR NOT ${_prefix}_FOUND) +endmacro(pkg_search_module) + +### Local Variables: +### mode: cmake +### End: diff --git a/Modules/FindProducer.cmake b/Modules/FindProducer.cmake new file mode 100644 index 000000000..576eae240 --- /dev/null +++ b/Modules/FindProducer.cmake @@ -0,0 +1,82 @@ +# Though Producer isn't directly part of OpenSceneGraph, its primary user +# is OSG so I consider this part of the Findosg* suite used to find +# OpenSceneGraph components. You'll notice that I accept OSGDIR as an +# environment path. +# +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL (and OpenThreads?) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate Producer +# This module defines +# PRODUCER_LIBRARY +# PRODUCER_FOUND, if false, do not try to link to Producer +# PRODUCER_INCLUDE_DIR, where to find the headers +# +# $PRODUCER_DIR is an environment variable that would +# correspond to the ./configure --prefix=$PRODUCER_DIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include + +# Try the user's environment request before anything else. +FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup + PATHS + $ENV{PRODUCER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(PRODUCER_INCLUDE_DIR Producer/CameraGroup + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include + /usr/include + /sw/include # Fink + /opt/local/include # DarwinPorts + /opt/csw/include # Blastwave + /opt/include + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include +) + +FIND_LIBRARY(PRODUCER_LIBRARY + NAMES Producer + PATHS + $ENV{PRODUCER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(PRODUCER_LIBRARY + NAMES Producer + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(PRODUCER_FOUND "NO") +IF(PRODUCER_LIBRARY AND PRODUCER_INCLUDE_DIR) + SET(PRODUCER_FOUND "YES") +ENDIF(PRODUCER_LIBRARY AND PRODUCER_INCLUDE_DIR) + + diff --git a/Modules/FindPythonInterp.cmake b/Modules/FindPythonInterp.cmake new file mode 100644 index 000000000..5074c6928 --- /dev/null +++ b/Modules/FindPythonInterp.cmake @@ -0,0 +1,28 @@ +# - Find python interpreter +# This module finds if Python interpreter is installed and determines where the +# executables are. This code sets the following variables: +# +# PYTHONINTERP_FOUND - Was the Python executable found +# PYTHON_EXECUTABLE - path to the Python interpreter +# + +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 + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.5\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.4\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath] + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath] + ) + +# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp DEFAULT_MSG PYTHON_EXECUTABLE) + +MARK_AS_ADVANCED(PYTHON_EXECUTABLE) + diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake new file mode 100644 index 000000000..ab33792a5 --- /dev/null +++ b/Modules/FindPythonLibs.cmake @@ -0,0 +1,162 @@ +# - Find python libraries +# This module finds if Python is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# PYTHONLIBS_FOUND = have the Python libs been found +# PYTHON_LIBRARIES = path to the python library +# PYTHON_INCLUDE_PATH = path to where Python.h is found +# PYTHON_DEBUG_LIBRARIES = path to the debug library +# + +INCLUDE(CMakeFindFrameworks) +# Search for the python framework on Apple. +CMAKE_FIND_FRAMEWORKS(Python) + +FOREACH(_CURRENT_VERSION 2.6 2.5 2.4 2.3 2.2 2.1 2.0 1.6 1.5) + STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) + IF(WIN32) + FIND_LIBRARY(PYTHON_DEBUG_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS}_d python + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs ) + ENDIF(WIN32) + + FIND_LIBRARY(PYTHON_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + PATH_SUFFIXES + python${_CURRENT_VERSION}/config + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + ) + + SET(PYTHON_FRAMEWORK_INCLUDES) + IF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_PATH) + FOREACH(dir ${Python_FRAMEWORKS}) + SET(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES} + ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION}) + ENDFOREACH(dir) + ENDIF(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_PATH) + + FIND_PATH(PYTHON_INCLUDE_PATH + NAMES Python.h + PATHS + ${PYTHON_FRAMEWORK_INCLUDES} + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + PATH_SUFFIXES + python${_CURRENT_VERSION} + ) + +ENDFOREACH(_CURRENT_VERSION) + +MARK_AS_ADVANCED( + PYTHON_DEBUG_LIBRARY + PYTHON_LIBRARY + PYTHON_INCLUDE_PATH +) + +# Python Should be built and installed as a Framework on OSX +IF(Python_FRAMEWORKS) + # If a framework has been selected for the include path, + # make sure "-framework" is used to link it. + IF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") + SET(PYTHON_LIBRARY "") + SET(PYTHON_DEBUG_LIBRARY "") + ENDIF("${PYTHON_INCLUDE_PATH}" MATCHES "Python\\.framework") + IF(NOT PYTHON_LIBRARY) + SET (PYTHON_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + ENDIF(NOT PYTHON_LIBRARY) + IF(NOT PYTHON_DEBUG_LIBRARY) + SET (PYTHON_DEBUG_LIBRARY "-framework Python" CACHE FILEPATH "Python Framework" FORCE) + ENDIF(NOT PYTHON_DEBUG_LIBRARY) +ENDIF(Python_FRAMEWORKS) + +# We use PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the cache entries +# because they are meant to specify the location of a single library. +# We now set the variables listed by the documentation for this +# module. +SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}") +SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}") + + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_PATH) + + +# PYTHON_ADD_MODULE( src1 src2 ... srcN) is used to build modules for python. +# PYTHON_WRITE_MODULES_HEADER() writes a header file you can include +# in your sources to initialize the static python modules + +GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS + GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) + +FUNCTION(PYTHON_ADD_MODULE _NAME ) + OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE) + OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS}) + + IF(PYTHON_ENABLE_MODULE_${_NAME}) + IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + SET(PY_MODULE_TYPE MODULE) + ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + SET(PY_MODULE_TYPE STATIC) + SET_PROPERTY(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) + ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + + SET_PROPERTY(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) + ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) +# TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES}) + + ENDIF(PYTHON_ENABLE_MODULE_${_NAME}) +ENDFUNCTION(PYTHON_ADD_MODULE) + +FUNCTION(PYTHON_WRITE_MODULES_HEADER _filename) + + GET_PROPERTY(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST) + + GET_FILENAME_COMPONENT(_name "${_filename}" NAME) + STRING(REPLACE "." "_" _name "${_name}") + STRING(TOUPPER ${_name} _name) + + SET(_filenameTmp "${_filename}.in") + FILE(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n") + FILE(APPEND ${_filenameTmp} +"#ifndef ${_name} +#define ${_name} + +#include + +#ifdef __cplusplus +extern \"C\" { +#endif /* __cplusplus */ + +") + + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + + FILE(APPEND ${_filenameTmp} +"#ifdef __cplusplus +} +#endif /* __cplusplus */ + +") + + + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "int CMakeLoadPythonModule_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + + FILE(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n") + FOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} " CMakeLoadPythonModule_${_currentModule}();\n") + ENDFOREACH(_currentModule ${PY_STATIC_MODULES_LIST}) + FILE(APPEND ${_filenameTmp} "}\n#endif\n\n#endif\n") + +# with CONFIGURE_FILE() cmake complains that you may not use a file created using FILE(WRITE) as input file for CONFIGURE_FILE() + EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET) + +ENDFUNCTION(PYTHON_WRITE_MODULES_HEADER) diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake new file mode 100644 index 000000000..63b6de951 --- /dev/null +++ b/Modules/FindQt.cmake @@ -0,0 +1,148 @@ +# - Searches for all installed versions of QT. +# This should only be used if your project can work with multiple +# versions of QT. If not, you should just directly use FindQt4 or FindQt3. +# If multiple versions of QT are found on the machine, then +# The user must set the option DESIRED_QT_VERSION to the version +# they want to use. If only one version of qt is found on the machine, +# then the DESIRED_QT_VERSION is set to that version and the +# matching FindQt3 or FindQt4 module is included. +# Once the user sets DESIRED_QT_VERSION, then the FindQt3 or FindQt4 module +# is included. +# +# QT_REQUIRED if this is set to TRUE then if CMake can +# not find QT4 or QT3 an error is raised +# and a message is sent to the user. +# +# DESIRED_QT_VERSION OPTION is created +# QT4_INSTALLED is set to TRUE if qt4 is found. +# QT3_INSTALLED is set to TRUE if qt3 is found. + + +# look for signs of qt3 installations +FILE(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake) +IF(GLOB_TEMP_VAR) + SET(QT3_INSTALLED TRUE) +ENDIF(GLOB_TEMP_VAR) +SET(GLOB_TEMP_VAR) + +FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-3*/bin/qmake) +IF(GLOB_TEMP_VAR) + SET(QT3_INSTALLED TRUE) +ENDIF(GLOB_TEMP_VAR) +SET(GLOB_TEMP_VAR) + +# look for qt4 installations +FILE(GLOB GLOB_TEMP_VAR /usr/local/qt-x11-commercial-4*/bin/qmake) +IF(GLOB_TEMP_VAR) + SET(QT4_INSTALLED TRUE) +ENDIF(GLOB_TEMP_VAR) +SET(GLOB_TEMP_VAR) + +FILE(GLOB GLOB_TEMP_VAR /usr/local/Trolltech/Qt-4*/bin/qmake) +IF(GLOB_TEMP_VAR) + SET(QT4_INSTALLED TRUE) +ENDIF(GLOB_TEMP_VAR) +SET(GLOB_TEMP_VAR) + +# now find qmake +FIND_PROGRAM(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin") +IF(QT_QMAKE_EXECUTABLE_FINDQT) + EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION" + OUTPUT_VARIABLE QTVERSION) + IF(QTVERSION MATCHES "4.*") + SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "QT4 qmake program.") + SET(QT4_INSTALLED TRUE) + ENDIF(QTVERSION MATCHES "4.*") + IF(QTVERSION MATCHES "Unknown") + SET(QT3_INSTALLED TRUE) + ENDIF(QTVERSION MATCHES "Unknown") +ENDIF(QT_QMAKE_EXECUTABLE_FINDQT) + +IF(QT_QMAKE_EXECUTABLE_FINDQT) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE_FINDQT} + ARGS "-query QT_INSTALL_HEADERS" + OUTPUT_VARIABLE qt_headers ) +ENDIF(QT_QMAKE_EXECUTABLE_FINDQT) + +FIND_FILE( QT4_QGLOBAL_H_FILE qglobal.h + "${QT_SEARCH_PATH}/Qt/include" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/include/Qt" + ${qt_headers}/Qt + $ENV{QTDIR}/include/Qt + /usr/local/qt/include/Qt + /usr/local/include/Qt + /usr/lib/qt/include/Qt + /usr/include/Qt + /usr/share/qt4/include/Qt + C:/Progra~1/qt/include/Qt ) + +IF(QT4_QGLOBAL_H_FILE) + SET(QT4_INSTALLED TRUE) +ENDIF(QT4_QGLOBAL_H_FILE) + +FIND_FILE( QT3_QGLOBAL_H_FILE qglobal.h + "${QT_SEARCH_PATH}/Qt/include" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt" + C:/Qt/3.3.3Educational/include + $ENV{QTDIR}/include + /usr/include/qt3/Qt + /usr/local/qt/include + /usr/local/include + /usr/lib/qt/include + /usr/include + /usr/share/qt3/include + C:/Progra~1/qt/include + /usr/include/qt3 ) + +IF(QT3_QGLOBAL_H_FILE) + SET(QT3_INSTALLED TRUE) +ENDIF(QT3_QGLOBAL_H_FILE) + +IF(QT3_INSTALLED AND QT4_INSTALLED ) + # force user to pick if we have both + SET(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of QT to use: 3 or 4") +ELSE(QT3_INSTALLED AND QT4_INSTALLED ) + # if only one found then pick that one + IF(QT3_INSTALLED) + SET(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of QT to use: 3 or 4") + ENDIF(QT3_INSTALLED) + IF(QT4_INSTALLED) + SET(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of QT to use: 3 or 4") + ENDIF(QT4_INSTALLED) +ENDIF(QT3_INSTALLED AND QT4_INSTALLED ) + +IF(DESIRED_QT_VERSION MATCHES 3) + SET(Qt3_FIND_REQUIRED ${Qt_FIND_REQUIRED}) + SET(Qt3_FIND_QUIETLY ${Qt_FIND_QUIETLY}) + INCLUDE(FindQt3) +ENDIF(DESIRED_QT_VERSION MATCHES 3) +IF(DESIRED_QT_VERSION MATCHES 4) + SET(Qt4_FIND_REQUIRED ${Qt_FIND_REQUIRED}) + SET(Qt4_FIND_QUIETLY ${Qt_FIND_QUIETLY}) + INCLUDE(FindQt4) +ENDIF(DESIRED_QT_VERSION MATCHES 4) + +IF(NOT QT3_INSTALLED AND NOT QT4_INSTALLED) + IF(QT_REQUIRED) + MESSAGE(SEND_ERROR "CMake was unable to find any QT versions, put qmake in your path, or set QT_QMAKE_EXECUTABLE.") + ENDIF(QT_REQUIRED) +ELSE(NOT QT3_INSTALLED AND NOT QT4_INSTALLED) + IF(NOT QT_FOUND AND NOT DESIRED_QT_VERSION) + IF(QT_REQUIRED) + MESSAGE(SEND_ERROR "Multiple versions of QT found please set DESIRED_QT_VERSION") + ELSE(QT_REQUIRED) + MESSAGE("Multiple versions of QT found please set DESIRED_QT_VERSION") + ENDIF(QT_REQUIRED) + ENDIF(NOT QT_FOUND AND NOT DESIRED_QT_VERSION) + IF(NOT QT_FOUND AND DESIRED_QT_VERSION) + IF(QT_REQUIRED) + MESSAGE(FATAL_ERROR "CMake was unable to find QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE, if those are set then QT_QT_LIBRARY or QT_LIBRARY_DIR.") + ELSE(QT_REQUIRED) + MESSAGE( "CMake was unable to find desired QT version: ${DESIRED_QT_VERSION}. Set advanced values QT_QMAKE_EXECUTABLE and QT${DESIRED_QT_VERSION}_QGLOBAL_FILE.") + ENDIF(QT_REQUIRED) + ENDIF(NOT QT_FOUND AND DESIRED_QT_VERSION) +ENDIF(NOT QT3_INSTALLED AND NOT QT4_INSTALLED) +MARK_AS_ADVANCED(QT3_QGLOBAL_H_FILE QT4_QGLOBAL_H_FILE QT_QMAKE_EXECUTABLE_FINDQT) diff --git a/Modules/FindQt3.cmake b/Modules/FindQt3.cmake new file mode 100755 index 000000000..14c0ac4e3 --- /dev/null +++ b/Modules/FindQt3.cmake @@ -0,0 +1,319 @@ +# - Locate Qt include paths and libraries +# This module defines: +# QT_INCLUDE_DIR - where to find qt.h, etc. +# QT_LIBRARIES - the libraries to link against to use Qt. +# QT_DEFINITIONS - definitions to use when +# compiling code that uses Qt. +# QT_FOUND - If false, don't try to use Qt. +# +# If you need the multithreaded version of Qt, set QT_MT_REQUIRED to TRUE +# +# Also defined, but not for general use are: +# QT_MOC_EXECUTABLE, where to find the moc tool. +# QT_UIC_EXECUTABLE, where to find the uic tool. +# QT_QT_LIBRARY, where to find the Qt library. +# QT_QTMAIN_LIBRARY, where to find the qtmain +# library. This is only required by Qt3 on Windows. + +# These are around for backwards compatibility +# they will be set +# QT_WRAP_CPP, set true if QT_MOC_EXECUTABLE is found +# QT_WRAP_UI set true if QT_UIC_EXECUTABLE is found + +FILE(GLOB GLOB_PATHS_BIN /usr/lib/qt-3*/bin/) +FIND_PATH(QT_INCLUDE_DIR qt.h + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt" + $ENV{QTDIR}/include + ${GLOB_PATHS_BIN} + /usr/local/qt/include + /usr/lib/qt/include + /usr/lib/qt3/include + /usr/include/qt + /usr/share/qt3/include + C:/Progra~1/qt/include + /usr/include/qt3 + /usr/X11R6/include + ) + +# if qglobal.h is not in the qt_include_dir then set +# QT_INCLUDE_DIR to NOTFOUND +IF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h) + SET(QT_INCLUDE_DIR QT_INCLUDE_DIR-NOTFOUND CACHE PATH "path to qt3 include directory" FORCE) +ENDIF(NOT EXISTS ${QT_INCLUDE_DIR}/qglobal.h) + +IF(QT_INCLUDE_DIR) + #extract the version string from qglobal.h + FILE(READ ${QT_INCLUDE_DIR}/qglobal.h QGLOBAL_H) + STRING(REGEX MATCH "#define[\t ]+QT_VERSION_STR[\t ]+\"([0-9]+.[0-9]+.[0-9]+)\"" QGLOBAL_H "${QGLOBAL_H}") + STRING(REGEX REPLACE ".*\"([0-9]+.[0-9]+.[0-9]+)\".*" "\\1" qt_version_str "${QGLOBAL_H}") + + # Under windows the qt library (MSVC) has the format qt-mtXYZ where XYZ is the + # version X.Y.Z, so we need to remove the dots from version + STRING(REGEX REPLACE "\\." "" qt_version_str_lib "${qt_version_str}") +ELSE(QT_INCLUDE_DIR) +ENDIF(QT_INCLUDE_DIR) + +FILE(GLOB GLOB_PATHS_LIB /usr/lib/qt-3*/lib/) +IF (QT_MT_REQUIRED) + FIND_LIBRARY(QT_QT_LIBRARY + NAMES + qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib} + qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3 + PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib" + $ENV{QTDIR}/lib + ${GLOB_PATHS_LIB} + /usr/local/qt/lib + /usr/lib/qt/lib + /usr/lib/qt3/lib + /usr/lib/qt3/lib64 + /usr/share/qt3/lib + C:/Progra~1/qt/lib + /usr/X11R6/lib + ) + +ELSE (QT_MT_REQUIRED) + FIND_LIBRARY(QT_QT_LIBRARY + NAMES + qt qt-${qt_version_str_lib} qt-edu${qt_version_str_lib} + qt-mt qt-mt${qt_version_str_lib} qt-mtnc${qt_version_str_lib} + qt-mtedu${qt_version_str_lib} qt-mt230nc qt-mtnc321 qt-mt3 + PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib" + $ENV{QTDIR}/lib + ${GLOB_PATHS_LIB} + /usr/local/qt/lib + /usr/lib/qt/lib + /usr/lib/qt3/lib + /usr/lib/qt3/lib64 + /usr/share/qt3/lib + C:/Progra~1/qt/lib + /usr/X11R6/lib + ) +ENDIF (QT_MT_REQUIRED) + +IF(QT_QT_LIBRARY) +ELSE(QT_QT_LIBRARY) +ENDIF(QT_QT_LIBRARY) + + +FIND_LIBRARY(QT_QASSISTANTCLIENT_LIBRARY + NAMES qassistantclient + PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib" + $ENV{QTDIR}/lib + ${GLOB_PATHS_LIB} + /usr/local/qt/lib + /usr/lib/qt3/lib + /usr/lib/qt3/lib64 + /usr/share/qt3/lib + C:/Progra~1/qt/lib + /usr/X11R6/lib + ) + +# qt 3 should prefer QTDIR over the PATH +FIND_PROGRAM(QT_MOC_EXECUTABLE + NAMES moc moc-qt3 + PATHS + $ENV{QTDIR}/bin + NO_DEFAULT_PATH +) + +FIND_PROGRAM(QT_MOC_EXECUTABLE + NAMES moc moc-qt3 + PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt" + $ENV{QTDIR}/bin + ${GLOB_PATHS_BIN} + /usr/local/qt/bin + /usr/lib/qt/bin + /usr/lib/qt3/bin + /usr/share/qt3/bin + C:/Progra~1/qt/bin + /usr/X11R6/bin + ) + +IF(QT_MOC_EXECUTABLE) + SET ( QT_WRAP_CPP "YES") +ELSE(QT_MOC_EXECUTABLE) +ENDIF(QT_MOC_EXECUTABLE) + +# qt 3 should prefer QTDIR over the PATH +FIND_PROGRAM(QT_UIC_EXECUTABLE uic + PATHS + $ENV{QTDIR}/bin + NO_DEFAULT_PATH +) +FIND_PROGRAM(QT_UIC_EXECUTABLE uic + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/include/Qt" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/include/Qt" + $ENV{QTDIR}/bin + ${GLOB_PATHS_BIN} + /usr/local/qt/bin + /usr/lib/qt/bin + /usr/lib/qt3/bin + /usr/share/qt3/bin + C:/Progra~1/qt/bin + /usr/X11R6/bin + ) + +IF(QT_UIC_EXECUTABLE) + SET ( QT_WRAP_UI "YES") +ELSE(QT_UIC_EXECUTABLE) +ENDIF(QT_UIC_EXECUTABLE) + +IF (WIN32) + FIND_LIBRARY(QT_QTMAIN_LIBRARY qtmain + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.1;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.2.0;InstallDir]/lib" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\3.1.0;InstallDir]/lib" + "$ENV{ProgramFiles}/qt/lib" + $ENV{QTDIR}/lib "C:/Program Files/qt/lib" + DOC "This Library is only needed by and included with Qt3 on MSWindows. It should be NOTFOUND, undefined or IGNORE otherwise." + ) +ENDIF (WIN32) + + +IF (QT_MIN_VERSION) + + STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" qt_major_vers "${qt_version_str}") + STRING(REGEX REPLACE "[0-9]+\\.([0-9]+)\\.[0-9]+" "\\1" qt_minor_vers "${qt_version_str}") + STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" qt_patch_vers "${qt_version_str}") + + #now parse the parts of the user given version string into variables + STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+$" req_qt_major_vers "${QT_MIN_VERSION}") + IF (NOT req_qt_major_vers) + MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"3.1.5\"") + ENDIF (NOT req_qt_major_vers) + + STRING(REGEX REPLACE "([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") + + # req = "6.5.4", qt = "3.2.1" + + IF (req_qt_major_vers GREATER qt_major_vers) # (6 > 3) ? + MESSAGE( FATAL_ERROR "Qt major version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes + ELSE (req_qt_major_vers GREATER qt_major_vers) # no + IF (req_qt_major_vers LESS qt_major_vers) # (6 < 3) ? + SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes + ELSE (req_qt_major_vers LESS qt_major_vers) # ( 6==3) ? + IF (req_qt_minor_vers GREATER qt_minor_vers) # (5>2) ? + MESSAGE( FATAL_ERROR "Qt minor version not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes + ELSE (req_qt_minor_vers GREATER qt_minor_vers) # no + IF (req_qt_minor_vers LESS qt_minor_vers) # (5<2) ? + SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes + ELSE (req_qt_minor_vers LESS qt_minor_vers) # (5==2) + IF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ? + MESSAGE( FATAL_ERROR "Qt patch level not matched (required: ${QT_MIN_VERSION}, found: ${qt_version_str})") # yes + ELSE (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ? + SET( QT_VERSION_BIG_ENOUGH "YES" ) # yes + ENDIF (req_qt_patch_vers GREATER qt_patch_vers) # (4>1) ? + ENDIF (req_qt_minor_vers LESS qt_minor_vers) + ENDIF (req_qt_minor_vers GREATER qt_minor_vers) + ENDIF (req_qt_major_vers LESS qt_major_vers) + ENDIF (req_qt_major_vers GREATER qt_major_vers) +ENDIF (QT_MIN_VERSION) + +# if the include a library are found then we have it +IF(QT_INCLUDE_DIR) + IF(QT_QT_LIBRARY) + SET( QT_FOUND "YES" ) + ENDIF(QT_QT_LIBRARY) +ENDIF(QT_INCLUDE_DIR) + +IF(QT_FOUND) + SET( QT_LIBRARIES ${QT_LIBRARIES} ${QT_QT_LIBRARY} ) + SET( QT_DEFINITIONS "") + + IF (WIN32 AND NOT CYGWIN) + IF (QT_QTMAIN_LIBRARY) + # for version 3 + SET (QT_DEFINITIONS -DQT_DLL -DQT_THREAD_SUPPORT -DNO_DEBUG) + SET (QT_LIBRARIES imm32.lib ${QT_QT_LIBRARY} ${QT_QTMAIN_LIBRARY} ) + SET (QT_LIBRARIES ${QT_LIBRARIES} winmm wsock32) + ELSE (QT_QTMAIN_LIBRARY) + # for version 2 + SET (QT_LIBRARIES imm32.lib ws2_32.lib ${QT_QT_LIBRARY} ) + ENDIF (QT_QTMAIN_LIBRARY) + ELSE (WIN32 AND NOT CYGWIN) + SET (QT_LIBRARIES ${QT_QT_LIBRARY} ) + + SET (QT_DEFINITIONS -DQT_SHARED -DQT_NO_DEBUG) + IF(QT_QT_LIBRARY MATCHES "qt-mt") + SET (QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_THREAD_SUPPORT -D_REENTRANT) + ENDIF(QT_QT_LIBRARY MATCHES "qt-mt") + + ENDIF (WIN32 AND NOT CYGWIN) + + IF (QT_QASSISTANTCLIENT_LIBRARY) + SET (QT_LIBRARIES ${QT_QASSISTANTCLIENT_LIBRARY} ${QT_LIBRARIES}) + ENDIF (QT_QASSISTANTCLIENT_LIBRARY) + + # Backwards compatibility for CMake1.4 and 1.2 + SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) + SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) + # for unix add X11 stuff + IF(UNIX) + FIND_PACKAGE(X11) + IF (X11_FOUND) + SET (QT_LIBRARIES ${QT_LIBRARIES} ${X11_LIBRARIES}) + ENDIF (X11_FOUND) + IF (CMAKE_DL_LIBS) + SET (QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_DL_LIBS}) + ENDIF (CMAKE_DL_LIBS) + ENDIF(UNIX) + IF(QT_QT_LIBRARY MATCHES "qt-mt") + FIND_PACKAGE(Threads) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) + ENDIF(QT_QT_LIBRARY MATCHES "qt-mt") +ENDIF(QT_FOUND) + +EXEC_PROGRAM(${QT_MOC_EXECUTABLE} ARGS "-v" OUTPUT_VARIABLE QTVERSION_MOC) +EXEC_PROGRAM(${QT_UIC_EXECUTABLE} ARGS "-version" OUTPUT_VARIABLE QTVERSION_UIC) + +SET(_QT_UIC_VERSION_3 FALSE) +IF("${QTVERSION_UIC}" MATCHES ".* 3..*") + SET(_QT_UIC_VERSION_3 TRUE) +ENDIF("${QTVERSION_UIC}" MATCHES ".* 3..*") + +SET(_QT_MOC_VERSION_3 FALSE) +IF("${QTVERSION_MOC}" MATCHES ".* 3..*") + SET(_QT_MOC_VERSION_3 TRUE) +ENDIF("${QTVERSION_MOC}" MATCHES ".* 3..*") + +SET(QT_WRAP_CPP FALSE) +IF (QT_MOC_EXECUTABLE) + IF(_QT_MOC_VERSION_3) + SET ( QT_WRAP_CPP TRUE) + ENDIF(_QT_MOC_VERSION_3) +ENDIF (QT_MOC_EXECUTABLE) + +SET(QT_WRAP_UI FALSE) +IF (QT_UIC_EXECUTABLE) + IF(_QT_UIC_VERSION_3) + SET ( QT_WRAP_UI TRUE) + ENDIF(_QT_UIC_VERSION_3) +ENDIF (QT_UIC_EXECUTABLE) + +MARK_AS_ADVANCED( + QT_INCLUDE_DIR + QT_QT_LIBRARY + QT_QTMAIN_LIBRARY + QT_QASSISTANTCLIENT_LIBRARY + QT_UIC_EXECUTABLE + QT_MOC_EXECUTABLE + QT_WRAP_CPP + QT_WRAP_UI + ) diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake new file mode 100644 index 000000000..ee1b2928b --- /dev/null +++ b/Modules/FindQt4.cmake @@ -0,0 +1,1593 @@ +# - Find QT 4 +# This module can be used to find Qt4. +# The most important issue is that the Qt4 qmake is available via the system path. +# This qmake is then used to detect basically everything else. +# This module defines a number of key variables and macros. +# First is QT_USE_FILE which is the path to a CMake file that can be included +# to compile Qt 4 applications and libraries. By default, the QtCore and QtGui +# libraries are loaded. This behavior can be changed by setting one or more +# of the following variables to true before doing INCLUDE(${QT_USE_FILE}): +# QT_DONT_USE_QTCORE +# QT_DONT_USE_QTGUI +# QT_USE_QT3SUPPORT +# QT_USE_QTASSISTANT +# QT_USE_QTDESIGNER +# QT_USE_QTMOTIF +# QT_USE_QTMAIN +# QT_USE_QTNETWORK +# QT_USE_QTNSPLUGIN +# QT_USE_QTOPENGL +# QT_USE_QTSQL +# QT_USE_QTXML +# QT_USE_QTSVG +# QT_USE_QTTEST +# QT_USE_QTUITOOLS +# QT_USE_QTDBUS +# QT_USE_QTSCRIPT +# QT_USE_QTASSISTANTCLIENT +# QT_USE_QTHELP +# QT_USE_QTWEBKIT +# QT_USE_QTXMLPATTERNS +# QT_USE_PHONON +# +# The file pointed to by QT_USE_FILE will set up your compile environment +# by adding include directories, preprocessor defines, and populate a +# QT_LIBRARIES variable containing all the Qt libraries and their dependencies. +# Add the QT_LIBRARIES variable to your TARGET_LINK_LIBRARIES. +# +# Typical usage could be something like: +# FIND_PACKAGE(Qt4) +# SET(QT_USE_QTXML 1) +# INCLUDE(${QT_USE_FILE}) +# ADD_EXECUTABLE(myexe main.cpp) +# TARGET_LINK_LIBRARIES(myexe ${QT_LIBRARIES}) +# +# +# There are also some files that need processing by some Qt tools such as moc +# and uic. Listed below are macros that may be used to process those files. +# +# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...) +# create moc code from a list of files containing Qt class with +# the Q_OBJECT declaration. Options may be given to moc, such as those found +# when executing "moc -help" +# +# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...) +# create code from a list of Qt designer ui files. +# Options may be given to uic, such as those found +# when executing "uic -help" +# +# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...) +# create code from a list of Qt resource files. +# Options may be given to rcc, such as those found +# when executing "rcc -help" +# +# macro QT4_GENERATE_MOC(inputfile outputfile ) +# creates a rule to run moc on infile and create outfile. +# Use this if for some reason QT4_WRAP_CPP() isn't appropriate, e.g. +# because you need a custom filename for the moc file or something similar. +# +# macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) +# This macro is still experimental. +# It can be used to have moc automatically handled. +# So if you have the files foo.h and foo.cpp, and in foo.h a +# a class uses the Q_OBJECT macro, moc has to run on it. If you don't +# want to use QT4_WRAP_CPP() (which is reliable and mature), you can insert +# #include "foo.moc" +# in foo.cpp and then give foo.cpp as argument to QT4_AUTOMOC(). This will the +# scan all listed files at cmake-time for such included moc files and if it finds +# them cause a rule to be generated to run moc at build time on the +# accompanying header file foo.h. +# If a source file has the SKIP_AUTOMOC property set it will be ignored by this macro. +# +# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename) +# create a the interface header and implementation files with the +# given basename from the given interface xml file and add it to +# the list of sources +# +# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... ) +# create the interface header and implementation files +# for all listed interface xml files +# the name will be automatically determined from the name of the xml file +# +# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] ) +# create a dbus adaptor (header and implementation file) from the xml file +# describing the interface, and add it to the list of sources. The adaptor +# forwards the calls to a parent class, defined in parentheader and named +# parentclassname. The name of the generated files will be +# adaptor.{cpp,h} where basename is the basename of the xml file. +# +# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] ) +# generate the xml interface file from the given header. +# If the optional argument interfacename is omitted, the name of the +# interface file is constructed from the basename of the header with +# the suffix .xml appended. +# +# macro QT4_CREATE_TRANSLATION( qm_files sources ... ts_files ... ) +# out: qm_files +# in: sources ts_files +# generates commands to create .ts (vie lupdate) and .qm +# (via lrelease) - files from sources. The ts files are +# created and/or updated in the source tree (unless given with full paths). +# The qm files are generated in the build tree. +# Updating the translations can be done by adding the qm_files +# to the source list of your library/executable, so they are +# always updated, or by adding a custom target to control when +# they get updated/generated. +# +# macro QT4_ADD_TRANSLATION( qm_files ts_files ... ) +# out: qm_files +# in: ts_files +# generates commands to create .qm from .ts - files. The generated +# filenames can be found in qm_files. The ts_files +# must exists and are not updated in any way. +# +# +# QT_FOUND If false, don't try to use Qt. +# QT4_FOUND If false, don't try to use Qt 4. +# +# QT_VERSION_MAJOR The major version of Qt found. +# QT_VERSION_MINOR The minor version of Qt found. +# QT_VERSION_PATCH The patch version of Qt found. +# +# QT_EDITION Set to the edition of Qt (i.e. DesktopLight) +# QT_EDITION_DESKTOPLIGHT True if QT_EDITION == DesktopLight +# QT_QTCORE_FOUND True if QtCore was found. +# QT_QTGUI_FOUND True if QtGui was found. +# QT_QT3SUPPORT_FOUND True if Qt3Support was found. +# QT_QTASSISTANT_FOUND True if QtAssistant was found. +# QT_QTDBUS_FOUND True if QtDBus was found. +# QT_QTDESIGNER_FOUND True if QtDesigner was found. +# QT_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found. +# QT_QTMOTIF_FOUND True if QtMotif was found. +# QT_QTNETWORK_FOUND True if QtNetwork was found. +# QT_QTNSPLUGIN_FOUND True if QtNsPlugin was found. +# QT_QTOPENGL_FOUND True if QtOpenGL was found. +# QT_QTSQL_FOUND True if QtSql was found. +# QT_QTXML_FOUND True if QtXml was found. +# QT_QTSVG_FOUND True if QtSvg was found. +# QT_QTSCRIPT_FOUND True if QtScript was found. +# QT_QTTEST_FOUND True if QtTest was found. +# QT_QTUITOOLS_FOUND True if QtUiTools was found. +# QT_QTASSISTANTCLIENT_FOUND True if QtAssistantClient was found. +# QT_QTHELP_FOUND True if QtHelp was found. +# QT_QTWEBKIT_FOUND True if QtWebKit was found. +# QT_QTXMLPATTERNS_FOUND True if QtXmlPatterns was found. +# QT_PHONON_FOUND True if phonon was found. +# +# +# QT_DEFINITIONS Definitions to use when compiling code that uses Qt. +# You do not need to use this if you include QT_USE_FILE. +# The QT_USE_FILE will also define QT_DEBUG and QT_NO_DEBUG +# to fit your current build type. Those are not contained +# in QT_DEFINITIONS. +# +# QT_INCLUDES List of paths to all include directories of +# Qt4 QT_INCLUDE_DIR and QT_QTCORE_INCLUDE_DIR are +# always in this variable even if NOTFOUND, +# all other INCLUDE_DIRS are +# only added if they are found. +# You do not need to use this if you include QT_USE_FILE. +# +# +# Include directories for the Qt modules are listed here. +# You do not need to use these variables if you include QT_USE_FILE. +# +# QT_INCLUDE_DIR Path to "include" of Qt4 +# QT_QT_INCLUDE_DIR Path to "include/Qt" +# QT_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support" +# QT_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant" +# QT_QTCORE_INCLUDE_DIR Path to "include/QtCore" +# QT_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner" +# QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner" +# QT_QTDBUS_INCLUDE_DIR Path to "include/QtDBus" +# QT_QTGUI_INCLUDE_DIR Path to "include/QtGui" +# QT_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif" +# QT_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork" +# QT_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin" +# QT_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL" +# QT_QTSQL_INCLUDE_DIR Path to "include/QtSql" +# QT_QTXML_INCLUDE_DIR Path to "include/QtXml" +# QT_QTSVG_INCLUDE_DIR Path to "include/QtSvg" +# QT_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript" +# QT_QTTEST_INCLUDE_DIR Path to "include/QtTest" +# QT_QTASSISTANTCLIENT_INCLUDE_DIR Path to "include/QtAssistant" +# QT_QTHELP_INCLUDE_DIR Path to "include/QtHelp" +# QT_QTWEBKIT_INCLUDE_DIR Path to "include/QtWebKit" +# QT_QTXMLPATTERNS_INCLUDE_DIR Path to "include/QtXmlPatterns" +# QT_PHONON_INCLUDE_DIR Path to "include/phonon" +# +# QT_LIBRARY_DIR Path to "lib" of Qt4 +# +# QT_PLUGINS_DIR Path to "plugins" for Qt4 +# +# +# The Qt toolkit may contain both debug and release libraries. +# In that case, the following library variables will contain both. +# You do not need to use these variables if you include QT_USE_FILE, +# and use QT_LIBRARIES. +# +# QT_QT3SUPPORT_LIBRARY The Qt3Support library +# QT_QTASSISTANT_LIBRARY The QtAssistant library +# QT_QTCORE_LIBRARY The QtCore library +# QT_QTDBUS_LIBRARY The QtDBus library +# QT_QTDESIGNER_LIBRARY The QtDesigner library +# QT_QTDESIGNERCOMPONENTS_LIBRARY The QtDesignerComponents library +# QT_QTGUI_LIBRARY The QtGui library +# QT_QTMOTIF_LIBRARY The QtMotif library +# QT_QTNETWORK_LIBRARY The QtNetwork library +# QT_QTNSPLUGIN_LIBRARY The QtNsPLugin library +# QT_QTOPENGL_LIBRARY The QtOpenGL library +# QT_QTSQL_LIBRARY The QtSql library +# QT_QTXML_LIBRARY The QtXml library +# QT_QTSVG_LIBRARY The QtSvg library +# QT_QTSCRIPT_LIBRARY The QtScript library +# QT_QTTEST_LIBRARY The QtTest library +# QT_QTMAIN_LIBRARY The qtmain library for Windows +# QT_QTUITOOLS_LIBRARY The QtUiTools library +# QT_QTASSISTANTCLIENT_LIBRARY The QtAssistantClient library +# QT_QTHELP_LIBRARY The QtHelp library +# QT_QTWEBKIT_LIBRARY The QtWebKit library +# QT_QTXMLPATTERNS_LIBRARY The QtXmlPatterns library +# QT_PHONON_LIBRARY The phonon library +# +# also defined, but NOT for general use are +# QT_MOC_EXECUTABLE Where to find the moc tool. +# QT_UIC_EXECUTABLE Where to find the uic tool. +# QT_UIC3_EXECUTABLE Where to find the uic3 tool. +# QT_RCC_EXECUTABLE Where to find the rcc tool +# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool. +# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool. +# QT_LUPDATE_EXECUTABLE Where to find the lupdate tool. +# QT_LRELEASE_EXECUTABLE Where to find the lrelease tool. +# +# QT_DOC_DIR Path to "doc" of Qt4 +# QT_MKSPECS_DIR Path to "mkspecs" of Qt4 +# +# +# These are around for backwards compatibility +# they will be set +# QT_WRAP_CPP Set true if QT_MOC_EXECUTABLE is found +# QT_WRAP_UI Set true if QT_UIC_EXECUTABLE is found +# +# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake) +# QT_MT_REQUIRED Qt4 is now always multithreaded +# +# These variables are set to "" Because Qt structure changed +# (They make no sense in Qt4) +# QT_QT_LIBRARY Qt-Library is now split + +INCLUDE(CheckSymbolExists) +INCLUDE(MacroAddFileDependencies) + +SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake) + +SET( QT_DEFINITIONS "") + +SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE) + +# macro for asking qmake to process pro files +MACRO(QT_QUERY_QMAKE outvar invar) + FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro + "message(CMAKE_MESSAGE<$$${invar}>)") + + # Invoke qmake with the tmp.pro program to get the desired + # information. Use the same variable for both stdout and stderr + # to make sure we get the output on all platforms. + EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE} + WORKING_DIRECTORY + ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake + OUTPUT_VARIABLE _qmake_query_output + RESULT_VARIABLE _qmake_result + ERROR_VARIABLE _qmake_query_output ) + + FILE(REMOVE_RECURSE + "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake") + + IF(_qmake_result) + MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}") + ELSE(_qmake_result) + STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}") + ENDIF(_qmake_result) + +ENDMACRO(QT_QUERY_QMAKE) + +GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME) +# check for qmake +FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin" + $ENV{QTDIR}/bin +) + +IF (QT_QMAKE_EXECUTABLE) + + SET(QT4_QMAKE_FOUND FALSE) + + EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION) + + # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path + IF("${QTVERSION}" MATCHES "Unknown") + SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE) + FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" + "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" + $ENV{QTDIR}/bin + ) + IF(QT_QMAKE_EXECUTABLE) + EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION) + ENDIF(QT_QMAKE_EXECUTABLE) + ENDIF("${QTVERSION}" MATCHES "Unknown") + + # check that we found the Qt4 qmake, Qt3 qmake output won't match here + STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}") + IF (qt_version_tmp) + + # we need at least version 4.0.0 + IF (NOT QT_MIN_VERSION) + SET(QT_MIN_VERSION "4.0.0") + ENDIF (NOT QT_MIN_VERSION) + + #now parse the parts of the user given version string into variables + STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT_MIN_VERSION}") + IF (NOT req_qt_major_vers) + MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", expected e.g. \"4.0.1\"") + ENDIF (NOT req_qt_major_vers) + + # now parse the parts of the user given version string into variables + STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT_MIN_VERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT_MIN_VERSION}") + + IF (NOT req_qt_major_vers EQUAL 4) + MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"") + ENDIF (NOT req_qt_major_vers EQUAL 4) + + # and now the version string given by qmake + STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${QTVERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${QTVERSION}") + STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${QTVERSION}") + + # compute an overall version number which can be compared at once + MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}") + MATH(EXPR found_vers "${QT_VERSION_MAJOR}*10000 + ${QT_VERSION_MINOR}*100 + ${QT_VERSION_PATCH}") + + IF (found_vers LESS req_vers) + SET(QT4_QMAKE_FOUND FALSE) + SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE) + ELSE (found_vers LESS req_vers) + SET(QT4_QMAKE_FOUND TRUE) + ENDIF (found_vers LESS req_vers) + ENDIF (qt_version_tmp) + +ENDIF (QT_QMAKE_EXECUTABLE) + +IF (QT4_QMAKE_FOUND) + + # ask qmake for the library dir + # Set QT_LIBRARY_DIR + IF (NOT QT_LIBRARY_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_LIBS" + OUTPUT_VARIABLE QT_LIBRARY_DIR_TMP ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${QT_LIBRARY_DIR_TMP}" QT_LIBRARY_DIR_TMP) + IF(EXISTS "${QT_LIBRARY_DIR_TMP}") + SET(QT_LIBRARY_DIR ${QT_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir") + ELSE(EXISTS "${QT_LIBRARY_DIR_TMP}") + MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT_LIBRARY_DIR_TMP}") + MESSAGE("Warning: ${QT_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.") + ENDIF(EXISTS "${QT_LIBRARY_DIR_TMP}") + ENDIF(NOT QT_LIBRARY_DIR) + + IF (APPLE) + IF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + SET(QT_USE_FRAMEWORKS ON + CACHE BOOL "Set to ON if Qt build uses frameworks.") + ELSE (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + SET(QT_USE_FRAMEWORKS OFF + CACHE BOOL "Set to ON if Qt build uses frameworks.") + ENDIF (EXISTS ${QT_LIBRARY_DIR}/QtCore.framework) + + MARK_AS_ADVANCED(QT_USE_FRAMEWORKS) + ENDIF (APPLE) + + # ask qmake for the binary dir + IF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) + EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_BINS" + OUTPUT_VARIABLE qt_bins ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${qt_bins}" qt_bins) + SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "") + ENDIF (QT_LIBRARY_DIR AND NOT QT_BINARY_DIR) + + # ask qmake for the include dir + IF (QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_HEADERS" + OUTPUT_VARIABLE qt_headers ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${qt_headers}" qt_headers) + SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "") + ENDIF(QT_LIBRARY_DIR AND NOT QT_HEADERS_DIR) + + + # ask qmake for the documentation directory + IF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_DOCS" + OUTPUT_VARIABLE qt_doc_dir ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${qt_doc_dir}" qt_doc_dir) + SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs") + ENDIF (QT_LIBRARY_DIR AND NOT QT_DOC_DIR) + + # ask qmake for the mkspecs directory + IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QMAKE_MKSPECS" + OUTPUT_VARIABLE qt_mkspecs_dirs ) + # do not replace : on windows as it might be a drive letter + # and windows should already use ; as a separator + IF(UNIX) + STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}") + ENDIF(UNIX) + FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs} + DOC "The location of the Qt mkspecs containing qconfig.pri" + NO_DEFAULT_PATH ) + ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR) + + # ask qmake for the plugins directory + IF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) + EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE} + ARGS "-query QT_INSTALL_PLUGINS" + OUTPUT_VARIABLE qt_plugins_dir ) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH "${qt_plugins_dir}" qt_plugins_dir) + SET(QT_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins") + ENDIF (QT_LIBRARY_DIR AND NOT QT_PLUGINS_DIR) + ######################################## + # + # Setting the INCLUDE-Variables + # + ######################################## + + FIND_PATH(QT_QTCORE_INCLUDE_DIR QtGlobal + ${QT_HEADERS_DIR}/QtCore + ${QT_LIBRARY_DIR}/QtCore.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_INCLUDE_DIR by removine "/QtCore" in the string ${QT_QTCORE_INCLUDE_DIR} + IF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) + IF (QT_USE_FRAMEWORKS) + SET(QT_INCLUDE_DIR ${QT_HEADERS_DIR}) + ELSE (QT_USE_FRAMEWORKS) + STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT_QTCORE_INCLUDE_DIR}) + SET( QT_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "") + ENDIF (QT_USE_FRAMEWORKS) + ENDIF( QT_QTCORE_INCLUDE_DIR AND NOT QT_INCLUDE_DIR) + + IF( NOT QT_INCLUDE_DIR) + IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header") + ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + ENDIF( NOT QT_INCLUDE_DIR) + + ############################################# + # + # Find out what window system we're using + # + ############################################# + # Save required variable + SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) + SET(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS}) + # Add QT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES + SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT_INCLUDE_DIR}") + # On Mac OS X when Qt has framework support, also add the framework path + IF( QT_USE_FRAMEWORKS ) + SET(CMAKE_REQUIRED_FLAGS "-F${QT_LIBRARY_DIR} ") + ENDIF( QT_USE_FRAMEWORKS ) + # Check for Window system symbols (note: only one should end up being set) + CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11) + CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN) + CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS) + CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC) + + IF (QT_QTCOPY_REQUIRED) + CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY) + IF (NOT QT_IS_QTCOPY) + MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found") + ENDIF (NOT QT_IS_QTCOPY) + ENDIF (QT_QTCOPY_REQUIRED) + + # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables + SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) + SET(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE}) + # + ############################################# + + IF (QT_USE_FRAMEWORKS) + SET(QT_DEFINITIONS ${QT_DEFINITIONS} -F${QT_LIBRARY_DIR} -L${QT_LIBRARY_DIR} ) + ENDIF (QT_USE_FRAMEWORKS) + + # Set QT_QT3SUPPORT_INCLUDE_DIR + FIND_PATH(QT_QT3SUPPORT_INCLUDE_DIR Qt3Support + PATHS + ${QT_INCLUDE_DIR}/Qt3Support + ${QT_LIBRARY_DIR}/Qt3Support.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QT_INCLUDE_DIR + FIND_PATH(QT_QT_INCLUDE_DIR qglobal.h + PATHS + ${QT_INCLUDE_DIR}/Qt + ${QT_LIBRARY_DIR}/QtCore.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTGUI_INCLUDE_DIR + FIND_PATH(QT_QTGUI_INCLUDE_DIR QtGui + PATHS + ${QT_INCLUDE_DIR}/QtGui + ${QT_LIBRARY_DIR}/QtGui.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTSVG_INCLUDE_DIR + FIND_PATH(QT_QTSVG_INCLUDE_DIR QtSvg + PATHS + ${QT_INCLUDE_DIR}/QtSvg + ${QT_LIBRARY_DIR}/QtSvg.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTSCRIPT_INCLUDE_DIR + FIND_PATH(QT_QTSCRIPT_INCLUDE_DIR QtScript + PATHS + ${QT_INCLUDE_DIR}/QtScript + ${QT_LIBRARY_DIR}/QtScript.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTTEST_INCLUDE_DIR + FIND_PATH(QT_QTTEST_INCLUDE_DIR QtTest + PATHS + ${QT_INCLUDE_DIR}/QtTest + ${QT_LIBRARY_DIR}/QtTest.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTUITOOLS_INCLUDE_DIR + FIND_PATH(QT_QTUITOOLS_INCLUDE_DIR QtUiTools + PATHS + ${QT_INCLUDE_DIR}/QtUiTools + ${QT_LIBRARY_DIR}/QtUiTools.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTMOTIF_INCLUDE_DIR + IF(Q_WS_X11) + FIND_PATH(QT_QTMOTIF_INCLUDE_DIR QtMotif + PATHS + ${QT_INCLUDE_DIR}/QtMotif + NO_DEFAULT_PATH ) + ENDIF(Q_WS_X11) + + # Set QT_QTNETWORK_INCLUDE_DIR + FIND_PATH(QT_QTNETWORK_INCLUDE_DIR QtNetwork + PATHS + ${QT_INCLUDE_DIR}/QtNetwork + ${QT_LIBRARY_DIR}/QtNetwork.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTNSPLUGIN_INCLUDE_DIR + FIND_PATH(QT_QTNSPLUGIN_INCLUDE_DIR QtNsPlugin + PATHS + ${QT_INCLUDE_DIR}/QtNsPlugin + ${QT_LIBRARY_DIR}/QtNsPlugin.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTOPENGL_INCLUDE_DIR + FIND_PATH(QT_QTOPENGL_INCLUDE_DIR QtOpenGL + PATHS + ${QT_INCLUDE_DIR}/QtOpenGL + ${QT_LIBRARY_DIR}/QtOpenGL.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTSQL_INCLUDE_DIR + FIND_PATH(QT_QTSQL_INCLUDE_DIR QtSql + PATHS + ${QT_INCLUDE_DIR}/QtSql + ${QT_LIBRARY_DIR}/QtSql.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTXML_INCLUDE_DIR + FIND_PATH(QT_QTXML_INCLUDE_DIR QtXml + PATHS + ${QT_INCLUDE_DIR}/QtXml + ${QT_LIBRARY_DIR}/QtXml.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTASSISTANT_INCLUDE_DIR + FIND_PATH(QT_QTASSISTANT_INCLUDE_DIR QtAssistant + PATHS + ${QT_INCLUDE_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTDESIGNER_INCLUDE_DIR + FIND_PATH(QT_QTDESIGNER_INCLUDE_DIR QDesignerComponents + PATHS + ${QT_INCLUDE_DIR}/QtDesigner + ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR + FIND_PATH(QT_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents + PATHS + ${QT_INCLUDE_DIR}/QtDesigner + ${QT_LIBRARY_DIR}/QtDesigner.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTDBUS_INCLUDE_DIR + FIND_PATH(QT_QTDBUS_INCLUDE_DIR QtDBus + PATHS + ${QT_INCLUDE_DIR}/QtDBus + ${QT_LIBRARY_DIR}/QtDBus.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTASSISTANTCLIENT_INCLUDE_DIR + FIND_PATH(QT_QTASSISTANTCLIENT_INCLUDE_DIR QAssistantClient + PATHS + ${QT_INCLUDE_DIR}/QtAssistant + ${QT_LIBRARY_DIR}/QtAssistant.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTHELP_INCLUDE_DIR + FIND_PATH(QT_QTHELP_INCLUDE_DIR QtHelp + PATHS + ${QT_INCLUDE_DIR}/QtHelp + ${QT_LIBRARY_DIR}/QtHelp.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTWEBKIT_INCLUDE_DIR + FIND_PATH(QT_QTWEBKIT_INCLUDE_DIR QtWebKit + PATHS + ${QT_INCLUDE_DIR}/QtWebKit + ${QT_LIBRARY_DIR}/QtWebKit.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_QTXMLPATTERNS_INCLUDE_DIR + FIND_PATH(QT_QTXMLPATTERNS_INCLUDE_DIR QtXmlPatterns + PATHS + ${QT_INCLUDE_DIR}/QtXmlPatterns + ${QT_LIBRARY_DIR}/QtXmlPatterns.framework/Headers + NO_DEFAULT_PATH + ) + + # Set QT_PHONON_INCLUDE_DIR + FIND_PATH(QT_PHONON_INCLUDE_DIR phonon + PATHS + ${QT_INCLUDE_DIR}/phonon + ${QT_LIBRARY_DIR}/phonon.framework/Headers + NO_DEFAULT_PATH + ) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED( QT_LIBRARY_DIR QT_INCLUDE_DIR QT_QT_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT_PLUGINS_DIR) + + # Set QT_INCLUDES + SET( QT_INCLUDES ${QT_QT_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT_INCLUDE_DIR} ) + + # Set QT_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename + FIND_LIBRARY(QT_QTCORE_LIBRARY_RELEASE NAMES QtCore QtCore4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH ) + FIND_LIBRARY(QT_QTCORE_LIBRARY_DEBUG NAMES QtCore_debug QtCored QtCored4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QT3SUPPORT_LIBRARY + FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support Qt3Support4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Support_debug Qt3Supportd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTGUI_LIBRARY + FIND_LIBRARY(QT_QTGUI_LIBRARY_RELEASE NAMES QtGui QtGui4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTGUI_LIBRARY_DEBUG NAMES QtGui_debug QtGuid4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTMOTIF_LIBRARY + IF(Q_WS_X11) + FIND_LIBRARY(QT_QTMOTIF_LIBRARY_RELEASE NAMES QtMotif PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTMOTIF_LIBRARY_DEBUG NAMES QtMotif_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + ENDIF(Q_WS_X11) + + # Set QT_QTNETWORK_LIBRARY + FIND_LIBRARY(QT_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork QtNetwork4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTNETWORK_LIBRARY_DEBUG NAMES QtNetwork_debug QtNetworkd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTNSPLUGIN_LIBRARY + FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_RELEASE NAMES QtNsPlugin PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTNSPLUGIN_LIBRARY_DEBUG NAMES QtNsPlugin_debug PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTOPENGL_LIBRARY + FIND_LIBRARY(QT_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL QtOpenGL4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGL_debug QtOpenGLd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSQL_LIBRARY + FIND_LIBRARY(QT_QTSQL_LIBRARY_RELEASE NAMES QtSql QtSql4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSQL_LIBRARY_DEBUG NAMES QtSql_debug QtSqld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTXML_LIBRARY + FIND_LIBRARY(QT_QTXML_LIBRARY_RELEASE NAMES QtXml QtXml4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTXML_LIBRARY_DEBUG NAMES QtXml_debug QtXmld4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSVG_LIBRARY + FIND_LIBRARY(QT_QTSVG_LIBRARY_RELEASE NAMES QtSvg QtSvg4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSVG_LIBRARY_DEBUG NAMES QtSvg_debug QtSvgd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTUITOOLS_LIBRARY + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_DEBUG NAMES QtUiTools_debug QtUiToolsd QtUiToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + # QtUiTools not with other frameworks with binary installation (in /usr/lib) + IF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) + FIND_LIBRARY(QT_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools PATHS ${QT_LIBRARY_DIR}) + ENDIF(Q_WS_MAC AND QT_QTCORE_LIBRARY_RELEASE AND NOT QT_QTUITOOLS_LIBRARY_RELEASE) + + # Set QT_QTTEST_LIBRARY + FIND_LIBRARY(QT_QTTEST_LIBRARY_RELEASE NAMES QtTest QtTest4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTTEST_LIBRARY_DEBUG NAMES QtTest_debug QtTest_debug4 QtTestd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTDBUS_LIBRARY + # This was introduced with Qt 4.2, where also the naming scheme for debug libs was changed + # So does any of the debug lib names listed here actually exist ? + FIND_LIBRARY(QT_QTDBUS_LIBRARY_RELEASE NAMES QtDBus QtDBus4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTDBUS_LIBRARY_DEBUG NAMES QtDBus_debug QtDBus_debug4 QtDBusd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTSCRIPT_LIBRARY + FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript_debug QtScriptd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + IF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) + IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.") + ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED) + ENDIF( NOT QT_QTCORE_LIBRARY_DEBUG AND NOT QT_QTCORE_LIBRARY_RELEASE ) + + # Set QT_QTASSISTANT_LIBRARY + FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClientd QtAssistantClientd4 QtAssistantClient_debug QtAssistant_debug QtAssistantd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTDESIGNER_LIBRARY + FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner QtDesigner4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesigner_debug QtDesignerd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTDESIGNERCOMPONENTS_LIBRARY + FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents QtDesignerComponents4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponents_debug QtDesignerComponentsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTMAIN_LIBRARY + IF(WIN32) + FIND_LIBRARY(QT_QTMAIN_LIBRARY_RELEASE NAMES qtmain PATHS ${QT_LIBRARY_DIR} + NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmaind PATHS ${QT_LIBRARY_DIR} + NO_DEFAULT_PATH) + ENDIF(WIN32) + + # Set QT_QTASSISTANTCLIENT_LIBRARY + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_RELEASE NAMES QtAssistantClient QtAssistantClient4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTASSISTANTCLIENT_LIBRARY_DEBUG NAMES QtAssistantClient_debug QtAssistantClientd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTHELP_LIBRARY + FIND_LIBRARY(QT_QTHELP_LIBRARY_RELEASE NAMES QtHelp QtHelp4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTHELP_LIBRARY_DEBUG NAMES QtHelp_debug QtHelpd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_RELEASE NAMES QtCLucene QtCLucene4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTCLUCENE_LIBRARY_DEBUG NAMES QtCLucene_debug QtCLucened4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTWEBKIT_LIBRARY + FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_RELEASE NAMES QtWebKit QtWebKit4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTWEBKIT_LIBRARY_DEBUG NAMES QtWebKit_debug QtWebKitd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_QTXMLPATTERNS_LIBRARY + FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_RELEASE NAMES QtXmlPatterns QtXmlPatterns4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_QTXMLPATTERNS_LIBRARY_DEBUG NAMES QtXmlPatterns_debug QtXmlPatternsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + # Set QT_PHONON_LIBRARY + FIND_LIBRARY(QT_PHONON_LIBRARY_RELEASE NAMES phonon phonon4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + FIND_LIBRARY(QT_PHONON_LIBRARY_DEBUG NAMES phonon_debug phonond4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH) + + ############################################ + # + # Check the existence of the libraries. + # + ############################################ + + MACRO (_QT4_ADJUST_LIB_VARS basename) + IF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + # if only the release version was found, set the debug variable also to the release version + IF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + SET(QT_${basename}_LIBRARY_DEBUG ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_RELEASE}) + ENDIF (QT_${basename}_LIBRARY_RELEASE AND NOT QT_${basename}_LIBRARY_DEBUG) + + # if only the debug version was found, set the release variable also to the debug version + IF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + SET(QT_${basename}_LIBRARY_RELEASE ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_DEBUG}) + SET(QT_${basename}_LIBRARIES ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND NOT QT_${basename}_LIBRARY_RELEASE) + + IF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + # if the generator supports configuration types then set + # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value + IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARY optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + # if there are no configuration types and CMAKE_BUILD_TYPE has no value + # then just use the release libraries + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY_RELEASE} ) + ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE) + SET(QT_${basename}_LIBRARIES optimized ${QT_${basename}_LIBRARY_RELEASE} debug ${QT_${basename}_LIBRARY_DEBUG}) + ENDIF (QT_${basename}_LIBRARY_DEBUG AND QT_${basename}_LIBRARY_RELEASE) + + SET(QT_${basename}_LIBRARY ${QT_${basename}_LIBRARY} CACHE FILEPATH "The Qt ${basename} library") + + IF (QT_${basename}_LIBRARY) + SET(QT_${basename}_FOUND 1) + ENDIF (QT_${basename}_LIBRARY) + + ENDIF (QT_${basename}_LIBRARY_RELEASE OR QT_${basename}_LIBRARY_DEBUG) + + IF (QT_${basename}_INCLUDE_DIR) + #add the include directory to QT_INCLUDES + SET(QT_INCLUDES "${QT_${basename}_INCLUDE_DIR}" ${QT_INCLUDES}) + ENDIF (QT_${basename}_INCLUDE_DIR) + + # Make variables changeble to the advanced user + MARK_AS_ADVANCED(QT_${basename}_LIBRARY QT_${basename}_LIBRARY_RELEASE QT_${basename}_LIBRARY_DEBUG QT_${basename}_INCLUDE_DIR) + ENDMACRO (_QT4_ADJUST_LIB_VARS) + + + # Set QT_xyz_LIBRARY variable and add + # library include path to QT_INCLUDES + _QT4_ADJUST_LIB_VARS(QTCORE) + _QT4_ADJUST_LIB_VARS(QTGUI) + _QT4_ADJUST_LIB_VARS(QT3SUPPORT) + _QT4_ADJUST_LIB_VARS(QTASSISTANT) + _QT4_ADJUST_LIB_VARS(QTDESIGNER) + _QT4_ADJUST_LIB_VARS(QTDESIGNERCOMPONENTS) + _QT4_ADJUST_LIB_VARS(QTNETWORK) + _QT4_ADJUST_LIB_VARS(QTNSPLUGIN) + _QT4_ADJUST_LIB_VARS(QTOPENGL) + _QT4_ADJUST_LIB_VARS(QTSQL) + _QT4_ADJUST_LIB_VARS(QTXML) + _QT4_ADJUST_LIB_VARS(QTSVG) + _QT4_ADJUST_LIB_VARS(QTSCRIPT) + _QT4_ADJUST_LIB_VARS(QTUITOOLS) + _QT4_ADJUST_LIB_VARS(QTTEST) + _QT4_ADJUST_LIB_VARS(QTDBUS) + _QT4_ADJUST_LIB_VARS(QTASSISTANTCLIENT) + _QT4_ADJUST_LIB_VARS(QTHELP) + _QT4_ADJUST_LIB_VARS(QTWEBKIT) + _QT4_ADJUST_LIB_VARS(QTXMLPATTERNS) + _QT4_ADJUST_LIB_VARS(PHONON) + _QT4_ADJUST_LIB_VARS(QTCLUCENE) + + # platform dependent libraries + IF(Q_WS_X11) + _QT4_ADJUST_LIB_VARS(QTMOTIF) + ENDIF(Q_WS_X11) + IF(WIN32) + _QT4_ADJUST_LIB_VARS(QTMAIN) + ENDIF(WIN32) + + + ####################################### + # + # Check the executables of Qt + # ( moc, uic, rcc ) + # + ####################################### + + + # find moc and uic using qmake + QT_QUERY_QMAKE(QT_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC") + QT_QUERY_QMAKE(QT_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC") + + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH + "${QT_MOC_EXECUTABLE_INTERNAL}" QT_MOC_EXECUTABLE_INTERNAL) + # make sure we have / and not \ as qmake gives on windows + FILE(TO_CMAKE_PATH + "${QT_UIC_EXECUTABLE_INTERNAL}" QT_UIC_EXECUTABLE_INTERNAL) + + SET(QT_MOC_EXECUTABLE + ${QT_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable") + SET(QT_UIC_EXECUTABLE + ${QT_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable") + + FIND_PROGRAM(QT_UIC3_EXECUTABLE + NAMES uic3 + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_RCC_EXECUTABLE + NAMES rcc + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE + NAMES qdbuscpp2xml + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE + NAMES qdbusxml2cpp + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_LUPDATE_EXECUTABLE + NAMES lupdate + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + FIND_PROGRAM(QT_LRELEASE_EXECUTABLE + NAMES lrelease + PATHS ${QT_BINARY_DIR} + NO_DEFAULT_PATH + ) + + IF (QT_MOC_EXECUTABLE) + SET(QT_WRAP_CPP "YES") + ENDIF (QT_MOC_EXECUTABLE) + + IF (QT_UIC_EXECUTABLE) + SET(QT_WRAP_UI "YES") + ENDIF (QT_UIC_EXECUTABLE) + + + + MARK_AS_ADVANCED( QT_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT_MOC_EXECUTABLE + QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE + QT_LUPDATE_EXECUTABLE QT_LRELEASE_EXECUTABLE) + + ###################################### + # + # Macros for building Qt files + # + ###################################### + + MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options) + SET(${_qt4_files}) + SET(${_qt4_options}) + SET(_QT4_DOING_OPTIONS FALSE) + FOREACH(_currentArg ${ARGN}) + IF ("${_currentArg}" STREQUAL "OPTIONS") + SET(_QT4_DOING_OPTIONS TRUE) + ELSE ("${_currentArg}" STREQUAL "OPTIONS") + IF(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_options} "${_currentArg}") + ELSE(_QT4_DOING_OPTIONS) + LIST(APPEND ${_qt4_files} "${_currentArg}") + ENDIF(_QT4_DOING_OPTIONS) + ENDIF ("${_currentArg}" STREQUAL "OPTIONS") + ENDFOREACH(_currentArg) + ENDMACRO (QT4_EXTRACT_OPTIONS) + + # macro used to create the names of output files preserving relative dirs + MACRO (QT4_MAKE_OUTPUT_FILE infile prefix ext outfile ) + STRING(LENGTH ${CMAKE_CURRENT_BINARY_DIR} _binlength) + STRING(LENGTH ${infile} _infileLength) + SET(_checkinfile ${CMAKE_CURRENT_SOURCE_DIR}) + IF(_infileLength GREATER _binlength) + STRING(SUBSTRING "${infile}" 0 ${_binlength} _checkinfile) + ENDIF(_infileLength GREATER _binlength) + IF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") + FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_BINARY_DIR} ${infile}) + ELSE(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") + FILE(RELATIVE_PATH rel ${CMAKE_CURRENT_SOURCE_DIR} ${infile}) + ENDIF(CMAKE_CURRENT_BINARY_DIR MATCHES "${_checkinfile}") + SET(_outfile "${CMAKE_CURRENT_BINARY_DIR}/${rel}") + GET_FILENAME_COMPONENT(outpath ${_outfile} PATH) + GET_FILENAME_COMPONENT(_outfile ${_outfile} NAME_WE) + FILE(MAKE_DIRECTORY ${outpath}) + SET(${outfile} ${outpath}/${prefix}${_outfile}.${ext}) + ENDMACRO (QT4_MAKE_OUTPUT_FILE ) + + MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS) + SET(${_moc_INC_DIRS}) + GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES) + + FOREACH(_current ${_inc_DIRS}) + SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current}) + ENDFOREACH(_current ${_inc_DIRS}) + + ENDMACRO(QT4_GET_MOC_INC_DIRS) + + # helper macro to set up a moc rule + MACRO (QT4_CREATE_MOC_COMMAND infile outfile moc_includes moc_options) + # For Windows, create a parameters file to work around command line length limit + IF (WIN32) + # Pass the parameters in a file. Set the working directory to + # be that containing the parameters file and reference it by + # just the file name. This is necessary because the moc tool on + # MinGW builds does not seem to handle spaces in the path to the + # file given with the @ syntax. + GET_FILENAME_COMPONENT(_moc_outfile_name "${outfile}" NAME) + GET_FILENAME_COMPONENT(_moc_outfile_dir "${outfile}" PATH) + IF(_moc_outfile_dir) + SET(_moc_working_dir WORKING_DIRECTORY ${_moc_outfile_dir}) + ENDIF(_moc_outfile_dir) + SET (_moc_parameters_file ${outfile}_parameters) + SET (_moc_parameters ${moc_includes} ${moc_options} -o "${outfile}" "${infile}") + FILE (REMOVE ${_moc_parameters_file}) + FOREACH(arg ${_moc_parameters}) + FILE (APPEND ${_moc_parameters_file} "${arg}\n") + ENDFOREACH(arg) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} @${_moc_outfile_name}_parameters + DEPENDS ${infile} + ${_moc_working_dir} + VERBATIM) + ELSE (WIN32) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${moc_includes} ${moc_options} -o ${outfile} ${infile} + DEPENDS ${infile}) + ENDIF (WIN32) + ENDMACRO (QT4_CREATE_MOC_COMMAND) + + + MACRO (QT4_GENERATE_MOC infile outfile ) + QT4_GET_MOC_INC_DIRS(moc_includes) + GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE) + QT4_CREATE_MOC_COMMAND(${abs_infile} ${outfile} "${moc_includes}" "") + SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file + ENDMACRO (QT4_GENERATE_MOC) + + + # QT4_WRAP_CPP(outfiles inputfile ... ) + + MACRO (QT4_WRAP_CPP outfiles ) + # get include dirs + QT4_GET_MOC_INC_DIRS(moc_includes) + QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN}) + + FOREACH (it ${moc_files}) + GET_FILENAME_COMPONENT(it ${it} ABSOLUTE) + QT4_MAKE_OUTPUT_FILE(${it} moc_ cxx outfile) + QT4_CREATE_MOC_COMMAND(${it} ${outfile} "${moc_includes}" "${moc_options}") + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH(it) + + ENDMACRO (QT4_WRAP_CPP) + + + # QT4_WRAP_UI(outfiles inputfile ... ) + + MACRO (QT4_WRAP_UI outfiles ) + QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN}) + + FOREACH (it ${ui_files}) + GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) + GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) + SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_UIC_EXECUTABLE} + ARGS ${ui_options} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile}) + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH (it) + + ENDMACRO (QT4_WRAP_UI) + + + # QT4_ADD_RESOURCES(outfiles inputfile ... ) + + MACRO (QT4_ADD_RESOURCES outfiles ) + QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN}) + + FOREACH (it ${rcc_files}) + GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE) + GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE) + GET_FILENAME_COMPONENT(rc_path ${infile} PATH) + SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx) + # parse file for dependencies + # all files are absolute paths or relative to the location of the qrc file + FILE(READ "${infile}" _RC_FILE_CONTENTS) + STRING(REGEX MATCHALL "]*>" "" _RC_FILE "${_RC_FILE}") + STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}") + IF(NOT _ABS_PATH_INDICATOR) + SET(_RC_FILE "${rc_path}/${_RC_FILE}") + ENDIF(NOT _ABS_PATH_INDICATOR) + SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}") + ENDFOREACH(_RC_FILE) + ADD_CUSTOM_COMMAND(OUTPUT ${outfile} + COMMAND ${QT_RCC_EXECUTABLE} + ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile} + MAIN_DEPENDENCY ${infile} + DEPENDS ${_RC_DEPENDS}) + SET(${outfiles} ${${outfiles}} ${outfile}) + ENDFOREACH (it) + + ENDMACRO (QT4_ADD_RESOURCES) + + MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename) + GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -p ${_basename} ${_infile} + DEPENDS ${_infile}) + + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + + QT4_GENERATE_MOC(${_header} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + + ENDMACRO(QT4_ADD_DBUS_INTERFACE) + + + MACRO(QT4_ADD_DBUS_INTERFACES _sources) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE) + # get the part before the ".xml" suffix + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE}) + STRING(TOLOWER ${_basename} _basename) + QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_ADD_DBUS_INTERFACES) + + + MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName ) + SET(_customName "${ARGV1}") + GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE) + + IF (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName}) + ELSE (_customName) + SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml) + ENDIF (_customName) + + ADD_CUSTOM_COMMAND(OUTPUT ${_target} + COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_in_file} > ${_target} + DEPENDS ${_in_file} + ) + ENDMACRO(QT4_GENERATE_DBUS_INTERFACE) + + + MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename ) + GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE) + + SET(_optionalBasename "${ARGV4}") + IF (_optionalBasename) + SET(_basename ${_optionalBasename} ) + ELSE (_optionalBasename) + STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile}) + STRING(TOLOWER ${_basename} _basename) + ENDIF (_optionalBasename) + + SET(_optionalClassName "${ARGV5}") + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc) + + IF(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ELSE(_optionalClassName) + ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header} + COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile} + DEPENDS ${_infile} + ) + ENDIF(_optionalClassName) + + QT4_GENERATE_MOC(${_header} ${_moc}) + SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE) + MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc}) + + SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc}) + ENDMACRO(QT4_ADD_DBUS_ADAPTOR) + + MACRO(QT4_AUTOMOC) + QT4_GET_MOC_INC_DIRS(_moc_INCS) + + SET(_matching_FILES ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # This is required to make uic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) + + IF ( NOT _skip AND EXISTS ${_abs_FILE} ) + + FILE(READ ${_abs_FILE} _contents) + + GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) + + STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") + IF(_match) + FOREACH (_current_MOC_INC ${_match}) + STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") + GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) + SET(_header ${_abs_PATH}/${_basename}.h) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) + QT4_CREATE_MOC_COMMAND(${_header} ${_moc} "${_moc_INCS}" "") + MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) + ENDFOREACH (_current_MOC_INC) + ENDIF(_match) + ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} ) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_AUTOMOC) + + MACRO(QT4_CREATE_TRANSLATION _qm_files) + SET(_my_sources) + SET(_my_tsfiles) + FOREACH (_file ${ARGN}) + GET_FILENAME_COMPONENT(_ext ${_file} EXT) + GET_FILENAME_COMPONENT(_abs_FILE ${_file} ABSOLUTE) + IF(_ext MATCHES "ts") + LIST(APPEND _my_tsfiles ${_abs_FILE}) + ELSE(_ext MATCHES "ts") + LIST(APPEND _my_sources ${_abs_FILE}) + ENDIF(_ext MATCHES "ts") + ENDFOREACH(_file) + FOREACH(_ts_file ${_my_tsfiles}) + ADD_CUSTOM_COMMAND(OUTPUT ${_ts_file} + COMMAND ${QT_LUPDATE_EXECUTABLE} + ARGS ${_my_sources} -ts ${_ts_file} + DEPENDS ${_my_sources}) + ENDFOREACH(_ts_file) + QT4_ADD_TRANSLATION(${_qm_files} ${_my_tsfiles}) + ENDMACRO(QT4_CREATE_TRANSLATION) + + MACRO(QT4_ADD_TRANSLATION _qm_files) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(qm ${_abs_FILE} NAME_WE) + SET(qm "${CMAKE_CURRENT_BINARY_DIR}/${qm}.qm") + + ADD_CUSTOM_COMMAND(OUTPUT ${qm} + COMMAND ${QT_LRELEASE_EXECUTABLE} + ARGS ${_abs_FILE} -qm ${qm} + DEPENDS ${_abs_FILE} + ) + SET(${_qm_files} ${${_qm_files}} ${qm}) + ENDFOREACH (_current_FILE) + ENDMACRO(QT4_ADD_TRANSLATION) + + + + + + ###################################### + # + # decide if Qt got found + # + ###################################### + + # if the includes,libraries,moc,uic and rcc are found then we have it + IF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE) + SET( QT4_FOUND "YES" ) + INCLUDE(FindPackageMessage) + FIND_PACKAGE_MESSAGE(Qt4 "Found Qt-Version ${QTVERSION}" + "[${QT_LIBRARY_DIR}][${QT_INCLUDE_DIR}][${QT_MOC_EXECUTABLE}][${QT_UIC_EXECUTABLE}][${QT_RCC_EXECUTABLE}]") + ELSE( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE) + SET( QT4_FOUND "NO") + SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) + IF( Qt4_FIND_REQUIRED) + MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!") + ENDIF( Qt4_FIND_REQUIRED) + ENDIF( QT_LIBRARY_DIR AND QT_INCLUDE_DIR AND QT_MOC_EXECUTABLE AND QT_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE) + SET(QT_FOUND ${QT4_FOUND}) + + + ####################################### + # + # Qt configuration + # + ####################################### + IF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") + FILE(READ ${QT_MKSPECS_DIR}/qconfig.pri _qconfig_FILE_contents) + STRING(REGEX MATCH "QT_CONFIG[^\n]+" QT_QCONFIG ${_qconfig_FILE_contents}) + STRING(REGEX MATCH "CONFIG[^\n]+" QT_CONFIG ${_qconfig_FILE_contents}) + STRING(REGEX MATCH "EDITION[^\n]+" QT_EDITION ${_qconfig_FILE_contents}) + ENDIF(EXISTS "${QT_MKSPECS_DIR}/qconfig.pri") + IF("${QT_EDITION}" MATCHES "DesktopLight") + SET(QT_EDITION_DESKTOPLIGHT 1) + ENDIF("${QT_EDITION}" MATCHES "DesktopLight") + + + ############################################### + # + # configuration/system dependent settings + # + ############################################### + + SET(QT_QTGUI_LIB_DEPENDENCIES "") + SET(QT_QTCORE_LIB_DEPENDENCIES "") + SET(QT_QTNETWORK_LIB_DEPENDENCIES "") + SET(QT_QTOPENGL_LIB_DEPENDENCIES "") + SET(QT_QTDBUS_LIB_DEPENDENCIES "") + SET(QT_QTHELP_LIB_DEPENDENCIES ${QT_QTCLUCENE_LIBRARY}) + + # build using shared Qt needs -DQT_DLL + IF(NOT QT_CONFIG MATCHES "static") + # warning currently only qconfig.pri on Windows potentially contains "static" + # so QT_DLL might not get defined properly on other platforms. + SET(QT_DEFINITIONS ${QT_DEFINITIONS} -DQT_DLL) + ENDIF(NOT QT_CONFIG MATCHES "static") + + # QtOpenGL dependencies + QT_QUERY_QMAKE(QMAKE_LIBS_OPENGL "QMAKE_LIBS_OPENGL") + SET (QT_QTOPENGL_LIB_DEPENDENCIES ${QT_QTOPENGL_LIB_DEPENDENCIES} ${QMAKE_LIBS_OPENGL}) + + ## system png + IF(QT_QCONFIG MATCHES "system-png") + FIND_LIBRARY(QT_PNG_LIBRARY NAMES png) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_PNG_LIBRARY}) + MARK_AS_ADVANCED(QT_PNG_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "system-png") + + # for X11, get X11 library directory + IF(Q_WS_X11) + QT_QUERY_QMAKE(QMAKE_LIBDIR_X11 "QMAKE_LIBDIR_X11") + ENDIF(Q_WS_X11) + + ## X11 SM + IF(QT_QCONFIG MATCHES "x11sm") + # ask qmake where the x11 libs are + FIND_LIBRARY(QT_X11_SM_LIBRARY NAMES SM PATHS ${QMAKE_LIBDIR_X11}) + FIND_LIBRARY(QT_X11_ICE_LIBRARY NAMES ICE PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_X11_SM_LIBRARY} ${QT_X11_ICE_LIBRARY}) + MARK_AS_ADVANCED(QT_X11_SM_LIBRARY) + MARK_AS_ADVANCED(QT_X11_ICE_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "x11sm") + + ## Xi + IF(QT_QCONFIG MATCHES "tablet") + FIND_LIBRARY(QT_XI_LIBRARY NAMES Xi PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XI_LIBRARY}) + MARK_AS_ADVANCED(QT_XI_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "tablet") + + ## Xrender + IF(QT_QCONFIG MATCHES "xrender") + FIND_LIBRARY(QT_XRENDER_LIBRARY NAMES Xrender PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRENDER_LIBRARY}) + MARK_AS_ADVANCED(QT_XRENDER_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xrender") + + ## Xrandr + IF(QT_QCONFIG MATCHES "xrandr") + FIND_LIBRARY(QT_XRANDR_LIBRARY NAMES Xrandr PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XRANDR_LIBRARY}) + MARK_AS_ADVANCED(QT_XRANDR_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xrandr") + + ## Xcursor + IF(QT_QCONFIG MATCHES "xcursor") + FIND_LIBRARY(QT_XCURSOR_LIBRARY NAMES Xcursor PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XCURSOR_LIBRARY}) + MARK_AS_ADVANCED(QT_XCURSOR_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xcursor") + + ## Xinerama + IF(QT_QCONFIG MATCHES "xinerama") + FIND_LIBRARY(QT_XINERAMA_LIBRARY NAMES Xinerama PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XINERAMA_LIBRARY}) + MARK_AS_ADVANCED(QT_XINERAMA_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xinerama") + + ## Xfixes + IF(QT_QCONFIG MATCHES "xfixes") + FIND_LIBRARY(QT_XFIXES_LIBRARY NAMES Xfixes PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_XFIXES_LIBRARY}) + MARK_AS_ADVANCED(QT_XFIXES_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "xfixes") + + ## system-freetype + IF(QT_QCONFIG MATCHES "system-freetype") + FIND_LIBRARY(QT_FREETYPE_LIBRARY NAMES freetype) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FREETYPE_LIBRARY}) + MARK_AS_ADVANCED(QT_FREETYPE_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "system-freetype") + + ## fontconfig + IF(QT_QCONFIG MATCHES "fontconfig") + FIND_LIBRARY(QT_FONTCONFIG_LIBRARY NAMES fontconfig) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${QT_FONTCONFIG_LIBRARY}) + MARK_AS_ADVANCED(QT_FONTCONFIG_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "fontconfig") + + ## system-zlib + IF(QT_QCONFIG MATCHES "system-zlib") + FIND_LIBRARY(QT_ZLIB_LIBRARY NAMES z) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_ZLIB_LIBRARY}) + MARK_AS_ADVANCED(QT_ZLIB_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "system-zlib") + + ## openssl + IF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) + FIND_PACKAGE(OpenSSL) + SET(QT_QTNETWORK_LIB_DEPENDENCIES ${QT_QTNETWORK_LIB_DEPENDENCIES} ${OPENSSL_LIBRARIES}) + ENDIF(QT_QCONFIG MATCHES "openssl" AND NOT Q_WS_WIN) + + ## qdbus + IF(QT_QCONFIG MATCHES "qdbus") + + # if the dbus library isn't found, we'll assume its not required to build + # shared Qt on Linux doesn't require it + IF(NOT QT_DBUS_LIBRARY) + EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L dbus-1 + OUTPUT_VARIABLE _dbus_query_output + RESULT_VARIABLE _dbus_result + ERROR_VARIABLE _dbus_query_output ) + + IF(_dbus_result MATCHES 0) + STRING(REPLACE "-L" "" _dbus_query_output "${_dbus_query_output}") + SEPARATE_ARGUMENTS(_dbus_query_output) + ELSE(_dbus_result MATCHES 0) + SET(_dbus_query_output) + ENDIF(_dbus_result MATCHES 0) + + FIND_LIBRARY(QT_DBUS_LIBRARY NAMES dbus-1 PATHS ${_dbus_query_output} ) + + IF(QT_DBUS_LIBRARY) + SET(QT_QTDBUS_LIB_DEPENDENCIES ${QT_QTDBUS_LIB_DEPENDENCIES} ${QT_DBUS_LIBRARY}) + ENDIF(QT_DBUS_LIBRARY) + + MARK_AS_ADVANCED(QT_DBUS_LIBRARY) + ENDIF(NOT QT_DBUS_LIBRARY) + + ENDIF(QT_QCONFIG MATCHES "qdbus") + + ## glib + IF(QT_QCONFIG MATCHES "glib") + + # if the glib libraries aren't found, we'll assume its not required to build + # shared Qt on Linux doesn't require it + + # Qt 4.2.0+ uses glib-2.0 + IF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) + EXECUTE_PROCESS(COMMAND pkg-config --libs-only-L glib-2.0 gthread-2.0 + OUTPUT_VARIABLE _glib_query_output + RESULT_VARIABLE _glib_result + ERROR_VARIABLE _glib_query_output ) + + IF(_glib_result MATCHES 0) + STRING(REPLACE "-L" "" _glib_query_output "${_glib_query_output}") + SEPARATE_ARGUMENTS(_glib_query_output) + ELSE(_glib_result MATCHES 0) + SET(_glib_query_output) + ENDIF(_glib_result MATCHES 0) + + FIND_LIBRARY(QT_GLIB_LIBRARY NAMES glib-2.0 PATHS ${_glib_query_output} ) + FIND_LIBRARY(QT_GTHREAD_LIBRARY NAMES gthread-2.0 PATHS ${_glib_query_output} ) + + IF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} + ${QT_GTHREAD_LIBRARY} ${QT_GLIB_LIBRARY}) + ENDIF(QT_GLIB_LIBRARY AND QT_GTHREAD_LIBRARY) + + MARK_AS_ADVANCED(QT_GLIB_LIBRARY) + MARK_AS_ADVANCED(QT_GTHREAD_LIBRARY) + ENDIF(NOT QT_GLIB_LIBRARY OR NOT QT_GTHREAD_LIBRARY) + ENDIF(QT_QCONFIG MATCHES "glib") + + ## clock-monotonic, just see if we need to link with rt + IF(QT_QCONFIG MATCHES "clock-monotonic") + SET(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES}) + SET(CMAKE_REQUIRED_LIBRARIES rt) + CHECK_SYMBOL_EXISTS(_POSIX_TIMERS "unistd.h;time.h" QT_POSIX_TIMERS) + SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE}) + IF(QT_POSIX_TIMERS) + FIND_LIBRARY(QT_RT_LIBRARY NAMES rt) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_RT_LIBRARY}) + MARK_AS_ADVANCED(QT_RT_LIBRARY) + ENDIF(QT_POSIX_TIMERS) + ENDIF(QT_QCONFIG MATCHES "clock-monotonic") + + IF(Q_WS_X11) + # X11 libraries Qt absolutely depends on + QT_QUERY_QMAKE(QT_LIBS_X11 "QMAKE_LIBS_X11") + SEPARATE_ARGUMENTS(QT_LIBS_X11) + FOREACH(QT_X11_LIB ${QT_LIBS_X11}) + STRING(REGEX REPLACE "-l" "" QT_X11_LIB "${QT_X11_LIB}") + SET(QT_TMP_STR "QT_X11_${QT_X11_LIB}_LIBRARY") + FIND_LIBRARY(${QT_TMP_STR} NAMES "${QT_X11_LIB}" PATHS ${QMAKE_LIBDIR_X11}) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} ${${QT_TMP_STR}}) + MARK_AS_ADVANCED(${QT_TMP_STR}) + ENDFOREACH(QT_X11_LIB) + + QT_QUERY_QMAKE(QT_LIBS_THREAD "QMAKE_LIBS_THREAD") + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QT_LIBS_THREAD}) + + QT_QUERY_QMAKE(QMAKE_LIBS_DYNLOAD "QMAKE_LIBS_DYNLOAD") + SET (QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ${QMAKE_LIBS_DYNLOAD}) + + ENDIF(Q_WS_X11) + + IF(Q_WS_WIN) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} imm32 winmm) + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} ws2_32) + ENDIF(Q_WS_WIN) + + IF(Q_WS_MAC) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework Carbon") + + # Qt 4.0, 4.1, 4.2 use QuickTime + IF(QT_VERSION_MINOR LESS 3) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework QuickTime") + ENDIF(QT_VERSION_MINOR LESS 3) + + # Qt 4.2+ use AppKit + IF(QT_VERSION_MINOR GREATER 1) + SET(QT_QTGUI_LIB_DEPENDENCIES ${QT_QTGUI_LIB_DEPENDENCIES} "-framework AppKit") + ENDIF(QT_VERSION_MINOR GREATER 1) + + SET(QT_QTCORE_LIB_DEPENDENCIES ${QT_QTCORE_LIB_DEPENDENCIES} "-framework ApplicationServices") + ENDIF(Q_WS_MAC) + + ####################################### + # + # compatibility settings + # + ####################################### + # Backwards compatibility for CMake1.4 and 1.2 + SET (QT_MOC_EXE ${QT_MOC_EXECUTABLE} ) + SET (QT_UIC_EXE ${QT_UIC_EXECUTABLE} ) + + SET( QT_QT_LIBRARY "") + +ELSE(QT4_QMAKE_FOUND) + + SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE) + IF(Qt4_FIND_REQUIRED) + IF(QT4_INSTALLED_VERSION_TOO_OLD) + MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") + ELSE(QT4_INSTALLED_VERSION_TOO_OLD) + MESSAGE( FATAL_ERROR "Qt qmake not found!") + ENDIF(QT4_INSTALLED_VERSION_TOO_OLD) + ELSE(Qt4_FIND_REQUIRED) + IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) + MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT_MIN_VERSION} is required") + ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY) + ENDIF(Qt4_FIND_REQUIRED) + +ENDIF (QT4_QMAKE_FOUND) + diff --git a/Modules/FindQuickTime.cmake b/Modules/FindQuickTime.cmake new file mode 100644 index 000000000..00bc3ec72 --- /dev/null +++ b/Modules/FindQuickTime.cmake @@ -0,0 +1,41 @@ +# Locate QuickTime +# This module defines +# QUICKTIME_LIBRARY +# QUICKTIME_FOUND, if false, do not try to link to gdal +# QUICKTIME_INCLUDE_DIR, where to find the headers +# +# $QUICKTIME_DIR is an environment variable that would +# correspond to the ./configure --prefix=$QUICKTIME_DIR +# +# Created by Eric Wing. + +# QuickTime on OS X looks different than QuickTime for Windows, +# so I am going to case the two. + +IF(APPLE) + FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime/QuickTime.h) + FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) +ELSE(APPLE) + FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h + $ENV{QUICKTIME_DIR}/include + $ENV{QUICKTIME_DIR} + NO_DEFAULT_PATH + ) + + FIND_PATH(QUICKTIME_INCLUDE_DIR QuickTime.h) + + FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime + $ENV{QUICKTIME_DIR}/lib + $ENV{QUICKTIME_DIR} + NO_DEFAULT_PATH + ) + + FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime) +ENDIF(APPLE) + +SET(QUICKTIME_FOUND "NO") +IF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) + SET(QUICKTIME_FOUND "YES") +ENDIF(QUICKTIME_LIBRARY AND QUICKTIME_INCLUDE_DIR) + + diff --git a/Modules/FindRuby.cmake b/Modules/FindRuby.cmake new file mode 100644 index 000000000..ea604f9b2 --- /dev/null +++ b/Modules/FindRuby.cmake @@ -0,0 +1,94 @@ +# - Find Ruby +# This module finds if Ruby is installed and determines where the include files +# and libraries are. It also determines what the name of the library is. This +# code sets the following variables: +# +# RUBY_INCLUDE_PATH = path to where ruby.h can be found +# RUBY_EXECUTABLE = full path to the ruby binary +# RUBY_LIBRARY = full path to the ruby library + +# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + +# RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'` +# RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'` +# RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'` +# RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'` +# RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'` + +FIND_PROGRAM(RUBY_EXECUTABLE NAMES ruby ruby1.8 ruby18 ruby1.9 ruby19) + + +IF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['archdir']" + OUTPUT_VARIABLE RUBY_ARCH_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['libdir']" + OUTPUT_VARIABLE RUBY_POSSIBLE_LIB_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['rubylibdir']" + OUTPUT_VARIABLE RUBY_RUBY_LIB_DIR) + + # site_ruby + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitearchdir']" + OUTPUT_VARIABLE RUBY_SITEARCH_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['sitelibdir']" + OUTPUT_VARIABLE RUBY_SITELIB_DIR) + + # vendor_ruby available ? + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r vendor-specific -e "print 'true'" + OUTPUT_VARIABLE RUBY_HAS_VENDOR_RUBY ERROR_QUIET) + + IF(RUBY_HAS_VENDOR_RUBY) + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorlibdir']" + OUTPUT_VARIABLE RUBY_VENDORLIB_DIR) + + EXECUTE_PROCESS(COMMAND ${RUBY_EXECUTABLE} -r rbconfig -e "print Config::CONFIG['vendorarchdir']" + OUTPUT_VARIABLE RUBY_VENDORARCH_DIR) + ENDIF(RUBY_HAS_VENDOR_RUBY) + + # save the results in the cache so we don't have to run ruby the next time again + SET(RUBY_ARCH_DIR ${RUBY_ARCH_DIR} CACHE PATH "The Ruby arch dir") + SET(RUBY_POSSIBLE_LIB_DIR ${RUBY_POSSIBLE_LIB_DIR} CACHE PATH "The Ruby lib dir") + SET(RUBY_RUBY_LIB_DIR ${RUBY_RUBY_LIB_DIR} CACHE PATH "The Ruby ruby-lib dir") + SET(RUBY_SITEARCH_DIR ${RUBY_SITEARCH_DIR} CACHE PATH "The Ruby site arch dir") + SET(RUBY_SITELIB_DIR ${RUBY_SITELIB_DIR} CACHE PATH "The Ruby site lib dir") + SET(RUBY_HAS_VENDOR_RUBY ${RUBY_HAS_VENDOR_RUBY} CACHE BOOL "Vendor Ruby is available") + SET(RUBY_VENDORARCH_DIR ${RUBY_VENDORARCH_DIR} CACHE PATH "The Ruby vendor arch dir") + SET(RUBY_VENDORLIB_DIR ${RUBY_VENDORLIB_DIR} CACHE PATH "The Ruby vendor lib dir") + +ENDIF(RUBY_EXECUTABLE AND NOT RUBY_ARCH_DIR) + +# for compatibility +SET(RUBY_POSSIBLE_LIB_PATH ${RUBY_POSSIBLE_LIB_DIR}) +SET(RUBY_RUBY_LIB_PATH ${RUBY_RUBY_LIB_DIR}) + + +FIND_PATH(RUBY_INCLUDE_PATH + NAMES ruby.h + PATHS + ${RUBY_ARCH_DIR} + /usr/lib/ruby/1.8/i586-linux-gnu/ ) + +# search the ruby library, the version for MSVC can have the "msvc" prefix and the "static" suffix +FIND_LIBRARY(RUBY_LIBRARY + NAMES ruby ruby1.8 ruby1.9 + msvcrt-ruby18 msvcrt-ruby19 msvcrt-ruby18-static msvcrt-ruby19-static + PATHS ${RUBY_POSSIBLE_LIB_DIR} + ) + +MARK_AS_ADVANCED( + RUBY_EXECUTABLE + RUBY_LIBRARY + RUBY_INCLUDE_PATH + RUBY_ARCH_DIR + RUBY_POSSIBLE_LIB_DIR + RUBY_RUBY_LIB_DIR + RUBY_SITEARCH_DIR + RUBY_SITELIB_DIR + RUBY_HAS_VENDOR_RUBY + RUBY_VENDORARCH_DIR + RUBY_VENDORLIB_DIR + ) diff --git a/Modules/FindSDL.cmake b/Modules/FindSDL.cmake new file mode 100644 index 000000000..75b42cca0 --- /dev/null +++ b/Modules/FindSDL.cmake @@ -0,0 +1,192 @@ +# Locate SDL library +# This module defines +# SDL_LIBRARY, the name of the library to link against +# SDL_FOUND, if false, do not try to link to SDL +# SDL_INCLUDE_DIR, where to find SDL.h +# +# This module responds to the the flag: +# SDL_BUILDING_LIBRARY +# If this is defined, then no SDL_main will be linked in because +# only applications need main(). +# Otherwise, it is assumed you are building an application and this +# module will attempt to locate and set the the proper link flags +# as part of the returned SDL_LIBRARY variable. +# +# Don't forget to include SDLmain.h and SDLmain.m your project for the +# OS X framework based version. (Other versions link to -lSDLmain which +# this module will try to find on your behalf.) Also for OS X, this +# module will automatically add the -framework Cocoa on your behalf. +# +# +# Additional Note: If you see an empty SDL_LIBRARY_TEMP in your configuration +# and no SDL_LIBRARY, it means CMake did not find your SDL library +# (SDL.dll, libsdl.so, SDL.framework, etc). +# Set SDL_LIBRARY_TEMP to point to your SDL library, and configure again. +# Similarly, if you see an empty SDLMAIN_LIBRARY, you should set this value +# as appropriate. These values are used to generate the final SDL_LIBRARY +# variable, but when these values are unset, SDL_LIBRARY does not get created. +# +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# l.e.galup 9-20-02 +# +# Modified by Eric Wing. +# Added code to assist with automated building by using environmental variables +# and providing a more controlled/consistent search behavior. +# Added new modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). +# Also corrected the header search path to follow "proper" SDL guidelines. +# Added a search for SDLmain which is needed by some platforms. +# Added a search for threads which is needed by some platforms. +# Added needed compile switches for MinGW. +# +# On OSX, this will prefer the Framework version (if found) over others. +# People will have to manually change the cache values of +# SDL_LIBRARY to override this selection or set the CMake environment +# CMAKE_INCLUDE_PATH to modify the search paths. +# +# Note that the header path has changed from SDL/SDL.h to just SDL.h +# This needed to change because "proper" SDL convention +# is #include "SDL.h", not . This is done for portability +# reasons because not all systems place things in SDL/ (see FreeBSD). + +FIND_PATH(SDL_INCLUDE_DIR SDL.h + PATHS + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(SDL_INCLUDE_DIR SDL.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include +) +#MESSAGE("SDL_INCLUDE_DIR is ${SDL_INCLUDE_DIR}") + +# SDL-1.1 is the name used by FreeBSD ports... +# don't confuse it for the version number. +FIND_LIBRARY(SDL_LIBRARY_TEMP + NAMES SDL SDL-1.1 + PATHS + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(SDL_LIBRARY_TEMP + NAMES SDL SDL-1.1 + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +#MESSAGE("SDL_LIBRARY_TEMP is ${SDL_LIBRARY_TEMP}") + +IF(NOT SDL_BUILDING_LIBRARY) + IF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") + # Non-OS X framework versions expect you to also dynamically link to + # SDLmain. This is mainly for Windows and OS X. Other (Unix) platforms + # seem to provide SDLmain for compatibility even though they don't + # necessarily need it. + FIND_LIBRARY(SDLMAIN_LIBRARY + NAMES SDLmain SDLmain-1.1 + PATHS + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib + ) + + FIND_LIBRARY(SDLMAIN_LIBRARY + NAMES SDLmain SDLmain-1.1 + PATHS + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib + ) + ENDIF(NOT ${SDL_INCLUDE_DIR} MATCHES ".framework") +ENDIF(NOT SDL_BUILDING_LIBRARY) + +# SDL may require threads on your system. +# The Apple build may not need an explicit flag because one of the +# frameworks may already provide it. +# But for non-OSX systems, I will use the CMake Threads package. +IF(NOT APPLE) + FIND_PACKAGE(Threads) +ENDIF(NOT APPLE) + +# MinGW needs an additional library, mwindows +# It's total link flags should look like -lmingw32 -lSDLmain -lSDL -lmwindows +# (Actually on second look, I think it only needs one of the m* libraries.) +IF(MINGW) + SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW") +ENDIF(MINGW) + +SET(SDL_FOUND "NO") +IF(SDL_LIBRARY_TEMP) + # For SDLmain + IF(NOT SDL_BUILDING_LIBRARY) + IF(SDLMAIN_LIBRARY) + SET(SDL_LIBRARY_TEMP ${SDLMAIN_LIBRARY} ${SDL_LIBRARY_TEMP}) + ENDIF(SDLMAIN_LIBRARY) + ENDIF(NOT SDL_BUILDING_LIBRARY) + + # For OS X, SDL uses Cocoa as a backend so it must link to Cocoa. + # CMake doesn't display the -framework Cocoa string in the UI even + # though it actually is there if I modify a pre-used variable. + # I think it has something to do with the CACHE STRING. + # So I use a temporary variable until the end so I can set the + # "real" variable in one-shot. + IF(APPLE) + SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} "-framework Cocoa") + ENDIF(APPLE) + + # For threads, as mentioned Apple doesn't need this. + # In fact, there seems to be a problem if I used the Threads package + # and try using this line, so I'm just skipping it entirely for OS X. + IF(NOT APPLE) + SET(SDL_LIBRARY_TEMP ${SDL_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT}) + ENDIF(NOT APPLE) + + # For MinGW library + IF(MINGW) + SET(SDL_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL_LIBRARY_TEMP}) + ENDIF(MINGW) + + # Set the final string here so the GUI reflects the final state. + SET(SDL_LIBRARY ${SDL_LIBRARY_TEMP} CACHE STRING "Where the SDL Library can be found") + # Set the temp variable to INTERNAL so it is not seen in the CMake GUI + SET(SDL_LIBRARY_TEMP "${SDL_LIBRARY_TEMP}" CACHE INTERNAL "") + + SET(SDL_FOUND "YES") +ENDIF(SDL_LIBRARY_TEMP) + +#MESSAGE("SDL_LIBRARY is ${SDL_LIBRARY}") + diff --git a/Modules/FindSDL_image.cmake b/Modules/FindSDL_image.cmake new file mode 100755 index 000000000..e39b3cbc1 --- /dev/null +++ b/Modules/FindSDL_image.cmake @@ -0,0 +1,72 @@ +# Locate SDL_image library +# This module defines +# SDLIMAGE_LIBRARY, the name of the library to link against +# SDLIMAGE_FOUND, if false, do not try to link to SDL +# SDLIMAGE_INCLUDE_DIR, where to find SDL/SDL.h +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). + +FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h + PATHS + $ENV{SDLIMAGEDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(SDLIMAGE_INCLUDE_DIR SDL_image.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include +) + +FIND_LIBRARY(SDLIMAGE_LIBRARY + NAMES SDL_image + PATHS + $ENV{SDLIMAGEDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(SDLIMAGE_LIBRARY + NAMES SDL_image + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(SDLIMAGE_FOUND "NO") +IF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR) + SET(SDLIMAGE_FOUND "YES") +ENDIF(SDLIMAGE_LIBRARY AND SDLIMAGE_INCLUDE_DIR) + diff --git a/Modules/FindSDL_mixer.cmake b/Modules/FindSDL_mixer.cmake new file mode 100755 index 000000000..59b0f5ace --- /dev/null +++ b/Modules/FindSDL_mixer.cmake @@ -0,0 +1,72 @@ +# Locate SDL_mixer library +# This module defines +# SDLMIXER_LIBRARY, the name of the library to link against +# SDLMIXER_FOUND, if false, do not try to link to SDL +# SDLMIXER_INCLUDE_DIR, where to find SDL/SDL.h +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). + +FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h + PATHS + $ENV{SDLMIXERDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(SDLMIXER_INCLUDE_DIR SDL_mixer.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include +) + +FIND_LIBRARY(SDLMIXER_LIBRARY + NAMES SDL_mixer + PATHS + $ENV{SDLMIXERDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(SDLMIXER_LIBRARY + NAMES SDL_mixer + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(SDLMIXER_FOUND "NO") +IF(SDLMIXER_LIBRARY AND SDLMIXER_INCLUDE_DIR) + SET(SDLMIXER_FOUND "YES") +ENDIF(SDLMIXER_LIBRARY AND SDLMIXER_INCLUDE_DIR) + diff --git a/Modules/FindSDL_net.cmake b/Modules/FindSDL_net.cmake new file mode 100755 index 000000000..8d0ce8aed --- /dev/null +++ b/Modules/FindSDL_net.cmake @@ -0,0 +1,72 @@ +# Locate SDL_net library +# This module defines +# SDLNET_LIBRARY, the name of the library to link against +# SDLNET_FOUND, if false, do not try to link against +# SDLNET_INCLUDE_DIR, where to find the headers +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). + + +FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h + PATHS + $ENV{SDLNETDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(SDLNET_INCLUDE_DIR SDL_net.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include +) +FIND_LIBRARY(SDLNET_LIBRARY + NAMES SDL_net + PATHS + $ENV{SDLNETDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(SDLNET_LIBRARY + NAMES SDL_net + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(SDLNET_FOUND "NO") +IF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR) + SET(SDLNET_FOUND "YES") +ENDIF(SDLNET_LIBRARY AND SDLNET_INCLUDE_DIR) + diff --git a/Modules/FindSDL_sound.cmake b/Modules/FindSDL_sound.cmake new file mode 100755 index 000000000..71d7334ce --- /dev/null +++ b/Modules/FindSDL_sound.cmake @@ -0,0 +1,412 @@ +# Locates the SDL_sound library + +# This module depends on SDL being found and +# must be called AFTER FindSDL.cmake is called. + +# This module defines +# SDL_SOUND_INCLUDE_DIR, where to find SDL_sound.h +# SDL_SOUND_FOUND, if false, do not try to link to SDL +# SDL_SOUND_LIBRARIES, this contains the list of libraries that you need +# to link against. This is a read-only variable and is marked INTERNAL. +# SDL_SOUND_EXTRAS, this is an optional variable for you to add your own +# flags to SDL_SOUND_LIBRARIES. This is prepended to SDL_SOUND_LIBRARIES. +# This is available mostly for cases this module failed to anticipate for +# and you must add additional flags. This is marked as ADVANCED. + +# +# This module also defines (but you shouldn't need to use directly) +# SDL_SOUND_LIBRARY, the name of just the SDL_sound library you would link +# against. Use SDL_SOUND_LIBRARIES for you link instructions and not this one. +# And might define the following as needed +# MIKMOD_LIBRARY +# MODPLUG_LIBRARY +# OGG_LIBRARY +# VORBIS_LIBRARY +# SMPEG_LIBRARY +# FLAC_LIBRARY +# SPEEX_LIBRARY +# +# Typically, you should not use these variables directly, and you should use +# SDL_SOUND_LIBRARIES which contains SDL_SOUND_LIBRARY and the other audio libraries +# (if needed) to successfully compile on your system . +# +# Created by Eric Wing. +# This module is a bit more complicated than the other FindSDL* family modules. +# The reason is that SDL_sound can be compiled in a large variety of different ways +# which are independent of platform. SDL_sound may dynamically link against other 3rd +# party libraries to get additional codec support, such as Ogg Vorbis, SMPEG, ModPlug, +# MikMod, FLAC, Speex, and potentially others. +# Under some circumstances which I don't fully understand, +# there seems to be a requirement +# that dependent libraries of libraries you use must also be explicitly +# linked against in order to successfully compile. SDL_sound does not currently +# have any system in place to know how it was compiled. +# So this CMake module does the hard work in trying to discover which 3rd party +# libraries are required for building (if any). +# This module uses a brute force approach to create a test program that uses SDL_sound, +# and then tries to build it. If the build fails, it parses the error output for +# known symbol names to figure out which libraries are needed. +# +# Responds to the $SDLDIR and $SDLSOUNDDIR environmental variable that would +# correspond to the ./configure --prefix=$SDLDIR used in building SDL. +# +# On OSX, this will prefer the Framework version (if found) over others. +# People will have to manually change the cache values of +# SDL_LIBRARY to override this selectionor set the CMake environment +# CMAKE_INCLUDE_PATH to modify the search paths. +# + + +SET(SDL_SOUND_EXTRAS "" CACHE STRING "SDL_sound extra flags") +MARK_AS_ADVANCED(SDL_SOUND_EXTRAS) + +# Find SDL_sound.h +FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h + $ENV{SDLSOUNDDIR}/include + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/include + $ENV{SDLDIR} + NO_DEFAULT_PATH +) +FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h + NO_DEFAULT_PATH +) +FIND_PATH(SDL_SOUND_INCLUDE_DIR SDL_sound.h + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include + ) + +FIND_LIBRARY(SDL_SOUND_LIBRARY + NAMES SDL_sound + PATHS + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + +SET(SDL_SOUND_FOUND "NO") +IF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) + + # CMake is giving me problems using TRY_COMPILE with the CMAKE_FLAGS + # for the :STRING syntax if I have multiple values contained in a + # single variable. This is a problem for the SDL_LIBRARY variable + # because it does just that. When I feed this variable to the command, + # only the first value gets the appropriate modifier (e.g. -I) and + # the rest get dropped. + # To get multiple single variables to work, I must separate them with a "\;" + # I could go back and modify the FindSDL.cmake module, but that's kind of painful. + # The solution would be to try something like: + # SET(SDL_TRY_COMPILE_LIBRARY_LIST "${SDL_TRY_COMPILE_LIBRARY_LIST}\;${CMAKE_THREAD_LIBS_INIT}") + # Instead, it was suggested on the mailing list to write a temporary CMakeLists.txt + # with a temporary test project and invoke that with TRY_COMPILE. + # See message thread "Figuring out dependencies for a library in order to build" + # 2005-07-16 + # TRY_COMPILE( + # MY_RESULT + # ${CMAKE_BINARY_DIR} + # ${PROJECT_SOURCE_DIR}/DetermineSoundLibs.c + # CMAKE_FLAGS + # -DINCLUDE_DIRECTORIES:STRING=${SDL_INCLUDE_DIR}\;${SDL_SOUND_INCLUDE_DIR} + # -DLINK_LIBRARIES:STRING=${SDL_SOUND_LIBRARY}\;${SDL_LIBRARY} + # OUTPUT_VARIABLE MY_OUTPUT + # ) + + # To minimize external dependencies, create a sdlsound test program + # which will be used to figure out if additional link dependencies are + # required for the link phase. + FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/DetermineSoundLibs.c + "#include \"SDL_sound.h\" + #include \"SDL.h\" + int main(int argc, char* argv[]) + { + Sound_AudioInfo desired; + Sound_Sample* sample; + + SDL_Init(0); + Sound_Init(); + + /* This doesn't actually have to work, but Init() is a no-op + * for some of the decoders, so this should force more symbols + * to be pulled in. + */ + sample = Sound_NewSampleFromFile(argv[1], &desired, 4096); + + Sound_Quit(); + SDL_Quit(); + return 0; + }" + ) + + # Calling + # TARGET_LINK_LIBRARIES(DetermineSoundLibs "${SDL_SOUND_LIBRARY} ${SDL_LIBRARY}) + # causes problems when SDL_LIBRARY looks like + # /Library/Frameworks/SDL.framework;-framework Cocoa + # The ;-framework Cocoa seems to be confusing CMake once the OS X + # framework support was added. I was told that breaking up the list + # would fix the problem. + SET(TMP_TRY_LIBS) + FOREACH(lib ${SDL_SOUND_LIBRARY} ${SDL_LIBRARY}) + SET(TMP_TRY_LIBS "${TMP_TRY_LIBS} \"${lib}\"") + ENDFOREACH(lib) + + # MESSAGE("TMP_TRY_LIBS ${TMP_TRY_LIBS}") + + # Write the CMakeLists.txt and test project + # Weird, this is still sketchy. If I don't quote the variables + # in the TARGET_LINK_LIBRARIES, I seem to loose everything + # in the SDL_LIBRARY string after the "-framework". + # But if I quote the stuff in INCLUDE_DIRECTORIES, it doesn't work. + FILE(WRITE ${PROJECT_BINARY_DIR}/CMakeTmp/CMakeLists.txt + "PROJECT(DetermineSoundLibs) + INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR} ${SDL_SOUND_INCLUDE_DIR}) + ADD_EXECUTABLE(DetermineSoundLibs DetermineSoundLibs.c) + TARGET_LINK_LIBRARIES(DetermineSoundLibs ${TMP_TRY_LIBS})" + ) + + TRY_COMPILE( + MY_RESULT + ${PROJECT_BINARY_DIR}/CMakeTmp + ${PROJECT_BINARY_DIR}/CMakeTmp + DetermineSoundLibs + OUTPUT_VARIABLE MY_OUTPUT + ) + + # MESSAGE("${MY_RESULT}") + # MESSAGE(${MY_OUTPUT}) + + IF(NOT MY_RESULT) + + # I expect that MPGLIB, VOC, WAV, AIFF, and SHN are compiled in statically. + # I think Timidity is also compiled in statically. + # I've never had to explcitly link against Quicktime, so I'll skip that for now. + + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARY}) + + # Find MikMod + IF("${MY_OUTPUT}" MATCHES "MikMod_") + FIND_LIBRARY(MIKMOD_LIBRARY + NAMES libmikmod-coreaudio mikmod + PATHS + $ENV{MIKMODDIR}/lib + $ENV{MIKMODDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(MIKMOD_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MIKMOD_LIBRARY}) + ENDIF(MIKMOD_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "MikMod_") + + # Find ModPlug + IF("${MY_OUTPUT}" MATCHES "MODPLUG_") + FIND_LIBRARY(MODPLUG_LIBRARY + NAMES modplug + PATHS + $ENV{MODPLUGDIR}/lib + $ENV{MODPLUGDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(MODPLUG_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${MODPLUG_LIBRARY}) + ENDIF(MODPLUG_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "MODPLUG_") + + + # Find Ogg and Vorbis + IF("${MY_OUTPUT}" MATCHES "ov_") + FIND_LIBRARY(VORBIS_LIBRARY + NAMES vorbis Vorbis VORBIS + PATHS + $ENV{VORBISDIR}/lib + $ENV{VORBISDIR} + $ENV{OGGDIR}/lib + $ENV{OGGDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(VORBIS_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${VORBIS_LIBRARY}) + ENDIF(VORBIS_LIBRARY) + + FIND_LIBRARY(OGG_LIBRARY + NAMES ogg Ogg OGG + PATHS + $ENV{OGGDIR}/lib + $ENV{OGGDIR} + $ENV{VORBISDIR}/lib + $ENV{VORBISDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(OGG_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY}) + ENDIF(OGG_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "ov_") + + + # Find SMPEG + IF("${MY_OUTPUT}" MATCHES "SMPEG_") + FIND_LIBRARY(SMPEG_LIBRARY + NAMES smpeg SMPEG Smpeg SMpeg + PATHS + $ENV{SMPEGDIR}/lib + $ENV{SMPEGDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(SMPEG_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SMPEG_LIBRARY}) + ENDIF(SMPEG_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "SMPEG_") + + + # Find FLAC + IF("${MY_OUTPUT}" MATCHES "FLAC_") + FIND_LIBRARY(FLAC_LIBRARY + NAMES flac FLAC + PATHS + $ENV{FLACDIR}/lib + $ENV{FLACDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(FLAC_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${FLAC_LIBRARY}) + ENDIF(FLAC_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "FLAC_") + + + # Hmmm...Speex seems to depend on Ogg. This might be a problem if + # the TRY_COMPILE attempt gets blocked at SPEEX before it can pull + # in the Ogg symbols. I'm not sure if I should duplicate the ogg stuff + # above for here or if two ogg entries will screw up things. + IF("${MY_OUTPUT}" MATCHES "speex_") + FIND_LIBRARY(SPEEX_LIBRARY + NAMES speex SPEEX + PATHS + $ENV{SPEEXDIR}/lib + $ENV{SPEEXDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(SPEEX_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${SPEEX_LIBRARY}) + ENDIF(SPEEX_LIBRARY) + + # Find OGG (needed for Speex) + # We might have already found Ogg for Vorbis, so skip it if so. + IF(NOT OGG_LIBRARY) + FIND_LIBRARY(OGG_LIBRARY + NAMES ogg Ogg OGG + PATHS + $ENV{OGGDIR}/lib + $ENV{OGGDIR} + $ENV{VORBISDIR}/lib + $ENV{VORBISDIR} + $ENV{SPEEXDIR}/lib + $ENV{SPEEXDIR} + $ENV{SDLSOUNDDIR}/lib + $ENV{SDLSOUNDDIR} + $ENV{SDLDIR}/lib + $ENV{SDLDIR} + /usr/local/lib + /usr/lib + /sw/lib + /opt/local/lib + /opt/csw/lib + /opt/lib + ) + IF(OGG_LIBRARY) + SET(SDL_SOUND_LIBRARIES_TMP ${SDL_SOUND_LIBRARIES_TMP} ${OGG_LIBRARY}) + ENDIF(OGG_LIBRARY) + ENDIF(NOT OGG_LIBRARY) + ENDIF("${MY_OUTPUT}" MATCHES "speex_") + + ELSE(NOT MY_RESULT) + SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARY}" CACHE INTERNAL "SDL_sound and dependent libraries") + ENDIF(NOT MY_RESULT) + + SET(SDL_SOUND_LIBRARIES "${SDL_SOUND_EXTRAS} ${SDL_SOUND_LIBRARIES_TMP}" CACHE INTERNAL "SDL_sound and dependent libraries") + SET(SDL_SOUND_FOUND "YES") + ENDIF(SDL_FOUND AND SDL_SOUND_INCLUDE_DIR AND SDL_SOUND_LIBRARY) + + # MESSAGE("SDL_SOUND_LIBRARIES is ${SDL_SOUND_LIBRARIES}") + diff --git a/Modules/FindSDL_ttf.cmake b/Modules/FindSDL_ttf.cmake new file mode 100755 index 000000000..e1113d636 --- /dev/null +++ b/Modules/FindSDL_ttf.cmake @@ -0,0 +1,73 @@ +# Locate SDL_ttf library +# This module defines +# SDLTTF_LIBRARY, the name of the library to link against +# SDLTTF_FOUND, if false, do not try to link to SDL +# SDLTTF_INCLUDE_DIR, where to find SDL/SDL.h +# +# $SDLDIR is an environment variable that would +# correspond to the ./configure --prefix=$SDLDIR +# used in building SDL. +# +# Created by Eric Wing. This was influenced by the FindSDL.cmake +# module, but with modifications to recognize OS X frameworks and +# additional Unix paths (FreeBSD, etc). + + +FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h + PATHS + $ENV{SDLTTFDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(SDLTTF_INCLUDE_DIR SDL_ttf.h + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local/include/SDL + /usr/include/SDL + /usr/local/include/SDL12 + /usr/local/include/SDL11 # FreeBSD ports + /usr/include/SDL12 + /usr/include/SDL11 + /usr/local/include + /usr/include + /sw/include/SDL # Fink + /sw/include + /opt/local/include/SDL # DarwinPorts + /opt/local/include + /opt/csw/include/SDL # Blastwave + /opt/csw/include + /opt/include/SDL + /opt/include +) + +FIND_LIBRARY(SDLTTF_LIBRARY + NAMES SDL_ttf + PATHS + $ENV{SDLTTFDIR} + $ENV{SDLDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(SDLTTF_LIBRARY + NAMES SDL_ttf + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(SDLTTF_FOUND "NO") +IF(SDLTTF_LIBRARY AND SDLTTF_INCLUDE_DIR) + SET(SDLTTF_FOUND "YES") +ENDIF(SDLTTF_LIBRARY AND SDLTTF_INCLUDE_DIR) + diff --git a/Modules/FindSWIG.cmake b/Modules/FindSWIG.cmake new file mode 100644 index 000000000..e1f9d7449 --- /dev/null +++ b/Modules/FindSWIG.cmake @@ -0,0 +1,56 @@ +# - Find SWIG +# This module finds an installed SWIG. It sets the following variables: +# SWIG_FOUND - set to true if SWIG is found +# SWIG_DIR - the directory where swig is installed +# SWIG_EXECUTABLE - the path to the swig executable +# SWIG_VERSION - the version number of the swig executable +# +# All informations are collected from the SWIG_EXECUTABLE so the +# version to be found can be changed from the command line by +# means of setting SWIG_EXECUTABLE +# + +SET(SWIG_FOUND FALSE) + +FIND_PROGRAM(SWIG_EXECUTABLE swig) + +IF(SWIG_EXECUTABLE) + EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -swiglib + OUTPUT_VARIABLE SWIG_swiglib_output + ERROR_VARIABLE SWIG_swiglib_error + RESULT_VARIABLE SWIG_swiglib_result) + + IF(SWIG_swiglib_result) + MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -swiglib\" failed with output:\n${SWIG_swiglib_error}") + ELSE(SWIG_swiglib_result) + STRING(REGEX REPLACE "[\n\r]+" ";" SWIG_swiglib_output ${SWIG_swiglib_output}) + # force the path to be computed each time in case SWIG_EXECUTABLE has changed. + SET(SWIG_DIR SWIG_DIR-NOTFOUND) + FIND_PATH(SWIG_DIR swig.swg PATHS ${SWIG_swiglib_output}) + IF(SWIG_DIR) + SET(SWIG_FOUND 1) + SET(SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake) + EXECUTE_PROCESS(COMMAND ${SWIG_EXECUTABLE} -version + OUTPUT_VARIABLE SWIG_version_output + ERROR_VARIABLE SWIG_version_output + RESULT_VARIABLE SWIG_version_result) + IF(SWIG_version_result) + MESSAGE(SEND_ERROR "Command \"${SWIG_EXECUTABLE} -version\" failed with output:\n${SWIG_version_output}") + ELSE(SWIG_version_result) + STRING(REGEX REPLACE ".*SWIG Version[^0-9.]*\([0-9.]+\).*" "\\1" + SWIG_version_output "${SWIG_version_output}") + SET(SWIG_VERSION ${SWIG_version_output} CACHE STRING "Swig version" FORCE) + ENDIF(SWIG_version_result) + ENDIF(SWIG_DIR) + ENDIF(SWIG_swiglib_result) +ENDIF(SWIG_EXECUTABLE) + +IF(NOT SWIG_FOUND) + IF(NOT SWIG_FIND_QUIETLY) + IF(SWIG_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "SWIG was not found. Please specify Swig executable location") + ELSE(SWIG_FIND_REQUIRED) + MESSAGE(STATUS "SWIG was not found. Please specify Swig executable location") + ENDIF(SWIG_FIND_REQUIRED) + ENDIF(NOT SWIG_FIND_QUIETLY) +ENDIF(NOT SWIG_FOUND) diff --git a/Modules/FindSelfPackers.cmake b/Modules/FindSelfPackers.cmake new file mode 100644 index 000000000..78d6e1956 --- /dev/null +++ b/Modules/FindSelfPackers.cmake @@ -0,0 +1,55 @@ +# - Find upx +# This module looks for some executable packers (i.e. softwares that +# compress executables or shared libs into on-the-fly self-extracting +# executables or shared libs. +# Examples: +# UPX: http://wildsau.idv.uni-linz.ac.at/mfx/upx.html + +INCLUDE(FindCygwin) + +FIND_PROGRAM(SELF_PACKER_FOR_EXECUTABLE + upx + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) + +FIND_PROGRAM(SELF_PACKER_FOR_SHARED_LIB + upx + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) + +MARK_AS_ADVANCED( + SELF_PACKER_FOR_EXECUTABLE + SELF_PACKER_FOR_SHARED_LIB +) + +# +# Set flags +# +IF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") + SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "-q" CACHE STRING + "Flags for the executable self-packer.") +ELSE (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") + SET (SELF_PACKER_FOR_EXECUTABLE_FLAGS "" CACHE STRING + "Flags for the executable self-packer.") +ENDIF (SELF_PACKER_FOR_EXECUTABLE MATCHES "upx") + +IF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") + SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "-q" CACHE STRING + "Flags for the shared lib self-packer.") +ELSE (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") + SET (SELF_PACKER_FOR_SHARED_LIB_FLAGS "" CACHE STRING + "Flags for the shared lib self-packer.") +ENDIF (SELF_PACKER_FOR_SHARED_LIB MATCHES "upx") + +MARK_AS_ADVANCED( + SELF_PACKER_FOR_EXECUTABLE_FLAGS + SELF_PACKER_FOR_SHARED_LIB_FLAGS +) diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake new file mode 100644 index 000000000..cdac93f82 --- /dev/null +++ b/Modules/FindSubversion.cmake @@ -0,0 +1,126 @@ +# - Extract information from a subversion working copy +# The module defines the following variables: +# Subversion_SVN_EXECUTABLE - path to svn command line client +# Subversion_VERSION_SVN - version of svn command line client +# Subversion_FOUND - true if the command line client was found +# If the command line client executable is found the macro +# Subversion_WC_INFO(

) +# is defined to extract information of a subversion working copy at +# a given location. The macro defines the following variables: +# _WC_URL - url of the repository (at ) +# _WC_ROOT - root url of the repository +# _WC_REVISION - current revision +# _WC_LAST_CHANGED_AUTHOR - author of last commit +# _WC_LAST_CHANGED_DATE - date of last commit +# _WC_LAST_CHANGED_REV - revision of last commit +# _WC_LAST_CHANGED_LOG - last log of base revision +# _WC_INFO - output of command `svn info ' +# Example usage: +# FIND_PACKAGE(Subversion) +# IF(Subversion_FOUND) +# Subversion_WC_INFO(${PROJECT_SOURCE_DIR} Project) +# MESSAGE("Current revision is ${Project_WC_REVISION}") +# 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: +# +# * 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: FindSubversion.cmake,v 1.2.2.2 2008-03-26 18:08:24 hoffman Exp $ + +SET(Subversion_FOUND FALSE) +SET(Subversion_SVN_FOUND FALSE) + +# the subversion commands should be executed with the C locale, otherwise +# the message (which are parsed) may be translated, Alex +SET(_Subversion_SAVED_LC_ALL "$ENV{LC_ALL}" ) +SET(ENV{LC_ALL} C) + +FIND_PROGRAM(Subversion_SVN_EXECUTABLE svn + DOC "subversion command line client") +MARK_AS_ADVANCED(Subversion_SVN_EXECUTABLE) + +IF(Subversion_SVN_EXECUTABLE) + SET(Subversion_SVN_FOUND TRUE) + SET(Subversion_FOUND TRUE) + + MACRO(Subversion_WC_INFO dir prefix) + EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} --version + WORKING_DIRECTORY ${dir} + OUTPUT_VARIABLE Subversion_VERSION_SVN + OUTPUT_STRIP_TRAILING_WHITESPACE) + + EXECUTE_PROCESS(COMMAND ${Subversion_SVN_EXECUTABLE} info ${dir} + OUTPUT_VARIABLE ${prefix}_WC_INFO + ERROR_VARIABLE Subversion_svn_info_error + RESULT_VARIABLE Subversion_svn_info_result + OUTPUT_STRIP_TRAILING_WHITESPACE) + + IF(NOT ${Subversion_svn_info_result} EQUAL 0) + MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} info ${dir}\" failed with output:\n${Subversion_svn_info_error}") + ELSE(NOT ${Subversion_svn_info_result} EQUAL 0) + + STRING(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*" + "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}") + STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*" + "\\2" ${prefix}_WC_URL "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*" + "\\2" ${prefix}_WC_REVISION "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Last Changed Author: ([^\n]+).*" + "\\2" ${prefix}_WC_LAST_CHANGED_AUTHOR "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Last Changed Rev: ([^\n]+).*" + "\\2" ${prefix}_WC_LAST_CHANGED_REV "${${prefix}_WC_INFO}") + STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*" + "\\2" ${prefix}_WC_LAST_CHANGED_DATE "${${prefix}_WC_INFO}") + + ENDIF(NOT ${Subversion_svn_info_result} EQUAL 0) + + EXECUTE_PROCESS(COMMAND + ${Subversion_SVN_EXECUTABLE} log -r BASE ${dir} + OUTPUT_VARIABLE Subversion_LAST_CHANGED_LOG + ERROR_VARIABLE Subversion_svn_log_error + RESULT_VARIABLE Subversion_svn_log_result + OUTPUT_STRIP_TRAILING_WHITESPACE) + + IF(NOT ${Subversion_svn_log_result} EQUAL 0) + MESSAGE(SEND_ERROR "Command \"${Subversion_SVN_EXECUTABLE} log -r BASE ${dir}\" failed with output:\n${Subversion_svn_log_error}") + ENDIF(NOT ${Subversion_svn_log_result} EQUAL 0) + ENDMACRO(Subversion_WC_INFO) + +ENDIF(Subversion_SVN_EXECUTABLE) + +# restore the previous LC_ALL +SET(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) + +IF(NOT Subversion_FOUND) + IF(NOT Subversion_FIND_QUIETLY) + MESSAGE(STATUS "Subversion was not found.") + ELSE(NOT Subversion_FIND_QUIETLY) + IF(Subversion_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Subversion was not found.") + ENDIF(Subversion_FIND_REQUIRED) + ENDIF(NOT Subversion_FIND_QUIETLY) +ENDIF(NOT Subversion_FOUND) + +# FindSubversion.cmake ends here. diff --git a/Modules/FindTCL.cmake b/Modules/FindTCL.cmake new file mode 100644 index 000000000..3810609b5 --- /dev/null +++ b/Modules/FindTCL.cmake @@ -0,0 +1,212 @@ +# - Find Tcl includes and libraries. +# This module finds if Tcl is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# TCL_FOUND = Tcl was found +# TK_FOUND = Tk was found +# TCLTK_FOUND = Tcl and Tk were found +# TCL_LIBRARY = path to Tcl library (tcl tcl80) +# TCL_INCLUDE_PATH = path to where tcl.h can be found +# TCL_TCLSH = path to tclsh binary (tcl tcl80) +# TK_LIBRARY = path to Tk library (tk tk80 etc) +# TK_INCLUDE_PATH = path to where tk.h can be found +# TK_WISH = full path to the wish executable +# +# In an effort to remove some clutter and clear up some issues for people +# who are not necessarily Tcl/Tk gurus/developpers, some variables were +# moved or removed. Changes compared to CMake 2.4 are: +# - The stub libraries are now found in FindTclStub.cmake +# => they were only useful for people writing Tcl/Tk extensions. +# - TCL_LIBRARY_DEBUG and TK_LIBRARY_DEBUG were removed. +# => these libs are not packaged by default with Tcl/Tk distributions. +# Even when Tcl/Tk is built from source, several flavors of debug libs +# are created and there is no real reason to pick a single one +# specifically (say, amongst tcl84g, tcl84gs, or tcl84sgx). +# Let's leave that choice to the user by allowing him to assign +# TCL_LIBRARY to any Tcl library, debug or not. +# - TK_INTERNAL_PATH was removed. +# => this ended up being only a Win32 variable, and there is a lot of +# confusion regarding the location of this file in an installed Tcl/Tk +# tree anyway (see 8.5 for example). If you need the internal path at +# this point it is safer you ask directly where the *source* tree is +# and dig from there. + +INCLUDE(CMakeFindFrameworks) +INCLUDE(FindTclsh) +INCLUDE(FindWish) + +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") + +GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) +GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") + +GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) + +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") + +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") + +SET(TCLTK_POSSIBLE_LIB_PATHS + "${TCL_INCLUDE_PATH_PARENT}/lib" + "${TK_INCLUDE_PATH_PARENT}/lib" + "${TCL_LIBRARY_PATH}" + "${TK_LIBRARY_PATH}" + "${TCL_TCLSH_PATH_PARENT}/lib" + "${TK_WISH_PATH_PARENT}/lib" + /usr/lib + /usr/local/lib + ) + +IF(WIN32) + GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib" + "$ENV{ProgramFiles}/Tcl/Lib" + "C:/Program Files/Tcl/lib" + "C:/Tcl/lib" + ) +ENDIF(WIN32) + +FIND_LIBRARY(TCL_LIBRARY + NAMES + tcl + tcl${TK_LIBRARY_VERSION} tcl${TCL_TCLSH_VERSION} tcl${TK_WISH_VERSION} + tcl86 tcl8.6 + tcl85 tcl8.5 + tcl84 tcl8.4 + tcl83 tcl8.3 + tcl82 tcl8.2 + tcl80 tcl8.0 + PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + ) + +FIND_LIBRARY(TK_LIBRARY + NAMES + tk + tk${TCL_LIBRARY_VERSION} tk${TCL_TCLSH_VERSION} tk${TK_WISH_VERSION} + tk86 tk8.6 + tk85 tk8.5 + tk84 tk8.4 + tk83 tk8.3 + tk82 tk8.2 + tk80 tk8.0 + PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + ) + +CMAKE_FIND_FRAMEWORKS(Tcl) +CMAKE_FIND_FRAMEWORKS(Tk) + +SET(TCL_FRAMEWORK_INCLUDES) +IF(Tcl_FRAMEWORKS) + IF(NOT TCL_INCLUDE_PATH) + FOREACH(dir ${Tcl_FRAMEWORKS}) + SET(TCL_FRAMEWORK_INCLUDES ${TCL_FRAMEWORK_INCLUDES} ${dir}/Headers) + ENDFOREACH(dir) + ENDIF(NOT TCL_INCLUDE_PATH) +ENDIF(Tcl_FRAMEWORKS) + +SET(TK_FRAMEWORK_INCLUDES) +IF(Tk_FRAMEWORKS) + IF(NOT TK_INCLUDE_PATH) + FOREACH(dir ${Tk_FRAMEWORKS}) + SET(TK_FRAMEWORK_INCLUDES ${TK_FRAMEWORK_INCLUDES} + ${dir}/Headers ${dir}/PrivateHeaders) + ENDFOREACH(dir) + ENDIF(NOT TK_INCLUDE_PATH) +ENDIF(Tk_FRAMEWORKS) + +SET(TCLTK_POSSIBLE_INCLUDE_PATHS + "${TCL_LIBRARY_PATH_PARENT}/include" + "${TK_LIBRARY_PATH_PARENT}/include" + "${TCL_INCLUDE_PATH}" + "${TK_INCLUDE_PATH}" + ${TCL_FRAMEWORK_INCLUDES} + ${TK_FRAMEWORK_INCLUDES} + "${TCL_TCLSH_PATH_PARENT}/include" + "${TK_WISH_PATH_PARENT}/include" + /usr/include + /usr/local/include + /usr/include/tcl${TK_LIBRARY_VERSION} + /usr/include/tcl${TCL_LIBRARY_VERSION} + /usr/include/tcl8.6 + /usr/include/tcl8.5 + /usr/include/tcl8.4 + /usr/include/tcl8.3 + /usr/include/tcl8.2 + /usr/include/tcl8.0 + ) + +IF(WIN32) + SET(TCLTK_POSSIBLE_INCLUDE_PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include" + "$ENV{ProgramFiles}/Tcl/include" + "C:/Program Files/Tcl/include" + "C:/Tcl/include" + ) +ENDIF(WIN32) + +FIND_PATH(TCL_INCLUDE_PATH + NAMES tcl.h + PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + NO_DEFAULT_PATH + ) +FIND_PATH(TCL_INCLUDE_PATH + NAMES tcl.h + PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + ) + +FIND_PATH(TK_INCLUDE_PATH + NAMES tk.h + PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + NO_DEFAULT_PATH + ) +FIND_PATH(TK_INCLUDE_PATH + NAMES tk.h + PATHS ${TCLTK_POSSIBLE_INCLUDE_PATHS} + ) + +# handle the QUIETLY and REQUIRED arguments and set TCL_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) + +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCL DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH) +SET(TCLTK_FIND_REQUIRED ${TCL_FIND_REQUIRED}) +SET(TCLTK_FIND_QUIETLY ${TCL_FIND_QUIETLY}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TCLTK DEFAULT_MSG TCL_LIBRARY TCL_INCLUDE_PATH TK_LIBRARY TK_INCLUDE_PATH) +SET(TK_FIND_REQUIRED ${TCL_FIND_REQUIRED}) +SET(TK_FIND_QUIETLY ${TCL_FIND_QUIETLY}) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TK DEFAULT_MSG TK_LIBRARY TK_INCLUDE_PATH) + +MARK_AS_ADVANCED( + TCL_INCLUDE_PATH + TK_INCLUDE_PATH + TCL_LIBRARY + TK_LIBRARY + ) diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake new file mode 100644 index 000000000..fbf804468 --- /dev/null +++ b/Modules/FindTIFF.cmake @@ -0,0 +1,22 @@ +# - Find TIFF library +# Find the native TIFF includes and library +# This module defines +# TIFF_INCLUDE_DIR, where to find tiff.h, etc. +# TIFF_LIBRARIES, libraries to link against to use TIFF. +# TIFF_FOUND, If false, do not try to use TIFF. +# also defined, but not for general use are +# TIFF_LIBRARY, where to find the TIFF library. + +FIND_PATH(TIFF_INCLUDE_DIR tiff.h) + +SET(TIFF_NAMES ${TIFF_NAMES} tiff) +FIND_LIBRARY(TIFF_LIBRARY NAMES ${TIFF_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(TIFF DEFAULT_MSG TIFF_LIBRARY TIFF_INCLUDE_DIR) + +IF(TIFF_FOUND) + SET( TIFF_LIBRARIES ${TIFF_LIBRARY} ) +ENDIF(TIFF_FOUND) diff --git a/Modules/FindTclStub.cmake b/Modules/FindTclStub.cmake new file mode 100644 index 000000000..788dbe4b5 --- /dev/null +++ b/Modules/FindTclStub.cmake @@ -0,0 +1,107 @@ +# - Find Tcl stub libraries. +# This module finds Tcl stub libraries. It first finds Tcl include files and +# libraries by calling FindTCL.cmake. +# How to Use the Tcl Stubs Library: +# http://tcl.activestate.com/doc/howto/stubs.html +# Using Stub Libraries: +# http://safari.oreilly.com/0130385603/ch48lev1sec3 +# This code sets the following variables: +# TCL_STUB_LIBRARY = path to Tcl stub library +# TK_STUB_LIBRARY = path to Tk stub library +# +# In an effort to remove some clutter and clear up some issues for people +# who are not necessarily Tcl/Tk gurus/developpers, some variables were +# moved or removed. Changes compared to CMake 2.4 are: +# - TCL_STUB_LIBRARY_DEBUG and TK_STUB_LIBRARY_DEBUG were removed. +# => these libs are not packaged by default with Tcl/Tk distributions. +# Even when Tcl/Tk is built from source, several flavors of debug libs +# are created and there is no real reason to pick a single one +# specifically (say, amongst tclstub84g, tclstub84gs, or tclstub84sgx). +# Let's leave that choice to the user by allowing him to assign +# TCL_STUB_LIBRARY to any Tcl library, debug or not. + +INCLUDE(FindTCL) + +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") + +GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) +GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") + +GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) + +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") + +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") + +SET(TCLTK_POSSIBLE_LIB_PATHS + "${TCL_INCLUDE_PATH_PARENT}/lib" + "${TK_INCLUDE_PATH_PARENT}/lib" + "${TCL_LIBRARY_PATH}" + "${TK_LIBRARY_PATH}" + "${TCL_TCLSH_PATH_PARENT}/lib" + "${TK_WISH_PATH_PARENT}/lib" + /usr/lib + /usr/local/lib +) + +IF(WIN32) + GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + SET(TCLTK_POSSIBLE_LIB_PATHS ${TCLTK_POSSIBLE_LIB_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/lib" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/lib" + "$ENV{ProgramFiles}/Tcl/Lib" + "C:/Program Files/Tcl/lib" + "C:/Tcl/lib" + ) +ENDIF(WIN32) + +FIND_LIBRARY(TCL_STUB_LIBRARY + NAMES + tclstub + tclstub${TK_LIBRARY_VERSION} tclstub${TCL_TCLSH_VERSION} tclstub${TK_WISH_VERSION} + tclstub86 tclstub8.6 + tclstub85 tclstub8.5 + tclstub84 tclstub8.4 + tclstub83 tclstub8.3 + tclstub82 tclstub8.2 + tclstub80 tclstub8.0 + PATHS ${TCLTK_POSSIBLE_LIB_PATHS} +) + +FIND_LIBRARY(TK_STUB_LIBRARY + NAMES + tkstub + tkstub${TCL_LIBRARY_VERSION} tkstub${TCL_TCLSH_VERSION} tkstub${TK_WISH_VERSION} + tkstub86 tkstub8.6 + tkstub85 tkstub8.5 + tkstub84 tkstub8.4 + tkstub83 tkstub8.3 + tkstub82 tkstub8.2 + tkstub80 tkstub8.0 + PATHS ${TCLTK_POSSIBLE_LIB_PATHS} +) + +MARK_AS_ADVANCED( + TCL_STUB_LIBRARY + TK_STUB_LIBRARY + ) diff --git a/Modules/FindTclsh.cmake b/Modules/FindTclsh.cmake new file mode 100644 index 000000000..d2cc86bf6 --- /dev/null +++ b/Modules/FindTclsh.cmake @@ -0,0 +1,81 @@ +# - Find tclsh +# This module finds if TCL is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# TCLSH_FOUND = TRUE if tclsh has been found +# TCL_TCLSH = the path to the tclsh executable +# In cygwin, look for the cygwin version first. Don't look for it later to +# avoid finding the cygwin version on a Win32 build. + +IF(WIN32 AND UNIX) + FIND_PROGRAM(TCL_TCLSH NAMES cygtclsh83 cygtclsh80) +ENDIF(WIN32 AND UNIX) + +GET_FILENAME_COMPONENT(TK_WISH_PATH "${TK_WISH}" PATH) +GET_FILENAME_COMPONENT(TK_WISH_PATH_PARENT "${TK_WISH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*wish([0-9]\\.*[0-9]).*$" "\\1" TK_WISH_VERSION "${TK_WISH}") + +GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) + +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") + +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") + +SET(TCLTK_POSSIBLE_BIN_PATHS + "${TCL_INCLUDE_PATH_PARENT}/bin" + "${TK_INCLUDE_PATH_PARENT}/bin" + "${TCL_LIBRARY_PATH_PARENT}/bin" + "${TK_LIBRARY_PATH_PARENT}/bin" + "${TK_WISH_PATH_PARENT}/bin" + ) + +IF(WIN32) + GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin" + ) +ENDIF(WIN32) + +SET(TCL_TCLSH_NAMES + tclsh + tclsh${TCL_LIBRARY_VERSION} tclsh${TK_LIBRARY_VERSION} tclsh${TK_WISH_VERSION} + tclsh86 tclsh8.6 + tclsh85 tclsh8.5 + tclsh84 tclsh8.4 + tclsh83 tclsh8.3 + tclsh82 tclsh8.2 + tclsh80 tclsh8.0 + ) + +FIND_PROGRAM(TCL_TCLSH + NAMES ${TCL_TCLSH_NAMES} + PATHS ${TCLTK_POSSIBLE_BIN_PATHS} NO_DEFAULT_PATH + ) +FIND_PROGRAM(TCL_TCLSH + NAMES ${TCL_TCLSH_NAMES} + PATHS ${TCLTK_POSSIBLE_BIN_PATHS} + ) + +# handle the QUIETLY and REQUIRED arguments and set TIFF_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Tclsh DEFAULT_MSG TCL_TCLSH) + +MARK_AS_ADVANCED(TCL_TCLSH) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake new file mode 100644 index 000000000..98031e2d0 --- /dev/null +++ b/Modules/FindThreads.cmake @@ -0,0 +1,119 @@ +# - This module determines the thread library of the system. +# The following variables are set +# CMAKE_THREAD_LIBS_INIT - the thread library +# CMAKE_USE_SPROC_INIT - are we using sproc? +# CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads? +# CMAKE_USE_PTHREADS_INIT - are we using pthreads +# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads + +INCLUDE (CheckIncludeFiles) +INCLUDE (CheckLibraryExists) + +# Do we have sproc? +IF(CMAKE_SYSTEM MATCHES IRIX) + CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H) +ENDIF(CMAKE_SYSTEM MATCHES IRIX) + +IF(CMAKE_HAVE_SPROC_H) + # We have sproc + SET(CMAKE_USE_SPROC_INIT 1) +ELSE(CMAKE_HAVE_SPROC_H) + # Do we have pthreads? + CHECK_INCLUDE_FILES("pthread.h" CMAKE_HAVE_PTHREAD_H) + IF(CMAKE_HAVE_PTHREAD_H) + # We have pthread.h + # Let's check for the library now. + SET(CMAKE_HAVE_THREADS_LIBRARY) + IF(NOT THREADS_HAVE_PTHREAD_ARG) + # Do we have -lpthreads + CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) + IF(CMAKE_HAVE_PTHREADS_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lpthreads") + SET(CMAKE_HAVE_THREADS_LIBRARY 1) + ENDIF(CMAKE_HAVE_PTHREADS_CREATE) + # Ok, how about -lpthread + CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) + IF(CMAKE_HAVE_PTHREAD_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lpthread") + SET(CMAKE_HAVE_THREADS_LIBRARY 1) + ENDIF(CMAKE_HAVE_PTHREAD_CREATE) + IF(CMAKE_SYSTEM MATCHES "SunOS.*") + # On sun also check for -lthread + CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) + IF(CMAKE_HAVE_THR_CREATE) + SET(CMAKE_THREAD_LIBS_INIT "-lthread") + SET(CMAKE_HAVE_THREADS_LIBRARY 1) + ENDIF(CMAKE_HAVE_THR_CREATE) + ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*") + ENDIF(NOT THREADS_HAVE_PTHREAD_ARG) + + IF(NOT CMAKE_HAVE_THREADS_LIBRARY) + # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread + IF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") + MESSAGE(STATUS "Check if compiler accepts -pthread") + TRY_RUN(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/CheckForPthreads.c + CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread + COMPILE_OUTPUT_VARIABLE OUTPUT) + IF(THREADS_HAVE_PTHREAD_ARG) + IF(THREADS_PTHREAD_ARG MATCHES "^2$") + MESSAGE(STATUS "Check if compiler accepts -pthread - yes") + ELSE(THREADS_PTHREAD_ARG MATCHES "^2$") + MESSAGE(STATUS "Check if compiler accepts -pthread - no") + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") + ENDIF(THREADS_PTHREAD_ARG MATCHES "^2$") + ELSE(THREADS_HAVE_PTHREAD_ARG) + MESSAGE(STATUS "Check if compiler accepts -pthread - no") + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") + ENDIF(THREADS_HAVE_PTHREAD_ARG) + ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG") + IF(THREADS_HAVE_PTHREAD_ARG) + SET(CMAKE_THREAD_LIBS_INIT "-pthread") + ENDIF(THREADS_HAVE_PTHREAD_ARG) + ENDIF(NOT CMAKE_HAVE_THREADS_LIBRARY) + ENDIF(CMAKE_HAVE_PTHREAD_H) +ENDIF(CMAKE_HAVE_SPROC_H) + +IF(CMAKE_THREAD_LIBS_INIT) + SET(CMAKE_USE_PTHREADS_INIT 1) +ENDIF(CMAKE_THREAD_LIBS_INIT) + +IF(CMAKE_SYSTEM MATCHES "Windows") + SET(CMAKE_USE_WIN32_THREADS_INIT 1) +ENDIF(CMAKE_SYSTEM MATCHES "Windows") + +IF(CMAKE_USE_PTHREADS_INIT) + IF(CMAKE_SYSTEM MATCHES "HP-UX-*") + # Use libcma if it exists and can be used. It provides more + # symbols than the plain pthread library. CMA threads + # have actually been deprecated: + # http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395 + # http://docs.hp.com/en/947/d8.html + # but we need to maintain compatibility here. + # The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads + # are available. + CHECK_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA) + IF(CMAKE_HAVE_HP_CMA) + SET(CMAKE_THREAD_LIBS_INIT "-lcma") + SET(CMAKE_HP_PTHREADS_INIT 1) + ENDIF(CMAKE_HAVE_HP_CMA) + SET(CMAKE_USE_PTHREADS_INIT 1) + ENDIF(CMAKE_SYSTEM MATCHES "HP-UX-*") + + IF(CMAKE_SYSTEM MATCHES "OSF1-V*") + SET(CMAKE_USE_PTHREADS_INIT 0) + SET(CMAKE_THREAD_LIBS_INIT ) + ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V*") + + IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*") + SET(CMAKE_USE_PTHREADS_INIT 1) + SET(CMAKE_THREAD_LIBS_INIT ) + SET(CMAKE_USE_WIN32_THREADS_INIT 0) + ENDIF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*") +ENDIF(CMAKE_USE_PTHREADS_INIT) + diff --git a/Modules/FindUnixCommands.cmake b/Modules/FindUnixCommands.cmake new file mode 100644 index 000000000..10a0bd87c --- /dev/null +++ b/Modules/FindUnixCommands.cmake @@ -0,0 +1,80 @@ +# - Find unix commands from cygwin +# This module looks for some usual Unix commands. +# + +INCLUDE(FindCygwin) + +FIND_PROGRAM(BASH + bash + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + BASH +) + +FIND_PROGRAM(CP + cp + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + CP +) + +FIND_PROGRAM(GZIP + gzip + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + GZIP +) + +FIND_PROGRAM(MV + mv + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + MV +) + +FIND_PROGRAM(RM + rm + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + RM +) + +FIND_PROGRAM(TAR + NAMES + tar + gtar + PATH + ${CYGWIN_INSTALL_PATH}/bin + /bin + /usr/bin + /usr/local/bin + /sbin +) +MARK_AS_ADVANCED( + TAR +) diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake new file mode 100644 index 000000000..6e42ba3fd --- /dev/null +++ b/Modules/FindVTK.cmake @@ -0,0 +1,140 @@ +# - Find a VTK installation or build tree. +# The following variables are set if VTK is found. If VTK is not +# found, VTK_FOUND is set to false. +# VTK_FOUND - Set to true when VTK is found. +# VTK_USE_FILE - CMake file to use VTK. +# VTK_MAJOR_VERSION - The VTK major version number. +# VTK_MINOR_VERSION - The VTK minor version number +# (odd non-release). +# VTK_BUILD_VERSION - The VTK patch level +# (meaningless for odd minor). +# VTK_INCLUDE_DIRS - Include directories for VTK +# VTK_LIBRARY_DIRS - Link directories for VTK libraries +# VTK_KITS - List of VTK kits, in CAPS +# (COMMON,IO,) etc. +# VTK_LANGUAGES - List of wrapped languages, in CAPS +# (TCL, PYHTON,) etc. +# The following cache entries must be set by the user to locate VTK: +# VTK_DIR - The directory containing VTKConfig.cmake. +# This is either the root of the build tree, +# or the lib/vtk directory. This is the +# only cache entry. +# The following variables are set for backward compatibility and +# should not be used in new code: +# USE_VTK_FILE - The full path to the UseVTK.cmake file. +# This is provided for backward +# compatibility. Use VTK_USE_FILE +# instead. +# + +# 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}") + +# Search only if the location is not already known. +IF(NOT VTK_DIR) + # Get the system search path as a list. + IF(UNIX) + STRING(REGEX MATCHALL "[^:]+" VTK_DIR_SEARCH1 "$ENV{PATH}") + ELSE(UNIX) + STRING(REGEX REPLACE "\\\\" "/" VTK_DIR_SEARCH1 "$ENV{PATH}") + ENDIF(UNIX) + STRING(REGEX REPLACE "/;" ";" VTK_DIR_SEARCH2 "${VTK_DIR_SEARCH1}") + + # Construct a set of paths relative to the system search path. + SET(VTK_DIR_SEARCH "") + FOREACH(dir ${VTK_DIR_SEARCH2}) + SET(VTK_DIR_SEARCH ${VTK_DIR_SEARCH} + ${dir}/../lib/vtk-5.2 + ${dir}/../lib/vtk-5.1 + ${dir}/../lib/vtk-5.0 + ${dir}/../lib/vtk + ) + ENDFOREACH(dir) + + # Old scripts may set these directories in the CMakeCache.txt file. + # They can tell us where to find VTKConfig.cmake. + SET(VTK_DIR_SEARCH_LEGACY "") + IF(VTK_BINARY_PATH AND USE_BUILT_VTK) + SET(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} ${VTK_BINARY_PATH}) + ENDIF(VTK_BINARY_PATH AND USE_BUILT_VTK) + IF(VTK_INSTALL_PATH AND USE_INSTALLED_VTK) + SET(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} + ${VTK_INSTALL_PATH}/lib/vtk) + ENDIF(VTK_INSTALL_PATH AND USE_INSTALLED_VTK) + + # + # Look for an installation or build tree. + # + FIND_PATH(VTK_DIR UseVTK.cmake + # Support legacy cache files. + ${VTK_DIR_SEARCH_LEGACY} + + # Look for an environment variable VTK_DIR. + $ENV{VTK_DIR} + + # Look in places relative to the system executable search path. + ${VTK_DIR_SEARCH} + + # Look in standard UNIX install locations. + /usr/local/lib/vtk + /usr/lib/vtk + + # Read from the CMakeSetup registry entries. It is likely that + # VTK will have been recently built. + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9] + [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10] + + # Help the user find it if we cannot. + DOC "The ${VTK_DIR_DESCRIPTION}" + ) +ENDIF(NOT VTK_DIR) + +# If VTK was found, load the configuration file to get the rest of the +# settings. +IF(VTK_DIR) + # Make sure the VTKConfig.cmake file exists in the directory provided. + IF(EXISTS ${VTK_DIR}/VTKConfig.cmake) + + # We found VTK. Load the settings. + SET(VTK_FOUND 1) + INCLUDE(${VTK_DIR}/VTKConfig.cmake) + + ELSE(EXISTS ${VTK_DIR}/VTKConfig.cmake) + IF(EXISTS ${VTK_DIR}/UseVTK.cmake) + # We found VTK 4.0 (UseVTK.cmake exists, but not VTKConfig.cmake). + SET(VTK_FOUND 1) + # Load settings for VTK 4.0. + INCLUDE(UseVTKConfig40) + ELSE(EXISTS ${VTK_DIR}/UseVTK.cmake) + # We did not find VTK. + SET(VTK_FOUND 0) + ENDIF(EXISTS ${VTK_DIR}/UseVTK.cmake) + ENDIF(EXISTS ${VTK_DIR}/VTKConfig.cmake) +ELSE(VTK_DIR) + # We did not find VTK. + SET(VTK_FOUND 0) +ENDIF(VTK_DIR) + +#----------------------------------------------------------------------------- +IF(VTK_FOUND) + # Set USE_VTK_FILE for backward-compatability. + SET(USE_VTK_FILE ${VTK_USE_FILE}) +ELSE(VTK_FOUND) + # VTK not found, explain to the user how to specify its location. + IF(VTK_FIND_REQUIRED) + MESSAGE(FATAL_ERROR ${VTK_DIR_MESSAGE}) + ELSE(VTK_FIND_REQUIRED) + IF(NOT VTK_FIND_QUIETLY) + MESSAGE(STATUS ${VTK_DIR_MESSAGE}) + ENDIF(NOT VTK_FIND_QUIETLY) + ENDIF(VTK_FIND_REQUIRED) +ENDIF(VTK_FOUND) diff --git a/Modules/FindWget.cmake b/Modules/FindWget.cmake new file mode 100644 index 000000000..ff4134744 --- /dev/null +++ b/Modules/FindWget.cmake @@ -0,0 +1,23 @@ +# - Find wget +# This module looks for wget. This module defines the +# following values: +# WGET_EXECUTABLE: the full path to the wget tool. +# WGET_FOUND: True if wget has been found. + +INCLUDE(FindCygwin) + +FIND_PROGRAM(WGET_EXECUTABLE + wget + ${CYGWIN_INSTALL_PATH}/bin +) + +# handle the QUIETLY and REQUIRED arguments and set WGET_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Wget DEFAULT_MSG WGET_EXECUTABLE) + +MARK_AS_ADVANCED( WGET_EXECUTABLE ) + +# WGET option is deprecated. +# use WGET_EXECUTABLE instead. +SET (WGET ${WGET_EXECUTABLE} ) diff --git a/Modules/FindWish.cmake b/Modules/FindWish.cmake new file mode 100644 index 000000000..86e9c6761 --- /dev/null +++ b/Modules/FindWish.cmake @@ -0,0 +1,75 @@ +# - Find wish installation +# This module finds if TCL is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# TK_WISH = the path to the wish executable +# +# if UNIX is defined, then it will look for the cygwin version first +IF(UNIX) + FIND_PROGRAM(TK_WISH cygwish80 ) +ENDIF(UNIX) + +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH "${TCL_TCLSH}" PATH) +GET_FILENAME_COMPONENT(TCL_TCLSH_PATH_PARENT "${TCL_TCLSH_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tclsh([0-9]\\.*[0-9]).*$" "\\1" TCL_TCLSH_VERSION "${TCL_TCLSH}") + +GET_FILENAME_COMPONENT(TCL_INCLUDE_PATH_PARENT "${TCL_INCLUDE_PATH}" PATH) +GET_FILENAME_COMPONENT(TK_INCLUDE_PATH_PARENT "${TK_INCLUDE_PATH}" PATH) + +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH "${TCL_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TCL_LIBRARY_PATH_PARENT "${TCL_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tcl([0-9]\\.*[0-9]).*$" "\\1" TCL_LIBRARY_VERSION "${TCL_LIBRARY}") + +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH "${TK_LIBRARY}" PATH) +GET_FILENAME_COMPONENT(TK_LIBRARY_PATH_PARENT "${TK_LIBRARY_PATH}" PATH) +STRING(REGEX REPLACE + "^.*tk([0-9]\\.*[0-9]).*$" "\\1" TK_LIBRARY_VERSION "${TK_LIBRARY}") + +SET(TCLTK_POSSIBLE_BIN_PATHS + "${TCL_INCLUDE_PATH_PARENT}/bin" + "${TK_INCLUDE_PATH_PARENT}/bin" + "${TCL_LIBRARY_PATH_PARENT}/bin" + "${TK_LIBRARY_PATH_PARENT}/bin" + "${TCL_TCLSH_PATH_PARENT}/bin" + ) + +IF(WIN32) + GET_FILENAME_COMPONENT( + ActiveTcl_CurrentVersion + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl;CurrentVersion]" + NAME) + SET(TCLTK_POSSIBLE_BIN_PATHS ${TCLTK_POSSIBLE_BIN_PATHS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.6;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.5;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.4;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/bin" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/bin" + ) +ENDIF(WIN32) + +SET(TK_WISH_NAMES + wish + wish${TCL_LIBRARY_VERSION} wish${TK_LIBRARY_VERSION} wish${TCL_TCLSH_VERSION} + wish86 wish8.6 + wish85 wish8.5 + wish84 wish8.4 + wish83 wish8.3 + wish82 wish8.2 + wish80 wish8.0 + ) + +FIND_PROGRAM(TK_WISH + NAMES ${TK_WISH_NAMES} + PATHS ${TCLTK_POSSIBLE_BIN_PATHS} NO_DEFAULT_PATH + ) +FIND_PROGRAM(TK_WISH + NAMES ${TK_WISH_NAMES} + PATHS ${TCLTK_POSSIBLE_BIN_PATHS} + ) + +MARK_AS_ADVANCED(TK_WISH) diff --git a/Modules/FindX11.cmake b/Modules/FindX11.cmake new file mode 100644 index 000000000..0db6abed1 --- /dev/null +++ b/Modules/FindX11.cmake @@ -0,0 +1,425 @@ +# - Find X11 installation +# Try to find X11 on UNIX systems. The following values are defined +# X11_FOUND - True if X11 is available +# X11_INCLUDE_DIR - include directories to use X11 +# X11_LIBRARIES - link against these to use X11 +# +# and also the following more fine grained variables: +# Include paths: X11_ICE_INCLUDE_PATH, X11_ICE_LIB, X11_ICE_FOUND +# X11_Xaccessrules_INCLUDE_PATH, X11_Xaccess_FOUND +# X11_Xaccessstr_INCLUDE_PATH, X11_Xaccess_FOUND +# X11_Xau_INCLUDE_PATH, X11_Xau_LIB, X11_Xau_FOUND +# X11_Xcomposite_INCLUDE_PATH, X11_Xcomposite_LIB, X11_Xcomposite_FOUND +# X11_Xcursor_INCLUDE_PATH, X11_Xcursor_LIB, X11_Xcursor_FOUND +# X11_Xdamage_INCLUDE_PATH, X11_Xdamage_LIB, X11_Xdamage_FOUND +# X11_Xdmcp_INCLUDE_PATH, X11_Xdmcp_LIB, X11_Xdmcp_FOUND +# X11_Xext_LIB, X11_Xext_FOUND +# X11_dpms_INCLUDE_PATH, (in X11_Xext_LIB), X11_dpms_FOUND +# X11_XShm_INCLUDE_PATH, (in X11_Xext_LIB), X11_XShm_FOUND +# X11_Xshape_INCLUDE_PATH, (in X11_Xext_LIB), X11_Xshape_FOUND +# X11_xf86misc_INCLUDE_PATH, X11_Xxf86misc_LIB, X11_xf86misc_FOUND +# X11_xf86vmode_INCLUDE_PATH, X11_xf86vmode_FOUND +# X11_Xfixes_INCLUDE_PATH, X11_Xfixes_LIB, X11_Xfixes_FOUND +# X11_Xft_INCLUDE_PATH, X11_Xft_LIB, X11_Xft_FOUND +# X11_Xinerama_INCLUDE_PATH, X11_Xinerama_LIB, X11_Xinerama_FOUND +# X11_Xinput_INCLUDE_PATH, X11_Xinput_LIB, X11_Xinput_FOUND +# X11_Xkb_INCLUDE_PATH, X11_Xkb_FOUND +# X11_Xkblib_INCLUDE_PATH, X11_Xkb_FOUND +# X11_Xpm_INCLUDE_PATH, X11_Xpm_LIB, X11_Xpm_FOUND +# X11_XTest_INCLUDE_PATH, X11_XTest_LIB, X11_XTest_FOUND +# X11_Xrandr_INCLUDE_PATH, X11_Xrandr_LIB, X11_Xrandr_FOUND +# X11_Xrender_INCLUDE_PATH, X11_Xrender_LIB, X11_Xrender_FOUND +# X11_Xscreensaver_INCLUDE_PATH, X11_Xscreensaver_LIB, X11_Xscreensaver_FOUND +# X11_Xt_INCLUDE_PATH, X11_Xt_LIB, X11_Xt_FOUND +# 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. + +IF (UNIX) + SET(X11_FOUND 0) + # X11 is never a framework and some header files may be + # found in tcl on the mac + SET(CMAKE_FIND_FRAMEWORK_SAVE ${CMAKE_FIND_FRAMEWORK}) + SET(CMAKE_FIND_FRAMEWORK NEVER) + SET(X11_INC_SEARCH_PATH + /usr/pkg/xorg/include + /usr/X11R6/include + /usr/local/include + /usr/include/X11 + /usr/openwin/include + /usr/openwin/share/include + /opt/graphics/OpenGL/include + /usr/include + ) + + SET(X11_LIB_SEARCH_PATH + /usr/pkg/xorg/lib + /usr/X11R6/lib + /usr/local/lib + /usr/openwin/lib + /usr/lib + ) + + FIND_PATH(X11_X11_INCLUDE_PATH X11/X.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xlib_INCLUDE_PATH X11/Xlib.h ${X11_INC_SEARCH_PATH}) + + # Look for includes; keep the list sorted by name of the cmake *_INCLUDE_PATH + # variable (which doesn't need to match the include file name). + + # Solaris lacks XKBrules.h, so we should skip kxkbd there. + FIND_PATH(X11_ICE_INCLUDE_PATH X11/ICE/ICE.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xaccessrules_INCLUDE_PATH X11/extensions/XKBrules.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xaccessstr_INCLUDE_PATH X11/extensions/XKBstr.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xau_INCLUDE_PATH X11/Xauth.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xcomposite_INCLUDE_PATH X11/extensions/Xcomposite.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xcursor_INCLUDE_PATH X11/Xcursor/Xcursor.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xdamage_INCLUDE_PATH X11/extensions/Xdamage.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xdmcp_INCLUDE_PATH X11/Xdmcp.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_dpms_INCLUDE_PATH X11/extensions/dpms.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_xf86misc_INCLUDE_PATH X11/extensions/xf86misc.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_xf86vmode_INCLUDE_PATH X11/extensions/xf86vmode.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xfixes_INCLUDE_PATH X11/extensions/Xfixes.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xft_INCLUDE_PATH X11/Xft/Xft.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xinerama_INCLUDE_PATH X11/extensions/Xinerama.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xinput_INCLUDE_PATH X11/extensions/XInput.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xkb_INCLUDE_PATH X11/extensions/XKB.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xkblib_INCLUDE_PATH X11/XKBlib.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xpm_INCLUDE_PATH X11/xpm.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_XTest_INCLUDE_PATH X11/extensions/XTest.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_XShm_INCLUDE_PATH X11/extensions/XShm.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xrandr_INCLUDE_PATH X11/extensions/Xrandr.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xrender_INCLUDE_PATH X11/extensions/Xrender.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xscreensaver_INCLUDE_PATH X11/extensions/scrnsaver.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xshape_INCLUDE_PATH X11/extensions/shape.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xutil_INCLUDE_PATH X11/Xutil.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xt_INCLUDE_PATH X11/Intrinsic.h ${X11_INC_SEARCH_PATH}) + FIND_PATH(X11_Xv_INCLUDE_PATH X11/extensions/Xvlib.h ${X11_INC_SEARCH_PATH}) + + + FIND_LIBRARY(X11_X11_LIB X11 ${X11_LIB_SEARCH_PATH}) + + # Find additional X libraries. Keep list sorted by library name. + FIND_LIBRARY(X11_ICE_LIB ICE ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_SM_LIB SM ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xau_LIB Xau ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xcomposite_LIB Xcomposite ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xcursor_LIB Xcursor ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xdamage_LIB Xdamage ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xdmcp_LIB Xdmcp ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xext_LIB Xext ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xfixes_LIB Xfixes ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xft_LIB Xft ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xinerama_LIB Xinerama ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xinput_LIB Xi ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xpm_LIB Xpm ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xrandr_LIB Xrandr ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xscreensaver_LIB Xss ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xt_LIB Xt ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_XTest_LIB Xtst ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xv_LIB Xv ${X11_LIB_SEARCH_PATH}) + FIND_LIBRARY(X11_Xxf86misc_LIB Xxf86misc ${X11_LIB_SEARCH_PATH}) + + SET(X11_LIBRARY_DIR "") + IF(X11_X11_LIB) + GET_FILENAME_COMPONENT(X11_LIBRARY_DIR ${X11_X11_LIB} PATH) + ENDIF(X11_X11_LIB) + + SET(X11_INCLUDE_DIR) # start with empty list + IF(X11_X11_INCLUDE_PATH) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH}) + ENDIF(X11_X11_INCLUDE_PATH) + + IF(X11_Xlib_INCLUDE_PATH) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xlib_INCLUDE_PATH}) + ENDIF(X11_Xlib_INCLUDE_PATH) + + IF(X11_Xutil_INCLUDE_PATH) + SET(X11_Xutil_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xutil_INCLUDE_PATH}) + ENDIF(X11_Xutil_INCLUDE_PATH) + + IF(X11_Xshape_INCLUDE_PATH) + SET(X11_Xshape_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xshape_INCLUDE_PATH}) + ENDIF(X11_Xshape_INCLUDE_PATH) + + SET(X11_LIBRARIES) # start with empty list + IF(X11_X11_LIB) + SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_X11_LIB}) + ENDIF(X11_X11_LIB) + + IF(X11_Xext_LIB) + SET(X11_Xext_FOUND TRUE) + SET(X11_LIBRARIES ${X11_LIBRARIES} ${X11_Xext_LIB}) + ENDIF(X11_Xext_LIB) + + IF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH) + SET(X11_Xt_FOUND TRUE) + ENDIF(X11_Xt_LIB AND X11_Xt_INCLUDE_PATH) + + IF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) + SET(X11_Xft_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xft_INCLUDE_PATH}) + ENDIF(X11_Xft_LIB AND X11_Xft_INCLUDE_PATH) + + IF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH) + SET(X11_Xv_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xv_INCLUDE_PATH}) + ENDIF(X11_Xv_LIB AND X11_Xv_INCLUDE_PATH) + + IF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) + SET(X11_Xau_FOUND TRUE) + ENDIF (X11_Xau_LIB AND X11_Xau_INCLUDE_PATH) + + IF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) + SET(X11_Xdmcp_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdmcp_INCLUDE_PATH}) + ENDIF (X11_Xdmcp_INCLUDE_PATH AND X11_Xdmcp_LIB) + + IF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH) + SET(X11_Xaccess_FOUND TRUE) + SET(X11_Xaccess_INCLUDE_PATH ${X11_Xaccessstr_INCLUDE_PATH}) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xaccess_INCLUDE_PATH}) + ENDIF (X11_Xaccessrules_INCLUDE_PATH AND X11_Xaccessstr_INCLUDE_PATH) + + IF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) + SET(X11_Xpm_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xpm_INCLUDE_PATH}) + ENDIF (X11_Xpm_INCLUDE_PATH AND X11_Xpm_LIB) + + IF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) + SET(X11_Xcomposite_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcomposite_INCLUDE_PATH}) + ENDIF (X11_Xcomposite_INCLUDE_PATH AND X11_Xcomposite_LIB) + + IF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) + SET(X11_Xdamage_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xdamage_INCLUDE_PATH}) + ENDIF (X11_Xdamage_INCLUDE_PATH AND X11_Xdamage_LIB) + + IF (X11_XShm_INCLUDE_PATH) + SET(X11_XShm_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XShm_INCLUDE_PATH}) + ENDIF (X11_XShm_INCLUDE_PATH) + + IF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB) + SET(X11_XTest_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_XTest_INCLUDE_PATH}) + ENDIF (X11_XTest_INCLUDE_PATH AND X11_XTest_LIB) + + IF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) + SET(X11_Xinerama_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinerama_INCLUDE_PATH}) + ENDIF (X11_Xinerama_INCLUDE_PATH AND X11_Xinerama_LIB) + + IF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) + SET(X11_Xfixes_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xfixes_INCLUDE_PATH}) + ENDIF (X11_Xfixes_INCLUDE_PATH AND X11_Xfixes_LIB) + + IF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) + SET(X11_Xrender_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrender_INCLUDE_PATH}) + ENDIF (X11_Xrender_INCLUDE_PATH AND X11_Xrender_LIB) + + IF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) + SET(X11_Xrandr_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xrandr_INCLUDE_PATH}) + ENDIF (X11_Xrandr_INCLUDE_PATH AND X11_Xrandr_LIB) + + IF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) + SET(X11_xf86misc_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86misc_INCLUDE_PATH}) + ENDIF (X11_xf86misc_INCLUDE_PATH AND X11_Xxf86misc_LIB) + + IF (X11_xf86vmode_INCLUDE_PATH) + SET(X11_xf86vmode_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_xf86vmode_INCLUDE_PATH}) + ENDIF (X11_xf86vmode_INCLUDE_PATH) + + IF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB) + SET(X11_Xcursor_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xcursor_INCLUDE_PATH}) + ENDIF (X11_Xcursor_INCLUDE_PATH AND X11_Xcursor_LIB) + + IF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB) + SET(X11_Xscreensaver_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xscreensaver_INCLUDE_PATH}) + ENDIF (X11_Xscreensaver_INCLUDE_PATH AND X11_Xscreensaver_LIB) + + IF (X11_dpms_INCLUDE_PATH) + SET(X11_dpms_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_dpms_INCLUDE_PATH}) + ENDIF (X11_dpms_INCLUDE_PATH) + + IF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH) + SET(X11_Xkb_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xkb_INCLUDE_PATH} ) + ENDIF (X11_Xkb_INCLUDE_PATH AND X11_Xkblib_INCLUDE_PATH AND X11_Xlib_INCLUDE_PATH) + + IF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB) + SET(X11_Xinput_FOUND TRUE) + SET(X11_INCLUDE_DIR ${X11_INCLUDE_DIR} ${X11_Xinput_INCLUDE_PATH}) + ENDIF (X11_Xinput_INCLUDE_PATH AND X11_Xinput_LIB) + + IF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) + SET(X11_ICE_FOUND TRUE) + ENDIF(X11_ICE_LIB AND X11_ICE_INCLUDE_PATH) + + # Deprecated variable for backwards compatibility with CMake 1.4 + IF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) + SET(X11_FOUND 1) + ENDIF (X11_X11_INCLUDE_PATH AND X11_LIBRARIES) + + IF(X11_FOUND) + INCLUDE(CheckFunctionExists) + INCLUDE(CheckLibraryExists) + + # Translated from an autoconf-generated configure script. + # See libs.m4 in autoconf's m4 directory. + IF($ENV{ISC} MATCHES "^yes$") + SET(X11_X_EXTRA_LIBS -lnsl_s -linet) + ELSE($ENV{ISC} MATCHES "^yes$") + SET(X11_X_EXTRA_LIBS "") + + # See if XOpenDisplay in X11 works by itself. + CHECK_LIBRARY_EXISTS("${X11_LIBRARIES}" "XOpenDisplay" "${X11_LIBRARY_DIR}" X11_LIB_X11_SOLO) + IF(NOT X11_LIB_X11_SOLO) + # Find library needed for dnet_ntoa. + CHECK_LIBRARY_EXISTS("dnet" "dnet_ntoa" "" X11_LIB_DNET_HAS_DNET_NTOA) + IF (X11_LIB_DNET_HAS_DNET_NTOA) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet) + ELSE (X11_LIB_DNET_HAS_DNET_NTOA) + CHECK_LIBRARY_EXISTS("dnet_stub" "dnet_ntoa" "" X11_LIB_DNET_STUB_HAS_DNET_NTOA) + IF (X11_LIB_DNET_STUB_HAS_DNET_NTOA) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -ldnet_stub) + ENDIF (X11_LIB_DNET_STUB_HAS_DNET_NTOA) + ENDIF (X11_LIB_DNET_HAS_DNET_NTOA) + ENDIF(NOT X11_LIB_X11_SOLO) + + # Find library needed for gethostbyname. + CHECK_FUNCTION_EXISTS("gethostbyname" CMAKE_HAVE_GETHOSTBYNAME) + IF(NOT CMAKE_HAVE_GETHOSTBYNAME) + CHECK_LIBRARY_EXISTS("nsl" "gethostbyname" "" CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + IF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lnsl) + ELSE (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + CHECK_LIBRARY_EXISTS("bsd" "gethostbyname" "" CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + IF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lbsd) + ENDIF (CMAKE_LIB_BSD_HAS_GETHOSTBYNAME) + ENDIF (CMAKE_LIB_NSL_HAS_GETHOSTBYNAME) + ENDIF(NOT CMAKE_HAVE_GETHOSTBYNAME) + + # Find library needed for connect. + CHECK_FUNCTION_EXISTS("connect" CMAKE_HAVE_CONNECT) + IF(NOT CMAKE_HAVE_CONNECT) + CHECK_LIBRARY_EXISTS("socket" "connect" "" CMAKE_LIB_SOCKET_HAS_CONNECT) + IF (CMAKE_LIB_SOCKET_HAS_CONNECT) + SET (X11_X_EXTRA_LIBS -lsocket ${X11_X_EXTRA_LIBS}) + ENDIF (CMAKE_LIB_SOCKET_HAS_CONNECT) + ENDIF(NOT CMAKE_HAVE_CONNECT) + + # Find library needed for remove. + CHECK_FUNCTION_EXISTS("remove" CMAKE_HAVE_REMOVE) + IF(NOT CMAKE_HAVE_REMOVE) + CHECK_LIBRARY_EXISTS("posix" "remove" "" CMAKE_LIB_POSIX_HAS_REMOVE) + IF (CMAKE_LIB_POSIX_HAS_REMOVE) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lposix) + ENDIF (CMAKE_LIB_POSIX_HAS_REMOVE) + ENDIF(NOT CMAKE_HAVE_REMOVE) + + # Find library needed for shmat. + CHECK_FUNCTION_EXISTS("shmat" CMAKE_HAVE_SHMAT) + IF(NOT CMAKE_HAVE_SHMAT) + CHECK_LIBRARY_EXISTS("ipc" "shmat" "" CMAKE_LIB_IPS_HAS_SHMAT) + IF (CMAKE_LIB_IPS_HAS_SHMAT) + SET (X11_X_EXTRA_LIBS ${X11_X_EXTRA_LIBS} -lipc) + ENDIF (CMAKE_LIB_IPS_HAS_SHMAT) + ENDIF(NOT CMAKE_HAVE_SHMAT) + ENDIF($ENV{ISC} MATCHES "^yes$") + + IF (X11_ICE_FOUND) + CHECK_LIBRARY_EXISTS("ICE" "IceConnectionNumber" "${X11_LIBRARY_DIR}" + CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) + IF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) + SET (X11_X_PRE_LIBS ${X11_ICE_LIB}) + IF(X11_SM_LIB) + SET (X11_X_PRE_LIBS ${X11_SM_LIB} ${X11_X_PRE_LIBS}) + ENDIF(X11_SM_LIB) + ENDIF(CMAKE_LIB_ICE_HAS_ICECONNECTIONNUMBER) + ENDIF (X11_ICE_FOUND) + + # Build the final list of libraries. + SET(X11_LIBRARIES ${X11_X_PRE_LIBS} ${X11_LIBRARIES} ${X11_X_EXTRA_LIBS}) + + INCLUDE(FindPackageMessage) + FIND_PACKAGE_MESSAGE(X11 "Found X11: ${X11_X11_LIB}" + "[${X11_X11_LIB}][${X11_INCLUDE_DIR}]") + ELSE (X11_FOUND) + IF (X11_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find X11") + ENDIF (X11_FIND_REQUIRED) + ENDIF (X11_FOUND) + + MARK_AS_ADVANCED( + X11_X11_INCLUDE_PATH + X11_X11_LIB + X11_Xext_LIB + X11_Xau_LIB + X11_Xau_INCLUDE_PATH + X11_Xlib_INCLUDE_PATH + X11_Xutil_INCLUDE_PATH + X11_Xcomposite_INCLUDE_PATH + X11_Xcomposite_LIB + X11_Xaccess_INCLUDE_PATH + X11_Xfixes_LIB + X11_Xfixes_INCLUDE_PATH + X11_Xrandr_LIB + X11_Xrandr_INCLUDE_PATH + X11_Xdamage_LIB + X11_Xdamage_INCLUDE_PATH + X11_Xrender_LIB + X11_Xrender_INCLUDE_PATH + X11_Xxf86misc_LIB + X11_xf86misc_INCLUDE_PATH + X11_xf86vmode_INCLUDE_PATH + X11_Xinerama_LIB + X11_Xinerama_INCLUDE_PATH + X11_XTest_LIB + X11_XTest_INCLUDE_PATH + X11_Xcursor_LIB + X11_Xcursor_INCLUDE_PATH + X11_dpms_INCLUDE_PATH + X11_Xt_LIB + X11_Xt_INCLUDE_PATH + X11_Xdmcp_LIB + X11_LIBRARIES + X11_Xaccessrules_INCLUDE_PATH + X11_Xaccessstr_INCLUDE_PATH + X11_Xdmcp_INCLUDE_PATH + X11_Xkb_INCLUDE_PATH + X11_Xkblib_INCLUDE_PATH + X11_Xscreensaver_INCLUDE_PATH + X11_Xscreensaver_LIB + X11_Xpm_INCLUDE_PATH + X11_Xpm_LIB + X11_Xinput_LIB + X11_Xinput_INCLUDE_PATH + X11_Xft_LIB + X11_Xft_INCLUDE_PATH + X11_Xshape_INCLUDE_PATH + X11_Xv_LIB + X11_Xv_INCLUDE_PATH + X11_XShm_INCLUDE_PATH + X11_ICE_LIB + X11_ICE_INCLUDE_PATH + X11_SM_LIB + ) + SET(CMAKE_FIND_FRAMEWORK ${CMAKE_FIND_FRAMEWORK_SAVE}) +ENDIF (UNIX) + +# X11_FIND_REQUIRED_ could be checked too diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake new file mode 100644 index 000000000..2e8f1ad0f --- /dev/null +++ b/Modules/FindXMLRPC.cmake @@ -0,0 +1,135 @@ +# - Find xmlrpc +# Find the native XMLRPC headers and libraries. +# XMLRPC_INCLUDE_DIRS - where to find xmlrpc.h, etc. +# XMLRPC_LIBRARIES - List of libraries when using xmlrpc. +# XMLRPC_FOUND - True if xmlrpc found. +# XMLRPC modules may be specified as components for this find module. +# Modules may be listed by running "xmlrpc-c-config". Modules include: +# c++ C++ wrapper code +# libwww-client libwww-based client +# cgi-server CGI-based server +# abyss-server ABYSS-based server +# Typical usage: +# FIND_PACKAGE(XMLRPC REQUIRED libwww-client) + +# First find the config script from which to obtain other values. +FIND_PROGRAM(XMLRPC_C_CONFIG NAMES xmlrpc-c-config) + +# Check whether we found anything. +IF(XMLRPC_C_CONFIG) + SET(XMLRPC_FOUND 1) +ELSE(XMLRPC_C_CONFIG) + SET(XMLRPC_FOUND 0) +ENDIF(XMLRPC_C_CONFIG) + +# Lookup the include directories needed for the components requested. +IF(XMLRPC_FOUND) + # Use the newer EXECUTE_PROCESS command if it is available. + IF(COMMAND EXECUTE_PROCESS) + EXECUTE_PROCESS( + COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --cflags + OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT + ) + ELSE(COMMAND EXECUTE_PROCESS) + EXEC_PROGRAM(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --cflags" + OUTPUT_VARIABLE XMLRPC_C_CONFIG_CFLAGS + RETURN_VALUE XMLRPC_C_CONFIG_RESULT + ) + ENDIF(COMMAND EXECUTE_PROCESS) + + # Parse the include flags. + IF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + # Convert the compile flags to a CMake list. + STRING(REGEX REPLACE " +" ";" + XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}") + + # Look for -I options. + SET(XMLRPC_INCLUDE_DIRS) + FOREACH(flag ${XMLRPC_C_CONFIG_CFLAGS}) + IF("${flag}" MATCHES "^-I") + STRING(REGEX REPLACE "^-I" "" DIR "${flag}") + FILE(TO_CMAKE_PATH "${DIR}" DIR) + SET(XMLRPC_INCLUDE_DIRS ${XMLRPC_INCLUDE_DIRS} "${DIR}") + ENDIF("${flag}" MATCHES "^-I") + ENDFOREACH(flag) + ELSE("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + MESSAGE("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]") + SET(XMLRPC_FOUND 0) + ENDIF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") +ENDIF(XMLRPC_FOUND) + +# Lookup the libraries needed for the components requested. +IF(XMLRPC_FOUND) + # Use the newer EXECUTE_PROCESS command if it is available. + IF(COMMAND EXECUTE_PROCESS) + EXECUTE_PROCESS( + COMMAND ${XMLRPC_C_CONFIG} ${XMLRPC_FIND_COMPONENTS} --libs + OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE XMLRPC_C_CONFIG_RESULT + ) + ELSE(COMMAND EXECUTE_PROCESS) + EXEC_PROGRAM(${XMLRPC_C_CONFIG} ARGS "${XMLRPC_FIND_COMPONENTS} --libs" + OUTPUT_VARIABLE XMLRPC_C_CONFIG_LIBS + RETURN_VALUE XMLRPC_C_CONFIG_RESULT + ) + ENDIF(COMMAND EXECUTE_PROCESS) + + # Parse the library names and directories. + IF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + STRING(REGEX REPLACE " +" ";" + XMLRPC_C_CONFIG_LIBS "${XMLRPC_C_CONFIG_LIBS}") + + # Look for -L flags for directories and -l flags for library names. + SET(XMLRPC_LIBRARY_DIRS) + SET(XMLRPC_LIBRARY_NAMES) + FOREACH(flag ${XMLRPC_C_CONFIG_LIBS}) + IF("${flag}" MATCHES "^-L") + STRING(REGEX REPLACE "^-L" "" DIR "${flag}") + FILE(TO_CMAKE_PATH "${DIR}" DIR) + SET(XMLRPC_LIBRARY_DIRS ${XMLRPC_LIBRARY_DIRS} "${DIR}") + ELSEIF("${flag}" MATCHES "^-l") + STRING(REGEX REPLACE "^-l" "" NAME "${flag}") + SET(XMLRPC_LIBRARY_NAMES ${XMLRPC_LIBRARY_NAMES} "${NAME}") + ENDIF("${flag}" MATCHES "^-L") + ENDFOREACH(flag) + + # Search for each library needed using the directories given. + FOREACH(name ${XMLRPC_LIBRARY_NAMES}) + # Look for this library. + FIND_LIBRARY(XMLRPC_${name}_LIBRARY + NAMES ${name} + PATHS ${XMLRPC_LIBRARY_DIRS} + NO_DEFAULT_PATH + ) + FIND_LIBRARY(XMLRPC_${name}_LIBRARY NAMES ${name}) + MARK_AS_ADVANCED(XMLRPC_${name}_LIBRARY) + + # If any library is not found then the whole package is not found. + IF(NOT XMLRPC_${name}_LIBRARY) + SET(XMLRPC_FOUND 0) + ENDIF(NOT XMLRPC_${name}_LIBRARY) + + # Build an ordered list of all the libraries needed. + SET(XMLRPC_LIBRARIES ${XMLRPC_LIBRARIES} "${XMLRPC_${name}_LIBRARY}") + ENDFOREACH(name) + ELSE("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") + MESSAGE("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]") + SET(XMLRPC_FOUND 0) + ENDIF("${XMLRPC_C_CONFIG_RESULT}" MATCHES "^0$") +ENDIF(XMLRPC_FOUND) + +# Report the results. +IF(NOT XMLRPC_FOUND) + SET(XMLRPC_DIR_MESSAGE + "XMLRPC was not found. Make sure the entries XMLRPC_* are set.") + IF(NOT XMLRPC_FIND_QUIETLY) + MESSAGE(STATUS "${XMLRPC_DIR_MESSAGE}") + ELSE(NOT XMLRPC_FIND_QUIETLY) + IF(XMLRPC_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${XMLRPC_DIR_MESSAGE}") + ENDIF(XMLRPC_FIND_REQUIRED) + ENDIF(NOT XMLRPC_FIND_QUIETLY) +ENDIF(NOT XMLRPC_FOUND) diff --git a/Modules/FindZLIB.cmake b/Modules/FindZLIB.cmake new file mode 100644 index 000000000..23ea93726 --- /dev/null +++ b/Modules/FindZLIB.cmake @@ -0,0 +1,30 @@ +# - Find zlib +# Find the native ZLIB includes and library +# +# ZLIB_INCLUDE_DIR - where to find zlib.h, etc. +# ZLIB_LIBRARIES - List of libraries when using zlib. +# ZLIB_FOUND - True if zlib found. + + +IF (ZLIB_INCLUDE_DIR) + # Already in cache, be silent + SET(ZLIB_FIND_QUIETLY TRUE) +ENDIF (ZLIB_INCLUDE_DIR) + +FIND_PATH(ZLIB_INCLUDE_DIR zlib.h) + +SET(ZLIB_NAMES z zlib zdll) +FIND_LIBRARY(ZLIB_LIBRARY NAMES ${ZLIB_NAMES} ) + +# handle the QUIETLY and REQUIRED arguments and set ZLIB_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZLIB DEFAULT_MSG ZLIB_LIBRARY ZLIB_INCLUDE_DIR) + +IF(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} ) +ELSE(ZLIB_FOUND) + SET( ZLIB_LIBRARIES ) +ENDIF(ZLIB_FOUND) + +MARK_AS_ADVANCED( ZLIB_LIBRARY ZLIB_INCLUDE_DIR ) diff --git a/Modules/Findosg.cmake b/Modules/Findosg.cmake new file mode 100644 index 000000000..1a4598c8e --- /dev/null +++ b/Modules/Findosg.cmake @@ -0,0 +1,79 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osg +# This module defines +# OSG_LIBRARY +# OSG_FOUND, if false, do not try to link to osg +# OSG_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSG_INCLUDE_DIR osg/PositionAttitudeTransform + PATHS + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSG_INCLUDE_DIR osg/PositionAttitudeTransform + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSG_LIBRARY + NAMES osg + PATHS + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSG_LIBRARY + NAMES osg + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSG_FOUND "NO") +IF(OSG_LIBRARY AND OSG_INCLUDE_DIR) + SET(OSG_FOUND "YES") +ENDIF(OSG_LIBRARY AND OSG_INCLUDE_DIR) + diff --git a/Modules/FindosgDB.cmake b/Modules/FindosgDB.cmake new file mode 100644 index 000000000..711e5f366 --- /dev/null +++ b/Modules/FindosgDB.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgDB +# This module defines +# OSGDB_LIBRARY +# OSGDB_FOUND, if false, do not try to link to osgDB +# OSGDB_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGDB_INCLUDE_DIR osgDB/DatabasePager + PATHS + $ENV{OSGDB_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGDB_INCLUDE_DIR osgDB/DatabasePager + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGDB_LIBRARY + NAMES osgDB + PATHS + $ENV{OSGDB_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGDB_LIBRARY + NAMES osgDB + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGDB_FOUND "NO") +IF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR) + SET(OSGDB_FOUND "YES") +ENDIF(OSGDB_LIBRARY AND OSGDB_INCLUDE_DIR) + diff --git a/Modules/FindosgFX.cmake b/Modules/FindosgFX.cmake new file mode 100644 index 000000000..cc1c3a692 --- /dev/null +++ b/Modules/FindosgFX.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgFX +# This module defines +# OSGFX_LIBRARY +# OSGFX_FOUND, if false, do not try to link to osgFX +# OSGFX_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGFX_INCLUDE_DIR osgFX/BumpMapping + PATHS + $ENV{OSGFX_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGFX_INCLUDE_DIR osgFX/BumpMapping + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGFX_LIBRARY + NAMES osgFX + PATHS + $ENV{OSGFX_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGFX_LIBRARY + NAMES osgFX + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGFX_FOUND "NO") +IF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR) + SET(OSGFX_FOUND "YES") +ENDIF(OSGFX_LIBRARY AND OSGFX_INCLUDE_DIR) + diff --git a/Modules/FindosgGA.cmake b/Modules/FindosgGA.cmake new file mode 100644 index 000000000..a9dc863b3 --- /dev/null +++ b/Modules/FindosgGA.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgGA +# This module defines +# OSGGA_LIBRARY +# OSGGA_FOUND, if false, do not try to link to osgGA +# OSGGA_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGGA_INCLUDE_DIR osgGA/FlightManipulator + PATHS + $ENV{OSGGA_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGGA_INCLUDE_DIR osgGA/FlightManipulator + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGGA_LIBRARY + NAMES osgGA + PATHS + $ENV{OSGGA_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGGA_LIBRARY + NAMES osgGA + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGGA_FOUND "NO") +IF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR) + SET(OSGGA_FOUND "YES") +ENDIF(OSGGA_LIBRARY AND OSGGA_INCLUDE_DIR) + diff --git a/Modules/FindosgIntrospection.cmake b/Modules/FindosgIntrospection.cmake new file mode 100644 index 000000000..270f5f899 --- /dev/null +++ b/Modules/FindosgIntrospection.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgIntrospection +# This module defines +# OSGINTROSPECTION_LIBRARY +# OSGINTROSPECTION_FOUND, if false, do not try to link to osgIntrospection +# OSGINTROSPECTION_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection + PATHS + $ENV{OSGINTROSPECTION_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGINTROSPECTION_INCLUDE_DIR osgIntrospection/Reflection + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGINTROSPECTION_LIBRARY + NAMES osgIntrospection + PATHS + $ENV{OSGINTROSPECTION_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGINTROSPECTION_LIBRARY + NAMES osgIntrospection + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGINTROSPECTION_FOUND "NO") +IF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR) + SET(OSGINTROSPECTION_FOUND "YES") +ENDIF(OSGINTROSPECTION_LIBRARY AND OSGINTROSPECTION_INCLUDE_DIR) + diff --git a/Modules/FindosgManipulator.cmake b/Modules/FindosgManipulator.cmake new file mode 100644 index 000000000..f76e7272a --- /dev/null +++ b/Modules/FindosgManipulator.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgManipulator +# This module defines +# OSG_LIBRARY +# OSGMANIPULATOR_FOUND, if false, do not try to link to osgManipulator +# OSGMANIPULATOR_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGMANIPULATOR_INCLUDE_DIR osgManipulator/TrackballDragger + PATHS + $ENV{OSGMANIPULATOR_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGMANIPULATOR_INCLUDE_DIR osgManipulator/TrackballDragger + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGMANIPULATOR_LIBRARY + NAMES osgManipulator + PATHS + $ENV{OSGMANIPULATOR_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGMANIPULATOR_LIBRARY + NAMES osgManipulator + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGMANIPULATOR_FOUND "NO") +IF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR) + SET(OSGMANIPULATOR_FOUND "YES") +ENDIF(OSGMANIPULATOR_LIBRARY AND OSGMANIPULATOR_INCLUDE_DIR) + diff --git a/Modules/FindosgParticle.cmake b/Modules/FindosgParticle.cmake new file mode 100644 index 000000000..a6b4bf99f --- /dev/null +++ b/Modules/FindosgParticle.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgParticle +# This module defines +# OSGPARTICLE_LIBRARY +# OSGPARTICLE_FOUND, if false, do not try to link to osgParticle +# OSGPARTICLE_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGPARTICLE_INCLUDE_DIR osgParticle/FireEffect + PATHS + $ENV{OSGPARTICLE_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGPARTICLE_INCLUDE_DIR osgParticle/FireEffect + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGPARTICLE_LIBRARY + NAMES osgParticle + PATHS + $ENV{OSGPARTICLE_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGPARTICLE_LIBRARY + NAMES osgParticle + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGPARTICLE_FOUND "NO") +IF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR) + SET(OSGPARTICLE_FOUND "YES") +ENDIF(OSGPARTICLE_LIBRARY AND OSGPARTICLE_INCLUDE_DIR) + diff --git a/Modules/FindosgProducer.cmake b/Modules/FindosgProducer.cmake new file mode 100644 index 000000000..7ff3292c7 --- /dev/null +++ b/Modules/FindosgProducer.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgProducer +# This module defines +# OSGPRODUCER_LIBRARY +# OSGPRODUCER_FOUND, if false, do not try to link to osgProducer +# OSGPRODUCER_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGPRODUCER_INCLUDE_DIR osgProducer/OsgSceneHandler + PATHS + $ENV{OSGPRODUCER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGPRODUCER_INCLUDE_DIR osgProducer/OsgSceneHandler + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGPRODUCER_LIBRARY + NAMES osgProducer + PATHS + $ENV{OSGPRODUCER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGPRODUCER_LIBRARY + NAMES osgProducer + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGPRODUCER_FOUND "NO") +IF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR) + SET(OSGPRODUCER_FOUND "YES") +ENDIF(OSGPRODUCER_LIBRARY AND OSGPRODUCER_INCLUDE_DIR) + diff --git a/Modules/FindosgShadow.cmake b/Modules/FindosgShadow.cmake new file mode 100644 index 000000000..65a2336be --- /dev/null +++ b/Modules/FindosgShadow.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgShadow +# This module defines +# OSGSHADOW_LIBRARY +# OSGSHADOW_FOUND, if false, do not try to link to osgShadow +# OSGSHADOW_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGSHADOW_INCLUDE_DIR osgShadow/ShadowTexture + PATHS + $ENV{OSGSHADOW_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGSHADOW_INCLUDE_DIR osgShadow/ShadowTexture + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGSHADOW_LIBRARY + NAMES osgShadow + PATHS + $ENV{OSGSHADOW_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGSHADOW_LIBRARY + NAMES osgShadow + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGSHADOW_FOUND "NO") +IF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR) + SET(OSGSHADOW_FOUND "YES") +ENDIF(OSGSHADOW_LIBRARY AND OSGSHADOW_INCLUDE_DIR) + diff --git a/Modules/FindosgSim.cmake b/Modules/FindosgSim.cmake new file mode 100644 index 000000000..4bff3281a --- /dev/null +++ b/Modules/FindosgSim.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgSim +# This module defines +# OSGSIM_LIBRARY +# OSGSIM_FOUND, if false, do not try to link to osgSim +# OSGSIM_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGSIM_INCLUDE_DIR osgSim/ImpostorSprite + PATHS + $ENV{OSGSIM_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGSIM_INCLUDE_DIR osgSim/ImpostorSprite + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGSIM_LIBRARY + NAMES osgSim + PATHS + $ENV{OSGSIM_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGSIM_LIBRARY + NAMES osgSim + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGSIM_FOUND "NO") +IF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR) + SET(OSGSIM_FOUND "YES") +ENDIF(OSGSIM_LIBRARY AND OSGSIM_INCLUDE_DIR) + diff --git a/Modules/FindosgTerrain.cmake b/Modules/FindosgTerrain.cmake new file mode 100644 index 000000000..fcf74896e --- /dev/null +++ b/Modules/FindosgTerrain.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgTerrain +# This module defines +# OSGTERRAIN_LIBRARY +# OSGTERRAIN_FOUND, if false, do not try to link to osgTerrain +# OSGTERRAIN_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGTERRAIN_INCLUDE_DIR osgTerrain/Terrain + PATHS + $ENV{OSGTERRAIN_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGTERRAIN_INCLUDE_DIR osgTerrain/Terrain + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGTERRAIN_LIBRARY + NAMES osgTerrain + PATHS + $ENV{OSGTERRAIN_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGTERRAIN_LIBRARY + NAMES osgTerrain + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGTERRAIN_FOUND "NO") +IF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR) + SET(OSGTERRAIN_FOUND "YES") +ENDIF(OSGTERRAIN_LIBRARY AND OSGTERRAIN_INCLUDE_DIR) + diff --git a/Modules/FindosgText.cmake b/Modules/FindosgText.cmake new file mode 100644 index 000000000..d6c3e1f25 --- /dev/null +++ b/Modules/FindosgText.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgText +# This module defines +# OSGTEXT_LIBRARY +# OSGTEXT_FOUND, if false, do not try to link to osgText +# OSGTEXT_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGTEXT_INCLUDE_DIR osgText/Text + PATHS + $ENV{OSGTEXT_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGTEXT_INCLUDE_DIR osgText/Text + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGTEXT_LIBRARY + NAMES osgText + PATHS + $ENV{OSGTEXT_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGTEXT_LIBRARY + NAMES osgText + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGTEXT_FOUND "NO") +IF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR) + SET(OSGTEXT_FOUND "YES") +ENDIF(OSGTEXT_LIBRARY AND OSGTEXT_INCLUDE_DIR) + diff --git a/Modules/FindosgUtil.cmake b/Modules/FindosgUtil.cmake new file mode 100644 index 000000000..cbd9b8c0c --- /dev/null +++ b/Modules/FindosgUtil.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgUtil +# This module defines +# OSGUTIL_LIBRARY +# OSGUTIL_FOUND, if false, do not try to link to osgUtil +# OSGUTIL_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGUTIL_INCLUDE_DIR osgUtil/SceneView + PATHS + $ENV{OSGUTIL_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGUTIL_INCLUDE_DIR osgUtil/SceneView + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGUTIL_LIBRARY + NAMES osgUtil + PATHS + $ENV{OSGUTIL_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGUTIL_LIBRARY + NAMES osgUtil + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGUTIL_FOUND "NO") +IF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR) + SET(OSGUTIL_FOUND "YES") +ENDIF(OSGUTIL_LIBRARY AND OSGUTIL_INCLUDE_DIR) + diff --git a/Modules/FindosgViewer.cmake b/Modules/FindosgViewer.cmake new file mode 100644 index 000000000..b9efd47ef --- /dev/null +++ b/Modules/FindosgViewer.cmake @@ -0,0 +1,81 @@ +# This is part of the Findosg* suite used to find OpenSceneGraph components. +# Each component is separate and you must opt in to each module. You must +# also opt into OpenGL and OpenThreads (and Producer if needed) as these +# modules won't do it for you. This is to allow you control over your own +# system piece by piece in case you need to opt out of certain components +# or change the Find behavior for a particular module (perhaps because the +# default FindOpenGL.cmake module doesn't work with your system as an +# example). +# If you want to use a more convenient module that includes everything, +# use the FindOpenSceneGraph.cmake instead of the Findosg*.cmake modules. +# +# Locate osgViewer +# This module defines +# OSGVIEWER_LIBRARY +# OSGVIEWER_FOUND, if false, do not try to link to osgViewer +# OSGVIEWER_INCLUDE_DIR, where to find the headers +# +# $OSGDIR is an environment variable that would +# correspond to the ./configure --prefix=$OSGDIR +# used in building osg. +# +# Created by Eric Wing. + +# Header files are presumed to be included like +# #include +# #include + +# Try the user's environment request before anything else. +FIND_PATH(OSGVIEWER_INCLUDE_DIR osgViewer/Viewer + PATHS + $ENV{OSGVIEWER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES include +) + +FIND_PATH(OSGVIEWER_INCLUDE_DIR osgViewer/Viewer + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw # Fink + /opt/local # DarwinPorts + /opt/csw # Blastwave + /opt + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT] + [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT] + PATH_SUFFIXES include +) + +FIND_LIBRARY(OSGVIEWER_LIBRARY + NAMES osgViewer + PATHS + $ENV{OSGVIEWER_DIR} + $ENV{OSG_DIR} + $ENV{OSGDIR} + NO_DEFAULT_PATH + PATH_SUFFIXES lib64 lib +) + +FIND_LIBRARY(OSGVIEWER_LIBRARY + NAMES osgViewer + PATHS + ~/Library/Frameworks + /Library/Frameworks + /usr/local + /usr + /sw + /opt/local + /opt/csw + /opt + PATH_SUFFIXES lib64 lib +) + +SET(OSGVIEWER_FOUND "NO") +IF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR) + SET(OSGVIEWER_FOUND "YES") +ENDIF(OSGVIEWER_LIBRARY AND OSGVIEWER_INCLUDE_DIR) + diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake new file mode 100755 index 000000000..0007ee3cc --- /dev/null +++ b/Modules/FindwxWidgets.cmake @@ -0,0 +1,969 @@ +# - Find a wxWidgets (a.k.a., wxWindows) installation. +# This module finds if wxWidgets is installed and selects a default +# configuration to use. wxWidgets is a modular library. To specify the +# modules that you will use, you need to name them as components to +# the package: +# +# FIND_PACKAGE(wxWidgets COMPONENTS base core ...) +# +# There are two search branches: a windows style and a unix style. For +# windows, the following variables are searched for and set to +# defaults in case of multiple choices. Change them if the defaults +# are not desired (i.e., these are the only variables you should +# change to select a configuration): +# +# wxWidgets_ROOT_DIR - Base wxWidgets directory +# (e.g., C:/wxWidgets-2.6.3). +# wxWidgets_LIB_DIR - Path to wxWidgets libraries +# (e.g., C:/wxWidgets-2.6.3/lib/vc_lib). +# wxWidgets_CONFIGURATION - Configuration to use +# (e.g., msw, mswd, mswu, mswunivud, etc.) +# +# For unix style it uses the wx-config utility. You can select between +# debug/release, unicode/ansi, universal/non-universal, and +# static/shared in the QtDialog or ccmake interfaces by turning ON/OFF +# the following variables: +# +# wxWidgets_USE_DEBUG +# wxWidgets_USE_UNICODE +# wxWidgets_USE_UNIVERSAL +# wxWidgets_USE_STATIC +# +# The following are set after the configuration is done for both +# windows and unix style: +# +# wxWidgets_FOUND - Set to TRUE if wxWidgets was found. +# wxWidgets_INCLUDE_DIRS - Include directories for WIN32 +# i.e., where to find "wx/wx.h" and +# "wx/setup.h"; possibly empty for unices. +# wxWidgets_LIBRARIES - Path to the wxWidgets libraries. +# wxWidgets_LIBRARY_DIRS - compile time link dirs, useful for +# rpath on UNIX. Typically an empty string +# in WIN32 environment. +# wxWidgets_DEFINITIONS - Contains defines required to compile/link +# against WX, e.g. -DWXUSINGDLL +# wxWidgets_CXX_FLAGS - Include dirs and ompiler flags for +# unices, empty on WIN32. Esentially +# "`wx-config --cxxflags`". +# wxWidgets_USE_FILE - Convenience include file. +# +# Sample usage: +# FIND_PACKAGE(wxWidgets COMPONENTS base core gl net) +# IF(wxWidgets_FOUND) +# INCLUDE(${wxWidgets_USE_FILE}) +# # and for each of your dependant executable/library targets: +# TARGET_LINK_LIBRARIES( ${wxWidgets_LIBRARIES}) +# ENDIF(wxWidgets_FOUND) +# +# If wxWidgets is required (i.e., not an optional part): +# FIND_PACKAGE(wxWidgets REQUIRED base core gl net) +# INCLUDE(${wxWidgets_USE_FILE}) +# # and for each of your dependant executable/library targets: +# TARGET_LINK_LIBRARIES( ${wxWidgets_LIBRARIES}) + +# +# FIXME: check this and provide a correct sample usage... +# Remember to connect back to the upper text. +# Sample usage with monolithic wx build: +# +# FIND_PACKAGE(wxWidgets COMPONENTS mono) +# ... + + +# NOTES +# +# This module has been tested on the WIN32 platform with wxWidgets +# 2.6.2, 2.6.3, and 2.5.3. However, it has been designed to +# easily extend support to all possible builds, e.g., static/shared, +# debug/release, unicode, universal, multilib/monolithic, etc.. +# +# If you want to use the module and your build type is not supported +# out-of-the-box, please contact me to exchange information on how +# your system is setup and I'll try to add support for it. +# +# AUTHOR +# +# Miguel A. Figueroa-Villanueva (miguelf at ieee dot org). +# Jan Woetzel (jw at mip.informatik.uni-kiel.de). +# +# Based on previous works of: +# Jan Woetzel (FindwxWindows.cmake), +# Jorgen Bodde and Jerry Fath (FindwxWin.cmake). + +# TODO/ideas +# +# (1) Option/Setting to use all available wx libs +# In contrast to expert developer who lists the +# minimal set of required libs in wxWidgets_USE_LIBS +# there is the newbie user: +# - who just wants to link against WX with more 'magic' +# - doesn't know the internal structure of WX or how it was built, +# in particular if it is monolithic or not +# - want to link against all available WX libs +# Basically, the intent here is to mimic what wx-config would do by +# default (i.e., `wx-config --libs`). +# +# Possible solution: +# Add a reserved keyword "std" that initializes to what wx-config +# would default to. If the user has not set the wxWidgets_USE_LIBS, +# default to "std" instead of "base core" as it is now. To implement +# "std" will basically boil down to a FOR_EACH lib-FOUND, but maybe +# checking whether a minimal set was found. + + +# FIXME: This and all the DBG_MSG calls should be removed after the +# module stabilizes. +# +# Helper macro to control the debugging output globally. There are +# two versions for controlling how verbose your output should be. +MACRO(DBG_MSG _MSG) +# MESSAGE(STATUS +# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") +ENDMACRO(DBG_MSG) +MACRO(DBG_MSG_V _MSG) +# MESSAGE(STATUS +# "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") +ENDMACRO(DBG_MSG_V) + +# Clear return values in case the module is loaded more than once. +SET(wxWidgets_FOUND FALSE) +SET(wxWidgets_INCLUDE_DIRS "") +SET(wxWidgets_LIBRARIES "") +SET(wxWidgets_LIBRARY_DIRS "") +SET(wxWidgets_CXX_FLAGS "") + +# Using SYSTEM with INCLUDE_DIRECTORIES in conjunction with wxWidgets on +# the Mac produces compiler errors. Set wxWidgets_INCLUDE_DIRS_NO_SYSTEM +# to prevent UsewxWidgets.cmake from using SYSTEM. +# +# See cmake mailing list discussions for more info: +# http://www.cmake.org/pipermail/cmake/2008-April/021115.html +# http://www.cmake.org/pipermail/cmake/2008-April/021146.html +# +IF(APPLE) + SET(wxWidgets_INCLUDE_DIRS_NO_SYSTEM 1) +ENDIF(APPLE) + +# DEPRECATED: This is a patch to support the DEPRECATED use of +# wxWidgets_USE_LIBS. +# +# If wxWidgets_USE_LIBS is set: +# - if using , then override wxWidgets_USE_LIBS +# - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS +IF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) + SET(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) +ENDIF(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) +DBG_MSG("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") + +# Add the convenience use file if available. +# +# Get dir of this file which may reside in: +# - CMAKE_MAKE_ROOT/Modules on CMake installation +# - CMAKE_MODULE_PATH if user prefers his own specialized version +SET(wxWidgets_USE_FILE "") +GET_FILENAME_COMPONENT( + wxWidgets_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) +# Prefer an existing customized version, but the user might override +# the FindwxWidgets module and not the UsewxWidgets one. +IF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") + SET(wxWidgets_USE_FILE + "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") +ELSE(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") + SET(wxWidgets_USE_FILE UsewxWidgets.cmake) +ENDIF(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") + +#===================================================================== +#===================================================================== +IF(WIN32) + SET(WIN32_STYLE_FIND 1) +ENDIF(WIN32) +IF(MINGW) + SET(WIN32_STYLE_FIND 0) + SET(UNIX_STYLE_FIND 1) +ENDIF(MINGW) +IF(UNIX) + SET(UNIX_STYLE_FIND 1) +ENDIF(UNIX) + +#===================================================================== +# WIN32_STYLE_FIND +#===================================================================== +IF(WIN32_STYLE_FIND) + # Useful common wx libs needed by almost all components. + SET(wxWidgets_COMMON_LIBRARIES png tiff jpeg zlib regex expat) + + # DEPRECATED: Use FIND_PACKAGE(wxWidgets COMPONENTS mono) instead. + IF(NOT wxWidgets_FIND_COMPONENTS) + IF(wxWidgets_USE_MONOLITHIC) + SET(wxWidgets_FIND_COMPONENTS mono) + ELSE(wxWidgets_USE_MONOLITHIC) + SET(wxWidgets_FIND_COMPONENTS base core) # this is default + ENDIF(wxWidgets_USE_MONOLITHIC) + ENDIF(NOT wxWidgets_FIND_COMPONENTS) + + # Always add the common required libs. + LIST(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES}) + + #------------------------------------------------------------------- + # WIN32: Helper MACROS + #------------------------------------------------------------------- + # + # Get filename components for a configuration. For example, + # if _CONFIGURATION = mswunivud, then _UNV=univ, _UCD=u _DBG=d + # if _CONFIGURATION = mswu, then _UNV="", _UCD=u _DBG="" + # + MACRO(WX_GET_NAME_COMPONENTS _CONFIGURATION _UNV _UCD _DBG) + STRING(REGEX MATCH "univ" ${_UNV} "${_CONFIGURATION}") + STRING(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") + IF(${_UCD} STREQUAL ${_CONFIGURATION}) + SET(${_UCD} "") + ENDIF(${_UCD} STREQUAL ${_CONFIGURATION}) + STRING(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") + ENDMACRO(WX_GET_NAME_COMPONENTS) + + # + # Find libraries associated to a configuration. + # + MACRO(WX_FIND_LIBS _UNV _UCD _DBG) + DBG_MSG_V("m_unv = ${_UNV}") + DBG_MSG_V("m_ucd = ${_UCD}") + DBG_MSG_V("m_dbg = ${_DBG}") + + # FIXME: What if both regex libs are available. regex should be + # found outside the loop and only wx${LIB}${_UCD}${_DBG}. + # Find wxWidgets common libraries. + FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) + FIND_LIBRARY(WX_${LIB}${_DBG} + NAMES + wx${LIB}${_UCD}${_DBG} # for regex + wx${LIB}${_DBG} + PATHS ${WX_LIB_DIR} + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + + # Find wxWidgets multilib base libraries. + FIND_LIBRARY(WX_base${_DBG} + NAMES + wxbase29${_UCD}${_DBG} + wxbase28${_UCD}${_DBG} + wxbase27${_UCD}${_DBG} + wxbase26${_UCD}${_DBG} + wxbase25${_UCD}${_DBG} + PATHS ${WX_LIB_DIR} + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(WX_base${_DBG}) + FOREACH(LIB net odbc xml) + FIND_LIBRARY(WX_${LIB}${_DBG} + NAMES + wxbase29${_UCD}${_DBG}_${LIB} + wxbase28${_UCD}${_DBG}_${LIB} + wxbase27${_UCD}${_DBG}_${LIB} + wxbase26${_UCD}${_DBG}_${LIB} + wxbase25${_UCD}${_DBG}_${LIB} + PATHS ${WX_LIB_DIR} + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + + # Find wxWidgets monolithic library. + FIND_LIBRARY(WX_mono${_DBG} + NAMES + wxmsw${_UNV}29${_UCD}${_DBG} + wxmsw${_UNV}28${_UCD}${_DBG} + wxmsw${_UNV}27${_UCD}${_DBG} + wxmsw${_UNV}26${_UCD}${_DBG} + wxmsw${_UNV}25${_UCD}${_DBG} + PATHS ${WX_LIB_DIR} + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(WX_mono${_DBG}) + + # Find wxWidgets multilib libraries. + FOREACH(LIB core adv aui html media xrc dbgrid gl qa) + FIND_LIBRARY(WX_${LIB}${_DBG} + NAMES + wxmsw${_UNV}29${_UCD}${_DBG}_${LIB} + wxmsw${_UNV}28${_UCD}${_DBG}_${LIB} + wxmsw${_UNV}27${_UCD}${_DBG}_${LIB} + wxmsw${_UNV}26${_UCD}${_DBG}_${LIB} + wxmsw${_UNV}25${_UCD}${_DBG}_${LIB} + PATHS ${WX_LIB_DIR} + NO_DEFAULT_PATH + ) + MARK_AS_ADVANCED(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + ENDMACRO(WX_FIND_LIBS) + + # + # Clear all library paths, so that FIND_LIBRARY refinds them. + # + # Clear a lib, reset its found flag, and mark as advanced. + MACRO(WX_CLEAR_LIB _LIB) + SET(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE) + SET(${_LIB}_FOUND FALSE) + MARK_AS_ADVANCED(${_LIB}) + ENDMACRO(WX_CLEAR_LIB) + # Clear all debug or release library paths (arguments are "d" or ""). + MACRO(WX_CLEAR_ALL_LIBS _DBG) + # Clear wxWidgets common libraries. + FOREACH(LIB ${wxWidgets_COMMON_LIBRARIES}) + WX_CLEAR_LIB(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + + # Clear wxWidgets multilib base libraries. + WX_CLEAR_LIB(WX_base${_DBG}) + FOREACH(LIB net odbc xml) + WX_CLEAR_LIB(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + + # Clear wxWidgets monolithic library. + WX_CLEAR_LIB(WX_mono${_DBG}) + + # Clear wxWidgets multilib libraries. + FOREACH(LIB core adv aui html media xrc dbgrid gl qa) + WX_CLEAR_LIB(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + ENDMACRO(WX_CLEAR_ALL_LIBS) + # Clear all wxWidgets debug libraries. + MACRO(WX_CLEAR_ALL_DBG_LIBS) + WX_CLEAR_ALL_LIBS("d") + ENDMACRO(WX_CLEAR_ALL_DBG_LIBS) + # Clear all wxWidgets release libraries. + MACRO(WX_CLEAR_ALL_REL_LIBS) + WX_CLEAR_ALL_LIBS("") + ENDMACRO(WX_CLEAR_ALL_REL_LIBS) + + # + # Set the wxWidgets_LIBRARIES variable. + # Also, Sets output variable wxWidgets_FOUND to FALSE if it fails. + # + MACRO(WX_SET_LIBRARIES _LIBS _DBG) + DBG_MSG_V("Looking for ${${_LIBS}}") + IF(WX_USE_REL_AND_DBG) + FOREACH(LIB ${${_LIBS}}) + DBG_MSG_V("Searching for ${LIB} and ${LIB}d") + DBG_MSG_V("WX_${LIB} : ${WX_${LIB}}") + DBG_MSG_V("WX_${LIB}d : ${WX_${LIB}d}") + IF(WX_${LIB} AND WX_${LIB}d) + DBG_MSG_V("Found ${LIB} and ${LIB}d") + LIST(APPEND wxWidgets_LIBRARIES + debug ${WX_${LIB}d} optimized ${WX_${LIB}} + ) + ELSE(WX_${LIB} AND WX_${LIB}d) + DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}") + SET(wxWidgets_FOUND FALSE) + ENDIF(WX_${LIB} AND WX_${LIB}d) + ENDFOREACH(LIB) + ELSE(WX_USE_REL_AND_DBG) + FOREACH(LIB ${${_LIBS}}) + DBG_MSG_V("Searching for ${LIB}${_DBG}") + DBG_MSG_V("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}") + IF(WX_${LIB}${_DBG}) + DBG_MSG_V("Found ${LIB}${_DBG}") + LIST(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) + ELSE(WX_${LIB}${_DBG}) + DBG_MSG_V( + "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}") + SET(wxWidgets_FOUND FALSE) + ENDIF(WX_${LIB}${_DBG}) + ENDFOREACH(LIB) + ENDIF(WX_USE_REL_AND_DBG) + + DBG_MSG_V("OpenGL") + LIST(FIND ${_LIBS} gl WX_USE_GL) + IF(NOT WX_USE_GL EQUAL -1) + DBG_MSG_V("- is required.") + LIST(APPEND wxWidgets_LIBRARIES opengl32 glu32) + ENDIF(NOT WX_USE_GL EQUAL -1) + + LIST(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) + ENDMACRO(WX_SET_LIBRARIES) + + #------------------------------------------------------------------- + # WIN32: Start actual work. + #------------------------------------------------------------------- + + # Look for an installation tree. + FIND_PATH(wxWidgets_ROOT_DIR + NAMES include/wx/wx.h + PATHS + $ENV{wxWidgets_ROOT_DIR} + $ENV{WXWIN} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" # WX 2.6.x + C:/ + D:/ + $ENV{ProgramFiles} + PATH_SUFFIXES + wxWidgets-2.8.7 + wxWidgets-2.8.6 + wxWidgets-2.8.5 + wxWidgets-2.8.4 + wxWidgets-2.8.3 + wxWidgets-2.8.2 + wxWidgets-2.8.1 + wxWidgets-2.8.0 + wxWidgets-2.7.4 + wxWidgets-2.7.3 + wxWidgets-2.7.2 + wxWidgest-2.7.1 + wxWidgets-2.7.0 + wxWidgets-2.7.0-1 + wxWidgets-2.6.3 + wxWidgets-2.6.2 + wxWidgets-2.6.1 + wxWidgets-2.5.4 + wxWidgets-2.5.3 + wxWidgets-2.5.2 + wxWidgets-2.5.1 + wxWidgets + DOC "wxWidgets base/installation directory?" + ) + + # If wxWidgets_ROOT_DIR changed, clear lib dir. + IF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) + SET(WX_ROOT_DIR ${wxWidgets_ROOT_DIR} + CACHE INTERNAL "wxWidgets_ROOT_DIR") + SET(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" + CACHE PATH "Cleared." FORCE) + ENDIF(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) + + IF(WX_ROOT_DIR) + # Select one default tree inside the already determined wx tree. + # Prefer static/shared order usually consistent with build + # settings. + IF(BUILD_SHARED_LIBS) + FIND_PATH(wxWidgets_LIB_DIR + NAMES wxpng.lib wxpngd.lib + PATHS + ${WX_ROOT_DIR}/lib/vc_dll # prefer shared + ${WX_ROOT_DIR}/lib/vc_lib + DOC "Path to wxWidgets libraries?" + NO_DEFAULT_PATH + ) + ELSE(BUILD_SHARED_LIBS) + FIND_PATH(wxWidgets_LIB_DIR + NAMES wxpng.lib wxpngd.lib + PATHS + ${WX_ROOT_DIR}/lib/vc_lib # prefer static + ${WX_ROOT_DIR}/lib/vc_dll + DOC "Path to wxWidgets libraries?" + NO_DEFAULT_PATH + ) + ENDIF(BUILD_SHARED_LIBS) + + # If wxWidgets_LIB_DIR changed, clear all libraries. + IF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) + SET(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR") + WX_CLEAR_ALL_DBG_LIBS() + WX_CLEAR_ALL_REL_LIBS() + ENDIF(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) + + IF(WX_LIB_DIR) + SET(wxWidgets_FOUND TRUE) + + # If building shared libs, define WXUSINGDLL to use dllimport. + IF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") + SET(wxWidgets_DEFINITIONS "-DWXUSINGDLL") + DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") + ENDIF(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") + + # Search for available configuration types. + FOREACH(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) + SET(WX_${CFG}_FOUND FALSE) + IF(EXISTS ${WX_LIB_DIR}/${CFG}) + LIST(APPEND WX_CONFIGURATION_LIST ${CFG}) + SET(WX_${CFG}_FOUND TRUE) + SET(WX_CONFIGURATION ${CFG}) + ENDIF(EXISTS ${WX_LIB_DIR}/${CFG}) + ENDFOREACH(CFG) + DBG_MSG_V("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") + + IF(WX_CONFIGURATION) + # If the selected configuration wasn't found force the default + # one. Otherwise, use it but still force a refresh for + # updating the doc string with the current list of available + # configurations. + IF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) + SET(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING + "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) + ELSE(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) + SET(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING + "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) + ENDIF(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) + + # If release config selected, and both release/debug exist. + IF(WX_${wxWidgets_CONFIGURATION}d_FOUND) + OPTION(wxWidgets_USE_REL_AND_DBG + "Use release and debug configurations?" TRUE) + SET(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG}) + ELSE(WX_${wxWidgets_CONFIGURATION}d_FOUND) + # If the option exists (already in cache), force it false. + IF(wxWidgets_USE_REL_AND_DBG) + SET(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL + "No ${wxWidgets_CONFIGURATION}d found." FORCE) + ENDIF(wxWidgets_USE_REL_AND_DBG) + SET(WX_USE_REL_AND_DBG FALSE) + ENDIF(WX_${wxWidgets_CONFIGURATION}d_FOUND) + + # Get configuration parameters from the name. + WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} UNV UCD DBG) + + # Set wxWidgets main include directory. + IF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + SET(wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) + ELSE(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + DBG_MSG("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") + SET(wxWidgets_FOUND FALSE) + ENDIF(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + + # Set wxWidgets lib setup include directory. + IF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + LIST(APPEND wxWidgets_INCLUDE_DIRS + ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) + ELSE(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + DBG_MSG("WXWIDGET_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") + SET(wxWidgets_FOUND FALSE) + ENDIF(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + + # Find wxWidgets libraries. + WX_FIND_LIBS("${UNV}" "${UCD}" "${DBG}") + IF(WX_USE_REL_AND_DBG) + WX_FIND_LIBS("${UNV}" "${UCD}" "d") + ENDIF(WX_USE_REL_AND_DBG) + + # Settings for requested libs (i.e., include dir, libraries, etc.). + WX_SET_LIBRARIES(wxWidgets_FIND_COMPONENTS "${DBG}") + + ENDIF(WX_CONFIGURATION) + ENDIF(WX_LIB_DIR) + ENDIF(WX_ROOT_DIR) + +#===================================================================== +# UNIX_STYLE_FIND +#===================================================================== +ELSE(WIN32_STYLE_FIND) + IF(UNIX_STYLE_FIND) + #----------------------------------------------------------------- + # UNIX: Helper MACROS + #----------------------------------------------------------------- + # + # Set the default values based on "wx-config --selected-config". + # + MACRO(WX_CONFIG_SELECT_GET_DEFAULT) + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --selected-config + OUTPUT_VARIABLE _wx_selected_config + RESULT_VARIABLE _wx_result + ERROR_QUIET + ) + IF(_wx_result EQUAL 0) + FOREACH(_opt_name debug static unicode universal) + STRING(TOUPPER ${_opt_name} _upper_opt_name) + IF(_wx_selected_config MATCHES ".*${_opt_name}.*") + SET(wxWidgets_DEFAULT_${_upper_opt_name} ON) + ELSE(_wx_selected_config MATCHES ".*${_opt_name}.*") + SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF) + ENDIF(_wx_selected_config MATCHES ".*${_opt_name}.*") + ENDFOREACH(_opt_name) + ELSE(_wx_result EQUAL 0) + FOREACH(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL) + SET(wxWidgets_DEFAULT_${_upper_opt_name} OFF) + ENDFOREACH(_opt_name) + ENDIF(_wx_result EQUAL 0) + ENDMACRO(WX_CONFIG_SELECT_GET_DEFAULT) + + # + # Query a boolean configuration option to determine if the system + # has both builds available. If so, provide the selection option + # to the user. + # + MACRO(WX_CONFIG_SELECT_QUERY_BOOL _OPT_NAME _OPT_HELP) + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=yes + RESULT_VARIABLE _wx_result_yes + OUTPUT_QUIET + ERROR_QUIET + ) + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --${_OPT_NAME}=no + RESULT_VARIABLE _wx_result_no + OUTPUT_QUIET + ERROR_QUIET + ) + STRING(TOUPPER ${_OPT_NAME} _UPPER_OPT_NAME) + IF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) + OPTION(wxWidgets_USE_${_UPPER_OPT_NAME} + ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}}) + ELSE(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) + # If option exists (already in cache), force to available one. + IF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) + IF(_wx_result_yes EQUAL 0) + SET(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE) + ELSE(_wx_result_yes EQUAL 0) + SET(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE) + ENDIF(_wx_result_yes EQUAL 0) + ENDIF(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) + ENDIF(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) + ENDMACRO(WX_CONFIG_SELECT_QUERY_BOOL) + + # + # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting + # among multiple builds. + # + MACRO(WX_CONFIG_SELECT_SET_OPTIONS) + SET(wxWidgets_SELECT_OPTIONS "") + FOREACH(_opt_name debug static unicode universal) + STRING(TOUPPER ${_opt_name} _upper_opt_name) + IF(DEFINED wxWidgets_USE_${_upper_opt_name}) + IF(wxWidgets_USE_${_upper_opt_name}) + LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes) + ELSE(wxWidgets_USE_${_upper_opt_name}) + LIST(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no) + ENDIF(wxWidgets_USE_${_upper_opt_name}) + ENDIF(DEFINED wxWidgets_USE_${_upper_opt_name}) + ENDFOREACH(_opt_name) + ENDMACRO(WX_CONFIG_SELECT_SET_OPTIONS) + + #----------------------------------------------------------------- + # UNIX: Start actual work. + #----------------------------------------------------------------- + # Support cross-compiling, only search in the target platform. + FIND_PROGRAM(wxWidgets_CONFIG_EXECUTABLE wx-config + ONLY_CMAKE_FIND_ROOT_PATH + ) + + IF(wxWidgets_CONFIG_EXECUTABLE) + SET(wxWidgets_FOUND TRUE) + + # get defaults based on "wx-config --selected-config" + WX_CONFIG_SELECT_GET_DEFAULT() + + # for each option: if both builds are available, provide option + WX_CONFIG_SELECT_QUERY_BOOL(debug "Use debug build?") + WX_CONFIG_SELECT_QUERY_BOOL(unicode "Use unicode build?") + WX_CONFIG_SELECT_QUERY_BOOL(universal "Use universal build?") + WX_CONFIG_SELECT_QUERY_BOOL(static "Link libraries statically?") + + # process selection to set wxWidgets_SELECT_OPTIONS + WX_CONFIG_SELECT_SET_OPTIONS() + DBG_MSG("wxWidgets_SELECT_OPTIONS=${wxWidgets_SELECT_OPTIONS}") + + # run the wx-config program to get cxxflags + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" + ${wxWidgets_SELECT_OPTIONS} --cxxflags + OUTPUT_VARIABLE wxWidgets_CXX_FLAGS + RESULT_VARIABLE RET + ERROR_QUIET + ) + IF(RET EQUAL 0) + STRING(STRIP "${wxWidgets_CXX_FLAGS}" wxWidgets_CXX_FLAGS) + SEPARATE_ARGUMENTS(wxWidgets_CXX_FLAGS) + + DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") + + # parse definitions from cxxflags; drop -D* from CXXFLAGS + STRING(REGEX MATCHALL "-D[^;]+" + wxWidgets_DEFINITIONS "${wxWidgets_CXX_FLAGS}") + STRING(REGEX REPLACE "-D[^;]+;" "" + wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") + + # parse include dirs from cxxflags; drop -I prefix + STRING(REGEX MATCHALL "-I[^;]+" + wxWidgets_INCLUDE_DIRS "${wxWidgets_CXX_FLAGS}") + STRING(REGEX REPLACE "-I[^;]+;" "" + wxWidgets_CXX_FLAGS "${wxWidgets_CXX_FLAGS}") + STRING(REPLACE "-I" "" + wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}") + + DBG_MSG_V("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") + DBG_MSG_V("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") + DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") + + ELSE(RET EQUAL 0) + SET(wxWidgets_FOUND FALSE) + DBG_MSG_V( + "${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}") + ENDIF(RET EQUAL 0) + + # run the wx-config program to get the libs + # - NOTE: wx-config doesn't verify that the libs requested exist + # it just produces the names. Maybe a TRY_COMPILE would + # be useful here... + STRING(REPLACE ";" "," + wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}") + EXECUTE_PROCESS( + COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" + ${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS} + OUTPUT_VARIABLE wxWidgets_LIBRARIES + RESULT_VARIABLE RET + ERROR_QUIET + ) + IF(RET EQUAL 0) + STRING(STRIP "${wxWidgets_LIBRARIES}" wxWidgets_LIBRARIES) + SEPARATE_ARGUMENTS(wxWidgets_LIBRARIES) + STRING(REPLACE "-framework;" "-framework " + wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") + STRING(REPLACE "-arch;" "-arch " + wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") + STRING(REPLACE "-isysroot;" "-isysroot " + wxWidgets_LIBRARIES "${wxWidgets_LIBRARIES}") + + # extract linkdirs (-L) for rpath (i.e., LINK_DIRECTORIES) + STRING(REGEX MATCHALL "-L[^;]+" + wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARIES}") + STRING(REPLACE "-L" "" + wxWidgets_LIBRARY_DIRS "${wxWidgets_LIBRARY_DIRS}") + + DBG_MSG_V("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") + DBG_MSG_V("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") + + ELSE(RET EQUAL 0) + SET(wxWidgets_FOUND FALSE) + DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}") + ENDIF(RET EQUAL 0) + ENDIF(wxWidgets_CONFIG_EXECUTABLE) + +#===================================================================== +# Neither UNIX_STYLE_FIND, nor WIN32_STYLE_FIND +#===================================================================== + ELSE(UNIX_STYLE_FIND) + IF(NOT wxWidgets_FIND_QUIETLY) + MESSAGE(STATUS + "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" + " Platform unknown/unsupported. It's neither WIN32 nor UNIX " + "style find." + ) + ENDIF(NOT wxWidgets_FIND_QUIETLY) + ENDIF(UNIX_STYLE_FIND) +ENDIF(WIN32_STYLE_FIND) + +# Debug output: +DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}") +DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}") +DBG_MSG("wxWidgets_LIBRARY_DIRS : ${wxWidgets_LIBRARY_DIRS}") +DBG_MSG("wxWidgets_LIBRARIES : ${wxWidgets_LIBRARIES}") +DBG_MSG("wxWidgets_CXX_FLAGS : ${wxWidgets_CXX_FLAGS}") +DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") + +#===================================================================== +#===================================================================== +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(wxWidgets DEFAULT_MSG wxWidgets_FOUND) +# Maintain consistency with all other variables. +SET(wxWidgets_FOUND ${WXWIDGETS_FOUND}) + +#===================================================================== +# Macros for use in wxWidgets apps. +# - This module will not fail to find wxWidgets based on the code +# below. Hence, it's required to check for validity of: +# +# wxWidgets_wxrc_EXECUTABLE +#===================================================================== + +# Resource file compiler. +FIND_PROGRAM(wxWidgets_wxrc_EXECUTABLE wxrc + ${wxWidgets_ROOT_DIR}/utils/wxrc/vc_msw + ) + +# +# WX_SPLIT_ARGUMENTS_ON( ...) +# +# Sets and to contain arguments to the left and right, +# respectively, of . +# +# Example usage: +# FUNCTION(WXWIDGETS_ADD_RESOURCES outfiles) +# WX_SPLIT_ARGUMENTS_ON(OPTIONS wxrc_files wxrc_options ${ARGN}) +# ... +# ENDFUNCTION(WXWIDGETS_ADD_RESOURCES) +# +# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o file.C) +# +# NOTE: This is a generic piece of code that should be renamed to +# SPLIT_ARGUMENTS_ON and put in a file serving the same purpose as +# FindPackageStandardArgs.cmake. At the time of this writing +# FindQt4.cmake has a QT4_EXTRACT_OPTIONS, which I basically copied +# here a bit more generalized. So, there are already two find modules +# using this approach. +# +FUNCTION(WX_SPLIT_ARGUMENTS_ON _keyword _leftvar _rightvar) + # FIXME: Document that the input variables will be cleared. + #LIST(APPEND ${_leftvar} "") + #LIST(APPEND ${_rightvar} "") + SET(${_leftvar} "") + SET(${_rightvar} "") + + SET(_doing_right FALSE) + FOREACH(element ${ARGN}) + IF("${element}" STREQUAL "${_keyword}") + SET(_doing_right TRUE) + ELSE("${element}" STREQUAL "${_keyword}") + IF(_doing_right) + LIST(APPEND ${_rightvar} "${element}") + ELSE(_doing_right) + LIST(APPEND ${_leftvar} "${element}") + ENDIF(_doing_right) + ENDIF("${element}" STREQUAL "${_keyword}") + ENDFOREACH(element) + + SET(${_leftvar} ${${_leftvar}} PARENT_SCOPE) + SET(${_rightvar} ${${_rightvar}} PARENT_SCOPE) +ENDFUNCTION(WX_SPLIT_ARGUMENTS_ON) + +# +# WX_GET_DEPENDENCIES_FROM_XML( +# +# +# +# +# +# ) +# +# FIXME: Add documentation here... +# +FUNCTION(WX_GET_DEPENDENCIES_FROM_XML + _depends + _match_patt + _clean_patt + _xml_contents + _depends_path + ) + + STRING(REGEX MATCHALL + ${_match_patt} + dep_file_list + "${${_xml_contents}}" + ) + FOREACH(dep_file ${dep_file_list}) + STRING(REGEX REPLACE ${_clean_patt} "" dep_file "${dep_file}") + + # make the file have an absolute path + IF(NOT IS_ABSOLUTE "${dep_file}") + SET(dep_file "${${_depends_path}}/${dep_file}") + ENDIF(NOT IS_ABSOLUTE "${dep_file}") + + # append file to dependency list + LIST(APPEND ${_depends} "${dep_file}") + ENDFOREACH(dep_file) + + SET(${_depends} ${${_depends}} PARENT_SCOPE) +ENDFUNCTION(WX_GET_DEPENDENCIES_FROM_XML) + +# +# WXWIDGETS_ADD_RESOURCES( +# OPTIONS [NO_CPP_CODE]) +# +# Adds a custom command for resource file compilation of the +# and appends the output files to . +# +# Example usages: +# WXWIDGETS_ADD_RESOURCES(sources xrc/main_frame.xrc) +# WXWIDGETS_ADD_RESOURCES(sources ${xrc_files} OPTIONS -e -o altname.cxx) +# +FUNCTION(WXWIDGETS_ADD_RESOURCES _outfiles) + WX_SPLIT_ARGUMENTS_ON(OPTIONS rc_file_list rc_options ${ARGN}) + + # Parse files for dependencies. + SET(rc_file_list_abs "") + SET(rc_depends "") + FOREACH(rc_file ${rc_file_list}) + GET_FILENAME_COMPONENT(depends_path ${rc_file} PATH) + + GET_FILENAME_COMPONENT(rc_file_abs ${rc_file} ABSOLUTE) + LIST(APPEND rc_file_list_abs "${rc_file_abs}") + + # All files have absolute paths or paths relative to the location + # of the rc file. + FILE(READ "${rc_file_abs}" rc_file_contents) + + # get bitmap/bitmap2 files + WX_GET_DEPENDENCIES_FROM_XML( + rc_depends + "]*>" + rc_file_contents + depends_path + ) + + # get url files + WX_GET_DEPENDENCIES_FROM_XML( + rc_depends + "]*>" + rc_file_contents + depends_path + ) + + # get wxIcon files + WX_GET_DEPENDENCIES_FROM_XML( + rc_depends + "]*class=\"wxIcon\"[^<]+" + "^]*>" + rc_file_contents + depends_path + ) + ENDFOREACH(rc_file) + + # + # Parse options. + # + # If NO_CPP_CODE option specified, then produce .xrs file rather + # than a .cpp file (i.e., don't add the default --cpp-code option). + LIST(FIND rc_options NO_CPP_CODE index) + IF(index EQUAL -1) + LIST(APPEND rc_options --cpp-code) + # wxrc's default output filename for cpp code. + SET(outfile resource.cpp) + ELSE(index EQUAL -1) + LIST(REMOVE_AT rc_options ${index}) + # wxrc's default output filename for xrs file. + SET(outfile resource.xrs) + ENDIF(index EQUAL -1) + + # Get output name for use in ADD_CUSTOM_COMMAND. + # - short option scanning + LIST(FIND rc_options -o index) + IF(NOT index EQUAL -1) + MATH(EXPR filename_index "${index} + 1") + LIST(GET rc_options ${filename_index} outfile) + #LIST(REMOVE_AT rc_options ${index} ${filename_index}) + ENDIF(NOT index EQUAL -1) + # - long option scanning + STRING(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}") + IF(outfile_opt) + STRING(REPLACE "--output=" "" outfile "${outfile_opt}") + ENDIF(outfile_opt) + #STRING(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") + #STRING(REGEX REPLACE ";$" "" rc_options "${rc_options}") + + IF(NOT IS_ABSOLUTE "${outfile}") + SET(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") + ENDIF(NOT IS_ABSOLUTE "${outfile}") + ADD_CUSTOM_COMMAND( + OUTPUT "${outfile}" + COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs} + DEPENDS ${rc_file_list_abs} ${rc_depends} + ) + + # Add generated header to output file list. + LIST(FIND rc_options -e short_index) + LIST(FIND rc_options --extra-cpp-code long_index) + IF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) + GET_FILENAME_COMPONENT(outfile_ext ${outfile} EXT) + STRING(REPLACE "${outfile_ext}" ".h" outfile_header "${outfile}") + LIST(APPEND ${_outfiles} "${outfile_header}") + SET_SOURCE_FILES_PROPERTIES( + "${outfile_header}" PROPERTIES GENERATED TRUE + ) + ENDIF(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) + + # Add generated file to output file list. + LIST(APPEND ${_outfiles} "${outfile}") + + SET(${_outfiles} ${${_outfiles}} PARENT_SCOPE) +ENDFUNCTION(WXWIDGETS_ADD_RESOURCES) diff --git a/Modules/FindwxWindows.cmake b/Modules/FindwxWindows.cmake new file mode 100644 index 000000000..4614e222d --- /dev/null +++ b/Modules/FindwxWindows.cmake @@ -0,0 +1,693 @@ +# - Find wxWindows (wxWidgets) installation +# This module finds if wxWindows/wxWidgets is installed and determines where +# the include files and libraries are. It also determines what the name of +# the library is. +# Please note this file is DEPRECATED and replaced by FindwxWidgets.cmake. +# This code sets the following variables: +# +# WXWINDOWS_FOUND = system has WxWindows +# WXWINDOWS_LIBRARIES = path to the wxWindows libraries +# on Unix/Linux with additional +# linker flags from +# "wx-config --libs" +# CMAKE_WXWINDOWS_CXX_FLAGS = Compiler flags for wxWindows, +# essentially "`wx-config --cxxflags`" +# on Linux +# WXWINDOWS_INCLUDE_DIR = where to find "wx/wx.h" and "wx/setup.h" +# WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on +# Unix +# WXWINDOWS_DEFINITIONS = extra defines +# +# OPTIONS +# If you need OpenGL support please +# SET(WXWINDOWS_USE_GL 1) +# in your CMakeLists.txt *before* you include this file. +# +# HAVE_ISYSTEM - true required to replace -I by -isystem on g++ +# +# For convenience include Use_wxWindows.cmake in your project's +# CMakeLists.txt using INCLUDE(Use_wxWindows). +# +# USAGE +# SET(WXWINDOWS_USE_GL 1) +# FIND_PACKAGE(wxWindows) +# +# NOTES +# wxWidgets 2.6.x is supported for monolithic builds +# e.g. compiled in wx/build/msw dir as: +# nmake -f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 MONOLITHIC=1 +# +# DEPRECATED +# +# CMAKE_WX_CAN_COMPILE +# WXWINDOWS_LIBRARY +# CMAKE_WX_CXX_FLAGS +# WXWINDOWS_INCLUDE_PATH +# +# AUTHOR +# Jan Woetzel (07/2003-01/2006) + + +# ------------------------------------------------------------------ +# +# -removed OPTION for CMAKE_WXWINDOWS_USE_GL. Force the developer to SET it before calling this. +# -major update for wx 2.6.2 and monolithic build option. (10/2005) +# +# STATUS +# tested with: +# cmake 1.6.7, Linux (Suse 7.3), wxWindows 2.4.0, gcc 2.95 +# cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.0, gcc 3.3 +# cmake 1.6.7, Linux (Suse 8.2), wxWindows 2.4.1-patch1, gcc 3.3 +# cmake 1.6.7, MS Windows XP home, wxWindows 2.4.1, MS Visual Studio .net 7 2002 (static build) +# cmake 2.0.5 on Windows XP and Suse Linux 9.2 +# cmake 2.0.6 on Windows XP and Suse Linux 9.2, wxWidgets 2.6.2 MONOLITHIC build +# cmake 2.2.2 on Windows XP, MS Visual Studio .net 2003 7.1 wxWidgets 2.6.2 MONOLITHIC build +# +# TODO +# -OPTION for unicode builds +# -further testing of DLL linking under MS WIN32 +# -better support for non-monolithic builds +# + + +IF(WIN32) + SET(WIN32_STYLE_FIND 1) +ENDIF(WIN32) +IF(MINGW) + SET(WIN32_STYLE_FIND 0) + SET(UNIX_STYLE_FIND 1) +ENDIF(MINGW) +IF(UNIX) + SET(UNIX_STYLE_FIND 1) +ENDIF(UNIX) + + +IF(WIN32_STYLE_FIND) + + ## ###################################################################### + ## + ## Windows specific: + ## + ## candidates for root/base directory of wxwindows + ## should have subdirs include and lib containing include/wx/wx.h + ## fix the root dir to avoid mixing of headers/libs from different + ## versions/builds: + + SET (WXWINDOWS_POSSIBLE_ROOT_PATHS + $ENV{WXWIN} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWidgets_is1;Inno Setup: App Path]" ## WX 2.6.x + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ## WX 2.4.x + C:\\wxWidgets-2.6.2 + D:\\wxWidgets-2.6.2 + C:\\wxWidgets-2.6.1 + D:\\wxWidgets-2.6.1 + C:\\wxWindows-2.4.2 + D:\\wxWindows-2.4.2 + ) + + ## WX supports monolithic and multiple smaller libs (since 2.5.x), we prefer monolithic for now. + ## monolithic = WX is built as a single big library + ## e.g. compile on WIN32 as "nmake -f makefile.vc MONOLITHIC=1 BUILD=debug SHARED=0 USE_OPENGL=1" (JW) + OPTION(WXWINDOWS_USE_MONOLITHIC "Use monolithic build of WX??" ON) + MARK_AS_ADVANCED(WXWINDOWS_USE_MONOLITHIC) + + ## GL libs used? + OPTION(WXWINDOWS_USE_GL "Use Wx with GL support(glcanvas)?" ON) + MARK_AS_ADVANCED(WXWINDOWS_USE_GL) + + + ## avoid mixing of headers and libs between multiple installed WX versions, + ## select just one tree here: + FIND_PATH(WXWINDOWS_ROOT_DIR include/wx/wx.h + ${WXWINDOWS_POSSIBLE_ROOT_PATHS} ) + # MESSAGE("DBG found WXWINDOWS_ROOT_DIR: ${WXWINDOWS_ROOT_DIR}") + + + ## find libs for combination of static/shared with release/debug + ## be careful if you add something here, + ## avoid mixing of headers and libs of different wx versions, + ## there may be multiple WX version s installed. + SET (WXWINDOWS_POSSIBLE_LIB_PATHS + "${WXWINDOWS_ROOT_DIR}/lib" + ) + + ## monolithic? + IF (WXWINDOWS_USE_MONOLITHIC) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY + NAMES wx wxmsw wxmsw26 + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static release build library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY + NAMES wxd wxmswd wxmsw26d + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug build library" ) + + FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY + NAMES wxmsw26 wxmsw262 wxmsw24 wxmsw242 wxmsw241 wxmsw240 wx23_2 wx22_9 + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_dll" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows shared release build library" ) + + FIND_LIBRARY(WXWINDOWS_SHARED_DEBUG_LIBRARY + NAMES wxmsw26d wxmsw262d wxmsw24d wxmsw241d wxmsw240d wx23_2d wx22_9d + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_dll" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows shared debug build library " ) + + + ## + ## required for WXWINDOWS_USE_GL + ## gl lib is always build separate: + ## + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_GL + NAMES wx_gl wxmsw_gl wxmsw26_gl + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static release build GL library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_GL + NAMES wxd_gl wxmswd_gl wxmsw26d_gl + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug build GL library" ) + + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_PNG + NAMES wxpngd + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug png library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_PNG + NAMES wxpng + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static png library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF + NAMES wxtiffd + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug tiff library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_TIFF + NAMES wxtiff + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static tiff library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG + NAMES wxjpegd wxjpgd + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug jpeg library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_JPEG + NAMES wxjpeg wxjpg + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static jpeg library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB + NAMES wxzlibd + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug zlib library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_ZLIB + NAMES wxzlib + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static zib library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX + NAMES wxregexd + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static debug regex library" ) + + FIND_LIBRARY(WXWINDOWS_STATIC_LIBRARY_REGEX + NAMES wxregex + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_lib" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows static regex library" ) + + + + ## untested: + FIND_LIBRARY(WXWINDOWS_SHARED_LIBRARY_GL + NAMES wx_gl wxmsw_gl wxmsw26_gl + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_dll" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows shared release build GL library" ) + + FIND_LIBRARY(WXWINDOWS_SHARED_DEBUG_LIBRARY_GL + NAMES wxd_gl wxmswd_gl wxmsw26d_gl + PATHS + "${WXWINDOWS_ROOT_DIR}/lib/vc_dll" + ${WXWINDOWS_POSSIBLE_LIB_PATHS} + DOC "wxWindows shared debug build GL library" ) + + + ELSE (WXWINDOWS_USE_MONOLITHIC) + ## WX is built as multiple small pieces libraries instead of monolithic + + ## DEPECATED (jw) replaced by more general WXWINDOWS_USE_MONOLITHIC ON/OFF + # OPTION(WXWINDOWS_SEPARATE_LIBS_BUILD "Is wxWindows build with separate libs?" OFF) + + ## HACK: This is very dirty. + ## because the libs of a particular version are explicitly listed + ## and NOT searched/verified. + ## TODO: Really search for each lib, then decide for + ## monolithic x debug x shared x GL (=16 combinations) for at least 18 libs + ## --> about 288 combinations + ## thus we need a different approach so solve this correctly ... + + MESSAGE(STATUS "Warning: You are trying to use wxWidgets without monolithic build (WXWINDOWS_SEPARATE_LIBS_BUILD). This is a HACK, libraries are not verified! (JW).") + + SET(WXWINDOWS_STATIC_LIBS ${WXWINDOWS_STATIC_LIBS} + wxbase26 + wxbase26_net + wxbase26_odbc + wxbase26_xml + wxmsw26_adv + wxmsw26_core + wxmsw26_dbgrid + wxmsw26_gl + wxmsw26_html + wxmsw26_media + wxmsw26_qa + wxmsw26_xrc + wxexpat + wxjpeg + wxpng + wxregex + wxtiff + wxzlib + comctl32 + rpcrt4 + wsock32 + ) + ## HACK: feed in to optimized / debug libaries if both were FOUND. + SET(WXWINDOWS_STATIC_DEBUG_LIBS ${WXWINDOWS_STATIC_DEBUG_LIBS} + wxbase26d + wxbase26d_net + wxbase26d_odbc + wxbase26d_xml + wxmsw26d_adv + wxmsw26d_core + wxmsw26d_dbgrid + wxmsw26d_gl + wxmsw26d_html + wxmsw26d_media + wxmsw26d_qa + wxmsw26d_xrc + wxexpatd + wxjpegd + wxpngd + wxregexd + wxtiffd + wxzlibd + comctl32 + rpcrt4 + wsock32 + ) + ENDIF (WXWINDOWS_USE_MONOLITHIC) + + + ## + ## now we should have found all WX libs available on the system. + ## let the user decide which of the available onse to use. + ## + + ## if there is at least one shared lib available + ## let user choose wether to use shared or static wxwindows libs + IF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY) + ## default value OFF because wxWindows MSVS default build is static + OPTION(WXWINDOWS_USE_SHARED_LIBS + "Use shared versions (dll) of wxWindows libraries?" OFF) + MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS) + ENDIF(WXWINDOWS_SHARED_LIBRARY OR WXWINDOWS_SHARED_DEBUG_LIBRARY) + + ## add system libraries wxwindows always seems to depend on + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + comctl32 + rpcrt4 + wsock32 + ) + + IF (NOT WXWINDOWS_USE_SHARED_LIBS) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ## these ones dont seem required, in particular ctl3d32 is not neccesary (Jan Woetzel 07/2003) + # ctl3d32 + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB} optimized ${WXWINDOWS_STATIC_LIBRARY_ZLIB} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX} optimized ${WXWINDOWS_STATIC_LIBRARY_REGEX} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_PNG} optimized ${WXWINDOWS_STATIC_LIBRARY_PNG} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG} optimized ${WXWINDOWS_STATIC_LIBRARY_JPEG} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF} optimized ${WXWINDOWS_STATIC_LIBRARY_TIFF} + ) + ENDIF (NOT WXWINDOWS_USE_SHARED_LIBS) + + ## opengl/glu: TODO/FIXME: better use FindOpenGL.cmake here + ## assume release versions of glu an dopengl, here. + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + opengl32 + glu32 ) + ENDIF (WXWINDOWS_USE_GL) + + ## + ## select between use of shared or static wxWindows lib then set libs to use + ## for debug and optimized build. so the user can switch between debug and + ## release build e.g. within MS Visual Studio without running cmake with a + ## different build directory again. + ## + ## then add the build specific include dir for wx/setup.h + ## + + IF(WXWINDOWS_USE_SHARED_LIBS) + ##MESSAGE("DBG wxWindows use shared lib selected.") + ## assume that both builds use the same setup(.h) for simplicity + + ## shared: both wx (debug and release) found? + ## assume that both builds use the same setup(.h) for simplicity + IF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY) + ##MESSAGE("DBG wx shared: debug and optimized found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/mswdlld + ${WXWINDOWS_ROOT_DIR}/lib/mswdll + ${WXWINDOWS_ROOT_DIR}/lib/vc_dll/mswd + ${WXWINDOWS_ROOT_DIR}/lib/vc_dll/msw ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + debug ${WXWINDOWS_SHARED_DEBUG_LIBRARY} + optimized ${WXWINDOWS_SHARED_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + debug ${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL} + optimized ${WXWINDOWS_SHARED_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY AND WXWINDOWS_SHARED_LIBRARY) + + ## shared: only debug wx lib found? + IF(WXWINDOWS_SHARED_DEBUG_LIBRARY) + IF(NOT WXWINDOWS_SHARED_LIBRARY) + ##MESSAGE("DBG wx shared: debug (but no optimized) found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/mswdlld + ${WXWINDOWS_ROOT_DIR}/lib/vc_dll/mswd ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_SHARED_DEBUG_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(NOT WXWINDOWS_SHARED_LIBRARY) + ENDIF(WXWINDOWS_SHARED_DEBUG_LIBRARY) + + ## shared: only release wx lib found? + IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY) + IF(WXWINDOWS_SHARED_LIBRARY) + ##MESSAGE("DBG wx shared: optimized (but no debug) found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/mswdll + ${WXWINDOWS_ROOT_DIR}/lib/vc_dll/msw ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_SHARED_DEBUG_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_SHARED_DEBUG_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(WXWINDOWS_SHARED_LIBRARY) + ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY) + + ## shared: none found? + IF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY) + IF(NOT WXWINDOWS_SHARED_LIBRARY) + MESSAGE(STATUS + "No shared wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.") + ENDIF(NOT WXWINDOWS_SHARED_LIBRARY) + ENDIF(NOT WXWINDOWS_SHARED_DEBUG_LIBRARY) + + ######################################################################################### + ELSE(WXWINDOWS_USE_SHARED_LIBS) + + ##jw: DEPRECATED IF(NOT WXWINDOWS_SEPARATE_LIBS_BUILD) + + ## static: both wx (debug and release) found? + ## assume that both builds use the same setup(.h) for simplicity + IF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY) + ##MESSAGE("DBG wx static: debug and optimized found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/mswd + ${WXWINDOWS_ROOT_DIR}/lib/msw + ${WXWINDOWS_ROOT_DIR}/lib/vc_lib/mswd + ${WXWINDOWS_ROOT_DIR}/lib/vc_lib/msw ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY} + optimized ${WXWINDOWS_STATIC_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + debug ${WXWINDOWS_STATIC_DEBUG_LIBRARY_GL} + optimized ${WXWINDOWS_STATIC_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY AND WXWINDOWS_STATIC_LIBRARY) + + ## static: only debug wx lib found? + IF(WXWINDOWS_STATIC_DEBUG_LIBRARY) + IF(NOT WXWINDOWS_STATIC_LIBRARY) + ##MESSAGE("DBG wx static: debug (but no optimized) found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/mswd + ${WXWINDOWS_ROOT_DIR}/lib/vc_lib/mswd ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_STATIC_DEBUG_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_STATIC_DEBUG_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(NOT WXWINDOWS_STATIC_LIBRARY) + ENDIF(WXWINDOWS_STATIC_DEBUG_LIBRARY) + + ## static: only release wx lib found? + IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY) + IF(WXWINDOWS_STATIC_LIBRARY) + ##MESSAGE("DBG wx static: optimized (but no debug) found.") + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWINDOWS_ROOT_DIR}/lib/msw + ${WXWINDOWS_ROOT_DIR}/lib/vc_lib/msw ) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_STATIC_LIBRARY} ) + IF (WXWINDOWS_USE_GL) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} + ${WXWINDOWS_STATIC_LIBRARY_GL} ) + ENDIF (WXWINDOWS_USE_GL) + ENDIF(WXWINDOWS_STATIC_LIBRARY) + ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY) + + ## static: none found? + IF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD) + IF(NOT WXWINDOWS_STATIC_LIBRARY) + MESSAGE(STATUS + "No static wxWindows lib found, but WXWINDOWS_USE_SHARED_LIBS=${WXWINDOWS_USE_SHARED_LIBS}.") + ENDIF(NOT WXWINDOWS_STATIC_LIBRARY) + ENDIF(NOT WXWINDOWS_STATIC_DEBUG_LIBRARY AND NOT WXWINDOWS_SEPARATE_LIBS_BUILD) + ENDIF(WXWINDOWS_USE_SHARED_LIBS) + + + ## not neccessary in wxWindows 2.4.1 and 2.6.2 + ## but it may fix a previous bug, see + ## http://lists.wxwindows.org/cgi-bin/ezmlm-cgi?8:mss:37574:200305:mpdioeneabobmgjenoap + OPTION(WXWINDOWS_SET_DEFINITIONS "Set additional defines for wxWindows" OFF) + MARK_AS_ADVANCED(WXWINDOWS_SET_DEFINITIONS) + IF (WXWINDOWS_SET_DEFINITIONS) + SET(WXWINDOWS_DEFINITIONS "-DWINVER=0x400") + ELSE (WXWINDOWS_SET_DEFINITIONS) + # clear: + SET(WXWINDOWS_DEFINITIONS "") + ENDIF (WXWINDOWS_SET_DEFINITIONS) + + + + ## Find the include directories for wxwindows + ## the first, build specific for wx/setup.h was determined before. + ## add inc dir for general for "wx/wx.h" + FIND_PATH(WXWINDOWS_INCLUDE_DIR wx/wx.h + "${WXWINDOWS_ROOT_DIR}/include" ) + ## append the build specific include dir for wx/setup.h: + IF (WXWINDOWS_INCLUDE_DIR_SETUPH) + SET(WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${WXWINDOWS_INCLUDE_DIR_SETUPH} ) + ENDIF (WXWINDOWS_INCLUDE_DIR_SETUPH) + + + + MARK_AS_ADVANCED( + WXWINDOWS_ROOT_DIR + WXWINDOWS_INCLUDE_DIR + WXWINDOWS_INCLUDE_DIR_SETUPH + WXWINDOWS_STATIC_LIBRARY + WXWINDOWS_STATIC_LIBRARY_GL + WXWINDOWS_STATIC_DEBUG_LIBRARY + WXWINDOWS_STATIC_DEBUG_LIBRARY_GL + WXWINDOWS_STATIC_LIBRARY_ZLIB + WXWINDOWS_STATIC_DEBUG_LIBRARY_ZLIB + WXWINDOWS_STATIC_LIBRARY_REGEX + WXWINDOWS_STATIC_DEBUG_LIBRARY_REGEX + WXWINDOWS_STATIC_LIBRARY_PNG + WXWINDOWS_STATIC_DEBUG_LIBRARY_PNG + WXWINDOWS_STATIC_LIBRARY_JPEG + WXWINDOWS_STATIC_DEBUG_LIBRARY_JPEG + WXWINDOWS_STATIC_DEBUG_LIBRARY_TIFF + WXWINDOWS_STATIC_LIBRARY_TIFF + WXWINDOWS_SHARED_LIBRARY + WXWINDOWS_SHARED_DEBUG_LIBRARY + WXWINDOWS_SHARED_LIBRARY_GL + WXWINDOWS_SHARED_DEBUG_LIBRARY_GL + ) + + +ELSE(WIN32_STYLE_FIND) + + IF (UNIX_STYLE_FIND) + ## ###################################################################### + ## + ## UNIX/Linux specific: + ## + ## use backquoted wx-config to query and set flags and libs: + ## 06/2003 Jan Woetzel + ## + + OPTION(WXWINDOWS_USE_SHARED_LIBS "Use shared versions (.so) of wxWindows libraries" ON) + MARK_AS_ADVANCED(WXWINDOWS_USE_SHARED_LIBS) + + # JW removed option and force the develper th SET it. + # OPTION(WXWINDOWS_USE_GL "use wxWindows with GL support (use additional + # --gl-libs for wx-config)?" OFF) + + # wx-config should be in your path anyhow, usually no need to set WXWIN or + # search in ../wx or ../../wx + FIND_PROGRAM(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE wx-config + $ENV{WXWIN} + $ENV{WXWIN}/bin + ../wx/bin + ../../wx/bin ) + + # check wether wx-config was found: + IF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) + + # use shared/static wx lib? + # remember: always link shared to use systems GL etc. libs (no static + # linking, just link *against* static .a libs) + IF(WXWINDOWS_USE_SHARED_LIBS) + SET(WX_CONFIG_ARGS_LIBS "--libs") + ELSE(WXWINDOWS_USE_SHARED_LIBS) + SET(WX_CONFIG_ARGS_LIBS "--static --libs") + ENDIF(WXWINDOWS_USE_SHARED_LIBS) + + # do we need additionial wx GL stuff like GLCanvas ? + IF(WXWINDOWS_USE_GL) + SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" ) + ENDIF(WXWINDOWS_USE_GL) + ##MESSAGE("DBG: WX_CONFIG_ARGS_LIBS=${WX_CONFIG_ARGS_LIBS}===") + + # set CXXFLAGS to be fed into CMAKE_CXX_FLAGS by the user: + IF (HAVE_ISYSTEM) # does the compiler support -isystem ? + IF (NOT APPLE) # -isystem seem sto be unsuppored on Mac + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX ) + IF (CMAKE_CXX_COMPILER MATCHES g\\+\\+) + SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags|sed -e s/-I/-isystem/g`") + ELSE(CMAKE_CXX_COMPILER MATCHES g\\+\\+) + SET(CMAKE_WXWINDOWS_CXX_FLAGS "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} --cxxflags`") + ENDIF(CMAKE_CXX_COMPILER MATCHES g\\+\\+) + ENDIF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX ) + ENDIF (NOT APPLE) + ENDIF (HAVE_ISYSTEM) + ##MESSAGE("DBG: for compilation: + ##CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS}===") + + # keep the back-quoted string for clarity + SET(WXWINDOWS_LIBRARIES "`${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} ${WX_CONFIG_ARGS_LIBS}`") + ##MESSAGE("DBG2: for linking: + ##WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES}===") + + # evaluate wx-config output to separate linker flags and linkdirs for + # rpath: + EXEC_PROGRAM(${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE} + ARGS ${WX_CONFIG_ARGS_LIBS} + OUTPUT_VARIABLE WX_CONFIG_LIBS ) + + ## extract linkdirs (-L) for rpath + ## use regular expression to match wildcard equivalent "-L*" + ## with is a space or a semicolon + STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" ) + # MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}") + + ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES + ## replace -L by ; because the separator seems to be lost otherwise (bug or + ## feature?) + IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) + STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} ) + # MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}") + ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) + + + ## replace space separated string by semicolon separated vector to make it + ## work with LINK_DIRECTORIES + SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES) + + MARK_AS_ADVANCED( + CMAKE_WXWINDOWS_CXX_FLAGS + WXWINDOWS_INCLUDE_DIR + WXWINDOWS_LIBRARIES + CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE + ) + + + ## we really need wx-config... + ELSE(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) + MESSAGE(STATUS "Cannot find wx-config anywhere on the system. Please put the file into your path or specify it in CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE.") + MARK_AS_ADVANCED(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) + ENDIF(CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE) + + + + ELSE(UNIX_STYLE_FIND) + MESSAGE(STATUS "FindwxWindows.cmake: Platform unknown/unsupported by FindwxWindows.cmake. It's neither WIN32 nor UNIX") + ENDIF(UNIX_STYLE_FIND) +ENDIF(WIN32_STYLE_FIND) + + +IF(WXWINDOWS_LIBRARIES) + IF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS) + ## found all we need. + SET(WXWINDOWS_FOUND 1) + + ## set deprecated variables for backward compatibility: + SET(CMAKE_WX_CAN_COMPILE ${WXWINDOWS_FOUND}) + SET(WXWINDOWS_LIBRARY ${WXWINDOWS_LIBRARIES}) + SET(WXWINDOWS_INCLUDE_PATH ${WXWINDOWS_INCLUDE_DIR}) + SET(WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES}) + SET(CMAKE_WX_CXX_FLAGS ${CMAKE_WXWINDOWS_CXX_FLAGS}) + + ENDIF(WXWINDOWS_INCLUDE_DIR OR CMAKE_WXWINDOWS_CXX_FLAGS) +ENDIF(WXWINDOWS_LIBRARIES) diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake new file mode 100644 index 000000000..8c29d4b8b --- /dev/null +++ b/Modules/GetPrerequisites.cmake @@ -0,0 +1,492 @@ +# GetPrerequisites.cmake +# +# This script provides functions to list the .dll, .dylib or .so files that an +# executable or shared library file depends on. (Its prerequisites.) +# +# It uses various tools to obtain the list of required shared library files: +# dumpbin (Windows) +# ldd (Linux/Unix) +# otool (Mac OSX) +# +# The following functions are provided by this script: +# gp_append_unique +# gp_file_type +# is_file_executable +# get_prerequisites +# list_prerequisites +# +# Requires CMake 2.5 or greater because it uses function, break, return and +# PARENT_SCOPE. +# +cmake_minimum_required(VERSION 2.5 FATAL_ERROR) + + +# gp_append_unique list_var value +# +# Append value to the list variable ${list_var} only if the value is not +# already in the list. +# +function(gp_append_unique list_var value) + set(contains 0) + + foreach(item ${${list_var}}) + if("${item}" STREQUAL "${value}") + set(contains 1) + break() + endif("${item}" STREQUAL "${value}") + endforeach(item) + + if(NOT contains) + set(${list_var} ${${list_var}} "${value}" PARENT_SCOPE) + endif(NOT contains) +endfunction(gp_append_unique) + + +# gp_file_type original_file file type_var +# +# Return the type of ${file} with respect to ${original_file}. String +# describing type of prerequisite is returned in variable named ${type_var}. +# +# Possible types are: +# system +# local +# embedded +# other +# +function(gp_file_type original_file file type_var) + set(is_embedded 0) + set(is_local 0) + set(is_system 0) + + string(TOLOWER "${original_file}" original_lower) + string(TOLOWER "${file}" lower) + + if("${file}" MATCHES "^@(executable|loader)_path") + set(is_embedded 1) + endif("${file}" MATCHES "^@(executable|loader)_path") + + if(NOT is_embedded) + if("${file}" MATCHES "^(/System/Library/|/usr/lib/)") + set(is_system 1) + endif("${file}" MATCHES "^(/System/Library/|/usr/lib/)") + + if(WIN32) + string(TOLOWER "$ENV{SystemRoot}" sysroot) + string(REGEX REPLACE "\\\\" "/" sysroot "${sysroot}") + + string(TOLOWER "$ENV{windir}" windir) + string(REGEX REPLACE "\\\\" "/" windir "${windir}") + + if("${lower}" MATCHES "^(${sysroot}/system|${windir}/system|msvc[^/]+dll)") + set(is_system 1) + endif("${lower}" MATCHES "^(${sysroot}/system|${windir}/system|msvc[^/]+dll)") + endif(WIN32) + + if(NOT is_system) + get_filename_component(original_path "${original_lower}" PATH) + get_filename_component(path "${lower}" PATH) + if("${original_path}" STREQUAL "${path}") + set(is_local 1) + endif("${original_path}" STREQUAL "${path}") + endif(NOT is_system) + endif(NOT is_embedded) + + # Return type string based on computed booleans: + # + set(type "other") + + if(is_system) + set(type "system") + else(is_system) + if(is_embedded) + set(type "embedded") + else(is_embedded) + if(is_local) + set(type "local") + endif(is_local) + endif(is_embedded) + endif(is_system) + + set(${type_var} "${type}" PARENT_SCOPE) +endfunction(gp_file_type) + + +# is_file_executable file result_var +# +# Return 1 in ${result_var} if ${file} is a binary executable. +# +# Return 0 in ${result_var} otherwise. +# +function(is_file_executable file result_var) + # + # A file is not executable until proven otherwise: + # + set(${result_var} 0 PARENT_SCOPE) + + 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(WIN32) + if("${file_full_lower}" MATCHES "\\.(exe|dll)$") + set(${result_var} 1 PARENT_SCOPE) + return() + endif("${file_full_lower}" MATCHES "\\.(exe|dll)$") + + # A clause could be added here that uses output or return value of dumpbin + # to determine ${result_var}. In 95%+ practical cases, the exe|dll name + # match will be sufficient... + # + endif(WIN32) + + # Use the information returned from the Unix shell command "file" to + # determine if ${file_full} should be considered an executable file... + # + # If the file command's output contains "executable" and does *not* contain + # "text" then it is likely an executable suitable for prerequisite analysis + # via the get_prerequisites macro. + # + if(UNIX) + if(NOT file_cmd) + find_program(file_cmd "file") + endif(NOT file_cmd) + + if(file_cmd) + execute_process(COMMAND "${file_cmd}" "${file_full}" + OUTPUT_VARIABLE file_ov + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + # Replace the name of the file in the output with a placeholder token + # (the string " _file_full_ ") so that just in case the path name of + # the file contains the word "text" or "executable" we are not fooled + # into thinking "the wrong thing" because the file name matches the + # other 'file' command output we are looking for... + # + string(REPLACE "${file_full}" " _file_full_ " file_ov "${file_ov}") + string(TOLOWER "${file_ov}" file_ov) + + #message(STATUS "file_ov='${file_ov}'") + if("${file_ov}" MATCHES "executable") + #message(STATUS "executable!") + if("${file_ov}" MATCHES "text") + #message(STATUS "but text, so *not* a binary executable!") + else("${file_ov}" MATCHES "text") + set(${result_var} 1 PARENT_SCOPE) + return() + endif("${file_ov}" MATCHES "text") + endif("${file_ov}" MATCHES "executable") + else(file_cmd) + message(STATUS "warning: No 'file' command, skipping execute_process...") + endif(file_cmd) + endif(UNIX) +endfunction(is_file_executable) + + +# get_prerequisites target prerequisites_var exclude_system recurse +# +# Get the list of shared library files required by ${target}. The list in +# the variable named ${prerequisites_var} should be empty on first entry to +# this function. On exit, ${prerequisites_var} will contain the list of +# required shared library files. +# +# target is the full path to an executable file +# +# prerequisites_var is the name of a CMake variable to contain the results +# +# exclude_system is 0 or 1: 0 to include "system" prerequisites , 1 to +# exclude them +# +# recurse is 0 or 1: 0 for direct prerequisites only, 1 for all prerequisites +# recursively +# +# optional ARGV4 (verbose) is 0 or 1: 0 to skip informational message output, +# 1 to print it +# +function(get_prerequisites target prerequisites_var exclude_system recurse) +# set(verbose 0) +# if(NOT "${ARGV4}" STREQUAL "") +# message(STATUS "ARGV4='${ARGV4}'") +# set(verbose "${ARGV4}") +# endif(NOT "${ARGV4}" STREQUAL "") +# message(STATUS "verbose='${verbose}'") + set(verbose 0) + + set(eol_char "E") + + # + # + # Try to choose the right tool by default. Caller can set gp_tool prior to + # calling this function to force using a different tool. + # + if("${gp_tool}" STREQUAL "") + set(gp_tool "ldd") + if(APPLE) + set(gp_tool "otool") + endif(APPLE) + if(WIN32) + set(gp_tool "dumpbin") + endif(WIN32) + endif("${gp_tool}" STREQUAL "") + + set(gp_tool_known 0) + + if("${gp_tool}" STREQUAL "ldd") + set(gp_cmd_args "") + set(gp_regex "^\t([\t ]+)[\t ].*${eol_char}$") + set(gp_regex_cmp_count 1) + set(gp_tool_known 1) + endif("${gp_tool}" STREQUAL "ldd") + + if("${gp_tool}" STREQUAL "otool") + set(gp_cmd_args "-L") + set(gp_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$") + set(gp_regex_cmp_count 3) + set(gp_tool_known 1) + endif("${gp_tool}" STREQUAL "otool") + + if("${gp_tool}" STREQUAL "dumpbin") + set(gp_cmd_args "/dependents") + set(gp_regex "^ ([^ ].*[Dd][Ll][Ll])${eol_char}$") + set(gp_regex_cmp_count 1) + set(gp_tool_known 1) + set(ENV{VS_UNICODE_OUTPUT} "") # Block extra output from inside VS IDE. + endif("${gp_tool}" STREQUAL "dumpbin") + + if(NOT gp_tool_known) + message(STATUS "warning: gp_tool='${gp_tool}' is an unknown tool...") + message(STATUS "CMake function get_prerequisites needs more code to handle '${gp_tool}'") + message(STATUS "Valid gp_tool values are dumpbin, ldd and otool.") + return() + endif(NOT gp_tool_known) + + set(gp_cmd_paths ${gp_cmd_paths} + "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin" + "C:/Program Files (x86)/Microsoft Visual Studio 9.0/VC/bin" + "C:/Program Files/Microsoft Visual Studio 8/VC/BIN" + "C:/Program Files (x86)/Microsoft Visual Studio 8/VC/BIN" + "C:/Program Files/Microsoft Visual Studio .NET 2003/VC7/BIN" + "C:/Program Files (x86)/Microsoft Visual Studio .NET 2003/VC7/BIN" + "/usr/local/bin" + "/usr/bin" + ) + + find_program(gp_cmd ${gp_tool} PATHS ${gp_cmd_paths}) + + if(NOT gp_cmd) + message(STATUS "warning: could not find '${gp_tool}' - cannot analyze prerequisites...") + return() + endif(NOT gp_cmd) + + if("${gp_tool}" STREQUAL "dumpbin") + # When running dumpbin, it also needs the "Common7/IDE" directory in the + # PATH. It will already be in the PATH if being run from a Visual Studio + # command prompt. Add it to the PATH here in case we are running from a + # different command prompt. + # + get_filename_component(gp_cmd_dir "${gp_cmd}" PATH) + get_filename_component(gp_cmd_dlls_dir "${gp_cmd_dir}/../../Common7/IDE" ABSOLUTE) + if(EXISTS "${gp_cmd_dlls_dir}") + set(ENV{PATH} "$ENV{PATH};${gp_cmd_dlls_dir}") + endif(EXISTS "${gp_cmd_dlls_dir}") + endif("${gp_tool}" STREQUAL "dumpbin") + # + # + + # Track new prerequisites at each new level of recursion. Start with an + # empty list at each level: + # + set(unseen_prereqs) + + # Run gp_cmd on the target: + # + execute_process( + COMMAND ${gp_cmd} ${gp_cmd_args} ${target} + OUTPUT_VARIABLE gp_cmd_ov + ) + + if(verbose) + message(STATUS "") + message(STATUS "gp_cmd_ov='${gp_cmd_ov}'") + message(STATUS "") + endif(verbose) + + get_filename_component(target_dir "${target}" PATH) + + # Convert to a list of lines: + # + string(REGEX REPLACE ";" "\\\\;" candidates "${gp_cmd_ov}") + string(REGEX REPLACE "\n" "${eol_char};" candidates "${candidates}") + + # Analyze each line for file names that match the regular expression: + # + foreach(candidate ${candidates}) + if("${candidate}" MATCHES "${gp_regex}") + # Extract information from each candidate: + string(REGEX REPLACE "${gp_regex}" "\\1" raw_item "${candidate}") + + if(gp_regex_cmp_count GREATER 1) + string(REGEX REPLACE "${gp_regex}" "\\2" raw_compat_version "${candidate}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" compat_major_version "${raw_compat_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" compat_minor_version "${raw_compat_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" compat_patch_version "${raw_compat_version}") + endif(gp_regex_cmp_count GREATER 1) + + if(gp_regex_cmp_count GREATER 2) + string(REGEX REPLACE "${gp_regex}" "\\3" raw_current_version "${candidate}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" current_major_version "${raw_current_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" current_minor_version "${raw_current_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" current_patch_version "${raw_current_version}") + endif(gp_regex_cmp_count GREATER 2) + + # Using find_program on Windows will find dll files that are in the PATH. + # (Converting simple file names into full path names if found.) + # + set(item "item-NOTFOUND") + find_program(item "${raw_item}" PATHS "${target_dir}") + if(NOT item) + set(item "${raw_item}") + endif(NOT item) + + if(verbose) + message(STATUS "raw_item='${raw_item}'") + message(STATUS "item='${item}'") + endif(verbose) + + # Add each item unless it is excluded: + # + set(add_item 1) + + if(${exclude_system}) + set(type "") + gp_file_type("${target}" "${item}" type) + + if("${type}" STREQUAL "system") + set(add_item 0) + endif("${type}" STREQUAL "system") + endif(${exclude_system}) + + if(add_item) + list(LENGTH ${prerequisites_var} list_length_before_append) + gp_append_unique(${prerequisites_var} "${item}") + list(LENGTH ${prerequisites_var} list_length_after_append) + + if(${recurse}) + # If item was really added, this is the first time we have seen it. + # Add it to unseen_prereqs so that we can recursively add *its* + # prerequisites... + # + if(NOT list_length_before_append EQUAL list_length_after_append) + set(unseen_prereqs ${unseen_prereqs} "${item}") + endif(NOT list_length_before_append EQUAL list_length_after_append) + endif(${recurse}) + endif(add_item) + else("${candidate}" MATCHES "${gp_regex}") + if(verbose) + message(STATUS "ignoring non-matching line: '${candidate}'") + endif(verbose) + endif("${candidate}" MATCHES "${gp_regex}") + endforeach(candidate) + + list(SORT ${prerequisites_var}) + + if(${recurse}) + set(more_inputs ${unseen_prereqs}) + foreach(input ${more_inputs}) + get_prerequisites("${input}" ${prerequisites_var} ${exclude_system} ${recurse}) + endforeach(input) + endif(${recurse}) + + set(${prerequisites_var} ${${prerequisites_var}} PARENT_SCOPE) +endfunction(get_prerequisites) + + +# list_prerequisites target all exclude_system verbose +# +# ARGV0 (target) is the full path to an executable file +# +# optional ARGV1 (all) is 0 or 1: 0 for direct prerequisites only, +# 1 for all prerequisites recursively +# +# optional ARGV2 (exclude_system) is 0 or 1: 0 to include "system" +# prerequisites , 1 to exclude them +# +# optional ARGV3 (verbose) is 0 or 1: 0 to print only full path +# names of prerequisites, 1 to print extra information +# +function(list_prerequisites target) + if("${ARGV1}" STREQUAL "") + set(all 1) + else("${ARGV1}" STREQUAL "") + set(all "${ARGV1}") + endif("${ARGV1}" STREQUAL "") + + if("${ARGV2}" STREQUAL "") + set(exclude_system 0) + else("${ARGV2}" STREQUAL "") + set(exclude_system "${ARGV2}") + endif("${ARGV2}" STREQUAL "") + + if("${ARGV3}" STREQUAL "") + set(verbose 0) + else("${ARGV3}" STREQUAL "") + set(verbose "${ARGV3}") + endif("${ARGV3}" STREQUAL "") + + set(count 0) + set(count_str "") + set(print_count "${verbose}") + set(print_prerequisite_type "${verbose}") + set(print_target "${verbose}") + set(type_str "") + + set(prereqs "") + get_prerequisites("${target}" prereqs ${exclude_system} ${all}) + + if(print_target) + message(STATUS "File '${target}' depends on:") + endif(print_target) + + foreach(d ${prereqs}) + math(EXPR count "${count} + 1") + + if(print_count) + set(count_str "${count}. ") + endif(print_count) + + if(print_prerequisite_type) + gp_file_type("${target}" "${d}" type) + set(type_str " (${type})") + endif(print_prerequisite_type) + + message(STATUS "${count_str}${d}${type_str}") + endforeach(d) +endfunction(list_prerequisites) + + +# list_prerequisites_by_glob glob_arg glob_exp +# +# glob_arg is GLOB or GLOB_RECURSE +# +# glob_exp is a globbing expression used with "file(GLOB" to retrieve a list +# of matching files. If a matching file is executable, its prerequisites are +# listed. +# +# Any additional (optional) arguments provided are passed along as the +# optional arguments to the list_prerequisites calls. +# +function(list_prerequisites_by_glob glob_arg glob_exp) + message(STATUS "=============================================================================") + message(STATUS "List prerequisites of executables matching ${glob_arg} '${glob_exp}'") + message(STATUS "") + file(${glob_arg} file_list ${glob_exp}) + foreach(f ${file_list}) + is_file_executable("${f}" is_f_executable) + if(is_f_executable) + message(STATUS "=============================================================================") + list_prerequisites("${f}" ${ARGN}) + message(STATUS "") + endif(is_f_executable) + endforeach(f) +endfunction(list_prerequisites_by_glob) diff --git a/Modules/ITKCompatibility.cmake b/Modules/ITKCompatibility.cmake new file mode 100755 index 000000000..8a1392569 --- /dev/null +++ b/Modules/ITKCompatibility.cmake @@ -0,0 +1,3 @@ +# 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 new file mode 100644 index 000000000..2b963bf83 --- /dev/null +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -0,0 +1,202 @@ +# By including this file, all files in the CMAKE_INSTALL_DEBUG_LIBRARIES, +# will be installed with INSTALL_PROGRAMS into /bin for WIN32 and /lib +# for non-win32. If CMAKE_SKIP_INSTALL_RULES is set to TRUE before including +# this file, then the INSTALL command is not called. The use can use +# the variable CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS to use a custom install +# command and install them into any directory they want. +# If it is the MSVC compiler, then the microsoft run +# time libraries will be found add automatically added to the +# CMAKE_INSTALL_DEBUG_LIBRARIES, and installed. +# If CMAKE_INSTALL_DEBUG_LIBRARIES is set and it is the MSVC +# compiler, then the debug libraries are installed when available. +# If CMAKE_INSTALL_MFC_LIBRARIES is set then the MFC run time +# libraries are installed as well as the CRT run time libraries. + +IF(MSVC) + FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT) + IF(MSVC70) + SET(__install__libs + "${SYSTEMROOT}/system32/msvcp70.dll" + "${SYSTEMROOT}/system32/msvcr70.dll" + ) + ENDIF(MSVC70) + IF(MSVC71) + SET(__install__libs + "${SYSTEMROOT}/system32/msvcp71.dll" + "${SYSTEMROOT}/system32/msvcr71.dll" + ) + ENDIF(MSVC71) + IF(MSVC80) + # Find the runtime library redistribution directory. + FIND_PATH(MSVC80_REDIST_DIR NAMES x86/Microsoft.VC80.CRT/Microsoft.VC80.CRT.manifest + PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0;InstallDir]/../../VC/redist" + ) + MARK_AS_ADVANCED(MSVC80_REDIST_DIR) + SET(MSVC80_CRT_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.CRT") + + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs + "${MSVC80_CRT_DIR}/Microsoft.VC80.CRT.manifest" + "${MSVC80_CRT_DIR}/msvcm80.dll" + "${MSVC80_CRT_DIR}/msvcp80.dll" + "${MSVC80_CRT_DIR}/msvcr80.dll" + ) + + IF(CMAKE_INSTALL_DEBUG_LIBRARIES) + SET(MSVC80_CRT_DIR + "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugCRT") + SET(__install__libs ${__install__libs} + "${MSVC80_CRT_DIR}/Microsoft.VC80.DebugCRT.manifest" + "${MSVC80_CRT_DIR}/msvcm80d.dll" + "${MSVC80_CRT_DIR}/msvcp80d.dll" + "${MSVC80_CRT_DIR}/msvcr80d.dll" + ) + ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) + + ENDIF(MSVC80) + IF(MSVC90) + # Find the runtime library redistribution directory. + FIND_PATH(MSVC90_REDIST_DIR NAMES x86/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest + PATHS "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0;InstallDir]/../../VC/redist" + + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VCExpress\\9.0;InstallDir]/../../VC/redist" + ) + MARK_AS_ADVANCED(MSVC90_REDIST_DIR) + SET(MSVC90_CRT_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.CRT") + + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs + "${MSVC90_CRT_DIR}/Microsoft.VC90.CRT.manifest" + "${MSVC90_CRT_DIR}/msvcm90.dll" + "${MSVC90_CRT_DIR}/msvcp90.dll" + "${MSVC90_CRT_DIR}/msvcr90.dll" + ) + IF(CMAKE_INSTALL_DEBUG_LIBRARIES) + SET(MSVC90_CRT_DIR + "${MSVC90_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC90.DebugCRT") + SET(__install__libs ${__install__libs} + "${MSVC90_CRT_DIR}/Microsoft.VC90.DebugCRT.manifest" + "${MSVC90_CRT_DIR}/msvcm90d.dll" + "${MSVC90_CRT_DIR}/msvcp90d.dll" + "${MSVC90_CRT_DIR}/msvcr90d.dll" + ) + ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) + ENDIF(MSVC90) + IF(CMAKE_INSTALL_MFC_LIBRARIES) + IF(MSVC70) + SET(__install__libs ${__install__libs} + "${SYSTEMROOT}/system32/mfc70.dll" + ) + ENDIF(MSVC70) + IF(MSVC71) + SET(__install__libs ${__install__libs} + "${SYSTEMROOT}/system32/mfc71.dll" + ) + ENDIF(MSVC71) + IF(MSVC80) + IF(CMAKE_INSTALL_DEBUG_LIBRARIES) + SET(MSVC80_MFC_DIR + "${MSVC80_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC80.DebugMFC") + SET(__install__libs ${__install__libs} + "${MSVC80_MFC_DIR}/Microsoft.VC80.DebugMFC.manifest" + "${MSVC80_MFC_DIR}/mfc80d.dll" + "${MSVC80_MFC_DIR}/mfc80ud.dll" + "${MSVC80_MFC_DIR}/mfcm80d.dll" + "${MSVC80_MFC_DIR}/mfcm80ud.dll" + ) + ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) + + SET(MSVC80_MFC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFC") + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs ${__install__libs} + "${MSVC80_MFC_DIR}/Microsoft.VC80.MFC.manifest" + "${MSVC80_MFC_DIR}/mfc80.dll" + "${MSVC80_MFC_DIR}/mfc80u.dll" + "${MSVC80_MFC_DIR}/mfcm80.dll" + "${MSVC80_MFC_DIR}/mfcm80u.dll" + ) + # include the language dll's for vs8 as well as the actuall dll's + SET(MSVC80_MFCLOC_DIR "${MSVC80_REDIST_DIR}/x86/Microsoft.VC80.MFCLOC") + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs ${__install__libs} + "${MSVC80_MFCLOC_DIR}/Microsoft.VC80.MFCLOC.manifest" + "${MSVC80_MFCLOC_DIR}/mfc80chs.dll" + "${MSVC80_MFCLOC_DIR}/mfc80cht.dll" + "${MSVC80_MFCLOC_DIR}/mfc80enu.dll" + "${MSVC80_MFCLOC_DIR}/mfc80esp.dll" + "${MSVC80_MFCLOC_DIR}/mfc80deu.dll" + "${MSVC80_MFCLOC_DIR}/mfc80fra.dll" + "${MSVC80_MFCLOC_DIR}/mfc80ita.dll" + "${MSVC80_MFCLOC_DIR}/mfc80jpn.dll" + "${MSVC80_MFCLOC_DIR}/mfc80kor.dll" + ) + ENDIF(MSVC80) + IF(MSVC90) + IF(CMAKE_INSTALL_DEBUG_LIBRARIES) + SET(MSVC90_MFC_DIR + "${MSVC90_REDIST_DIR}/Debug_NonRedist/x86/Microsoft.VC90.DebugMFC") + SET(__install__libs ${__install__libs} + "${MSVC90_MFC_DIR}/Microsoft.VC90.DebugMFC.manifest" + "${MSVC90_MFC_DIR}/mfc90d.dll" + "${MSVC90_MFC_DIR}/mfc90ud.dll" + "${MSVC90_MFC_DIR}/mfcm90d.dll" + "${MSVC90_MFC_DIR}/mfcm90ud.dll" + ) + ENDIF(CMAKE_INSTALL_DEBUG_LIBRARIES) + + SET(MSVC90_MFC_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.MFC") + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs ${__install__libs} + "${MSVC90_MFC_DIR}/Microsoft.VC90.MFC.manifest" + "${MSVC90_MFC_DIR}/mfc90.dll" + "${MSVC90_MFC_DIR}/mfc90u.dll" + "${MSVC90_MFC_DIR}/mfcm90.dll" + "${MSVC90_MFC_DIR}/mfcm90u.dll" + ) + # include the language dll's for vs9 as well as the actuall dll's + SET(MSVC90_MFCLOC_DIR "${MSVC90_REDIST_DIR}/x86/Microsoft.VC90.MFCLOC") + # Install the manifest that allows DLLs to be loaded from the + # directory containing the executable. + SET(__install__libs ${__install__libs} + "${MSVC90_MFCLOC_DIR}/Microsoft.VC90.MFCLOC.manifest" + "${MSVC90_MFCLOC_DIR}/mfc90chs.dll" + "${MSVC90_MFCLOC_DIR}/mfc90cht.dll" + "${MSVC90_MFCLOC_DIR}/mfc90enu.dll" + "${MSVC90_MFCLOC_DIR}/mfc90esp.dll" + "${MSVC90_MFCLOC_DIR}/mfc90deu.dll" + "${MSVC90_MFCLOC_DIR}/mfc90fra.dll" + "${MSVC90_MFCLOC_DIR}/mfc90ita.dll" + "${MSVC90_MFCLOC_DIR}/mfc90jpn.dll" + "${MSVC90_MFCLOC_DIR}/mfc90kor.dll" + ) + ENDIF(MSVC90) + + ENDIF(CMAKE_INSTALL_MFC_LIBRARIES) + FOREACH(lib + ${__install__libs} + ) + IF(EXISTS ${lib}) + SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS + ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${lib}) + ENDIF(EXISTS ${lib}) + ENDFOREACH(lib) +ENDIF(MSVC) + +# Include system runtime libraries in the installation if any are +# specified by CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS. +IF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) + IF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) + IF(WIN32) + INSTALL_PROGRAMS(/bin ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) + ELSE(WIN32) + INSTALL_PROGRAMS(/lib ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}) + ENDIF(WIN32) + ENDIF(NOT CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP) +ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS) + + diff --git a/Modules/KDE3Macros.cmake b/Modules/KDE3Macros.cmake new file mode 100644 index 000000000..86cfd5725 --- /dev/null +++ b/Modules/KDE3Macros.cmake @@ -0,0 +1,393 @@ +# + +# See FindKDE3.cmake for documentation. +# +# this file contains the following macros: +# KDE3_ADD_DCOP_SKELS +# KDE3_ADD_DCOP_STUBS +# KDE3_ADD_MOC_FILES +# KDE3_ADD_UI_FILES +# KDE3_ADD_KCFG_FILES +# KDE3_AUTOMOC +# KDE3_INSTALL_LIBTOOL_FILE +# KDE3_CREATE_FINAL_FILE +# KDE3_ADD_KPART +# KDE3_ADD_KDEINIT_EXECUTABLE +# KDE3_ADD_EXECUTABLE + + +#neundorf@kde.org + +INCLUDE(AddFileDependencies) + +#create the kidl and skeletion file for dcop stuff +#usage: KDE_ADD_COP_SKELS(foo_SRCS ${dcop_headers}) +MACRO(KDE3_ADD_DCOP_SKELS _sources) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) + + SET(_skel ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_skel.cpp) + SET(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl) + + IF (NOT HAVE_${_basename}_KIDL_RULE) + SET(HAVE_${_basename}_KIDL_RULE ON) + + ADD_CUSTOM_COMMAND(OUTPUT ${_kidl} + COMMAND ${KDE3_DCOPIDL_EXECUTABLE} + ARGS ${_tmp_FILE} > ${_kidl} + DEPENDS ${_tmp_FILE} + ) + + ENDIF (NOT HAVE_${_basename}_KIDL_RULE) + + IF (NOT HAVE_${_basename}_SKEL_RULE) + SET(HAVE_${_basename}_SKEL_RULE ON) + + ADD_CUSTOM_COMMAND(OUTPUT ${_skel} + COMMAND ${KDE3_DCOPIDL2CPP_EXECUTABLE} + ARGS --c++-suffix cpp --no-signals --no-stub ${_kidl} + DEPENDS ${_kidl} + ) + + ENDIF (NOT HAVE_${_basename}_SKEL_RULE) + + SET(${_sources} ${${_sources}} ${_skel}) + + ENDFOREACH (_current_FILE) + +ENDMACRO(KDE3_ADD_DCOP_SKELS) + + +MACRO(KDE3_ADD_DCOP_STUBS _sources) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + + GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) + + SET(_stub_CPP ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_stub.cpp) + SET(_kidl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.kidl) + + IF (NOT HAVE_${_basename}_KIDL_RULE) + SET(HAVE_${_basename}_KIDL_RULE ON) + + + ADD_CUSTOM_COMMAND(OUTPUT ${_kidl} + COMMAND ${KDE3_DCOPIDL_EXECUTABLE} + ARGS ${_tmp_FILE} > ${_kidl} + DEPENDS ${_tmp_FILE} + ) + + ENDIF (NOT HAVE_${_basename}_KIDL_RULE) + + + IF (NOT HAVE_${_basename}_STUB_RULE) + SET(HAVE_${_basename}_STUB_RULE ON) + + ADD_CUSTOM_COMMAND(OUTPUT ${_stub_CPP} + COMMAND ${KDE3_DCOPIDL2CPP_EXECUTABLE} + ARGS --c++-suffix cpp --no-signals --no-skel ${_kidl} + DEPENDS ${_kidl} + ) + + ENDIF (NOT HAVE_${_basename}_STUB_RULE) + + SET(${_sources} ${${_sources}} ${_stub_CPP}) + + ENDFOREACH (_current_FILE) + +ENDMACRO(KDE3_ADD_DCOP_STUBS) + + +MACRO(KDE3_ADD_KCFG_FILES _sources) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + + GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) + + FILE(READ ${_tmp_FILE} _contents) + STRING(REGEX REPLACE "^(.*\n)?File=([^\n]+)\n.*$" "\\2" _kcfg_FILE "${_contents}") + + SET(_src_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_header_FILE ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + + ADD_CUSTOM_COMMAND(OUTPUT ${_src_FILE} + COMMAND ${KDE3_KCFGC_EXECUTABLE} + ARGS ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ${_tmp_FILE} + DEPENDS ${_tmp_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${_kcfg_FILE} ) + + SET(${_sources} ${${_sources}} ${_src_FILE}) + + ENDFOREACH (_current_FILE) + +ENDMACRO(KDE3_ADD_KCFG_FILES) + + +#create the moc files and add them to the list of sources +#usage: KDE_ADD_MOC_FILES(foo_SRCS ${moc_headers}) +MACRO(KDE3_ADD_MOC_FILES _sources) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + + GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp) + + ADD_CUSTOM_COMMAND(OUTPUT ${_moc} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${_tmp_FILE} -o ${_moc} + DEPENDS ${_tmp_FILE} + ) + + SET(${_sources} ${${_sources}} ${_moc}) + + ENDFOREACH (_current_FILE) +ENDMACRO(KDE3_ADD_MOC_FILES) + + +GET_FILENAME_COMPONENT( KDE3_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + +#create the implementation files from the ui files and add them to the list of sources +#usage: KDE_ADD_UI_FILES(foo_SRCS ${ui_files}) +MACRO(KDE3_ADD_UI_FILES _sources ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_tmp_FILE ${_current_FILE} ABSOLUTE) + + GET_FILENAME_COMPONENT(_basename ${_tmp_FILE} NAME_WE) + SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h) + SET(_src ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc.cpp) + + ADD_CUSTOM_COMMAND(OUTPUT ${_header} + COMMAND ${QT_UIC_EXECUTABLE} + ARGS -L ${KDE3_LIB_DIR}/kde3/plugins/designer -nounload -o ${_header} ${CMAKE_CURRENT_SOURCE_DIR}/${_current_FILE} + DEPENDS ${_tmp_FILE} + ) + + ADD_CUSTOM_COMMAND(OUTPUT ${_src} + COMMAND ${CMAKE_COMMAND} + ARGS + -DKDE_UIC_PLUGIN_DIR:FILEPATH=${KDE3_LIB_DIR}/kde3/plugins/designer + -DKDE_UIC_EXECUTABLE:FILEPATH=${QT_UIC_EXECUTABLE} + -DKDE_UIC_FILE:FILEPATH=${_tmp_FILE} + -DKDE_UIC_CPP_FILE:FILEPATH=${_src} + -DKDE_UIC_H_FILE:FILEPATH=${_header} + -P ${KDE3_MODULE_DIR}/kde3uic.cmake + DEPENDS ${_header} + ) + + ADD_CUSTOM_COMMAND(OUTPUT ${_moc} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${_header} -o ${_moc} + DEPENDS ${_header} + ) + + SET(${_sources} ${${_sources}} ${_src} ${_moc} ) + + ENDFOREACH (_current_FILE) +ENDMACRO(KDE3_ADD_UI_FILES) + + +MACRO(KDE3_AUTOMOC) + SET(_matching_FILES ) + FOREACH (_current_FILE ${ARGN}) + + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + + # if "SKIP_AUTOMOC" is set to true, we will not handle this file here. + # here. this is required to make bouic work correctly: + # we need to add generated .cpp files to the sources (to compile them), + # but we cannot let automoc handle them, as the .cpp files don't exist yet when + # cmake is run for the very first time on them -> however the .cpp files might + # exist at a later run. at that time we need to skip them, so that we don't add two + # different rules for the same moc file + GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC) + + IF (EXISTS ${_abs_FILE} AND NOT _skip) + + FILE(READ ${_abs_FILE} _contents) + + GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH) + + STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}") + IF(_match) + FOREACH (_current_MOC_INC ${_match}) + STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}") + + GET_FILENAME_COMPONENT(_basename ${_current_MOC} NAME_WE) +# SET(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h) + SET(_header ${_abs_PATH}/${_basename}.h) + SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC}) + + ADD_CUSTOM_COMMAND(OUTPUT ${_moc} + COMMAND ${QT_MOC_EXECUTABLE} + ARGS ${_header} -o ${_moc} + DEPENDS ${_header} + ) + + ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc}) + + ENDFOREACH (_current_MOC_INC) + ENDIF(_match) + + ENDIF (EXISTS ${_abs_FILE} AND NOT _skip) + ENDFOREACH (_current_FILE) +ENDMACRO(KDE3_AUTOMOC) + +# only used internally by KDE3_INSTALL_ICONS +MACRO (_KDE3_ADD_ICON_INSTALL_RULE _install_SCRIPT _install_PATH _group _orig_NAME _install_NAME) + + # if the string doesn't match the pattern, the result is the full string, so all three have the same content + IF (NOT ${_group} STREQUAL ${_install_NAME} ) + SET(_icon_GROUP "actions") + + IF (${_group} STREQUAL "mime") + SET(_icon_GROUP "mimetypes") + ENDIF (${_group} STREQUAL "mime") + + IF (${_group} STREQUAL "filesys") + SET(_icon_GROUP "filesystems") + ENDIF (${_group} STREQUAL "filesys") + + IF (${_group} STREQUAL "device") + SET(_icon_GROUP "devices") + ENDIF (${_group} STREQUAL "device") + + IF (${_group} STREQUAL "app") + SET(_icon_GROUP "apps") + ENDIF (${_group} STREQUAL "app") + + IF (${_group} STREQUAL "action") + SET(_icon_GROUP "actions") + ENDIF (${_group} STREQUAL "action") + +# message(STATUS "icon: ${_current_ICON} size: ${_size} group: ${_group} name: ${_name}" ) + INSTALL(FILES ${_orig_NAME} DESTINATION ${_install_PATH}/${_icon_GROUP}/ RENAME ${_install_NAME} ) + ENDIF (NOT ${_group} STREQUAL ${_install_NAME} ) + +ENDMACRO (_KDE3_ADD_ICON_INSTALL_RULE) + + +MACRO (KDE3_INSTALL_ICONS _theme ) + SET(_defaultpath "${CMAKE_INSTALL_PREFIX}/share/icons") + # first the png icons + FILE(GLOB _icons *.png) + FOREACH (_current_ICON ${_icons} ) + STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\1" _size "${_current_ICON}") + STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\2" _group "${_current_ICON}") + STRING(REGEX REPLACE "^.*/[a-zA-Z]+([0-9]+)\\-([a-z]+)\\-(.+\\.png)$" "\\3" _name "${_current_ICON}") + _KDE3_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake + ${_defaultpath}/${_theme}/${_size}x${_size} + ${_group} ${_current_ICON} ${_name}) + ENDFOREACH (_current_ICON) + + # and now the svg icons + FILE(GLOB _icons *.svgz) + FOREACH (_current_ICON ${_icons} ) + STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\1" _group "${_current_ICON}") + STRING(REGEX REPLACE "^.*/crsc\\-([a-z]+)\\-(.+\\.svgz)$" "\\2" _name "${_current_ICON}") + _KDE3_ADD_ICON_INSTALL_RULE(${CMAKE_CURRENT_BINARY_DIR}/install_icons.cmake + ${_defaultpath}/${_theme}/scalable + ${_group} ${_current_ICON} ${_name}) + ENDFOREACH (_current_ICON) + +ENDMACRO (KDE3_INSTALL_ICONS) + +MACRO(KDE3_INSTALL_LIBTOOL_FILE _target) + GET_TARGET_PROPERTY(_target_location ${_target} LOCATION) + + GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE) + GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) + SET(_laname ${CMAKE_CURRENT_BINARY_DIR}/${_laname}.la) + + FILE(WRITE ${_laname} "# ${_laname} - a libtool library file, generated by cmake \n") + FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n") + FILE(APPEND ${_laname} "dlname='${_soname}'\n") + FILE(APPEND ${_laname} "# Names of this library\n") + FILE(APPEND ${_laname} "library_names='${_soname} ${_soname} ${_soname}'\n") + FILE(APPEND ${_laname} "# The name of the static archive\n") + FILE(APPEND ${_laname} "old_library=''\n") + FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n") + FILE(APPEND ${_laname} "dependency_libs=''\n") +# FILE(APPEND ${_laname} "dependency_libs='${${_target}_LIB_DEPENDS}'\n") + FILE(APPEND ${_laname} "# Version information.\ncurrent=0\nage=0\nrevision=0\n") + FILE(APPEND ${_laname} "# Is this an already installed library?\ninstalled=yes\n") + FILE(APPEND ${_laname} "# Should we warn about portability when linking against -modules?\nshouldnotlink=yes\n") + FILE(APPEND ${_laname} "# Files to dlopen/dlpreopen\ndlopen=''\ndlpreopen=''\n") + FILE(APPEND ${_laname} "# Directory that this library needs to be installed in:\n") + FILE(APPEND ${_laname} "libdir='${CMAKE_INSTALL_PREFIX}/lib/kde3'\n") + + INSTALL_FILES(${KDE3_LIBTOOL_DIR} FILES ${_laname}) +ENDMACRO(KDE3_INSTALL_LIBTOOL_FILE) + + +MACRO(KDE3_CREATE_FINAL_FILE _filename) + FILE(WRITE ${_filename} "//autogenerated file\n") + FOREACH (_current_FILE ${ARGN}) + FILE(APPEND ${_filename} "#include \"${_current_FILE}\"\n") + ENDFOREACH (_current_FILE) + +ENDMACRO(KDE3_CREATE_FINAL_FILE) + + +# OPTION(KDE3_ENABLE_FINAL "Enable final all-in-one compilation") +OPTION(KDE3_BUILD_TESTS "Build the tests") + + +MACRO(KDE3_ADD_KPART _target_NAME _with_PREFIX) +#is the first argument is "WITH_PREFIX" then keep the standard "lib" prefix, otherwise SET the prefix empty + IF (${_with_PREFIX} STREQUAL "WITH_PREFIX") + SET(_first_SRC) + ELSE (${_with_PREFIX} STREQUAL "WITH_PREFIX") + SET(_first_SRC ${_with_PREFIX}) + ENDIF (${_with_PREFIX} STREQUAL "WITH_PREFIX") + +# IF (KDE3_ENABLE_FINAL) +# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${_first_SRC} ${ARGN}) +# ADD_LIBRARY(${_target_NAME} MODULE ${_target_NAME}_final.cpp) +# ELSE (KDE3_ENABLE_FINAL) + ADD_LIBRARY(${_target_NAME} MODULE ${_first_SRC} ${ARGN}) +# ENDIF (KDE3_ENABLE_FINAL) + + IF(_first_SRC) + SET_TARGET_PROPERTIES(${_target_NAME} PROPERTIES PREFIX "") + ENDIF(_first_SRC) + + KDE3_INSTALL_LIBTOOL_FILE(${_target_NAME}) + +ENDMACRO(KDE3_ADD_KPART) + + +MACRO(KDE3_ADD_KDEINIT_EXECUTABLE _target_NAME ) + +# IF (KDE3_ENABLE_FINAL) +# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${ARGN}) +# ADD_LIBRARY(kdeinit_${_target_NAME} SHARED ${_target_NAME}_final.cpp) +# ELSE (KDE3_ENABLE_FINAL) + ADD_LIBRARY(kdeinit_${_target_NAME} SHARED ${ARGN} ) +# ENDIF (KDE3_ENABLE_FINAL) + + CONFIGURE_FILE(${KDE3_MODULE_DIR}/kde3init_dummy.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp) + + ADD_EXECUTABLE( ${_target_NAME} ${CMAKE_CURRENT_BINARY_DIR}/${_target_NAME}_dummy.cpp ) + TARGET_LINK_LIBRARIES( ${_target_NAME} kdeinit_${_target_NAME} ) + +ENDMACRO(KDE3_ADD_KDEINIT_EXECUTABLE) + + +MACRO(KDE3_ADD_EXECUTABLE _target_NAME ) + +# IF (KDE3_ENABLE_FINAL) +# KDE3_CREATE_FINAL_FILE(${_target_NAME}_final.cpp ${ARGN}) +# ADD_EXECUTABLE(${_target_NAME} ${_target_NAME}_final.cpp) +# ELSE (KDE3_ENABLE_FINAL) + ADD_EXECUTABLE(${_target_NAME} ${ARGN} ) +# ENDIF (KDE3_ENABLE_FINAL) + +ENDMACRO(KDE3_ADD_EXECUTABLE) + + diff --git a/Modules/MacroAddFileDependencies.cmake b/Modules/MacroAddFileDependencies.cmake new file mode 100644 index 000000000..13596912e --- /dev/null +++ b/Modules/MacroAddFileDependencies.cmake @@ -0,0 +1,15 @@ +# - MACRO_ADD_FILE_DEPENDENCIES(<_file> depend_files...) +# MACRO_OPTIONAL_FIND_PACKAGE( [QUIT] ) + +MACRO (MACRO_ADD_FILE_DEPENDENCIES _file) + + GET_SOURCE_FILE_PROPERTY(_deps ${_file} OBJECT_DEPENDS) + if (_deps) + set(_deps ${_deps} ${ARGN}) + else (_deps) + set(_deps ${ARGN}) + endif (_deps) + + SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES OBJECT_DEPENDS "${_deps}") + +ENDMACRO (MACRO_ADD_FILE_DEPENDENCIES) diff --git a/Modules/NSIS.InstallOptions.ini.in b/Modules/NSIS.InstallOptions.ini.in new file mode 100755 index 000000000..d92d77959 --- /dev/null +++ b/Modules/NSIS.InstallOptions.ini.in @@ -0,0 +1,46 @@ +[Settings] +NumFields=5 + +[Field 1] +Type=label +Text=By default @CPACK_PACKAGE_INSTALL_DIRECTORY@ does not add its directory to the system PATH. +Left=0 +Right=-1 +Top=0 +Bottom=20 + +[Field 2] +Type=radiobutton +Text=Do not add @CPACK_PACKAGE_NAME@ to the system PATH +Left=0 +Right=-1 +Top=30 +Bottom=40 +State=1 + +[Field 3] +Type=radiobutton +Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for all users +Left=0 +Right=-1 +Top=40 +Bottom=50 +State=0 + +[Field 4] +Type=radiobutton +Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for current user +Left=0 +Right=-1 +Top=50 +Bottom=60 +State=0 + +[Field 5] +Type=CheckBox +Text=Create @CPACK_PACKAGE_NAME@ Desktop Icon +Left=0 +Right=-1 +Top=80 +Bottom=90 +State=0 diff --git a/Modules/NSIS.template.in b/Modules/NSIS.template.in new file mode 100755 index 000000000..2bdca5f28 --- /dev/null +++ b/Modules/NSIS.template.in @@ -0,0 +1,649 @@ +; CPack install script designed for a nmake build + +;-------------------------------- +; You must define these values + + !define VERSION "@CPACK_PACKAGE_VERSION@" + !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@" + !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@" + +;-------------------------------- +;Variables + + Var MUI_TEMP + Var STARTMENU_FOLDER + Var SV_ALLUSERS + Var START_MENU + Var DO_NOT_ADD_TO_PATH + Var ADD_TO_PATH_ALL_USERS + Var ADD_TO_PATH_CURRENT_USER + Var INSTALL_DESKTOP + +;-------------------------------- +;Include Modern UI + + !include "MUI.nsh" + + ;Default installation folder + InstallDir "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" + +;-------------------------------- +;General + + ;Name and file + Name "@CPACK_PACKAGE_INSTALL_DIRECTORY@" + OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@" + + ;Set compression + SetCompressor @CPACK_NSIS_COMPRESSOR@ + +;-------------------------------- +; determine admin versus local install +; Is install for "AllUsers" or "JustMe"? +; Default to "JustMe" - set to "AllUsers" if admin or on Win9x +; This function is used for the very first "custom page" of the installer. +; This custom page does not show up visibly, but it executes prior to the +; first visible page and sets up $INSTDIR properly... +; Choose different default installation folder based on SV_ALLUSERS... +; "Program Files" for AllUsers, "My Documents" for JustMe... + +Function .onInit + StrCpy $SV_ALLUSERS "JustMe" + StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@" + + ClearErrors + UserInfo::GetName + IfErrors noLM + Pop $0 + UserInfo::GetAccountType + Pop $1 + StrCmp $1 "Admin" 0 +3 + SetShellVarContext all + ;MessageBox MB_OK 'User "$0" is in the Admin group' + StrCpy $SV_ALLUSERS "AllUsers" + Goto done + StrCmp $1 "Power" 0 +3 + SetShellVarContext all + ;MessageBox MB_OK 'User "$0" is in the Power Users group' + StrCpy $SV_ALLUSERS "AllUsers" + Goto done + + noLM: + StrCpy $SV_ALLUSERS "AllUsers" + ;Get installation folder from registry if available + + done: + StrCmp $SV_ALLUSERS "AllUsers" 0 +2 + StrCpy $INSTDIR "$PROGRAMFILES\@CPACK_PACKAGE_INSTALL_DIRECTORY@" + + StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini" + + noOptionsPage: +FunctionEnd + +;-------------------------------- +;Interface Settings + + !define MUI_HEADERIMAGE + !define MUI_ABORTWARNING + +;-------------------------------- +; path functions + +!verbose 3 +!include "WinMessages.NSH" +!verbose 4 + +;---------------------------------------- +; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02" +;---------------------------------------- +!verbose 3 +!include "WinMessages.NSH" +!verbose 4 +;==================================================== +; get_NT_environment +; Returns: the selected environment +; Output : head of the stack +;==================================================== +!macro select_NT_profile UN +Function ${UN}select_NT_profile + StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single + DetailPrint "Selected environment for all users" + Push "all" + Return + environment_single: + DetailPrint "Selected environment for current user only." + Push "current" + Return +FunctionEnd +!macroend +!insertmacro select_NT_profile "" +!insertmacro select_NT_profile "un." +;---------------------------------------------------- +!define NT_current_env 'HKCU "Environment"' +!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + +!ifndef WriteEnvStr_RegKey + !ifdef ALL_USERS + !define WriteEnvStr_RegKey \ + 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"' + !else + !define WriteEnvStr_RegKey 'HKCU "Environment"' + !endif +!endif + +; AddToPath - Adds the given dir to the search path. +; Input - head of the stack +; Note - Win9x systems requires reboot + +Function AddToPath + Exch $0 + Push $1 + Push $2 + Push $3 + + # don't add if the path doesn't exist + IfFileExists "$0\*.*" "" AddToPath_done + + ReadEnvStr $1 PATH + Push "$1;" + Push "$0;" + Call StrStr + Pop $2 + StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$0\;" + Call StrStr + Pop $2 + StrCmp $2 "" "" AddToPath_done + GetFullPathName /SHORT $3 $0 + Push "$1;" + Push "$3;" + Call StrStr + Pop $2 + StrCmp $2 "" "" AddToPath_done + Push "$1;" + Push "$3\;" + Call StrStr + Pop $2 + StrCmp $2 "" "" AddToPath_done + + Call IsNT + Pop $1 + StrCmp $1 1 AddToPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" a + FileSeek $1 -1 END + FileReadByte $1 $2 + IntCmp $2 26 0 +2 +2 # DOS EOF + FileSeek $1 -1 END # write over EOF + FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n" + FileClose $1 + SetRebootFlag true + Goto AddToPath_done + + AddToPath_NT: + ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH" + StrCmp $1 "" AddToPath_NTdoIt + Push $1 + Call Trim + Pop $1 + StrCpy $0 "$1;$0" + AddToPath_NTdoIt: + WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + AddToPath_done: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + +; RemoveFromPath - Remove a given dir from the path +; Input: head of the stack + +Function un.RemoveFromPath + Exch $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + + IntFmt $6 "%c" 26 # DOS EOF + + Call un.IsNT + Pop $1 + StrCmp $1 1 unRemoveFromPath_NT + ; Not on NT + StrCpy $1 $WINDIR 2 + FileOpen $1 "$1\autoexec.bat" r + GetTempFileName $4 + FileOpen $2 $4 w + GetFullPathName /SHORT $0 $0 + StrCpy $0 "SET PATH=%PATH%;$0" + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoop: + FileRead $1 $3 + StrCpy $5 $3 1 -1 # read last char + StrCmp $5 $6 0 +2 # if DOS EOF + StrCpy $3 $3 -1 # remove DOS EOF so we can compare + StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine + StrCmp $3 "" unRemoveFromPath_dosLoopEnd + FileWrite $2 $3 + Goto unRemoveFromPath_dosLoop + unRemoveFromPath_dosLoopRemoveLine: + SetRebootFlag true + Goto unRemoveFromPath_dosLoop + + unRemoveFromPath_dosLoopEnd: + FileClose $2 + FileClose $1 + StrCpy $1 $WINDIR 2 + Delete "$1\autoexec.bat" + CopyFiles /SILENT $4 "$1\autoexec.bat" + Delete $4 + Goto unRemoveFromPath_done + + unRemoveFromPath_NT: + ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH" + StrCpy $5 $1 1 -1 # copy last char + StrCmp $5 ";" +2 # if last char != ; + StrCpy $1 "$1;" # append ; + Push $1 + Push "$0;" + Call un.StrStr ; Find `$0;` in $1 + Pop $2 ; pos of our dir + StrCmp $2 "" unRemoveFromPath_done + ; else, it is in path + # $0 - path to add + # $1 - path var + StrLen $3 "$0;" + StrLen $4 $2 + StrCpy $5 $1 -$4 # $5 is now the part before the path to remove + StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove + StrCpy $3 $5$6 + + StrCpy $5 $3 1 -1 # copy last char + StrCmp $5 ";" 0 +2 # if last char == ; + StrCpy $3 $3 -1 # remove last char + + WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3 + SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000 + + unRemoveFromPath_done: + Pop $6 + Pop $5 + Pop $4 + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Uninstall sutff +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +########################################### +# Utility Functions # +########################################### + +;==================================================== +; IsNT - Returns 1 if the current system is NT, 0 +; otherwise. +; Output: head of the stack +;==================================================== +; IsNT +; no input +; output, top of the stack = 1 if NT or 0 if not +; +; Usage: +; Call IsNT +; Pop $R0 +; ($R0 at this point is 1 or 0) + +!macro IsNT un +Function ${un}IsNT + Push $0 + ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $0 "" 0 IsNT_yes + ; we are not NT. + Pop $0 + Push 0 + Return + + IsNT_yes: + ; NT!!! + Pop $0 + Push 1 +FunctionEnd +!macroend +!insertmacro IsNT "" +!insertmacro IsNT "un." + +; StrStr +; input, top of stack = string to search for +; top of stack-1 = string to search in +; output, top of stack (replaces with the portion of the string remaining) +; modifies no other variables. +; +; Usage: +; Push "this is a long ass string" +; Push "ass" +; Call StrStr +; Pop $R0 +; ($R0 at this point is "ass string") + +!macro StrStr un +Function ${un}StrStr +Exch $R1 ; st=haystack,old$R1, $R1=needle + Exch ; st=old$R1,haystack + Exch $R2 ; st=old$R1,old$R2, $R2=haystack + Push $R3 + Push $R4 + Push $R5 + StrLen $R3 $R1 + StrCpy $R4 0 + ; $R1=needle + ; $R2=haystack + ; $R3=len(needle) + ; $R4=cnt + ; $R5=tmp + loop: + StrCpy $R5 $R2 $R3 $R4 + StrCmp $R5 $R1 done + StrCmp $R5 "" done + IntOp $R4 $R4 + 1 + Goto loop +done: + StrCpy $R1 $R2 "" $R4 + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Exch $R1 +FunctionEnd +!macroend +!insertmacro StrStr "" +!insertmacro StrStr "un." + +Function Trim ; Added by Pelaca + Exch $R1 + Push $R2 +Loop: + StrCpy $R2 "$R1" 1 -1 + StrCmp "$R2" " " RTrim + StrCmp "$R2" "$\n" RTrim + StrCmp "$R2" "$\r" RTrim + StrCmp "$R2" ";" RTrim + GoTo Done +RTrim: + StrCpy $R1 "$R1" -1 + Goto Loop +Done: + Pop $R2 + Exch $R1 +FunctionEnd + +Function ConditionalAddToRegisty + Pop $0 + Pop $1 + StrCmp "$0" "" ConditionalAddToRegisty_EmptyString + WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" \ + "$1" "$0" + ;MessageBox MB_OK "Set Registry: '$1' to '$0'" + DetailPrint "Set install registry entry: '$1' to '$0'" + ConditionalAddToRegisty_EmptyString: +FunctionEnd + +;-------------------------------- +; Define some macro setting for the gui +@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@ +@CPACK_NSIS_INSTALLER_ICON_CODE@ + +;-------------------------------- +;Pages + !insertmacro MUI_PAGE_WELCOME + + !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@" + Page custom InstallOptionsPage + !insertmacro MUI_PAGE_DIRECTORY + + ;Start Menu Folder Page Configuration + !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX" + !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" + !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" + !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER + + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_PAGE_FINISH + + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Reserve Files + + ;These files should be inserted before other files in the data block + ;Keep these lines before any File command + ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA) + + ReserveFile "NSIS.InstallOptions.ini" + !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS + + +;-------------------------------- +;Installer Sections + +Section "Installer Section" InstSection + + ;Use the entire tree produced by the INSTALL target. Keep the + ;list of directories here in sync with the RMDir commands below. + SetOutPath "$INSTDIR" + File /r "${INST_DIR}\*.*" + + ;Store installation folder + WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + Push "DisplayName" + Push "@CPACK_NSIS_DISPLAY_NAME@" + Call ConditionalAddToRegisty + Push "DisplayVersion" + Push "@CPACK_PACKAGE_VERSION@" + Call ConditionalAddToRegisty + Push "Publisher" + Push "@CPACK_PACKAGE_VENDOR@" + Call ConditionalAddToRegisty + Push "UninstallString" + Push "$INSTDIR\Uninstall.exe" + Call ConditionalAddToRegisty + + ; Optional registration + Push "DisplayIcon" + Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@" + Call ConditionalAddToRegisty + Push "HelpLink" + Push "@CPACK_NSIS_HELP_LINK@" + Call ConditionalAddToRegisty + Push "URLInfoAbout" + Push "@CPACK_NSIS_URL_INFO_ABOUT@" + Call ConditionalAddToRegisty + Push "Contact" + Push "@CPACK_NSIS_CONTACT@" + Call ConditionalAddToRegisty + !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State" + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + + ;Create shortcuts + CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" +@CPACK_NSIS_CREATE_ICONS@ +@CPACK_NSIS_CREATE_ICONS_EXTRA@ + CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" + + ; Write special uninstall registry entries + Push "StartMenu" + Push "$STARTMENU_FOLDER" + Call ConditionalAddToRegisty + Push "DoNotAddToPath" + Push "$DO_NOT_ADD_TO_PATH" + Call ConditionalAddToRegisty + Push "AddToPathAllUsers" + Push "$ADD_TO_PATH_ALL_USERS" + Call ConditionalAddToRegisty + Push "AddToPathCurrentUser" + Push "$ADD_TO_PATH_CURRENT_USER" + Call ConditionalAddToRegisty + Push "InstallToDesktop" + Push "$INSTALL_DESKTOP" + Call ConditionalAddToRegisty + +@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@ + + !insertmacro MUI_STARTMENU_WRITE_END + +SectionEnd + +Section "Add to path" + Push $INSTDIR\bin + ;Read a value from an InstallOptions INI file + !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State" + !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State" + StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0 + Call AddToPath + doNotAddToPath: +SectionEnd + + +;-------------------------------- +; Create custom pages +Function InstallOptionsPage + !insertmacro MUI_HEADER_TEXT "Install Options" "Chose options for installing @CPACK_PACKAGE_INSTALL_DIRECTORY@" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini" + +FunctionEnd + +;-------------------------------- +; determine admin versus local install +Function un.onInit + + ClearErrors + UserInfo::GetName + IfErrors noLM + Pop $0 + UserInfo::GetAccountType + Pop $1 + StrCmp $1 "Admin" 0 +3 + SetShellVarContext all + ;MessageBox MB_OK 'User "$0" is in the Admin group' + Goto done + StrCmp $1 "Power" 0 +3 + SetShellVarContext all + ;MessageBox MB_OK 'User "$0" is in the Power Users group' + Goto done + + noLM: + ;Get installation folder from registry if available + + done: +FunctionEnd + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + ReadRegStr $START_MENU SHCTX \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "StartMenu" + ;MessageBox MB_OK "Start menu is in: $START_MENU" + ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "DoNotAddToPath" + ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "AddToPathAllUsers" + ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "AddToPathCurrentUser" + ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS" + ReadRegStr $INSTALL_DESKTOP SHCTX \ + "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" "InstallToDesktop" + ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP " + +@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@ + + ;Remove files we installed. + ;Keep the list of directories here in sync with the File commands above. +@CPACK_NSIS_DELETE_FILES@ +@CPACK_NSIS_DELETE_DIRECTORIES@ + + ;Remove the uninstaller itself. + Delete "$INSTDIR\Uninstall.exe" + DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_DIRECTORY@" + + ;Remove the installation directory if it is empty. + RMDir "$INSTDIR" + + ; Remove the registry entries. + DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" + + !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP + + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" +@CPACK_NSIS_DELETE_ICONS@ +@CPACK_NSIS_DELETE_ICONS_EXTRA@ + + ;Delete empty start menu parent diretories + StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" + + startMenuDeleteLoop: + ClearErrors + RMDir $MUI_TEMP + GetFullPathName $MUI_TEMP "$MUI_TEMP\.." + + IfErrors startMenuDeleteLoopDone + + StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop + startMenuDeleteLoopDone: + + ; If the user changed the shortcut, then untinstall may not work. This should + ; try to fix it. + StrCpy $MUI_TEMP "$START_MENU" + Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk" +@CPACK_NSIS_DELETE_ICONS_EXTRA@ + + ;Delete empty start menu parent diretories + StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" + + secondStartMenuDeleteLoop: + ClearErrors + RMDir $MUI_TEMP + GetFullPathName $MUI_TEMP "$MUI_TEMP\.." + + IfErrors secondStartMenuDeleteLoopDone + + StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop + secondStartMenuDeleteLoopDone: + + DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" + + Push $INSTDIR\bin + StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0 + Call un.RemoveFromPath + doNotRemoveFromPath: +SectionEnd + + diff --git a/Modules/Platform/AIX-VisualAge-Fortran.cmake b/Modules/Platform/AIX-VisualAge-Fortran.cmake new file mode 100755 index 000000000..086c592b3 --- /dev/null +++ b/Modules/Platform/AIX-VisualAge-Fortran.cmake @@ -0,0 +1 @@ +include(Platform/xlf) diff --git a/Modules/Platform/AIX.cmake b/Modules/Platform/AIX.cmake new file mode 100644 index 000000000..455586d4f --- /dev/null +++ b/Modules/Platform/AIX.cmake @@ -0,0 +1,72 @@ +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".so") # .so +SET(CMAKE_DL_LIBS "-lld") + +# RPATH support on AIX is called libpath. By default the runtime +# libpath is paths specified by -L followed by /usr/lib and /lib. In +# order to prevent the -L paths from being used we must force use of +# -Wl,-blibpath:/usr/lib:/lib whether RPATH support is on or not. +# When our own RPATH is to be added it may be inserted before the +# "always" paths. +SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib) +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + +# Files named "libfoo.a" may actually be shared libraries. +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 " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_COMPILE_OBJECT + " -+ -o -c ") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") +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: + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +#FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) +# SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-bstatic") +# SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-bdynamic") +#ENDFOREACH(type) + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/BSDOS.cmake b/Modules/Platform/BSDOS.cmake new file mode 100644 index 000000000..cf9d17bfd --- /dev/null +++ b/Modules/Platform/BSDOS.cmake @@ -0,0 +1,2 @@ +INCLUDE(Platform/UnixPaths) + diff --git a/Modules/Platform/BeOS.cmake b/Modules/Platform/BeOS.cmake new file mode 100644 index 000000000..f4d84d738 --- /dev/null +++ b/Modules/Platform/BeOS.cmake @@ -0,0 +1,14 @@ +SET(BEOS 1) + +# GCC is the default compiler on BeOS. +INCLUDE(${CMAKE_ROOT}/Modules/Platform/gcc.cmake) + +SET(CMAKE_DL_LIBS root be) +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-nostart") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/BlueGeneL.cmake b/Modules/Platform/BlueGeneL.cmake new file mode 100644 index 000000000..7794a26cf --- /dev/null +++ b/Modules/Platform/BlueGeneL.cmake @@ -0,0 +1,40 @@ +#the compute nodes on BlueGene/L don't support shared libs +SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty + +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a +SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe +SET(CMAKE_DL_LIBS "" ) + +SET(CMAKE_FIND_LIBRARY_PREFIXES "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + + +INCLUDE(Platform/UnixPaths) + +IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_C_LINK_EXECUTABLE + " -Wl,-relax -o -Wl,-lgcc,-lc -lnss_files -lnss_dns -lresolv") +ELSE(CMAKE_COMPILER_IS_GNUCC) + # when using IBM xlc we probably don't want to link to -lgcc + SET(CMAKE_C_LINK_EXECUTABLE + " -Wl,-relax -o -Wl,-lc -lnss_files -lnss_dns -lresolv") +ENDIF(CMAKE_COMPILER_IS_GNUCC) + +IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_LINK_EXECUTABLE + " -Wl,-relax -o -Wl,-lstdc++,-lgcc,-lc -lnss_files -lnss_dns -lresolv") +ELSE(CMAKE_COMPILER_IS_GNUCXX) + # when using the IBM xlC we probably don't want to link to -lgcc + SET(CMAKE_CXX_LINK_EXECUTABLE + " -Wl,-relax -o -Wl,-lstdc++,-lc -lnss_files -lnss_dns -lresolv") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/CMakeLists.txt b/Modules/Platform/CMakeLists.txt new file mode 100644 index 000000000..6d8f4a132 --- /dev/null +++ b/Modules/Platform/CMakeLists.txt @@ -0,0 +1,3 @@ +# just install the modules +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules/Platform .*\\.cmake$) +INSTALL_FILES(${CMAKE_DATA_DIR}/Modules/Platform .*\\.in$) diff --git a/Modules/Platform/CYGWIN-g77.cmake b/Modules/Platform/CYGWIN-g77.cmake new file mode 100755 index 000000000..942319f90 --- /dev/null +++ b/Modules/Platform/CYGWIN-g77.cmake @@ -0,0 +1,6 @@ +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") +SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "") +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe +INCLUDE(Platform/g77) diff --git a/Modules/Platform/CYGWIN.cmake b/Modules/Platform/CYGWIN.cmake new file mode 100644 index 000000000..c9170a01c --- /dev/null +++ b/Modules/Platform/CYGWIN.cmake @@ -0,0 +1,54 @@ +SET(WIN32 1) +SET(CYGWIN 1) + +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,--export-all-symbols -Wl,--enable-auto-import") +SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}) +SET(CMAKE_DL_LIBS "-lgdi32" ) +SET(CMAKE_SHARED_LIBRARY_PREFIX "cyg") +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") +SET(CMAKE_SHARED_MODULE_PREFIX "lib") +SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") +SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib") +SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a") +# no pic for gcc on cygwin +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe +SET(CMAKE_CREATE_WIN32_EXE "-mwindows") +# Modules have a different default prefix that shared libs. +SET(CMAKE_MODULE_EXISTS 1) + +SET(CMAKE_FIND_LIBRARY_PREFIXES "cyg" "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a") + +SET(CMAKE_GNULD_IMAGE_VERSION + "-Wl,--major-image-version,,--minor-image-version,") + +SET(CMAKE_C_CREATE_SHARED_MODULE + " -o ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_CREATE_SHARED_MODULE + " -o ${CMAKE_GNULD_IMAGE_VERSION} ") + +SET(CMAKE_C_CREATE_SHARED_LIBRARY + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") + +SET(CMAKE_C_LINK_EXECUTABLE + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_LINK_EXECUTABLE + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") + +# Shared libraries on cygwin can be named with their version number. +SET(CMAKE_SHARED_LIBRARY_NAME_WITH_VERSION 1) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/Catamount.cmake b/Modules/Platform/Catamount.cmake new file mode 100644 index 000000000..01493fc21 --- /dev/null +++ b/Modules/Platform/Catamount.cmake @@ -0,0 +1,26 @@ +#Catamount, which runs on the compute nodes of Cray machines, e.g. RedStorm, doesn't support shared libs +SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty + +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a +SET(CMAKE_EXECUTABLE_SUFFIX "") # .exe +SET(CMAKE_DL_LIBS "" ) + +SET(CMAKE_FIND_LIBRARY_PREFIXES "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + +INCLUDE(Platform/UnixPaths) + +SET(CMAKE_CXX_LINK_SHARED_LIBRARY) +SET(CMAKE_CXX_LINK_MODULE_LIBRARY) +SET(CMAKE_C_LINK_SHARED_LIBRARY) +SET(CMAKE_C_LINK_MODULE_LIBRARY) diff --git a/Modules/Platform/Darwin-icc.cmake b/Modules/Platform/Darwin-icc.cmake new file mode 100644 index 000000000..cf7680eed --- /dev/null +++ b/Modules/Platform/Darwin-icc.cmake @@ -0,0 +1,129 @@ +SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "" ) +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS "") + +# Setup for Leopard Compatibility +EXEC_PROGRAM(sw_vers ARGS -productVersion OUTPUT_VARIABLE _OSX_VERSION) +# MESSAGE (STATUS "_OSX_VERSION: ${_OSX_VERSION}") +IF ( _OSX_VERSION MATCHES "^10.4" ) + #IF(CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_FLAGS_INIT "") + SET (CMAKE_C_FLAGS_DEBUG_INIT "-gdwarf-2") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") + # ENDIF(CMAKE_COMPILER_IS_GNUCC) + +# IF(CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-gdwarf-2") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -gdwarf-2") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") +# ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF ( _OSX_VERSION MATCHES "^10.4" ) + + +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +SET(CMAKE_SHARED_MODULE_PREFIX "lib") +SET(CMAKE_SHARED_MODULE_SUFFIX ".so") +SET(CMAKE_MODULE_EXISTS 1) +SET(CMAKE_DL_LIBS "") +SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names") +SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names") +SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") +SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") + + +# setup for universal binaries if sysroot exists +IF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) + # set the sysroot to be used if CMAKE_OSX_ARCHITECTURES + # has more than one value + SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.4u.sdk CACHE STRING + "isysroot used for universal binary support") + # set _CMAKE_OSX_MACHINE to umame -m + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE) + + # check for environment variable CMAKE_OSX_ARCHITECTURES + # if it is set. + IF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + SET(_CMAKE_OSX_MACHINE "$ENV{CMAKE_OSX_ARCHITECTURES}") + ENDIF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + # now put _CMAKE_OSX_MACHINE into the cache + SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE} + CACHE STRING "Build architectures for OSX") +ENDIF(EXISTS /Developer/SDKs/MacOSX10.4u.sdk) + + +IF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$") + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress") +ENDIF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$") + +IF(NOT XCODE) + # Enable shared library versioning. This flag is not actually referenced + # but the fact that the setting exists will cause the generators to support + # soname computation. + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-install_name") + SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-install_name") +ENDIF(NOT XCODE) + +# Xcode does not support -isystem yet. +IF(XCODE) + SET(CMAKE_INCLUDE_SYSTEM_FLAG_C) + SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) +ENDIF(XCODE) + +SET(CMAKE_MacOSX_Content_COMPILE_OBJECT "\"${CMAKE_COMMAND}\" -E copy_if_different ") + +SET(CMAKE_C_CREATE_SHARED_LIBRARY + " -o -install_name ") +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o -install_name ") +SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + " -o -install_name ") + +SET(CMAKE_CXX_CREATE_SHARED_MODULE + " -o ") + +SET(CMAKE_C_CREATE_SHARED_MODULE + " -o ") + +SET(CMAKE_Fortran_CREATE_SHARED_MODULE + " -o ") + + +# We can use $ENV{INTEL_LICENSE_FILE} to try and get at the installation location for ICC. +# We also need to consider to use cce (which is the 64bit compiler) and not JUST the 32bit compiler. +# I have no idea what the best way to do that would be. +SET(CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES /usr/local/include ) + + +# default to searching for frameworks first +SET(CMAKE_FIND_FRAMEWORK FIRST) +# set up the default search directories for frameworks +SET(CMAKE_SYSTEM_FRAMEWORK_PATH + ~/Library/Frameworks + /Library/Frameworks + /Network/Library/Frameworks + /System/Library/Frameworks) + +# default to searching for application bundles first +SET(CMAKE_FIND_APPBUNDLE FIRST) +# set up the default search directories for application bundles +SET(CMAKE_SYSTEM_APPBUNDLE_PATH + ~/Applications + /Applications + /Developer/Applications) + +INCLUDE(Platform/UnixPaths) +SET(CMAKE_SYSTEM_INCLUDE_PATH ${CMAKE_SYSTEM_INCLUDE_PATH} /sw/include) +SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_SYSTEM_LIBRARY_PATH} /sw/lib) + diff --git a/Modules/Platform/Darwin-icpc.cmake b/Modules/Platform/Darwin-icpc.cmake new file mode 100644 index 000000000..e247bae28 --- /dev/null +++ b/Modules/Platform/Darwin-icpc.cmake @@ -0,0 +1,3 @@ +GET_FILENAME_COMPONENT(CURRENT_SOURCE_PARENT ${CMAKE_CURRENT_LIST_FILE} PATH) +#MESSAGE (STATUS "CURRENT_SOURCE_PARENT: ${CURRENT_SOURCE_PARENT}") +INCLUDE ( ${CURRENT_SOURCE_PARENT}/Darwin-icc.cmake) diff --git a/Modules/Platform/Darwin-xlc.cmake b/Modules/Platform/Darwin-xlc.cmake new file mode 100644 index 000000000..f7e4da339 --- /dev/null +++ b/Modules/Platform/Darwin-xlc.cmake @@ -0,0 +1,6 @@ +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-qmkshrobj") +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.cmake b/Modules/Platform/Darwin.cmake new file mode 100644 index 000000000..ecc465ca1 --- /dev/null +++ b/Modules/Platform/Darwin.cmake @@ -0,0 +1,157 @@ +SET(APPLE 1) + +# Darwin versions: +# 6.x == Mac OSX 10.2 +# 7.x == Mac OSX 10.3 +# 8.x == Mac OSX 10.4 +# 9.x == Mac OSX 10.5 +STRING(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_SYSTEM_VERSION}") +STRING(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\2" DARWIN_MINOR_VERSION "${CMAKE_SYSTEM_VERSION}") + +# Do not use the "-Wl,-search_paths_first" flag with the OSX 10.2 compiler. +# Done this way because it is too early to do a TRY_COMPILE. +IF(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST) + SET(HAVE_FLAG_SEARCH_PATHS_FIRST 0) + IF("${DARWIN_MAJOR_VERSION}" GREATER 6) + SET(HAVE_FLAG_SEARCH_PATHS_FIRST 1) + ENDIF("${DARWIN_MAJOR_VERSION}" GREATER 6) +ENDIF(NOT DEFINED HAVE_FLAG_SEARCH_PATHS_FIRST) +# More desirable, but does not work: + #INCLUDE(CheckCXXCompilerFlag) + #CHECK_CXX_COMPILER_FLAG("-Wl,-search_paths_first" HAVE_FLAG_SEARCH_PATHS_FIRST) + +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib") +SET(CMAKE_SHARED_MODULE_PREFIX "lib") +SET(CMAKE_SHARED_MODULE_SUFFIX ".so") +SET(CMAKE_MODULE_EXISTS 1) +SET(CMAKE_DL_LIBS "") + +SET(CMAKE_C_LINK_FLAGS "-headerpad_max_install_names") +SET(CMAKE_CXX_LINK_FLAGS "-headerpad_max_install_names") + +IF(HAVE_FLAG_SEARCH_PATHS_FIRST) + SET(CMAKE_C_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}") + SET(CMAKE_CXX_LINK_FLAGS "-Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}") +ENDIF(HAVE_FLAG_SEARCH_PATHS_FIRST) + +SET(CMAKE_PLATFORM_HAS_INSTALLNAME 1) +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names") +SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names") +SET(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,") +SET(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a") + +# hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old build tree +# (where install_name_tool was hardcoded) and where CMAKE_INSTALL_NAME_TOOL isn't in the cache +# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) +# hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex +IF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) + SET(CMAKE_INSTALL_NAME_TOOL install_name_tool) +ENDIF(NOT DEFINED CMAKE_INSTALL_NAME_TOOL) +# find installed SDKs +FILE(GLOB _CMAKE_OSX_SDKS "/Developer/SDKs/*") +# setup for universal binaries if sysroot exists +IF(_CMAKE_OSX_SDKS) + # find the most recent sdk for the default + LIST(SORT _CMAKE_OSX_SDKS) + LIST(REVERSE _CMAKE_OSX_SDKS) + LIST(GET _CMAKE_OSX_SDKS 0 _CMAKE_OSX_SDKS) + SET(CMAKE_OSX_SYSROOT_DEFAULT "${_CMAKE_OSX_SDKS}") + # use the environment variable CMAKE_OSX_SYSROOT if it is set + IF(NOT "$ENV{CMAKE_OSX_SYSROOT}" STREQUAL "") + SET(_CMAKE_OSX_SDKS "$ENV{CMAKE_OSX_SYSROOT}") + ENDIF(NOT "$ENV{CMAKE_OSX_SYSROOT}" STREQUAL "") + SET(CMAKE_OSX_SYSROOT ${_CMAKE_OSX_SDKS} CACHE STRING + "isysroot used for universal binary support") + # set _CMAKE_OSX_MACHINE to umame -m + EXEC_PROGRAM(uname ARGS -m OUTPUT_VARIABLE _CMAKE_OSX_MACHINE) + # check for Power PC and change to ppc + IF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + SET(_CMAKE_OSX_MACHINE ppc) + ENDIF("${_CMAKE_OSX_MACHINE}" MATCHES "Power") + # set the default based on uname and not the environment variable + # as that is what is used to change it! + SET(CMAKE_OSX_ARCHITECTURES_DEFAULT ${_CMAKE_OSX_MACHINE}) + # check for environment variable CMAKE_OSX_ARCHITECTURES + # if it is set. + IF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + SET(_CMAKE_OSX_MACHINE "$ENV{CMAKE_OSX_ARCHITECTURES}") + ENDIF(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" STREQUAL "") + # now put _CMAKE_OSX_MACHINE into the cache + SET(CMAKE_OSX_ARCHITECTURES ${_CMAKE_OSX_MACHINE} + CACHE STRING "Build architectures for OSX") +ENDIF(_CMAKE_OSX_SDKS) + + +IF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$") + SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS + "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined suppress") +ENDIF("${CMAKE_BACKWARDS_COMPATIBILITY}" MATCHES "^1\\.[0-6]$") + +IF(NOT XCODE) + # Enable shared library versioning. This flag is not actually referenced + # but the fact that the setting exists will cause the generators to support + # soname computation. + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-install_name") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-install_name") + SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-install_name") +ENDIF(NOT XCODE) + +# Xcode does not support -isystem yet. +IF(XCODE) + SET(CMAKE_INCLUDE_SYSTEM_FLAG_C) + SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) +ENDIF(XCODE) + +# Need to list dependent shared libraries on link line. When building +# with -isysroot (for universal binaries), the linker always looks for +# dependent libraries under the sysroot. Listing them on the link +# line works around the problem. +SET(CMAKE_LINK_DEPENDENT_LIBRARY_FILES 1) + +SET(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS -w) +SET(CMAKE_C_CREATE_SHARED_LIBRARY + " -o -install_name ") +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o -install_name ") +SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + " -o -install_name ") + +SET(CMAKE_CXX_CREATE_SHARED_MODULE + " -o ") + +SET(CMAKE_C_CREATE_SHARED_MODULE + " -o ") + +SET(CMAKE_Fortran_CREATE_SHARED_MODULE + " -o ") + +SET(CMAKE_C_CREATE_MACOSX_FRAMEWORK + " -o -install_name ") +SET(CMAKE_CXX_CREATE_MACOSX_FRAMEWORK + " -o -install_name ") + + + +SET(CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES /usr/local/include) +# default to searching for frameworks first +SET(CMAKE_FIND_FRAMEWORK FIRST) +# set up the default search directories for frameworks +SET(CMAKE_SYSTEM_FRAMEWORK_PATH + ~/Library/Frameworks + /Library/Frameworks + /Network/Library/Frameworks + /System/Library/Frameworks) + +# default to searching for application bundles first +SET(CMAKE_FIND_APPBUNDLE FIRST) +# set up the default search directories for application bundles +SET(CMAKE_SYSTEM_APPBUNDLE_PATH + ~/Applications + /Applications + /Developer/Applications) + +INCLUDE(Platform/UnixPaths) +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /sw) diff --git a/Modules/Platform/DragonFly.cmake b/Modules/Platform/DragonFly.cmake new file mode 100644 index 000000000..f6e0f810f --- /dev/null +++ b/Modules/Platform/DragonFly.cmake @@ -0,0 +1,5 @@ +# DragonFly BSD was forked from FreeBSD and is still very close to it +# http://www.dragonflybsd.org +# see http://archive.netbsd.se/?ml=dfbsd-users&a=2007-07&m=4678361 + +INCLUDE(Platform/FreeBSD) diff --git a/Modules/Platform/FreeBSD.cmake b/Modules/Platform/FreeBSD.cmake new file mode 100644 index 000000000..e7b26ac65 --- /dev/null +++ b/Modules/Platform/FreeBSD.cmake @@ -0,0 +1,28 @@ +IF(EXISTS /usr/include/dlfcn.h) + SET(CMAKE_DL_LIBS "") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -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 + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") + SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic") +ENDIF(EXISTS /usr/include/dlfcn.h) + +# Shared libraries with no builtin soname may not be linked safely by +# specifying the file path. +SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/GNU.cmake b/Modules/Platform/GNU.cmake new file mode 100644 index 000000000..26615e128 --- /dev/null +++ b/Modules/Platform/GNU.cmake @@ -0,0 +1,10 @@ +# GCC is the default compiler on GNU/Hurd. +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/Generic-ADSP-ASM.cmake b/Modules/Platform/Generic-ADSP-ASM.cmake new file mode 100644 index 000000000..4f6ed7536 --- /dev/null +++ b/Modules/Platform/Generic-ADSP-ASM.cmake @@ -0,0 +1,7 @@ +INCLUDE(Platform/Generic-ADSP-Common) + +SET(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm) +SET(CMAKE_ASM_OUTPUT_EXTENSION ".doj" ) +SET(CMAKE_ASM_COMPILE_OBJECT + " -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") + diff --git a/Modules/Platform/Generic-ADSP-C.cmake b/Modules/Platform/Generic-ADSP-C.cmake new file mode 100644 index 000000000..f0644687f --- /dev/null +++ b/Modules/Platform/Generic-ADSP-C.cmake @@ -0,0 +1,20 @@ + +INCLUDE(Platform/Generic-ADSP-Common) + + +SET(CMAKE_C_OUTPUT_EXTENSION ".doj") + +SET(CMAKE_C_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "") +SET(CMAKE_C_FLAGS_RELEASE_INIT "") +SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "") + +SET(CMAKE_C_CREATE_STATIC_LIBRARY + " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") + +SET(CMAKE_C_LINK_EXECUTABLE + " -o ") + +SET(CMAKE_C_CREATE_SHARED_LIBRARY) +SET(CMAKE_C_CREATE_MODULE_LIBRARY) + diff --git a/Modules/Platform/Generic-ADSP-CXX.cmake b/Modules/Platform/Generic-ADSP-CXX.cmake new file mode 100644 index 000000000..21daa81c9 --- /dev/null +++ b/Modules/Platform/Generic-ADSP-CXX.cmake @@ -0,0 +1,18 @@ +INCLUDE(Platform/Generic-ADSP-Common) + +SET(CMAKE_CXX_OUTPUT_EXTENSION ".doj") + +SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "") +SET(CMAKE_CXX_FLAGS_RELEASE_INIT "") +SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "") + +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " -build-lib -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -o ") + +SET(CMAKE_CXX_LINK_EXECUTABLE + " -o ") + +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY) +SET(CMAKE_CXX_CREATE_MODULE_LIBRARY) + diff --git a/Modules/Platform/Generic-ADSP-Common.cmake b/Modules/Platform/Generic-ADSP-Common.cmake new file mode 100644 index 000000000..10fb34e00 --- /dev/null +++ b/Modules/Platform/Generic-ADSP-Common.cmake @@ -0,0 +1,120 @@ +# support for the Analog Devices toolchain for their DSPs +# Raphael Cotty" +# +# it supports three architectures: +# Blackfin +# TS (TigerShark) +# 21k (Sharc 21xxx) + +IF(NOT ADSP) + + SET(ADSP TRUE) + + SET(CMAKE_STATIC_LIBRARY_SUFFIX ".dlb") + SET(CMAKE_SHARED_LIBRARY_SUFFIX "") + SET(CMAKE_EXECUTABLE_SUFFIX ".dxe") + + # if ADSP_PROCESSOR has not been set, but CMAKE_SYSTEM_PROCESSOR has, + # assume that this is the processor name to use for the compiler + IF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR) + SET(ADSP_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR}) + ENDIF(CMAKE_SYSTEM_PROCESSOR AND NOT ADSP_PROCESSOR) + + # if ADSP_PROCESSOR_SILICIUM_REVISION has not been set, use "none" + IF(NOT ADSP_PROCESSOR_SILICIUM_REVISION) + SET(ADSP_PROCESSOR_SILICIUM_REVISION "none") + ENDIF(NOT ADSP_PROCESSOR_SILICIUM_REVISION) + + # this file is included from the C and CXX files, so handle both here + + GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_C_COMPILER}" PATH) + IF(NOT _ADSP_DIR) + GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_CXX_COMPILER}" PATH) + ENDIF(NOT _ADSP_DIR) + IF(NOT _ADSP_DIR) + GET_FILENAME_COMPONENT(_ADSP_DIR "${CMAKE_ASM_COMPILER}" PATH) + ENDIF(NOT _ADSP_DIR) + + # detect architecture + + IF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN) + IF(NOT ADSP_PROCESSOR) + SET(ADSP_PROCESSOR "ADSP-BF561") + ENDIF(NOT ADSP_PROCESSOR) + SET(ADSP_BLACKFIN TRUE) + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/Blackfin") + ENDIF(CMAKE_C_COMPILER MATCHES ccblkfn OR CMAKE_CXX_COMPILER MATCHES ccblkfn OR CMAKE_ASM_COMPILER MATCHES easmBLKFN) + + IF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS) + IF(NOT ADSP_PROCESSOR) + SET(ADSP_PROCESSOR "ADSP-TS101") + ENDIF(NOT ADSP_PROCESSOR) + SET(ADSP_TS TRUE) + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/TS") + ENDIF(CMAKE_C_COMPILER MATCHES ccts OR CMAKE_CXX_COMPILER MATCHES ccts OR CMAKE_ASM_COMPILER MATCHES easmTS) + + IF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k) + IF(NOT ADSP_PROCESSOR) + SET(ADSP_PROCESSOR "ADSP-21060") + ENDIF(NOT ADSP_PROCESSOR) + SET(ADSP_21K TRUE) + + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") # default if nothing matches + IF (ADSP_PROCESSOR MATCHES "210..$") + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") + ENDIF(ADSP_PROCESSOR MATCHES "210..$") + + IF (ADSP_PROCESSOR MATCHES "211..$") + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/211k") + ENDIF(ADSP_PROCESSOR MATCHES "211..$") + + IF (ADSP_PROCESSOR MATCHES "212..$") + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/212k") + ENDIF(ADSP_PROCESSOR MATCHES "212..$") + + IF (ADSP_PROCESSOR MATCHES "213..$") + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/213k") + ENDIF(ADSP_PROCESSOR MATCHES "213..$") + + SET(_ADSP_FAMILY_DIR "${_ADSP_DIR}/21k") + ENDIF(CMAKE_C_COMPILER MATCHES cc21k OR CMAKE_CXX_COMPILER MATCHES cc21k OR CMAKE_ASM_COMPILER MATCHES easm21k) + + + LINK_DIRECTORIES("${_ADSP_FAMILY_DIR}/lib") + + # vdk support + FIND_PROGRAM( ADSP_VDKGEN_EXECUTABLE vdkgen "${_ADSP_FAMILY_DIR}/vdk" ) + + MACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE) + ADD_CUSTOM_COMMAND( + OUTPUT ${VDK_GENERATED_HEADER} ${VDK_GENERATED_SOURCE} + COMMAND ${ADSP_VDKGEN_EXECUTABLE} ${VDK_KERNEL_SUPPORT_FILE} -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -MM + DEPENDS ${VDK_KERNEL_SUPPORT_FILE} + ) + ENDMACRO(ADSP_GENERATE_VDK VDK_GENERATED_HEADER VDK_GENERATED_SOURCE VDK_KERNEL_SUPPORT_FILE) + + # loader support + FIND_PROGRAM( ADSP_ELFLOADER_EXECUTABLE elfloader "${_ADSP_FAMILY_DIR}" ) + + # BOOT_MODE: prom, flash, spi, spislave, UART, TWI, FIFO + # FORMAT: hex, ASCII, binary, include + # WIDTH: 8, 16 + MACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH) + ADD_CUSTOM_COMMAND( + TARGET ${TARGET_NAME} + POST_BUILD + COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr + COMMENT "Building the loader file" + ) + ENDMACRO(ADSP_CREATE_LOADER_FILE TARGET_NAME BOOT_MODE FORMAT WIDTH) + + MACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE) + ADD_CUSTOM_COMMAND( + TARGET ${TARGET_NAME} + POST_BUILD + COMMAND ${ADSP_ELFLOADER_EXECUTABLE} ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.dxe -proc ${ADSP_PROCESSOR} -si-revision ${ADSP_PROCESSOR_SILICIUM_REVISION} -b ${BOOT_MODE} -f ${FORMAT} -width ${WIDTH} -o ${EXECUTABLE_OUTPUT_PATH}/${TARGET_NAME}.ldr -init ${INITIALIZATION_FILE} + COMMENT "Building the loader file" + ) + ENDMACRO(ADSP_CREATE_LOADER_FILE_INIT TARGET_NAME BOOT_MODE FORMAT WIDTH INITIALIZATION_FILE) + +ENDIF(NOT ADSP) diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake new file mode 100644 index 000000000..ac81c3560 --- /dev/null +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -0,0 +1,54 @@ + +# This file implements basic support for sdcc (http://sdcc.sourceforge.net/) +# a free C compiler for 8 and 16 bit microcontrollers. +# To use it either a toolchain file is required or cmake has to be run like this: +# cmake -DCMAKE_C_COMPILER=sdcc -DCMAKE_SYSTEM_NAME=Generic +# Since sdcc doesn't support C++, C++ support should be disabled in the +# CMakeLists.txt using the PROJECT() command: +# PROJECT(my_project C) + +SET(CMAKE_STATIC_LIBRARY_PREFIX "") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") +SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".lib") # .so +SET(CMAKE_IMPORT_LIBRARY_PREFIX ) +SET(CMAKE_IMPORT_LIBRARY_SUFFIX ) +SET(CMAKE_EXECUTABLE_SUFFIX ".ihx") # intel hex file +SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib") +SET(CMAKE_DL_LIBS "") + +SET(CMAKE_C_OUTPUT_EXTENSION ".rel") + +# find sdcclib as CMAKE_AR +# since cmake may already have searched for "ar", sdcclib has to +# be searched with a different variable name (SDCCLIB_EXECUTABLE) +# and must then be forced into the cache +GET_FILENAME_COMPONENT(SDCC_LOCATION "${CMAKE_C_COMPILER}" PATH) +FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib PATHS "${SDCC_LOCATION}" NO_DEFAULT_PATH) +FIND_PROGRAM(SDCCLIB_EXECUTABLE sdcclib) +SET(CMAKE_AR "${SDCCLIB_EXECUTABLE}" CACHE FILEPATH "The sdcc librarian" FORCE) + +# CMAKE_C_FLAGS_INIT and CMAKE_EXE_LINKER_FLAGS_INIT should be set in a CMAKE_SYSTEM_PROCESSOR file +IF(NOT DEFINED CMAKE_C_FLAGS_INIT) + SET(CMAKE_C_FLAGS_INIT "-mmcs51 --model-small") +ENDIF(NOT DEFINED CMAKE_C_FLAGS_INIT) + +IF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) + SET (CMAKE_EXE_LINKER_FLAGS_INIT --model-small) +ENDIF(NOT DEFINED CMAKE_EXE_LINKER_FLAGS_INIT) + +# compile a C file into an object file +SET(CMAKE_C_COMPILE_OBJECT " -o -c ") + +# link object files to an executable +SET(CMAKE_C_LINK_EXECUTABLE " --out-fmt-ihx -o ") + +# needs sdcc 2.7.0 + sddclib from cvs +SET(CMAKE_C_CREATE_STATIC_LIBRARY + "\"${CMAKE_COMMAND}\" -E remove " + " -a ") + +# not supported by sdcc +SET(CMAKE_C_CREATE_SHARED_LIBRARY "") +SET(CMAKE_C_CREATE_MODULE_LIBRARY "") + diff --git a/Modules/Platform/Generic.cmake b/Modules/Platform/Generic.cmake new file mode 100755 index 000000000..00508b248 --- /dev/null +++ b/Modules/Platform/Generic.cmake @@ -0,0 +1,11 @@ +# This is a platform definition file for platforms without +# operating system, typically embedded platforms. +# It is used when CMAKE_SYSTEM_NAME is set to "Generic" +# +# It is intentionally empty, since nothing is known +# about the platform. So everything has to be specified +# in the system/compiler files ${CMAKE_SYSTEM_NAME}-.cmake +# and/or ${CMAKE_SYSTEM_NAME}--${CMAKE_SYSTEM_PROCESSOR}.cmake + +# (embedded) targets without operating system usually don't support shared libraries +SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) diff --git a/Modules/Platform/HP-UX.cmake b/Modules/Platform/HP-UX.cmake new file mode 100644 index 000000000..381ef395d --- /dev/null +++ b/Modules/Platform/HP-UX.cmake @@ -0,0 +1,123 @@ +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".sl") # .so +SET(CMAKE_DL_LIBS "dld") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".sl" ".so" ".a") + +# The HP linker needs to find transitive shared library dependencies +# in the -L path. Therefore the runtime path must be added to the +# link line with -L flags. +SET(CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH 1) +SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1) + +# Shared libraries with no builtin soname may not be linked safely by +# specifying the file path. +SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) + +# fortran +IF(CMAKE_COMPILER_IS_GNUG77) + SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,+h") + SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic +ELSE(CMAKE_COMPILER_IS_GNUG77) + # use ld directly to create shared libraries for hp cc + SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + "ld -o ") + SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "+Z") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-E -b -L/usr/lib") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "+h") + SET(CMAKE_EXECUTABLE_RUNTIME_Fortran_FLAG "-Wl,+b") # -rpath +ENDIF(CMAKE_COMPILER_IS_GNUG77) + +# C compiler +IF(CMAKE_COMPILER_IS_GNUCC) + # gnu gcc + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,+h") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic +ELSE(CMAKE_COMPILER_IS_GNUCC) + # hp cc + # use ld directly to create shared libraries for hp cc + SET(CMAKE_C_CREATE_SHARED_LIBRARY + "ld -o ") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "+Z") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-E -b +nodefaultrpath -L/usr/lib") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "+h") + SET(CMAKE_EXECUTABLE_RUNTIME_C_FLAG "-Wl,+b") # -rpath + SET(CMAKE_C_FLAGS_INIT "") + SET(CMAKE_C_COMPILE_OBJECT + " -Aa -Ae -o -c ") +ENDIF(CMAKE_COMPILER_IS_GNUCC) + +# CXX compiler +IF(CMAKE_COMPILER_IS_GNUCXX) + # for gnu C++ + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-E,-b,+nodefaultrpath") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h") +ELSE(CMAKE_COMPILER_IS_GNUCXX) + # for hp aCC + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "+Z") # -pic + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "+Z -Wl,-E,+nodefaultrpath -b -L/usr/lib") # -shared + SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-Wl,+s,-E,+nodefaultrpath") # +s, flag for exe link to use shared lib + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,+h") + SET(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG "-Wl,+b") # -rpath + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "+O3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "+O2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) +# set flags for gcc support +INCLUDE(Platform/UnixPaths) + +IF(NOT CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE + " -S " + "mv `basename \"\" | sed 's/\\.[^./]*$$//'`.s " + "rm -f `basename \"\" | sed 's/\\.[^./]*$$//'`.o" + ) +ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + +# Initialize C and CXX link type selection flags. These flags are +# used when building a shared library, shared module, or executable +# that links to other libraries to select whether to use the static or +# shared versions of the libraries. Note that C modules and shared +# libs are built using ld directly so we leave off the "-Wl," portion. +FOREACH(type SHARED_LIBRARY SHARED_MODULE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-a archive") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-a default") +ENDFOREACH(type) +FOREACH(type EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-a,archive") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-a,default") +ENDFOREACH(type) +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-a,archive") + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-a,default") +ENDFOREACH(type) + diff --git a/Modules/Platform/IRIX.cmake b/Modules/Platform/IRIX.cmake new file mode 100644 index 000000000..58c103720 --- /dev/null +++ b/Modules/Platform/IRIX.cmake @@ -0,0 +1,46 @@ +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared") +SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " -ar -o ") + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") + SET (CMAKE_C_FLAGS_INIT "") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) +# set flags for gcc support +INCLUDE(Platform/UnixPaths) + +IF(NOT CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE + " -S " + "mv `basename \"\" | sed 's/\\.[^./]*$$//'`.s " + ) +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE + " -S " + "mv `basename \"\" | sed 's/\\.[^./]*$$//'`.s " + ) +ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +# The IRIX linker needs to find transitive shared library dependencies +# in the -L path. +SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1) diff --git a/Modules/Platform/IRIX64.cmake b/Modules/Platform/IRIX64.cmake new file mode 100644 index 000000000..d83ca604b --- /dev/null +++ b/Modules/Platform/IRIX64.cmake @@ -0,0 +1,75 @@ +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -rdata_shared") +SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -rdata_shared") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +IF(NOT CMAKE_COMPILER_IS_GNUCC) + # Set default flags init. + SET(CMAKE_C_FLAGS_INIT "") + SET(CMAKE_CXX_FLAGS_INIT "") + SET(CMAKE_Fortran_FLAGS_INIT "") + SET(CMAKE_EXE_LINKER_FLAGS_INIT "") + SET(CMAKE_SHARED_LINKER_FLAGS_INIT "") + SET(CMAKE_MODULE_LINKER_FLAGS_INIT "") + + # If no -o32, -n32, or -64 flag is given, set a reasonable default. + IF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") + ELSE("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") + # Check if this is a 64-bit CMake. + IF(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$") + EXEC_PROGRAM(file ARGS ${CMAKE_COMMAND} OUTPUT_VARIABLE CMAKE_FILE_SELF) + SET(CMAKE_FILE_SELF "${CMAKE_FILE_SELF}" CACHE INTERNAL + "Output of file command on ${CMAKE_COMMAND}.") + ENDIF(CMAKE_FILE_SELF MATCHES "^CMAKE_FILE_SELF$") + + # Set initial flags to match cmake executable. + IF(CMAKE_FILE_SELF MATCHES " 64-bit ") + SET(CMAKE_C_FLAGS_INIT "-64") + SET(CMAKE_CXX_FLAGS_INIT "-64") + SET(CMAKE_Fortran_FLAGS_INIT "-64") + SET(CMAKE_EXE_LINKER_FLAGS_INIT "-64") + SET(CMAKE_SHARED_LINKER_FLAGS_INIT "-64") + SET(CMAKE_MODULE_LINKER_FLAGS_INIT "-64") + ENDIF(CMAKE_FILE_SELF MATCHES " 64-bit ") + ENDIF("$ENV{CFLAGS} $ENV{CXXFLAGS} $ENV{LDFLAGS}" MATCHES "-([no]32|64)") + + # Set remaining defaults. + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " -ar -o ") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) +INCLUDE(Platform/UnixPaths) + +IF(NOT CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE + " -S " + "mv `basename \"\" | sed 's/\\.[^./]*$$//'`.s " + ) +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE + " -S " + "mv `basename \"\" | sed 's/\\.[^./]*$$//'`.s " + ) +ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +# The IRIX linker needs to find transitive shared library dependencies +# in the -L path. +SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1) diff --git a/Modules/Platform/Linux-GNU-Fortran.cmake b/Modules/Platform/Linux-GNU-Fortran.cmake new file mode 100644 index 000000000..16d63fc2f --- /dev/null +++ b/Modules/Platform/Linux-GNU-Fortran.cmake @@ -0,0 +1,16 @@ +SET(CMAKE_Fortran_MODDIR_FLAG -J) +SET (CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") # -pic +SET (CMAKE_Fortran_FLAGS_INIT "") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +IF(NOT APPLE) + SET (CMAKE_INCLUDE_SYSTEM_FLAG_Fortran "-isystem ") +ENDIF(NOT APPLE) + +# These will require updates to CMake C++ code to support +# preprocessing rules for Fortran. +#SET (CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE " -E > ") +#SET (CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Platform/Linux-Intel-C.cmake b/Modules/Platform/Linux-Intel-C.cmake new file mode 100755 index 000000000..bde187e15 --- /dev/null +++ b/Modules/Platform/Linux-Intel-C.cmake @@ -0,0 +1,13 @@ +SET (CMAKE_C_FLAGS_INIT "") +SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +FIND_PROGRAM(XIAR xiar) +IF(XIAR) + SET(CMAKE_C_CREATE_STATIC_LIBRARY + "${XIAR} cr " + "${XIAR} -s ") +ENDIF(XIAR) +MARK_AS_ADVANCED(XIAR) diff --git a/Modules/Platform/Linux-Intel-CXX.cmake b/Modules/Platform/Linux-Intel-CXX.cmake new file mode 100755 index 000000000..bcc3d7877 --- /dev/null +++ b/Modules/Platform/Linux-Intel-CXX.cmake @@ -0,0 +1,13 @@ +SET (CMAKE_CXX_FLAGS_INIT "") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +FIND_PROGRAM(XIAR xiar) +IF(XIAR) + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + "${XIAR} cr " + "${XIAR} -s ") +ENDIF(XIAR) +MARK_AS_ADVANCED(XIAR) diff --git a/Modules/Platform/Linux-Intel-Fortran.cmake b/Modules/Platform/Linux-Intel-Fortran.cmake new file mode 100755 index 000000000..06de82b24 --- /dev/null +++ b/Modules/Platform/Linux-Intel-Fortran.cmake @@ -0,0 +1,14 @@ +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,") +SET(CMAKE_Fortran_MODDIR_FLAG "-module ") + +SET (CMAKE_Fortran_FLAGS_INIT "") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") diff --git a/Modules/Platform/Linux-PGI-C.cmake b/Modules/Platform/Linux-PGI-C.cmake new file mode 100644 index 000000000..df3c38e1b --- /dev/null +++ b/Modules/Platform/Linux-PGI-C.cmake @@ -0,0 +1,5 @@ +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") + +SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") +SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") + diff --git a/Modules/Platform/Linux-PGI-CXX.cmake b/Modules/Platform/Linux-PGI-CXX.cmake new file mode 100644 index 000000000..32a2a8e9b --- /dev/null +++ b/Modules/Platform/Linux-PGI-CXX.cmake @@ -0,0 +1,4 @@ +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") + +SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") +SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") diff --git a/Modules/Platform/Linux-SunPro-C.cmake b/Modules/Platform/Linux-SunPro-C.cmake new file mode 100644 index 000000000..529dfbabd --- /dev/null +++ b/Modules/Platform/Linux-SunPro-C.cmake @@ -0,0 +1,24 @@ +# Linux sun studio c options +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h") +SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + +SET(CMAKE_C_FLAGS_INIT "") +SET(CMAKE_C_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +SET(CMAKE_C_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -xO2") + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic") +ENDFOREACH(type) diff --git a/Modules/Platform/Linux-SunPro-CXX.cmake b/Modules/Platform/Linux-SunPro-CXX.cmake new file mode 100644 index 000000000..ddc10bd3c --- /dev/null +++ b/Modules/Platform/Linux-SunPro-CXX.cmake @@ -0,0 +1,24 @@ +# Linux sun studio c++ options +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G") +SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h") +SET(CMAKE_EXE_EXPORTS_CXX_FLAG "--export-dynamic") + +SET(CMAKE_CXX_FLAGS_INIT "") +SET(CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +SET(CMAKE_CXX_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -xO2") + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic") +ENDFOREACH(type) diff --git a/Modules/Platform/Linux-SunPro-Fortran.cmake b/Modules/Platform/Linux-SunPro-Fortran.cmake new file mode 100644 index 000000000..699483926 --- /dev/null +++ b/Modules/Platform/Linux-SunPro-Fortran.cmake @@ -0,0 +1,16 @@ +# Linux sun studio fortran options +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-KPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-G") +SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-R") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-h") + +SET(CMAKE_Fortran_FLAGS_INIT "") +SET(CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +SET(CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-xO2 -xspace -DNDEBUG") +SET(CMAKE_Fortran_FLAGS_RELEASE_INIT "-xO3 -DNDEBUG") +SET(CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-g -xO2") +SET(CMAKE_Fortran_MODDIR_FLAG "-moddir=") +SET(CMAKE_Fortran_MODPATH_FLAG "-M") diff --git a/Modules/Platform/Linux-VisualAge-C.cmake b/Modules/Platform/Linux-VisualAge-C.cmake new file mode 100644 index 000000000..295226bbe --- /dev/null +++ b/Modules/Platform/Linux-VisualAge-C.cmake @@ -0,0 +1,2 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") diff --git a/Modules/Platform/Linux-VisualAge-Fortran.cmake b/Modules/Platform/Linux-VisualAge-Fortran.cmake new file mode 100644 index 000000000..f6fcc1f0e --- /dev/null +++ b/Modules/Platform/Linux-VisualAge-Fortran.cmake @@ -0,0 +1,3 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +include(Platform/xlf) diff --git a/Modules/Platform/Linux-como.cmake b/Modules/Platform/Linux-como.cmake new file mode 100644 index 000000000..6c259f3b3 --- /dev/null +++ b/Modules/Platform/Linux-como.cmake @@ -0,0 +1,18 @@ +# create a shared C++ library +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " --prelink_objects " + " -o ") + +# create a C++ static library +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " --prelink_objects " + " cr " + " ") + +SET(CMAKE_CXX_LINK_EXECUTABLE + " --prelink_objects " + " -o ") + +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") diff --git a/Modules/Platform/Linux-icpc.cmake b/Modules/Platform/Linux-icpc.cmake new file mode 100755 index 000000000..2d1d879dd --- /dev/null +++ b/Modules/Platform/Linux-icpc.cmake @@ -0,0 +1,23 @@ +SET (CMAKE_C_FLAGS_INIT "") +SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +SET (CMAKE_CXX_FLAGS_INIT "") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + +FIND_PROGRAM(XIAR xiar) +IF(XIAR) + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + "${XIAR} cr " + "${XIAR} -s ") + SET(CMAKE_C_CREATE_STATIC_LIBRARY + "${XIAR} cr " + "${XIAR} -s ") +ENDIF(XIAR) +MARK_AS_ADVANCED(XIAR) + diff --git a/Modules/Platform/Linux-ifort.cmake b/Modules/Platform/Linux-ifort.cmake new file mode 100755 index 000000000..06de82b24 --- /dev/null +++ b/Modules/Platform/Linux-ifort.cmake @@ -0,0 +1,14 @@ +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_Fortran_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "-i_dynamic") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_Fortran_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,") +SET(CMAKE_Fortran_MODDIR_FLAG "-module ") + +SET (CMAKE_Fortran_FLAGS_INIT "") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") +SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3") +SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake new file mode 100644 index 000000000..eba4bb3f8 --- /dev/null +++ b/Modules/Platform/Linux.cmake @@ -0,0 +1,61 @@ +# GCC is the default compiler on Linux. +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,") +SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") +SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic") + +# Shared libraries with no builtin soname may not be linked safely by +# specifying the file path. +SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +# Debian policy requires that shared libraries be installed without +# executable permission. Fedora policy requires that shared libraries +# be installed with the executable permission. Since the native tools +# create shared libraries with execute permission in the first place a +# reasonable policy seems to be to install with execute permission by +# default. In order to support debian packages we provide an option +# here. The option default is based on the current distribution, but +# packagers can set it explicitly on the command line. +IF(DEFINED CMAKE_INSTALL_SO_NO_EXE) + # Store the decision variable in the cache. This preserves any + # setting the user provides on the command line. + SET(CMAKE_INSTALL_SO_NO_EXE "${CMAKE_INSTALL_SO_NO_EXE}" CACHE INTERNAL + "Install .so files without execute permission.") +ELSE(DEFINED CMAKE_INSTALL_SO_NO_EXE) + # Store the decision variable as an internal cache entry to avoid + # checking the platform every time. This option is advanced enough + # that only package maintainers should need to adjust it. They are + # capable of providing a setting on the command line. + IF(EXISTS "/etc/debian_version") + SET(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL + "Install .so files without execute permission.") + ELSE(EXISTS "/etc/debian_version") + SET(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL + "Install .so files without execute permission.") + ENDIF(EXISTS "/etc/debian_version") +ENDIF(DEFINED CMAKE_INSTALL_SO_NO_EXE) + +INCLUDE(Platform/UnixPaths) + +# Debian has lib64 paths only for compatibility so they should not be +# searched. +IF(EXISTS "/etc/debian_version") + SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) +ENDIF(EXISTS "/etc/debian_version") diff --git a/Modules/Platform/MP-RAS.cmake b/Modules/Platform/MP-RAS.cmake new file mode 100644 index 000000000..1e3e2396e --- /dev/null +++ b/Modules/Platform/MP-RAS.cmake @@ -0,0 +1,10 @@ +IF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +ELSE(CMAKE_SYSTEM MATCHES "MP-RAS-02*.") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") + SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport") +ENDIF(CMAKE_SYSTEM MATCHES "MP-RAS-02*.") + +INCLUDE(Platform/UnixPaths) + + diff --git a/Modules/Platform/NetBSD.cmake b/Modules/Platform/NetBSD.cmake new file mode 100644 index 000000000..abf0a61b7 --- /dev/null +++ b/Modules/Platform/NetBSD.cmake @@ -0,0 +1,15 @@ +IF(EXISTS /usr/include/dlfcn.h) + SET(CMAKE_DL_LIBS "") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -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 + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") # -rpath + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") # : or empty + SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") + SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") + SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic") +ENDIF(EXISTS /usr/include/dlfcn.h) + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/OSF1.cmake b/Modules/Platform/OSF1.cmake new file mode 100644 index 000000000..27af3b14e --- /dev/null +++ b/Modules/Platform/OSF1.cmake @@ -0,0 +1,45 @@ +SET(CMAKE_DL_LIBS "") + +IF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]") +ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.[012]") +IF(CMAKE_SYSTEM MATCHES "OSF1-1.*") + # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fpic") # -pic + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fpic") # -pic +ENDIF(CMAKE_SYSTEM MATCHES "OSF1-1.*") + + + +IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared + IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,") + ELSE(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-rpath ") + ENDIF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") + ELSE(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-rpath ") + ENDIF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") + + +IF(CMAKE_COMPILER_IS_GNUCXX) + # include the gcc flags +ELSE (CMAKE_COMPILER_IS_GNUCXX) + # use default OSF compiler flags + SET (CMAKE_C_FLAGS_INIT "") + SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2") + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/OpenBSD.cmake b/Modules/Platform/OpenBSD.cmake new file mode 100644 index 000000000..cbdcb7dae --- /dev/null +++ b/Modules/Platform/OpenBSD.cmake @@ -0,0 +1,2 @@ +SET(CMAKE_DL_LIBS "") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/QNX.cmake b/Modules/Platform/QNX.cmake new file mode 100644 index 000000000..b48383a96 --- /dev/null +++ b/Modules/Platform/QNX.cmake @@ -0,0 +1,38 @@ +SET(QNXNTO 1) + +# GCC is the default compiler on QNX 6.3. +INCLUDE(Platform/gcc) + +# The QNX GCC does not seem to have -isystem so remove the flag. +SET(CMAKE_INCLUDE_SYSTEM_FLAG_C) +SET(CMAKE_INCLUDE_SYSTEM_FLAG_CXX) + +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") +SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic") + +# Shared libraries with no builtin soname may not be linked safely by +# specifying the file path. +SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) +# force the language to be c++ since qnx only has gcc and not g++ and c++? +SET(CMAKE_CXX_COMPILE_OBJECT + " -x c++ -o -c ") + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/RISCos.cmake b/Modules/Platform/RISCos.cmake new file mode 100644 index 000000000..3b2a092bf --- /dev/null +++ b/Modules/Platform/RISCos.cmake @@ -0,0 +1,6 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0") +SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000") + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/SCO_SV.cmake b/Modules/Platform/SCO_SV.cmake new file mode 100644 index 000000000..efb7aa05c --- /dev/null +++ b/Modules/Platform/SCO_SV.cmake @@ -0,0 +1,5 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-Kpic -belf") +SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-Kpic -belf") +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-belf -Wl,-Bexport") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/SINIX.cmake b/Modules/Platform/SINIX.cmake new file mode 100644 index 000000000..4592fdd26 --- /dev/null +++ b/Modules/Platform/SINIX.cmake @@ -0,0 +1,2 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/SunOS-SunPro-Fortran.cmake b/Modules/Platform/SunOS-SunPro-Fortran.cmake new file mode 100644 index 000000000..5739c58e8 --- /dev/null +++ b/Modules/Platform/SunOS-SunPro-Fortran.cmake @@ -0,0 +1,2 @@ +SET(CMAKE_Fortran_MODDIR_FLAG "-moddir=") +SET(CMAKE_Fortran_MODPATH_FLAG "-M") diff --git a/Modules/Platform/SunOS.cmake b/Modules/Platform/SunOS.cmake new file mode 100644 index 000000000..cccd0d4ba --- /dev/null +++ b/Modules/Platform/SunOS.cmake @@ -0,0 +1,114 @@ +IF(CMAKE_SYSTEM MATCHES "SunOS-4.*") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-r") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h") +ENDIF(CMAKE_SYSTEM MATCHES "SunOS-4.*") + +IF(CMAKE_SYSTEM MATCHES "SunOS-5.*") + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-KPIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-G") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-R") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-h") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-h") + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-KPIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-G") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-R") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-R") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") + SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-h") + ELSE(CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_FLAGS_INIT "") + SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-xO3 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "-xO2 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-xO2") + ENDIF(CMAKE_COMPILER_IS_GNUCC) + IF(CMAKE_COMPILER_IS_GNUCXX) + SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") + SET(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-R") + SET(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ":") + SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-h") + ELSE(CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-xO3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-xO2 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-xO2") + ENDIF(CMAKE_COMPILER_IS_GNUCXX) +ENDIF(CMAKE_SYSTEM MATCHES "SunOS-5.*") + +IF(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o ") + ELSE(CMAKE_COMPILER_IS_GNUCC) + # Take default rule from CMakeDefaultMakeRuleVariables.cmake. + ENDIF(CMAKE_COMPILER_IS_GNUCC) +ELSE(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_CXX_COMPILER) + SET(CMAKE_CXX_CREATE_STATIC_LIBRARY + " -xar -o " + " ") + ENDIF(CMAKE_CXX_COMPILER) +ENDIF(CMAKE_COMPILER_IS_GNUCXX) +INCLUDE(Platform/UnixPaths) + +# Add the compiler's implicit link directories. +IF("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro) + LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES + /opt/SUNWspro/lib /opt/SUNWspro/prod/lib /usr/ccs/lib) +ENDIF("${CMAKE_C_COMPILER_ID} ${CMAKE_CXX_COMPILER_ID}" MATCHES SunPro) + +IF(NOT CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCC) + +IF(NOT CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") +ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX) + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +IF(CMAKE_COMPILER_IS_GNUCC) + FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") + ENDFOREACH(type) +ELSE(CMAKE_COMPILER_IS_GNUCC) + FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Bdynamic") + ENDFOREACH(type) +ENDIF(CMAKE_COMPILER_IS_GNUCC) +IF(CMAKE_COMPILER_IS_GNUCXX) + FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Wl,-Bdynamic") + ENDFOREACH(type) +ELSE(CMAKE_COMPILER_IS_GNUCXX) + FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_CXX_FLAGS "-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS "-Bdynamic") + ENDFOREACH(type) +ENDIF(CMAKE_COMPILER_IS_GNUCXX) + +# The Sun linker needs to find transitive shared library dependencies +# in the -L path. +SET(CMAKE_LINK_DEPENDENT_LIBRARY_DIRS 1) + +# Shared libraries with no builtin soname may not be linked safely by +# specifying the file path. +SET(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1) diff --git a/Modules/Platform/Tru64.cmake b/Modules/Platform/Tru64.cmake new file mode 100644 index 000000000..cf9d17bfd --- /dev/null +++ b/Modules/Platform/Tru64.cmake @@ -0,0 +1,2 @@ +INCLUDE(Platform/UnixPaths) + diff --git a/Modules/Platform/ULTRIX.cmake b/Modules/Platform/ULTRIX.cmake new file mode 100644 index 000000000..4d0cf755d --- /dev/null +++ b/Modules/Platform/ULTRIX.cmake @@ -0,0 +1,5 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-G 0") +SET(CMAKE_SHARED_LIBRARY_SUFFIX "..o") +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-D,08000000") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/UNIX_SV.cmake b/Modules/Platform/UNIX_SV.cmake new file mode 100644 index 000000000..3b50e0a2d --- /dev/null +++ b/Modules/Platform/UNIX_SV.cmake @@ -0,0 +1,3 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-Wl,-Bexport") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake new file mode 100755 index 000000000..7ed85c0ac --- /dev/null +++ b/Modules/Platform/UnixPaths.cmake @@ -0,0 +1,57 @@ +SET(UNIX 1) + +# also add the install directory of the running cmake to the search directories +# CMAKE_ROOT is CMAKE_INSTALL_PREFIX/share/cmake, so we need to go two levels up +GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) +GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + +# List common installation prefixes. These will be used for all +# search types. +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH + # Standard + / /usr /usr/local + + # CMake install location + "${_CMAKE_INSTALL_DIR}" + + # Project install destination. + "${CMAKE_INSTALL_PREFIX}" + ) + +# List common include file locations not under the common prefixes. +LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH + # Windows API on Cygwin + /usr/include/w32api + + # X11 + /usr/X11R6/include /usr/include/X11 + + # Other + /opt/local/include /usr/pkg/include + /opt/csw/include /opt/include + /usr/openwin/include + ) + +LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH + # Windows API on Cygwin + /usr/lib/w32api + + # X11 + /usr/X11R6/lib /usr/lib/X11 + + # Other + /opt/local/lib /usr/pkg/lib + /opt/csw/lib /opt/lib + /usr/openwin/lib + ) + +LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH + /usr/pkg/bin + ) + +LIST(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES + /lib /usr/lib /usr/lib32 /usr/lib64 + ) + +# Enable use of lib64 search path variants by default. +SET_PROPERTY(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE) diff --git a/Modules/Platform/UnixWare.cmake b/Modules/Platform/UnixWare.cmake new file mode 100644 index 000000000..c324bc824 --- /dev/null +++ b/Modules/Platform/UnixWare.cmake @@ -0,0 +1,3 @@ +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-K PIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-Wl,-Bexport") +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/Windows-bcc32.cmake b/Modules/Platform/Windows-bcc32.cmake new file mode 100644 index 000000000..4d01cc11c --- /dev/null +++ b/Modules/Platform/Windows-bcc32.cmake @@ -0,0 +1,128 @@ +# Borland shared library issues: +# When building dll's with borland, the run time dll c/c++ library from +# borland must be used. This is specified with the -tWR compiler option. +# This flag must be present during compilation of c and c++ files and +# for the linking of exe and dll files. But wait, there is more, +# the -tWR flag must come after the -tWD and -tWM flags, but before the -tWC flag. +# Order counts, so be careful! +# if building static, you don't want the -tWR flag as it will make your program +# depend on the borland run time dll. +# So, if a project has CMAKE_BUILD_SHARED on, then the -tWR flag is added all over, and +# it is left out if not. + +SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LINK_LIBRARY_FLAG "") +SET(CMAKE_SHARED_BUILD_CXX_FLAGS "-tWR") +SET(CMAKE_SHARED_BUILD_C_FLAGS "-tWR") +SET(BORLAND 1) + +SET(CMAKE_FIND_LIBRARY_SUFFIXES "-bcc.lib" ".lib") + +# uncomment these out to debug makefiles +#SET(CMAKE_START_TEMP_FILE "") +#SET(CMAKE_END_TEMP_FILE "") +#SET(CMAKE_VERBOSE_MAKEFILE 1) + +# Borland cannot handle + in the file name, so mangle object file name +SET (CMAKE_MANGLE_OBJECT_FILE_NAMES "ON") + +# Create an import library for another target. +SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY + "implib -c -w " + ) + +# Create a C++ module library. +SET(CMAKE_CXX_CREATE_SHARED_MODULE + " ${CMAKE_START_TEMP_FILE}-e -tWD -tWR ${CMAKE_END_TEMP_FILE}" +) + +# Create a C++ shared library. +# First create a module and then its import library. +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + ${CMAKE_CXX_CREATE_SHARED_MODULE} + ${CMAKE_CXX_CREATE_IMPORT_LIBRARY}) + +# Create an import library for another target. +SET(CMAKE_C_CREATE_IMPORT_LIBRARY ${CMAKE_CXX_CREATE_IMPORT_LIBRARY}) + +# Create a C module library. +SET(CMAKE_C_CREATE_SHARED_MODULE + " ${CMAKE_START_TEMP_FILE}-e -tWD -tWR ${CMAKE_END_TEMP_FILE}" +) + +# Create a C shared library. +# First create a module and then its import library. +SET(CMAKE_C_CREATE_SHARED_LIBRARY + ${CMAKE_C_CREATE_SHARED_MODULE} + ${CMAKE_C_CREATE_IMPORT_LIBRARY}) + +# create a C++ static library +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "tlib ${CMAKE_START_TEMP_FILE}/p512 /a ${CMAKE_END_TEMP_FILE}") + +# create a C static library +SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY}) + +# compile a C++ file into an object file +# place outside the response file because Borland refuses +# to parse quotes from the response file. +SET(CMAKE_CXX_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE}-DWIN32 -P -o -c ${CMAKE_END_TEMP_FILE}") + +# compile a C file into an object file +# place outside the response file because Borland refuses +# to parse quotes from the response file. +SET(CMAKE_C_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE}-DWIN32 -o -c ${CMAKE_END_TEMP_FILE}") + + +SET(CMAKE_C_LINK_EXECUTABLE + " ${CMAKE_START_TEMP_FILE}-e ${CMAKE_END_TEMP_FILE}" +# "implib -c -w " + ) + + +SET(CMAKE_CXX_LINK_EXECUTABLE + " ${CMAKE_START_TEMP_FILE} -e ${CMAKE_END_TEMP_FILE}" +# "implib -c -w " + ) + +SET (CMAKE_BUILD_TYPE Debug CACHE STRING + "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel.") + +# extra flags for a win32 exe +SET(CMAKE_CREATE_WIN32_EXE "-tW -tWM" ) +# extra flags for a console app +SET(CMAKE_CREATE_CONSOLE_EXE "-tWC" ) + +SET (CMAKE_CXX_FLAGS_INIT "-tWM") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-Od -v") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-Od") +SET (CMAKE_C_FLAGS_INIT "-tWM") +SET (CMAKE_C_FLAGS_DEBUG_INIT "-Od -v") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-O1 -DNDEBUG") +SET (CMAKE_C_FLAGS_RELEASE_INIT "-O2 -DNDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-Od") + +SET (CMAKE_EXE_LINKER_FLAGS_INIT "-tWM -lS:10000000 -lSc:10000000 ") +SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-v") +SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-v") +SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT}) + +SET (CMAKE_C_STANDARD_LIBRARIES_INIT "import32.lib") +SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") + +# preprocess C and CXX files +# place outside the response file because Borland refuses +# to parse quotes from the response file. +SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE + "cpp32 ${CMAKE_START_TEMP_FILE}-DWIN32 -o -c ${CMAKE_END_TEMP_FILE}") +SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE + "cpp32 ${CMAKE_START_TEMP_FILE}-DWIN32 -o -P -c ${CMAKE_END_TEMP_FILE}") +# Borland >= 5.6 allows -P option for cpp32, <= 5.5 does not diff --git a/Modules/Platform/Windows-cl.cmake b/Modules/Platform/Windows-cl.cmake new file mode 100644 index 000000000..562b2b02d --- /dev/null +++ b/Modules/Platform/Windows-cl.cmake @@ -0,0 +1,278 @@ +# try to load any previously computed information for C on this platform +INCLUDE( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake OPTIONAL) +# try to load any previously computed information for CXX on this platform +INCLUDE( ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake OPTIONAL) + +SET(WIN32 1) + +INCLUDE(Platform/cl) + +SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) +SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) + +IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + SET (CMAKE_NO_BUILD_TYPE 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") +IF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") + SET (CMAKE_NO_BUILD_TYPE 1) + SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING + "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") + MARK_AS_ADVANCED(CMAKE_CONFIGURATION_TYPES) +ENDIF(NOT CMAKE_NO_BUILD_TYPE AND CMAKE_GENERATOR MATCHES "Visual Studio") +# does the compiler support pdbtype and is it the newer compiler +IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") + SET(CMAKE_COMPILER_2005 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8") +IF(CMAKE_GENERATOR MATCHES "Visual Studio 9") + SET(CMAKE_COMPILER_2005 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 9") + + +# make sure to enable languages after setting configuration types +ENABLE_LANGUAGE(RC) +SET(CMAKE_COMPILE_RESOURCE "rc /fo ") + +# for nmake we need to compute some information about the compiler +# that is being used. +# the compiler may be free command line, 6, 7, or 71, and +# each have properties that must be determined. +# to avoid running these tests with each cmake run, the +# test results are saved in CMakeCPlatform.cmake, a file +# that is automatically copied into try_compile directories +# by the global generator. +SET(MSVC_IDE 1) +IF(CMAKE_GENERATOR MATCHES "Makefiles") + SET(MSVC_IDE 0) + IF(NOT CMAKE_VC_COMPILER_TESTS_RUN) + SET(CMAKE_VC_COMPILER_TESTS 1) + SET(testNmakeCLVersionFile + "${CMAKE_ROOT}/Modules/CMakeTestNMakeCLVersion.c") + STRING(REGEX REPLACE "/" "\\\\" testNmakeCLVersionFile "${testNmakeCLVersionFile}") + MESSAGE(STATUS "Check for CL compiler version") + SET(CMAKE_TEST_COMPILER ${CMAKE_C_COMPILER}) + IF (NOT CMAKE_C_COMPILER) + SET(CMAKE_TEST_COMPILER ${CMAKE_CXX_COMPILER}) + ENDIF(NOT CMAKE_C_COMPILER) + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} + ARGS /nologo -EP \"${testNmakeCLVersionFile}\" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + RETURN_VALUE CMAKE_COMPILER_RETURN + ) + IF(NOT CMAKE_COMPILER_RETURN) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining the version of compiler passed with the following output:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + STRING(REGEX REPLACE "\n" " " compilerVersion "${CMAKE_COMPILER_OUTPUT}") + STRING(REGEX REPLACE ".*VERSION=(.*)" "\\1" + compilerVersion "${compilerVersion}") + MESSAGE(STATUS "Check for CL compiler version - ${compilerVersion}") + SET(MSVC60) + SET(MSVC70) + SET(MSVC71) + SET(MSVC80) + SET(CMAKE_COMPILER_2005) + IF("${compilerVersion}" LESS 1300) + SET(MSVC60 1) + SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 1) + ENDIF("${compilerVersion}" LESS 1300) + IF("${compilerVersion}" EQUAL 1300) + SET(MSVC70 1) + SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0) + ENDIF("${compilerVersion}" EQUAL 1300) + IF("${compilerVersion}" EQUAL 1310) + SET(MSVC71 1) + SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE 0) + ENDIF("${compilerVersion}" EQUAL 1310) + IF("${compilerVersion}" EQUAL 1400) + SET(MSVC80 1) + SET(CMAKE_COMPILER_2005 1) + ENDIF("${compilerVersion}" EQUAL 1400) + IF("${compilerVersion}" GREATER 1400) + SET(MSVC80 1) + SET(CMAKE_COMPILER_2005 1) + ENDIF("${compilerVersion}" GREATER 1400) + IF("${compilerVersion}" GREATER 1400) + SET(MSVC80 1) + SET(CMAKE_COMPILER_2005 1) + ENDIF("${compilerVersion}" GREATER 1400) + IF("${compilerVersion}" EQUAL 1500) + SET(MSVC90 1) + SET(MSVC80 0) + ENDIF("${compilerVersion}" EQUAL 1500) + IF("${compilerVersion}" GREATER 1500) + SET(MSVC90 1) + SET(MSVC80 0) + ENDIF("${compilerVersion}" GREATER 1500) + SET(MSVC_VERSION "${compilerVersion}") + ELSE(NOT CMAKE_COMPILER_RETURN) + MESSAGE(STATUS "Check for CL compiler version - failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining the version of compiler failed with the following output:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + ENDIF(NOT CMAKE_COMPILER_RETURN) + # try to figure out if we are running the free command line + # tools from Microsoft. These tools do not provide debug libraries, + # so the link flags used have to be different. + MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2") + SET(testForFreeVCFile + "${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx") + STRING(REGEX REPLACE "/" "\\\\" testForFreeVCFile "${testForFreeVCFile}") + MESSAGE(STATUS "Check if this is a free VC compiler") + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp2 + ARGS /nologo /MD /EHsc + \"${testForFreeVCFile}\" + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + RETURN_VALUE CMAKE_COMPILER_RETURN + ) + IF(CMAKE_COMPILER_RETURN) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if this is a free VC compiler failed with the following output:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + MESSAGE(STATUS "Check if this is a free VC compiler - yes") + SET(CMAKE_USING_VC_FREE_TOOLS 1) + ELSE(CMAKE_COMPILER_RETURN) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if this is a free VC compiler passed with the following output:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + MESSAGE(STATUS "Check if this is a free VC compiler - no") + SET(CMAKE_USING_VC_FREE_TOOLS 0) + ENDIF(CMAKE_COMPILER_RETURN) + MAKE_DIRECTORY("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3") + MESSAGE(STATUS "Check CL platform") + EXEC_PROGRAM(${CMAKE_TEST_COMPILER} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp3 + ARGS /nologo + \"${testForFreeVCFile}\" + /link /machine:i386 + OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT + RETURN_VALUE CMAKE_COMPILER_RETURN + ) + # if there was an error assume it is a 64bit system + IF(CMAKE_COMPILER_RETURN) + FILE(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if this is a 64 bit system passed:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + MESSAGE(STATUS "Check CL platform - 64 bit") + SET(CMAKE_CL_64 1) + ELSE(CMAKE_COMPILER_RETURN) + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if this is a 32 bit system passed:\n" + "${CMAKE_COMPILER_OUTPUT}\n\n") + MESSAGE(STATUS "Check CL platform - 32 bit") + SET(CMAKE_CL_64 0) + ENDIF(CMAKE_COMPILER_RETURN) + ENDIF(NOT CMAKE_VC_COMPILER_TESTS_RUN) +ENDIF(CMAKE_GENERATOR MATCHES "Makefiles") + +IF(CMAKE_FORCE_WIN64) + SET(CMAKE_CL_64 1) +ENDIF(CMAKE_FORCE_WIN64) + + +# default to Debug builds +IF(MSVC_VERSION GREATER 1310) + # for 2005 make sure the manifest is put in the dll with mt + SET(CMAKE_CXX_CREATE_SHARED_LIBRARY " -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_LIBRARY}") + SET(CMAKE_CXX_CREATE_SHARED_MODULE " -E vs_link_dll ${CMAKE_CXX_CREATE_SHARED_MODULE}") + # create a C shared library + SET(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}") + # create a C shared module just copy the shared library rule + SET(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}") + SET(CMAKE_CXX_LINK_EXECUTABLE " -E vs_link_exe ${CMAKE_CXX_LINK_EXECUTABLE}") + SET(CMAKE_C_LINK_EXECUTABLE " -E vs_link_exe ${CMAKE_C_LINK_EXECUTABLE}") + + SET(CMAKE_BUILD_TYPE_INIT Debug) + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ") + SET (CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS_INIT} /MANIFEST") +ELSE(MSVC_VERSION GREATER 1310) + IF(CMAKE_USING_VC_FREE_TOOLS) + MESSAGE(STATUS "Using FREE VC TOOLS, NO DEBUG available") + SET(CMAKE_BUILD_TYPE_INIT Release) + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /GZ") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MT /O1 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MT /O2 /Ob2 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1 /D NDEBUG") + ELSE(CMAKE_USING_VC_FREE_TOOLS) + SET(CMAKE_BUILD_TYPE_INIT Debug) + SET (CMAKE_CXX_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000 /GX /GR") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_INIT "/DWIN32 /D_WINDOWS /W3 /Zm1000") + SET (CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /GZ") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1 /Ob1 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2 /Ob2 /D NDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2 /Ob1 /D NDEBUG") + ENDIF(CMAKE_USING_VC_FREE_TOOLS) + SET (CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib") +ENDIF(MSVC_VERSION GREATER 1310) + +SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") + +# executable linker flags +SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:") +# set the stack size and the machine type +IF(CMAKE_CL_64) + SET (CMAKE_EXE_LINKER_FLAGS_INIT + "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:x64") +ELSE(CMAKE_CL_64) + SET (CMAKE_EXE_LINKER_FLAGS_INIT + "${CMAKE_EXE_LINKER_FLAGS_INIT} /STACK:10000000 /machine:I386") +ENDIF(CMAKE_CL_64) + +# add /debug and /INCREMENTAL:YES to DEBUG and RELWITHDEBINFO also add pdbtyp +# on versions that support it +IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept /INCREMENTAL:YES") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept /INCREMENTAL:YES") +ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /INCREMENTAL:YES") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /INCREMENTAL:YES") +ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) +# for release and minsize release default to no incremental linking +SET(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "/INCREMENTAL:NO") +SET(CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "/INCREMENTAL:NO") + +# copy the EXE_LINKER flags to SHARED and MODULE linker flags +# shared linker flags +SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT}) +# module linker flags +SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELEASE_INIT ${CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL_INIT ${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT}) + + +# save computed information for this platform +IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake") + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCPlatform.cmake IMMEDIATE) +ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCPlatform.cmake") + +IF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake") + CONFIGURE_FILE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake.in + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCXXPlatform.cmake IMMEDIATE) +ENDIF(NOT EXISTS "${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake") + diff --git a/Modules/Platform/Windows-cl.cmake.in b/Modules/Platform/Windows-cl.cmake.in new file mode 100755 index 000000000..1a889f2bd --- /dev/null +++ b/Modules/Platform/Windows-cl.cmake.in @@ -0,0 +1,13 @@ +SET(CMAKE_VC_COMPILER_TESTS_RUN 1) +SET(CMAKE_COMPILER_SUPPORTS_PDBTYPE @CMAKE_COMPILER_SUPPORTS_PDBTYPE@) +SET(CMAKE_COMPILER_2005 @CMAKE_COMPILER_2005@) +SET(CMAKE_USING_VC_FREE_TOOLS @CMAKE_USING_VC_FREE_TOOLS@) +SET(CMAKE_CL_64 @CMAKE_CL_64@) +SET(MSVC60 @MSVC60@) +SET(MSVC70 @MSVC70@) +SET(MSVC71 @MSVC71@) +SET(MSVC80 @MSVC80@) +SET(MSVC90 @MSVC90@) +SET(MSVC_IDE @MSVC_IDE@) +SET(MSVC_VERSION @MSVC_VERSION@) +SET(WIN32 1) diff --git a/Modules/Platform/Windows-df.cmake b/Modules/Platform/Windows-df.cmake new file mode 100755 index 000000000..753b19873 --- /dev/null +++ b/Modules/Platform/Windows-df.cmake @@ -0,0 +1,68 @@ +# compiler support for fortran CVF compiler on windows + +SET(CMAKE_WINDOWS_OBJECT_PATH 1) +SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") +SET(CMAKE_LINK_LIBRARY_FLAG "") +SET(WIN32 1) +IF(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO) +ELSE(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO "/nologo") +ENDIF(CMAKE_VERBOSE_MAKEFILE) + +SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /dll ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}) + +# create a C++ static library +SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} /out: ") + +# compile a C++ file into an object file +SET(CMAKE_Fortran_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /object: /compile_only ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_COMPILE_RESOURCE "rc /fo ") + +SET(CMAKE_Fortran_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /exe: /link ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CREATE_WIN32_EXE /winapp) +SET(CMAKE_CREATE_CONSOLE_EXE ) + +IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + SET (CMAKE_NO_BUILD_TYPE 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") +IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") + SET (CMAKE_NO_BUILD_TYPE 1) + SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING + "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") +# does the compiler support pdbtype and is it the newer compiler + +SET(CMAKE_BUILD_TYPE_INIT Debug) +SET (CMAKE_Fortran_FLAGS_INIT "") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full") +SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/Optimize:2 /Define:NDEBUG") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/Optimize:1 /Define:NDEBUG") +SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/Optimize:1 /debug:full /Define:NDEBUG") + +SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") + +# executable linker flags +SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:") +SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES") +IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept") +ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug") +ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + +SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) diff --git a/Modules/Platform/Windows-g++.cmake b/Modules/Platform/Windows-g++.cmake new file mode 100755 index 000000000..3aa393cfa --- /dev/null +++ b/Modules/Platform/Windows-g++.cmake @@ -0,0 +1 @@ +INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-gcc.cmake) diff --git a/Modules/Platform/Windows-g77.cmake b/Modules/Platform/Windows-g77.cmake new file mode 100755 index 000000000..193b92527 --- /dev/null +++ b/Modules/Platform/Windows-g77.cmake @@ -0,0 +1,16 @@ +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe +SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib +SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so +SET(CMAKE_DL_LIBS "") +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 +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty +SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LINK_LIBRARY_FLAG "-l") diff --git a/Modules/Platform/Windows-gcc.cmake b/Modules/Platform/Windows-gcc.cmake new file mode 100755 index 000000000..51857ebdc --- /dev/null +++ b/Modules/Platform/Windows-gcc.cmake @@ -0,0 +1,66 @@ +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so +SET(CMAKE_SHARED_MODULE_PREFIX "lib") # lib +SET(CMAKE_SHARED_MODULE_SUFFIX ".dll") # .so +SET(CMAKE_IMPORT_LIBRARY_PREFIX "lib") +SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".dll.a") +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe +SET(CMAKE_DL_LIBS "") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_CXX_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 +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty +SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LINK_LIBRARY_FLAG "-l") +SET(CMAKE_EXTRA_LINK_EXTENSIONS ".lib") # MinGW can also link to a MS .lib +SET(CMAKE_CREATE_WIN32_EXE "-mwindows") + +IF(MINGW) + SET(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") + SET(CMAKE_FIND_LIBRARY_SUFFIXES ".dll" ".dll.a" ".a" ".lib") +ENDIF(MINGW) + +SET(CMAKE_GNULD_IMAGE_VERSION + "-Wl,--major-image-version,,--minor-image-version,") + +SET(CMAKE_C_CREATE_SHARED_MODULE + " -o ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_CREATE_SHARED_MODULE + " -o ${CMAKE_GNULD_IMAGE_VERSION} ") + +SET(CMAKE_C_CREATE_SHARED_LIBRARY + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") + +SET(CMAKE_C_LINK_EXECUTABLE + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") +SET(CMAKE_CXX_LINK_EXECUTABLE + " -o -Wl,--out-implib, ${CMAKE_GNULD_IMAGE_VERSION} ") + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +IF(MSYS OR MINGW) + FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") + ENDFOREACH(type) +ENDIF(MSYS OR MINGW) + +# Create archiving rules to support large object file lists for static +# libraries. +IF(MSYS OR MINGW) + SET(CMAKE_C_ARCHIVE_CREATE " cr ") + SET(CMAKE_C_ARCHIVE_APPEND " r ") + SET(CMAKE_C_ARCHIVE_FINISH " ") + SET(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE}) + SET(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_C_ARCHIVE_APPEND}) + SET(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_C_ARCHIVE_FINISH}) +ENDIF(MSYS OR MINGW) diff --git a/Modules/Platform/Windows-icl.cmake b/Modules/Platform/Windows-icl.cmake new file mode 100755 index 000000000..d6db61bd7 --- /dev/null +++ b/Modules/Platform/Windows-icl.cmake @@ -0,0 +1,77 @@ +SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") +SET(CMAKE_LINK_LIBRARY_FLAG "") +SET(WIN32 1) +IF(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO) +ELSE(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO "/nologo") +ENDIF(CMAKE_VERBOSE_MAKEFILE) +# create a shared C++ library +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /dll ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) + +# create a C shared library +SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) + +# create a C shared module just copy the shared library rule +SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_C_CREATE_SHARED_LIBRARY}) + + +# create a C++ static library +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} /out: ") + +# create a C static library +SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY}) + +# compile a C++ file into an object file +SET(CMAKE_CXX_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /TP -DWIN32 /Fo -c ${CMAKE_END_TEMP_FILE}") + +# compile a C file into an object file +SET(CMAKE_C_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} -DWIN32 /Fo -c ${CMAKE_END_TEMP_FILE}") + + +SET(CMAKE_C_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe -link ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_COMPILE_RESOURCE "rc /fo ") + +SET(CMAKE_CXX_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe -link ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) +SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) + +# default to Debug builds +#SET(CMAKE_BUILD_TYPE_INIT Debug) +SET(CMAKE_BUILD_TYPE_INIT Release) +SET (CMAKE_CXX_FLAGS_INIT "/W3 /Zm1000 /GX /GR") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "/MD /O1") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/MD /O2") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2") +SET (CMAKE_C_FLAGS_INIT "/W3 /Zm1000") +SET (CMAKE_C_FLAGS_DEBUG_INIT "/MDd /Zi /Od /GZ") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "/MD /O1") +SET (CMAKE_C_FLAGS_RELEASE_INIT "/MD /O2") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/MD /Zi /O2") + + +SET(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib") +SET(CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") + +# executable linker flags +SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:") +SET (CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:YES") +SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug") +SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug") + +SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) diff --git a/Modules/Platform/Windows-ifort.cmake b/Modules/Platform/Windows-ifort.cmake new file mode 100755 index 000000000..2bf4753cf --- /dev/null +++ b/Modules/Platform/Windows-ifort.cmake @@ -0,0 +1,69 @@ +SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") +SET(CMAKE_LINK_LIBRARY_FLAG "") +SET(WIN32 1) +IF(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO) +ELSE(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO "/nologo") +ENDIF(CMAKE_VERBOSE_MAKEFILE) + +SET(CMAKE_Fortran_MODDIR_FLAG "-module:") + +SET(CMAKE_Fortran_USE_RESPONSE_FILE_FOR_OBJECTS 1) + +SET(CMAKE_Fortran_CREATE_SHARED_LIBRARY + "link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /dll ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_Fortran_CREATE_SHARED_MODULE ${CMAKE_Fortran_CREATE_SHARED_LIBRARY}) + +# create a C++ static library +SET(CMAKE_Fortran_CREATE_STATIC_LIBRARY "lib ${CMAKE_CL_NOLOGO} /out: ") + +# compile a C++ file into an object file +SET(CMAKE_Fortran_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /fpp /Fo -c ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_COMPILE_RESOURCE "rc /fo ") + +SET(CMAKE_Fortran_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe -link ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CREATE_WIN32_EXE /subsystem:windows) +SET(CMAKE_CREATE_CONSOLE_EXE /subsystem:console) + +IF(CMAKE_GENERATOR MATCHES "Visual Studio 6") + SET (CMAKE_NO_BUILD_TYPE 1) +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6") +IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") + SET (CMAKE_NO_BUILD_TYPE 1) + SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;MinSizeRel;RelWithDebInfo" CACHE STRING + "Semicolon separated list of supported configuration types, only supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything else will be ignored.") +ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8") +# does the compiler support pdbtype and is it the newer compiler + +SET(CMAKE_BUILD_TYPE_INIT Debug) +SET (CMAKE_Fortran_FLAGS_INIT "/W1 /nologo /fpp") +SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "/debug:full") +SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "/O2 /D NDEBUG") +SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "/MD /O1 /D NDEBUG") +SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "/O1 /debug:full /D NDEBUG") + +SET (CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib") + +# executable linker flags +SET (CMAKE_LINK_DEF_FILE_FLAG "/DEF:") +SET (CMAKE_EXE_LINKER_FLAGS_INIT " /INCREMENTAL:YES") +IF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug /pdbtype:sept") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug /pdbtype:sept") +ELSE (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "/debug") + SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "/debug") +ENDIF (CMAKE_COMPILER_SUPPORTS_PDBTYPE) + +SET (CMAKE_SHARED_LINKER_FLAGS_INIT ${CMAKE_EXE_LINKER_FLAGS_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_INIT ${CMAKE_SHARED_LINKER_FLAGS_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_DEBUG_INIT ${CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT}) +SET (CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO_INIT ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT}) diff --git a/Modules/Platform/Windows-wcl386.cmake b/Modules/Platform/Windows-wcl386.cmake new file mode 100755 index 000000000..87a61d56e --- /dev/null +++ b/Modules/Platform/Windows-wcl386.cmake @@ -0,0 +1,70 @@ +SET(CMAKE_LIBRARY_PATH_FLAG "libpath ") +SET(CMAKE_LINK_LIBRARY_FLAG "library ") +SET(CMAKE_LINK_LIBRARY_FILE_FLAG "library") + +IF(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_WCL_QUIET) + SET(CMAKE_WLINK_QUIET) + SET(CMAKE_LIB_QUIET) +ELSE(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_WCL_QUIET "-zq") + SET(CMAKE_WLINK_QUIET "option quiet") + SET(CMAKE_LIB_QUIET "-q") +ENDIF(CMAKE_VERBOSE_MAKEFILE) + +SET(CMAKE_BUILD_TYPE_INIT Debug) +SET (CMAKE_CXX_FLAGS_INIT "-w=3 -xs") +SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-br -bm -d2") +SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-br -bm -d2 -ot -dNDEBUG") +SET (CMAKE_C_FLAGS_INIT "-w=3 ") +SET (CMAKE_C_FLAGS_DEBUG_INIT "-br -bm -od") +SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-br -bm -os -dNDEBUG") +SET (CMAKE_C_FLAGS_RELEASE_INIT "-br -bm -ot -dNDEBUG") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-br -bm -ot -dNDEBUG") +SET (CMAKE_C_STANDARD_LIBRARIES_INIT "library clbrdll.lib library plbrdll.lib library kernel32.lib library user32.lib library gdi32.lib library winspool.lib library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib") +SET (CMAKE_CXX_STANDARD_LIBRARIES_INIT "${CMAKE_C_STANDARD_LIBRARIES_INIT}") + +SET(CMAKE_C_CREATE_IMPORT_LIBRARY + "wlib -q -n -b +") +SET(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY}) + +SET(CMAKE_C_LINK_EXECUTABLE + "wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name option caseexact file {} ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE}) + +# compile a C++ file into an object file +SET(CMAKE_CXX_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} -dWIN32 -d+ -fo -c -cc++ ${CMAKE_END_TEMP_FILE}") + +# compile a C file into an object file +SET(CMAKE_C_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} -dWIN32 -d+ -fo -c -cc ${CMAKE_END_TEMP_FILE}") + +# preprocess a C source file +SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE + " ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} -dWIN32 -d+ -fo -pl -cc ${CMAKE_END_TEMP_FILE}") + +# preprocess a C++ source file +SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE + " ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} -dWIN32 -d+ -fo -pl -cc++ ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_CREATE_SHARED_MODULE + "wlink ${CMAKE_START_TEMP_FILE} system nt_dll ${CMAKE_WLINK_QUIET} name option caseexact file {} ${CMAKE_END_TEMP_FILE}") +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + ${CMAKE_CXX_CREATE_SHARED_MODULE} + ${CMAKE_CXX_CREATE_IMPORT_LIBRARY}) + +# create a C shared library +SET(CMAKE_C_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) + +# create a C shared module +SET(CMAKE_C_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_MODULE}) + +# create a C++ static library +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY "wlib ${CMAKE_LIB_QUIET} -n -b ") + +# create a C static library +SET(CMAKE_C_CREATE_STATIC_LIBRARY ${CMAKE_CXX_CREATE_STATIC_LIBRARY}) diff --git a/Modules/Platform/Windows.cmake b/Modules/Platform/Windows.cmake new file mode 100644 index 000000000..09cb8d303 --- /dev/null +++ b/Modules/Platform/Windows.cmake @@ -0,0 +1,36 @@ +SET(WIN32 1) + +SET(CMAKE_STATIC_LIBRARY_PREFIX "") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") +SET(CMAKE_SHARED_LIBRARY_PREFIX "") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # .so +SET(CMAKE_IMPORT_LIBRARY_PREFIX "") +SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib") +SET(CMAKE_EXECUTABLE_SUFFIX ".exe") # .exe +SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib") +SET(CMAKE_DL_LIBS "") + +SET(CMAKE_FIND_LIBRARY_PREFIXES "") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib") + +# for borland make long command lines are redirected to a file +# with the following syntax, see Windows-bcc32.cmake for use +IF(CMAKE_GENERATOR MATCHES "Borland") + SET(CMAKE_START_TEMP_FILE "@&&|\n") + SET(CMAKE_END_TEMP_FILE "\n|") +ENDIF(CMAKE_GENERATOR MATCHES "Borland") + +# for nmake make long command lines are redirected to a file +# with the following syntax, see Windows-bcc32.cmake for use +IF(CMAKE_GENERATOR MATCHES "NMake") + SET(CMAKE_START_TEMP_FILE "@<<\n") + SET(CMAKE_END_TEMP_FILE "\n<<") +ENDIF(CMAKE_GENERATOR MATCHES "NMake") + +INCLUDE(Platform/WindowsPaths) + +# uncomment these out to debug nmake and borland makefiles +#SET(CMAKE_START_TEMP_FILE "") +#SET(CMAKE_END_TEMP_FILE "") +#SET(CMAKE_VERBOSE_MAKEFILE 1) + diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake new file mode 100755 index 000000000..45ed4795d --- /dev/null +++ b/Modules/Platform/WindowsPaths.cmake @@ -0,0 +1,31 @@ +GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${CMAKE_ROOT}" PATH) +GET_FILENAME_COMPONENT(_CMAKE_INSTALL_DIR "${_CMAKE_INSTALL_DIR}" PATH) + +# List common installation prefixes. These will be used for all +# search types. +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH + # Standard + "$ENV{ProgramFiles}" + + # CMake install location + "${_CMAKE_INSTALL_DIR}" + + # Project install destination. + "${CMAKE_INSTALL_PREFIX}" + + # MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set) + / + ) + +LIST(APPEND CMAKE_SYSTEM_INCLUDE_PATH + ) + +# mingw can also link against dlls which can also be in /bin, so list this too +LIST(APPEND CMAKE_SYSTEM_LIBRARY_PATH + "${CMAKE_INSTALL_PREFIX}/bin" + "${_CMAKE_INSTALL_DIR}/bin" + /bin + ) + +LIST(APPEND CMAKE_SYSTEM_PROGRAM_PATH + ) diff --git a/Modules/Platform/Xenix.cmake b/Modules/Platform/Xenix.cmake new file mode 100644 index 000000000..cf9d17bfd --- /dev/null +++ b/Modules/Platform/Xenix.cmake @@ -0,0 +1,2 @@ +INCLUDE(Platform/UnixPaths) + diff --git a/Modules/Platform/cl.cmake b/Modules/Platform/cl.cmake new file mode 100644 index 000000000..c0f014b58 --- /dev/null +++ b/Modules/Platform/cl.cmake @@ -0,0 +1,62 @@ +SET(CMAKE_LIBRARY_PATH_FLAG "-LIBPATH:") +SET(CMAKE_LINK_LIBRARY_FLAG "") +SET(MSVC 1) + +# hack: if a new cmake (which uses CMAKE__LINKER) runs on an old build tree +# (where link was hardcoded) and where CMAKE_LINKER isn't in the cache +# and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun) +# hardcode CMAKE_LINKER here to link, so it behaves as it did before, Alex +IF(NOT DEFINED CMAKE_LINKER) + SET(CMAKE_LINKER link) +ENDIF(NOT DEFINED CMAKE_LINKER) + +IF(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO) +ELSE(CMAKE_VERBOSE_MAKEFILE) + SET(CMAKE_CL_NOLOGO "/nologo") +ENDIF(CMAKE_VERBOSE_MAKEFILE) +# create a shared C++ library +SET(CMAKE_CXX_CREATE_SHARED_LIBRARY + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out: /implib: /pdb: /dll /version:. ${CMAKE_END_TEMP_FILE}") +SET(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY}) + +# create a C shared library +SET(CMAKE_C_CREATE_SHARED_LIBRARY "${CMAKE_CXX_CREATE_SHARED_LIBRARY}") + +# create a C shared module +SET(CMAKE_C_CREATE_SHARED_MODULE "${CMAKE_CXX_CREATE_SHARED_MODULE}") + +# create a C++ static library +SET(CMAKE_CXX_CREATE_STATIC_LIBRARY " /lib ${CMAKE_CL_NOLOGO} /out: ") + +# create a C static library +SET(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_CXX_CREATE_STATIC_LIBRARY}") + +# compile a C++ file into an object file +SET(CMAKE_CXX_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /TP /Fo /Fd -c ${CMAKE_END_TEMP_FILE}") + +# compile a C file into an object file +SET(CMAKE_C_COMPILE_OBJECT + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /Fo /Fd -c ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1) +SET(CMAKE_C_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe /Fd -link /implib: /version:. ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1) +SET(CMAKE_CXX_LINK_EXECUTABLE + " ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /Fe /Fd -link /implib: /version:. ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_C_CREATE_PREPROCESSED_SOURCE + " > ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} -E ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_CREATE_PREPROCESSED_SOURCE + " > ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /TP -E ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_C_CREATE_ASSEMBLY_SOURCE + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /FAs /FoNUL /Fa /c ${CMAKE_END_TEMP_FILE}") + +SET(CMAKE_CXX_CREATE_ASSEMBLY_SOURCE + " ${CMAKE_START_TEMP_FILE} ${CMAKE_CL_NOLOGO} /TP /FAs /FoNUL /Fa /c ${CMAKE_END_TEMP_FILE}") + diff --git a/Modules/Platform/eCos.cmake b/Modules/Platform/eCos.cmake new file mode 100644 index 000000000..f0881c0bb --- /dev/null +++ b/Modules/Platform/eCos.cmake @@ -0,0 +1,58 @@ +# support for eCos http://ecos.sourceware.org +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "") # -pic +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "") # -shared +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "") # -rpath +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty + +SET(CMAKE_LINK_LIBRARY_SUFFIX "") +SET(CMAKE_STATIC_LIBRARY_PREFIX "lib") +SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a") +SET(CMAKE_SHARED_LIBRARY_PREFIX "lib") # lib +SET(CMAKE_SHARED_LIBRARY_SUFFIX ".a") # .a +SET(CMAKE_EXECUTABLE_SUFFIX ".elf") # same suffix as if built using UseEcos.cmake +SET(CMAKE_DL_LIBS "" ) + +SET(CMAKE_FIND_LIBRARY_PREFIXES "lib") +SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + + +INCLUDE(Platform/UnixPaths) + +# eCos can be built only with gcc +GET_PROPERTY(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE) +IF(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC) + MESSAGE(FATAL_ERROR "GNU gcc is required for eCos") +ENDIF(CMAKE_C_COMPILER AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC) +IF(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC) + MESSAGE(FATAL_ERROR "GNU g++ is required for eCos") +ENDIF(CMAKE_CXX_COMPILER AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" AND NOT _IN_TC) + +# find eCos system files +FIND_PATH(ECOS_SYSTEM_CONFIG_HEADER_PATH NAMES pkgconf/system.h) +FIND_LIBRARY(ECOS_SYSTEM_TARGET_LIBRARY NAMES libtarget.a) + +IF(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH) + MESSAGE(FATAL_ERROR "Could not find eCos pkgconf/system.h. Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.") +ENDIF(NOT ECOS_SYSTEM_CONFIG_HEADER_PATH) + +IF(NOT ECOS_SYSTEM_TARGET_LIBRARY) + MESSAGE(FATAL_ERROR "Could not find eCos \"libtarget.a\". Build eCos first and set up CMAKE_FIND_ROOT_PATH correctly.") +ENDIF(NOT ECOS_SYSTEM_TARGET_LIBRARY) + +GET_FILENAME_COMPONENT(ECOS_LIBTARGET_DIRECTORY "${ECOS_SYSTEM_TARGET_LIBRARY}" PATH) +INCLUDE_DIRECTORIES(${ECOS_SYSTEM_CONFIG_HEADER_PATH}) +ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1) + +# special link commands for eCos executables +SET(CMAKE_CXX_LINK_EXECUTABLE " -o -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld ") +SET(CMAKE_C_LINK_EXECUTABLE " -o -nostdlib -nostartfiles -L${ECOS_LIBTARGET_DIRECTORY} -Ttarget.ld ") + +# eCos doesn't support shared libs +SET_PROPERTY(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) + +SET(CMAKE_CXX_LINK_SHARED_LIBRARY ) +SET(CMAKE_CXX_LINK_MODULE_LIBRARY ) +SET(CMAKE_C_LINK_SHARED_LIBRARY ) +SET(CMAKE_C_LINK_MODULE_LIBRARY ) + diff --git a/Modules/Platform/g77.cmake b/Modules/Platform/g77.cmake new file mode 100755 index 000000000..8f7d448ce --- /dev/null +++ b/Modules/Platform/g77.cmake @@ -0,0 +1,7 @@ +IF(CMAKE_COMPILER_IS_GNUG77) + SET (CMAKE_Fortran_FLAGS_INIT "") + SET (CMAKE_Fortran_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_Fortran_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + SET (CMAKE_Fortran_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + SET (CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +ENDIF(CMAKE_COMPILER_IS_GNUG77) diff --git a/Modules/Platform/gas.cmake b/Modules/Platform/gas.cmake new file mode 100644 index 000000000..c34aef17a --- /dev/null +++ b/Modules/Platform/gas.cmake @@ -0,0 +1,19 @@ +IF(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .o) +ELSE(UNIX) + SET(CMAKE_ASM${ASM_DIALECT}_OUTPUT_EXTENSION .obj) +ENDIF(UNIX) + +SET(CMAKE_ASM${ASM_DIALECT}_COMPILE_OBJECT " -o ") + +SET(CMAKE_ASM${ASM_DIALECT}_CREATE_STATIC_LIBRARY + " cr " + " ") + +SET(CMAKE_ASM${ASM_DIALECT}_LINK_EXECUTABLE + " -o ") + +# to be done +SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_LIBRARY) +SET(CMAKE_ASM${ASM_DIALECT}_CREATE_SHARED_MODULE) + diff --git a/Modules/Platform/gcc.cmake b/Modules/Platform/gcc.cmake new file mode 100644 index 000000000..8c385cee7 --- /dev/null +++ b/Modules/Platform/gcc.cmake @@ -0,0 +1,27 @@ +IF(CMAKE_COMPILER_IS_GNUCC) + SET (CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic + SET (CMAKE_C_FLAGS_INIT "") + SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + SET (CMAKE_C_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_C_CREATE_ASSEMBLY_SOURCE " -S -o ") + IF(NOT APPLE) + SET (CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") + ENDIF(NOT APPLE) +ENDIF(CMAKE_COMPILER_IS_GNUCC) + +IF(CMAKE_COMPILER_IS_GNUCXX) + SET (CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC") # -pic + SET (CMAKE_CXX_FLAGS_INIT "") + SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") + SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") + SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") + SET (CMAKE_CXX_CREATE_PREPROCESSED_SOURCE " -E > ") + SET (CMAKE_CXX_CREATE_ASSEMBLY_SOURCE " -S -o ") + IF(NOT APPLE) + SET (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ") + ENDIF(NOT APPLE) +ENDIF(CMAKE_COMPILER_IS_GNUCXX) diff --git a/Modules/Platform/kFreeBSD.cmake b/Modules/Platform/kFreeBSD.cmake new file mode 100755 index 000000000..b14514acc --- /dev/null +++ b/Modules/Platform/kFreeBSD.cmake @@ -0,0 +1,12 @@ +# kFreeBSD looks just like Linux. +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") +SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") +SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,") +SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") +SET(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,") +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") + +INCLUDE(Platform/UnixPaths) diff --git a/Modules/Platform/syllable.cmake b/Modules/Platform/syllable.cmake new file mode 100644 index 000000000..2bcaf8cd5 --- /dev/null +++ b/Modules/Platform/syllable.cmake @@ -0,0 +1,33 @@ +# this is the platform file for the Syllable OS (http://www.syllable.org) +# Syllable is a free OS (GPL), which is mostly POSIX conform +# the linker accepts the rpath related arguments, but this is later on +# ignored by the runtime linker +# shared libs are found exclusively via the environment variable DLL_PATH, +# which may contain also dirs containing the special variable @bindir@ +# by default @bindir@/lib is part of DLL_PATH +# in order to run the cmake tests successfully it is required that also +# @bindir@/. and @bindir@/../lib are in DLL_PATH + + +SET(CMAKE_DL_LIBS "dl") +SET(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -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 +SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +#SET(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic") +#SET(CMAKE_EXE_EXPORTS_CXX_FLAG "-Wl,--export-dynamic") + +# Initialize C link type selection flags. These flags are used when +# building a shared library, shared module, or executable that links +# to other libraries to select whether to use the static or shared +# versions of the libraries. +FOREACH(type SHARED_LIBRARY SHARED_MODULE EXE) + SET(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic") + SET(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic") +ENDFOREACH(type) + +INCLUDE(Platform/UnixPaths) + +# these are Syllable specific: +LIST(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes) diff --git a/Modules/Platform/xlf.cmake b/Modules/Platform/xlf.cmake new file mode 100755 index 000000000..adf146f8a --- /dev/null +++ b/Modules/Platform/xlf.cmake @@ -0,0 +1 @@ +set(CMAKE_Fortran_DEFINE_FLAG "-WF,-D") diff --git a/Modules/SystemInformation.cmake b/Modules/SystemInformation.cmake new file mode 100755 index 000000000..370778c32 --- /dev/null +++ b/Modules/SystemInformation.cmake @@ -0,0 +1,88 @@ +PROJECT(DumpInformation) + +# first get the standard information for th platform +INCLUDE_DIRECTORIES("This does not exists") +GET_DIRECTORY_PROPERTY(incl INCLUDE_DIRECTORIES) +SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${DumpInformation_BINARY_DIR};${DumpInformation_SOURCE_DIR}") + +CONFIGURE_FILE("${CMAKE_ROOT}/Modules/SystemInformation.in" "${RESULT_FILE}") + + +FILE(APPEND "${RESULT_FILE}" + "\n=================================================================\n") +FILE(APPEND "${RESULT_FILE}" + "=== VARIABLES\n") +FILE(APPEND "${RESULT_FILE}" + "=================================================================\n") +GET_CMAKE_PROPERTY(res VARIABLES) +FOREACH(var ${res}) + FILE(APPEND "${RESULT_FILE}" "${var} \"${${var}}\"\n") +ENDFOREACH(var ${res}) + +FILE(APPEND "${RESULT_FILE}" + "\n=================================================================\n") +FILE(APPEND "${RESULT_FILE}" + "=== COMMANDS\n") +FILE(APPEND "${RESULT_FILE}" + "=================================================================\n") +GET_CMAKE_PROPERTY(res COMMANDS) +FOREACH(var ${res}) + FILE(APPEND "${RESULT_FILE}" "${var}\n") +ENDFOREACH(var ${res}) + +FILE(APPEND "${RESULT_FILE}" + "\n=================================================================\n") +FILE(APPEND "${RESULT_FILE}" + "=== MACROS\n") +FILE(APPEND "${RESULT_FILE}" + "=================================================================\n") +FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/AllMacros.txt "") +GET_CMAKE_PROPERTY(res MACROS) +FOREACH(var ${res}) + FILE(APPEND "${RESULT_FILE}" "${var}\n") +ENDFOREACH(var ${res}) + +FILE(APPEND "${RESULT_FILE}" + "\n=================================================================\n") +FILE(APPEND "${RESULT_FILE}" + "=== OTHER\n") +FILE(APPEND "${RESULT_FILE}" + "=================================================================\n") +GET_DIRECTORY_PROPERTY(res INCLUDE_DIRECTORIES) +FOREACH(var ${res}) + FILE(APPEND "${RESULT_FILE}" "INCLUDE_DIRECTORY: ${var}\n") +ENDFOREACH(var) + +GET_DIRECTORY_PROPERTY(res LINK_DIRECTORIES) +FOREACH(var ${res}) + FILE(APPEND "${RESULT_FILE}" "LINK_DIRECTORIES: ${var}\n") +ENDFOREACH(var) + +GET_DIRECTORY_PROPERTY(res INCLUDE_REGULAR_EXPRESSION) +FILE(APPEND "${RESULT_FILE}" "INCLUDE_REGULAR_EXPRESSION: ${res}\n") + +# include other files if they are present, such as when run from within the +# binary tree +MACRO(DUMP_FILE THE_FILE) + IF (EXISTS "${THE_FILE}") + FILE(APPEND "${RESULT_FILE}" + "\n=================================================================\n") + FILE(APPEND "${RESULT_FILE}" + "=== ${THE_FILE}\n") + FILE(APPEND "${RESULT_FILE}" + "=================================================================\n") + + FILE(READ "${THE_FILE}" FILE_CONTENTS LIMIT 50000) + FILE(APPEND "${RESULT_FILE}" "${FILE_CONTENTS}") + ENDIF (EXISTS "${THE_FILE}") +ENDMACRO(DUMP_FILE) + +DUMP_FILE("../CMakeCache.txt") +DUMP_FILE("../CMakeFiles/CMakeOutput.log") +DUMP_FILE("../CMakeFiles/CMakeError.log") +DUMP_FILE("../CMakeFiles/CMakeSystem.cmake") + +FOREACH (EXTRA_FILE ${EXTRA_DUMP_FILES}) + DUMP_FILE("${EXTRA_FILE}") +ENDFOREACH (EXTRA_FILE) + diff --git a/Modules/SystemInformation.in b/Modules/SystemInformation.in new file mode 100755 index 000000000..7722da0e0 --- /dev/null +++ b/Modules/SystemInformation.in @@ -0,0 +1,92 @@ +Avoid ctest truncation of output: CTEST_FULL_OUTPUT +======================================================== +=== MAIN VARIABLES +======================================================== +CMAKE_STATIC_LIBRARY_PREFIX == "${CMAKE_STATIC_LIBRARY_PREFIX}" +CMAKE_STATIC_LIBRARY_SUFFIX == "${CMAKE_STATIC_LIBRARY_SUFFIX}" +CMAKE_SHARED_LIBRARY_PREFIX == "${CMAKE_SHARED_LIBRARY_PREFIX}" +CMAKE_SHARED_LIBRARY_SUFFIX == "${CMAKE_SHARED_LIBRARY_SUFFIX}" +CMAKE_SHARED_MODULE_PREFIX == "${CMAKE_SHARED_MODULE_PREFIX}" +CMAKE_SHARED_MODULE_SUFFIX == "${CMAKE_SHARED_MODULE_SUFFIX}" + + +CMAKE_DL_LIBS == "${CMAKE_DL_LIBS}" +CMAKE_LIBRARY_PATH_FLAG == "${CMAKE_LIBRARY_PATH_FLAG}" +CMAKE_LINK_LIBRARY_FLAG == "${CMAKE_LINK_LIBRARY_FLAG}" +CMAKE_SKIP_RPATH == "${CMAKE_SKIP_RPATH}" +CMAKE_SYSTEM_INFO_FILE == "${CMAKE_SYSTEM_INFO_FILE}" +CMAKE_SYSTEM_NAME == "${CMAKE_SYSTEM_NAME}" +CMAKE_SYSTEM == "${CMAKE_SYSTEM}" +CMAKE_CXX_COMPILER == "${CMAKE_CXX_COMPILER}" +CMAKE_C_COMPILER == "${CMAKE_C_COMPILER}" +CMAKE_COMPILER_IS_GNUCC == "${CMAKE_COMPILER_IS_GNUCC}" +CMAKE_COMPILER_IS_GNUCXX == "${CMAKE_COMPILER_IS_GNUCXX}" + +// C shared library flag +CMAKE_SHARED_LIBRARY_C_FLAGS == "${CMAKE_SHARED_LIBRARY_C_FLAGS}" +CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS == "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}" +CMAKE_SHARED_LIBRARY_LINK_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_FLAGS}" +CMAKE_SHARED_LIBRARY_RUNTIME_FLAG == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG}" +CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP == "${CMAKE_SHARED_LIBRARY_RUNTIME_FLAG_SEP}" +CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATIC_C_FLAGS}" +CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_C_FLAGS}" + +// C shared module flags +CMAKE_SHARED_MODULE_C_FLAGS == "${CMAKE_SHARED_MODULE_C_FLAGS}" +CMAKE_SHARED_MODULE_CREATE_C_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS}" +CMAKE_SHARED_MODULE_RUNTIME_FLAG == "${CMAKE_SHARED_MODULE_RUNTIME_FLAG}" +CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP == "${CMAKE_SHARED_MODULE_RUNTIME_FLAG_SEP}" +CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS == "${CMAKE_SHARED_MODULE_LINK_STATIC_C_FLAGS}" +CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS == "${CMAKE_SHARED_MODULE_LINK_DYNAMIC_C_FLAGS}" + +// C exe flags +CMAKE_EXE_LINK_STATIC_C_FLAGS == "${CMAKE_EXE_LINK_STATIC_C_FLAGS}" +CMAKE_EXE_LINK_DYNAMIC_C_FLAGS == "${CMAKE_EXE_LINK_DYNAMIC_C_FLAGS}" + +// CXX shared library flags +CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" +CMAKE_SHARED_LIBRARY_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}" +CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}" +CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG == "${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG}" +CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP == "${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP}" +CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_STATIC_CXX_FLAGS}" +CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_SHARED_LIBRARY_LINK_DYNAMIC_CXX_FLAGS}" + +// CXX shared module flags +CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS == "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS}" +CMAKE_SHARED_MODULE_CXX_FLAGS == "${CMAKE_SHARED_MODULE_CXX_FLAGS}" +CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG == "${CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG}" +CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP == "${CMAKE_SHARED_MODULE_RUNTIME_CXX_FLAG_SEP}" +CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS == "${CMAKE_SHARED_MODULE_LINK_STATIC_CXX_FLAGS}" +CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_SHARED_MODULE_LINK_DYNAMIC_CXX_FLAGS}" + +// CXX exe flags +CMAKE_EXE_LINK_STATIC_CXX_FLAGS == "${CMAKE_EXE_LINK_STATIC_CXX_FLAGS}" +CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS == "${CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS}" + +CMAKE_USER_MAKE_RULES_OVERRIDE == "${CMAKE_USER_MAKE_RULES_OVERRIDE}" +CMAKE_VERBOSE_MAKEFILE == "${CMAKE_VERBOSE_MAKEFILE}" +CMAKE_BUILD_TYPE == "${CMAKE_BUILD_TYPE}" +CMAKE_CXX_FLAGS == "${CMAKE_CXX_FLAGS}" +CMAKE_CXX_FLAGS_DEBUG == "${CMAKE_CXX_FLAGS_DEBUG}" +CMAKE_CXX_FLAGS_MINSIZEREL == "${CMAKE_CXX_FLAGS_MINSIZEREL}" +CMAKE_CXX_FLAGS_RELEASE == "${CMAKE_CXX_FLAGS_RELEASE}" +CMAKE_CXX_FLAGS_RELWITHDEBINFO == "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" + +CMAKE_C_FLAGS == "${CMAKE_C_FLAGS}" +CMAKE_C_FLAGS_DEBUG == "${CMAKE_C_FLAGS_DEBUG}" +CMAKE_C_FLAGS_MINSIZEREL == "${CMAKE_C_FLAGS_MINSIZEREL}" +CMAKE_C_FLAGS_RELEASE == "${CMAKE_C_FLAGS_RELEASE}" +CMAKE_C_FLAGS_RELWITHDEBINFO == "${CMAKE_C_FLAGS_RELWITHDEBINFO}" + +// build rules +CMAKE_CXX_CREATE_SHARED_LIBRARY == "${CMAKE_CXX_CREATE_SHARED_LIBRARY}" +CMAKE_CXX_CREATE_SHARED_MODULE == "${CMAKE_CXX_CREATE_SHARED_MODULE}" +CMAKE_C_CREATE_SHARED_LIBRARY == "${CMAKE_C_CREATE_SHARED_LIBRARY}" +CMAKE_C_CREATE_SHARED_MODULE == "${CMAKE_C_CREATE_SHARED_MODULE}" +CMAKE_CXX_CREATE_STATIC_LIBRARY == "${CMAKE_CXX_CREATE_STATIC_LIBRARY}" +CMAKE_C_CREATE_STATIC_LIBRARY == "${CMAKE_C_CREATE_STATIC_LIBRARY}" +CMAKE_CXX_COMPILE_OBJECT == "${CMAKE_CXX_COMPILE_OBJECT}" +CMAKE_C_COMPILE_OBJECT == "${CMAKE_C_COMPILE_OBJECT}" +CMAKE_C_LINK_EXECUTABLE == "${CMAKE_C_LINK_EXECUTABLE}" +CMAKE_CXX_LINK_EXECUTABLE == "${CMAKE_CXX_LINK_EXECUTABLE}" diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake new file mode 100644 index 000000000..ffc3a0cda --- /dev/null +++ b/Modules/TestBigEndian.cmake @@ -0,0 +1,99 @@ +# - Define macro to determine endian type +# Check if the system is big endian or little endian +# TEST_BIG_ENDIAN(VARIABLE) +# VARIABLE - variable to store the result to +# + +MACRO(TEST_BIG_ENDIAN VARIABLE) + IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + MESSAGE(STATUS "Check if the system is big endian") + MESSAGE(STATUS "Searching 16 bit integer") + + INCLUDE(CheckTypeSize) + + CHECK_TYPE_SIZE("unsigned short" CMAKE_SIZEOF_UNSIGNED_SHORT) + IF(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2) + MESSAGE(STATUS "Using unsigned short") + SET(CMAKE_16BIT_TYPE "unsigned short") + ELSE(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2) + CHECK_TYPE_SIZE("unsigned int" CMAKE_SIZEOF_UNSIGNED_INT) + IF(CMAKE_SIZEOF_UNSIGNED_INT) + MESSAGE(STATUS "Using unsigned int") + SET(CMAKE_16BIT_TYPE "unsigned int") + + ELSE(CMAKE_SIZEOF_UNSIGNED_INT) + + CHECK_TYPE_SIZE("unsigned long" CMAKE_SIZEOF_UNSIGNED_LONG) + IF(CMAKE_SIZEOF_UNSIGNED_LONG) + MESSAGE(STATUS "Using unsigned long") + SET(CMAKE_16BIT_TYPE "unsigned long") + ELSE(CMAKE_SIZEOF_UNSIGNED_LONG) + MESSAGE(FATAL_ERROR "no suitable type found") + ENDIF(CMAKE_SIZEOF_UNSIGNED_LONG) + + ENDIF(CMAKE_SIZEOF_UNSIGNED_INT) + + ENDIF(CMAKE_SIZEOF_UNSIGNED_SHORT EQUAL 2) + + + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/TestEndianess.c.in" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c" + IMMEDIATE @ONLY) + + FILE(READ "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c" + TEST_ENDIANESS_FILE_CONTENT) + + TRY_COMPILE(HAVE_${VARIABLE} + "${CMAKE_BINARY_DIR}" + "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/TestEndianess.c" + OUTPUT_VARIABLE OUTPUT + COPY_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" ) + + IF(HAVE_${VARIABLE}) + + FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" + CMAKE_TEST_ENDIANESS_STRINGS_LE LIMIT_COUNT 1 REGEX "THIS IS LITTLE ENDIAN") + + FILE(STRINGS "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/TestEndianess.bin" + CMAKE_TEST_ENDIANESS_STRINGS_BE LIMIT_COUNT 1 REGEX "THIS IS BIG ENDIAN") + + # on mac, if there are universal binaries built both will be true + # return the result depending on the machine on which cmake runs + IF(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE) + IF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc) + SET(CMAKE_TEST_ENDIANESS_STRINGS_BE TRUE) + SET(CMAKE_TEST_ENDIANESS_STRINGS_LE FALSE) + ELSE(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc) + SET(CMAKE_TEST_ENDIANESS_STRINGS_BE FALSE) + SET(CMAKE_TEST_ENDIANESS_STRINGS_LE TRUE) + ENDIF(CMAKE_SYSTEM_PROCESSOR MATCHES powerpc) + MESSAGE(STATUS "TEST_BIG_ENDIAN found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !") + ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_BE AND CMAKE_TEST_ENDIANESS_STRINGS_LE) + + IF(CMAKE_TEST_ENDIANESS_STRINGS_LE) + SET(${VARIABLE} 0 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE) + MESSAGE(STATUS "Check if the system is big endian - little endian") + ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_LE) + + IF(CMAKE_TEST_ENDIANESS_STRINGS_BE) + SET(${VARIABLE} 1 CACHE INTERNAL "Result of TEST_BIG_ENDIAN" FORCE) + MESSAGE(STATUS "Check if the system is big endian - big endian") + ENDIF(CMAKE_TEST_ENDIANESS_STRINGS_BE) + + IF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE) + MESSAGE(SEND_ERROR "TEST_BIG_ENDIAN found no result!") + ENDIF(NOT CMAKE_TEST_ENDIANESS_STRINGS_BE AND NOT CMAKE_TEST_ENDIANESS_STRINGS_LE) + + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the system is big endian passed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") + + ELSE(HAVE_${VARIABLE}) + MESSAGE(STATUS "Check if the system is big endian - failed") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the system is big endian failed with the following output:\n${OUTPUT}\nTestEndianess.c:\n${TEST_ENDIANESS_FILE_CONTENT}\n\n") + SET(${VARIABLE}) + ENDIF(HAVE_${VARIABLE}) + ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") +ENDMACRO(TEST_BIG_ENDIAN) + + diff --git a/Modules/TestCXXAcceptsFlag.cmake b/Modules/TestCXXAcceptsFlag.cmake new file mode 100755 index 000000000..2242dcf20 --- /dev/null +++ b/Modules/TestCXXAcceptsFlag.cmake @@ -0,0 +1,30 @@ +# - Test CXX compiler for a flag +# Check if the CXX compiler accepts a flag +# +# Macro CHECK_CXX_ACCEPTS_FLAG(FLAGS VARIABLE) - +# checks if the function exists +# FLAGS - the flags to try +# VARIABLE - variable to store the result +# + +MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE) + IF(NOT DEFINED ${VARIABLE}) + MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS}") + TRY_COMPILE(${VARIABLE} + ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/DummyCXXFile.cxx + CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${FLAGS} + OUTPUT_VARIABLE OUTPUT) + IF(${VARIABLE}) + MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - yes") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the CXX compiler accepts the flag ${FLAGS} passed with " + "the following output:\n${OUTPUT}\n\n") + ELSE(${VARIABLE}) + MESSAGE(STATUS "Checking to see if CXX compiler accepts flag ${FLAGS} - no") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the CXX compiler accepts the flag ${FLAGS} failed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF(${VARIABLE}) + ENDIF(NOT DEFINED ${VARIABLE}) +ENDMACRO(CHECK_CXX_ACCEPTS_FLAG) diff --git a/Modules/TestEndianess.c.in b/Modules/TestEndianess.c.in new file mode 100644 index 000000000..68094d4ac --- /dev/null +++ b/Modules/TestEndianess.c.in @@ -0,0 +1,20 @@ +/* A 16 bit integer is required. */ +typedef @CMAKE_16BIT_TYPE@ cmakeint16; + +/* On a little endian machine, these 16bit ints will give "THIS IS LITTLE ENDIAN." + On a big endian machine the characters will be exchanged pairwise. */ +const cmakeint16 info_little[] = {0x4854, 0x5349, 0x4920, 0x2053, 0x494c, 0x5454, 0x454c, 0x4520, 0x444e, 0x4149, 0x2e4e, 0x0000}; + +/* on a big endian machine, these 16bit ints will give "THIS IS BIG ENDIAN." + On a little endian machine the characters will be exchanged pairwise. */ +const cmakeint16 info_big[] = {0x5448, 0x4953, 0x2049, 0x5320, 0x4249, 0x4720, 0x454e, 0x4449, 0x414e, 0x2e2e, 0x0000}; + +#ifdef __CLASSIC_C__ +int main(){ + int ac; + char*av[]; +#else +int main(int ac, char*av[]){ +#endif + return (&info_little[0] != &info_big[0]); +} diff --git a/Modules/TestForANSIForScope.cmake b/Modules/TestForANSIForScope.cmake new file mode 100644 index 000000000..5d27bb421 --- /dev/null +++ b/Modules/TestForANSIForScope.cmake @@ -0,0 +1,31 @@ +# - Check for ANSI for scope support +# Check if the compiler supports std:: on stl classes. +# CMAKE_NO_ANSI_FOR_SCOPE - holds result +# + +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} + ${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx + OUTPUT_VARIABLE OUTPUT) + IF (CMAKE_ANSI_FOR_SCOPE) + MESSAGE(STATUS "Check for ANSI scope - found") + SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL + "Does the compiler support ansi for scope.") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the CXX compiler understands ansi for scopes passed with " + "the following output:\n${OUTPUT}\n\n") + ELSE (CMAKE_ANSI_FOR_SCOPE) + MESSAGE(STATUS "Check for ANSI scope - not found") + SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL + "Does the compiler support ansi for scope.") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the CXX compiler understands ansi for scopes failed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF (CMAKE_ANSI_FOR_SCOPE) +ENDIF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$") + + + + + diff --git a/Modules/TestForANSIStreamHeaders.cmake b/Modules/TestForANSIStreamHeaders.cmake new file mode 100644 index 000000000..e3d4483b2 --- /dev/null +++ b/Modules/TestForANSIStreamHeaders.cmake @@ -0,0 +1,20 @@ +# - Test for compiler support of ANSI stream headers iostream, etc. +# check if we they have the standard ansi stream files (without the .h) +# CMAKE_NO_ANSI_STREAM_HEADERS - defined by the results +# +INCLUDE(CheckIncludeFileCXX) + +IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) + CHECK_INCLUDE_FILE_CXX(iostream CMAKE_ANSI_STREAM_HEADERS) + IF (CMAKE_ANSI_STREAM_HEADERS) + SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL + "Does the compiler support headers like iostream.") + ELSE (CMAKE_ANSI_STREAM_HEADERS) + SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL + "Does the compiler support headers like iostream.") + ENDIF (CMAKE_ANSI_STREAM_HEADERS) + + MARK_AS_ADVANCED(CMAKE_NO_ANSI_STREAM_HEADERS) +ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS) + + diff --git a/Modules/TestForANSIStreamHeaders.cxx b/Modules/TestForANSIStreamHeaders.cxx new file mode 100644 index 000000000..cfb768608 --- /dev/null +++ b/Modules/TestForANSIStreamHeaders.cxx @@ -0,0 +1,6 @@ +#include + +int main(int,char *[]) +{ + return 0; +} diff --git a/Modules/TestForAnsiForScope.cxx b/Modules/TestForAnsiForScope.cxx new file mode 100644 index 000000000..f2ec76077 --- /dev/null +++ b/Modules/TestForAnsiForScope.cxx @@ -0,0 +1,7 @@ +int main(int, char*[]) +{ + int i; + for(int i=0; i < 1; ++i); + (void)i; + return 0; +} diff --git a/Modules/TestForSSTREAM.cmake b/Modules/TestForSSTREAM.cmake new file mode 100755 index 000000000..1884bf24d --- /dev/null +++ b/Modules/TestForSSTREAM.cmake @@ -0,0 +1,29 @@ +# # - Test for std:: namespace support +# check if the compiler supports std:: on stl classes +# CMAKE_NO_ANSI_STRING_STREAM - defined by the results +# +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} + ${CMAKE_ROOT}/Modules/TestForSSTREAM.cxx + OUTPUT_VARIABLE OUTPUT) + IF (CMAKE_HAS_ANSI_STRING_STREAM) + MESSAGE(STATUS "Check for sstream - found") + SET (CMAKE_NO_ANSI_STRING_STREAM 0 CACHE INTERNAL + "Does the compiler support sstream") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the CXX compiler has sstream passed with " + "the following output:\n${OUTPUT}\n\n") + ELSE (CMAKE_HAS_ANSI_STRING_STREAM) + MESSAGE(STATUS "Check for sstream - not found") + SET (CMAKE_NO_ANSI_STRING_STREAM 1 CACHE INTERNAL + "Does the compiler support sstream") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the CXX compiler has sstream failed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF (CMAKE_HAS_ANSI_STRING_STREAM) +ENDIF("CMAKE_HAS_ANSI_STRING_STREAM" MATCHES "^CMAKE_HAS_ANSI_STRING_STREAM$") + + + + diff --git a/Modules/TestForSSTREAM.cxx b/Modules/TestForSSTREAM.cxx new file mode 100755 index 000000000..af4a4bbef --- /dev/null +++ b/Modules/TestForSSTREAM.cxx @@ -0,0 +1,11 @@ +#include +int main(int, char*[]) +{ + std::ostringstream os; + os << "12345"; + if(os.str().size() == 5) + { + return 0; + } + return -1; +} diff --git a/Modules/TestForSTDNamespace.cmake b/Modules/TestForSTDNamespace.cmake new file mode 100644 index 000000000..58d2ff36c --- /dev/null +++ b/Modules/TestForSTDNamespace.cmake @@ -0,0 +1,29 @@ +# - Test for std:: namespace support +# check if the compiler supports std:: on stl classes +# CMAKE_NO_STD_NAMESPACE - defined by the results +# +IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$") + MESSAGE(STATUS "Check for STD namespace") + TRY_COMPILE(CMAKE_STD_NAMESPACE ${CMAKE_BINARY_DIR} + ${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx + OUTPUT_VARIABLE OUTPUT) + IF (CMAKE_STD_NAMESPACE) + MESSAGE(STATUS "Check for STD namespace - found") + SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL + "Does the compiler support std::.") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if the CXX compiler has std namespace passed with " + "the following output:\n${OUTPUT}\n\n") + ELSE (CMAKE_STD_NAMESPACE) + MESSAGE(STATUS "Check for STD namespace - not found") + SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL + "Does the compiler support std::.") + FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if the CXX compiler has std namespace failed with " + "the following output:\n${OUTPUT}\n\n") + ENDIF (CMAKE_STD_NAMESPACE) +ENDIF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$") + + + + diff --git a/Modules/TestForSTDNamespace.cxx b/Modules/TestForSTDNamespace.cxx new file mode 100644 index 000000000..fc3ac5911 --- /dev/null +++ b/Modules/TestForSTDNamespace.cxx @@ -0,0 +1,6 @@ +#include +int main(int, char*[]) +{ + std::list(); + return 0; +} diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake new file mode 100644 index 000000000..73d3f2a1e --- /dev/null +++ b/Modules/UseEcos.cmake @@ -0,0 +1,223 @@ +# - This module defines variables and macros required to build eCos application. +# This file contains the following macros: +# ECOS_ADD_INCLUDE_DIRECTORIES() - add the eCos include dirs +# ECOS_ADD_EXECUTABLE(name source1 ... sourceN ) - create an eCos executable +# ECOS_ADJUST_DIRECTORY(VAR source1 ... sourceN ) - adjusts the path of the source files and puts the result into VAR +# +# Macros for selecting the toolchain: +# ECOS_USE_ARM_ELF_TOOLS() - enable the ARM ELF toolchain for the directory where it is called +# ECOS_USE_I386_ELF_TOOLS() - enable the i386 ELF toolchain for the directory where it is called +# ECOS_USE_PPC_EABI_TOOLS() - enable the PowerPC toolchain for the directory where it is called +# +# It contains the following variables: +# ECOS_DEFINITIONS +# ECOSCONFIG_EXECUTABLE +# ECOS_CONFIG_FILE - defaults to ecos.ecc, if your eCos configuration file has a different name, adjust this variable +# for internal use only: +# ECOS_ADD_TARGET_LIB + +# first check that ecosconfig is available +FIND_PROGRAM(ECOSCONFIG_EXECUTABLE NAMES ecosconfig) +IF(NOT ECOSCONFIG_EXECUTABLE) + MESSAGE(SEND_ERROR "ecosconfig was not found. Either include it in the system path or set it manually using ccmake.") +ELSE(NOT ECOSCONFIG_EXECUTABLE) + MESSAGE(STATUS "Found ecosconfig: ${ECOSCONFIG_EXECUTABLE}") +ENDIF(NOT ECOSCONFIG_EXECUTABLE) + +# check that ECOS_REPOSITORY is set correctly +IF (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db) + MESSAGE(SEND_ERROR "The environment variable ECOS_REPOSITORY is not set correctly. Set it to the directory which contains the file ecos.db") +ELSE (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db) + MESSAGE(STATUS "ECOS_REPOSITORY is set to $ENV{ECOS_REPOSITORY}") +ENDIF (NOT EXISTS $ENV{ECOS_REPOSITORY}/ecos.db) + +# check that tclsh (coming with TCL) is available, otherwise ecosconfig doesn't work +FIND_PACKAGE(Tclsh) +IF (NOT TCL_TCLSH) + MESSAGE(SEND_ERROR "The TCL tclsh was not found. Please install TCL, it is required for building eCos applications.") +ELSE (NOT TCL_TCLSH) + MESSAGE(STATUS "tlcsh found: ${TCL_TCLSH}") +ENDIF (NOT TCL_TCLSH) + +#add the globale include-diretories +#usage: ECOS_ADD_INCLUDE_DIRECTORIES() +MACRO(ECOS_ADD_INCLUDE_DIRECTORIES) +#check for ProjectSources.txt one level higher + IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../) + ELSE (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/) + ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../ProjectSources.txt) + +#the ecos include directory + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/ecos/install/include/) + +ENDMACRO(ECOS_ADD_INCLUDE_DIRECTORIES) + + +#we want to compile for the xscale processor, in this case the following macro has to be called +#usage: ECOS_USE_ARM_ELF_TOOLS() +MACRO (ECOS_USE_ARM_ELF_TOOLS) + SET(CMAKE_CXX_COMPILER "arm-elf-c++") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + SET(CMAKE_C_COMPILER "arm-elf-gcc") + SET(CMAKE_AR "arm-elf-ar") + SET(CMAKE_RANLIB "arm-elf-ranlib") +#for linking + SET(ECOS_LD_MCPU "-mcpu=xscale") +#for compiling + ADD_DEFINITIONS(-mcpu=xscale -mapcs-frame) +#for the obj-tools + SET(ECOS_ARCH_PREFIX "arm-elf-") +ENDMACRO (ECOS_USE_ARM_ELF_TOOLS) + +#usage: ECOS_USE_PPC_EABI_TOOLS() +MACRO (ECOS_USE_PPC_EABI_TOOLS) + SET(CMAKE_CXX_COMPILER "powerpc-eabi-c++") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + SET(CMAKE_C_COMPILER "powerpc-eabi-gcc") + SET(CMAKE_AR "powerpc-eabi-ar") + SET(CMAKE_RANLIB "powerpc-eabi-ranlib") +#for linking + SET(ECOS_LD_MCPU "") +#for compiling + ADD_DEFINITIONS() +#for the obj-tools + SET(ECOS_ARCH_PREFIX "powerpc-eabi-") +ENDMACRO (ECOS_USE_PPC_EABI_TOOLS) + +#usage: ECOS_USE_I386_ELF_TOOLS() +MACRO (ECOS_USE_I386_ELF_TOOLS) + SET(CMAKE_CXX_COMPILER "i386-elf-c++") + SET(CMAKE_COMPILER_IS_GNUCXX 1) + SET(CMAKE_C_COMPILER "i386-elf-gcc") + SET(CMAKE_AR "i386-elf-ar") + SET(CMAKE_RANLIB "i386-elf-ranlib") +#for linking + SET(ECOS_LD_MCPU "") +#for compiling + ADD_DEFINITIONS() +#for the obj-tools + SET(ECOS_ARCH_PREFIX "i386-elf-") +ENDMACRO (ECOS_USE_I386_ELF_TOOLS) + + +#since the actual sources are located one level upwards +#a "../" has to be prepended in front of every source file +#call the following macro to achieve this, the first parameter +#is the name of the new list of source files with adjusted paths, +#followed by all source files +#usage: ECOS_ADJUST_DIRECTORY(adjusted_SRCS ${my_srcs}) +MACRO(ECOS_ADJUST_DIRECTORY _target_FILES ) + FOREACH (_current_FILE ${ARGN}) + GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE) + IF (NOT ${_abs_FILE} STREQUAL ${_current_FILE}) + GET_FILENAME_COMPONENT(_abs_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../${_current_FILE} ABSOLUTE) + ENDIF (NOT ${_abs_FILE} STREQUAL ${_current_FILE}) + LIST(APPEND ${_target_FILES} ${_abs_FILE}) + ENDFOREACH (_current_FILE) +ENDMACRO(ECOS_ADJUST_DIRECTORY) + +# the default ecos config file name +# maybe in the future also out-of-source builds may be possible +SET(ECOS_CONFIG_FILE ecos.ecc) + +#creates the dependancy from all source files on the ecos target.ld, +#adds the command for compiling ecos +MACRO(ECOS_ADD_TARGET_LIB) +# when building out-of-source, create the ecos/ subdir + IF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos) + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ecos) + ENDIF(NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ecos) + +#sources depend on target.ld + SET_SOURCE_FILES_PROPERTIES( + ${ARGN} + PROPERTIES + OBJECT_DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld + ) + + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld + COMMAND sh -c \"make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos || exit -1\; if [ -e ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld ] \; then touch ${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib/target.ld\; fi\" + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile + ) + + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile + COMMAND sh -c \" cd ${CMAKE_CURRENT_BINARY_DIR}/ecos\; ${ECOSCONFIG_EXECUTABLE} --config=${CMAKE_CURRENT_SOURCE_DIR}/ecos/${ECOS_CONFIG_FILE} tree || exit -1\;\" + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ecos/${ECOS_CONFIG_FILE} + ) + + ADD_CUSTOM_TARGET( ecos make -C ${CMAKE_CURRENT_BINARY_DIR}/ecos/ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ecos/makefile ) +ENDMACRO(ECOS_ADD_TARGET_LIB) + +# get the directory of the current file, used later on in the file +GET_FILENAME_COMPONENT( ECOS_CMAKE_MODULE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH) + +#macro for creating an executable ecos application +#the first parameter is the name of the executable, +#the second is the list of all source files (where the path +#has been adjusted beforehand by calling ECOS_ADJUST_DIRECTORY() +#usage: ECOS_ADD_EXECUTABLE(my_app ${adjusted_SRCS}) +MACRO(ECOS_ADD_EXECUTABLE _exe_NAME ) + #definitions, valid for all ecos projects + #the optimization and "-g" for debugging has to be enabled + #in the project-specific CMakeLists.txt + ADD_DEFINITIONS(-D__ECOS__=1 -D__ECOS=1) + SET(ECOS_DEFINITIONS -Wall -Wno-long-long -pipe -fno-builtin) + +#the executable depends on ecos target.ld + ECOS_ADD_TARGET_LIB(${ARGN}) + +# when using nmake makefiles, the custom buildtype supresses the default cl.exe flags +# and the rules for creating objects are adjusted for gcc + SET(CMAKE_BUILD_TYPE CUSTOM_ECOS_BUILD) + SET(CMAKE_C_COMPILE_OBJECT " -o -c ") + SET(CMAKE_CXX_COMPILE_OBJECT " -o -c ") +# special link commands for ecos-executables + SET(CMAKE_CXX_LINK_EXECUTABLE " -o ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}") + SET(CMAKE_C_LINK_EXECUTABLE " -o ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}") +# some strict compiler flags + SET (CMAKE_C_FLAGS "-Wstrict-prototypes") + SET (CMAKE_CXX_FLAGS "-Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions") + + ADD_EXECUTABLE(${_exe_NAME} ${ARGN}) + SET_TARGET_PROPERTIES(${_exe_NAME} PROPERTIES SUFFIX ".elf") + +#create a binary file + ADD_CUSTOM_COMMAND( + TARGET ${_exe_NAME} + POST_BUILD + COMMAND ${ECOS_ARCH_PREFIX}objcopy + ARGS -O binary ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.bin + ) + +#and an srec file + ADD_CUSTOM_COMMAND( + TARGET ${_exe_NAME} + POST_BUILD + COMMAND ${ECOS_ARCH_PREFIX}objcopy + ARGS -O srec ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.srec + ) + +#add the created files to the clean-files + SET_DIRECTORY_PROPERTIES( + PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.bin;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.srec;${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst;" + ) + + ADD_CUSTOM_TARGET(ecosclean ${CMAKE_COMMAND} -DECOS_DIR=${CMAKE_CURRENT_BINARY_DIR}/ecos/ -P ${ECOS_CMAKE_MODULE_DIR}/ecos_clean.cmake ) + ADD_CUSTOM_TARGET(normalclean ${CMAKE_MAKE_PROGRAM} clean WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + ADD_DEPENDENCIES (ecosclean normalclean) + + + ADD_CUSTOM_TARGET( listing + COMMAND echo -e \"\\n--- Symbols sorted by address ---\\n\" > ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst + COMMAND ${ECOS_ARCH_PREFIX}nm -S -C -n ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst + COMMAND echo -e \"\\n--- Symbols sorted by size ---\\n\" >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst + COMMAND ${ECOS_ARCH_PREFIX}nm -S -C -r --size-sort ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst + COMMAND echo -e \"\\n--- Full assembly listing ---\\n\" >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst + COMMAND ${ECOS_ARCH_PREFIX}objdump -S -x -d -C ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.elf >> ${CMAKE_CURRENT_BINARY_DIR}/${_exe_NAME}.lst ) + +ENDMACRO(ECOS_ADD_EXECUTABLE) + diff --git a/Modules/UsePkgConfig.cmake b/Modules/UsePkgConfig.cmake new file mode 100644 index 000000000..23519e80e --- /dev/null +++ b/Modules/UsePkgConfig.cmake @@ -0,0 +1,57 @@ +# - obsolete pkg-config module for CMake +# +# Defines the following macros: +# +# PKGCONFIG(package includedir libdir linkflags cflags) +# +# Calling PKGCONFIG will fill the desired information into the 4 given arguments, +# e.g. PKGCONFIG(libart-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS) +# if pkg-config was NOT found or the specified software package doesn't exist, the +# variable will be empty when the function returns, otherwise they will contain the respective information +# + + + +FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/local/bin ) + +MACRO(PKGCONFIG _package _include_DIR _link_DIR _link_FLAGS _cflags) + message(STATUS + "WARNING: you are using the obsolete 'PKGCONFIG' macro use FindPkgConfig") +# reset the variables at the beginning + SET(${_include_DIR}) + SET(${_link_DIR}) + SET(${_link_FLAGS}) + SET(${_cflags}) + + # if pkg-config has been found + IF(PKGCONFIG_EXECUTABLE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + + # and if the package of interest also exists for pkg-config, then get the information + IF(NOT _return_VALUE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir + OUTPUT_VARIABLE ${_include_DIR} ) + string(REGEX REPLACE "[\r\n]" " " ${_include_DIR} "${${_include_DIR}}") + + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir + OUTPUT_VARIABLE ${_link_DIR} ) + string(REGEX REPLACE "[\r\n]" " " ${_link_DIR} "${${_link_DIR}}") + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs + OUTPUT_VARIABLE ${_link_FLAGS} ) + string(REGEX REPLACE "[\r\n]" " " ${_link_FLAGS} "${${_link_FLAGS}}") + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags + OUTPUT_VARIABLE ${_cflags} ) + string(REGEX REPLACE "[\r\n]" " " ${_cflags} "${${_cflags}}") + + ENDIF(NOT _return_VALUE) + + ENDIF(PKGCONFIG_EXECUTABLE) + +ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) + +MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE) diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake new file mode 100755 index 000000000..1a6071446 --- /dev/null +++ b/Modules/UseQt4.cmake @@ -0,0 +1,70 @@ +# - Use Module for QT4 +# Sets up C and C++ to use Qt 4. It is assumed that FindQt.cmake +# has already been loaded. See FindQt.cmake for information on +# how to load Qt 4 into your CMake project. + + +ADD_DEFINITIONS(${QT_DEFINITIONS}) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG QT_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE QT_NO_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG) +SET_PROPERTY(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG) + +INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR}) + +SET(QT_LIBRARIES "") + +IF (QT_USE_QTMAIN) + IF (WIN32) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_QTMAIN_LIBRARY}) + ENDIF (WIN32) +ENDIF (QT_USE_QTMAIN) + +IF(QT_DONT_USE_QTGUI) + SET(QT_USE_QTGUI 0) +ELSE(QT_DONT_USE_QTGUI) + SET(QT_USE_QTGUI 1) +ENDIF(QT_DONT_USE_QTGUI) + +IF(QT_DONT_USE_QTCORE) + SET(QT_USE_QTCORE 0) +ELSE(QT_DONT_USE_QTCORE) + SET(QT_USE_QTCORE 1) +ENDIF(QT_DONT_USE_QTCORE) + +IF (QT_USE_QT3SUPPORT) + ADD_DEFINITIONS(-DQT3_SUPPORT) +ENDIF (QT_USE_QT3SUPPORT) + +# list dependent modules, so their modules are automatically on +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_PHONON_MODULE_DEPENDS QTGUI QTDBUS QTCORE) +SET(QT_QTDBUS_MODULE_DEPENDS QTXML QTCORE) +SET(QT_QTXMLPATTERNS_MODULE_DEPENDS QTNETWORK QTCORE) + +# Qt modules (in order of dependence) +FOREACH(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN + QTSCRIPT QTSVG QTUITOOLS QTHELP QTWEBKIT PHONON QTGUI QTTEST + QTDBUS QTXML QTSQL QTXMLPATTERNS QTNETWORK QTCORE) + + IF (QT_USE_${module}) + IF (QT_${module}_FOUND) + IF(QT_USE_${module}) + STRING(REPLACE "QT" "" qt_module_def "${module}") + ADD_DEFINITIONS(-DQT_${qt_module_def}_LIB) + INCLUDE_DIRECTORIES(${QT_${module}_INCLUDE_DIR}) + ENDIF(QT_USE_${module}) + SET(QT_LIBRARIES ${QT_LIBRARIES} ${QT_${module}_LIBRARY} ${QT_${module}_LIB_DEPENDENCIES}) + FOREACH(depend_module ${QT_${module}_MODULE_DEPENDS}) + SET(QT_USE_${depend_module} 1) + ENDFOREACH(depend_module ${QT_${module}_MODULE_DEPENDS}) + ELSE (QT_${module}_FOUND) + MESSAGE("Qt ${module} library not found.") + ENDIF (QT_${module}_FOUND) + ENDIF (QT_USE_${module}) + +ENDFOREACH(module) + diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake new file mode 100644 index 000000000..5499f84f8 --- /dev/null +++ b/Modules/UseSWIG.cmake @@ -0,0 +1,207 @@ +# - SWIG module for CMake +# Defines the following macros: +# SWIG_ADD_MODULE(name language [ files ]) +# - Define swig module with given name and specified language +# SWIG_LINK_LIBRARIES(name [ libraries ]) +# - Link libraries to swig module +# All other macros are for internal use only. +# To get the actual name of the swig module, +# use: ${SWIG_MODULE_name_REAL_NAME}. +# Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify +# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add +# special flags to all swig calls. +# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify +# where to write all the swig generated module (swig -outdir option) +# The name-specific variable SWIG_MODULE__EXTRA_DEPS may be used +# to specify extra dependencies for the generated modules. + +SET(SWIG_CXX_EXTENSION "cxx") +SET(SWIG_EXTRA_LIBRARIES "") + +SET(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py") + +# +# For given swig module initialize variables associated with it +# +MACRO(SWIG_MODULE_INITIALIZE name language) + STRING(TOUPPER "${language}" swig_uppercase_language) + STRING(TOLOWER "${language}" swig_lowercase_language) + SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}") + SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}") + + IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$") + MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found") + ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$") + + SET(SWIG_MODULE_${name}_REAL_NAME "${name}") + IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$") + SET(SWIG_MODULE_${name}_REAL_NAME "_${name}") + ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$") + IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$") + SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow") + ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$") +ENDMACRO(SWIG_MODULE_INITIALIZE) + +# +# For a given language, input file, and output file, determine extra files that +# will be generated. This is internal swig macro. +# + +MACRO(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile) + GET_SOURCE_FILE_PROPERTY(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename + ${infile} SWIG_MODULE_NAME) + IF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") + GET_FILENAME_COMPONENT(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE) + ENDIF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND") + FOREACH(it ${SWIG_${language}_EXTRA_FILE_EXTENSION}) + SET(${outfiles} ${${outfiles}} + "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}") + ENDFOREACH(it) +ENDMACRO(SWIG_GET_EXTRA_OUTPUT_FILES) + +# +# Take swig (*.i) file and add proper custom commands for it +# +MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile) + SET(swig_full_infile ${infile}) + GET_FILENAME_COMPONENT(swig_source_file_path "${infile}" PATH) + GET_FILENAME_COMPONENT(swig_source_file_name_we "${infile}" NAME_WE) + GET_SOURCE_FILE_PROPERTY(swig_source_file_generated ${infile} GENERATED) + GET_SOURCE_FILE_PROPERTY(swig_source_file_cplusplus ${infile} CPLUSPLUS) + GET_SOURCE_FILE_PROPERTY(swig_source_file_flags ${infile} SWIG_FLAGS) + IF("${swig_source_file_flags}" STREQUAL "NOTFOUND") + SET(swig_source_file_flags "") + ENDIF("${swig_source_file_flags}" STREQUAL "NOTFOUND") + SET(swig_source_file_fullname "${infile}") + IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") + STRING(REGEX REPLACE + "^${CMAKE_CURRENT_SOURCE_DIR}" "" + swig_source_file_relative_path + "${swig_source_file_path}") + ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") + IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") + STRING(REGEX REPLACE + "^${CMAKE_CURRENT_BINARY_DIR}" "" + swig_source_file_relative_path + "${swig_source_file_path}") + SET(swig_source_file_generated 1) + ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") + SET(swig_source_file_relative_path "${swig_source_file_path}") + IF(swig_source_file_generated) + SET(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}") + ELSE(swig_source_file_generated) + SET(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}") + ENDIF(swig_source_file_generated) + ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}") + ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}") + + SET(swig_generated_file_fullname + "${CMAKE_CURRENT_BINARY_DIR}") + IF(swig_source_file_relative_path) + SET(swig_generated_file_fullname + "${swig_generated_file_fullname}/${swig_source_file_relative_path}") + ENDIF(swig_source_file_relative_path) + # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir + IF(CMAKE_SWIG_OUTDIR) + SET(swig_outdir ${CMAKE_SWIG_OUTDIR}) + ELSE(CMAKE_SWIG_OUTDIR) + SET(swig_outdir ${CMAKE_CURRENT_BINARY_DIR}) + ENDIF(CMAKE_SWIG_OUTDIR) + SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE} + swig_extra_generated_files + "${swig_outdir}" + "${infile}") + SET(swig_generated_file_fullname + "${swig_generated_file_fullname}/${swig_source_file_name_we}") + # add the language into the name of the file (i.e. TCL_wrap) + # this allows for the same .i file to be wrapped into different languages + SET(swig_generated_file_fullname + "${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap") + + IF(swig_source_file_cplusplus) + SET(swig_generated_file_fullname + "${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}") + ELSE(swig_source_file_cplusplus) + SET(swig_generated_file_fullname + "${swig_generated_file_fullname}.c") + ENDIF(swig_source_file_cplusplus) + + #MESSAGE("Full path to source file: ${swig_source_file_fullname}") + #MESSAGE("Full path to the output file: ${swig_generated_file_fullname}") + GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES) + SET(swig_include_dirs) + FOREACH(it ${cmake_include_directories}) + SET(swig_include_dirs ${swig_include_dirs} "-I${it}") + ENDFOREACH(it) + + SET(swig_special_flags) + # default is c, so add c++ flag if it is c++ + IF(swig_source_file_cplusplus) + SET(swig_special_flags ${swig_special_flags} "-c++") + ENDIF(swig_source_file_cplusplus) + SET(swig_extra_flags) + IF(SWIG_MODULE_${name}_EXTRA_FLAGS) + SET(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS}) + ENDIF(SWIG_MODULE_${name}_EXTRA_FLAGS) + ADD_CUSTOM_COMMAND( + OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files} + COMMAND "${SWIG_EXECUTABLE}" + ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}" + ${swig_source_file_flags} + ${CMAKE_SWIG_FLAGS} + -outdir ${swig_outdir} + ${swig_special_flags} + ${swig_extra_flags} + ${swig_include_dirs} + -o "${swig_generated_file_fullname}" + "${swig_source_file_fullname}" + MAIN_DEPENDENCY "${swig_source_file_fullname}" + DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS} + COMMENT "Swig source") + SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files} + PROPERTIES GENERATED 1) + SET(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files}) +ENDMACRO(SWIG_ADD_SOURCE_TO_MODULE) + +# +# Create Swig module +# +MACRO(SWIG_ADD_MODULE name language) + SWIG_MODULE_INITIALIZE(${name} ${language}) + SET(swig_dot_i_sources) + SET(swig_other_sources) + FOREACH(it ${ARGN}) + IF(${it} MATCHES ".*\\.i$") + SET(swig_dot_i_sources ${swig_dot_i_sources} "${it}") + ELSE(${it} MATCHES ".*\\.i$") + SET(swig_other_sources ${swig_other_sources} "${it}") + ENDIF(${it} MATCHES ".*\\.i$") + ENDFOREACH(it) + + SET(swig_generated_sources) + FOREACH(it ${swig_dot_i_sources}) + SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it}) + SET(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}") + ENDFOREACH(it) + GET_DIRECTORY_PROPERTY(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) + SET_DIRECTORY_PROPERTIES(PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}") + ADD_LIBRARY(${SWIG_MODULE_${name}_REAL_NAME} + MODULE + ${swig_generated_sources} + ${swig_other_sources}) + SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} + PROPERTIES PREFIX "") +ENDMACRO(SWIG_ADD_MODULE) + +# +# Like TARGET_LINK_LIBRARIES but for swig modules +# +MACRO(SWIG_LINK_LIBRARIES name) + IF(SWIG_MODULE_${name}_REAL_NAME) + TARGET_LINK_LIBRARIES(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN}) + ELSE(SWIG_MODULE_${name}_REAL_NAME) + MESSAGE(SEND_ERROR "Cannot find Swig library \"${name}\".") + ENDIF(SWIG_MODULE_${name}_REAL_NAME) +ENDMACRO(SWIG_LINK_LIBRARIES name) + diff --git a/Modules/UseVTK40.cmake b/Modules/UseVTK40.cmake new file mode 100644 index 000000000..750d44b12 --- /dev/null +++ b/Modules/UseVTK40.cmake @@ -0,0 +1,22 @@ +# + +# 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 +# to point here. + +# Load the compiler settings used for VTK. +IF(VTK_BUILD_SETTINGS_FILE) + INCLUDE(CMakeImportBuildSettings) + CMAKE_IMPORT_BUILD_SETTINGS(${VTK_BUILD_SETTINGS_FILE}) +ENDIF(VTK_BUILD_SETTINGS_FILE) + +# Add compiler flags needed to use VTK. +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTK_REQUIRED_C_FLAGS}") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VTK_REQUIRED_CXX_FLAGS}") + +# Add include directories needed to use VTK. +INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIRS}) + +# Add link directories needed to use VTK. +LINK_DIRECTORIES(${VTK_LIBRARY_DIRS}) diff --git a/Modules/UseVTKBuildSettings40.cmake b/Modules/UseVTKBuildSettings40.cmake new file mode 100644 index 000000000..a43bb0bef --- /dev/null +++ b/Modules/UseVTKBuildSettings40.cmake @@ -0,0 +1,25 @@ +# + +# Implementation detail for FindVTK.cmake to let it provide a +# VTK_BUILD_SETTINGS_FILE for VTK 4.0. + +SET(CMAKE_BUILD_SETTING_CMAKE_MAJOR_VERSION "${VTK40_CMAKE_MAJOR_VERSION}") +SET(CMAKE_BUILD_SETTING_CMAKE_MINOR_VERSION "${VTK40_CMAKE_MINOR_VERSION}") +SET(CMAKE_BUILD_SETTING_PROJECT_NAME "VTK") + +SET(CMAKE_BUILD_SETTING_C_COMPILER "${VTK40_CMAKE_C_COMPILER}") +SET(CMAKE_BUILD_SETTING_C_FLAGS "${VTK40_CMAKE_C_FLAGS}") +SET(CMAKE_BUILD_SETTING_C_FLAGS_DEBUG "${VTK40_CMAKE_C_FLAGS_DEBUG}") +SET(CMAKE_BUILD_SETTING_C_FLAGS_RELEASE "${VTK40_CMAKE_C_FLAGS_RELEASE}") +SET(CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL "${VTK40_CMAKE_C_FLAGS_MINSIZEREL}") +SET(CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_C_FLAGS_RELWITHDEBINFO}") + +SET(CMAKE_BUILD_SETTING_CXX_COMPILER "${VTK40_CMAKE_CXX_COMPILER}") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS "${VTK40_CMAKE_CXX_FLAGS}") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG "${VTK40_CMAKE_CXX_FLAGS_DEBUG}") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE "${VTK40_CMAKE_CXX_FLAGS_RELEASE}") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL "${VTK40_CMAKE_CXX_FLAGS_MINSIZEREL}") +SET(CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO "${VTK40_CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + +SET(CMAKE_BUILD_SETTING_BUILD_TYPE "${VTK40_CMAKE_BUILD_TYPE}") +SET(CMAKE_BUILD_SETTING_BUILD_TOOL "${VTK40_CMAKE_BUILD_TOOL}") diff --git a/Modules/UseVTKConfig40.cmake b/Modules/UseVTKConfig40.cmake new file mode 100644 index 000000000..623c6075a --- /dev/null +++ b/Modules/UseVTKConfig40.cmake @@ -0,0 +1,396 @@ +# + +# This is an implementation detail for using VTK 4.0 with the +# FindVTK.cmake module. Do not include directly. + +# Hard-code the version number since it isn't provided by VTK 4.0. +SET(VTK_MAJOR_VERSION 4) +SET(VTK_MINOR_VERSION 0) +SET(VTK_BUILD_VERSION 2) + +# Provide a new UseVTK file that doesn't do a full LOAD_CACHE. +SET(VTK_USE_FILE ${CMAKE_ROOT}/Modules/UseVTK40.cmake) + +# Provide a build settings file. +SET(VTK_BUILD_SETTINGS_FILE ${CMAKE_ROOT}/Modules/UseVTKBuildSettings40.cmake) + +# There are no CMake extensions for VTK 4.0. +SET(VTK_CMAKE_EXTENSIONS_DIR "") + +# grep "VTK40_" UseVTKConfig40.cmake |sed 's/.*VTK40_\([A-Za-z0-9_]*\).*/ \1/' +LOAD_CACHE(${VTK_DIR} READ_WITH_PREFIX VTK40_ + BUILD_SHARED_LIBS + CMAKE_BUILD_TOOL + CMAKE_BUILD_TYPE + CMAKE_CACHE_MAJOR_VERSION + CMAKE_CACHE_MINOR_VERSION + CMAKE_CXX_COMPILER + CMAKE_CXX_FLAGS + CMAKE_CXX_FLAGS_DEBUG + CMAKE_CXX_FLAGS_MINSIZEREL + CMAKE_CXX_FLAGS_RELEASE + CMAKE_CXX_FLAGS_RELWITHDEBINFO + CMAKE_C_COMPILER + CMAKE_C_FLAGS + CMAKE_C_FLAGS_DEBUG + CMAKE_C_FLAGS_MINSIZEREL + CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_RELWITHDEBINFO + CMAKE_INSTALL_PREFIX + CMAKE_Xutil_INCLUDE_PATH + EXECUTABLE_OUTPUT_PATH + JAVA_INCLUDE_PATH2 + LIBRARY_OUTPUT_PATH + MPIRUN + MPI_INCLUDE_PATH + MPI_POSTFLAGS + MPI_PREFLAGS + OPENGL_INCLUDE_DIR + OSMESA_INCLUDE_PATH + PYTHON_INCLUDE_PATH + TCL_INCLUDE_PATH + VLI_INCLUDE_PATH_FOR_VG500 + VLI_INCLUDE_PATH_FOR_VP1000 + VTK_BINARY_DIR + VTK_DEBUG_LEAKS + VTK_HAVE_VG500 + VTK_HAVE_VP1000 + VTK_MANGLE_MESA + VTK_OPENGL_HAS_OSMESA + VTK_PARSE_JAVA_EXE + VTK_SOURCE_DIR + VTK_USE_64BIT_IDS + VTK_USE_ANSI_STDLIB + VTK_USE_HYBRID + VTK_USE_MATROX_IMAGING + VTK_USE_MPI + VTK_USE_PARALLEL + VTK_USE_PATENTED + VTK_USE_RENDERING + VTK_USE_VIDEO_FOR_WINDOWS + VTK_USE_VOLUMEPRO + VTK_USE_X + VTK_WRAP_JAVA + VTK_WRAP_JAVA_EXE + VTK_WRAP_PYTHON + VTK_WRAP_PYTHON_EXE + VTK_WRAP_TCL + VTK_WRAP_TCL_EXE + vtkCommonJava_LIB_DEPENDS + vtkCommonPython_LIB_DEPENDS + vtkCommonTCL_LIB_DEPENDS + vtkCommon_LIB_DEPENDS + vtkFilteringJava_LIB_DEPENDS + vtkFilteringPython_LIB_DEPENDS + vtkFilteringTCL_LIB_DEPENDS + vtkFiltering_LIB_DEPENDS + vtkGraphicsJava_LIB_DEPENDS + vtkGraphicsPython_LIB_DEPENDS + vtkGraphicsTCL_LIB_DEPENDS + vtkGraphics_LIB_DEPENDS + vtkHybridJava_LIB_DEPENDS + vtkHybridPython_LIB_DEPENDS + vtkHybridTCL_LIB_DEPENDS + vtkHybrid_LIB_DEPENDS + vtkIOJava_LIB_DEPENDS + vtkIOPython_LIB_DEPENDS + vtkIOTCL_LIB_DEPENDS + vtkIO_LIB_DEPENDS + vtkImagingJava_LIB_DEPENDS + vtkImagingPython_LIB_DEPENDS + vtkImagingTCL_LIB_DEPENDS + vtkImaging_LIB_DEPENDS + vtkParallelJava_LIB_DEPENDS + vtkParallelPython_LIB_DEPENDS + vtkParallelTCL_LIB_DEPENDS + vtkParallel_LIB_DEPENDS + vtkPatentedJava_LIB_DEPENDS + vtkPatentedPython_LIB_DEPENDS + vtkPatentedTCL_LIB_DEPENDS + vtkPatented_LIB_DEPENDS + vtkRenderingJava_LIB_DEPENDS + vtkRenderingPythonTkWidgets_LIB_DEPENDS + vtkRenderingPython_LIB_DEPENDS + vtkRenderingTCL_LIB_DEPENDS + vtkRendering_LIB_DEPENDS + vtkjpeg_LIB_DEPENDS + vtkpng_LIB_DEPENDS + vtkzlib_LIB_DEPENDS +) + +# Copy needed settings from the VTK 4.0 cache. +SET(VTK_BUILD_SHARED ${VTK40_BUILD_SHARED_LIBS}) +SET(VTK_DEBUG_LEAKS ${VTK40_VTK_DEBUG_LEAKS}) +SET(VTK_HAVE_VG500 ${VTK40_VTK_HAVE_VG500}) +SET(VTK_HAVE_VP1000 ${VTK40_VTK_HAVE_VP1000}) +SET(VTK_USE_MANGLED_MESA ${VTK40_VTK_MANGLE_MESA}) +SET(VTK_MPIRUN_EXE ${VTK40_MPIRUN}) +SET(VTK_MPI_POSTFLAGS ${VTK40_MPI_POSTFLAGS}) +SET(VTK_MPI_PREFLAGS ${VTK40_MPI_PREFLAGS}) +SET(VTK_OPENGL_HAS_OSMESA ${VTK40_VTK_OPENGL_HAS_OSMESA}) +SET(VTK_USE_64BIT_IDS ${VTK40_VTK_USE_64BIT_IDS}) +SET(VTK_USE_ANSI_STDLIB ${VTK40_VTK_USE_ANSI_STDLIB}) +SET(VTK_USE_HYBRID ${VTK40_VTK_USE_HYBRID}) +SET(VTK_USE_MATROX_IMAGING ${VTK40_VTK_USE_MATROX_IMAGING}) +SET(VTK_USE_MPI ${VTK40_VTK_USE_MPI}) +SET(VTK_USE_PARALLEL ${VTK40_VTK_USE_PARALLEL}) +SET(VTK_USE_PATENTED ${VTK40_VTK_USE_PATENTED}) +SET(VTK_USE_RENDERING ${VTK40_VTK_USE_RENDERING}) +SET(VTK_USE_VIDEO_FOR_WINDOWS ${VTK40_VTK_USE_VIDEO_FOR_WINDOWS}) +SET(VTK_USE_VOLUMEPRO ${VTK40_VTK_USE_VOLUMEPRO}) +SET(VTK_USE_X ${VTK40_VTK_USE_X}) +SET(VTK_WRAP_JAVA ${VTK40_VTK_WRAP_JAVA}) +SET(VTK_WRAP_PYTHON ${VTK40_VTK_WRAP_PYTHON}) +SET(VTK_WRAP_TCL ${VTK40_VTK_WRAP_TCL}) + +# Create the list of available kits. +SET(VTK_KITS COMMON FILTERING GRAPHICS IMAGING IO) +IF(VTK_USE_RENDERING) + SET(VTK_KITS ${VTK_KITS} RENDERING) +ENDIF(VTK_USE_RENDERING) +IF(VTK_USE_HYBRID) + SET(VTK_KITS ${VTK_KITS} HYBRID) +ENDIF(VTK_USE_HYBRID) +IF(VTK_USE_PARALLEL) + SET(VTK_KITS ${VTK_KITS} PARALLEL) +ENDIF(VTK_USE_PARALLEL) +IF(VTK_USE_PATENTED) + SET(VTK_KITS ${VTK_KITS} PATENTED) +ENDIF(VTK_USE_PATENTED) + +# Create the list of available languages. +SET(VTK_LANGUAGES "") +IF(VTK_WRAP_TCL) + SET(VTK_LANGUAGES ${VTK_LANGUAGES} TCL) +ENDIF(VTK_WRAP_TCL) +IF(VTK_WRAP_PYTHON) + SET(VTK_LANGUAGES ${VTK_LANGUAGES} PYTHON) +ENDIF(VTK_WRAP_PYTHON) +IF(VTK_WRAP_JAVA) + SET(VTK_LANGUAGES ${VTK_LANGUAGES} JAVA) +ENDIF(VTK_WRAP_JAVA) + +# Include directories for other projects installed on the system and +# used by VTK. +SET(VTK_INCLUDE_DIRS_SYS "") +IF(VTK_USE_RENDERING) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_OPENGL_INCLUDE_PATH} ${VTK40_OPENGL_INCLUDE_DIR}) + IF(VTK_USE_X) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_CMAKE_Xlib_INCLUDE_PATH} ${VTK40_CMAKE_Xutil_INCLUDE_PATH}) + ENDIF(VTK_USE_X) +ENDIF(VTK_USE_RENDERING) + +IF(VTK_OPENGL_HAS_OSMESA) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_OSMESA_INCLUDE_PATH}) +ENDIF(VTK_OPENGL_HAS_OSMESA) + +IF(VTK_USE_MPI) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_MPI_INCLUDE_PATH}) +ENDIF(VTK_USE_MPI) + +IF(VTK_WRAP_TCL) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_TCL_INCLUDE_PATH}) +ENDIF(VTK_WRAP_TCL) + +IF(VTK_WRAP_PYTHON) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} ${VTK40_PYTHON_INCLUDE_PATH}) +ENDIF(VTK_WRAP_PYTHON) + +IF(VTK_WRAP_JAVA) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_JAVA_INCLUDE_PATH} ${VTK40_JAVA_INCLUDE_PATH2}) +ENDIF(VTK_WRAP_JAVA) + +IF(VTK_HAVE_VG500) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_VLI_INCLUDE_PATH_FOR_VG500}) +ENDIF(VTK_HAVE_VG500) + +IF(VTK_HAVE_VP1000) + SET(VTK_INCLUDE_DIRS_SYS ${VTK_INCLUDE_DIRS_SYS} + ${VTK40_VLI_INCLUDE_PATH_FOR_VP1000}) +ENDIF(VTK_HAVE_VP1000) + +# See if this is a build tree or install tree. +IF(EXISTS ${VTK_DIR}/Common) + # This is a VTK 4.0 build tree. + + SET(VTK_LIBRARY_DIRS ${VTK40_LIBRARY_OUTPUT_PATH}) + + # Determine the include directories needed. + SET(VTK_INCLUDE_DIRS ${VTK40_VTK_BINARY_DIR}) + IF(VTK_USE_PARALLEL) + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Parallel) + ENDIF(VTK_USE_PARALLEL) + IF(VTK_USE_HYBRID) + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Hybrid) + ENDIF(VTK_USE_HYBRID) + IF(VTK_USE_PATENTED) + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Patented) + ENDIF(VTK_USE_PATENTED) + IF(VTK_USE_RENDERING) + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK40_VTK_SOURCE_DIR}/Rendering) + ENDIF(VTK_USE_RENDERING) + + # These directories are always needed. + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} + ${VTK40_VTK_SOURCE_DIR}/IO + ${VTK40_VTK_SOURCE_DIR}/Imaging + ${VTK40_VTK_SOURCE_DIR}/Graphics + ${VTK40_VTK_SOURCE_DIR}/Filtering + ${VTK40_VTK_SOURCE_DIR}/Common) + + # Give access to a few utilities. + SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} + ${VTK40_VTK_BINARY_DIR}/Utilities/png + ${VTK40_VTK_SOURCE_DIR}/Utilities/png + ${VTK40_VTK_BINARY_DIR}/Utilities/zlib + ${VTK40_VTK_SOURCE_DIR}/Utilities/zlib) + + # Executable locations. + IF(VTK_WRAP_TCL) + SET(VTK_TCL_EXE ${VTK40_EXECUTABLE_OUTPUT_PATH}/vtk) + SET(VTK_WRAP_TCL_EXE ${VTK40_VTK_WRAP_TCL_EXE}) + SET(VTK_TCL_HOME ${VTK40_VTK_SOURCE_DIR}/Wrapping/Tcl) + ENDIF(VTK_WRAP_TCL) + IF(VTK_WRAP_PYTHON) + SET(VTK_WRAP_PYTHON_EXE ${VTK40_VTK_WRAP_PYTHON_EXE}) + ENDIF(VTK_WRAP_PYTHON) + IF(VTK_WRAP_JAVA) + SET(VTK_PARSE_JAVA_EXE ${VTK40_VTK_PARSE_JAVA_EXE}) + SET(VTK_WRAP_JAVA_EXE ${VTK40_VTK_WRAP_JAVA_EXE}) + ENDIF(VTK_WRAP_JAVA) + +ELSE(EXISTS ${VTK_DIR}/Common) + # This is a VTK 4.0 install tree. + + SET(VTK_INCLUDE_DIRS ${VTK_DIR}) + SET(VTK_LIBRARY_DIRS ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk) + + # Executable locations. + IF(VTK_WRAP_TCL) + SET(VTK_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtk) + SET(VTK_WRAP_TCL_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapTcl) + SET(VTK_TCL_HOME ${VTK40_CMAKE_INSTALL_PREFIX}/lib/vtk/tcl) + ENDIF(VTK_WRAP_TCL) + IF(VTK_WRAP_PYTHON) + SET(VTK_WRAP_PYTHON_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapPython) + ENDIF(VTK_WRAP_PYTHON) + IF(VTK_WRAP_JAVA) + SET(VTK_PARSE_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkParseJava) + SET(VTK_WRAP_JAVA_EXE ${VTK40_CMAKE_INSTALL_PREFIX}/bin/vtkWrapJava) + ENDIF(VTK_WRAP_JAVA) +ENDIF(EXISTS ${VTK_DIR}/Common) + +# Add the system include directories last. +SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS_SYS}) + +# Find the required C and C++ compiler flags. +IF(CMAKE_COMPILER_IS_GNUCXX) + IF(WIN32) + # The platform is gcc on cygwin. + SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -mwin32") + SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -mwin32") + ENDIF(WIN32) +ELSE(CMAKE_COMPILER_IS_GNUCXX) + IF(CMAKE_ANSI_CFLAGS) + SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") + ENDIF(CMAKE_ANSI_CFLAGS) + IF(CMAKE_SYSTEM MATCHES "OSF1-V.*") + SET(VTK_REQUIRED_CXX_FLAGS + "${VTK_REQUIRED_CXX_FLAGS} -timplicit_local -no_implicit_include") + ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*") +ENDIF(CMAKE_COMPILER_IS_GNUCXX) + +IF(VTK_USE_X) + IF(CMAKE_X_CFLAGS) + SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_X_CFLAGS}") + SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} ${CMAKE_X_CFLAGS}") + ENDIF(CMAKE_X_CFLAGS) +ENDIF(VTK_USE_X) + +# Copy library dependencies. +SET(vtkCommonJava_LIB_DEPENDS "${VTK40_vtkCommonJava_LIB_DEPENDS}") +SET(vtkCommonPython_LIB_DEPENDS "${VTK40_vtkCommonPython_LIB_DEPENDS}") +SET(vtkCommonTCL_LIB_DEPENDS "${VTK40_vtkCommonTCL_LIB_DEPENDS}") +SET(vtkCommon_LIB_DEPENDS "${VTK40_vtkCommon_LIB_DEPENDS}") +SET(vtkFilteringJava_LIB_DEPENDS "${VTK40_vtkFilteringJava_LIB_DEPENDS}") +SET(vtkFilteringPython_LIB_DEPENDS "${VTK40_vtkFilteringPython_LIB_DEPENDS}") +SET(vtkFilteringTCL_LIB_DEPENDS "${VTK40_vtkFilteringTCL_LIB_DEPENDS}") +SET(vtkFiltering_LIB_DEPENDS "${VTK40_vtkFiltering_LIB_DEPENDS}") +SET(vtkGraphicsJava_LIB_DEPENDS "${VTK40_vtkGraphicsJava_LIB_DEPENDS}") +SET(vtkGraphicsPython_LIB_DEPENDS "${VTK40_vtkGraphicsPython_LIB_DEPENDS}") +SET(vtkGraphicsTCL_LIB_DEPENDS "${VTK40_vtkGraphicsTCL_LIB_DEPENDS}") +SET(vtkGraphics_LIB_DEPENDS "${VTK40_vtkGraphics_LIB_DEPENDS}") +SET(vtkHybridJava_LIB_DEPENDS "${VTK40_vtkHybridJava_LIB_DEPENDS}") +SET(vtkHybridPython_LIB_DEPENDS "${VTK40_vtkHybridPython_LIB_DEPENDS}") +SET(vtkHybridTCL_LIB_DEPENDS "${VTK40_vtkHybridTCL_LIB_DEPENDS}") +SET(vtkHybrid_LIB_DEPENDS "${VTK40_vtkHybrid_LIB_DEPENDS}") +SET(vtkIOJava_LIB_DEPENDS "${VTK40_vtkIOJava_LIB_DEPENDS}") +SET(vtkIOPython_LIB_DEPENDS "${VTK40_vtkIOPython_LIB_DEPENDS}") +SET(vtkIOTCL_LIB_DEPENDS "${VTK40_vtkIOTCL_LIB_DEPENDS}") +SET(vtkIO_LIB_DEPENDS "${VTK40_vtkIO_LIB_DEPENDS}") +SET(vtkImagingJava_LIB_DEPENDS "${VTK40_vtkImagingJava_LIB_DEPENDS}") +SET(vtkImagingPython_LIB_DEPENDS "${VTK40_vtkImagingPython_LIB_DEPENDS}") +SET(vtkImagingTCL_LIB_DEPENDS "${VTK40_vtkImagingTCL_LIB_DEPENDS}") +SET(vtkImaging_LIB_DEPENDS "${VTK40_vtkImaging_LIB_DEPENDS}") +SET(vtkParallelJava_LIB_DEPENDS "${VTK40_vtkParallelJava_LIB_DEPENDS}") +SET(vtkParallelPython_LIB_DEPENDS "${VTK40_vtkParallelPython_LIB_DEPENDS}") +SET(vtkParallelTCL_LIB_DEPENDS "${VTK40_vtkParallelTCL_LIB_DEPENDS}") +SET(vtkParallel_LIB_DEPENDS "${VTK40_vtkParallel_LIB_DEPENDS}") +SET(vtkPatentedJava_LIB_DEPENDS "${VTK40_vtkPatentedJava_LIB_DEPENDS}") +SET(vtkPatentedPython_LIB_DEPENDS "${VTK40_vtkPatentedPython_LIB_DEPENDS}") +SET(vtkPatentedTCL_LIB_DEPENDS "${VTK40_vtkPatentedTCL_LIB_DEPENDS}") +SET(vtkPatented_LIB_DEPENDS "${VTK40_vtkPatented_LIB_DEPENDS}") +SET(vtkRenderingJava_LIB_DEPENDS "${VTK40_vtkRenderingJava_LIB_DEPENDS}") +SET(vtkRenderingPythonTkWidgets_LIB_DEPENDS "${VTK40_vtkRenderingPythonTkWidgets_LIB_DEPENDS}") +SET(vtkRenderingPython_LIB_DEPENDS "${VTK40_vtkRenderingPython_LIB_DEPENDS}") +SET(vtkRenderingTCL_LIB_DEPENDS "${VTK40_vtkRenderingTCL_LIB_DEPENDS}") +SET(vtkRendering_LIB_DEPENDS "${VTK40_vtkRendering_LIB_DEPENDS}") +SET(vtkjpeg_LIB_DEPENDS "${VTK40_vtkjpeg_LIB_DEPENDS}") +SET(vtkpng_LIB_DEPENDS "${VTK40_vtkpng_LIB_DEPENDS}") +SET(vtkzlib_LIB_DEPENDS "${VTK40_vtkzlib_LIB_DEPENDS}") + +# List of VTK configuration variables set above. +# grep "^[ ]*SET(VTK" UseVTKConfig40.cmake |sed 's/[ ]*SET(\([^ ]*\) .*/ \1/' +SET(VTK_SETTINGS + VTK_BUILD_SHARED + VTK_BUILD_VERSION + VTK_DEBUG_LEAKS + VTK_HAVE_VG500 + VTK_HAVE_VP1000 + VTK_INCLUDE_DIRS + VTK_KITS + VTK_LANGUAGES + VTK_LIBRARY_DIRS + VTK_MAJOR_VERSION + VTK_MANGLE_MESA + VTK_MINOR_VERSION + VTK_MPIRUN_EXE + VTK_MPI_POSTFLAGS + VTK_MPI_PREFLAGS + VTK_OPENGL_HAS_OSMESA + VTK_PARSE_JAVA_EXE + VTK_TCL_EXE + VTK_TCL_HOME + VTK_USE_64BIT_IDS + VTK_USE_ANSI_STDLIB + VTK_USE_HYBRID + VTK_USE_MATROX_IMAGING + VTK_USE_MPI + VTK_USE_PARALLEL + VTK_USE_PATENTED + VTK_USE_RENDERING + VTK_USE_VIDEO_FOR_WINDOWS + VTK_USE_VOLUMEPRO + VTK_USE_X + VTK_WRAP_JAVA + VTK_WRAP_JAVA_EXE + VTK_WRAP_PYTHON + VTK_WRAP_PYTHON_EXE + VTK_WRAP_TCL + VTK_WRAP_TCL_EXE +) diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake new file mode 100644 index 000000000..da8bdd1be --- /dev/null +++ b/Modules/Use_wxWindows.cmake @@ -0,0 +1,50 @@ +# +# This convenience include finds if wxWindows is installed +# and set the appropriate libs, incdirs, flags etc. +# author Jan Woetzel (07/2003) +## +# ----------------------------------------------------- +# USAGE: +# just include Use_wxWindows.cmake +# in your projects CMakeLists.txt +# INCLUDE( ${CMAKE_MODULE_PATH}/Use_wxWindows.cmake) +## +# if you are sure you need GL then +# SET(WXWINDOWS_USE_GL 1) +# *before* you include this file. +# +# ----------------------------------------------------- +# 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 compatibilty JW + +MESSAGE(STATUS "Use_wxWindows.cmake is DEPRECATED. \n" +"Please use FIND_PACKAGE(wxWidgets) and INCLUDE(${wxWidgets_USE_FILE}) instead. (JW)") + + +# ------------------------ + +FIND_PACKAGE( wxWindows ) + +IF(WXWINDOWS_FOUND) + +#MESSAGE("DBG Use_wxWindows.cmake: WXWINDOWS_INCLUDE_DIR=${WXWINDOWS_INCLUDE_DIR} WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES} WXWINDOWS_LIBRARIES=${WXWINDOWS_LIBRARIES} CMAKE_WXWINDOWS_CXX_FLAGS=${CMAKE_WXWINDOWS_CXX_FLAGS} WXWINDOWS_DEFINITIONS=${WXWINDOWS_DEFINITIONS}") + + IF(WXWINDOWS_INCLUDE_DIR) + INCLUDE_DIRECTORIES(${WXWINDOWS_INCLUDE_DIR}) + ENDIF(WXWINDOWS_INCLUDE_DIR) + IF(WXWINDOWS_LINK_DIRECTORIES) + LINK_DIRECTORIES(${WXWINDOWS_LINK_DIRECTORIES}) + ENDIF(WXWINDOWS_LINK_DIRECTORIES) + IF(WXWINDOWS_LIBRARIES) + LINK_LIBRARIES(${WXWINDOWS_LIBRARIES}) + ENDIF(WXWINDOWS_LIBRARIES) + IF (CMAKE_WXWINDOWS_CXX_FLAGS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_WXWINDOWS_CXX_FLAGS}") + ENDIF(CMAKE_WXWINDOWS_CXX_FLAGS) + IF(WXWINDOWS_DEFINITIONS) + ADD_DEFINITIONS(${WXWINDOWS_DEFINITIONS}) + ENDIF(WXWINDOWS_DEFINITIONS) +ELSE(WXWINDOWS_FOUND) + MESSAGE(SEND_ERROR "wxWindows not found by Use_wxWindows.cmake") +ENDIF(WXWINDOWS_FOUND) + diff --git a/Modules/UsewxWidgets.cmake b/Modules/UsewxWidgets.cmake new file mode 100755 index 000000000..6f5cb2642 --- /dev/null +++ b/Modules/UsewxWidgets.cmake @@ -0,0 +1,71 @@ +# - Convenience include for using wxWidgets library +# Finds if wxWidgets is installed +# and set the appropriate libs, incdirs, flags etc. +# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS +# are called. +# +# USAGE +# SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs +# FIND_PACKAGE(wxWidgets REQUIRED) +# INCLUDE( ${xWidgets_USE_FILE} ) +# ... add your targets here, e.g. ADD_EXECUTABLE/ ADD_LIBRARY ... +# TARGET_LINK_LIBRARIERS( ${wxWidgets_LIBRARIES}) +# +# DEPRECATED +# LINK_LIBRARIES is not called in favor of adding dependencies per target. +# +# AUTHOR +# Jan Woetzel + + +# debug message and logging. +# comment these out for distribution +IF (NOT LOGFILE ) + # SET(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log") +ENDIF (NOT LOGFILE ) +MACRO(MSG _MSG) + # FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n") + # MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}") +ENDMACRO(MSG) + + +MSG("wxWidgets_FOUND=${wxWidgets_FOUND}") +IF (wxWidgets_FOUND) + IF (wxWidgets_INCLUDE_DIRS) + IF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM) + INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIRS}) + ELSE(wxWidgets_INCLUDE_DIRS_NO_SYSTEM) + INCLUDE_DIRECTORIES(SYSTEM ${wxWidgets_INCLUDE_DIRS}) + ENDIF(wxWidgets_INCLUDE_DIRS_NO_SYSTEM) + MSG("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") + ENDIF(wxWidgets_INCLUDE_DIRS) + + IF (wxWidgets_LIBRARY_DIRS) + LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS}) + MSG("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") + ENDIF(wxWidgets_LIBRARY_DIRS) + + IF (wxWidgets_DEFINITIONS) + ADD_DEFINITIONS( ${wxWidgets_DEFINITIONS} ) + MSG("wxWidgets_DEFINITIONS=${wxWidgets_DEFINITIONS}") + ENDIF(wxWidgets_DEFINITIONS) + + IF (wxWidgets_CXX_FLAGS) + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}") + MSG("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") + ENDIF(wxWidgets_CXX_FLAGS) + + # DEPRECATED JW + # just for backward compatibility: add deps to all targets + # library projects better use advanced FIND_PACKAGE(wxWidgets) directly. + #IF(wxWidgets_LIBRARIES) + # LINK_LIBRARIES(${wxWidgets_LIBRARIES}) + # # BUG: str too long: MSG("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") + # IF(LOGFILE) + # FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n") + # ENDIF(LOGFILE) + #ENDIF(wxWidgets_LIBRARIES) + +ELSE (wxWidgets_FOUND) + MESSAGE("wxWidgets requested but not found.") +ENDIF(wxWidgets_FOUND) diff --git a/Modules/VTKCompatibility.cmake b/Modules/VTKCompatibility.cmake new file mode 100644 index 000000000..75e2f4051 --- /dev/null +++ b/Modules/VTKCompatibility.cmake @@ -0,0 +1,38 @@ +IF(APPLE) + SET(CMAKE_CXX_CREATE_SHARED_LIBRARY "${CMAKE_C_CREATE_SHARED_LIBRARY}") + SET(CMAKE_CXX_CREATE_SHARED_MODULE "${CMAKE_C_CREATE_SHARED_MODULE}") + STRING( REGEX REPLACE "CMAKE_C_COMPILER" + CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_MODULE + "${CMAKE_CXX_CREATE_SHARED_MODULE}") + STRING( REGEX REPLACE "CMAKE_C_COMPILER" + CMAKE_CXX_COMPILER CMAKE_CXX_CREATE_SHARED_LIBRARY + "${CMAKE_CXX_CREATE_SHARED_LIBRARY}") +ENDIF(APPLE) + +SET(VTKFTGL_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/ftgl" + CACHE INTERNAL "") +SET(VTKFREETYPE_BINARY_DIR "${VTK_BINARY_DIR}/Utilities/freetype" + CACHE INTERNAL "") +SET(VTKFTGL_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/ftgl" + CACHE INTERNAL "") +SET(VTKFREETYPE_SOURCE_DIR "${VTK_SOURCE_DIR}/Utilities/freetype" + CACHE INTERNAL "") + +SET(VTK_GLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glext.h" + CACHE FILEPATH + "Location of the OpenGL extensions header file (glext.h).") +SET(VTK_GLXEXT_FILE + "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/glxext.h" CACHE FILEPATH + "Location of the GLX extensions header file (glxext.h).") +SET(VTK_WGLEXT_FILE "${VTK_SOURCE_DIR}/Utilities/ParseOGLExt/headers/wglext.h" + CACHE FILEPATH + "Location of the WGL extensions header file (wglext.h).") + +# work around an old bug in VTK +SET(TIFF_RIGHT_VERSION 1) + +# for very old VTK (versions prior to 4.2) +MACRO(SOURCE_FILES) + message (FATAL_ERROR "You are trying to build a very old version of VTK (prior to VTK 4.2). To do this you need to use CMake 2.0 as it was the last version of CMake to support VTK 4.0.") +ENDMACRO(SOURCE_FILES) + diff --git a/Modules/ecos_clean.cmake b/Modules/ecos_clean.cmake new file mode 100644 index 000000000..57af343d9 --- /dev/null +++ b/Modules/ecos_clean.cmake @@ -0,0 +1,12 @@ +file(GLOB _files ${ECOS_DIR}/*) + +# remove all directories, which consist of lower-case letters only +# this skips e.g. CVS/ and .subversion/ +foreach(_entry ${_files}) + if(IS_DIRECTORY ${_entry}) + get_filename_component(dir ${_entry} NAME) + if(${dir} MATCHES "^[a-z]+$") + file(REMOVE_RECURSE ${_entry}) + endif(${dir} MATCHES "^[a-z]+$") + endif(IS_DIRECTORY ${_entry}) +endforeach(_entry) diff --git a/Modules/kde3init_dummy.cpp.in b/Modules/kde3init_dummy.cpp.in new file mode 100644 index 000000000..7135c73a1 --- /dev/null +++ b/Modules/kde3init_dummy.cpp.in @@ -0,0 +1,6 @@ + +/* used by KDE3Macros.cmake */ + +extern "C" int kdemain(int argc, char* argv[]); +extern "C" int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); } +int main(int argc, char* argv[]) { return kdemain(argc,argv); } diff --git a/Modules/kde3uic.cmake b/Modules/kde3uic.cmake new file mode 100644 index 000000000..0dbbbcf1d --- /dev/null +++ b/Modules/kde3uic.cmake @@ -0,0 +1,20 @@ + + +# used internally by KDE3Macros.cmake +# neundorf@kde.org + + +EXECUTE_PROCESS(COMMAND ${KDE_UIC_EXECUTABLE} + -L ${KDE_UIC_PLUGIN_DIR} -nounload -tr tr2i18n + -impl ${KDE_UIC_H_FILE} + ${KDE_UIC_FILE} + OUTPUT_VARIABLE _uic_CONTENTS + ERROR_QUIET + ) + +STRING(REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) +STRING(REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _uic_CONTENTS "${_uic_CONTENTS}" ) + +FILE(WRITE ${KDE_UIC_CPP_FILE} "#include \n#include \n\n") +FILE(APPEND ${KDE_UIC_CPP_FILE} "${_uic_CONTENTS}") + diff --git a/Modules/readme.txt b/Modules/readme.txt new file mode 100644 index 000000000..8d4615a2c --- /dev/null +++ b/Modules/readme.txt @@ -0,0 +1,102 @@ +Note to authors of FindXXX.cmake files + +We would like all FindXXX.cmake files to produce consistent variable names. + +Please use the following consistent variable names for general use. + +XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. +XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. +XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include +XXX_EXECUTABLE Where to find the XXX tool. +XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. +XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. +XXX_ROOT_DIR Where to find the base directory of XXX. +XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. +XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. +XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. +XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. +XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. + The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. + This should not be a cache entry. +XXX_VERSION_STRING A human-readable string containing the version of the package found, if any. +XXX_VERSION_MAJOR The major version of the package found, if any. +XXX_VERSION_MINOR The minor version of the package found, if any. +XXX_VERSION_PATCH The patch version of the package found, if any. + +You do not have to provide all of the above variables. You should provide XXX_FOUND under most circumstances. If XXX is a library, then XXX_LIBRARIES, should also be defined, and XXX_INCLUDE_DIRS should usually be defined (I guess libm.a might be an exception) + +The following names should not usually be used in CMakeLists.txt files, but they may be usefully modified in users' CMake Caches to control stuff. + +XXX_LIBRARY Name of XXX Library. A User may set this and XXX_INCLUDE_DIR to ignore to force non-use of XXX. +XXX_YY_LIBRARY Name of YY library that is part of the XXX system. It may or may not be required to use XXX. +XXX_INCLUDE_DIR Where to find xxx.h, etc. (XXX_INCLUDE_PATH was considered bad because a path includes an actual filename.) +XXX_YY_INCLUDE_DIR Where to find xxx_yy.h, etc. + +For tidiness's sake, try to keep as many options as possible out of the cache, leaving at least one option which can be used to disable use of the module, or locate a not-found library (e.g. XXX_ROOT_DIR). For the same reason, mark most cache options as advanced. + +If you need other commands to do special things then it should still begin with XXX_. This gives a sort of namespace effect and keeps things tidy for the user. You should put comments describing all the exported settings, plus descriptions of any the users can use to control stuff. + +You really should also provide backwards compatibility any old settings that were actually in use. Make sure you comment them as deprecated, so that no-one starts using them. + +To correctly document a module, create a comment block at the top with # comments. There are three types of comments that can be in the block: + +1. The brief description of the module, this is done by: +# - a small description + +2. A paragraph of text. This is done with all text that has a single +space between the # and the text. To create a new paragraph, just +put a # with no text on the line. + +3. A verbatim line. This is done with two spaces between the # and the text. + +For example: + +# - This is a cool module +# This module does really cool stuff. +# It can do even more than you think. +# +# It even needs to paragraphs to tell you about it. +# And it defines the following variables: +# VAR_COOL - this is great isn't it? +# VAR_REALLY_COOL - cool right? +# + +To have a .cmake file in this directory NOT show up in the +modules documentation, you should start the file with a blank +line. + +A FindXXX.cmake module will typically be loaded by the command + + FIND_PACKAGE(XXX [major[.minor[.patch]]] [EXACT] + [QUIET] [REQUIRED [components...]]) + +If any version numbers are given to the command it will set the +variable XXX_FIND_VERSION to contain the whole version. The variables +XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and +XXX_FIND_VERSION_PATCH will be set to contain the corresponding +portions of the version number. The variable XXX_FIND_VERSION_EXACT +will indicate whether an exact version is requested. +If the find module supports versioning it should locate a version of +the package that is compatible with the version requested. If a +compatible version of the package cannot be found the module should +not report success. The version of the package found should be stored +in the version variables named above. + +If the QUIET option is given to the command it will set the variable +XXX_FIND_QUIETLY to true before loading the FindXXX.cmake module. If +this variable is set the module should not complain about not being +able to find the package. If the +REQUIRED option is given to the command it will set the variable +XXX_FIND_REQUIRED to true before loading the FindXXX.cmake module. If +this variable is set the module should issue a FATAL_ERROR if the +package cannot be found. For each package-specific component, say +YYY, listed after the REQUIRED option a variable XXX_FIND_REQUIRED_YYY +to true. The set of components listed will also be specified in a +XXX_FIND_COMPONENTS variable. This can be used by the FindXXX.cmake +module to determine which sub-components of the package must be found. +If neither the QUIET nor REQUIRED options are given then the +FindXXX.cmake module should look for the package and complain without +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. diff --git a/Readme.txt b/Readme.txt new file mode 100644 index 000000000..315783620 --- /dev/null +++ b/Readme.txt @@ -0,0 +1,55 @@ +This is CMake, the cross-platform, open-source make system. +CMake is free software under a BSD-like license, see Copyright.txt. +For documentation see the Docs/ directory once you have built CMake +or visit http://www.cmake.org. + + +Building CMake +============== + + +Supported Platforms +------------------- + +MS Windows, Mac OS X, Linux, FreeBSD, Solaris, HP-UX, IRIX, BeOS, QNX + +Other UNIX-like operating systems may work too out of the box, if not +it shouldn't be a major problem to port CMake to this platform. Contact the +CMake mailing list in this case: http://www.cmake.org/mailman/listinfo/cmake + + +If you don't have any previous version of CMake already installed +-------------------------------------------------------------- + +* UNIX/Mac OSX/MinGW/MSYS/Cygwin: + +You need to have a compiler and a make installed. +Run the bootstrap script you find the in the source directory of CMake. +You can use the --help option to see the supported options. +You may want to use the --prefix= option to specify a custom +installation directory for CMake. You can run the bootstrap script from +within the CMake source directory or any other build directory of your +choice. Once this has finished successfully, run make and make install. +So basically it's the same as you may be used to from autotools-based +projects: + +$ ./bootstrap; make; make install + + +* Other Windows: + +You need to download and install a binary release of CMake in order to build +CMake. You can get these releases from +http://www.cmake.org/HTML/Download.html . Then proceed with the instructions +below. + + +You already have a version of CMake installed +--------------------------------------------- + +You can build CMake as any other project with a CMake-based build system: +run the installed CMake on the sources of this CMake with your preferred +options and generators. Then build it and install it. +For instructions how to do this, see http://www.cmake.org/HTML/RunningCMake.html + + diff --git a/Source/.cvsignore b/Source/.cvsignore new file mode 100644 index 000000000..31e286c6d --- /dev/null +++ b/Source/.cvsignore @@ -0,0 +1,5 @@ +ccommand___Win32_Debug +Debug +cmake___Win32_Debug +ctest___Win32_Debug +CMakeSetup.map diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt new file mode 100644 index 000000000..89e5d4674 --- /dev/null +++ b/Source/CMakeLists.txt @@ -0,0 +1,459 @@ +INCLUDE(CheckIncludeFile) +# Check if we can build support for ELF parsing. +CHECK_INCLUDE_FILE("elf.h" HAVE_ELF_H) +IF(HAVE_ELF_H) + SET(CMAKE_USE_ELF_PARSER 1) +ELSE(HAVE_ELF_H) + SET(CMAKE_USE_ELF_PARSER) +ENDIF(HAVE_ELF_H) + +# configure the .h file +CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Source/cmConfigure.cmake.h.in" + "${CMake_BINARY_DIR}/Source/cmConfigure.h" + ) +CONFIGURE_FILE( + "${CMake_SOURCE_DIR}/Source/CPack/cmCPackConfigure.h.in" + "${CMake_BINARY_DIR}/Source/CPack/cmCPackConfigure.h" + ) + +# add the include path to find the .h +INCLUDE_DIRECTORIES( + "${CMake_BINARY_DIR}/Source" + "${CMake_SOURCE_DIR}/Source" + ${CMAKE_ZLIB_INCLUDES} + ${CMAKE_EXPAT_INCLUDES} + ${CMAKE_TAR_INCLUDES} + ${CMAKE_COMPRESS_INCLUDES} + ) + +# let cmake know it is supposed to use it +ADD_DEFINITIONS(-DCMAKE_BUILD_WITH_CMAKE) + +OPTION(CMAKE_REGENERATE_YACCLEX + "Regenerate YACC and LEXX files" OFF) +MARK_AS_ADVANCED(CMAKE_REGENERATE_YACCLEX) +IF(CMAKE_REGENERATE_YACCLEX) + SET(parsersLexers cmDependsFortran cmCommandArgument cmExpr) + FIND_PROGRAM(YACC_EXECUTABLE + NAMES yacc bison + PATHS /usr/bin + DOC "Yacc or Bison executable") + FIND_PROGRAM(FLEX_EXECUTABLE + NAMES flex + PATHS /usr/bin + DOC "Flex executable") + MARK_AS_ADVANCED(YACC_EXECUTABLE FLEX_EXECUTABLE) + IF(YACC_EXECUTABLE) + SET(BISON_FLAGS) + IF(YACC_EXECUTABLE MATCHES "bison") + SET(BISON_FLAGS "--yacc") + ENDIF(YACC_EXECUTABLE MATCHES "bison") + SET(yacc_files) + FOREACH(name ${parsersLexers}) + SET(src "${CMAKE_CURRENT_SOURCE_DIR}/${name}Parser.y") + SET(dst "${CMAKE_CURRENT_BINARY_DIR}/${name}Parser.cxx") + SET(hdr "${CMAKE_CURRENT_BINARY_DIR}/${name}ParserTokens.h") + ADD_CUSTOM_COMMAND( + OUTPUT "${dst}" + DEPENDS "${src}" + COMMAND + ${YACC_EXECUTABLE} + --name-prefix=${name}_yy --defines=${hdr} -o${dst} ${src} + ) + SET(yacc_files ${yacc_files} "${dst}") + ENDFOREACH(name) + ADD_CUSTOM_TARGET(RerunYacc DEPENDS ${yacc_files}) + ENDIF(YACC_EXECUTABLE) + IF(FLEX_EXECUTABLE) + SET(lex_files) + FOREACH(name ${parsersLexers}) + SET(src "${CMAKE_CURRENT_SOURCE_DIR}/${name}Lexer.in.l") + SET(dst "${CMAKE_CURRENT_BINARY_DIR}/${name}Lexer.cxx") + SET(hdr "${CMAKE_CURRENT_BINARY_DIR}/${name}Lexer.h") + ADD_CUSTOM_COMMAND( + OUTPUT "${dst}" + DEPENDS "${src}" + COMMAND + ${FLEX_EXECUTABLE} + --prefix=${name}_yy --header-file=${hdr} -o${dst} ${src} + ) + SET(lex_files ${lex_files} "${dst}") + ENDFOREACH(name) + ADD_CUSTOM_TARGET(RerunLex DEPENDS ${lex_files}) + ENDIF(FLEX_EXECUTABLE) + +ENDIF(CMAKE_REGENERATE_YACCLEX) + +# Check if we can build the ELF parser. +IF(CMAKE_USE_ELF_PARSER) + SET(ELF_SRCS cmELF.h cmELF.cxx) +ENDIF(CMAKE_USE_ELF_PARSER) + +# +# Sources for CMakeLib +# +SET(SRCS + cmBootstrapCommands.cxx + cmCacheManager.cxx + cmCacheManager.h + cmCommands.cxx + cmCommands.h + cmCommandArgumentLexer.cxx + cmCommandArgumentParser.cxx + cmCommandArgumentParserHelper.cxx + cmComputeComponentGraph.cxx + cmComputeComponentGraph.h + cmComputeLinkDepends.cxx + cmComputeLinkDepends.h + cmComputeLinkInformation.cxx + cmComputeLinkInformation.h + cmComputeTargetDepends.h + cmComputeTargetDepends.cxx + cmCustomCommand.cxx + cmCustomCommand.h + cmDepends.cxx + cmDepends.h + cmDependsC.cxx + cmDependsC.h + cmDependsFortran.cxx + cmDependsFortran.h + cmDependsFortranLexer.cxx + cmDependsFortranParser.cxx + cmDependsFortranParser.h + cmDependsJava.cxx + cmDependsJava.h + cmDependsJavaLexer.cxx + cmDependsJavaParser.cxx + cmDependsJavaParserHelper.cxx + cmDependsJavaParserHelper.h + cmDocumentation.cxx + cmDocumentationFormatter.cxx + cmDocumentationFormatterHTML.cxx + cmDocumentationFormatterDocbook.cxx + cmDocumentationFormatterMan.cxx + cmDocumentationFormatterText.cxx + cmDocumentationFormatterUsage.cxx + cmDocumentationSection.cxx + cmDocumentVariables.cxx + cmDynamicLoader.cxx + cmDynamicLoader.h + ${ELF_SRCS} + cmExprLexer.cxx + cmExprParser.cxx + cmExprParserHelper.cxx + cmExportBuildFileGenerator.h + cmExportBuildFileGenerator.cxx + cmExportFileGenerator.h + cmExportFileGenerator.cxx + cmExportInstallFileGenerator.h + cmExportInstallFileGenerator.cxx + cmExtraEclipseCDT4Generator.cxx + cmExtraEclipseCDT4Generator.h + cmFileTimeComparison.cxx + cmFileTimeComparison.h + cmGeneratedFileStream.cxx + cmGlobalGenerator.cxx + cmGlobalGenerator.h + cmGlobalUnixMakefileGenerator3.cxx + cmGlobalUnixMakefileGenerator3.h + cmGraphAdjacencyList.h + cmInstallGenerator.h + cmInstallGenerator.cxx + cmInstallExportGenerator.cxx + cmInstallFilesGenerator.h + cmInstallFilesGenerator.cxx + cmInstallScriptGenerator.h + cmInstallScriptGenerator.cxx + cmInstallTargetGenerator.h + cmInstallTargetGenerator.cxx + cmInstallDirectoryGenerator.h + cmInstallDirectoryGenerator.cxx + cmListFileCache.cxx + cmListFileCache.h + cmListFileLexer.c + cmLocalGenerator.cxx + cmLocalGenerator.h + cmLocalUnixMakefileGenerator3.cxx + cmMakeDepend.cxx + cmMakeDepend.h + cmMakefile.cxx + cmMakefile.h + cmMakefileTargetGenerator.cxx + cmMakefileExecutableTargetGenerator.cxx + cmMakefileLibraryTargetGenerator.cxx + cmMakefileUtilityTargetGenerator.cxx + cmOrderDirectories.cxx + cmOrderDirectories.h + cmPolicies.h + cmPolicies.cxx + cmProperty.cxx + cmProperty.h + cmPropertyDefinition.cxx + cmPropertyDefinition.h + cmPropertyDefinitionMap.cxx + cmPropertyDefinitionMap.h + cmPropertyMap.cxx + cmPropertyMap.h + cmSourceFile.cxx + cmSourceFile.h + cmSourceFileLocation.cxx + cmSourceFileLocation.h + cmSourceGroup.cxx + cmSourceGroup.h + cmSystemTools.cxx + cmSystemTools.h + cmTarget.cxx + cmTarget.h + cmTest.cxx + cmTest.h + cmVariableWatch.cxx + cmVariableWatch.h + cmVersion.cxx + cmVersion.h + cmXMLParser.cxx + cmXMLParser.h + cmake.cxx + cmake.h + cmakewizard.cxx + cmakewizard.h + ) + +# Kdevelop only works on UNIX and not windows +IF(UNIX) + SET(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx) +ENDIF(UNIX) + +IF(NOT CYGWIN) + SET(SRCS ${SRCS} cmExtraCodeBlocksGenerator.cxx) +ENDIF(NOT CYGWIN) + +# XCode only works on apple +IF(APPLE) + SET(SRCS ${SRCS} + cmXCodeObject.cxx + cmXCode21Object.cxx + cmGlobalXCodeGenerator.cxx + cmGlobalXCodeGenerator.h + cmGlobalXCode21Generator.cxx + cmGlobalXCode21Generator.h + cmLocalXCodeGenerator.cxx + cmLocalXCodeGenerator.h) +ENDIF(APPLE) + + +IF (WIN32) + SET(SRCS ${SRCS} + cmCallVisualStudioMacro.cxx + cmCallVisualStudioMacro.h + ) + + IF(NOT UNIX) + SET(SRCS ${SRCS} + cmGlobalBorlandMakefileGenerator.cxx + cmGlobalBorlandMakefileGenerator.h + cmGlobalMSYSMakefileGenerator.cxx + cmGlobalMinGWMakefileGenerator.cxx + cmGlobalNMakeMakefileGenerator.cxx + cmGlobalNMakeMakefileGenerator.h + cmGlobalVisualStudio6Generator.cxx + cmGlobalVisualStudio6Generator.h + cmGlobalVisualStudio71Generator.cxx + cmGlobalVisualStudio71Generator.h + cmGlobalVisualStudio7Generator.cxx + cmGlobalVisualStudio7Generator.h + cmGlobalVisualStudio8Generator.cxx + cmGlobalVisualStudio8Generator.h + cmGlobalVisualStudio9Generator.cxx + cmGlobalVisualStudio9Generator.h + cmGlobalVisualStudio8Win64Generator.cxx + cmGlobalVisualStudio8Win64Generator.h + cmGlobalVisualStudio9Win64Generator.cxx + cmGlobalVisualStudio9Win64Generator.h + cmGlobalVisualStudioGenerator.cxx + cmGlobalVisualStudioGenerator.h + cmGlobalWatcomWMakeGenerator.cxx + cmLocalVisualStudio6Generator.cxx + cmLocalVisualStudio6Generator.h + cmLocalVisualStudio7Generator.cxx + cmLocalVisualStudio7Generator.h + cmLocalVisualStudioGenerator.cxx + cmLocalVisualStudioGenerator.h + cmWin32ProcessExecution.cxx + cmWin32ProcessExecution.h + ) + ENDIF(NOT UNIX) +ENDIF (WIN32) + +# create a library used by the command line and the GUI +ADD_LIBRARY(CMakeLib ${SRCS}) +TARGET_LINK_LIBRARIES(CMakeLib cmsys + ${CMAKE_EXPAT_LIBRARIES} ${CMAKE_ZLIB_LIBRARIES} + ${CMAKE_TAR_LIBRARIES} ${CMAKE_COMPRESS_LIBRARIES} + ${CMAKE_CURL_LIBRARIES}) + +# On Apple we need Carbon +IF(APPLE) + TARGET_LINK_LIBRARIES(CMakeLib "-framework CoreFoundation") +ENDIF(APPLE) + +# On some platforms we need the rpcrt4 library for the VS 7 generators. +IF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW) + TARGET_LINK_LIBRARIES(CMakeLib rpcrt4) +ENDIF(CMAKE_BUILD_ON_VISUAL_STUDIO OR MINGW) + +# +# CTestLib +# +INCLUDE_DIRECTORIES( + "${CMAKE_SOURCE_DIR}/Source/CTest" + ${CMAKE_XMLRPC_INCLUDES} + ${CMAKE_CURL_INCLUDES} + ) +# +# Sources for CTestLib +# +SET(CTEST_SRCS cmCTest.cxx + CTest/cmCTestBuildAndTestHandler.cxx + CTest/cmCTestBuildCommand.cxx + CTest/cmCTestBuildHandler.cxx + CTest/cmCTestConfigureCommand.cxx + CTest/cmCTestConfigureHandler.cxx + CTest/cmCTestCoverageCommand.cxx + CTest/cmCTestCoverageHandler.cxx + CTest/cmCTestEmptyBinaryDirectoryCommand.cxx + CTest/cmCTestGenericHandler.cxx + CTest/cmCTestHandlerCommand.cxx + CTest/cmCTestMemCheckCommand.cxx + CTest/cmCTestMemCheckHandler.cxx + CTest/cmCTestReadCustomFilesCommand.cxx + CTest/cmCTestRunScriptCommand.cxx + CTest/cmCTestScriptHandler.cxx + CTest/cmCTestSleepCommand.cxx + CTest/cmCTestStartCommand.cxx + CTest/cmCTestSubmitCommand.cxx + CTest/cmCTestSubmitHandler.cxx + CTest/cmCTestTestCommand.cxx + CTest/cmCTestTestHandler.cxx + CTest/cmCTestUpdateCommand.cxx + CTest/cmCTestUpdateHandler.cxx + ) + +# Build CTestLib +ADD_LIBRARY(CTestLib ${CTEST_SRCS}) +TARGET_LINK_LIBRARIES(CTestLib CMakeLib ${CMAKE_CURL_LIBRARIES} ${CMAKE_XMLRPC_LIBRARIES}) + +# +# Sources for CPack +# +SET(CPACK_SRCS + CPack/cmCPackGeneratorFactory.cxx + CPack/cmCPackGenerator.cxx + CPack/cmCPackLog.cxx + CPack/cmCPackNSISGenerator.cxx + CPack/cmCPackSTGZGenerator.cxx + CPack/cmCPackTGZGenerator.cxx + CPack/cmCPackTarBZip2Generator.cxx + CPack/cmCPackTarCompressGenerator.cxx + CPack/cmCPackZIPGenerator.cxx + ) + +IF(WIN32 AND UNIX) + SET(CPACK_SRCS ${CPACK_SRCS} + CPack/cmCPackCygwinBinaryGenerator.cxx + CPack/cmCPackCygwinSourceGenerator.cxx + ) +ENDIF(WIN32 AND UNIX) + +IF(UNIX) + SET(CPACK_SRCS ${CPACK_SRCS} + CPack/cmCPackDebGenerator.cxx + CPack/cmCPackRPMGenerator.cxx + ) +ENDIF(UNIX) + +IF(APPLE) + SET(CPACK_SRCS ${CPACK_SRCS} + CPack/cmCPackOSXX11Generator.cxx + CPack/cmCPackPackageMakerGenerator.cxx + ) +ENDIF(APPLE) + +# Build CPackLib +ADD_LIBRARY(CPackLib ${CPACK_SRCS}) +TARGET_LINK_LIBRARIES(CPackLib CMakeLib) + +IF(APPLE) + ADD_EXECUTABLE(cmakexbuild cmakexbuild.cxx) + TARGET_LINK_LIBRARIES(cmakexbuild CMakeLib) + ADD_EXECUTABLE(OSXScriptLauncher + CPack/OSXScriptLauncher.cxx) + TARGET_LINK_LIBRARIES(OSXScriptLauncher cmsys) + TARGET_LINK_LIBRARIES(OSXScriptLauncher "-framework Carbon") +ENDIF(APPLE) + +# Build CMake executable +ADD_EXECUTABLE(cmake cmakemain.cxx) +TARGET_LINK_LIBRARIES(cmake CMakeLib) +ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation) +TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib) + +# Build special executable for running programs on Windows 98 +IF(WIN32) + IF(NOT UNIX) + ADD_EXECUTABLE(cmw9xcom cmw9xcom.cxx) + TARGET_LINK_LIBRARIES(cmw9xcom CMakeLib) + INSTALL_TARGETS(/bin cmw9xcom) + ENDIF(NOT UNIX) +ENDIF(WIN32) + +# Build CTest executable +ADD_EXECUTABLE(ctest ctest.cxx) +TARGET_LINK_LIBRARIES(ctest CTestLib) + +# Build CPack executable +ADD_EXECUTABLE(cpack CPack/cpack.cxx) +TARGET_LINK_LIBRARIES(cpack CPackLib) + +# Curses GUI +IF(BUILD_CursesDialog) + INCLUDE(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt) +ENDIF(BUILD_CursesDialog) + +# MFC GUI +# MFC libraries are only available on Visual Studio +IF(BUILD_MFCDialog) + SUBDIRS(MFCDialog) +ENDIF(BUILD_MFCDialog) + +# Qt GUI +OPTION(BUILD_QtDialog "Build Qt dialog for CMake" FALSE) +IF(BUILD_QtDialog) + SUBDIRS(QtDialog) +ENDIF(BUILD_QtDialog) + +# WX Widgets GUI +OPTION(BUILD_WXDialog "Build wxWidgets dialog for CMake" FALSE) +MARK_AS_ADVANCED(BUILD_WXDialog) +IF(BUILD_WXDialog) + SUBDIRS(WXDialog) +ENDIF(BUILD_WXDialog) + +# FLTK GUI, needs some work: generator selection, paths with spaces, ... +# OPTION(BUILD_FLTKDialog "Build FLTK dialog for CMake" FALSE) +# MARK_AS_ADVANCED(BUILD_FLTKDialog) +# IF(BUILD_FLTKDialog) +# SUBDIRS(FLTKDialog) +# ENDIF(BUILD_FLTKDialog) + +INCLUDE (${CMAKE_BINARY_DIR}/Source/LocalUserOptions.cmake OPTIONAL) +INCLUDE (${CMAKE_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL) + +INSTALL_TARGETS(/bin cmake) +INSTALL_TARGETS(/bin ctest) +INSTALL_TARGETS(/bin cpack) +IF(APPLE) + INSTALL_TARGETS(/bin cmakexbuild) +ENDIF(APPLE) + +INSTALL_FILES(${CMAKE_DATA_DIR}/include cmCPluginAPI.h) diff --git a/Source/CPack/OSXScriptLauncher.cxx b/Source/CPack/OSXScriptLauncher.cxx new file mode 100644 index 000000000..2d876f538 --- /dev/null +++ b/Source/CPack/OSXScriptLauncher.cxx @@ -0,0 +1,153 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: OSXScriptLauncher.cxx,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include +#include +#include +#include + +#include +#include + +// For the PATH_MAX constant +#include + +#define DebugError(x) \ + ofs << x << cmsys_ios::endl; \ + cmsys_ios::cout << x << cmsys_ios::endl + +int main(int argc, char* argv[]) +{ + //if ( cmsys::SystemTools::FileExists( + cmsys_stl::string cwd = cmsys::SystemTools::GetCurrentWorkingDirectory(); + cmsys_ios::ofstream ofs("/tmp/output.txt"); + + CFStringRef fileName; + CFBundleRef appBundle; + CFURLRef scriptFileURL; + UInt8 *path; + + //get CF URL for script + if (! (appBundle = CFBundleGetMainBundle())) + { + DebugError("Cannot get main bundle"); + return 1; + } + fileName = CFSTR("RuntimeScript"); + if (! (scriptFileURL = CFBundleCopyResourceURL(appBundle, fileName, NULL, + NULL))) + { + DebugError("CFBundleCopyResourceURL failed"); + return 1; + } + + //create path string + if (! (path = new UInt8[PATH_MAX])) + { + return 1; + } + + //get the file system path of the url as a cstring + //in an encoding suitable for posix apis + if ( CFURLGetFileSystemRepresentation(scriptFileURL, true, path, + PATH_MAX) == false) + { + DebugError("CFURLGetFileSystemRepresentation failed"); + return 1; + } + + //dispose of the CF variable + CFRelease(scriptFileURL); + + cmsys_stl::string fullScriptPath = reinterpret_cast(path); + delete [] path; + + + if (! cmsys::SystemTools::FileExists(fullScriptPath.c_str())) + { + return 1; + } + + cmsys_stl::string scriptDirectory = cmsys::SystemTools::GetFilenamePath( + fullScriptPath); + ofs << fullScriptPath.c_str() << cmsys_ios::endl; + cmsys_stl::vector args; + args.push_back(fullScriptPath.c_str()); + int cc; + for ( cc = 1; cc < argc; ++ cc ) + { + args.push_back(argv[cc]); + } + args.push_back(0); + + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*args.begin()); + cmsysProcess_SetWorkingDirectory(cp, scriptDirectory.c_str()); + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + cmsysProcess_SetTimeout(cp, 0); + cmsysProcess_Execute(cp); + + std::vector tempOutput; + char* data; + int length; + while(cmsysProcess_WaitForData(cp, &data, &length, 0)) + { + // Translate NULL characters in the output into valid text. + // Visual Studio 7 puts these characters in the output of its + // build process. + for(int i=0; i < length; ++i) + { + if(data[i] == '\0') + { + data[i] = ' '; + } + } + cmsys_ios::cout.write(data, length); + } + + cmsysProcess_WaitForExit(cp, 0); + + bool result = true; + if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) + { + if ( cmsysProcess_GetExitValue(cp) != 0 ) + { + result = false; + } + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exception) + { + const char* exception_str = cmsysProcess_GetExceptionString(cp); + std::cerr << exception_str << std::endl; + result = false; + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error) + { + const char* error_str = cmsysProcess_GetErrorString(cp); + std::cerr << error_str << std::endl; + result = false; + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired) + { + const char* error_str = "Process terminated due to timeout\n"; + std::cerr << error_str << std::endl; + result = false; + } + + cmsysProcess_Delete(cp); + + return 0; +} diff --git a/Source/CPack/bills-comments.txt b/Source/CPack/bills-comments.txt new file mode 100755 index 000000000..f73499d01 --- /dev/null +++ b/Source/CPack/bills-comments.txt @@ -0,0 +1,68 @@ +cpack.cxx + +cmCPackGenerators -- creates cmCPackGenericGenerator's via NewGenerator + - a cmCPackGenericGenerator factory + + +cmCPackGenericGenerator::Initialize + this->InitializeInternal + CPACK_INCLUDE_TOPLEVEL_DIRECTORY = 0 turns off + + +// binary package run +cmCPackGenericGenerator::ProcessGenerator // DoPackage + cmCPackGenericGenerator::PrepareNames -- sets a bunch of CPACK_vars + cmCPackGenericGenerator::InstallProject + run preinstall (make preinstall/fast) + call ReadListFile(cmake_install.cmake) + glob recurse in install directory to get list of files + this->CompressFiles with the list of files + + +// source package run +cmCPackGenericGenerator::ProcessGenerator // DoPackage + cmCPackGenericGenerator::PrepareNames -- sets a bunch of CPACK_vars + cmCPackGenericGenerator::InstallProject --> + if set CPACK_INSTALLED_DIRECTORIES + glob the files in that directory + copy those files to the tmp install directory _CPack something + glob recurse in install directory to get list of files + this->CompressFiles with the list of files + + +cmCPackGenericGenerator::InstallProject is used for both source and binary +packages. It is controled based on values set in CPACK_ variables. + + +InstallProject + 1. CPACK_INSTALL_COMMANDS - a list of commands used to install the package + + 2. CPACK_INSTALLED_DIRECTORIES - copy this directory to CPACK_TEMPORARY_DIRECTORY + + 3. CPACK_INSTALL_CMAKE_PROJECTS - a cmake install script + - run make preinstall + - run cmake_install.cmake + - set CMAKE_INSTALL_PREFIX to the temp directory + - CPACK_BUILD_CONFIG check this and set the BUILD_TYPE to it + - ReadListFile on the install script cmake_install.cmake + - run strip on the executables and libraries if CPACK_STRIP_FILES is TRUE + +Recommendations: + +rename cmCPackGenerators to cmCPackGeneratorFactory + +rename cmCPackGenericGenerator --> cmCPackGenerator + +rename cmCPackGenericGenerator::ProcessGenerator -> cmCPackGenerator::DoPackage + + +break up cmCPackGenerator::InstallProject so it calls the following: + +// run user provided install commands + cmCPackGenerator::RunInstallCommands(); +// copy entire directories that need no processing like source trees + cmCPackGenerator::CopyPreInstalledDirectories(); +// run the cmake install scripts if provided + cmCPackGenerator::RunCMakeInstallScripts() + +- diff --git a/Source/CPack/cmCPackConfigure.h.in b/Source/CPack/cmCPackConfigure.h.in new file mode 100755 index 000000000..84da9ac35 --- /dev/null +++ b/Source/CPack/cmCPackConfigure.h.in @@ -0,0 +1,16 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackConfigure.h.in,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.cxx b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx new file mode 100755 index 000000000..10f1e6737 --- /dev/null +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.cxx @@ -0,0 +1,112 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackCygwinBinaryGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-03-13 01:54:27 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackCygwinBinaryGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include + +//---------------------------------------------------------------------- +cmCPackCygwinBinaryGenerator::cmCPackCygwinBinaryGenerator() +{ + this->Compress = false; +} + +//---------------------------------------------------------------------- +cmCPackCygwinBinaryGenerator::~cmCPackCygwinBinaryGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackCygwinBinaryGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr"); + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0"); + std::vector path; + std::string pkgPath = cmSystemTools::FindProgram("bzip2", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find BZip2" << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str()); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Found Compress program: " + << pkgPath.c_str() + << std::endl); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackCygwinBinaryGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + std::string packageName = this->GetOption("CPACK_PACKAGE_NAME"); + packageName += "-"; + packageName += this->GetOption("CPACK_PACKAGE_VERSION"); + packageName = cmsys::SystemTools::LowerCase(packageName); + std::string manifest = "/usr/share/doc/"; + manifest += packageName; + manifest += "/MANIFEST"; + std::string manifestFile + = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + // Create a MANIFEST file that contains all of the files in + // the tar file + std::string tempdir = manifestFile; + manifestFile += manifest; + // create an extra scope to force the stream + // to create the file before the super class is called + { + cmGeneratedFileStream ofs(manifestFile.c_str()); + for(std::vector::const_iterator i = files.begin(); + i != files.end(); ++i) + { + // remove the temp dir and replace with /usr + ofs << (*i).substr(tempdir.size()) << "\n"; + } + ofs << manifest << "\n"; + } + // add the manifest file to the list of all files + std::vector filesWithManifest = files; + filesWithManifest.push_back(manifestFile); + // create the bzip2 tar file + return this->Superclass::CompressFiles(outFileName, toplevel, + filesWithManifest); +} + +const char* cmCPackCygwinBinaryGenerator::GetOutputExtension() +{ + this->OutputExtension = "-"; + const char* patchNumber =this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + if(!patchNumber) + { + patchNumber = "1"; + cmCPackLogger(cmCPackLog::LOG_WARNING, + "CPACK_CYGWIN_PATCH_NUMBER not specified using 1" + << std::endl); + } + this->OutputExtension += patchNumber; + this->OutputExtension += ".tar.bz2"; + return this->OutputExtension.c_str(); +} diff --git a/Source/CPack/cmCPackCygwinBinaryGenerator.h b/Source/CPack/cmCPackCygwinBinaryGenerator.h new file mode 100755 index 000000000..ce31b0be4 --- /dev/null +++ b/Source/CPack/cmCPackCygwinBinaryGenerator.h @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackCygwinBinaryGenerator.h,v $ + Language: C++ + Date: $Date: 2007-10-31 12:50:17 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackCygwinBinaryGenerator_h +#define cmCPackCygwinBinaryGenerator_h + +#include "cmCPackTarBZip2Generator.h" + +/** \class cmCPackCygwinBinaryGenerator + * \brief A generator for TarBZip2 files + */ +class cmCPackCygwinBinaryGenerator : public cmCPackTarBZip2Generator +{ +public: + cmCPackTypeMacro(cmCPackCygwinBinaryGenerator, cmCPackTarBZip2Generator); + + /** + * Construct generator + */ + cmCPackCygwinBinaryGenerator(); + virtual ~cmCPackCygwinBinaryGenerator(); +protected: + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension(); + std::string OutputExtension; +}; + +#endif diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.cxx b/Source/CPack/cmCPackCygwinSourceGenerator.cxx new file mode 100755 index 000000000..58ff110a7 --- /dev/null +++ b/Source/CPack/cmCPackCygwinSourceGenerator.cxx @@ -0,0 +1,197 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackCygwinSourceGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-03-13 01:54:27 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackCygwinSourceGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include + +// Includes needed for implementation of RenameFile. This is not in +// system tools because it is not implemented robustly enough to move +// files across directories. +#ifdef _WIN32 +# include +# include +#endif + +//---------------------------------------------------------------------- +cmCPackCygwinSourceGenerator::cmCPackCygwinSourceGenerator() +{ + this->Compress = false; +} + +//---------------------------------------------------------------------- +cmCPackCygwinSourceGenerator::~cmCPackCygwinSourceGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackCygwinSourceGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0"); + std::vector path; + std::string pkgPath = cmSystemTools::FindProgram("bzip2", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find BZip2" << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str()); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Found Compress program: " + << pkgPath.c_str() + << std::endl); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackCygwinSourceGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + // Create a tar file of the sources + std::string packageDirFileName + = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + packageDirFileName += ".tar"; + std::string output; + // skip one parent up to the cmCPackTGZGenerator to create tar file + this->Compress = false; // just create tar not tar.gz + if ( !this->cmCPackTGZGenerator::CompressFiles(packageDirFileName.c_str(), + toplevel, files) ) + { + return 0; + } + // Now bzip2 the source tar file + if(!this->BZip2File(packageDirFileName.c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running BZip2 on file: " + << packageDirFileName.c_str()); + return 0; + } + // Now create a tar file that contains the above .tar.bz2 file + // and the CPACK_CYGWIN_PATCH_FILE and CPACK_TOPLEVEL_DIRECTORY + // files + std::string compressOutFile = packageDirFileName + ".bz2"; + // at this point compressOutFile is the full path to + // _CPack_Package/.../package-2.5.0.tar.bz2 + // we want to create a tar _CPack_Package/.../package-2.5.0-1-src.tar.bz2 + // with these + // _CPack_Package/.../package-2.5.0-1.patch + // _CPack_Package/.../package-2.5.0-1.sh + // _CPack_Package/.../package-2.5.0.tar.bz2 + // the -1 is CPACK_CYGWIN_PATCH_NUMBER + // copy the patch file into place + if(!cmSystemTools::CopyFileAlways( + this->GetOption("CPACK_CYGWIN_PATCH_FILE"), + this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: [" + << this->GetOption("CPACK_CYGWIN_PATCH_FILE") << "]\nto\n[" + << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n"); + return 0; + } + // copy the build script into place + if(!cmSystemTools::CopyFileAlways( + this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT"), + this->GetOption("CPACK_TOPLEVEL_DIRECTORY"))) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "problem copying: " + << this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT") << "\nto\n" + << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "]\n"); + return 0; + } + // create the tar file + std::string outerTarFile + = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + outerTarFile += "-"; + const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + if(!patch) + { + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER" + << " not specified, defaulting to 1\n"); + patch = "1"; + } + outerTarFile += patch; + outerTarFile += "-src.tar"; + std::string buildScript = cmSystemTools::GetFilenameName( + this->GetOption("CPACK_CYGWIN_BUILD_SCRIPT")); + std::string patchFile = cmSystemTools::GetFilenameName( + this->GetOption("CPACK_CYGWIN_PATCH_FILE")); + std::vector outerFiles; + std::string file = cmSystemTools::GetFilenameName(compressOutFile); + std::string path = cmSystemTools::GetFilenamePath(compressOutFile); + // a source release in cygwin should have the build script used + // to build the package, the patch file that is different from the + // regular upstream version of the sources, and a bziped tar file + // of the original sources + outerFiles.push_back(buildScript); + outerFiles.push_back(patchFile); + outerFiles.push_back(file); + std::string saveDir= cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(path.c_str()); + cmSystemTools::CreateTar(outerTarFile.c_str(), + outerFiles, false, false); + cmSystemTools::ChangeDirectory(saveDir.c_str()); + // now compress the outer tar file + if(!this->BZip2File(outerTarFile.c_str())) + { + return 0; + } + compressOutFile = outerTarFile; + compressOutFile += ".bz2"; + // now rename the file to its final name + if ( !cmSystemTools::SameFile(compressOutFile.c_str(), outFileName ) ) + { + if ( !this->RenameFile(compressOutFile.c_str(), outFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem renaming: \"" + << compressOutFile.c_str() << "\" to \"" + << (outFileName ? outFileName : "(NULL)") << std::endl); + return 0; + } + } + return 1; +} + +const char* cmCPackCygwinSourceGenerator::GetPackagingInstallPrefix() +{ + this->InstallPrefix = "/"; + this->InstallPrefix += this->GetOption("CPACK_PACKAGE_FILE_NAME"); + return this->InstallPrefix.c_str(); +} + +const char* cmCPackCygwinSourceGenerator::GetOutputExtension() +{ + this->OutputExtension = "-"; + const char* patch = this->GetOption("CPACK_CYGWIN_PATCH_NUMBER"); + if(!patch) + { + cmCPackLogger(cmCPackLog::LOG_WARNING, "CPACK_CYGWIN_PATCH_NUMBER" + << " not specified, defaulting to 1\n"); + patch = "1"; + } + this->OutputExtension += patch; + this->OutputExtension += "-src.tar.bz2"; + return this->OutputExtension.c_str(); +} + diff --git a/Source/CPack/cmCPackCygwinSourceGenerator.h b/Source/CPack/cmCPackCygwinSourceGenerator.h new file mode 100755 index 000000000..0618c975c --- /dev/null +++ b/Source/CPack/cmCPackCygwinSourceGenerator.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackCygwinSourceGenerator.h,v $ + Language: C++ + Date: $Date: 2007-10-31 12:50:17 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackCygwinSourceGenerator_h +#define cmCPackCygwinSourceGenerator_h + +#include "cmCPackTarBZip2Generator.h" + +/** \class cmCPackCygwinSourceGenerator + * \brief A generator for cygwin source files + */ +class cmCPackCygwinSourceGenerator : public cmCPackTarBZip2Generator +{ +public: + cmCPackTypeMacro(cmCPackCygwinSourceGenerator, cmCPackTarBZip2Generator); + + /** + * Construct generator + */ + cmCPackCygwinSourceGenerator(); + virtual ~cmCPackCygwinSourceGenerator(); +protected: + const char* GetPackagingInstallPrefix(); + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension(); + std::string InstallPrefix; + std::string OutputExtension; +}; + +#endif diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx new file mode 100644 index 000000000..b34d2f9e9 --- /dev/null +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -0,0 +1,506 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackDebGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:12 $ + Version: $Revision: 1.20.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCPackDebGenerator.h" + +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include + +#include // USHRT_MAX + +// NOTE: +// A debian package .deb is simply an 'ar' archive. The only subtle difference +// is that debian uses the BSD ar style archive whereas most Linux distro have +// a GNU ar. +// See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=161593 for more info +// Therefore we provide our own implementation of a BSD-ar: +static int ar_append(const char*archive,const std::vector& files); + +//---------------------------------------------------------------------- +cmCPackDebGenerator::cmCPackDebGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackDebGenerator::~cmCPackDebGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackDebGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr"); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackDebGenerator::CompressFiles(const char* outFileName, + const char* toplevel, + const std::vector& files) +{ + this->ReadListFile("CPackDeb.cmake"); + const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND"); + + // debian-binary file + std::string dbfilename; + dbfilename = toplevel; + dbfilename += "/debian-binary"; + { // the scope is needed for cmGeneratedFileStream + cmGeneratedFileStream out(dbfilename.c_str()); + out << "2.0"; + out << std::endl; // required for valid debian package + } + + // control file + std::string ctlfilename; + ctlfilename = toplevel; + ctlfilename += "/control"; + + // debian policy enforce lower case for package name + // mandatory entries: + std::string debian_pkg_name = cmsys::SystemTools::LowerCase( + this->GetOption("CPACK_DEBIAN_PACKAGE_NAME") ); + const char* debian_pkg_version = + this->GetOption("CPACK_DEBIAN_PACKAGE_VERSION"); + const char* debian_pkg_section = + this->GetOption("CPACK_DEBIAN_PACKAGE_SECTION"); + const char* debian_pkg_priority = + this->GetOption("CPACK_DEBIAN_PACKAGE_PRIORITY"); + const char* debian_pkg_arch = + this->GetOption("CPACK_DEBIAN_PACKAGE_ARCHITECTURE"); + const char* maintainer = this->GetOption("CPACK_DEBIAN_PACKAGE_MAINTAINER"); + const char* desc = this->GetOption("CPACK_DEBIAN_PACKAGE_DESCRIPTION"); + + // optional entries + const char* debian_pkg_dep = this->GetOption("CPACK_DEBIAN_PACKAGE_DEPENDS"); + const char* debian_pkg_rec = + this->GetOption("CPACK_DEBIAN_PACKAGE_RECOMMENDS"); + const char* debian_pkg_sug = + this->GetOption("CPACK_DEBIAN_PACKAGE_SUGGESTS"); + + { // the scope is needed for cmGeneratedFileStream + cmGeneratedFileStream out(ctlfilename.c_str()); + out << "Package: " << debian_pkg_name << "\n"; + out << "Version: " << debian_pkg_version << "\n"; + out << "Section: " << debian_pkg_section << "\n"; + out << "Priority: " << debian_pkg_priority << "\n"; + out << "Architecture: " << debian_pkg_arch << "\n"; + if(debian_pkg_dep) + { + out << "Depends: " << debian_pkg_dep << "\n"; + } + if(debian_pkg_rec) + { + out << "Recommends: " << debian_pkg_rec << "\n"; + } + if(debian_pkg_sug) + { + out << "Suggests: " << debian_pkg_sug << "\n"; + } + out << "Maintainer: " << maintainer << "\n"; + out << "Description: " << desc << "\n"; + out << std::endl; + } + + std::string cmd; + cmd = "\""; + cmd += cmakeExecutable; + cmd += "\" -E tar cfz data.tar.gz "; + + // now add all directories which have to be compressed + // collect all top level install dirs for that + // e.g. /opt/bin/foo, /usr/bin/bar and /usr/bin/baz would give /usr and /opt + int topLevelLength = strlen(toplevel); + std::set installDirs; + for (std::vector::const_iterator fileIt = files.begin(); + fileIt != files.end(); ++ fileIt ) + { + std::string::size_type slashPos = fileIt->find('/', topLevelLength+1); + std::string relativeDir = fileIt->substr(topLevelLength, + slashPos - topLevelLength); + if (installDirs.find(relativeDir) == installDirs.end()) + { + installDirs.insert(relativeDir); + cmd += " ."; + cmd += relativeDir; + } + } + + std::string output; + int retVal = -1; + int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, + &retVal, toplevel, this->GeneratorVerbose, 0); + + if ( !res || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/Deb.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << cmd.c_str() << std::endl + << "# Working directory: " << toplevel << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: " + << cmd.c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + + std::string md5filename; + md5filename = toplevel; + md5filename += "/md5sums"; + + { // the scope is needed for cmGeneratedFileStream + cmGeneratedFileStream out(md5filename.c_str()); + std::vector::const_iterator fileIt; + std::string topLevelWithTrailingSlash = toplevel; + topLevelWithTrailingSlash += '/'; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + cmd = "\""; + cmd += cmakeExecutable; + cmd += "\" -E md5sum \""; + cmd += *fileIt; + cmd += "\""; + //std::string output; + //int retVal = -1; + res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, + &retVal, toplevel, this->GeneratorVerbose, 0); + // debian md5sums entries are like this: + // 014f3604694729f3bf19263bac599765 usr/bin/ccmake + // thus strip the full path (with the trailing slash) + cmSystemTools::ReplaceString(output, + topLevelWithTrailingSlash.c_str(), ""); + out << output; + } + // each line contains a eol. + // Do not end the md5sum file with yet another (invalid) + } + + + cmd = "\""; + cmd += cmakeExecutable; + cmd += "\" -E tar cfz control.tar.gz ./control ./md5sums"; + const char* controlExtra = + this->GetOption("CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA"); + if( controlExtra ) + { + std::vector controlExtraList; + cmSystemTools::ExpandListArgument(controlExtra, controlExtraList); + for(std::vector::iterator i = + controlExtraList.begin(); i != controlExtraList.end(); ++i) + { + std::string filenamename = + cmsys::SystemTools::GetFilenameName(i->c_str()); + std::string localcopy = toplevel; + localcopy += "/"; + localcopy += filenamename; + // if we can copy the file, it means it does exist, let's add it: + if( cmsys::SystemTools::CopyFileIfDifferent( + i->c_str(), localcopy.c_str()) ) + { + // debian is picky and need relative to ./ path in the tar.gz + cmd += " ./"; + cmd += filenamename; + } + } + } + res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, + &retVal, toplevel, this->GeneratorVerbose, 0); + + if ( !res || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/Deb.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << cmd.c_str() << std::endl + << "# Working directory: " << toplevel << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running tar command: " + << cmd.c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + + // ar -r your-package-name.deb debian-binary control.tar.gz data.tar.gz + // since debian packages require BSD ar (most Linux distros and even + // FreeBSD and NetBSD ship GNU ar) we use a copy of OpenBSD ar here. + std::vector arFiles; + std::string topLevelString = toplevel; + topLevelString += "/"; + arFiles.push_back(topLevelString + "debian-binary"); + arFiles.push_back(topLevelString + "control.tar.gz"); + arFiles.push_back(topLevelString + "data.tar.gz"); + res = ar_append(outFileName, arFiles); + if ( res!=0 ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/Deb.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Problem creating archive using: " << res << std::endl; + return 0; + } + + return 1; +} + +// The following code is taken from OpenBSD ar: +// http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ar/ +// It has been slightly modified: +// -return error codes instead exit() in functions +// -use the stdio file I/O functions instead the file descriptor based ones +// -merged into one cxx file +// -no additional options supported +// The coding style hasn't been modified. + +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Hugh Smith at The University of Guelph. + * + * 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 above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * 3. Neither the name of the University 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 OR 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. + */ + +#include +#include + +#include +#include +#include + +#define ARMAG "!\n" /* ar "magic number" */ +#define SARMAG 8 /* strlen(ARMAG); */ + +#define AR_EFMT1 "#1/" /* extended format #1 */ +#define ARFMAG "`\n" + +/* Header format strings. */ +#define HDR1 "%s%-13d%-12ld%-6u%-6u%-8o%-10lld%2s" +#define HDR2 "%-16.16s%-12ld%-6u%-6u%-8o%-10lld%2s" + +struct ar_hdr { + char ar_name[16]; /* name */ + char ar_date[12]; /* modification time */ + char ar_uid[6]; /* user id */ + char ar_gid[6]; /* group id */ + char ar_mode[8]; /* octal file permissions */ + char ar_size[10]; /* size in bytes */ + char ar_fmag[2]; /* consistency check */ +}; + +/* Set up file copy. */ +#define SETCF(from, fromname, to, toname, pad) { \ + cf.rFile = from; \ + cf.rname = fromname; \ + cf.wFile = to; \ + cf.wname = toname; \ + cf.flags = pad; \ +} + +/* File copy structure. */ +typedef struct { + FILE* rFile; /* read file descriptor */ + const char *rname; /* read name */ + FILE* wFile; /* write file descriptor */ + const char *wname; /* write name */ +#define NOPAD 0x00 /* don't pad */ +#define WPAD 0x02 /* pad on writes */ + unsigned int flags; /* pad flags */ +} CF; + +/* misc.c */ + +static const char * ar_rname(const char *path) +{ + const char *ind = strrchr(path, '/'); + return (ind ) ? ind + 1 : path; +} + +/* archive.c */ + +typedef struct ar_hdr HDR; +static char ar_hb[sizeof(HDR) + 1]; /* real header */ + +static int ar_already_written; + +/* copy_ar -- + * Copy size bytes from one file to another - taking care to handle the + * extra byte (for odd size files) when reading archives and writing an + * extra byte if necessary when adding files to archive. The length of + * the object is the long name plus the object itself; the variable + * already_written gets set if a long name was written. + * + * The padding is really unnecessary, and is almost certainly a remnant + * of early archive formats where the header included binary data which + * a PDP-11 required to start on an even byte boundary. (Or, perhaps, + * because 16-bit word addressed copies were faster?) Anyhow, it should + * have been ripped out long ago. + */ +static int copy_ar(CF *cfp, off_t size) +{ + static char pad = '\n'; + off_t sz = size; + size_t nr, nw; + char buf[8*1024]; + + if (sz == 0) + return 0; + + FILE* from = cfp->rFile; + FILE* to = cfp->wFile; + while (sz && + (nr = fread(buf, 1, sz < static_cast(sizeof(buf)) + ? static_cast(sz) : sizeof(buf), from )) + > 0) { + sz -= nr; + for (size_t off = 0; off < nr; nr -= off, off += nw) + if ((nw = fwrite(buf + off, 1, nr, to)) < nr) + return -1; + } + if (sz) + return -2; + + if (cfp->flags & WPAD && (size + ar_already_written) & 1 + && fwrite(&pad, 1, 1, to) != 1) + return -4; + + return 0; +} + +/* put_arobj -- Write an archive member to a file. */ +static int put_arobj(CF *cfp, struct stat *sb) +{ + int result = 0; + struct ar_hdr *hdr; + + /* If passed an sb structure, reading a file from disk. Get stat(2) + * information, build a name and construct a header. (Files are named + * by their last component in the archive.) */ + const char* name = ar_rname(cfp->rname); + (void)stat(cfp->rname, sb); + + /* If not truncating names and the name is too long or contains + * a space, use extended format 1. */ + unsigned int lname = strlen(name); + uid_t uid = sb->st_uid; + gid_t gid = sb->st_gid; + if (uid > USHRT_MAX) { + uid = USHRT_MAX; + } + if (gid > USHRT_MAX) { + gid = USHRT_MAX; + } + if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) + (void)sprintf(ar_hb, HDR1, AR_EFMT1, lname, + (long int)sb->st_mtime, uid, gid, sb->st_mode, + (long long)sb->st_size + lname, ARFMAG); + else { + lname = 0; + (void)sprintf(ar_hb, HDR2, name, + (long int)sb->st_mtime, uid, gid, sb->st_mode, + (long long)sb->st_size, ARFMAG); + } + off_t size = sb->st_size; + + if (fwrite(ar_hb, 1, sizeof(HDR), cfp->wFile) != sizeof(HDR)) + return -1; + + if (lname) { + if (fwrite(name, 1, lname, cfp->wFile) != lname) + return -2; + ar_already_written = lname; + } + result = copy_ar(cfp, size); + ar_already_written = 0; + return result; +} + +/* append.c */ + +/* append -- + * Append files to the archive - modifies original archive or creates + * a new archive if named archive does not exist. + */ +static int ar_append(const char* archive,const std::vector& files) +{ + int eval = 0; + FILE* aFile = fopen(archive, "wb+"); + if (aFile!=NULL) { + fwrite(ARMAG, SARMAG, 1, aFile); + if (fseek(aFile, 0, SEEK_END) != -1) { + CF cf; + struct stat sb; + /* Read from disk, write to an archive; pad on write. */ + SETCF(NULL, 0, aFile, archive, WPAD); + for(std::vector::const_iterator fileIt = files.begin(); + fileIt!=files.end(); ++fileIt) { + const char* filename = fileIt->c_str(); + FILE* file = fopen(filename, "rb"); + if (file == NULL) { + eval = -1; + continue; + } + cf.rFile = file; + cf.rname = filename; + int result = put_arobj(&cf, &sb); + (void)fclose(file); + if (result!=0) { + eval = -2; + break; + } + } + } + else { + eval = -3; + } + fclose(aFile); + } + else { + eval = -4; + } + return eval; +} diff --git a/Source/CPack/cmCPackDebGenerator.h b/Source/CPack/cmCPackDebGenerator.h new file mode 100644 index 000000000..487fc9b78 --- /dev/null +++ b/Source/CPack/cmCPackDebGenerator.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackDebGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackDebGenerator_h +#define cmCPackDebGenerator_h + + +#include "cmCPackGenerator.h" + +/** \class cmCPackDebGenerator + * \brief A generator for Debian packages + * + */ +class cmCPackDebGenerator : public cmCPackGenerator +{ +public: + cmCPackTypeMacro(cmCPackDebGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackDebGenerator(); + virtual ~cmCPackDebGenerator(); + +protected: + virtual int InitializeInternal(); + virtual int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".deb"; } + +}; + +#endif diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx new file mode 100755 index 000000000..c161b6282 --- /dev/null +++ b/Source/CPack/cmCPackGenerator.cxx @@ -0,0 +1,1094 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-03-13 01:54:27 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackGenerator.h" + +#include "cmMakefile.h" +#include "cmCPackLog.h" +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmGeneratedFileStream.h" + +#include +#include +#include // auto_ptr + +//---------------------------------------------------------------------- +cmCPackGenerator::cmCPackGenerator() +{ + this->GeneratorVerbose = false; + this->MakefileMap = 0; + this->Logger = 0; +} + +//---------------------------------------------------------------------- +cmCPackGenerator::~cmCPackGenerator() +{ + this->MakefileMap = 0; +} + +//---------------------------------------------------------------------- +void cmCPackGeneratorProgress(const char *msg, float prog, void* ptr) +{ + cmCPackGenerator* self = static_cast(ptr); + self->DisplayVerboseOutput(msg, prog); +} + +//---------------------------------------------------------------------- +void cmCPackGenerator::DisplayVerboseOutput(const char* msg, + float progress) +{ + (void)progress; + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "" << msg << std::endl); +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::PrepareNames() +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Create temp directory." << std::endl); + + std::string tempDirectory = this->GetOption("CPACK_PACKAGE_DIRECTORY"); + tempDirectory += "/_CPack_Packages/"; + const char* toplevelTag = this->GetOption("CPACK_TOPLEVEL_TAG"); + if ( toplevelTag ) + { + tempDirectory += toplevelTag; + tempDirectory += "/"; + } + tempDirectory += this->GetOption("CPACK_GENERATOR"); + std::string topDirectory = tempDirectory; + this->GetOption("CPACK_PACKAGE_FILE_NAME"); + const char* pfname = this->GetOption("CPACK_PACKAGE_FILE_NAME"); + if(!pfname) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_FILE_NAME not specified" << std::endl); + return 0; + } + std::string outName = pfname; + tempDirectory += "/" + outName; + if(!this->GetOutputExtension()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "No output extension specified" << std::endl); + return 0; + } + outName += this->GetOutputExtension(); + const char* pdir = this->GetOption("CPACK_PACKAGE_DIRECTORY"); + if(!pdir) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_DIRECTORY not specified" << std::endl); + return 0; + } + + std::string destFile = pdir; + destFile += "/" + outName; + std::string outFile = topDirectory + "/" + outName; + bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR")); + std::string installPrefix = tempDirectory; + if (!setDestDir) + { + installPrefix += this->GetPackagingInstallPrefix(); + } + + this->SetOptionIfNotSet("CPACK_TOPLEVEL_DIRECTORY", topDirectory.c_str()); + this->SetOptionIfNotSet("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str()); + this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_NAME", outName.c_str()); + this->SetOptionIfNotSet("CPACK_OUTPUT_FILE_PATH", destFile.c_str()); + this->SetOptionIfNotSet("CPACK_TEMPORARY_PACKAGE_FILE_NAME", + outFile.c_str()); + this->SetOptionIfNotSet("CPACK_INSTALL_DIRECTORY", this->GetInstallPath()); + this->SetOptionIfNotSet("CPACK_NATIVE_INSTALL_DIRECTORY", + cmsys::SystemTools::ConvertToOutputPath(this->GetInstallPath()).c_str()); + this->SetOptionIfNotSet("CPACK_TEMPORARY_INSTALL_DIRECTORY", + installPrefix.c_str()); + + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Look for: CPACK_PACKAGE_DESCRIPTION_FILE" << std::endl); + const char* descFileName + = this->GetOption("CPACK_PACKAGE_DESCRIPTION_FILE"); + if ( descFileName ) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Look for: " << descFileName << std::endl); + if ( !cmSystemTools::FileExists(descFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find description file name: [" + << descFileName << "]" << std::endl); + return 0; + } + std::ifstream ifs(descFileName); + if ( !ifs ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot open description file name: " << descFileName << std::endl); + return 0; + } + cmOStringStream ostr; + std::string line; + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "Read description file: " << descFileName << std::endl); + while ( ifs && cmSystemTools::GetLineFromStream(ifs, line) ) + { + ostr << cmSystemTools::MakeXMLSafe(line.c_str()) << std::endl; + } + this->SetOptionIfNotSet("CPACK_PACKAGE_DESCRIPTION", ostr.str().c_str()); + } + if ( !this->GetOption("CPACK_PACKAGE_DESCRIPTION") ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Project description not specified. Please specify " + "CPACK_PACKAGE_DESCRIPTION or CPACK_PACKAGE_DESCRIPTION_FILE." + << std::endl); + return 0; + } + + this->SetOptionIfNotSet("CPACK_REMOVE_TOPLEVEL_DIRECTORY", "1"); + + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InstallProject() +{ + cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Install projects" << std::endl); + this->CleanTemporaryDirectory(); + std::string tempInstallDirectoryWithPostfix + = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); + const char* tempInstallDirectory = tempInstallDirectoryWithPostfix.c_str(); + int res = 1; + if ( !cmsys::SystemTools::MakeDirectory(tempInstallDirectory)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem creating temporary directory: " + << (tempInstallDirectory ? tempInstallDirectory : "(NULL}") + << std::endl); + return 0; + } + + bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR")); + if ( setDestDir ) + { + std::string destDir = "DESTDIR="; + destDir += tempInstallDirectory; + cmSystemTools::PutEnv(destDir.c_str()); + } + else + { + // Make sure there is no destdir + cmSystemTools::PutEnv("DESTDIR="); + } + + // If the CPackConfig file sets CPACK_INSTALL_COMMANDS then run them + // as listed + if ( !this->InstallProjectViaInstallCommands( + setDestDir, tempInstallDirectory) ) + { + return 0; + } + + // If the CPackConfig file sets CPACK_INSTALL_SCRIPT then run them + // as listed + if ( !this->InstallProjectViaInstallScript( + setDestDir, tempInstallDirectory) ) + { + return 0; + } + + // If the CPackConfig file sets CPACK_INSTALLED_DIRECTORIES + // then glob it and copy it to CPACK_TEMPORARY_DIRECTORY + // This is used in Source packageing + if ( !this->InstallProjectViaInstalledDirectories( + setDestDir, tempInstallDirectory) ) + { + return 0; + } + + + // If the project is a CMAKE project then run pre-install + // and then read the cmake_install script to run it + if ( !this->InstallProjectViaInstallCMakeProjects( + setDestDir, tempInstallDirectory) ) + { + return 0; + } + + if ( setDestDir ) + { + cmSystemTools::PutEnv("DESTDIR="); + } + + return res; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InstallProjectViaInstallCommands( + bool setDestDir, const char* tempInstallDirectory) +{ + (void)setDestDir; + (void)tempInstallDirectory; + const char* installCommands = this->GetOption("CPACK_INSTALL_COMMANDS"); + if ( installCommands && *installCommands ) + { + std::string tempInstallDirectoryEnv = "CMAKE_INSTALL_PREFIX="; + tempInstallDirectoryEnv += tempInstallDirectory; + cmSystemTools::PutEnv(tempInstallDirectoryEnv.c_str()); + std::vector installCommandsVector; + cmSystemTools::ExpandListArgument(installCommands,installCommandsVector); + std::vector::iterator it; + for ( it = installCommandsVector.begin(); + it != installCommandsVector.end(); + ++it ) + { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << it->c_str() + << std::endl); + std::string output; + int retVal = 1; + bool resB = cmSystemTools::RunSingleCommand(it->c_str(), &output, + &retVal, 0, this->GeneratorVerbose, 0); + if ( !resB || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/InstallOutput.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << it->c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem running install command: " << it->c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" + << std::endl); + return 0; + } + } + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InstallProjectViaInstalledDirectories( + bool setDestDir, const char* tempInstallDirectory) +{ + (void)setDestDir; + (void)tempInstallDirectory; + std::vector ignoreFilesRegex; + const char* cpackIgnoreFiles = this->GetOption("CPACK_IGNORE_FILES"); + if ( cpackIgnoreFiles ) + { + std::vector ignoreFilesRegexString; + cmSystemTools::ExpandListArgument(cpackIgnoreFiles, + ignoreFilesRegexString); + std::vector::iterator it; + for ( it = ignoreFilesRegexString.begin(); + it != ignoreFilesRegexString.end(); + ++it ) + { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "Create ignore files regex for: " << it->c_str() << std::endl); + ignoreFilesRegex.push_back(it->c_str()); + } + } + const char* installDirectories + = this->GetOption("CPACK_INSTALLED_DIRECTORIES"); + if ( installDirectories && *installDirectories ) + { + std::vector installDirectoriesVector; + cmSystemTools::ExpandListArgument(installDirectories, + installDirectoriesVector); + if ( installDirectoriesVector.size() % 2 != 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_INSTALLED_DIRECTORIES should contain pairs of and " + ". The can be '.' to be installed in " + "the toplevel directory of installation." << std::endl); + return 0; + } + std::vector::iterator it; + const char* tempDir = tempInstallDirectory; + for ( it = installDirectoriesVector.begin(); + it != installDirectoriesVector.end(); + ++it ) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); + cmsys::Glob gl; + std::string toplevel = it->c_str(); + it ++; + std::string subdir = it->c_str(); + std::string findExpr = toplevel; + findExpr += "/*"; + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Install directory: " << toplevel << std::endl); + gl.RecurseOn(); + if ( !gl.FindFiles(findExpr) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find any files in the installed directory" << std::endl); + return 0; + } + std::vector& files = gl.GetFiles(); + std::vector::iterator gfit; + std::vector::iterator regIt; + for ( gfit = files.begin(); gfit != files.end(); ++ gfit ) + { + bool skip = false; + std::string &inFile = *gfit; + for ( regIt= ignoreFilesRegex.begin(); + regIt!= ignoreFilesRegex.end(); + ++ regIt) + { + if ( regIt->find(inFile.c_str()) ) + { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Ignore file: " + << inFile.c_str() << std::endl); + skip = true; + } + } + if ( skip ) + { + continue; + } + std::string filePath = tempDir; + filePath += "/" + subdir + "/" + + cmSystemTools::RelativePath(toplevel.c_str(), gfit->c_str()); + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: " + << inFile.c_str() << " -> " << filePath.c_str() << std::endl); + if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(), + filePath.c_str()) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying file: " + << inFile.c_str() << " -> " << filePath.c_str() << std::endl); + return 0; + } + } + } + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InstallProjectViaInstallScript( + bool setDestDir, const char* tempInstallDirectory) +{ + const char* cmakeScripts + = this->GetOption("CPACK_INSTALL_SCRIPT"); + std::string currentWorkingDirectory = + cmSystemTools::GetCurrentWorkingDirectory(); + if ( cmakeScripts && *cmakeScripts ) + { + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Install scripts: " << cmakeScripts << std::endl); + std::vector cmakeScriptsVector; + cmSystemTools::ExpandListArgument(cmakeScripts, + cmakeScriptsVector); + std::vector::iterator it; + for ( it = cmakeScriptsVector.begin(); + it != cmakeScriptsVector.end(); + ++it ) + { + std::string installScript = it->c_str(); + + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Install script: " << installScript << std::endl); + + if ( setDestDir ) + { + // For DESTDIR based packaging, use the *project* CMAKE_INSTALL_PREFIX + // underneath the tempInstallDirectory. The value of the project's + // CMAKE_INSTALL_PREFIX is sent in here as the value of the + // CPACK_INSTALL_PREFIX variable. + std::string dir; + if (this->GetOption("CPACK_INSTALL_PREFIX")) + { + dir += this->GetOption("CPACK_INSTALL_PREFIX"); + } + this->SetOption("CMAKE_INSTALL_PREFIX", dir.c_str()); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Using DESTDIR + CPACK_INSTALL_PREFIX... (this->SetOption)" + << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" << std::endl); + } + else + { + this->SetOption("CMAKE_INSTALL_PREFIX", tempInstallDirectory); + + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Using non-DESTDIR install... (this->SetOption)" << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Setting CMAKE_INSTALL_PREFIX to '" << tempInstallDirectory + << "'" << std::endl); + } + + this->SetOptionIfNotSet("CMAKE_CURRENT_BINARY_DIR", + tempInstallDirectory); + this->SetOptionIfNotSet("CMAKE_CURRENT_SOURCE_DIR", + tempInstallDirectory); + int res = this->MakefileMap->ReadListFile(0, installScript.c_str()); + if ( cmSystemTools::GetErrorOccuredFlag() || !res ) + { + return 0; + } + } + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( + bool setDestDir, const char* tempInstallDirectory) +{ + const char* cmakeProjects + = this->GetOption("CPACK_INSTALL_CMAKE_PROJECTS"); + const char* cmakeGenerator + = this->GetOption("CPACK_CMAKE_GENERATOR"); + std::string currentWorkingDirectory = + cmSystemTools::GetCurrentWorkingDirectory(); + if ( cmakeProjects && *cmakeProjects ) + { + if ( !cmakeGenerator ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_INSTALL_CMAKE_PROJECTS is specified, but " + "CPACK_CMAKE_GENERATOR is not. CPACK_CMAKE_GENERATOR " + "is required to install the project." + << std::endl); + return 0; + } + std::vector cmakeProjectsVector; + cmSystemTools::ExpandListArgument(cmakeProjects, + cmakeProjectsVector); + std::vector::iterator it; + for ( it = cmakeProjectsVector.begin(); + it != cmakeProjectsVector.end(); + ++it ) + { + if ( it+1 == cmakeProjectsVector.end() || + it+2 == cmakeProjectsVector.end() || + it+3 == cmakeProjectsVector.end() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Not enough items on list: CPACK_INSTALL_CMAKE_PROJECTS. " + "CPACK_INSTALL_CMAKE_PROJECTS should hold quadruplet of install " + "directory, install project name, install component, and install " + "subdirectory." + << std::endl); + return 0; + } + std::string installDirectory = it->c_str(); + ++it; + std::string installProjectName = it->c_str(); + ++it; + std::string installComponent = it->c_str(); + ++it; + std::string installSubDirectory = it->c_str(); + std::string installFile = installDirectory + "/cmake_install.cmake"; + + const char* buildConfig = this->GetOption("CPACK_BUILD_CONFIG"); + cmGlobalGenerator* globalGenerator + = this->MakefileMap->GetCMakeInstance()->CreateGlobalGenerator( + cmakeGenerator); + // set the global flag for unix style paths on cmSystemTools as + // soon as the generator is set. This allows gmake to be used + // on windows. + cmSystemTools::SetForceUnixPaths(globalGenerator->GetForceUnixPaths()); + + // Does this generator require pre-install? + if ( globalGenerator->GetPreinstallTargetName() ) + { + globalGenerator->FindMakeProgram(this->MakefileMap); + const char* cmakeMakeProgram + = this->MakefileMap->GetDefinition("CMAKE_MAKE_PROGRAM"); + std::string buildCommand + = globalGenerator->GenerateBuildCommand(cmakeMakeProgram, + installProjectName.c_str(), 0, + globalGenerator->GetPreinstallTargetName(), + buildConfig, false, false); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Install command: " << buildCommand << std::endl); + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Run preinstall target for: " << installProjectName << std::endl); + std::string output; + int retVal = 1; + bool resB = + cmSystemTools::RunSingleCommand(buildCommand.c_str(), + &output, + &retVal, + installDirectory.c_str(), + this->GeneratorVerbose, 0); + if ( !resB || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/PreinstallOutput.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << buildCommand.c_str() << std::endl + << "# Directory: " << installDirectory.c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem running install command: " << buildCommand.c_str() + << std::endl + << "Please check " << tmpFile.c_str() << " for errors" + << std::endl); + return 0; + } + } + delete globalGenerator; + + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Install project: " << installProjectName << std::endl); + cmake cm; + cm.AddCMakePaths(); + cm.SetProgressCallback(cmCPackGeneratorProgress, this); + cmGlobalGenerator gg; + gg.SetCMakeInstance(&cm); + std::auto_ptr lg(gg.CreateLocalGenerator()); + lg->SetGlobalGenerator(&gg); + cmMakefile *mf = lg->GetMakefile(); + std::string realInstallDirectory = tempInstallDirectory; + if ( !installSubDirectory.empty() && installSubDirectory != "/" ) + { + realInstallDirectory += installSubDirectory; + } + + if ( setDestDir ) + { + // For DESTDIR based packaging, use the *project* CMAKE_INSTALL_PREFIX + // underneath the tempInstallDirectory. The value of the project's + // CMAKE_INSTALL_PREFIX is sent in here as the value of the + // CPACK_INSTALL_PREFIX variable. + std::string dir; + if (this->GetOption("CPACK_INSTALL_PREFIX")) + { + dir += this->GetOption("CPACK_INSTALL_PREFIX"); + } + mf->AddDefinition("CMAKE_INSTALL_PREFIX", dir.c_str()); + + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Using DESTDIR + CPACK_INSTALL_PREFIX... (mf->AddDefinition)" + << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Setting CMAKE_INSTALL_PREFIX to '" << dir << "'" << std::endl); + } + else + { + mf->AddDefinition("CMAKE_INSTALL_PREFIX", tempInstallDirectory); + + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Using non-DESTDIR install... (mf->AddDefinition)" << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "- Setting CMAKE_INSTALL_PREFIX to '" << tempInstallDirectory + << "'" << std::endl); + } + + if ( buildConfig && *buildConfig ) + { + mf->AddDefinition("BUILD_TYPE", buildConfig); + } + std::string installComponentLowerCase + = cmSystemTools::LowerCase(installComponent); + if ( installComponentLowerCase != "all" ) + { + mf->AddDefinition("CMAKE_INSTALL_COMPONENT", + installComponent.c_str()); + } + + // strip on TRUE, ON, 1, one or several file names, but not on + // FALSE, OFF, 0 and an empty string + if (!cmSystemTools::IsOff(this->GetOption("CPACK_STRIP_FILES"))) + { + mf->AddDefinition("CMAKE_INSTALL_DO_STRIP", "1"); + } + int res = mf->ReadListFile(0, installFile.c_str()); + if ( cmSystemTools::GetErrorOccuredFlag() || !res ) + { + return 0; + } + } + } + return 1; +} + +//---------------------------------------------------------------------- +bool cmCPackGenerator::ReadListFile(const char* moduleName) +{ + std::string fullPath = this->MakefileMap->GetModulesFile(moduleName); + return this->MakefileMap->ReadListFile(0, fullPath.c_str()); +} + +//---------------------------------------------------------------------- +void cmCPackGenerator::SetOptionIfNotSet(const char* op, + const char* value) +{ + const char* def = this->MakefileMap->GetDefinition(op); + if ( def && *def ) + { + return; + } + this->SetOption(op, value); +} + +//---------------------------------------------------------------------- +void cmCPackGenerator::SetOption(const char* op, const char* value) +{ + if ( !op ) + { + return; + } + if ( !value ) + { + this->MakefileMap->RemoveDefinition(op); + return; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, this->GetNameOfClass() + << "::SetOption(" << op << ", " << value << ")" << std::endl); + this->MakefileMap->AddDefinition(op, value); +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::DoPackage() +{ + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "Create package using " << this->Name.c_str() << std::endl); + + if ( !this->PrepareNames() ) + { + return 0; + } + + if ( cmSystemTools::IsOn( + this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY")) ) + { + const char* toplevelDirectory + = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + if ( cmSystemTools::FileExists(toplevelDirectory) ) + { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove toplevel directory: " + << toplevelDirectory << std::endl); + if ( !cmSystemTools::RemoveADirectory(toplevelDirectory) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem removing toplevel directory: " + << toplevelDirectory + << std::endl); + return 0; + } + } + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "About to install project " << std::endl); + + if ( !this->InstallProject() ) + { + return 0; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Done install project " << std::endl); + + + const char* tempPackageFileName = this->GetOption( + "CPACK_TEMPORARY_PACKAGE_FILE_NAME"); + const char* packageFileName = this->GetOption("CPACK_OUTPUT_FILE_PATH"); + const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + + + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl); + cmsys::Glob gl; + std::string findExpr = tempDirectory; + findExpr += "/*"; + gl.RecurseOn(); + if ( !gl.FindFiles(findExpr) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find any files in the packaging tree" << std::endl); + return 0; + } + + cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Compress package" << std::endl); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Compress files to: " + << (tempPackageFileName ? tempPackageFileName : "(NULL)") << std::endl); + if ( cmSystemTools::FileExists(tempPackageFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Remove old package file" + << std::endl); + cmSystemTools::RemoveFile(tempPackageFileName); + } + if ( cmSystemTools::IsOn(this->GetOption( + "CPACK_INCLUDE_TOPLEVEL_DIRECTORY")) ) + { + tempDirectory = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + } + if ( !this->CompressFiles(tempPackageFileName, + tempDirectory, gl.GetFiles()) || cmSystemTools::GetErrorOccuredFlag()) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem compressing the directory" + << std::endl); + return 0; + } + + cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Finalize package" << std::endl); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Copy final package: " + << (tempPackageFileName ? tempPackageFileName : "(NULL)" ) + << " to " + << (packageFileName ? packageFileName : "(NULL)") + << std::endl); + if ( !cmSystemTools::CopyFileIfDifferent(tempPackageFileName, + packageFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the package: " + << (tempPackageFileName ? tempPackageFileName : "(NULL)" ) + << " to " + << (packageFileName ? packageFileName : "(NULL)") + << std::endl); + return 0; + } + + cmCPackLogger(cmCPackLog::LOG_OUTPUT, "Package " + << (packageFileName ? packageFileName : "(NULL)") + << " generated." << std::endl); + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::Initialize(const char* name, cmMakefile* mf, + const char* argv0) +{ + this->MakefileMap = mf; + this->Name = name; + if ( !this->FindRunningCMake(argv0) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot initialize the generator" << std::endl); + return 0; + } + // set the running generator name + this->SetOption("CPACK_GENERATOR", this->Name.c_str()); + // Load the project specific config file + const char* config = + this->GetOption("CPACK_PROJECT_CONFIG_FILE"); + if(config) + { + mf->ReadListFile(config); + } + int result = this->InitializeInternal(); + if (cmSystemTools::GetErrorOccuredFlag()) + { + return 0; + } + + // If a generator subclass did not already set this option in its + // InitializeInternal implementation, and the project did not already set + // it, the default value should be: + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/"); + + return result; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::InitializeInternal() +{ + return 1; +} + +//---------------------------------------------------------------------- +bool cmCPackGenerator::IsSet(const char* name) const +{ + return this->MakefileMap->IsSet(name); +} + +//---------------------------------------------------------------------- +const char* cmCPackGenerator::GetOption(const char* op) +{ + const char* ret = this->MakefileMap->GetDefinition(op); + if(!ret) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Warning, GetOption return NULL for: " + << op + << std::endl); + } + return ret; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::FindRunningCMake(const char* arg0) +{ + int found = 0; + // Find our own executable. + std::vector failures; + this->CPackSelf = arg0; + cmSystemTools::ConvertToUnixSlashes(this->CPackSelf); + failures.push_back(this->CPackSelf); + this->CPackSelf = cmSystemTools::FindProgram(this->CPackSelf.c_str()); + if(!cmSystemTools::FileExists(this->CPackSelf.c_str())) + { + failures.push_back(this->CPackSelf); + this->CPackSelf = "/usr/local/bin/ctest"; + } + if(!cmSystemTools::FileExists(this->CPackSelf.c_str())) + { + failures.push_back(this->CPackSelf); + cmOStringStream msg; + msg << "CPack can not find the command line program ctest.\n"; + msg << " argv[0] = \"" << arg0 << "\"\n"; + msg << " Attempted paths:\n"; + std::vector::iterator i; + for(i=failures.begin(); i != failures.end(); ++i) + { + msg << " \"" << i->c_str() << "\"\n"; + } + cmCPackLogger(cmCPackLog::LOG_ERROR, msg.str().c_str() + << std::endl); + return 0; + } + std::string dir; + std::string file; + if(cmSystemTools::SplitProgramPath(this->CPackSelf.c_str(), + dir, file, true)) + { + this->CMakeSelf = dir += "/cmake"; + this->CMakeSelf += cmSystemTools::GetExecutableExtension(); + if(cmSystemTools::FileExists(this->CMakeSelf.c_str())) + { + found = 1; + } + } + if ( !found ) + { + failures.push_back(this->CMakeSelf); +#ifdef CMAKE_BUILD_DIR + std::string intdir = "."; +#ifdef CMAKE_INTDIR + intdir = CMAKE_INTDIR; +#endif + this->CMakeSelf = CMAKE_BUILD_DIR; + this->CMakeSelf += "/bin/"; + this->CMakeSelf += intdir; + this->CMakeSelf += "/cmake"; + this->CMakeSelf += cmSystemTools::GetExecutableExtension(); +#endif + if(!cmSystemTools::FileExists(this->CMakeSelf.c_str())) + { + failures.push_back(this->CMakeSelf); + cmOStringStream msg; + msg << "CPack can not find the command line program cmake.\n"; + msg << " argv[0] = \"" << arg0 << "\"\n"; + msg << " Attempted paths:\n"; + std::vector::iterator i; + for(i=failures.begin(); i != failures.end(); ++i) + { + msg << " \"" << i->c_str() << "\"\n"; + } + cmCPackLogger(cmCPackLog::LOG_ERROR, msg.str().c_str() + << std::endl); + return 0; + } + } + // do CMAKE_ROOT, look for the environment variable first + std::string cMakeRoot; + std::string modules; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT" << std::endl); + if (getenv("CMAKE_ROOT")) + { + cMakeRoot = getenv("CMAKE_ROOT"); + modules = cMakeRoot + "/Modules/CMake.cmake"; + } + if(modules.empty() || !cmSystemTools::FileExists(modules.c_str())) + { + // next try exe/.. + cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str()); + std::string::size_type slashPos = cMakeRoot.rfind("/"); + if(slashPos != std::string::npos) + { + cMakeRoot = cMakeRoot.substr(0, slashPos); + } + // is there no Modules direcory there? + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } + + if (!cmSystemTools::FileExists(modules.c_str())) + { + // try exe/../share/cmake + cMakeRoot += CMAKE_DATA_DIR; + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } +#ifdef CMAKE_ROOT_DIR + if (!cmSystemTools::FileExists(modules.c_str())) + { + // try compiled in root directory + cMakeRoot = CMAKE_ROOT_DIR; + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } +#endif +#ifdef CMAKE_PREFIX + if (!cmSystemTools::FileExists(modules.c_str())) + { + // try compiled in install prefix + cMakeRoot = CMAKE_PREFIX CMAKE_DATA_DIR; + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } +#endif + if (!cmSystemTools::FileExists(modules.c_str())) + { + // try + cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str()); + cMakeRoot += CMAKE_DATA_DIR; + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } + if(!cmSystemTools::FileExists(modules.c_str())) + { + // next try exe + cMakeRoot = cmSystemTools::GetProgramPath(this->CMakeSelf.c_str()); + // is there no Modules direcory there? + modules = cMakeRoot + "/Modules/CMake.cmake"; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << modules.c_str() << std::endl); + } + if (!cmSystemTools::FileExists(modules.c_str())) + { + // couldn't find modules + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Could not find CMAKE_ROOT !!!" << std::endl + << "CMake has most likely not been installed correctly." << std::endl + <<"Modules directory not found in" << std::endl + << cMakeRoot.c_str() + << std::endl); + return 0; + } + this->CMakeRoot = cMakeRoot; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Looking for CMAKE_ROOT: " + << this->CMakeRoot.c_str() << std::endl); + this->SetOption("CMAKE_ROOT", this->CMakeRoot.c_str()); + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + (void)outFileName; + (void)toplevel; + (void)files; + return 0; +} + +//---------------------------------------------------------------------- +const char* cmCPackGenerator::GetInstallPath() +{ + if ( !this->InstallPath.empty() ) + { + return this->InstallPath.c_str(); + } +#if defined(_WIN32) && !defined(__CYGWIN__) + const char* prgfiles = cmsys::SystemTools::GetEnv("ProgramFiles"); + const char* sysDrive = cmsys::SystemTools::GetEnv("SystemDrive"); + if ( prgfiles ) + { + this->InstallPath = prgfiles; + } + else if ( sysDrive ) + { + this->InstallPath = sysDrive; + this->InstallPath += "/Program Files"; + } + else + { + this->InstallPath = "c:/Program Files"; + } + this->InstallPath += "/"; + this->InstallPath += this->GetOption("CPACK_PACKAGE_NAME"); + this->InstallPath += "-"; + this->InstallPath += this->GetOption("CPACK_PACKAGE_VERSION"); +#else + this->InstallPath = "/usr/local/"; +#endif + return this->InstallPath.c_str(); +} + +//---------------------------------------------------------------------- +const char* cmCPackGenerator::GetPackagingInstallPrefix() +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, "GetPackagingInstallPrefix: '" + << this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX") << "'" << std::endl); + + return this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX"); +} + +//---------------------------------------------------------------------- +std::string cmCPackGenerator::FindTemplate(const char* name) +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Look for template: " + << (name ? name : "(NULL)") << std::endl); + std::string ffile = this->MakefileMap->GetModulesFile(name); + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Found template: " + << ffile.c_str() << std::endl); + return ffile; +} + +//---------------------------------------------------------------------- +bool cmCPackGenerator::ConfigureString(const std::string& inString, + std::string& outString) +{ + this->MakefileMap->ConfigureString(inString, + outString, true, false); + return true; +} + +//---------------------------------------------------------------------- +bool cmCPackGenerator::ConfigureFile(const char* inName, + const char* outName, bool copyOnly /* = false */) +{ + return this->MakefileMap->ConfigureFile(inName, outName, + copyOnly, true, false) == 1; +} + +//---------------------------------------------------------------------- +int cmCPackGenerator::CleanTemporaryDirectory() +{ + std::string tempInstallDirectoryWithPostfix + = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); + const char* tempInstallDirectory = tempInstallDirectoryWithPostfix.c_str(); + if(cmsys::SystemTools::FileExists(tempInstallDirectory)) + { + cmCPackLogger(cmCPackLog::LOG_OUTPUT, + "- Clean temporary : " + << tempInstallDirectory << std::endl); + if(!cmsys::SystemTools::RemoveADirectory(tempInstallDirectory)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem removing temporary directory: " << + tempInstallDirectory + << std::endl); + return 0; + } + } + return 1; +} diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h new file mode 100755 index 000000000..a82e4cb9f --- /dev/null +++ b/Source/CPack/cmCPackGenerator.h @@ -0,0 +1,137 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-06 13:28:26 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackGenerator_h +#define cmCPackGenerator_h + +#include "cmObject.h" + +#define cmCPackTypeMacro(class, superclass) \ + cmTypeMacro(class, superclass); \ + static cmCPackGenerator* CreateGenerator() { return new class; } + +#define cmCPackLogger(logType, msg) \ + do { \ + cmOStringStream cmCPackLog_msg; \ + cmCPackLog_msg << msg; \ + this->Logger->Log(logType, __FILE__, __LINE__,\ + cmCPackLog_msg.str().c_str());\ + } while ( 0 ) + +#ifdef cerr +# undef cerr +#endif +#define cerr no_cerr_use_cmCPack_Log + +#ifdef cout +# undef cout +#endif +#define cout no_cout_use_cmCPack_Log + +class cmMakefile; +class cmCPackLog; + +/** \class cmCPackGenerator + * \brief A superclass of all CPack Generators + * + */ +class cmCPackGenerator : public cmObject +{ +public: + cmTypeMacro(cmCPackGenerator, cmObject); + /** + * If verbose then more informaiton is printed out + */ + void SetVerbose(bool val) { this->GeneratorVerbose = val; } + + /** + * Do the actual processing. Subclass has to override it. + * Return 0 if error. + */ + virtual int DoPackage(); + + /** + * Initialize generator + */ + int Initialize(const char* name, cmMakefile* mf, const char* argv0); + + /** + * Construct generator + */ + cmCPackGenerator(); + virtual ~cmCPackGenerator(); + + //! Set and get the options + void SetOption(const char* op, const char* value); + void SetOptionIfNotSet(const char* op, const char* value); + const char* GetOption(const char* op); + bool IsSet(const char* name) const; + + //! Set all the variables + int FindRunningCMake(const char* arg0); + + //! Set the logger + void SetLogger(cmCPackLog* log) { this->Logger = log; } + + //! Display verbose information via logger + void DisplayVerboseOutput(const char* msg, float progress); + + bool ReadListFile(const char* moduleName); + +protected: + int PrepareNames(); + int InstallProject(); + int CleanTemporaryDirectory(); + virtual const char* GetOutputExtension() { return ".cpack"; } + virtual const char* GetOutputPostfix() { return 0; } + virtual int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetInstallPath(); + virtual const char* GetPackagingInstallPrefix(); + + virtual std::string FindTemplate(const char* name); + virtual bool ConfigureFile(const char* inName, const char* outName, + bool copyOnly = false); + virtual bool ConfigureString(const std::string& input, std::string& output); + virtual int InitializeInternal(); + + + //! Run install commands if specified + virtual int InstallProjectViaInstallCommands( + bool setDestDir, const char* tempInstallDirectory); + virtual int InstallProjectViaInstallScript( + bool setDestDir, const char* tempInstallDirectory); + virtual int InstallProjectViaInstalledDirectories( + bool setDestDir, const char* tempInstallDirectory); + virtual int InstallProjectViaInstallCMakeProjects( + bool setDestDir, const char* tempInstallDirectory); + + bool GeneratorVerbose; + std::string Name; + + std::string InstallPath; + + std::string CPackSelf; + std::string CMakeSelf; + std::string CMakeRoot; + + cmCPackLog* Logger; +private: + cmMakefile* MakefileMap; +}; + +#endif diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx new file mode 100755 index 000000000..a02f3f6bc --- /dev/null +++ b/Source/CPack/cmCPackGeneratorFactory.cxx @@ -0,0 +1,136 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackGeneratorFactory.cxx,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackGeneratorFactory.h" + +#include "cmCPackGenerator.h" +#include "cmCPackTGZGenerator.h" +#include "cmCPackTarBZip2Generator.h" +#include "cmCPackTarCompressGenerator.h" +#include "cmCPackZIPGenerator.h" +#include "cmCPackSTGZGenerator.h" +#include "cmCPackNSISGenerator.h" +#ifdef __APPLE__ +# include "cmCPackPackageMakerGenerator.h" +# include "cmCPackOSXX11Generator.h" +#endif + +#ifdef __CYGWIN__ +# include "cmCPackCygwinBinaryGenerator.h" +# include "cmCPackCygwinSourceGenerator.h" +#endif + +#if !defined(_WIN32) && !defined(__APPLE__) \ + && !defined(__QNXNTO__) && !defined(__BEOS__) +# include "cmCPackDebGenerator.h" +# include "cmCPackRPMGenerator.h" +#endif + + +#include "cmCPackLog.h" + +//---------------------------------------------------------------------- +cmCPackGeneratorFactory::cmCPackGeneratorFactory() +{ + this->RegisterGenerator("TGZ", "Tar GZip compression", + cmCPackTGZGenerator::CreateGenerator); + this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression", + cmCPackSTGZGenerator::CreateGenerator); + this->RegisterGenerator("NSIS", "Null Soft Installer", + cmCPackNSISGenerator::CreateGenerator); +#ifdef __CYGWIN__ + this->RegisterGenerator("CygwinBinary", "Cygwin Binary Installer", + cmCPackCygwinBinaryGenerator::CreateGenerator); + this->RegisterGenerator("CygwinSource", "Cygwin Source Installer", + cmCPackCygwinSourceGenerator::CreateGenerator); +#endif + + this->RegisterGenerator("ZIP", "ZIP file format", + cmCPackZIPGenerator::CreateGenerator); + this->RegisterGenerator("TBZ2", "Tar BZip2 compression", + cmCPackTarBZip2Generator::CreateGenerator); + this->RegisterGenerator("TZ", "Tar Compress compression", + cmCPackTarCompressGenerator::CreateGenerator); +#ifdef __APPLE__ + this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker installer", + cmCPackPackageMakerGenerator::CreateGenerator); + this->RegisterGenerator("OSXX11", "Mac OSX X11 bundle", + cmCPackOSXX11Generator::CreateGenerator); +#endif +#if !defined(_WIN32) && !defined(__APPLE__) \ + && !defined(__QNXNTO__) && !defined(__BEOS__) + this->RegisterGenerator("DEB", "Debian packages", + cmCPackDebGenerator::CreateGenerator); + this->RegisterGenerator("RPM", "RPM packages", + cmCPackRPMGenerator::CreateGenerator); +#endif +} + +//---------------------------------------------------------------------- +cmCPackGeneratorFactory::~cmCPackGeneratorFactory() +{ + std::vector::iterator it; + for ( it = this->Generators.begin(); it != this->Generators.end(); ++ it ) + { + delete *it; + } +} + +//---------------------------------------------------------------------- +cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(const char* name) +{ + cmCPackGenerator* gen = this->NewGeneratorInternal(name); + if ( !gen ) + { + return 0; + } + this->Generators.push_back(gen); + gen->SetLogger(this->Logger); + return gen; +} + +//---------------------------------------------------------------------- +cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal( + const char* name) +{ + if ( !name ) + { + return 0; + } + cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it + = this->GeneratorCreators.find(name); + if ( it == this->GeneratorCreators.end() ) + { + return 0; + } + return (it->second)(); +} + +//---------------------------------------------------------------------- +void cmCPackGeneratorFactory::RegisterGenerator(const char* name, + const char* generatorDescription, + CreateGeneratorCall* createGenerator) +{ + if ( !name || !createGenerator ) + { + cmCPack_Log(this->Logger, cmCPackLog::LOG_ERROR, + "Cannot register generator" << std::endl); + return; + } + this->GeneratorCreators[name] = createGenerator; + this->GeneratorDescriptions[name] = generatorDescription; +} diff --git a/Source/CPack/cmCPackGeneratorFactory.h b/Source/CPack/cmCPackGeneratorFactory.h new file mode 100755 index 000000000..321efe4d1 --- /dev/null +++ b/Source/CPack/cmCPackGeneratorFactory.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackGeneratorFactory.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackGeneratorFactory_h +#define cmCPackGeneratorFactory_h + +#include "cmObject.h" + +class cmCPackLog; +class cmCPackGenerator; + +/** \class cmCPackGeneratorFactory + * \brief A container for CPack generators + * + */ +class cmCPackGeneratorFactory : public cmObject +{ +public: + cmTypeMacro(cmCPackGeneratorFactory, cmObject); + + cmCPackGeneratorFactory(); + ~cmCPackGeneratorFactory(); + + //! Get the generator + cmCPackGenerator* NewGenerator(const char* name); + void DeleteGenerator(cmCPackGenerator* gen); + + typedef cmCPackGenerator* CreateGeneratorCall(); + + void RegisterGenerator(const char* name, + const char* generatorDescription, + CreateGeneratorCall* createGenerator); + + void SetLogger(cmCPackLog* logger) { this->Logger = logger; } + + typedef std::map DescriptionsMap; + const DescriptionsMap& GetGeneratorsList() const + { return this->GeneratorDescriptions; } + +private: + cmCPackGenerator* NewGeneratorInternal(const char* name); + std::vector Generators; + + typedef std::map t_GeneratorCreatorsMap; + t_GeneratorCreatorsMap GeneratorCreators; + DescriptionsMap GeneratorDescriptions; + cmCPackLog* Logger; +}; + +#endif diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx new file mode 100644 index 000000000..a498f322c --- /dev/null +++ b/Source/CPack/cmCPackLog.cxx @@ -0,0 +1,224 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackLog.cxx,v $ + Language: C++ + Date: $Date: 2006-03-10 18:06:26 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackLog.h" + +#include "cmGeneratedFileStream.h" + +//---------------------------------------------------------------------- +cmCPackLog::cmCPackLog() +{ + this->Verbose = false; + this->Debug = false; + this->Quiet = false; + this->NewLine = true; + + this->LastTag = cmCPackLog::NOTAG; +#undef cerr +#undef cout + this->DefaultOutput = &std::cout; + this->DefaultError = &std::cerr; + + this->LogOutput = 0; + this->LogOutputCleanup = false; +} + +//---------------------------------------------------------------------- +cmCPackLog::~cmCPackLog() +{ + this->SetLogOutputStream(0); +} + +//---------------------------------------------------------------------- +void cmCPackLog::SetLogOutputStream(std::ostream* os) +{ + if ( this->LogOutputCleanup && this->LogOutput ) + { + delete this->LogOutput; + } + this->LogOutputCleanup = false; + this->LogOutput = os; +} + +//---------------------------------------------------------------------- +bool cmCPackLog::SetLogOutputFile(const char* fname) +{ + cmGeneratedFileStream *cg = 0; + if ( fname ) + { + cg = new cmGeneratedFileStream(fname); + } + if ( cg && !*cg ) + { + delete cg; + cg = 0; + } + this->SetLogOutputStream(cg); + if ( !cg ) + { + return false; + } + this->LogOutputCleanup = true; + return true; +} + +//---------------------------------------------------------------------- +void cmCPackLog::Log(int tag, const char* file, int line, + const char* msg, size_t length) +{ + // By default no logging + bool display = false; + + // Display file and line number if debug + bool useFileAndLine = this->Debug; + + bool output = false; + bool debug = false; + bool warning = false; + bool error = false; + bool verbose = false; + + // When writing in file, add list of tags whenever tag changes. + std::string tagString; + bool needTagString = false; + if ( this->LogOutput && this->LastTag != tag ) + { + needTagString = true; + } + + if ( tag & LOG_OUTPUT ) + { + output = true; + display = true; + if ( needTagString ) + { + if ( tagString.size() > 0 ) { tagString += ","; } + tagString = "VERBOSE"; + } + } + if ( tag & LOG_WARNING ) + { + warning = true; + display = true; + if ( needTagString ) + { + if ( tagString.size() > 0 ) { tagString += ","; } + tagString = "WARNING"; + } + } + if ( tag & LOG_ERROR ) + { + error = true; + display = true; + if ( needTagString ) + { + if ( tagString.size() > 0 ) { tagString += ","; } + tagString = "ERROR"; + } + } + if ( tag & LOG_DEBUG && this->Debug ) + { + debug = true; + display = true; + if ( needTagString ) + { + if ( tagString.size() > 0 ) { tagString += ","; } + tagString = "DEBUG"; + } + useFileAndLine = true; + } + if ( tag & LOG_VERBOSE && this->Verbose ) + { + verbose = true; + display = true; + if ( needTagString ) + { + if ( tagString.size() > 0 ) { tagString += ","; } + tagString = "VERBOSE"; + } + } + if ( this->Quiet ) + { + display = false; + } + if ( this->LogOutput ) + { + if ( needTagString ) + { + *this->LogOutput << "[" << file << ":" << line << " " + << tagString << "] "; + } + this->LogOutput->write(msg, length); + } + this->LastTag = tag; + if ( !display ) + { + return; + } + if ( this->NewLine ) + { + if ( error && !this->ErrorPrefix.empty() ) + { + *this->DefaultError << this->ErrorPrefix.c_str(); + } + else if ( warning && !this->WarningPrefix.empty() ) + { + *this->DefaultError << this->WarningPrefix.c_str(); + } + else if ( output && !this->OutputPrefix.empty() ) + { + *this->DefaultOutput << this->OutputPrefix.c_str(); + } + else if ( verbose && !this->VerbosePrefix.empty() ) + { + *this->DefaultOutput << this->VerbosePrefix.c_str(); + } + else if ( debug && !this->DebugPrefix.empty() ) + { + *this->DefaultOutput << this->DebugPrefix.c_str(); + } + else if ( !this->Prefix.empty() ) + { + *this->DefaultOutput << this->Prefix.c_str(); + } + if ( useFileAndLine ) + { + if ( error || warning ) + { + *this->DefaultError << file << ":" << line << " "; + } + else + { + *this->DefaultOutput << file << ":" << line << " "; + } + } + } + if ( error || warning ) + { + this->DefaultError->write(msg, length); + this->DefaultError->flush(); + } + else + { + this->DefaultOutput->write(msg, length); + this->DefaultOutput->flush(); + } + if ( msg[length-1] == '\n' || length > 2 ) + { + this->NewLine = true; + } +} diff --git a/Source/CPack/cmCPackLog.h b/Source/CPack/cmCPackLog.h new file mode 100644 index 000000000..7e9ca1092 --- /dev/null +++ b/Source/CPack/cmCPackLog.h @@ -0,0 +1,160 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackLog.h,v $ + Language: C++ + Date: $Date: 2006-03-10 18:06:26 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackLog_h +#define cmCPackLog_h + +#include "cmObject.h" + +#define cmCPack_Log(ctSelf, logType, msg) \ + do { \ + cmOStringStream cmCPackLog_msg; \ + cmCPackLog_msg << msg; \ + (ctSelf)->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str());\ + } while ( 0 ) + +#ifdef cerr +# undef cerr +#endif +#define cerr no_cerr_use_cmCPack_Log + +#ifdef cout +# undef cout +#endif +#define cout no_cout_use_cmCPack_Log + + +/** \class cmCPackLog + * \brief A container for CPack generators + * + */ +class cmCPackLog : public cmObject +{ +public: + cmTypeMacro(cmCPackLog, cmObject); + + cmCPackLog(); + ~cmCPackLog(); + + enum __log_tags { + NOTAG = 0, + LOG_OUTPUT = 0x1, + LOG_VERBOSE = 0x2, + LOG_DEBUG = 0x4, + LOG_WARNING = 0x8, + LOG_ERROR = 0x10 + }; + + //! Various signatures for logging. + void Log(const char* file, int line, const char* msg) + { + this->Log(LOG_OUTPUT, file, line, msg); + } + void Log(const char* file, int line, const char* msg, size_t length) + { + this->Log(LOG_OUTPUT, file, line, msg, length); + } + void Log(int tag, const char* file, int line, const char* msg) + { + this->Log(tag, file, line, msg, strlen(msg)); + } + void Log(int tag, const char* file, int line, const char* msg, + size_t length); + + //! Set Verbose + void VerboseOn() { this->SetVerbose(true); } + void VerboseOff() { this->SetVerbose(true); } + void SetVerbose(bool verb) { this->Verbose = verb; } + bool GetVerbose() { return this->Verbose; } + + //! Set Debug + void DebugOn() { this->SetDebug(true); } + void DebugOff() { this->SetDebug(true); } + void SetDebug(bool verb) { this->Debug = verb; } + bool GetDebug() { return this->Debug; } + + //! Set Quiet + void QuietOn() { this->SetQuiet(true); } + void QuietOff() { this->SetQuiet(true); } + void SetQuiet(bool verb) { this->Quiet = verb; } + bool GetQuiet() { return this->Quiet; } + + //! Set the output stream + void SetOutputStream(std::ostream* os) { this->DefaultOutput = os; } + + //! Set the error stream + void SetErrorStream(std::ostream* os) { this->DefaultError = os; } + + //! Set the log output stream + void SetLogOutputStream(std::ostream* os); + + //! Set the log output file. The cmCPackLog will try to create file. If it + // cannot, it will report an error. + bool SetLogOutputFile(const char* fname); + + //! Set the various prefixes for the logging. SetPrefix sets the generic + // prefix that overwrittes missing ones. + void SetPrefix(std::string pfx) { this->Prefix = pfx; } + void SetOutputPrefix(std::string pfx) { this->OutputPrefix = pfx; } + void SetVerbosePrefix(std::string pfx) { this->VerbosePrefix = pfx; } + void SetDebugPrefix(std::string pfx) { this->DebugPrefix = pfx; } + void SetWarningPrefix(std::string pfx) { this->WarningPrefix = pfx; } + void SetErrorPrefix(std::string pfx) { this->ErrorPrefix = pfx; } + +private: + bool Verbose; + bool Debug; + bool Quiet; + + bool NewLine; + + int LastTag; + + std::string Prefix; + std::string OutputPrefix; + std::string VerbosePrefix; + std::string DebugPrefix; + std::string WarningPrefix; + std::string ErrorPrefix; + + std::ostream *DefaultOutput; + std::ostream *DefaultError; + + std::string LogOutputFileName; + std::ostream *LogOutput; + // Do we need to cleanup log output stream + bool LogOutputCleanup; +}; + +class cmCPackLogWrite +{ +public: + cmCPackLogWrite(const char* data, size_t length) + : Data(data), Length(length) {} + + const char* Data; + size_t Length; +}; + +inline std::ostream& operator<< (std::ostream& os, const cmCPackLogWrite& c) +{ + os.write(c.Data, c.Length); + os.flush(); + return os; +} + +#endif diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx new file mode 100644 index 000000000..fcc35c450 --- /dev/null +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -0,0 +1,417 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackNSISGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-15 15:40:55 $ + Version: $Revision: 1.31 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackNSISGenerator.h" + +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include +#include +#include + +/* NSIS uses different command line syntax on Windows and others */ +#ifdef _WIN32 +# define NSIS_OPT "/" +#else +# define NSIS_OPT "-" +#endif + +//---------------------------------------------------------------------- +cmCPackNSISGenerator::cmCPackNSISGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackNSISGenerator::~cmCPackNSISGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackNSISGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + (void)outFileName; // TODO: Fix nsis to force out file name + (void)toplevel; + std::string nsisInFileName = this->FindTemplate("NSIS.template.in"); + if ( nsisInFileName.size() == 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPack error: Could not find NSIS installer template file." + << std::endl); + return false; + } + std::string nsisInInstallOptions + = this->FindTemplate("NSIS.InstallOptions.ini.in"); + if ( nsisInInstallOptions.size() == 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPack error: Could not find NSIS installer options file." + << std::endl); + return false; + } + std::string nsisFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + std::string tmpFile = nsisFileName; + tmpFile += "/NSISOutput.log"; + std::string nsisInstallOptions = nsisFileName + "/NSIS.InstallOptions.ini"; + nsisFileName += "/project.nsi"; + cmOStringStream str; + std::vector::const_iterator it; + for ( it = files.begin(); it != files.end(); ++ it ) + { + std::string fileN = cmSystemTools::RelativePath(toplevel, + it->c_str()); + cmSystemTools::ReplaceString(fileN, "/", "\\"); + str << " Delete \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " + << str.str().c_str() << std::endl); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str()); + std::vector dirs; + this->GetListOfSubdirectories(toplevel, dirs); + std::vector::const_iterator sit; + cmOStringStream dstr; + for ( sit = dirs.begin(); sit != dirs.end(); ++ sit ) + { + std::string fileN = cmSystemTools::RelativePath(toplevel, + sit->c_str()); + if ( fileN.empty() ) + { + continue; + } + cmSystemTools::ReplaceString(fileN, "/", "\\"); + dstr << " RMDir \"$INSTDIR\\" << fileN.c_str() << "\"" << std::endl; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " + << dstr.str().c_str() << std::endl); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", + dstr.str().c_str()); + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName + << " to " << nsisFileName << std::endl); + if(this->IsSet("CPACK_NSIS_MUI_ICON") + && this->IsSet("CPACK_NSIS_MUI_UNIICON")) + { + std::string installerIconCode="!define MUI_ICON \""; + installerIconCode += this->GetOption("CPACK_NSIS_MUI_ICON"); + installerIconCode += "\"\n"; + installerIconCode += "!define MUI_UNICON \""; + installerIconCode += this->GetOption("CPACK_NSIS_MUI_UNIICON"); + installerIconCode += "\"\n"; + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_ICON_CODE", + installerIconCode.c_str()); + } + if(this->IsSet("CPACK_PACKAGE_ICON")) + { + std::string installerIconCode = "!define MUI_HEADERIMAGE_BITMAP \""; + installerIconCode += this->GetOption("CPACK_PACKAGE_ICON"); + installerIconCode += "\"\n"; + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_ICON_CODE", + installerIconCode.c_str()); + } + this->ConfigureFile(nsisInInstallOptions.c_str(), + nsisInstallOptions.c_str()); + this->ConfigureFile(nsisInFileName.c_str(), nsisFileName.c_str()); + std::string nsisCmd = "\""; + nsisCmd += this->GetOption("CPACK_INSTALLER_PROGRAM"); + nsisCmd += "\" \"" + nsisFileName + "\""; + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd.c_str() + << std::endl); + std::string output; + int retVal = 1; + bool res = cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, + &retVal, 0, this->GeneratorVerbose, 0); + if ( !res || retVal ) + { + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << nsisCmd.c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running NSIS command: " + << nsisCmd.c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackNSISGenerator::InitializeInternal() +{ + if ( cmSystemTools::IsOn(this->GetOption( + "CPACK_INCLUDE_TOPLEVEL_DIRECTORY")) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY. " + "This option will be ignored." + << std::endl); + this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", 0); + } + + cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()" + << std::endl); + std::vector path; + std::string nsisPath; + +#ifdef _WIN32 + if ( !cmsys::SystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS", nsisPath) ) + { + cmCPackLogger + (cmCPackLog::LOG_ERROR, + "Cannot find NSIS registry value. This is usually caused by NSIS " + "not being installed. Please install NSIS from " + "http://nsis.sourceforge.net" + << std::endl); + return 0; + } + path.push_back(nsisPath); +#endif + nsisPath = cmSystemTools::FindProgram("makensis", path, false); + if ( nsisPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find NSIS compiler" + << std::endl); + return 0; + } + std::string nsisCmd = "\"" + nsisPath + "\" " NSIS_OPT "VERSION"; + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Test NSIS version: " + << nsisCmd.c_str() << std::endl); + std::string output; + int retVal = 1; + bool resS = cmSystemTools::RunSingleCommand(nsisCmd.c_str(), + &output, &retVal, 0, this->GeneratorVerbose, 0); + + cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)"); + if ( !resS || retVal || !versionRex.find(output)) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/NSISOutput.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << nsisCmd.c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem checking NSIS version with command: " + << nsisCmd.c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + double nsisVersion = atof(versionRex.match(1).c_str()); + double minNSISVersion = 2.09; + cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: " + << nsisVersion << std::endl); + if ( nsisVersion < minNSISVersion ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPack requires NSIS Version 2.09 or greater. NSIS found on the system " + "was: " + << nsisVersion << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str()); + const char* cpackPackageExecutables + = this->GetOption("CPACK_PACKAGE_EXECUTABLES"); + const char* cpackPackageDeskTopLinks + = this->GetOption("CPACK_CREATE_DESKTOP_LINKS"); + std::vector cpackPackageDesktopLinksVector; + if(cpackPackageDeskTopLinks) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: " + << cpackPackageDeskTopLinks << std::endl); + + cmSystemTools:: + ExpandListArgument(cpackPackageDeskTopLinks, + cpackPackageDesktopLinksVector); + for(std::vector::iterator i = + cpackPackageDesktopLinksVector.begin(); i != + cpackPackageDesktopLinksVector.end(); ++i) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: " + << *i << std::endl); + } + } + else + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "CPACK_CREATE_DESKTOP_LINKS: " + << "not set" << std::endl); + + } + if ( cpackPackageExecutables ) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: " + << cpackPackageExecutables << "." << std::endl); + cmOStringStream str; + cmOStringStream deleteStr; + std::vector cpackPackageExecutablesVector; + cmSystemTools::ExpandListArgument(cpackPackageExecutables, + cpackPackageExecutablesVector); + if ( cpackPackageExecutablesVector.size() % 2 != 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_EXECUTABLES should contain pairs of and " + "." << std::endl); + return 0; + } + std::vector::iterator it; + for ( it = cpackPackageExecutablesVector.begin(); + it != cpackPackageExecutablesVector.end(); + ++it ) + { + std::string execName = *it; + ++ it; + std::string linkName = *it; + str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\" + << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\"" + << std::endl; + deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName + << ".lnk\"" << std::endl; + // see if CPACK_CREATE_DESKTOP_LINK_ExeName is on + // if so add a desktop link + if(cpackPackageDesktopLinksVector.size() && + std::find(cpackPackageDesktopLinksVector.begin(), + cpackPackageDesktopLinksVector.end(), + execName) + != cpackPackageDesktopLinksVector.end()) + { + str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + str << " CreateShortCut \"$DESKTOP\\" + << linkName << ".lnk\" \"$INSTDIR\\bin\\" << execName << ".exe\"" + << std::endl; + deleteStr << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + deleteStr << " Delete \"$DESKTOP\\" << linkName + << ".lnk\"" << std::endl; + } + } + this->CreateMenuLinks(str, deleteStr); + this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str().c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", + deleteStr.str().c_str()); + } + this->SetOptionIfNotSet("CPACK_NSIS_COMPRESSOR", "lzma"); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str, + cmOStringStream& deleteStr) +{ + const char* cpackMenuLinks + = this->GetOption("CPACK_NSIS_MENU_LINKS"); + if(!cpackMenuLinks) + { + return; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackMenuLinks: " + << cpackMenuLinks << "." << std::endl); + std::vector cpackMenuLinksVector; + cmSystemTools::ExpandListArgument(cpackMenuLinks, + cpackMenuLinksVector); + if ( cpackMenuLinksVector.size() % 2 != 0 ) + { + cmCPackLogger( + cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_EXECUTABLES should contain pairs of and " + "." << std::endl); + return; + } + std::vector::iterator it; + for ( it = cpackMenuLinksVector.begin(); + it != cpackMenuLinksVector.end(); + ++it ) + { + std::string sourceName = *it; + bool url = false; + if(sourceName.find("http:") == 0) + { + url = true; + } + /* convert / to \\ */ + if(!url) + { + cmSystemTools::ReplaceString(sourceName, "/", "\\"); + } + ++ it; + std::string linkName = *it; + if(!url) + { + str << " CreateShortCut \"$SMPROGRAMS\\$STARTMENU_FOLDER\\" + << linkName << ".lnk\" \"$INSTDIR\\" << sourceName << "\"" + << std::endl; + deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName + << ".lnk\"" << std::endl; + } + else + { + str << " WriteINIStr \"$SMPROGRAMS\\$STARTMENU_FOLDER\\" + << linkName << ".url\" \"InternetShortcut\" \"URL\" \"" + << sourceName << "\"" + << std::endl; + deleteStr << " Delete \"$SMPROGRAMS\\$MUI_TEMP\\" << linkName + << ".url\"" << std::endl; + } + // see if CPACK_CREATE_DESKTOP_LINK_ExeName is on + // if so add a desktop link + std::string desktop = "CPACK_CREATE_DESKTOP_LINK_"; + desktop += linkName; + if(this->IsSet(desktop.c_str())) + { + str << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + str << " CreateShortCut \"$DESKTOP\\" + << linkName << ".lnk\" \"$INSTDIR\\" << sourceName << "\"" + << std::endl; + deleteStr << " StrCmp \"$INSTALL_DESKTOP\" \"1\" 0 +2\n"; + deleteStr << " Delete \"$DESKTOP\\" << linkName + << ".lnk\"" << std::endl; + } + } +} + +//---------------------------------------------------------------------- +bool cmCPackNSISGenerator::GetListOfSubdirectories(const char* topdir, + std::vector& dirs) +{ + cmsys::Directory dir; + dir.Load(topdir); + size_t fileNum; + for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) + { + if (strcmp(dir.GetFile(static_cast(fileNum)),".") && + strcmp(dir.GetFile(static_cast(fileNum)),"..")) + { + cmsys_stl::string fullPath = topdir; + fullPath += "/"; + fullPath += dir.GetFile(static_cast(fileNum)); + if(cmsys::SystemTools::FileIsDirectory(fullPath.c_str()) && + !cmsys::SystemTools::FileIsSymlink(fullPath.c_str())) + { + if (!this->GetListOfSubdirectories(fullPath.c_str(), dirs)) + { + return false; + } + } + } + } + dirs.push_back(topdir); + return true; +} diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h new file mode 100644 index 000000000..bec85f14e --- /dev/null +++ b/Source/CPack/cmCPackNSISGenerator.h @@ -0,0 +1,53 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackNSISGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackNSISGenerator_h +#define cmCPackNSISGenerator_h + + +#include "cmCPackGenerator.h" + +/** \class cmCPackNSISGenerator + * \brief A generator for NSIS files + * + * http://people.freebsd.org/~kientzle/libarchive/ + */ +class cmCPackNSISGenerator : public cmCPackGenerator +{ +public: + cmCPackTypeMacro(cmCPackNSISGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackNSISGenerator(); + virtual ~cmCPackNSISGenerator(); + +protected: + virtual int InitializeInternal(); + void CreateMenuLinks( cmOStringStream& str, + cmOStringStream& deleteStr); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".exe"; } + virtual const char* GetOutputPostfix() { return "win32"; } + + bool GetListOfSubdirectories(const char* dir, + std::vector& dirs); +}; + +#endif diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx new file mode 100644 index 000000000..3059c5802 --- /dev/null +++ b/Source/CPack/cmCPackOSXX11Generator.cxx @@ -0,0 +1,267 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackOSXX11Generator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-31 12:50:17 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCPackOSXX11Generator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include + +//---------------------------------------------------------------------- +cmCPackOSXX11Generator::cmCPackOSXX11Generator() +{ +} + +//---------------------------------------------------------------------- +cmCPackOSXX11Generator::~cmCPackOSXX11Generator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackOSXX11Generator::CompressFiles(const char* outFileName, + const char* toplevel, + const std::vector& files) +{ + (void) files; // TODO: Fix api to not need files. + (void) toplevel; // TODO: Use toplevel + + const char* cpackPackageExecutables + = this->GetOption("CPACK_PACKAGE_EXECUTABLES"); + if ( cpackPackageExecutables ) + { + cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: " + << cpackPackageExecutables << "." << std::endl); + cmOStringStream str; + cmOStringStream deleteStr; + std::vector cpackPackageExecutablesVector; + cmSystemTools::ExpandListArgument(cpackPackageExecutables, + cpackPackageExecutablesVector); + if ( cpackPackageExecutablesVector.size() % 2 != 0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "CPACK_PACKAGE_EXECUTABLES should contain pairs of and " + "." << std::endl); + return 0; + } + std::vector::iterator it; + for ( it = cpackPackageExecutablesVector.begin(); + it != cpackPackageExecutablesVector.end(); + ++it ) + { + std::string cpackExecutableName = *it; + ++ it; + this->SetOptionIfNotSet("CPACK_EXECUTABLE_NAME", + cpackExecutableName.c_str()); + } + } + + // Disk image directories + std::string diskImageDirectory = toplevel; + std::string diskImageBackgroundImageDir + = diskImageDirectory + "/.background"; + + + // App bundle directories + std::string packageDirFileName = toplevel; + packageDirFileName += "/"; + packageDirFileName += this->GetOption("CPACK_PACKAGE_FILE_NAME"); + packageDirFileName += ".app"; + std::string contentsDirectory = packageDirFileName + "/Contents"; + std::string resourcesDirectory = contentsDirectory + "/Resources"; + std::string appDirectory = contentsDirectory + "/MacOS"; + + const char* dir = resourcesDirectory.c_str(); + const char* appdir = appDirectory.c_str(); + const char* contDir = contentsDirectory.c_str(); + const char* iconFile = this->GetOption("CPACK_PACKAGE_ICON"); + if ( iconFile ) + { + std::string iconFileName = cmsys::SystemTools::GetFilenameName( + iconFile); + if ( !cmSystemTools::FileExists(iconFile) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find icon file: " + << iconFile << ". Please check CPACK_PACKAGE_ICON setting." + << std::endl); + return 0; + } + std::string destFileName = resourcesDirectory + "/" + iconFileName; + this->ConfigureFile(iconFile, destFileName.c_str(), true); + this->SetOptionIfNotSet("CPACK_APPLE_GUI_ICON", iconFileName.c_str()); + } + + std::string applicationsLinkName = diskImageDirectory + "/Applications"; + cmSystemTools::CreateSymlink("/Applications", applicationsLinkName.c_str()); + + if ( + !this->CopyResourcePlistFile("VolumeIcon.icns", + diskImageDirectory.c_str(), + ".VolumeIcon.icns", true ) || + !this->CopyResourcePlistFile("DS_Store", diskImageDirectory.c_str(), + ".DS_Store", true ) || + !this->CopyResourcePlistFile("background.png", + diskImageBackgroundImageDir.c_str(), "background.png", true ) || + !this->CopyResourcePlistFile("RuntimeScript", dir) || + !this->CopyResourcePlistFile("OSXX11.Info.plist", contDir, + "Info.plist" ) || + !this->CopyResourcePlistFile("OSXScriptLauncher", appdir, + this->GetOption("CPACK_PACKAGE_FILE_NAME"), true) + ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" + << std::endl); + return 0; + } + + std::string output; + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/hdiutilOutput.log"; + cmOStringStream dmgCmd; + dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE") + << "\" create -ov -format UDZO -srcfolder \"" + << diskImageDirectory.c_str() + << "\" \"" << outFileName << "\""; + int retVal = 1; + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "Compress disk image using command: " + << dmgCmd.str().c_str() << std::endl); + bool res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, + &retVal, 0, this->GeneratorVerbose, 0); + if ( !res || retVal ) + { + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << dmgCmd.str().c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: " + << dmgCmd.str().c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackOSXX11Generator::InitializeInternal() +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "cmCPackOSXX11Generator::Initialize()" << std::endl); + std::vector path; + std::string pkgPath = cmSystemTools::FindProgram("hdiutil", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler" + << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", + pkgPath.c_str()); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +/* +bool cmCPackOSXX11Generator::CopyCreateResourceFile(const char* name) +{ + std::string uname = cmSystemTools::UpperCase(name); + std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; + const char* inFileName = this->GetOption(cpackVar.c_str()); + if ( !inFileName ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() + << " not specified. It should point to " + << (name ? name : "(NULL)") + << ".rtf, " << name + << ".html, or " << name << ".txt file" << std::endl); + return false; + } + if ( !cmSystemTools::FileExists(inFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " + << (name ? name : "(NULL)") + << " resource file: " << inFileName << std::endl); + return false; + } + std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName); + if ( ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt" ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Bad file extension specified: " + << ext << ". Currently only .rtfd, .rtf, .html, and .txt files allowed." + << std::endl); + return false; + } + + std::string destFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + destFileName += "/Resources/"; + destFileName += name + ext; + + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + << (inFileName ? inFileName : "(NULL)") + << " to " << destFileName.c_str() << std::endl); + this->ConfigureFile(inFileName, destFileName.c_str()); + return true; +} +*/ + +//---------------------------------------------------------------------- +bool cmCPackOSXX11Generator::CopyResourcePlistFile(const char* name, + const char* dir, const char* outputFileName /* = 0 */, + bool copyOnly /* = false */) +{ + std::string inFName = "CPack."; + inFName += name; + inFName += ".in"; + std::string inFileName = this->FindTemplate(inFName.c_str()); + if ( inFileName.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find input file: " + << inFName << std::endl); + return false; + } + + if ( !outputFileName ) + { + outputFileName = name; + } + + std::string destFileName = dir; + destFileName += "/"; + destFileName += outputFileName; + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + << inFileName.c_str() << " to " << destFileName.c_str() << std::endl); + this->ConfigureFile(inFileName.c_str(), destFileName.c_str(), copyOnly); + return true; +} + +//---------------------------------------------------------------------- +const char* cmCPackOSXX11Generator::GetPackagingInstallPrefix() +{ + this->InstallPrefix = "/"; + this->InstallPrefix += this->GetOption("CPACK_PACKAGE_FILE_NAME"); + this->InstallPrefix += ".app/Contents/Resources"; + return this->InstallPrefix.c_str(); +} diff --git a/Source/CPack/cmCPackOSXX11Generator.h b/Source/CPack/cmCPackOSXX11Generator.h new file mode 100644 index 000000000..5c666bc27 --- /dev/null +++ b/Source/CPack/cmCPackOSXX11Generator.h @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackOSXX11Generator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackOSXX11Generator_h +#define cmCPackOSXX11Generator_h + +#include "cmCPackGenerator.h" + +/** \class cmCPackOSXX11Generator + * \brief A generator for OSX X11 modules + * + * Based on Gimp.app + */ +class cmCPackOSXX11Generator : public cmCPackGenerator +{ +public: + cmCPackTypeMacro(cmCPackOSXX11Generator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackOSXX11Generator(); + virtual ~cmCPackOSXX11Generator(); + +protected: + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetPackagingInstallPrefix(); + virtual const char* GetOutputExtension() { return ".dmg"; } + + //bool CopyCreateResourceFile(const char* name, const char* dir); + bool CopyResourcePlistFile(const char* name, const char* dir, + const char* outputFileName = 0, bool copyOnly = false); + std::string InstallPrefix; +}; + +#endif diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx new file mode 100644 index 000000000..588fdb469 --- /dev/null +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -0,0 +1,363 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackPackageMakerGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-19 19:26:19 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCPackPackageMakerGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include + +//---------------------------------------------------------------------- +cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator() +{ + this->PackageMakerVersion = 0.0; +} + +//---------------------------------------------------------------------- +cmCPackPackageMakerGenerator::~cmCPackPackageMakerGenerator() +{ +} + +int cmCPackPackageMakerGenerator::CopyInstallScript(const char* resdir, + const char* script, + const char* name) +{ + std::string dst = resdir; + dst += "/"; + dst += name; + cmSystemTools::CopyFileAlways(script, dst.c_str()); + cmSystemTools::SetPermissions(dst.c_str(),0777); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "copy script : " << script << "\ninto " << dst.c_str() << + std::endl); + + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackPackageMakerGenerator::CompressFiles(const char* outFileName, + const char* toplevel, + const std::vector& files) +{ + (void) files; // TODO: Fix api to not need files. + (void) toplevel; // TODO: Use toplevel + // Create directory structure + std::string resDir = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + resDir += "/Resources"; + std::string preflightDirName = resDir + "/PreFlight"; + std::string postflightDirName = resDir + "/PostFlight"; + const char* preflight = this->GetOption("CPACK_PREFLIGHT_SCRIPT"); + const char* postflight = this->GetOption("CPACK_POSTFLIGHT_SCRIPT"); + const char* postupgrade = this->GetOption("CPACK_POSTUPGRADE_SCRIPT"); + // if preflight or postflight scripts not there create directories + // of the same name, I think this makes it work + if(!preflight) + { + if ( !cmsys::SystemTools::MakeDirectory(preflightDirName.c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem creating installer directory: " + << preflightDirName.c_str() << std::endl); + return 0; + } + } + if(!postflight) + { + if ( !cmsys::SystemTools::MakeDirectory(postflightDirName.c_str())) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem creating installer directory: " + << postflightDirName.c_str() << std::endl); + return 0; + } + } + // if preflight, postflight, or postupgrade are set + // then copy them into the resource directory and make + // them executable + if(preflight) + { + this->CopyInstallScript(resDir.c_str(), + preflight, + "preflight"); + } + if(postflight) + { + this->CopyInstallScript(resDir.c_str(), + postflight, + "postflight"); + } + if(postupgrade) + { + this->CopyInstallScript(resDir.c_str(), + postupgrade, + "postupgrade"); + } + + if ( !this->CopyCreateResourceFile("License") + || !this->CopyCreateResourceFile("ReadMe") + || !this->CopyCreateResourceFile("Welcome") + || !this->CopyResourcePlistFile("Info.plist") + || !this->CopyResourcePlistFile("Description.plist") ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem copying the resource files" + << std::endl); + return 0; + } + + std::string packageDirFileName + = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + packageDirFileName += ".pkg"; + + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/PackageMakerOutput.log"; + cmOStringStream pkgCmd; + pkgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM") + << "\" -build -p \"" << packageDirFileName << "\" -f \"" + << this->GetOption("CPACK_TEMPORARY_DIRECTORY") + << "\" -r \"" << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") + << "/Resources\" -i \"" + << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/Info.plist\" -d \"" + << this->GetOption("CPACK_TOPLEVEL_DIRECTORY") << "/Description.plist\""; + if ( this->PackageMakerVersion > 2.0 ) + { + pkgCmd << " -v"; + } + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << pkgCmd.str().c_str() + << std::endl); + std::string output; + int retVal = 1; + //bool res = cmSystemTools::RunSingleCommand(pkgCmd.str().c_str(), &output, + //&retVal, 0, this->GeneratorVerbose, 0); + bool res = true; + retVal = system(pkgCmd.str().c_str()); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Done running package maker" + << std::endl); + if ( !res || retVal ) + { + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << pkgCmd.str().c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem running PackageMaker command: " << pkgCmd.str().c_str() + << std::endl << "Please check " << tmpFile.c_str() << " for errors" + << std::endl); + return 0; + } + // sometimes the pkgCmd finishes but the directory is not yet + // created, so try 10 times to see if it shows up + int tries = 10; + while(tries > 0 && + !cmSystemTools::FileExists(packageDirFileName.c_str())) + { + cmSystemTools::Delay(500); + tries--; + } + if(!cmSystemTools::FileExists(packageDirFileName.c_str())) + { + cmCPackLogger( + cmCPackLog::LOG_ERROR, + "Problem running PackageMaker command: " << pkgCmd.str().c_str() + << std::endl << "Package not created: " << packageDirFileName.c_str() + << std::endl); + } + tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/hdiutilOutput.log"; + cmOStringStream dmgCmd; + dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE") + << "\" create -ov -format UDZO -srcfolder \"" << packageDirFileName + << "\" \"" << outFileName << "\""; + res = cmSystemTools::RunSingleCommand(dmgCmd.str().c_str(), &output, + &retVal, 0, this->GeneratorVerbose, 0); + if ( !res || retVal ) + { + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << dmgCmd.str().c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running hdiutil command: " + << dmgCmd.str().c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackPackageMakerGenerator::InitializeInternal() +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "cmCPackPackageMakerGenerator::Initialize()" << std::endl); + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr"); + std::vector path; + std::string pkgPath + = "/Developer/Applications/Utilities/PackageMaker.app/Contents"; + std::string versionFile = pkgPath + "/version.plist"; + if ( !cmSystemTools::FileExists(versionFile.c_str()) ) + { + pkgPath = "/Developer/Applications/PackageMaker.app/Contents"; + std::string newVersionFile = pkgPath + "/version.plist"; + if ( !cmSystemTools::FileExists(newVersionFile.c_str()) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find PackageMaker compiler version file: " + << versionFile.c_str() << " or " << newVersionFile.c_str() + << std::endl); + return 0; + } + versionFile = newVersionFile; + } + std::ifstream ifs(versionFile.c_str()); + if ( !ifs ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot open PackageMaker compiler version file" << std::endl); + return 0; + } + // Check the PackageMaker version + cmsys::RegularExpression rexKey("CFBundleShortVersionString"); + cmsys::RegularExpression rexVersion("([0-9]+.[0-9.]+)"); + std::string line; + bool foundKey = false; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + if ( rexKey.find(line) ) + { + foundKey = true; + break; + } + } + if ( !foundKey ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find CFBundleShortVersionString in the PackageMaker compiler " + "version file" << std::endl); + return 0; + } + if ( !cmSystemTools::GetLineFromStream(ifs, line) || + !rexVersion.find(line) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem reading the PackageMaker compiler version file: " + << versionFile.c_str() << std::endl); + return 0; + } + this->PackageMakerVersion = atof(rexVersion.match(1).c_str()); + if ( this->PackageMakerVersion < 1.0 ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Require PackageMaker 1.0 or higher" + << std::endl); + return 0; + } + cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: " + << this->PackageMakerVersion << std::endl); + + pkgPath += "/MacOS"; + path.push_back(pkgPath); + pkgPath = cmSystemTools::FindProgram("PackageMaker", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find PackageMaker compiler" + << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str()); + pkgPath = cmSystemTools::FindProgram("hdiutil", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find hdiutil compiler" + << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM_DISK_IMAGE", + pkgPath.c_str()); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +bool cmCPackPackageMakerGenerator::CopyCreateResourceFile(const char* name) +{ + std::string uname = cmSystemTools::UpperCase(name); + std::string cpackVar = "CPACK_RESOURCE_FILE_" + uname; + const char* inFileName = this->GetOption(cpackVar.c_str()); + if ( !inFileName ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "CPack option: " << cpackVar.c_str() + << " not specified. It should point to " + << (name ? name : "(NULL)") + << ".rtf, " << name + << ".html, or " << name << ".txt file" << std::endl); + return false; + } + if ( !cmSystemTools::FileExists(inFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find " + << (name ? name : "(NULL)") + << " resource file: " << inFileName << std::endl); + return false; + } + std::string ext = cmSystemTools::GetFilenameLastExtension(inFileName); + if ( ext != ".rtfd" && ext != ".rtf" && ext != ".html" && ext != ".txt" ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Bad file extension specified: " + << ext << ". Currently only .rtfd, .rtf, .html, and .txt files allowed." + << std::endl); + return false; + } + + std::string destFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + destFileName += "/Resources/"; + destFileName += name + ext; + + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + << (inFileName ? inFileName : "(NULL)") + << " to " << destFileName.c_str() << std::endl); + this->ConfigureFile(inFileName, destFileName.c_str()); + return true; +} + +bool cmCPackPackageMakerGenerator::CopyResourcePlistFile(const char* name) +{ + std::string inFName = "CPack."; + inFName += name; + inFName += ".in"; + std::string inFileName = this->FindTemplate(inFName.c_str()); + if ( inFileName.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find input file: " + << inFName << std::endl); + return false; + } + + std::string destFileName = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + destFileName += "/"; + destFileName += name; + + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " + << inFileName.c_str() << " to " << destFileName.c_str() << std::endl); + this->ConfigureFile(inFileName.c_str(), destFileName.c_str()); + return true; +} diff --git a/Source/CPack/cmCPackPackageMakerGenerator.h b/Source/CPack/cmCPackPackageMakerGenerator.h new file mode 100644 index 000000000..39b21d3af --- /dev/null +++ b/Source/CPack/cmCPackPackageMakerGenerator.h @@ -0,0 +1,57 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackPackageMakerGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-19 19:26:19 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackPackageMakerGenerator_h +#define cmCPackPackageMakerGenerator_h + + +#include "cmCPackGenerator.h" + +/** \class cmCPackPackageMakerGenerator + * \brief A generator for PackageMaker files + * + * http://developer.apple.com/documentation/Darwin + * /Reference/ManPages/man1/packagemaker.1.html + */ +class cmCPackPackageMakerGenerator : public cmCPackGenerator +{ +public: + cmCPackTypeMacro(cmCPackPackageMakerGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackPackageMakerGenerator(); + virtual ~cmCPackPackageMakerGenerator(); + +protected: + int CopyInstallScript(const char* resdir, + const char* script, + const char* name); + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".dmg"; } + virtual const char* GetOutputPostfix() { return "darwin"; } + + bool CopyCreateResourceFile(const char* name); + bool CopyResourcePlistFile(const char* name); + + double PackageMakerVersion; +}; + +#endif diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx new file mode 100644 index 000000000..19d941bd7 --- /dev/null +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackRPMGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-31 12:50:17 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCPackRPMGenerator.h" +#include "cmCPackLog.h" + +//---------------------------------------------------------------------- +cmCPackRPMGenerator::cmCPackRPMGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackRPMGenerator::~cmCPackRPMGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackRPMGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_PACKAGING_INSTALL_PREFIX", "/usr"); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/, + const char* /*toplevel*/, + const std::vector& /*files*/) +{ + this->ReadListFile("CPackRPM.cmake"); + if (!this->IsSet("RPMBUILD_EXECUTABLE")) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl); + return 0; + } + return 1; +} + + diff --git a/Source/CPack/cmCPackRPMGenerator.h b/Source/CPack/cmCPackRPMGenerator.h new file mode 100644 index 000000000..3de998de6 --- /dev/null +++ b/Source/CPack/cmCPackRPMGenerator.h @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackRPMGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackRPMGenerator_h +#define cmCPackRPMGenerator_h + + +#include "cmCPackGenerator.h" + +/** \class cmCPackRPMGenerator + * \brief A generator for RPM packages + * The idea of the CPack RPM generator is to use + * as minimal C++ code as possible. + * Ideally the C++ part of the CPack RPM generator + * will only 'execute' (aka ->ReadListFile) several + * CMake macros files. + */ +class cmCPackRPMGenerator : public cmCPackGenerator +{ +public: + cmCPackTypeMacro(cmCPackRPMGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackRPMGenerator(); + virtual ~cmCPackRPMGenerator(); + +protected: + virtual int InitializeInternal(); + virtual int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".rpm"; } + +}; + +#endif diff --git a/Source/CPack/cmCPackSTGZGenerator.cxx b/Source/CPack/cmCPackSTGZGenerator.cxx new file mode 100644 index 000000000..f7a7aed03 --- /dev/null +++ b/Source/CPack/cmCPackSTGZGenerator.cxx @@ -0,0 +1,133 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackSTGZGenerator.cxx,v $ + Language: C++ + Date: $Date: 2006-05-12 18:44:24 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackSTGZGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmCPackLog.h" + +#include +#include +#include + +//---------------------------------------------------------------------- +cmCPackSTGZGenerator::cmCPackSTGZGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackSTGZGenerator::~cmCPackSTGZGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackSTGZGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "0"); + + std::string inFile = this->FindTemplate("CPack.STGZ_Header.sh.in"); + if ( inFile.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find template file: " + << inFile.c_str() << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_STGZ_HEADER_FILE", inFile.c_str()); + this->SetOptionIfNotSet("CPACK_AT_SIGN", "@"); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackSTGZGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + if ( !this->Superclass::CompressFiles(outFileName, toplevel, files) ) + { + return 0; + } + return cmSystemTools::SetPermissions(outFileName, +#if defined( _MSC_VER ) || defined( __MINGW32__ ) + S_IREAD | S_IWRITE | S_IEXEC +#elif defined( __BORLANDC__ ) + S_IRUSR | S_IWUSR | S_IXUSR +#else + S_IRUSR | S_IWUSR | S_IXUSR | + S_IRGRP | S_IWGRP | S_IXGRP | + S_IROTH | S_IWOTH | S_IXOTH +#endif + ); +} + +//---------------------------------------------------------------------- +int cmCPackSTGZGenerator::GenerateHeader(std::ostream* os) +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Writing header" << std::endl); + cmsys_ios::ostringstream str; + int counter = 0; + + std::string inLicFile = this->GetOption("CPACK_RESOURCE_FILE_LICENSE"); + std::string line; + std::ifstream ilfs(inLicFile.c_str()); + std::string licenseText; + while ( cmSystemTools::GetLineFromStream(ilfs, line) ) + { + licenseText += line + "\n"; + } + this->SetOptionIfNotSet("CPACK_RESOURCE_FILE_LICENSE_CONTENT", + licenseText.c_str()); + + const char headerLengthTag[] = "###CPACK_HEADER_LENGTH###"; + + // Create the header + std::string inFile = this->GetOption("CPACK_STGZ_HEADER_FILE"); + std::ifstream ifs(inFile.c_str()); + std::string packageHeaderText; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + packageHeaderText += line + "\n"; + } + + // Configure in the values + std::string res; + this->ConfigureString(packageHeaderText, res); + + // Count the lines + const char* ptr = res.c_str(); + while ( *ptr ) + { + if ( *ptr == '\n' ) + { + counter ++; + } + ++ptr; + } + counter ++; + cmCPackLogger(cmCPackLog::LOG_DEBUG, + "Number of lines: " << counter << std::endl); + char buffer[1024]; + sprintf(buffer, "%d", counter); + cmSystemTools::ReplaceString(res, headerLengthTag, buffer); + + // Write in file + *os << res.c_str(); + return this->Superclass::GenerateHeader(os); +} diff --git a/Source/CPack/cmCPackSTGZGenerator.h b/Source/CPack/cmCPackSTGZGenerator.h new file mode 100644 index 000000000..790bd33d2 --- /dev/null +++ b/Source/CPack/cmCPackSTGZGenerator.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackSTGZGenerator.h,v $ + Language: C++ + Date: $Date: 2007-02-02 19:40:26 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackSTGZGenerator_h +#define cmCPackSTGZGenerator_h + + +#include "cmCPackTGZGenerator.h" + +/** \class cmCPackSTGZGenerator + * \brief A generator for Self extractable TGZ files + * + */ +class cmCPackSTGZGenerator : public cmCPackTGZGenerator +{ +public: + cmCPackTypeMacro(cmCPackSTGZGenerator, cmCPackTGZGenerator); + + /** + * Construct generator + */ + cmCPackSTGZGenerator(); + virtual ~cmCPackSTGZGenerator(); + +protected: + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual int InitializeInternal(); + int GenerateHeader(std::ostream* os); + virtual const char* GetOutputExtension() { return ".sh"; } +}; + +#endif diff --git a/Source/CPack/cmCPackTGZGenerator.cxx b/Source/CPack/cmCPackTGZGenerator.cxx new file mode 100644 index 000000000..b57242438 --- /dev/null +++ b/Source/CPack/cmCPackTGZGenerator.cxx @@ -0,0 +1,298 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTGZGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-09-27 18:44:10 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackTGZGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include +#include +#include // auto_ptr +#include +#include + +//---------------------------------------------------------------------- +class cmCPackTGZGeneratorForward +{ + public: + static int GenerateHeader(cmCPackTGZGenerator* gg, std::ostream* os) + { + return gg->GenerateHeader(os); + } +}; + +//---------------------------------------------------------------------- +cmCPackTGZGenerator::cmCPackTGZGenerator() +{ + this->Compress = true; +} + +//---------------------------------------------------------------------- +cmCPackTGZGenerator::~cmCPackTGZGenerator() +{ +} + +static const size_t cmCPackTGZ_Data_BlockSize = 16384; + +//---------------------------------------------------------------------- +class cmCPackTGZ_Data +{ +public: + cmCPackTGZ_Data(cmCPackTGZGenerator* gen, bool compress) : + OutputStream(0), Generator(gen), + CompressionLevel(Z_DEFAULT_COMPRESSION), + Compress(compress) {} + std::ostream* OutputStream; + cmCPackTGZGenerator* Generator; + char CompressedBuffer[cmCPackTGZ_Data_BlockSize]; + int CompressionLevel; + z_stream ZLibStream; + uLong CRC; + bool Compress; +}; + +//---------------------------------------------------------------------- +extern "C" { + int cmCPackTGZ_Data_Open(void *client_data, const char* name, int oflags, + mode_t mode); + ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n); + int cmCPackTGZ_Data_Close(void *client_data); +} + + +//---------------------------------------------------------------------- +int cmCPackTGZ_Data_Open(void *client_data, const char* pathname, + int, mode_t) +{ + cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data; + + if ( mydata->Compress ) + { + mydata->ZLibStream.zalloc = Z_NULL; + mydata->ZLibStream.zfree = Z_NULL; + mydata->ZLibStream.opaque = Z_NULL; + int strategy = Z_DEFAULT_STRATEGY; + if ( deflateInit2(&mydata->ZLibStream, mydata->CompressionLevel, + Z_DEFLATED, -MAX_WBITS, 8, strategy) != Z_OK ) + { + return -1; + } + } + + cmGeneratedFileStream* gf = new cmGeneratedFileStream; + // Open binary + gf->Open(pathname, false, true); + mydata->OutputStream = gf; + if ( !*mydata->OutputStream ) + { + return -1; + } + + if ( !cmCPackTGZGeneratorForward::GenerateHeader(mydata->Generator,gf)) + { + return -1; + } + + if ( mydata->Compress ) + { + mydata->CRC = crc32(0L, Z_NULL, 0); + } + + return 0; +} + +//---------------------------------------------------------------------- +ssize_t cmCPackTGZ_Data_Write(void *client_data, void *buff, size_t n) +{ + cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data; + + if ( mydata->Compress ) + { + mydata->ZLibStream.avail_in = static_cast(n); + mydata->ZLibStream.next_in = reinterpret_cast(buff); + + do { + mydata->ZLibStream.avail_out = cmCPackTGZ_Data_BlockSize; + mydata->ZLibStream.next_out + = reinterpret_cast(mydata->CompressedBuffer); + // no bad return value + int ret = deflate(&mydata->ZLibStream, (n?Z_NO_FLUSH:Z_FINISH)); + if(ret == Z_STREAM_ERROR) + { + return 0; + } + + size_t compressedSize + = cmCPackTGZ_Data_BlockSize - mydata->ZLibStream.avail_out; + + mydata->OutputStream->write( + reinterpret_cast(mydata->CompressedBuffer), + compressedSize); + } while ( mydata->ZLibStream.avail_out == 0 ); + + if ( !*mydata->OutputStream ) + { + return 0; + } + if ( n ) + { + mydata->CRC = crc32(mydata->CRC, reinterpret_cast(buff), + static_cast(n)); + } + } + else + { + mydata->OutputStream->write(reinterpret_cast(buff), n); + } + return n; +} + +//---------------------------------------------------------------------- +int cmCPackTGZ_Data_Close(void *client_data) +{ + cmCPackTGZ_Data *mydata = (cmCPackTGZ_Data*)client_data; + + if ( mydata->Compress ) + { + cmCPackTGZ_Data_Write(client_data, 0, 0); + + char buffer[8]; + int n; + uLong x = mydata->CRC; + for (n = 0; n < 4; n++) { + buffer[n] = (int)(x & 0xff); + x >>= 8; + } + x = mydata->ZLibStream.total_in; + for (n = 0; n < 4; n++) { + buffer[n+4] = (int)(x & 0xff); + x >>= 8; + } + + mydata->OutputStream->write(buffer, 8); + (void)deflateEnd(&mydata->ZLibStream); + } + delete mydata->OutputStream; + mydata->OutputStream = 0; + return (0); +} + +//---------------------------------------------------------------------- +int cmCPackTGZGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1"); + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackTGZGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " + << (toplevel ? toplevel : "(NULL)") << std::endl); + cmCPackTGZ_Data mydata(this, this->Compress); + TAR *t; + char buf[TAR_MAXPATHLEN]; + char pathname[TAR_MAXPATHLEN]; + + tartype_t gztype = { + (openfunc_t)cmCPackTGZ_Data_Open, + (closefunc_t)cmCPackTGZ_Data_Close, + (readfunc_t)0, + (writefunc_t)cmCPackTGZ_Data_Write, + &mydata + }; + + // Ok, this libtar is not const safe. for now use auto_ptr hack + char* realName = new char[ strlen(outFileName) + 1 ]; + std::auto_ptr realNamePtr(realName); + strcpy(realName, outFileName); + int flags = O_WRONLY | O_CREAT; + int options = 0; + if(this->GeneratorVerbose) + { + options |= TAR_VERBOSE; + } +#ifdef __CYGWIN__ + options |= TAR_GNU; +#endif + if (tar_open(&t, realName, + &gztype, + flags, 0644, + options) == -1) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): " + << strerror(errno) << std::endl); + return 0; + } + + std::vector::const_iterator fileIt; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + std::string rp = cmSystemTools::RelativePath(toplevel, fileIt->c_str()); + strncpy(pathname, fileIt->c_str(), sizeof(pathname)); + pathname[sizeof(pathname)-1] = 0; + strncpy(buf, rp.c_str(), sizeof(buf)); + buf[sizeof(buf)-1] = 0; + if (tar_append_tree(t, pathname, buf) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem with tar_append_tree(\"" << buf << "\", \"" + << pathname << "\"): " + << strerror(errno) << std::endl); + tar_close(t); + return 0; + } + } + if (tar_append_eof(t) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_append_eof(): " + << strerror(errno) << std::endl); + tar_close(t); + return 0; + } + + if (tar_close(t) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_close(): " + << strerror(errno) << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackTGZGenerator::GenerateHeader(std::ostream* os) +{ + if ( this->Compress ) + { + const int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + char header[11]; + sprintf(header, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], + Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, + 3 /* zlib os code for UNIX, not really used anyway */); + os->write(header, 10); + } + return 1; +} diff --git a/Source/CPack/cmCPackTGZGenerator.h b/Source/CPack/cmCPackTGZGenerator.h new file mode 100644 index 000000000..e7b490003 --- /dev/null +++ b/Source/CPack/cmCPackTGZGenerator.h @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTGZGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackTGZGenerator_h +#define cmCPackTGZGenerator_h + +#include "cmCPackGenerator.h" + +class cmCPackTGZGeneratorForward; + +/** \class cmCPackTGZGenerator + * \brief A generator for TGZ files + * + * http://people.freebsd.org/~kientzle/libarchive/ + */ +class cmCPackTGZGenerator : public cmCPackGenerator +{ +public: + friend class cmCPackTGZGeneratorForward; + cmCPackTypeMacro(cmCPackTGZGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackTGZGenerator(); + virtual ~cmCPackTGZGenerator(); + +protected: + virtual int InitializeInternal(); + virtual int GenerateHeader(std::ostream* os); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".tar.gz"; } + + bool Compress; +}; + +#endif diff --git a/Source/CPack/cmCPackTarBZip2Generator.cxx b/Source/CPack/cmCPackTarBZip2Generator.cxx new file mode 100644 index 000000000..e64ebcedb --- /dev/null +++ b/Source/CPack/cmCPackTarBZip2Generator.cxx @@ -0,0 +1,180 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTarBZip2Generator.cxx,v $ + Language: C++ + Date: $Date: 2007-02-02 21:52:20 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackTarBZip2Generator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include + +// Includes needed for implementation of RenameFile. This is not in +// system tools because it is not implemented robustly enough to move +// files across directories. +#ifdef _WIN32 +# include +# include +#endif + +//---------------------------------------------------------------------- +cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() +{ + this->Compress = false; +} + +//---------------------------------------------------------------------- +cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackTarBZip2Generator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1"); + std::vector path; + std::string pkgPath = cmSystemTools::FindProgram("bzip2", path, false); + if ( pkgPath.empty() ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find BZip2" << std::endl); + return 0; + } + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str()); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Found Compress program: " + << pkgPath.c_str() + << std::endl); + + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackTarBZip2Generator::BZip2File(const char* packageDirFileName) +{ + int retVal = 0; + cmOStringStream dmgCmd1; + dmgCmd1 << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM") + << "\" \"" << packageDirFileName + << "\""; + retVal = -1; + std::string output; + int res = cmSystemTools::RunSingleCommand(dmgCmd1.str().c_str(), &output, + &retVal, 0, this->GeneratorVerbose, 0); + if ( !res || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/CompressBZip2.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << dmgCmd1.str().c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running BZip2 command: " + << dmgCmd1.str().c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackTarBZip2Generator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + std::string packageDirFileName + = this->GetOption("CPACK_TEMPORARY_DIRECTORY"); + packageDirFileName += ".tar"; + std::string output; + if ( !this->Superclass::CompressFiles(packageDirFileName.c_str(), + toplevel, files) ) + { + return 0; + } + + if(!this->BZip2File(packageDirFileName.c_str())) + { + return 0; + } + + std::string compressOutFile = packageDirFileName + ".bz2"; + if ( !cmSystemTools::SameFile(compressOutFile.c_str(), outFileName ) ) + { + if ( !this->RenameFile(compressOutFile.c_str(), outFileName) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem renaming: \"" + << compressOutFile.c_str() << "\" to \"" + << (outFileName ? outFileName : "(NULL)") << std::endl); + return 0; + } + } + + return 1; +} + +//---------------------------------------------------------------------------- +int cmCPackTarBZip2Generator::RenameFile(const char* oldname, + const char* newname) +{ +#ifdef _WIN32 + /* On Windows the move functions will not replace existing files. + Check if the destination exists. */ + struct stat newFile; + if(stat(newname, &newFile) == 0) + { + /* The destination exists. We have to replace it carefully. The + MoveFileEx function does what we need but is not available on + Win9x. */ + OSVERSIONINFO osv; + DWORD attrs; + + /* Make sure the destination is not read only. */ + attrs = GetFileAttributes(newname); + if(attrs & FILE_ATTRIBUTE_READONLY) + { + SetFileAttributes(newname, attrs & ~FILE_ATTRIBUTE_READONLY); + } + + /* Check the windows version number. */ + osv.dwOSVersionInfoSize = sizeof(osv); + GetVersionEx(&osv); + if(osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) + { + /* This is Win9x. There is no MoveFileEx implementation. We + cannot quite rename the file atomically. Just delete the + destination and then move the file. */ + DeleteFile(newname); + return MoveFile(oldname, newname); + } + else + { + /* This is not Win9x. Use the MoveFileEx implementation. */ + return MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING); + } + } + else + { + /* The destination does not exist. Just move the file. */ + return MoveFile(oldname, newname); + } +#else + /* On UNIX we have an OS-provided call to do this atomically. */ + return rename(oldname, newname) == 0; +#endif +} + diff --git a/Source/CPack/cmCPackTarBZip2Generator.h b/Source/CPack/cmCPackTarBZip2Generator.h new file mode 100644 index 000000000..4142bad9a --- /dev/null +++ b/Source/CPack/cmCPackTarBZip2Generator.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTarBZip2Generator.h,v $ + Language: C++ + Date: $Date: 2007-02-02 19:40:26 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackTarBZip2Generator_h +#define cmCPackTarBZip2Generator_h + +#include "cmCPackTGZGenerator.h" + +/** \class cmCPackTarBZip2Generator + * \brief A generator for TarBZip2 files + */ +class cmCPackTarBZip2Generator : public cmCPackTGZGenerator +{ +public: + friend class cmCPackTarBZip2GeneratorForward; + cmCPackTypeMacro(cmCPackTarBZip2Generator, cmCPackTGZGenerator); + + /** + * Construct generator + */ + cmCPackTarBZip2Generator(); + virtual ~cmCPackTarBZip2Generator(); + +protected: + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".tar.bz2"; } + int BZip2File(const char* filename); + int RenameFile(const char* oldname, const char* newname); +}; + +#endif diff --git a/Source/CPack/cmCPackTarCompressGenerator.cxx b/Source/CPack/cmCPackTarCompressGenerator.cxx new file mode 100644 index 000000000..6775eeaf4 --- /dev/null +++ b/Source/CPack/cmCPackTarCompressGenerator.cxx @@ -0,0 +1,255 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTarCompressGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-07-31 02:51:21 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackTarCompressGenerator.h" + +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include +#include +#include +#include // auto_ptr +#include +#include + +//---------------------------------------------------------------------- +class cmCPackTarCompressGeneratorForward +{ +public: + static int GenerateHeader(cmCPackTarCompressGenerator* gg, std::ostream* os) + { + return gg->GenerateHeader(os); + } +}; + +//---------------------------------------------------------------------- +cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator() +{ +} + +//---------------------------------------------------------------------- +class cmCPackTarCompress_Data +{ +public: + cmCPackTarCompress_Data(cmCPackTarCompressGenerator* gen) : + OutputStream(0), Generator(gen) {} + std::ostream* OutputStream; + cmCPackTarCompressGenerator* Generator; + cmcompress_stream CMCompressStream; +}; + +//---------------------------------------------------------------------- +extern "C" { + // For cmTar + int cmCPackTarCompress_Data_Open(void *client_data, const char* name, + int oflags, mode_t mode); + ssize_t cmCPackTarCompress_Data_Write(void *client_data, void *buff, + size_t n); + int cmCPackTarCompress_Data_Close(void *client_data); + + // For cmCompress + int cmCPackTarCompress_Compress_Output(void* cdata, const char* data, + int len); +} + + +//---------------------------------------------------------------------- +int cmCPackTarCompress_Data_Open(void *client_data, const char* pathname, + int, mode_t) +{ + cmCPackTarCompress_Data *mydata = (cmCPackTarCompress_Data*)client_data; + + if ( !cmcompress_compress_initialize(&mydata->CMCompressStream) ) + { + return -1; + } + + mydata->CMCompressStream.client_data = mydata; + mydata->CMCompressStream.output_stream = cmCPackTarCompress_Compress_Output; + + cmGeneratedFileStream* gf = new cmGeneratedFileStream; + // Open binary + gf->Open(pathname, false, true); + mydata->OutputStream = gf; + if ( !*mydata->OutputStream ) + { + return -1; + } + + if ( !cmcompress_compress_start(&mydata->CMCompressStream) ) + { + return -1; + } + + + if ( !cmCPackTarCompressGeneratorForward::GenerateHeader( + mydata->Generator,gf)) + { + return -1; + } + + return 0; +} + +//---------------------------------------------------------------------- +ssize_t cmCPackTarCompress_Data_Write(void *client_data, void *buff, size_t n) +{ + cmCPackTarCompress_Data *mydata = (cmCPackTarCompress_Data*)client_data; + + if ( !cmcompress_compress(&mydata->CMCompressStream, buff, n) ) + { + return 0; + } + return n; +} + +//---------------------------------------------------------------------- +int cmCPackTarCompress_Data_Close(void *client_data) +{ + cmCPackTarCompress_Data *mydata = (cmCPackTarCompress_Data*)client_data; + + if ( !cmcompress_compress_finalize(&mydata->CMCompressStream) ) + { + delete mydata->OutputStream; + return -1; + } + + delete mydata->OutputStream; + mydata->OutputStream = 0; + return (0); +} + +//---------------------------------------------------------------------- +int cmCPackTarCompressGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1"); + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackTarCompressGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: " + << (toplevel ? toplevel : "(NULL)") << std::endl); + cmCPackTarCompress_Data mydata(this); + TAR *t; + char buf[TAR_MAXPATHLEN]; + char pathname[TAR_MAXPATHLEN]; + + tartype_t compressType = { + (openfunc_t)cmCPackTarCompress_Data_Open, + (closefunc_t)cmCPackTarCompress_Data_Close, + (readfunc_t)0, + (writefunc_t)cmCPackTarCompress_Data_Write, + &mydata + }; + + // Ok, this libtar is not const safe. for now use auto_ptr hack + char* realName = new char[ strlen(outFileName) + 1 ]; + std::auto_ptr realNamePtr(realName); + strcpy(realName, outFileName); + int flags = O_WRONLY | O_CREAT; + int options = 0; + if(this->GeneratorVerbose) + { + options |= TAR_VERBOSE; + } +#ifdef __CYGWIN__ + options |= TAR_GNU; +#endif + if (tar_open(&t, realName, + &compressType, + flags, 0644, + options) == -1) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_open(): " + << strerror(errno) << std::endl); + return 0; + } + + std::vector::const_iterator fileIt; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + std::string rp = cmSystemTools::RelativePath(toplevel, fileIt->c_str()); + strncpy(pathname, fileIt->c_str(), sizeof(pathname)); + pathname[sizeof(pathname)-1] = 0; + strncpy(buf, rp.c_str(), sizeof(buf)); + buf[sizeof(buf)-1] = 0; + if (tar_append_tree(t, pathname, buf) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Problem with tar_append_tree(\"" << buf << "\", \"" + << pathname << "\"): " + << strerror(errno) << std::endl); + tar_close(t); + return 0; + } + } + if (tar_append_eof(t) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_append_eof(): " + << strerror(errno) << std::endl); + tar_close(t); + return 0; + } + + if (tar_close(t) != 0) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem with tar_close(): " + << strerror(errno) << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCPackTarCompress_Compress_Output(void* client_data, + const char* data, int data_length) +{ + if(!client_data) + { + return 0; + } + cmcompress_stream *cstream = static_cast(client_data); + cmCPackTarCompress_Data *mydata + = static_cast(cstream->client_data); + if ( !mydata->OutputStream ) + { + return 0; + } + mydata->OutputStream->write(data, data_length); + return data_length; +} + +//---------------------------------------------------------------------- +int cmCPackTarCompressGenerator::GenerateHeader(std::ostream* os) +{ + (void)os; + return 1; +} diff --git a/Source/CPack/cmCPackTarCompressGenerator.h b/Source/CPack/cmCPackTarCompressGenerator.h new file mode 100644 index 000000000..82df3dee4 --- /dev/null +++ b/Source/CPack/cmCPackTarCompressGenerator.h @@ -0,0 +1,48 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackTarCompressGenerator.h,v $ + Language: C++ + Date: $Date: 2007-02-02 19:40:26 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackTarCompressGenerator_h +#define cmCPackTarCompressGenerator_h + +#include "cmCPackTGZGenerator.h" + +/** \class cmCPackTarCompressGenerator + * \brief A generator for TarCompress files + */ +class cmCPackTarCompressGenerator : public cmCPackTGZGenerator +{ +public: + friend class cmCPackTarCompressGeneratorForward; + cmCPackTypeMacro(cmCPackTarCompressGenerator, cmCPackTGZGenerator); + + /** + * Construct generator + */ + cmCPackTarCompressGenerator(); + virtual ~cmCPackTarCompressGenerator(); + +protected: + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".tar.Z"; } + + int RenameFile(const char* oldname, const char* newname); + int GenerateHeader(std::ostream* os); +}; + +#endif diff --git a/Source/CPack/cmCPackZIPGenerator.cxx b/Source/CPack/cmCPackZIPGenerator.cxx new file mode 100644 index 000000000..27de554f4 --- /dev/null +++ b/Source/CPack/cmCPackZIPGenerator.cxx @@ -0,0 +1,103 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackZIPGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCPackZIPGenerator.h" + +#include "cmSystemTools.h" +#include "cmGeneratedFileStream.h" +#include "cmCPackLog.h" + +#include + +//---------------------------------------------------------------------- +cmCPackZIPGenerator::cmCPackZIPGenerator() +{ +} + +//---------------------------------------------------------------------- +cmCPackZIPGenerator::~cmCPackZIPGenerator() +{ +} + +//---------------------------------------------------------------------- +int cmCPackZIPGenerator::InitializeInternal() +{ + this->SetOptionIfNotSet("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", "1"); + this->ReadListFile("CPackZIP.cmake"); + if ((!this->IsSet("ZIP_EXECUTABLE")) + || (!this->IsSet("CPACK_ZIP_COMMAND"))) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find a suitable ZIP program" + << std::endl); + return 0; + } + return this->Superclass::InitializeInternal(); +} + +//---------------------------------------------------------------------- +int cmCPackZIPGenerator::CompressFiles(const char* outFileName, + const char* toplevel, const std::vector& files) +{ + std::string tempFileName; + tempFileName = toplevel; + tempFileName += "/winZip.filelist"; + bool needQuotesInFile = cmSystemTools::IsOn( + this->GetOption("CPACK_ZIP_NEED_QUOTES")); + + std::string cmd = this->GetOption("CPACK_ZIP_COMMAND"); + cmsys::SystemTools::ReplaceString(cmd, "", outFileName); + cmsys::SystemTools::ReplaceString(cmd, "", "winZip.filelist"); + + { // the scope is needed for cmGeneratedFileStream + cmGeneratedFileStream out(tempFileName.c_str()); + std::vector::const_iterator fileIt; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + if ( needQuotesInFile ) + { + out << "\""; + } + out << cmSystemTools::RelativePath(toplevel, fileIt->c_str()); + if ( needQuotesInFile ) + { + out << "\""; + } + out << std::endl; + } + } + + + std::string output; + int retVal = -1; + int res = cmSystemTools::RunSingleCommand(cmd.c_str(), &output, + &retVal, toplevel, this->GeneratorVerbose, 0); + + if ( !res || retVal ) + { + std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY"); + tmpFile += "/CompressZip.log"; + cmGeneratedFileStream ofs(tmpFile.c_str()); + ofs << "# Run command: " << cmd.c_str() << std::endl + << "# Output:" << std::endl + << output.c_str() << std::endl; + cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem running zip command: " + << cmd.c_str() << std::endl + << "Please check " << tmpFile.c_str() << " for errors" << std::endl); + return 0; + } + return 1; +} diff --git a/Source/CPack/cmCPackZIPGenerator.h b/Source/CPack/cmCPackZIPGenerator.h new file mode 100644 index 000000000..6aa141060 --- /dev/null +++ b/Source/CPack/cmCPackZIPGenerator.h @@ -0,0 +1,49 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPackZIPGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-05 21:55:45 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCPackZIPGenerator_h +#define cmCPackZIPGenerator_h + +#include "cmCPackGenerator.h" + +class cmCPackZIPGeneratorForward; + +/** \class cmCPackZIPGenerator + * \brief A generator for ZIP files + */ +class cmCPackZIPGenerator : public cmCPackGenerator +{ +public: + friend class cmCPackZIPGeneratorForward; + cmCPackTypeMacro(cmCPackZIPGenerator, cmCPackGenerator); + + /** + * Construct generator + */ + cmCPackZIPGenerator(); + virtual ~cmCPackZIPGenerator(); + +protected: + virtual int InitializeInternal(); + int CompressFiles(const char* outFileName, const char* toplevel, + const std::vector& files); + virtual const char* GetOutputExtension() { return ".zip"; } + + int ZipStyle; +}; + +#endif diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx new file mode 100644 index 000000000..20c5b4518 --- /dev/null +++ b/Source/CPack/cpack.cxx @@ -0,0 +1,478 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cpack.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:53 $ + Version: $Revision: 1.42.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSystemTools.h" + +// Need these for documentation support. +#include "cmake.h" +#include "cmDocumentation.h" +#include "cmCPackGeneratorFactory.h" +#include "cmCPackGenerator.h" +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" + +#include "cmCPackLog.h" + +#include +#include // auto_ptr + +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " cpack - Packaging driver provided by CMake.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " cpack -G [options]", + 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"cpack\" executable is the CMake packaging program. " + "CMake-generated build trees created for projects that use " + "the INSTALL_* commands have packaging support. " + "This program will generate the package.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + {"-G ", "Use the specified generator to generate package.", + "CPack may support multiple native packaging systems on certain " + "platforms. A generator is responsible for generating input files for " + "particular system and invoking that systems. Possible generator names " + "are specified in the Generators section." }, + {"-C ", "Specify the project configuration", + "This option specifies the configuration that the project was build " + "with, for example 'Debug', 'Release'." }, + {"-D =", "Set a CPack variable.", \ + "Set a variable that can be used by the generator."}, \ + {"--config ", "Specify the config file.", + "Specify the config file to use to create the package. By default " + "CPackConfig.cmake in the current directory will be used." }, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationSeeAlso[][3] = +{ + {0, "cmake", 0}, + {0, "ccmake", 0}, + {0, 0, 0} +}; + +//---------------------------------------------------------------------------- +int cpackUnknownArgument(const char*, void*) +{ + return 1; +} + +//---------------------------------------------------------------------------- +struct cpackDefinitions +{ + typedef std::map MapType; + MapType Map; + cmCPackLog *Log; +}; + +//---------------------------------------------------------------------------- +int cpackDefinitionArgument(const char* argument, const char* cValue, + void* call_data) +{ + (void)argument; + cpackDefinitions* def = static_cast(call_data); + std::string value = cValue; + size_t pos = value.find_first_of("="); + if ( pos == std::string::npos ) + { + cmCPack_Log(def->Log, cmCPackLog::LOG_ERROR, + "Please specify CPack definitions as: KEY=VALUE" << std::endl); + return 0; + } + std::string key = value.substr(0, pos); + value = value.c_str() + pos + 1; + def->Map[key] = value; + cmCPack_Log(def->Log, cmCPackLog::LOG_DEBUG, "Set CPack variable: " + << key.c_str() << " to \"" << value.c_str() << "\"" << std::endl); + return 1; +} + +//---------------------------------------------------------------------------- +// this is CPack. +int main (int argc, char *argv[]) +{ + cmSystemTools::FindExecutableDirectory(argv[0]); + cmCPackLog log; + log.SetErrorPrefix("CPack Error: "); + log.SetWarningPrefix("CPack Warning: "); + log.SetOutputPrefix("CPack: "); + log.SetVerbosePrefix("CPack Verbose: "); + + cmSystemTools::EnableMSVCDebugHook(); + + if ( cmSystemTools::GetCurrentWorkingDirectory().size() == 0 ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Current working directory cannot be established." << std::endl); + } + + std::string generator; + bool help = false; + bool helpVersion = false; + bool verbose = false; + bool debug = false; + std::string helpFull; + std::string helpMAN; + std::string helpHTML; + + std::string cpackProjectName; + std::string cpackProjectDirectory + = cmsys::SystemTools::GetCurrentWorkingDirectory(); + std::string cpackBuildConfig; + std::string cpackProjectVersion; + std::string cpackProjectPatch; + std::string cpackProjectVendor; + std::string cpackConfigFile; + + cpackDefinitions definitions; + definitions.Log = &log; + + cpackConfigFile = ""; + + cmDocumentation doc; + cmsys::CommandLineArguments arg; + arg.Initialize(argc, argv); + typedef cmsys::CommandLineArguments argT; + // Help arguments + arg.AddArgument("--help", argT::NO_ARGUMENT, &help, "CPack help"); + arg.AddArgument("--help-full", argT::SPACE_ARGUMENT, &helpFull, + "CPack help"); + arg.AddArgument("--help-html", argT::SPACE_ARGUMENT, &helpHTML, + "CPack help"); + arg.AddArgument("--help-man", argT::SPACE_ARGUMENT, &helpMAN, "CPack help"); + arg.AddArgument("--version", argT::NO_ARGUMENT, &helpVersion, "CPack help"); + + arg.AddArgument("-V", argT::NO_ARGUMENT, &verbose, "CPack verbose"); + arg.AddArgument("--verbose", argT::NO_ARGUMENT, &verbose, "-V"); + arg.AddArgument("--debug", argT::NO_ARGUMENT, &debug, "-V"); + arg.AddArgument("--config", argT::SPACE_ARGUMENT, &cpackConfigFile, + "CPack configuration file"); + arg.AddArgument("-C", argT::SPACE_ARGUMENT, &cpackBuildConfig, + "CPack build configuration"); + arg.AddArgument("-G", argT::SPACE_ARGUMENT, + &generator, "CPack generator"); + arg.AddArgument("-P", argT::SPACE_ARGUMENT, + &cpackProjectName, "CPack project name"); + arg.AddArgument("-R", argT::SPACE_ARGUMENT, + &cpackProjectVersion, "CPack project version"); + arg.AddArgument("-B", argT::SPACE_ARGUMENT, + &cpackProjectDirectory, "CPack project directory"); + arg.AddArgument("--patch", argT::SPACE_ARGUMENT, + &cpackProjectPatch, "CPack project patch"); + arg.AddArgument("--vendor", argT::SPACE_ARGUMENT, + &cpackProjectVendor, "CPack project vendor"); + arg.AddCallback("-D", argT::SPACE_ARGUMENT, + cpackDefinitionArgument, &definitions, "CPack Definitions"); + arg.SetUnknownArgumentCallback(cpackUnknownArgument); + + // Parse command line + int parsed = arg.Parse(); + + // Setup logging + if ( verbose ) + { + log.SetVerbose(verbose); + cmCPack_Log(&log, cmCPackLog::LOG_OUTPUT, "Enable Verbse" << std::endl); + } + if ( debug ) + { + log.SetDebug(debug); + cmCPack_Log(&log, cmCPackLog::LOG_OUTPUT, "Enable Debug" << std::endl); + } + + cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, + "Read CPack config file: " << cpackConfigFile.c_str() << std::endl); + + cmake cminst; + cminst.RemoveUnscriptableCommands(); + cmGlobalGenerator cmgg; + cmgg.SetCMakeInstance(&cminst); + std::auto_ptr cmlg(cmgg.CreateLocalGenerator()); + cmMakefile* globalMF = cmlg->GetMakefile(); + + bool cpackConfigFileSpecified = true; + if ( cpackConfigFile.empty() ) + { + cpackConfigFile = cmSystemTools::GetCurrentWorkingDirectory(); + cpackConfigFile += "/CPackConfig.cmake"; + cpackConfigFileSpecified = false; + } + + cmCPackGeneratorFactory generators; + generators.SetLogger(&log); + cmCPackGenerator* cpackGenerator = 0; + + if ( !helpFull.empty() || !helpMAN.empty() || + !helpHTML.empty() || helpVersion ) + { + help = true; + } + + if ( parsed && !help ) + { + // find out which system cpack is running on, so it can setup the search + // paths, so FIND_XXX() commands can be used in scripts + cminst.AddCMakePaths(); + std::string systemFile = + globalMF->GetModulesFile("CMakeDetermineSystem.cmake"); + if (!globalMF->ReadListFile(0, systemFile.c_str())) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Error reading CMakeDetermineSystem.cmake" << std::endl); + return 1; + } + + systemFile = + globalMF->GetModulesFile("CMakeSystemSpecificInformation.cmake"); + if (!globalMF->ReadListFile(0, systemFile.c_str())) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Error reading CMakeSystemSpecificInformation.cmake" << std::endl); + return 1; + } + + if ( cmSystemTools::FileExists(cpackConfigFile.c_str()) ) + { + cpackConfigFile = + cmSystemTools::CollapseFullPath(cpackConfigFile.c_str()); + cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, + "Read CPack configuration file: " << cpackConfigFile.c_str() + << std::endl); + if ( !globalMF->ReadListFile(0, cpackConfigFile.c_str()) ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Problem reading CPack config file: \"" + << cpackConfigFile.c_str() << "\"" << std::endl); + return 1; + } + } + else if ( cpackConfigFileSpecified ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Cannot find CPack config file: \"" << cpackConfigFile.c_str() + << "\"" << std::endl); + return 1; + } + + if ( !generator.empty() ) + { + globalMF->AddDefinition("CPACK_GENERATOR", generator.c_str()); + } + if ( !cpackProjectName.empty() ) + { + globalMF->AddDefinition("CPACK_PACKAGE_NAME", cpackProjectName.c_str()); + } + if ( !cpackProjectVersion.empty() ) + { + globalMF->AddDefinition("CPACK_PACKAGE_VERSION", + cpackProjectVersion.c_str()); + } + if ( !cpackProjectVendor.empty() ) + { + globalMF->AddDefinition("CPACK_PACKAGE_VENDOR", + cpackProjectVendor.c_str()); + } + if ( !cpackProjectDirectory.empty() ) + { + globalMF->AddDefinition("CPACK_PACKAGE_DIRECTORY", + cpackProjectDirectory.c_str()); + } + if ( !cpackBuildConfig.empty() ) + { + globalMF->AddDefinition("CPACK_BUILD_CONFIG", cpackBuildConfig.c_str()); + } + cpackDefinitions::MapType::iterator cdit; + for ( cdit = definitions.Map.begin(); + cdit != definitions.Map.end(); + ++cdit ) + { + globalMF->AddDefinition(cdit->first.c_str(), cdit->second.c_str()); + } + + const char* cpackModulesPath = + globalMF->GetDefinition("CPACK_MODULE_PATH"); + if ( cpackModulesPath ) + { + globalMF->AddDefinition("CMAKE_MODULE_PATH", cpackModulesPath); + } + const char* genList = globalMF->GetDefinition("CPACK_GENERATOR"); + if ( !genList ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "CPack generator not specified" << std::endl); + parsed = 0; + } + else + { + std::vector generatorsVector; + cmSystemTools::ExpandListArgument(genList, + generatorsVector); + std::vector::iterator it; + for ( it = generatorsVector.begin(); + it != generatorsVector.end(); + ++it ) + { + const char* gen = it->c_str(); + cmMakefile newMF(*globalMF); + cmMakefile* mf = &newMF; + cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, + "Specified generator: " << gen << std::endl); + if ( parsed && !mf->GetDefinition("CPACK_PACKAGE_NAME") ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "CPack project name not specified" << std::endl); + parsed = 0; + } + if ( parsed && !(mf->GetDefinition("CPACK_PACKAGE_VERSION") + || mf->GetDefinition("CPACK_PACKAGE_VERSION_MAJOR") && + mf->GetDefinition("CPACK_PACKAGE_VERSION_MINOR") + && mf->GetDefinition("CPACK_PACKAGE_VERSION_PATCH")) ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "CPack project version not specified" << std::endl + << "Specify CPACK_PACKAGE_VERSION, or " + "CPACK_PACKAGE_VERSION_MAJOR, " + "CPACK_PACKAGE_VERSION_MINOR, and CPACK_PACKAGE_VERSION_PATCH." + << std::endl); + parsed = 0; + } + if ( parsed ) + { + cpackGenerator = generators.NewGenerator(gen); + if ( !cpackGenerator ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Cannot initialize CPack generator: " + << gen << std::endl); + parsed = 0; + } + if ( parsed && !cpackGenerator->Initialize(gen, mf, argv[0]) ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Cannot initialize the generator " << gen << std::endl); + parsed = 0; + } + + if ( !mf->GetDefinition("CPACK_INSTALL_COMMANDS") && + !mf->GetDefinition("CPACK_INSTALLED_DIRECTORIES") && + !mf->GetDefinition("CPACK_INSTALL_CMAKE_PROJECTS") ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Please specify build tree of the project that uses CMake " + "using CPACK_INSTALL_CMAKE_PROJECTS, specify " + "CPACK_INSTALL_COMMANDS, or specify " + "CPACK_INSTALLED_DIRECTORIES." + << std::endl); + parsed = 0; + } + if ( parsed ) + { +#ifdef _WIN32 + std::string comspec = "cmw9xcom.exe"; + cmSystemTools::SetWindows9xComspecSubstitute(comspec.c_str()); +#endif + + const char* projName = mf->GetDefinition("CPACK_PACKAGE_NAME"); + cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "Use generator: " + << cpackGenerator->GetNameOfClass() << std::endl); + cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE, "For project: " + << projName << std::endl); + + const char* projVersion = + mf->GetDefinition("CPACK_PACKAGE_VERSION"); + if ( !projVersion ) + { + const char* projVersionMajor + = mf->GetDefinition("CPACK_PACKAGE_VERSION_MAJOR"); + const char* projVersionMinor + = mf->GetDefinition("CPACK_PACKAGE_VERSION_MINOR"); + const char* projVersionPatch + = mf->GetDefinition("CPACK_PACKAGE_VERSION_PATCH"); + cmOStringStream ostr; + ostr << projVersionMajor << "." << projVersionMinor << "." + << projVersionPatch; + mf->AddDefinition("CPACK_PACKAGE_VERSION", + ostr.str().c_str()); + } + + int res = cpackGenerator->DoPackage(); + if ( !res ) + { + cmCPack_Log(&log, cmCPackLog::LOG_ERROR, + "Error when generating package: " << projName << std::endl); + return 1; + } + } + } + } + } + } + + if ( help ) + { + doc.CheckOptions(argc, argv); + // Construct and print requested documentation. + doc.SetName("cpack"); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.SetSection("Options",cmDocumentationOptions); + + std::vector v; + cmCPackGeneratorFactory::DescriptionsMap::const_iterator generatorIt; + for( generatorIt = generators.GetGeneratorsList().begin(); + generatorIt != generators.GetGeneratorsList().end(); + ++ generatorIt ) + { + cmDocumentationEntry e; + e.Name = generatorIt->first.c_str(); + e.Brief = generatorIt->second.c_str(); + e.Full = ""; + v.push_back(e); + } + doc.SetSection("Generators",v); + + doc.SetSeeAlsoList(cmDocumentationSeeAlso); +#undef cout + return doc.PrintRequestedDocumentation(std::cout)? 0:1; +#define cout no_cout_use_cmCPack_Log + } + + return 0; +} diff --git a/Source/CPack/cygwin.readme b/Source/CPack/cygwin.readme new file mode 100755 index 000000000..88922d3e6 --- /dev/null +++ b/Source/CPack/cygwin.readme @@ -0,0 +1,69 @@ +http://cygwin.com/setup.html + + +Need to produce two tar files: + +Source- + +- create subdirs +- copy src +- duplicate src +- configure files into duplicate src + CPack.cygwin-readme.in + CPack.cygwin-install.sh.in + CPack.setup.hint.in +- diff duplicate src and orig src +- write diff into toplevel +- create tar file call super class + +cmake-2.2.3-1 + + +1. a source release +cmake-2.2.3-2-src.tar.bz2 + +cmake-2.2.3-2.patch has cmake-2.2.3/CYGWIN-PATCHES/cmake.README cmake-2.2.3/CYGWIN-PATCHES/setup.hint +cmake-2.2.3-2.sh -> script to create cygwin release +cmake-2.2.3.tar.bz2 -> unmodified cmake sources for 2.2.3 + + + + + +2 a binary release +cmake-2.2.3-2.tar.bz2 + +normal binary release with use as the root of the tree: + +Here is the bootstrap command used: + + ${SOURCE_DIR}/bootstrap --prefix=/usr --datadir=/share/cmake-${VER} \ + --docdir=/share/doc/cmake-${VER} --mandir=/share/man + +CMAKE_DOC_DIR /share/doc/${PKG}-${VER} +CMAKE_MAN_DIR /share/man +CMAKE_DATA_DIR /share/${PKG}-${VER} + +Here is the directory stucture: + +usr/bin/cmake.exe +usr/share/doc/cmake-2.2.3/MANIFEST *** +usr/share/doc/Cygwin/cmake-2.2.3-2.README **** +usr/share/cmake-2.2.3/Modules + + + +usr/bin +usr/share/cmake-2.2.3/include +usr/share/cmake-2.2.3/Modules/Platform +usr/share/cmake-2.2.3/Modules +usr/share/cmake-2.2.3/Templates +usr/share/cmake-2.2.3 +usr/share/doc/cmake-2.2.3 +usr/share/doc/Cygwin +usr/share/doc +usr/share/man/man1 +usr/share/man +usr/share +usr + diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx new file mode 100644 index 000000000..2dd3df7f3 --- /dev/null +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -0,0 +1,504 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildAndTestHandler.cxx,v $ + Language: C++ + Date: $Date: 2007-09-17 14:40:57 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestBuildAndTestHandler.h" + +#include "cmSystemTools.h" +#include "cmCTest.h" +#include "cmake.h" +#include "cmGlobalGenerator.h" +#include +#include "cmCTestTestHandler.h" + +//---------------------------------------------------------------------- +cmCTestBuildAndTestHandler::cmCTestBuildAndTestHandler() +{ + this->BuildTwoConfig = false; + this->BuildNoClean = false; + this->BuildNoCMake = false; + this->Timeout = 0; +} + +//---------------------------------------------------------------------- +void cmCTestBuildAndTestHandler::Initialize() +{ + this->BuildTargets.erase( + this->BuildTargets.begin(), this->BuildTargets.end()); + this->Superclass::Initialize(); +} + +//---------------------------------------------------------------------- +const char* cmCTestBuildAndTestHandler::GetOutput() +{ + return this->Output.c_str(); +} +//---------------------------------------------------------------------- +int cmCTestBuildAndTestHandler::ProcessHandler() +{ + this->Output = ""; + std::string output; + cmSystemTools::ResetErrorOccuredFlag(); + int retv = this->RunCMakeAndTest(&this->Output); + cmSystemTools::ResetErrorOccuredFlag(); + return retv; +} + +//---------------------------------------------------------------------- +int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, + cmOStringStream &out, std::string &cmakeOutString, std::string &cwd, + cmake *cm) +{ + unsigned int k; + std::vector args; + args.push_back(this->CTest->GetCMakeExecutable()); + args.push_back(this->SourceDir); + if(this->BuildGenerator.size()) + { + std::string generator = "-G"; + generator += this->BuildGenerator; + args.push_back(generator); + } + + const char* config = 0; + if ( this->CTest->GetConfigType().size() > 0 ) + { + config = this->CTest->GetConfigType().c_str(); + } +#ifdef CMAKE_INTDIR + config = CMAKE_INTDIR; +#endif + + if ( config ) + { + std::string btype + = "-DCMAKE_BUILD_TYPE:STRING=" + std::string(config); + args.push_back(btype); + } + + for(k=0; k < this->BuildOptions.size(); ++k) + { + args.push_back(this->BuildOptions[k]); + } + if (cm->Run(args) != 0) + { + out << "Error: cmake execution failed\n"; + out << cmakeOutString << "\n"; + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + if(outstring) + { + *outstring = out.str(); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, out.str() << std::endl); + } + return 1; + } + // do another config? + if(this->BuildTwoConfig) + { + if (cm->Run(args) != 0) + { + out << "Error: cmake execution failed\n"; + out << cmakeOutString << "\n"; + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + if(outstring) + { + *outstring = out.str(); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, out.str() << std::endl); + } + return 1; + } + } + out << "======== CMake output ======\n"; + out << cmakeOutString; + out << "======== End CMake output ======\n"; + return 0; +} + +//---------------------------------------------------------------------- +void CMakeMessageCallback(const char* m, const char*, bool&, void* s) +{ + std::string* out = (std::string*)s; + *out += m; + *out += "\n"; +} + +//---------------------------------------------------------------------- +void CMakeStdoutCallback(const char* m, int len, void* s) +{ + std::string* out = (std::string*)s; + out->append(m, len); +} + +//---------------------------------------------------------------------- +int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) +{ + unsigned int k; + std::string cmakeOutString; + cmSystemTools::SetErrorCallback(CMakeMessageCallback, &cmakeOutString); + cmSystemTools::SetStdoutCallback(CMakeStdoutCallback, &cmakeOutString); + cmOStringStream out; + + // if the generator and make program are not specified then it is an error + if (!this->BuildGenerator.size() || !this->BuildMakeProgram.size()) + { + if(outstring) + { + *outstring = + "--build-and-test requires that both the generator and makeprogram " + "be provided using the --build-generator and --build-makeprogram " + "command line options. "; + } + return 1; + } + + if ( this->CTest->GetConfigType().size() == 0 && + this->ConfigSample.size()) + { + // use the config sample to set the ConfigType + std::string fullPath; + std::string resultingConfig; + std::vector extraPaths; + std::vector failed; + fullPath = + cmCTestTestHandler::FindExecutable(this->CTest, + this->ConfigSample.c_str(), + resultingConfig, + extraPaths, + failed); + if (fullPath.size() && resultingConfig.size()) + { + this->CTest->SetConfigType(resultingConfig.c_str()); + } + out << "Using config sample with results: " + << fullPath << " and " << resultingConfig << std::endl; + } + + // we need to honor the timeout specified, the timeout include cmake, build + // and test time + double clock_start = cmSystemTools::GetTime(); + + // make sure the binary dir is there + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + out << "Internal cmake changing into directory: " + << this->BinaryDir << std::endl; + if (!cmSystemTools::FileIsDirectory(this->BinaryDir.c_str())) + { + cmSystemTools::MakeDirectory(this->BinaryDir.c_str()); + } + cmSystemTools::ChangeDirectory(this->BinaryDir.c_str()); + + // should we cmake? + cmake cm; + cm.SetGlobalGenerator(cm.CreateGlobalGenerator( + this->BuildGenerator.c_str())); + + if(!this->BuildNoCMake) + { + // do the cmake step, no timeout here since it is not a sub process + if (this->RunCMake(outstring,out,cmakeOutString,cwd,&cm)) + { + return 1; + } + } + + // do the build + std::vector::iterator tarIt; + if ( this->BuildTargets.size() == 0 ) + { + this->BuildTargets.push_back(""); + } + for ( tarIt = this->BuildTargets.begin(); + tarIt != this->BuildTargets.end(); ++ tarIt ) + { + double remainingTime = 0; + if (this->Timeout) + { + remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start; + if (remainingTime <= 0) + { + if(outstring) + { + *outstring = "--build-and-test timeout exceeded. "; + } + return 1; + } + } + std::string output; + const char* config = 0; + if ( this->CTest->GetConfigType().size() > 0 ) + { + config = this->CTest->GetConfigType().c_str(); + } +#ifdef CMAKE_INTDIR + config = CMAKE_INTDIR; +#endif + if(!config) + { + config = "Debug"; + } + int retVal = cm.GetGlobalGenerator()->Build( + this->SourceDir.c_str(), this->BinaryDir.c_str(), + this->BuildProject.c_str(), tarIt->c_str(), + &output, this->BuildMakeProgram.c_str(), + config, + !this->BuildNoClean, + false, remainingTime); + out << output; + // if the build failed then return + if (retVal) + { + if(outstring) + { + *outstring = out.str(); + } + return 1; + } + } + if(outstring) + { + *outstring = out.str(); + } + + // if no test was specified then we are done + if (!this->TestCommand.size()) + { + return 0; + } + + // now run the compiled test if we can find it + // store the final location in fullPath + std::string fullPath; + std::string resultingConfig; + std::vector extraPaths; + // if this->ExecutableDirectory is set try that as well + if (this->ExecutableDirectory.size()) + { + std::string tempPath = this->ExecutableDirectory; + tempPath += "/"; + tempPath += this->TestCommand; + extraPaths.push_back(tempPath); + } + std::vector failed; + fullPath = + cmCTestTestHandler::FindExecutable(this->CTest, + this->TestCommand.c_str(), + resultingConfig, + extraPaths, + failed); + + if(!cmSystemTools::FileExists(fullPath.c_str())) + { + out << "Could not find path to executable, perhaps it was not built: " + << this->TestCommand << "\n"; + out << "tried to find it in these places:\n"; + out << fullPath.c_str() << "\n"; + for(unsigned int i=0; i < failed.size(); ++i) + { + out << failed[i] << "\n"; + } + if(outstring) + { + *outstring = out.str(); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, out.str()); + } + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + + std::vector testCommand; + testCommand.push_back(fullPath.c_str()); + for(k=0; k < this->TestCommandArgs.size(); ++k) + { + testCommand.push_back(this->TestCommandArgs[k].c_str()); + } + testCommand.push_back(0); + std::string outs; + int retval = 0; + // run the test from the this->BuildRunDir if set + if(this->BuildRunDir.size()) + { + out << "Run test in directory: " << this->BuildRunDir << "\n"; + cmSystemTools::ChangeDirectory(this->BuildRunDir.c_str()); + } + out << "Running test executable: " << fullPath << " "; + for(k=0; k < this->TestCommandArgs.size(); ++k) + { + out << this->TestCommandArgs[k] << " "; + } + out << "\n"; + + // how much time is remaining + double remainingTime = 0; + if (this->Timeout) + { + remainingTime = this->Timeout - cmSystemTools::GetTime() + clock_start; + if (remainingTime <= 0) + { + if(outstring) + { + *outstring = "--build-and-test timeout exceeded. "; + } + return 1; + } + } + + int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval, 0, + remainingTime); + + if(runTestRes != cmsysProcess_State_Exited || retval != 0) + { + out << "Failed to run test command: " << testCommand[0] << "\n"; + retval = 1; + } + + out << outs << "\n"; + if(outstring) + { + *outstring = out.str(); + } + else + { + cmCTestLog(this->CTest, OUTPUT, out.str() << std::endl); + } + return retval; +} + +//---------------------------------------------------------------------- +int cmCTestBuildAndTestHandler::ProcessCommandLineArguments( + const std::string& currentArg, size_t& idx, + const std::vector& allArgs) +{ + // --build-and-test options + if(currentArg.find("--build-and-test",0) == 0 && idx < allArgs.size() - 1) + { + if(idx+2 < allArgs.size()) + { + idx++; + this->SourceDir = allArgs[idx]; + idx++; + this->BinaryDir = allArgs[idx]; + // dir must exist before CollapseFullPath is called + cmSystemTools::MakeDirectory(this->BinaryDir.c_str()); + this->BinaryDir + = cmSystemTools::CollapseFullPath(this->BinaryDir.c_str()); + this->SourceDir + = cmSystemTools::CollapseFullPath(this->SourceDir.c_str()); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "--build-and-test must have source and binary dir" << std::endl); + return 0; + } + } + if(currentArg.find("--build-target",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->BuildTargets.push_back(allArgs[idx]); + } + if(currentArg.find("--build-nocmake",0) == 0) + { + this->BuildNoCMake = true; + } + if(currentArg.find("--build-run-dir",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->BuildRunDir = allArgs[idx]; + } + if(currentArg.find("--build-two-config",0) == 0) + { + this->BuildTwoConfig = true; + } + if(currentArg.find("--build-exe-dir",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->ExecutableDirectory = allArgs[idx]; + } + if(currentArg.find("--test-timeout",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->Timeout = atof(allArgs[idx].c_str()); + } + if(currentArg.find("--build-generator",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->BuildGenerator = allArgs[idx]; + } + if(currentArg.find("--build-project",0) == 0 && idx < allArgs.size() - 1) + { + idx++; + this->BuildProject = allArgs[idx]; + } + if(currentArg.find("--build-makeprogram",0) == 0 && + idx < allArgs.size() - 1) + { + idx++; + this->BuildMakeProgram = allArgs[idx]; + } + if(currentArg.find("--build-config-sample",0) == 0 && + idx < allArgs.size() - 1) + { + idx++; + this->ConfigSample = allArgs[idx]; + } + if(currentArg.find("--build-noclean",0) == 0) + { + this->BuildNoClean = true; + } + if(currentArg.find("--build-options",0) == 0 && idx < allArgs.size() - 1) + { + ++idx; + bool done = false; + while(idx < allArgs.size() && !done) + { + this->BuildOptions.push_back(allArgs[idx]); + if(idx+1 < allArgs.size() + && (allArgs[idx+1] == "--build-target" || + allArgs[idx+1] == "--test-command")) + { + done = true; + } + else + { + ++idx; + } + } + } + if(currentArg.find("--test-command",0) == 0 && idx < allArgs.size() - 1) + { + ++idx; + this->TestCommand = allArgs[idx]; + while(idx+1 < allArgs.size()) + { + ++idx; + this->TestCommandArgs.push_back(allArgs[idx]); + } + } + return 1; +} + diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h new file mode 100644 index 000000000..750b8f7f4 --- /dev/null +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildAndTestHandler.h,v $ + Language: C++ + Date: $Date: 2007-03-19 17:04:10 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestBuildAndTestHandler_h +#define cmCTestBuildAndTestHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +class cmake; + +/** \class cmCTestBuildAndTestHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestBuildAndTestHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestBuildAndTestHandler, cmCTestGenericHandler); + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + //! Set all the build and test arguments + virtual int ProcessCommandLineArguments( + const std::string& currentArg, size_t& idx, + const std::vector& allArgs); + + /* + * Get the output variable + */ + const char* GetOutput(); + + cmCTestBuildAndTestHandler(); + + virtual void Initialize(); + +protected: + ///! Run CMake and build a test and then run it as a single test. + int RunCMakeAndTest(std::string* output); + int RunCMake(std::string* outstring, cmOStringStream &out, + std::string &cmakeOutString, + std::string &cwd, cmake *cm); + + cmStdString Output; + + std::string BuildGenerator; + std::vector BuildOptions; + bool BuildTwoConfig; + std::string BuildMakeProgram; + std::string ConfigSample; + std::string SourceDir; + std::string BinaryDir; + std::string BuildProject; + std::string TestCommand; + bool BuildNoClean; + std::string BuildRunDir; + std::string ExecutableDirectory; + std::vector TestCommandArgs; + std::vector BuildTargets; + bool BuildNoCMake; + double Timeout; +}; + +#endif + diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx new file mode 100755 index 000000000..5515bd699 --- /dev/null +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -0,0 +1,134 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildCommand.cxx,v $ + Language: C++ + Date: $Date: 2007-09-17 14:40:57 $ + Version: $Revision: 1.18 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestBuildCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" +#include "cmake.h" +#include "cmGlobalGenerator.h" + + +//---------------------------------------------------------------------------- +cmCTestBuildCommand::cmCTestBuildCommand() +{ + this->GlobalGenerator = 0; +} + +//---------------------------------------------------------------------------- +cmCTestBuildCommand::~cmCTestBuildCommand() +{ + if ( this->GlobalGenerator ) + { + delete this->GlobalGenerator; + this->GlobalGenerator = 0; + } +} + +//---------------------------------------------------------------------------- +cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() +{ + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("build"); + if ( !handler ) + { + this->SetError("internal CTest error. Cannot instantiate build handler"); + return 0; + } + + const char* ctestBuildCommand + = this->Makefile->GetDefinition("CTEST_BUILD_COMMAND"); + if ( ctestBuildCommand && *ctestBuildCommand ) + { + this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand); + } + else + { + const char* cmakeGeneratorName + = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); + const char* cmakeProjectName + = this->Makefile->GetDefinition("CTEST_PROJECT_NAME"); + const char* cmakeBuildConfiguration + = this->Makefile->GetDefinition("CTEST_BUILD_CONFIGURATION"); + const char* cmakeBuildAdditionalFlags + = this->Makefile->GetDefinition("CTEST_BUILD_FLAGS"); + const char* cmakeBuildTarget + = this->Makefile->GetDefinition("CTEST_BUILD_TARGET"); + if ( cmakeGeneratorName && *cmakeGeneratorName && + cmakeProjectName && *cmakeProjectName ) + { + if ( !cmakeBuildConfiguration ) + { + cmakeBuildConfiguration = "Release"; + } + if ( this->GlobalGenerator ) + { + if ( strcmp(this->GlobalGenerator->GetName(), + cmakeGeneratorName) != 0 ) + { + delete this->GlobalGenerator; + this->GlobalGenerator = 0; + } + } + if ( !this->GlobalGenerator ) + { + this->GlobalGenerator = + this->Makefile->GetCMakeInstance()->CreateGlobalGenerator( + cmakeGeneratorName); + } + this->GlobalGenerator->FindMakeProgram(this->Makefile); + const char* cmakeMakeProgram + = this->Makefile->GetDefinition("CMAKE_MAKE_PROGRAM"); + if(strlen(cmakeBuildConfiguration) == 0) + { + const char* config = 0; +#ifdef CMAKE_INTDIR + config = CMAKE_INTDIR; +#endif + if(!config) + { + config = "Debug"; + } + cmakeBuildConfiguration = config; + } + + std::string buildCommand + = this->GlobalGenerator-> + GenerateBuildCommand(cmakeMakeProgram, + cmakeProjectName, + cmakeBuildAdditionalFlags, cmakeBuildTarget, + cmakeBuildConfiguration, true, false); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "SetMakeCommand:" + << buildCommand.c_str() << "\n"); + this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str()); + } + else + { + cmOStringStream ostr; + ostr << "CTEST_BUILD_COMMAND or CTEST_CMAKE_GENERATOR not specified. " + "Please specify the CTEST_CMAKE_GENERATOR and CTEST_PROJECT_NAME if " + "this is a CMake project, or specify the CTEST_BUILD_COMMAND for " + "cmake or any other project."; + this->SetError(ostr.str().c_str()); + return 0; + } + } + + return handler; +} + + diff --git a/Source/CTest/cmCTestBuildCommand.h b/Source/CTest/cmCTestBuildCommand.h new file mode 100755 index 000000000..e6195dbbf --- /dev/null +++ b/Source/CTest/cmCTestBuildCommand.h @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestBuildCommand_h +#define cmCTestBuildCommand_h + +#include "cmCTestHandlerCommand.h" + +class cmGlobalGenerator; + +/** \class cmCTestBuild + * \brief Run a ctest script + * + * cmCTestBuildCommand defineds the command to build the project. + */ +class cmCTestBuildCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestBuildCommand(); + ~cmCTestBuildCommand(); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestBuildCommand* ni = new cmCTestBuildCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_BUILD";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Builds the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_BUILD([BUILD build_dir] [RETURN_VALUE res])\n" + "Builds the given build directory and stores results in Build.xml."; + } + + cmTypeMacro(cmCTestBuildCommand, cmCTestHandlerCommand); + + cmGlobalGenerator* GlobalGenerator; + +protected: + cmCTestGenericHandler* InitializeHandler(); +}; + + +#endif diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx new file mode 100755 index 000000000..0fec50bcb --- /dev/null +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -0,0 +1,1022 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.61.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestBuildHandler.h" + +#include "cmCTest.h" +#include "cmake.h" +#include "cmMakefile.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" +#include "cmGeneratedFileStream.h" + +//#include +#include + +// used for sleep +#ifdef _WIN32 +#include "windows.h" +#endif + +#include +#include +#include +#include + +#if defined(__BORLANDC__) +# pragma warn -8060 /* possibly incorrect assignment */ +#endif + +static const char* cmCTestErrorMatches[] = { + "^[Bb]us [Ee]rror", + "^[Ss]egmentation [Vv]iolation", + "^[Ss]egmentation [Ff]ault", + "([^ :]+):([0-9]+): ([^ \\t])", + "([^:]+): error[ \\t]*[0-9]+[ \\t]*:", + "^Error ([0-9]+):", + "^Fatal", + "^Error: ", + "^Error ", + "[0-9] ERROR: ", + "^\"[^\"]+\", line [0-9]+: [^Ww]", + "^cc[^C]*CC: ERROR File = ([^,]+), Line = ([0-9]+)", + "^ld([^:])*:([ \\t])*ERROR([^:])*:", + "^ild:([ \\t])*\\(undefined symbol\\)", + "([^ :]+) : (error|fatal error|catastrophic error)", + "([^:]+): (Error:|error|undefined reference|multiply defined)", + "([^:]+)\\(([^\\)]+)\\) : (error|fatal error|catastrophic error)", + "^fatal error C[0-9]+:", + ": syntax error ", + "^collect2: ld returned 1 exit status", + "ld terminated with signal", + "Unsatisfied symbols:", + "^Unresolved:", + "Undefined symbols:", + "^Undefined[ \\t]+first referenced", + "^CMake Error:", + ":[ \\t]cannot find", + ":[ \\t]can't find", + ": \\*\\*\\* No rule to make target \\`.*\\'. Stop", + ": \\*\\*\\* No targets specified and no makefile found", + ": Invalid loader fixup for symbol", + ": Invalid fixups exist", + ": Can't find library for", + ": internal link edit command failed", + ": Unrecognized option \\`.*\\'", + "\", line [0-9]+\\.[0-9]+: [0-9]+-[0-9]+ \\([^WI]\\)", + "ld: 0706-006 Cannot find or open library file: -l ", + "ild: \\(argument error\\) can't find library argument ::", + "^could not be found and will not be loaded.", + "s:616 string too big", + "make: Fatal error: ", + "ld: 0711-993 Error occurred while writing to the output file:", + "ld: fatal: ", + "final link failed:", + "make: \\*\\*\\*.*Error", + "make\\[.*\\]: \\*\\*\\*.*Error", + "\\*\\*\\* Error code", + "nternal error:", + "Makefile:[0-9]+: \\*\\*\\* .* Stop\\.", + ": No such file or directory", + ": Invalid argument", + "^The project cannot be built\\.", + 0 +}; + +static const char* cmCTestErrorExceptions[] = { + "instantiated from ", + "candidates are:", + ": warning", + ": \\(Warning\\)", + ": note", + "makefile:", + "Makefile:", + ":[ \\t]+Where:", + "([^ :]+):([0-9]+): Warning", + "------ Build started: .* ------", + 0 +}; + +static const char* cmCTestWarningMatches[] = { + "([^ :]+):([0-9]+): warning:", + "([^ :]+):([0-9]+): note:", + "^cc[^C]*CC: WARNING File = ([^,]+), Line = ([0-9]+)", + "^ld([^:])*:([ \\t])*WARNING([^:])*:", + "([^:]+): warning ([0-9]+):", + "^\"[^\"]+\", line [0-9]+: [Ww](arning|arnung)", + "([^:]+): warning[ \\t]*[0-9]+[ \\t]*:", + "^(Warning|Warnung) ([0-9]+):", + "^(Warning|Warnung) ", + "WARNING: ", + "([^ :]+) : warning", + "([^:]+): warning", + "\", line [0-9]+\\.[0-9]+: [0-9]+-[0-9]+ \\([WI]\\)", + "^cxx: Warning:", + ".*file: .* has no symbols", + "([^ :]+):([0-9]+): (Warning|Warnung)", + "\\([0-9]*\\): remark #[0-9]*", + "\".*\", line [0-9]+: remark\\([0-9]*\\):", + "cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*", + 0 +}; + +static const char* cmCTestWarningExceptions[] = { + "/usr/.*/X11/Xlib\\.h:[0-9]+: war.*: ANSI C\\+\\+ forbids declaration", + "/usr/.*/X11/Xutil\\.h:[0-9]+: war.*: ANSI C\\+\\+ forbids declaration", + "/usr/.*/X11/XResource\\.h:[0-9]+: war.*: ANSI C\\+\\+ forbids declaration", + "WARNING 84 :", + "WARNING 47 :", + "makefile:", + "Makefile:", + "warning: Clock skew detected. Your build may be incomplete.", + "/usr/openwin/include/GL/[^:]+:", + "bind_at_load", + "XrmQGetResource", + "IceFlush", + "warning LNK4089: all references to [^ \\t]+ discarded by .OPT:REF", + "ld32: WARNING 85: definition of dataKey in", + "cc: warning 422: Unknown option \"\\+b", + "_with_warning_C", + 0 +}; + +struct cmCTestBuildCompileErrorWarningRex +{ + const char* RegularExpressionString; + int FileIndex; + int LineIndex; +}; + +static cmCTestBuildCompileErrorWarningRex +cmCTestWarningErrorFileLine[] = { + { "^Warning W[0-9]+ ([a-zA-Z.\\:/0-9_+ ~-]+) ([0-9]+):", 1, 2 }, + { "^([a-zA-Z./0-9_+ ~-]+):([0-9]+):", 1, 2 }, + { "^([a-zA-Z.\\:/0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, + { "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 }, + { "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 }, + { "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 }, + { 0, 0, 0 } +}; + +//---------------------------------------------------------------------- +cmCTestBuildHandler::cmCTestBuildHandler() +{ + this->MaxPreContext = 6; + this->MaxPostContext = 6; + + this->MaxErrors = 50; + this->MaxWarnings = 50; + + this->LastErrorOrWarning = this->ErrorsAndWarnings.end(); + +} + +//---------------------------------------------------------------------- +void cmCTestBuildHandler::Initialize() +{ + this->Superclass::Initialize(); + this->StartBuild = ""; + this->EndBuild = ""; + this->CustomErrorMatches.clear(); + this->CustomErrorExceptions.clear(); + this->CustomWarningMatches.clear(); + this->CustomWarningExceptions.clear(); + this->ErrorWarningFileLineRegex.clear(); + + this->ErrorMatchRegex.clear(); + this->ErrorExceptionRegex.clear(); + this->WarningMatchRegex.clear(); + this->WarningExceptionRegex.clear(); + this->BuildProcessingQueue.clear(); + this->BuildProcessingErrorQueue.clear(); + this->BuildOutputLogSize = 0; + this->CurrentProcessingLine.clear(); + + this->SimplifySourceDir = ""; + this->SimplifyBuildDir = ""; + this->OutputLineCounter = 0; + this->ErrorsAndWarnings.clear(); + this->LastErrorOrWarning = this->ErrorsAndWarnings.end(); + this->PostContextCount = 0; + this->MaxPreContext = 6; + this->MaxPostContext = 6; + this->PreContext.clear(); + + this->TotalErrors = 0; + this->TotalWarnings = 0; + this->LastTickChar = 0; + + this->ErrorQuotaReached = false; + this->WarningQuotaReached = false; + + this->MaxErrors = 50; + this->MaxWarnings = 50; +} + +//---------------------------------------------------------------------- +void cmCTestBuildHandler::PopulateCustomVectors(cmMakefile *mf) +{ + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_ERROR_MATCH", + this->CustomErrorMatches); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_ERROR_EXCEPTION", + this->CustomErrorExceptions); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_WARNING_MATCH", + this->CustomWarningMatches); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_WARNING_EXCEPTION", + this->CustomWarningExceptions); + this->CTest->PopulateCustomInteger(mf, + "CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS", + this->MaxErrors); + this->CTest->PopulateCustomInteger(mf, + "CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS", + this->MaxWarnings); +} + +//---------------------------------------------------------------------- +//clearly it would be nice if this were broken up into a few smaller +//functions and commented... +int cmCTestBuildHandler::ProcessHandler() +{ + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Build project" << std::endl); + + // do we have time for this + if (this->CTest->GetRemainingTimeAllowed() < 120) + { + return 0; + } + + int entry; + for ( entry = 0; + cmCTestWarningErrorFileLine[entry].RegularExpressionString; + ++ entry ) + { + cmCTestBuildHandler::cmCTestCompileErrorWarningRex r; + if ( r.RegularExpression.compile( + cmCTestWarningErrorFileLine[entry].RegularExpressionString) ) + { + r.FileIndex = cmCTestWarningErrorFileLine[entry].FileIndex; + r.LineIndex = cmCTestWarningErrorFileLine[entry].LineIndex; + this->ErrorWarningFileLineRegex.push_back(r); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem Compiling regular expression: " + << cmCTestWarningErrorFileLine[entry].RegularExpressionString + << std::endl); + } + } + + // Determine build command and build directory + const std::string &makeCommand + = this->CTest->GetCTestConfiguration("MakeCommand"); + cmCTestLog(this->CTest, + HANDLER_VERBOSE_OUTPUT, "MakeCommand:" << makeCommand << + "\n"); + if ( makeCommand.size() == 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find MakeCommand key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + const std::string &buildDirectory + = this->CTest->GetCTestConfiguration("BuildDirectory"); + if ( buildDirectory.size() == 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find BuildDirectory key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + + // Create a last build log + cmGeneratedFileStream ofs; + double elapsed_time_start = cmSystemTools::GetTime(); + if ( !this->StartLogFile("Build", ofs) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build log file" + << std::endl); + } + + // Create lists of regular expression strings for errors, error exceptions, + // warnings and warning exceptions. + std::vector::size_type cc; + for ( cc = 0; cmCTestErrorMatches[cc]; cc ++ ) + { + this->CustomErrorMatches.push_back(cmCTestErrorMatches[cc]); + } + for ( cc = 0; cmCTestErrorExceptions[cc]; cc ++ ) + { + this->CustomErrorExceptions.push_back(cmCTestErrorExceptions[cc]); + } + for ( cc = 0; cmCTestWarningMatches[cc]; cc ++ ) + { + this->CustomWarningMatches.push_back(cmCTestWarningMatches[cc]); + } + + for ( cc = 0; cmCTestWarningExceptions[cc]; cc ++ ) + { + this->CustomWarningExceptions.push_back(cmCTestWarningExceptions[cc]); + } + + // Pre-compile regular expressions objects for all regular expressions + std::vector::iterator it; + +#define cmCTestBuildHandlerPopulateRegexVector(strings, regexes) \ + regexes.clear(); \ + cmCTestLog(this->CTest, DEBUG, this << "Add " #regexes \ + << std::endl); \ + for ( it = strings.begin(); it != strings.end(); ++it ) \ + { \ + cmCTestLog(this->CTest, DEBUG, "Add " #strings ": " \ + << it->c_str() << std::endl); \ + regexes.push_back(it->c_str()); \ + } + cmCTestBuildHandlerPopulateRegexVector( + this->CustomErrorMatches, this->ErrorMatchRegex); + cmCTestBuildHandlerPopulateRegexVector( + this->CustomErrorExceptions, this->ErrorExceptionRegex); + cmCTestBuildHandlerPopulateRegexVector( + this->CustomWarningMatches, this->WarningMatchRegex); + cmCTestBuildHandlerPopulateRegexVector( + this->CustomWarningExceptions, this->WarningExceptionRegex); + + + // Determine source and binary tree substitutions to simplify the output. + this->SimplifySourceDir = ""; + this->SimplifyBuildDir = ""; + if ( this->CTest->GetCTestConfiguration("SourceDirectory").size() > 20 ) + { + std::string srcdir + = this->CTest->GetCTestConfiguration("SourceDirectory") + "/"; + std::string srcdirrep; + for ( cc = srcdir.size()-2; cc > 0; cc -- ) + { + if ( srcdir[cc] == '/' ) + { + srcdirrep = srcdir.c_str() + cc; + srcdirrep = "/..." + srcdirrep; + srcdir = srcdir.substr(0, cc+1); + break; + } + } + this->SimplifySourceDir = srcdir; + } + if ( this->CTest->GetCTestConfiguration("BuildDirectory").size() > 20 ) + { + std::string bindir + = this->CTest->GetCTestConfiguration("BuildDirectory") + "/"; + std::string bindirrep; + for ( cc = bindir.size()-2; cc > 0; cc -- ) + { + if ( bindir[cc] == '/' ) + { + bindirrep = bindir.c_str() + cc; + bindirrep = "/..." + bindirrep; + bindir = bindir.substr(0, cc+1); + break; + } + } + this->SimplifyBuildDir = bindir; + } + + + // Ok, let's do the build + + // Remember start build time + this->StartBuild = this->CTest->CurrentTime(); + this->StartBuildTime = cmSystemTools::GetTime(); + int retVal = 0; + int res = cmsysProcess_State_Exited; + if ( !this->CTest->GetShowOnly() ) + { + res = this->RunMakeCommand(makeCommand.c_str(), &retVal, + buildDirectory.c_str(), 0, ofs); + } + else + { + cmCTestLog(this->CTest, DEBUG, "Build with command: " << makeCommand + << std::endl); + } + + // Remember end build time and calculate elapsed time + this->EndBuild = this->CTest->CurrentTime(); + this->EndBuildTime = cmSystemTools::GetTime(); + double elapsed_build_time = cmSystemTools::GetTime() - elapsed_time_start; + if (res != cmsysProcess_State_Exited || retVal ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Error(s) when building project" + << std::endl); + } + + // Cleanups strings in the errors and warnings list. + t_ErrorsAndWarningsVector::iterator evit; + if ( !this->SimplifySourceDir.empty() ) + { + for ( evit = this->ErrorsAndWarnings.begin(); + evit != this->ErrorsAndWarnings.end(); + ++ evit ) + { + cmSystemTools::ReplaceString( + evit->Text, this->SimplifySourceDir.c_str(), "/.../"); + cmSystemTools::ReplaceString( + evit->PreContext, this->SimplifySourceDir.c_str(), "/.../"); + cmSystemTools::ReplaceString( + evit->PostContext, this->SimplifySourceDir.c_str(), "/.../"); + } + } + + if ( !this->SimplifyBuildDir.empty() ) + { + for ( evit = this->ErrorsAndWarnings.begin(); + evit != this->ErrorsAndWarnings.end(); + ++ evit ) + { + cmSystemTools::ReplaceString( + evit->Text, this->SimplifyBuildDir.c_str(), "/.../"); + cmSystemTools::ReplaceString( + evit->PreContext, this->SimplifyBuildDir.c_str(), "/.../"); + cmSystemTools::ReplaceString( + evit->PostContext, this->SimplifyBuildDir.c_str(), "/.../"); + } + } + + // Display message about number of errors and warnings + cmCTestLog(this->CTest, HANDLER_OUTPUT, " " << this->TotalErrors + << (this->TotalErrors >= this->MaxErrors ? " or more" : "") + << " Compiler errors" << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " " << this->TotalWarnings + << (this->TotalWarnings >= this->MaxWarnings ? " or more" : "") + << " Compiler warnings" << std::endl); + + // Generate XML output + cmGeneratedFileStream xofs; + if( !this->StartResultingXML("Build", xofs)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create build XML file" + << std::endl); + return -1; + } + this->GenerateDartBuildOutput( + xofs, this->ErrorsAndWarnings, elapsed_build_time); + return 0; +} + +//---------------------------------------------------------------------- +void cmCTestBuildHandler::GenerateDartBuildOutput( + std::ostream& os, + std::vector ew, + double elapsed_build_time) +{ + this->CTest->StartXML(os); + os << "\n" + << "\t" << this->StartBuild << "\n" + << "\t" << + static_cast(this->StartBuildTime) + << "\n" + << "" + << this->CTest->MakeXMLSafe( + this->CTest->GetCTestConfiguration("MakeCommand")) + << "" << std::endl; + + std::vector::iterator it; + + // only report the first 50 warnings and first 50 errors + unsigned short numErrorsAllowed = this->MaxErrors; + unsigned short numWarningsAllowed = this->MaxWarnings; + std::string srcdir = this->CTest->GetCTestConfiguration("SourceDirectory"); + // make sure the source dir is in the correct case on windows + // via a call to collapse full path. + srcdir = cmSystemTools::CollapseFullPath(srcdir.c_str()); + srcdir += "/"; + for ( it = ew.begin(); + it != ew.end() && (numErrorsAllowed || numWarningsAllowed); it++ ) + { + cmCTestBuildErrorWarning *cm = &(*it); + if (cm->Error && numErrorsAllowed || + !cm->Error && numWarningsAllowed) + { + if (cm->Error) + { + numErrorsAllowed--; + } + else + { + numWarningsAllowed--; + } + os << "\t<" << (cm->Error ? "Error" : "Warning") << ">\n" + << "\t\t" << cm->LogLine << "\n" + << "\t\t" << this->CTest->MakeXMLSafe(cm->Text) + << "\n" << std::endl; + std::vector::iterator rit; + for ( rit = this->ErrorWarningFileLineRegex.begin(); + rit != this->ErrorWarningFileLineRegex.end(); ++ rit ) + { + cmsys::RegularExpression* re = &rit->RegularExpression; + if ( re->find(cm->Text.c_str() ) ) + { + cm->SourceFile = re->match(rit->FileIndex); + // At this point we need to make this->SourceFile relative to + // the source root of the project, so cvs links will work + cmSystemTools::ConvertToUnixSlashes(cm->SourceFile); + if(cm->SourceFile.find("/.../") != cm->SourceFile.npos) + { + cmSystemTools::ReplaceString(cm->SourceFile, "/.../", ""); + std::string::size_type p = cm->SourceFile.find("/"); + if(p != cm->SourceFile.npos) + { + cm->SourceFile = cm->SourceFile.substr( + p+1, cm->SourceFile.size()-p); + } + } + else + { + // make sure it is a full path with the correct case + cm->SourceFile = cmSystemTools::CollapseFullPath( + cm->SourceFile.c_str()); + cmSystemTools::ReplaceString( + cm->SourceFile, srcdir.c_str(), ""); + } + cm->LineNumber = atoi(re->match(rit->LineIndex).c_str()); + break; + } + } + if ( !cm->SourceFile.empty() && cm->LineNumber >= 0 ) + { + if ( cm->SourceFile.size() > 0 ) + { + os << "\t\t" << cm->SourceFile << "" + << std::endl; + } + if ( cm->SourceFileTail.size() > 0 ) + { + os << "\t\t" << cm->SourceFileTail + << "" << std::endl; + } + if ( cm->LineNumber >= 0 ) + { + os << "\t\t" << cm->LineNumber + << "" << std::endl; + } + } + os << "\t\t" << this->CTest->MakeXMLSafe(cm->PreContext) + << "\n" + << "\t\t" << this->CTest->MakeXMLSafe(cm->PostContext); + // is this the last warning or error, if so notify + if (cm->Error && !numErrorsAllowed || + !cm->Error && !numWarningsAllowed) + { + os << "\nThe maximum number of reported warnings or errors has been " + "reached!!!\n"; + } + os << "\n" + << "\t\t0\n" + << "Error ? "Error" : "Warning") << ">\n\n" + << std::endl; + } + } + os << "\t\n\t\n" + << "\t" << this->EndBuild << "\n" + << "\t" << static_cast(this->EndBuildTime) + << "\n" + << "" << static_cast(elapsed_build_time/6)/10.0 + << "" + << "" << std::endl; + this->CTest->EndXML(os); +} + +//###################################################################### +//###################################################################### +//###################################################################### +//###################################################################### + +//---------------------------------------------------------------------- +int cmCTestBuildHandler::RunMakeCommand(const char* command, + int* retVal, const char* dir, int timeout, std::ofstream& ofs) +{ + // First generate the command and arguments + std::vector args = cmSystemTools::ParseArguments(command); + + if(args.size() < 1) + { + return false; + } + + std::vector argv; + for(std::vector::const_iterator a = args.begin(); + a != args.end(); ++a) + { + argv.push_back(a->c_str()); + } + argv.push_back(0); + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:"); + std::vector::iterator ait; + for ( ait = argv.begin(); ait != argv.end() && *ait; ++ ait ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " \"" << *ait << "\""); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl); + + // Now create process object + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmsysProcess_SetWorkingDirectory(cp, dir); + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_Execute(cp); + + // Initialize tick's + std::string::size_type tick = 0; + const std::string::size_type tick_len = 1024; + + char* data; + int length; + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Each symbol represents " << tick_len << " bytes of output." + << std::endl + << " '!' represents an error and '*' a warning." << std::endl + << " " << std::flush); + + // Initialize building structures + this->BuildProcessingQueue.clear(); + this->OutputLineCounter = 0; + this->ErrorsAndWarnings.clear(); + this->TotalErrors = 0; + this->TotalWarnings = 0; + this->BuildOutputLogSize = 0; + this->LastTickChar = '.'; + this->WarningQuotaReached = false; + this->ErrorQuotaReached = false; + + // For every chunk of data + int res; + while((res = cmsysProcess_WaitForData(cp, &data, &length, 0))) + { + // Replace '\0' with '\n', since '\0' does not really make sense. This is + // for Visual Studio output + for(int cc =0; cc < length; ++cc) + { + if(data[cc] == 0) + { + data[cc] = '\n'; + } + } + + // Process the chunk of data + if ( res == cmsysProcess_Pipe_STDERR ) + { + this->ProcessBuffer(data, length, tick, tick_len, ofs, + &this->BuildProcessingErrorQueue); + } + else + { + this->ProcessBuffer(data, length, tick, tick_len, ofs, + &this->BuildProcessingQueue); + } + } + + this->ProcessBuffer(0, 0, tick, tick_len, ofs, &this->BuildProcessingQueue); + this->ProcessBuffer(0, 0, tick, tick_len, ofs, + &this->BuildProcessingErrorQueue); + cmCTestLog(this->CTest, OUTPUT, " Size of output: " + << int(this->BuildOutputLogSize / 1024.0) << "K" << std::endl); + + // Properly handle output of the build command + cmsysProcess_WaitForExit(cp, 0); + int result = cmsysProcess_GetState(cp); + + if(result == cmsysProcess_State_Exited) + { + if (retVal) + { + *retVal = cmsysProcess_GetExitValue(cp); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Command exited with the value: " << *retVal << std::endl); + // if a non zero return value + if (*retVal) + { + // If there was an error running command, report that on the + // dashboard. + cmCTestBuildErrorWarning errorwarning; + errorwarning.LogLine = 1; + errorwarning.Text + = "*** WARNING non-zero return value in ctest from: "; + errorwarning.Text += argv[0]; + errorwarning.PreContext = ""; + errorwarning.PostContext = ""; + errorwarning.Error = false; + this->ErrorsAndWarnings.push_back(errorwarning); + this->TotalWarnings ++; + } + } + } + else if(result == cmsysProcess_State_Exception) + { + if (retVal) + { + *retVal = cmsysProcess_GetExitException(cp); + cmCTestLog(this->CTest, WARNING, "There was an exception: " << *retVal + << std::endl); + } + } + else if(result == cmsysProcess_State_Expired) + { + cmCTestLog(this->CTest, WARNING, "There was a timeout" << std::endl); + } + else if(result == cmsysProcess_State_Error) + { + // If there was an error running command, report that on the dashboard. + cmCTestBuildErrorWarning errorwarning; + errorwarning.LogLine = 1; + errorwarning.Text = "*** ERROR executing: "; + errorwarning.Text += cmsysProcess_GetErrorString(cp); + errorwarning.PreContext = ""; + errorwarning.PostContext = ""; + errorwarning.Error = true; + this->ErrorsAndWarnings.push_back(errorwarning); + this->TotalErrors ++; + cmCTestLog(this->CTest, ERROR_MESSAGE, "There was an error: " + << cmsysProcess_GetErrorString(cp) << std::endl); + } + + cmsysProcess_Delete(cp); + + return result; +} + +//###################################################################### +//###################################################################### +//###################################################################### +//###################################################################### + +//---------------------------------------------------------------------- +void cmCTestBuildHandler::ProcessBuffer(const char* data, int length, + size_t& tick, size_t tick_len, std::ofstream& ofs, + t_BuildProcessingQueueType* queue) +{ + const std::string::size_type tick_line_len = 50; + const char* ptr; + for ( ptr = data; ptr < data+length; ptr ++ ) + { + queue->push_back(*ptr); + } + this->BuildOutputLogSize += length; + + // until there are any lines left in the buffer + while ( 1 ) + { + // Find the end of line + t_BuildProcessingQueueType::iterator it; + for ( it = queue->begin(); + it != queue->end(); + ++ it ) + { + if ( *it == '\n' ) + { + break; + } + } + + // Once certain number of errors or warnings reached, ignore future errors + // or warnings. + if ( this->TotalWarnings >= this->MaxWarnings ) + { + this->WarningQuotaReached = true; + } + if ( this->TotalErrors >= this->MaxErrors ) + { + this->ErrorQuotaReached = true; + } + + // If the end of line was found + if ( it != queue->end() ) + { + // Create a contiguous array for the line + this->CurrentProcessingLine.clear(); + t_BuildProcessingQueueType::iterator cit; + for ( cit = queue->begin(); cit != it; ++cit ) + { + this->CurrentProcessingLine.push_back(*cit); + } + this->CurrentProcessingLine.push_back(0); + const char* line = &*this->CurrentProcessingLine.begin(); + + // Process the line + int lineType = this->ProcessSingleLine(line); + + // Erase the line from the queue + queue->erase(queue->begin(), it+1); + + // Depending on the line type, produce error or warning, or nothing + cmCTestBuildErrorWarning errorwarning; + bool found = false; + switch ( lineType ) + { + case b_WARNING_LINE: + this->LastTickChar = '*'; + errorwarning.Error = false; + found = true; + this->TotalWarnings ++; + break; + case b_ERROR_LINE: + this->LastTickChar = '!'; + errorwarning.Error = true; + found = true; + this->TotalErrors ++; + break; + } + if ( found ) + { + // This is an error or warning, so generate report + errorwarning.LogLine = static_cast(this->OutputLineCounter+1); + errorwarning.Text = line; + errorwarning.PreContext = ""; + errorwarning.PostContext = ""; + + // Copy pre-context to report + std::deque::iterator pcit; + for ( pcit = this->PreContext.begin(); + pcit != this->PreContext.end(); + ++pcit ) + { + errorwarning.PreContext += *pcit + "\n"; + } + this->PreContext.clear(); + + // Store report + this->ErrorsAndWarnings.push_back(errorwarning); + this->LastErrorOrWarning = this->ErrorsAndWarnings.end()-1; + this->PostContextCount = 0; + } + else + { + // This is not an error or warning. + // So, figure out if this is a post-context line + if ( this->ErrorsAndWarnings.size() && + this->LastErrorOrWarning != this->ErrorsAndWarnings.end() && + this->PostContextCount < this->MaxPostContext ) + { + this->PostContextCount ++; + this->LastErrorOrWarning->PostContext += line; + if ( this->PostContextCount < this->MaxPostContext ) + { + this->LastErrorOrWarning->PostContext += "\n"; + } + } + else + { + // Otherwise store pre-context for the next error + this->PreContext.push_back(line); + if ( this->PreContext.size() > this->MaxPreContext ) + { + this->PreContext.erase(this->PreContext.begin(), + this->PreContext.end()-this->MaxPreContext); + } + } + } + this->OutputLineCounter ++; + } + else + { + break; + } + } + + // Now that the buffer is processed, display missing ticks + int tickDisplayed = false; + while ( this->BuildOutputLogSize > (tick * tick_len) ) + { + tick ++; + cmCTestLog(this->CTest, HANDLER_OUTPUT, this->LastTickChar); + tickDisplayed = true; + if ( tick % tick_line_len == 0 && tick > 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Size: " + << int((this->BuildOutputLogSize / 1024.0) + 1) << "K" << std::endl + << " "); + } + } + if ( tickDisplayed ) + { + this->LastTickChar = '.'; + } + + // And if this is verbose output, display the content of the chunk + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + cmCTestLogWrite(data, length)); + + // Always store the chunk to the file + ofs << cmCTestLogWrite(data, length); +} + +//---------------------------------------------------------------------- +int cmCTestBuildHandler::ProcessSingleLine(const char* data) +{ + cmCTestLog(this->CTest, DEBUG, "Line: [" << data << "]" << std::endl); + + std::vector::iterator it; + + int warningLine = 0; + int errorLine = 0; + + // Check for regular expressions + + if ( !this->ErrorQuotaReached ) + { + // Errors + int wrxCnt = 0; + for ( it = this->ErrorMatchRegex.begin(); + it != this->ErrorMatchRegex.end(); + ++ it ) + { + if ( it->find(data) ) + { + errorLine = 1; + cmCTestLog(this->CTest, DEBUG, " Error Line: " << data + << " (matches: " << this->CustomErrorMatches[wrxCnt] << ")" + << std::endl); + break; + } + wrxCnt ++; + } + // Error exceptions + wrxCnt = 0; + for ( it = this->ErrorExceptionRegex.begin(); + it != this->ErrorExceptionRegex.end(); + ++ it ) + { + if ( it->find(data) ) + { + errorLine = 0; + cmCTestLog(this->CTest, DEBUG, " Not an error Line: " << data + << " (matches: " << this->CustomErrorExceptions[wrxCnt] << ")" + << std::endl); + break; + } + wrxCnt ++; + } + } + if ( !this->WarningQuotaReached ) + { + // Warnings + int wrxCnt = 0; + for ( it = this->WarningMatchRegex.begin(); + it != this->WarningMatchRegex.end(); + ++ it ) + { + if ( it->find(data) ) + { + warningLine = 1; + cmCTestLog(this->CTest, DEBUG, + " Warning Line: " << data + << " (matches: " << this->CustomWarningMatches[wrxCnt] << ")" + << std::endl); + break; + } + wrxCnt ++; + } + + wrxCnt = 0; + // Warning exceptions + for ( it = this->WarningExceptionRegex.begin(); + it != this->WarningExceptionRegex.end(); + ++ it ) + { + if ( it->find(data) ) + { + warningLine = 0; + cmCTestLog(this->CTest, DEBUG, " Not a warning Line: " << data + << " (matches: " << this->CustomWarningExceptions[wrxCnt] << ")" + << std::endl); + break; + } + wrxCnt ++; + } + } + if ( errorLine ) + { + return b_ERROR_LINE; + } + if ( warningLine ) + { + return b_WARNING_LINE; + } + return b_REGULAR_LINE; +} + diff --git a/Source/CTest/cmCTestBuildHandler.h b/Source/CTest/cmCTestBuildHandler.h new file mode 100755 index 000000000..ee45a0927 --- /dev/null +++ b/Source/CTest/cmCTestBuildHandler.h @@ -0,0 +1,141 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestBuildHandler.h,v $ + Language: C++ + Date: $Date: 2008-01-30 16:17:36 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestBuildHandler_h +#define cmCTestBuildHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +#include + +class cmMakefile; + +/** \class cmCTestBuildHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestBuildHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestBuildHandler, cmCTestGenericHandler); + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + cmCTestBuildHandler(); + + void PopulateCustomVectors(cmMakefile *mf); + + /** + * Initialize handler + */ + virtual void Initialize(); + +private: + //! Run command specialized for make and configure. Returns process status + // and retVal is return value or exception. + int RunMakeCommand(const char* command, + int* retVal, const char* dir, int timeout, + std::ofstream& ofs); + + enum { + b_REGULAR_LINE, + b_WARNING_LINE, + b_ERROR_LINE + }; + + class cmCTestCompileErrorWarningRex + { + public: + cmCTestCompileErrorWarningRex() {} + int FileIndex; + int LineIndex; + cmsys::RegularExpression RegularExpression; + }; + + struct cmCTestBuildErrorWarning + { + bool Error; + int LogLine; + std::string Text; + std::string SourceFile; + std::string SourceFileTail; + int LineNumber; + std::string PreContext; + std::string PostContext; + }; + + // generate the XML output + void GenerateDartBuildOutput(std::ostream& os, + std::vector, + double elapsed_time); + + + std::string StartBuild; + std::string EndBuild; + double StartBuildTime; + double EndBuildTime; + + std::vector CustomErrorMatches; + std::vector CustomErrorExceptions; + std::vector CustomWarningMatches; + std::vector CustomWarningExceptions; + std::vector ErrorWarningFileLineRegex; + + std::vector ErrorMatchRegex; + std::vector ErrorExceptionRegex; + std::vector WarningMatchRegex; + std::vector WarningExceptionRegex; + + typedef std::deque t_BuildProcessingQueueType; + + void ProcessBuffer(const char* data, int length, size_t& tick, + size_t tick_len, std::ofstream& ofs, t_BuildProcessingQueueType* queue); + int ProcessSingleLine(const char* data); + + t_BuildProcessingQueueType BuildProcessingQueue; + t_BuildProcessingQueueType BuildProcessingErrorQueue; + size_t BuildOutputLogSize; + std::vector CurrentProcessingLine; + + cmStdString SimplifySourceDir; + cmStdString SimplifyBuildDir; + size_t OutputLineCounter; + typedef std::vector t_ErrorsAndWarningsVector; + t_ErrorsAndWarningsVector ErrorsAndWarnings; + t_ErrorsAndWarningsVector::iterator LastErrorOrWarning; + size_t PostContextCount; + size_t MaxPreContext; + size_t MaxPostContext; + std::deque PreContext; + + int TotalErrors; + int TotalWarnings; + char LastTickChar; + + bool ErrorQuotaReached; + bool WarningQuotaReached; + + int MaxErrors; + int MaxWarnings; +}; + +#endif diff --git a/Source/CTest/cmCTestCommand.h b/Source/CTest/cmCTestCommand.h new file mode 100755 index 000000000..18462a5cc --- /dev/null +++ b/Source/CTest/cmCTestCommand.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-10 20:03:09 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestCommand_h +#define cmCTestCommand_h + +#include "cmCommand.h" + +class cmCTest; +class cmCTestScriptHandler; + +/** \class cmCTestCommand + * \brief A superclass for all commands added to the CTestScriptHandler + * + * cmCTestCommand is the superclass for all commands that will be added to + * the ctest script handlers parser. + * + */ +class cmCTestCommand : public cmCommand +{ +public: + + cmCTestCommand() {this->CTest = 0; this->CTestScriptHandler = 0;} + + cmCTest *CTest; + cmCTestScriptHandler *CTestScriptHandler; + + cmTypeMacro(cmCTestCommand, cmCommand); +}; + + +#endif diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx new file mode 100755 index 000000000..a5187102a --- /dev/null +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -0,0 +1,108 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestConfigureCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-07-11 19:58:07 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestConfigureCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() +{ + if ( this->Values[ct_BUILD] ) + { + this->CTest->SetCTestConfiguration("BuildDirectory", + cmSystemTools::CollapseFullPath( + this->Values[ct_BUILD]).c_str()); + } + else + { + this->CTest->SetCTestConfiguration("BuildDirectory", + cmSystemTools::CollapseFullPath( + this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str()); + } + if ( this->Values[ct_SOURCE] ) + { + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Values[ct_SOURCE]).c_str()); + } + else + { + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str()); + } + if ( this->CTest->GetCTestConfiguration("BuildDirectory").empty() ) + { + this->SetError("Build directory not specified. Either use BUILD " + "argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY " + "variable"); + return 0; + } + + const char* ctestConfigureCommand + = this->Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND"); + if ( ctestConfigureCommand && *ctestConfigureCommand ) + { + this->CTest->SetCTestConfiguration("ConfigureCommand", + ctestConfigureCommand); + } + else + { + const char* cmakeGeneratorName + = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); + if ( cmakeGeneratorName && *cmakeGeneratorName ) + { + const std::string& source_dir + = this->CTest->GetCTestConfiguration("SourceDirectory"); + if ( source_dir.empty() ) + { + this->SetError("Source directory not specified. Either use SOURCE " + "argument to CTEST_CONFIGURE command or set CTEST_SOURCE_DIRECTORY " + "variable"); + return 0; + } + std::string cmakeConfigureCommand = "\""; + cmakeConfigureCommand += this->CTest->GetCMakeExecutable(); + cmakeConfigureCommand += "\" \"-G"; + cmakeConfigureCommand += cmakeGeneratorName; + cmakeConfigureCommand += "\" \""; + cmakeConfigureCommand += source_dir; + cmakeConfigureCommand += "\""; + this->CTest->SetCTestConfiguration("ConfigureCommand", + cmakeConfigureCommand.c_str()); + } + else + { + this->SetError("Configure command is not specified. If this is a CMake " + "project, specify CTEST_CMAKE_GENERATOR, or if this is not CMake " + "project, specify CTEST_CONFIGURE_COMMAND."); + return 0; + } + } + + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("configure"); + if ( !handler ) + { + this->SetError( + "internal CTest error. Cannot instantiate configure handler"); + return 0; + } + return handler; +} + + diff --git a/Source/CTest/cmCTestConfigureCommand.h b/Source/CTest/cmCTestConfigureCommand.h new file mode 100755 index 000000000..3f860ae4f --- /dev/null +++ b/Source/CTest/cmCTestConfigureCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestConfigureCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestConfigureCommand_h +#define cmCTestConfigureCommand_h + +#include "cmCTestHandlerCommand.h" + +/** \class cmCTestConfigure + * \brief Run a ctest script + * + * cmCTestConfigureCommand defineds the command to configures the project. + */ +class cmCTestConfigureCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestConfigureCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestConfigureCommand* ni = new cmCTestConfigureCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_CONFIGURE";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Configures the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_CONFIGURE(BUILD build_dir RETURN_VALUE res)\n" + "Configures the given build directory and stores results in " + "Configure.xml. The second argument is a variable that will hold " + "return value."; + } + + cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand); + +protected: + cmCTestGenericHandler* InitializeHandler(); + +}; + + +#endif diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx new file mode 100755 index 000000000..218c4d174 --- /dev/null +++ b/Source/CTest/cmCTestConfigureHandler.cxx @@ -0,0 +1,136 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestConfigureHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-30 16:17:36 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestConfigureHandler.h" + +#include "cmCTest.h" +#include "cmGeneratedFileStream.h" +#include "cmake.h" +#include + + +//---------------------------------------------------------------------- +cmCTestConfigureHandler::cmCTestConfigureHandler() +{ +} + +//---------------------------------------------------------------------- +void cmCTestConfigureHandler::Initialize() +{ + this->Superclass::Initialize(); +} + +//---------------------------------------------------------------------- +//clearly it would be nice if this were broken up into a few smaller +//functions and commented... +int cmCTestConfigureHandler::ProcessHandler() +{ + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Configure project" << std::endl); + std::string cCommand + = this->CTest->GetCTestConfiguration("ConfigureCommand"); + if ( cCommand.size() == 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find ConfigureCommand key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + + std::string buildDirectory + = this->CTest->GetCTestConfiguration("BuildDirectory"); + if ( buildDirectory.size() == 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find BuildDirectory key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + + double elapsed_time_start = cmSystemTools::GetTime(); + std::string output; + int retVal = 0; + int res = 0; + if ( !this->CTest->GetShowOnly() ) + { + cmGeneratedFileStream os; + if ( !this->StartResultingXML("Configure", os) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open configure file" + << std::endl); + return 1; + } + std::string start_time = this->CTest->CurrentTime(); + unsigned int start_time_time = static_cast( + cmSystemTools::GetTime()); + + cmGeneratedFileStream ofs; + this->StartLogFile("Configure", ofs); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Configure with command: " + << cCommand.c_str() << std::endl); + res = this->CTest->RunMakeCommand(cCommand.c_str(), &output, + &retVal, buildDirectory.c_str(), + 0, ofs); + + if ( ofs ) + { + ofs.close(); + } + + if ( os ) + { + this->CTest->StartXML(os); + os << "\n" + << "\t" << start_time << "" + << std::endl + << "\t" << start_time_time + << "\n"; + + if ( res == cmsysProcess_State_Exited && retVal ) + { + os << retVal; + } + os << "" << cCommand.c_str() << "" + << std::endl; + cmCTestLog(this->CTest, DEBUG, "End" << std::endl); + os << "" << cmCTest::MakeXMLSafe(output) << "" << std::endl; + std::string end_time = this->CTest->CurrentTime(); + os << "\t" << retVal << "\n" + << "\t" << end_time << "\n" + << "\t" << + static_cast(cmSystemTools::GetTime()) + << "\n" + << "" + << static_cast( + (cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 + << "" + << "" << std::endl; + this->CTest->EndXML(os); + } + } + else + { + cmCTestLog(this->CTest, DEBUG, "Configure with command: " << cCommand + << std::endl); + } + if (! res || retVal ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error(s) when updating the project" << std::endl); + return -1; + } + return 0; +} diff --git a/Source/CTest/cmCTestConfigureHandler.h b/Source/CTest/cmCTestConfigureHandler.h new file mode 100755 index 000000000..73e076aa7 --- /dev/null +++ b/Source/CTest/cmCTestConfigureHandler.h @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestConfigureHandler.h,v $ + Language: C++ + Date: $Date: 2006-03-09 16:17:10 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestConfigureHandler_h +#define cmCTestConfigureHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +/** \class cmCTestConfigureHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestConfigureHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestConfigureHandler, cmCTestGenericHandler); + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + cmCTestConfigureHandler(); + + void Initialize(); +}; + +#endif diff --git a/Source/CTest/cmCTestCoverageCommand.cxx b/Source/CTest/cmCTestCoverageCommand.cxx new file mode 100644 index 000000000..58e276003 --- /dev/null +++ b/Source/CTest/cmCTestCoverageCommand.cxx @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestCoverageCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-03-29 17:33:41 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestCoverageCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler() +{ + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "CoverageCommand", "CTEST_COVERAGE_COMMAND"); + + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("coverage"); + if ( !handler ) + { + this->SetError("internal CTest error. Cannot instantiate test handler"); + return 0; + } + return handler; +} + + + diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h new file mode 100644 index 000000000..f4149cc81 --- /dev/null +++ b/Source/CTest/cmCTestCoverageCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestCoverageCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestCoverageCommand_h +#define cmCTestCoverageCommand_h + +#include "cmCTestHandlerCommand.h" + +/** \class cmCTestCoverage + * \brief Run a ctest script + * + * cmCTestCoverageCommand defineds the command to test the project. + */ +class cmCTestCoverageCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestCoverageCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestCoverageCommand* ni = new cmCTestCoverageCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_COVERAGE";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Tests the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_COVERAGE([BUILD build_dir] [RETURN_VALUE res])\n" + "Perform the coverage of the given build directory and stores results " + "in Coverage.xml. The second argument is a variable that will hold " + "value."; + } + + cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand); + +protected: + cmCTestGenericHandler* InitializeHandler(); +}; + + +#endif + diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx new file mode 100755 index 000000000..920978d43 --- /dev/null +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -0,0 +1,1691 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestCoverageHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-30 16:17:36 $ + Version: $Revision: 1.51 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestCoverageHandler.h" +#include "cmCTest.h" +#include "cmake.h" +#include "cmSystemTools.h" +#include "cmGeneratedFileStream.h" + +#include +#include +#include + +#include +#include +#include + +#define SAFEDIV(x,y) (((y)!=0)?((x)/(y)):(0)) + +class cmCTestRunProcess +{ +public: + cmCTestRunProcess() + { + this->Process = cmsysProcess_New(); + this->PipeState = -1; + this->TimeOut = -1; + } + ~cmCTestRunProcess() + { + if(!(this->PipeState == -1) + && !(this->PipeState == cmsysProcess_Pipe_None ) + && !(this->PipeState == cmsysProcess_Pipe_Timeout)) + { + this->WaitForExit(); + } + cmsysProcess_Delete(this->Process); + } + void SetCommand(const char* command) + { + this->CommandLineStrings.clear(); + this->CommandLineStrings.push_back(command);; + } + void AddArgument(const char* arg) + { + if(arg) + { + this->CommandLineStrings.push_back(arg); + } + } + void SetWorkingDirectory(const char* dir) + { + this->WorkingDirectory = dir; + } + void SetTimeout(double t) + { + this->TimeOut = t; + } + bool StartProcess() + { + std::vector args; + for(std::vector::iterator i = + this->CommandLineStrings.begin(); + i != this->CommandLineStrings.end(); ++i) + { + args.push_back(i->c_str()); + } + args.push_back(0); // null terminate + cmsysProcess_SetCommand(this->Process, &*args.begin()); + if(this->WorkingDirectory.size()) + { + cmsysProcess_SetWorkingDirectory(this->Process, + this->WorkingDirectory.c_str()); + } + + cmsysProcess_SetOption(this->Process, + cmsysProcess_Option_HideWindow, 1); + if(this->TimeOut != -1) + { + cmsysProcess_SetTimeout(this->Process, this->TimeOut); + } + cmsysProcess_Execute(this->Process); + this->PipeState = cmsysProcess_GetState(this->Process); + // if the process is running or exited return true + if(this->PipeState == cmsysProcess_State_Executing + || this->PipeState == cmsysProcess_State_Exited) + { + return true; + } + return false; + } + void SetStdoutFile(const char* fname) + { + cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDOUT, fname); + } + void SetStderrFile(const char* fname) + { + cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDERR, fname); + } + int WaitForExit(double* timeout =0) + { + this->PipeState = cmsysProcess_WaitForExit(this->Process, + timeout); + return this->PipeState; + } + int GetProcessState() { return this->PipeState;} +private: + int PipeState; + cmsysProcess* Process; + std::vector CommandLineStrings; + std::string WorkingDirectory; + double TimeOut; +}; + + +//---------------------------------------------------------------------- +//********************************************************************** +class cmCTestCoverageHandlerContainer +{ +public: + int Error; + std::string SourceDir; + std::string BinaryDir; + typedef std::vector SingleFileCoverageVector; + typedef std::map TotalCoverageMap; + TotalCoverageMap TotalCoverage; + std::ostream* OFS; +}; +//********************************************************************** +//---------------------------------------------------------------------- + +//---------------------------------------------------------------------- +cmCTestCoverageHandler::cmCTestCoverageHandler() +{ +} + +//---------------------------------------------------------------------- +void cmCTestCoverageHandler::Initialize() +{ + this->Superclass::Initialize(); + this->CustomCoverageExclude.empty(); +} + +//---------------------------------------------------------------------- +bool cmCTestCoverageHandler::StartCoverageLogFile( + cmGeneratedFileStream& covLogFile, int logFileCount) +{ + char covLogFilename[1024]; + sprintf(covLogFilename, "CoverageLog-%d", logFileCount); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Open file: " + << covLogFilename << std::endl); + if (!this->StartResultingXML(covLogFilename, covLogFile) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file: " + << covLogFilename << std::endl); + return false; + } + std::string local_start_time = this->CTest->CurrentTime(); + this->CTest->StartXML(covLogFile); + covLogFile << "" << std::endl + << "\t" << local_start_time << "" + << "\t" + << static_cast(cmSystemTools::GetTime()) + << "" + << std::endl; + return true; +} + +//---------------------------------------------------------------------- +void cmCTestCoverageHandler::EndCoverageLogFile(cmGeneratedFileStream& ostr, + int logFileCount) +{ + std::string local_end_time = this->CTest->CurrentTime(); + ostr << "\t" << local_end_time << "" << std::endl + << "\t" << + static_cast(cmSystemTools::GetTime()) + << "" << std::endl + << "" << std::endl; + this->CTest->EndXML(ostr); + char covLogFilename[1024]; + sprintf(covLogFilename, "CoverageLog-%d.xml", logFileCount); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Close file: " + << covLogFilename << std::endl); + ostr.Close(); +} + +//---------------------------------------------------------------------- +bool cmCTestCoverageHandler::ShouldIDoCoverage(const char* file, + const char* srcDir, + const char* binDir) +{ + std::vector::iterator sit; + for ( sit = this->CustomCoverageExcludeRegex.begin(); + sit != this->CustomCoverageExcludeRegex.end(); ++ sit ) + { + if ( sit->find(file) ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " File " << file + << " is excluded in CTestCustom.ctest" << std::endl;); + return false; + } + } + + std::string fSrcDir = cmSystemTools::CollapseFullPath(srcDir); + std::string fBinDir = cmSystemTools::CollapseFullPath(binDir); + std::string fFile = cmSystemTools::CollapseFullPath(file); + bool sourceSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(), + fSrcDir.c_str()); + bool buildSubDir = cmSystemTools::IsSubDirectory(fFile.c_str(), + fBinDir.c_str()); + // Always check parent directory of the file. + std::string fileDir = cmSystemTools::GetFilenamePath(fFile.c_str()); + std::string checkDir; + + // We also need to check the binary/source directory pair. + if ( sourceSubDir && buildSubDir ) + { + if ( fSrcDir.size() > fBinDir.size() ) + { + checkDir = fSrcDir; + } + else + { + checkDir = fBinDir; + } + } + else if ( sourceSubDir ) + { + checkDir = fSrcDir; + } + else if ( buildSubDir ) + { + checkDir = fBinDir; + } + std::string ndc + = cmSystemTools::FileExistsInParentDirectories(".NoDartCoverage", + fFile.c_str(), checkDir.c_str()); + if ( ndc.size() ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str() + << " so skip coverage of " << file << std::endl); + return false; + } + + // By now checkDir should be set to parent directory of the file. + // Get the relative path to the file an apply it to the opposite directory. + // If it is the same as fileDir, then ignore, otherwise check. + std::string relPath; + if(checkDir.size() ) + { + relPath = cmSystemTools::RelativePath(checkDir.c_str(), + fFile.c_str()); + } + else + { + relPath = fFile; + } + if ( checkDir == fSrcDir ) + { + checkDir = fBinDir; + } + else + { + checkDir = fSrcDir; + } + fFile = checkDir + "/" + relPath; + fFile = cmSystemTools::GetFilenamePath(fFile.c_str()); + + if ( fileDir == fFile ) + { + // This is in-source build, so we trust the previous check. + return true; + } + + ndc = cmSystemTools::FileExistsInParentDirectories(".NoDartCoverage", + fFile.c_str(), checkDir.c_str()); + if ( ndc.size() ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Found: " << ndc.c_str() + << " so skip coverage of: " << file << std::endl); + return false; + } + // Ok, nothing in source tree, nothing in binary tree + return true; +} + +//---------------------------------------------------------------------- +//clearly it would be nice if this were broken up into a few smaller +//functions and commented... +int cmCTestCoverageHandler::ProcessHandler() +{ + int error = 0; + // do we have time for this + if (this->CTest->GetRemainingTimeAllowed() < 120) + { + return error; + } + + std::string coverage_start_time = this->CTest->CurrentTime(); + unsigned int coverage_start_time_time = static_cast( + cmSystemTools::GetTime()); + std::string sourceDir + = this->CTest->GetCTestConfiguration("SourceDirectory"); + std::string binaryDir + = this->CTest->GetCTestConfiguration("BuildDirectory"); + + cmGeneratedFileStream ofs; + double elapsed_time_start = cmSystemTools::GetTime(); + if ( !this->StartLogFile("Coverage", ofs) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create LastCoverage.log file" << std::endl); + } + + ofs << "Performing coverage: " << elapsed_time_start << std::endl; + + cmSystemTools::ConvertToUnixSlashes(sourceDir); + cmSystemTools::ConvertToUnixSlashes(binaryDir); + + std::string asfGlob = sourceDir + "/*"; + std::string abfGlob = binaryDir + "/*"; + + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Performing coverage" << std::endl); + + cmCTestCoverageHandlerContainer cont; + cont.Error = error; + cont.SourceDir = sourceDir; + cont.BinaryDir = binaryDir; + cont.OFS = &ofs; + + // setup the regex exclude stuff + this->CustomCoverageExcludeRegex.empty(); + std::vector::iterator rexIt; + for ( rexIt = this->CustomCoverageExclude.begin(); + rexIt != this->CustomCoverageExclude.end(); + ++ rexIt ) + { + this->CustomCoverageExcludeRegex.push_back( + cmsys::RegularExpression(rexIt->c_str())); + } + + + if(this->HandleBullseyeCoverage(&cont)) + { + return cont.Error; + } + int file_count = 0; + file_count += this->HandleGCovCoverage(&cont); + if ( file_count < 0 ) + { + return error; + } + file_count += this->HandleTracePyCoverage(&cont); + if ( file_count < 0 ) + { + return error; + } + error = cont.Error; + + + if ( file_count == 0 ) + { + cmCTestLog(this->CTest, WARNING, + " Cannot find any coverage files. Ignoring Coverage request." + << std::endl); + return error; + } + cmGeneratedFileStream covSumFile; + cmGeneratedFileStream covLogFile; + + if (!this->StartResultingXML("Coverage", covSumFile)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot open coverage summary file." << std::endl); + return -1; + } + + this->CTest->StartXML(covSumFile); + // Produce output xml files + + covSumFile << "" << std::endl + << "\t" << coverage_start_time << "" + << std::endl + << "\t" << coverage_start_time_time << "" + << std::endl; + int logFileCount = 0; + if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) + { + return -1; + } + cmCTestCoverageHandlerContainer::TotalCoverageMap::iterator fileIterator; + int cnt = 0; + long total_tested = 0; + long total_untested = 0; + //std::string fullSourceDir = sourceDir + "/"; + //std::string fullBinaryDir = binaryDir + "/"; + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Acumulating results (each . represents one file):" << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + + std::vector errorsWhileAccumulating; + + file_count = 0; + for ( fileIterator = cont.TotalCoverage.begin(); + fileIterator != cont.TotalCoverage.end(); + ++fileIterator ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush); + file_count ++; + if ( file_count % 50 == 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count + << " out of " + << cont.TotalCoverage.size() << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + } + if ( cnt % 100 == 0 ) + { + this->EndCoverageLogFile(covLogFile, logFileCount); + logFileCount ++; + if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) + { + return -1; + } + } + const std::string fullFileName = fileIterator->first; + const std::string fileName + = cmSystemTools::GetFilenameName(fullFileName.c_str()); + std::string fullFilePath + = cmSystemTools::GetFilenamePath(fullFileName.c_str()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Process file: " << fullFileName << std::endl); + + cmSystemTools::ConvertToUnixSlashes(fullFilePath); + + if ( !cmSystemTools::FileExists(fullFileName.c_str()) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find file: " + << fullFileName.c_str() << std::endl); + continue; + } + + bool shouldIDoCoverage + = this->ShouldIDoCoverage(fullFileName.c_str(), + sourceDir.c_str(), binaryDir.c_str()); + if ( !shouldIDoCoverage ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + ".NoDartCoverage found, so skip coverage check for: " + << fullFileName.c_str() + << std::endl); + continue; + } + + const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov + = fileIterator->second; + covLogFile << "\tCTest->MakeXMLSafe(fileName.c_str()) + << "\" FullPath=\"" << this->CTest->MakeXMLSafe( + this->CTest->GetShortPathToFile( + fileIterator->first.c_str())) << "\">" << std::endl + << "\t\t" << std::endl; + + std::ifstream ifs(fullFileName.c_str()); + if ( !ifs) + { + cmOStringStream ostr; + ostr << "Cannot open source file: " << fullFileName.c_str(); + errorsWhileAccumulating.push_back(ostr.str()); + error ++; + continue; + } + + int tested = 0; + int untested = 0; + + cmCTestCoverageHandlerContainer::SingleFileCoverageVector::size_type cc; + std::string line; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Actually perfoming coverage for: " << fullFileName << std::endl); + for ( cc= 0; cc < fcov.size(); cc ++ ) + { + if ( !cmSystemTools::GetLineFromStream(ifs, line) && + cc != fcov.size() -1 ) + { + cmOStringStream ostr; + ostr << "Problem reading source file: " << fullFileName.c_str() + << " line:" << cc; + errorsWhileAccumulating.push_back(ostr.str()); + error ++; + break; + } + covLogFile << "\t\t" + << this->CTest->MakeXMLSafe(line.c_str()) << "" << std::endl; + if ( fcov[cc] == 0 ) + { + untested ++; + } + else if ( fcov[cc] > 0 ) + { + tested ++; + } + } + if ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + cmOStringStream ostr; + ostr << "Looks like there are more lines in the file: " << line; + errorsWhileAccumulating.push_back(ostr.str()); + } + float cper = 0; + float cmet = 0; + if ( tested + untested > 0 ) + { + cper = (100 * SAFEDIV(static_cast(tested), + static_cast(tested + untested))); + cmet = ( SAFEDIV(static_cast(tested + 10), + static_cast(tested + untested + 10))); + } + total_tested += tested; + total_untested += untested; + covLogFile << "\t\t" << std::endl + << "\t" << std::endl; + covSumFile << "\tCTest->MakeXMLSafe(fileName) + << "\" FullPath=\"" << this->CTest->MakeXMLSafe( + this->CTest->GetShortPathToFile(fullFileName.c_str())) + << "\" Covered=\"" << (tested==0?"true":"false") << "\">\n" + << "\t\t" << tested << "\n" + << "\t\t" << untested << "\n" + << "\t\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile << (cper) << "\n" + << "\t\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile << (cmet) << "\n" + << "\t" << std::endl; + cnt ++; + } + this->EndCoverageLogFile(covLogFile, logFileCount); + + if ( errorsWhileAccumulating.size() > 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error(s) while acumulating results:" << std::endl); + std::vector::iterator erIt; + for ( erIt = errorsWhileAccumulating.begin(); + erIt != errorsWhileAccumulating.end(); + ++ erIt ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " " << erIt->c_str() << std::endl); + } + } + + int total_lines = total_tested + total_untested; + float percent_coverage = 100 * SAFEDIV(static_cast(total_tested), + static_cast(total_lines)); + if ( total_lines == 0 ) + { + percent_coverage = 0; + } + + std::string end_time = this->CTest->CurrentTime(); + + covSumFile << "\t" << total_tested << "\n" + << "\t" << total_untested << "\n" + << "\t" << total_lines << "\n" + << "\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile << (percent_coverage)<< "\n" + << "\t" << end_time << "\n" + << "\t" << + static_cast(cmSystemTools::GetTime()) + << "\n"; + covSumFile << "" << + static_cast((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 + << "" + << "" << std::endl; + this->CTest->EndXML(covSumFile); + + cmCTestLog(this->CTest, HANDLER_OUTPUT, "" << std::endl + << "\tCovered LOC: " + << total_tested << std::endl + << "\tNot covered LOC: " << total_untested << std::endl + << "\tTotal LOC: " << total_lines << std::endl + << "\tPercentage Coverage: " + << std::setiosflags(std::ios::fixed) + << std::setprecision(2) + << (percent_coverage) << "%" << std::endl); + + ofs << "\tCovered LOC: " << total_tested << std::endl + << "\tNot covered LOC: " << total_untested << std::endl + << "\tTotal LOC: " << total_lines << std::endl + << "\tPercentage Coverage: " + << std::setiosflags(std::ios::fixed) + << std::setprecision(2) + << (percent_coverage) << "%" << std::endl; + + + if ( error ) + { + return -1; + } + return 0; +} + +//---------------------------------------------------------------------- +void cmCTestCoverageHandler::PopulateCustomVectors(cmMakefile *mf) +{ + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Add coverage exclude regular expressions." << std::endl); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_COVERAGE_EXCLUDE", + this->CustomCoverageExclude); + std::vector::iterator it; + for ( it = this->CustomCoverageExclude.begin(); + it != this->CustomCoverageExclude.end(); + ++ it ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Add coverage exclude: " + << it->c_str() << std::endl); + } +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::HandleGCovCoverage( + cmCTestCoverageHandlerContainer* cont) +{ + std::string gcovCommand + = this->CTest->GetCTestConfiguration("CoverageCommand"); + + // Style 1 + std::string st1gcovOutputRex1 + = "[0-9]+\\.[0-9]+% of [0-9]+ (source |)lines executed in file (.*)$"; + std::string st1gcovOutputRex2 = "^Creating (.*\\.gcov)\\."; + cmsys::RegularExpression st1re1(st1gcovOutputRex1.c_str()); + cmsys::RegularExpression st1re2(st1gcovOutputRex2.c_str()); + + + // Style 2 + std::string st2gcovOutputRex1 = "^File *[`'](.*)'$"; + std::string st2gcovOutputRex2 + = "Lines executed: *[0-9]+\\.[0-9]+% of [0-9]+$"; + std::string st2gcovOutputRex3 = "^(.*):creating [`'](.*\\.gcov)'"; + std::string st2gcovOutputRex4 = "^(.*):unexpected EOF *$"; + std::string st2gcovOutputRex5 = "^(.*):cannot open source file*$"; + std::string st2gcovOutputRex6 + = "^(.*):source file is newer than graph file `(.*)'$"; + cmsys::RegularExpression st2re1(st2gcovOutputRex1.c_str()); + cmsys::RegularExpression st2re2(st2gcovOutputRex2.c_str()); + cmsys::RegularExpression st2re3(st2gcovOutputRex3.c_str()); + cmsys::RegularExpression st2re4(st2gcovOutputRex4.c_str()); + cmsys::RegularExpression st2re5(st2gcovOutputRex5.c_str()); + cmsys::RegularExpression st2re6(st2gcovOutputRex6.c_str()); + + + cmsys::Glob gl; + gl.RecurseOn(); + std::string daGlob = cont->BinaryDir + "/*.da"; + gl.FindFiles(daGlob); + std::vector files = gl.GetFiles(); + daGlob = cont->BinaryDir + "/*.gcda"; + gl.FindFiles(daGlob); + std::vector& moreFiles = gl.GetFiles(); + files.insert(files.end(), moreFiles.begin(), moreFiles.end()); + std::vector::iterator it; + + if ( files.size() == 0 ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Cannot find any GCov coverage files." + << std::endl); + // No coverage files is a valid thing, so the exit code is 0 + return 0; + } + + std::string testingDir = this->CTest->GetBinaryDir() + "/Testing"; + std::string tempDir = testingDir + "/CoverageInfo"; + std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::MakeDirectory(tempDir.c_str()); + cmSystemTools::ChangeDirectory(tempDir.c_str()); + + int gcovStyle = 0; + + std::set missingFiles; + + std::string actualSourceFile = ""; + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Processing coverage (each . represents one file):" << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + int file_count = 0; + for ( it = files.begin(); it != files.end(); ++ it ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush); + std::string fileDir = cmSystemTools::GetFilenamePath(it->c_str()); + std::string command = "\"" + gcovCommand + "\" -l -o \"" + fileDir + + "\" \"" + *it + "\""; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, command.c_str() + << std::endl); + std::string output = ""; + std::string errors = ""; + int retVal = 0; + *cont->OFS << "* Run coverage for: " << fileDir.c_str() << std::endl; + *cont->OFS << " Command: " << command.c_str() << std::endl; + int res = this->CTest->RunCommand(command.c_str(), &output, &errors, + &retVal, tempDir.c_str(), 0 /*this->TimeOut*/); + + *cont->OFS << " Output: " << output.c_str() << std::endl; + *cont->OFS << " Errors: " << errors.c_str() << std::endl; + if ( ! res ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem running coverage on file: " << it->c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Command produced error: " << errors << std::endl); + cont->Error ++; + continue; + } + if ( retVal != 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Coverage command returned: " + << retVal << " while processing: " << it->c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Command produced error: " << cont->Error << std::endl); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "--------------------------------------------------------------" + << std::endl + << output << std::endl + << "--------------------------------------------------------------" + << std::endl); + std::vector lines; + std::vector::iterator line; + + + // Globals for storing current source file and current gcov file; + cmSystemTools::Split(output.c_str(), lines); + for ( line = lines.begin(); line != lines.end(); ++line) + { + std::string sourceFile; + std::string gcovFile; + cmCTestLog(this->CTest, DEBUG, "Line: [" << line->c_str() << "]" + << std::endl); + if ( line->size() == 0 ) + { + // Ignore empty line; probably style 2 + } + else if ( st1re1.find(line->c_str()) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 1 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 1; + } + + actualSourceFile = ""; + sourceFile = st1re1.match(2); + } + else if ( st1re2.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 1 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 1; + } + + gcovFile = st1re2.match(1); + } + else if ( st2re1.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + + actualSourceFile = ""; + sourceFile = st2re1.match(1); + } + else if ( st2re2.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + } + else if ( st2re3.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + + gcovFile = st2re3.match(2); + } + else if ( st2re4.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + + cmCTestLog(this->CTest, WARNING, "Warning: " << st2re4.match(1) + << " had unexpected EOF" << std::endl); + } + else if ( st2re5.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + + cmCTestLog(this->CTest, WARNING, "Warning: Cannot open file: " + << st2re5.match(1) << std::endl); + } + else if ( st2re6.find(line->c_str() ) ) + { + if ( gcovStyle != 0 ) + { + if ( gcovStyle != 2 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown gcov output style" + << std::endl); + cont->Error ++; + break; + } + gcovStyle = 2; + } + + cmCTestLog(this->CTest, WARNING, "Warning: File: " << st2re6.match(1) + << " is newer than " << st2re6.match(2) << std::endl); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Unknown line: [" << line->c_str() << "]" << std::endl); + cont->Error ++; + //abort(); + } + if ( !gcovFile.empty() && actualSourceFile.size() ) + { + cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec + = &cont->TotalCoverage[actualSourceFile]; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " in file: " + << gcovFile << std::endl); + std::ifstream ifile(gcovFile.c_str()); + if ( ! ifile ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: " + << gcovFile << std::endl); + } + else + { + long cnt = -1; + std::string nl; + while ( cmSystemTools::GetLineFromStream(ifile, nl) ) + { + cnt ++; + + //TODO: Handle gcov 3.0 non-coverage lines + + // Skip empty lines + if ( !nl.size() ) + { + continue; + } + + // Skip unused lines + if ( nl.size() < 12 ) + { + continue; + } + + // Read the coverage count from the beginning of the gcov output + // line + std::string prefix = nl.substr(0, 12); + int cov = atoi(prefix.c_str()); + // Read the line number starting at the 10th character of the gcov + // output line + std::string lineNumber = nl.substr(10, 5); + int lineIdx = atoi(lineNumber.c_str())-1; + if ( lineIdx >= 0 ) + { + while ( vec->size() <= + static_cast(lineIdx) ) + { + vec->push_back(-1); + } + // Initially all entries are -1 (not used). If we get coverage + // information, increment it to 0 first. + if ( (*vec)[lineIdx] < 0 ) + { + if ( cov > 0 || prefix.find("#") != prefix.npos ) + { + (*vec)[lineIdx] = 0; + } + } + (*vec)[lineIdx] += cov; + } + } + } + actualSourceFile = ""; + } + if ( !sourceFile.empty() && actualSourceFile.empty() ) + { + gcovFile = ""; + // Is it in the source dir? + if ( sourceFile.size() > cont->SourceDir.size() && + sourceFile.substr(0, cont->SourceDir.size()) == cont->SourceDir && + sourceFile[cont->SourceDir.size()] == '/' ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced s: " + << sourceFile.c_str() << std::endl); + *cont->OFS << " produced in source dir: " << sourceFile.c_str() + << std::endl; + actualSourceFile + = cmSystemTools::CollapseFullPath(sourceFile.c_str()); + } + // Binary dir? + if ( sourceFile.size() > cont->BinaryDir.size() && + sourceFile.substr(0, cont->BinaryDir.size()) == cont->BinaryDir && + sourceFile[cont->BinaryDir.size()] == '/' ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " produced b: " + << sourceFile.c_str() << std::endl); + *cont->OFS << " produced in binary dir: " << sourceFile.c_str() + << std::endl; + actualSourceFile + = cmSystemTools::CollapseFullPath(sourceFile.c_str()); + } + if ( actualSourceFile.empty() ) + { + if ( missingFiles.find(actualSourceFile) == missingFiles.end() ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Something went wrong" << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "File: [" + << sourceFile.c_str() << "]" << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "s: [" + << sourceFile.substr(0, cont->SourceDir.size()) << "]" + << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "b: [" + << sourceFile.substr(0, cont->BinaryDir.size()) << "]" + << std::endl); + *cont->OFS << " Something went wrong. Cannot find: " + << sourceFile.c_str() + << " in source dir: " << cont->SourceDir.c_str() + << " or binary dir: " << cont->BinaryDir.c_str() << std::endl; + missingFiles.insert(actualSourceFile); + } + } + } + } + file_count ++; + if ( file_count % 50 == 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " processed: " << file_count + << " out of " << files.size() << std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + } + } + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); + return file_count; +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::HandleTracePyCoverage( + cmCTestCoverageHandlerContainer* cont) +{ + cmsys::Glob gl; + gl.RecurseOn(); + std::string daGlob = cont->BinaryDir + "/*.cover"; + gl.FindFiles(daGlob); + std::vector files = gl.GetFiles(); + + if ( files.size() == 0 ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Cannot find any Python Trace.py coverage files." + << std::endl); + // No coverage files is a valid thing, so the exit code is 0 + return 0; + } + + std::string testingDir = this->CTest->GetBinaryDir() + "/Testing"; + std::string tempDir = testingDir + "/CoverageInfo"; + std::string currentDirectory = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::MakeDirectory(tempDir.c_str()); + cmSystemTools::ChangeDirectory(tempDir.c_str()); + + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); + + std::vector::iterator fileIt; + int file_count = 0; + for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) + { + std::string fileName = this->FindFile(cont, *fileIt); + if ( fileName.empty() ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find source Python file corresponding to: " + << fileIt->c_str() << std::endl); + continue; + } + + std::string actualSourceFile + = cmSystemTools::CollapseFullPath(fileName.c_str()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " Check coverage for file: " << actualSourceFile.c_str() + << std::endl); + cmCTestCoverageHandlerContainer::SingleFileCoverageVector* vec + = &cont->TotalCoverage[actualSourceFile]; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " in file: " << fileIt->c_str() << std::endl); + std::ifstream ifile(fileIt->c_str()); + if ( ! ifile ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open file: " + << fileIt->c_str() << std::endl); + } + else + { + long cnt = -1; + std::string nl; + while ( cmSystemTools::GetLineFromStream(ifile, nl) ) + { + cnt ++; + + // Skip empty lines + if ( !nl.size() ) + { + continue; + } + + // Skip unused lines + if ( nl.size() < 12 ) + { + continue; + } + + // Read the coverage count from the beginning of the Trace.py output + // line + std::string prefix = nl.substr(0, 6); + if ( prefix[5] != ' ' && prefix[5] != ':' ) + { + // This is a hack. We should really do something more elaborate + prefix = nl.substr(0, 7); + if ( prefix[6] != ' ' && prefix[6] != ':' ) + { + prefix = nl.substr(0, 8); + if ( prefix[7] != ' ' && prefix[7] != ':' ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Currently the limit is maximum coverage of 999999" + << std::endl); + } + } + } + int cov = atoi(prefix.c_str()); + if ( prefix[prefix.size()-1] != ':' ) + { + // This line does not have ':' so no coverage here. That said, + // Trace.py does not handle not covered lines versus comments etc. + // So, this will be set to 0. + cov = 0; + } + cmCTestLog(this->CTest, DEBUG, "Prefix: " << prefix.c_str() + << " cov: " << cov + << std::endl); + // Read the line number starting at the 10th character of the gcov + // output line + int lineIdx = cnt; + if ( lineIdx >= 0 ) + { + while ( vec->size() <= + static_cast(lineIdx) ) + { + vec->push_back(-1); + } + // Initially all entries are -1 (not used). If we get coverage + // information, increment it to 0 first. + if ( (*vec)[lineIdx] < 0 ) + { + if ( cov >= 0 ) + { + (*vec)[lineIdx] = 0; + } + } + (*vec)[lineIdx] += cov; + } + } + } + ++ file_count; + } + cmSystemTools::ChangeDirectory(currentDirectory.c_str()); + return file_count; +} + +//---------------------------------------------------------------------- +std::string cmCTestCoverageHandler::FindFile( + cmCTestCoverageHandlerContainer* cont, + std::string fileName) +{ + std::string fileNameNoE + = cmSystemTools::GetFilenameWithoutLastExtension(fileName); + // First check in source and binary directory + std::string fullName = cont->SourceDir + "/" + fileNameNoE + ".py"; + if ( cmSystemTools::FileExists(fullName.c_str()) ) + { + return fullName; + } + fullName = cont->BinaryDir + "/" + fileNameNoE + ".py"; + if ( cmSystemTools::FileExists(fullName.c_str()) ) + { + return fullName; + } + return ""; +} + +// This is a header put on each marked up source file +namespace +{ + const char* bullseyeHelp[] = + {" Coverage produced by bullseye covbr tool: ", + " www.bullseye.com/help/ref_covbr.html", + " * An arrow --> indicates incomplete coverage.", + " * An X indicates a function that was invoked, a switch label that ", + " was exercised, a try-block that finished, or an exception handler ", + " that was invoked.", + " * A T or F indicates a boolean decision that evaluated true or false,", + " respectively.", + " * A t or f indicates a boolean condition within a decision if the ", + " condition evaluated true or false, respectively.", + " * A k indicates a constant decision or condition.", + " * The slash / means this probe is excluded from summary results. ", + 0}; +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::RunBullseyeCoverageBranch( + cmCTestCoverageHandlerContainer* cont, + std::set& coveredFileNames, + std::vector& files, + std::vector& filesFullPath) +{ + if(files.size() != filesFullPath.size()) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Files and full path files not the same size?:\n"); + return 0; + } + // create the output stream for the CoverageLog-N.xml file + cmGeneratedFileStream covLogFile; + int logFileCount = 0; + if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) + { + return -1; + } + // for each file run covbr on that file to get the coverage + // information for that file + std::string outputFile; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "run covbr: " + << std::endl); + + if(!this->RunBullseyeCommand(cont, "covbr", 0, outputFile)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for." << "\n"); + return -1; + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "covbr output in " << outputFile + << std::endl); + // open the output file + std::ifstream fin(outputFile.c_str()); + if(!fin) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot open coverage file: " << + outputFile.c_str() << std::endl); + return 0; + } + std::map fileMap; + std::vector::iterator fp = filesFullPath.begin(); + for(std::vector::iterator f = files.begin(); + f != files.end(); ++f, ++fp) + { + fileMap[*f] = *fp; + } + + int count =0; // keep count of the number of files + // Now parse each line from the bullseye cov log file + std::string lineIn; + bool valid = false; // are we in a valid output file + int line = 0; // line of the current file + cmStdString file; + while(cmSystemTools::GetLineFromStream(fin, lineIn)) + { + bool startFile = false; + if(lineIn.size() > 1 && lineIn[lineIn.size()-1] == ':') + { + file = lineIn.substr(0, lineIn.size()-1); + if(coveredFileNames.find(file) != coveredFileNames.end()) + { + startFile = true; + } + } + if(startFile) + { + // if we are in a valid file close it because a new one started + if(valid) + { + covLogFile << "\t\t" << std::endl + << "\t" << std::endl; + } + // only allow 100 files in each log file + if ( count != 0 && count % 100 == 0 ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "start a new log file: " + << count + << std::endl); + this->EndCoverageLogFile(covLogFile, logFileCount); + logFileCount ++; + if ( !this->StartCoverageLogFile(covLogFile, logFileCount) ) + { + return -1; + } + count++; // move on one + } + std::map::iterator + i = fileMap.find(file); + // if the file should be covered write out the header for that file + if(i != fileMap.end()) + { + // we have a new file so count it in the output + count++; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Produce coverage for file: " + << file.c_str() << " " << count + << std::endl); + // start the file output + covLogFile << "\tCTest->MakeXMLSafe(i->first.c_str()) + << "\" FullPath=\"" << this->CTest->MakeXMLSafe( + this->CTest->GetShortPathToFile( + i->second.c_str())) << "\">" << std::endl + << "\t\t" << std::endl; + // write the bullseye header + line =0; + for(int k =0; bullseyeHelp[k] != 0; ++k) + { + covLogFile << "\t\t" + << this->CTest->MakeXMLSafe(bullseyeHelp[k]) + << "" << std::endl; + line++; + } + valid = true; // we are in a valid file section + } + else + { + // this is not a file that we want coverage for + valid = false; + } + } + // we are not at a start file, and we are in a valid file output the line + else if(valid) + { + covLogFile << "\t\t" + << this->CTest->MakeXMLSafe(lineIn.c_str()) + << "" << std::endl; + line++; + } + } + // if we ran out of lines a valid file then close that file + if(valid) + { + covLogFile << "\t\t" << std::endl + << "\t" << std::endl; + } + this->EndCoverageLogFile(covLogFile, logFileCount); + return 1; +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::RunBullseyeCommand( + cmCTestCoverageHandlerContainer* cont, + const char* cmd, + const char* arg, + std::string& outputFile) +{ + std::string program = cmSystemTools::FindProgram(cmd); + if(program.size() == 0) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot find :" << cmd << "\n"); + return 0; + } + if(arg) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Run : " << program.c_str() << " " << arg << "\n"); + } + else + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Run : " << program.c_str() << "\n"); + } + // create a process object and start it + cmCTestRunProcess runCoverageSrc; + runCoverageSrc.SetCommand(program.c_str()); + runCoverageSrc.AddArgument(arg); + std::string stdoutFile = cont->BinaryDir + "/Testing/Temporary/"; + stdoutFile += this->GetCTestInstance()->GetCurrentTag(); + stdoutFile += "-"; + stdoutFile += cmd; + std::string stderrFile = stdoutFile; + stdoutFile += ".stdout"; + stderrFile += ".stderr"; + runCoverageSrc.SetStdoutFile(stdoutFile.c_str()); + runCoverageSrc.SetStderrFile(stderrFile.c_str()); + if(!runCoverageSrc.StartProcess()) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Could not run : " + << program.c_str() << " " << arg << "\n" + << "kwsys process state : " + << runCoverageSrc.GetProcessState()); + return 0; + } + // since we set the output file names wait for it to end + runCoverageSrc.WaitForExit(); + outputFile = stdoutFile; + return 1; +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::RunBullseyeSourceSummary( + cmCTestCoverageHandlerContainer* cont) +{ + // Run the covsrc command and create a temp outputfile + std::string outputFile; + if(!this->RunBullseyeCommand(cont, "covsrc", "-c", outputFile)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covsrc:\n"); + return 0; + } + + std::ostream& tmpLog = *cont->OFS; + // copen the Coverage.xml file in the Testing directory + cmGeneratedFileStream covSumFile; + if (!this->StartResultingXML("Coverage", covSumFile)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot open coverage summary file." << std::endl); + return 0; + } + this->CTest->StartXML(covSumFile); + double elapsed_time_start = cmSystemTools::GetTime(); + std::string coverage_start_time = this->CTest->CurrentTime(); + covSumFile << "" << std::endl + << "\t" + << coverage_start_time << "" + << std::endl + << "\t" + << static_cast(cmSystemTools::GetTime()) + << "" + << std::endl; + std::string stdline; + std::string errline; + // expected output: + // first line is: + // "Source","Function Coverage","out of","%","C/D Coverage","out of","%" + // after that data follows in that format + std::string sourceFile; + int functionsCalled = 0; + int totalFunctions = 0; + int percentFunction = 0; + int branchCovered = 0; + int totalBranches = 0; + int percentBranch = 0; + double total_tested = 0; + double total_untested = 0; + double total_functions = 0; + double percent_coverage =0; + double number_files = 0; + std::vector coveredFiles; + std::vector coveredFilesFullPath; + // Read and parse the summary output file + std::ifstream fin(outputFile.c_str()); + if(!fin) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot open coverage summary file: " << + outputFile.c_str() << std::endl); + return 0; + } + std::set coveredFileNames; + while(cmSystemTools::GetLineFromStream(fin, stdline)) + { + // if we have a line of output from stdout + if(stdline.size()) + { + // parse the comma separated output + this->ParseBullsEyeCovsrcLine(stdline, + sourceFile, + functionsCalled, + totalFunctions, + percentFunction, + branchCovered, + totalBranches, + percentBranch); + // The first line is the header + if(sourceFile == "Source" || sourceFile == "Total") + { + continue; + } + std::string file = sourceFile; + coveredFileNames.insert(file); + if(!cmSystemTools::FileIsFullPath(sourceFile.c_str())) + { + // file will be relative to the binary dir + file = cont->BinaryDir; + file += "/"; + file += sourceFile; + } + file = cmSystemTools::CollapseFullPath(file.c_str()); + bool shouldIDoCoverage + = this->ShouldIDoCoverage(file.c_str(), + cont->SourceDir.c_str(), + cont->BinaryDir.c_str()); + if ( !shouldIDoCoverage ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + ".NoDartCoverage found, so skip coverage check for: " + << file.c_str() + << std::endl); + continue; + } + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Doing coverage for: " + << file.c_str() + << std::endl); + + coveredFiles.push_back(sourceFile); + coveredFilesFullPath.push_back(file); + + number_files++; + total_functions += totalFunctions; + total_tested += functionsCalled; + total_untested += (totalFunctions - functionsCalled); + + std::string fileName = cmSystemTools::GetFilenameName(file.c_str()); + + float cper = percentBranch + percentFunction; + if(totalBranches > 0) + { + cper /= 2.0f; + } + percent_coverage += cper; + float cmet = percentFunction + percentBranch; + if(totalBranches > 0) + { + cmet /= 2.0f; + } + cmet /= 100.0f; + tmpLog << stdline.c_str() << "\n"; + tmpLog << fileName << "\n"; + tmpLog << "functionsCalled: " << functionsCalled/100 << "\n"; + tmpLog << "totalFunctions: " << totalFunctions/100 << "\n"; + tmpLog << "percentFunction: " << percentFunction << "\n"; + tmpLog << "branchCovered: " << branchCovered << "\n"; + tmpLog << "totalBranches: " << totalBranches << "\n"; + tmpLog << "percentBranch: " << percentBranch << "\n"; + tmpLog << "percentCoverage: " << percent_coverage << "\n"; + tmpLog << "coverage metric: " << cmet << "\n"; + covSumFile << "\tCTest->MakeXMLSafe(sourceFile) + << "\" FullPath=\"" << this->CTest->MakeXMLSafe( + this->CTest->GetShortPathToFile(file.c_str())) + << "\" Covered=\"" << (cmet>0?"true":"false") << "\">\n" + << "\t\t" + << branchCovered + << "\n" + << "\t\t" + << totalBranches - branchCovered + << "\n" + << "\t\t" + << functionsCalled + << "\n" + << "\t\t" + << totalFunctions - functionsCalled + << "\n" + // Hack for conversion of function to loc assume a function + // has 100 lines of code + << "\t\t" << functionsCalled *100 + << "\n" + << "\t\t" + << (totalFunctions - functionsCalled)*100 + << "\n" + << "\t\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile << (cper) << "\n" + << "\t\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile << (cmet) << "\n" + << "\t" << std::endl; + } + } + std::string end_time = this->CTest->CurrentTime(); + covSumFile << "\t" << total_tested << "\n" + << "\t" << total_untested << "\n" + << "\t" << total_functions << "\n" + << "\t"; + covSumFile.setf(std::ios::fixed, std::ios::floatfield); + covSumFile.precision(2); + covSumFile + << SAFEDIV(percent_coverage,number_files)<< "\n" + << "\t" << end_time << "\n" + << "\t" << static_cast(cmSystemTools::GetTime()) + << "\n"; + covSumFile + << "" << + static_cast((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 + << "" + << "" << std::endl; + this->CTest->EndXML(covSumFile); + // Now create the coverage information for each file + return this->RunBullseyeCoverageBranch(cont, + coveredFileNames, + coveredFiles, + coveredFilesFullPath); +} + +//---------------------------------------------------------------------- +int cmCTestCoverageHandler::HandleBullseyeCoverage( + cmCTestCoverageHandlerContainer* cont) +{ + const char* covfile = cmSystemTools::GetEnv("COVFILE"); + if(!covfile) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " COVFILE environment variable not found, not running " + " bullseye\n"); + return 0; + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + " run covsrc with COVFILE=[" + << covfile + << "]" << std::endl); + if(!this->RunBullseyeSourceSummary(cont)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error running bullseye summary.\n"); + return 0; + } + return 1; +} + +bool cmCTestCoverageHandler::GetNextInt(std::string const& inputLine, + std::string::size_type& pos, + int& value) +{ + std::string::size_type start = pos; + pos = inputLine.find(',', start); + value = atoi(inputLine.substr(start, pos).c_str()); + if(pos == inputLine.npos) + { + return true; + } + pos++; + return true; +} + +bool cmCTestCoverageHandler::ParseBullsEyeCovsrcLine( + std::string const& inputLine, + std::string& sourceFile, + int& functionsCalled, + int& totalFunctions, + int& percentFunction, + int& branchCovered, + int& totalBranches, + int& percentBranch) +{ + // find the first comma + std::string::size_type pos = inputLine.find(','); + if(pos == inputLine.npos) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing string : " + << inputLine.c_str() << "\n"); + return false; + } + // the source file has "" around it so extract out the file name + sourceFile = inputLine.substr(1,pos-2); + pos++; + if(!this->GetNextInt(inputLine, pos, functionsCalled)) + { + return false; + } + if(!this->GetNextInt(inputLine, pos, totalFunctions)) + { + return false; + } + if(!this->GetNextInt(inputLine, pos, percentFunction)) + { + return false; + } + if(!this->GetNextInt(inputLine, pos, branchCovered)) + { + return false; + } + if(!this->GetNextInt(inputLine, pos, totalBranches)) + { + return false; + } + if(!this->GetNextInt(inputLine, pos, percentBranch)) + { + return false; + } + // should be at the end now + if(pos != inputLine.npos) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Error parsing input : " + << inputLine.c_str() << " last pos not npos = " << pos << + "\n"); + } + return true; +} diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h new file mode 100755 index 000000000..6f68d5f21 --- /dev/null +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -0,0 +1,142 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestCoverageHandler.h,v $ + Language: C++ + Date: $Date: 2007-06-08 16:29:40 $ + Version: $Revision: 1.17 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestCoverageHandler_h +#define cmCTestCoverageHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +#include + +class cmGeneratedFileStream; +class cmCTestCoverageHandlerContainer; + +/** \class cmCTestCoverageHandler + * \brief A class that handles coverage computaiton for ctest + * + */ +class cmCTestCoverageHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestCoverageHandler, cmCTestGenericHandler); + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + cmCTestCoverageHandler(); + + virtual void Initialize(); + + /** + * This method is called when reading CTest custom file + */ + void PopulateCustomVectors(cmMakefile *mf); + +private: + bool ShouldIDoCoverage(const char* file, const char* srcDir, + const char* binDir); + bool StartCoverageLogFile(cmGeneratedFileStream& ostr, int logFileCount); + void EndCoverageLogFile(cmGeneratedFileStream& ostr, int logFileCount); + + //! Handle coverage using GCC's GCov + int HandleGCovCoverage(cmCTestCoverageHandlerContainer* cont); + + //! Handle coverage using Bullseye + int HandleBullseyeCoverage(cmCTestCoverageHandlerContainer* cont); + int RunBullseyeSourceSummary(cmCTestCoverageHandlerContainer* cont); + int RunBullseyeCoverageBranch(cmCTestCoverageHandlerContainer* cont, + std::set& coveredFileNames, + std::vector& files, + std::vector& filesFullPath); + int RunBullseyeCommand( + cmCTestCoverageHandlerContainer* cont, + const char* cmd, + const char* arg, + std::string& outputFile); + bool ParseBullsEyeCovsrcLine( + std::string const& inputLine, + std::string& sourceFile, + int& functionsCalled, + int& totalFunctions, + int& percentFunction, + int& branchCovered, + int& totalBranches, + int& percentBranch); + bool GetNextInt(std::string const& inputLine, + std::string::size_type& pos, + int& value); + //! Handle Python coverage using Python's Trace.py + int HandleTracePyCoverage(cmCTestCoverageHandlerContainer* cont); + + // Find the source file based on the source and build tree. This is used for + // Trace.py mode, since that one does not tell us where the source file is. + std::string FindFile(cmCTestCoverageHandlerContainer* cont, + std::string fileName); + + struct cmCTestCoverage + { + cmCTestCoverage() + { + this->AbsolutePath = ""; + this->FullPath = ""; + this->Covered = false; + this->Tested = 0; + this->UnTested = 0; + this->Lines.clear(); + this->Show = false; + } + cmCTestCoverage(const cmCTestCoverage& rhs) : + AbsolutePath(rhs.AbsolutePath), + FullPath(rhs.FullPath), + Covered(rhs.Covered), + Tested(rhs.Tested), + UnTested(rhs.UnTested), + Lines(rhs.Lines), + Show(rhs.Show) + { + } + cmCTestCoverage& operator=(const cmCTestCoverage& rhs) + { + this->AbsolutePath = rhs.AbsolutePath; + this->FullPath = rhs.FullPath; + this->Covered = rhs.Covered; + this->Tested = rhs.Tested; + this->UnTested = rhs.UnTested; + this->Lines = rhs.Lines; + this->Show = rhs.Show; + return *this; + } + std::string AbsolutePath; + std::string FullPath; + bool Covered; + int Tested; + int UnTested; + std::vector Lines; + bool Show; + }; + + std::vector CustomCoverageExclude; + std::vector CustomCoverageExcludeRegex; + + typedef std::map CoverageMap; +}; + +#endif diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx new file mode 100755 index 000000000..ddfebdbe6 --- /dev/null +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx @@ -0,0 +1,41 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestEmptyBinaryDirectoryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestEmptyBinaryDirectoryCommand.h" + +#include "cmCTestScriptHandler.h" + +bool cmCTestEmptyBinaryDirectoryCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) ) + { + cmOStringStream ostr; + ostr << "problem removing the binary directory: " << args[0].c_str(); + this->SetError(ostr.str().c_str()); + return false; + } + + return true; +} + + diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h new file mode 100755 index 000000000..9b23216b8 --- /dev/null +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestEmptyBinaryDirectoryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestEmptyBinaryDirectoryCommand_h +#define cmCTestEmptyBinaryDirectoryCommand_h + +#include "cmCTestCommand.h" + +/** \class cmCTestEmptyBinaryDirectory + * \brief Run a ctest script + * + * cmLibrarysCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmCTestEmptyBinaryDirectoryCommand : public cmCTestCommand +{ +public: + + cmCTestEmptyBinaryDirectoryCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestEmptyBinaryDirectoryCommand* ni + = new cmCTestEmptyBinaryDirectoryCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_EMPTY_BINARY_DIRECTORY";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "empties the binary directory"; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_EMPTY_BINARY_DIRECTORY( directory )\n" + "Removes a binary directory. This command will perform some checks " + "prior to deleting the directory in an attempt to avoid malicious " + "or accidental directory deletion."; + } + + cmTypeMacro(cmCTestEmptyBinaryDirectoryCommand, cmCTestCommand); + +}; + + +#endif diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx new file mode 100644 index 000000000..974537848 --- /dev/null +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -0,0 +1,172 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestGenericHandler.cxx,v $ + Language: C++ + Date: $Date: 2007-08-28 17:46:57 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestGenericHandler.h" +#include "cmSystemTools.h" + +#include "cmCTest.h" + +//---------------------------------------------------------------------- +cmCTestGenericHandler::cmCTestGenericHandler() +{ + this->HandlerVerbose = false; + this->CTest = 0; + this->SubmitIndex = 0; +} + +//---------------------------------------------------------------------- +cmCTestGenericHandler::~cmCTestGenericHandler() +{ +} + +//---------------------------------------------------------------------- +void cmCTestGenericHandler::SetOption(const char* op, const char* value) +{ + if ( !op ) + { + return; + } + if ( !value ) + { + cmCTestGenericHandler::t_StringToString::iterator remit + = this->Options.find(op); + if ( remit != this->Options.end() ) + { + this->Options.erase(remit); + } + return; + } + + this->Options[op] = value; +} + +//---------------------------------------------------------------------- +void cmCTestGenericHandler::SetPersistentOption(const char* op, + const char* value) +{ + this->SetOption(op, value); + if ( !op ) + { + return; + } + if ( !value ) + { + cmCTestGenericHandler::t_StringToString::iterator remit + = this->PersistentOptions.find(op); + if ( remit != this->PersistentOptions.end() ) + { + this->PersistentOptions.erase(remit); + } + return; + } + + this->PersistentOptions[op] = value; +} + +//---------------------------------------------------------------------- +void cmCTestGenericHandler::Initialize() +{ + this->Options.clear(); + t_StringToString::iterator it; + for ( it = this->PersistentOptions.begin(); + it != this->PersistentOptions.end(); + ++ it ) + { + this->Options[it->first.c_str()] = it->second.c_str(); + } +} + +//---------------------------------------------------------------------- +const char* cmCTestGenericHandler::GetOption(const char* op) +{ + cmCTestGenericHandler::t_StringToString::iterator remit + = this->Options.find(op); + if ( remit == this->Options.end() ) + { + return 0; + } + return remit->second.c_str(); +} + +//---------------------------------------------------------------------- +bool cmCTestGenericHandler::StartResultingXML(const char* name, + cmGeneratedFileStream& xofs) +{ + if ( !name ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create resulting XML file without providing the name" + << std::endl;); + return false; + } + cmOStringStream ostr; + ostr << name; + if ( this->SubmitIndex > 0 ) + { + ostr << "_" << this->SubmitIndex; + } + ostr << ".xml"; + if(this->CTest->GetCurrentTag().empty()) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Current Tag empty, this may mean" + " NightlyStartTime was not set correctly." << std::endl); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + if( !this->CTest->OpenOutputFile(this->CTest->GetCurrentTag(), + ostr.str().c_str(), xofs, true) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create resulting XML file: " << ostr.str().c_str() + << std::endl); + return false; + } + this->CTest->AddSubmitFile(ostr.str().c_str()); + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestGenericHandler::StartLogFile(const char* name, + cmGeneratedFileStream& xofs) +{ + if ( !name ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create log file without providing the name" << std::endl;); + return false; + } + cmOStringStream ostr; + ostr << "Last" << name; + if ( this->SubmitIndex > 0 ) + { + ostr << "_" << this->SubmitIndex; + } + if ( !this->CTest->GetCurrentTag().empty() ) + { + ostr << "_" << this->CTest->GetCurrentTag(); + } + ostr << ".log"; + if( !this->CTest->OpenOutputFile("Temporary", ostr.str().c_str(), xofs) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create log file: " + << ostr.str().c_str() << std::endl); + return false; + } + return true; +} + diff --git a/Source/CTest/cmCTestGenericHandler.h b/Source/CTest/cmCTestGenericHandler.h new file mode 100644 index 000000000..dc907c2d5 --- /dev/null +++ b/Source/CTest/cmCTestGenericHandler.h @@ -0,0 +1,105 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestGenericHandler.h,v $ + Language: C++ + Date: $Date: 2006-04-28 15:59:31 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestGenericHandler_h +#define cmCTestGenericHandler_h + + +#include "cmObject.h" + +class cmCTest; +class cmMakefile; +class cmCTestCommand; +class cmGeneratedFileStream; + +/** \class cmCTestGenericHandler + * \brief A superclass of all CTest Handlers + * + */ +class cmCTestGenericHandler : public cmObject +{ +public: + /** + * If verbose then more informaiton is printed out + */ + void SetVerbose(bool val) { this->HandlerVerbose = val; } + + /** + * Populate internals from CTest custom scripts + */ + virtual void PopulateCustomVectors(cmMakefile *) {} + + /** + * Do the actual processing. Subclass has to override it. + * Return < 0 if error. + */ + virtual int ProcessHandler() = 0; + + /** + * Process command line arguments that are applicable for the handler + */ + virtual int ProcessCommandLineArguments( + const std::string& /*currentArg*/, size_t& /*idx*/, + const std::vector& /*allArgs*/) { return 1; } + + /** + * Initialize handler + */ + virtual void Initialize(); + + /** + * Set the CTest instance + */ + void SetCTestInstance(cmCTest* ctest) { this->CTest = ctest; } + cmCTest* GetCTestInstance() { return this->CTest; } + + /** + * Construct handler + */ + cmCTestGenericHandler(); + virtual ~cmCTestGenericHandler(); + + typedef std::map t_StringToString; + + + void SetPersistentOption(const char* op, const char* value); + void SetOption(const char* op, const char* value); + const char* GetOption(const char* op); + + void SetCommand(cmCTestCommand* command) + { + this->Command = command; + } + + void SetSubmitIndex(int idx) { this->SubmitIndex = idx; } + int GetSubmitIndex() { return this->SubmitIndex; } + +protected: + bool StartResultingXML(const char* name, cmGeneratedFileStream& xofs); + bool StartLogFile(const char* name, cmGeneratedFileStream& xofs); + + bool HandlerVerbose; + cmCTest *CTest; + t_StringToString Options; + t_StringToString PersistentOptions; + + cmCTestCommand* Command; + int SubmitIndex; +}; + +#endif + diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx new file mode 100644 index 000000000..07e1d972e --- /dev/null +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -0,0 +1,170 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestHandlerCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestHandlerCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestHandlerCommand::cmCTestHandlerCommand() +{ + const size_t INIT_SIZE = 100; + size_t cc; + this->Arguments.reserve(INIT_SIZE); + for ( cc = 0; cc < INIT_SIZE; ++ cc ) + { + this->Arguments.push_back(0); + } + this->Arguments[ct_RETURN_VALUE] = "RETURN_VALUE"; + this->Arguments[ct_SOURCE] = "SOURCE"; + this->Arguments[ct_BUILD] = "BUILD"; + this->Arguments[ct_SUBMIT_INDEX] = "SUBMIT_INDEX"; + this->Last = ct_LAST; +} + +bool cmCTestHandlerCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if ( !this->ProcessArguments(args, (unsigned int)this->Last, + &*this->Arguments.begin(),this->Values) ) + { + return false; + } + + cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;); + cmCTestGenericHandler* handler = this->InitializeHandler(); + if ( !handler ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot instantiate test handler " << this->GetName() + << std::endl); + return false; + } + + cmCTestLog(this->CTest, DEBUG, "Populate Custom Vectors" << std::endl;); + handler->PopulateCustomVectors(this->Makefile); + + if ( this->Values[ct_BUILD] ) + { + this->CTest->SetCTestConfiguration("BuildDirectory", + cmSystemTools::CollapseFullPath( + this->Values[ct_BUILD]).c_str()); + } + else + { + this->CTest->SetCTestConfiguration("BuildDirectory", + cmSystemTools::CollapseFullPath( + this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY")).c_str()); + } + if ( this->Values[ct_SOURCE] ) + { + cmCTestLog(this->CTest, DEBUG, + "Set source directory to: " << this->Values[ct_SOURCE] << std::endl); + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Values[ct_SOURCE]).c_str()); + } + else + { + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str()); + } + if ( this->Values[ct_SUBMIT_INDEX] ) + { + if ( this->CTest->GetDartVersion() <= 1 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Dart before version 2.0 does not support collecting submissions." + << std::endl + << "Please upgrade the server to Dart 2 or higher, or do not use " + "SUBMIT_INDEX." << std::endl); + } + else + { + handler->SetSubmitIndex(atoi(this->Values[ct_SUBMIT_INDEX])); + } + } + + std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory( + this->CTest->GetCTestConfiguration("BuildDirectory").c_str()); + int res = handler->ProcessHandler(); + if ( this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE]) + { + cmOStringStream str; + str << res; + this->Makefile->AddDefinition( + this->Values[ct_RETURN_VALUE], str.str().c_str()); + } + cmSystemTools::ChangeDirectory(current_dir.c_str()); + return true; +} + +bool cmCTestHandlerCommand::ProcessArguments( + std::vector const& args, int last, const char** strings, + std::vector& values) +{ + int state = 0; + int cc; + values.resize(last); + for ( cc = 0; cc < last; ++ cc ) + { + values[cc] = 0; + } + + for(size_t i=0; i < args.size(); ++i) + { + if ( state > 0 && state < last ) + { + values[state] = args[i].c_str(); + cmCTestLog(this->CTest, DEBUG, "Set " << strings[state] << " to " + << args[i].c_str() << std::endl); + state = 0; + } + else + { + bool found = false; + for ( cc = 0; cc < last; ++ cc ) + { + if ( strings[cc] && args[i] == strings[cc] ) + { + state = cc; + if ( values[state] ) + { + cmOStringStream ostr; + ostr << "called with incorrect number of arguments. " + << strings[state] << " specified twice."; + this->SetError(ostr.str().c_str()); + return false; + } + found = true; + break; + } + } + if ( !found ) + { + cmOStringStream str; + str + << "called with incorrect number of arguments. Extra argument is: " + << args[i].c_str() << "."; + this->SetError(str.str().c_str()); + return false; + } + } + } + return true; +} diff --git a/Source/CTest/cmCTestHandlerCommand.h b/Source/CTest/cmCTestHandlerCommand.h new file mode 100644 index 000000000..c095edd46 --- /dev/null +++ b/Source/CTest/cmCTestHandlerCommand.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestHandlerCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestHandlerCommand_h +#define cmCTestHandlerCommand_h + +#include "cmCTestCommand.h" + +class cmCTestGenericHandler; + +/** \class cmCTestHandler + * \brief Run a ctest script + * + * cmCTestHandlerCommand defineds the command to test the project. + */ +class cmCTestHandlerCommand : public cmCTestCommand +{ +public: + cmCTestHandlerCommand(); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand); + + enum + { + ct_NONE, + ct_RETURN_VALUE, + ct_BUILD, + ct_SOURCE, + ct_SUBMIT_INDEX, + ct_LAST + }; + +protected: + virtual cmCTestGenericHandler* InitializeHandler() = 0; + bool ProcessArguments(std::vector const& args, + int last, const char** strings, std::vector& values); + + std::string ReturnVariable; + std::vector Arguments; + std::vector Values; + size_t Last; +}; + +#endif diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx new file mode 100644 index 000000000..d72d17373 --- /dev/null +++ b/Source/CTest/cmCTestMemCheckCommand.cxx @@ -0,0 +1,37 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestMemCheckCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:08 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestMemCheckCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + + +cmCTestGenericHandler* cmCTestMemCheckCommand::InitializeActualHandler() +{ + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("memcheck"); + + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "MemoryCheckSuppressionFile", "CTEST_MEMORYCHECK_SUPPRESSIONS_FILE"); + + return handler; +} + diff --git a/Source/CTest/cmCTestMemCheckCommand.h b/Source/CTest/cmCTestMemCheckCommand.h new file mode 100644 index 000000000..3c790cdad --- /dev/null +++ b/Source/CTest/cmCTestMemCheckCommand.h @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestMemCheckCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-10 20:03:09 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestMemCheckCommand_h +#define cmCTestMemCheckCommand_h + +#include "cmCTestTestCommand.h" + +class cmCTestGenericHandler; + +/** \class cmCTestMemCheck + * \brief Run a ctest script + * + * cmCTestMemCheckCommand defineds the command to test the project. + */ +class cmCTestMemCheckCommand : public cmCTestTestCommand +{ +public: + + cmCTestMemCheckCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestMemCheckCommand* ni = new cmCTestMemCheckCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_MEMCHECK";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Tests the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_MEMCHECK([BUILD build_dir] [RETURN_VALUE res])\n" + "Performs a memory checking of tests in the given build directory and " + "stores results in MemCheck.xml. The second argument is a variable " + "that will hold value."; + } + + cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand); + +protected: + cmCTestGenericHandler* InitializeActualHandler(); +}; + + +#endif + diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx new file mode 100644 index 000000000..77b744209 --- /dev/null +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -0,0 +1,966 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestMemCheckHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-30 16:17:36 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestMemCheckHandler.h" +#include "cmXMLParser.h" +#include "cmCTest.h" +#include "cmake.h" +#include "cmGeneratedFileStream.h" +#include +#include +#include +#include "cmMakefile.h" + +#include +#include +#include + +struct CatToErrorType +{ + const char* ErrorCategory; + int ErrorCode; +}; + + +static CatToErrorType cmCTestMemCheckBoundsChecker[] = { + // Error tags + {"Write Overrun", cmCTestMemCheckHandler::ABW}, + {"Read Overrun", cmCTestMemCheckHandler::ABR}, + {"Memory Overrun", cmCTestMemCheckHandler::ABW}, + {"Allocation Conflict", cmCTestMemCheckHandler::FMM}, + {"Bad Pointer Use", cmCTestMemCheckHandler::FMW}, + {"Dangling Pointer", cmCTestMemCheckHandler::FMR}, + {0,0} +}; + +// parse the xml file storing the installed version of Xcode on +// the machine +class cmBoundsCheckerParser : public cmXMLParser +{ +public: + cmBoundsCheckerParser(cmCTest* c) { this->CTest = c;} + void StartElement(const char* name, const char** atts) + { + if(strcmp(name, "MemoryLeak") == 0) + { + this->Errors.push_back(cmCTestMemCheckHandler::MLK); + } + if(strcmp(name, "ResourceLeak") == 0) + { + this->Errors.push_back(cmCTestMemCheckHandler::MLK); + } + if(strcmp(name, "Error") == 0) + { + this->ParseError(atts); + } + if(strcmp(name, "Dangling Pointer") == 0) + { + this->ParseError(atts); + } + // Create the log + cmOStringStream ostr; + ostr << name << ":\n"; + int i = 0; + for(; atts[i] != 0; i+=2) + { + ostr << " " << this->CTest->MakeXMLSafe(atts[i]).c_str() + << " - " << this->CTest->MakeXMLSafe(atts[i+1]).c_str() << "\n"; + } + ostr << "\n"; + this->Log += ostr.str(); + } + void EndElement(const char* ) + { + } + + const char* GetAttribute(const char* name, const char** atts) + { + int i = 0; + for(; atts[i] != 0; ++i) + { + if(strcmp(name, atts[i]) == 0) + { + return atts[i+1]; + } + } + return 0; + } + void ParseError(const char** atts) + { + CatToErrorType* ptr = cmCTestMemCheckBoundsChecker; + const char* cat = this->GetAttribute("ErrorCategory", atts); + if(!cat) + { + this->Errors.push_back(cmCTestMemCheckHandler::ABW); // do not know + cmCTestLog(this->CTest, ERROR_MESSAGE, + "No Category found in Bounds checker XML\n" ); + return; + } + while(ptr->ErrorCategory && cat) + { + if(strcmp(ptr->ErrorCategory, cat) == 0) + { + this->Errors.push_back(ptr->ErrorCode); + return; // found it we are done + } + ptr++; + } + if(ptr->ErrorCategory) + { + this->Errors.push_back(cmCTestMemCheckHandler::ABW); // do not know + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Found unknown Bounds Checker error " + << ptr->ErrorCategory << std::endl); + } + } + cmCTest* CTest; + std::vector Errors; + std::string Log; +}; + +#define BOUNDS_CHECKER_MARKER \ +"******######*****Begin BOUNDS CHECKER XML******######******" +//---------------------------------------------------------------------- +static const char* cmCTestMemCheckResultStrings[] = { + "ABR", + "ABW", + "ABWL", + "COR", + "EXU", + "FFM", + "FIM", + "FMM", + "FMR", + "FMW", + "FUM", + "IPR", + "IPW", + "MAF", + "MLK", + "MPK", + "NPR", + "ODS", + "PAR", + "PLK", + "UMC", + "UMR", + 0 +}; + + +//---------------------------------------------------------------------- +static const char* cmCTestMemCheckResultLongStrings[] = { + "Threading Problem", + "ABW", + "ABWL", + "COR", + "EXU", + "FFM", + "FIM", + "Mismatched deallocation", + "FMR", + "FMW", + "FUM", + "IPR", + "IPW", + "MAF", + "Memory Leak", + "Potential Memory Leak", + "NPR", + "ODS", + "Invalid syscall param", + "PLK", + "Uninitialized Memory Conditional", + "Uninitialized Memory Read", + 0 +}; + + +//---------------------------------------------------------------------- +cmCTestMemCheckHandler::cmCTestMemCheckHandler() +{ + this->MemCheck = true; + this->CustomMaximumPassedTestOutputSize = 0; + this->CustomMaximumFailedTestOutputSize = 0; +} + +//---------------------------------------------------------------------- +void cmCTestMemCheckHandler::Initialize() +{ + this->Superclass::Initialize(); + this->CustomMaximumPassedTestOutputSize = 0; + this->CustomMaximumFailedTestOutputSize = 0; + this->MemoryTester = ""; + this->MemoryTesterOptionsParsed.clear(); + this->MemoryTesterOptions = ""; + this->MemoryTesterStyle = UNKNOWN; + this->MemoryTesterOutputFile = ""; + int cc; + for ( cc = 0; cc < NO_MEMORY_FAULT; cc ++ ) + { + this->MemoryTesterGlobalResults[cc] = 0; + } + +} + +//---------------------------------------------------------------------- +int cmCTestMemCheckHandler::PreProcessHandler() +{ + if ( !this->InitializeMemoryChecking() ) + { + return 0; + } + + if ( !this->ExecuteCommands(this->CustomPreMemCheck) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem executing pre-memcheck command(s)." << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCTestMemCheckHandler::PostProcessHandler() +{ + if ( !this->ExecuteCommands(this->CustomPostMemCheck) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem executing post-memcheck command(s)." << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +void cmCTestMemCheckHandler::GenerateTestCommand( + std::vector& args) +{ + std::vector::size_type pp; + args.push_back(this->MemoryTester.c_str()); + std::string memcheckcommand = ""; + memcheckcommand = this->MemoryTester; + for ( pp = 0; pp < this->MemoryTesterOptionsParsed.size(); pp ++ ) + { + args.push_back(this->MemoryTesterOptionsParsed[pp].c_str()); + memcheckcommand += " "; + memcheckcommand += cmSystemTools::EscapeSpaces( + this->MemoryTesterOptionsParsed[pp].c_str()); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Memory check command: " + << memcheckcommand << std::endl); +} + +//---------------------------------------------------------------------- +void cmCTestMemCheckHandler::PopulateCustomVectors(cmMakefile *mf) +{ + this->cmCTestTestHandler::PopulateCustomVectors(mf); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_PRE_MEMCHECK", + this->CustomPreMemCheck); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_POST_MEMCHECK", + this->CustomPostMemCheck); + + this->CTest->PopulateCustomVector(mf, + "CTEST_CUSTOM_MEMCHECK_IGNORE", + this->CustomTestsIgnore); +} + +//---------------------------------------------------------------------- +void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os) +{ + if ( !this->CTest->GetProduceXML() ) + { + return; + } + + this->CTest->StartXML(os); + os << "MemoryTesterStyle ) + { + case cmCTestMemCheckHandler::VALGRIND: + os << "Valgrind"; + break; + case cmCTestMemCheckHandler::PURIFY: + os << "Purify"; + break; + case cmCTestMemCheckHandler::BOUNDS_CHECKER: + os << "BoundsChecker"; + break; + default: + os << "Unknown"; + } + os << "\">" << std::endl; + + os << "\t" << this->StartTest << "\n" + << "\t" << this->StartTestTime << "\n" + << "\t\n"; + cmCTestMemCheckHandler::TestResultsVector::size_type cc; + for ( cc = 0; cc < this->TestResults.size(); cc ++ ) + { + cmCTestTestResult *result = &this->TestResults[cc]; + std::string testPath = result->Path + "/" + result->Name; + os << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(testPath.c_str())) + << "" << std::endl; + } + os << "\t\n"; + cmCTestLog(this->CTest, HANDLER_OUTPUT, + "-- Processing memory checking output: "); + size_t total = this->TestResults.size(); + size_t step = total / 10; + size_t current = 0; + for ( cc = 0; cc < this->TestResults.size(); cc ++ ) + { + cmCTestTestResult *result = &this->TestResults[cc]; + std::string memcheckstr; + int memcheckresults[cmCTestMemCheckHandler::NO_MEMORY_FAULT]; + int kk; + bool res = this->ProcessMemCheckOutput(result->Output, memcheckstr, + memcheckresults); + if ( res && result->Status == cmCTestMemCheckHandler::COMPLETED ) + { + continue; + } + this->CleanTestOutput(memcheckstr, + static_cast(this->CustomMaximumFailedTestOutputSize)); + os << "\tStatus == cmCTestMemCheckHandler::COMPLETED ) + { + os << "passed"; + } + else if ( result->Status == cmCTestMemCheckHandler::NOT_RUN ) + { + os << "notrun"; + } + else + { + os << "failed"; + } + std::string testPath = result->Path + "/" + result->Name; + os << "\">\n" + << "\t\t" << cmCTest::MakeXMLSafe(result->Name) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(result->Path.c_str())) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(testPath.c_str())) << "\n" + << "\t\t" + << cmCTest::MakeXMLSafe(result->FullCommandLine) + << "\n" + << "\t\t" << std::endl; + for ( kk = 0; cmCTestMemCheckResultLongStrings[kk]; kk ++ ) + { + if ( memcheckresults[kk] ) + { + os << "\t\t\t" + << memcheckresults[kk] + << "" << std::endl; + } + this->MemoryTesterGlobalResults[kk] += memcheckresults[kk]; + } + os + << "\t\t\n" + << "\t\n" << memcheckstr << std::endl + << "\t\n" + << "\t" << std::endl; + if ( current < cc ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "#" << std::flush); + current += step; + } + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory checking results:" + << std::endl); + os << "\t" << std::endl; + for ( cc = 0; cmCTestMemCheckResultStrings[cc]; cc ++ ) + { + if ( this->MemoryTesterGlobalResults[cc] ) + { +#ifdef cerr +# undef cerr +#endif + std::cerr.width(35); +#define cerr no_cerr + cmCTestLog(this->CTest, HANDLER_OUTPUT, + cmCTestMemCheckResultLongStrings[cc] << " - " + << this->MemoryTesterGlobalResults[cc] << std::endl); + os << "\t\t" << std::endl; + } + } + os << "\t" << std::endl; + + os << "\t" << this->EndTest << "" << std::endl; + os << "\t" << this->EndTestTime + << "" << std::endl; + os << "" + << static_cast(this->ElapsedTestingTime/6)/10.0 + << "\n"; + + os << "" << std::endl; + this->CTest->EndXML(os); + + +} + +//---------------------------------------------------------------------- +bool cmCTestMemCheckHandler::InitializeMemoryChecking() +{ + // Setup the command + if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( + "MemoryCheckCommand").c_str()) ) + { + this->MemoryTester + = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( + "MemoryCheckCommand").c_str()); + } + else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( + "PurifyCommand").c_str()) ) + { + this->MemoryTester + = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( + "PurifyCommand").c_str()); + } + else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( + "ValgrindCommand").c_str()) ) + { + this->MemoryTester + = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( + "ValgrindCommand").c_str()); + } + else if ( cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( + "BoundsCheckerCommand").c_str()) ) + { + this->MemoryTester + = cmSystemTools::ConvertToOutputPath(this->CTest->GetCTestConfiguration( + "BoundsCheckerCommand").c_str()); + } + else + { + cmCTestLog(this->CTest, WARNING, + "Memory checker (MemoryCheckCommand) " + "not set, or cannot find the specified program." + << std::endl); + return false; + } + + if ( this->MemoryTester[0] == '\"' && + this->MemoryTester[this->MemoryTester.size()-1] == '\"' ) + { + this->MemoryTester + = this->MemoryTester.substr(1, this->MemoryTester.size()-2); + } + + // Setup the options + if ( this->CTest->GetCTestConfiguration( + "MemoryCheckCommandOptions").size() ) + { + this->MemoryTesterOptions = this->CTest->GetCTestConfiguration( + "MemoryCheckCommandOptions"); + } + else if ( this->CTest->GetCTestConfiguration( + "ValgrindCommandOptions").size() ) + { + this->MemoryTesterOptions = this->CTest->GetCTestConfiguration( + "ValgrindCommandOptions"); + } + + this->MemoryTesterOutputFile + = this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.log"; + + if ( this->MemoryTester.find("valgrind") != std::string::npos ) + { + this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND; + if ( !this->MemoryTesterOptions.size() ) + { + this->MemoryTesterOptions = "-q --tool=memcheck --leak-check=yes " + "--show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=100"; + } + if ( this->CTest->GetCTestConfiguration( + "MemoryCheckSuppressionFile").size() ) + { + if ( !cmSystemTools::FileExists(this->CTest->GetCTestConfiguration( + "MemoryCheckSuppressionFile").c_str()) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find memory checker suppression file: " + << this->CTest->GetCTestConfiguration( + "MemoryCheckSuppressionFile").c_str() << std::endl); + return false; + } + this->MemoryTesterOptions += " --suppressions=" + + cmSystemTools::EscapeSpaces(this->CTest->GetCTestConfiguration( + "MemoryCheckSuppressionFile").c_str()) + ""; + } + } + else if ( this->MemoryTester.find("purify") != std::string::npos ) + { + this->MemoryTesterStyle = cmCTestMemCheckHandler::PURIFY; + std::string outputFile = + cmSystemTools::EscapeSpaces(this->MemoryTesterOutputFile.c_str()); + +#ifdef _WIN32 + this->MemoryTesterOptions += " /SAVETEXTDATA=" + outputFile; +#else + this->MemoryTesterOptions += " -log-file=" + outputFile; +#endif + } + else if ( this->MemoryTester.find("BC") != std::string::npos ) + { + this->BoundsCheckerXMLFile = this->MemoryTesterOutputFile; + std::string outputFile = + cmSystemTools::EscapeSpaces(this->MemoryTesterOutputFile.c_str()); + std::string dpbdFile = this->CTest->GetBinaryDir() + + "/Testing/Temporary/MemoryChecker.DPbd"; + std::string errorFile = this->CTest->GetBinaryDir() + + "/Testing/Temporary/MemoryChecker.error"; + errorFile = cmSystemTools::EscapeSpaces(errorFile.c_str()); + this->BoundsCheckerDPBDFile = dpbdFile; + dpbdFile = cmSystemTools::EscapeSpaces(dpbdFile.c_str()); + this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER; + this->MemoryTesterOptions += " /B " + dpbdFile; + this->MemoryTesterOptions += " /X " + outputFile; + this->MemoryTesterOptions += " /M "; + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Do not understand memory checker: " << this->MemoryTester.c_str() + << std::endl); + return false; + } + + this->MemoryTesterOptionsParsed + = cmSystemTools::ParseArguments(this->MemoryTesterOptions.c_str()); + std::vector::size_type cc; + for ( cc = 0; cmCTestMemCheckResultStrings[cc]; cc ++ ) + { + this->MemoryTesterGlobalResults[cc] = 0; + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestMemCheckHandler::ProcessMemCheckOutput(const std::string& str, + std::string& log, int* results) +{ + std::string::size_type cc; + for ( cc = 0; cc < cmCTestMemCheckHandler::NO_MEMORY_FAULT; cc ++ ) + { + results[cc] = 0; + } + + if ( this->MemoryTesterStyle == cmCTestMemCheckHandler::VALGRIND ) + { + return this->ProcessMemCheckValgrindOutput(str, log, results); + } + else if ( this->MemoryTesterStyle == cmCTestMemCheckHandler::PURIFY ) + { + return this->ProcessMemCheckPurifyOutput(str, log, results); + } + else if ( this->MemoryTesterStyle == + cmCTestMemCheckHandler::BOUNDS_CHECKER ) + { + return this->ProcessMemCheckBoundsCheckerOutput(str, log, results); + } + else + { + log.append("\nMemory checking style used was: "); + log.append("None that I know"); + log = str; + } + + + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( + const std::string& str, std::string& log, + int* results) +{ + std::vector lines; + cmSystemTools::Split(str.c_str(), lines); + cmOStringStream ostr; + log = ""; + + cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): "); + + int defects = 0; + + for( std::vector::iterator i = lines.begin(); + i != lines.end(); ++i) + { + int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT; + if ( pfW.find(*i) ) + { + int cc; + for ( cc = 0; cc < cmCTestMemCheckHandler::NO_MEMORY_FAULT; cc ++ ) + { + if ( pfW.match(1) == cmCTestMemCheckResultStrings[cc] ) + { + failure = cc; + break; + } + } + if ( cc == cmCTestMemCheckHandler::NO_MEMORY_FAULT ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unknown Purify memory fault: " + << pfW.match(1) << std::endl); + ostr << "*** Unknown Purify memory fault: " << pfW.match(1) + << std::endl; + } + } + if ( failure != NO_MEMORY_FAULT ) + { + ostr << "" << cmCTestMemCheckResultStrings[failure] << " "; + results[failure] ++; + defects ++; + } + ostr << cmCTest::MakeXMLSafe(*i) << std::endl; + } + + log = ostr.str(); + if ( defects ) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( + const std::string& str, std::string& log, + int* results) +{ + std::vector lines; + cmSystemTools::Split(str.c_str(), lines); + bool unlimitedOutput = false; + if(str.find("CTEST_FULL_OUTPUT") != str.npos || + this->CustomMaximumFailedTestOutputSize == 0) + { + unlimitedOutput = true; + } + + std::string::size_type cc; + + cmOStringStream ostr; + log = ""; + + int defects = 0; + + cmsys::RegularExpression valgrindLine("^==[0-9][0-9]*=="); + + cmsys::RegularExpression vgFIM( + "== .*Invalid free\\(\\) / delete / delete\\[\\]"); + cmsys::RegularExpression vgFMM( + "== .*Mismatched free\\(\\) / delete / delete \\[\\]"); + cmsys::RegularExpression vgMLK( + "== .*[0-9][0-9]* bytes in [0-9][0-9]* blocks are definitely lost" + " in loss record [0-9][0-9]* of [0-9]"); + cmsys::RegularExpression vgPAR( + "== .*Syscall param .* contains unaddressable byte\\(s\\)"); + cmsys::RegularExpression vgMPK1( + "== .*[0-9][0-9]* bytes in [0-9][0-9]* blocks are possibly lost in" + " loss record [0-9][0-9]* of [0-9]"); + cmsys::RegularExpression vgMPK2( + "== .*[0-9][0-9]* bytes in [0-9][0-9]* blocks are still reachable" + " in loss record [0-9][0-9]* of [0-9]"); + cmsys::RegularExpression vgUMC( + "== .*Conditional jump or move depends on uninitialised value\\(s\\)"); + cmsys::RegularExpression vgUMR1( + "== .*Use of uninitialised value of size [0-9][0-9]*"); + cmsys::RegularExpression vgUMR2("== .*Invalid read of size [0-9][0-9]*"); + cmsys::RegularExpression vgUMR3("== .*Jump to the invalid address "); + cmsys::RegularExpression vgUMR4("== .*Syscall param .* contains " + "uninitialised or unaddressable byte\\(s\\)"); + cmsys::RegularExpression vgUMR5("== .*Syscall param .* uninitialised"); + cmsys::RegularExpression vgIPW("== .*Invalid write of size [0-9]"); + cmsys::RegularExpression vgABR("== .*pthread_mutex_unlock: mutex is " + "locked by a different thread"); + std::vector nonValGrindOutput; + double sttime = cmSystemTools::GetTime(); + cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl); + std::string::size_type totalOutputSize = 0; + bool outputFull = false; + for ( cc = 0; cc < lines.size(); cc ++ ) + { + cmCTestLog(this->CTest, DEBUG, "test line " + << lines[cc] << std::endl); + + if ( valgrindLine.find(lines[cc]) ) + { + cmCTestLog(this->CTest, DEBUG, "valgrind line " + << lines[cc] << std::endl); + int failure = cmCTestMemCheckHandler::NO_MEMORY_FAULT; + if ( vgFIM.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::FIM; + } + else if ( vgFMM.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::FMM; + } + else if ( vgMLK.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::MLK; + } + else if ( vgPAR.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::PAR; + } + else if ( vgMPK1.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::MPK; + } + else if ( vgMPK2.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::MPK; + } + else if ( vgUMC.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMC; + } + else if ( vgUMR1.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMR; + } + else if ( vgUMR2.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMR; + } + else if ( vgUMR3.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMR; + } + else if ( vgUMR4.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMR; + } + else if ( vgUMR5.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::UMR; + } + else if ( vgIPW.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::IPW; + } + else if ( vgABR.find(lines[cc]) ) + { + failure = cmCTestMemCheckHandler::ABR; + } + + if ( failure != cmCTestMemCheckHandler::NO_MEMORY_FAULT ) + { + ostr << "" << cmCTestMemCheckResultStrings[failure] << " "; + results[failure] ++; + defects ++; + } + totalOutputSize += lines[cc].size(); + ostr << cmCTest::MakeXMLSafe(lines[cc]) << std::endl; + } + else + { + nonValGrindOutput.push_back(cc); + } + } + // Now put all all the non valgrind output into the test output + if(!outputFull) + { + for(std::vector::iterator i = + nonValGrindOutput.begin(); i != nonValGrindOutput.end(); ++i) + { + totalOutputSize += lines[*i].size(); + cmCTestLog(this->CTest, DEBUG, "before xml safe " + << lines[*i] << std::endl); + cmCTestLog(this->CTest, DEBUG, "after xml safe " + << cmCTest::MakeXMLSafe(lines[*i]) << std::endl); + + ostr << cmCTest::MakeXMLSafe(lines[*i]) << std::endl; + if(!unlimitedOutput && totalOutputSize > + static_cast(this->CustomMaximumFailedTestOutputSize)) + { + outputFull = true; + ostr << "....\n"; + ostr << "Test Output for this test has been truncated see testing" + " machine logs for full output,\n"; + ostr << "or put CTEST_FULL_OUTPUT in the output of " + "this test program.\n"; + } + } + } + cmCTestLog(this->CTest, DEBUG, "End test (elapsed: " + << (cmSystemTools::GetTime() - sttime) << std::endl); + log = ostr.str(); + if ( defects ) + { + return false; + } + return true; +} + + + +//---------------------------------------------------------------------- +bool cmCTestMemCheckHandler::ProcessMemCheckBoundsCheckerOutput( + const std::string& str, std::string& log, + int* results) +{ + log = ""; + double sttime = cmSystemTools::GetTime(); + std::vector lines; + cmSystemTools::Split(str.c_str(), lines); + cmCTestLog(this->CTest, DEBUG, "Start test: " << lines.size() << std::endl); + std::vector::size_type cc; + for ( cc = 0; cc < lines.size(); cc ++ ) + { + if(lines[cc] == BOUNDS_CHECKER_MARKER) + { + break; + } + } + cmBoundsCheckerParser parser(this->CTest); + parser.InitializeParser(); + if(cc < lines.size()) + { + for(cc++; cc < lines.size(); ++cc) + { + std::string& theLine = lines[cc]; + // check for command line arguments that are not escaped + // correctly by BC + if(theLine.find("TargetArgs=") != theLine.npos) + { + // skip this because BC gets it wrong and we can't parse it + } + else if(!parser.ParseChunk(theLine.c_str(), theLine.size())) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error in ParseChunk: " << theLine.c_str() + << std::endl); + } + } + } + int defects = 0; + for(cc =0; cc < parser.Errors.size(); ++cc) + { + results[parser.Errors[cc]]++; + defects++; + } + cmCTestLog(this->CTest, DEBUG, "End test (elapsed: " + << (cmSystemTools::GetTime() - sttime) << std::endl); + if(defects) + { + // only put the output of Bounds Checker if there were + // errors or leaks detected + log = parser.Log; + return false; + } + return true; +} + +void +cmCTestMemCheckHandler::ProcessOneTest(cmCTestTestProperties *props, + std::vector &passed, + std::vector &failed, + int count, int tmsize) +{ + // run parent test + cmCTestTestHandler::ProcessOneTest(props, passed, failed, count, tmsize); + cmCTestTestResult& res = this->TestResults[this->TestResults.size()-1]; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "process test output now: " + << props->Name.c_str() << " " << res.Name.c_str() << std::endl); + if( this->MemoryTesterStyle == cmCTestMemCheckHandler::BOUNDS_CHECKER) + { + this->PostProcessBoundsCheckerTest(res); + } + else if(this->MemoryTesterStyle == cmCTestMemCheckHandler::PURIFY ) + { + this->PostProcessPurifyTest(res); + } +} + +// This method puts the bounds checker output file into the output +// for the test +void +cmCTestMemCheckHandler::PostProcessBoundsCheckerTest(cmCTestTestResult& res) +{ + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "PostProcessBoundsCheckerTest for : " + << res.Name.c_str() << std::endl); + if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) + { + std::string log = "Cannot find memory tester output file: " + + this->MemoryTesterOutputFile; + cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); + return; + } + // put a scope around this to close ifs so the file can be removed + { + std::ifstream ifs(this->MemoryTesterOutputFile.c_str()); + if ( !ifs ) + { + std::string log = "Cannot read memory tester output file: " + + this->MemoryTesterOutputFile; + cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); + return; + } + res.Output += BOUNDS_CHECKER_MARKER; + res.Output += "\n"; + std::string line; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + res.Output += line; + res.Output += "\n"; + } + } + cmSystemTools::Delay(1000); + cmSystemTools::RemoveFile(this->BoundsCheckerDPBDFile.c_str()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: " + << this->BoundsCheckerDPBDFile.c_str() << std::endl); + cmSystemTools::RemoveFile(this->BoundsCheckerXMLFile.c_str()); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Remove: " + << this->BoundsCheckerXMLFile.c_str() << std::endl); +} + +void +cmCTestMemCheckHandler::PostProcessPurifyTest(cmCTestTestResult& res) +{ + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "PostProcessPurifyTest for : " + << res.Name.c_str() << std::endl); + if ( !cmSystemTools::FileExists(this->MemoryTesterOutputFile.c_str()) ) + { + std::string log = "Cannot find memory tester output file: " + + this->MemoryTesterOutputFile; + cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); + return; + } + std::ifstream ifs(this->MemoryTesterOutputFile.c_str()); + if ( !ifs ) + { + std::string log = "Cannot read memory tester output file: " + + this->MemoryTesterOutputFile; + cmCTestLog(this->CTest, ERROR_MESSAGE, log.c_str() << std::endl); + return; + } + std::string line; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + res.Output += line; + } +} diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h new file mode 100644 index 000000000..9a739b814 --- /dev/null +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -0,0 +1,136 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestMemCheckHandler.h,v $ + Language: C++ + Date: $Date: 2007-07-24 18:43:31 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestMemCheckHandler_h +#define cmCTestMemCheckHandler_h + + +#include "cmCTestTestHandler.h" +#include "cmListFileCache.h" + +class cmMakefile; + +/** \class cmCTestMemCheckHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestMemCheckHandler : public cmCTestTestHandler +{ +public: + cmTypeMacro(cmCTestMemCheckHandler, cmCTestTestHandler); + + void PopulateCustomVectors(cmMakefile *mf); + + cmCTestMemCheckHandler(); + + void Initialize(); +protected: + virtual int PreProcessHandler(); + virtual int PostProcessHandler(); + virtual void GenerateTestCommand(std::vector& args); + +private: + + enum { // Memory checkers + UNKNOWN = 0, + VALGRIND, + PURIFY, + BOUNDS_CHECKER + }; +public: + enum { // Memory faults + ABR = 0, + ABW, + ABWL, + COR, + EXU, + FFM, + FIM, + FMM, + FMR, + FMW, + FUM, + IPR, + IPW, + MAF, + MLK, + MPK, + NPR, + ODS, + PAR, + PLK, + UMC, + UMR, + NO_MEMORY_FAULT + }; +private: + enum { // Program statuses + NOT_RUN = 0, + TIMEOUT, + SEGFAULT, + ILLEGAL, + INTERRUPT, + NUMERICAL, + OTHER_FAULT, + FAILED, + BAD_COMMAND, + COMPLETED + }; + std::string BoundsCheckerDPBDFile; + std::string BoundsCheckerXMLFile; + std::string MemoryTester; + std::vector MemoryTesterOptionsParsed; + std::string MemoryTesterOptions; + int MemoryTesterStyle; + std::string MemoryTesterOutputFile; + int MemoryTesterGlobalResults[NO_MEMORY_FAULT]; + + ///! Initialize memory checking subsystem. + bool InitializeMemoryChecking(); + + /** + * Generate the Dart compatible output + */ + void GenerateDartOutput(std::ostream& os); + + std::vector CustomPreMemCheck; + std::vector CustomPostMemCheck; + + //! Parse Valgrind/Purify/Bounds Checker result out of the output + //string. After running, log holds the output and results hold the + //different memmory errors. + bool ProcessMemCheckOutput(const std::string& str, + std::string& log, int* results); + bool ProcessMemCheckValgrindOutput(const std::string& str, + std::string& log, int* results); + bool ProcessMemCheckPurifyOutput(const std::string& str, + std::string& log, int* results); + bool ProcessMemCheckBoundsCheckerOutput(const std::string& str, + std::string& log, int* results); + /** + * Run one test + */ + virtual void ProcessOneTest(cmCTestTestProperties *props, + std::vector &passed, + std::vector &failed, + int count, int tmsize); + void PostProcessPurifyTest(cmCTestTestResult& res); + void PostProcessBoundsCheckerTest(cmCTestTestResult& res); +}; + +#endif + diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.cxx b/Source/CTest/cmCTestReadCustomFilesCommand.cxx new file mode 100755 index 000000000..65e9b7578 --- /dev/null +++ b/Source/CTest/cmCTestReadCustomFilesCommand.cxx @@ -0,0 +1,40 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestReadCustomFilesCommand.cxx,v $ + Language: C++ + Date: $Date: 2006/03/10 20:03:09 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestReadCustomFilesCommand.h" + +#include "cmCTest.h" + +bool cmCTestReadCustomFilesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::vector::const_iterator dit; + for ( dit = args.begin(); dit != args.end(); ++ dit ) + { + this->CTest->ReadCustomConfigurationFileTree(dit->c_str(), + this->Makefile); + } + + return true; +} + + diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.h b/Source/CTest/cmCTestReadCustomFilesCommand.h new file mode 100755 index 000000000..b964b54f4 --- /dev/null +++ b/Source/CTest/cmCTestReadCustomFilesCommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestReadCustomFilesCommand.h,v $ + Language: C++ + Date: $Date: 2006/03/10 20:03:09 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestReadCustomFilesCommand_h +#define cmCTestReadCustomFilesCommand_h + +#include "cmCTestCommand.h" + +/** \class cmCTestReadCustomFiles + * \brief Run a ctest script + * + * cmLibrarysCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmCTestReadCustomFilesCommand : public cmCTestCommand +{ +public: + + cmCTestReadCustomFilesCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestReadCustomFilesCommand* ni = new cmCTestReadCustomFilesCommand; + ni->CTest = this->CTest; + return ni; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_READ_CUSTOM_FILES";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "read CTestCustom files."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_READ_CUSTOM_FILES( directory ... )\n" + "Read all the CTestCustom.ctest or CTestCustom.cmake files from " + "the given directory."; + } + + cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand); + +}; + + +#endif diff --git a/Source/CTest/cmCTestRunScriptCommand.cxx b/Source/CTest/cmCTestRunScriptCommand.cxx new file mode 100755 index 000000000..925627fb6 --- /dev/null +++ b/Source/CTest/cmCTestRunScriptCommand.cxx @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestRunScriptCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestRunScriptCommand.h" + +#include "cmCTestScriptHandler.h" + +bool cmCTestRunScriptCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->CTestScriptHandler->RunCurrentScript(); + return true; + } + + bool np = false; + unsigned int i = 0; + if (args[i] == "NEW_PROCESS") + { + np = true; + i++; + } + // run each script + for (; i < args.size(); ++i) + { + cmCTestScriptHandler::RunScript(this->CTest, args[i].c_str(), !np); + } + return true; +} + + diff --git a/Source/CTest/cmCTestRunScriptCommand.h b/Source/CTest/cmCTestRunScriptCommand.h new file mode 100755 index 000000000..28398ac09 --- /dev/null +++ b/Source/CTest/cmCTestRunScriptCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestRunScriptCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestRunScriptCommand_h +#define cmCTestRunScriptCommand_h + +#include "cmCTestCommand.h" + +/** \class cmCTestRunScript + * \brief Run a ctest script + * + * cmLibrarysCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmCTestRunScriptCommand : public cmCTestCommand +{ +public: + + cmCTestRunScriptCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestRunScriptCommand* ni = new cmCTestRunScriptCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_RUN_SCRIPT";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "runs a ctest -S script"; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_RUN_SCRIPT([NEW_PROCESS] script_file_name script_file_name1 \n" + " script_file_name2 ...)\n" + "Runs a script or scripts much like if it was run from ctest -S. " + "If no argument is provided then the current script is run using " + "the current settings of the variables. If NEW_PROCESS is specified " + "then each script will be run in a seperate process."; + } + + cmTypeMacro(cmCTestRunScriptCommand, cmCTestCommand); + +}; + + +#endif diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx new file mode 100755 index 000000000..453b668d2 --- /dev/null +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -0,0 +1,1005 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestScriptHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.43 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestScriptHandler.h" + +#include "cmCTest.h" +#include "cmake.h" +#include "cmFunctionBlocker.h" +#include "cmMakefile.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" +#include "cmGeneratedFileStream.h" + +//#include +#include + +// used for sleep +#ifdef _WIN32 +#include "windows.h" +#endif + +#include +#include +#include +#include + +// needed for sleep +#if !defined(_WIN32) +# include +#endif + +#include "cmCTestBuildCommand.h" +#include "cmCTestConfigureCommand.h" +#include "cmCTestCoverageCommand.h" +#include "cmCTestEmptyBinaryDirectoryCommand.h" +#include "cmCTestMemCheckCommand.h" +#include "cmCTestReadCustomFilesCommand.h" +#include "cmCTestRunScriptCommand.h" +#include "cmCTestSleepCommand.h" +#include "cmCTestStartCommand.h" +#include "cmCTestSubmitCommand.h" +#include "cmCTestTestCommand.h" +#include "cmCTestUpdateCommand.h" + +#define CTEST_INITIAL_CMAKE_OUTPUT_FILE_NAME "CTestInitialCMakeOutput.log" + +// used to keep elapsed time up to date +class cmCTestScriptFunctionBlocker : public cmFunctionBlocker +{ +public: + cmCTestScriptFunctionBlocker() {} + virtual ~cmCTestScriptFunctionBlocker() {} + virtual bool IsFunctionBlocked(const cmListFileFunction& lff, + cmMakefile &mf, + cmExecutionStatus &); + //virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); + //virtual void ScopeEnded(cmMakefile &mf); + + cmCTestScriptHandler* CTestScriptHandler; +}; + +// simply update the time and don't block anything +bool cmCTestScriptFunctionBlocker:: +IsFunctionBlocked(const cmListFileFunction& , cmMakefile &, + cmExecutionStatus &) +{ + this->CTestScriptHandler->UpdateElapsedTime(); + return false; +} + +//---------------------------------------------------------------------- +cmCTestScriptHandler::cmCTestScriptHandler() +{ + this->Backup = false; + this->EmptyBinDir = false; + this->EmptyBinDirOnce = false; + this->Makefile = 0; + this->LocalGenerator = 0; + this->CMake = 0; + this->GlobalGenerator = 0; + + this->ScriptStartTime = 0; + + // the *60 is becuase the settings are in minutes but GetTime is seconds + this->MinimumInterval = 30*60; + this->ContinuousDuration = -1; +} + +//---------------------------------------------------------------------- +void cmCTestScriptHandler::Initialize() +{ + this->Superclass::Initialize(); + this->Backup = false; + this->EmptyBinDir = false; + this->EmptyBinDirOnce = false; + + this->SourceDir = ""; + this->BinaryDir = ""; + this->BackupSourceDir = ""; + this->BackupBinaryDir = ""; + this->CTestRoot = ""; + this->CVSCheckOut = ""; + this->CTestCmd = ""; + this->UpdateCmd = ""; + this->CTestEnv = ""; + this->InitCache = ""; + this->CMakeCmd = ""; + this->CMOutFile = ""; + this->ExtraUpdates.clear(); + + this->MinimumInterval = 20*60; + this->ContinuousDuration = -1; + + // what time in seconds did this script start running + this->ScriptStartTime = 0; + + this->Makefile = 0; + if (this->LocalGenerator) + { + delete this->LocalGenerator; + } + this->LocalGenerator = 0; + if (this->GlobalGenerator) + { + delete this->GlobalGenerator; + } + this->GlobalGenerator = 0; + if (this->CMake) + { + delete this->CMake; + } +} + +//---------------------------------------------------------------------- +cmCTestScriptHandler::~cmCTestScriptHandler() +{ + // local generator owns the makefile + this->Makefile = 0; + if (this->LocalGenerator) + { + delete this->LocalGenerator; + } + this->LocalGenerator = 0; + if (this->GlobalGenerator) + { + delete this->GlobalGenerator; + } + this->GlobalGenerator = 0; + if (this->CMake) + { + delete this->CMake; + } +} + + +//---------------------------------------------------------------------- +// just adds an argument to the vector +void cmCTestScriptHandler::AddConfigurationScript(const char *script, + bool pscope) +{ + this->ConfigurationScripts.push_back(script); + this->ScriptProcessScope.push_back(pscope); +} + + +//---------------------------------------------------------------------- +// the generic entry point for handling scripts, this routine will run all +// the scripts provides a -S arguments +int cmCTestScriptHandler::ProcessHandler() +{ + int res = 0; + for (size_t i=0; i < this->ConfigurationScripts.size(); ++i) + { + // for each script run it + res += this->RunConfigurationScript + (cmSystemTools::CollapseFullPath(this->ConfigurationScripts[i].c_str()), + this->ScriptProcessScope[i]); + } + if ( res ) + { + return -1; + } + return 0; +} + +void cmCTestScriptHandler::UpdateElapsedTime() +{ + if (this->LocalGenerator) + { + // set the current elapsed time + char timeString[20]; + int itime = static_cast(cmSystemTools::GetTime() + - this->ScriptStartTime); + sprintf(timeString,"%i",itime); + this->LocalGenerator->GetMakefile()->AddDefinition("CTEST_ELAPSED_TIME", + timeString); + } +} + +//---------------------------------------------------------------------- +void cmCTestScriptHandler::AddCTestCommand(cmCTestCommand* command) +{ + cmCTestCommand* newCom = command; + newCom->CTest = this->CTest; + newCom->CTestScriptHandler = this; + this->CMake->AddCommand(newCom); +} + +int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg) +{ + // execute the script passing in the arguments to the script as well as the + // arguments from this invocation of cmake + std::vector argv; + argv.push_back(this->CTest->GetCTestExecutable()); + argv.push_back("-SR"); + argv.push_back(total_script_arg.c_str()); + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Executable for CTest is: " << + this->CTest->GetCTestExecutable() << "\n"); + + // now pass through all the other arguments + std::vector &initArgs = + this->CTest->GetInitialCommandLineArguments(); + for(size_t i=1; i < initArgs.size(); ++i) + { + argv.push_back(initArgs[i].c_str()); + } + argv.push_back(0); + + // Now create process object + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + //cmsysProcess_SetWorkingDirectory(cp, dir); + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + //cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_Execute(cp); + + std::vector out; + std::vector err; + std::string line; + int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err); + while(pipe != cmsysProcess_Pipe_None) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Output: " + << line << "\n"); + if(pipe == cmsysProcess_Pipe_STDERR) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, line << "\n"); + } + else if(pipe == cmsysProcess_Pipe_STDOUT) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, line << "\n"); + } + pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err); + } + + // Properly handle output of the build command + cmsysProcess_WaitForExit(cp, 0); + int result = cmsysProcess_GetState(cp); + + int retVal = 0; + if(result == cmsysProcess_State_Exited) + { + retVal = cmsysProcess_GetExitValue(cp); + } + else + { + abort(); + } + return retVal; +} + +void cmCTestScriptHandler::CreateCMake() +{ + // create a cmake instance to read the configuration script + if (this->CMake) + { + delete this->CMake; + delete this->GlobalGenerator; + delete this->LocalGenerator; + } + this->CMake = new cmake; + this->CMake->AddCMakePaths(); + this->GlobalGenerator = new cmGlobalGenerator; + this->GlobalGenerator->SetCMakeInstance(this->CMake); + + this->LocalGenerator = this->GlobalGenerator->CreateLocalGenerator(); + this->LocalGenerator->SetGlobalGenerator(this->GlobalGenerator); + this->Makefile = this->LocalGenerator->GetMakefile(); + + // remove all cmake commands which are not scriptable, since they can't be + // used in ctest scripts + this->CMake->RemoveUnscriptableCommands(); + + // add any ctest specific commands, probably should have common superclass + // for ctest commands to clean this up. If a couple more commands are + // created with the same format lets do that - ken + this->AddCTestCommand(new cmCTestBuildCommand); + this->AddCTestCommand(new cmCTestConfigureCommand); + this->AddCTestCommand(new cmCTestCoverageCommand); + this->AddCTestCommand(new cmCTestEmptyBinaryDirectoryCommand); + this->AddCTestCommand(new cmCTestMemCheckCommand); + this->AddCTestCommand(new cmCTestReadCustomFilesCommand); + this->AddCTestCommand(new cmCTestRunScriptCommand); + this->AddCTestCommand(new cmCTestSleepCommand); + this->AddCTestCommand(new cmCTestStartCommand); + this->AddCTestCommand(new cmCTestSubmitCommand); + this->AddCTestCommand(new cmCTestTestCommand); + this->AddCTestCommand(new cmCTestUpdateCommand); +} + +void cmCTestScriptHandler::GetCommandDocumentation( + std::vector& v) const +{ + this->CMake->GetCommandDocumentation(v); +} + +//---------------------------------------------------------------------- +// this sets up some variables for the script to use, creates the required +// cmake instance and generators, and then reads in the script +int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg) +{ + // if the argument has a , in it then it needs to be broken into the fist + // argument (which is the script) and the second argument which will be + // passed into the scripts as S_ARG + std::string script = total_script_arg; + std::string script_arg; + if (total_script_arg.find(",") != std::string::npos) + { + script = total_script_arg.substr(0,total_script_arg.find(",")); + script_arg = total_script_arg.substr(total_script_arg.find(",")+1); + } + + // make sure the file exists + if (!cmSystemTools::FileExists(script.c_str())) + { + cmSystemTools::Error("Cannot find file: ", script.c_str()); + return 1; + } + + // read in the list file to fill the cache + // create a cmake instance to read the configuration script + this->CreateCMake(); + + // set a variable with the path to the current script + this->Makefile->AddDefinition("CTEST_SCRIPT_DIRECTORY", + cmSystemTools::GetFilenamePath(script).c_str()); + this->Makefile->AddDefinition("CTEST_SCRIPT_NAME", + cmSystemTools::GetFilenameName(script).c_str()); + this->Makefile->AddDefinition("CTEST_EXECUTABLE_NAME", + this->CTest->GetCTestExecutable()); + this->Makefile->AddDefinition("CMAKE_EXECUTABLE_NAME", + this->CTest->GetCMakeExecutable()); + this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", true); + this->UpdateElapsedTime(); + + // add the script arg if defined + if (script_arg.size()) + { + this->Makefile->AddDefinition("CTEST_SCRIPT_ARG", script_arg.c_str()); + } + + // always add a function blocker to update the elapsed time + cmCTestScriptFunctionBlocker *f = new cmCTestScriptFunctionBlocker(); + f->CTestScriptHandler = this; + this->Makefile->AddFunctionBlocker(f); + + // finally read in the script + if (!this->Makefile->ReadListFile(0, script.c_str()) || + cmSystemTools::GetErrorOccuredFlag()) + { + return 2; + } + + return 0; +} + + +//---------------------------------------------------------------------- +// extract variabels from the script to set ivars +int cmCTestScriptHandler::ExtractVariables() +{ + // Temporary variables + const char* minInterval; + const char* contDuration; + + this->SourceDir + = this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY"); + this->BinaryDir + = this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY"); + + // add in translations for src and bin + cmSystemTools::AddKeepPath(this->SourceDir.c_str()); + cmSystemTools::AddKeepPath(this->BinaryDir.c_str()); + + this->CTestCmd + = this->Makefile->GetSafeDefinition("CTEST_COMMAND"); + this->CVSCheckOut + = this->Makefile->GetSafeDefinition("CTEST_CVS_CHECKOUT"); + this->CTestRoot + = this->Makefile->GetSafeDefinition("CTEST_DASHBOARD_ROOT"); + this->UpdateCmd + = this->Makefile->GetSafeDefinition("CTEST_UPDATE_COMMAND"); + if ( this->UpdateCmd.empty() ) + { + this->UpdateCmd + = this->Makefile->GetSafeDefinition("CTEST_CVS_COMMAND"); + } + this->CTestEnv + = this->Makefile->GetSafeDefinition("CTEST_ENVIRONMENT"); + this->InitCache + = this->Makefile->GetSafeDefinition("CTEST_INITIAL_CACHE"); + this->CMakeCmd + = this->Makefile->GetSafeDefinition("CTEST_CMAKE_COMMAND"); + this->CMOutFile + = this->Makefile->GetSafeDefinition("CTEST_CMAKE_OUTPUT_FILE_NAME"); + + this->Backup + = this->Makefile->IsOn("CTEST_BACKUP_AND_RESTORE"); + this->EmptyBinDir + = this->Makefile->IsOn("CTEST_START_WITH_EMPTY_BINARY_DIRECTORY"); + this->EmptyBinDirOnce + = this->Makefile->IsOn("CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE"); + + minInterval + = this->Makefile->GetDefinition("CTEST_CONTINUOUS_MINIMUM_INTERVAL"); + contDuration + = this->Makefile->GetDefinition("CTEST_CONTINUOUS_DURATION"); + + char updateVar[40]; + int i; + for (i = 1; i < 10; ++i) + { + sprintf(updateVar,"CTEST_EXTRA_UPDATES_%i",i); + const char *updateVal = this->Makefile->GetDefinition(updateVar); + if ( updateVal ) + { + if ( this->UpdateCmd.empty() ) + { + cmSystemTools::Error(updateVar, + " specified without specifying CTEST_CVS_COMMAND."); + return 12; + } + this->ExtraUpdates.push_back(updateVal); + } + } + + // in order to backup and restore we also must have the cvs root + if (this->Backup && this->CVSCheckOut.empty()) + { + cmSystemTools::Error( + "Backup was requested without specifying CTEST_CVS_CHECKOUT."); + return 3; + } + + // make sure the required info is here + if (this->SourceDir.empty() || + this->BinaryDir.empty() || + this->CTestCmd.empty()) + { + std::string msg = "CTEST_SOURCE_DIRECTORY = "; + msg += (!this->SourceDir.empty()) ? this->SourceDir.c_str() : "(Null)"; + msg += "\nCTEST_BINARY_DIRECTORY = "; + msg += (!this->BinaryDir.empty()) ? this->BinaryDir.c_str() : "(Null)"; + msg += "\nCTEST_COMMAND = "; + msg += (!this->CTestCmd.empty()) ? this->CTestCmd.c_str() : "(Null)"; + cmSystemTools::Error( + "Some required settings in the configuration file were missing:\n", + msg.c_str()); + return 4; + } + + // if the dashboard root isn't specified then we can compute it from the + // this->SourceDir + if (this->CTestRoot.empty() ) + { + this->CTestRoot = cmSystemTools::GetFilenamePath(this->SourceDir).c_str(); + } + + // the script may override the minimum continuous interval + if (minInterval) + { + this->MinimumInterval = 60 * atof(minInterval); + } + if (contDuration) + { + this->ContinuousDuration = 60.0 * atof(contDuration); + } + + + this->UpdateElapsedTime(); + + return 0; +} + +//---------------------------------------------------------------------- +void cmCTestScriptHandler::SleepInSeconds(unsigned int secondsToWait) +{ +#if defined(_WIN32) + Sleep(1000*secondsToWait); +#else + sleep(secondsToWait); +#endif +} + +//---------------------------------------------------------------------- +// run a specific script +int cmCTestScriptHandler::RunConfigurationScript +(const std::string& total_script_arg, bool pscope) +{ + int result; + + this->ScriptStartTime = + cmSystemTools::GetTime(); + + // read in the script + if (pscope) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Reading Script: " << total_script_arg << std::endl); + result = this->ReadInScript(total_script_arg); + } + else + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Executing Script: " << total_script_arg << std::endl); + result = this->ExecuteScript(total_script_arg); + } + if (result) + { + return result; + } + + // only run the curent script if we should + if (this->Makefile && this->Makefile->IsOn("CTEST_RUN_CURRENT_SCRIPT")) + { + return this->RunCurrentScript(); + } + return result; +} + +//---------------------------------------------------------------------- +int cmCTestScriptHandler::RunCurrentScript() +{ + int result; + + // do not run twice + this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", false); + + // no popup widows + cmSystemTools::SetRunCommandHideConsole(true); + + // extract the vars from the cache and store in ivars + result = this->ExtractVariables(); + if (result) + { + return result; + } + + // set any environment variables + if (!this->CTestEnv.empty()) + { + std::vector envArgs; + cmSystemTools::ExpandListArgument(this->CTestEnv.c_str(),envArgs); + // for each variable/argument do a putenv + for (unsigned i = 0; i < envArgs.size(); ++i) + { + cmSystemTools::PutEnv(envArgs[i].c_str()); + } + } + + // now that we have done most of the error checking finally run the + // dashboard, we may be asked to repeatedly run this dashboard, such as + // for a continuous, do we ned to run it more than once? + if ( this->ContinuousDuration >= 0 ) + { + this->UpdateElapsedTime(); + double ending_time = cmSystemTools::GetTime() + this->ContinuousDuration; + if (this->EmptyBinDirOnce) + { + this->EmptyBinDir = true; + } + do + { + double interval = cmSystemTools::GetTime(); + result = this->RunConfigurationDashboard(); + interval = cmSystemTools::GetTime() - interval; + if (interval < this->MinimumInterval) + { + this->SleepInSeconds( + static_cast(this->MinimumInterval - interval)); + } + if (this->EmptyBinDirOnce) + { + this->EmptyBinDir = false; + } + } + while (cmSystemTools::GetTime() < ending_time); + } + // otherwise just run it once + else + { + result = this->RunConfigurationDashboard(); + } + + return result; +} + +//---------------------------------------------------------------------- +int cmCTestScriptHandler::CheckOutSourceDir() +{ + std::string command; + std::string output; + int retVal; + bool res; + + if (!cmSystemTools::FileExists(this->SourceDir.c_str()) && + !this->CVSCheckOut.empty()) + { + // we must now checkout the src dir + output = ""; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Run cvs: " << this->CVSCheckOut << std::endl); + res = cmSystemTools::RunSingleCommand(this->CVSCheckOut.c_str(), &output, + &retVal, this->CTestRoot.c_str(), this->HandlerVerbose, + 0 /*this->TimeOut*/); + if (!res || retVal != 0) + { + cmSystemTools::Error("Unable to perform cvs checkout:\n", + output.c_str()); + return 6; + } + } + return 0; +} + +//---------------------------------------------------------------------- +int cmCTestScriptHandler::BackupDirectories() +{ + int retVal; + + // compute the backup names + this->BackupSourceDir = this->SourceDir; + this->BackupSourceDir += "_CMakeBackup"; + this->BackupBinaryDir = this->BinaryDir; + this->BackupBinaryDir += "_CMakeBackup"; + + // backup the binary and src directories if requested + if (this->Backup) + { + // if for some reason those directories exist then first delete them + if (cmSystemTools::FileExists(this->BackupSourceDir.c_str())) + { + cmSystemTools::RemoveADirectory(this->BackupSourceDir.c_str()); + } + if (cmSystemTools::FileExists(this->BackupBinaryDir.c_str())) + { + cmSystemTools::RemoveADirectory(this->BackupBinaryDir.c_str()); + } + + // first rename the src and binary directories + rename(this->SourceDir.c_str(), this->BackupSourceDir.c_str()); + rename(this->BinaryDir.c_str(), this->BackupBinaryDir.c_str()); + + // we must now checkout the src dir + retVal = this->CheckOutSourceDir(); + if (retVal) + { + this->RestoreBackupDirectories(); + return retVal; + } + } + + return 0; +} + + +//---------------------------------------------------------------------- +int cmCTestScriptHandler::PerformExtraUpdates() +{ + std::string command; + std::string output; + int retVal; + bool res; + + // do an initial cvs update as required + command = this->UpdateCmd; + std::vector::iterator it; + for (it = this->ExtraUpdates.begin(); + it != this->ExtraUpdates.end(); + ++ it ) + { + std::vector cvsArgs; + cmSystemTools::ExpandListArgument(it->c_str(),cvsArgs); + if (cvsArgs.size() == 2) + { + std::string fullCommand = command; + fullCommand += " update "; + fullCommand += cvsArgs[1]; + output = ""; + retVal = 0; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run Update: " + << fullCommand.c_str() << std::endl); + res = cmSystemTools::RunSingleCommand(fullCommand.c_str(), &output, + &retVal, cvsArgs[0].c_str(), + this->HandlerVerbose, 0 /*this->TimeOut*/); + if (!res || retVal != 0) + { + cmSystemTools::Error("Unable to perform extra updates:\n", + it->c_str(), "\nWith output:\n", + output.c_str()); + return 0; + } + } + } + return 0; +} + + +//---------------------------------------------------------------------- +// run a single dashboard entry +int cmCTestScriptHandler::RunConfigurationDashboard() +{ + // local variables + std::string command; + std::string output; + int retVal; + bool res; + + // make sure the src directory is there, if it isn't then we might be able + // to check it out from cvs + retVal = this->CheckOutSourceDir(); + if (retVal) + { + return retVal; + } + + // backup the dirs if requested + retVal = this->BackupDirectories(); + if (retVal) + { + return retVal; + } + + // clear the binary directory? + if (this->EmptyBinDir) + { + if ( !cmCTestScriptHandler::EmptyBinaryDirectory( + this->BinaryDir.c_str()) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem removing the binary directory" << std::endl); + } + } + + // make sure the binary directory exists if it isn't the srcdir + if (!cmSystemTools::FileExists(this->BinaryDir.c_str()) && + this->SourceDir != this->BinaryDir) + { + if (!cmSystemTools::MakeDirectory(this->BinaryDir.c_str())) + { + cmSystemTools::Error("Unable to create the binary directory:\n", + this->BinaryDir.c_str()); + this->RestoreBackupDirectories(); + return 7; + } + } + + // if the binary directory and the source directory are the same, + // and we are starting with an empty binary directory, then that means + // we must check out the source tree + if (this->EmptyBinDir && this->SourceDir == this->BinaryDir) + { + // make sure we have the required info + if (this->CVSCheckOut.empty()) + { + cmSystemTools::Error("You have specified the source and binary " + "directories to be the same (an in source build). You have also " + "specified that the binary directory is to be erased. This means " + "that the source will have to be checked out from CVS. But you have " + "not specified CTEST_CVS_CHECKOUT"); + return 8; + } + + // we must now checkout the src dir + retVal = this->CheckOutSourceDir(); + if (retVal) + { + this->RestoreBackupDirectories(); + return retVal; + } + } + + // backup the dirs if requested + retVal = this->PerformExtraUpdates(); + if (retVal) + { + return retVal; + } + + // put the initial cache into the bin dir + if (!this->InitCache.empty()) + { + std::string cacheFile = this->BinaryDir; + cacheFile += "/CMakeCache.txt"; + cmGeneratedFileStream fout(cacheFile.c_str()); + if(!fout) + { + this->RestoreBackupDirectories(); + return 9; + } + + fout.write(this->InitCache.c_str(), this->InitCache.size()); + + // Make sure the operating system has finished writing the file + // before closing it. This will ensure the file is finished before + // the check below. + fout.flush(); + fout.close(); + } + + // do an initial cmake to setup the DartConfig file + int cmakeFailed = 0; + std::string cmakeFailedOuput; + if (!this->CMakeCmd.empty()) + { + command = this->CMakeCmd; + command += " \""; + command += this->SourceDir; + output = ""; + command += "\""; + retVal = 0; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run cmake command: " + << command.c_str() << std::endl); + res = cmSystemTools::RunSingleCommand(command.c_str(), &output, + &retVal, this->BinaryDir.c_str(), + this->HandlerVerbose, 0 /*this->TimeOut*/); + + if ( !this->CMOutFile.empty() ) + { + std::string cmakeOutputFile = this->CMOutFile; + if ( !cmSystemTools::FileIsFullPath(cmakeOutputFile.c_str()) ) + { + cmakeOutputFile = this->BinaryDir + "/" + cmakeOutputFile; + } + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Write CMake output to file: " << cmakeOutputFile.c_str() + << std::endl); + cmGeneratedFileStream fout(cmakeOutputFile.c_str()); + if ( fout ) + { + fout << output.c_str(); + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot open CMake output file: " + << cmakeOutputFile.c_str() << " for writing" << std::endl); + } + } + if (!res || retVal != 0) + { + // even if this fails continue to the next step + cmakeFailed = 1; + cmakeFailedOuput = output; + } + } + + // run ctest, it may be more than one command in here + std::vector ctestCommands; + cmSystemTools::ExpandListArgument(this->CTestCmd,ctestCommands); + // for each variable/argument do a putenv + for (unsigned i = 0; i < ctestCommands.size(); ++i) + { + command = ctestCommands[i]; + output = ""; + retVal = 0; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run ctest command: " + << command.c_str() << std::endl); + res = cmSystemTools::RunSingleCommand(command.c_str(), &output, + &retVal, this->BinaryDir.c_str(), this->HandlerVerbose, + 0 /*this->TimeOut*/); + + // did something critical fail in ctest + if (!res || cmakeFailed || + retVal & cmCTest::BUILD_ERRORS) + { + this->RestoreBackupDirectories(); + if (cmakeFailed) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Unable to run cmake:" << std::endl + << cmakeFailedOuput.c_str() << std::endl); + return 10; + } + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Unable to run ctest:" << std::endl + << output.c_str() << std::endl); + if (!res) + { + return 11; + } + return retVal * 100; + } + } + + // if all was succesful, delete the backup dirs to free up disk space + if (this->Backup) + { + cmSystemTools::RemoveADirectory(this->BackupSourceDir.c_str()); + cmSystemTools::RemoveADirectory(this->BackupBinaryDir.c_str()); + } + + return 0; +} + + +//------------------------------------------------------------------------- +void cmCTestScriptHandler::RestoreBackupDirectories() +{ + // if we backed up the dirs and the build failed, then restore + // the backed up dirs + if (this->Backup) + { + // if for some reason those directories exist then first delete them + if (cmSystemTools::FileExists(this->SourceDir.c_str())) + { + cmSystemTools::RemoveADirectory(this->SourceDir.c_str()); + } + if (cmSystemTools::FileExists(this->BinaryDir.c_str())) + { + cmSystemTools::RemoveADirectory(this->BinaryDir.c_str()); + } + // rename the src and binary directories + rename(this->BackupSourceDir.c_str(), this->SourceDir.c_str()); + rename(this->BackupBinaryDir.c_str(), this->BinaryDir.c_str()); + } +} + +bool cmCTestScriptHandler::RunScript(cmCTest* ctest, const char *sname, + bool InProcess) +{ + cmCTestScriptHandler* sh = new cmCTestScriptHandler(); + sh->SetCTestInstance(ctest); + sh->AddConfigurationScript(sname,InProcess); + sh->ProcessHandler(); + delete sh; + return true; +} + +bool cmCTestScriptHandler::EmptyBinaryDirectory(const char *sname) +{ + // try to avoid deleting root + if (!sname || strlen(sname) < 2) + { + return false; + } + + // try to avoid deleting directories that we shouldn't + std::string check = sname; + check += "/CMakeCache.txt"; + if(cmSystemTools::FileExists(check.c_str()) && + !cmSystemTools::RemoveADirectory(sname)) + { + return false; + } + return true; +} + +//------------------------------------------------------------------------- +double cmCTestScriptHandler::GetRemainingTimeAllowed() +{ + if (!this->Makefile) + { + return 1.0e7; + } + + const char *timelimitS + = this->Makefile->GetDefinition("CTEST_TIME_LIMIT"); + + if (!timelimitS) + { + return 1.0e7; + } + + double timelimit = atof(timelimitS); + + return timelimit - cmSystemTools::GetTime() + this->ScriptStartTime; +} diff --git a/Source/CTest/cmCTestScriptHandler.h b/Source/CTest/cmCTestScriptHandler.h new file mode 100755 index 000000000..60574b634 --- /dev/null +++ b/Source/CTest/cmCTestScriptHandler.h @@ -0,0 +1,171 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestScriptHandler.h,v $ + Language: C++ + Date: $Date: 2007-06-08 20:06:33 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestScriptHandler_h +#define cmCTestScriptHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +class cmMakefile; +class cmLocalGenerator; +class cmGlobalGenerator; +class cmake; +class cmCTestCommand; + +/** \class cmCTestScriptHandler + * \brief A class that handles ctest -S invocations + * + * CTest script is controlled using several variables that script has to + * specify and some optional ones. Required ones are: + * CTEST_SOURCE_DIRECTORY - Source directory of the project + * CTEST_BINARY_DIRECTORY - Binary directory of the project + * CTEST_COMMAND - Testing commands + * + * Optional variables are: + * CTEST_BACKUP_AND_RESTORE + * CTEST_CMAKE_COMMAND + * CTEST_CMAKE_OUTPUT_FILE_NAME + * CTEST_CONTINUOUS_DURATION + * CTEST_CONTINUOUS_MINIMUM_INTERVAL + * CTEST_CVS_CHECKOUT + * CTEST_CVS_COMMAND + * CTEST_UPDATE_COMMAND + * CTEST_DASHBOARD_ROOT + * CTEST_ENVIRONMENT + * CTEST_INITIAL_CACHE + * CTEST_START_WITH_EMPTY_BINARY_DIRECTORY + * CTEST_START_WITH_EMPTY_BINARY_DIRECTORY_ONCE + * + * In addition the following variables can be used. The number can be 1-10. + * CTEST_EXTRA_UPDATES_1 + * CTEST_EXTRA_UPDATES_2 + * ... + * CTEST_EXTRA_UPDATES_10 + * + * CTest script can use the following arguments CTest provides: + * CTEST_SCRIPT_ARG + * CTEST_SCRIPT_DIRECTORY + * CTEST_SCRIPT_NAME + * + */ +class cmCTestScriptHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestScriptHandler, cmCTestGenericHandler); + + /** + * Add a script to run, and if is should run in the current process + */ + void AddConfigurationScript(const char *, bool pscope); + + /** + * Run a dashboard using a specified confiuration script + */ + int ProcessHandler(); + + /* + * Run a script + */ + static bool RunScript(cmCTest* ctest, const char *script, bool InProcess); + int RunCurrentScript(); + + /* + * Empty Binary Directory + */ + static bool EmptyBinaryDirectory(const char *dir); + + /* + * Some elapsed time handling functions + */ + static void SleepInSeconds(unsigned int secondsToWait); + void UpdateElapsedTime(); + + /** + * Return the time remaianing that the script is allowed to run in + * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has + * not been set it returns 1e7 seconds + */ + double GetRemainingTimeAllowed(); + + cmCTestScriptHandler(); + ~cmCTestScriptHandler(); + + void Initialize(); + + void CreateCMake(); + void GetCommandDocumentation(std::vector& v) const; + +private: + // reads in a script + int ReadInScript(const std::string& total_script_arg); + int ExecuteScript(const std::string& total_script_arg); + + // extract vars from the script to set ivars + int ExtractVariables(); + + // perform a CVS checkout of the source dir + int CheckOutSourceDir(); + + // perform any extra cvs updates that were requested + int PerformExtraUpdates(); + + // backup and restore dirs + int BackupDirectories(); + void RestoreBackupDirectories(); + + int RunConfigurationScript(const std::string& script, bool pscope); + int RunConfigurationDashboard(); + + // Add ctest command + void AddCTestCommand(cmCTestCommand* command); + + std::vector ConfigurationScripts; + std::vector ScriptProcessScope; + + bool Backup; + bool EmptyBinDir; + bool EmptyBinDirOnce; + + cmStdString SourceDir; + cmStdString BinaryDir; + cmStdString BackupSourceDir; + cmStdString BackupBinaryDir; + cmStdString CTestRoot; + cmStdString CVSCheckOut; + cmStdString CTestCmd; + cmStdString UpdateCmd; + cmStdString CTestEnv; + cmStdString InitCache; + cmStdString CMakeCmd; + cmStdString CMOutFile; + std::vector ExtraUpdates; + + double MinimumInterval; + double ContinuousDuration; + + // what time in seconds did this script start running + double ScriptStartTime; + + cmMakefile *Makefile; + cmLocalGenerator *LocalGenerator; + cmGlobalGenerator *GlobalGenerator; + cmake *CMake; +}; + +#endif diff --git a/Source/CTest/cmCTestSleepCommand.cxx b/Source/CTest/cmCTestSleepCommand.cxx new file mode 100755 index 000000000..171456a4b --- /dev/null +++ b/Source/CTest/cmCTestSleepCommand.cxx @@ -0,0 +1,60 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestSleepCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestSleepCommand.h" + +#include "cmCTestScriptHandler.h" +#include // required for atoi + +bool cmCTestSleepCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // sleep for specified seconds + unsigned int time1 = atoi(args[0].c_str()); + if(args.size() == 1 ) + { + cmCTestScriptHandler::SleepInSeconds(time1); + // update the elapsed time since it could have slept for a while + this->CTestScriptHandler->UpdateElapsedTime(); + return true; + } + + // sleep up to a duration + if(args.size() == 3 ) + { + unsigned int duration = atoi(args[1].c_str()); + unsigned int time2 = atoi(args[2].c_str()); + if (time1 + duration > time2) + { + duration = (time1 + duration - time2); + cmCTestScriptHandler::SleepInSeconds(duration); + // update the elapsed time since it could have slept for a while + this->CTestScriptHandler->UpdateElapsedTime(); + } + return true; + } + + this->SetError("called with incorrect number of arguments"); + return false; +} + + diff --git a/Source/CTest/cmCTestSleepCommand.h b/Source/CTest/cmCTestSleepCommand.h new file mode 100755 index 000000000..efa7d0611 --- /dev/null +++ b/Source/CTest/cmCTestSleepCommand.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestSleepCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestSleepCommand_h +#define cmCTestSleepCommand_h + +#include "cmCTestCommand.h" + +/** \class cmCTestSleep + * \brief Run a ctest script + * + * cmLibrarysCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmCTestSleepCommand : public cmCTestCommand +{ +public: + + cmCTestSleepCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestSleepCommand* ni = new cmCTestSleepCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_SLEEP";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "sleeps for some amount of time"; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_SLEEP( seconds )\n" + " CTEST_SLEEP( time1 duration time2 )\n" + "With one argument it will sleep for a given number of seconds. " + "With three arguments it will wait for time2 - time1 - duration " + "seconds."; + } + + cmTypeMacro(cmCTestSleepCommand, cmCTestCommand); + +}; + + +#endif diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx new file mode 100755 index 000000000..165f06053 --- /dev/null +++ b/Source/CTest/cmCTestStartCommand.cxx @@ -0,0 +1,109 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestStartCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestStartCommand.h" + +#include "cmCTest.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + +bool cmCTestStartCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + size_t cnt = 0; + const char* smodel = args[cnt].c_str(); + const char* src_dir = 0; + const char* bld_dir = 0; + + cnt++; + + this->CTest->SetSpecificTrack(0); + if ( cnt < args.size() -1 ) + { + if ( args[cnt] == "TRACK" ) + { + cnt ++; + this->CTest->SetSpecificTrack(args[cnt].c_str()); + cnt ++; + } + } + + if ( cnt < args.size() ) + { + src_dir = args[cnt].c_str(); + cnt ++; + if ( cnt < args.size() ) + { + bld_dir = args[cnt].c_str(); + } + } + if ( !src_dir ) + { + src_dir = this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"); + } + if ( !bld_dir) + { + bld_dir = this->Makefile->GetDefinition("CTEST_BINARY_DIRECTORY"); + } + if ( !src_dir ) + { + this->SetError("source directory not specified. Specify source directory " + "as an argument or set CTEST_SOURCE_DIRECTORY"); + return false; + } + if ( !bld_dir) + { + this->SetError("binary directory not specified. Specify binary directory " + "as an argument or set CTEST_BINARY_DIRECTORY"); + return false; + } + + cmSystemTools::AddKeepPath(src_dir); + cmSystemTools::AddKeepPath(bld_dir); + + this->CTest->EmptyCTestConfiguration(); + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath(src_dir).c_str()); + this->CTest->SetCTestConfiguration("BuildDirectory", + cmSystemTools::CollapseFullPath(bld_dir).c_str()); + + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Run dashboard with model " + << smodel << std::endl + << " Source directory: " << src_dir << std::endl + << " Build directory: " << bld_dir << std::endl); + const char* track = this->CTest->GetSpecificTrack(); + if ( track ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Track: " << track << std::endl); + } + + this->Makefile->AddDefinition("CTEST_RUN_CURRENT_SCRIPT", "OFF"); + this->CTest->SetSuppressUpdatingCTestConfiguration(true); + int model = this->CTest->GetTestModelFromString(smodel); + this->CTest->SetTestModel(model); + this->CTest->SetProduceXML(true); + + return this->CTest->InitializeFromCommand(this, true); +} + + diff --git a/Source/CTest/cmCTestStartCommand.h b/Source/CTest/cmCTestStartCommand.h new file mode 100755 index 000000000..48d79c7e6 --- /dev/null +++ b/Source/CTest/cmCTestStartCommand.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestStartCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:01 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestStartCommand_h +#define cmCTestStartCommand_h + +#include "cmCTestCommand.h" + +/** \class cmCTestStart + * \brief Run a ctest script + * + * cmCTestStartCommand defineds the command to start the nightly testing. + */ +class cmCTestStartCommand : public cmCTestCommand +{ +public: + + cmCTestStartCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestStartCommand* ni = new cmCTestStartCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_START";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Starts the testing for a given model"; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_START(Model [TRACK ] [source [binary]])\n" + "Starts the testing for a given model. The command should be called " + "after the binary directory is initialized. If the 'source' and " + "'binary' directory are not specified, it reads the " + "CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is " + "specified, the submissions will go to the specified track."; + } + + cmTypeMacro(cmCTestStartCommand, cmCTestCommand); + +}; + + +#endif diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx new file mode 100644 index 000000000..08db394ee --- /dev/null +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -0,0 +1,112 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestSubmitCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-03-29 17:33:41 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestSubmitCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() +{ + const char* ctestDropMethod + = this->Makefile->GetDefinition("CTEST_DROP_METHOD"); + const char* ctestDropSite + = this->Makefile->GetDefinition("CTEST_DROP_SITE"); + const char* ctestDropLocation + = this->Makefile->GetDefinition("CTEST_DROP_LOCATION"); + const char* ctestTriggerSite + = this->Makefile->GetDefinition("CTEST_TRIGGER_SITE"); + + if ( !ctestDropMethod ) + { + ctestDropMethod = "http"; + } + if ( !ctestDropSite ) + { + ctestDropSite = "public.kitware.com"; + } + if ( !ctestDropLocation ) + { + ctestDropLocation = "/cgi-bin/HTTPUploadDartFile.cgi"; + } + if ( !ctestTriggerSite ) + { + ctestTriggerSite + = "http://public.kitware.com/cgi-bin/Submit-Random-TestingResults.cgi"; + cmCTestLog(this->CTest, HANDLER_OUTPUT, "* Use default trigger site: " + << ctestTriggerSite << std::endl;); + } + + this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod); + this->CTest->SetCTestConfiguration("DropSite", ctestDropSite); + this->CTest->SetCTestConfiguration("DropLocation", ctestDropLocation); + this->CTest->SetCTestConfiguration("TriggerSite", ctestTriggerSite); + + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "DropSiteUser", "CTEST_DROP_SITE_USER"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "DropSitePassword", "CTEST_DROP_SITE_PASSWORD"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "ScpCommand", "CTEST_SCP_COMMAND"); + + const char* notesFilesVariable + = this->Makefile->GetDefinition("CTEST_NOTES_FILES"); + if (notesFilesVariable) + { + std::vector notesFiles; + std::vector newNotesFiles; + cmSystemTools::ExpandListArgument(notesFilesVariable,notesFiles); + std::vector::iterator it; + for ( it = notesFiles.begin(); + it != notesFiles.end(); + ++ it ) + { + newNotesFiles.push_back(*it); + } + this->CTest->GenerateNotesFile(newNotesFiles); + } + const char* extraFilesVariable + = this->Makefile->GetDefinition("CTEST_EXTRA_SUBMIT_FILES"); + if (extraFilesVariable) + { + std::vector extraFiles; + std::vector newExtraFiles; + cmSystemTools::ExpandListArgument(extraFilesVariable,extraFiles); + std::vector::iterator it; + for ( it = extraFiles.begin(); + it != extraFiles.end(); + ++ it ) + { + newExtraFiles.push_back(*it); + } + if ( !this->CTest->SubmitExtraFiles(newExtraFiles)) + { + this->SetError("problem submitting extra files."); + return 0; + } + } + + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("submit"); + if ( !handler ) + { + this->SetError("internal CTest error. Cannot instantiate submit handler"); + return 0; + } + return handler; +} + + diff --git a/Source/CTest/cmCTestSubmitCommand.h b/Source/CTest/cmCTestSubmitCommand.h new file mode 100644 index 000000000..2c5370b04 --- /dev/null +++ b/Source/CTest/cmCTestSubmitCommand.h @@ -0,0 +1,75 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestSubmitCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestSubmitCommand_h +#define cmCTestSubmitCommand_h + +#include "cmCTestHandlerCommand.h" + +/** \class cmCTestSubmit + * \brief Run a ctest script + * + * cmCTestSubmitCommand defineds the command to submit the test results for + * the project. + */ +class cmCTestSubmitCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestSubmitCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestSubmitCommand* ni = new cmCTestSubmitCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_SUBMIT";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Submits the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_SUBMIT([RETURN_VALUE res])\n" + "Submits the test results for the project."; + } + + cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand); + +protected: + cmCTestGenericHandler* InitializeHandler(); +}; + + +#endif diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx new file mode 100644 index 000000000..de346e5fa --- /dev/null +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -0,0 +1,1105 @@ +/*========================================================================= + +Program: CMake - Cross-Platform Makefile Generator +Module: $RCSfile: cmCTestSubmitHandler.cxx,v $ +Language: C++ +Date: $Date: 2008-03-04 18:34:21 $ +Version: $Revision: 1.31 $ + +Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestSubmitHandler.h" + +#include "cmSystemTools.h" +#include "cmVersion.h" +#include "cmGeneratedFileStream.h" +#include "cmCTest.h" + +#include +#include + +// For XML-RPC submission +#include "cm_xmlrpc.h" + +// For curl submission +#include "cm_curl.h" + +#include + +typedef std::vector cmCTestSubmitHandlerVectorOfChar; + +static size_t +cmCTestSubmitHandlerWriteMemoryCallback(void *ptr, size_t size, size_t nmemb, + void *data) +{ + register int realsize = (int)(size * nmemb); + + cmCTestSubmitHandlerVectorOfChar *vec + = static_cast(data); + const char* chPtr = static_cast(ptr); + vec->insert(vec->end(), chPtr, chPtr + realsize); + + return realsize; +} + +static size_t +cmCTestSubmitHandlerCurlDebugCallback(CURL *, curl_infotype, char *chPtr, + size_t size, void *data) +{ + cmCTestSubmitHandlerVectorOfChar *vec + = static_cast(data); + vec->insert(vec->end(), chPtr, chPtr + size); + + return size; +} + +//---------------------------------------------------------------------------- +cmCTestSubmitHandler::cmCTestSubmitHandler() : HTTPProxy(), FTPProxy() +{ + this->HTTPProxy = ""; + this->HTTPProxyType = 0; + this->HTTPProxyAuth = ""; + + this->FTPProxy = ""; + this->FTPProxyType = 0; + this->CDash = false; +} + +//---------------------------------------------------------------------------- +void cmCTestSubmitHandler::Initialize() +{ + this->CDash = false; + this->Superclass::Initialize(); + this->HTTPProxy = ""; + this->HTTPProxyType = 0; + this->HTTPProxyAuth = ""; + this->FTPProxy = ""; + this->FTPProxyType = 0; + this->LogFile = 0; +} + +//---------------------------------------------------------------------------- +bool cmCTestSubmitHandler::SubmitUsingFTP(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url) +{ + CURL *curl; + CURLcode res; + FILE* ftpfile; + char error_buffer[1024]; + + /* In windows, this will init the winsock stuff */ + ::curl_global_init(CURL_GLOBAL_ALL); + + cmCTest::SetOfStrings::const_iterator file; + for ( file = files.begin(); file != files.end(); ++file ) + { + /* get a curl handle */ + curl = curl_easy_init(); + if(curl) + { + // Using proxy + if ( this->FTPProxyType > 0 ) + { + curl_easy_setopt(curl, CURLOPT_PROXY, this->FTPProxy.c_str()); + switch (this->FTPProxyType) + { + case 2: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); + break; + case 3: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + } + } + + // enable uploading + ::curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; + + cmStdString local_file = *file; + if ( !cmSystemTools::FileExists(local_file.c_str()) ) + { + local_file = localprefix + "/" + *file; + } + cmStdString upload_as + = url + "/" + remoteprefix + cmSystemTools::GetFilenameName(*file); + + struct stat st; + if ( ::stat(local_file.c_str(), &st) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: " + << local_file.c_str() << std::endl); + ::curl_easy_cleanup(curl); + ::curl_global_cleanup(); + return false; + } + + ftpfile = ::fopen(local_file.c_str(), "rb"); + *this->LogFile << "\tUpload file: " << local_file.c_str() << " to " + << upload_as.c_str() << std::endl; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: " + << local_file.c_str() << " to " + << upload_as.c_str() << std::endl); + + ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + + // specify target + ::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str()); + + // now specify which file to upload + ::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile); + + // and give the size of the upload (optional) + ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, + static_cast(st.st_size)); + + // and give curl the buffer for errors + ::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer); + + // specify handler for output + ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, + cmCTestSubmitHandlerWriteMemoryCallback); + ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, + cmCTestSubmitHandlerCurlDebugCallback); + + /* we pass our 'chunk' struct to the callback function */ + cmCTestSubmitHandlerVectorOfChar chunk; + cmCTestSubmitHandlerVectorOfChar chunkDebug; + ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&chunk); + ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); + + // Now run off and do what you've been told! + res = ::curl_easy_perform(curl); + + if ( chunk.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + if ( chunkDebug.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL debug output: [" + << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]" + << std::endl); + } + + fclose(ftpfile); + if ( res ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Error when uploading file: " + << local_file.c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: " + << error_buffer << std::endl); + *this->LogFile << " Error when uploading file: " + << local_file.c_str() + << std::endl + << " Error message was: " + << error_buffer << std::endl + << " Curl output was: "; + // avoid dereference of empty vector + if(chunk.size()) + { + *this->LogFile << cmCTestLogWrite(&*chunk.begin(), chunk.size()); + cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + *this->LogFile << std::endl; + ::curl_easy_cleanup(curl); + ::curl_global_cleanup(); + return false; + } + // always cleanup + ::curl_easy_cleanup(curl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Uploaded: " + local_file + << std::endl); + } + } + ::curl_global_cleanup(); + return true; +} + +//---------------------------------------------------------------------------- +// Uploading files is simpler +bool cmCTestSubmitHandler::SubmitUsingHTTP(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url) +{ + CURL *curl; + CURLcode res; + FILE* ftpfile; + char error_buffer[1024]; + + /* In windows, this will init the winsock stuff */ + ::curl_global_init(CURL_GLOBAL_ALL); + + cmStdString::size_type kk; + cmCTest::SetOfStrings::const_iterator file; + for ( file = files.begin(); file != files.end(); ++file ) + { + /* get a curl handle */ + curl = curl_easy_init(); + if(curl) + { + + // Using proxy + if ( this->HTTPProxyType > 0 ) + { + curl_easy_setopt(curl, CURLOPT_PROXY, this->HTTPProxy.c_str()); + switch (this->HTTPProxyType) + { + case 2: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); + break; + case 3: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + if (this->HTTPProxyAuth.size() > 0) + { + curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, + this->HTTPProxyAuth.c_str()); + } + } + } + + /* enable uploading */ + curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ; + + /* HTTP PUT please */ + ::curl_easy_setopt(curl, CURLOPT_PUT, 1); + ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + + cmStdString local_file = *file; + if ( !cmSystemTools::FileExists(local_file.c_str()) ) + { + local_file = localprefix + "/" + *file; + } + cmStdString remote_file + = remoteprefix + cmSystemTools::GetFilenameName(*file); + + *this->LogFile << "\tUpload file: " << local_file.c_str() << " to " + << remote_file.c_str() << std::endl; + + cmStdString ofile = ""; + for ( kk = 0; kk < remote_file.size(); kk ++ ) + { + char c = remote_file[kk]; + char hexCh[4] = { 0, 0, 0, 0 }; + hexCh[0] = c; + switch ( c ) + { + case '+': + case '?': + case '/': + case '\\': + case '&': + case ' ': + case '=': + case '%': + sprintf(hexCh, "%%%02X", (int)c); + ofile.append(hexCh); + break; + default: + ofile.append(hexCh); + } + } + cmStdString upload_as + = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&") + + "FileName=" + ofile; + + struct stat st; + if ( ::stat(local_file.c_str(), &st) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: " + << local_file.c_str() << std::endl); + ::curl_easy_cleanup(curl); + ::curl_global_cleanup(); + return false; + } + + ftpfile = ::fopen(local_file.c_str(), "rb"); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Upload file: " + << local_file.c_str() << " to " + << upload_as.c_str() << " Size: " << st.st_size << std::endl); + + + // specify target + ::curl_easy_setopt(curl,CURLOPT_URL, upload_as.c_str()); + + // now specify which file to upload + ::curl_easy_setopt(curl, CURLOPT_INFILE, ftpfile); + + // and give the size of the upload (optional) + ::curl_easy_setopt(curl, CURLOPT_INFILESIZE, + static_cast(st.st_size)); + + // and give curl the buffer for errors + ::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer); + + // specify handler for output + ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, + cmCTestSubmitHandlerWriteMemoryCallback); + ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, + cmCTestSubmitHandlerCurlDebugCallback); + + /* we pass our 'chunk' struct to the callback function */ + cmCTestSubmitHandlerVectorOfChar chunk; + cmCTestSubmitHandlerVectorOfChar chunkDebug; + ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&chunk); + ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); + + // Now run off and do what you've been told! + res = ::curl_easy_perform(curl); + + if ( chunk.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + if ( chunkDebug.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL debug output: [" + << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) << "]" + << std::endl); + } + + fclose(ftpfile); + if ( res ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Error when uploading file: " + << local_file.c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: " + << error_buffer << std::endl); + *this->LogFile << " Error when uploading file: " + << local_file.c_str() + << std::endl + << " Error message was: " << error_buffer + << std::endl; + // avoid deref of begin for zero size array + if(chunk.size()) + { + *this->LogFile << " Curl output was: " + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) + << std::endl; + cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + ::curl_easy_cleanup(curl); + ::curl_global_cleanup(); + return false; + } + // always cleanup + ::curl_easy_cleanup(curl); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Uploaded: " + local_file + << std::endl); + } + } + ::curl_global_cleanup(); + return true; +} + +//---------------------------------------------------------------------------- +bool cmCTestSubmitHandler::TriggerUsingHTTP( + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url) +{ + CURL *curl; + char error_buffer[1024]; + + /* In windows, this will init the winsock stuff */ + ::curl_global_init(CURL_GLOBAL_ALL); + + cmCTest::SetOfStrings::const_iterator file; + for ( file = files.begin(); file != files.end(); ++file ) + { + /* get a curl handle */ + curl = curl_easy_init(); + if(curl) + { + // Using proxy + if ( this->HTTPProxyType > 0 ) + { + curl_easy_setopt(curl, CURLOPT_PROXY, this->HTTPProxy.c_str()); + switch (this->HTTPProxyType) + { + case 2: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); + break; + case 3: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + if (this->HTTPProxyAuth.size() > 0) + { + curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, + this->HTTPProxyAuth.c_str()); + } + } + } + + ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + + // and give curl the buffer for errors + ::curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, &error_buffer); + + // specify handler for output + ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, + cmCTestSubmitHandlerWriteMemoryCallback); + ::curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, + cmCTestSubmitHandlerCurlDebugCallback); + + /* we pass our 'chunk' struct to the callback function */ + cmCTestSubmitHandlerVectorOfChar chunk; + cmCTestSubmitHandlerVectorOfChar chunkDebug; + ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&chunk); + ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); + + cmStdString rfile + = remoteprefix + cmSystemTools::GetFilenameName(*file); + cmStdString ofile = ""; + cmStdString::iterator kk; + for ( kk = rfile.begin(); kk < rfile.end(); ++ kk) + { + char c = *kk; + char hexCh[4] = { 0, 0, 0, 0 }; + hexCh[0] = c; + switch ( c ) + { + case '+': + case '?': + case '/': + case '\\': + case '&': + case ' ': + case '=': + case '%': + sprintf(hexCh, "%%%02X", (int)c); + ofile.append(hexCh); + break; + default: + ofile.append(hexCh); + } + } + cmStdString turl + = url + ((url.find("?",0) == cmStdString::npos) ? "?" : "&") + + "xmlfile=" + ofile; + *this->LogFile << "Trigger url: " << turl.c_str() << std::endl; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " Trigger url: " + << turl.c_str() << std::endl); + curl_easy_setopt(curl, CURLOPT_URL, turl.c_str()); + if ( curl_easy_perform(curl) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Error when triggering: " + << turl.c_str() << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, " Error message was: " + << error_buffer << std::endl); + *this->LogFile << "\tTrigerring failed with error: " << error_buffer + << std::endl + << " Error message was: " << error_buffer + << std::endl; + if(chunk.size()) + { + *this->LogFile + << " Curl output was: " + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << std::endl; + cmCTestLog(this->CTest, ERROR_MESSAGE, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + ::curl_easy_cleanup(curl); + ::curl_global_cleanup(); + return false; + } + + if ( chunk.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL output: [" + << cmCTestLogWrite(&*chunk.begin(), chunk.size()) << "]" + << std::endl); + } + if ( chunkDebug.size() > 0 ) + { + cmCTestLog(this->CTest, DEBUG, "CURL debug output: [" + << cmCTestLogWrite(&*chunkDebug.begin(), chunkDebug.size()) + << "]" << std::endl); + } + + // always cleanup + ::curl_easy_cleanup(curl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl); + } + } + ::curl_global_cleanup(); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Dart server triggered..." + << std::endl); + return true; +} + +//---------------------------------------------------------------------------- +bool cmCTestSubmitHandler::SubmitUsingSCP( + const cmStdString& scp_command, + const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url) +{ + if ( !scp_command.size() || !localprefix.size() || + !files.size() || !remoteprefix.size() || !url.size() ) + { + return 0; + } + std::vector argv; + argv.push_back(scp_command.c_str()); // Scp command + argv.push_back(scp_command.c_str()); // Dummy string for file + argv.push_back(scp_command.c_str()); // Dummy string for remote url + argv.push_back(0); + + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + //cmsysProcess_SetTimeout(cp, timeout); + + int problems = 0; + + cmCTest::SetOfStrings::const_iterator file; + for ( file = files.begin(); file != files.end(); ++file ) + { + int retVal; + + std::string lfname = localprefix; + cmSystemTools::ConvertToUnixSlashes(lfname); + lfname += "/" + *file; + lfname = cmSystemTools::ConvertToOutputPath(lfname.c_str()); + argv[1] = lfname.c_str(); + std::string rfname = url + "/" + remoteprefix + *file; + argv[2] = rfname.c_str(); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Execute \"" << argv[0] + << "\" \"" << argv[1] << "\" \"" + << argv[2] << "\"" << std::endl); + *this->LogFile << "Execute \"" << argv[0] << "\" \"" << argv[1] << "\" \"" + << argv[2] << "\"" << std::endl; + + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmsysProcess_Execute(cp); + char* data; + int length; + + while(cmsysProcess_WaitForData(cp, &data, &length, 0)) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + cmCTestLogWrite(data, length)); + } + + cmsysProcess_WaitForExit(cp, 0); + + int result = cmsysProcess_GetState(cp); + + if(result == cmsysProcess_State_Exited) + { + retVal = cmsysProcess_GetExitValue(cp); + if ( retVal != 0 ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\tSCP returned: " + << retVal << std::endl); + *this->LogFile << "\tSCP returned: " << retVal << std::endl; + problems ++; + } + } + else if(result == cmsysProcess_State_Exception) + { + retVal = cmsysProcess_GetExitException(cp); + cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was an exception: " + << retVal << std::endl); + *this->LogFile << "\tThere was an exception: " << retVal << std::endl; + problems ++; + } + else if(result == cmsysProcess_State_Expired) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "\tThere was a timeout" + << std::endl); + *this->LogFile << "\tThere was a timeout" << std::endl; + problems ++; + } + else if(result == cmsysProcess_State_Error) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "\tError executing SCP: " + << cmsysProcess_GetErrorString(cp) << std::endl); + *this->LogFile << "\tError executing SCP: " + << cmsysProcess_GetErrorString(cp) << std::endl; + problems ++; + } + } + cmsysProcess_Delete(cp); + if ( problems ) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmCTestSubmitHandler::SubmitUsingXMLRPC(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url) +{ + xmlrpc_env env; + char ctestString[] = "CTest"; + std::string ctestVersionString = cmVersion::GetCMakeVersion(); + char* ctestVersion = const_cast(ctestVersionString.c_str()); + + cmStdString realURL = url + "/" + remoteprefix + "/Command/"; + + /* Start up our XML-RPC client library. */ + xmlrpc_client_init(XMLRPC_CLIENT_NO_FLAGS, ctestString, ctestVersion); + + /* Initialize our error-handling environment. */ + xmlrpc_env_init(&env); + + /* Call the famous server at UserLand. */ + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submitting to: " + << realURL.c_str() << " (" << remoteprefix.c_str() << ")" << std::endl); + cmCTest::SetOfStrings::const_iterator file; + for ( file = files.begin(); file != files.end(); ++file ) + { + xmlrpc_value *result; + + cmStdString local_file = *file; + if ( !cmSystemTools::FileExists(local_file.c_str()) ) + { + local_file = localprefix + "/" + *file; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submit file: " + << local_file.c_str() << std::endl); + struct stat st; + if ( ::stat(local_file.c_str(), &st) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: " + << local_file.c_str() << std::endl); + return false; + } + + // off_t can be bigger than size_t. fread takes size_t. + // make sure the file is not too big. + if(static_cast(static_cast(st.st_size)) != + static_cast(st.st_size)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " File too big: " + << local_file.c_str() << std::endl); + return false; + } + size_t fileSize = static_cast(st.st_size); + FILE* fp = fopen(local_file.c_str(), "rb"); + if ( !fp ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot open file: " + << local_file.c_str() << std::endl); + return false; + } + + unsigned char *fileBuffer = new unsigned char[fileSize]; + if ( fread(fileBuffer, 1, fileSize, fp) != fileSize ) + { + delete [] fileBuffer; + fclose(fp); + cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot read file: " + << local_file.c_str() << std::endl); + return false; + } + fclose(fp); + + char remoteCommand[] = "Submit.put"; + char* pRealURL = const_cast(realURL.c_str()); + result = xmlrpc_client_call(&env, pRealURL, remoteCommand, + "(6)", fileBuffer, (xmlrpc_int32)fileSize ); + + delete [] fileBuffer; + + if ( env.fault_occurred ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, " Submission problem: " + << env.fault_string << " (" << env.fault_code << ")" << std::endl); + xmlrpc_env_clean(&env); + xmlrpc_client_cleanup(); + return false; + } + + /* Dispose of our result value. */ + xmlrpc_DECREF(result); + } + + /* Clean up our error-handling environment. */ + xmlrpc_env_clean(&env); + + /* Shutdown our XML-RPC client library. */ + xmlrpc_client_cleanup(); + return true; +} + +//---------------------------------------------------------------------------- +int cmCTestSubmitHandler::ProcessHandler() +{ + std::string iscdash = this->CTest->GetCTestConfiguration("IsCDash"); + // cdash does not need to trigger so just return true + if(iscdash.size()) + { + this->CDash = true; + } + + const std::string &buildDirectory + = this->CTest->GetCTestConfiguration("BuildDirectory"); + if ( buildDirectory.size() == 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find BuildDirectory key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + + if ( getenv("HTTP_PROXY") ) + { + this->HTTPProxyType = 1; + this->HTTPProxy = getenv("HTTP_PROXY"); + if ( getenv("HTTP_PROXY_PORT") ) + { + this->HTTPProxy += ":"; + this->HTTPProxy += getenv("HTTP_PROXY_PORT"); + } + if ( getenv("HTTP_PROXY_TYPE") ) + { + cmStdString type = getenv("HTTP_PROXY_TYPE"); + // HTTP/SOCKS4/SOCKS5 + if ( type == "HTTP" ) + { + this->HTTPProxyType = 1; + } + else if ( type == "SOCKS4" ) + { + this->HTTPProxyType = 2; + } + else if ( type == "SOCKS5" ) + { + this->HTTPProxyType = 3; + } + } + if ( getenv("HTTP_PROXY_USER") ) + { + this->HTTPProxyAuth = getenv("HTTP_PROXY_USER"); + } + if ( getenv("HTTP_PROXY_PASSWD") ) + { + this->HTTPProxyAuth += ":"; + this->HTTPProxyAuth += getenv("HTTP_PROXY_PASSWD"); + } + } + + if ( getenv("FTP_PROXY") ) + { + this->FTPProxyType = 1; + this->FTPProxy = getenv("FTP_PROXY"); + if ( getenv("FTP_PROXY_PORT") ) + { + this->FTPProxy += ":"; + this->FTPProxy += getenv("FTP_PROXY_PORT"); + } + if ( getenv("FTP_PROXY_TYPE") ) + { + cmStdString type = getenv("FTP_PROXY_TYPE"); + // HTTP/SOCKS4/SOCKS5 + if ( type == "HTTP" ) + { + this->FTPProxyType = 1; + } + else if ( type == "SOCKS4" ) + { + this->FTPProxyType = 2; + } + else if ( type == "SOCKS5" ) + { + this->FTPProxyType = 3; + } + } + } + + if ( this->HTTPProxy.size() > 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use HTTP Proxy: " + << this->HTTPProxy << std::endl); + } + if ( this->FTPProxy.size() > 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use FTP Proxy: " + << this->FTPProxy << std::endl); + } + cmGeneratedFileStream ofs; + this->StartLogFile("Submit", ofs); + + cmCTest::SetOfStrings files; + std::string prefix = this->GetSubmitResultsPrefix(); + // TODO: + // Check if test is enabled + this->CTest->AddIfExists(files, "Update.xml"); + this->CTest->AddIfExists(files, "Configure.xml"); + this->CTest->AddIfExists(files, "Build.xml"); + this->CTest->AddIfExists(files, "Test.xml"); + if ( this->CTest->AddIfExists(files, "Coverage.xml") ) + { + cmCTest::VectorOfStrings gfiles; + std::string gpath + = buildDirectory + "/Testing/" + this->CTest->GetCurrentTag(); + std::string::size_type glen = gpath.size() + 1; + gpath = gpath + "/CoverageLog*"; + cmCTestLog(this->CTest, DEBUG, "Globbing for: " << gpath.c_str() + << std::endl); + if ( cmSystemTools::SimpleGlob(gpath, gfiles, 1) ) + { + size_t cc; + for ( cc = 0; cc < gfiles.size(); cc ++ ) + { + gfiles[cc] = gfiles[cc].substr(glen); + cmCTestLog(this->CTest, DEBUG, "Glob file: " << gfiles[cc].c_str() + << std::endl); + files.insert(gfiles[cc]); + } + } + else + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem globbing" << std::endl); + } + } + this->CTest->AddIfExists(files, "DynamicAnalysis.xml"); + this->CTest->AddIfExists(files, "Purify.xml"); + this->CTest->AddIfExists(files, "Notes.xml"); + + cmCTest::SetOfStrings::iterator it; + for ( it = this->CTest->GetSubmitFiles()->begin(); + it != this->CTest->GetSubmitFiles()->end(); + ++ it ) + { + files.insert(files.end(), *it); + } + + if ( ofs ) + { + ofs << "Upload files:" << std::endl; + int cnt = 0; + for ( it = files.begin(); it != files.end(); ++ it ) + { + ofs << cnt << "\t" << it->c_str() << std::endl; + cnt ++; + } + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Submit files (using " + << this->CTest->GetCTestConfiguration("DropMethod") << ")" + << std::endl); + const char* specificTrack = this->CTest->GetSpecificTrack(); + if ( specificTrack ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Send to track: " + << specificTrack << std::endl); + } + this->SetLogFile(&ofs); + if ( this->CTest->GetCTestConfiguration("DropMethod") == "" || + this->CTest->GetCTestConfiguration("DropMethod") == "ftp" ) + { + ofs << "Using drop method: FTP" << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using FTP submit method" + << std::endl + << " Drop site: ftp://"); + std::string url = "ftp://"; + url += cmCTest::MakeURLSafe( + this->CTest->GetCTestConfiguration("DropSiteUser")) + ":" + + cmCTest::MakeURLSafe(this->CTest->GetCTestConfiguration( + "DropSitePassword")) + "@" + + this->CTest->GetCTestConfiguration("DropSite") + + cmCTest::MakeURLSafe( + this->CTest->GetCTestConfiguration("DropLocation")); + if ( this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + this->CTest->GetCTestConfiguration( + "DropSiteUser").c_str()); + if ( this->CTest->GetCTestConfiguration("DropSitePassword").size() > 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, ":******"); + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, "@"); + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, + this->CTest->GetCTestConfiguration("DropSite") + << this->CTest->GetCTestConfiguration("DropLocation") << std::endl); + if ( !this->SubmitUsingFTP(buildDirectory + "/Testing/" + + this->CTest->GetCurrentTag(), + files, prefix, url) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when submitting via FTP" + << std::endl); + ofs << " Problems when submitting via FTP" << std::endl; + return -1; + } + if(!this->CDash) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method" + << std::endl + << " Trigger site: " + << this->CTest->GetCTestConfiguration("TriggerSite") + << std::endl); + if ( !this-> + TriggerUsingHTTP(files, prefix, + this->CTest->GetCTestConfiguration("TriggerSite"))) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when triggering via HTTP" << std::endl); + ofs << " Problems when triggering via HTTP" << std::endl; + return -1; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" + << std::endl); + ofs << " Submission successful" << std::endl; + return 0; + } + } + else if ( this->CTest->GetCTestConfiguration("DropMethod") == "http" ) + { + ofs << "Using drop method: HTTP" << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP submit method" + << std::endl + << " Drop site: http://"); + std::string url = "http://"; + if ( this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0 ) + { + url += this->CTest->GetCTestConfiguration("DropSiteUser"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, + this->CTest->GetCTestConfiguration("DropSiteUser").c_str()); + if ( this->CTest->GetCTestConfiguration("DropSitePassword").size() > 0 ) + { + url += ":" + this->CTest->GetCTestConfiguration("DropSitePassword"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, ":******"); + } + url += "@"; + cmCTestLog(this->CTest, HANDLER_OUTPUT, "@"); + } + url += this->CTest->GetCTestConfiguration("DropSite") + + this->CTest->GetCTestConfiguration("DropLocation"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, + this->CTest->GetCTestConfiguration("DropSite") + << this->CTest->GetCTestConfiguration("DropLocation") << std::endl); + if ( !this->SubmitUsingHTTP(buildDirectory + "/Testing/" + + this->CTest->GetCurrentTag(), files, prefix, url) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when submitting via HTTP" << std::endl); + ofs << " Problems when submitting via HTTP" << std::endl; + return -1; + } + if(!this->CDash) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using HTTP trigger method" + << std::endl + << " Trigger site: " + << this->CTest->GetCTestConfiguration("TriggerSite") + << std::endl); + if ( !this-> + TriggerUsingHTTP(files, prefix, + this->CTest->GetCTestConfiguration("TriggerSite"))) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when triggering via HTTP" << std::endl); + ofs << " Problems when triggering via HTTP" << std::endl; + return -1; + } + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" + << std::endl); + ofs << " Submission successful" << std::endl; + return 0; + } + else if ( this->CTest->GetCTestConfiguration("DropMethod") == "xmlrpc" ) + { + ofs << "Using drop method: XML-RPC" << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Using XML-RPC submit method" + << std::endl); + std::string url = this->CTest->GetCTestConfiguration("DropSite"); + prefix = this->CTest->GetCTestConfiguration("DropLocation"); + if ( !this->SubmitUsingXMLRPC(buildDirectory + "/Testing/" + + this->CTest->GetCurrentTag(), files, prefix, url) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when submitting via XML-RPC" << std::endl); + ofs << " Problems when submitting via XML-RPC" << std::endl; + return -1; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" + << std::endl); + ofs << " Submission successful" << std::endl; + return 0; + } + else if ( this->CTest->GetCTestConfiguration("DropMethod") == "scp" ) + { + std::string url; + std::string oldWorkingDirectory; + if ( this->CTest->GetCTestConfiguration("DropSiteUser").size() > 0 ) + { + url += this->CTest->GetCTestConfiguration("DropSiteUser") + "@"; + } + url += this->CTest->GetCTestConfiguration("DropSite") + ":" + + this->CTest->GetCTestConfiguration("DropLocation"); + + // change to the build directory so that we can uses a relative path + // on windows since scp dosn't support "c:" a drive in the path + oldWorkingDirectory = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(buildDirectory.c_str()); + + if ( !this->SubmitUsingSCP( + this->CTest->GetCTestConfiguration("ScpCommand"), + "Testing/"+this->CTest->GetCurrentTag(), files, prefix, url) ) + { + cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str()); + cmCTestLog(this->CTest, ERROR_MESSAGE, + " Problems when submitting via SCP" + << std::endl); + ofs << " Problems when submitting via SCP" << std::endl; + return -1; + } + cmSystemTools::ChangeDirectory(oldWorkingDirectory.c_str()); + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Submission successful" + << std::endl); + ofs << " Submission successful" << std::endl; + return 0; + } + + cmCTestLog(this->CTest, ERROR_MESSAGE, " Unknown submission method: \"" + << this->CTest->GetCTestConfiguration("DropMethod") << "\"" << std::endl); + return -1; +} + +//---------------------------------------------------------------------------- +std::string cmCTestSubmitHandler::GetSubmitResultsPrefix() +{ + std::string name = this->CTest->GetCTestConfiguration("Site") + + "___" + this->CTest->GetCTestConfiguration("BuildName") + + "___" + this->CTest->GetCurrentTag() + "-" + + this->CTest->GetTestModelString() + "___XML___"; + return name; +} + + diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h new file mode 100644 index 000000000..60906bf15 --- /dev/null +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestSubmitHandler.h,v $ + Language: C++ + Date: $Date: 2008-02-29 19:58:33 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestSubmitHandler_h +#define cmCTestSubmitHandler_h + +#include "cmCTestGenericHandler.h" + +/** \class cmCTestSubmitHandler + * \brief Helper class for CTest + * + * Submit testing results + * + */ +class cmCTestSubmitHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler); + + cmCTestSubmitHandler(); + ~cmCTestSubmitHandler() { this->LogFile = 0; } + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + void Initialize(); + +private: + void SetLogFile(std::ostream* ost) { this->LogFile = ost; } + + /** + * Submit file using various ways + */ + bool SubmitUsingFTP(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url); + bool SubmitUsingHTTP(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url); + bool SubmitUsingSCP(const cmStdString& scp_command, + const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url); + + bool TriggerUsingHTTP(const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url); + + bool SubmitUsingXMLRPC(const cmStdString& localprefix, + const std::set& files, + const cmStdString& remoteprefix, + const cmStdString& url); + + std::string GetSubmitResultsPrefix(); + + cmStdString HTTPProxy; + int HTTPProxyType; + cmStdString HTTPProxyAuth; + cmStdString FTPProxy; + int FTPProxyType; + std::ostream* LogFile; + bool CDash; +}; + +#endif diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx new file mode 100644 index 000000000..e937c9869 --- /dev/null +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -0,0 +1,78 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestTestCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:08 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestTestCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestTestCommand::cmCTestTestCommand() +{ + this->Arguments[ctt_START] = "START"; + this->Arguments[ctt_END] = "END"; + this->Arguments[ctt_STRIDE] = "STRIDE"; + this->Arguments[ctt_LAST] = 0; + this->Last = ctt_LAST; +} + +cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() +{ + const char* ctestTimeout = + this->Makefile->GetDefinition("CTEST_TEST_TIMEOUT"); + double timeout = this->CTest->GetTimeOut(); + if ( ctestTimeout ) + { + timeout = atof(ctestTimeout); + } + else + { + if ( timeout <= 0 ) + { + // By default use timeout of 10 minutes + timeout = 600; + } + } + this->CTest->SetTimeOut(timeout); + cmCTestGenericHandler* handler = this->InitializeActualHandler(); + if ( this->Values[ctt_START] || this->Values[ctt_END] || + this->Values[ctt_STRIDE] ) + { + cmOStringStream testsToRunString; + if ( this->Values[ctt_START] ) + { + testsToRunString << this->Values[ctt_START]; + } + testsToRunString << ","; + if ( this->Values[ctt_END] ) + { + testsToRunString << this->Values[ctt_END]; + } + testsToRunString << ","; + if ( this->Values[ctt_STRIDE] ) + { + testsToRunString << this->Values[ctt_STRIDE]; + } + handler->SetOption("TestsToRunInformation", + testsToRunString.str().c_str()); + } + return handler; +} + +cmCTestGenericHandler* cmCTestTestCommand::InitializeActualHandler() +{ + return this->CTest->GetInitializedHandler("test"); +} + diff --git a/Source/CTest/cmCTestTestCommand.h b/Source/CTest/cmCTestTestCommand.h new file mode 100644 index 000000000..a6c6c3d96 --- /dev/null +++ b/Source/CTest/cmCTestTestCommand.h @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestTestCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestTestCommand_h +#define cmCTestTestCommand_h + +#include "cmCTestHandlerCommand.h" + +/** \class cmCTestTest + * \brief Run a ctest script + * + * cmCTestTestCommand defineds the command to test the project. + */ +class cmCTestTestCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestTestCommand(); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestTestCommand* ni = new cmCTestTestCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_TEST";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Tests the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_TEST([BUILD build_dir] [RETURN_VALUE res])\n" + "Tests the given build directory and stores results in Test.xml. The " + "second argument is a variable that will hold value."; + } + + cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand); + +protected: + virtual cmCTestGenericHandler* InitializeActualHandler(); + cmCTestGenericHandler* InitializeHandler(); + + enum { + ctt_BUILD = ct_LAST, + ctt_RETURN_VALUE, + ctt_START, + ctt_END, + ctt_STRIDE, + ctt_LAST + }; +}; + + +#endif diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx new file mode 100755 index 000000000..f2ef4ac26 --- /dev/null +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -0,0 +1,1968 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestTestHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-31 21:33:07 $ + Version: $Revision: 1.68 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestTestHandler.h" + +#include "cmCTest.h" +#include "cmake.h" +#include "cmGeneratedFileStream.h" +#include +#include +#include +#include "cmMakefile.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmCommand.h" +#include "cmSystemTools.h" + +#include +#include +#include + +#include // auto_ptr + +//---------------------------------------------------------------------- +class cmCTestSubdirCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestSubdirCommand* c = new cmCTestSubdirCommand; + c->TestHandler = this->TestHandler; + return c; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "subdirs";} + + // Unused methods + virtual const char* GetTerseDocumentation() { return ""; } + virtual const char* GetFullDocumentation() { return ""; } + + cmTypeMacro(cmCTestSubdirCommand, cmCommand); + + cmCTestTestHandler* TestHandler; +}; + +//---------------------------------------------------------------------- +bool cmCTestSubdirCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::vector::const_iterator it; + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + for ( it = args.begin(); it != args.end(); ++ it ) + { + cmSystemTools::ChangeDirectory(cwd.c_str()); + std::string fname = cwd; + fname += "/"; + fname += *it; + + if ( !cmSystemTools::FileExists(fname.c_str()) ) + { + // No subdirectory? So what... + continue; + } + cmSystemTools::ChangeDirectory(fname.c_str()); + const char* testFilename; + if( cmSystemTools::FileExists("CTestTestfile.cmake") ) + { + // does the CTestTestfile.cmake exist ? + testFilename = "CTestTestfile.cmake"; + } + else if( cmSystemTools::FileExists("DartTestfile.txt") ) + { + // does the DartTestfile.txt exist ? + testFilename = "DartTestfile.txt"; + } + else + { + // No CTestTestfile? Who cares... + cmSystemTools::ChangeDirectory(cwd.c_str()); + continue; + } + fname += "/"; + fname += testFilename; + bool readit = + this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(), + fname.c_str()); + cmSystemTools::ChangeDirectory(cwd.c_str()); + if(!readit) + { + std::string m = "Could not find include file: "; + m += fname; + this->SetError(m.c_str()); + return false; + } + } + return true; +} + +//---------------------------------------------------------------------- +class cmCTestAddSubdirectoryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestAddSubdirectoryCommand* c = new cmCTestAddSubdirectoryCommand; + c->TestHandler = this->TestHandler; + return c; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_subdirectory";} + + // Unused methods + virtual const char* GetTerseDocumentation() { return ""; } + virtual const char* GetFullDocumentation() { return ""; } + + cmTypeMacro(cmCTestAddSubdirectoryCommand, cmCommand); + + cmCTestTestHandler* TestHandler; +}; + +//---------------------------------------------------------------------- +bool cmCTestAddSubdirectoryCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(cwd.c_str()); + std::string fname = cwd; + fname += "/"; + fname += args[1]; + + if ( !cmSystemTools::FileExists(fname.c_str()) ) + { + // No subdirectory? So what... + return true; + } + cmSystemTools::ChangeDirectory(fname.c_str()); + const char* testFilename; + if( cmSystemTools::FileExists("CTestTestfile.cmake") ) + { + // does the CTestTestfile.cmake exist ? + testFilename = "CTestTestfile.cmake"; + } + else if( cmSystemTools::FileExists("DartTestfile.txt") ) + { + // does the DartTestfile.txt exist ? + testFilename = "DartTestfile.txt"; + } + else + { + // No CTestTestfile? Who cares... + cmSystemTools::ChangeDirectory(cwd.c_str()); + return true; + } + fname += "/"; + fname += testFilename; + bool readit = + this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(), + fname.c_str()); + cmSystemTools::ChangeDirectory(cwd.c_str()); + if(!readit) + { + std::string m = "Could not find include file: "; + m += fname; + this->SetError(m.c_str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------- +class cmCTestAddTestCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestAddTestCommand* c = new cmCTestAddTestCommand; + c->TestHandler = this->TestHandler; + return c; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "ADD_TEST";} + + // Unused methods + virtual const char* GetTerseDocumentation() { return ""; } + virtual const char* GetFullDocumentation() { return ""; } + + cmTypeMacro(cmCTestAddTestCommand, cmCommand); + + cmCTestTestHandler* TestHandler; +}; + +//---------------------------------------------------------------------- +bool cmCTestAddTestCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if ( args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + return this->TestHandler->AddTest(args); +} + +//---------------------------------------------------------------------- +class cmCTestSetTestsPropertiesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestSetTestsPropertiesCommand* c + = new cmCTestSetTestsPropertiesCommand; + c->TestHandler = this->TestHandler; + return c; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "SET_TESTS_PROPERTIES";} + + // Unused methods + virtual const char* GetTerseDocumentation() { return ""; } + virtual const char* GetFullDocumentation() { return ""; } + + cmTypeMacro(cmCTestSetTestsPropertiesCommand, cmCommand); + + cmCTestTestHandler* TestHandler; +}; + +//---------------------------------------------------------------------- +bool cmCTestSetTestsPropertiesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + return this->TestHandler->SetTestsProperties(args); +} + +//---------------------------------------------------------------------- +// get the next number in a string with numbers separated by , +// pos is the start of the search and pos2 is the end of the search +// pos becomes pos2 after a call to GetNextNumber. +// -1 is returned at the end of the list. +inline int GetNextNumber(std::string const& in, + int& val, + std::string::size_type& pos, + std::string::size_type& pos2) +{ + pos2 = in.find(',', pos); + if(pos2 != in.npos) + { + if(pos2-pos == 0) + { + val = -1; + } + else + { + val = atoi(in.substr(pos, pos2-pos).c_str()); + } + pos = pos2+1; + return 1; + } + else + { + if(in.size()-pos == 0) + { + val = -1; + } + else + { + val = atoi(in.substr(pos, in.size()-pos).c_str()); + } + return 0; + } +} + +//---------------------------------------------------------------------- +// get the next number in a string with numbers separated by , +// pos is the start of the search and pos2 is the end of the search +// pos becomes pos2 after a call to GetNextNumber. +// -1 is returned at the end of the list. +inline int GetNextRealNumber(std::string const& in, + double& val, + std::string::size_type& pos, + std::string::size_type& pos2) +{ + pos2 = in.find(',', pos); + if(pos2 != in.npos) + { + if(pos2-pos == 0) + { + val = -1; + } + else + { + val = atof(in.substr(pos, pos2-pos).c_str()); + } + pos = pos2+1; + return 1; + } + else + { + if(in.size()-pos == 0) + { + val = -1; + } + else + { + val = atof(in.substr(pos, in.size()-pos).c_str()); + } + return 0; + } +} + + +//---------------------------------------------------------------------- +cmCTestTestHandler::cmCTestTestHandler() +{ + this->UseUnion = false; + + this->UseIncludeRegExpFlag = false; + this->UseExcludeRegExpFlag = false; + this->UseExcludeRegExpFirst = false; + + this->CustomMaximumPassedTestOutputSize = 1 * 1024; + this->CustomMaximumFailedTestOutputSize = 300 * 1024; + + this->MemCheck = false; + + this->LogFile = 0; + + this->DartStuff.compile("()"); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::Initialize() +{ + this->Superclass::Initialize(); + + this->ElapsedTestingTime = -1; + + this->TestResults.clear(); + + this->CustomTestsIgnore.clear(); + this->StartTest = ""; + this->EndTest = ""; + + this->CustomPreTest.clear(); + this->CustomPostTest.clear(); + this->CustomMaximumPassedTestOutputSize = 1 * 1024; + this->CustomMaximumFailedTestOutputSize = 300 * 1024; + + this->TestsToRun.clear(); + + this->UseIncludeRegExpFlag = false; + this->UseExcludeRegExpFlag = false; + this->UseExcludeRegExpFirst = false; + this->IncludeRegExp = ""; + this->ExcludeRegExp = ""; + + TestsToRunString = ""; + this->UseUnion = false; + this->TestList.clear(); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::PopulateCustomVectors(cmMakefile *mf) +{ + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_PRE_TEST", + this->CustomPreTest); + this->CTest->PopulateCustomVector(mf, "CTEST_CUSTOM_POST_TEST", + this->CustomPostTest); + this->CTest->PopulateCustomVector(mf, + "CTEST_CUSTOM_TESTS_IGNORE", + this->CustomTestsIgnore); + this->CTest->PopulateCustomInteger(mf, + "CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE", + this->CustomMaximumPassedTestOutputSize); + this->CTest->PopulateCustomInteger(mf, + "CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE", + this->CustomMaximumFailedTestOutputSize); +} + +//---------------------------------------------------------------------- +int cmCTestTestHandler::PreProcessHandler() +{ + if ( !this->ExecuteCommands(this->CustomPreTest) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem executing pre-test command(s)." << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +int cmCTestTestHandler::PostProcessHandler() +{ + if ( !this->ExecuteCommands(this->CustomPostTest) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem executing post-test command(s)." << std::endl); + return 0; + } + return 1; +} + +//---------------------------------------------------------------------- +//clearly it would be nice if this were broken up into a few smaller +//functions and commented... +int cmCTestTestHandler::ProcessHandler() +{ + // Update internal data structure from generic one + this->SetTestsToRunInformation(this->GetOption("TestsToRunInformation")); + this->SetUseUnion(cmSystemTools::IsOn(this->GetOption("UseUnion"))); + const char* val; + val = this->GetOption("IncludeRegularExpression"); + if ( val ) + { + this->UseIncludeRegExp(); + this->SetIncludeRegExp(val); + } + val = this->GetOption("ExcludeRegularExpression"); + if ( val ) + { + this->UseExcludeRegExp(); + this->SetExcludeRegExp(val); + } + + this->TestResults.clear(); + + cmCTestLog(this->CTest, HANDLER_OUTPUT, + (this->MemCheck ? "Memory check" : "Test") + << " project " << cmSystemTools::GetCurrentWorkingDirectory() + << std::endl); + if ( ! this->PreProcessHandler() ) + { + return -1; + } + + cmGeneratedFileStream mLogFile; + this->StartLogFile((this->MemCheck ? "DynamicAnalysis" : "Test"), mLogFile); + this->LogFile = &mLogFile; + + std::vector passed; + std::vector failed; + int total; + + this->ProcessDirectory(passed, failed); + + total = int(passed.size()) + int(failed.size()); + + if (total == 0) + { + if ( !this->CTest->GetShowOnly() ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "No tests were found!!!" + << std::endl); + } + } + else + { + if (this->HandlerVerbose && passed.size() && + (this->UseIncludeRegExpFlag || this->UseExcludeRegExpFlag)) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl + << "The following tests passed:" << std::endl); + for(std::vector::iterator j = passed.begin(); + j != passed.end(); ++j) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "\t" << *j + << std::endl); + } + } + + float percent = float(passed.size()) * 100.0f / total; + if ( failed.size() > 0 && percent > 99) + { + percent = 99; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl + << static_cast(percent + .5) << "% tests passed, " + << failed.size() << " tests failed out of " << total << std::endl); + //fprintf(stderr,"\n%.0f%% tests passed, %i tests failed out of %i\n", + // percent, int(failed.size()), total); + + if (failed.size()) + { + cmGeneratedFileStream ofs; + + cmCTestLog(this->CTest, ERROR_MESSAGE, std::endl + << "The following tests FAILED:" << std::endl); + this->StartLogFile("TestsFailed", ofs); + + std::vector::iterator ftit; + for(ftit = this->TestResults.begin(); + ftit != this->TestResults.end(); ++ftit) + { + if ( ftit->Status != cmCTestTestHandler::COMPLETED ) + { + ofs << ftit->TestCount << ":" << ftit->Name << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, "\t" << std::setw(3) + << ftit->TestCount << " - " << ftit->Name.c_str() << " (" + << this->GetTestStatus(ftit->Status) << ")" << std::endl); + } + } + + } + } + + if ( this->CTest->GetProduceXML() ) + { + cmGeneratedFileStream xmlfile; + if( !this->StartResultingXML( + (this->MemCheck ? "DynamicAnalysis" : "Test"), xmlfile) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create " + << (this->MemCheck ? "memory check" : "testing") + << " XML file" << std::endl); + this->LogFile = 0; + return 1; + } + this->GenerateDartOutput(xmlfile); + } + + if ( ! this->PostProcessHandler() ) + { + this->LogFile = 0; + return -1; + } + + if ( !failed.empty() ) + { + this->LogFile = 0; + return -1; + } + this->LogFile = 0; + return 0; +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::ProcessOneTest(cmCTestTestProperties *it, + std::vector &passed, + std::vector &failed, + int cnt, int tmsize) +{ + const std::string& testname = it->Name; + std::vector& args = it->Args; + cmCTestTestResult cres; + cres.Properties = &*it; + cres.ExecutionTime = 0; + cres.ReturnValue = -1; + cres.Status = cmCTestTestHandler::NOT_RUN; + cres.TestCount = cnt; + cres.Name = testname; + cres.Path = it->Directory.c_str(); + + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) << cnt << "/"); + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3) << tmsize << " "); + if ( this->MemCheck ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Memory Check"); + } + else + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Testing"); + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " "); + std::string outname = testname; + outname.resize(30, ' '); + *this->LogFile << cnt << "/" << tmsize << " Testing: " << testname + << std::endl; + + if ( this->CTest->GetShowOnly() ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str() << std::endl); + } + else + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, outname.c_str()); + } + + cmCTestLog(this->CTest, DEBUG, "Testing " << args[0].c_str() << " ... "); + // find the test executable + std::string actualCommand = this->FindTheExecutable(args[1].c_str()); + std::string testCommand + = cmSystemTools::ConvertToOutputPath(actualCommand.c_str()); + + // continue if we did not find the executable + if (testCommand == "") + { + *this->LogFile << "Unable to find executable: " << args[1].c_str() + << std::endl; + cmCTestLog(this->CTest, ERROR_MESSAGE, "Unable to find executable: " + << args[1].c_str() << std::endl); + cres.Output = "Unable to find executable: " + args[1]; + if ( !this->CTest->GetShowOnly() ) + { + cres.FullCommandLine = actualCommand; + this->TestResults.push_back( cres ); + failed.push_back(testname); + return; + } + } + + // add the arguments + std::vector::const_iterator j = args.begin(); + ++j; + ++j; + std::vector arguments; + this->GenerateTestCommand(arguments); + arguments.push_back(actualCommand.c_str()); + for(;j != args.end(); ++j) + { + testCommand += " "; + testCommand += cmSystemTools::EscapeSpaces(j->c_str()); + arguments.push_back(j->c_str()); + } + arguments.push_back(0); + + /** + * Run an executable command and put the stdout in output. + */ + std::string output; + int retVal = 0; + + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, std::endl + << (this->MemCheck?"MemCheck":"Test") + << " command: " << testCommand + << std::endl); + *this->LogFile << cnt << "/" << tmsize + << " Test: " << testname.c_str() << std::endl; + *this->LogFile << "Command: "; + std::vector::size_type ll; + for ( ll = 0; ll < arguments.size()-1; ll ++ ) + { + *this->LogFile << "\"" << arguments[ll] << "\" "; + } + *this->LogFile + << std::endl + << "Directory: " << it->Directory << std::endl + << "\"" << testname.c_str() << "\" start time: " + << this->CTest->CurrentTime() << std::endl + << "Output:" << std::endl + << "----------------------------------------------------------" + << std::endl; + int res = 0; + double clock_start, clock_finish; + clock_start = cmSystemTools::GetTime(); + + if ( !this->CTest->GetShowOnly() ) + { + res = this->CTest->RunTest(arguments, &output, &retVal, this->LogFile, + it->Timeout); + } + + clock_finish = cmSystemTools::GetTime(); + + if ( this->LogFile ) + { + double ttime = clock_finish - clock_start; + int hours = static_cast(ttime / (60 * 60)); + int minutes = static_cast(ttime / 60) % 60; + int seconds = static_cast(ttime) % 60; + char buffer[100]; + sprintf(buffer, "%02d:%02d:%02d", hours, minutes, seconds); + *this->LogFile + << "----------------------------------------------------------" + << std::endl + << "\"" << testname.c_str() << "\" end time: " + << this->CTest->CurrentTime() << std::endl + << "\"" << testname.c_str() << "\" time elapsed: " + << buffer << std::endl + << "----------------------------------------------------------" + << std::endl << std::endl; + } + + cres.ExecutionTime = (double)(clock_finish - clock_start); + cres.FullCommandLine = testCommand; + std::string reason; + if ( !this->CTest->GetShowOnly() ) + { + bool testFailed = false; + std::vector >::iterator passIt; + bool forceFail = false; + if ( it->RequiredRegularExpressions.size() > 0 ) + { + bool found = false; + for ( passIt = it->RequiredRegularExpressions.begin(); + passIt != it->RequiredRegularExpressions.end(); + ++ passIt ) + { + if ( passIt->first.find(output.c_str()) ) + { + found = true; + } + } + if ( !found ) + { + reason = "Required regular expression not found."; + reason += "Regex=["; + for ( passIt = it->RequiredRegularExpressions.begin(); + passIt != it->RequiredRegularExpressions.end(); + ++ passIt ) + { + reason += passIt->second; + reason += "\n"; + } + reason += "]"; + forceFail = true; + } + } + if ( it->ErrorRegularExpressions.size() > 0 ) + { + for ( passIt = it->ErrorRegularExpressions.begin(); + passIt != it->ErrorRegularExpressions.end(); + ++ passIt ) + { + if ( passIt->first.find(output.c_str()) ) + { + reason = "Error regular expression found in output."; + reason += " Regex=["; + reason += passIt->second; + reason += "]"; + forceFail = true; + } + } + } + + if (res == cmsysProcess_State_Exited && + (retVal == 0 || it->RequiredRegularExpressions.size()) && + !forceFail) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Passed"); + if ( it->WillFail ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " - But it should fail!"); + cres.Status = cmCTestTestHandler::FAILED; + testFailed = true; + } + else + { + cres.Status = cmCTestTestHandler::COMPLETED; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + } + else + { + testFailed = true; + + cres.Status = cmCTestTestHandler::FAILED; + if ( res == cmsysProcess_State_Expired ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Timeout" << std::endl); + cres.Status = cmCTestTestHandler::TIMEOUT; + } + else if ( res == cmsysProcess_State_Exception ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Exception: "); + switch ( retVal ) + { + case cmsysProcess_Exception_Fault: + cmCTestLog(this->CTest, HANDLER_OUTPUT, "SegFault"); + cres.Status = cmCTestTestHandler::SEGFAULT; + break; + case cmsysProcess_Exception_Illegal: + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Illegal"); + cres.Status = cmCTestTestHandler::ILLEGAL; + break; + case cmsysProcess_Exception_Interrupt: + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Interrupt"); + cres.Status = cmCTestTestHandler::INTERRUPT; + break; + case cmsysProcess_Exception_Numerical: + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Numerical"); + cres.Status = cmCTestTestHandler::NUMERICAL; + break; + default: + cmCTestLog(this->CTest, HANDLER_OUTPUT, "Other"); + cres.Status = cmCTestTestHandler::OTHER_FAULT; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + } + else if ( res == cmsysProcess_State_Error ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Bad command " << res + << std::endl); + cres.Status = cmCTestTestHandler::BAD_COMMAND; + } + else + { + // Force fail will also be here? + cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Failed " << reason); + if ( it->WillFail ) + { + cres.Status = cmCTestTestHandler::COMPLETED; + cmCTestLog(this->CTest, HANDLER_OUTPUT, " - supposed to fail"); + testFailed = false; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + } + } + if ( testFailed ) + { + failed.push_back(testname); + } + else + { + passed.push_back(testname); + } + if (!output.empty() && output.find("DartStuff.find(output.c_str())) + { + std::string dartString = this->DartStuff.match(1); + cmSystemTools::ReplaceString(output, dartString.c_str(),""); + cres.RegressionImages + = this->GenerateRegressionImages(dartString); + } + } + } + + // if this is doing MemCheck then all the output needs to be put into + // Output since that it what is parsed to by cmCTestMemCheckHandler + if(!this->MemCheck) + { + if ( cres.Status == cmCTestTestHandler::COMPLETED ) + { + this->CleanTestOutput(output, static_cast + (this->CustomMaximumPassedTestOutputSize)); + } + else + { + this->CleanTestOutput(output, static_cast + (this->CustomMaximumFailedTestOutputSize)); + } + } + + cres.Output = output; + cres.ReturnValue = retVal; + cres.CompletionStatus = "Completed"; + this->TestResults.push_back( cres ); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::ProcessDirectory(std::vector &passed, + std::vector &failed) +{ + std::string current_dir = cmSystemTools::GetCurrentWorkingDirectory(); + this->TestList.clear(); + + this->GetListOfTests(); + cmCTestTestHandler::ListOfTests::size_type tmsize = this->TestList.size(); + + this->StartTest = this->CTest->CurrentTime(); + this->StartTestTime = static_cast(cmSystemTools::GetTime()); + double elapsed_time_start = cmSystemTools::GetTime(); + + *this->LogFile << "Start testing: " << this->StartTest << std::endl + << "----------------------------------------------------------" + << std::endl; + + // how many tests are in based on RegExp? + int inREcnt = 0; + cmCTestTestHandler::ListOfTests::iterator it; + for ( it = this->TestList.begin(); it != this->TestList.end(); it ++ ) + { + if (it->IsInBasedOnREOptions) + { + inREcnt ++; + } + } + // expand the test list based on the union flag + if (this->UseUnion) + { + this->ExpandTestsToRunInformation((int)tmsize); + } + else + { + this->ExpandTestsToRunInformation(inREcnt); + } + + int cnt = 0; + inREcnt = 0; + std::string last_directory = ""; + for ( it = this->TestList.begin(); it != this->TestList.end(); it ++ ) + { + cnt ++; + if (it->IsInBasedOnREOptions) + { + inREcnt++; + } + + // if we are out of time then skip this test, we leave two minutes + // to submit results + if (this->CTest->GetRemainingTimeAllowed() - 120 <= 0) + { + continue; + } + + if (!(last_directory == it->Directory)) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Changing directory into " << it->Directory.c_str() << "\n"); + *this->LogFile << "Changing directory into: " << it->Directory.c_str() + << std::endl; + last_directory = it->Directory; + cmSystemTools::ChangeDirectory(it->Directory.c_str()); + } + + if (this->UseUnion) + { + // if it is not in the list and not in the regexp then skip + if ((this->TestsToRun.size() && + std::find(this->TestsToRun.begin(), this->TestsToRun.end(), cnt) + == this->TestsToRun.end()) && !it->IsInBasedOnREOptions) + { + continue; + } + } + else + { + // is this test in the list of tests to run? If not then skip it + if ((this->TestsToRun.size() && + std::find(this->TestsToRun.begin(), + this->TestsToRun.end(), inREcnt) + == this->TestsToRun.end()) || !it->IsInBasedOnREOptions) + { + continue; + } + } + + // process this one test + this->ProcessOneTest(&(*it), passed, failed, cnt, + static_cast(tmsize)); + } + + this->EndTest = this->CTest->CurrentTime(); + this->EndTestTime = static_cast(cmSystemTools::GetTime()); + this->ElapsedTestingTime = cmSystemTools::GetTime() - elapsed_time_start; + if ( this->LogFile ) + { + *this->LogFile << "End testing: " << this->EndTest << std::endl; + } + cmSystemTools::ChangeDirectory(current_dir.c_str()); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::GenerateTestCommand(std::vector&) +{ +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::GenerateDartOutput(std::ostream& os) +{ + if ( !this->CTest->GetProduceXML() ) + { + return; + } + + this->CTest->StartXML(os); + os << "\n" + << "\t" << this->StartTest << "\n" + << "\t" << this->StartTestTime << "\n" + << "\t\n"; + cmCTestTestHandler::TestResultsVector::size_type cc; + for ( cc = 0; cc < this->TestResults.size(); cc ++ ) + { + cmCTestTestResult *result = &this->TestResults[cc]; + std::string testPath = result->Path + "/" + result->Name; + os << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(testPath.c_str())) + << "" << std::endl; + } + os << "\t\n"; + for ( cc = 0; cc < this->TestResults.size(); cc ++ ) + { + cmCTestTestResult *result = &this->TestResults[cc]; + os << "\tStatus == cmCTestTestHandler::COMPLETED ) + { + os << "passed"; + } + else if ( result->Status == cmCTestTestHandler::NOT_RUN ) + { + os << "notrun"; + } + else + { + os << "failed"; + } + std::string testPath = result->Path + "/" + result->Name; + os << "\">\n" + << "\t\t" << cmCTest::MakeXMLSafe(result->Name) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(result->Path.c_str())) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe( + this->CTest->GetShortPathToFile(testPath.c_str())) << "\n" + << "\t\t" + << cmCTest::MakeXMLSafe(result->FullCommandLine) + << "\n" + << "\t\t" << std::endl; + if ( result->Status != cmCTestTestHandler::NOT_RUN ) + { + if ( result->Status != cmCTestTestHandler::COMPLETED || + result->ReturnValue ) + { + os << "\t\t\t" + << this->GetTestStatus(result->Status) << "" + "\n" + << "\t\t\t" + << result->ReturnValue << "" + << std::endl; + } + os << result->RegressionImages; + os << "\t\t\t" + << result->ExecutionTime << "\n"; + os + << "\t\t\t" + << result->CompletionStatus << "\n"; + } + os + << "\t\t\t" + << result->FullCommandLine << "\n"; + std::map::iterator measureIt; + for ( measureIt = result->Properties->Measurements.begin(); + measureIt != result->Properties->Measurements.end(); + ++ measureIt ) + { + os + << "\t\t\tfirst.c_str() << "\">" + << measureIt->second.c_str() << "\n"; + } + os + << "\t\t\t\n" + << "\t\t\t\t"; + os << cmCTest::MakeXMLSafe(result->Output); + os + << "\n" + << "\t\t\t\n" + << "\t\t\n" + << "\t" << std::endl; + } + + os << "\t" << this->EndTest << "\n" + << "\t" << this->EndTestTime << "\n" + << "" + << static_cast(this->ElapsedTestingTime/6)/10.0 + << "" + << "" << std::endl; + this->CTest->EndXML(os); +} + +//---------------------------------------------------------------------- +int cmCTestTestHandler::ExecuteCommands(std::vector& vec) +{ + std::vector::iterator it; + for ( it = vec.begin(); it != vec.end(); ++it ) + { + int retVal = 0; + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command: " << *it + << std::endl); + if ( !cmSystemTools::RunSingleCommand(it->c_str(), 0, &retVal, 0, true + /*this->Verbose*/) || retVal != 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem running command: " + << *it << std::endl); + return 0; + } + } + return 1; +} + + +//---------------------------------------------------------------------- +// Find the appropriate executable to run for a test +std::string cmCTestTestHandler::FindTheExecutable(const char *exe) +{ + std::string resConfig; + std::vector extraPaths; + std::vector failedPaths; + return cmCTestTestHandler::FindExecutable(this->CTest, + exe, resConfig, + extraPaths, + failedPaths); +} + +// add additional configuraitons to the search path +void cmCTestTestHandler +::AddConfigurations(cmCTest *ctest, + std::vector &attempted, + std::vector &attemptedConfigs, + std::string filepath, + std::string &filename) +{ + std::string tempPath; + + if (filepath.size()) + { + filepath += "/"; + } + tempPath = filepath + filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back(""); + + if(ctest->GetConfigType().size()) + { + tempPath = filepath; + tempPath += ctest->GetConfigType(); + tempPath += "/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back(ctest->GetConfigType()); + // If the file is an OSX bundle then the configtyp + // will be at the start of the path + tempPath = ctest->GetConfigType(); + tempPath += "/"; + tempPath += filepath; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back(ctest->GetConfigType()); + } + else + { + // no config specified to try some options + tempPath = filepath; + tempPath += "Release/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("Release"); + tempPath = filepath; + tempPath += "Debug/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("Debug"); + tempPath = filepath; + tempPath += "MinSizeRel/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("MinSizeRel"); + tempPath = filepath; + tempPath += "RelWithDebInfo/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("RelWithDebInfo"); + tempPath = filepath; + tempPath += "Deployment/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("Deployment"); + tempPath = filepath; + tempPath += "Development/"; + tempPath += filename; + attempted.push_back(tempPath); + attemptedConfigs.push_back("Deployment"); + } +} + + +//---------------------------------------------------------------------- +// Find the appropriate executable to run for a test +std::string cmCTestTestHandler +::FindExecutable(cmCTest *ctest, + const char *testCommand, + std::string &resultingConfig, + std::vector &extraPaths, + std::vector &failed) +{ + // now run the compiled test if we can find it + std::vector attempted; + std::vector attemptedConfigs; + std::string tempPath; + std::string filepath = + cmSystemTools::GetFilenamePath(testCommand); + std::string filename = + cmSystemTools::GetFilenameName(testCommand); + + cmCTestTestHandler::AddConfigurations(ctest, attempted, + attemptedConfigs, + filepath,filename); + + // if extraPaths are provided and we were not passed a full path, try them, + // try any extra paths + if (filepath.size() == 0) + { + for (unsigned int i = 0; i < extraPaths.size(); ++i) + { + std::string filepathExtra = + cmSystemTools::GetFilenamePath(extraPaths[i]); + std::string filenameExtra = + cmSystemTools::GetFilenameName(extraPaths[i]); + cmCTestTestHandler::AddConfigurations(ctest,attempted, + attemptedConfigs, + filepathExtra, + filenameExtra); + } + } + + // store the final location in fullPath + std::string fullPath; + + // now look in the paths we specified above + for(unsigned int ai=0; + ai < attempted.size() && fullPath.size() == 0; ++ai) + { + // first check without exe extension + if(cmSystemTools::FileExists(attempted[ai].c_str()) + && !cmSystemTools::FileIsDirectory(attempted[ai].c_str())) + { + fullPath = cmSystemTools::CollapseFullPath(attempted[ai].c_str()); + resultingConfig = attemptedConfigs[ai]; + } + // then try with the exe extension + else + { + failed.push_back(attempted[ai].c_str()); + tempPath = attempted[ai]; + tempPath += cmSystemTools::GetExecutableExtension(); + if(cmSystemTools::FileExists(tempPath.c_str()) + && !cmSystemTools::FileIsDirectory(tempPath.c_str())) + { + fullPath = cmSystemTools::CollapseFullPath(tempPath.c_str()); + resultingConfig = attemptedConfigs[ai]; + } + else + { + failed.push_back(tempPath.c_str()); + } + } + } + + // if everything else failed, check the users path, but only if a full path + // wasn't specified + if (fullPath.size() == 0 && filepath.size() == 0) + { + std::string path = cmSystemTools::FindProgram(filename.c_str()); + if (path != "") + { + resultingConfig = ""; + return path; + } + } + if(fullPath.size() == 0) + { + cmCTestLog(ctest, HANDLER_OUTPUT, + "Could not find executable " << testCommand << "\n" + << "Looked in the following places:\n"); + for(std::vector::iterator i = failed.begin(); + i != failed.end(); ++i) + { + cmCTestLog(ctest, HANDLER_OUTPUT, + i->c_str() << "\n"); + } + } + + return fullPath; +} + + +//---------------------------------------------------------------------- +void cmCTestTestHandler::GetListOfTests() +{ + if ( !this->IncludeRegExp.empty() ) + { + this->IncludeTestsRegularExpression.compile(this->IncludeRegExp.c_str()); + } + if ( !this->ExcludeRegExp.empty() ) + { + this->ExcludeTestsRegularExpression.compile(this->ExcludeRegExp.c_str()); + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Constructing a list of tests" << std::endl); + cmake cm; + cmGlobalGenerator gg; + gg.SetCMakeInstance(&cm); + std::auto_ptr lg(gg.CreateLocalGenerator()); + lg->SetGlobalGenerator(&gg); + cmMakefile *mf = lg->GetMakefile(); + mf->AddDefinition("CTEST_CONFIGURATION_TYPE", + this->CTest->GetConfigType().c_str()); + + // Add handler for ADD_TEST + cmCTestAddTestCommand* newCom1 = new cmCTestAddTestCommand; + newCom1->TestHandler = this; + cm.AddCommand(newCom1); + + // Add handler for SUBDIRS + cmCTestSubdirCommand* newCom2 = + new cmCTestSubdirCommand; + newCom2->TestHandler = this; + cm.AddCommand(newCom2); + + // Add handler for ADD_SUBDIRECTORY + cmCTestAddSubdirectoryCommand* newCom3 = + new cmCTestAddSubdirectoryCommand; + newCom3->TestHandler = this; + cm.AddCommand(newCom3); + + // Add handler for SET_SOURCE_FILES_PROPERTIES + cmCTestSetTestsPropertiesCommand* newCom4 + = new cmCTestSetTestsPropertiesCommand; + newCom4->TestHandler = this; + cm.AddCommand(newCom4); + + const char* testFilename; + if( cmSystemTools::FileExists("CTestTestfile.cmake") ) + { + // does the CTestTestfile.cmake exist ? + testFilename = "CTestTestfile.cmake"; + } + else if( cmSystemTools::FileExists("DartTestfile.txt") ) + { + // does the DartTestfile.txt exist ? + testFilename = "DartTestfile.txt"; + } + else + { + return; + } + + if ( !mf->ReadListFile(0, testFilename) ) + { + return; + } + if ( cmSystemTools::GetErrorOccuredFlag() ) + { + return; + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Done constructing a list of tests" << std::endl); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::UseIncludeRegExp() +{ + this->UseIncludeRegExpFlag = true; +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::UseExcludeRegExp() +{ + this->UseExcludeRegExpFlag = true; + this->UseExcludeRegExpFirst = this->UseIncludeRegExpFlag ? false : true; +} + +//---------------------------------------------------------------------- +const char* cmCTestTestHandler::GetTestStatus(int status) +{ + static const char statuses[][100] = { + "Not Run", + "Timeout", + "SEGFAULT", + "ILLEGAL", + "INTERRUPT", + "NUMERICAL", + "OTHER_FAULT", + "Failed", + "BAD_COMMAND", + "Completed" + }; + + if ( status < cmCTestTestHandler::NOT_RUN || + status > cmCTestTestHandler::COMPLETED ) + { + return "No Status"; + } + return statuses[status]; +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::ExpandTestsToRunInformation(int numTests) +{ + if (this->TestsToRunString.empty()) + { + return; + } + + int start; + int end = -1; + double stride = -1; + std::string::size_type pos = 0; + std::string::size_type pos2; + // read start + if(GetNextNumber(this->TestsToRunString, start, pos, pos2)) + { + // read end + if(GetNextNumber(this->TestsToRunString, end, pos, pos2)) + { + // read stride + if(GetNextRealNumber(this->TestsToRunString, stride, pos, pos2)) + { + int val =0; + // now read specific numbers + while(GetNextNumber(this->TestsToRunString, val, pos, pos2)) + { + this->TestsToRun.push_back(val); + } + this->TestsToRun.push_back(val); + } + } + } + + // if start is not specified then we assume we start at 1 + if(start == -1) + { + start = 1; + } + + // if end isnot specified then we assume we end with the last test + if(end == -1) + { + end = numTests; + } + + // if the stride wasn't specified then it defaults to 1 + if(stride == -1) + { + stride = 1; + } + + // if we have a range then add it + if(end != -1 && start != -1 && stride > 0) + { + int i = 0; + while (i*stride + start <= end) + { + this->TestsToRun.push_back(static_cast(i*stride+start)); + ++i; + } + } + + // sort the array + std::sort(this->TestsToRun.begin(), this->TestsToRun.end(), + std::less()); + // remove duplicates + std::vector::iterator new_end = + std::unique(this->TestsToRun.begin(), this->TestsToRun.end()); + this->TestsToRun.erase(new_end, this->TestsToRun.end()); +} + +//---------------------------------------------------------------------- +// Just for convenience +#define SPACE_REGEX "[ \t\r\n]" +//---------------------------------------------------------------------- +std::string cmCTestTestHandler::GenerateRegressionImages( + const std::string& xml) +{ + cmsys::RegularExpression twoattributes( + "([^<]*)"); + cmsys::RegularExpression threeattributes( + "([^<]*)"); + cmsys::RegularExpression fourattributes( + "([^<]*)"); + cmsys::RegularExpression measurementfile( + "([^<]*)"); + + cmOStringStream ostr; + bool done = false; + std::string cxml = xml; + while ( ! done ) + { + if ( twoattributes.find(cxml) ) + { + ostr + << "\t\t\t" << twoattributes.match(5) + << "" + << std::endl; + cxml.erase(twoattributes.start(), + twoattributes.end() - twoattributes.start()); + } + else if ( threeattributes.find(cxml) ) + { + ostr + << "\t\t\t" << threeattributes.match(7) + << "" + << std::endl; + cxml.erase(threeattributes.start(), + threeattributes.end() - threeattributes.start()); + } + else if ( fourattributes.find(cxml) ) + { + ostr + << "\t\t\t" << fourattributes.match(9) + << "" + << std::endl; + cxml.erase(fourattributes.start(), + fourattributes.end() - fourattributes.start()); + } + else if ( measurementfile.find(cxml) ) + { + const std::string& filename = + cmCTest::CleanString(measurementfile.match(5)); + if ( cmSystemTools::FileExists(filename.c_str()) ) + { + long len = cmSystemTools::FileLength(filename.c_str()); + if ( len == 0 ) + { + std::string k1 = measurementfile.match(1); + std::string v1 = measurementfile.match(2); + std::string k2 = measurementfile.match(3); + std::string v2 = measurementfile.match(4); + if ( cmSystemTools::LowerCase(k1) == "type" ) + { + v1 = "text/string"; + } + if ( cmSystemTools::LowerCase(k2) == "type" ) + { + v2 = "text/string"; + } + + ostr + << "\t\t\tImage " << filename.c_str() + << " is empty"; + } + else + { + std::ifstream ifs(filename.c_str(), std::ios::in +#ifdef _WIN32 + | std::ios::binary +#endif + ); + unsigned char *file_buffer = new unsigned char [ len + 1 ]; + ifs.read(reinterpret_cast(file_buffer), len); + unsigned char *encoded_buffer + = new unsigned char [ static_cast(len * 1.5 + 5) ]; + + unsigned long rlen + = cmsysBase64_Encode(file_buffer, len, encoded_buffer, 1); + unsigned long cc; + + ostr + << "\t\t\t" << std::endl << "\t\t\t\t"; + for ( cc = 0; cc < rlen; cc ++ ) + { + ostr << encoded_buffer[cc]; + if ( cc % 60 == 0 && cc ) + { + ostr << std::endl; + } + } + ostr + << "" << std::endl << "\t\t\t" + << std::endl; + delete [] file_buffer; + delete [] encoded_buffer; + } + } + else + { + int idx = 4; + if ( measurementfile.match(1) == "name" ) + { + idx = 2; + } + ostr + << "\t\t\tFile " << filename.c_str() + << " not found" + << std::endl; + cmCTestLog(this->CTest, HANDLER_OUTPUT, "File \"" << filename.c_str() + << "\" not found." << std::endl); + } + cxml.erase(measurementfile.start(), + measurementfile.end() - measurementfile.start()); + } + else + { + done = true; + } + } + return ostr.str(); +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::SetIncludeRegExp(const char *arg) +{ + this->IncludeRegExp = arg; +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::SetExcludeRegExp(const char *arg) +{ + this->ExcludeRegExp = arg; +} + +//---------------------------------------------------------------------- +void cmCTestTestHandler::SetTestsToRunInformation(const char* in) +{ + if ( !in ) + { + return; + } + this->TestsToRunString = in; + // if the argument is a file, then read it and use the contents as the + // string + if(cmSystemTools::FileExists(in)) + { + std::ifstream fin(in); + unsigned long filelen = cmSystemTools::FileLength(in); + char* buff = new char[filelen+1]; + fin.getline(buff, filelen); + buff[fin.gcount()] = 0; + this->TestsToRunString = buff; + } +} + +//---------------------------------------------------------------------- +bool cmCTestTestHandler::CleanTestOutput(std::string& output, + size_t remove_threshold) +{ + if ( remove_threshold == 0 ) + { + return true; + } + if ( output.find("CTEST_FULL_OUTPUT") != output.npos ) + { + return true; + } + cmOStringStream ostr; + std::string::size_type cc; + std::string::size_type skipsize = 0; + int inTag = 0; + int skipped = 0; + for ( cc = 0; cc < output.size(); cc ++ ) + { + int ch = output[cc]; + if ( ch < 0 || ch > 255 ) + { + break; + } + if ( ch == '<' ) + { + inTag = 1; + } + if ( !inTag ) + { + int notskip = 0; + // Skip + if ( skipsize < remove_threshold ) + { + ostr << static_cast(ch); + notskip = 1; + } + skipsize ++; + if ( notskip && skipsize >= remove_threshold ) + { + skipped = 1; + } + } + else + { + ostr << static_cast(ch); + } + if ( ch == '>' ) + { + inTag = 0; + } + } + if ( skipped ) + { + ostr << "..." << std::endl << "The rest of the test output was removed " + "since it exceeds the threshold of " + << remove_threshold << " characters." << std::endl; + } + output = ostr.str(); + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestTestHandler::SetTestsProperties( + const std::vector& args) +{ + std::vector::const_iterator it; + std::vector tests; + bool found = false; + for ( it = args.begin(); it != args.end(); ++ it ) + { + if ( *it == "PROPERTIES" ) + { + found = true; + break; + } + tests.push_back(*it); + } + if ( !found ) + { + return false; + } + ++ it; // skip PROPERTIES + for ( ; it != args.end(); ++ it ) + { + std::string key = *it; + ++ it; + if ( it == args.end() ) + { + break; + } + std::string val = *it; + std::vector::const_iterator tit; + for ( tit = tests.begin(); tit != tests.end(); ++ tit ) + { + cmCTestTestHandler::ListOfTests::iterator rtit; + for ( rtit = this->TestList.begin(); + rtit != this->TestList.end(); + ++ rtit ) + { + if ( *tit == rtit->Name ) + { + if ( key == "WILL_FAIL" ) + { + rtit->WillFail = cmSystemTools::IsOn(val.c_str()); + } + if ( key == "TIMEOUT" ) + { + rtit->Timeout = atof(val.c_str()); + } + if ( key == "FAIL_REGULAR_EXPRESSION" ) + { + std::vector lval; + cmSystemTools::ExpandListArgument(val.c_str(), lval); + std::vector::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->ErrorRegularExpressions.push_back( + std::pair( + cmsys::RegularExpression(crit->c_str()), + std::string(crit->c_str()))); + } + } + if ( key == "MEASUREMENT" ) + { + size_t pos = val.find_first_of("="); + if ( pos != val.npos ) + { + std::string mKey = val.substr(0, pos); + const char* mVal = val.c_str() + pos + 1; + rtit->Measurements[mKey] = mVal; + } + else + { + rtit->Measurements[val] = "1"; + } + } + if ( key == "PASS_REGULAR_EXPRESSION" ) + { + std::vector lval; + cmSystemTools::ExpandListArgument(val.c_str(), lval); + std::vector::iterator crit; + for ( crit = lval.begin(); crit != lval.end(); ++ crit ) + { + rtit->RequiredRegularExpressions.push_back( + std::pair( + cmsys::RegularExpression(crit->c_str()), + std::string(crit->c_str()))); + } + } + } + } + } + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTestTestHandler::AddTest(const std::vector& args) +{ + const std::string& testname = args[0]; + cmCTestLog(this->CTest, DEBUG, "Add test: " << args[0] << std::endl); + if (this->UseExcludeRegExpFlag && + this->UseExcludeRegExpFirst && + this->ExcludeTestsRegularExpression.find(testname.c_str())) + { + return true; + } + if ( this->MemCheck ) + { + std::vector::iterator it; + bool found = false; + for ( it = this->CustomTestsIgnore.begin(); + it != this->CustomTestsIgnore.end(); ++ it ) + { + if ( *it == testname ) + { + found = true; + break; + } + } + if ( found ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Ignore memcheck: " + << *it << std::endl); + return true; + } + } + else + { + std::vector::iterator it; + bool found = false; + for ( it = this->CustomTestsIgnore.begin(); + it != this->CustomTestsIgnore.end(); ++ it ) + { + if ( *it == testname ) + { + found = true; + break; + } + } + if ( found ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Ignore test: " + << *it << std::endl); + return true; + } + } + + cmCTestTestProperties test; + test.Name = testname; + test.Args = args; + test.Directory = cmSystemTools::GetCurrentWorkingDirectory(); + cmCTestLog(this->CTest, DEBUG, "Set test directory: " + << test.Directory << std::endl); + + test.IsInBasedOnREOptions = true; + test.WillFail = false; + test.Timeout = 0; + if (this->UseIncludeRegExpFlag && + !this->IncludeTestsRegularExpression.find(testname.c_str())) + { + test.IsInBasedOnREOptions = false; + } + else if (this->UseExcludeRegExpFlag && + !this->UseExcludeRegExpFirst && + this->ExcludeTestsRegularExpression.find(testname.c_str())) + { + test.IsInBasedOnREOptions = false; + } + this->TestList.push_back(test); + return true; +} + diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h new file mode 100755 index 000000000..e20b3d0ed --- /dev/null +++ b/Source/CTest/cmCTestTestHandler.h @@ -0,0 +1,218 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestTestHandler.h,v $ + Language: C++ + Date: $Date: 2008-01-30 16:17:36 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestTestHandler_h +#define cmCTestTestHandler_h + + +#include "cmCTestGenericHandler.h" +#include + +class cmMakefile; + +/** \class cmCTestTestHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestTestHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestTestHandler, cmCTestGenericHandler); + + /** + * The main entry point for this class + */ + int ProcessHandler(); + + /** + * When both -R and -I are used should te resulting test list be the + * intersection or the union of the lists. By default it is the + * intersection. + */ + void SetUseUnion(bool val) { this->UseUnion = val; } + + /** + * This method is called when reading CTest custom file + */ + void PopulateCustomVectors(cmMakefile *mf); + + ///! Control the use of the regular expresisons, call these methods to turn + ///them on + void UseIncludeRegExp(); + void UseExcludeRegExp(); + void SetIncludeRegExp(const char *); + void SetExcludeRegExp(const char *); + + + ///! pass the -I argument down + void SetTestsToRunInformation(const char*); + + cmCTestTestHandler(); + + /* + * Add the test to the list of tests to be executed + */ + bool AddTest(const std::vector& args); + + /* + * Set tests properties + */ + bool SetTestsProperties(const std::vector& args); + + void Initialize(); + + struct cmCTestTestProperties + { + cmStdString Name; + cmStdString Directory; + std::vector Args; + std::vector > ErrorRegularExpressions; + std::vector > RequiredRegularExpressions; + std::map Measurements; + bool IsInBasedOnREOptions; + bool WillFail; + double Timeout; + }; + + struct cmCTestTestResult + { + std::string Name; + std::string Path; + std::string FullCommandLine; + double ExecutionTime; + int ReturnValue; + int Status; + std::string CompletionStatus; + std::string Output; + std::string RegressionImages; + int TestCount; + cmCTestTestProperties* Properties; + }; + + // add configuraitons to a search path for an executable + static void AddConfigurations(cmCTest *ctest, + std::vector &attempted, + std::vector &attemptedConfigs, + std::string filepath, + std::string &filename); + + // full signature static method to find an executable + static std::string FindExecutable(cmCTest *ctest, + const char *testCommand, + std::string &resultingConfig, + std::vector &extraPaths, + std::vector &failed); + +protected: + virtual int PreProcessHandler(); + virtual int PostProcessHandler(); + virtual void GenerateTestCommand(std::vector& args); + int ExecuteCommands(std::vector& vec); + + //! Clean test output to specified length + bool CleanTestOutput(std::string& output, size_t length); + + double ElapsedTestingTime; + + typedef std::vector TestResultsVector; + TestResultsVector TestResults; + + std::vector CustomTestsIgnore; + std::string StartTest; + std::string EndTest; + unsigned int StartTestTime; + unsigned int EndTestTime; + bool MemCheck; + int CustomMaximumPassedTestOutputSize; + int CustomMaximumFailedTestOutputSize; +protected: + /** + * Run one test + */ + virtual void ProcessOneTest(cmCTestTestProperties *props, + std::vector &passed, + std::vector &failed, + int count, int tmsize); + + + +private: + enum { // Program statuses + NOT_RUN = 0, + TIMEOUT, + SEGFAULT, + ILLEGAL, + INTERRUPT, + NUMERICAL, + OTHER_FAULT, + FAILED, + BAD_COMMAND, + COMPLETED + }; + + + /** + * Generate the Dart compatible output + */ + virtual void GenerateDartOutput(std::ostream& os); + + /** + * Run the tests for a directory and any subdirectories + */ + void ProcessDirectory(std::vector &passed, + std::vector &failed); + + typedef std::vector ListOfTests; + /** + * Get the list of tests in directory and subdirectories. + */ + void GetListOfTests(); + + /** + * Find the executable for a test + */ + std::string FindTheExecutable(const char *exe); + + const char* GetTestStatus(int status); + void ExpandTestsToRunInformation(int numPossibleTests); + + std::vector CustomPreTest; + std::vector CustomPostTest; + + std::vector TestsToRun; + + bool UseIncludeRegExpFlag; + bool UseExcludeRegExpFlag; + bool UseExcludeRegExpFirst; + std::string IncludeRegExp; + std::string ExcludeRegExp; + cmsys::RegularExpression IncludeTestsRegularExpression; + cmsys::RegularExpression ExcludeTestsRegularExpression; + + std::string GenerateRegressionImages(const std::string& xml); + + std::string TestsToRunString; + bool UseUnion; + ListOfTests TestList; + cmsys::RegularExpression DartStuff; + + std::ostream* LogFile; +}; + +#endif diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx new file mode 100755 index 000000000..2ba292833 --- /dev/null +++ b/Source/CTest/cmCTestUpdateCommand.cxx @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestUpdateCommand.cxx,v $ + Language: C++ + Date: $Date: 2006-07-11 19:58:07 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTestUpdateCommand.h" + +#include "cmCTest.h" +#include "cmCTestGenericHandler.h" + +cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler() +{ + if ( this->Values[ct_SOURCE] ) + { + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Values[ct_SOURCE]).c_str()); + } + else + { + this->CTest->SetCTestConfiguration("SourceDirectory", + cmSystemTools::CollapseFullPath( + this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")).c_str()); + } + std::string source_dir + = this->CTest->GetCTestConfiguration("SourceDirectory"); + + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "UpdateCommand", "CTEST_UPDATE_COMMAND"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "UpdateOptions", "CTEST_UPDATE_OPTIONS"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "CVSCommand", "CTEST_CVS_COMMAND"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "CVSUpdateOptions", "CTEST_CVS_UPDATE_OPTIONS"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "SVNCommand", "CTEST_SVN_COMMAND"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "SVNUpdateOptions", "CTEST_SVN_UPDATE_OPTIONS"); + + const char* initialCheckoutCommand + = this->Makefile->GetDefinition("CTEST_CHECKOUT_COMMAND"); + if ( !initialCheckoutCommand ) + { + initialCheckoutCommand = + this->Makefile->GetDefinition("CTEST_CVS_CHECKOUT"); + } + + cmCTestGenericHandler* handler + = this->CTest->GetInitializedHandler("update"); + if ( !handler ) + { + this->SetError("internal CTest error. Cannot instantiate update handler"); + return 0; + } + handler->SetCommand(this); + if ( source_dir.empty() ) + { + this->SetError("source directory not specified. Please use SOURCE tag"); + return 0; + } + handler->SetOption("SourceDirectory", source_dir.c_str()); + if ( initialCheckoutCommand ) + { + handler->SetOption("InitialCheckout", initialCheckoutCommand); + } + if ( (!cmSystemTools::FileExists(source_dir.c_str()) || + !cmSystemTools::FileIsDirectory(source_dir.c_str())) + && !initialCheckoutCommand ) + { + cmOStringStream str; + str << "cannot find source directory: " << source_dir.c_str() << "."; + if ( !cmSystemTools::FileExists(source_dir.c_str()) ) + { + str << " Looks like it is not checked out yet. Please specify " + "CTEST_CHECKOUT_COMMAND."; + } + this->SetError(str.str().c_str()); + return 0; + } + return handler; +} + + diff --git a/Source/CTest/cmCTestUpdateCommand.h b/Source/CTest/cmCTestUpdateCommand.h new file mode 100755 index 000000000..6217743df --- /dev/null +++ b/Source/CTest/cmCTestUpdateCommand.h @@ -0,0 +1,76 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestUpdateCommand.h,v $ + Language: C++ + Date: $Date: 2006-03-29 17:01:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCTestUpdateCommand_h +#define cmCTestUpdateCommand_h + +#include "cmCTestHandlerCommand.h" + +/** \class cmCTestUpdate + * \brief Run a ctest script + * + * cmCTestUpdateCommand defineds the command to updates the repository. + */ +class cmCTestUpdateCommand : public cmCTestHandlerCommand +{ +public: + + cmCTestUpdateCommand() {} + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmCTestUpdateCommand* ni = new cmCTestUpdateCommand; + ni->CTest = this->CTest; + ni->CTestScriptHandler = this->CTestScriptHandler; + return ni; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "CTEST_UPDATE";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Updates the repository."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " CTEST_UPDATE([SOURCE source] [RETURN_VALUE res])\n" + "Updates the given source directory and stores results in Update.xml. " + "The second argument is a variable that will hold the number of files " + "modified. If there is a problem, the variable will be -1."; + } + + cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand); + +protected: + cmCTestGenericHandler* InitializeHandler(); +}; + + +#endif diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx new file mode 100755 index 000000000..624fcdc6a --- /dev/null +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -0,0 +1,1115 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestUpdateHandler.cxx,v $ + Language: C++ + Date: $Date: 2008-01-31 21:38:14 $ + Version: $Revision: 1.41 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCTestUpdateHandler.h" + +#include "cmCTest.h" +#include "cmake.h" +#include "cmMakefile.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" +#include "cmVersion.h" +#include "cmGeneratedFileStream.h" +#include "cmXMLParser.h" + +//#include +#include + +// used for sleep +#ifdef _WIN32 +#include "windows.h" +#endif + +#include +#include +#include + +//---------------------------------------------------------------------- +static const char* cmCTestUpdateHandlerUpdateStrings[] = +{ + "Unknown", + "CVS", + "SVN" +}; + +static const char* cmCTestUpdateHandlerUpdateToString(int type) +{ + if ( type < cmCTestUpdateHandler::e_UNKNOWN || + type >= cmCTestUpdateHandler::e_LAST ) + { + return cmCTestUpdateHandlerUpdateStrings[cmCTestUpdateHandler::e_UNKNOWN]; + } + return cmCTestUpdateHandlerUpdateStrings[type]; +} + +//---------------------------------------------------------------------- +//********************************************************************** +class cmCTestUpdateHandlerSVNXMLParser : public cmXMLParser +{ +public: + struct t_CommitLog + { + int Revision; + std::string Author; + std::string Date; + std::string Message; + }; + cmCTestUpdateHandlerSVNXMLParser(cmCTestUpdateHandler* up) + : cmXMLParser(), UpdateHandler(up), MinRevision(-1), MaxRevision(-1) + { + } + + int Parse(const char* str) + { + this->MinRevision = -1; + this->MaxRevision = -1; + int res = this->cmXMLParser::Parse(str); + if ( this->MinRevision == -1 || this->MaxRevision == -1 ) + { + return 0; + } + return res; + } + + typedef std::vector t_VectorOfCommits; + + t_VectorOfCommits* GetCommits() { return &this->Commits; } + int GetMinRevision() { return this->MinRevision; } + int GetMaxRevision() { return this->MaxRevision; } + +protected: + void StartElement(const char* name, const char** atts) + { + if ( strcmp(name, "logentry") == 0 ) + { + this->CommitLog = t_CommitLog(); + const char* rev = this->FindAttribute(atts, "revision"); + if ( rev) + { + this->CommitLog.Revision = atoi(rev); + if ( this->MinRevision < 0 || + this->MinRevision > this->CommitLog.Revision ) + { + this->MinRevision = this->CommitLog.Revision; + } + if ( this->MaxRevision < 0 || + this->MaxRevision < this->CommitLog.Revision ) + { + this->MaxRevision = this->CommitLog.Revision; + } + } + } + this->CharacterData.erase( + this->CharacterData.begin(), this->CharacterData.end()); + } + void EndElement(const char* name) + { + if ( strcmp(name, "logentry") == 0 ) + { + cmCTestLog(this->UpdateHandler->GetCTestInstance(), + HANDLER_VERBOSE_OUTPUT, + "\tRevision: " << this->CommitLog.Revision<< std::endl + << "\tAuthor: " << this->CommitLog.Author.c_str() << std::endl + << "\tDate: " << this->CommitLog.Date.c_str() << std::endl + << "\tMessage: " << this->CommitLog.Message.c_str() << std::endl); + this->Commits.push_back(this->CommitLog); + } + else if ( strcmp(name, "author") == 0 ) + { + this->CommitLog.Author.assign(&(*(this->CharacterData.begin())), + this->CharacterData.size()); + } + else if ( strcmp(name, "date") == 0 ) + { + this->CommitLog.Date.assign(&(*(this->CharacterData.begin())), + this->CharacterData.size()); + } + else if ( strcmp(name, "msg") == 0 ) + { + this->CommitLog.Message.assign(&(*(this->CharacterData.begin())), + this->CharacterData.size()); + } + this->CharacterData.erase(this->CharacterData.begin(), + this->CharacterData.end()); + } + void CharacterDataHandler(const char* data, int length) + { + this->CharacterData.insert(this->CharacterData.end(), data, data+length); + } + const char* FindAttribute( const char** atts, const char* attribute ) + { + if ( !atts || !attribute ) + { + return 0; + } + const char **atr = atts; + while ( *atr && **atr && **(atr+1) ) + { + if ( strcmp(*atr, attribute) == 0 ) + { + return *(atr+1); + } + atr+=2; + } + return 0; + } + +private: + std::vector CharacterData; + cmCTestUpdateHandler* UpdateHandler; + t_CommitLog CommitLog; + + t_VectorOfCommits Commits; + int MinRevision; + int MaxRevision; +}; +//********************************************************************** +//---------------------------------------------------------------------- + +//---------------------------------------------------------------------- +cmCTestUpdateHandler::cmCTestUpdateHandler() +{ +} + +//---------------------------------------------------------------------- +void cmCTestUpdateHandler::Initialize() +{ + this->Superclass::Initialize(); +} + +//---------------------------------------------------------------------- +int cmCTestUpdateHandler::DetermineType(const char* cmd, const char* type) +{ + cmCTestLog(this->CTest, DEBUG, "Determine update type from command: " << cmd + << " and type: " << type << std::endl); + if ( type && *type ) + { + cmCTestLog(this->CTest, DEBUG, "Type specified: " << type << std::endl); + std::string stype = cmSystemTools::LowerCase(type); + if ( stype.find("cvs") != std::string::npos ) + { + return cmCTestUpdateHandler::e_CVS; + } + if ( stype.find("svn") != std::string::npos ) + { + return cmCTestUpdateHandler::e_SVN; + } + } + else + { + cmCTestLog(this->CTest, DEBUG, "Type not specified, check command: " + << cmd << std::endl); + std::string stype = cmSystemTools::LowerCase(cmd); + if ( stype.find("cvs") != std::string::npos ) + { + return cmCTestUpdateHandler::e_CVS; + } + if ( stype.find("svn") != std::string::npos ) + { + return cmCTestUpdateHandler::e_SVN; + } + } + std::string sourceDirectory = this->GetOption("SourceDirectory"); + cmCTestLog(this->CTest, DEBUG, "Check directory: " + << sourceDirectory.c_str() << std::endl); + sourceDirectory += "/.svn"; + if ( cmSystemTools::FileExists(sourceDirectory.c_str()) ) + { + return cmCTestUpdateHandler::e_SVN; + } + sourceDirectory = this->GetOption("SourceDirectory"); + sourceDirectory += "/CVS"; + if ( cmSystemTools::FileExists(sourceDirectory.c_str()) ) + { + return cmCTestUpdateHandler::e_CVS; + } + return cmCTestUpdateHandler::e_UNKNOWN; +} + +//---------------------------------------------------------------------- +//clearly it would be nice if this were broken up into a few smaller +//functions and commented... +int cmCTestUpdateHandler::ProcessHandler() +{ + int count = 0; + int updateType = e_CVS; + std::string::size_type cc, kk; + bool updateProducedError = false; + std::string goutput; + std::string errors; + + std::string checkoutErrorMessages; + int retVal = 0; + + // Get source dir + const char* sourceDirectory = this->GetOption("SourceDirectory"); + if ( !sourceDirectory ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find SourceDirectory key in the DartConfiguration.tcl" + << std::endl); + return -1; + } + + cmGeneratedFileStream ofs; + if ( !this->CTest->GetShowOnly() ) + { + this->StartLogFile("Update", ofs); + } + + cmCTestLog(this->CTest, HANDLER_OUTPUT, + "Updating the repository" << std::endl); + + const char* initialCheckoutCommand = this->GetOption("InitialCheckout"); + if ( initialCheckoutCommand ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " First perform the initial checkout: " << initialCheckoutCommand + << std::endl); + cmStdString parent = cmSystemTools::GetParentDirectory(sourceDirectory); + if ( parent.empty() ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Something went wrong when trying " + "to determine the parent directory of " << sourceDirectory + << std::endl); + return -1; + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Perform checkout in directory: " << parent.c_str() << std::endl); + if ( !cmSystemTools::MakeDirectory(parent.c_str()) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot create parent directory: " << parent.c_str() + << " of the source directory: " << sourceDirectory << std::endl); + return -1; + } + ofs << "* Run initial checkout" << std::endl; + ofs << " Command: " << initialCheckoutCommand << std::endl; + cmCTestLog(this->CTest, DEBUG, " Before: " + << initialCheckoutCommand << std::endl); + bool retic = this->CTest->RunCommand(initialCheckoutCommand, &goutput, + &errors, &retVal, parent.c_str(), 0 /* Timeout */); + cmCTestLog(this->CTest, DEBUG, " After: " + << initialCheckoutCommand << std::endl); + ofs << " Output: " << goutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + if ( !retic || retVal ) + { + cmOStringStream ostr; + ostr << "Problem running initial checkout Output [" << goutput + << "] Errors [" << errors << "]"; + cmCTestLog(this->CTest, ERROR_MESSAGE, ostr.str().c_str() << std::endl); + checkoutErrorMessages += ostr.str(); + updateProducedError = true; + } + if(!this->CTest->InitializeFromCommand(this->Command)) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Fatal Error in initialize: " + << std::endl); + cmSystemTools::SetFatalErrorOccured(); + return -1; + } + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Updating the repository: " + << sourceDirectory << std::endl); + + // Get update command + std::string updateCommand + = this->CTest->GetCTestConfiguration("UpdateCommand"); + if ( updateCommand.empty() ) + { + updateCommand = this->CTest->GetCTestConfiguration("CVSCommand"); + if ( updateCommand.empty() ) + { + updateCommand = this->CTest->GetCTestConfiguration("SVNCommand"); + if ( updateCommand.empty() ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Cannot find CVSCommand, SVNCommand, or UpdateCommand key in the " + "DartConfiguration.tcl" << std::endl); + return -1; + } + else + { + updateType = e_SVN; + } + } + else + { + updateType = e_CVS; + } + } + else + { + updateType = this->DetermineType(updateCommand.c_str(), + this->CTest->GetCTestConfiguration("UpdateType").c_str()); + } + + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Use " + << cmCTestUpdateHandlerUpdateToString(updateType) << " repository type" + << std::endl;); + + // And update options + std::string updateOptions + = this->CTest->GetCTestConfiguration("UpdateOptions"); + if ( updateOptions.empty() ) + { + switch (updateType) + { + case cmCTestUpdateHandler::e_CVS: + updateOptions = this->CTest->GetCTestConfiguration("CVSUpdateOptions"); + if ( updateOptions.empty() ) + { + updateOptions = "-dP"; + } + break; + case cmCTestUpdateHandler::e_SVN: + updateOptions = this->CTest->GetCTestConfiguration("SVNUpdateOptions"); + break; + } + } + + // Get update time + std::string extra_update_opts; + if ( this->CTest->GetTestModel() == cmCTest::NIGHTLY ) + { + struct tm* t = this->CTest->GetNightlyTime( + this->CTest->GetCTestConfiguration("NightlyStartTime"), + this->CTest->GetTomorrowTag()); + char current_time[1024]; + sprintf(current_time, "%04d-%02d-%02d %02d:%02d:%02d", + t->tm_year + 1900, + t->tm_mon + 1, + t->tm_mday, + t->tm_hour, + t->tm_min, + t->tm_sec); + std::string today_update_date = current_time; + + // TODO: SVN + switch ( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + extra_update_opts += "-D \"" + today_update_date +" UTC\""; + break; + case cmCTestUpdateHandler::e_SVN: + extra_update_opts += "-r \"{" + today_update_date +" +0000}\""; + break; + } + } + + bool res = true; + + updateCommand = "\"" + updateCommand + "\""; + + // First, check what the current state of repository is + std::string command = ""; + switch( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + // TODO: CVS - for now just leave empty + break; + case cmCTestUpdateHandler::e_SVN: + command = updateCommand + " cleanup"; + break; + } + + // + // Get initial repository information if that is possible. With subversion, + // this will check the current revision. + // + if ( !command.empty() ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "* Cleanup repository: " << command.c_str() << std::endl); + if ( !this->CTest->GetShowOnly() ) + { + ofs << "* Cleanup repository" << std::endl; + ofs << " Command: " << command.c_str() << std::endl; + res = this->CTest->RunCommand(command.c_str(), &goutput, &errors, + &retVal, sourceDirectory, 0 /*this->TimeOut*/); + + ofs << " Output: " << goutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + if ( ofs ) + { + ofs << "--- Cleanup ---" << std::endl; + ofs << goutput << std::endl; + } + } + else + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Cleanup with command: " << command << std::endl); + } + } + + // First, check what the current state of repository is + command = ""; + switch( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + // TODO: CVS - for now just leave empty + break; + case cmCTestUpdateHandler::e_SVN: + command = updateCommand + " info"; + break; + } + + // CVS variables + // SVN variables + int svn_current_revision = 0; + int svn_latest_revision = 0; + int svn_use_status = 0; + + // + // Get initial repository information if that is possible. With subversion, + // this will check the current revision. + // + if ( !command.empty() ) + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "* Get repository information: " << command.c_str() << std::endl); + if ( !this->CTest->GetShowOnly() ) + { + ofs << "* Get repository information" << std::endl; + ofs << " Command: " << command.c_str() << std::endl; + res = this->CTest->RunCommand(command.c_str(), &goutput, &errors, + &retVal, sourceDirectory, 0 /*this->TimeOut*/); + + ofs << " Output: " << goutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + if ( ofs ) + { + ofs << "--- Update information ---" << std::endl; + ofs << goutput << std::endl; + } + switch ( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + // TODO: CVS - for now just leave empty + break; + case cmCTestUpdateHandler::e_SVN: + { + cmsys::RegularExpression current_revision_regex( + "Revision: ([0-9]+)"); + if ( current_revision_regex.find(goutput.c_str()) ) + { + std::string currentRevisionString + = current_revision_regex.match(1); + svn_current_revision = atoi(currentRevisionString.c_str()); + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Old revision of repository is: " << svn_current_revision + << std::endl); + } + } + break; + } + } + else + { + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "Get information with command: " << command << std::endl); + } + } + + + // + // Now update repository and remember what files were updated + // + cmGeneratedFileStream os; + if ( !this->StartResultingXML("Update", os) ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot open log file" + << std::endl); + return -1; + } + std::string start_time = this->CTest->CurrentTime(); + unsigned int start_time_time = + static_cast(cmSystemTools::GetTime()); + double elapsed_time_start = cmSystemTools::GetTime(); + + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "* Update repository: " + << command.c_str() << std::endl); + if ( !this->CTest->GetShowOnly() ) + { + command = ""; + switch( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + command = updateCommand + " -z3 update " + updateOptions + + " " + extra_update_opts; + ofs << "* Update repository: " << std::endl; + ofs << " Command: " << command.c_str() << std::endl; + res = this->CTest->RunCommand(command.c_str(), &goutput, &errors, + &retVal, sourceDirectory, 0 /*this->TimeOut*/); + ofs << " Output: " << goutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + break; + case cmCTestUpdateHandler::e_SVN: + { + std::string partialOutput; + command = updateCommand + " update " + updateOptions + + " " + extra_update_opts; + ofs << "* Update repository: " << std::endl; + ofs << " Command: " << command.c_str() << std::endl; + bool res1 = this->CTest->RunCommand(command.c_str(), &partialOutput, + &errors, + &retVal, sourceDirectory, 0 /*this->TimeOut*/); + ofs << " Output: " << partialOutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + goutput = partialOutput; + command = updateCommand + " status"; + ofs << "* Status repository: " << std::endl; + ofs << " Command: " << command.c_str() << std::endl; + res = this->CTest->RunCommand(command.c_str(), &partialOutput, + &errors, &retVal, sourceDirectory, 0 /*this->TimeOut*/); + ofs << " Output: " << partialOutput.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + goutput += partialOutput; + res = res && res1; + ofs << " Total output of update: " << goutput.c_str() << std::endl; + } + } + if ( ofs ) + { + ofs << "--- Update repository ---" << std::endl; + ofs << goutput << std::endl; + } + } + if ( !res || retVal ) + { + updateProducedError = true; + checkoutErrorMessages += " " + goutput; + } + + os << "\n" + << "\n" + << "\t" << this->CTest->GetCTestConfiguration("Site") << "\n" + << "\t" << this->CTest->GetCTestConfiguration("BuildName") + << "\n" + << "\t" << this->CTest->GetCurrentTag() << "-" + << this->CTest->GetTestModelString() << "" << std::endl; + os << "\t" << start_time << "\n" + << "\t" << start_time_time << "\n" + << "\t" << this->CTest->MakeXMLSafe(command) + << "\n" + << "\t" << this->CTest->MakeXMLSafe( + cmCTestUpdateHandlerUpdateToString(updateType)) + << "\n"; + + // Even though it failed, we may have some useful information. Try to + // continue... + std::vector lines; + cmSystemTools::Split(goutput.c_str(), lines); + std::vector errLines; + cmSystemTools::Split(errors.c_str(), errLines); + lines.insert(lines.end(), errLines.begin(), errLines.end()); + + // CVS style regular expressions + cmsys::RegularExpression cvs_date_author_regex( + "^date: +([^;]+); +author: +([^;]+); +state: +[^;]+;"); + cmsys::RegularExpression cvs_revision_regex("^revision +([^ ]*) *$"); + cmsys::RegularExpression cvs_end_of_file_regex( + "^==========================================" + "===================================$"); + cmsys::RegularExpression cvs_end_of_comment_regex( + "^----------------------------$"); + + // Subversion style regular expressions + cmsys::RegularExpression svn_status_line_regex( + "^ *([0-9]+) *([0-9]+) *([^ ]+) *([^ ][^\t\r\n]*)[ \t\r\n]*$"); + cmsys::RegularExpression svn_latest_revision_regex( + "(Updated to|At) revision ([0-9]+)\\."); + + cmsys::RegularExpression file_removed_line( + "cvs update: `(.*)' is no longer in the repository"); + cmsys::RegularExpression file_update_line("([A-Z]) *(.*)"); + std::string current_path = ""; + bool first_file = true; + + cmCTestUpdateHandler::AuthorsToUpdatesMap authors_files_map; + int numUpdated = 0; + int numModiefied = 0; + int numConflicting = 0; + // In subversion, get the latest revision + if ( updateType == cmCTestUpdateHandler::e_SVN ) + { + for ( cc= 0; cc < lines.size(); cc ++ ) + { + const char* line = lines[cc].c_str(); + if ( svn_latest_revision_regex.find(line) ) + { + svn_latest_revision = atoi( + svn_latest_revision_regex.match(2).c_str()); + } + } + if ( svn_latest_revision <= 0 ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Problem determining the current " + "revision of the repository from output:" << std::endl + << goutput.c_str() << std::endl); + } + else + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Current revision of repository is: " << svn_latest_revision + << std::endl); + } + } + + cmCTestLog(this->CTest, HANDLER_OUTPUT, + " Gathering version information (each . represents one updated file):" + << std::endl); + int file_count = 0; + std::string removed_line; + for ( cc= 0; cc < lines.size(); cc ++ ) + { + const char* line = lines[cc].c_str(); + if ( file_removed_line.find(line) ) + { + removed_line = "D " + file_removed_line.match(1); + line = removed_line.c_str(); + } + if ( file_update_line.find(line) ) + { + if ( file_count == 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " " << std::flush); + } + cmCTestLog(this->CTest, HANDLER_OUTPUT, "." << std::flush); + std::string upChar = file_update_line.match(1); + std::string upFile = file_update_line.match(2); + char mod = upChar[0]; + bool modifiedOrConflict = false; + if ( mod == 'X') + { + continue; + } + if ( mod != 'M' && mod != 'C' && mod != 'G' ) + { + count ++; + modifiedOrConflict = true; + } + const char* file = upFile.c_str(); + cmCTestLog(this->CTest, DEBUG, "Line" << cc << ": " << mod << " - " + << file << std::endl); + + std::string output; + if ( modifiedOrConflict ) + { + std::string logcommand; + switch ( updateType ) + { + case cmCTestUpdateHandler::e_CVS: + logcommand = updateCommand + " -z3 log -N \"" + file + "\""; + break; + case cmCTestUpdateHandler::e_SVN: + if ( svn_latest_revision > 0 && + svn_latest_revision > svn_current_revision ) + { + cmOStringStream logCommandStream; + logCommandStream << updateCommand << " log -r " + << svn_current_revision << ":" << svn_latest_revision + << " --xml \"" << file << "\""; + logcommand = logCommandStream.str(); + } + else + { + logcommand = updateCommand + + " status --verbose \"" + file + "\""; + svn_use_status = 1; + } + break; + } + cmCTestLog(this->CTest, DEBUG, "Do log: " << logcommand << std::endl); + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, + "* Get file update information: " << logcommand.c_str() + << std::endl); + ofs << "* Get log information for file: " << file << std::endl; + ofs << " Command: " << logcommand.c_str() << std::endl; + res = this->CTest->RunCommand(logcommand.c_str(), &output, &errors, + &retVal, sourceDirectory, 0 /*this->TimeOut*/); + ofs << " Output: " << output.c_str() << std::endl; + ofs << " Errors: " << errors.c_str() << std::endl; + if ( ofs ) + { + ofs << output << std::endl; + } + } + if ( res ) + { + cmCTestLog(this->CTest, DEBUG, output << std::endl); + std::string::size_type sline = 0; + std::string srevision1 = "Unknown"; + std::string sdate1 = "Unknown"; + std::string sauthor1 = "Unknown"; + std::string semail1 = "Unknown"; + std::string comment1 = ""; + std::string srevision2 = "Unknown"; + std::string sdate2 = "Unknown"; + std::string sauthor2 = "Unknown"; + std::string comment2 = ""; + std::string semail2 = "Unknown"; + if ( updateType == cmCTestUpdateHandler::e_CVS ) + { + bool have_first = false; + bool have_second = false; + std::vector ulines; + cmSystemTools::Split(output.c_str(), ulines); + for ( kk = 0; kk < ulines.size(); kk ++ ) + { + const char* clp = ulines[kk].c_str(); + if ( !have_second && !sline && cvs_revision_regex.find(clp) ) + { + if ( !have_first ) + { + srevision1 = cvs_revision_regex.match(1); + } + else + { + srevision2 = cvs_revision_regex.match(1); + } + } + else if ( !have_second && !sline && + cvs_date_author_regex.find(clp) ) + { + sline = kk + 1; + if ( !have_first ) + { + sdate1 = cvs_date_author_regex.match(1); + sauthor1 = cvs_date_author_regex.match(2); + } + else + { + sdate2 = cvs_date_author_regex.match(1); + sauthor2 = cvs_date_author_regex.match(2); + } + } + else if ( sline && cvs_end_of_comment_regex.find(clp) || + cvs_end_of_file_regex.find(clp)) + { + if ( !have_first ) + { + have_first = true; + } + else if ( !have_second ) + { + have_second = true; + } + sline = 0; + } + else if ( sline ) + { + if ( !have_first ) + { + comment1 += clp; + comment1 += "\n"; + } + else + { + comment2 += clp; + comment2 += "\n"; + } + } + } + } + else if ( updateType == cmCTestUpdateHandler::e_SVN ) + { + if ( svn_use_status ) + { + cmOStringStream str; + str << svn_current_revision; + srevision1 = str.str(); + if (!svn_status_line_regex.find(output)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Bad output from SVN status command: " << output + << std::endl); + } + else if ( svn_status_line_regex.match(4) != file ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Bad output from SVN status command. " + "The file name returned: \"" + << svn_status_line_regex.match(4) + << "\" was different than the file specified: \"" << file + << "\"" << std::endl); + } + else + { + srevision1 = svn_status_line_regex.match(2); + int latest_revision = atoi( + svn_status_line_regex.match(2).c_str()); + if ( svn_current_revision < latest_revision ) + { + srevision2 = str.str(); + } + sauthor1 = svn_status_line_regex.match(3); + } + } + else + { + cmCTestUpdateHandlerSVNXMLParser parser(this); + if ( parser.Parse(output.c_str()) ) + { + int minrev = parser.GetMinRevision(); + int maxrev = parser.GetMaxRevision(); + cmCTestUpdateHandlerSVNXMLParser:: + t_VectorOfCommits::iterator it; + for ( it = parser.GetCommits()->begin(); + it != parser.GetCommits()->end(); + ++ it ) + { + if ( it->Revision == maxrev ) + { + cmOStringStream mRevStream; + mRevStream << maxrev; + srevision1 = mRevStream.str(); + sauthor1 = it->Author; + comment1 = it->Message; + sdate1 = it->Date; + } + else if ( it->Revision == minrev ) + { + cmOStringStream mRevStream; + mRevStream << minrev; + srevision2 = mRevStream.str(); + sauthor2 = it->Author; + comment2 = it->Message; + sdate2 = it->Date; + } + } + } + } + } + if ( mod == 'M' ) + { + comment1 = "Locally modified file\n"; + sauthor1 = "Local User"; + } + if ( mod == 'D' ) + { + comment1 += " - Removed file\n"; + } + if ( mod == 'C' ) + { + comment1 = "Conflict while updating\n"; + sauthor1 = "Local User"; + } + std::string path = cmSystemTools::GetFilenamePath(file); + std::string fname = cmSystemTools::GetFilenameName(file); + if ( path != current_path ) + { + if ( !first_file ) + { + os << "\t" << std::endl; + } + else + { + first_file = false; + } + os << "\t\n" + << "\t\t" << path << "" << std::endl; + } + if ( mod == 'C' ) + { + numConflicting ++; + os << "\t" << std::endl; + } + else if ( mod == 'G' ) + { + numConflicting ++; + os << "\t" << std::endl; + } + else if ( mod == 'M' ) + { + numModiefied ++; + os << "\t" << std::endl; + } + else + { + numUpdated ++; + os << "\t" << std::endl; + } + if ( srevision2 == "Unknown" ) + { + srevision2 = srevision1; + } + cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "File: " + << path.c_str() << " / " << fname.c_str() << " was updated by " + << sauthor1.c_str() << " to revision: " << srevision1.c_str() + << " from revision: " << srevision2.c_str() << std::endl); + os << "\t\t" + << cmCTest::MakeXMLSafe(fname) + << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(path) + << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(file) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(sdate1) + << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(sauthor1) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(semail1) << "\n" + << "\t\t" << cmCTest::MakeXMLSafe(comment1) << "\n" + << "\t\t" << srevision1 << "\n" + << "\t\t" << srevision2 << "" + << std::endl; + if ( srevision2 != srevision1 ) + { + os + << "\t\t\n" + << "\t\t\t" << srevision1 << "\n" + << "\t\t\t" << srevision2 + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(sauthor1) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(sdate1) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(comment1) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(semail1) + << "\n" + << "\t\t\n" + << "\t\t\n" + << "\t\t\t" << srevision2 << "\n" + << "\t\t\t" << srevision2 + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(sauthor2) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(sdate2) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(comment2) + << "\n" + << "\t\t\t" << cmCTest::MakeXMLSafe(semail2) + << "\n" + << "\t\t" << std::endl; + } + if ( mod == 'C' ) + { + os << "\t" << std::endl; + } + else if ( mod == 'G' ) + { + os << "\t" << std::endl; + } + else if ( mod == 'M' ) + { + os << "\t" << std::endl; + } + else + { + os << "\t" << std::endl; + } + cmCTestUpdateHandler::UpdateFiles *u = &authors_files_map[sauthor1]; + cmCTestUpdateHandler::StringPair p; + p.first = path; + p.second = fname; + u->push_back(p); + + current_path = path; + } + file_count ++; + } + } + if ( file_count ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl); + } + if ( numUpdated ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Found " << numUpdated + << " updated files" << std::endl); + } + if ( numModiefied ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Found " << numModiefied + << " locally modified files" + << std::endl); + } + if ( numConflicting ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Found " << numConflicting + << " conflicting files" + << std::endl); + } + if ( numModiefied == 0 && numConflicting == 0 && numUpdated == 0 ) + { + cmCTestLog(this->CTest, HANDLER_OUTPUT, " Project is up-to-date" + << std::endl); + } + if ( !first_file ) + { + os << "\t" << std::endl; + } + + cmCTestUpdateHandler::AuthorsToUpdatesMap::iterator it; + for ( it = authors_files_map.begin(); + it != authors_files_map.end(); + it ++ ) + { + os << "\t\n" + << "\t\t" << it->first << "" << std::endl; + cmCTestUpdateHandler::UpdateFiles *u = &(it->second); + for ( cc = 0; cc < u->size(); cc ++ ) + { + os << "\t\t" + << (*u)[cc].second << "" << std::endl; + } + os << "\t" << std::endl; + } + + cmCTestLog(this->CTest, DEBUG, "End" << std::endl); + std::string end_time = this->CTest->CurrentTime(); + os << "\t" << end_time << "\n" + << "\t" << static_cast(cmSystemTools::GetTime()) + << "\n" + << "" << + static_cast((cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0 + << "\n" + << "\t"; + if ( numModiefied > 0 || numConflicting > 0 ) + { + os << "Update error: There are modified or conflicting files in the " + "repository"; + cmCTestLog(this->CTest, ERROR_MESSAGE, + " There are modified or conflicting files in the repository" + << std::endl); + } + if ( updateProducedError ) + { + os << "Update error: "; + os << this->CTest->MakeXMLSafe(checkoutErrorMessages); + cmCTestLog(this->CTest, ERROR_MESSAGE, " Update with command: " + << command << " failed" << std::endl); + } + os << "" << std::endl; + os << "" << std::endl; + + if (! res ) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error(s) when updating the project" << std::endl); + cmCTestLog(this->CTest, ERROR_MESSAGE, "Output: " + << goutput << std::endl); + return -1; + } + return count; +} diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h new file mode 100755 index 000000000..6091f2b2a --- /dev/null +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -0,0 +1,73 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTestUpdateHandler.h,v $ + Language: C++ + Date: $Date: 2006-03-10 20:03:09 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTestUpdateHandler_h +#define cmCTestUpdateHandler_h + + +#include "cmCTestGenericHandler.h" +#include "cmListFileCache.h" + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1375 /* base class destructor not virtual */ +#endif + +/** \class cmCTestUpdateHandler + * \brief A class that handles ctest -S invocations + * + */ +class cmCTestUpdateHandler : public cmCTestGenericHandler +{ +public: + cmTypeMacro(cmCTestUpdateHandler, cmCTestGenericHandler); + + /* + * The main entry point for this class + */ + int ProcessHandler(); + + cmCTestUpdateHandler(); + + enum { + e_UNKNOWN = 0, + e_CVS, + e_SVN, + e_LAST + }; + + /** + * Initialize handler + */ + virtual void Initialize(); + +private: + // Some structures needed for update + struct StringPair : + public std::pair{}; + struct UpdateFiles : public std::vector{}; + struct AuthorsToUpdatesMap : + public std::map{}; + + // Determine the type of version control + int DetermineType(const char* cmd, const char* type); +}; + +#if defined(__sgi) && !defined(__GNUC__) +# pragma reset woff 1375 /* base class destructor not virtual */ +#endif + +#endif diff --git a/Source/CursesDialog/.NoDartCoverage b/Source/CursesDialog/.NoDartCoverage new file mode 100644 index 000000000..3c9972938 --- /dev/null +++ b/Source/CursesDialog/.NoDartCoverage @@ -0,0 +1 @@ +# do not do coverage in this directory diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt new file mode 100644 index 000000000..a6a16adda --- /dev/null +++ b/Source/CursesDialog/CMakeLists.txt @@ -0,0 +1,26 @@ + +SET( CURSES_SRCS + CursesDialog/cmCursesBoolWidget + CursesDialog/cmCursesCacheEntryComposite + CursesDialog/cmCursesDummyWidget + CursesDialog/cmCursesFilePathWidget + CursesDialog/cmCursesForm + CursesDialog/cmCursesLabelWidget + CursesDialog/cmCursesLongMessageForm + CursesDialog/cmCursesMainForm + CursesDialog/cmCursesPathWidget + CursesDialog/cmCursesStringWidget + CursesDialog/cmCursesWidget + CursesDialog/ccmake + ) + +INCLUDE_DIRECTORIES(${CMake_SOURCE_DIR}/Source/CursesDialog/form + ${CMake_BINARY_DIR}/Source/CursesDialog/form) +INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH}) + + +ADD_EXECUTABLE(ccmake ${CURSES_SRCS} ) +TARGET_LINK_LIBRARIES(ccmake CMakeLib) +TARGET_LINK_LIBRARIES(ccmake cmForm) + +INSTALL_TARGETS(/bin ccmake) diff --git a/Source/CursesDialog/ccmake.cxx b/Source/CursesDialog/ccmake.cxx new file mode 100644 index 000000000..4c931be1d --- /dev/null +++ b/Source/CursesDialog/ccmake.cxx @@ -0,0 +1,221 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: ccmake.cxx,v $ + Language: C++ + Date: $Date: 2007-12-13 22:56:50 $ + Version: $Revision: 1.37 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "../cmCacheManager.h" +#include "../cmSystemTools.h" +#include "../cmake.h" +#include "../cmDocumentation.h" + +#include +#include + +#include "cmCursesMainForm.h" +#include "cmCursesStandardIncludes.h" + +#include + +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " ccmake - Curses Interface for CMake.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " ccmake \n" + " ccmake ", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"ccmake\" executable is the CMake curses interface. Project " + "configuration settings may be specified interactively through " + "this GUI. Brief instructions are provided at the bottom of the " + "terminal when the program is running.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + CMAKE_STANDARD_OPTIONS_TABLE, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationSeeAlso[][3] = +{ + {0, "cmake", 0}, + {0, "ctest", 0}, + {0, 0, 0} +}; + +cmCursesForm* cmCursesForm::CurrentForm=0; + +extern "C" +{ + +void onsig(int) +{ + if (cmCursesForm::CurrentForm) + { + endwin(); + initscr(); /* Initialization */ + noecho(); /* Echo off */ + cbreak(); /* nl- or cr not needed */ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ + refresh(); + int x,y; + getmaxyx(stdscr, y, x); + cmCursesForm::CurrentForm->Render(1,1,x,y); + cmCursesForm::CurrentForm->UpdateStatusBar(); + } + signal(SIGWINCH, onsig); +} + +} + +void CMakeErrorHandler(const char* message, const char* title, bool&, void* clientData) +{ + cmCursesForm* self = static_cast( clientData ); + self->AddError(message, title); +} + +int main(int argc, char** argv) +{ + cmSystemTools::FindExecutableDirectory(argv[0]); + cmDocumentation doc; + if(doc.CheckOptions(argc, argv)) + { + cmake hcm; + std::vector commands; + std::vector compatCommands; + std::vector generators; + hcm.GetCommandDocumentation(commands, true, false); + hcm.GetCommandDocumentation(compatCommands, false, true); + hcm.GetGeneratorDocumentation(generators); + doc.SetName("ccmake"); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.SetSection("Generators",generators); + doc.SetSection("Options",cmDocumentationOptions); + doc.SetSection("Command",commands); + doc.SetSection("Compatibility Commands",compatCommands); + doc.SetSeeAlsoList(cmDocumentationSeeAlso); + return doc.PrintRequestedDocumentation(std::cout)? 0:1; + } + + bool debug = false; + unsigned int i; + int j; + std::vector args; + for(j =0; j < argc; ++j) + { + if(strcmp(argv[j], "-debug") == 0) + { + debug = true; + } + else + { + args.push_back(argv[j]); + } + } + + std::string cacheDir = cmSystemTools::GetCurrentWorkingDirectory(); + for(i=1; i < args.size(); ++i) + { + std::string arg = args[i]; + if(arg.find("-B",0) == 0) + { + cacheDir = arg.substr(2); + } + } + + cmSystemTools::DisableRunCommandOutput(); + + if (debug) + { + cmCursesForm::DebugStart(); + } + + initscr(); /* Initialization */ + noecho(); /* Echo off */ + cbreak(); /* nl- or cr not needed */ + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ + + signal(SIGWINCH, onsig); + + int x,y; + getmaxyx(stdscr, y, x); + if ( x < cmCursesMainForm::MIN_WIDTH || + y < cmCursesMainForm::MIN_HEIGHT ) + { + endwin(); + std::cerr << "Window is too small. A size of at least " + << cmCursesMainForm::MIN_WIDTH << " x " + << cmCursesMainForm::MIN_HEIGHT + << " is required to run ccmake." << std::endl; + return 1; + } + + + cmCursesMainForm* myform; + + myform = new cmCursesMainForm(args, x); + if(myform->LoadCache(cacheDir.c_str())) + { + curses_clear(); + touchwin(stdscr); + endwin(); + delete myform; + std::cerr << "Error running cmake::LoadCache(). Aborting.\n"; + return 1; + } + + cmSystemTools::SetErrorCallback(CMakeErrorHandler, myform); + + cmCursesForm::CurrentForm = myform; + + myform->InitializeUI(); + if ( myform->Configure(1) == 0 ) + { + myform->Render(1, 1, x, y); + myform->HandleInput(); + } + + // Need to clean-up better + curses_clear(); + touchwin(stdscr); + endwin(); + delete cmCursesForm::CurrentForm; + cmCursesForm::CurrentForm = 0; + + std::cout << std::endl << std::endl; + + return 0; + +} diff --git a/Source/CursesDialog/cmCursesBoolWidget.cxx b/Source/CursesDialog/cmCursesBoolWidget.cxx new file mode 100644 index 000000000..aea9a09fe --- /dev/null +++ b/Source/CursesDialog/cmCursesBoolWidget.cxx @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesBoolWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesBoolWidget.h" +#include "cmCursesMainForm.h" + +cmCursesBoolWidget::cmCursesBoolWidget(int width, int height, + int left, int top) : + cmCursesWidget(width, height, left, top) +{ + this->Type = cmCacheManager::BOOL; + set_field_fore(this->Field, A_NORMAL); + set_field_back(this->Field, A_STANDOUT); + field_opts_off(this->Field, O_STATIC); + this->SetValueAsBool(false); +} + +bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm*, WINDOW* w) +{ + + // 10 == enter + if (key == 10 || key == KEY_ENTER) + { + if (this->GetValueAsBool()) + { + this->SetValueAsBool(false); + } + else + { + this->SetValueAsBool(true); + } + + touchwin(w); + wrefresh(w); + return true; + } + else + { + return false; + } + +} + +void cmCursesBoolWidget::SetValueAsBool(bool value) +{ + if (value) + { + this->SetValue("ON"); + } + else + { + this->SetValue("OFF"); + } +} + +bool cmCursesBoolWidget::GetValueAsBool() +{ + if (this->Value == "ON") + { + return true; + } + else + { + return false; + } +} diff --git a/Source/CursesDialog/cmCursesBoolWidget.h b/Source/CursesDialog/cmCursesBoolWidget.h new file mode 100644 index 000000000..f873716ad --- /dev/null +++ b/Source/CursesDialog/cmCursesBoolWidget.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesBoolWidget.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesBoolWidget_h +#define __cmCursesBoolWidget_h + +#include "cmCursesWidget.h" +class cmCursesMainForm; + +class cmCursesBoolWidget : public cmCursesWidget +{ +public: + cmCursesBoolWidget(int width, int height, int left, int top); + + // Description: + // Handle user input. Called by the container of this widget + // when this widget has focus. Returns true if the input was + // handled. + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + + // Description: + // Set/Get the value (on/off). + void SetValueAsBool(bool value); + bool GetValueAsBool(); + +protected: + cmCursesBoolWidget(const cmCursesBoolWidget& from); + void operator=(const cmCursesBoolWidget&); + +}; + +#endif // __cmCursesBoolWidget_h diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.cxx b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx new file mode 100644 index 000000000..979c5a560 --- /dev/null +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.cxx @@ -0,0 +1,108 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesCacheEntryComposite.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 21:32:09 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesCacheEntryComposite.h" +#include "cmCursesStringWidget.h" +#include "cmCursesLabelWidget.h" +#include "cmCursesBoolWidget.h" +#include "cmCursesPathWidget.h" +#include "cmCursesFilePathWidget.h" +#include "cmCursesDummyWidget.h" +#include "../cmSystemTools.h" + +cmCursesCacheEntryComposite::cmCursesCacheEntryComposite(const char* key, + int labelwidth, + int entrywidth) : + Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) +{ + this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); + this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); + this->Entry = 0; + this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1); +} + +cmCursesCacheEntryComposite::cmCursesCacheEntryComposite( + const char* key, const cmCacheManager::CacheIterator& it, bool isNew, + int labelwidth, int entrywidth) + : Key(key), LabelWidth(labelwidth), EntryWidth(entrywidth) +{ + this->Label = new cmCursesLabelWidget(this->LabelWidth, 1, 1, 1, key); + if (isNew) + { + this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, "*"); + } + else + { + this->IsNewLabel = new cmCursesLabelWidget(1, 1, 1, 1, " "); + } + + this->Entry = 0; + switch ( it.GetType() ) + { + case cmCacheManager::BOOL: + this->Entry = new cmCursesBoolWidget(this->EntryWidth, 1, 1, 1); + if (cmSystemTools::IsOn(it.GetValue())) + { + static_cast(this->Entry)->SetValueAsBool(true); + } + else + { + static_cast(this->Entry)->SetValueAsBool(false); + } + break; + case cmCacheManager::PATH: + this->Entry = new cmCursesPathWidget(this->EntryWidth, 1, 1, 1); + static_cast(this->Entry)->SetString( + it.GetValue()); + break; + case cmCacheManager::FILEPATH: + this->Entry = new cmCursesFilePathWidget(this->EntryWidth, 1, 1, 1); + static_cast(this->Entry)->SetString( + it.GetValue()); + break; + case cmCacheManager::STRING: + this->Entry = new cmCursesStringWidget(this->EntryWidth, 1, 1, 1); + static_cast(this->Entry)->SetString( + it.GetValue()); + break; + case cmCacheManager::UNINITIALIZED: + cmSystemTools::Error("Found an undefined variable: ", it.GetName()); + break; + default: + // TODO : put warning message here + break; + } + +} + +cmCursesCacheEntryComposite::~cmCursesCacheEntryComposite() +{ + delete this->Label; + delete this->IsNewLabel; + delete this->Entry; +} + +const char* cmCursesCacheEntryComposite::GetValue() +{ + if (this->Label) + { + return this->Label->GetValue(); + } + else + { + return 0; + } +} diff --git a/Source/CursesDialog/cmCursesCacheEntryComposite.h b/Source/CursesDialog/cmCursesCacheEntryComposite.h new file mode 100644 index 000000000..80c7cc9fb --- /dev/null +++ b/Source/CursesDialog/cmCursesCacheEntryComposite.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesCacheEntryComposite.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesCacheEntryComposite_h +#define __cmCursesCacheEntryComposite_h + +#include "../cmCacheManager.h" +#include "cmCursesLabelWidget.h" + +class cmCursesCacheEntryComposite +{ +public: + cmCursesCacheEntryComposite(const char* key, int labelwidth, int entrywidth); + cmCursesCacheEntryComposite(const char* key, + const cmCacheManager::CacheIterator& it, + bool isNew, int labelwidth, int entrywidth); + ~cmCursesCacheEntryComposite(); + const char* GetValue(); + + friend class cmCursesMainForm; + +protected: + cmCursesCacheEntryComposite(const cmCursesCacheEntryComposite& from); + void operator=(const cmCursesCacheEntryComposite&); + + cmCursesLabelWidget* Label; + cmCursesLabelWidget* IsNewLabel; + cmCursesWidget* Entry; + std::string Key; + int LabelWidth; + int EntryWidth; +}; + +#endif // __cmCursesCacheEntryComposite_h diff --git a/Source/CursesDialog/cmCursesDummyWidget.cxx b/Source/CursesDialog/cmCursesDummyWidget.cxx new file mode 100644 index 000000000..3c41e6c6f --- /dev/null +++ b/Source/CursesDialog/cmCursesDummyWidget.cxx @@ -0,0 +1,31 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesDummyWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesDummyWidget.h" + +cmCursesDummyWidget::cmCursesDummyWidget(int width, int height, + int left, int top) : + cmCursesWidget(width, height, left, top) +{ + this->Type = cmCacheManager::INTERNAL; +} + + +bool cmCursesDummyWidget::HandleInput(int&, cmCursesMainForm*, WINDOW* ) +{ + return false; +} + diff --git a/Source/CursesDialog/cmCursesDummyWidget.h b/Source/CursesDialog/cmCursesDummyWidget.h new file mode 100644 index 000000000..35d390b30 --- /dev/null +++ b/Source/CursesDialog/cmCursesDummyWidget.h @@ -0,0 +1,41 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesDummyWidget.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesDummyWidget_h +#define __cmCursesDummyWidget_h + +#include "cmCursesWidget.h" + +class cmCursesMainForm; + +class cmCursesDummyWidget : public cmCursesWidget +{ +public: + cmCursesDummyWidget(int width, int height, int left, int top); + + // Description: + // Handle user input. Called by the container of this widget + // when this widget has focus. Returns true if the input was + // handled. + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + +protected: + cmCursesDummyWidget(const cmCursesDummyWidget& from); + void operator=(const cmCursesDummyWidget&); + +}; + +#endif // __cmCursesDummyWidget_h diff --git a/Source/CursesDialog/cmCursesFilePathWidget.cxx b/Source/CursesDialog/cmCursesFilePathWidget.cxx new file mode 100644 index 000000000..e3b5965d1 --- /dev/null +++ b/Source/CursesDialog/cmCursesFilePathWidget.cxx @@ -0,0 +1,25 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesFilePathWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesFilePathWidget.h" + +cmCursesFilePathWidget::cmCursesFilePathWidget(int width, int height, + int left, int top) : + cmCursesPathWidget(width, height, left, top) +{ + this->Type = cmCacheManager::FILEPATH; +} + diff --git a/Source/CursesDialog/cmCursesFilePathWidget.h b/Source/CursesDialog/cmCursesFilePathWidget.h new file mode 100644 index 000000000..fb4d8405e --- /dev/null +++ b/Source/CursesDialog/cmCursesFilePathWidget.h @@ -0,0 +1,33 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesFilePathWidget.h,v $ + Language: C++ + Date: $Date: 2002-11-05 13:52:31 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesFilePathWidget_h +#define __cmCursesFilePathWidget_h + +#include "cmCursesPathWidget.h" + +class cmCursesFilePathWidget : public cmCursesPathWidget +{ +public: + cmCursesFilePathWidget(int width, int height, int left, int top); + +protected: + cmCursesFilePathWidget(const cmCursesFilePathWidget& from); + void operator=(const cmCursesFilePathWidget&); + +}; + +#endif // __cmCursesFilePathWidget_h diff --git a/Source/CursesDialog/cmCursesForm.cxx b/Source/CursesDialog/cmCursesForm.cxx new file mode 100644 index 000000000..95a8b0c3e --- /dev/null +++ b/Source/CursesDialog/cmCursesForm.cxx @@ -0,0 +1,62 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesForm.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesForm.h" + +std::ofstream cmCursesForm::DebugFile; +bool cmCursesForm::Debug = false; + +cmCursesForm::cmCursesForm() +{ + this->Form = 0; +} + +cmCursesForm::~cmCursesForm() +{ + if (this->Form) + { + unpost_form(this->Form); + free_form(this->Form); + this->Form = 0; + } +} + +void cmCursesForm::DebugStart() +{ + cmCursesForm::Debug = true; + cmCursesForm::DebugFile.open("ccmakelog.txt"); +} + +void cmCursesForm::DebugEnd() +{ + if (!cmCursesForm::Debug) + { + return; + } + + cmCursesForm::Debug = false; + cmCursesForm::DebugFile.close(); +} + +void cmCursesForm::LogMessage(const char* msg) +{ + if (!cmCursesForm::Debug) + { + return; + } + + cmCursesForm::DebugFile << msg << std::endl; +} diff --git a/Source/CursesDialog/cmCursesForm.h b/Source/CursesDialog/cmCursesForm.h new file mode 100644 index 000000000..bffda42e4 --- /dev/null +++ b/Source/CursesDialog/cmCursesForm.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesForm.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesForm_h +#define __cmCursesForm_h + +#include "../cmStandardIncludes.h" +#include "cmCursesStandardIncludes.h" + +class cmCursesForm +{ +public: + cmCursesForm(); + virtual ~cmCursesForm(); + + // Description: + // Handle user input. + virtual void HandleInput() = 0; + + // Description: + // Display form. + virtual void Render(int left, int top, int width, int height) = 0; + + // Description: + // This method should normally called only by the form. + // The only exception is during a resize. + virtual void UpdateStatusBar() = 0; + + // Description: + // During a CMake run, an error handle should add errors + // to be displayed afterwards. + virtual void AddError(const char*, const char*) {} + + // Description: + // Turn debugging on. This will create ccmakelog.txt. + static void DebugStart(); + + // Description: + // Turn debugging off. This will close ccmakelog.txt. + static void DebugEnd(); + + // Description: + // Write a debugging message. + static void LogMessage(const char* msg); + + // Description: + // Return the FORM. Should be only used by low-level methods. + FORM* GetForm() + { + return this->Form; + } + + static cmCursesForm* CurrentForm; + + +protected: + + static std::ofstream DebugFile; + static bool Debug; + + cmCursesForm(const cmCursesForm& form); + void operator=(const cmCursesForm&); + + FORM* Form; +}; + +#endif // __cmCursesForm_h diff --git a/Source/CursesDialog/cmCursesLabelWidget.cxx b/Source/CursesDialog/cmCursesLabelWidget.cxx new file mode 100644 index 000000000..bd493615c --- /dev/null +++ b/Source/CursesDialog/cmCursesLabelWidget.cxx @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesLabelWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesLabelWidget.h" + +cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, + int left, int top, + const std::string& name) : + cmCursesWidget(width, height, left, top) +{ + field_opts_off(this->Field, O_EDIT); + field_opts_off(this->Field, O_ACTIVE); + field_opts_off(this->Field, O_STATIC); + this->SetValue(name.c_str()); +} + +cmCursesLabelWidget::~cmCursesLabelWidget() +{ +} + +bool cmCursesLabelWidget::HandleInput(int&, cmCursesMainForm*, WINDOW* ) +{ + // Static text. No input is handled here. + return false; +} diff --git a/Source/CursesDialog/cmCursesLabelWidget.h b/Source/CursesDialog/cmCursesLabelWidget.h new file mode 100644 index 000000000..15d86b79d --- /dev/null +++ b/Source/CursesDialog/cmCursesLabelWidget.h @@ -0,0 +1,43 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesLabelWidget.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesLabelWidget_h +#define __cmCursesLabelWidget_h + +#include "cmCursesWidget.h" +#include "cmCursesStandardIncludes.h" + +class cmCursesMainForm; + +class cmCursesLabelWidget : public cmCursesWidget +{ +public: + cmCursesLabelWidget(int width, int height, int left, int top, + const std::string& name); + virtual ~cmCursesLabelWidget(); + + // Description: + // Handle user input. Called by the container of this widget + // when this widget has focus. Returns true if the input was + // handled + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + +protected: + cmCursesLabelWidget(const cmCursesLabelWidget& from); + void operator=(const cmCursesLabelWidget&); +}; + +#endif // __cmCursesLabelWidget_h diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx new file mode 100644 index 000000000..b22585393 --- /dev/null +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -0,0 +1,213 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesLongMessageForm.cxx,v $ + Language: C++ + Date: $Date: 2006-11-29 22:25:46 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "../cmCacheManager.h" +#include "../cmSystemTools.h" +#include "../cmake.h" +#include "../cmVersion.h" +#include "cmCursesLongMessageForm.h" +#include "cmCursesMainForm.h" + +inline int ctrl(int z) +{ + return (z&037); +} + +cmCursesLongMessageForm::cmCursesLongMessageForm(std::vector + const& messages, const char* + title) +{ + // Append all messages into on big string + std::vector::const_iterator it; + for(it=messages.begin(); it != messages.end(); it++) + { + this->Messages += (*it); + // Add one blank line after each message + this->Messages += "\n\n"; + } + this->Title = title; + this->Fields[0] = 0; + this->Fields[1] = 0; +} + +cmCursesLongMessageForm::~cmCursesLongMessageForm() +{ + if (this->Fields[0]) + { + free_field(this->Fields[0]); + } +} + + +void cmCursesLongMessageForm::UpdateStatusBar() +{ + int x,y; + getmaxyx(stdscr, y, x); + + char bar[cmCursesMainForm::MAX_WIDTH]; + int size = strlen(this->Title.c_str()); + if ( size >= cmCursesMainForm::MAX_WIDTH ) + { + size = cmCursesMainForm::MAX_WIDTH-1; + } + strncpy(bar, this->Title.c_str(), size); + for(int i=size-1; iForm); +} + +void cmCursesLongMessageForm::PrintKeys() +{ + int x,y; + getmaxyx(stdscr, y, x); + if ( x < cmCursesMainForm::MIN_WIDTH || + y < cmCursesMainForm::MIN_HEIGHT ) + { + return; + } + char firstLine[512]; + sprintf(firstLine, "Press [e] to exit help"); + + curses_move(y-2,0); + printw(firstLine); + pos_form_cursor(this->Form); + +} + +void cmCursesLongMessageForm::Render(int, int, int, int) +{ + int x,y; + getmaxyx(stdscr, y, x); + + if (this->Form) + { + unpost_form(this->Form); + free_form(this->Form); + this->Form = 0; + } + + const char* msg = this->Messages.c_str(); + + curses_clear(); + + if (this->Fields[0]) + { + free_field(this->Fields[0]); + this->Fields[0] = 0; + } + + this->Fields[0] = new_field(y-6, x-2, 1, 1, 0, 0); + + field_opts_off(this->Fields[0], O_STATIC); + + this->Form = new_form(this->Fields); + post_form(this->Form); + + int i=0; + form_driver(this->Form, REQ_BEG_FIELD); + while(msg[i] != '\0' && i < 60000) + { + if (msg[i] == '\n' && msg[i+1] != '\0') + { + form_driver(this->Form, REQ_NEW_LINE); + } + else + { + form_driver(this->Form, msg[i]); + } + i++; + } + form_driver(this->Form, REQ_BEG_FIELD); + + this->UpdateStatusBar(); + this->PrintKeys(); + touchwin(stdscr); + refresh(); + +} + +void cmCursesLongMessageForm::HandleInput() +{ + if (!this->Form) + { + return; + } + + char debugMessage[128]; + + for(;;) + { + int key = getch(); + + sprintf(debugMessage, "Message widget handling input, key: %d", key); + cmCursesForm::LogMessage(debugMessage); + + // quit + if ( key == 'o' || key == 'e' ) + { + break; + } + else if ( key == KEY_DOWN || key == ctrl('n') ) + { + form_driver(this->Form, REQ_SCR_FLINE); + } + else if ( key == KEY_UP || key == ctrl('p') ) + { + form_driver(this->Form, REQ_SCR_BLINE); + } + else if ( key == KEY_NPAGE || key == ctrl('d') ) + { + form_driver(this->Form, REQ_SCR_FPAGE); + } + else if ( key == KEY_PPAGE || key == ctrl('u') ) + { + form_driver(this->Form, REQ_SCR_BPAGE); + } + + this->UpdateStatusBar(); + this->PrintKeys(); + touchwin(stdscr); + wrefresh(stdscr); + } + +} diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h new file mode 100644 index 000000000..45471ebcf --- /dev/null +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -0,0 +1,63 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesLongMessageForm.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesLongMessageForm_h +#define __cmCursesLongMessageForm_h + +#include "../cmStandardIncludes.h" +#include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" + +class cmCursesCacheEntryComposite; + +class cmCursesLongMessageForm : public cmCursesForm +{ +public: + cmCursesLongMessageForm(std::vector const& messages, + const char* title); + virtual ~cmCursesLongMessageForm(); + + // Description: + // Handle user input. + virtual void HandleInput(); + + // Description: + // Display form. Use a window of size width x height, starting + // at top, left. + virtual void Render(int left, int top, int width, int height); + + // Description: + // This method should normally called only by the form. + // The only exception is during a resize. + void PrintKeys(); + + // Description: + // This method should normally called only by the form. + // The only exception is during a resize. + virtual void UpdateStatusBar(); + +protected: + cmCursesLongMessageForm(const cmCursesLongMessageForm& from); + void operator=(const cmCursesLongMessageForm&); + + std::string Messages; + std::string Title; + + FIELD* Fields[2]; + +}; + +#endif // __cmCursesLongMessageForm_h diff --git a/Source/CursesDialog/cmCursesMainForm.cxx b/Source/CursesDialog/cmCursesMainForm.cxx new file mode 100644 index 000000000..e6df2ca2d --- /dev/null +++ b/Source/CursesDialog/cmCursesMainForm.cxx @@ -0,0 +1,1307 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesMainForm.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 21:32:09 $ + Version: $Revision: 1.73 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "../cmCacheManager.h" +#include "../cmSystemTools.h" +#include "../cmVersion.h" +#include "../cmake.h" +#include "cmCursesMainForm.h" +#include "cmCursesStringWidget.h" +#include "cmCursesLabelWidget.h" +#include "cmCursesBoolWidget.h" +#include "cmCursesPathWidget.h" +#include "cmCursesFilePathWidget.h" +#include "cmCursesDummyWidget.h" +#include "cmCursesCacheEntryComposite.h" +#include "cmCursesLongMessageForm.h" + + +inline int ctrl(int z) +{ + return (z&037); +} + +cmCursesMainForm::cmCursesMainForm(std::vector const& args, + int initWidth) : + Args(args), InitialWidth(initWidth) +{ + this->NumberOfPages = 0; + this->Fields = 0; + this->Entries = 0; + this->AdvancedMode = false; + this->NumberOfVisibleEntries = 0; + this->OkToGenerate = false; + this->HelpMessage.push_back("Welcome to ccmake, curses based user interface for CMake."); + this->HelpMessage.push_back(""); + this->HelpMessage.push_back(s_ConstHelpMessage); + this->CMakeInstance = new cmake; + this->CMakeInstance->SetCMakeEditCommand("ccmake"); + + // create the arguments for the cmake object + std::string whereCMake = cmSystemTools::GetProgramPath(this->Args[0].c_str()); + whereCMake += "/cmake"; + this->Args[0] = whereCMake; + this->CMakeInstance->SetArgs(this->Args); + this->CMakeInstance->SetCMakeCommand(whereCMake.c_str()); + this->SearchString = ""; + this->OldSearchString = ""; + this->SearchMode = false; +} + +cmCursesMainForm::~cmCursesMainForm() +{ + if (this->Form) + { + unpost_form(this->Form); + free_form(this->Form); + this->Form = 0; + } + delete[] this->Fields; + + // Clean-up composites + if (this->Entries) + { + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + delete *it; + } + } + delete this->Entries; + if (this->CMakeInstance) + { + delete this->CMakeInstance; + this->CMakeInstance = 0; + } +} + +// See if a cache entry is in the list of entries in the ui. +bool cmCursesMainForm::LookForCacheEntry(const char* key) +{ + if (!key || !this->Entries) + { + return false; + } + + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + if (!strcmp(key, (*it)->Key.c_str())) + { + return true; + } + } + + return false; +} + +// Create new cmCursesCacheEntryComposite entries from the cache +void cmCursesMainForm::InitializeUI() +{ + // Create a vector of cmCursesCacheEntryComposite's + // which contain labels, entries and new entry markers + std::vector* newEntries = + new std::vector; + newEntries->reserve(this->CMakeInstance->GetCacheManager()->GetSize()); + + // Count non-internal and non-static entries + int count=0; + for(cmCacheManager::CacheIterator i = + this->CMakeInstance->GetCacheManager()->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + if ( i.GetType() != cmCacheManager::INTERNAL && + i.GetType() != cmCacheManager::STATIC && + i.GetType() != cmCacheManager::UNINITIALIZED) + { + ++count; + } + } + + int entrywidth = this->InitialWidth - 35; + + cmCursesCacheEntryComposite* comp; + if ( count == 0 ) + { + // If cache is empty, display a label saying so and a + // dummy entry widget (does not respond to input) + comp = new cmCursesCacheEntryComposite("EMPTY CACHE", 30, 30); + comp->Entry = new cmCursesDummyWidget(1, 1, 1, 1); + newEntries->push_back(comp); + } + else + { + // Create the composites. + + // First add entries which are new + for(cmCacheManager::CacheIterator i = + this->CMakeInstance->GetCacheManager()->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + const char* key = i.GetName(); + if ( i.GetType() == cmCacheManager::INTERNAL || + i.GetType() == cmCacheManager::STATIC || + i.GetType() == cmCacheManager::UNINITIALIZED ) + { + continue; + } + + if (!this->LookForCacheEntry(key)) + { + newEntries->push_back(new cmCursesCacheEntryComposite(key, i, + true, 30, + entrywidth)); + this->OkToGenerate = false; + } + } + + // then add entries which are old + for(cmCacheManager::CacheIterator i = + this->CMakeInstance->GetCacheManager()->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + const char* key = i.GetName(); + if ( i.GetType() == cmCacheManager::INTERNAL || + i.GetType() == cmCacheManager::STATIC || + i.GetType() == cmCacheManager::UNINITIALIZED ) + { + continue; + } + + if (this->LookForCacheEntry(key)) + { + newEntries->push_back(new cmCursesCacheEntryComposite(key, i, + false, 30, + entrywidth)); + } + } + } + + // Clean old entries + if (this->Entries) + { + // Have to call delete on each pointer + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + delete *it; + } + } + delete this->Entries; + this->Entries = newEntries; + + // Compute fields from composites + this->RePost(); +} + + +void cmCursesMainForm::RePost() +{ + // Create the fields to be passed to the form. + if (this->Form) + { + unpost_form(this->Form); + free_form(this->Form); + this->Form = 0; + } + delete[] this->Fields; + if (this->AdvancedMode) + { + this->NumberOfVisibleEntries = this->Entries->size(); + } + else + { + // If normal mode, count only non-advanced entries + this->NumberOfVisibleEntries = 0; + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + cmCacheManager::CacheIterator mit = + this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); + if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")) + { + continue; + } + this->NumberOfVisibleEntries++; + } + } + // there is always one even if it is the dummy one + if(this->NumberOfVisibleEntries == 0) + { + this->NumberOfVisibleEntries = 1; + } + // Assign the fields: 3 for each entry: label, new entry marker + // ('*' or ' ') and entry widget + this->Fields = new FIELD*[3*this->NumberOfVisibleEntries+1]; + int cc; + for ( cc = 0; cc < 3 * this->NumberOfVisibleEntries+1; cc ++ ) + { + this->Fields[cc] = 0; + } + + // Assign fields + int j=0; + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + cmCacheManager::CacheIterator mit = + this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); + if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")) + { + continue; + } + this->Fields[3*j] = (*it)->Label->Field; + this->Fields[3*j+1] = (*it)->IsNewLabel->Field; + this->Fields[3*j+2] = (*it)->Entry->Field; + j++; + } + // if no cache entries there should still be one dummy field + if(j == 0) + { + it = this->Entries->begin(); + this->Fields[0] = (*it)->Label->Field; + this->Fields[1] = (*it)->IsNewLabel->Field; + this->Fields[2] = (*it)->Entry->Field; + this->NumberOfVisibleEntries = 1; + } + // Has to be null terminated. + this->Fields[3*this->NumberOfVisibleEntries] = 0; +} + +void cmCursesMainForm::Render(int left, int top, int width, int height) +{ + + if (this->Form) + { + FIELD* currentField = current_field(this->Form); + cmCursesWidget* cw = reinterpret_cast + (field_userptr(currentField)); + // If in edit mode, get out of it + if ( cw->GetType() == cmCacheManager::STRING || + cw->GetType() == cmCacheManager::PATH || + cw->GetType() == cmCacheManager::FILEPATH ) + { + cmCursesStringWidget* sw = static_cast(cw); + sw->SetInEdit(false); + } + // Delete the previous form + unpost_form(this->Form); + free_form(this->Form); + this->Form = 0; + } + + // Wrong window size + if ( width < cmCursesMainForm::MIN_WIDTH || + width < this->InitialWidth || + height < cmCursesMainForm::MIN_HEIGHT ) + { + return; + } + + // Leave room for toolbar + height -= 7; + + if (this->AdvancedMode) + { + this->NumberOfVisibleEntries = this->Entries->size(); + } + else + { + // If normal, display only non-advanced entries + this->NumberOfVisibleEntries = 0; + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + cmCacheManager::CacheIterator mit = + this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); + if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")) + { + continue; + } + this->NumberOfVisibleEntries++; + } + } + + // Re-adjust the fields according to their place + bool isNewPage; + int i=0; + this->NumberOfPages = 1; + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + cmCacheManager::CacheIterator mit = + this->CMakeInstance->GetCacheManager()->GetCacheIterator((*it)->GetValue()); + if (mit.IsAtEnd() || !this->AdvancedMode && mit.GetPropertyAsBool("ADVANCED")) + { + continue; + } + int row = (i % height) + 1; + int page = (i / height) + 1; + isNewPage = ( page > 1 ) && ( row == 1 ); + + if (isNewPage) + { + this->NumberOfPages++; + } + (*it)->Label->Move(left, top+row-1, isNewPage); + (*it)->IsNewLabel->Move(left+32, top+row-1, false); + (*it)->Entry->Move(left+33, top+row-1, false); + (*it)->Entry->SetPage(this->NumberOfPages); + i++; + } + + // Post the form + this->Form = new_form(this->Fields); + post_form(this->Form); + // Update toolbar + this->UpdateStatusBar(); + this->PrintKeys(); + + touchwin(stdscr); + refresh(); +} + +void cmCursesMainForm::PrintKeys(int process /* = 0 */) +{ + int x,y; + getmaxyx(stdscr, y, x); + if ( x < cmCursesMainForm::MIN_WIDTH || + x < this->InitialWidth || + y < cmCursesMainForm::MIN_HEIGHT ) + { + return; + } + + // Give the current widget (if it exists), a chance to print keys + cmCursesWidget* cw = 0; + if (this->Form) + { + FIELD* currentField = current_field(this->Form); + cw = reinterpret_cast(field_userptr(currentField)); + } + + if (cw) + { + cw->PrintKeys(); + } + +// { +// } +// else +// { + char firstLine[512]=""; + char secondLine[512]=""; + char thirdLine[512]=""; + if (process) + { + sprintf(firstLine, + " "); + sprintf(secondLine, + " "); + sprintf(thirdLine, + " "); + } + else + { + if (this->OkToGenerate) + { + sprintf(firstLine, + "Press [c] to configure Press [g] to generate and exit"); + } + else + { + sprintf(firstLine, "Press [c] to configure "); + } + if (this->AdvancedMode) + { + sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently On)"); + } + else + { + sprintf(thirdLine, "Press [t] to toggle advanced mode (Currently Off)"); + } + + sprintf(secondLine, + "Press [h] for help Press [q] to quit without generating"); + } + + curses_move(y-4,0); + char fmt[512] = "Press [enter] to edit option"; + if ( process ) + { + strcpy(fmt, " "); + } + printw(fmt); + curses_move(y-3,0); + printw(firstLine); + curses_move(y-2,0); + printw(secondLine); + curses_move(y-1,0); + printw(thirdLine); + + if (cw) + { + sprintf(firstLine, "Page %d of %d", cw->GetPage(), this->NumberOfPages); + curses_move(0,65-strlen(firstLine)-1); + printw(firstLine); + } +// } + + pos_form_cursor(this->Form); + +} + +// Print the key of the current entry and the CMake version +// on the status bar. Designed for a width of 80 chars. +void cmCursesMainForm::UpdateStatusBar(const char* message) +{ + int x,y; + getmaxyx(stdscr, y, x); + // If window size is too small, display error and return + if ( x < cmCursesMainForm::MIN_WIDTH || + x < this->InitialWidth || + y < cmCursesMainForm::MIN_HEIGHT ) + { + curses_clear(); + curses_move(0,0); + char fmt[] = "Window is too small. A size of at least %dx%d is required."; + printw(fmt, + (cmCursesMainForm::MIN_WIDTH < this->InitialWidth ? + this->InitialWidth : cmCursesMainForm::MIN_WIDTH), + cmCursesMainForm::MIN_HEIGHT); + touchwin(stdscr); + wrefresh(stdscr); + return; + } + + // Get the key of the current entry + FIELD* cur = current_field(this->Form); + int findex = field_index(cur); + cmCursesWidget* lbl = 0; + if ( findex >= 0 ) + { + lbl = reinterpret_cast(field_userptr(this->Fields[findex-2])); + } + char help[128] = ""; + const char* curField = ""; + if ( lbl ) + { + curField = lbl->GetValue(); + + // Get the help string of the current entry + // and add it to the help string + cmCacheManager::CacheIterator it = + this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField); + if (!it.IsAtEnd()) + { + const char* hs = it.GetProperty("HELPSTRING"); + if ( hs ) + { + strncpy(help, hs, 127); + help[127] = '\0'; + } + else + { + help[0] = 0; + } + } + else + { + sprintf(help," "); + } + } + + // Join the key, help string and pad with spaces + // (or truncate) as necessary + char bar[cmCursesMainForm::MAX_WIDTH]; + int i, curFieldLen = strlen(curField); + int helpLen = strlen(help); + + int width; + if (x < cmCursesMainForm::MAX_WIDTH ) + { + width = x; + } + else + { + width = cmCursesMainForm::MAX_WIDTH; + } + + if ( message ) + { + curField = message; + curFieldLen = strlen(message); + if ( curFieldLen < width ) + { + strcpy(bar, curField); + for(i=curFieldLen; i < width; ++i) + { + bar[i] = ' '; + } + } + else + { + strncpy(bar, curField, width); + } + } + else + { + if (curFieldLen >= width) + { + strncpy(bar, curField, width); + } + else + { + strcpy(bar, curField); + bar[curFieldLen] = ':'; + bar[curFieldLen+1] = ' '; + if (curFieldLen + helpLen + 2 >= width) + { + strncpy(bar+curFieldLen+2, help, width + - curFieldLen - 2); + } + else + { + strcpy(bar+curFieldLen+2, help); + for(i=curFieldLen+helpLen+2; i < width; ++i) + { + bar[i] = ' '; + } + } + } + } + + + bar[width] = '\0'; + + + // Display CMake version info on the next line + // We want to display this on the right + char version[cmCursesMainForm::MAX_WIDTH]; + char vertmp[128]; + sprintf(vertmp,"CMake Version %d.%d - %s", cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion(),cmVersion::GetReleaseVersion().c_str()); + int sideSpace = (width-strlen(vertmp)); + for(i=0; iForm); +} + +void cmCursesMainForm::UpdateProgress(const char *msg, float prog, void* vp) +{ + cmCursesMainForm* cm = static_cast(vp); + if ( !cm ) + { + return; + } + char tmp[1024]; + const char *cmsg = tmp; + if ( prog >= 0 ) + { + sprintf(tmp, "%s %i%%",msg,(int)(100*prog)); + } + else + { + cmsg = msg; + } + cm->UpdateStatusBar(cmsg); + cm->PrintKeys(1); + curses_move(1,1); + touchwin(stdscr); + refresh(); +} + +int cmCursesMainForm::Configure(int noconfigure) +{ + int xi,yi; + getmaxyx(stdscr, yi, xi); + + curses_move(1,1); + this->UpdateStatusBar("Configuring, please wait..."); + this->PrintKeys(1); + touchwin(stdscr); + refresh(); + this->CMakeInstance->SetProgressCallback(cmCursesMainForm::UpdateProgress, this); + + // always save the current gui values to disk + this->FillCacheManagerFromUI(); + this->CMakeInstance->GetCacheManager()->SaveCache( + this->CMakeInstance->GetHomeOutputDirectory()); + this->LoadCache(0); + + // Get rid of previous errors + this->Errors = std::vector(); + + // run the generate process + this->OkToGenerate = true; + int retVal; + if ( noconfigure ) + { + retVal = this->CMakeInstance->DoPreConfigureChecks(); + this->OkToGenerate = false; + if ( retVal > 0 ) + { + retVal = 0; + } + } + else + { + retVal = this->CMakeInstance->Configure(); + } + this->CMakeInstance->SetProgressCallback(0, 0); + + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ + + if( retVal != 0 || !this->Errors.empty()) + { + // see if there was an error + if(cmSystemTools::GetErrorOccuredFlag()) + { + this->OkToGenerate = false; + } + // reset error condition + cmSystemTools::ResetErrorOccuredFlag(); + int xx,yy; + getmaxyx(stdscr, yy, xx); + cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm( + this->Errors, + cmSystemTools::GetErrorOccuredFlag() ? "Errors occurred during the last pass." : + "CMake produced the following output."); + CurrentForm = msgs; + msgs->Render(1,1,xx,yy); + msgs->HandleInput(); + // If they typed the wrong source directory, we report + // an error and exit + if ( retVal == -2 ) + { + return retVal; + } + CurrentForm = this; + this->Render(1,1,xx,yy); + } + + this->InitializeUI(); + this->Render(1, 1, xi, yi); + + return 0; +} + +int cmCursesMainForm::Generate() +{ + int xi,yi; + getmaxyx(stdscr, yi, xi); + + curses_move(1,1); + this->UpdateStatusBar("Generating, please wait..."); + this->PrintKeys(1); + touchwin(stdscr); + refresh(); + this->CMakeInstance->SetProgressCallback(cmCursesMainForm::UpdateProgress, this); + + // Get rid of previous errors + this->Errors = std::vector(); + + // run the generate process + int retVal = this->CMakeInstance->Generate(); + + this->CMakeInstance->SetProgressCallback(0, 0); + keypad(stdscr,TRUE); /* Use key symbols as + KEY_DOWN*/ + + if( retVal != 0 || !this->Errors.empty()) + { + // see if there was an error + if(cmSystemTools::GetErrorOccuredFlag()) + { + this->OkToGenerate = false; + } + // reset error condition + cmSystemTools::ResetErrorOccuredFlag(); + int xx,yy; + getmaxyx(stdscr, yy, xx); + const char* title = "Messages during last pass."; + if(cmSystemTools::GetErrorOccuredFlag()) + { + title = "Errors occurred during the last pass."; + } + cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(this->Errors, + title); + CurrentForm = msgs; + msgs->Render(1,1,xx,yy); + msgs->HandleInput(); + // If they typed the wrong source directory, we report + // an error and exit + if ( retVal == -2 ) + { + return retVal; + } + CurrentForm = this; + this->Render(1,1,xx,yy); + } + + this->InitializeUI(); + this->Render(1, 1, xi, yi); + + return 0; +} + +void cmCursesMainForm::AddError(const char* message, const char*) +{ + this->Errors.push_back(message); +} + +void cmCursesMainForm::RemoveEntry(const char* value) +{ + if (!value) + { + return; + } + + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + const char* val = (*it)->GetValue(); + if ( val && !strcmp(value, val) ) + { + this->Entries->erase(it); + break; + } + } +} + +// copy from the list box to the cache manager +void cmCursesMainForm::FillCacheManagerFromUI() +{ + int size = this->Entries->size(); + for(int i=0; i < size; i++) + { + cmCacheManager::CacheIterator it = + this->CMakeInstance->GetCacheManager()->GetCacheIterator( + (*this->Entries)[i]->Key.c_str()); + if (!it.IsAtEnd()) + { + std::string oldValue = it.GetValue(); + std::string newValue = (*this->Entries)[i]->Entry->GetValue(); + std::string fixedOldValue; + std::string fixedNewValue; + this->FixValue(it.GetType(), oldValue, fixedOldValue); + this->FixValue(it.GetType(), newValue, fixedNewValue); + + if(!(fixedOldValue == fixedNewValue)) + { + // The user has changed the value. Mark it as modified. + it.SetProperty("MODIFIED", true); + it.SetValue(fixedNewValue.c_str()); + } + } + } +} + +void cmCursesMainForm::FixValue(cmCacheManager::CacheEntryType type, + const std::string& in, std::string& out) const +{ + out = in.substr(0,in.find_last_not_of(" ")+1); + if(type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH) + { + cmSystemTools::ConvertToUnixSlashes(out); + } + if(type == cmCacheManager::BOOL) + { + if(cmSystemTools::IsOff(out.c_str())) + { + out = "OFF"; + } + else + { + out = "ON"; + } + } +} + +#include + +void cmCursesMainForm::HandleInput() +{ + int x=0,y=0; + + if (!this->Form) + { + return; + } + + FIELD* currentField; + cmCursesWidget* currentWidget; + + char debugMessage[128]; + + for(;;) + { + this->UpdateStatusBar(); + this->PrintKeys(); + if ( this->SearchMode ) + { + std::string searchstr = "Search: " + this->SearchString; + this->UpdateStatusBar( searchstr.c_str() ); + this->PrintKeys(1); + curses_move(y-5,searchstr.size()); + //curses_move(1,1); + touchwin(stdscr); + refresh(); + } + int key = getch(); + + getmaxyx(stdscr, y, x); + // If window too small, handle 'q' only + if ( x < cmCursesMainForm::MIN_WIDTH || + y < cmCursesMainForm::MIN_HEIGHT ) + { + // quit + if ( key == 'q' ) + { + break; + } + else + { + continue; + } + } + + currentField = current_field(this->Form); + currentWidget = reinterpret_cast(field_userptr( + currentField)); + + bool widgetHandled=false; + + if ( this->SearchMode ) + { + if ( key == 10 || key == KEY_ENTER ) + { + this->SearchMode = false; + if ( this->SearchString.size() > 0 ) + { + this->JumpToCacheEntry(-1, this->SearchString.c_str()); + this->OldSearchString = this->SearchString; + } + this->SearchString = ""; + } + /* + else if ( key == KEY_ESCAPE ) + { + this->SearchMode = false; + } + */ + else if ( key >= 'a' && key <= 'z' || + key >= 'A' && key <= 'Z' || + key >= '0' && key <= '9' || + key == '_' ) + { + if ( this->SearchString.size() < static_cast(x-10) ) + { + this->SearchString += key; + } + } + else if ( key == ctrl('h') || key == KEY_BACKSPACE || key == KEY_DC ) + { + if ( this->SearchString.size() > 0 ) + { + this->SearchString.resize(this->SearchString.size()-1); + } + } + } + else if (currentWidget && !this->SearchMode) + { + // Ask the current widget if it wants to handle input + widgetHandled = currentWidget->HandleInput(key, this, stdscr); + if (widgetHandled) + { + this->OkToGenerate = false; + this->UpdateStatusBar(); + this->PrintKeys(); + } + } + if ((!currentWidget || !widgetHandled) && !this->SearchMode) + { + // If the current widget does not want to handle input, + // we handle it. + sprintf(debugMessage, "Main form handling input, key: %d", key); + cmCursesForm::LogMessage(debugMessage); + // quit + if ( key == 'q' ) + { + break; + } + // if not end of page, next field otherwise next page + // each entry consists of fields: label, isnew, value + // therefore, the label field for the prev. entry is index-5 + // and the label field for the next entry is index+1 + // (index always corresponds to the value field) + else if ( key == KEY_DOWN || key == ctrl('n') ) + { + FIELD* cur = current_field(this->Form); + int findex = field_index(cur); + if ( findex == 3*this->NumberOfVisibleEntries-1 ) + { + continue; + } + if (new_page(this->Fields[findex+1])) + { + form_driver(this->Form, REQ_NEXT_PAGE); + } + else + { + form_driver(this->Form, REQ_NEXT_FIELD); + } + } + // if not beginning of page, previous field, otherwise previous page + // each entry consists of fields: label, isnew, value + // therefore, the label field for the prev. entry is index-5 + // and the label field for the next entry is index+1 + // (index always corresponds to the value field) + else if ( key == KEY_UP || key == ctrl('p') ) + { + FIELD* cur = current_field(this->Form); + int findex = field_index(cur); + if ( findex == 2 ) + { + continue; + } + if ( new_page(this->Fields[findex-2]) ) + { + form_driver(this->Form, REQ_PREV_PAGE); + set_current_field(this->Form, this->Fields[findex-3]); + } + else + { + form_driver(this->Form, REQ_PREV_FIELD); + } + } + // pg down + else if ( key == KEY_NPAGE || key == ctrl('d') ) + { + form_driver(this->Form, REQ_NEXT_PAGE); + } + // pg up + else if ( key == KEY_PPAGE || key == ctrl('u') ) + { + form_driver(this->Form, REQ_PREV_PAGE); + } + // configure + else if ( key == 'c' ) + { + this->Configure(); + } + // display help + else if ( key == 'h' ) + { + getmaxyx(stdscr, y, x); + + FIELD* cur = current_field(this->Form); + int findex = field_index(cur); + cmCursesWidget* lbl = reinterpret_cast(field_userptr( + this->Fields[findex-2])); + const char* curField = lbl->GetValue(); + const char* helpString=0; + cmCacheManager::CacheIterator it = + this->CMakeInstance->GetCacheManager()->GetCacheIterator(curField); + if (!it.IsAtEnd()) + { + helpString = it.GetProperty("HELPSTRING"); + } + if (helpString) + { + char* message = new char[strlen(curField)+strlen(helpString) + +strlen("Current option is: \n Help string for this option is: \n")+10]; + sprintf(message,"Current option is: %s\nHelp string for this option is: %s\n", curField, helpString); + this->HelpMessage[1] = message; + delete[] message; + } + else + { + this->HelpMessage[1] = ""; + } + + cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(this->HelpMessage, + "Help."); + CurrentForm = msgs; + msgs->Render(1,1,x,y); + msgs->HandleInput(); + CurrentForm = this; + this->Render(1,1,x,y); + set_current_field(this->Form, cur); + } + // display last errors + else if ( key == 'l' ) + { + getmaxyx(stdscr, y, x); + cmCursesLongMessageForm* msgs = new cmCursesLongMessageForm(this->Errors, + "Errors occurred during the last pass."); + CurrentForm = msgs; + msgs->Render(1,1,x,y); + msgs->HandleInput(); + CurrentForm = this; + this->Render(1,1,x,y); + } + else if ( key == '/' ) + { + this->SearchMode = true; + this->UpdateStatusBar("Search"); + this->PrintKeys(1); + touchwin(stdscr); + refresh(); + } + else if ( key == 'n' ) + { + if ( this->OldSearchString.size() > 0 ) + { + this->JumpToCacheEntry(-1, this->OldSearchString.c_str()); + } + } + // switch advanced on/off + else if ( key == 't' ) + { + if (this->AdvancedMode) + { + this->AdvancedMode = false; + } + else + { + this->AdvancedMode = true; + } + getmaxyx(stdscr, y, x); + this->RePost(); + this->Render(1, 1, x, y); + } + // generate and exit + else if ( key == 'g' ) + { + if ( this->OkToGenerate ) + { + this->Generate(); + break; + } + } + // delete cache entry + else if ( key == 'd' && this->NumberOfVisibleEntries ) + { + this->OkToGenerate = false; + FIELD* cur = current_field(this->Form); + int findex = field_index(cur); + + // make the next or prev. current field after deletion + // each entry consists of fields: label, isnew, value + // therefore, the label field for the prev. entry is findex-5 + // and the label field for the next entry is findex+1 + // (findex always corresponds to the value field) + FIELD* nextCur; + if ( findex == 2 ) + { + nextCur=0; + } + else if ( findex == 3*this->NumberOfVisibleEntries-1 ) + { + nextCur = this->Fields[findex-5]; + } + else + { + nextCur = this->Fields[findex+1]; + } + + // Get the label widget + // each entry consists of fields: label, isnew, value + // therefore, the label field for the is findex-2 + // (findex always corresponds to the value field) + cmCursesWidget* lbl + = reinterpret_cast( + field_userptr(this->Fields[findex-2])); + if ( lbl ) + { + this->CMakeInstance->GetCacheManager()->RemoveCacheEntry(lbl->GetValue()); + + std::string nextVal; + if (nextCur) + { + nextVal = (reinterpret_cast(field_userptr(nextCur))->GetValue()); + } + + getmaxyx(stdscr, y, x); + this->RemoveEntry(lbl->GetValue()); + this->RePost(); + this->Render(1, 1, x, y); + + if (nextCur) + { + // make the next or prev. current field after deletion + nextCur = 0; + std::vector::iterator it; + for (it = this->Entries->begin(); it != this->Entries->end(); ++it) + { + if (nextVal == (*it)->Key) + { + nextCur = (*it)->Entry->Field; + } + } + + if (nextCur) + { + set_current_field(this->Form, nextCur); + } + } + } + } + } + + touchwin(stdscr); + wrefresh(stdscr); + } +} + +int cmCursesMainForm::LoadCache(const char *) + +{ + int r = this->CMakeInstance->LoadCache(); + if(r < 0) + { + return r; + } + this->CMakeInstance->SetCacheArgs(this->Args); + this->CMakeInstance->PreLoadCMakeFiles(); + return r; +} + +void cmCursesMainForm::JumpToCacheEntry(int idx, const char* astr) +{ + std::string str; + if ( astr ) + { + str = cmSystemTools::LowerCase(astr); + } + + if ( idx > this->NumberOfVisibleEntries ) + { + return; + } + if ( idx < 0 && str.size() == 0) + { + return; + } + FIELD* cur = current_field(this->Form); + int start_index = field_index(cur); + int findex = start_index; + while ( (findex / 3) != idx ) + { + if ( str.size() > 0 ) + { + cmCursesWidget* lbl = 0; + if ( findex >= 0 ) + { + lbl = reinterpret_cast(field_userptr(this->Fields[findex-2])); + } + if ( lbl ) + { + const char* curField = lbl->GetValue(); + if ( curField ) + { + std::string cfld = cmSystemTools::LowerCase(curField); + if ( cfld.find(str) != cfld.npos && findex != start_index ) + { + break; + } + } + } + } + if ( findex >= 3* this->NumberOfVisibleEntries-1 ) + { + set_current_field(this->Form, this->Fields[2]); + } + else if (new_page(this->Fields[findex+1])) + { + form_driver(this->Form, REQ_NEXT_PAGE); + } + else + { + form_driver(this->Form, REQ_NEXT_FIELD); + } + /* + char buffer[1024]; + sprintf(buffer, "Line: %d != %d / %d\n", findex, idx, this->NumberOfVisibleEntries); + touchwin(stdscr); + refresh(); + this->UpdateStatusBar( buffer ); + usleep(100000); + */ + cur = current_field(this->Form); + findex = field_index(cur); + if ( findex == start_index ) + { + break; + } + } +} + + +const char* cmCursesMainForm::s_ConstHelpMessage = +"CMake is used to configure and generate build files for software projects. " +"The basic steps for configuring a project with ccmake are as follows:\n\n" +"1. Run ccmake in the directory where you want the object and executable files to be placed (build directory). If the source directory is not the same as this build directory, you have to specify it as an argument on the command line.\n\n" +"2. When ccmake is run, it will read the configuration files and display the current build options. " +"If you have run CMake before and have updated the configuration files since then, any new entries will be displayed on top and will be marked with a *. " +"On the other hand, the first time you run ccmake, all build options will be new and will be marked as such. " +"At this point, you can modify any options (see keys below) you want to change. " +"When you are satisfied with your changes, press 'c' to have CMake process the configuration files. " +"Please note that changing some options may cause new ones to appear. These will be shown on top and will be marked with *. " +"Repeat this procedure until you are satisfied with all the options and there are no new entries. " +"At this point, a new command will appear: G)enerate and Exit. You can now hit 'g' to have CMake generate all the build files (i.e. makefiles or project files) and exit. " +"At any point during the process, you can exit ccmake with 'q'. However, this will not generate/change any build files.\n\n" +"ccmake KEYS:\n\n" +"Navigation: " +"You can use the arrow keys and page up, down to navigate the options. Alternatively, you can use the following keys: \n" +" C-n : next option\n" +" C-p : previous options\n" +" C-d : down one page\n" +" C-u : up one page\n\n" +"Editing options: " +"To change an option press enter or return. If the current options is a boolean, this will toggle it's value. " +"Otherwise, ccmake will enter edit mode. In this mode you can edit an option using arrow keys and backspace. Alternatively, you can use the following keys:\n" +" C-b : back one character\n" +" C-f : forward one character\n" +" C-a : go to the beginning of the field\n" +" C-e : go to the end of the field\n" +" C-d : delete previous character\n" +" C-k : kill the rest of the field\n" +" Esc : Restore field (discard last changes)\n" +" Enter : Leave edit mode\n" +"You can also delete an option by pressing 'd'\n\n" +"Commands:\n" +" q : quit ccmake without generating build files\n" +" h : help, shows this screen\n" +" c : process the configuration files with the current options\n" +" g : generate build files and exit, only available when there are no " +"new options and no errors have been detected during last configuration.\n" +" l : shows last errors\n" +" t : toggles advanced mode. In normal mode, only the most important options are shown. In advanced mode, all options are shown. We recommend using normal mode unless you are an expert.\n"; + + diff --git a/Source/CursesDialog/cmCursesMainForm.h b/Source/CursesDialog/cmCursesMainForm.h new file mode 100644 index 000000000..40e04aa6b --- /dev/null +++ b/Source/CursesDialog/cmCursesMainForm.h @@ -0,0 +1,170 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesMainForm.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesMainForm_h +#define __cmCursesMainForm_h + +#include "../cmStandardIncludes.h" +#include "cmCursesForm.h" +#include "cmCursesStandardIncludes.h" + +class cmCursesCacheEntryComposite; +class cmCursesWidget; +class cmake; + +/** \class cmCursesMainForm + * \brief The main page of ccmake + * + * cmCursesMainForm is the main page of ccmake. + */ +class cmCursesMainForm : public cmCursesForm +{ +public: + cmCursesMainForm(std::vector const& args, int initwidth); + virtual ~cmCursesMainForm(); + + /** + * Set the widgets which represent the cache entries. + */ + void InitializeUI(); + + /** + * Handle user input. + */ + virtual void HandleInput(); + + /** + * Display form. Use a window of size width x height, starting + * at top, left. + */ + virtual void Render(int left, int top, int width, int height); + + /** + * Returns true if an entry with the given key is in the + * list of current composites. + */ + bool LookForCacheEntry(const char* key); + + enum { + MIN_WIDTH = 65, + MIN_HEIGHT = 6, + IDEAL_WIDTH = 80, + MAX_WIDTH = 512 + }; + + /** + * This method should normally be called only by the form. The only + * exception is during a resize. The optional argument specifies the + * string to be displayed in the status bar. + */ + virtual void UpdateStatusBar() { this->UpdateStatusBar(0); } + virtual void UpdateStatusBar(const char* message); + + /** + * Display current commands and their keys on the toolbar. This + * method should normally called only by the form. The only + * exception is during a resize. If the optional argument process is + * specified and is either 1 (configure) or 2 (generate), then keys + * will be displayed accordingly. + */ + void PrintKeys(int process = 0); + + /** + * During a CMake run, an error handle should add errors + * to be displayed afterwards. + */ + virtual void AddError(const char* message, const char* title); + + /** + * Used to do a configure. If argument is specified, it does only the check + * and not configure. + */ + int Configure(int noconfigure=0); + + /** + * Used to generate + */ + int Generate(); + + /** + * Used by main program + */ + int LoadCache(const char *dir); + + /** + * Progress callback + */ + static void UpdateProgressOld(const char *msg, float prog, void*); + static void UpdateProgress(const char *msg, float prog, void*); + +protected: + cmCursesMainForm(const cmCursesMainForm& from); + void operator=(const cmCursesMainForm&); + + // Copy the cache values from the user interface to the actual + // cache. + void FillCacheManagerFromUI(); + // Fix formatting of values to a consistent form. + void FixValue(cmCacheManager::CacheEntryType type, + const std::string& in, std::string& out) const; + // Re-post the existing fields. Used to toggle between + // normal and advanced modes. Render() should be called + // afterwards. + void RePost(); + // Remove an entry from the interface and the cache. + void RemoveEntry(const char* value); + + // Jump to the cache value with index idx. If string str is + // specified, it will stop on widget that contain that string. + void JumpToCacheEntry(int idx, const char* str); + + // Copies of cache entries stored in the user interface + std::vector* Entries; + // Errors produced during last run of cmake + std::vector Errors; + // Command line argumens to be passed to cmake each time + // it is run + std::vector Args; + // Message displayed when user presses 'h' + // It is: Welcome + info about current entry + common help + std::vector HelpMessage; + + // Common help + static const char* s_ConstHelpMessage; + + // Fields displayed. Includes labels, new entry markers, entries + FIELD** Fields; + // Where is source of current project + std::string WhereSource; + // Where is cmake executable + std::string WhereCMake; + // Number of entries shown (depends on mode -normal or advanced-) + int NumberOfVisibleEntries; + bool AdvancedMode; + // Did the iteration converge (no new entries) ? + bool OkToGenerate; + // Number of pages displayed + int NumberOfPages; + + int InitialWidth; + cmake *CMakeInstance; + + std::string SearchString; + std::string OldSearchString; + bool SearchMode; +}; + +#endif // __cmCursesMainForm_h diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx new file mode 100644 index 000000000..93684f4bb --- /dev/null +++ b/Source/CursesDialog/cmCursesPathWidget.cxx @@ -0,0 +1,99 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesPathWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesPathWidget.h" + +#include "cmCursesMainForm.h" +#include "cmSystemTools.h" + +cmCursesPathWidget::cmCursesPathWidget(int width, int height, + int left, int top) : + cmCursesStringWidget(width, height, left, top) +{ + this->Type = cmCacheManager::PATH; + this->Cycle = false; + this->CurrentIndex = 0; +} + +void cmCursesPathWidget::OnType(int& key, cmCursesMainForm* fm, WINDOW* w) +{ + this->Cycle = false; + this->CurrentIndex = 0; + this->LastGlob = ""; + this->cmCursesStringWidget::OnType(key, fm, w); +} + +void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w) +{ + if ( !this->GetString() ) + { + return; + } + FORM* form = fm->GetForm(); + form_driver(form, REQ_NEXT_FIELD); + form_driver(form, REQ_PREV_FIELD); + std::string cstr = this->GetString(); + cstr = cstr.substr(0, cstr.find_last_not_of(" \t\n\r")+1); + if ( this->LastString != cstr ) + { + this->Cycle = false; + this->CurrentIndex = 0; + this->LastGlob = ""; + } + std::string glob; + if ( this->Cycle ) + { + glob = this->LastGlob; + } + else + { + glob = cstr + "*"; + } + std::vector dirs; + + cmSystemTools::SimpleGlob(glob.c_str(), dirs, (this->Type == cmCacheManager::PATH?-1:0)); + if ( this->CurrentIndex < dirs.size() ) + { + cstr = dirs[this->CurrentIndex]; + } + if ( cstr[cstr.size()-1] == '*' ) + { + cstr = cstr.substr(0, cstr.size()-1); + } + + if ( cmSystemTools::FileIsDirectory(cstr.c_str()) ) + { + cstr += "/"; + } + + this->SetString(cstr.c_str()); + touchwin(w); + wrefresh(w); + form_driver(form, REQ_END_FIELD); + this->LastGlob = glob; + this->LastString = cstr; + this->Cycle = true; + this->CurrentIndex ++; + if ( this->CurrentIndex >= dirs.size() ) + { + this->CurrentIndex = 0; + } +} + +void cmCursesPathWidget::OnReturn(cmCursesMainForm* fm, WINDOW* w) +{ + this->cmCursesStringWidget::OnReturn(fm, w); +} diff --git a/Source/CursesDialog/cmCursesPathWidget.h b/Source/CursesDialog/cmCursesPathWidget.h new file mode 100644 index 000000000..f115de87e --- /dev/null +++ b/Source/CursesDialog/cmCursesPathWidget.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesPathWidget.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesPathWidget_h +#define __cmCursesPathWidget_h + +#include "cmCursesStringWidget.h" + +class cmCursesPathWidget : public cmCursesStringWidget +{ +public: + cmCursesPathWidget(int width, int height, int left, int top); + + /** + * This method is called when different keys are pressed. The + * subclass can have a special implementation handler for this. + */ + virtual void OnTab(cmCursesMainForm* fm, WINDOW* w); + virtual void OnReturn(cmCursesMainForm* fm, WINDOW* w); + virtual void OnType(int& key, cmCursesMainForm* fm, WINDOW* w); + +protected: + cmCursesPathWidget(const cmCursesPathWidget& from); + void operator=(const cmCursesPathWidget&); + + std::string LastString; + std::string LastGlob; + bool Cycle; + std::string::size_type CurrentIndex; +}; + +#endif // __cmCursesPathWidget_h diff --git a/Source/CursesDialog/cmCursesStandardIncludes.h b/Source/CursesDialog/cmCursesStandardIncludes.h new file mode 100644 index 000000000..a5fab94db --- /dev/null +++ b/Source/CursesDialog/cmCursesStandardIncludes.h @@ -0,0 +1,88 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesStandardIncludes.h,v $ + Language: C++ + Date: $Date: 2007-08-27 13:01:14 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCursesStandardIncludes_h +#define cmCursesStandardIncludes_h +#if defined(__sun__) && defined(__GNUC__) + #define _MSE_INT_H +#endif + +#include + +#if defined(__hpux) +# define _BOOL_DEFINED +# include +# define _XOPEN_SOURCE_EXTENDED +# include +# include +# undef _XOPEN_SOURCE_EXTENDED +#else +/* figure out which curses.h to include */ +# if defined(CURSES_HAVE_NCURSES_H) +# include +# elif defined(CURSES_HAVE_NCURSES_NCURSES_H) +# include +# elif defined(CURSES_HAVE_NCURSES_CURSES_H) +# include +# else +# include +# endif + +# include +#endif + +// This is a hack to prevent warnings about these functions being +// declared but not referenced. +#if defined(__sgi) && !defined(__GNUC__) +class cmCursesStandardIncludesHack +{ +public: + enum + { + Ref1 = sizeof(cfgetospeed(0)), + Ref2 = sizeof(cfgetispeed(0)), + Ref3 = sizeof(tcgetattr(0, 0)), + Ref4 = sizeof(tcsetattr(0, 0, 0)), + Ref5 = sizeof(cfsetospeed(0,0)), + Ref6 = sizeof(cfsetispeed(0,0)) + }; +}; +#endif + +#ifndef getmaxyx + #define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w)) +#endif + + +// on some machines move erase and clear conflict with stl +// so remove them from the namespace +inline void curses_move(unsigned int x, unsigned int y) +{ + move(x,y); +} + +inline void curses_clear() +{ + erase(); + clearok(stdscr, TRUE); +} + +#undef move +#undef erase +#undef clear + + +#endif // cmCursesStandardIncludes_h diff --git a/Source/CursesDialog/cmCursesStringWidget.cxx b/Source/CursesDialog/cmCursesStringWidget.cxx new file mode 100644 index 000000000..09ba9eafa --- /dev/null +++ b/Source/CursesDialog/cmCursesStringWidget.cxx @@ -0,0 +1,247 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesStringWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesStringWidget.h" +#include "cmCursesMainForm.h" + +inline int ctrl(int z) +{ + return (z&037); +} + +cmCursesStringWidget::cmCursesStringWidget(int width, int height, + int left, int top) : + cmCursesWidget(width, height, left, top) +{ + this->InEdit = false; + this->Type = cmCacheManager::STRING; + set_field_fore(this->Field, A_NORMAL); + set_field_back(this->Field, A_STANDOUT); + field_opts_off(this->Field, O_STATIC); +} + +void cmCursesStringWidget::OnTab(cmCursesMainForm*, WINDOW*) +{ + //FORM* form = fm->GetForm(); +} + +void cmCursesStringWidget::OnReturn(cmCursesMainForm* fm, WINDOW*) +{ + FORM* form = fm->GetForm(); + if (this->InEdit) + { + cmCursesForm::LogMessage("String widget leaving edit."); + this->InEdit = false; + fm->PrintKeys(); + delete[] this->OriginalString; + // trick to force forms to update the field buffer + form_driver(form, REQ_NEXT_FIELD); + form_driver(form, REQ_PREV_FIELD); + this->Done = true; + } + else + { + cmCursesForm::LogMessage("String widget entering edit."); + this->InEdit = true; + fm->PrintKeys(); + char* buf = field_buffer(this->Field, 0); + this->OriginalString = new char[strlen(buf)+1]; + strcpy(this->OriginalString, buf); + } +} + +void cmCursesStringWidget::OnType(int& key, cmCursesMainForm* fm, WINDOW*) +{ + form_driver(fm->GetForm(), key); +} + +bool cmCursesStringWidget::HandleInput(int& key, cmCursesMainForm* fm, + WINDOW* w) +{ + int x,y; + + FORM* form = fm->GetForm(); + // 10 == enter + if (!this->InEdit && ( key != 10 && key != KEY_ENTER ) ) + { + return false; + } + + this->OriginalString=0; + this->Done = false; + + char debugMessage[128]; + + // is used to change edit mode (like in vi). + while(!this->Done) + { + sprintf(debugMessage, "String widget handling input, key: %d", key); + cmCursesForm::LogMessage(debugMessage); + + fm->PrintKeys(); + + getmaxyx(stdscr, y, x); + // If window too small, handle 'q' only + if ( x < cmCursesMainForm::MIN_WIDTH || + y < cmCursesMainForm::MIN_HEIGHT ) + { + // quit + if ( key == 'q' ) + { + return false; + } + else + { + key=getch(); + continue; + } + } + + // If resize occured during edit, move out of edit mode + if (!this->InEdit && ( key != 10 && key != KEY_ENTER ) ) + { + return false; + } + // 10 == enter + if (key == 10 || key == KEY_ENTER) + { + this->OnReturn(fm, w); + } + else if ( key == KEY_DOWN || key == ctrl('n') || + key == KEY_UP || key == ctrl('p') || + key == KEY_NPAGE || key == ctrl('d') || + key == KEY_PPAGE || key == ctrl('u')) + { + this->InEdit = false; + delete[] this->OriginalString; + // trick to force forms to update the field buffer + form_driver(form, REQ_NEXT_FIELD); + form_driver(form, REQ_PREV_FIELD); + return false; + } + // esc + else if (key == 27) + { + if (this->InEdit) + { + this->InEdit = false; + fm->PrintKeys(); + this->SetString(this->OriginalString); + delete[] this->OriginalString; + touchwin(w); + wrefresh(w); + return true; + } + } + else if ( key == 9 ) + { + this->OnTab(fm, w); + } + else if ( key == KEY_LEFT || key == ctrl('b') ) + { + form_driver(form, REQ_PREV_CHAR); + } + else if ( key == KEY_RIGHT || key == ctrl('f') ) + { + form_driver(form, REQ_NEXT_CHAR); + } + else if ( key == ctrl('k') ) + { + form_driver(form, REQ_CLR_EOL); + } + else if ( key == ctrl('a') || key == KEY_HOME ) + { + form_driver(form, REQ_BEG_FIELD); + } + else if ( key == ctrl('e') || key == KEY_END ) + { + form_driver(form, REQ_END_FIELD); + } + else if ( key == ctrl('d') || key == 127 || + key == KEY_BACKSPACE || key == KEY_DC ) + { + if ( form->curcol > 0 ) + { + form_driver(form, REQ_DEL_PREV); + } + } + else + { + this->OnType(key, fm, w); + } + if ( !this->Done ) + { + touchwin(w); + wrefresh(w); + + key=getch(); + } + } + return true; +} + +void cmCursesStringWidget::SetString(const char* value) +{ + this->SetValue(value); +} + +const char* cmCursesStringWidget::GetString() +{ + return this->GetValue(); +} + +const char* cmCursesStringWidget::GetValue() +{ + return field_buffer(this->Field, 0); +} + +bool cmCursesStringWidget::PrintKeys() +{ + int x,y; + getmaxyx(stdscr, y, x); + if ( x < cmCursesMainForm::MIN_WIDTH || + y < cmCursesMainForm::MIN_HEIGHT ) + { + return false; + } + if (this->InEdit) + { + char firstLine[512]; + // Clean the toolbar + for(int i=0; i<512; i++) + { + firstLine[i] = ' '; + } + firstLine[511] = '\0'; + curses_move(y-4,0); + printw(firstLine); + curses_move(y-3,0); + printw(firstLine); + curses_move(y-2,0); + printw(firstLine); + curses_move(y-1,0); + printw(firstLine); + + sprintf(firstLine, "Editing option, press [enter] to leave edit."); + curses_move(y-3,0); + printw(firstLine); + return true; + } + else + { + return false; + } +} diff --git a/Source/CursesDialog/cmCursesStringWidget.h b/Source/CursesDialog/cmCursesStringWidget.h new file mode 100644 index 000000000..53f0f7bcb --- /dev/null +++ b/Source/CursesDialog/cmCursesStringWidget.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesStringWidget.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesStringWidget_h +#define __cmCursesStringWidget_h + +#include "cmCursesWidget.h" + +class cmCursesMainForm; + +/** \class cmCursesStringWidget + * \brief A simple entry widget. + * + * cmCursesStringWdiget is a simple text entry widget. + */ + +class cmCursesStringWidget : public cmCursesWidget +{ +public: + cmCursesStringWidget(int width, int height, int left, int top); + + /** + * Handle user input. Called by the container of this widget + * when this widget has focus. Returns true if the input was + * handled. + */ + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w); + + /** + * Set/Get the string. + */ + void SetString(const char* value); + const char* GetString(); + virtual const char* GetValue(); + + /** + * Set/Get InEdit flag. Can be used to tell the widget to leave + * edit mode (in case of a resize for example). + */ + void SetInEdit(bool inedit) { this->InEdit = inedit; } + bool GetInEdit() { return this->InEdit; } + + /** + * This method is called when different keys are pressed. The + * subclass can have a special implementation handler for this. + */ + virtual void OnTab(cmCursesMainForm* fm, WINDOW* w); + virtual void OnReturn(cmCursesMainForm* fm, WINDOW* w); + virtual void OnType(int& key, cmCursesMainForm* fm, WINDOW* w); + + /** + * If there are any, print the widget specific commands + * in the toolbar and return true. Otherwise, return false + * and the parent widget will print. + */ + virtual bool PrintKeys(); + +protected: + cmCursesStringWidget(const cmCursesStringWidget& from); + void operator=(const cmCursesStringWidget&); + + // true if the widget is in edit mode + bool InEdit; + char* OriginalString; + bool Done; +}; + +#endif // __cmCursesStringWidget_h diff --git a/Source/CursesDialog/cmCursesWidget.cxx b/Source/CursesDialog/cmCursesWidget.cxx new file mode 100644 index 000000000..75390e344 --- /dev/null +++ b/Source/CursesDialog/cmCursesWidget.cxx @@ -0,0 +1,63 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesWidget.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCursesWidget.h" + +cmCursesWidget::cmCursesWidget(int width, int height, int left, int top) +{ + this->Field = new_field(height, width, top, left, 0, 0); + set_field_userptr(this->Field, reinterpret_cast(this)); + field_opts_off(this->Field, O_AUTOSKIP); + this->Page = 0; +} + +cmCursesWidget::~cmCursesWidget() +{ + if (this->Field) + { + free_field(this->Field); + this->Field = 0; + } +} + +void cmCursesWidget::Move(int x, int y, bool isNewPage) +{ + if (!this->Field) + { + return; + } + + move_field(this->Field, y, x); + if (isNewPage) + { + set_new_page(this->Field, TRUE); + } + else + { + set_new_page(this->Field, FALSE); + } +} + +void cmCursesWidget::SetValue(const char* value) +{ + this->Value = value; + set_field_buffer(this->Field, 0, value); +} + +const char* cmCursesWidget::GetValue() +{ + return this->Value.c_str(); +} diff --git a/Source/CursesDialog/cmCursesWidget.h b/Source/CursesDialog/cmCursesWidget.h new file mode 100644 index 000000000..a355557cc --- /dev/null +++ b/Source/CursesDialog/cmCursesWidget.h @@ -0,0 +1,92 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCursesWidget.h,v $ + Language: C++ + Date: $Date: 2006-03-16 15:44:55 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __cmCursesWidget_h +#define __cmCursesWidget_h + +#include "../cmCacheManager.h" +#include "cmCursesStandardIncludes.h" + +class cmCursesMainForm; + +class cmCursesWidget +{ +public: + cmCursesWidget(int width, int height, int left, int top); + virtual ~cmCursesWidget(); + + /** + * Handle user input. Called by the container of this widget + * when this widget has focus. Returns true if the input was + * handled + */ + virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) = 0; + + /** + * Change the position of the widget. Set isNewPage to true + * if this widget marks the beginning of a new page. + */ + virtual void Move(int x, int y, bool isNewPage); + + /** + * Set/Get the value (setting the value also changes the contents + * of the field buffer). + */ + virtual void SetValue(const char* value); + virtual const char* GetValue(); + + /** + * Get the type of the widget (STRING, PATH etc...) + */ + cmCacheManager::CacheEntryType GetType() + { return this->Type; } + + /** + * If there are any, print the widget specific commands + * in the toolbar and return true. Otherwise, return false + * and the parent widget will print. + */ + virtual bool PrintKeys() + { + return false; + } + + /** + * Set/Get the page this widget is in. + */ + void SetPage(int page) + { + this->Page = page; + } + int GetPage() + { + return this->Page; + } + + friend class cmCursesMainForm; + +protected: + cmCursesWidget(const cmCursesWidget& from); + void operator=(const cmCursesWidget&); + + cmCacheManager::CacheEntryType Type; + std::string Value; + FIELD* Field; + // The page in the main form this widget is in + int Page; +}; + +#endif // __cmCursesWidget_h diff --git a/Source/CursesDialog/form/.NoDartCoverage b/Source/CursesDialog/form/.NoDartCoverage new file mode 100644 index 000000000..3c9972938 --- /dev/null +++ b/Source/CursesDialog/form/.NoDartCoverage @@ -0,0 +1 @@ +# do not do coverage in this directory diff --git a/Source/CursesDialog/form/CMakeLists.txt b/Source/CursesDialog/form/CMakeLists.txt new file mode 100644 index 000000000..a3d99777a --- /dev/null +++ b/Source/CursesDialog/form/CMakeLists.txt @@ -0,0 +1,55 @@ +PROJECT(CMAKE_FORM) + +INCLUDE_REGULAR_EXPRESSION("^.*$") +INCLUDE_DIRECTORIES(${CURSES_INCLUDE_PATH} "${CMAKE_CURRENT_BINARY_DIR}") + +CONFIGURE_FILE(cmFormConfigure.h.in "${CMAKE_CURRENT_BINARY_DIR}/cmFormConfigure.h") + +SET( FORM_SRCS + fld_arg.c + fld_attr.c + fld_current.c + fld_def.c + fld_dup.c + fld_ftchoice.c + fld_ftlink.c + fld_info.c + fld_just.c + fld_link.c + fld_max.c + fld_move.c + fld_newftyp.c + fld_opts.c + fld_pad.c + fld_page.c + fld_stat.c + fld_type.c + fld_user.c + frm_cursor.c + frm_data.c + frm_def.c + frm_driver.c + frm_hook.c + frm_opts.c + frm_page.c + frm_post.c + frm_req_name.c + frm_scale.c + frm_sub.c + frm_user.c + frm_win.c + fty_alnum.c + fty_alpha.c + fty_enum.c + fty_int.c + fty_ipv4.c + fty_num.c + fty_regex.c + ) + +INCLUDE_DIRECTORIES(${CMAKE_FORM_SOURCE_DIR}) +ADD_LIBRARY(cmForm ${FORM_SRCS} ) +TARGET_LINK_LIBRARIES(cmForm ${CURSES_LIBRARY}) +IF(CURSES_EXTRA_LIBRARY) + TARGET_LINK_LIBRARIES(cmForm ${CURSES_EXTRA_LIBRARY}) +ENDIF(CURSES_EXTRA_LIBRARY) diff --git a/Source/CursesDialog/form/READ.ME b/Source/CursesDialog/form/READ.ME new file mode 100644 index 000000000..dd91693f6 --- /dev/null +++ b/Source/CursesDialog/form/READ.ME @@ -0,0 +1,15 @@ +This is a clone of the form library that is available with typical +System V curses implementations (ETI). + +It is modelled after the documentation that comes for this library with +a 386 based SVR4 implementation (ESIX). + +The development environment was and is an ELF based Linux system. + +For things that still need doing, see the TO-DO file in the top-level +directory. + +Juergen Pfeifer + +eMail: juergen.pfeifer@gmx.net + diff --git a/Source/CursesDialog/form/cmFormConfigure.h.in b/Source/CursesDialog/form/cmFormConfigure.h.in new file mode 100644 index 000000000..9cfcb3371 --- /dev/null +++ b/Source/CursesDialog/form/cmFormConfigure.h.in @@ -0,0 +1,26 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFormConfigure.h.in,v $ + Language: C++ + Date: $Date: 2007-08-27 13:01:14 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef CMFORMCONFIGURE_H +#define CMFORMCONFIGURE_H + +#cmakedefine CURSES_HAVE_CURSES_H +#cmakedefine CURSES_HAVE_NCURSES_H +#cmakedefine CURSES_HAVE_NCURSES_NCURSES_H +#cmakedefine CURSES_HAVE_NCURSES_CURSES_H + +#endif diff --git a/Source/CursesDialog/form/eti.h b/Source/CursesDialog/form/eti.h new file mode 100644 index 000000000..cc1c8308a --- /dev/null +++ b/Source/CursesDialog/form/eti.h @@ -0,0 +1,52 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#ifndef _ETI_ERRNO_H_ +#define _ETI_ERRNO_H_ + +#define E_OK (0) +#define E_SYSTEM_ERROR (-1) +#define E_BAD_ARGUMENT (-2) +#define E_POSTED (-3) +#define E_CONNECTED (-4) +#define E_BAD_STATE (-5) +#define E_NO_ROOM (-6) +#define E_NOT_POSTED (-7) +#define E_UNKNOWN_COMMAND (-8) +#define E_NO_MATCH (-9) +#define E_NOT_SELECTABLE (-10) +#define E_NOT_CONNECTED (-11) +#define E_REQUEST_DENIED (-12) +#define E_INVALID_FIELD (-13) +#define E_CURRENT (-14) + +#endif diff --git a/Source/CursesDialog/form/fld_arg.c b/Source/CursesDialog/form/fld_arg.c new file mode 100644 index 000000000..20f275db5 --- /dev/null +++ b/Source/CursesDialog/form/fld_arg.c @@ -0,0 +1,91 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_arg.c,v 1.1 2001-11-05 16:52:59 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_fieldtype_arg( +| FIELDTYPE *typ, +| void * (* const make_arg)(va_list *), +| void * (* const copy_arg)(const void *), +| void (* const free_arg)(void *) ) +| +| Description : Connects to the type additional arguments necessary +| for a set_field_type call. The various function pointer +| arguments are: +| make_arg : allocates a structure for the field +| specific parameters. +| copy_arg : duplicate the structure created by +| make_arg +| free_arg : Release the memory allocated by make_arg +| or copy_arg +| +| At least make_arg must be non-NULL. +| You may pass NULL for copy_arg and free_arg if your +| make_arg function doesn't allocate memory and your +| arg fits into the storage for a (void*). +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid argument ++--------------------------------------------------------------------------*/ +int set_fieldtype_arg(FIELDTYPE * typ, + void * (* const make_arg)(va_list *), + void * (* const copy_arg)(const void *), + void (* const free_arg)(void *)) +{ + if ( !typ || !make_arg ) + RETURN(E_BAD_ARGUMENT); + + typ->status |= _HAS_ARGS; + typ->makearg = make_arg; + typ->copyarg = copy_arg; + typ->freearg = free_arg; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : void *field_arg(const FIELD *field) +| +| Description : Retrieve pointer to the fields argument structure. +| +| Return Values : Pointer to structure or NULL if none is defined. ++--------------------------------------------------------------------------*/ +void *field_arg(const FIELD * field) +{ + return Normalize_Field(field)->arg; +} + +/* fld_arg.c ends here */ diff --git a/Source/CursesDialog/form/fld_attr.c b/Source/CursesDialog/form/fld_attr.c new file mode 100644 index 000000000..e0fc2a6b8 --- /dev/null +++ b/Source/CursesDialog/form/fld_attr.c @@ -0,0 +1,116 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#if defined(__hpux) + #define _XOPEN_SOURCE_EXTENDED +#endif + #include "form.priv.h" +#if defined(__hpux) + #undef _XOPEN_SOURCE_EXTENDED +#endif +MODULE_ID("$Id: fld_attr.c,v 1.2 2003-03-11 20:25:50 hoffman Exp $") + +/*---------------------------------------------------------------------------- + Field-Attribute manipulation routines + --------------------------------------------------------------------------*/ +/* "Template" macro to generate a function to set a fields attribute */ +#define GEN_FIELD_ATTR_SET_FCT( name ) \ +int set_field_ ## name (FIELD * field, chtype attr)\ +{\ + int res = E_BAD_ARGUMENT;\ + if ( attr==A_NORMAL || ((attr & A_ATTRIBUTES)==attr) )\ + {\ + Normalize_Field( field );\ + if ((field -> name) != attr)\ + {\ + field -> name = attr;\ + res = _nc_Synchronize_Attributes( field );\ + }\ + else\ + res = E_OK;\ + }\ + RETURN(res);\ +} + +/* "Template" macro to generate a function to get a fields attribute */ +#define GEN_FIELD_ATTR_GET_FCT( name ) \ +chtype field_ ## name (const FIELD * field)\ +{\ + return ( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\ +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_fore(FIELD *field, chtype attr) +| +| Description : Sets the foreground of the field used to display the +| field contents. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid attributes +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +GEN_FIELD_ATTR_SET_FCT( fore ) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : chtype field_fore(const FIELD *) +| +| Description : Retrieve fields foreground attribute +| +| Return Values : The foreground attribute ++--------------------------------------------------------------------------*/ +GEN_FIELD_ATTR_GET_FCT( fore ) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_back(FIELD *field, chtype attr) +| +| Description : Sets the background of the field used to display the +| fields extend. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid attributes +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +GEN_FIELD_ATTR_SET_FCT( back ) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : chtype field_back(const +| +| Description : Retrieve fields background attribute +| +| Return Values : The background attribute ++--------------------------------------------------------------------------*/ +GEN_FIELD_ATTR_GET_FCT( back ) + +/* fld_attr.c ends here */ diff --git a/Source/CursesDialog/form/fld_current.c b/Source/CursesDialog/form/fld_current.c new file mode 100644 index 000000000..5963ed6c8 --- /dev/null +++ b/Source/CursesDialog/form/fld_current.c @@ -0,0 +1,124 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#include "form.priv.h" + +MODULE_ID("$Id: fld_current.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_current_field(FORM * form,FIELD * field) +| +| Description : Set the current field of the form to the specified one. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form or field pointer +| E_REQUEST_DENIED - field not selectable +| E_BAD_STATE - called from a hook routine +| E_INVALID_FIELD - current field can't be left +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_current_field(FORM * form, FIELD * field) +{ + int err = E_OK; + + if ( !form || !field ) + RETURN(E_BAD_ARGUMENT); + + if ( (form != field->form) || Field_Is_Not_Selectable(field) ) + RETURN(E_REQUEST_DENIED); + + if (!(form->status & _POSTED)) + { + form->current = field; + form->curpage = field->page; + } + else + { + if (form->status & _IN_DRIVER) + err = E_BAD_STATE; + else + { + if (form->current != field) + { + if (!_nc_Internal_Validation(form)) + err = E_INVALID_FIELD; + else + { + Call_Hook(form,fieldterm); + if (field->page != form->curpage) + { + Call_Hook(form,formterm); + err = _nc_Set_Form_Page(form,field->page,field); + Call_Hook(form,forminit); + } + else + { + err = _nc_Set_Current_Field(form,field); + } + Call_Hook(form,fieldinit); + _nc_Refresh_Current_Field(form); + } + } + } + } + RETURN(err); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD *current_field(const FORM * form) +| +| Description : Return the current field. +| +| Return Values : Pointer to the current field. ++--------------------------------------------------------------------------*/ +FIELD *current_field(const FORM * form) +{ + return Normalize_Form(form)->current; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_index(const FIELD * field) +| +| Description : Return the index of the field in the field-array of +| the form. +| +| Return Values : >= 0 : field index +| -1 : fieldpointer invalid or field not connected ++--------------------------------------------------------------------------*/ +int field_index(const FIELD * field) +{ + return ( (field && field->form) ? field->index : -1 ); +} + +/* fld_current.c ends here */ diff --git a/Source/CursesDialog/form/fld_def.c b/Source/CursesDialog/form/fld_def.c new file mode 100644 index 000000000..be77e0569 --- /dev/null +++ b/Source/CursesDialog/form/fld_def.c @@ -0,0 +1,346 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_def.c,v 1.2 2002-01-25 14:06:38 king Exp $") + +/* this can't be readonly */ +static FIELD default_field = { + 0, /* status */ + 0, /* rows */ + 0, /* cols */ + 0, /* frow */ + 0, /* fcol */ + 0, /* drows */ + 0, /* dcols */ + 0, /* maxgrow*/ + 0, /* nrow */ + 0, /* nbuf */ + NO_JUSTIFICATION, /* just */ + 0, /* page */ + 0, /* index */ + (int)' ', /* pad */ + A_NORMAL, /* fore */ + A_NORMAL, /* back */ + ALL_FIELD_OPTS, /* opts */ + (FIELD *)0, /* snext */ + (FIELD *)0, /* sprev */ + (FIELD *)0, /* link */ + (FORM *)0, /* form */ + (FIELDTYPE *)0, /* type */ + (char *)0, /* arg */ + (char *)0, /* buf */ + (char *)0 /* usrptr */ +}; + +FIELD *_nc_Default_Field = &default_field; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : TypeArgument *_nc_Make_Argument( +| const FIELDTYPE *typ, +| va_list *ap, +| int *err ) +| +| Description : Create an argument structure for the specified type. +| Use the type-dependant argument list to construct +| it. +| +| Return Values : Pointer to argument structure. Maybe NULL. +| In case of an error in *err an errorcounter is increased. ++--------------------------------------------------------------------------*/ +TypeArgument* +_nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err) +{ + TypeArgument *res = (TypeArgument *)0; + TypeArgument *p; + + if (typ && (typ->status & _HAS_ARGS)) + { + assert(err && ap); + if (typ->status & _LINKED_TYPE) + { + p = (TypeArgument *)malloc(sizeof(TypeArgument)); + if (p) + { + p->left = _nc_Make_Argument(typ->left ,ap,err); + p->right = _nc_Make_Argument(typ->right,ap,err); + return p; + } + else + *err += 1; + } else + { + assert(typ->makearg != 0); + if ( !(res=(TypeArgument *)typ->makearg(ap)) ) + *err += 1; + } + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : TypeArgument *_nc_Copy_Argument(const FIELDTYPE *typ, +| const TypeArgument *argp, +| int *err ) +| +| Description : Create a copy of an argument structure for the specified +| type. +| +| Return Values : Pointer to argument structure. Maybe NULL. +| In case of an error in *err an errorcounter is increased. ++--------------------------------------------------------------------------*/ +TypeArgument* +_nc_Copy_Argument(const FIELDTYPE *typ, + const TypeArgument *argp, int *err) +{ + TypeArgument *res = (TypeArgument *)0; + TypeArgument *p; + + if ( typ && (typ->status & _HAS_ARGS) ) + { + assert(err && argp); + if (typ->status & _LINKED_TYPE) + { + p = (TypeArgument *)malloc(sizeof(TypeArgument)); + if (p) + { + p->left = _nc_Copy_Argument(typ,argp->left ,err); + p->right = _nc_Copy_Argument(typ,argp->right,err); + return p; + } + *err += 1; + } + else + { + if (typ->copyarg) + { + if (!(res = (TypeArgument *)(typ->copyarg((const void *)argp)))) + *err += 1; + } + else + res = (TypeArgument *)argp; + } + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : void _nc_Free_Argument(const FIELDTYPE *typ, +| TypeArgument * argp ) +| +| Description : Release memory associated with the argument structure +| for the given fieldtype. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +void +_nc_Free_Argument(const FIELDTYPE * typ, TypeArgument * argp) +{ + if (!typ || !(typ->status & _HAS_ARGS)) + return; + + if (typ->status & _LINKED_TYPE) + { + assert(argp != 0); + _nc_Free_Argument(typ->left ,argp->left ); + _nc_Free_Argument(typ->right,argp->right); + free(argp); + } + else + { + if (typ->freearg) + typ->freearg((void *)argp); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool _nc_Copy_Type( FIELD *dst, FIELD const *src ) +| +| Description : Copy argument structure of field src to field dst +| +| Return Values : TRUE - copy worked +| FALSE - error occured ++--------------------------------------------------------------------------*/ +bool +_nc_Copy_Type(FIELD *dst, FIELD const *src) +{ + int err = 0; + + assert(dst && src); + + dst->type = src->type; + dst->arg = (void *)_nc_Copy_Argument(src->type,(TypeArgument *)(src->arg),&err); + + if (err) + { + _nc_Free_Argument(dst->type,(TypeArgument *)(dst->arg)); + dst->type = (FIELDTYPE *)0; + dst->arg = (void *)0; + return FALSE; + } + else + { + if (dst->type) + dst->type->ref++; + return TRUE; + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : void _nc_Free_Type( FIELD *field ) +| +| Description : Release Argument structure for this field +| +| Return Values : - ++--------------------------------------------------------------------------*/ +void +_nc_Free_Type(FIELD *field) +{ + assert(field != 0); + if (field->type) + field->type->ref--; + _nc_Free_Argument(field->type,(TypeArgument *)(field->arg)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD *new_field( int rows, int cols, +| int frow, int fcol, +| int nrow, int nbuf ) +| +| Description : Create a new field with this many 'rows' and 'cols', +| starting at 'frow/fcol' in the subwindow of the form. +| Allocate 'nrow' off-screen rows and 'nbuf' additional +| buffers. If an error occurs, errno is set to +| +| E_BAD_ARGUMENT - invalid argument +| E_SYSTEM_ERROR - system error +| +| Return Values : Pointer to the new field or NULL if failure. ++--------------------------------------------------------------------------*/ +FIELD *new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf) +{ + FIELD *New_Field = (FIELD *)0; + int err = E_BAD_ARGUMENT; + + if (rows>0 && + cols>0 && + frow>=0 && + fcol>=0 && + nrow>=0 && + nbuf>=0 && + ((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ + (New_Field=(FIELD *)malloc(sizeof(FIELD))) ) + { + *New_Field = default_field; + New_Field->rows = rows; + New_Field->cols = cols; + New_Field->drows = rows + nrow; + New_Field->dcols = cols; + New_Field->frow = frow; + New_Field->fcol = fcol; + New_Field->nrow = nrow; + New_Field->nbuf = nbuf; + New_Field->link = New_Field; + + if (_nc_Copy_Type(New_Field,&default_field)) + { + size_t len; + + len = Total_Buffer_Size(New_Field); + if ((New_Field->buf = (char *)malloc(len))) + { + /* Prefill buffers with blanks and insert terminating zeroes + between buffers */ + int i; + + memset(New_Field->buf,' ',len); + for(i=0;i<=New_Field->nbuf;i++) + { + New_Field->buf[(New_Field->drows*New_Field->cols+1)*(i+1)-1] + = '\0'; + } + return New_Field; + } + } + } + + if (New_Field) + free_field(New_Field); + + SET_ERROR( err ); + return (FIELD *)0; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int free_field( FIELD *field ) +| +| Description : Frees the storage allocated for the field. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer +| E_CONNECTED - field is connected ++--------------------------------------------------------------------------*/ +int free_field(FIELD * field) +{ + if (!field) + RETURN(E_BAD_ARGUMENT); + + if (field->form) + RETURN(E_CONNECTED); + + if (field == field->link) + { + if (field->buf) + free(field->buf); + } + else + { + FIELD *f; + + for(f=field;f->link != field;f = f->link) + {} + f->link = field->link; + } + _nc_Free_Type(field); + free(field); + RETURN(E_OK); +} + +/* fld_def.c ends here */ diff --git a/Source/CursesDialog/form/fld_dup.c b/Source/CursesDialog/form/fld_dup.c new file mode 100644 index 000000000..6f74981d2 --- /dev/null +++ b/Source/CursesDialog/form/fld_dup.c @@ -0,0 +1,97 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_dup.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD *dup_field(FIELD *field, int frow, int fcol) +| +| Description : Duplicates the field at the specified position. All +| field attributes and the buffers are copied. +| If an error occurs, errno is set to +| +| E_BAD_ARGUMENT - invalid argument +| E_SYSTEM_ERROR - system error +| +| Return Values : Pointer to the new field or NULL if failure ++--------------------------------------------------------------------------*/ +FIELD *dup_field(FIELD * field, int frow, int fcol) +{ + FIELD *New_Field = (FIELD *)0; + int err = E_BAD_ARGUMENT; + + if (field && (frow>=0) && (fcol>=0) && + ((err=E_SYSTEM_ERROR) != 0) && /* trick : this resets the default error */ + (New_Field=(FIELD *)malloc(sizeof(FIELD))) ) + { + *New_Field = *_nc_Default_Field; + New_Field->frow = frow; + New_Field->fcol = fcol; + New_Field->link = New_Field; + New_Field->rows = field->rows; + New_Field->cols = field->cols; + New_Field->nrow = field->nrow; + New_Field->drows = field->drows; + New_Field->dcols = field->dcols; + New_Field->maxgrow = field->maxgrow; + New_Field->nbuf = field->nbuf; + New_Field->just = field->just; + New_Field->fore = field->fore; + New_Field->back = field->back; + New_Field->pad = field->pad; + New_Field->opts = field->opts; + New_Field->usrptr = field->usrptr; + + if (_nc_Copy_Type(New_Field,field)) + { + size_t len; + + len = Total_Buffer_Size(New_Field); + if ( (New_Field->buf=(char *)malloc(len)) ) + { + memcpy(New_Field->buf,field->buf,len); + return New_Field; + } + } + } + + if (New_Field) + free_field(New_Field); + + SET_ERROR(err); + return (FIELD *)0; +} + +/* fld_dup.c ends here */ diff --git a/Source/CursesDialog/form/fld_ftchoice.c b/Source/CursesDialog/form/fld_ftchoice.c new file mode 100644 index 000000000..6fd54b731 --- /dev/null +++ b/Source/CursesDialog/form/fld_ftchoice.c @@ -0,0 +1,62 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_ftchoice.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_fieldtype_choice( +| FIELDTYPE *typ, +| bool (* const next_choice)(FIELD *,const void *), +| bool (* const prev_choice)(FIELD *,const void *)) +| +| Description : Define implementation of enumeration requests. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid arguments ++--------------------------------------------------------------------------*/ +int set_fieldtype_choice(FIELDTYPE * typ, + bool (* const next_choice) (FIELD *,const void *), + bool (* const prev_choice) (FIELD *,const void *)) +{ + if ( !typ || !next_choice || !prev_choice ) + RETURN(E_BAD_ARGUMENT); + + typ->status |= _HAS_CHOICE; + typ->next = next_choice; + typ->prev = prev_choice; + RETURN(E_OK); +} + +/* fld_ftchoice.c ends here */ diff --git a/Source/CursesDialog/form/fld_ftlink.c b/Source/CursesDialog/form/fld_ftlink.c new file mode 100644 index 000000000..3f238f44b --- /dev/null +++ b/Source/CursesDialog/form/fld_ftlink.c @@ -0,0 +1,83 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_ftlink.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELDTYPE *link_fieldtype( +| FIELDTYPE *type1, +| FIELDTYPE *type2) +| +| Description : Create a new fieldtype built from the two given types. +| They are connected by an logical 'OR'. +| If an error occurs, errno is set to +| E_BAD_ARGUMENT - invalid arguments +| E_SYSTEM_ERROR - system error (no memory) +| +| Return Values : Fieldtype pointer or NULL if error occured. ++--------------------------------------------------------------------------*/ +FIELDTYPE *link_fieldtype(FIELDTYPE * type1, FIELDTYPE * type2) +{ + FIELDTYPE *nftyp = (FIELDTYPE *)0; + + if ( type1 && type2 ) + { + nftyp = (FIELDTYPE *)malloc(sizeof(FIELDTYPE)); + if (nftyp) + { + *nftyp = *_nc_Default_FieldType; + nftyp->status |= _LINKED_TYPE; + if ((type1->status & _HAS_ARGS) || (type2->status & _HAS_ARGS) ) + nftyp->status |= _HAS_ARGS; + if ((type1->status & _HAS_CHOICE) || (type2->status & _HAS_CHOICE) ) + nftyp->status |= _HAS_CHOICE; + nftyp->left = type1; + nftyp->right = type2; + type1->ref++; + type2->ref++; + } + else + { + SET_ERROR( E_SYSTEM_ERROR ); + } + } + else + { + SET_ERROR( E_BAD_ARGUMENT ); + } + return nftyp; +} + +/* fld_ftlink.c ends here */ diff --git a/Source/CursesDialog/form/fld_info.c b/Source/CursesDialog/form/fld_info.c new file mode 100644 index 000000000..2789657d9 --- /dev/null +++ b/Source/CursesDialog/form/fld_info.c @@ -0,0 +1,91 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_info.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_info(const FIELD *field, +| int *rows, int *cols, +| int *frow, int *fcol, +| int *nrow, int *nbuf) +| +| Description : Retrieve infos about the fields creation parameters. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer ++--------------------------------------------------------------------------*/ +int field_info(const FIELD *field, + int *rows, int *cols, + int *frow, int *fcol, + int *nrow, int *nbuf) +{ + if (!field) + RETURN(E_BAD_ARGUMENT); + + if (rows) *rows = field->rows; + if (cols) *cols = field->cols; + if (frow) *frow = field->frow; + if (fcol) *fcol = field->fcol; + if (nrow) *nrow = field->nrow; + if (nbuf) *nbuf = field->nbuf; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int dynamic_field_info(const FIELD *field, +| int *drows, int *dcols, +| int *maxgrow) +| +| Description : Retrieve informations about a dynamic fields current +| dynamic parameters. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid argument ++--------------------------------------------------------------------------*/ +int dynamic_field_info(const FIELD *field, + int *drows, int *dcols, int *maxgrow) +{ + if (!field) + RETURN(E_BAD_ARGUMENT); + + if (drows) *drows = field->drows; + if (dcols) *dcols = field->dcols; + if (maxgrow) *maxgrow = field->maxgrow; + + RETURN(E_OK); +} + +/* fld_info.c ends here */ diff --git a/Source/CursesDialog/form/fld_just.c b/Source/CursesDialog/form/fld_just.c new file mode 100644 index 000000000..962870530 --- /dev/null +++ b/Source/CursesDialog/form/fld_just.c @@ -0,0 +1,81 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_just.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_just(FIELD *field, int just) +| +| Description : Set the fields type of justification. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - one of the arguments was incorrect +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_field_just(FIELD * field, int just) +{ + int res = E_BAD_ARGUMENT; + + if ((just==NO_JUSTIFICATION) || + (just==JUSTIFY_LEFT) || + (just==JUSTIFY_CENTER) || + (just==JUSTIFY_RIGHT) ) + { + Normalize_Field( field ); + if (field->just != just) + { + field->just = just; + res = _nc_Synchronize_Attributes( field ); + } + else + res = E_OK; + } + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_just( const FIELD *field ) +| +| Description : Retrieve the fields type of justification +| +| Return Values : The justification type. ++--------------------------------------------------------------------------*/ +int field_just(const FIELD * field) +{ + return Normalize_Field( field )->just; +} + +/* fld_just.c ends here */ diff --git a/Source/CursesDialog/form/fld_link.c b/Source/CursesDialog/form/fld_link.c new file mode 100644 index 000000000..427d574eb --- /dev/null +++ b/Source/CursesDialog/form/fld_link.c @@ -0,0 +1,90 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_link.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD *link_field(FIELD *field, int frow, int fcol) +| +| Description : Duplicates the field at the specified position. The +| new field shares its buffers with the original one, +| the attributes are independent. +| If an error occurs, errno is set to +| +| E_BAD_ARGUMENT - invalid argument +| E_SYSTEM_ERROR - system error +| +| Return Values : Pointer to the new field or NULL if failure ++--------------------------------------------------------------------------*/ +FIELD *link_field(FIELD * field, int frow, int fcol) +{ + FIELD *New_Field = (FIELD *)0; + int err = E_BAD_ARGUMENT; + + if (field && (frow>=0) && (fcol>=0) && + ((err=E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */ + (New_Field = (FIELD *)malloc(sizeof(FIELD))) ) + { + *New_Field = *_nc_Default_Field; + New_Field->frow = frow; + New_Field->fcol = fcol; + New_Field->link = field->link; + field->link = New_Field; + New_Field->buf = field->buf; + New_Field->rows = field->rows; + New_Field->cols = field->cols; + New_Field->nrow = field->nrow; + New_Field->nbuf = field->nbuf; + New_Field->drows = field->drows; + New_Field->dcols = field->dcols; + New_Field->maxgrow= field->maxgrow; + New_Field->just = field->just; + New_Field->fore = field->fore; + New_Field->back = field->back; + New_Field->pad = field->pad; + New_Field->opts = field->opts; + New_Field->usrptr = field->usrptr; + if (_nc_Copy_Type(New_Field,field)) + return New_Field; + } + + if (New_Field) + free_field(New_Field); + + SET_ERROR( err ); + return (FIELD *)0; +} + +/* fld_link.c ends here */ diff --git a/Source/CursesDialog/form/fld_max.c b/Source/CursesDialog/form/fld_max.c new file mode 100644 index 000000000..0aca9953c --- /dev/null +++ b/Source/CursesDialog/form/fld_max.c @@ -0,0 +1,74 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_max.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_max_field(FIELD *field, int maxgrow) +| +| Description : Set the maximum growth for a dynamic field. If maxgrow=0 +| the field may grow to any possible size. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid argument ++--------------------------------------------------------------------------*/ +int set_max_field(FIELD *field, int maxgrow) +{ + if (!field || (maxgrow<0)) + RETURN(E_BAD_ARGUMENT); + else + { + bool single_line_field = Single_Line_Field(field); + + if (maxgrow>0) + { + if (( single_line_field && (maxgrow < field->dcols)) || + (!single_line_field && (maxgrow < field->drows))) + RETURN(E_BAD_ARGUMENT); + } + field->maxgrow = maxgrow; + field->status &= ~_MAY_GROW; + if (!(field->opts & O_STATIC)) + { + if ((maxgrow==0) || + ( single_line_field && (field->dcols < maxgrow)) || + (!single_line_field && (field->drows < maxgrow))) + field->status |= _MAY_GROW; + } + } + RETURN(E_OK); +} + +/* fld_max.c ends here */ diff --git a/Source/CursesDialog/form/fld_move.c b/Source/CursesDialog/form/fld_move.c new file mode 100644 index 000000000..baabfaf28 --- /dev/null +++ b/Source/CursesDialog/form/fld_move.c @@ -0,0 +1,62 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_move.c,v 1.1 2001-11-05 16:53:00 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int move_field(FIELD *field,int frow, int fcol) +| +| Description : Moves the disconnected field to the new location in +| the forms subwindow. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid argument passed +| E_CONNECTED - field is connected ++--------------------------------------------------------------------------*/ +int move_field(FIELD *field, int frow, int fcol) +{ + if ( !field || (frow<0) || (fcol<0) ) + RETURN(E_BAD_ARGUMENT); + + if (field->form) + RETURN(E_CONNECTED); + + field->frow = frow; + field->fcol = fcol; + RETURN(E_OK); +} + +/* fld_move.c ends here */ + diff --git a/Source/CursesDialog/form/fld_newftyp.c b/Source/CursesDialog/form/fld_newftyp.c new file mode 100644 index 000000000..1f4ec2f87 --- /dev/null +++ b/Source/CursesDialog/form/fld_newftyp.c @@ -0,0 +1,125 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_newftyp.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +static FIELDTYPE const default_fieldtype = { + 0, /* status */ + 0L, /* reference count */ + (FIELDTYPE *)0, /* pointer to left operand */ + (FIELDTYPE *)0, /* pointer to right operand */ + NULL, /* makearg function */ + NULL, /* copyarg function */ + NULL, /* freearg function */ + NULL, /* field validation function */ + NULL, /* Character check function */ + NULL, /* enumerate next function */ + NULL /* enumerate previous function */ +}; + +const FIELDTYPE* _nc_Default_FieldType = &default_fieldtype; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELDTYPE *new_fieldtype( +| bool (* const field_check)(FIELD *,const void *), +| bool (* const char_check) (int, const void *) ) +| +| Description : Create a new fieldtype. The application programmer must +| write a field_check and a char_check function and give +| them as input to this call. +| If an error occurs, errno is set to +| E_BAD_ARGUMENT - invalid arguments +| E_SYSTEM_ERROR - system error (no memory) +| +| Return Values : Fieldtype pointer or NULL if error occured ++--------------------------------------------------------------------------*/ +FIELDTYPE *new_fieldtype( + bool (* const field_check)(FIELD *,const void *), + bool (* const char_check) (int,const void *) ) +{ + FIELDTYPE *nftyp = (FIELDTYPE *)0; + + if ( (field_check) || (char_check) ) + { + nftyp = (FIELDTYPE *)malloc(sizeof(FIELDTYPE)); + if (nftyp) + { + *nftyp = default_fieldtype; + nftyp->fcheck = field_check; + nftyp->ccheck = char_check; + } + else + { + SET_ERROR( E_SYSTEM_ERROR ); + } + } + else + { + SET_ERROR( E_BAD_ARGUMENT ); + } + return nftyp; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int free_fieldtype(FIELDTYPE *typ) +| +| Description : Release the memory associated with this fieldtype. +| +| Return Values : E_OK - success +| E_CONNECTED - there are fields referencing the type +| E_BAD_ARGUMENT - invalid fieldtype pointer ++--------------------------------------------------------------------------*/ +int free_fieldtype(FIELDTYPE *typ) +{ + if (!typ) + RETURN(E_BAD_ARGUMENT); + + if (typ->ref!=0) + RETURN(E_CONNECTED); + + if (typ->status & _RESIDENT) + RETURN(E_CONNECTED); + + if (typ->status & _LINKED_TYPE) + { + if (typ->left ) typ->left->ref--; + if (typ->right) typ->right->ref--; + } + free(typ); + RETURN(E_OK); +} + +/* fld_newftyp.c ends here */ diff --git a/Source/CursesDialog/form/fld_opts.c b/Source/CursesDialog/form/fld_opts.c new file mode 100644 index 000000000..4d89fe266 --- /dev/null +++ b/Source/CursesDialog/form/fld_opts.c @@ -0,0 +1,124 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#include "form.priv.h" + +MODULE_ID("$Id: fld_opts.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*---------------------------------------------------------------------------- + Field-Options manipulation routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_opts(FIELD *field, Field_Options opts) +| +| Description : Turns on the named options for this field and turns +| off all the remaining options. +| +| Return Values : E_OK - success +| E_CURRENT - the field is the current field +| E_BAD_ARGUMENT - invalid options +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_field_opts(FIELD * field, Field_Options opts) +{ + int res = E_BAD_ARGUMENT; + opts &= ALL_FIELD_OPTS; + if (!(opts & ~ALL_FIELD_OPTS)) + res = _nc_Synchronize_Options( Normalize_Field(field), opts ); + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Field_Options field_opts(const FIELD *field) +| +| Description : Retrieve the fields options. +| +| Return Values : The options. ++--------------------------------------------------------------------------*/ +Field_Options field_opts(const FIELD * field) +{ + return ALL_FIELD_OPTS & Normalize_Field( field )->opts; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_opts_on(FIELD *field, Field_Options opts) +| +| Description : Turns on the named options for this field and all the +| remaining options are unchanged. +| +| Return Values : E_OK - success +| E_CURRENT - the field is the current field +| E_BAD_ARGUMENT - invalid options +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int field_opts_on(FIELD * field, Field_Options opts) +{ + int res = E_BAD_ARGUMENT; + + opts &= ALL_FIELD_OPTS; + if (!(opts & ~ALL_FIELD_OPTS)) + { + Normalize_Field( field ); + res = _nc_Synchronize_Options( field, field->opts | opts ); + } + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_opts_off(FIELD *field, Field_Options opts) +| +| Description : Turns off the named options for this field and all the +| remaining options are unchanged. +| +| Return Values : E_OK - success +| E_CURRENT - the field is the current field +| E_BAD_ARGUMENT - invalid options +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int field_opts_off(FIELD * field, Field_Options opts) +{ + int res = E_BAD_ARGUMENT; + + opts &= ALL_FIELD_OPTS; + if (!(opts & ~ALL_FIELD_OPTS)) + { + Normalize_Field( field ); + res = _nc_Synchronize_Options( field, field->opts & ~opts ); + } + RETURN(res); +} + +/* fld_opts.c ends here */ diff --git a/Source/CursesDialog/form/fld_pad.c b/Source/CursesDialog/form/fld_pad.c new file mode 100644 index 000000000..07977b230 --- /dev/null +++ b/Source/CursesDialog/form/fld_pad.c @@ -0,0 +1,78 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#include "form.priv.h" + +MODULE_ID("$Id: fld_pad.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_pad(FIELD *field, int ch) +| +| Description : Set the pad character used to fill the field. This must +| be a printable character. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer or pad character +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_field_pad(FIELD * field, int ch) +{ + int res = E_BAD_ARGUMENT; + + Normalize_Field( field ); + if (isprint((unsigned char)ch)) + { + if (field->pad != ch) + { + field->pad = ch; + res = _nc_Synchronize_Attributes( field ); + } + else + res = E_OK; + } + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_pad(const FIELD *field) +| +| Description : Retrieve the fields pad character. +| +| Return Values : The pad character. ++--------------------------------------------------------------------------*/ +int field_pad(const FIELD * field) +{ + return Normalize_Field( field )->pad; +} + +/* fld_pad.c ends here */ diff --git a/Source/CursesDialog/form/fld_page.c b/Source/CursesDialog/form/fld_page.c new file mode 100644 index 000000000..e4ff0541f --- /dev/null +++ b/Source/CursesDialog/form/fld_page.c @@ -0,0 +1,76 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_page.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_new_page(FIELD *field, bool new_page_flag) +| +| Description : Marks the field as the beginning of a new page of +| the form. +| +| Return Values : E_OK - success +| E_CONNECTED - field is connected ++--------------------------------------------------------------------------*/ +int set_new_page(FIELD * field, bool new_page_flag) +{ + Normalize_Field(field); + if (field->form) + RETURN(E_CONNECTED); + + if (new_page_flag) + field->status |= _NEWPAGE; + else + field->status &= ~_NEWPAGE; + + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool new_page(const FIELD *field) +| +| Description : Retrieve the info whether or not the field starts a +| new page on the form. +| +| Return Values : TRUE - field starts a new page +| FALSE - field doesn't start a new page ++--------------------------------------------------------------------------*/ +bool new_page(const FIELD * field) +{ + return (Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE; +} + +/* fld_page.c ends here */ diff --git a/Source/CursesDialog/form/fld_stat.c b/Source/CursesDialog/form/fld_stat.c new file mode 100644 index 000000000..15f50709f --- /dev/null +++ b/Source/CursesDialog/form/fld_stat.c @@ -0,0 +1,73 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_stat.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_status(FIELD *field, bool status) +| +| Description : Set or clear the 'changed' indication flag for that +| fields primary buffer. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +int set_field_status(FIELD * field, bool status) +{ + Normalize_Field( field ); + + if (status) + field->status |= _CHANGED; + else + field->status &= ~_CHANGED; + + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool field_status(const FIELD *field) +| +| Description : Retrieve the value of the 'changed' indication flag +| for that fields primary buffer. +| +| Return Values : TRUE - buffer has been changed +| FALSE - buffer has not been changed ++--------------------------------------------------------------------------*/ +bool field_status(const FIELD * field) +{ + return ((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE); +} + +/* fld_stat.c ends here */ diff --git a/Source/CursesDialog/form/fld_type.c b/Source/CursesDialog/form/fld_type.c new file mode 100644 index 000000000..71150784c --- /dev/null +++ b/Source/CursesDialog/form/fld_type.c @@ -0,0 +1,51 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_type.c,v 1.2 2001-11-06 13:40:07 hoffman Exp $") + + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELDTYPE *field_type(const FIELD *field) +| +| Description : Retrieve the associated fieldtype for this field. +| +| Return Values : Pointer to fieldtype of NULL if none is defined. ++--------------------------------------------------------------------------*/ +FIELDTYPE *field_type(const FIELD * field) +{ + return Normalize_Field(field)->type; +} + +/* fld_type.c ends here */ diff --git a/Source/CursesDialog/form/fld_user.c b/Source/CursesDialog/form/fld_user.c new file mode 100644 index 000000000..bc7685f4b --- /dev/null +++ b/Source/CursesDialog/form/fld_user.c @@ -0,0 +1,67 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fld_user.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_userptr(FIELD *field, void *usrptr) +| +| Description : Set the pointer that is reserved in any field to store +| application relevant informations +| +| Return Values : E_OK - on success ++--------------------------------------------------------------------------*/ +int set_field_userptr(FIELD * field, void *usrptr) +{ + Normalize_Field( field )->usrptr = usrptr; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : void *field_userptr(const FIELD *field) +| +| Description : Return the pointer that is reserved in any field to +| store application relevant informations. +| +| Return Values : Value of pointer. If no such pointer has been set, +| NULL is returned ++--------------------------------------------------------------------------*/ +void *field_userptr(const FIELD *field) +{ + return Normalize_Field( field )->usrptr; +} + +/* fld_user.c ends here */ diff --git a/Source/CursesDialog/form/form.h b/Source/CursesDialog/form/form.h new file mode 100644 index 000000000..94f05af8a --- /dev/null +++ b/Source/CursesDialog/form/form.h @@ -0,0 +1,401 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#ifndef FORM_H +#define FORM_H + +#if defined(__sun__) && defined(__GNUC__) + #define _MSE_INT_H +#endif + +#include + +/* figure out which curses.h to include */ +# if defined(CURSES_HAVE_NCURSES_H) +# include +# elif defined(CURSES_HAVE_NCURSES_NCURSES_H) +# include +# elif defined(CURSES_HAVE_NCURSES_CURSES_H) +# include +# else +# include +# endif + +#include +#include + +#ifdef __cplusplus + extern "C" { +#endif + +typedef int Form_Options; +typedef int Field_Options; + + /********** + * _PAGE * + **********/ + +typedef struct { + short pmin; /* index of first field on page */ + short pmax; /* index of last field on page */ + short smin; /* index of top leftmost field on page */ + short smax; /* index of bottom rightmost field on page */ +} _PAGE; + + /********** + * FIELD * + **********/ + +typedef struct fieldnode { + unsigned short status; /* flags */ + short rows; /* size in rows */ + short cols; /* size in cols */ + short frow; /* first row */ + short fcol; /* first col */ + int drows; /* dynamic rows */ + int dcols; /* dynamic cols */ + int maxgrow; /* maximum field growth */ + int nrow; /* offscreen rows */ + short nbuf; /* additional buffers */ + short just; /* justification */ + short page; /* page on form */ + short index; /* into form -> field */ + int pad; /* pad character */ + chtype fore; /* foreground attribute */ + chtype back; /* background attribute */ + Field_Options opts; /* options */ + struct fieldnode * snext; /* sorted order pointer */ + struct fieldnode * sprev; /* sorted order pointer */ + struct fieldnode * link; /* linked field chain */ + struct formnode * form; /* containing form */ + struct typenode * type; /* field type */ + void * arg; /* argument for type */ + char * buf; /* field buffers */ + void * usrptr; /* user pointer */ +} FIELD; + + /************** + * FIELDTYPE * + **************/ + +typedef struct typenode { + unsigned short status; /* flags */ + long ref; /* reference count */ + struct typenode * left; /* ptr to operand for | */ + struct typenode * right; /* ptr to operand for | */ + + void* (*makearg)(va_list *); /* make fieldtype arg */ + void* (*copyarg)(const void *); /* copy fieldtype arg */ + void (*freearg)(void *); /* free fieldtype arg */ + + bool (*fcheck)(FIELD *,const void *); /* field validation */ + bool (*ccheck)(int,const void *); /* character validation */ + + bool (*next)(FIELD *,const void *); /* enumerate next value */ + bool (*prev)(FIELD *,const void *); /* enumerate prev value */ + +} FIELDTYPE; + + /********* + * FORM * + *********/ + +typedef struct formnode { + unsigned short status; /* flags */ + short rows; /* size in rows */ + short cols; /* size in cols */ + int currow; /* current row in field window*/ + int curcol; /* current col in field window*/ + int toprow; /* in scrollable field window */ + int begincol; /* in horiz. scrollable field */ + short maxfield; /* number of fields */ + short maxpage; /* number of pages */ + short curpage; /* index into page */ + Form_Options opts; /* options */ + WINDOW * win; /* window */ + WINDOW * sub; /* subwindow */ + WINDOW * w; /* window for current field */ + FIELD ** field; /* field [maxfield] */ + FIELD * current; /* current field */ + _PAGE * page; /* page [maxpage] */ + void * usrptr; /* user pointer */ + + void (*forminit)(struct formnode *); + void (*formterm)(struct formnode *); + void (*fieldinit)(struct formnode *); + void (*fieldterm)(struct formnode *); + +} FORM; + +typedef void (*Form_Hook)(FORM *); + + /*************************** + * miscellaneous #defines * + ***************************/ + +/* field justification */ +#define NO_JUSTIFICATION (0) +#define JUSTIFY_LEFT (1) +#define JUSTIFY_CENTER (2) +#define JUSTIFY_RIGHT (3) + +/* field options */ +#define O_VISIBLE (0x0001) +#define O_ACTIVE (0x0002) +#define O_PUBLIC (0x0004) +#define O_EDIT (0x0008) +#define O_WRAP (0x0010) +#define O_BLANK (0x0020) +#define O_AUTOSKIP (0x0040) +#define O_NULLOK (0x0080) +#define O_PASSOK (0x0100) +#define O_STATIC (0x0200) + +/* form options */ +#define O_NL_OVERLOAD (0x0001) +#define O_BS_OVERLOAD (0x0002) + +/* form driver commands */ +#define REQ_NEXT_PAGE (KEY_MAX + 1) /* move to next page */ +#define REQ_PREV_PAGE (KEY_MAX + 2) /* move to previous page */ +#define REQ_FIRST_PAGE (KEY_MAX + 3) /* move to first page */ +#define REQ_LAST_PAGE (KEY_MAX + 4) /* move to last page */ + +#define REQ_NEXT_FIELD (KEY_MAX + 5) /* move to next field */ +#define REQ_PREV_FIELD (KEY_MAX + 6) /* move to previous field */ +#define REQ_FIRST_FIELD (KEY_MAX + 7) /* move to first field */ +#define REQ_LAST_FIELD (KEY_MAX + 8) /* move to last field */ +#define REQ_SNEXT_FIELD (KEY_MAX + 9) /* move to sorted next field */ +#define REQ_SPREV_FIELD (KEY_MAX + 10) /* move to sorted prev field */ +#define REQ_SFIRST_FIELD (KEY_MAX + 11) /* move to sorted first field */ +#define REQ_SLAST_FIELD (KEY_MAX + 12) /* move to sorted last field */ +#define REQ_LEFT_FIELD (KEY_MAX + 13) /* move to left to field */ +#define REQ_RIGHT_FIELD (KEY_MAX + 14) /* move to right to field */ +#define REQ_UP_FIELD (KEY_MAX + 15) /* move to up to field */ +#define REQ_DOWN_FIELD (KEY_MAX + 16) /* move to down to field */ + +#define REQ_NEXT_CHAR (KEY_MAX + 17) /* move to next char in field */ +#define REQ_PREV_CHAR (KEY_MAX + 18) /* move to prev char in field */ +#define REQ_NEXT_LINE (KEY_MAX + 19) /* move to next line in field */ +#define REQ_PREV_LINE (KEY_MAX + 20) /* move to prev line in field */ +#define REQ_NEXT_WORD (KEY_MAX + 21) /* move to next word in field */ +#define REQ_PREV_WORD (KEY_MAX + 22) /* move to prev word in field */ +#define REQ_BEG_FIELD (KEY_MAX + 23) /* move to first char in field */ +#define REQ_END_FIELD (KEY_MAX + 24) /* move after last char in fld */ +#define REQ_BEG_LINE (KEY_MAX + 25) /* move to beginning of line */ +#define REQ_END_LINE (KEY_MAX + 26) /* move after last char in line */ +#define REQ_LEFT_CHAR (KEY_MAX + 27) /* move left in field */ +#define REQ_RIGHT_CHAR (KEY_MAX + 28) /* move right in field */ +#define REQ_UP_CHAR (KEY_MAX + 29) /* move up in field */ +#define REQ_DOWN_CHAR (KEY_MAX + 30) /* move down in field */ + +#define REQ_NEW_LINE (KEY_MAX + 31) /* insert/overlay new line */ +#define REQ_INS_CHAR (KEY_MAX + 32) /* insert blank char at cursor */ +#define REQ_INS_LINE (KEY_MAX + 33) /* insert blank line at cursor */ +#define REQ_DEL_CHAR (KEY_MAX + 34) /* delete char at cursor */ +#define REQ_DEL_PREV (KEY_MAX + 35) /* delete char before cursor */ +#define REQ_DEL_LINE (KEY_MAX + 36) /* delete line at cursor */ +#define REQ_DEL_WORD (KEY_MAX + 37) /* delete line at cursor */ +#define REQ_CLR_EOL (KEY_MAX + 38) /* clear to end of line */ +#define REQ_CLR_EOF (KEY_MAX + 39) /* clear to end of field */ +#define REQ_CLR_FIELD (KEY_MAX + 40) /* clear entire field */ +#define REQ_OVL_MODE (KEY_MAX + 41) /* begin overlay mode */ +#define REQ_INS_MODE (KEY_MAX + 42) /* begin insert mode */ +#define REQ_SCR_FLINE (KEY_MAX + 43) /* scroll field forward a line */ +#define REQ_SCR_BLINE (KEY_MAX + 44) /* scroll field backward a line */ +#define REQ_SCR_FPAGE (KEY_MAX + 45) /* scroll field forward a page */ +#define REQ_SCR_BPAGE (KEY_MAX + 46) /* scroll field backward a page */ +#define REQ_SCR_FHPAGE (KEY_MAX + 47) /* scroll field forward half page */ +#define REQ_SCR_BHPAGE (KEY_MAX + 48) /* scroll field backward half page */ +#define REQ_SCR_FCHAR (KEY_MAX + 49) /* horizontal scroll char */ +#define REQ_SCR_BCHAR (KEY_MAX + 50) /* horizontal scroll char */ +#define REQ_SCR_HFLINE (KEY_MAX + 51) /* horizontal scroll line */ +#define REQ_SCR_HBLINE (KEY_MAX + 52) /* horizontal scroll line */ +#define REQ_SCR_HFHALF (KEY_MAX + 53) /* horizontal scroll half line */ +#define REQ_SCR_HBHALF (KEY_MAX + 54) /* horizontal scroll half line */ + +#define REQ_VALIDATION (KEY_MAX + 55) /* validate field */ +#define REQ_NEXT_CHOICE (KEY_MAX + 56) /* display next field choice */ +#define REQ_PREV_CHOICE (KEY_MAX + 57) /* display prev field choice */ + +#define MIN_FORM_COMMAND (KEY_MAX + 1) /* used by form_driver */ +#define MAX_FORM_COMMAND (KEY_MAX + 57) /* used by form_driver */ + +#if defined(MAX_COMMAND) +# if (MAX_FORM_COMMAND > MAX_COMMAND) +# error Something is wrong -- MAX_FORM_COMMAND is greater than MAX_COMMAND +# elif (MAX_COMMAND != (KEY_MAX + 128)) +# error Something is wrong -- MAX_COMMAND is already inconsistently defined. +# endif +#else +# define MAX_COMMAND (KEY_MAX + 128) +#endif + + /************************* + * standard field types * + *************************/ +extern FIELDTYPE *TYPE_ALPHA, + *TYPE_ALNUM, + *TYPE_ENUM, + *TYPE_INTEGER, + *TYPE_NUMERIC, + *TYPE_REGEXP; + + /************************************ + * built-in additional field types * + * They are not defined in SVr4 * + ************************************/ +extern FIELDTYPE *TYPE_IPV4; /* Internet IP Version 4 address */ + + /*********************** + * Default objects * + ***********************/ +extern FORM *_nc_Default_Form; +extern FIELD *_nc_Default_Field; + + + /*********************** + * FIELDTYPE routines * + ***********************/ +extern FIELDTYPE + *new_fieldtype( + bool (* const field_check)(FIELD *,const void *), + bool (* const char_check)(int,const void *)), + *link_fieldtype(FIELDTYPE *,FIELDTYPE *); + +extern int free_fieldtype(FIELDTYPE *), + set_fieldtype_choice (FIELDTYPE *, + bool (* const next_choice)(FIELD *,const void *), + bool (* const prev_choice)(FIELD *,const void *)); + + /******************* + * FIELD routines * + *******************/ +extern FIELD *new_field(int,int,int,int,int,int), + *dup_field(FIELD *,int,int), + *link_field(FIELD *,int,int); + +extern int free_field(FIELD *), + field_info(const FIELD *,int *,int *,int *,int *,int *,int *), + dynamic_field_info(const FIELD *,int *,int *,int *), + set_max_field( FIELD *,int), + move_field(FIELD *,int,int), + set_field_type(FIELD *,FIELDTYPE *,...), + set_new_page(FIELD *,bool), + set_field_just(FIELD *,int), + field_just(const FIELD *), + set_field_fore(FIELD *,chtype), + set_field_back(FIELD *,chtype), + set_field_pad(FIELD *,int), + field_pad(const FIELD *), + set_field_buffer(FIELD *,int,const char *), + set_field_status(FIELD *,bool), + set_field_userptr(FIELD *, void *), + set_field_opts(FIELD *,Field_Options), + field_opts_on(FIELD *,Field_Options), + field_opts_off(FIELD *,Field_Options); + +extern chtype field_fore(const FIELD *), + field_back(const FIELD *); + +extern bool new_page(const FIELD *), + field_status(const FIELD *); + +extern void *field_arg(const FIELD *); + +extern void *field_userptr(const FIELD *); + +extern FIELDTYPE + *field_type(const FIELD *); + +extern char* field_buffer(const FIELD *,int); + +extern Field_Options + field_opts(const FIELD *); + + /****************** + * FORM routines * + ******************/ +extern FORM *new_form(FIELD **); + +extern FIELD **form_fields(const FORM *), + *current_field(const FORM *); + +extern WINDOW *form_win(const FORM *), + *form_sub(const FORM *); + +extern Form_Hook + form_init(const FORM *), + form_term(const FORM *), + field_init(const FORM *), + field_term(const FORM *); + +extern int free_form(FORM *), + set_form_fields(FORM *,FIELD **), + field_count(const FORM *), + set_form_win(FORM *,WINDOW *), + set_form_sub(FORM *,WINDOW *), + set_current_field(FORM *,FIELD *), + field_index(const FIELD *), + set_form_page(FORM *,int), + form_page(const FORM *), + scale_form(const FORM *,int *,int *), + set_form_init(FORM *,Form_Hook), + set_form_term(FORM *,Form_Hook), + set_field_init(FORM *,Form_Hook), + set_field_term(FORM *,Form_Hook), + post_form(FORM *), + unpost_form(FORM *), + pos_form_cursor(FORM *), + form_driver(FORM *,int), + set_form_userptr(FORM *,void *), + set_form_opts(FORM *,Form_Options), + form_opts_on(FORM *,Form_Options), + form_opts_off(FORM *,Form_Options), + form_request_by_name(const char *); + +extern const char + *form_request_name(int); + +extern void *form_userptr(const FORM *); + +extern Form_Options + form_opts(const FORM *); + +extern bool data_ahead(const FORM *), + data_behind(const FORM *); + +#ifdef __cplusplus + } +#endif + +#endif /* FORM_H */ diff --git a/Source/CursesDialog/form/form.priv.h b/Source/CursesDialog/form/form.priv.h new file mode 100644 index 000000000..3691f2fd0 --- /dev/null +++ b/Source/CursesDialog/form/form.priv.h @@ -0,0 +1,134 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "mf_common.h" +#include "form.h" + +/* get around odd bug on aCC and itanium */ +#if defined(__hpux) && defined(__ia64) +#define getmaxx __getmaxx +#define getmaxy __getmaxy +#endif + +/* form status values */ +#define _OVLMODE (0x04) /* Form is in overlay mode */ +#define _WINDOW_MODIFIED (0x10) /* Current field window has been modified */ +#define _FCHECK_REQUIRED (0x20) /* Current field needs validation */ + +/* field status values */ +#define _CHANGED (0x01) /* Field has been changed */ +#define _NEWTOP (0x02) /* Vertical scrolling occured */ +#define _NEWPAGE (0x04) /* field begins new page of form */ +#define _MAY_GROW (0x08) /* dynamic field may still grow */ + +/* fieldtype status values */ +#define _LINKED_TYPE (0x01) /* Type is a linked type */ +#define _HAS_ARGS (0x02) /* Type has arguments */ +#define _HAS_CHOICE (0x04) /* Type has choice methods */ +#define _RESIDENT (0x08) /* Type is builtin */ + +/* This are the field options required to be a selectable field in field + navigation requests */ +#define O_SELECTABLE (O_ACTIVE | O_VISIBLE) + +/* If form is NULL replace form argument by default-form */ +#define Normalize_Form(form) ((form)=(form)?(form):_nc_Default_Form) + +/* If field is NULL replace field argument by default-field */ +#define Normalize_Field(field) ((field)=(field)?(field):_nc_Default_Field) + +/* Retrieve forms window */ +#define Get_Form_Window(form) \ + ((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr)) + +/* Calculate the size for a single buffer for this field */ +#define Buffer_Length(field) ((field)->drows * (field)->dcols) + +/* Calculate the total size of all buffers for this field */ +#define Total_Buffer_Size(field) \ + ( (Buffer_Length(field) + 1) * (1+(field)->nbuf) ) + +/* Logic to determine whether or not a field is single lined */ +#define Single_Line_Field(field) \ + (((field)->rows + (field)->nrow) == 1) + +/* Logic to determine whether or not a field is selectable */ +#define Field_Is_Selectable(f) (((f)->opts & O_SELECTABLE)==O_SELECTABLE) +#define Field_Is_Not_Selectable(f) (((f)->opts & O_SELECTABLE)!=O_SELECTABLE) + +typedef struct typearg { + struct typearg *left; + struct typearg *right; +} TypeArgument; + +/* This is a dummy request code (normally invalid) to be used internally + with the form_driver() routine to position to the first active field + on the form +*/ +#define FIRST_ACTIVE_MAGIC (-291056) + +#define ALL_FORM_OPTS ( \ + O_NL_OVERLOAD |\ + O_BS_OVERLOAD ) + +#define ALL_FIELD_OPTS ( \ + O_VISIBLE |\ + O_ACTIVE |\ + O_PUBLIC |\ + O_EDIT |\ + O_WRAP |\ + O_BLANK |\ + O_AUTOSKIP|\ + O_NULLOK |\ + O_PASSOK |\ + O_STATIC ) + + +#define C_BLANK ' ' +#define is_blank(c) ((c)==C_BLANK) + +extern const FIELDTYPE* _nc_Default_FieldType; + +extern TypeArgument* _nc_Make_Argument(const FIELDTYPE*,va_list*,int*); +extern TypeArgument *_nc_Copy_Argument(const FIELDTYPE*,const TypeArgument*, int*); +extern void _nc_Free_Argument(const FIELDTYPE*,TypeArgument*); +extern bool _nc_Copy_Type(FIELD*, FIELD const *); +extern void _nc_Free_Type(FIELD *); + +extern int _nc_Synchronize_Attributes(FIELD*); +extern int _nc_Synchronize_Options(FIELD*,Field_Options); +extern int _nc_Set_Form_Page(FORM*,int,FIELD*); +extern int _nc_Refresh_Current_Field(FORM*); +extern FIELD* _nc_First_Active_Field(FORM*); +extern bool _nc_Internal_Validation(FORM*); +extern int _nc_Set_Current_Field(FORM*,FIELD*); +extern int _nc_Position_Form_Cursor(FORM*); diff --git a/Source/CursesDialog/form/frm_cursor.c b/Source/CursesDialog/form/frm_cursor.c new file mode 100644 index 000000000..87dd915ab --- /dev/null +++ b/Source/CursesDialog/form/frm_cursor.c @@ -0,0 +1,66 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#include "form.priv.h" + +MODULE_ID("$Id: frm_cursor.c,v 1.1 2001-11-05 16:53:01 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int pos_form_cursor(FORM * form) +| +| Description : Moves the form window cursor to the location required +| by the form driver to resume form processing. This may +| be needed after the application calls a curses library +| I/O routine that modifies the cursor position. +| +| Return Values : E_OK - Success +| E_SYSTEM_ERROR - System error. +| E_BAD_ARGUMENT - Invalid form pointer +| E_NOT_POSTED - Form is not posted ++--------------------------------------------------------------------------*/ +int pos_form_cursor(FORM * form) +{ + int res; + + if (!form) + res = E_BAD_ARGUMENT; + else + { + if (!(form->status & _POSTED)) + res = E_NOT_POSTED; + else + res = _nc_Position_Form_Cursor(form); + } + RETURN(res); +} + +/* frm_cursor.c ends here */ diff --git a/Source/CursesDialog/form/frm_data.c b/Source/CursesDialog/form/frm_data.c new file mode 100644 index 000000000..ea1901b42 --- /dev/null +++ b/Source/CursesDialog/form/frm_data.c @@ -0,0 +1,183 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_data.c,v 1.3 2002-06-18 20:30:00 king Exp $") + +extern int winnstr(WINDOW *, char *, int); + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool data_behind(const FORM *form) +| +| Description : Check for off-screen data behind. This is nearly trivial +| becose the begin of a field is fixed. +| +| Return Values : TRUE - there are off-screen data behind +| FALSE - there are no off-screen data behind ++--------------------------------------------------------------------------*/ +bool data_behind(const FORM *form) +{ + bool result = FALSE; + + if (form && (form->status & _POSTED) && form->current) + { + FIELD *field; + + field = form->current; + if (!Single_Line_Field(field)) + { + result = (form->toprow==0) ? FALSE : TRUE; + } + else + { + result = (form->begincol==0) ? FALSE : TRUE; + } + } + return(result); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static char * After_Last_Non_Pad_Position( +| char *buffer, +| int len, +| int pad) +| +| Description : Find the last position in the buffer that doesn't +| contain a padding character. +| +| Return Values : The pointer to this position ++--------------------------------------------------------------------------*/ +INLINE +static char * After_Last_Non_Pad_Position(char *buffer, int len, int pad) +{ + char *end = buffer + len; + + assert(buffer && len>=0); + while ( (buffer < end) && (*(end-1)==pad) ) + end--; + + return end; +} + +#define SMALL_BUFFER_SIZE (80) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool data_ahead(const FORM *form) +| +| Description : Check for off-screen data ahead. This is more difficult +| because a dynamic field has a variable end. +| +| Return Values : TRUE - there are off-screen data ahead +| FALSE - there are no off-screen data ahead ++--------------------------------------------------------------------------*/ +bool data_ahead(const FORM *form) +{ + bool result = FALSE; + + if (form && (form->status & _POSTED) && form->current) + { + static char buffer[SMALL_BUFFER_SIZE + 1]; + FIELD *field; + bool large_buffer; + bool cursor_moved = FALSE; + char *bp; + char *found_content; + int pos; + + field = form->current; + assert(form->w != 0); + + large_buffer = (field->cols > SMALL_BUFFER_SIZE); + if (large_buffer) + bp = (char *)malloc((size_t)(field->cols) + 1); + else + bp = buffer; + + assert(bp != 0); + + if (Single_Line_Field(field)) + { + int check_len; + + pos = form->begincol + field->cols; + while (pos < field->dcols) + { + check_len = field->dcols - pos; + if ( check_len >= field->cols ) + check_len = field->cols; + cursor_moved = TRUE; + wmove(form->w,0,pos); + winnstr(form->w,bp,check_len); + found_content = + After_Last_Non_Pad_Position(bp,check_len,field->pad); + if (found_content==bp) + pos += field->cols; + else + { + result = TRUE; + break; + } + } + } + else + { + pos = form->toprow + field->rows; + while (pos < field->drows) + { + cursor_moved = TRUE; + wmove(form->w,pos,0); + pos++; + winnstr(form->w,bp,field->cols); + found_content = + After_Last_Non_Pad_Position(bp,field->cols,field->pad); + if (found_content!=bp) + { + result = TRUE; + break; + } + } + } + + if (large_buffer) + free(bp); + + if (cursor_moved) + wmove(form->w,form->currow,form->curcol); + } + return(result); +} + +/* frm_data.c ends here */ diff --git a/Source/CursesDialog/form/frm_def.c b/Source/CursesDialog/form/frm_def.c new file mode 100644 index 000000000..cab02ce0d --- /dev/null +++ b/Source/CursesDialog/form/frm_def.c @@ -0,0 +1,376 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_def.c,v 1.2 2002-01-25 14:06:39 king Exp $") + +/* this can't be readonly */ +static FORM default_form = { + 0, /* status */ + 0, /* rows */ + 0, /* cols */ + 0, /* currow */ + 0, /* curcol */ + 0, /* toprow */ + 0, /* begincol */ + -1, /* maxfield */ + -1, /* maxpage */ + -1, /* curpage */ + ALL_FORM_OPTS, /* opts */ + (WINDOW *)0, /* win */ + (WINDOW *)0, /* sub */ + (WINDOW *)0, /* w */ + (FIELD **)0, /* field */ + (FIELD *)0, /* current */ + (_PAGE *)0, /* page */ + (char *)0, /* usrptr */ + NULL, /* forminit */ + NULL, /* formterm */ + NULL, /* fieldinit */ + NULL /* fieldterm */ +}; + +FORM *_nc_Default_Form = &default_form; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Insert_Field_By_Position( +| FIELD *new_field, +| FIELD *head ) +| +| Description : Insert new_field into sorted fieldlist with head "head" +| and return new head of sorted fieldlist. Sorting +| criteria is (row,column). This is a circular list. +| +| Return Values : New head of sorted fieldlist ++--------------------------------------------------------------------------*/ +static FIELD *Insert_Field_By_Position(FIELD *newfield, FIELD *head) +{ + FIELD *current, *newhead; + + assert(newfield != 0); + + if (!head) + { /* empty list is trivial */ + newhead = newfield->snext = newfield->sprev = newfield; + } + else + { + newhead = current = head; + while((current->frow < newfield->frow) || + ((current->frow==newfield->frow) && + (current->fcol < newfield->fcol)) ) + { + current = current->snext; + if (current==head) + { /* We cycled through. Reset head to indicate that */ + head = (FIELD *)0; + break; + } + } + /* we leave the loop with current pointing to the field after newfield*/ + newfield->snext = current; + newfield->sprev = current->sprev; + newfield->snext->sprev = newfield; + newfield->sprev->snext = newfield; + if (current==head) + newhead = newfield; + } + return(newhead); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Disconnect_Fields(FORM *form) +| +| Description : Break association between form and array of fields. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Disconnect_Fields( FORM * form ) +{ + if (form->field) + { + FIELD **fields; + + for(fields=form->field;*fields;fields++) + { + if (form == (*fields)->form) + (*fields)->form = (FORM *)0; + } + + form->rows = form->cols = 0; + form->maxfield = form->maxpage = -1; + form->field = (FIELD **)0; + if (form->page) + free(form->page); + form->page = (_PAGE *)0; + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Connect_Fields(FORM *form, FIELD **fields) +| +| Description : Set association between form and array of fields. +| +| Return Values : E_OK - no error +| E_CONNECTED - a field is already connected +| E_BAD_ARGUMENT - Invalid form pointer or field array +| E_SYSTEM_ERROR - not enough memory ++--------------------------------------------------------------------------*/ +static int Connect_Fields(FORM * form, FIELD ** fields) +{ + int field_cnt, j; + int page_nr; + int maximum_row_in_field, maximum_col_in_field; + _PAGE *pg; + + assert(form != 0); + + form->field = fields; + form->maxfield = 0; + form->maxpage = 0; + + if (!fields) + RETURN(E_OK); + + page_nr = 0; + /* store formpointer in fields and count pages */ + for(field_cnt=0;fields[field_cnt];field_cnt++) + { + if (fields[field_cnt]->form) + RETURN(E_CONNECTED); + if ( field_cnt==0 || + (fields[field_cnt]->status & _NEWPAGE)) + page_nr++; + fields[field_cnt]->form = form; + } + if (field_cnt==0) + RETURN(E_BAD_ARGUMENT); + + /* allocate page structures */ + if ( (pg = (_PAGE *)malloc(page_nr * sizeof(_PAGE))) != (_PAGE *)0 ) + { + form->page = pg; + } + else + RETURN(E_SYSTEM_ERROR); + + /* Cycle through fields and calculate page boundaries as well as + size of the form */ + for(j=0;jpmin = j; + else + { + if (fields[j]->status & _NEWPAGE) + { + pg->pmax = j-1; + pg++; + pg->pmin = j; + } + } + + maximum_row_in_field = fields[j]->frow + fields[j]->rows; + maximum_col_in_field = fields[j]->fcol + fields[j]->cols; + + if (form->rows < maximum_row_in_field) + form->rows = maximum_row_in_field; + if (form->cols < maximum_col_in_field) + form->cols = maximum_col_in_field; + } + + pg->pmax = field_cnt-1; + form->maxfield = field_cnt; + form->maxpage = page_nr; + + /* Sort fields on form pages */ + for(page_nr = 0;page_nr < form->maxpage; page_nr++) + { + FIELD *fld = (FIELD *)0; + for(j = form->page[page_nr].pmin;j <= form->page[page_nr].pmax;j++) + { + fields[j]->index = j; + fields[j]->page = page_nr; + fld = Insert_Field_By_Position(fields[j],fld); + } + form->page[page_nr].smin = fld->index; + form->page[page_nr].smax = fld->sprev->index; + } + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Associate_Fields(FORM *form, FIELD **fields) +| +| Description : Set association between form and array of fields. +| If there are fields, position to first active field. +| +| Return Values : E_OK - success +| any other - error occured ++--------------------------------------------------------------------------*/ +INLINE static int Associate_Fields(FORM *form, FIELD **fields) +{ + int res = Connect_Fields(form,fields); + if (res == E_OK) + { + if (form->maxpage>0) + { + form->curpage = 0; + form_driver(form,FIRST_ACTIVE_MAGIC); + } + else + { + form->curpage = -1; + form->current = (FIELD *)0; + } + } + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FORM *new_form( FIELD **fields ) +| +| Description : Create new form with given array of fields. +| +| Return Values : Pointer to form. NULL if error occured. ++--------------------------------------------------------------------------*/ +FORM *new_form(FIELD ** fields) +{ + int err = E_SYSTEM_ERROR; + + FORM *form = (FORM *)malloc(sizeof(FORM)); + + if (form) + { + *form = *_nc_Default_Form; + if ((err=Associate_Fields(form,fields))!=E_OK) + { + free_form(form); + form = (FORM *)0; + } + } + + if (!form) + SET_ERROR(err); + + return(form); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int free_form( FORM *form ) +| +| Description : Release internal memory associated with form. +| +| Return Values : E_OK - no error +| E_BAD_ARGUMENT - invalid form pointer +| E_POSTED - form is posted ++--------------------------------------------------------------------------*/ +int free_form(FORM * form) +{ + if ( !form ) + RETURN(E_BAD_ARGUMENT); + + if ( form->status & _POSTED) + RETURN(E_POSTED); + + Disconnect_Fields( form ); + if (form->page) + free(form->page); + free(form); + + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_fields( FORM *form, FIELD **fields ) +| +| Description : Set a new association of an array of fields to a form +| +| Return Values : E_OK - no error +| E_BAD_ARGUMENT - invalid form pointer +| E_POSTED - form is posted ++--------------------------------------------------------------------------*/ +int set_form_fields(FORM * form, FIELD ** fields) +{ + FIELD **old; + int res; + + if ( !form ) + RETURN(E_BAD_ARGUMENT); + + if ( form->status & _POSTED ) + RETURN(E_POSTED); + + old = form->field; + Disconnect_Fields( form ); + + if( (res = Associate_Fields( form, fields )) != E_OK ) + Connect_Fields( form, old ); + + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD **form_fields( const FORM *form ) +| +| Description : Retrieve array of fields +| +| Return Values : Pointer to field array ++--------------------------------------------------------------------------*/ +FIELD **form_fields(const FORM * form) +{ + return (Normalize_Form( form )->field); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int field_count( const FORM *form ) +| +| Description : Retrieve number of fields +| +| Return Values : Number of fields, -1 if none are defined ++--------------------------------------------------------------------------*/ +int field_count(const FORM * form) +{ + return (Normalize_Form( form )->maxfield); +} + +/* frm_def.c ends here */ diff --git a/Source/CursesDialog/form/frm_driver.c b/Source/CursesDialog/form/frm_driver.c new file mode 100644 index 000000000..ff7a24790 --- /dev/null +++ b/Source/CursesDialog/form/frm_driver.c @@ -0,0 +1,3880 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#if defined(__hpux) + #define _XOPEN_SOURCE_EXTENDED +#endif +#include "form.priv.h" +#if defined(__hpux) + #undef _XOPEN_SOURCE_EXTENDED +#endif + +/* AIX seems to define this */ +#undef lines +#undef columns + +MODULE_ID("$Id: frm_driver.c,v 1.15 2002-10-23 20:43:34 king Exp $") + +/* These declarations are missing from curses.h on some platforms. */ +extern int winnstr(WINDOW *, char *, int); +#if defined(__DECCXX_VER) || (defined(__GNUC__) && defined(__osf__)) +extern int waddnstr(WINDOW *,const char *const,int); +extern void wbkgdset(WINDOW *,chtype); +#ifndef untouchwin +extern int untouchwin(WINDOW *); +#endif +extern void wcursyncup(WINDOW *); +extern int copywin(const WINDOW*,WINDOW*,int,int,int,int,int,int,int); +extern bool is_linetouched(WINDOW *,int); +extern void wsyncup(WINDOW *); +extern WINDOW *derwin(WINDOW *,int,int,int,int); +extern int winsnstr(WINDOW *, const char *,int); +extern int winsdelln(WINDOW *,int); +#endif + +/*---------------------------------------------------------------------------- + This is the core module of the form library. It contains the majority + of the driver routines as well as the form_driver function. + + Essentially this module is nearly the whole library. This is because + all the functions in this module depends on some others in the module, + so it makes no sense to split them into separate files because they + will always be linked together. The only acceptable concern is turnaround + time for this module, but now we have all Pentiums or Riscs, so what! + + The driver routines are grouped into nine generic categories: + + a) Page Navigation ( all functions prefixed by PN_ ) + The current page of the form is left and some new page is + entered. + b) Inter-Field Navigation ( all functions prefixed by FN_ ) + The current field of the form is left and some new field is + entered. + c) Intra-Field Navigation ( all functions prefixed by IFN_ ) + The current position in the current field is changed. + d) Vertical Scrolling ( all functions prefixed by VSC_ ) + Esseantially this is a specialization of Intra-Field navigation. + It has to check for a multi-line field. + e) Horizontal Scrolling ( all functions prefixed by HSC_ ) + Esseantially this is a specialization of Intra-Field navigation. + It has to check for a single-line field. + f) Field Editing ( all functions prefixed by FE_ ) + The content of the current field is changed + g) Edit Mode requests ( all functions prefixed by EM_ ) + Switching between insert and overlay mode + h) Field-Validation requests ( all functions prefixed by FV_ ) + Perform verifications of the field. + i) Choice requests ( all functions prefixed by CR_ ) + Requests to enumerate possible field values + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Some remarks on the placements of assert() macros : + I use them only on "strategic" places, i.e. top level entries where + I want to make sure that things are set correctly. Throughout subordinate + routines I omit them mostly. + --------------------------------------------------------------------------*/ + +/* +Some options that may effect compatibility in behavior to SVr4 forms, +but they are here to allow a more intuitive and user friendly behaviour of +our form implementation. This doesn't affect the API, so we feel it is +uncritical. + +The initial implementation tries to stay very close with the behaviour +of the original SVr4 implementation, although in some areas it is quite +clear that this isn't the most appropriate way. As far as possible this +sources will allow you to build a forms lib that behaves quite similar +to SVr4, but now and in the future we will give you better options. +Perhaps at some time we will make this configurable at runtime. +*/ + +/* Implement a more user-friendly previous/next word behaviour */ +#define FRIENDLY_PREV_NEXT_WORD (1) +/* Fix the wrong behaviour for forms with all fields inactive */ +#define FIX_FORM_INACTIVE_BUG (1) +/* Allow dynamic field growth also when navigating past the end */ +#define GROW_IF_NAVIGATE (1) + +/*---------------------------------------------------------------------------- + Forward references to some internally used static functions + --------------------------------------------------------------------------*/ +static int Inter_Field_Navigation ( int (* const fct) (FORM *), FORM * form ); +static int FN_Next_Field (FORM * form); +static int FN_Previous_Field (FORM * form); +static int FE_New_Line(FORM *); +static int FE_Delete_Previous(FORM *); + +/*---------------------------------------------------------------------------- + Macro Definitions. + + Some Remarks on that: I use the convention to use UPPERCASE for constants + defined by Macros. If I provide a macro as a kind of inline routine to + provide some logic, I use my Upper_Lower case style. + --------------------------------------------------------------------------*/ + +/* Calculate the position of a single row in a field buffer */ +#define Position_Of_Row_In_Buffer(field,row) ((row)*(field)->dcols) + +/* Calculate start address for the fields buffer# N */ +#define Address_Of_Nth_Buffer(field,N) \ + ((field)->buf + (N)*(1+Buffer_Length(field))) + +/* Calculate the start address of the row in the fields specified buffer# N */ +#define Address_Of_Row_In_Nth_Buffer(field,N,row) \ + (Address_Of_Nth_Buffer(field,N) + Position_Of_Row_In_Buffer(field,row)) + +/* Calculate the start address of the row in the fields primary buffer */ +#define Address_Of_Row_In_Buffer(field,row) \ + Address_Of_Row_In_Nth_Buffer(field,0,row) + +/* Calculate the start address of the row in the forms current field + buffer# N */ +#define Address_Of_Current_Row_In_Nth_Buffer(form,N) \ + Address_Of_Row_In_Nth_Buffer((form)->current,N,(form)->currow) + +/* Calculate the start address of the row in the forms current field + primary buffer */ +#define Address_Of_Current_Row_In_Buffer(form) \ + Address_Of_Current_Row_In_Nth_Buffer(form,0) + +/* Calculate the address of the cursor in the forms current field + primary buffer */ +#define Address_Of_Current_Position_In_Nth_Buffer(form,N) \ + (Address_Of_Current_Row_In_Nth_Buffer(form,N) + (form)->curcol) + +/* Calculate the address of the cursor in the forms current field + buffer# N */ +#define Address_Of_Current_Position_In_Buffer(form) \ + Address_Of_Current_Position_In_Nth_Buffer(form,0) + +/* Logic to decide wether or not a field is actually a field with + vertical or horizontal scrolling */ +#define Is_Scroll_Field(field) \ + (((field)->drows > (field)->rows) || \ + ((field)->dcols > (field)->cols)) + +/* Logic to decide whether or not a field needs to have an individual window + instead of a derived window because it contains invisible parts. + This is true for non-public fields and for scrollable fields. */ +#define Has_Invisible_Parts(field) \ + (!((field)->opts & O_PUBLIC) || \ + Is_Scroll_Field(field)) + +/* Logic to decide whether or not a field needs justification */ +#define Justification_Allowed(field) \ + (((field)->just != NO_JUSTIFICATION) && \ + (Single_Line_Field(field)) && \ + (((field)->dcols == (field)->cols) && \ + ((field)->opts & O_STATIC)) ) + +/* Logic to determine whether or not a dynamic field may still grow */ +#define Growable(field) ((field)->status & _MAY_GROW) + +/* Macro to set the attributes for a fields window */ +#define Set_Field_Window_Attributes(field,win) \ +( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \ + wattrset((win),(field)->fore) ) + +/* Logic to decide whether or not a field really appears on the form */ +#define Field_Really_Appears(field) \ + ((field->form) &&\ + (field->form->status & _POSTED) &&\ + (field->opts & O_VISIBLE) &&\ + (field->page == field->form->curpage)) + +/* Logic to determine whether or not we are on the first position in the + current field */ +#define First_Position_In_Current_Field(form) \ + (((form)->currow==0) && ((form)->curcol==0)) + + +#define Minimum(a,b) (((a)<=(b)) ? (a) : (b)) +#define Maximum(a,b) (((a)>=(b)) ? (a) : (b)) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static char *Get_Start_Of_Data(char * buf, int blen) +| +| Description : Return pointer to first non-blank position in buffer. +| If buffer is empty return pointer to buffer itself. +| +| Return Values : Pointer to first non-blank position in buffer ++--------------------------------------------------------------------------*/ +INLINE static char *Get_Start_Of_Data(char * buf, int blen) +{ + char *p = buf; + char *end = &buf[blen]; + + assert(buf && blen>=0); + while( (p < end) && is_blank(*p) ) + p++; + return( (p==end) ? buf : p ); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static char *After_End_Of_Data(char * buf, int blen) +| +| Description : Return pointer after last non-blank position in buffer. +| If buffer is empty, return pointer to buffer itself. +| +| Return Values : Pointer to position after last non-blank position in +| buffer. ++--------------------------------------------------------------------------*/ +INLINE static char *After_End_Of_Data(char * buf,int blen) +{ + char *p = &buf[blen]; + + assert(buf && blen>=0); + while( (p>buf) && is_blank(p[-1]) ) + p--; + return( p ); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static char *Get_First_Whitespace_Character( +| char * buf, int blen) +| +| Description : Position to the first whitespace character. +| +| Return Values : Pointer to first whitespace character in buffer. ++--------------------------------------------------------------------------*/ +INLINE static char *Get_First_Whitespace_Character(char * buf, int blen) +{ + char *p = buf; + char *end = &p[blen]; + + assert(buf && blen>=0); + while( (p < end) && !is_blank(*p)) + p++; + return( (p==end) ? buf : p ); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static char *After_Last_Whitespace_Character( +| char * buf, int blen) +| +| Description : Get the position after the last whitespace character. +| +| Return Values : Pointer to position after last whitespace character in +| buffer. ++--------------------------------------------------------------------------*/ +INLINE static char *After_Last_Whitespace_Character(char * buf, int blen) +{ + char *p = &buf[blen]; + + assert(buf && blen>=0); + while( (p>buf) && !is_blank(p[-1]) ) + p--; + return( p ); +} + +/* Set this to 1 to use the div_t version. This is a good idea if your + compiler has an intrinsic div() support. Unfortunately GNU-C has it + not yet. + N.B.: This only works if form->curcol follows immediately form->currow + and both are of type int. +*/ +#define USE_DIV_T (0) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Adjust_Cursor_Position( +| FORM * form, const char * pos) +| +| Description : Set current row and column of the form to values +| corresponding to the buffer position. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +INLINE static void Adjust_Cursor_Position(FORM * form, const char * pos) +{ + FIELD *field; + int idx; + + field = form->current; + assert( pos >= field->buf && field->dcols > 0); + idx = (int)( pos - field->buf ); +#if USE_DIV_T + *((div_t *)&(form->currow)) = div(idx,field->dcols); +#else + form->currow = idx / field->dcols; + form->curcol = idx - field->cols * form->currow; +#endif + if ( field->drows < form->currow ) + form->currow = 0; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Buffer_To_Window( +| const FIELD * field, +| WINDOW * win) +| +| Description : Copy the buffer to the window. If its a multiline +| field, the buffer is split to the lines of the +| window without any editing. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Buffer_To_Window(const FIELD * field, WINDOW * win) +{ + int width, height; + int len; + int row; + char *pBuffer; + + assert(win && field); + + width = getmaxx(win); + height = getmaxy(win); + + for(row=0, pBuffer=field->buf; + row < height; + row++, pBuffer += width ) + { + if ((len = (int)( After_End_Of_Data( pBuffer, width ) - pBuffer )) > 0) + { + wmove( win, row, 0 ); + waddnstr( win, pBuffer, len ); + } + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Window_To_Buffer( +| WINDOW * win, +| FIELD * field) +| +| Description : Copy the content of the window into the buffer. +| The multiple lines of a window are simply +| concatenated into the buffer. Pad characters in +| the window will be replaced by blanks in the buffer. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Window_To_Buffer(WINDOW * win, FIELD * field) +{ + int pad; + int len = 0; + char *p; + int row, height; + + assert(win && field && field->buf ); + + pad = field->pad; + p = field->buf; + height = getmaxy(win); + + for(row=0; (row < height) && (row < field->drows); row++ ) + { + wmove( win, row, 0 ); + len += winnstr( win, p+len, field->dcols ); + } + p[len] = '\0'; + + /* replace visual padding character by blanks in buffer */ + if (pad != C_BLANK) + { + int i; + for(i=0; istatus & _WINDOW_MODIFIED) + { + form->status &= ~_WINDOW_MODIFIED; + form->status |= _FCHECK_REQUIRED; + Window_To_Buffer(form->w,form->current); + wmove(form->w,form->currow,form->curcol); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Field_Grown( FIELD *field, int amount) +| +| Description : This function is called for growable dynamic fields +| only. It has to increase the buffers and to allocate +| a new window for this field. +| This function has the side effect to set a new +| field-buffer pointer, the dcols and drows values +| as well as a new current Window for the field. +| +| Return Values : TRUE - field successfully increased +| FALSE - there was some error ++--------------------------------------------------------------------------*/ +static bool Field_Grown(FIELD * field, int amount) +{ + bool result = FALSE; + + if (field && Growable(field)) + { + bool single_line_field = Single_Line_Field(field); + int old_buflen = Buffer_Length(field); + int new_buflen; + int old_dcols = field->dcols; + int old_drows = field->drows; + char *oldbuf = field->buf; + char *newbuf; + + int growth; + FORM *form = field->form; + bool need_visual_update = ((form != (FORM *)0) && + (form->status & _POSTED) && + (form->current==field)); + + if (need_visual_update) + Synchronize_Buffer(form); + + if (single_line_field) + { + growth = field->cols * amount; + if (field->maxgrow) + growth = Minimum(field->maxgrow - field->dcols,growth); + field->dcols += growth; + if (field->dcols == field->maxgrow) + field->status &= ~_MAY_GROW; + } + else + { + growth = (field->rows + field->nrow) * amount; + if (field->maxgrow) + growth = Minimum(field->maxgrow - field->drows,growth); + field->drows += growth; + if (field->drows == field->maxgrow) + field->status &= ~_MAY_GROW; + } + /* drows, dcols changed, so we get really the new buffer length */ + new_buflen = Buffer_Length(field); + newbuf=(char *)malloc((size_t)Total_Buffer_Size(field)); + if (!newbuf) + { /* restore to previous state */ + field->dcols = old_dcols; + field->drows = old_drows; + if (( single_line_field && (field->dcols!=field->maxgrow)) || + (!single_line_field && (field->drows!=field->maxgrow))) + field->status |= _MAY_GROW; + return FALSE; + } + else + { /* Copy all the buffers. This is the reason why we can't + just use realloc(). + */ + int i; + char *old_bp; + char *new_bp; + + field->buf = newbuf; + for(i=0;i<=field->nbuf;i++) + { + new_bp = Address_Of_Nth_Buffer(field,i); + old_bp = oldbuf + i*(1+old_buflen); + memcpy(new_bp,old_bp,(size_t)old_buflen); + if (new_buflen > old_buflen) + memset(new_bp + old_buflen,C_BLANK, + (size_t)(new_buflen - old_buflen)); + *(new_bp + new_buflen) = '\0'; + } + + if (need_visual_update) + { + WINDOW *new_window = newpad(field->drows,field->dcols); + if (!new_window) + { /* restore old state */ + field->dcols = old_dcols; + field->drows = old_drows; + field->buf = oldbuf; + if (( single_line_field && + (field->dcols!=field->maxgrow)) || + (!single_line_field && + (field->drows!=field->maxgrow))) + field->status |= _MAY_GROW; + free( newbuf ); + return FALSE; + } + assert(form!=(FORM *)0); + delwin(form->w); + form->w = new_window; + Set_Field_Window_Attributes(field,form->w); + werase(form->w); + Buffer_To_Window(field,form->w); + untouchwin(form->w); + wmove(form->w,form->currow,form->curcol); + } + + free(oldbuf); + /* reflect changes in linked fields */ + if (field != field->link) + { + FIELD *linked_field; + for(linked_field = field->link; + linked_field!= field; + linked_field = linked_field->link) + { + linked_field->buf = field->buf; + linked_field->drows = field->drows; + linked_field->dcols = field->dcols; + } + } + result = TRUE; + } + } + return(result); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Position_Form_Cursor(FORM * form) +| +| Description : Position the cursor in the window for the current +| field to be in sync. with the currow and curcol +| values. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form pointer +| E_SYSTEM_ERROR - form has no current field or +| field-window ++--------------------------------------------------------------------------*/ +int +_nc_Position_Form_Cursor(FORM * form) +{ + FIELD *field; + WINDOW *formwin; + + if (!form) + return(E_BAD_ARGUMENT); + + if (!form->w || !form->current) + return(E_SYSTEM_ERROR); + + field = form->current; + formwin = Get_Form_Window(form); + + wmove( form->w, form->currow, form->curcol ); + if ( Has_Invisible_Parts(field) ) + { + /* in this case fieldwin isn't derived from formwin, so we have + to move the cursor in formwin by hand... */ + wmove(formwin, + field->frow + form->currow - form->toprow, + field->fcol + form->curcol - form->begincol); + wcursyncup(formwin); + } + else + wcursyncup(form->w); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Refresh_Current_Field(FORM * form) +| +| Description : Propagate the changes in the fields window to the +| window of the form. +| +| Return Values : E_OK - on success +| E_BAD_ARGUMENT - invalid form pointer +| E_SYSTEM_ERROR - general error ++--------------------------------------------------------------------------*/ +int +_nc_Refresh_Current_Field(FORM * form) +{ + WINDOW *formwin; + FIELD *field; + + if (!form) + RETURN(E_BAD_ARGUMENT); + + if (!form->w || !form->current) + RETURN(E_SYSTEM_ERROR); + + field = form->current; + formwin = Get_Form_Window(form); + + if (field->opts & O_PUBLIC) + { + if (Is_Scroll_Field(field)) + { + /* Again, in this case the fieldwin isn't derived from formwin, + so we have to perform a copy operation. */ + if (Single_Line_Field(field)) + { /* horizontal scrolling */ + if (form->curcol < form->begincol) + form->begincol = form->curcol; + else + { + if (form->curcol >= (form->begincol + field->cols)) + form->begincol = form->curcol - field->cols + 1; + } + copywin(form->w, + formwin, + 0, + form->begincol, + field->frow, + field->fcol, + field->frow, + field->cols + field->fcol - 1, + 0); + } + else + { /* A multiline, i.e. vertical scrolling field */ + int row_after_bottom,first_modified_row,first_unmodified_row; + + if (field->drows > field->rows) + { + row_after_bottom = form->toprow + field->rows; + if (form->currow < form->toprow) + { + form->toprow = form->currow; + field->status |= _NEWTOP; + } + if (form->currow >= row_after_bottom) + { + form->toprow = form->currow - field->rows + 1; + field->status |= _NEWTOP; + } + if (field->status & _NEWTOP) + { /* means we have to copy whole range */ + first_modified_row = form->toprow; + first_unmodified_row = first_modified_row + field->rows; + field->status &= ~_NEWTOP; + } + else + { /* we try to optimize : finding the range of touched + lines */ + first_modified_row = form->toprow; + while(first_modified_row < row_after_bottom) + { + if (is_linetouched(form->w,first_modified_row)) + break; + first_modified_row++; + } + first_unmodified_row = first_modified_row; + while(first_unmodified_row < row_after_bottom) + { + if (!is_linetouched(form->w,first_unmodified_row)) + break; + first_unmodified_row++; + } + } + } + else + { + first_modified_row = form->toprow; + first_unmodified_row = first_modified_row + field->rows; + } + if (first_unmodified_row != first_modified_row) + copywin(form->w, + formwin, + first_modified_row, + 0, + field->frow + first_modified_row - form->toprow, + field->fcol, + field->frow + first_unmodified_row - form->toprow - 1, + field->cols + field->fcol - 1, + 0); + } + wsyncup(formwin); + } + else + { /* if the field-window is simply a derived window, i.e. contains + no invisible parts, the whole thing is trivial + */ + wsyncup(form->w); + } + } + untouchwin(form->w); + return _nc_Position_Form_Cursor(form); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Perform_Justification( +| FIELD * field, +| WINDOW * win) +| +| Description : Output field with requested justification +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Perform_Justification(FIELD * field, WINDOW * win) +{ + char *bp; + int len; + int col = 0; + + bp = Get_Start_Of_Data(field->buf,Buffer_Length(field)); + len = (int)(After_End_Of_Data(field->buf,Buffer_Length(field)) - bp); + + if (len>0) + { + assert(win && (field->drows == 1) && (field->dcols == field->cols)); + + switch(field->just) + { + case JUSTIFY_LEFT: + break; + case JUSTIFY_CENTER: + col = (field->cols - len)/2; + break; + case JUSTIFY_RIGHT: + col = field->cols - len; + break; + default: + break; + } + + wmove(win,0,col); + waddnstr(win,bp,len); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Undo_Justification( +| FIELD * field, +| WINDOW * win) +| +| Description : Display field without any justification, i.e. +| left justified +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Undo_Justification(FIELD * field, WINDOW * win) +{ + char *bp; + int len; + + bp = Get_Start_Of_Data(field->buf,Buffer_Length(field)); + len = (int)(After_End_Of_Data(field->buf,Buffer_Length(field))-bp); + + if (len>0) + { + assert(win != 0); + wmove(win,0,0); + waddnstr(win,bp,len); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Char( +| FIELDTYPE * typ, +| int ch, +| TypeArgument *argp) +| +| Description : Perform a single character check for character ch +| according to the fieldtype instance. +| +| Return Values : TRUE - Character is valid +| FALSE - Character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Char(FIELDTYPE * typ, int ch, TypeArgument *argp) +{ + if (typ) + { + if (typ->status & _LINKED_TYPE) + { + assert(argp != 0); + return( + Check_Char(typ->left ,ch,argp->left ) || + Check_Char(typ->right,ch,argp->right) ); + } + else + { + if (typ->ccheck) + return typ->ccheck(ch,(void *)argp); + } + } + return (isprint((unsigned char)ch) ? TRUE : FALSE); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Display_Or_Erase_Field( +| FIELD * field, +| bool bEraseFlag) +| +| Description : Create a subwindow for the field and display the +| buffer contents (apply justification if required) +| or simply erase the field. +| +| Return Values : E_OK - on success +| E_SYSTEM_ERROR - some error (typical no memory) ++--------------------------------------------------------------------------*/ +static int Display_Or_Erase_Field(FIELD * field, bool bEraseFlag) +{ + WINDOW *win; + WINDOW *fwin; + + if (!field) + return E_SYSTEM_ERROR; + + fwin = Get_Form_Window(field->form); + win = derwin(fwin, + field->rows,field->cols,field->frow,field->fcol); + + if (!win) + return E_SYSTEM_ERROR; + else + { + if (field->opts & O_VISIBLE) + Set_Field_Window_Attributes(field,win); + else + wattrset(win,getattrs(fwin)); + werase(win); + } + + if (!bEraseFlag) + { + if (field->opts & O_PUBLIC) + { + if (Justification_Allowed(field)) + Perform_Justification(field,win); + else + Buffer_To_Window(field,win); + } + field->status &= ~_NEWTOP; + } + wsyncup(win); + delwin(win); + return E_OK; +} + +/* Macros to preset the bEraseFlag */ +#define Display_Field(field) Display_Or_Erase_Field(field,FALSE) +#define Erase_Field(field) Display_Or_Erase_Field(field,TRUE) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Synchronize_Field(FIELD * field) +| +| Description : Synchronize the windows content with the value in +| the buffer. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer +| E_SYSTEM_ERROR - some severe basic error ++--------------------------------------------------------------------------*/ +static int Synchronize_Field(FIELD * field) +{ + FORM *form; + int res = E_OK; + + if (!field) + return(E_BAD_ARGUMENT); + + if (((form=field->form) != (FORM *)0) + && Field_Really_Appears(field)) + { + if (field == form->current) + { + form->currow = form->curcol = form->toprow = form->begincol = 0; + werase(form->w); + + if ( (field->opts & O_PUBLIC) && Justification_Allowed(field) ) + Undo_Justification( field, form->w ); + else + Buffer_To_Window( field, form->w ); + + field->status |= _NEWTOP; + res = _nc_Refresh_Current_Field( form ); + } + else + res = Display_Field( field ); + } + field->status |= _CHANGED; + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Synchronize_Linked_Fields(FIELD * field) +| +| Description : Propagate the Synchronize_Field function to all linked +| fields. The first error that occurs in the sequence +| of updates is the returnvalue. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer +| E_SYSTEM_ERROR - some severe basic error ++--------------------------------------------------------------------------*/ +static int Synchronize_Linked_Fields(FIELD * field) +{ + FIELD *linked_field; + int res = E_OK; + int syncres; + + if (!field) + return(E_BAD_ARGUMENT); + + if (!field->link) + return(E_SYSTEM_ERROR); + + for(linked_field = field->link; + linked_field!= field; + linked_field = linked_field->link ) + { + if (((syncres=Synchronize_Field(linked_field)) != E_OK) && + (res==E_OK)) + res = syncres; + } + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Synchronize_Attributes(FIELD * field) +| +| Description : If a fields visual attributes have changed, this +| routine is called to propagate those changes to the +| screen. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer +| E_SYSTEM_ERROR - some severe basic error ++--------------------------------------------------------------------------*/ +int _nc_Synchronize_Attributes(FIELD * field) +{ + FORM *form; + int res = E_OK; + WINDOW *formwin; + + if (!field) + return(E_BAD_ARGUMENT); + + if (((form=field->form) != (FORM *)0) + && Field_Really_Appears(field)) + { + if (form->current==field) + { + Synchronize_Buffer(form); + Set_Field_Window_Attributes(field,form->w); + werase(form->w); + if (field->opts & O_PUBLIC) + { + if (Justification_Allowed(field)) + Undo_Justification(field,form->w); + else + Buffer_To_Window(field,form->w); + } + else + { + formwin = Get_Form_Window(form); + copywin(form->w,formwin, + 0,0, + field->frow,field->fcol, + field->rows-1,field->cols-1,0); + wsyncup(formwin); + Buffer_To_Window(field,form->w); + field->status |= _NEWTOP; /* fake refresh to paint all */ + _nc_Refresh_Current_Field(form); + } + } + else + { + res = Display_Field(field); + } + } + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Synchronize_Options(FIELD * field, +| Field_Options newopts) +| +| Description : If a fields options have changed, this routine is +| called to propagate these changes to the screen and +| to really change the behaviour of the field. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid field pointer +| E_SYSTEM_ERROR - some severe basic error ++--------------------------------------------------------------------------*/ +int +_nc_Synchronize_Options(FIELD *field, Field_Options newopts) +{ + Field_Options oldopts; + Field_Options changed_opts; + FORM *form; + int res = E_OK; + + if (!field) + return(E_BAD_ARGUMENT); + + oldopts = field->opts; + changed_opts = oldopts ^ newopts; + field->opts = newopts; + form = field->form; + + if (form) + { + if (form->current == field) + { + field->opts = oldopts; + return(E_CURRENT); + } + + if (form->status & _POSTED) + { + if ((form->curpage == field->page)) + { + if (changed_opts & O_VISIBLE) + { + if (newopts & O_VISIBLE) + res = Display_Field(field); + else + res = Erase_Field(field); + } + else + { + if ((changed_opts & O_PUBLIC) && + (newopts & O_VISIBLE)) + res = Display_Field(field); + } + } + } + } + + if (changed_opts & O_STATIC) + { + bool single_line_field = Single_Line_Field(field); + int res2 = E_OK; + + if (newopts & O_STATIC) + { /* the field becomes now static */ + field->status &= ~_MAY_GROW; + /* if actually we have no hidden columns, justification may + occur again */ + if (single_line_field && + (field->cols == field->dcols) && + (field->just != NO_JUSTIFICATION) && + Field_Really_Appears(field)) + { + res2 = Display_Field(field); + } + } + else + { /* field is no longer static */ + if ((field->maxgrow==0) || + ( single_line_field && (field->dcols < field->maxgrow)) || + (!single_line_field && (field->drows < field->maxgrow))) + { + field->status |= _MAY_GROW; + /* a field with justification now changes its behaviour, + so we must redisplay it */ + if (single_line_field && + (field->just != NO_JUSTIFICATION) && + Field_Really_Appears(field)) + { + res2 = Display_Field(field); + } + } + } + if (res2 != E_OK) + res = res2; + } + + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Set_Current_Field(FORM * form, +| FIELD * newfield) +| +| Description : Make the newfield the new current field. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form or field pointer +| E_SYSTEM_ERROR - some severe basic error ++--------------------------------------------------------------------------*/ +int +_nc_Set_Current_Field(FORM *form, FIELD *newfield) +{ + FIELD *field; + WINDOW *new_window; + + if (!form || !newfield || !form->current || (newfield->form!=form)) + return(E_BAD_ARGUMENT); + + if ( (form->status & _IN_DRIVER) ) + return(E_BAD_STATE); + + if (!(form->field)) + return(E_NOT_CONNECTED); + + field = form->current; + + if ((field!=newfield) || + !(form->status & _POSTED)) + { + if ((form->w) && + (field->opts & O_VISIBLE) && + (field->form->curpage == field->page)) + { + _nc_Refresh_Current_Field(form); + if (field->opts & O_PUBLIC) + { + if (field->drows > field->rows) + { + if (form->toprow==0) + field->status &= ~_NEWTOP; + else + field->status |= _NEWTOP; + } + else + { + if (Justification_Allowed(field)) + { + Window_To_Buffer(form->w,field); + werase(form->w); + Perform_Justification(field,form->w); + wsyncup(form->w); + } + } + } + delwin(form->w); + } + + field = newfield; + + if (Has_Invisible_Parts(field)) + new_window = newpad(field->drows,field->dcols); + else + new_window = derwin(Get_Form_Window(form), + field->rows,field->cols,field->frow,field->fcol); + + if (!new_window) + return(E_SYSTEM_ERROR); + + form->current = field; + form->w = new_window; + form->status &= ~_WINDOW_MODIFIED; + Set_Field_Window_Attributes(field,form->w); + + if (Has_Invisible_Parts(field)) + { + werase(form->w); + Buffer_To_Window(field,form->w); + } + else + { + if (Justification_Allowed(field)) + { + werase(form->w); + Undo_Justification(field,form->w); + wsyncup(form->w); + } + } + + untouchwin(form->w); + } + + form->currow = form->curcol = form->toprow = form->begincol = 0; + return(E_OK); +} + +/*---------------------------------------------------------------------------- + Intra-Field Navigation routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Next_Character(FORM * form) +| +| Description : Move to the next character in the field. In a multiline +| field this wraps at the end of the line. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - at the rightmost position ++--------------------------------------------------------------------------*/ +static int IFN_Next_Character(FORM * form) +{ + FIELD *field = form->current; + + if ((++(form->curcol))==field->dcols) + { + if ((++(form->currow))==field->drows) + { +#if GROW_IF_NAVIGATE + if (!Single_Line_Field(field) && Field_Grown(field,1)) { + form->curcol = 0; + return(E_OK); + } +#endif + form->currow--; +#if GROW_IF_NAVIGATE + if (Single_Line_Field(field) && Field_Grown(field,1)) + return(E_OK); +#endif + form->curcol--; + return(E_REQUEST_DENIED); + } + form->curcol = 0; + } + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Previous_Character(FORM * form) +| +| Description : Move to the previous character in the field. In a +| multiline field this wraps and the beginning of the +| line. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - at the leftmost position ++--------------------------------------------------------------------------*/ +static int IFN_Previous_Character(FORM * form) +{ + if ((--(form->curcol))<0) + { + if ((--(form->currow))<0) + { + form->currow++; + form->curcol++; + return(E_REQUEST_DENIED); + } + form->curcol = form->current->dcols - 1; + } + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Next_Line(FORM * form) +| +| Description : Move to the beginning of the next line in the field +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - at the last line ++--------------------------------------------------------------------------*/ +static int IFN_Next_Line(FORM * form) +{ + FIELD *field = form->current; + + if ((++(form->currow))==field->drows) + { +#if GROW_IF_NAVIGATE + if (!Single_Line_Field(field) && Field_Grown(field,1)) + return(E_OK); +#endif + form->currow--; + return(E_REQUEST_DENIED); + } + form->curcol = 0; + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Previous_Line(FORM * form) +| +| Description : Move to the beginning of the previous line in the field +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - at the first line ++--------------------------------------------------------------------------*/ +static int IFN_Previous_Line(FORM * form) +{ + if ( (--(form->currow)) < 0 ) + { + form->currow++; + return(E_REQUEST_DENIED); + } + form->curcol = 0; + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Next_Word(FORM * form) +| +| Description : Move to the beginning of the next word in the field. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - there is no next word ++--------------------------------------------------------------------------*/ +static int IFN_Next_Word(FORM * form) +{ + FIELD *field = form->current; + char *bp = Address_Of_Current_Position_In_Buffer(form); + char *s; + char *t; + + /* We really need access to the data, so we have to synchronize */ + Synchronize_Buffer(form); + + /* Go to the first whitespace after the current position (including + current position). This is then the startpoint to look for the + next non-blank data */ + s = Get_First_Whitespace_Character(bp,Buffer_Length(field) - + (int)(bp - field->buf)); + + /* Find the start of the next word */ + t = Get_Start_Of_Data(s,Buffer_Length(field) - + (int)(s - field->buf)); +#if !FRIENDLY_PREV_NEXT_WORD + if (s==t) + return(E_REQUEST_DENIED); + else +#endif + { + Adjust_Cursor_Position(form,t); + return(E_OK); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Previous_Word(FORM * form) +| +| Description : Move to the beginning of the previous word in the field. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - there is no previous word ++--------------------------------------------------------------------------*/ +static int IFN_Previous_Word(FORM * form) +{ + FIELD *field = form->current; + char *bp = Address_Of_Current_Position_In_Buffer(form); + char *s; + char *t; + bool again = FALSE; + + /* We really need access to the data, so we have to synchronize */ + Synchronize_Buffer(form); + + s = After_End_Of_Data(field->buf,(int)(bp-field->buf)); + /* s points now right after the last non-blank in the buffer before bp. + If bp was in a word, s equals bp. In this case we must find the last + whitespace in the buffer before bp and repeat the game to really find + the previous word! */ + if (s==bp) + again = TRUE; + + /* And next call now goes backward to look for the last whitespace + before that, pointing right after this, so it points to the begin + of the previous word. + */ + t = After_Last_Whitespace_Character(field->buf,(int)(s - field->buf)); +#if !FRIENDLY_PREV_NEXT_WORD + if (s==t) + return(E_REQUEST_DENIED); +#endif + if (again) + { /* and do it again, replacing bp by t */ + s = After_End_Of_Data(field->buf,(int)(t - field->buf)); + t = After_Last_Whitespace_Character(field->buf,(int)(s - field->buf)); +#if !FRIENDLY_PREV_NEXT_WORD + if (s==t) + return(E_REQUEST_DENIED); +#endif + } + Adjust_Cursor_Position(form,t); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Beginning_Of_Field(FORM * form) +| +| Description : Place the cursor at the first non-pad character in +| the field. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int IFN_Beginning_Of_Field(FORM * form) +{ + FIELD *field = form->current; + + Synchronize_Buffer(form); + Adjust_Cursor_Position(form, + Get_Start_Of_Data(field->buf,Buffer_Length(field))); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_End_Of_Field(FORM * form) +| +| Description : Place the cursor after the last non-pad character in +| the field. If the field occupies the last position in +| the buffer, the cursos is positioned on the last +| character. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int IFN_End_Of_Field(FORM * form) +{ + FIELD *field = form->current; + char *pos; + + Synchronize_Buffer(form); + pos = After_End_Of_Data(field->buf,Buffer_Length(field)); + if (pos==(field->buf + Buffer_Length(field))) + pos--; + Adjust_Cursor_Position(form,pos); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Beginning_Of_Line(FORM * form) +| +| Description : Place the cursor on the first non-pad character in +| the current line of the field. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int IFN_Beginning_Of_Line(FORM * form) +{ + FIELD *field = form->current; + + Synchronize_Buffer(form); + Adjust_Cursor_Position(form, + Get_Start_Of_Data(Address_Of_Current_Row_In_Buffer(form), + field->dcols)); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_End_Of_Line(FORM * form) +| +| Description : Place the cursor after the last non-pad character in the +| current line of the field. If the field occupies the +| last column in the line, the cursor is positioned on the +| last character of the line. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int IFN_End_Of_Line(FORM * form) +{ + FIELD *field = form->current; + char *pos; + char *bp; + + Synchronize_Buffer(form); + bp = Address_Of_Current_Row_In_Buffer(form); + pos = After_End_Of_Data(bp,field->dcols); + if (pos == (bp + field->dcols)) + pos--; + Adjust_Cursor_Position(form,pos); + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Left_Character(FORM * form) +| +| Description : Move one character to the left in the current line. +| This doesn't cycle. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - already in first column ++--------------------------------------------------------------------------*/ +static int IFN_Left_Character(FORM * form) +{ + if ( (--(form->curcol)) < 0 ) + { + form->curcol++; + return(E_REQUEST_DENIED); + } + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Right_Character(FORM * form) +| +| Description : Move one character to the right in the current line. +| This doesn't cycle. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - already in last column ++--------------------------------------------------------------------------*/ +static int IFN_Right_Character(FORM * form) +{ + if ( (++(form->curcol)) == form->current->dcols ) + { +#if GROW_IF_NAVIGATE + FIELD *field = form->current; + if (Single_Line_Field(field) && Field_Grown(field,1)) + return(E_OK); +#endif + --(form->curcol); + return(E_REQUEST_DENIED); + } + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Up_Character(FORM * form) +| +| Description : Move one line up. This doesn't cycle through the lines +| of the field. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - already in last column ++--------------------------------------------------------------------------*/ +static int IFN_Up_Character(FORM * form) +{ + if ( (--(form->currow)) < 0 ) + { + form->currow++; + return(E_REQUEST_DENIED); + } + return(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int IFN_Down_Character(FORM * form) +| +| Description : Move one line down. This doesn't cycle through the +| lines of the field. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - already in last column ++--------------------------------------------------------------------------*/ +static int IFN_Down_Character(FORM * form) +{ + FIELD *field = form->current; + + if ( (++(form->currow)) == field->drows ) + { +#if GROW_IF_NAVIGATE + if (!Single_Line_Field(field) && Field_Grown(field,1)) + return(E_OK); +#endif + --(form->currow); + return(E_REQUEST_DENIED); + } + return(E_OK); +} +/*---------------------------------------------------------------------------- + END of Intra-Field Navigation routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Vertical scrolling helper routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Generic(FORM *form, int lines) +| +| Description : Scroll multi-line field forward (lines>0) or +| backward (lines<0) this many lines. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - can't scroll ++--------------------------------------------------------------------------*/ +static int VSC_Generic(FORM *form, int lines) +{ + FIELD *field = form->current; + int res = E_REQUEST_DENIED; + int rows_to_go = (lines > 0 ? lines : -lines); + + if (lines > 0) + { + if ( (rows_to_go + form->toprow) > (field->drows - field->rows) ) + rows_to_go = (field->drows - field->rows - form->toprow); + + if (rows_to_go > 0) + { + form->currow += rows_to_go; + form->toprow += rows_to_go; + res = E_OK; + } + } + else + { + if (rows_to_go > form->toprow) + rows_to_go = form->toprow; + + if (rows_to_go > 0) + { + form->currow -= rows_to_go; + form->toprow -= rows_to_go; + res = E_OK; + } + } + return(res); +} +/*---------------------------------------------------------------------------- + End of Vertical scrolling helper routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Vertical scrolling routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Vertical_Scrolling( +| int (* const fct) (FORM *), +| FORM * form) +| +| Description : Performs the generic vertical scrolling routines. +| This has to check for a multi-line field and to set +| the _NEWTOP flag if scrolling really occured. +| +| Return Values : Propagated error code from low-level driver calls ++--------------------------------------------------------------------------*/ +static int Vertical_Scrolling(int (* const fct) (FORM *), FORM * form) +{ + int res = E_REQUEST_DENIED; + + if (!Single_Line_Field(form->current)) + { + res = fct(form); + if (res == E_OK) + form->current->status |= _NEWTOP; + } + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Line_Forward(FORM * form) +| +| Description : Scroll multi-line field forward a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Line_Forward(FORM * form) +{ + return VSC_Generic(form,1); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Line_Backward(FORM * form) +| +| Description : Scroll multi-line field backward a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Line_Backward(FORM * form) +{ + return VSC_Generic(form,-1); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Page_Forward(FORM * form) +| +| Description : Scroll a multi-line field forward a page +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Page_Forward(FORM * form) +{ + return VSC_Generic(form,form->current->rows); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Half_Page_Forward(FORM * form) +| +| Description : Scroll a multi-line field forward half a page +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Half_Page_Forward(FORM * form) +{ + return VSC_Generic(form,(form->current->rows + 1)/2); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Page_Backward(FORM * form) +| +| Description : Scroll a multi-line field backward a page +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Page_Backward(FORM * form) +{ + return VSC_Generic(form, -(form->current->rows)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int VSC_Scroll_Half_Page_Backward(FORM * form) +| +| Description : Scroll a multi-line field backward half a page +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int VSC_Scroll_Half_Page_Backward(FORM * form) +{ + return VSC_Generic(form, -((form->current->rows + 1)/2)); +} +/*---------------------------------------------------------------------------- + End of Vertical scrolling routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Horizontal scrolling helper routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Generic(FORM *form, int columns) +| +| Description : Scroll single-line field forward (columns>0) or +| backward (columns<0) this many columns. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - can't scroll ++--------------------------------------------------------------------------*/ +static int HSC_Generic(FORM *form, int columns) +{ + FIELD *field = form->current; + int res = E_REQUEST_DENIED; + int cols_to_go = (columns > 0 ? columns : -columns); + + if (columns > 0) + { + if ((cols_to_go + form->begincol) > (field->dcols - field->cols)) + cols_to_go = field->dcols - field->cols - form->begincol; + + if (cols_to_go > 0) + { + form->curcol += cols_to_go; + form->begincol += cols_to_go; + res = E_OK; + } + } + else + { + if ( cols_to_go > form->begincol ) + cols_to_go = form->begincol; + + if (cols_to_go > 0) + { + form->curcol -= cols_to_go; + form->begincol -= cols_to_go; + res = E_OK; + } + } + return(res); +} +/*---------------------------------------------------------------------------- + End of Horizontal scrolling helper routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Horizontal scrolling routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Horizontal_Scrolling( +| int (* const fct) (FORM *), +| FORM * form) +| +| Description : Performs the generic horizontal scrolling routines. +| This has to check for a single-line field. +| +| Return Values : Propagated error code from low-level driver calls ++--------------------------------------------------------------------------*/ +static int Horizontal_Scrolling(int (* const fct) (FORM *), FORM * form) +{ + if (Single_Line_Field(form->current)) + return fct(form); + else + return(E_REQUEST_DENIED); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Scroll_Char_Forward(FORM * form) +| +| Description : Scroll single-line field forward a character +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int HSC_Scroll_Char_Forward(FORM *form) +{ + return HSC_Generic(form,1); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Scroll_Char_Backward(FORM * form) +| +| Description : Scroll single-line field backward a character +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int HSC_Scroll_Char_Backward(FORM *form) +{ + return HSC_Generic(form,-1); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Horizontal_Line_Forward(FORM* form) +| +| Description : Scroll single-line field forward a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int HSC_Horizontal_Line_Forward(FORM * form) +{ + return HSC_Generic(form,form->current->cols); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Horizontal_Half_Line_Forward(FORM* form) +| +| Description : Scroll single-line field forward half a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data ahead ++--------------------------------------------------------------------------*/ +static int HSC_Horizontal_Half_Line_Forward(FORM * form) +{ + return HSC_Generic(form,(form->current->cols + 1)/2); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Horizontal_Line_Backward(FORM* form) +| +| Description : Scroll single-line field backward a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int HSC_Horizontal_Line_Backward(FORM * form) +{ + return HSC_Generic(form,-(form->current->cols)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int HSC_Horizontal_Half_Line_Backward(FORM* form) +| +| Description : Scroll single-line field backward half a line +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - no data behind ++--------------------------------------------------------------------------*/ +static int HSC_Horizontal_Half_Line_Backward(FORM * form) +{ + return HSC_Generic(form,-((form->current->cols + 1)/2)); +} + +/*---------------------------------------------------------------------------- + End of Horizontal scrolling routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for Field Editing + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Is_There_Room_For_A_Line(FORM * form) +| +| Description : Check whether or not there is enough room in the +| buffer to enter a whole line. +| +| Return Values : TRUE - there is enough space +| FALSE - there is not enough space ++--------------------------------------------------------------------------*/ +INLINE static bool Is_There_Room_For_A_Line(FORM * form) +{ + FIELD *field = form->current; + char *begin_of_last_line, *s; + + Synchronize_Buffer(form); + begin_of_last_line = Address_Of_Row_In_Buffer(field,(field->drows-1)); + s = After_End_Of_Data(begin_of_last_line,field->dcols); + return ((s==begin_of_last_line) ? TRUE : FALSE); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Is_There_Room_For_A_Char_In_Line(FORM * form) +| +| Description : Checks whether or not there is room for a new character +| in the current line. +| +| Return Values : TRUE - there is room +| FALSE - there is not enough room (line full) ++--------------------------------------------------------------------------*/ +INLINE static bool Is_There_Room_For_A_Char_In_Line(FORM * form) +{ + int last_char_in_line; + + wmove(form->w,form->currow,form->current->dcols-1); + last_char_in_line = (int)(winch(form->w) & A_CHARTEXT); + wmove(form->w,form->currow,form->curcol); + return (((last_char_in_line == form->current->pad) || + is_blank(last_char_in_line)) ? TRUE : FALSE); +} + +#define There_Is_No_Room_For_A_Char_In_Line(f) \ + !Is_There_Room_For_A_Char_In_Line(f) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Insert_String( +| FORM * form, +| int row, +| char *txt, +| int len ) +| +| Description : Insert the 'len' characters beginning at pointer 'txt' +| into the 'row' of the 'form'. The insertion occurs +| on the beginning of the row, all other characters are +| moved to the right. After the text a pad character will +| be inserted to separate the text from the rest. If +| necessary the insertion moves characters on the next +| line to make place for the requested insertion string. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +static int Insert_String(FORM *form, int row, char *txt, int len) +{ + FIELD *field = form->current; + char *bp = Address_Of_Row_In_Buffer(field,row); + int datalen = (int)(After_End_Of_Data(bp,field->dcols) - bp); + int freelen = field->dcols - datalen; + int requiredlen = len+1; + char *split; + int result = E_REQUEST_DENIED; + char *Space; + + Space = (char*)malloc(2*sizeof(char)); + strcpy(Space, " "); + + if (freelen >= requiredlen) + { + wmove(form->w,row,0); + winsnstr(form->w,txt,len); + wmove(form->w,row,len); + winsnstr(form->w,Space,1); + free(Space); + return E_OK; + } + else + { /* we have to move characters on the next line. If we are on the + last line this may work, if the field is growable */ + if ((row == (field->drows - 1)) && Growable(field)) + { + if (!Field_Grown(field,1)) + { + free(Space); + return(E_SYSTEM_ERROR); + } + /* !!!Side-Effect : might be changed due to growth!!! */ + bp = Address_Of_Row_In_Buffer(field,row); + } + + if (row < (field->drows - 1)) + { + split = After_Last_Whitespace_Character(bp, + (int)(Get_Start_Of_Data(bp + field->dcols - requiredlen , + requiredlen) - bp)); + /* split points now to the first character of the portion of the + line that must be moved to the next line */ + datalen = (int)(split-bp); /* + freelen has to stay on this line */ + freelen = field->dcols - (datalen + freelen); /* for the next line */ + + if ((result=Insert_String(form,row+1,split,freelen))==E_OK) + { + wmove(form->w,row,datalen); + wclrtoeol(form->w); + wmove(form->w,row,0); + winsnstr(form->w,txt,len); + wmove(form->w,row,len); + winsnstr(form->w,Space,1); + free(Space); + return E_OK; + } + } + free(Space); + return(result); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Wrapping_Not_Necessary_Or_Wrapping_Ok( +| FORM * form) +| +| Description : If a character has been entered into a field, it may +| be that wrapping has to occur. This routine checks +| whether or not wrapping is required and if so, performs +| the wrapping. +| +| Return Values : E_OK - no wrapping required or wrapping +| was successfull +| E_REQUEST_DENIED - +| E_SYSTEM_ERROR - some system error ++--------------------------------------------------------------------------*/ +static int Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM * form) +{ + FIELD *field = form->current; + int result = E_REQUEST_DENIED; + bool Last_Row = ((field->drows - 1) == form->currow); + + if ( (field->opts & O_WRAP) && /* wrapping wanted */ + (!Single_Line_Field(field)) && /* must be multi-line */ + (There_Is_No_Room_For_A_Char_In_Line(form)) && /* line is full */ + (!Last_Row || Growable(field)) ) /* there are more lines*/ + { + char *bp; + char *split; + int chars_to_be_wrapped; + int chars_to_remain_on_line; + if (Last_Row) + { /* the above logic already ensures, that in this case the field + is growable */ + if (!Field_Grown(field,1)) + return E_SYSTEM_ERROR; + } + bp = Address_Of_Current_Row_In_Buffer(form); + Window_To_Buffer(form->w,field); + split = After_Last_Whitespace_Character(bp,field->dcols); + /* split points to the first character of the sequence to be brought + on the next line */ + chars_to_remain_on_line = (int)(split - bp); + chars_to_be_wrapped = field->dcols - chars_to_remain_on_line; + if (chars_to_remain_on_line > 0) + { + if ((result=Insert_String(form,form->currow+1,split, + chars_to_be_wrapped)) == E_OK) + { + wmove(form->w,form->currow,chars_to_remain_on_line); + wclrtoeol(form->w); + if (form->curcol >= chars_to_remain_on_line) + { + form->currow++; + form->curcol -= chars_to_remain_on_line; + } + return E_OK; + } + } + else + return E_OK; + if (result!=E_OK) + { + wmove(form->w,form->currow,form->curcol); + wdelch(form->w); + Window_To_Buffer(form->w,field); + result = E_REQUEST_DENIED; + } + } + else + result = E_OK; /* wrapping was not necessary */ + return(result); +} + +/*---------------------------------------------------------------------------- + Field Editing routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Field_Editing( +| int (* const fct) (FORM *), +| FORM * form) +| +| Description : Generic routine for field editing requests. The driver +| routines are only called for editable fields, the +| _WINDOW_MODIFIED flag is set if editing occured. +| This is somewhat special due to the overload semantics +| of the NEW_LINE and DEL_PREV requests. +| +| Return Values : Error code from low level drivers. ++--------------------------------------------------------------------------*/ +static int Field_Editing(int (* const fct) (FORM *), FORM * form) +{ + int res = E_REQUEST_DENIED; + + /* We have to deal here with the specific case of the overloaded + behaviour of New_Line and Delete_Previous requests. + They may end up in navigational requests if we are on the first + character in a field. But navigation is also allowed on non- + editable fields. + */ + if ((fct==FE_Delete_Previous) && + (form->opts & O_BS_OVERLOAD) && + First_Position_In_Current_Field(form) ) + { + res = Inter_Field_Navigation(FN_Previous_Field,form); + } + else + { + if (fct==FE_New_Line) + { + if ((form->opts & O_NL_OVERLOAD) && + First_Position_In_Current_Field(form)) + { + res = Inter_Field_Navigation(FN_Next_Field,form); + } + else + /* FE_New_Line deals itself with the _WINDOW_MODIFIED flag */ + res = fct(form); + } + else + { + /* From now on, everything must be editable */ + if (form->current->opts & O_EDIT) + { + res = fct(form); + if (res==E_OK) + form->status |= _WINDOW_MODIFIED; + } + } + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_New_Line(FORM * form) +| +| Description : Perform a new line request. This is rather complex +| compared to other routines in this code due to the +| rather difficult to understand description in the +| manuals. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - new line not allowed +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +static int FE_New_Line(FORM * form) +{ + FIELD *field = form->current; + char *bp, *t; + bool Last_Row = ((field->drows - 1)==form->currow); + + if (form->status & _OVLMODE) + { + if (Last_Row && + (!(Growable(field) && !Single_Line_Field(field)))) + { + if (!(form->opts & O_NL_OVERLOAD)) + return(E_REQUEST_DENIED); + wclrtoeol(form->w); + /* we have to set this here, although it is also + handled in the generic routine. The reason is, + that FN_Next_Field may fail, but the form is + definitively changed */ + form->status |= _WINDOW_MODIFIED; + return Inter_Field_Navigation(FN_Next_Field,form); + } + else + { + if (Last_Row && !Field_Grown(field,1)) + { /* N.B.: due to the logic in the 'if', LastRow==TRUE + means here that the field is growable and not + a single-line field */ + return(E_SYSTEM_ERROR); + } + wclrtoeol(form->w); + form->currow++; + form->curcol = 0; + form->status |= _WINDOW_MODIFIED; + return(E_OK); + } + } + else + { /* Insert Mode */ + if (Last_Row && + !(Growable(field) && !Single_Line_Field(field))) + { + if (!(form->opts & O_NL_OVERLOAD)) + return(E_REQUEST_DENIED); + return Inter_Field_Navigation(FN_Next_Field,form); + } + else + { + bool May_Do_It = !Last_Row && Is_There_Room_For_A_Line(form); + + if (!(May_Do_It || Growable(field))) + return(E_REQUEST_DENIED); + if (!May_Do_It && !Field_Grown(field,1)) + return(E_SYSTEM_ERROR); + + bp= Address_Of_Current_Position_In_Buffer(form); + t = After_End_Of_Data(bp,field->dcols - form->curcol); + wclrtoeol(form->w); + form->currow++; + form->curcol=0; + wmove(form->w,form->currow,form->curcol); + winsertln(form->w); + waddnstr(form->w,bp,(int)(t-bp)); + form->status |= _WINDOW_MODIFIED; + return E_OK; + } + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Insert_Character(FORM * form) +| +| Description : Insert blank character at the cursor position +| +| Return Values : E_OK +| E_REQUEST_DENIED ++--------------------------------------------------------------------------*/ +static int FE_Insert_Character(FORM * form) +{ + FIELD *field = form->current; + int result = E_REQUEST_DENIED; + + if (Check_Char(field->type,(int)C_BLANK,(TypeArgument *)(field->arg))) + { + bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form); + + if (There_Is_Room || + ((Single_Line_Field(field) && Growable(field)))) + { + if (!There_Is_Room && !Field_Grown(field,1)) + result = E_SYSTEM_ERROR; + else + { + winsch(form->w,(chtype)C_BLANK); + result = Wrapping_Not_Necessary_Or_Wrapping_Ok(form); + } + } + } + return result; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Insert_Line(FORM * form) +| +| Description : Insert a blank line at the cursor position +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - line can not be inserted ++--------------------------------------------------------------------------*/ +static int FE_Insert_Line(FORM * form) +{ + FIELD *field = form->current; + int result = E_REQUEST_DENIED; + + if (Check_Char(field->type,(int)C_BLANK,(TypeArgument *)(field->arg))) + { + bool Maybe_Done = (form->currow!=(field->drows-1)) && + Is_There_Room_For_A_Line(form); + + if (!Single_Line_Field(field) && + (Maybe_Done || Growable(field))) + { + if (!Maybe_Done && !Field_Grown(field,1)) + result = E_SYSTEM_ERROR; + else + { + form->curcol = 0; + winsertln(form->w); + result = E_OK; + } + } + } + return result; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Delete_Character(FORM * form) +| +| Description : Delete character at the cursor position +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int FE_Delete_Character(FORM * form) +{ + wdelch(form->w); + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Delete_Previous(FORM * form) +| +| Description : Delete character before cursor. Again this is a rather +| difficult piece compared to others due to the overloading +| semantics of backspace. +| N.B.: The case of overloaded BS on first field position +| is already handled in the generic routine. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - Character can't be deleted ++--------------------------------------------------------------------------*/ +static int FE_Delete_Previous(FORM * form) +{ + FIELD *field = form->current; + + if (First_Position_In_Current_Field(form)) + return E_REQUEST_DENIED; + + if ( (--(form->curcol))<0 ) + { + char *this_line, *prev_line, *prev_end, *this_end; + + form->curcol++; + if (form->status & _OVLMODE) + return E_REQUEST_DENIED; + + prev_line = Address_Of_Row_In_Buffer(field,(form->currow-1)); + this_line = Address_Of_Row_In_Buffer(field,(form->currow)); + Synchronize_Buffer(form); + prev_end = After_End_Of_Data(prev_line,field->dcols); + this_end = After_End_Of_Data(this_line,field->dcols); + if ((int)(this_end-this_line) > + (field->cols-(int)(prev_end-prev_line))) + return E_REQUEST_DENIED; + wdeleteln(form->w); + Adjust_Cursor_Position(form,prev_end); + wmove(form->w,form->currow,form->curcol); + waddnstr(form->w,this_line,(int)(this_end-this_line)); + } + else + { + wmove(form->w,form->currow,form->curcol); + wdelch(form->w); + } + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Delete_Line(FORM * form) +| +| Description : Delete line at cursor position. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int FE_Delete_Line(FORM * form) +{ + form->curcol = 0; + wdeleteln(form->w); + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Delete_Word(FORM * form) +| +| Description : Delete word at cursor position +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - failure ++--------------------------------------------------------------------------*/ +static int FE_Delete_Word(FORM * form) +{ + FIELD *field = form->current; + char *bp = Address_Of_Current_Row_In_Buffer(form); + char *ep = bp + field->dcols; + char *cp = bp + form->curcol; + char *s; + + Synchronize_Buffer(form); + if (is_blank(*cp)) + return E_REQUEST_DENIED; /* not in word */ + + /* move cursor to begin of word and erase to end of screen-line */ + Adjust_Cursor_Position(form, + After_Last_Whitespace_Character(bp,form->curcol)); + wmove(form->w,form->currow,form->curcol); + wclrtoeol(form->w); + + /* skip over word in buffer */ + s = Get_First_Whitespace_Character(cp,(int)(ep-cp)); + /* to begin of next word */ + s = Get_Start_Of_Data(s,(int)(ep - s)); + if ( (s!=cp) && !is_blank(*s)) + { + /* copy remaining line to window */ + waddnstr(form->w,s,(int)(s - After_End_Of_Data(s,(int)(ep - s)))); + } + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Clear_To_End_Of_Line(FORM * form) +| +| Description : Clear to end of current line. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int FE_Clear_To_End_Of_Line(FORM * form) +{ + wclrtoeol(form->w); + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Clear_To_End_Of_Form(FORM * form) +| +| Description : Clear to end of form. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int FE_Clear_To_End_Of_Form(FORM * form) +{ + wclrtobot(form->w); + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FE_Clear_Field(FORM * form) +| +| Description : Clear entire field. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int FE_Clear_Field(FORM * form) +{ + form->currow = form->curcol = 0; + werase(form->w); + return E_OK; +} +/*---------------------------------------------------------------------------- + END of Field Editing routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Edit Mode routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int EM_Overlay_Mode(FORM * form) +| +| Description : Switch to overlay mode. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int EM_Overlay_Mode(FORM * form) +{ + form->status |= _OVLMODE; + return E_OK; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int EM_Insert_Mode(FORM * form) +| +| Description : Switch to insert mode +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +static int EM_Insert_Mode(FORM * form) +{ + form->status &= ~_OVLMODE; + return E_OK; +} + +/*---------------------------------------------------------------------------- + END of Edit Mode routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for Choice Requests + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Next_Choice( +| FIELDTYPE * typ, +| FIELD * field, +| TypeArgument *argp) +| +| Description : Get the next field choice. For linked types this is +| done recursively. +| +| Return Values : TRUE - next choice successfully retrieved +| FALSE - couldn't retrieve next choice ++--------------------------------------------------------------------------*/ +static bool Next_Choice(FIELDTYPE * typ, FIELD *field, TypeArgument *argp) +{ + if (!typ || !(typ->status & _HAS_CHOICE)) + return FALSE; + + if (typ->status & _LINKED_TYPE) + { + assert(argp != 0); + return( + Next_Choice(typ->left ,field,argp->left) || + Next_Choice(typ->right,field,argp->right) ); + } + else + { + assert(typ->next != 0); + return typ->next(field,(void *)argp); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Previous_Choice( +| FIELDTYPE * typ, +| FIELD * field, +| TypeArgument *argp) +| +| Description : Get the previous field choice. For linked types this +| is done recursively. +| +| Return Values : TRUE - previous choice successfully retrieved +| FALSE - couldn't retrieve previous choice ++--------------------------------------------------------------------------*/ +static bool Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) +{ + if (!typ || !(typ->status & _HAS_CHOICE)) + return FALSE; + + if (typ->status & _LINKED_TYPE) + { + assert(argp != 0); + return( + Previous_Choice(typ->left ,field,argp->left) || + Previous_Choice(typ->right,field,argp->right)); + } + else + { + assert(typ->prev != 0); + return typ->prev(field,(void *)argp); + } +} +/*---------------------------------------------------------------------------- + End of Helper routines for Choice Requests + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Routines for Choice Requests + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int CR_Next_Choice(FORM * form) +| +| Description : Get the next field choice. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - next choice couldn't be retrieved ++--------------------------------------------------------------------------*/ +static int CR_Next_Choice(FORM * form) +{ + FIELD *field = form->current; + Synchronize_Buffer(form); + return ((Next_Choice(field->type,field,(TypeArgument *)(field->arg))) ? + E_OK : E_REQUEST_DENIED); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int CR_Previous_Choice(FORM * form) +| +| Description : Get the previous field choice. +| +| Return Values : E_OK - success +| E_REQUEST_DENIED - prev. choice couldn't be retrieved ++--------------------------------------------------------------------------*/ +static int CR_Previous_Choice(FORM * form) +{ + FIELD *field = form->current; + Synchronize_Buffer(form); + return ((Previous_Choice(field->type,field,(TypeArgument *)(field->arg))) ? + E_OK : E_REQUEST_DENIED); +} +/*---------------------------------------------------------------------------- + End of Routines for Choice Requests + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for Field Validations. + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Field( +| FIELDTYPE * typ, +| FIELD * field, +| TypeArgument * argp) +| +| Description : Check the field according to its fieldtype and its +| actual arguments. For linked fieldtypes this is done +| recursively. +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid. ++--------------------------------------------------------------------------*/ +static bool Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp) +{ + if (typ) + { + if (field->opts & O_NULLOK) + { + char *bp = field->buf; + assert(bp != 0); + while(is_blank(*bp)) + { bp++; } + if (*bp == '\0') + return TRUE; + } + + if (typ->status & _LINKED_TYPE) + { + assert(argp != 0); + return( + Check_Field(typ->left ,field,argp->left ) || + Check_Field(typ->right,field,argp->right) ); + } + else + { + if (typ->fcheck) + return typ->fcheck(field,(void *)argp); + } + } + return TRUE; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : bool _nc_Internal_Validation(FORM * form ) +| +| Description : Validate the current field of the form. +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +bool +_nc_Internal_Validation(FORM *form) +{ + FIELD *field; + + field = form->current; + + Synchronize_Buffer(form); + if ((form->status & _FCHECK_REQUIRED) || + (!(field->opts & O_PASSOK))) + { + if (!Check_Field(field->type,field,(TypeArgument *)(field->arg))) + return FALSE; + form->status &= ~_FCHECK_REQUIRED; + field->status |= _CHANGED; + Synchronize_Linked_Fields(field); + } + return TRUE; +} +/*---------------------------------------------------------------------------- + End of Helper routines for Field Validations. + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Routines for Field Validation. + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FV_Validation(FORM * form) +| +| Description : Validate the current field of the form. +| +| Return Values : E_OK - field valid +| E_INVALID_FIELD - field not valid ++--------------------------------------------------------------------------*/ +static int FV_Validation(FORM * form) +{ + if (_nc_Internal_Validation(form)) + return E_OK; + else + return E_INVALID_FIELD; +} +/*---------------------------------------------------------------------------- + End of routines for Field Validation. + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for Inter-Field Navigation + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Next_Field_On_Page(FIELD * field) +| +| Description : Get the next field after the given field on the current +| page. The order of fields is the one defined by the +| fields array. Only visible and active fields are +| counted. +| +| Return Values : Pointer to the next field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Next_Field_On_Page(FIELD * field) +{ + FORM *form = field->form; + FIELD **field_on_page = &form->field[field->index]; + FIELD **first_on_page = &form->field[form->page[form->curpage].pmin]; + FIELD **last_on_page = &form->field[form->page[form->curpage].pmax]; + + do + { + field_on_page = + (field_on_page==last_on_page) ? first_on_page : field_on_page + 1; + if (Field_Is_Selectable(*field_on_page)) + break; + } while(field!=(*field_on_page)); + return(*field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : FIELD* _nc_First_Active_Field(FORM * form) +| +| Description : Get the first active field on the current page, +| if there are such. If there are none, get the first +| visible field on the page. If there are also none, +| we return the first field on page and hope the best. +| +| Return Values : Pointer to calculated field. ++--------------------------------------------------------------------------*/ +FIELD* +_nc_First_Active_Field(FORM * form) +{ + FIELD **last_on_page = &form->field[form->page[form->curpage].pmax]; + FIELD *proposed = Next_Field_On_Page(*last_on_page); + + if (proposed == *last_on_page) + { /* there might be the special situation, where there is no + active and visible field on the current page. We then select + the first visible field on this readonly page + */ + if (Field_Is_Not_Selectable(proposed)) + { + FIELD **field = &form->field[proposed->index]; + FIELD **first = &form->field[form->page[form->curpage].pmin]; + + do + { + field = (field==last_on_page) ? first : field + 1; + if (((*field)->opts & O_VISIBLE)) + break; + } while(proposed!=(*field)); + + proposed = *field; + + if ((proposed == *last_on_page) && !(proposed->opts&O_VISIBLE)) + { /* This means, there is also no visible field on the page. + So we propose the first one and hope the very best... + Some very clever user has designed a readonly and invisible + page on this form. + */ + proposed = *first; + } + } + } + return(proposed); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Previous_Field_On_Page(FIELD * field) +| +| Description : Get the previous field before the given field on the +| current page. The order of fields is the one defined by +| the fields array. Only visible and active fields are +| counted. +| +| Return Values : Pointer to the previous field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Previous_Field_On_Page(FIELD * field) +{ + FORM *form = field->form; + FIELD **field_on_page = &form->field[field->index]; + FIELD **first_on_page = &form->field[form->page[form->curpage].pmin]; + FIELD **last_on_page = &form->field[form->page[form->curpage].pmax]; + + do + { + field_on_page = + (field_on_page==first_on_page) ? last_on_page : field_on_page - 1; + if (Field_Is_Selectable(*field_on_page)) + break; + } while(field!=(*field_on_page)); + + return (*field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Sorted_Next_Field(FIELD * field) +| +| Description : Get the next field after the given field on the current +| page. The order of fields is the one defined by the +| (row,column) geometry, rows are major. +| +| Return Values : Pointer to the next field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Sorted_Next_Field(FIELD * field) +{ + FIELD *field_on_page = field; + + do + { + field_on_page = field_on_page->snext; + if (Field_Is_Selectable(field_on_page)) + break; + } while(field_on_page!=field); + + return (field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Sorted_Previous_Field(FIELD * field) +| +| Description : Get the previous field before the given field on the +| current page. The order of fields is the one defined +| by the (row,column) geometry, rows are major. +| +| Return Values : Pointer to the previous field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Sorted_Previous_Field(FIELD * field) +{ + FIELD *field_on_page = field; + + do + { + field_on_page = field_on_page->sprev; + if (Field_Is_Selectable(field_on_page)) + break; + } while(field_on_page!=field); + + return (field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Left_Neighbour_Field(FIELD * field) +| +| Description : Get the left neighbour of the field on the same line +| and the same page. Cycles through the line. +| +| Return Values : Pointer to left neighbour field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Left_Neighbour_Field(FIELD * field) +{ + FIELD *field_on_page = field; + + /* For a field that has really a left neighbour, the while clause + immediately fails and the loop is left, positioned at the right + neighbour. Otherwise we cycle backwards through the sorted fieldlist + until we enter the same line (from the right end). + */ + do + { + field_on_page = Sorted_Previous_Field(field_on_page); + } while(field_on_page->frow != field->frow); + + return (field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Right_Neighbour_Field(FIELD * field) +| +| Description : Get the right neighbour of the field on the same line +| and the same page. +| +| Return Values : Pointer to right neighbour field. ++--------------------------------------------------------------------------*/ +INLINE static FIELD *Right_Neighbour_Field(FIELD * field) +{ + FIELD *field_on_page = field; + + /* See the comments on Left_Neighbour_Field to understand how it works */ + do + { + field_on_page = Sorted_Next_Field(field_on_page); + } while(field_on_page->frow != field->frow); + + return (field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Upper_Neighbour_Field(FIELD * field) +| +| Description : Because of the row-major nature of sorting the fields, +| its more difficult to define whats the upper neighbour +| field really means. We define that it must be on a +| 'previous' line (cyclic order!) and is the rightmost +| field laying on the left side of the given field. If +| this set is empty, we take the first field on the line. +| +| Return Values : Pointer to the upper neighbour field. ++--------------------------------------------------------------------------*/ +static FIELD *Upper_Neighbour_Field(FIELD * field) +{ + FIELD *field_on_page = field; + int frow = field->frow; + int fcol = field->fcol; + + /* Walk back to the 'previous' line. The second term in the while clause + just guarantees that we stop if we cycled through the line because + there might be no 'previous' line if the page has just one line. + */ + do + { + field_on_page = Sorted_Previous_Field(field_on_page); + } while(field_on_page->frow==frow && field_on_page->fcol!=fcol); + + if (field_on_page->frow!=frow) + { /* We really found a 'previous' line. We are positioned at the + rightmost field on this line */ + frow = field_on_page->frow; + + /* We walk to the left as long as we are really right of the + field. */ + while(field_on_page->frow==frow && field_on_page->fcol>fcol) + field_on_page = Sorted_Previous_Field(field_on_page); + + /* If we wrapped, just go to the right which is the first field on + the row */ + if (field_on_page->frow!=frow) + field_on_page = Sorted_Next_Field(field_on_page); + } + + return (field_on_page); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static FIELD *Down_Neighbour_Field(FIELD * field) +| +| Description : Because of the row-major nature of sorting the fields, +| its more difficult to define whats the down neighbour +| field really means. We define that it must be on a +| 'next' line (cyclic order!) and is the leftmost +| field laying on the right side of the given field. If +| this set is empty, we take the last field on the line. +| +| Return Values : Pointer to the upper neighbour field. ++--------------------------------------------------------------------------*/ +static FIELD *Down_Neighbour_Field(FIELD * field) +{ + FIELD *field_on_page = field; + int frow = field->frow; + int fcol = field->fcol; + + /* Walk forward to the 'next' line. The second term in the while clause + just guarantees that we stop if we cycled through the line because + there might be no 'next' line if the page has just one line. + */ + do + { + field_on_page = Sorted_Next_Field(field_on_page); + } while(field_on_page->frow==frow && field_on_page->fcol!=fcol); + + if (field_on_page->frow!=frow) + { /* We really found a 'next' line. We are positioned at the rightmost + field on this line */ + frow = field_on_page->frow; + + /* We walk to the right as long as we are really left of the + field. */ + while(field_on_page->frow==frow && field_on_page->fcolfrow!=frow) + field_on_page = Sorted_Previous_Field(field_on_page); + } + + return(field_on_page); +} + +/*---------------------------------------------------------------------------- + Inter-Field Navigation routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Inter_Field_Navigation( +| int (* const fct) (FORM *), +| FORM * form) +| +| Description : Generic behaviour for changing the current field, the +| field is left and a new field is entered. So the field +| must be validated and the field init/term hooks must +| be called. +| +| Return Values : E_OK - success +| E_INVALID_FIELD - field is invalid +| some other - error from subordinate call ++--------------------------------------------------------------------------*/ +static int Inter_Field_Navigation(int (* const fct) (FORM *),FORM *form) +{ + int res; + + if (!_nc_Internal_Validation(form)) + res = E_INVALID_FIELD; + else + { + Call_Hook(form,fieldterm); + res = fct(form); + Call_Hook(form,fieldinit); + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Next_Field(FORM * form) +| +| Description : Move to the next field on the current page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Next_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Next_Field_On_Page(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Previous_Field(FORM * form) +| +| Description : Move to the previous field on the current page of the +| form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Previous_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Previous_Field_On_Page(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_First_Field(FORM * form) +| +| Description : Move to the first field on the current page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_First_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Next_Field_On_Page(form->field[form->page[form->curpage].pmax])); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Last_Field(FORM * form) +| +| Description : Move to the last field on the current page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Last_Field(FORM * form) +{ + return + _nc_Set_Current_Field(form, + Previous_Field_On_Page(form->field[form->page[form->curpage].pmin])); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Sorted_Next_Field(FORM * form) +| +| Description : Move to the sorted next field on the current page +| of the form. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Sorted_Next_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Sorted_Next_Field(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Sorted_Previous_Field(FORM * form) +| +| Description : Move to the sorted previous field on the current page +| of the form. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Sorted_Previous_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Sorted_Previous_Field(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Sorted_First_Field(FORM * form) +| +| Description : Move to the sorted first field on the current page +| of the form. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Sorted_First_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Sorted_Next_Field(form->field[form->page[form->curpage].smax])); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Sorted_Last_Field(FORM * form) +| +| Description : Move to the sorted last field on the current page +| of the form. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Sorted_Last_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Sorted_Previous_Field(form->field[form->page[form->curpage].smin])); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Left_Field(FORM * form) +| +| Description : Get the field on the left of the current field on the +| same line and the same page. Cycles through the line. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Left_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Left_Neighbour_Field(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Right_Field(FORM * form) +| +| Description : Get the field on the right of the current field on the +| same line and the same page. Cycles through the line. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Right_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Right_Neighbour_Field(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Up_Field(FORM * form) +| +| Description : Get the upper neighbour of the current field. This +| cycles through the page. See the comments of the +| Upper_Neighbour_Field function to understand how +| 'upper' is defined. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Up_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Upper_Neighbour_Field(form->current)); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int FN_Down_Field(FORM * form) +| +| Description : Get the down neighbour of the current field. This +| cycles through the page. See the comments of the +| Down_Neighbour_Field function to understand how +| 'down' is defined. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int FN_Down_Field(FORM * form) +{ + return _nc_Set_Current_Field(form, + Down_Neighbour_Field(form->current)); +} +/*---------------------------------------------------------------------------- + END of Field Navigation routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for Page Navigation + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int _nc_Set_Form_Page(FORM * form, +| int page, +| FIELD * field) +| +| Description : Make the given page nr. the current page and make +| the given field the current field on the page. If +| for the field NULL is given, make the first field on +| the page the current field. The routine acts only +| if the requested page is not the current page. +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +int +_nc_Set_Form_Page(FORM * form, int page, FIELD * field) +{ + int res = E_OK; + + if ((form->curpage!=page)) + { + FIELD *last_field, *field_on_page; + + werase(Get_Form_Window(form)); + form->curpage = page; + last_field = field_on_page = form->field[form->page[page].smin]; + do + { + if (field_on_page->opts & O_VISIBLE) + if ((res=Display_Field(field_on_page))!=E_OK) + return(res); + field_on_page = field_on_page->snext; + } while(field_on_page != last_field); + + if (field) + res = _nc_Set_Current_Field(form,field); + else + /* N.B.: we don't encapsulate this by Inter_Field_Navigation(), + because this is already executed in a page navigation + context that contains field navigation + */ + res = FN_First_Field(form); + } + return(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Next_Page_Number(const FORM * form) +| +| Description : Calculate the page number following the current page +| number. This cycles if the highest page number is +| reached. +| +| Return Values : The next page number ++--------------------------------------------------------------------------*/ +INLINE static int Next_Page_Number(const FORM * form) +{ + return (form->curpage + 1) % form->maxpage; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Previous_Page_Number(const FORM * form) +| +| Description : Calculate the page number before the current page +| number. This cycles if the first page number is +| reached. +| +| Return Values : The previous page number ++--------------------------------------------------------------------------*/ +INLINE static int Previous_Page_Number(const FORM * form) +{ + return (form->curpage!=0 ? form->curpage - 1 : form->maxpage - 1); +} + +/*---------------------------------------------------------------------------- + Page Navigation routines + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Page_Navigation( +| int (* const fct) (FORM *), +| FORM * form) +| +| Description : Generic behaviour for changing a page. This means +| that the field is left and a new field is entered. +| So the field must be validated and the field init/term +| hooks must be called. Because also the page is changed, +| the forms init/term hooks must be called also. +| +| Return Values : E_OK - success +| E_INVALID_FIELD - field is invalid +| some other - error from subordinate call ++--------------------------------------------------------------------------*/ +static int Page_Navigation(int (* const fct) (FORM *), FORM * form) +{ + int res; + + if (!_nc_Internal_Validation(form)) + res = E_INVALID_FIELD; + else + { + Call_Hook(form,fieldterm); + Call_Hook(form,formterm); + res = fct(form); + Call_Hook(form,forminit); + Call_Hook(form,fieldinit); + } + return res; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int PN_Next_Page(FORM * form) +| +| Description : Move to the next page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int PN_Next_Page(FORM * form) +{ + return _nc_Set_Form_Page(form,Next_Page_Number(form),(FIELD *)0); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int PN_Previous_Page(FORM * form) +| +| Description : Move to the previous page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int PN_Previous_Page(FORM * form) +{ + return _nc_Set_Form_Page(form,Previous_Page_Number(form),(FIELD *)0); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int PN_First_Page(FORM * form) +| +| Description : Move to the first page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int PN_First_Page(FORM * form) +{ + return _nc_Set_Form_Page(form,0,(FIELD *)0); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int PN_Last_Page(FORM * form) +| +| Description : Move to the last page of the form +| +| Return Values : E_OK - success +| != E_OK - error from subordinate call ++--------------------------------------------------------------------------*/ +static int PN_Last_Page(FORM * form) +{ + return _nc_Set_Form_Page(form,form->maxpage-1,(FIELD *)0); +} +/*---------------------------------------------------------------------------- + END of Field Navigation routines + --------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + Helper routines for the core form driver. + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Data_Entry(FORM * form,int c) +| +| Description : Enter character c into at the current position of the +| current field of the form. +| +| Return Values : E_OK - +| E_REQUEST_DENIED - +| E_SYSTEM_ERROR - ++--------------------------------------------------------------------------*/ +static int Data_Entry(FORM * form, int c) +{ + FIELD *field = form->current; + int result = E_REQUEST_DENIED; + + if ( (field->opts & O_EDIT) +#if FIX_FORM_INACTIVE_BUG + && (field->opts & O_ACTIVE) +#endif + ) + { + if ( (field->opts & O_BLANK) && + First_Position_In_Current_Field(form) && + !(form->status & _FCHECK_REQUIRED) && + !(form->status & _WINDOW_MODIFIED) ) + werase(form->w); + + if (form->status & _OVLMODE) + { + waddch(form->w,(chtype)c); + } + else /* no _OVLMODE */ + { + bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form); + + if (!(There_Is_Room || + ((Single_Line_Field(field) && Growable(field))))) + return E_REQUEST_DENIED; + + if (!There_Is_Room && !Field_Grown(field,1)) + return E_SYSTEM_ERROR; + + winsch(form->w,(chtype)c); + } + + if ((result=Wrapping_Not_Necessary_Or_Wrapping_Ok(form))==E_OK) + { + bool End_Of_Field= (((field->drows-1)==form->currow) && + ((field->dcols-1)==form->curcol)); + form->status |= _WINDOW_MODIFIED; + if (End_Of_Field && !Growable(field) && (field->opts & O_AUTOSKIP)) + result = Inter_Field_Navigation(FN_Next_Field,form); + else + { + if (End_Of_Field && Growable(field) && !Field_Grown(field,1)) + result = E_SYSTEM_ERROR; + else + { + IFN_Next_Character(form); + result = E_OK; + } + } + } + } + return result; +} + +/* Structure to describe the binding of a request code to a function. + The member keycode codes the request value as well as the generic + routine to use for the request. The code for the generic routine + is coded in the upper 16 Bits while the request code is coded in + the lower 16 bits. + + In terms of C++ you might think of a request as a class with a + virtual method "perform". The different types of request are + derived from this base class and overload (or not) the base class + implementation of perform. +*/ +typedef struct { + int keycode; /* must be at least 32 bit: hi:mode, lo: key */ + int (*cmd)(FORM *); /* low level driver routine for this key */ +} Binding_Info; + +/* You may see this is the class-id of the request type class */ +#define ID_PN (0x00000000) /* Page navigation */ +#define ID_FN (0x00010000) /* Inter-Field navigation */ +#define ID_IFN (0x00020000) /* Intra-Field navigation */ +#define ID_VSC (0x00030000) /* Vertical Scrolling */ +#define ID_HSC (0x00040000) /* Horizontal Scrolling */ +#define ID_FE (0x00050000) /* Field Editing */ +#define ID_EM (0x00060000) /* Edit Mode */ +#define ID_FV (0x00070000) /* Field Validation */ +#define ID_CH (0x00080000) /* Choice */ +#define ID_Mask (0xffff0000) +#define Key_Mask (0x0000ffff) +#define ID_Shft (16) + +/* This array holds all the Binding Infos */ +static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] = +{ + { REQ_NEXT_PAGE |ID_PN ,PN_Next_Page}, + { REQ_PREV_PAGE |ID_PN ,PN_Previous_Page}, + { REQ_FIRST_PAGE |ID_PN ,PN_First_Page}, + { REQ_LAST_PAGE |ID_PN ,PN_Last_Page}, + + { REQ_NEXT_FIELD |ID_FN ,FN_Next_Field}, + { REQ_PREV_FIELD |ID_FN ,FN_Previous_Field}, + { REQ_FIRST_FIELD |ID_FN ,FN_First_Field}, + { REQ_LAST_FIELD |ID_FN ,FN_Last_Field}, + { REQ_SNEXT_FIELD |ID_FN ,FN_Sorted_Next_Field}, + { REQ_SPREV_FIELD |ID_FN ,FN_Sorted_Previous_Field}, + { REQ_SFIRST_FIELD |ID_FN ,FN_Sorted_First_Field}, + { REQ_SLAST_FIELD |ID_FN ,FN_Sorted_Last_Field}, + { REQ_LEFT_FIELD |ID_FN ,FN_Left_Field}, + { REQ_RIGHT_FIELD |ID_FN ,FN_Right_Field}, + { REQ_UP_FIELD |ID_FN ,FN_Up_Field}, + { REQ_DOWN_FIELD |ID_FN ,FN_Down_Field}, + + { REQ_NEXT_CHAR |ID_IFN ,IFN_Next_Character}, + { REQ_PREV_CHAR |ID_IFN ,IFN_Previous_Character}, + { REQ_NEXT_LINE |ID_IFN ,IFN_Next_Line}, + { REQ_PREV_LINE |ID_IFN ,IFN_Previous_Line}, + { REQ_NEXT_WORD |ID_IFN ,IFN_Next_Word}, + { REQ_PREV_WORD |ID_IFN ,IFN_Previous_Word}, + { REQ_BEG_FIELD |ID_IFN ,IFN_Beginning_Of_Field}, + { REQ_END_FIELD |ID_IFN ,IFN_End_Of_Field}, + { REQ_BEG_LINE |ID_IFN ,IFN_Beginning_Of_Line}, + { REQ_END_LINE |ID_IFN ,IFN_End_Of_Line}, + { REQ_LEFT_CHAR |ID_IFN ,IFN_Left_Character}, + { REQ_RIGHT_CHAR |ID_IFN ,IFN_Right_Character}, + { REQ_UP_CHAR |ID_IFN ,IFN_Up_Character}, + { REQ_DOWN_CHAR |ID_IFN ,IFN_Down_Character}, + + { REQ_NEW_LINE |ID_FE ,FE_New_Line}, + { REQ_INS_CHAR |ID_FE ,FE_Insert_Character}, + { REQ_INS_LINE |ID_FE ,FE_Insert_Line}, + { REQ_DEL_CHAR |ID_FE ,FE_Delete_Character}, + { REQ_DEL_PREV |ID_FE ,FE_Delete_Previous}, + { REQ_DEL_LINE |ID_FE ,FE_Delete_Line}, + { REQ_DEL_WORD |ID_FE ,FE_Delete_Word}, + { REQ_CLR_EOL |ID_FE ,FE_Clear_To_End_Of_Line}, + { REQ_CLR_EOF |ID_FE ,FE_Clear_To_End_Of_Form}, + { REQ_CLR_FIELD |ID_FE ,FE_Clear_Field}, + + { REQ_OVL_MODE |ID_EM ,EM_Overlay_Mode}, + { REQ_INS_MODE |ID_EM ,EM_Insert_Mode}, + + { REQ_SCR_FLINE |ID_VSC ,VSC_Scroll_Line_Forward}, + { REQ_SCR_BLINE |ID_VSC ,VSC_Scroll_Line_Backward}, + { REQ_SCR_FPAGE |ID_VSC ,VSC_Scroll_Page_Forward}, + { REQ_SCR_BPAGE |ID_VSC ,VSC_Scroll_Page_Backward}, + { REQ_SCR_FHPAGE |ID_VSC ,VSC_Scroll_Half_Page_Forward}, + { REQ_SCR_BHPAGE |ID_VSC ,VSC_Scroll_Half_Page_Backward}, + + { REQ_SCR_FCHAR |ID_HSC ,HSC_Scroll_Char_Forward}, + { REQ_SCR_BCHAR |ID_HSC ,HSC_Scroll_Char_Backward}, + { REQ_SCR_HFLINE |ID_HSC ,HSC_Horizontal_Line_Forward}, + { REQ_SCR_HBLINE |ID_HSC ,HSC_Horizontal_Line_Backward}, + { REQ_SCR_HFHALF |ID_HSC ,HSC_Horizontal_Half_Line_Forward}, + { REQ_SCR_HBHALF |ID_HSC ,HSC_Horizontal_Half_Line_Backward}, + + { REQ_VALIDATION |ID_FV ,FV_Validation}, + + { REQ_NEXT_CHOICE |ID_CH ,CR_Next_Choice}, + { REQ_PREV_CHOICE |ID_CH ,CR_Previous_Choice} +}; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int form_driver(FORM * form,int c) +| +| Description : This is the workhorse of the forms system. It checks +| to determine whether the character c is a request or +| data. If it is a request, the form driver executes +| the request and returns the result. If it is data +| (printable character), it enters the data into the +| current position in the current field. If it is not +| recognized, the form driver assumes it is an application +| defined command and returns E_UNKNOWN_COMMAND. +| Application defined command should be defined relative +| to MAX_FORM_COMMAND, the maximum value of a request. +| +| Return Values : E_OK - success +| E_SYSTEM_ERROR - system error +| E_BAD_ARGUMENT - an argument is incorrect +| E_NOT_POSTED - form is not posted +| E_INVALID_FIELD - field contents are invalid +| E_BAD_STATE - called from inside a hook routine +| E_REQUEST_DENIED - request failed +| E_UNKNOWN_COMMAND - command not known ++--------------------------------------------------------------------------*/ +int form_driver(FORM * form, int c) +{ + const Binding_Info* BI = (Binding_Info *)0; + int res = E_UNKNOWN_COMMAND; + + if (!form) + RETURN(E_BAD_ARGUMENT); + + if (!(form->field)) + RETURN(E_NOT_CONNECTED); + + assert(form->page != 0); + + if (c==FIRST_ACTIVE_MAGIC) + { + form->current = _nc_First_Active_Field(form); + return E_OK; + } + + assert(form->current && + form->current->buf && + (form->current->form == form) + ); + + if ( form->status & _IN_DRIVER ) + RETURN(E_BAD_STATE); + + if ( !( form->status & _POSTED ) ) + RETURN(E_NOT_POSTED); + + if ((c>=MIN_FORM_COMMAND && c<=MAX_FORM_COMMAND) && + ((bindings[c-MIN_FORM_COMMAND].keycode & Key_Mask) == c)) + BI = &(bindings[c-MIN_FORM_COMMAND]); + + if (BI) + { + typedef int (*Generic_Method)(int (* const)(FORM *),FORM *); + static const Generic_Method Generic_Methods[] = + { + Page_Navigation, /* overloaded to call field&form hooks */ + Inter_Field_Navigation, /* overloaded to call field hooks */ + NULL, /* Intra-Field is generic */ + Vertical_Scrolling, /* Overloaded to check multi-line */ + Horizontal_Scrolling, /* Overloaded to check single-line */ + Field_Editing, /* Overloaded to mark modification */ + NULL, /* Edit Mode is generic */ + NULL, /* Field Validation is generic */ + NULL /* Choice Request is generic */ + }; + size_t nMethods = (sizeof(Generic_Methods)/sizeof(Generic_Methods[0])); + size_t method = ((BI->keycode & ID_Mask) >> ID_Shft) & 0xffff; + + if ( (method >= nMethods) || !(BI->cmd) ) + res = E_SYSTEM_ERROR; + else + { + Generic_Method fct = Generic_Methods[method]; + if (fct) + res = fct(BI->cmd,form); + else + res = (BI->cmd)(form); + } + } + else + { + if (!(c & (~(int)MAX_REGULAR_CHARACTER)) && + isprint((unsigned char)c) && + Check_Char(form->current->type,c, + (TypeArgument *)(form->current->arg))) + res = Data_Entry(form,c); + } + _nc_Refresh_Current_Field(form); + RETURN(res); +} + +/*---------------------------------------------------------------------------- + Field-Buffer manipulation routines. + The effects of setting a buffer is tightly coupled to the core of the form + driver logic. This is especially true in the case of growable fields. + So I don't separate this into an own module. + --------------------------------------------------------------------------*/ + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_buffer(FIELD *field, +| int buffer, char *value) +| +| Description : Set the given buffer of the field to the given value. +| Buffer 0 stores the displayed content of the field. +| For dynamic fields this may grow the fieldbuffers if +| the length of the value exceeds the current buffer +| length. For buffer 0 only printable values are allowed. +| For static fields, the value needs not to be zero ter- +| minated. It is copied up to the length of the buffer. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid argument +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_field_buffer(FIELD * field, int buffer, const char * value) +{ + char *s, *p; + int res = E_OK; + unsigned int len; + + if ( !field || !value || ((buffer < 0)||(buffer > field->nbuf)) ) + RETURN(E_BAD_ARGUMENT); + + len = Buffer_Length(field); + + if (buffer==0) + { + const char *v; + unsigned int i = 0; + + for(v=value; *v && (i len) + { + if (!Field_Grown(field, + (int)(1 + (vlen-len)/((field->rows+field->nrow)*field->cols)))) + RETURN(E_SYSTEM_ERROR); + + /* in this case we also have to check, wether or not the remaining + characters in value are also printable for buffer 0. */ + if (buffer==0) + { + unsigned int i; + + for(i=len; i= (unsigned int)(s-p)); + if (len > (unsigned int)(s-p)) + memset(s,C_BLANK,len-(unsigned int)(s-p)); + } + + if (buffer==0) + { + int syncres; + if (((syncres=Synchronize_Field( field ))!=E_OK) && + (res==E_OK)) + res = syncres; + if (((syncres=Synchronize_Linked_Fields(field ))!=E_OK) && + (res==E_OK)) + res = syncres; + } + RETURN(res); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : char *field_buffer(const FIELD *field,int buffer) +| +| Description : Return the address of the buffer for the field. +| +| Return Values : Pointer to buffer or NULL if arguments were invalid. ++--------------------------------------------------------------------------*/ +char *field_buffer(const FIELD * field, int buffer) +{ + if (field && (buffer >= 0) && (buffer <= field->nbuf)) + return Address_Of_Nth_Buffer(field,buffer); + else + return (char *)0; +} + +/* frm_driver.c ends here */ diff --git a/Source/CursesDialog/form/frm_hook.c b/Source/CursesDialog/form/frm_hook.c new file mode 100644 index 000000000..1e236c1dd --- /dev/null +++ b/Source/CursesDialog/form/frm_hook.c @@ -0,0 +1,140 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_hook.c,v 1.1 2001-11-05 16:53:02 berk Exp $") + +/* "Template" macro to generate function to set application specific hook */ +#define GEN_HOOK_SET_FUNCTION( typ, name ) \ +int set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\ +{\ + (Normalize_Form( form ) -> typ ## name) = func ;\ + RETURN(E_OK);\ +} + +/* "Template" macro to generate function to get application specific hook */ +#define GEN_HOOK_GET_FUNCTION( typ, name ) \ +Form_Hook typ ## _ ## name ( const FORM *form )\ +{\ + return ( Normalize_Form( form ) -> typ ## name );\ +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_init(FORM *form, Form_Hook f) +| +| Description : Assigns an application defined initialization function +| to be called when the form is posted and just after +| the current field changes. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +GEN_HOOK_SET_FUNCTION(field,init) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Form_Hook field_init(const FORM *form) +| +| Description : Retrieve field initialization routine address. +| +| Return Values : The address or NULL if no hook defined. ++--------------------------------------------------------------------------*/ +GEN_HOOK_GET_FUNCTION(field,init) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_field_term(FORM *form, Form_Hook f) +| +| Description : Assigns an application defined finalization function +| to be called when the form is unposted and just before +| the current field changes. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +GEN_HOOK_SET_FUNCTION(field,term) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Form_Hook field_term(const FORM *form) +| +| Description : Retrieve field finalization routine address. +| +| Return Values : The address or NULL if no hook defined. ++--------------------------------------------------------------------------*/ +GEN_HOOK_GET_FUNCTION(field,term) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_init(FORM *form, Form_Hook f) +| +| Description : Assigns an application defined initialization function +| to be called when the form is posted and just after +| a page change. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +GEN_HOOK_SET_FUNCTION(form,init) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Form_Hook form_init(const FORM *form) +| +| Description : Retrieve form initialization routine address. +| +| Return Values : The address or NULL if no hook defined. ++--------------------------------------------------------------------------*/ +GEN_HOOK_GET_FUNCTION(form,init) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_term(FORM *form, Form_Hook f) +| +| Description : Assigns an application defined finalization function +| to be called when the form is unposted and just before +| a page change. +| +| Return Values : E_OK - success ++--------------------------------------------------------------------------*/ +GEN_HOOK_SET_FUNCTION(form,term) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Form_Hook form_term(const FORM *form) +| +| Description : Retrieve form finalization routine address. +| +| Return Values : The address or NULL if no hook defined. ++--------------------------------------------------------------------------*/ +GEN_HOOK_GET_FUNCTION(form,term) + +/* frm_hook.c ends here */ diff --git a/Source/CursesDialog/form/frm_opts.c b/Source/CursesDialog/form/frm_opts.c new file mode 100644 index 000000000..5f49ab087 --- /dev/null +++ b/Source/CursesDialog/form/frm_opts.c @@ -0,0 +1,116 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_opts.c,v 1.1 2001-11-05 16:53:02 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_opts(FORM *form, Form_Options opts) +| +| Description : Turns on the named options and turns off all the +| remaining options for that form. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid options ++--------------------------------------------------------------------------*/ +int set_form_opts(FORM * form, Form_Options opts) +{ + opts &= ALL_FORM_OPTS; + if (opts & ~ALL_FORM_OPTS) + RETURN(E_BAD_ARGUMENT); + else + { + Normalize_Form( form )->opts = opts; + RETURN(E_OK); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : Form_Options form_opts(const FORM *) +| +| Description : Retrieves the current form options. +| +| Return Values : The option flags. ++--------------------------------------------------------------------------*/ +Form_Options form_opts(const FORM * form) +{ + return (Normalize_Form(form)->opts & ALL_FORM_OPTS); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int form_opts_on(FORM *form, Form_Options opts) +| +| Description : Turns on the named options; no other options are +| changed. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid options ++--------------------------------------------------------------------------*/ +int form_opts_on(FORM * form, Form_Options opts) +{ + opts &= ALL_FORM_OPTS; + if (opts & ~ALL_FORM_OPTS) + RETURN(E_BAD_ARGUMENT); + else + { + Normalize_Form( form )->opts |= opts; + RETURN(E_OK); + } +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int form_opts_off(FORM *form, Form_Options opts) +| +| Description : Turns off the named options; no other options are +| changed. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid options ++--------------------------------------------------------------------------*/ +int form_opts_off(FORM * form, Form_Options opts) +{ + opts &= ALL_FORM_OPTS; + if (opts & ~ALL_FORM_OPTS) + RETURN(E_BAD_ARGUMENT); + else + { + Normalize_Form(form)->opts &= ~opts; + RETURN(E_OK); + } +} + +/* frm_opts.c ends here */ diff --git a/Source/CursesDialog/form/frm_page.c b/Source/CursesDialog/form/frm_page.c new file mode 100644 index 000000000..e1ed8d7e2 --- /dev/null +++ b/Source/CursesDialog/form/frm_page.c @@ -0,0 +1,100 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_page.c,v 1.1 2001-11-05 16:53:02 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_page(FORM * form,int page) +| +| Description : Set the page number of the form. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form pointer or page number +| E_BAD_STATE - called from a hook routine +| E_INVALID_FIELD - current field can't be left +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int set_form_page(FORM * form, int page) +{ + int err = E_OK; + + if ( !form || (page<0) || (page>=form->maxpage) ) + RETURN(E_BAD_ARGUMENT); + + if (!(form->status & _POSTED)) + { + form->curpage = page; + form->current = _nc_First_Active_Field(form); + } + else + { + if (form->status & _IN_DRIVER) + err = E_BAD_STATE; + else + { + if (form->curpage != page) + { + if (!_nc_Internal_Validation(form)) + err = E_INVALID_FIELD; + else + { + Call_Hook(form,fieldterm); + Call_Hook(form,formterm); + err = _nc_Set_Form_Page(form,page,(FIELD *)0); + Call_Hook(form,forminit); + Call_Hook(form,fieldinit); + _nc_Refresh_Current_Field(form); + } + } + } + } + RETURN(err); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int form_page(const FORM * form) +| +| Description : Return the current page of the form. +| +| Return Values : >= 0 : current page number +| -1 : invalid form pointer ++--------------------------------------------------------------------------*/ +int form_page(const FORM * form) +{ + return Normalize_Form(form)->curpage; +} + +/* frm_page.c ends here */ diff --git a/Source/CursesDialog/form/frm_post.c b/Source/CursesDialog/form/frm_post.c new file mode 100644 index 000000000..de0591916 --- /dev/null +++ b/Source/CursesDialog/form/frm_post.c @@ -0,0 +1,117 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ +#include "form.priv.h" + +MODULE_ID("$Id: frm_post.c,v 1.1 2001-11-05 16:53:03 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int post_form(FORM * form) +| +| Description : Writes the form into its associated subwindow. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form pointer +| E_POSTED - form already posted +| E_NOT_CONNECTED - no fields connected to form +| E_NO_ROOM - form doesn't fit into subwindow +| E_SYSTEM_ERROR - system error ++--------------------------------------------------------------------------*/ +int post_form(FORM * form) +{ + WINDOW *formwin; + int err; + int page; + + if (!form) + RETURN(E_BAD_ARGUMENT); + + if (form->status & _POSTED) + RETURN(E_POSTED); + + if (!(form->field)) + RETURN(E_NOT_CONNECTED); + + formwin = Get_Form_Window(form); + if ((form->cols > getmaxx(formwin)) || (form->rows > getmaxy(formwin))) + RETURN(E_NO_ROOM); + + /* reset form->curpage to an invald value. This forces Set_Form_Page + to do the page initialization which is required by post_form. + */ + page = form->curpage; + form->curpage = -1; + if ((err = _nc_Set_Form_Page(form,page,form->current))!=E_OK) + RETURN(err); + + form->status |= _POSTED; + + Call_Hook(form,forminit); + Call_Hook(form,fieldinit); + + _nc_Refresh_Current_Field(form); + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int unpost_form(FORM * form) +| +| Description : Erase form from its associated subwindow. +| +| Return Values : E_OK - success +| E_BAD_ARGUMENT - invalid form pointer +| E_NOT_POSTED - form isn't posted +| E_BAD_STATE - called from a hook routine ++--------------------------------------------------------------------------*/ +int unpost_form(FORM * form) +{ + if (!form) + RETURN(E_BAD_ARGUMENT); + + if (!(form->status & _POSTED)) + RETURN(E_NOT_POSTED); + + if (form->status & _IN_DRIVER) + RETURN(E_BAD_STATE); + + Call_Hook(form,fieldterm); + Call_Hook(form,formterm); + + werase(Get_Form_Window(form)); + delwin(form->w); + form->w = (WINDOW *)0; + form->status &= ~_POSTED; + RETURN(E_OK); +} + +/* frm_post.c ends here */ diff --git a/Source/CursesDialog/form/frm_req_name.c b/Source/CursesDialog/form/frm_req_name.c new file mode 100644 index 000000000..1abb18e91 --- /dev/null +++ b/Source/CursesDialog/form/frm_req_name.c @@ -0,0 +1,169 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +/*************************************************************************** +* Module form_request_name * +* Routines to handle external names of menu requests * +***************************************************************************/ + +#if defined(__hpux) + #define _XOPEN_SOURCE_EXTENDED +#endif +#include "form.priv.h" +#if defined(__hpux) + #undef _XOPEN_SOURCE_EXTENDED +#endif + +MODULE_ID("$Id: frm_req_name.c,v 1.7 2002-06-18 21:19:38 king Exp $") + +static const char *request_names[ MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1 ] = { + "NEXT_PAGE" , + "PREV_PAGE" , + "FIRST_PAGE" , + "LAST_PAGE" , + + "NEXT_FIELD" , + "PREV_FIELD" , + "FIRST_FIELD" , + "LAST_FIELD" , + "SNEXT_FIELD" , + "SPREV_FIELD" , + "SFIRST_FIELD" , + "SLAST_FIELD" , + "LEFT_FIELD" , + "RIGHT_FIELD" , + "UP_FIELD" , + "DOWN_FIELD" , + + "NEXT_CHAR" , + "PREV_CHAR" , + "NEXT_LINE" , + "PREV_LINE" , + "NEXT_WORD" , + "PREV_WORD" , + "BEG_FIELD" , + "END_FIELD" , + "BEG_LINE" , + "END_LINE" , + "LEFT_CHAR" , + "RIGHT_CHAR" , + "UP_CHAR" , + "DOWN_CHAR" , + + "NEW_LINE" , + "INS_CHAR" , + "INS_LINE" , + "DEL_CHAR" , + "DEL_PREV" , + "DEL_LINE" , + "DEL_WORD" , + "CLR_EOL" , + "CLR_EOF" , + "CLR_FIELD" , + "OVL_MODE" , + "INS_MODE" , + "SCR_FLINE" , + "SCR_BLINE" , + "SCR_FPAGE" , + "SCR_BPAGE" , + "SCR_FHPAGE" , + "SCR_BHPAGE" , + "SCR_FCHAR" , + "SCR_BCHAR" , + "SCR_HFLINE" , + "SCR_HBLINE" , + "SCR_HFHALF" , + "SCR_HBHALF" , + + "VALIDATION" , + "NEXT_CHOICE" , + "PREV_CHOICE" +}; +#define A_SIZE (sizeof(request_names)/sizeof(request_names[0])) + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : const char * form_request_name (int request); +| +| Description : Get the external name of a form request. +| +| Return Values : Pointer to name - on success +| NULL - on invalid request code ++--------------------------------------------------------------------------*/ +const char *form_request_name( int request ) +{ + if ( (request < MIN_FORM_COMMAND) || (request > MAX_FORM_COMMAND) ) + { + SET_ERROR (E_BAD_ARGUMENT); + return (const char *)0; + } + else + return request_names[ request - MIN_FORM_COMMAND ]; +} + + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int form_request_by_name (const char *str); +| +| Description : Search for a request with this name. +| +| Return Values : Request Id - on success +| E_NO_MATCH - request not found ++--------------------------------------------------------------------------*/ +int form_request_by_name( const char *str ) +{ + /* because the table is so small, it doesn't really hurt + to run sequentially through it. + */ + unsigned int i = 0; + char buf[16]; + + if (str) + { + strncpy(buf,str,sizeof(buf)); + while( (i 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_scale.c,v 1.1 2001-11-05 16:53:03 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int scale_form( const FORM *form, int *rows, int *cols ) +| +| Description : Retrieve size of form +| +| Return Values : E_OK - no error +| E_BAD_ARGUMENT - invalid form pointer +| E_NOT_CONNECTED - no fields connected to form ++--------------------------------------------------------------------------*/ +int scale_form(const FORM * form, int * rows, int * cols) +{ + if ( !form ) + RETURN(E_BAD_ARGUMENT); + + if ( !(form->field) ) + RETURN(E_NOT_CONNECTED); + + if (rows) + *rows = form->rows; + if (cols) + *cols = form->cols; + + RETURN(E_OK); +} + +/* frm_scale.c ends here */ diff --git a/Source/CursesDialog/form/frm_sub.c b/Source/CursesDialog/form/frm_sub.c new file mode 100644 index 000000000..e96ac09d2 --- /dev/null +++ b/Source/CursesDialog/form/frm_sub.c @@ -0,0 +1,69 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_sub.c,v 1.1 2001-11-05 16:53:03 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_sub(FORM *form, WINDOW *win) +| +| Description : Set the subwindow of the form to win. +| +| Return Values : E_OK - success +| E_POSTED - form is posted ++--------------------------------------------------------------------------*/ +int set_form_sub(FORM * form, WINDOW * win) +{ + if (form && (form->status & _POSTED)) + RETURN(E_POSTED); + + Normalize_Form( form )->sub = win; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : WINDOW *form_sub(const FORM *) +| +| Description : Retrieve the window of the form. +| +| Return Values : The pointer to the Subwindow. ++--------------------------------------------------------------------------*/ +WINDOW *form_sub(const FORM * form) +{ + const FORM* f = Normalize_Form( form ); + return Get_Form_Window(f); +} + +/* frm_sub.c ends here */ diff --git a/Source/CursesDialog/form/frm_user.c b/Source/CursesDialog/form/frm_user.c new file mode 100644 index 000000000..48481801b --- /dev/null +++ b/Source/CursesDialog/form/frm_user.c @@ -0,0 +1,67 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_user.c,v 1.1 2001-11-05 16:53:03 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_userptr(FORM *form, void *usrptr) +| +| Description : Set the pointer that is reserved in any form to store +| application relevant informations +| +| Return Values : E_OK - on success ++--------------------------------------------------------------------------*/ +int set_form_userptr(FORM * form, void *usrptr) +{ + Normalize_Form(form)->usrptr = usrptr; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : void *form_userptr(const FORM *form) +| +| Description : Return the pointer that is reserved in any form to +| store application relevant informations. +| +| Return Values : Value of pointer. If no such pointer has been set, +| NULL is returned ++--------------------------------------------------------------------------*/ +void *form_userptr(const FORM * form) +{ + return Normalize_Form(form)->usrptr; +} + +/* frm_user.c ends here */ diff --git a/Source/CursesDialog/form/frm_win.c b/Source/CursesDialog/form/frm_win.c new file mode 100644 index 000000000..423b3c7fa --- /dev/null +++ b/Source/CursesDialog/form/frm_win.c @@ -0,0 +1,70 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: frm_win.c,v 1.1 2001-11-05 16:53:04 berk Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : int set_form_win(FORM *form,WINDOW *win) +| +| Description : Set the window of the form to win. +| +| Return Values : E_OK - success +| E_POSTED - form is posted ++--------------------------------------------------------------------------*/ +int set_form_win(FORM * form, WINDOW * win) +{ + if (form && (form->status & _POSTED)) + RETURN(E_POSTED); + + Normalize_Form( form )->win = win; + RETURN(E_OK); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : WINDOW *form_win(const FORM *) +| +| Description : Retrieve the window of the form. +| +| Return Values : The pointer to the Window or stdscr if there is none. ++--------------------------------------------------------------------------*/ +WINDOW *form_win(const FORM * form) +{ + const FORM* f = Normalize_Form( form ); + return (f->win ? f->win : stdscr); +} + +/* frm_win.c ends here */ + diff --git a/Source/CursesDialog/form/fty_alnum.c b/Source/CursesDialog/form/fty_alnum.c new file mode 100644 index 000000000..9b6b5eaa4 --- /dev/null +++ b/Source/CursesDialog/form/fty_alnum.c @@ -0,0 +1,138 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_alnum.c,v 1.2 2002-06-18 21:19:38 king Exp $") + +typedef struct { + int width; +} alnumARG; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_AlphaNumeric_Type(va_list *ap) +| +| Description : Allocate structure for alphanumeric type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_AlphaNumeric_Type(va_list * ap) +{ + alnumARG *argp = (alnumARG *)malloc(sizeof(alnumARG)); + + if (argp) + argp->width = va_arg(*ap,int); + + return ((void *)argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_AlphaNumericType(const void *argp) +| +| Description : Copy structure for alphanumeric type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_AlphaNumeric_Type(const void *argp) +{ + const alnumARG *ap = (const alnumARG *)argp; + alnumARG *result = (alnumARG *)malloc(sizeof(alnumARG)); + + if (result) + *result = *ap; + + return ((void *)result); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_AlphaNumeric_Type(void *argp) +| +| Description : Free structure for alphanumeric type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_AlphaNumeric_Type(void * argp) +{ + if (argp) + free(argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_AlphaNumeric_Field( +| FIELD *field, +| const void *argp) +| +| Description : Validate buffer content to be a valid alphanumeric value +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_AlphaNumeric_Field(FIELD * field, const void * argp) +{ + int width = ((const alnumARG *)argp)->width; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + int l = -1; + unsigned char *s; + + while(*bp && *bp==' ') + bp++; + if (*bp) + { + s = bp; + while(*bp && isalnum(*bp)) + bp++; + l = (int)(bp-s); + while(*bp && *bp==' ') + bp++; + } + return ((*bp || (l < width)) ? FALSE : TRUE); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_AlphaNumeric_Character( +| int c, +| const void *argp ) +| +| Description : Check a character for the alphanumeric type. +| +| Return Values : TRUE - character is valid +| FALSE - character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_AlphaNumeric_Character(int c, const void * argp) +{ + argp=0; /* Silence unused parameter warning. */ + return (isalnum(c) ? TRUE : FALSE); +} + +static FIELDTYPE typeALNUM = { + _HAS_ARGS | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_AlphaNumeric_Type, + Copy_AlphaNumeric_Type, + Free_AlphaNumeric_Type, + Check_AlphaNumeric_Field, + Check_AlphaNumeric_Character, + NULL, + NULL +}; + +FIELDTYPE* TYPE_ALNUM = &typeALNUM; + +/* fty_alnum.c ends here */ diff --git a/Source/CursesDialog/form/fty_alpha.c b/Source/CursesDialog/form/fty_alpha.c new file mode 100644 index 000000000..a6bc9b1ae --- /dev/null +++ b/Source/CursesDialog/form/fty_alpha.c @@ -0,0 +1,139 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_alpha.c,v 1.2 2002-06-19 12:57:14 king Exp $") + +typedef struct { + int width; +} alphaARG; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_Alpha_Type(va_list *ap) +| +| Description : Allocate structure for alpha type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_Alpha_Type(va_list * ap) +{ + alphaARG *argp = (alphaARG *)malloc(sizeof(alphaARG)); + if (argp) + { + argp->width = va_arg(*ap,int); + } + return ((void *)argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_Alpha_Type(const void * argp) +| +| Description : Copy structure for alpha type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_Alpha_Type(const void * argp) +{ + const alphaARG *ap = (const alphaARG *)argp; + alphaARG *result = (alphaARG *)malloc(sizeof(alphaARG)); + + if (result) + { + *result = *ap; + } + return ((void *)result); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_Alpha_Type( void * argp ) +| +| Description : Free structure for alpha type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_Alpha_Type(void * argp) +{ + if (argp) + free(argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Alpha_Field( +| FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid alpha value +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Alpha_Field(FIELD * field, const void * argp) +{ + int width = ((const alphaARG *)argp)->width; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + int l = -1; + unsigned char *s; + + while(*bp && *bp==' ') + bp++; + if (*bp) + { + s = bp; + while(*bp && isalpha(*bp)) + bp++; + l = (int)(bp-s); + while(*bp && *bp==' ') + bp++; + } + return ((*bp || (l < width)) ? FALSE : TRUE); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Alpha_Character( +| int c, +| const void * argp) +| +| Description : Check a character for the alpha type. +| +| Return Values : TRUE - character is valid +| FALSE - character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Alpha_Character(int c, const void * argp) +{ + argp=0; /* Silence unused parameter warning. */ + return (isalpha(c) ? TRUE : FALSE); +} + +static FIELDTYPE typeALPHA = { + _HAS_ARGS | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_Alpha_Type, + Copy_Alpha_Type, + Free_Alpha_Type, + Check_Alpha_Field, + Check_Alpha_Character, + NULL, + NULL +}; + +FIELDTYPE* TYPE_ALPHA = &typeALPHA; + +/* fty_alpha.c ends here */ diff --git a/Source/CursesDialog/form/fty_enum.c b/Source/CursesDialog/form/fty_enum.c new file mode 100644 index 000000000..31b295242 --- /dev/null +++ b/Source/CursesDialog/form/fty_enum.c @@ -0,0 +1,295 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_enum.c,v 1.1 2001-11-05 16:53:04 berk Exp $") + +typedef struct { + char **kwds; + int count; + bool checkcase; + bool checkunique; +} enumARG; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_Enum_Type( va_list * ap ) +| +| Description : Allocate structure for enumeration type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_Enum_Type(va_list * ap) +{ + enumARG *argp = (enumARG *)malloc(sizeof(enumARG)); + + if (argp) + { + int cnt = 0; + char **kp = (char **)0; + int ccase, cunique; + + argp->kwds = va_arg(*ap,char **); + ccase = va_arg(*ap,int); + cunique = va_arg(*ap,int); + argp->checkcase = ccase ? TRUE : FALSE; + argp->checkunique = cunique ? TRUE : FALSE; + + kp = argp->kwds; + while( kp && (*kp++) ) cnt++; + argp->count = cnt; + } + return (void *)argp; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_Enum_Type( const void * argp ) +| +| Description : Copy structure for enumeration type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_Enum_Type(const void * argp) +{ + enumARG *result = (enumARG *)0; + + if (argp) + { + const enumARG *ap = (const enumARG *)argp; + + result = (enumARG *)malloc(sizeof(enumARG)); + if (result) + *result = *ap; + } + return (void *)result; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_Enum_Type( void * argp ) +| +| Description : Free structure for enumeration type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_Enum_Type(void * argp) +{ + if (argp) + free(argp); +} + +#define SKIP_SPACE(x) while(((*(x))!='\0') && (is_blank(*(x)))) (x)++ +#define NOMATCH 0 +#define PARTIAL 1 +#define EXACT 2 + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static int Compare(const unsigned char * s, +| const unsigned char * buf, +| bool ccase ) +| +| Description : Check wether or not the text in 'buf' matches the +| text in 's', at least partial. +| +| Return Values : NOMATCH - buffer doesn't match +| PARTIAL - buffer matches partially +| EXACT - buffer matches exactly ++--------------------------------------------------------------------------*/ +static int Compare(const unsigned char *s, const unsigned char *buf, + bool ccase) +{ + SKIP_SPACE(buf); /* Skip leading spaces in both texts */ + SKIP_SPACE(s); + + if (*buf=='\0') + { + return (((*s)!='\0') ? NOMATCH : EXACT); + } + else + { + if (ccase) + { + while(*s++ == *buf) + { + if (*buf++=='\0') return EXACT; + } + } + else + { + while(toupper(*s++)==toupper(*buf)) + { + if (*buf++=='\0') return EXACT; + } + } + } + /* At this location buf points to the first character where it no longer + matches with s. So if only blanks are following, we have a partial + match otherwise there is no match */ + SKIP_SPACE(buf); + if (*buf) + return NOMATCH; + + /* If it happens that the reference buffer is at its end, the partial + match is actually an exact match. */ + return ((s[-1]!='\0') ? PARTIAL : EXACT); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Enum_Field( +| FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid enumeration value +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Enum_Field(FIELD * field, const void * argp) +{ + char **kwds = ((const enumARG *)argp)->kwds; + bool ccase = ((const enumARG *)argp)->checkcase; + bool unique = ((const enumARG *)argp)->checkunique; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + char *s, *t, *p; + int res; + + while( kwds && (s=(*kwds++)) ) + { + if ((res=Compare((unsigned char *)s,bp,ccase))!=NOMATCH) + { + p=t=s; /* t is at least a partial match */ + if ((unique && res!=EXACT)) + { + while( kwds && (p = *kwds++) ) + { + if ((res=Compare((unsigned char *)p,bp,ccase))!=NOMATCH) + { + if (res==EXACT) + { + t = p; + break; + } + else + t = (char *)0; + } + } + } + if (t) + { + set_field_buffer(field,0,t); + return TRUE; + } + if (!p) + break; + } + } + return FALSE; +} + +static const char *dummy[] = { (char *)0 }; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Next_Enum(FIELD * field, +| const void * argp) +| +| Description : Check for the next enumeration value +| +| Return Values : TRUE - next value found and loaded +| FALSE - no next value loaded ++--------------------------------------------------------------------------*/ +static bool Next_Enum(FIELD * field, const void * argp) +{ + const enumARG *args = (const enumARG *)argp; + char **kwds = args->kwds; + bool ccase = args->checkcase; + int cnt = args->count; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + + if (kwds) { + while(cnt--) + { + if (Compare((unsigned char *)(*kwds++),bp,ccase)==EXACT) + break; + } + if (cnt<=0) + kwds = args->kwds; + if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT)) + { + set_field_buffer(field,0,*kwds); + return TRUE; + } + } + return FALSE; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Previous_Enum( +| FIELD * field, +| const void * argp) +| +| Description : Check for the previous enumeration value +| +| Return Values : TRUE - previous value found and loaded +| FALSE - no previous value loaded ++--------------------------------------------------------------------------*/ +static bool Previous_Enum(FIELD * field, const void * argp) +{ + const enumARG *args = (const enumARG *)argp; + int cnt = args->count; + char **kwds = &args->kwds[cnt-1]; + bool ccase = args->checkcase; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + + if (kwds) { + while(cnt--) + { + if (Compare((unsigned char *)(*kwds--),bp,ccase)==EXACT) + break; + } + + if (cnt<=0) + kwds = &args->kwds[args->count-1]; + + if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT)) + { + set_field_buffer(field,0,*kwds); + return TRUE; + } + } + return FALSE; +} + + +static FIELDTYPE typeENUM = { + _HAS_ARGS | _HAS_CHOICE | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_Enum_Type, + Copy_Enum_Type, + Free_Enum_Type, + Check_Enum_Field, + NULL, + Next_Enum, + Previous_Enum +}; + +FIELDTYPE* TYPE_ENUM = &typeENUM; + +/* fty_enum.c ends here */ diff --git a/Source/CursesDialog/form/fty_int.c b/Source/CursesDialog/form/fty_int.c new file mode 100644 index 000000000..11b1ac547 --- /dev/null +++ b/Source/CursesDialog/form/fty_int.c @@ -0,0 +1,161 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_int.c,v 1.2 2002-06-18 21:19:38 king Exp $") + +typedef struct { + int precision; + long low; + long high; +} integerARG; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_Integer_Type( va_list * ap ) +| +| Description : Allocate structure for integer type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_Integer_Type(va_list * ap) +{ + integerARG *argp = (integerARG *)malloc(sizeof(integerARG)); + + if (argp) + { + argp->precision = va_arg(*ap,int); + argp->low = va_arg(*ap,long); + argp->high = va_arg(*ap,long); + } + return (void *)argp; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_Integer_Type(const void * argp) +| +| Description : Copy structure for integer type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_Integer_Type(const void * argp) +{ + const integerARG *ap = (const integerARG *)argp; + integerARG *result = (integerARG *)0; + + if (argp) + { + result = (integerARG *)malloc(sizeof(integerARG)); + if (result) + *result = *ap; + } + return (void *)result; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_Integer_Type(void * argp) +| +| Description : Free structure for integer type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_Integer_Type(void * argp) +{ + if (argp) + free(argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Integer_Field( +| FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid integer value +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Integer_Field(FIELD * field, const void * argp) +{ + const integerARG *argi = (const integerARG *)argp; + long low = argi->low; + long high = argi->high; + int prec = argi->precision; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + char *s = (char *)bp; + long val; + char buf[100]; + + while( *bp && *bp==' ') bp++; + if (*bp) + { + if (*bp=='-') bp++; + while (*bp) + { + if (!isdigit(*bp)) break; + bp++; + } + while(*bp && *bp==' ') bp++; + if (*bp=='\0') + { + val = atol(s); + if (lowhigh) return FALSE; + } + sprintf(buf,"%.*ld",(prec>0?prec:0),val); + set_field_buffer(field,0,buf); + return TRUE; + } + } + return FALSE; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Integer_Character( +| int c, +| const void * argp) +| +| Description : Check a character for the integer type. +| +| Return Values : TRUE - character is valid +| FALSE - character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Integer_Character(int c, const void * argp) +{ + argp=0; /* Silence unused parameter warning. */ + return ((isdigit(c) || (c=='-')) ? TRUE : FALSE); +} + +static FIELDTYPE typeINTEGER = { + _HAS_ARGS | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_Integer_Type, + Copy_Integer_Type, + Free_Integer_Type, + Check_Integer_Field, + Check_Integer_Character, + NULL, + NULL +}; + +FIELDTYPE* TYPE_INTEGER = &typeINTEGER; + +/* fty_int.c ends here */ diff --git a/Source/CursesDialog/form/fty_ipv4.c b/Source/CursesDialog/form/fty_ipv4.c new file mode 100644 index 000000000..ddfc2b478 --- /dev/null +++ b/Source/CursesDialog/form/fty_ipv4.c @@ -0,0 +1,84 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Per Foreby, perf@efd.lth.se * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_ipv4.c,v 1.2 2002-06-18 21:19:38 king Exp $") + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_IPV4_Field( +| FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid IP number (Ver. 4) +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_IPV4_Field(FIELD * field, const void * argp) +{ + char *bp = field_buffer(field,0); + int num = 0, len; + unsigned int d1, d2, d3, d4; + + argp=0; /* Silence unused parameter warning. */ + + if(isdigit((int)(*bp))) /* Must start with digit */ + { + num = sscanf(bp, "%u.%u.%u.%u%n", &d1, &d2, &d3, &d4, &len); + if (num == 4) + { + bp += len; /* Make bp point to what sscanf() left */ + while (*bp && isspace((int)(*bp))) + bp++; /* Allow trailing whitespace */ + } + } + return ((num != 4 || *bp || d1 > 255 || d2 > 255 + || d3 > 255 || d4 > 255) ? FALSE : TRUE); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_IPV4_Character( +| int c, +| const void *argp ) +| +| Description : Check a character for unsigned type or period. +| +| Return Values : TRUE - character is valid +| FALSE - character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_IPV4_Character(int c, const void * argp) +{ + argp=0; /* Silence unused parameter warning. */ + return ((isdigit(c) || (c=='.')) ? TRUE : FALSE); +} + +static FIELDTYPE typeIPV4 = { + _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + NULL, + NULL, + NULL, + Check_IPV4_Field, + Check_IPV4_Character, + NULL, + NULL +}; + +FIELDTYPE* TYPE_IPV4 = &typeIPV4; + +/* fty_ipv4.c ends here */ diff --git a/Source/CursesDialog/form/fty_num.c b/Source/CursesDialog/form/fty_num.c new file mode 100644 index 000000000..0112e3a46 --- /dev/null +++ b/Source/CursesDialog/form/fty_num.c @@ -0,0 +1,192 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_num.c,v 1.3 2002-06-18 21:19:38 king Exp $") + +#if HAVE_LOCALE_H +#include +#endif + +typedef struct { + int precision; + double low; + double high; + struct lconv* L; +} numericARG; + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_Numeric_Type(va_list * ap) +| +| Description : Allocate structure for numeric type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_Numeric_Type(va_list * ap) +{ + numericARG *argn = (numericARG *)malloc(sizeof(numericARG)); + + if (argn) + { + argn->precision = va_arg(*ap,int); + argn->low = va_arg(*ap,double); + argn->high = va_arg(*ap,double); +#if HAVE_LOCALE_H + argn->L = localeconv(); +#else + argn->L = NULL; +#endif + } + return (void *)argn; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_Numeric_Type(const void * argp) +| +| Description : Copy structure for numeric type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_Numeric_Type(const void * argp) +{ + const numericARG *ap = (const numericARG *)argp; + numericARG *result = (numericARG *)0; + + if (argp) + { + result = (numericARG *)malloc(sizeof(numericARG)); + if (result) + *result = *ap; + } + return (void *)result; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_Numeric_Type(void * argp) +| +| Description : Free structure for numeric type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_Numeric_Type(void * argp) +{ + if (argp) + free(argp); +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Numeric_Field(FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid numeric value +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Numeric_Field(FIELD * field, const void * argp) +{ + const numericARG *argn = (const numericARG *)argp; + double low = argn->low; + double high = argn->high; + int prec = argn->precision; + unsigned char *bp = (unsigned char *)field_buffer(field,0); + char *s = (char *)bp; + double val = 0.0; + char buf[64]; + + while(*bp && *bp==' ') bp++; + if (*bp) + { + if (*bp=='-' || *bp=='+') + bp++; + while(*bp) + { + if (!isdigit(*bp)) break; + bp++; + } + if (*bp==( +#if HAVE_LOCALE_H + (L && L->decimal_point) ? *(L->decimal_point) : +#endif + '.')) + { + bp++; + while(*bp) + { + if (!isdigit(*bp)) break; + bp++; + } + } + while(*bp && *bp==' ') bp++; + if (*bp=='\0') + { + val = atof(s); + if (lowhigh) return FALSE; + } + sprintf(buf,"%.*f",(prec>0?prec:0),val); + set_field_buffer(field,0,buf); + return TRUE; + } + } + return FALSE; +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_Numeric_Character( +| int c, +| const void * argp) +| +| Description : Check a character for the numeric type. +| +| Return Values : TRUE - character is valid +| FALSE - character is invalid ++--------------------------------------------------------------------------*/ +static bool Check_Numeric_Character(int c, const void * argp) +{ + argp=0; /* Silence unused parameter warning. */ + return (isdigit(c) || + c == '+' || + c == '-' || + c == ( +#if HAVE_LOCALE_H + (L && L->decimal_point) ? *(L->decimal_point) : +#endif + '.') + ) ? TRUE : FALSE; +} + +static FIELDTYPE typeNUMERIC = { + _HAS_ARGS | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_Numeric_Type, + Copy_Numeric_Type, + Free_Numeric_Type, + Check_Numeric_Field, + Check_Numeric_Character, + NULL, + NULL +}; + +FIELDTYPE* TYPE_NUMERIC = &typeNUMERIC; + +/* fty_num.c ends here */ diff --git a/Source/CursesDialog/form/fty_regex.c b/Source/CursesDialog/form/fty_regex.c new file mode 100644 index 000000000..7d2143d70 --- /dev/null +++ b/Source/CursesDialog/form/fty_regex.c @@ -0,0 +1,264 @@ + +/* + * THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + * You may freely copy it for use as a template for your own field types. + * If you develop a field type that might be of general use, please send + * it back to the ncurses maintainers for inclusion in the next version. + */ +/*************************************************************************** +* * +* Author : Juergen Pfeifer, juergen.pfeifer@gmx.net * +* * +***************************************************************************/ + +#include "form.priv.h" + +MODULE_ID("$Id: fty_regex.c,v 1.2 2002-06-18 21:19:38 king Exp $") + +#if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */ +#include + +typedef struct +{ + regex_t *pRegExp; + unsigned long *refCount; +} RegExp_Arg; + +#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS +#undef RETURN +static int reg_errno; + +static char *RegEx_Init(char *instring) +{ + reg_errno = 0; + return instring; +} + +static char *RegEx_Error(int code) +{ + reg_errno = code; + return 0; +} + +#define INIT register char *sp = RegEx_Init(instring); +#define GETC() (*sp++) +#define PEEKC() (*sp) +#define UNGETC(c) (--sp) +#define RETURN(c) return(c) +#define ERROR(c) return RegEx_Error(c) + +#if HAVE_REGEXP_H_FUNCS +#include +#else +#include +#endif + +typedef struct +{ + char *compiled_expression; + unsigned long *refCount; +} RegExp_Arg; + +/* Maximum Length we allow for a compiled regular expression */ +#define MAX_RX_LEN (2048) +#define RX_INCREMENT (256) + +#endif + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Make_RegularExpression_Type(va_list * ap) +| +| Description : Allocate structure for regex type argument. +| +| Return Values : Pointer to argument structure or NULL on error ++--------------------------------------------------------------------------*/ +static void *Make_RegularExpression_Type(va_list * ap) +{ +#if HAVE_REGEX_H_FUNCS + char *rx = va_arg(*ap,char *); + RegExp_Arg *preg; + + preg = (RegExp_Arg*)malloc(sizeof(RegExp_Arg)); + if (preg) + { + if (((preg->pRegExp = (regex_t*)malloc(sizeof(regex_t))) != (regex_t*)0) + && !regcomp(preg->pRegExp,rx, + (REG_EXTENDED | REG_NOSUB | REG_NEWLINE) )) + { + preg->refCount = (unsigned long *)malloc(sizeof(unsigned long)); + *(preg->refCount) = 1; + } + else + { + if (preg->pRegExp) + free(preg->pRegExp); + free(preg); + preg = (RegExp_Arg*)0; + } + } + return((void *)preg); +#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS + char *rx = va_arg(*ap,char *); + RegExp_Arg *pArg; + + pArg = (RegExp_Arg *)malloc(sizeof(RegExp_Arg)); + + if (pArg) + { + int blen = RX_INCREMENT; + pArg->compiled_expression = NULL; + pArg->refCount = (unsigned long *)malloc(sizeof(unsigned long)); + *(pArg->refCount) = 1; + + do { + char *buf = (char *)malloc(blen); + if (buf) + { +#if HAVE_REGEXP_H_FUNCS + char *last_pos = compile (rx, buf, &buf[blen], '\0'); +#else /* HAVE_REGEXPR_H_FUNCS */ + char *last_pos = compile (rx, buf, &buf[blen]); +#endif + if (reg_errno) + { + free(buf); + if (reg_errno==50) + blen += RX_INCREMENT; + else + { + free(pArg); + pArg = NULL; + break; + } + } + else + { + pArg->compiled_expression = buf; + break; + } + } + } while( blen <= MAX_RX_LEN ); + } + if (pArg && !pArg->compiled_expression) + { + free(pArg); + pArg = NULL; + } + return (void *)pArg; +#else + ap=0; /* Silence unused parameter warning. */ + return 0; +#endif +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void *Copy_RegularExpression_Type( +| const void * argp) +| +| Description : Copy structure for regex type argument. +| +| Return Values : Pointer to argument structure or NULL on error. ++--------------------------------------------------------------------------*/ +static void *Copy_RegularExpression_Type(const void * argp) +{ +#if (HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS) + const RegExp_Arg *ap = (const RegExp_Arg *)argp; + const RegExp_Arg *result = (const RegExp_Arg *)0; + + if (ap) + { + *(ap->refCount) += 1; + result = ap; + } + return (void *)result; +#else + argp=0; /* Silence unused parameter warning. */ + return 0; +#endif +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static void Free_RegularExpression_Type(void * argp) +| +| Description : Free structure for regex type argument. +| +| Return Values : - ++--------------------------------------------------------------------------*/ +static void Free_RegularExpression_Type(void * argp) +{ +#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS + RegExp_Arg *ap = (RegExp_Arg *)argp; + if (ap) + { + if (--(*(ap->refCount)) == 0) + { +#if HAVE_REGEX_H_FUNCS + if (ap->pRegExp) + { + free(ap->refCount); + regfree(ap->pRegExp); + } +#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS + if (ap->compiled_expression) + { + free(ap->refCount); + free(ap->compiled_expression); + } +#endif + free(ap); + } + } +#else + argp=0; /* Silence unused parameter warning. */ +#endif +} + +/*--------------------------------------------------------------------------- +| Facility : libnform +| Function : static bool Check_RegularExpression_Field( +| FIELD * field, +| const void * argp) +| +| Description : Validate buffer content to be a valid regular expression +| +| Return Values : TRUE - field is valid +| FALSE - field is invalid ++--------------------------------------------------------------------------*/ +static bool Check_RegularExpression_Field(FIELD * field, const void * argp) +{ + bool match = FALSE; +#if HAVE_REGEX_H_FUNCS + const RegExp_Arg *ap = (const RegExp_Arg*)argp; + if (ap && ap->pRegExp) + match = (regexec(ap->pRegExp,field_buffer(field,0),0,NULL,0) ? FALSE:TRUE); +#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS + RegExp_Arg *ap = (RegExp_Arg *)argp; + if (ap && ap->compiled_expression) + match = (step(field_buffer(field,0),ap->compiled_expression) ? TRUE:FALSE); +#else + argp=0; /* Silence unused parameter warning. */ + field=0; /* Silence unused parameter warning. */ +#endif + return match; +} + +static FIELDTYPE typeREGEXP = { + _HAS_ARGS | _RESIDENT, + 1, /* this is mutable, so we can't be const */ + (FIELDTYPE *)0, + (FIELDTYPE *)0, + Make_RegularExpression_Type, + Copy_RegularExpression_Type, + Free_RegularExpression_Type, + Check_RegularExpression_Field, + NULL, + NULL, + NULL +}; + +FIELDTYPE* TYPE_REGEXP = &typeREGEXP; + +/* fty_regex.c ends here */ diff --git a/Source/CursesDialog/form/llib-lform b/Source/CursesDialog/form/llib-lform new file mode 100644 index 000000000..ac2ba436d --- /dev/null +++ b/Source/CursesDialog/form/llib-lform @@ -0,0 +1,694 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey 1996,1997 * + ****************************************************************************/ +/* LINTLIBRARY */ + +/* ./fld_arg.c */ + +#include "form.priv.h" + +#undef set_fieldtype_arg +int set_fieldtype_arg( + FIELDTYPE *typ, + void *(*const make_arg)( + va_list *p1), + void *(*const copy_arg)( + const void *p1), + void (*const free_arg)( + void *p1)) + { return(*(int *)0); } + +#undef field_arg +void *field_arg( + const FIELD *field) + { return(*(void **)0); } + +/* ./fld_attr.c */ + +#undef set_field_fore +int set_field_fore( + FIELD *field, + chtype attr) + { return(*(int *)0); } + +#undef field_fore +chtype field_fore( + const FIELD *field) + { return(*(chtype *)0); } + +#undef set_field_back +int set_field_back( + FIELD *field, + chtype attr) + { return(*(int *)0); } + +#undef field_back +chtype field_back( + const FIELD *field) + { return(*(chtype *)0); } + +/* ./fld_current.c */ + +#undef set_current_field +int set_current_field( + FORM *form, + FIELD *field) + { return(*(int *)0); } + +#undef current_field +FIELD *current_field( + const FORM *form) + { return(*(FIELD **)0); } + +#undef field_index +int field_index( + const FIELD *field) + { return(*(int *)0); } + +/* ./fld_def.c */ + +#undef _nc_Default_Field +FIELD *_nc_Default_Field; + +#undef _nc_Make_Argument +TypeArgument *_nc_Make_Argument( + const FIELDTYPE *typ, + va_list *ap, + int *err) + { return(*(TypeArgument **)0); } + +#undef _nc_Copy_Argument +TypeArgument *_nc_Copy_Argument( + const FIELDTYPE *typ, + const TypeArgument *argp, + int *err) + { return(*(TypeArgument **)0); } + +#undef _nc_Free_Argument +void _nc_Free_Argument( + const FIELDTYPE *typ, + TypeArgument *argp) + { /* void */ } + +#undef _nc_Copy_Type +bool _nc_Copy_Type( + FIELD *dst, + FIELD const *src) + { return(*(bool *)0); } + +#undef _nc_Free_Type +void _nc_Free_Type( + FIELD *field) + { /* void */ } + +#undef new_field +FIELD *new_field( + int rows, + int cols, + int frow, + int fcol, + int nrow, + int nbuf) + { return(*(FIELD **)0); } + +#undef free_field +int free_field( + FIELD *field) + { return(*(int *)0); } + +/* ./fld_dup.c */ + +#undef dup_field +FIELD *dup_field( + FIELD *field, + int frow, + int fcol) + { return(*(FIELD **)0); } + +/* ./fld_ftchoice.c */ + +#undef set_fieldtype_choice +int set_fieldtype_choice( + FIELDTYPE *typ, + bool (*const next_choice)( + FIELD *p1, + const void *p2), + bool (*const prev_choice)( + FIELD *p1, + const void *p2)) + { return(*(int *)0); } + +/* ./fld_ftlink.c */ + +#undef link_fieldtype +FIELDTYPE *link_fieldtype( + FIELDTYPE *type1, + FIELDTYPE *type2) + { return(*(FIELDTYPE **)0); } + +/* ./fld_info.c */ + +#undef field_info +int field_info( + const FIELD *field, + int *rows, + int *cols, + int *frow, + int *fcol, + int *nrow, + int *nbuf) + { return(*(int *)0); } + +#undef dynamic_field_info +int dynamic_field_info( + const FIELD *field, + int *drows, + int *dcols, + int *maxgrow) + { return(*(int *)0); } + +/* ./fld_just.c */ + +#undef set_field_just +int set_field_just( + FIELD *field, + int just) + { return(*(int *)0); } + +#undef field_just +int field_just( + const FIELD *field) + { return(*(int *)0); } + +/* ./fld_link.c */ + +#undef link_field +FIELD *link_field( + FIELD *field, + int frow, + int fcol) + { return(*(FIELD **)0); } + +/* ./fld_max.c */ + +#undef set_max_field +int set_max_field( + FIELD *field, + int maxgrow) + { return(*(int *)0); } + +/* ./fld_move.c */ + +#undef move_field +int move_field( + FIELD *field, + int frow, + int fcol) + { return(*(int *)0); } + +/* ./fld_newftyp.c */ + +#undef _nc_Default_FieldType +const FIELDTYPE *_nc_Default_FieldType = {0}; + +#undef new_fieldtype +FIELDTYPE *new_fieldtype( + bool (*const field_check)( + FIELD *p1, + const void *p2), + bool (*const char_check)( + int p1, + const void *p2)) + { return(*(FIELDTYPE **)0); } + +#undef free_fieldtype +int free_fieldtype( + FIELDTYPE *typ) + { return(*(int *)0); } + +/* ./fld_opts.c */ + +#undef set_field_opts +int set_field_opts( + FIELD *field, + Field_Options opts) + { return(*(int *)0); } + +#undef field_opts +Field_Options field_opts( + const FIELD *field) + { return(*(Field_Options *)0); } + +#undef field_opts_on +int field_opts_on( + FIELD *field, + Field_Options opts) + { return(*(int *)0); } + +#undef field_opts_off +int field_opts_off( + FIELD *field, + Field_Options opts) + { return(*(int *)0); } + +/* ./fld_pad.c */ + +#undef set_field_pad +int set_field_pad( + FIELD *field, + int ch) + { return(*(int *)0); } + +#undef field_pad +int field_pad( + const FIELD *field) + { return(*(int *)0); } + +/* ./fld_page.c */ + +#undef set_new_page +int set_new_page( + FIELD *field, + bool new_page_flag) + { return(*(int *)0); } + +#undef new_page +bool new_page( + const FIELD *field) + { return(*(bool *)0); } + +/* ./fld_stat.c */ + +#undef set_field_status +int set_field_status( + FIELD *field, + bool status) + { return(*(int *)0); } + +#undef field_status +bool field_status( + const FIELD *field) + { return(*(bool *)0); } + +/* ./fld_type.c */ + +#undef set_field_type +int set_field_type( + FIELD *field, + FIELDTYPE *type, + ...) + { return(*(int *)0); } + +#undef field_type +FIELDTYPE *field_type( + const FIELD *field) + { return(*(FIELDTYPE **)0); } + +/* ./fld_user.c */ + +#undef set_field_userptr +int set_field_userptr( + FIELD *field, + void *usrptr) + { return(*(int *)0); } + +#undef field_userptr +void *field_userptr( + const FIELD *field) + { return(*(void **)0); } + +/* ./frm_cursor.c */ + +#undef pos_form_cursor +int pos_form_cursor( + FORM *form) + { return(*(int *)0); } + +/* ./frm_data.c */ + +#undef data_behind +bool data_behind( + const FORM *form) + { return(*(bool *)0); } + +#undef data_ahead +bool data_ahead( + const FORM *form) + { return(*(bool *)0); } + +/* ./frm_def.c */ + +#undef _nc_Default_Form +FORM *_nc_Default_Form; + +#undef new_form +FORM *new_form( + FIELD **fields) + { return(*(FORM **)0); } + +#undef free_form +int free_form( + FORM *form) + { return(*(int *)0); } + +#undef set_form_fields +int set_form_fields( + FORM *form, + FIELD **fields) + { return(*(int *)0); } + +#undef form_fields +FIELD **form_fields( + const FORM *form) + { return(*(FIELD ***)0); } + +#undef field_count +int field_count( + const FORM *form) + { return(*(int *)0); } + +/* ./frm_driver.c */ + +#undef _nc_Position_Form_Cursor +int _nc_Position_Form_Cursor( + FORM *form) + { return(*(int *)0); } + +#undef _nc_Refresh_Current_Field +int _nc_Refresh_Current_Field( + FORM *form) + { return(*(int *)0); } + +#undef _nc_Synchronize_Attributes +int _nc_Synchronize_Attributes( + FIELD *field) + { return(*(int *)0); } + +#undef _nc_Synchronize_Options +int _nc_Synchronize_Options( + FIELD *field, + Field_Options newopts) + { return(*(int *)0); } + +#undef _nc_Set_Current_Field +int _nc_Set_Current_Field( + FORM *form, + FIELD *newfield) + { return(*(int *)0); } + +#undef _nc_Internal_Validation +bool _nc_Internal_Validation( + FORM *form) + { return(*(bool *)0); } + +#undef _nc_First_Active_Field +FIELD *_nc_First_Active_Field( + FORM *form) + { return(*(FIELD **)0); } + +#undef _nc_Set_Form_Page +int _nc_Set_Form_Page( + FORM *form, + int page, + FIELD *field) + { return(*(int *)0); } + +typedef struct { + int keycode; + int (*cmd)(FORM *); +} Binding_Info; + +#undef form_driver +int form_driver( + FORM *form, + int c) + { return(*(int *)0); } + +#undef set_field_buffer +int set_field_buffer( + FIELD *field, + int buffer, + const char *value) + { return(*(int *)0); } + +#undef field_buffer +char *field_buffer( + const FIELD *field, + int buffer) + { return(*(char **)0); } + +/* ./frm_hook.c */ + +#undef set_field_init +int set_field_init( + FORM *form, + Form_Hook func) + { return(*(int *)0); } + +#undef field_init +Form_Hook field_init( + const FORM *form) + { return(*(Form_Hook *)0); } + +#undef set_field_term +int set_field_term( + FORM *form, + Form_Hook func) + { return(*(int *)0); } + +#undef field_term +Form_Hook field_term( + const FORM *form) + { return(*(Form_Hook *)0); } + +#undef set_form_init +int set_form_init( + FORM *form, + Form_Hook func) + { return(*(int *)0); } + +#undef form_init +Form_Hook form_init( + const FORM *form) + { return(*(Form_Hook *)0); } + +#undef set_form_term +int set_form_term( + FORM *form, + Form_Hook func) + { return(*(int *)0); } + +#undef form_term +Form_Hook form_term( + const FORM *form) + { return(*(Form_Hook *)0); } + +/* ./frm_opts.c */ + +#undef set_form_opts +int set_form_opts( + FORM *form, + Form_Options opts) + { return(*(int *)0); } + +#undef form_opts +Form_Options form_opts( + const FORM *form) + { return(*(Form_Options *)0); } + +#undef form_opts_on +int form_opts_on( + FORM *form, + Form_Options opts) + { return(*(int *)0); } + +#undef form_opts_off +int form_opts_off( + FORM *form, + Form_Options opts) + { return(*(int *)0); } + +/* ./frm_page.c */ + +#undef set_form_page +int set_form_page( + FORM *form, + int page) + { return(*(int *)0); } + +#undef form_page +int form_page( + const FORM *form) + { return(*(int *)0); } + +/* ./frm_post.c */ + +#undef post_form +int post_form( + FORM *form) + { return(*(int *)0); } + +#undef unpost_form +int unpost_form( + FORM *form) + { return(*(int *)0); } + +/* ./frm_req_name.c */ + +#undef form_request_name +const char *form_request_name( + int request) + { return(*(const char **)0); } + +#undef form_request_by_name +int form_request_by_name( + const char *str) + { return(*(int *)0); } + +/* ./frm_scale.c */ + +#undef scale_form +int scale_form( + const FORM *form, + int *rows, + int *cols) + { return(*(int *)0); } + +/* ./frm_sub.c */ + +#undef set_form_sub +int set_form_sub( + FORM *form, + WINDOW *win) + { return(*(int *)0); } + +#undef form_sub +WINDOW *form_sub( + const FORM *form) + { return(*(WINDOW **)0); } + +/* ./frm_user.c */ + +#undef set_form_userptr +int set_form_userptr( + FORM *form, + void *usrptr) + { return(*(int *)0); } + +#undef form_userptr +void *form_userptr( + const FORM *form) + { return(*(void **)0); } + +/* ./frm_win.c */ + +#undef set_form_win +int set_form_win( + FORM *form, + WINDOW *win) + { return(*(int *)0); } + +#undef form_win +WINDOW *form_win( + const FORM *form) + { return(*(WINDOW **)0); } + +/* ./fty_alnum.c */ + +typedef struct { + int width; +} alnumARG; + +#undef TYPE_ALNUM +FIELDTYPE *TYPE_ALNUM; + +/* ./fty_alpha.c */ + +typedef struct { + int width; +} alphaARG; + +#undef TYPE_ALPHA +FIELDTYPE *TYPE_ALPHA; + +/* ./fty_enum.c */ + +typedef struct { + char **kwds; + int count; + bool checkcase; + bool checkunique; +} enumARG; + +#undef TYPE_ENUM +FIELDTYPE *TYPE_ENUM; + +/* ./fty_int.c */ + +typedef struct { + int precision; + long low; + long high; +} integerARG; + +#undef TYPE_INTEGER +FIELDTYPE *TYPE_INTEGER; + +/* ./fty_ipv4.c */ +#undef TYPE_IPV4 +FIELDTYPE *TYPE_IPV4; + +/* ./fty_num.c */ + +#include + +typedef struct { + int precision; + double low; + double high; + struct lconv* L; +} numericARG; + +#undef TYPE_NUMERIC +FIELDTYPE *TYPE_NUMERIC; + +/* ./fty_regex.c */ + +#include + +typedef struct +{ + regex_t *pRegExp; + unsigned long *refCount; +} RegExp_Arg; + +#undef TYPE_REGEXP +FIELDTYPE *TYPE_REGEXP; diff --git a/Source/CursesDialog/form/mf_common.h b/Source/CursesDialog/form/mf_common.h new file mode 100644 index 000000000..6b1e8feee --- /dev/null +++ b/Source/CursesDialog/form/mf_common.h @@ -0,0 +1,93 @@ +/**************************************************************************** + * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Juergen Pfeifer 1995,1997 * + ****************************************************************************/ + +/* Common internal header for menu and form library */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include + +#if DECL_ERRNO +extern int errno; +#endif + +/* in case of debug version we ignore the suppression of assertions */ +#ifdef TRACE +# ifdef NDEBUG +# undef NDEBUG +# endif +#endif + +#include + +#if USE_RCS_IDS +#define MODULE_ID(id) static const char Ident[] = id; +#else +#define MODULE_ID(id) /*nothing*/ +#endif + + +/* Maximum regular 8-bit character code */ +#define MAX_REGULAR_CHARACTER (0xff) + +#define SET_ERROR(code) (errno=(code)) +#define GET_ERROR() (errno) +#define RETURN(code) return( SET_ERROR(code) ) + +/* The few common values in the status fields for menus and forms */ +#define _POSTED (0x01) /* menu or form is posted */ +#define _IN_DRIVER (0x02) /* menu or form is processing hook routine */ + +/* Call object hook */ +#define Call_Hook( object, handler ) \ + if ( (object) && ((object)->handler) )\ + {\ + (object)->status |= _IN_DRIVER;\ + (object)->handler(object);\ + (object)->status &= ~_IN_DRIVER;\ + } + +#define INLINE + +#ifndef TRACE +# if CC_HAS_INLINE_FUNCS +# undef INLINE +# define INLINE inline +# endif +#endif diff --git a/Source/CursesDialog/form/nc_alloc.h b/Source/CursesDialog/form/nc_alloc.h new file mode 100644 index 000000000..85130811e --- /dev/null +++ b/Source/CursesDialog/form/nc_alloc.h @@ -0,0 +1,83 @@ +/**************************************************************************** + * Copyright (c) 1998 Free Software Foundation, Inc. * + * * + * 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, distribute with modifications, 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 ABOVE 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. * + * * + * Except as contained in this notice, the name(s) of the above copyright * + * holders shall not be used in advertising or otherwise to promote the * + * sale, use or other dealings in this Software without prior written * + * authorization. * + ****************************************************************************/ + +/**************************************************************************** + * Author: Thomas E. Dickey 1996,1997 * + ****************************************************************************/ +/* $Id: nc_alloc.h,v 1.2 2001-11-08 22:03:52 berk Exp $ */ + +#ifndef NC_ALLOC_included +#define NC_ALLOC_included 1 + +#if HAVE_LIBDMALLOC +#include /* Gray Watson's library */ +#else +#undef HAVE_LIBDMALLOC +#define HAVE_LIBDMALLOC 0 +#endif + +#if HAVE_LIBDBMALLOC +#include /* Conor Cahill's library */ +#else +#undef HAVE_LIBDBMALLOC +#define HAVE_LIBDBMALLOC 0 +#endif + +#ifndef NO_LEAKS +#define NO_LEAKS 0 +#endif + +#if HAVE_LIBDBMALLOC || HAVE_LIBDMALLOC || NO_LEAKS +#define HAVE_NC_FREEALL 1 +struct termtype; +extern void _nc_free_and_exit(int) GCC_NORETURN; +extern void _nc_free_tparm(void); +extern void _nc_leaks_dump_entry(void); +#define ExitProgram(code) _nc_free_and_exit(code) +#endif + +#ifndef HAVE_NC_FREEALL +#define HAVE_NC_FREEALL 0 +#endif + +#ifndef ExitProgram +#define ExitProgram(code) return code +#endif + +/* doalloc.c */ +extern void *_nc_doalloc(void *, size_t); +#if !HAVE_STRDUP +/* #define strdup _nc_strdup */ +extern char *_nc_strdup(const char *); +#endif + +#define typeMalloc(type,elts) (type *)malloc((elts)*sizeof(type)) +#define typeCalloc(type,elts) (type *)calloc((elts),sizeof(type)) +#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type)) + +#endif /* NC_ALLOC_included */ diff --git a/Source/FLTKDialog/CMakeLists.txt b/Source/FLTKDialog/CMakeLists.txt new file mode 100644 index 000000000..47eea5576 --- /dev/null +++ b/Source/FLTKDialog/CMakeLists.txt @@ -0,0 +1,20 @@ +FIND_PACKAGE(FLTK REQUIRED) + +SET(SRCS + CMakeSetupGUIImplementation.cxx + FLTKDialog.cxx + FLTKPropertyItemRow.cxx + FLTKPropertyList.cxx + ) + +SET(FLTK_GUI_Files_SRCS + CMakeSetupGUI.fl + ) + +INCLUDE_DIRECTORIES(${FLTK_INCLUDE_PATH}) + +FLTK_WRAP_UI(FLCMakeSetup ${FLTK_GUI_Files_SRCS}) + +ADD_EXECUTABLE(FLCMakeSetup ${SRCS} ${FLCMakeSetup_FLTK_UI_SRCS} ) +TARGET_LINK_LIBRARIES(FLCMakeSetup ${FLTK_LIBRARY} CMakeLib) + diff --git a/Source/FLTKDialog/CMakeSetupGUI.fl b/Source/FLTKDialog/CMakeSetupGUI.fl new file mode 100644 index 000000000..f13d6968a --- /dev/null +++ b/Source/FLTKDialog/CMakeSetupGUI.fl @@ -0,0 +1,116 @@ +# data file for the Fltk User Interface Designer (fluid) +version 1.0009 +header_name {.h} +code_name {.cxx} +gridx 5 +gridy 5 +snap 3 +class CMakeSetupGUI {open +} { + Function {CMakeSetupGUI()} {open + } { + Fl_Window dialogWindow { + label CMakeSetupDialog + callback {recentSourceDirectoriesBrowser->hide(); +recentBinaryDirectoriesBrowser->hide();} + xywh {646 144 562 373} resizable visible + } { + Fl_Input sourcePathTextInput { + label {Where is the source code: } + callback {SetSourcePath( sourcePathTextInput->value() );} + xywh {219 15 200 20} labelsize 11 when 8 textsize 11 + } + Fl_Button {} { + label {Browse...} + callback {BrowseForSourcePath();} + xywh {453 14 65 22} shortcut 0x80073 labelsize 11 + } + Fl_Input binaryPathTextInput { + label {Where do you want to build the binaries: } + callback {SetBinaryPath( binaryPathTextInput->value() );} + xywh {219 50 200 20} labelsize 11 when 8 textsize 11 + } + Fl_Button {} { + label {Browse...} + callback {BrowseForBinaryPath();} + xywh {453 49 65 22} shortcut 0x80062 labelsize 11 + } + Fl_Button m_CancelButton { + label Cancel + callback {ClickOnCancel();} + xywh {390 332 100 23} shortcut 0x80071 labelsize 11 + } + Fl_Button m_ConfigureButton { + label Configure + callback {ClickOnConfigure();} + xywh {105 332 100 23} shortcut 0x8006d labelsize 11 + } + Fl_Group {} { + xywh {25 80 515 222} box ENGRAVED_BOX labelsize 11 align 0 resizable + } { + Fl_Scroll cacheValuesScroll { + label {Cache Values} open + xywh {40 98 485 190} type BOTH_ALWAYS box DOWN_FRAME labelsize 11 align 5 when 1 resizable + } { + Fl_Pack propertyListPack { + xywh {40 99 485 185} resizable + } {} + } + } + Fl_Box {} { + label {Right click on cache entries for additional options} + xywh {160 305 275 25} labelsize 11 + } + Fl_Button {} { + label {@\#2>} + callback {ShowRecentSourceDirectories();} + xywh {420 15 22 21} labeltype SYMBOL_LABEL + } + Fl_Button {} { + label {@\#2>} + callback {ShowRecentBinaryDirectories();} + xywh {420 50 22 21} labeltype SYMBOL_LABEL + } + Fl_Browser recentSourceDirectoriesBrowser { + callback {SelectOneRecentSourceDirectory();} + xywh {15 35 535 115} type Hold box BORDER_BOX hide + } + Fl_Browser recentBinaryDirectoriesBrowser { + callback {SelectOneRecentBinaryDirectory();} + xywh {15 70 535 115} type Hold box BORDER_BOX hide + } + Fl_Button m_OKButton { + label OK + callback {ClickOnOK();} selected + xywh {250 332 100 23} shortcut 0x8006d labelsize 11 + } + } + } + Function {~CMakeSetupGUI()} {} {} + Function {Close(void)} {return_type {virtual void} + } {} + Function {BrowseForSourcePath(void)} {return_type {virtual void} + } {} + Function {BrowseForBinaryPath(void)} {return_type {virtual void} + } {} + Function {Show(void)} {return_type {virtual void} + } {} + Function {SetBinaryPath(const char *)} {return_type {virtual void} + } { } + Function {SetSourcePath(const char *)} {return_type {virtual void} + } { } + Function {ShowRecentBinaryDirectories(void)} {return_type {virtual void} + } {} + Function {ShowRecentSourceDirectories(void)} {return_type {virtual void} + } {} + Function {SelectOneRecentBinaryDirectory(void)} {return_type {virtual void} + } {} + Function {SelectOneRecentSourceDirectory(void)} {return_type {virtual void} + } {} + Function {ClickOnConfigure(void)} {return_type {virtual void} + } {} + Function {ClickOnOK(void)} {return_type {virtual void} + } {} + Function {ClickOnCancel(void)} {return_type {virtual void} + } {} +} diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx new file mode 100644 index 000000000..eeee809f4 --- /dev/null +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.cxx @@ -0,0 +1,844 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: CMakeSetupGUIImplementation.cxx,v $ + Language: C++ + Date: $Date: 2007-08-21 20:21:09 $ + Version: $Revision: 1.30 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "CMakeSetupGUIImplementation.h" +#include "FL/Fl_File_Chooser.H" +#include "FL/filename.H" +#include "FL/fl_ask.H" +#include "../cmCacheManager.h" +#include "../cmMakefile.h" +#include +#include "FLTKPropertyList.h" +#include "FLTKPropertyItemRow.h" +#include "FL/fl_draw.H" +#include "../cmake.h" + +void FLTKMessageCallback(const char* message, const char* title, bool& nomore, void*) +{ + std::string msg = message; + msg += "\nPress cancel to suppress any further messages."; + int choice = fl_choice( msg.c_str(), "Cancel","Ok",0); + if(choice==0) + { + nomore = true; + } +} + +/** + * Constructor + */ +CMakeSetupGUIImplementation +::CMakeSetupGUIImplementation():m_CacheEntriesList(this) +{ + m_CMakeInstance = new cmake; + cmSystemTools::SetErrorCallback(FLTKMessageCallback); + m_BuildPathChanged = false; +} + + + +/** + * Destructor + */ +CMakeSetupGUIImplementation +::~CMakeSetupGUIImplementation() +{ +} + + + + +/** + * Show the graphic interface + */ +void +CMakeSetupGUIImplementation +::Show( void ) +{ + dialogWindow->show(); +} + + + + + +/** + * Hide the graphic interface + */ +void +CMakeSetupGUIImplementation +::Close( void ) +{ + SaveRecentDirectories(); + dialogWindow->hide(); +} + + + + + +/** + * Browse for the path to the sources + */ +void +CMakeSetupGUIImplementation +::BrowseForSourcePath( void ) +{ + const char * path = + fl_dir_chooser( + "Path to Sources", + sourcePathTextInput->value() ); + + if( !path ) + { + return; + } + + SetSourcePath( path ); + +} + + + + +/** + * Browse for the path to the binaries + */ +void +CMakeSetupGUIImplementation +::BrowseForBinaryPath( void ) +{ + const char * path = + fl_dir_chooser( + "Path to Binaries", + binaryPathTextInput->value() ); + + if( !path ) + { + return; + } + + SetBinaryPath( path ); + +} + + + + + +/** + * Set path to executable. Used to get the path to CMake + */ +void +CMakeSetupGUIImplementation +::SetPathToExecutable( const char * path ) +{ + m_PathToExecutable = cmSystemTools::CollapseFullPath(path); + m_PathToExecutable = cmSystemTools::GetProgramPath(m_PathToExecutable.c_str()).c_str(); +#ifdef _WIN32 + m_PathToExecutable += "/cmake.exe"; +#else + m_PathToExecutable += "/cmake"; +#endif +} + + + +/** + * Set the source path + */ +void +CMakeSetupGUIImplementation +::SetSourcePath( const char * path ) +{ + + if( !path || strlen(path)==0 ) + { + fl_alert("Please select the path to the sources"); + return; + } + + std::string expandedAbsolutePath = ExpandPathAndMakeItAbsolute( path ); + + sourcePathTextInput->value( expandedAbsolutePath.c_str() ); + + if( VerifySourcePath( expandedAbsolutePath ) ) + { + m_WhereSource = expandedAbsolutePath; + } + +} + + + + +/** + * Expand environment variables in the path and make it absolute + */ +std::string +CMakeSetupGUIImplementation +::ExpandPathAndMakeItAbsolute( const std::string & inputPath ) const +{ + return cmSystemTools::CollapseFullPath(inputPath.c_str()); +} + + +/** + * Set the binary path + */ +void +CMakeSetupGUIImplementation +::SetBinaryPath( const char * path ) +{ + + if( !path || strlen(path)==0 ) + { + fl_alert("Please select the path to the binaries"); + return; + } + + std::string expandedAbsolutePath = ExpandPathAndMakeItAbsolute( path ); + + binaryPathTextInput->value( expandedAbsolutePath.c_str() ); + + if( !VerifyBinaryPath( expandedAbsolutePath.c_str() ) ) + { + return; + } + + if( m_WhereBuild != expandedAbsolutePath ) + { + m_BuildPathChanged = true; + m_WhereBuild = expandedAbsolutePath; + m_CacheEntriesList.RemoveAll(); // remove data from other project + this->LoadCacheFromDiskToGUI(); + } + else + { + m_BuildPathChanged = false; + } + + +} + + + +/** + * Verify the path to binaries + */ +bool +CMakeSetupGUIImplementation +::VerifyBinaryPath( const std::string & path ) const +{ + + bool pathIsOK = false; + + if( cmSystemTools::FileIsDirectory( path.c_str() ) ) + { + pathIsOK = true; + } + else + { + int userWantsToCreateDirectory = + fl_ask("The directory \n %s \n Doesn't exist. Do you want to create it ?", + path.c_str() ); + + if( userWantsToCreateDirectory ) + { + cmSystemTools::MakeDirectory( path.c_str() ); + pathIsOK = true; + } + else + { + pathIsOK = false; + } + } + + return pathIsOK; + +} + + + +/** + * Verify the path to sources + */ +bool +CMakeSetupGUIImplementation +::VerifySourcePath( const std::string & path ) const +{ + + if( !cmSystemTools::FileIsDirectory(( path.c_str()))) + { + fl_alert("The Source directory \n %s \n Doesn't exist or is not a directory", path.c_str() ); + return false; + } + + return true; +} + + + + +/** + * Build the project files + */ +void +CMakeSetupGUIImplementation +::RunCMake( bool generateProjectFiles ) +{ + + if(!cmSystemTools::FileIsDirectory( m_WhereBuild.c_str() )) + { + std::string message = + "Build directory does not exist, should I create it?\n\n" + "Directory: "; + message += m_WhereBuild; + int userWantToCreateDirectory = + fl_ask(message.c_str()); + if( userWantToCreateDirectory ) + { + cmSystemTools::MakeDirectory( m_WhereBuild.c_str() ); + } + else + { + fl_alert("Build Project aborted, nothing done."); + return; + } + } + + + // set the wait cursor + fl_cursor(FL_CURSOR_WAIT,FL_BLACK,FL_WHITE); + + + // save the current GUI values to the cache + this->SaveCacheFromGUI(); + + // Make sure we are working from the cache on disk + this->LoadCacheFromDiskToGUI(); + + UpdateListOfRecentDirectories(); + SaveRecentDirectories(); + if (generateProjectFiles) + { + if(m_CMakeInstance->Generate() != 0) + { + cmSystemTools::Error( + "Error in generation process, project files may be invalid"); + } + } + else + { + m_CMakeInstance->SetHomeDirectory(m_WhereSource.c_str()); + m_CMakeInstance->SetStartDirectory(m_WhereSource.c_str()); + m_CMakeInstance->SetHomeOutputDirectory(m_WhereBuild.c_str()); + m_CMakeInstance->SetStartOutputDirectory(m_WhereBuild.c_str()); + const char* defaultGenerator = 0; +#if defined(_WIN32) + defaultGenerator = "NMake Makefiles"; +#else defined(_WIN32) + defaultGenerator = "Unix Makefiles"; +#endif defined(_WIN32) + m_CMakeInstance->SetGlobalGenerator( + m_CMakeInstance->CreateGlobalGenerator(defaultGenerator)); + m_CMakeInstance->SetCMakeCommand(m_PathToExecutable.c_str()); + m_CMakeInstance->LoadCache(); + if(m_CMakeInstance->Configure() != 0) + { + cmSystemTools::Error( + "Error in configuration process, project files may be invalid"); + } + // update the GUI with any new values in the caused by the + // generation process + this->LoadCacheFromDiskToGUI(); + } + + // path is up-to-date now + m_BuildPathChanged = false; + + + // put the cursor back + fl_cursor(FL_CURSOR_DEFAULT,FL_BLACK,FL_WHITE); + fl_message("Done !"); + +} + + + + +/** + * Load Cache from disk to GUI + */ +void +CMakeSetupGUIImplementation +::LoadCacheFromDiskToGUI( void ) +{ + + + if( m_WhereBuild != "" ) + { + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + cachem->LoadCache( m_WhereBuild.c_str() ); + this->FillCacheGUIFromCacheManager(); + } +} + + +/** + * Save Cache from disk to GUI + */ +void +CMakeSetupGUIImplementation +::SaveCacheFromGUI( void ) +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + this->FillCacheManagerFromCacheGUI(); + if(m_WhereBuild != "") + { + cachem->SaveCache(m_WhereBuild.c_str()); + } +} + + +/** + * Fill Cache GUI from cache manager + */ +void +CMakeSetupGUIImplementation +::FillCacheGUIFromCacheManager( void ) +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + size_t size = m_CacheEntriesList.GetItems().size(); + bool reverseOrder = false; + // if there are already entries in the cache, then + // put the new ones in the top, so they show up first + if(size) + { + reverseOrder = true; + } + + // all the current values are not new any more + std::set items = m_CacheEntriesList.GetItems(); + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + fltk::PropertyItem* item = *i; + item->m_NewValue = false; + } + // Prepare to add rows to the FLTK scroll/pack + propertyListPack->clear(); + propertyListPack->begin(); + +// const cmCacheManager::CacheEntryMap &cache = +// cmCacheManager::GetInstance()->GetCacheMap(); +// if(cache.size() == 0) +// { +// m_OKButton->deactivate(); +// } +// else +// { +// m_OKButton->activate(); +// } + + + + + for(cmCacheManager::CacheIterator i = cachem->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + const char* key = i.GetName(); + std::string value = i.GetValue(); + bool advanced = i.GetPropertyAsBool("ADVANCED"); + switch(i.GetType() ) + { + case cmCacheManager::BOOL: + if(cmSystemTools::IsOn(value.c_str())) + { + m_CacheEntriesList.AddProperty(key, + "ON", + i.GetProperty("HELPSTRING"), + fltk::PropertyList::CHECKBOX,"", + reverseOrder); + } + else + { + m_CacheEntriesList.AddProperty(key, + "OFF", + i.GetProperty("HELPSTRING"), + fltk::PropertyList::CHECKBOX,"", + reverseOrder); + } + break; + case cmCacheManager::PATH: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + fltk::PropertyList::PATH,"", + reverseOrder); + break; + case cmCacheManager::FILEPATH: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + fltk::PropertyList::FILE,"", + reverseOrder); + break; + case cmCacheManager::STRING: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + fltk::PropertyList::EDIT,"", + reverseOrder); + break; + case cmCacheManager::STATIC: + case cmCacheManager::INTERNAL: + m_CacheEntriesList.RemoveProperty(key); + break; + } + } + + // Add the old entry to the end of the pack + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + fltk::PropertyItem* item = *i; + if( !(item->m_NewValue) ) + { + new fltk::PropertyItemRow( item ); // GUI of the old property row + } + } + + propertyListPack->end(); + propertyListPack->init_sizes(); + cacheValuesScroll->position( 0, 0 ); + + propertyListPack->redraw(); + + Fl::check(); + + this->UpdateData(false); + +} + + +/** + * UpdateData + */ +void +CMakeSetupGUIImplementation +::UpdateData( bool option ) +{ + dialogWindow->redraw(); + Fl::check(); +} + + + +/** + * Fill cache manager from Cache GUI + */ +void +CMakeSetupGUIImplementation +::FillCacheManagerFromCacheGUI( void ) +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + std::set items = m_CacheEntriesList.GetItems(); + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + fltk::PropertyItem* item = *i; + if ( it.Find((const char*)item->m_propName.c_str()) ) + { + it.SetValue(item->m_curValue.c_str()); + } + if( item->m_Dirty ) + { + m_CacheEntriesList.SetDirty(); + } + } +} + + + + +/** + * Load Recent Directories + */ +void +CMakeSetupGUIImplementation +::LoadRecentDirectories( void ) +{ + std::string home = getenv("HOME"); + std::string filename = home + "/.cmakerc"; + + std::ifstream input; + input.open(filename.c_str()); + + if( input.fail() ) + { + // probably the file doesn't exist + return; + } + + m_RecentBinaryDirectories.clear(); + m_RecentSourceDirectories.clear(); + + std::string key; + std::string onedirectory; + + while( !input.eof() ) + { + input >> key; + + if( input.eof() ) break; + + if( key == "MostRecentSource" ) + { + input >> onedirectory; + m_WhereSource = onedirectory; + sourcePathTextInput->value( m_WhereSource.c_str() ); + } else + if( key == "MostRecentBinary" ) + { + input >> onedirectory; + m_WhereBuild = onedirectory; + binaryPathTextInput->value( m_WhereBuild.c_str() ); + LoadCacheFromDiskToGUI(); + } else + if( key == "Binary" ) + { + input >> onedirectory; + // insert is only done if the directory doesn't exist + m_RecentBinaryDirectories.insert( onedirectory ); + recentBinaryDirectoriesBrowser->add( + (onedirectory.c_str()), + (void*)(onedirectory.c_str()) ); + } else + if( key == "Source" ) + { + input >> onedirectory; + // insert is only done if the directory doesn't exist + m_RecentSourceDirectories.insert( onedirectory ); + recentSourceDirectoriesBrowser->add( + (onedirectory.c_str()), + (void*)(onedirectory.c_str()) ); + } + + } + + input.close(); +} + + + +/** + * Save Recent Directories + */ +void +CMakeSetupGUIImplementation +::SaveRecentDirectories( void ) +{ + std::string home = getenv("HOME"); + + if( home.empty() ) + { + return; + } + + std::string filename = home + "/.cmakerc"; + + std::ofstream output; + output.open(filename.c_str()); + + output << "MostRecentBinary " << m_WhereBuild << std::endl; + output << "MostRecentSource " << m_WhereSource << std::endl; + + // Save Recent binary directories + std::set< std::string >::iterator bindir = + m_RecentBinaryDirectories.begin(); + + while( bindir != m_RecentBinaryDirectories.end() ) + { + output << "Binary " << *bindir << std::endl; + bindir++; + } + + + // Save Recent source directories + std::set< std::string >::iterator srcdir = + m_RecentSourceDirectories.begin(); + + while( srcdir != m_RecentSourceDirectories.end() ) + { + output << "Source " << *srcdir << std::endl; + srcdir++; + } + +} + + +/** + * Show Recent Binary Directories + */ +void +CMakeSetupGUIImplementation +::ShowRecentBinaryDirectories( void ) +{ + if( recentBinaryDirectoriesBrowser->size() ) + { + recentBinaryDirectoriesBrowser->Fl_Widget::show(); + } +} + + +/** + * Show Recent Source Directories + */ +void +CMakeSetupGUIImplementation +::ShowRecentSourceDirectories( void ) +{ + if( recentSourceDirectoriesBrowser->size() ) + { + recentSourceDirectoriesBrowser->Fl_Widget::show(); + } +} + + +/** + * Select one Recent Binary Directory + */ +void +CMakeSetupGUIImplementation +::SelectOneRecentBinaryDirectory( void ) +{ + const int selected = recentBinaryDirectoriesBrowser->value(); + if( selected == 0 ) + { + return; + } + + m_WhereBuild = static_cast( + recentBinaryDirectoriesBrowser->data( selected )); + binaryPathTextInput->value( m_WhereBuild.c_str() ); + recentBinaryDirectoriesBrowser->Fl_Widget::hide(); + m_CacheEntriesList.RemoveAll(); // remove data from other project + LoadCacheFromDiskToGUI(); +} + + +/** + * Select one Recent Source Directory + */ +void +CMakeSetupGUIImplementation +::SelectOneRecentSourceDirectory( void ) +{ + const int selected = recentSourceDirectoriesBrowser->value(); + if( selected == 0 ) + { + return; + } + m_WhereSource = static_cast< char * >( + recentSourceDirectoriesBrowser->data( selected )); + sourcePathTextInput->value( m_WhereSource.c_str() ); + recentSourceDirectoriesBrowser->Fl_Widget::hide(); +} + + + +/** + * Update List of Recent Directories + */ +void +CMakeSetupGUIImplementation +::UpdateListOfRecentDirectories( void ) +{ + + // Update Recent binary directories + // insert is only done if the directory doesn't exist + m_RecentBinaryDirectories.insert( m_WhereBuild ); + + // Update Recent source directories + // insert is only done if the directory doesn't exist + m_RecentSourceDirectories.insert( m_WhereSource ); + +} + + + + + +/** + * Clicked on Configure Button + */ +void +CMakeSetupGUIImplementation +::ClickOnConfigure( void ) +{ + this->RunCMake(false); +} + + + + +/** + * Clicked on OK Button + */ +void +CMakeSetupGUIImplementation +::ClickOnOK( void ) +{ + m_CacheEntriesList.ClearDirty(); + this->RunCMake(true); + this->Close(); +} + + + + +/** + * Clicked on Cancel Button + */ +void +CMakeSetupGUIImplementation +::ClickOnCancel( void ) +{ + if(m_CacheEntriesList.IsDirty()) + { + int userWantsExitEvenThoughOptionsHaveChanged = + fl_ask("You have changed options but not rebuilt, \n" + "are you sure you want to exit?"); + if( userWantsExitEvenThoughOptionsHaveChanged ) + { + this->Close(); + } + } + else + { + this->Close(); + } + +} + + + + + diff --git a/Source/FLTKDialog/CMakeSetupGUIImplementation.h b/Source/FLTKDialog/CMakeSetupGUIImplementation.h new file mode 100644 index 000000000..3a71ecc5c --- /dev/null +++ b/Source/FLTKDialog/CMakeSetupGUIImplementation.h @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: CMakeSetupGUIImplementation.h,v $ + Language: C++ + Date: $Date: 2005-09-23 21:47:32 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef CMakeSetupGUIImplementation_h +#define CMakeSetupGUIImplementation_h + +#include "CMakeSetupGUI.h" +#include "FLTKPropertyList.h" +#include + + +/** + * + * This class implements the virtual methods + * declared in the GUI interface + * + */ + +class cmake; + +class CMakeSetupGUIImplementation : public CMakeSetupGUI +{ + +public: + + CMakeSetupGUIImplementation(); + virtual ~CMakeSetupGUIImplementation(); + virtual void Close( void ); + virtual void Show( void ); + virtual void UpdateData( bool option ); + virtual void BrowseForBinaryPath( void ); + virtual void BrowseForSourcePath( void ); + virtual void SetBinaryPath( const char * path ); + virtual void SetSourcePath( const char * path ); + virtual void SaveCacheFromGUI( void ); + virtual void LoadCacheFromDiskToGUI( void ); + virtual void FillCacheGUIFromCacheManager( void ); + virtual void FillCacheManagerFromCacheGUI( void ); + virtual void SetPathToExecutable( const char * path ); + virtual void LoadRecentDirectories(void); + virtual void SaveRecentDirectories(void); + virtual void ShowRecentBinaryDirectories(void); + virtual void ShowRecentSourceDirectories(void); + virtual void SelectOneRecentSourceDirectory(void); + virtual void SelectOneRecentBinaryDirectory(void); + virtual void UpdateListOfRecentDirectories(void); + virtual void ClickOnConfigure(void); + virtual void ClickOnOK(void); + virtual void ClickOnCancel(void); + virtual void RunCMake( bool generateProjectFiles ); + cmake *GetCMakeInstance() {return m_CMakeInstance; } +private: + virtual bool VerifyBinaryPath( const std::string & path ) const; + virtual bool VerifySourcePath( const std::string & path ) const; + virtual std::string ExpandPathAndMakeItAbsolute( const std::string & inputPath ) const; + +private: + fltk::PropertyList m_CacheEntriesList; + std::string m_WhereBuild; + std::string m_WhereSource; + std::string m_PathToExecutable; + std::string m_GeneratorChoiceString; + bool m_BuildPathChanged; + + std::set< std::string > m_RecentBinaryDirectories; + std::set< std::string > m_RecentSourceDirectories; + cmake *m_CMakeInstance; +}; + + +#endif diff --git a/Source/FLTKDialog/FLTKDialog.cxx b/Source/FLTKDialog/FLTKDialog.cxx new file mode 100644 index 000000000..56bef6a0c --- /dev/null +++ b/Source/FLTKDialog/FLTKDialog.cxx @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: FLTKDialog.cxx,v $ + Language: C++ + Date: $Date: 2007-12-13 22:56:50 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "CMakeSetupGUIImplementation.h" +#include "FL/Fl.H" +#include "FL/fl_ask.H" + +#include "cmSystemTools.h" + +int main(int argc, char * argv[] ) +{ + cmSystemTools::FindExecutableDirectory(argv[0]); + + fl_message_font(FL_HELVETICA,11); + + CMakeSetupGUIImplementation * gui + = new CMakeSetupGUIImplementation; + + gui->SetPathToExecutable( argv[0] ); + gui->Show(); + gui->LoadRecentDirectories(); + gui->LoadCacheFromDiskToGUI(); + + Fl::run(); + + delete gui; + + return 0; + +} diff --git a/Source/FLTKDialog/FLTKDialog.dsp b/Source/FLTKDialog/FLTKDialog.dsp new file mode 100644 index 000000000..d912409f0 --- /dev/null +++ b/Source/FLTKDialog/FLTKDialog.dsp @@ -0,0 +1,116 @@ +# Microsoft Developer Studio Project File - Name="FLTKDialog" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=FLTKDialog - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "FLTKDialog.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "FLTKDialog.mak" CFG="FLTKDialog - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "FLTKDialog - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "FLTKDialog - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "FLTKDialog - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /W3 /GX /O2 /I "H:/usr/local/fltk" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 fltk.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 + +!ELSEIF "$(CFG)" == "FLTKDialog - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "FLTKDialog___Win32_Debug" +# PROP BASE Intermediate_Dir "FLTKDialog___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "FLTKDialog___Win32_Debug" +# PROP Intermediate_Dir "FLTKDialog___Win32_Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "H:/usr/local/fltk" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 fltk.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"H:/usr/local/fltk/lib/Debug" + +!ENDIF + +# Begin Target + +# Name "FLTKDialog - Win32 Release" +# Name "FLTKDialog - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\CMakeSetupGUI.cpp +# End Source File +# Begin Source File + +SOURCE=.\CMakeSetupGUIImplementation.cpp +# End Source File +# Begin Source File + +SOURCE=.\FLTKDialog.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\CMakeSetupGUI.h +# End Source File +# Begin Source File + +SOURCE=.\CMakeSetupGUIImplementation.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# End Target +# End Project diff --git a/Source/FLTKDialog/FLTKPropertyItemRow.cxx b/Source/FLTKDialog/FLTKPropertyItemRow.cxx new file mode 100644 index 000000000..f183e30a8 --- /dev/null +++ b/Source/FLTKDialog/FLTKPropertyItemRow.cxx @@ -0,0 +1,387 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: FLTKPropertyItemRow.cxx,v $ + Language: C++ + Date: $Date: 2007-08-21 20:21:09 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "FLTKPropertyItemRow.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../cmCacheManager.h" +#include "FLTKPropertyList.h" +#include "CMakeSetupGUIImplementation.h" +#include +#include "../cmake.h" +#include "../cmCacheManager.h" + +namespace fltk { + + + +CMakeSetupGUIImplementation * PropertyItemRow::m_CMakeSetup = 0; + + + + +PropertyItemRow +::PropertyItemRow( PropertyItem * pItem ):Fl_Tile(0,0,10,10,"") +{ + + m_PropertyItem = pItem; + m_ItemValue = new ItemValue; + + const unsigned int fontsize = 11; + const unsigned int nameWidth = 200; + const unsigned int textWidth = 1400; + const unsigned int checkWidth = textWidth; + const unsigned int browseWidth = 20; + const unsigned int firstColumn = 0; + + const unsigned int secondColumn = nameWidth; + + const unsigned int rowHeight = 20; + + size( nameWidth + textWidth , rowHeight ); + + // Make the parent Fl_Pack widget at least a row wide. + parent()->size( nameWidth + textWidth , rowHeight ); + + m_NameButton = new + Fl_Button( firstColumn, 0, nameWidth, rowHeight, + m_PropertyItem->m_propName.c_str() ); + + m_NameButton->align( FL_ALIGN_CLIP | FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); + m_NameButton->labelsize( fontsize ); + m_NameButton->box( FL_DOWN_BOX ); + m_NameButton->size( secondColumn, rowHeight ); + m_NameButton->callback( NameButtonCallback, (void *)m_PropertyItem ); + if( m_PropertyItem->m_NewValue ) + { + m_NameButton->color(FL_RED); + } + + switch( m_PropertyItem->m_nItemType ) + { + case PropertyList::COMBO: + { + break; + } + case PropertyList::EDIT: + { + + Fl_Input * input = new + Fl_Input( secondColumn, 0, textWidth ,rowHeight ,""); + input->value( m_PropertyItem->m_curValue.c_str() ); + input->textsize( fontsize ); + input->callback( InputTextCallback, (void *)m_PropertyItem ); + input->when( FL_WHEN_CHANGED ); + + break; + } + case PropertyList::COLOR: + { + Fl_Button * colorButton = new + Fl_Button( secondColumn, 0, textWidth ,rowHeight ,""); + colorButton->labelsize( fontsize ); + //colorButton->color(); + colorButton->callback( ColorSelectionCallback, (void *)m_PropertyItem ); + + break; + } + case PropertyList::FILE: + { + + Fl_Button * browseButton = new + Fl_Button( secondColumn, 0, browseWidth ,rowHeight ,"..."); + browseButton->labelsize( fontsize ); + + Fl_Input * input = new + Fl_Input( secondColumn+browseWidth, 0, textWidth ,rowHeight ,""); + input->value( m_PropertyItem->m_curValue.c_str() ); + input->textsize( fontsize ); + + m_ItemValue->m_InputText = input; + m_ItemValue->m_PropertyItem = m_PropertyItem; + + browseButton->callback( BrowsePathCallback, (void *)m_ItemValue ); + input->callback( InputTextCallback, m_PropertyItem ); + input->when( FL_WHEN_CHANGED ); + + break; + } + case PropertyList::CHECKBOX: + { + Fl_Button * button = new + Fl_Button( secondColumn, 0, checkWidth ,rowHeight ,""); + button->align( FL_ALIGN_INSIDE | FL_ALIGN_LEFT ); + button->callback( CheckButtonCallback, (void *)m_PropertyItem ); + + if( m_PropertyItem->m_curValue == "ON" ) + { + button->label(" ON "); + button->value(1); + } + else if( m_PropertyItem->m_curValue == "OFF" ) + { + button->label(" OFF "); + button->value(0); + } + button->type( FL_TOGGLE_BUTTON ); + button->labelsize( fontsize ); + break; + } + case PropertyList::PATH: + { + + Fl_Button * browseButton = new + Fl_Button( secondColumn, 0, browseWidth ,rowHeight ,"..."); + browseButton->labelsize( fontsize ); + + Fl_Input * input = new + Fl_Input( secondColumn+browseWidth, 0, textWidth ,rowHeight ,""); + input->value( m_PropertyItem->m_curValue.c_str() ); + input->textsize( fontsize ); + + m_ItemValue->m_InputText = input; + m_ItemValue->m_PropertyItem = m_PropertyItem; + + browseButton->callback( BrowsePathCallback, (void *)m_ItemValue ); + input->callback( InputTextCallback, (void *)m_PropertyItem ); + input->when( FL_WHEN_CHANGED ); + + break; + } + break; + default: + fl_alert("Unkown item type %d",m_PropertyItem->m_nItemType); + break; + } + + + end(); // Close the inclusion of widgets in the Tile object + +} + + + + + +PropertyItemRow::~PropertyItemRow( ) +{ + delete m_ItemValue; +} + + + +void PropertyItemRow +::SetCMakeSetupGUI( CMakeSetupGUIImplementation * cmakeSetup ) +{ + m_CMakeSetup = cmakeSetup; +} + + + +void +PropertyItemRow:: +NameButtonCallback( Fl_Widget * widget, void * data) +{ + Fl_Button * button = (Fl_Button *)widget; + PropertyItem * pItem = (PropertyItem *)data; + + static Fl_Menu_Button * popupMenu = 0; + if( !popupMenu ) + { + int lastMousePositionX = Fl::event_x(); + int lastMousePositionY = Fl::event_y(); + popupMenu = new Fl_Menu_Button(lastMousePositionX, + lastMousePositionY,100,200); + } + + popupMenu->type( Fl_Menu_Button::POPUP3 ); + popupMenu->add("Help|Remove|Properties..."); + popupMenu->popup(); + + typedef enum { + HELP=0, + REMOVE, + PROPERTIES + } MenuOptions; + + + switch( popupMenu->value() ) + { + case HELP: + fl_message( pItem->m_HelpString.c_str() ); + break; + case REMOVE: // Remove + { + const char * propertyName = pItem->m_propName.c_str(); + int answer = fl_ask( "Do you want to remove property %s", propertyName ); + if( answer == 1 ) + { + // Remove the entry from the cache + m_CMakeSetup->GetCMakeInstance()->GetCacheManager()->RemoveCacheEntry(propertyName); + // Get the parent: Fl_Tile that manages the whole row in the GUI + Fl_Group * parentGroup = dynamic_cast(button->parent()); + // Get the grandParent: Fl_Pack with the property list + Fl_Group * grandParentGroup = dynamic_cast( parentGroup->parent() ); + // Remove the row from the list + grandParentGroup->remove( *parentGroup ); + // Destroy the row + delete parentGroup; // Patricide... ? + // Redraw the list + grandParentGroup->redraw(); + FillCacheManagerFromCacheGUI(); + return; + } + break; + } + case PROPERTIES: // Properties + break; + } +} + + + +void +PropertyItemRow:: +FillCacheManagerFromCacheGUI( void ) +{ + if( m_CMakeSetup ) + { + m_CMakeSetup->FillCacheManagerFromCacheGUI(); + } +} + + + +void +PropertyItemRow:: +CheckButtonCallback( Fl_Widget * widget, void * data) +{ + Fl_Button * button = (Fl_Button *)widget; + PropertyItem * pItem = (PropertyItem *)data; + + int value = button->value(); + + if( value ) + { + button->label(" ON "); + pItem->m_curValue = "ON"; + } + else + { + button->label(" OFF "); + pItem->m_curValue = "OFF"; + } + + pItem->m_Dirty = true; + + button->redraw(); + + FillCacheManagerFromCacheGUI(); + +} + + + +void +PropertyItemRow:: +InputTextCallback( Fl_Widget * widget, void * data) +{ + Fl_Input * input = (Fl_Input *)widget; + PropertyItem * item = (PropertyItem *)data; + + item->m_curValue = input->value(); + + item->m_Dirty = true; + + FillCacheManagerFromCacheGUI(); + +} + + + +void +PropertyItemRow:: +ColorSelectionCallback( Fl_Widget * widget, void * data) +{ + Fl_Button * colorButton = (Fl_Button *)widget; + PropertyItem * propertyItem = (PropertyItem *)data; + + static Fl_Color colorIndex = FL_FREE_COLOR; + + unsigned char red = 0; + unsigned char blue = 0; + unsigned char green = 0; + fl_color_chooser("Please pick a color",red,green,blue); + char buffer[300]; + sprintf( buffer,"RGB(%d,%d,%d)", red, green, blue ); + propertyItem->m_curValue = buffer; + Fl::set_color( colorIndex, red, green, blue ); + colorButton->color( colorIndex ); + colorIndex = (Fl_Color)( colorIndex + 1 ); + if( colorIndex == FL_FREE_COLOR + FL_NUM_FREE_COLOR ) + { + fl_alert("Maximum number of free colors used, recycling..."); + colorIndex = FL_FREE_COLOR; + } + + propertyItem->m_Dirty = true; + + colorButton->redraw(); + + FillCacheManagerFromCacheGUI(); + +} + + + + + + +void +PropertyItemRow:: +BrowsePathCallback( Fl_Widget * widget, void * data) +{ + ItemValue * itemValue = (ItemValue *)data; + Fl_Input * inputText = itemValue->m_InputText; + PropertyItem * propertyItem = itemValue->m_PropertyItem; + + const char * newpath = + fl_file_chooser("Select a path","*", inputText->value() ); + + if( newpath ) + { + propertyItem->m_curValue = newpath; + inputText->value( newpath ); + } + + propertyItem->m_Dirty = true; + + FillCacheManagerFromCacheGUI(); + +} + + + + +} // end namespace fltk diff --git a/Source/FLTKDialog/FLTKPropertyItemRow.h b/Source/FLTKDialog/FLTKPropertyItemRow.h new file mode 100644 index 000000000..84446b8d3 --- /dev/null +++ b/Source/FLTKDialog/FLTKPropertyItemRow.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: FLTKPropertyItemRow.h,v $ + Language: C++ + Date: $Date: 2005-09-23 21:47:32 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef FLTKPropertyItemRow_h +#define FLTKPropertyItemRow_h + +#include "FLTKPropertyList.h" + +#include +#include +#include + + +class CMakeSetupGUIImplementation; + + +namespace fltk { + + +/** + + Class to manage a GUI row corresponding to a property + + */ +class PropertyItemRow : public Fl_Tile +{ + + // Helper class for passing data to callbacks + struct ItemValue + { + PropertyItem * m_PropertyItem; + Fl_Input * m_InputText; + }; + + + public: + + PropertyItemRow( PropertyItem *); + ~PropertyItemRow(); + + private: + + PropertyItem * m_PropertyItem; + ItemValue * m_ItemValue; + Fl_Button * m_NameButton; + + static CMakeSetupGUIImplementation * m_CMakeSetup; + + static void CheckButtonCallback( Fl_Widget *, void *); + static void NameButtonCallback( Fl_Widget *, void *); + static void InputTextCallback( Fl_Widget *, void *); + static void BrowsePathCallback( Fl_Widget *, void *); + static void ColorSelectionCallback( Fl_Widget * widget, void * data); + + + static void FillCacheManagerFromCacheGUI( void ); + + public: + + static void SetCMakeSetupGUI( CMakeSetupGUIImplementation * ); +}; + + +} // end namespace fltk + + +#endif + + diff --git a/Source/FLTKDialog/FLTKPropertyList.cxx b/Source/FLTKDialog/FLTKPropertyList.cxx new file mode 100644 index 000000000..59627bca9 --- /dev/null +++ b/Source/FLTKDialog/FLTKPropertyList.cxx @@ -0,0 +1,184 @@ +/*========================================================================= + + Program: Insight Segmentation & Registration Toolkit + Module: $RCSfile: FLTKPropertyList.cxx,v $ + Language: C++ + Date: $Date: 2007-08-21 20:21:09 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// FLTKPropertyList.cxx : implementation file +// + +#include "FLTKPropertyList.h" +#include "../cmCacheManager.h" +#include "FLTKPropertyItemRow.h" +#include "FL/filename.H" +#include "FL/Fl_File_Chooser.H" +#include "FL/Fl_Color_Chooser.H" +#include "FL/fl_ask.H" +#include "FL/Fl_Button.H" +#include "CMakeSetupGUIImplementation.h" + + +namespace fltk { + +///////////////////////////////////////////////////////////////////////////// +// PropertyList + +PropertyList::PropertyList( CMakeSetupGUIImplementation * cmakeSetup ) +{ + m_CMakeSetup = cmakeSetup; + PropertyItemRow::SetCMakeSetupGUI( cmakeSetup ); + m_Dirty = false; +} + + + +PropertyList::~PropertyList() +{ + for(std::set::iterator i = m_PropertyItems.begin(); + i != m_PropertyItems.end(); ++i) + { + delete *i; + } +} + + + + +int PropertyList::AddItem( std::string txt) +{ + int nIndex =0; + return nIndex; +} + + + +int PropertyList::AddPropItem(PropertyItem* pItem, bool reverseOrder) +{ + + int nIndex =0; + if(reverseOrder) + { + nIndex = 0; + } + else + { + nIndex = m_PropertyItems.size(); + } + + new PropertyItemRow( pItem ); // GUI of the new property row + + m_PropertyItems.insert(pItem); + + return nIndex; +} + + + +int PropertyList::AddProperty(const char* name, + const char* value, + const char* helpString, + int type, + const char* comboItems, + bool reverseOrder) +{ + + PropertyItem* pItem = 0; + for(int i =0; i < this->GetCount(); ++i) + { + PropertyItem* item = this->GetItem(i); + if(item->m_propName == name) + { + pItem = item; + if(pItem->m_curValue != value) + { + pItem->m_curValue = value; + pItem->m_HelpString = helpString; + Invalidate(); + } + return i; + } + } + // if it is not found, then create a new one + if(!pItem) + { + pItem = new PropertyItem(name, value, helpString, type, comboItems); + } + return this->AddPropItem(pItem,reverseOrder); +} + + +void PropertyList::RemoveProperty(const char* name) +{ + for(int i =0; i < this->GetCount(); ++i) + { + PropertyItem* pItem = (PropertyItem*) GetItemDataPtr(i); + if(pItem->m_propName == name) + { + m_PropertyItems.erase(pItem); + delete pItem; + return; + } + } +} + + + +void PropertyList::RemoveAll() +{ + int c = this->GetCount(); + for(int i =0; i < c; ++i) + { + PropertyItem* pItem = (PropertyItem*) GetItemDataPtr(0); +// cmCacheManager::GetInstance()->RemoveCacheEntry(pItem->m_propName.c_str()); + m_PropertyItems.erase(pItem); + delete pItem; + } + Invalidate(); +} + + + +PropertyItem * PropertyList::GetItemDataPtr(int index) +{ + std::set::iterator it = m_PropertyItems.begin(); + for(int i=0; it != m_PropertyItems.end() && i::iterator it = m_PropertyItems.begin(); + for(int i=0; it != m_PropertyItems.end() && i + + +class CMakeSetupGUIImplementation; + + +namespace fltk { + + +///////////////////////////////////////////////////////////////////////////// +//PropertyList Items +class PropertyItem +{ +// Attributes +public: + std::string m_HelpString; + std::string m_propName; + std::string m_curValue; + int m_nItemType; + std::string m_cmbItems; + bool m_Removed; + bool m_NewValue; + bool m_Dirty; +public: + PropertyItem( std::string propName, + std::string curValue, + std::string helpString, + int nItemType, + std::string cmbItems ) + { + m_HelpString = helpString; + m_propName = propName; + m_curValue = curValue; + m_nItemType = nItemType; + m_cmbItems = cmbItems; + m_Removed = false; + m_NewValue = true; + m_Dirty = false; + } +}; + + + + + +///////////////////////////////////////////////////////////////////////////// +// PropertyList window + +class PropertyList +{ +// Construction +public: + enum ItemType + { + COMBO = 0, + EDIT, + COLOR, + FONT, + FILE, + CHECKBOX, + PATH + }; + + PropertyList( CMakeSetupGUIImplementation * ); + +// Attributes +public: + +// Operations +public: + int AddItem( std::string txt ); + int AddProperty(const char* name, + const char* value, + const char* helpString, + int type, + const char* comboItems, + bool reverseOrder); + void RemoveProperty(const char* name); + std::set & GetItems() + { + return m_PropertyItems; + } + + void InvalidateList(void); + void Invalidate(void) + { + // fltk redraw(); + } + + int GetCount(void) const + { + return m_PropertyItems.size(); + } + void OnButton(void); + void OnHelp(void); + void RemoveAll(); + PropertyItem* GetItem(int index); + PropertyItem* GetItemDataPtr(int m_curSel); + + void ClearDirty(void) { m_Dirty = false; } + void SetDirty(void) { m_Dirty = true; } + bool IsDirty(void) const { return m_Dirty; } + +// Implementation +public: + virtual ~PropertyList(); + +protected: + + int AddPropItem(PropertyItem* pItem,bool reverseOrder); + + std::set m_PropertyItems; + + CMakeSetupGUIImplementation * m_CMakeSetup; + + bool m_Dirty; + +}; + + +} // end namespace fltk + +#endif diff --git a/Source/MFCDialog/.cvsignore b/Source/MFCDialog/.cvsignore new file mode 100644 index 000000000..329d484df --- /dev/null +++ b/Source/MFCDialog/.cvsignore @@ -0,0 +1 @@ +Debug diff --git a/Source/MFCDialog/CMakeCommandLineInfo.cpp b/Source/MFCDialog/CMakeCommandLineInfo.cpp new file mode 100644 index 000000000..15c5c811f --- /dev/null +++ b/Source/MFCDialog/CMakeCommandLineInfo.cpp @@ -0,0 +1,142 @@ +// CMakeCommandLineInfo.cpp : command line arguments +// + +#include "stdafx.h" +#include "CMakeCommandLineInfo.h" +#include "cmSystemTools.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +/////////////////////////////////////////////////////////////// +// CMakeCommandLineInfo + +CMakeCommandLineInfo::CMakeCommandLineInfo() +{ + this->m_WhereSource = _T(""); + this->m_WhereBuild = _T(""); + this->m_AdvancedValues = FALSE; + this->m_GeneratorChoiceString = _T(""); + this->m_LastUnknownParameter = _T(""); + + // Find the path to the CMakeSetup executable. + char fname[4096]; + ::GetModuleFileName(0, fname, 4096); + m_Argv0 = fname; + m_Argv.push_back(m_Argv0.c_str()); +} + +CMakeCommandLineInfo::~CMakeCommandLineInfo() +{ +} + +int CMakeCommandLineInfo::GetBoolValue(const CString& v) { + CString value = v; + value.MakeLower(); + if (value == "1" || + value == "on" || + value == "true" || + value == "yes") + { + return 1; + } + else if (value == "0" || + value == "off" || + value == "false" || + value == "no") + { + return -1; + } + return 0; +} + +/////////////////////////////////////////////////////////////// +// Parse param + +void CMakeCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast) +{ + // Construct the full name of the argument. + cmStdString param = lpszParam; + cmStdString value; + if(bFlag) + { + // Since bFlag is set, either a - or a / was removed from the + // parameter value. Assume it was a - unless the second character + // was a / which indicates a network path argument. + if(param.length() > 0 && param[0] == '/') + { + value = "/"; + } + else + { + value = "-"; + } + } + value += param; + + // Add the argument and reset the argv table in case strings were + // moved. + m_Arguments.push_back(value); + m_Argv.clear(); + m_Argv.push_back(m_Argv0.c_str()); + for(unsigned int i=0; i < m_Arguments.size(); ++i) + { + m_Argv.push_back(m_Arguments[i].c_str()); + } + + // Look for known flags. + if(!bFlag) + { + this->m_LastUnknownParameter = lpszParam; + } + else + { + CString sParam(lpszParam); + // Single letter valued flag like /B=value or /B:value + CString value; + if (sParam[1] == '=' || sParam[1] == ':') + { + value = sParam.Right(sParam.GetLength() - 2); + } + else + { + value = sParam.Right(sParam.GetLength()-1); + } + int res; + switch (sParam[0]) + { + case 'A': + res = CMakeCommandLineInfo::GetBoolValue(value); + if (res == 1) + { + this->m_AdvancedValues = TRUE; + } + else if (res == -1) + { + this->m_AdvancedValues = FALSE; + } + break; + case 'B': + { + std::string path = cmSystemTools::CollapseFullPath((const char*)value); + this->m_WhereBuild = path.c_str(); + break; + } + case 'G': + this->m_GeneratorChoiceString = value; + break; + case 'H': + { + std::string path = cmSystemTools::CollapseFullPath((const char*)value); + this->m_WhereSource = path.c_str(); + break; + } + } + } + + // Call the base class to ensure proper command line processing + CCommandLineInfo::ParseParam(lpszParam, bFlag, bLast); +} diff --git a/Source/MFCDialog/CMakeCommandLineInfo.h b/Source/MFCDialog/CMakeCommandLineInfo.h new file mode 100644 index 000000000..974a09f8f --- /dev/null +++ b/Source/MFCDialog/CMakeCommandLineInfo.h @@ -0,0 +1,70 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeCommandLineInfo.h,v $ + Language: C++ + Date: $Date: 2003-07-23 21:31:25 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// CMakeCommandLineInfo.h : main header file for the command line arguments +// + +#if !defined(CMAKECOMMANDLINEINFO_H) +#define CMAKECOMMANDLINEINFO_H + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ +#error include 'stdafx.h' before including this file for PCH +#endif + +#include "../cmStandardIncludes.h" + +/////////////////////////////////////////////////////////////// +// CMakeCommandLineInfo: +// See CMakeCommandLineInfo.cpp for the implementation of this class +// + +class CMakeCommandLineInfo : public CCommandLineInfo +{ + // Construction +public: + CMakeCommandLineInfo(); + + // Attributes +public: + CString m_WhereSource; + CString m_WhereBuild; + BOOL m_AdvancedValues; + CString m_GeneratorChoiceString; + CString m_LastUnknownParameter; + + int GetArgC() { return static_cast(m_Argv.size()); } + const char*const* GetArgV() { return &*m_Argv.begin(); } + + std::string m_Argv0; + std::vector m_Arguments; + std::vector m_Argv; + + // Operations +public: + void ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast); + + // Implementation +public: + virtual ~CMakeCommandLineInfo(); +protected: + static int GetBoolValue(const CString&); +}; + +#endif // !defined(CMAKECOMMANDLINEINFO_H) diff --git a/Source/MFCDialog/CMakeGenDialog.cpp b/Source/MFCDialog/CMakeGenDialog.cpp new file mode 100755 index 000000000..e1769b6aa --- /dev/null +++ b/Source/MFCDialog/CMakeGenDialog.cpp @@ -0,0 +1,122 @@ +// CMakeGenDialog.cpp : implementation file +// + +#include "stdafx.h" +#include "CMakeSetup.h" +#include "CMakeGenDialog.h" +#include "../cmake.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CCMakeGenDialog dialog + + +CCMakeGenDialog::CCMakeGenDialog(CWnd* pParent /*=NULL*/) + : CDialog(CCMakeGenDialog::IDD, pParent) +{ + //{{AFX_DATA_INIT(CCMakeGenDialog) + //}}AFX_DATA_INIT +} + + +void CCMakeGenDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CCMakeGenDialog) + DDX_Control(pDX, IDC_BuildForLabel, m_BuildForLabel); + DDX_Control(pDX, IDC_Generator, m_GeneratorChoice); + DDX_CBStringExact(pDX, IDC_Generator, m_GeneratorChoiceString); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CCMakeGenDialog, CDialog) + //{{AFX_MSG_MAP(CCMakeGenDialog) + // NOTE: the ClassWizard will add message map macros here + ON_CBN_EDITCHANGE(IDC_Generator, OnEditchangeGenerator) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CCMakeGenDialog message handler + + void CCMakeGenDialog::OnEditchangeGenerator() +{ + // TODO: Add your control notification handler code here + +} + + +BOOL CCMakeGenDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + std::vector names; + this->m_CMakeInstance->GetRegisteredGenerators(names); + for(std::vector::iterator i = names.begin(); + i != names.end(); ++i) + { + m_GeneratorChoice.AddString(i->c_str()); + } + + // we want to pick the best generator for their system first we check to + // see if they have run cmake before, if so we use that generator + std::string mp; + bool done = false; + + // is the last generator set? If so use it + mp = "[HKEY_CURRENT_USER\\Software\\Kitware" + "\\CMakeSetup\\Settings\\StartPath;LastGenerator]"; + cmSystemTools::ExpandRegistryValues(mp); + if(mp != "/registry") + { + m_GeneratorChoiceString = mp.c_str(); + done = true; + } + struct regToGen + { + const char* Registry; + const char* GeneratorName; + }; + regToGen installedGenerators[] = { + // VS 9 + { "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft" + "\\VisualStudio\\9.0\\Setup;Dbghelp_path]", "Visual Studio 9 2008"}, + // VS 8 + { "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft" + "\\VisualStudio\\8.0\\Setup;Dbghelp_path]", "Visual Studio 8 2005"}, + // VS 7.1 + {"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft" + "\\VisualStudio\\7.1;InstallDir]", "Visual Studio 7 .NET 2003"}, + // VS 7 + {"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft" + "\\VisualStudio\\7.0;InstallDir]", "Visual Studio 7"}, + {0,0} + }; + for(regToGen* ptr = installedGenerators; ptr->Registry != 0 && !done; ptr++) + { + mp = ptr->Registry; + cmSystemTools::ExpandRegistryValues(mp); + if(mp != "/registry") + { + m_GeneratorChoiceString = ptr->GeneratorName; + done = true; + } + } + + // if still not done just guess on VS 6 + if (!done) + { + m_GeneratorChoiceString = "Visual Studio 6"; + } + + this->UpdateData(FALSE); + + return TRUE; // return TRUE unless you set the focus to a control +} + + diff --git a/Source/MFCDialog/CMakeGenDialog.h b/Source/MFCDialog/CMakeGenDialog.h new file mode 100755 index 000000000..e7e4a8b84 --- /dev/null +++ b/Source/MFCDialog/CMakeGenDialog.h @@ -0,0 +1,70 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeGenDialog.h,v $ + Language: C++ + Date: $Date: 2005-03-28 18:23:07 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#if !defined(CMAKE_GEN_DIALOG_INCLUDED) +#define CMAKE_GEN_DIALOG_INCLUDED + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// CMakeGenDialog.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CCMakeGenDialog dialog + +class cmake; + +class CCMakeGenDialog : public CDialog +{ +// Construction +public: + CCMakeGenDialog(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CCMakeGenDialog) + enum { IDD = IDD_GEN_DIALOG }; + CStatic m_BuildForLabel; + CComboBox m_GeneratorChoice; + CString m_GeneratorChoiceString; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CCMakeGenDialog) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CCMakeGenDialog) + virtual BOOL OnInitDialog(); + afx_msg void OnEditchangeGenerator(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + public: + cmake *m_CMakeInstance; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif diff --git a/Source/MFCDialog/CMakeLists.txt b/Source/MFCDialog/CMakeLists.txt new file mode 100644 index 000000000..3b1f3b948 --- /dev/null +++ b/Source/MFCDialog/CMakeLists.txt @@ -0,0 +1,109 @@ +SET( SRCS + CMakeSetup.h + CMakeSetup.cpp + MakeHelp.h + MakeHelp.cpp + CMakeGenDialog.h + CMakeGenDialog.cpp + CMakeSetup.rc + CMakeSetupDialog.h + CMakeSetupDialog.cpp + PathDialog.h + PathDialog.cpp + PropertyList.cpp + StdAfx.h + StdAfx.cpp + resource.h + CMakeCommandLineInfo.cpp +) + +# add stuff to use MFC in this executable +ADD_DEFINITIONS(-D_AFXDLL) + +# Use of CMAKE_MFC_FLAG +# Values: +# 0: Use Standard Windows Libraries +# 1: Use MFC in a Static Library +# 2: Use MFC in a Shared DLL +SET(CMAKE_MFC_FLAG 2) + +ADD_EXECUTABLE(CMakeSetup WIN32 ${SRCS}) +TARGET_LINK_LIBRARIES(CMakeSetup CMakeLib) +ADD_DEPENDENCIES(CMakeSetup cmake) + + +# some older versions of cmake do not have +# a patch version set so we need to set it +# so that a later if will not fail, this has +# to be done all the time for all generators +# since if statements are evaluated even if +# inside a false if, they must still parse so for +# if (CMAKE_PATCH_VERSION GREATER 4) not to +# fail CMAKE_PATCH_VERSION must be set +IF(${CMAKE_MAJOR_VERSION} LESS 3) + IF(NOT DEFINED CMAKE_PATCH_VERSION) + SET(CMAKE_PATCH_VERSION 0) + ENDIF(NOT DEFINED CMAKE_PATCH_VERSION) +ENDIF(${CMAKE_MAJOR_VERSION} LESS 3) + +# for MSVC greater than 71 assume mt is around +# for other versions allow for the cache to be +# seeded with a value for CMAKE_MT_EXECUTABLE +# this allows for MSVC71 to build CMakeSetup that +# will have the manifest stuff for windows vista +IF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71) + SET(CMAKE_MT_EXECUTABLE mt) +ENDIF(MSVC AND NOT MSVC60 AND NOT MSVC70 AND NOT MSVC71) +IF(CMAKE_MT_EXECUTABLE) + SET(exe "${CMAKE_CFG_INTDIR}/CMakeSetup.exe") + IF(EXECUTABLE_OUTPUT_PATH) + SET(exe "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/CMakeSetup.exe") + ENDIF(EXECUTABLE_OUTPUT_PATH) + + # VERBATIM flag should be avoided if building with Visual Studio. + # (OK to add the flag if ${CMAKE_CFG_INTDIR} is "." which is one + # indicator that you are not building with Visual Studio.) + # + SET(verbatim_flag) + IF(NOT CMAKE_CONFIGURATION_TYPES) + # VERBATIM flag should also be avoided if using an older CMake. + # VERBATIM flag support was added in CMake 2.4.5 + # + IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4) + IF(${CMAKE_PATCH_VERSION} GREATER 4) + SET(verbatim_flag "VERBATIM") + ENDIF(${CMAKE_PATCH_VERSION} GREATER 4) + ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 2.4) + + IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + SET(verbatim_flag "VERBATIM") + ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + + IF(NOT verbatim_flag) + MESSAGE("${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): warning + warning: The VERBATIM flag for ADD_CUSTOM_COMMAND may be required to execute mt correctly, + but you are using a CMake ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} which does not parse the VERBATIM flag. + Upgrade to CMake 2.4.5 or later to eliminate this warning.") + ENDIF(NOT verbatim_flag) + ENDIF(NOT CMAKE_CONFIGURATION_TYPES) + + SET(_CMAKE_INPUT_RESOURCE "-inputresource:${exe};#1") + # if msvc71 then you can not replace the resource + # but you can add one, so set the input resource to empty + IF(MSVC71) + SET(_CMAKE_INPUT_RESOURCE ) + ENDIF(MSVC71) + # Solve the "things named like *Setup prompt for admin privileges + # on Vista" problem by merging a manifest fragment that contains a + # requestedExecutionLevel element: + # + ADD_CUSTOM_COMMAND(TARGET CMakeSetup + POST_BUILD COMMAND mt + "${_CMAKE_INPUT_RESOURCE}" + -manifest "${CMAKE_CURRENT_SOURCE_DIR}/CMakeSetupManifest.xml" + "-outputresource:${exe};#1" + ${verbatim_flag} + ) +ENDIF(CMAKE_MT_EXECUTABLE) + +INSTALL_TARGETS(/bin CMakeSetup) diff --git a/Source/MFCDialog/CMakeSetup.cpp b/Source/MFCDialog/CMakeSetup.cpp new file mode 100644 index 000000000..8d318a6bf --- /dev/null +++ b/Source/MFCDialog/CMakeSetup.cpp @@ -0,0 +1,158 @@ +// CMakeSetupdialog.cpp : Defines the class behaviors for the application. +// + +#include "stdafx.h" +#include "CMakeSetup.h" +#include "CMakeSetupDialog.h" +#include "CMakeCommandLineInfo.h" +#include "../cmDocumentation.h" +#include "../cmake.h" +#include "../cmSystemTools.h" + + +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " CMakeSetup - CMake Windows GUI.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " CMakeSetup [options]\n" + " CMakeSetup [options] \n" + " CMakeSetup [options] ", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"CMakeSetup\" executable is the CMake Windows GUI. Project " + "configuration settings may be specified interactively. " + "Brief instructions are provided at the bottom of the " + "window when the program is running.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + {"-A[on|off]", "Enable/disable display of advanced cache values.", + "There are two categories of CMake cache values: non-advanced and " + "advanced. Most users will not need to change the advanced options. " + "The CMakeSetup GUI contains a checkbox to enable/disable display of " + "advanced options. This command line flag changes its default setting."}, + {0,0,0} +}; + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetup + +BEGIN_MESSAGE_MAP(CMakeSetup, CWinApp) + //{{AFX_MSG_MAP(CMakeSetup) + // NOTE - the ClassWizard will add and remove mapping macros here. + // DO NOT EDIT what you see in these blocks of generated code! + //}}AFX_MSG + ON_COMMAND(ID_HELP, CWinApp::OnHelp) + END_MESSAGE_MAP(); + + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetup construction +CMakeSetup::CMakeSetup() +{ + // TODO: add construction code here, + // Place all significant initialization in InitInstance +} + +///////////////////////////////////////////////////////////////////////////// +// The one and only CMakeSetup object + +CMakeSetup theApp; + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetup initialization + +BOOL CMakeSetup::InitInstance() +{ + AfxEnableControlContainer(); + + // Standard initialization + // If you are not using these features and wish to reduce the size + // of your final executable, you should remove from the following + // the specific initialization routines you do not need. +#if _MFC_VER <= 0x421 +#ifdef _AFXDLL + Enable3dControls(); // Call this when using MFC in a shared DLL +#else + Enable3dControlsStatic(); // Call this when linking to MFC statically +#endif +#endif + CMakeCommandLineInfo cmdInfo; + ParseCommandLine(cmdInfo); + cmSystemTools::FindExecutableDirectory(cmdInfo.GetArgV()[0]); + + // Check for documentation options. If there are no arguments skip + // the check because the GUI should be displayed instead of showing + // usage in this case. + cmDocumentation doc; + if(cmdInfo.GetArgC() > 1 && + doc.CheckOptions(cmdInfo.GetArgC(), cmdInfo.GetArgV())) + { + // Construct and print requested documentation. + cmake hcm; + hcm.AddCMakePaths(); + doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT")); + std::vector commands; + std::vector compatCommands; + std::map propDocs; + + std::vector generators; + hcm.GetCommandDocumentation(commands, true, false); + hcm.GetCommandDocumentation(compatCommands, false, true); + hcm.GetGeneratorDocumentation(generators); + hcm.GetPropertiesDocumentation(propDocs); + doc.SetName("cmake"); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.AppendSection("Generators",generators); + doc.PrependSection("Options",cmDocumentationOptions); + doc.SetSection("Commands",commands); + doc.SetSection("Compatilbility Commands", compatCommands); + doc.SetSections(propDocs); + + return (doc.PrintRequestedDocumentation(std::cout)? 0:1); + } + + CMakeSetupDialog dlg(cmdInfo); + + m_pMainWnd = &dlg; + INT_PTR nResponse = dlg.DoModal(); + if (nResponse == IDOK) + { + // TODO: Place code here to handle when the dialog is + // dismissed with OK + } + else if (nResponse == IDCANCEL) + { + // TODO: Place code here to handle when the dialog is + // dismissed with Cancel + } + + // Since the dialog has been closed, return FALSE so that we exit the + // application, rather than start the application's message pump. + return FALSE; +} diff --git a/Source/MFCDialog/CMakeSetup.h b/Source/MFCDialog/CMakeSetup.h new file mode 100644 index 000000000..bfcd70537 --- /dev/null +++ b/Source/MFCDialog/CMakeSetup.h @@ -0,0 +1,65 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeSetup.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// CMakeSetupdialog.h : main header file for the CMakeSetupDIALOG application +// + +#if !defined(AFX_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) +#define AFX_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#ifndef __AFXWIN_H__ +#error include 'stdafx.h' before including this file for PCH +#endif + +#include "resource.h" // main symbols + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetup: +// See CMakeSetupdialog.cpp for the implementation of this class +// + +class CMakeSetup : public CWinApp +{ +public: + CMakeSetup(); + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMakeSetup) +public: + virtual BOOL InitInstance(); + //}}AFX_VIRTUAL + +// Implementation + + //{{AFX_MSG(CMakeSetup) + // NOTE - the ClassWizard will add and remove member functions here. + // DO NOT EDIT what you see in these blocks of generated code ! + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CMakeSetupDIALOG_H__AC17A6F4_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) diff --git a/Source/MFCDialog/CMakeSetup.rc b/Source/MFCDialog/CMakeSetup.rc new file mode 100644 index 000000000..3e144e4a1 --- /dev/null +++ b/Source/MFCDialog/CMakeSetup.rc @@ -0,0 +1,246 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "#define _AFX_NO_SPLITTER_RESOURCES\r\n" + "#define _AFX_NO_OLE_RESOURCES\r\n" + "#define _AFX_NO_TRACKER_RESOURCES\r\n" + "#define _AFX_NO_PROPERTY_RESOURCES\r\n" + "\r\n" + "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" + "#ifdef _WIN32\r\n" + "LANGUAGE 9, 1\r\n" + "#pragma code_page(1252)\r\n" + "#endif //_WIN32\r\n" + "#include ""res\\CMakeSetupDialog.rc2"" // non-Microsoft Visual C++ edited resources\r\n" + "#include ""afxres.rc"" // Standard components\r\n" + "#endif\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDR_MAINFRAME ICON "res\\CMakeSetupDialog.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "About CMakeSetup" +BEGIN + ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 + LTEXT "CMakeSetup\nwww.cmake.org",IDC_STATIC,40,18,119,16 + DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP +END + +IDD_CMakeSetupDialog_DIALOG DIALOGEX 0, 0, 447, 255 +STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +EXSTYLE WS_EX_APPWINDOW +CAPTION "CMakeSetupDialog" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + RTEXT "Where is the source code:",IDC_STATIC,6,7,86,9 + COMBOBOX IDC_WhereSource,96,6,169,12,CBS_SIMPLE | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Browse...",IDC_BROWSE_SOURCE,267,6,34,13 + RTEXT "Where to build the binaries:",IDC_STATIC,5,27,90,9 + COMBOBOX IDC_WhereBuild,96,26,169,68,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "Browse...",IDC_BROWSE_BUILD,267,25,34,13 + CONTROL "Show Advanced Values",IDC_AdvancedValues,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,9,98,9 + DEFPUSHBUTTON "Configure",IDC_BuildProjects,84,221,51,15 + PUSHBUTTON "OK",IDC_OK,141,221,51,15 + PUSHBUTTON "Cancel",IDCANCEL,198,221,51,15 + PUSHBUTTON "Help",IDC_HELP_BUTTON,312,221,51,15 + LISTBOX IDC_LIST2,15,53,419,126,LBS_SORT | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL + GROUPBOX "Cache Values",IDC_FRAME,10,44,432,140 + CTEXT "Right click on a cache value for additional options (delete, ignore, and help).\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",IDC_MouseHelpCaption,0,191,442,27 + LTEXT "Static",IDC_PROGRESS,2,240,442,12,SS_CENTERIMAGE | SS_SUNKEN + PUSHBUTTON "Delete Cache",IDC_DELETE_BUTTON,255,221,51,15 + CONTROL "Suppress dev Warnings",IDC_SUPPRESS_DEV_WARNINGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,28,108,10 +END + +IDD_CMAKE_HELP_DIALOG DIALOG 0, 0, 365, 183 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "CMake Help" +BEGIN + DEFPUSHBUTTON "OK",IDOK,155,159,50,14 + EDITTEXT IDC_EDIT1,7,7,351,152,ES_MULTILINE | ES_READONLY | NOT WS_BORDER +END + +IDD_GEN_DIALOG DIALOGEX 0, 0, 263, 86 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Select Generator" +BEGIN + DEFPUSHBUTTON "OK",IDOK,70,65,50,14 + PUSHBUTTON "Cancel",IDCANCEL,143,65,50,14 + RTEXT "Build For:",IDC_BuildForLabel,7,45,34,11,SS_CENTERIMAGE + COMBOBOX IDC_Generator,52,45,204,117,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP + CTEXT "Please select what build system you want CMake to generate files for.\nYou should select the tool that you will use to build the project.\nPress OK once you have made your selection.",IDC_MouseHelpCaption,7,7,245,36 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 2,2,0,0 + PRODUCTVERSION 2,2,0,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x1L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "FileDescription", "CMakeSetup MFC Application" + VALUE "FileVersion", "2, 2, 0, 0" + VALUE "InternalName", "CMakeSetup" + VALUE "LegalCopyright", "Copyright (C) 2000" + VALUE "OriginalFilename", "CMakeSetup.EXE" + VALUE "ProductName", "CMakeSetup Application" + VALUE "ProductVersion", "2, 2, 0, 0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1200 + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ABOUTBOX, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 228 + TOPMARGIN, 7 + BOTTOMMARGIN, 48 + END + + IDD_CMakeSetupDialog_DIALOG, DIALOG + BEGIN + RIGHTMARGIN, 442 + BOTTOMMARGIN, 252 + END + + IDD_CMAKE_HELP_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 358 + TOPMARGIN, 7 + BOTTOMMARGIN, 176 + END + + IDD_GEN_DIALOG, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 256 + TOPMARGIN, 7 + BOTTOMMARGIN, 79 + END +END +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_ABOUTBOX "&About CMakeSetup..." + IDS_CREATESHORTCUT "&Create shortcut" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// +#define _AFX_NO_SPLITTER_RESOURCES +#define _AFX_NO_OLE_RESOURCES +#define _AFX_NO_TRACKER_RESOURCES +#define _AFX_NO_PROPERTY_RESOURCES + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE 9, 1 +#pragma code_page(1252) +#endif //_WIN32 +#include "res\CMakeSetupDialog.rc2" // non-Microsoft Visual C++ edited resources +#include "afxres.rc" // Standard components +#endif + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp new file mode 100644 index 000000000..68086f6c2 --- /dev/null +++ b/Source/MFCDialog/CMakeSetupDialog.cpp @@ -0,0 +1,1552 @@ +// pcbuilderdialogDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "shellapi.h" +// a fun undef for DOT NET +#undef DEBUG +#include "CMakeSetup.h" +#include "MakeHelp.h" +#include "cmVersion.h" +#include "PathDialog.h" +#include "CMakeSetupDialog.h" +#include "CMakeCommandLineInfo.h" +#include "../cmExternalMakefileProjectGenerator.h" +#include "../cmListFileCache.h" +#include "../cmCacheManager.h" +#include "../cmake.h" +#include "../cmGlobalGenerator.h" +#include "../cmDynamicLoader.h" +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + + +///////////////////////////////////////////////////////////////////////////// +// CAboutDlg dialog used for App About + +class CAboutDlg : public CDialog +{ +public: + CAboutDlg(); + + // Dialog Data + //{{AFX_DATA(CAboutDlg) + enum { IDD = IDD_ABOUTBOX }; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CAboutDlg) +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + //{{AFX_MSG(CAboutDlg) + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + }; + +CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) +{ + //{{AFX_DATA_INIT(CAboutDlg) + //}}AFX_DATA_INIT +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CAboutDlg) + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) + //{{AFX_MSG_MAP(CAboutDlg) + // No message handlers + //}}AFX_MSG_MAP + END_MESSAGE_MAP(); + + +void MFCMessageCallback(const char* m, const char* title, bool& nomore, void*) +{ + std::string message = m; + message += "\n\n(Press Cancel to suppress any further messages.)"; + if(::MessageBox(0, message.c_str(), title, + MB_OKCANCEL|MB_TASKMODAL) == IDCANCEL) + { + nomore = true; + } +} + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetupDialog dialog +void updateProgress(const char *msg, float prog, void *cd) +{ + char* tmp = new char[strlen(msg) + 40]; + if (prog >= 0) + { + sprintf(tmp,"%s %i%%",msg,(int)(100*prog)); + } + else + { + sprintf(tmp,"%s",msg); + } + CMakeSetupDialog *self = (CMakeSetupDialog *)cd; + self->SetDlgItemText(IDC_PROGRESS, tmp); + CWnd* cancel = self->GetDlgItem(IDCANCEL); + // + // Retrieve and dispatch any waiting messages. + // + MSG wmsg; + while (::PeekMessage (&wmsg, NULL, 0, 0, PM_REMOVE)) + { + switch(wmsg.message) + { + case WM_LBUTTONDOWN: + case WM_LBUTTONUP: + case WM_LBUTTONDBLCLK: + { + if(wmsg.hwnd == cancel->m_hWnd) + { + ::DispatchMessage(&wmsg); + } + } + break; + case WM_COMMAND: + case WM_SETCURSOR: + case WM_PAINT: + ::DispatchMessage(&wmsg); + break; + } + } + delete [] tmp; +} + +// Convert to Win32 path (slashes). This calls the system tools one and then +// removes the spaces. It is not in system tools because we don't want any +// generators accidentally use it +std::string ConvertToWindowsPath(const char* path) +{ + // Convert to output path. + // Remove the "" around it (if any) since it's an output path for + // the shell. If another shell-oriented feature is not designed + // for a GUI use, then we are in trouble. + // save the value of the force to unix path option + bool saveForce = cmSystemTools::GetForceUnixPaths(); + // make sure we get windows paths no matter what for the GUI + cmSystemTools::SetForceUnixPaths(false); + std::string s = cmSystemTools::ConvertToOutputPath(path); + // now restore the force unix path to its previous value + cmSystemTools::SetForceUnixPaths(saveForce); + if (s.size()) + { + std::string::iterator i = s.begin(); + if (*i == '\"') + { + s.erase(i, i + 1); + } + i = s.begin() + s.length() - 1; + if (*i == '\"') + { + s.erase(i, i + 1); + } + } + return s; +} + +CMakeSetupDialog::CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, + CWnd* pParent /*=NULL*/) + : CDialog(CMakeSetupDialog::IDD, pParent) +{ + m_GeneratorPicked = false; + m_Cursor = LoadCursor(NULL, IDC_ARROW); + m_RunningConfigure = false; + cmSystemTools::SetRunCommandHideConsole(true); + cmSystemTools::SetErrorCallback(MFCMessageCallback); + m_RegistryKey = "Software\\Kitware\\CMakeSetup\\Settings\\StartPath"; + m_CacheEntriesList.m_CMakeSetupDialog = this; + + m_CMakeInstance = new cmake; + m_CMakeInstance->SetCMakeEditCommand("CMakeSetup"); + m_CMakeInstance->SetProgressCallback(updateProgress, (void *)this); + + //{{AFX_DATA_INIT(CMakeSetupDialog) + //}}AFX_DATA_INIT + + // Get the parameters from the command line info + // If an unknown parameter is found, try to interpret it too, since it + // is likely to be a file dropped on the shortcut :) + if (cmdInfo.m_LastUnknownParameter.IsEmpty()) + { + this->m_WhereSource = cmdInfo.m_WhereSource; + this->m_WhereBuild = cmdInfo.m_WhereBuild; + this->m_GeneratorDialog.m_GeneratorChoiceString = + cmdInfo.m_GeneratorChoiceString; + this->m_AdvancedValues = cmdInfo.m_AdvancedValues; + } + else + { + this->m_WhereSource = _T(""); + this->m_WhereBuild = _T(""); + this->m_AdvancedValues = FALSE; + this->m_GeneratorDialog.m_GeneratorChoiceString = + cmdInfo.m_GeneratorChoiceString; + this->ChangeDirectoriesFromFile((LPCTSTR)cmdInfo.m_LastUnknownParameter); + } + + // Note that LoadIcon does not require a subsequent DestroyIcon in Win32 + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + m_BuildPathChanged = false; + // Find the path to the cmake.exe executable + char fname[1024]; + ::GetModuleFileName(NULL,fname,1023); + // extract just the path part + m_PathToExecutable = cmSystemTools::GetProgramPath(fname).c_str(); + // add the cmake.exe to the path + m_PathToExecutable += "/cmake.exe"; + + m_oldCX = -1; + m_deltaXRemainder = 0; +} + +CMakeSetupDialog::~CMakeSetupDialog() +{ + delete m_CMakeInstance; + // clean up globals + cmDynamicLoader::FlushCache(); +} + +void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMakeSetupDialog) + DDX_Control(pDX, IDC_AdvancedValues, m_AdvancedValuesControl); + DDX_Control(pDX, IDC_SUPPRESS_DEV_WARNINGS, m_SuppressDevWarningsControl); + DDX_Check(pDX, IDC_SUPPRESS_DEV_WARNINGS, m_SuppressDevValue); + DDX_Control(pDX, IDC_BROWSE_SOURCE, m_BrowseSource); + DDX_Control(pDX, IDC_BROWSE_BUILD, m_BrowseBuild); + DDX_Control(pDX, IDC_DELETE_BUTTON, m_DeleteButton); + DDX_Control(pDX, IDC_HELP_BUTTON, m_HelpButton); + DDX_Control(pDX, IDC_OK, m_OKButton); + DDX_Control(pDX, IDCANCEL, m_CancelButton); + DDX_CBStringExact(pDX, IDC_WhereSource, m_WhereSource); + DDX_CBStringExact(pDX, IDC_WhereBuild, m_WhereBuild); + DDX_Control(pDX, IDC_FRAME, m_ListFrame); + DDX_Control(pDX, IDC_WhereSource, m_WhereSourceControl); + DDX_Control(pDX, IDC_WhereBuild, m_WhereBuildControl); + DDX_Control(pDX, IDC_LIST2, m_CacheEntriesList); + DDX_Control(pDX, IDC_MouseHelpCaption, m_MouseHelp); + DDX_Control(pDX, IDC_PROGRESS, m_StatusDisplay); + DDX_Control(pDX, IDC_BuildProjects, m_Configure); + DDX_Check(pDX, IDC_AdvancedValues, m_AdvancedValues); + //}}AFX_DATA_MAP +} + +BEGIN_MESSAGE_MAP(CMakeSetupDialog, CDialog) + //{{AFX_MSG_MAP(CMakeSetupDialog) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_BN_CLICKED(IDC_BUTTON2, OnBrowseWhereSource) + ON_BN_CLICKED(IDC_BuildProjects, OnConfigure) + ON_BN_CLICKED(IDC_BUTTON3, OnBrowseWhereBuild) + ON_CBN_EDITCHANGE(IDC_WhereBuild, OnChangeWhereBuild) + ON_CBN_SELCHANGE(IDC_WhereBuild, OnSelendokWhereBuild) + ON_CBN_EDITCHANGE(IDC_WhereSource, OnChangeWhereSource) + ON_CBN_SELENDOK(IDC_WhereSource, OnSelendokWhereSource) + ON_WM_SIZE() + ON_WM_GETMINMAXINFO() + ON_BN_CLICKED(IDC_OK, OnOk) + ON_BN_CLICKED(IDC_DELETE_BUTTON, OnDeleteButton) + ON_BN_CLICKED(IDC_HELP_BUTTON, OnHelpButton) + ON_BN_CLICKED(IDC_AdvancedValues, OnAdvancedValues) + ON_BN_CLICKED(IDC_SUPPRESS_DEV_WARNINGS, OnSuppressDevValue) + ON_BN_DOUBLECLICKED(IDC_SUPPRESS_DEV_WARNINGS, OnDoubleclickedSuppressDevValue) + ON_BN_DOUBLECLICKED(IDC_AdvancedValues, OnDoubleclickedAdvancedValues) + ON_WM_DROPFILES() + ON_BN_CLICKED(IDCANCEL, OnCancel) + ON_WM_SETCURSOR() + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetupDialog message handlers + +BOOL CMakeSetupDialog::OnInitDialog() +{ + CDialog::OnInitDialog(); + this->DragAcceptFiles(true); + + // Add "Create shortcut" menu item to system menu. + + // IDM_CREATESHORTCUT must be in the system command range. + ASSERT((IDM_CREATESHORTCUT & 0xFFF0) == IDM_CREATESHORTCUT); + ASSERT(IDM_CREATESHORTCUT < 0xF000); + + // Add "About..." menu item to system menu. + + // IDM_ABOUTBOX must be in the system command range. + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + CString strCreateShortcutMenu; + strCreateShortcutMenu.LoadString(IDS_CREATESHORTCUT); + if (!strCreateShortcutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, + IDM_CREATESHORTCUT, + strCreateShortcutMenu); + } + + CString strAboutMenu; + strAboutMenu.LoadString(IDS_ABOUTBOX); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, + IDM_ABOUTBOX, + strAboutMenu); + } + } + + // Set the icon for this dialog. The framework does this automatically + // when the application's main window is not a dialog + SetIcon(m_hIcon, TRUE); // Set big icon + SetIcon(m_hIcon, FALSE); // Set small icon + // Load source and build dirs from registry + this->LoadFromRegistry(); + + // try to load the cmake cache from disk + this->LoadCacheFromDiskToGUI(); + m_WhereBuildControl.LimitText(2048); + m_WhereSourceControl.LimitText(2048); + + // Set the version number + char tmp[1024]; + sprintf(tmp,"CMake %d.%d - %s", cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion(), + cmVersion::GetReleaseVersion().c_str()); + SetDlgItemText(IDC_PROGRESS, ""); + this->SetWindowText(tmp); + this->UpdateData(FALSE); + return TRUE; // return TRUE unless you set the focus to a control +} + + +// About dialog invoke +void CMakeSetupDialog::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else if ((nID & 0xFFF0) == IDM_CREATESHORTCUT) + { + CreateShortcut(); + } + else + { + CDialog::OnSysCommand(nID, lParam); + } +} + +// If you add a minimize button to your dialog, you will need the code below +// to draw the icon. For MFC applications using the document/view model, +// this is automatically done for you by the framework. + +void CMakeSetupDialog::OnPaint() +{ + if (IsIconic()) + { + CPaintDC dc(this); // device context for painting + + SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); + + // Center icon in client rectangle + int cxIcon = GetSystemMetrics(SM_CXICON); + int cyIcon = GetSystemMetrics(SM_CYICON); + CRect rect; + GetClientRect(&rect); + int x = (rect.Width() - cxIcon + 1) / 2; + int y = (rect.Height() - cyIcon + 1) / 2; + + // Draw the icon + dc.DrawIcon(x, y, m_hIcon); + } + else + { + CDialog::OnPaint(); + } +} + +// The system calls this to obtain the cursor to display while the user drags +// the minimized window. +HCURSOR CMakeSetupDialog::OnQueryDragIcon() +{ + return (HCURSOR) m_hIcon; +} + + + +// Browse button +bool CMakeSetupDialog::Browse(CString &result, const char *title) +{ + CString initialDir = result; + initialDir.Replace("/", "\\"); + CPathDialog dlg("Select Path", title, initialDir); + if(dlg.DoModal()==IDOK) + { + result = dlg.GetPathName(); + return true; + } + else + { + return false; + } +} + + + + +void CMakeSetupDialog::SaveToRegistry() +{ + HKEY hKey; + DWORD dwDummy; + + if(RegCreateKeyEx(HKEY_CURRENT_USER, + m_RegistryKey, + 0, "", REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, + NULL, &hKey, &dwDummy) != ERROR_SUCCESS) + { + return; + } + else + { + // save some values + CString regvalue; + + // write the size of the dialog + CRect size; + this->GetWindowRect(&size); + unsigned long width = size.Width(); + unsigned long height = size.Height(); + RegSetValueEx(hKey, _T("Width"), 0, REG_DWORD, + (CONST BYTE *)(&width),4); + RegSetValueEx(hKey, _T("Height"), 0, REG_DWORD, + (CONST BYTE *)(&height),4); + + this->ReadRegistryValue(hKey, &(regvalue),"WhereSource1","C:\\"); + int shiftEnd = 9; + if(m_WhereSource != regvalue) + { + char keyName[1024]; + char keyName2[1024]; + int i; + for (i = 2; i < 10; ++i) + { + regvalue = ""; + sprintf(keyName,"WhereSource%i",i); + this->ReadRegistryValue(hKey, &(regvalue),keyName,""); + // check for short circuit, if the new value is already in + // the list then we stop + if (m_WhereSource == regvalue) + { + shiftEnd = i - 1; + } + } + + for (i = shiftEnd; i; --i) + { + regvalue = ""; + sprintf(keyName,"WhereSource%i",i); + sprintf(keyName2,"WhereSource%i",i+1); + + this->ReadRegistryValue(hKey, &(regvalue),keyName,""); + if (strlen(regvalue)) + { + RegSetValueEx(hKey, _T(keyName2), 0, REG_SZ, + (CONST BYTE *)(const char *)regvalue, + regvalue.GetLength()); + } + } + RegSetValueEx(hKey, _T("WhereSource1"), 0, REG_SZ, + (CONST BYTE *)(const char *)m_WhereSource, + m_WhereSource.GetLength()); + } + + this->ReadRegistryValue(hKey, &(regvalue),"WhereBuild1","C:\\"); + if(m_WhereBuild != regvalue) + { + int i; + char keyName[1024]; + char keyName2[1024]; + for (i = 2; i < 10; ++i) + { + regvalue = ""; + sprintf(keyName,"WhereBuild%i",i); + this->ReadRegistryValue(hKey, &(regvalue),keyName,""); + // check for short circuit, if the new value is already in + // the list then we stop + if (m_WhereBuild == regvalue) + { + shiftEnd = i - 1; + } + } + for (i = shiftEnd; i; --i) + { + regvalue = ""; + sprintf(keyName,"WhereBuild%i",i); + sprintf(keyName2,"WhereBuild%i",i+1); + + this->ReadRegistryValue(hKey, &(regvalue),keyName,""); + if (strlen(regvalue)) + { + RegSetValueEx(hKey, _T(keyName2), 0, REG_SZ, + (CONST BYTE *)(const char *)regvalue, + regvalue.GetLength()); + } + } + RegSetValueEx(hKey, _T("WhereBuild1"), 0, REG_SZ, + (CONST BYTE *)(const char *)m_WhereBuild, + m_WhereBuild.GetLength()); + } + } + RegCloseKey(hKey); +} + + +void CMakeSetupDialog::ReadRegistryValue(HKEY hKey, + CString *val, + const char *key, + const char *adefault) +{ + DWORD dwType, dwSize; + char *pb; + + dwType = REG_SZ; + pb = val->GetBuffer(MAX_PATH); + dwSize = MAX_PATH; + if(RegQueryValueEx(hKey,_T(key), NULL, &dwType, + (BYTE *)pb, &dwSize) != ERROR_SUCCESS) + { + val->ReleaseBuffer(); + *val = _T(adefault); + } + else + { + val->ReleaseBuffer(); + } +} + + +void CMakeSetupDialog::LoadFromRegistry() +{ + HKEY hKey; + if(RegOpenKeyEx(HKEY_CURRENT_USER, + m_RegistryKey, + 0, KEY_READ, &hKey) != ERROR_SUCCESS) + { + return; + } + else + { + // load some values + DWORD dwSize = 4; + DWORD width, height; + + if (RegQueryValueEx(hKey,_T("Width"), NULL, NULL, + (BYTE *)&width, &dwSize) == ERROR_SUCCESS && + RegQueryValueEx(hKey,_T("Height"), NULL, NULL, + (BYTE *)&height, &dwSize) == ERROR_SUCCESS) + { + this->SetWindowPos(0,0,0,width,height,SWP_NOZORDER | SWP_NOMOVE); + } + + if (m_WhereSource.IsEmpty()) + { + this->ReadRegistryValue(hKey, &(m_WhereSource),"WhereSource1","C:\\"); + } + if (m_WhereBuild.IsEmpty()) + { + this->ReadRegistryValue(hKey, &(m_WhereBuild),"WhereBuild1","C:\\"); + } + m_WhereSourceControl.AddString(m_WhereSource); + m_WhereBuildControl.AddString(m_WhereBuild); + + char keyname[1024]; + CString regvalue; + int i; + for (i = 2; i <= 10; ++i) + { + sprintf(keyname,"WhereSource%i",i); + regvalue = ""; + this->ReadRegistryValue(hKey, &(regvalue),keyname,"C:\\"); + if (strcmp("C:\\",regvalue)) + { + m_WhereSourceControl.AddString(regvalue); + } + sprintf(keyname,"WhereBuild%i",i); + regvalue = ""; + this->ReadRegistryValue(hKey, &(regvalue),keyname,"C:\\"); + if (strcmp("C:\\",regvalue)) + { + m_WhereBuildControl.AddString(regvalue); + } + } + } + RegCloseKey(hKey); +} + + + +// Callback for browse source button +void CMakeSetupDialog::OnBrowseWhereSource() +{ + this->UpdateData(); + Browse(m_WhereSource, "Enter Path to Source"); + this->UpdateData(false); + this->OnChangeWhereSource(); +} + +// Callback for browser build button +void CMakeSetupDialog::OnBrowseWhereBuild() +{ + this->UpdateData(); + Browse(m_WhereBuild, "Enter Path to Build"); + this->UpdateData(false); + this->OnChangeWhereBuild(); +} + +void CMakeSetupDialog::RunCMake(bool generateProjectFiles) +{ + if(!cmSystemTools::FileExists(m_WhereBuild)) + { + std::string message = + "Build directory does not exist, should I create it?\n\n" + "Directory: "; + message += (const char*)m_WhereBuild; + if(MessageBox(message.c_str(), "Create Directory", MB_OKCANCEL) == IDOK) + { + cmSystemTools::MakeDirectory(m_WhereBuild); + } + else + { + MessageBox("Build Project aborted, nothing done."); + return; + } + } + // set the wait cursor + m_Cursor = LoadCursor(NULL, IDC_WAIT); + ::SetCursor(m_Cursor); + m_RunningConfigure = true; + + // get all the info from the dialog + this->UpdateData(); + // always save the current gui values to disk + this->SaveCacheFromGUI(); + // Make sure we are working from the cache on disk + this->LoadCacheFromDiskToGUI(); + m_OKButton.EnableWindow(false); + + // setup the cmake instance + if (generateProjectFiles) + { + if(m_CMakeInstance->Generate() != 0) + { + cmSystemTools::Error( + "Error in generation process, project files may be invalid"); + } + } + else + { + m_CMakeInstance->SetHomeDirectory(m_WhereSource); + m_CMakeInstance->SetStartDirectory(m_WhereSource); + m_CMakeInstance->SetHomeOutputDirectory(m_WhereBuild); + m_CMakeInstance->SetStartOutputDirectory(m_WhereBuild); + m_CMakeInstance->SetGlobalGenerator( + m_CMakeInstance->CreateGlobalGenerator(m_GeneratorDialog.m_GeneratorChoiceString)); + m_CMakeInstance->SetCMakeCommand(m_PathToExecutable); + m_CMakeInstance->LoadCache(); + if(m_SuppressDevValue) + { + m_CMakeInstance->SetSuppressDevWarnings(true); + } + else + { + m_CMakeInstance->SetSuppressDevWarnings(false); + } + if(m_CMakeInstance->Configure() != 0) + { + cmSystemTools::Error( + "Error in configuration process, project files may be invalid"); + } + // update the GUI with any new values in the caused by the + // generation process + this->LoadCacheFromDiskToGUI(); + } + + // save source and build paths to registry + this->SaveToRegistry(); + // path is up-to-date now + m_BuildPathChanged = false; + // put the cursor back + m_Cursor = LoadCursor(NULL, IDC_ARROW); + ::SetCursor(m_Cursor); + m_RunningConfigure = false; + cmSystemTools::ResetErrorOccuredFlag(); +} + + +// Callback for build projects button +void CMakeSetupDialog::OnConfigure() +{ + if(!m_GeneratorPicked) + { + m_GeneratorDialog.m_CMakeInstance = this->m_CMakeInstance; + if(m_GeneratorDialog.DoModal() != IDOK) + { + return; + } + // save the generator choice in the registry + HKEY hKey; + DWORD dwDummy; + + if(RegCreateKeyEx(HKEY_CURRENT_USER, + m_RegistryKey, + 0, "", REG_OPTION_NON_VOLATILE, KEY_READ|KEY_WRITE, + NULL, &hKey, &dwDummy) == ERROR_SUCCESS) + { + // save some values + RegSetValueEx(hKey, _T("LastGenerator"), 0, REG_SZ, + (CONST BYTE *)(const char *)m_GeneratorDialog.m_GeneratorChoiceString, + m_GeneratorDialog.m_GeneratorChoiceString.GetLength()); + } + } + + // enable error messages each time configure is pressed + cmSystemTools::EnableMessages(); + this->RunCMake(false); +} + + + + +// callback for combo box menu where build selection +void CMakeSetupDialog::OnSelendokWhereBuild() +{ + m_WhereBuildControl.GetLBText(m_WhereBuildControl.GetCurSel(), + m_WhereBuild); + m_WhereBuildControl.SetWindowText( m_WhereBuild); + this->UpdateData(FALSE); + this->OnChangeWhereBuild(); +} + +// callback for combo box menu where source selection +void CMakeSetupDialog::OnSelendokWhereSource() +{ + m_WhereSourceControl.GetLBText(m_WhereSourceControl.GetCurSel(), + m_WhereSource); + this->UpdateData(FALSE); + this->OnChangeWhereSource(); +} + +// callback for chaing source directory +void CMakeSetupDialog::OnChangeWhereSource() +{ +} + +// callback for changing the build directory +void CMakeSetupDialog::OnChangeWhereBuild() +{ + this->UpdateData(); + + // The build dir has changed, check if there is a cache, and + // grab the source dir from it + + std::string path = this->m_WhereBuild; + cmSystemTools::ConvertToUnixSlashes(path); + + // adjust the cmake instance + m_CMakeInstance->SetHomeOutputDirectory(m_WhereBuild); + m_CMakeInstance->SetStartOutputDirectory(m_WhereBuild); + + std::string cache_file = path; + cache_file += "/CMakeCache.txt"; + + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + + m_GeneratorPicked = false; + + // make sure we have a normal cache file, specifically if one exists make + // sure it can be read + if (cmSystemTools::FileExists(cache_file.c_str())) + { + if (cachem->LoadCache(path.c_str())) + { + if (it.Find("CMAKE_HOME_DIRECTORY")) + { + path = ConvertToWindowsPath(it.GetValue()); + this->m_WhereSource = path.c_str(); + this->m_WhereSourceControl.SetWindowText(this->m_WhereSource); + this->OnChangeWhereSource(); + m_GeneratorPicked = true; + } + } + else + { + //file exists but cqnnot be read + cmSystemTools::Error("There is a CMakeCache.txt file for the current binary tree but cmake does not have permission to read it. Please check the permissions of the directory you are trying to run CMake on."); + return; + } + } + + m_CacheEntriesList.RemoveAll(); + m_CacheEntriesList.ShowWindow(SW_SHOW); + this->LoadCacheFromDiskToGUI(); + m_BuildPathChanged = true; +} + + +// copy from the cache manager to the cache edit list box +void CMakeSetupDialog::FillCacheGUIFromCacheManager() +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + + // if there are already entries in the cache, then + // put the new ones in the top, so they show up first + bool reverseOrder = false; + // all the current values are not new any more + std::set items = m_CacheEntriesList.GetItems(); + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + // first check to see if it is still in the cache + CPropertyItem* item = *i; + if ( !it.Find((const char*)item->m_propName) ) + { + m_CacheEntriesList.RemoveProperty((const char*)item->m_propName); + } + else + { + // if it is still in the cache then it is no longer new + item->m_NewValue = false; + } + } + for(cmCacheManager::CacheIterator i = cachem->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + const char* key = i.GetName(); + + // if value has trailing space or tab, enclose it in single quotes + // to enforce the fact that it has 'invisible' trailing stuff + std::string value = i.GetValue(); + if (value.size() && + (value[value.size() - 1] == ' ' || + value[value.size() - 1] == '\t')) + { + value = '\'' + value + '\''; + } + bool advanced = i.GetPropertyAsBool("ADVANCED"); + switch(i.GetType() ) + { + case cmCacheManager::BOOL: + if(cmSystemTools::IsOn(value.c_str())) + { + m_CacheEntriesList.AddProperty(key, + "ON", + i.GetProperty("HELPSTRING"), + CPropertyList::COMBO,"ON|OFF", + reverseOrder, + advanced + ); + } + else + { + m_CacheEntriesList.AddProperty(key, + "OFF", + i.GetProperty("HELPSTRING"), + CPropertyList::COMBO,"ON|OFF", + reverseOrder, advanced + ); + } + break; + case cmCacheManager::PATH: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + CPropertyList::PATH,"", + reverseOrder, advanced + ); + break; + case cmCacheManager::FILEPATH: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + CPropertyList::FILE,"", + reverseOrder, advanced + ); + break; + case cmCacheManager::STRING: + m_CacheEntriesList.AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + CPropertyList::EDIT,"", + reverseOrder, advanced + ); + break; + case cmCacheManager::INTERNAL: + m_CacheEntriesList.RemoveProperty(key); + break; + } + } + if(m_CacheEntriesList.GetShowAdvanced()) + { + m_CacheEntriesList.ShowAdvanced(); + } + else + { + m_CacheEntriesList.HideAdvanced(); + } + + m_OKButton.EnableWindow(false); + if(cachem->GetSize() > 0 && !cmSystemTools::GetErrorOccuredFlag()) + { + bool enable = true; + items = m_CacheEntriesList.GetItems(); + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + CPropertyItem* item = *i; + if(item->m_Advanced ) + { + if(item->m_NewValue && m_CacheEntriesList.GetShowAdvanced()) + { + enable = false; + break; + } + } + else + { + if(item->m_NewValue) + { + // if one new value then disable to OK button + enable = false; + break; + } + } + } + if(enable) + { + m_OKButton.EnableWindow(true); + } + } + + // redraw the list + m_CacheEntriesList.SetTopIndex(0); + m_CacheEntriesList.Invalidate(); +} + +// copy from the list box to the cache manager +void CMakeSetupDialog::FillCacheManagerFromCacheGUI() +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + std::set items = m_CacheEntriesList.GetItems(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + for(std::set::iterator i = items.begin(); + i != items.end(); ++i) + { + CPropertyItem* item = *i; + if ( it.Find((const char*)item->m_propName) ) + { + // if value is enclosed in single quotes ('foo') then remove them + // they were used to enforce the fact that it had 'invisible' + // trailing stuff + if (item->m_curValue.GetLength() >= 2 && + item->m_curValue[0] == '\'' && + item->m_curValue[item->m_curValue.GetLength() - 1] == '\'') + { + it.SetValue(item->m_curValue.Mid( + 1, item->m_curValue.GetLength() - 2)); + } + else + { + it.SetValue(item->m_curValue); + } + } + } +} + + + +//! Load cache file from m_WhereBuild and display in GUI editor +void CMakeSetupDialog::LoadCacheFromDiskToGUI() +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + if(m_WhereBuild != "") + { + if (!cachem->LoadCache(m_WhereBuild)) + { + // if it does exist, but isn;t readable then warn the user + std::string cacheFile = m_WhereBuild; + cacheFile += "/CMakeCache.txt"; + if(cmSystemTools::FileExists(cacheFile.c_str())) + { + cmSystemTools::Error("There is a CMakeCache.txt file for the current binary tree but cmake does not have permission to read it. Please check the permissions of the directory you are trying to run CMake on."); + return; + } + } + cmCacheManager::CacheIterator itm = cachem->NewIterator(); + if ( itm.Find("CMAKE_HOME_DIRECTORY")) + { + std::string path = ConvertToWindowsPath(itm.GetValue()); + this->m_WhereSource = path.c_str(); + this->m_WhereSourceControl.SetWindowText(this->m_WhereSource); + this->OnChangeWhereSource(); + } + m_CMakeInstance->SetHomeDirectory(m_WhereSource); + m_CMakeInstance->SetStartDirectory(m_WhereSource); + m_CMakeInstance->SetHomeOutputDirectory(m_WhereBuild); + m_CMakeInstance->SetStartOutputDirectory(m_WhereBuild); + m_CMakeInstance->PreLoadCMakeFiles(); + this->FillCacheGUIFromCacheManager(); + cmCacheManager::CacheIterator it = + cachem->GetCacheIterator("CMAKE_GENERATOR"); + if(!it.IsAtEnd()) + { + m_GeneratorPicked = true; + const char* extraGen = cachem->GetCacheValue("CMAKE_EXTRA_GENERATOR"); + std::string curGen = cmExternalMakefileProjectGenerator:: + CreateFullGeneratorName(it.GetValue(), extraGen); + + if(m_GeneratorDialog.m_GeneratorChoiceString != curGen.c_str()) + { + m_GeneratorDialog.m_GeneratorChoiceString = curGen.c_str(); + this->UpdateData(FALSE); + } + } + } +} + +//! Save GUI values to cmCacheManager and then save to disk. +void CMakeSetupDialog::SaveCacheFromGUI() +{ + cmCacheManager *cachem = this->m_CMakeInstance->GetCacheManager(); + this->FillCacheManagerFromCacheGUI(); + if(m_WhereBuild != "") + { + cachem->SaveCache(m_WhereBuild); + } +} + + +void CMakeSetupDialog::OnSize(UINT nType, int cx, int cy) +{ + if (nType == SIZE_MINIMIZED) + { + CDialog::OnSize(nType, cx, cy); + return; + } + if (m_oldCX == -1) + { + m_oldCX = cx; + m_oldCY = cy; + } + int deltax = cx - m_oldCX; + int deltay = cy - m_oldCY; + + m_oldCX = cx; + m_oldCY = cy; + + CDialog::OnSize(nType, cx, cy); + + if (deltax == 0 && deltay == 0) + { + return; + } + + if(m_CacheEntriesList.m_hWnd) + { + // get the original sizes/positions + CRect cRect; + m_AdvancedValuesControl.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_AdvancedValuesControl.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOCOPYBITS | + SWP_NOSIZE | SWP_NOZORDER); + m_SuppressDevWarningsControl.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_SuppressDevWarningsControl.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOCOPYBITS | + SWP_NOSIZE | SWP_NOZORDER); + m_BrowseSource.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_BrowseSource.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOZORDER); + m_BrowseBuild.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_BrowseBuild.SetWindowPos(&wndTop, cRect.left + deltax, + cRect.top, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE | SWP_NOZORDER); + + m_WhereSourceControl.GetWindowRect(&cRect); + m_WhereSourceControl.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height(), + SWP_NOCOPYBITS | + SWP_NOMOVE | SWP_NOZORDER); + m_WhereBuildControl.GetWindowRect(&cRect); + m_WhereBuildControl.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height(), + SWP_NOCOPYBITS | + SWP_NOMOVE | SWP_NOZORDER); + m_ListFrame.GetWindowRect(&cRect); + m_ListFrame.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height() + deltay, + SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER); + m_CacheEntriesList.GetWindowRect(&cRect); + m_CacheEntriesList.SetWindowPos(&wndTop, cRect.left, cRect.top, + cRect.Width() + deltax, + cRect.Height() + deltay, + SWP_NOCOPYBITS | SWP_NOMOVE | SWP_NOZORDER); + + m_StatusDisplay.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_StatusDisplay.SetWindowPos(&wndBottom, cRect.left, + cRect.top + deltay, + cRect.Width() + deltax, cRect.Height(), + SWP_NOCOPYBITS); + + m_MouseHelp.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_MouseHelp.SetWindowPos(&wndTop, cRect.left , + cRect.top + deltay, + cRect.Width() + deltax, cRect.Height(), + SWP_NOCOPYBITS | SWP_NOZORDER); + + deltax = int(deltax + m_deltaXRemainder); + m_deltaXRemainder = float(deltax%2); + + + m_Configure.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_Configure.SetWindowPos(&wndTop, cRect.left + deltax/2, + cRect.top + deltay, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE); + m_CancelButton.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_CancelButton.SetWindowPos(&wndTop, cRect.left + deltax/2, + cRect.top + deltay, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE); + m_OKButton.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_OKButton.SetWindowPos(&wndTop, cRect.left + deltax/2, + cRect.top + deltay, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE); + m_DeleteButton.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_DeleteButton.SetWindowPos(&wndTop, cRect.left + deltax/2, + cRect.top + deltay, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE); + m_HelpButton.GetWindowRect(&cRect); + this->ScreenToClient(&cRect); + m_HelpButton.SetWindowPos(&wndTop, cRect.left + deltax/2, + cRect.top + deltay, + 0, 0, + SWP_NOCOPYBITS | SWP_NOSIZE); + } + +} + + +void CMakeSetupDialog::OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI ) +{ + lpMMI->ptMinTrackSize.x = 550; + lpMMI->ptMinTrackSize.y = 272; +} + +void CMakeSetupDialog::OnCancel() +{ + if(m_RunningConfigure) + { + if(MessageBox("You are in the middle of a Configure.\n" + "If you Cancel now the configure information will be lost.\n" + "Are you sure you want to Cancel?", "Confirm Exit", + MB_YESNO) == IDYES) + { + cmSystemTools::SetFatalErrorOccured(); + } + return; + } + if(m_CacheEntriesList.IsDirty()) + { + if(MessageBox("You have changed options but not rebuilt, " + "are you sure you want to exit?", "Confirm Exit", + MB_YESNO) == IDYES) + { + CDialog::OnOK(); + } + } + else + { + CDialog::OnOK(); + } +} + +void CMakeSetupDialog::OnOk() +{ + // enable error messages each time configure is pressed + cmSystemTools::EnableMessages(); + m_CacheEntriesList.ClearDirty(); + this->RunCMake(true); + + // save the size of the dialog + + + if (!(::GetKeyState(VK_SHIFT) & 0x1000)) + { + CDialog::OnOK(); + } +} + +// Create a shortcut on the desktop with the current Source/Build dir. +int CMakeSetupDialog::CreateShortcut() +{ + // Find the desktop folder and create the link name + + HKEY hKey; + if(RegOpenKeyEx(HKEY_CURRENT_USER, + "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", + 0, KEY_READ, &hKey) != ERROR_SUCCESS) + { + AfxMessageBox ("Create shortcut: unable to find 'Shell Folders' key in registry!"); + return 1; + } + + DWORD dwType, dwSize; +#define MAXPATH 1024 + char link_name[MAXPATH]; + dwSize = MAXPATH; + if(RegQueryValueEx(hKey, + (LPCTSTR)"Desktop", + NULL, + &dwType, + (BYTE *)link_name, + &dwSize) != ERROR_SUCCESS) + { + AfxMessageBox ("Create shortcut: unable to find 'Desktop' registry value in 'Shell Folders' key!"); + return 1; + } + + if(dwType != REG_SZ) + { + AfxMessageBox ("Create shortcut: 'Desktop' registry value in 'Shell Folders' key has wrong type!"); + return 1; + } + + strcat(link_name, "\\CMake - "); + std::string current_dir = cmSystemTools::GetFilenameName((LPCTSTR)m_WhereSource); + strcat(link_name, current_dir.c_str()); + strcat(link_name, ".lnk"); + + // Find the path to the current executable + + char path_to_current_exe[MAXPATH]; + ::GetModuleFileName(NULL, path_to_current_exe, MAXPATH); + + // Create the shortcut + + HRESULT hres; + IShellLink *psl; + + // Initialize the COM library + + hres = CoInitialize(NULL); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: unable to initialize the COM library!"); + return 1; + } + + // Create an IShellLink object and get a pointer to the IShellLink + // interface (returned from CoCreateInstance). + + hres = CoCreateInstance(CLSID_ShellLink, + NULL, + CLSCTX_INPROC_SERVER, + IID_IShellLink, + (void **)&psl); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: unable to create IShellLink instance!"); + return 1; + } + + IPersistFile *ppf; + + // Query IShellLink for the IPersistFile interface for + // saving the shortcut in persistent storage. + + hres = psl->QueryInterface(IID_IPersistFile, (void **)&ppf); + + if (SUCCEEDED (hres)) + { + // Set the path to the shortcut target. + hres = psl->SetPath(path_to_current_exe); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: SetPath failed!"); + } + + // Set the arguments of the shortcut. + CString args = " /H=\"" + m_WhereSource + "\" /B=\"" + m_WhereBuild + "\" /G=\"" + m_GeneratorDialog.m_GeneratorChoiceString + "\" /A=\"" + (m_AdvancedValues ? "TRUE" : "FALSE") + "\""; + + hres = psl->SetArguments(args); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: SetArguments failed!"); + } + + // Set the description of the shortcut. + hres = psl->SetDescription("Shortcut to CMakeSetup"); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: SetDescription failed!"); + } + + // Ensure that the string consists of ANSI characters. + WORD wszAr[MAX_PATH]; + LPWSTR wsz = (LPWSTR)wszAr; + MultiByteToWideChar(CP_ACP, 0, link_name, -1, (LPWSTR)(wsz), MAX_PATH); + + // Save the shortcut via the IPersistFile::Save member function. + hres = ppf->Save(wsz, TRUE); + + if (! SUCCEEDED (hres)) + { + AfxMessageBox ("Create shortcut: Save failed!"); + } + + // Release the pointer to IPersistFile. + ppf->Release (); + } + // Release the pointer to IShellLink. + psl->Release (); + + return 0; +} + +void CMakeSetupDialog::OnHelpButton() +{ + CMakeHelp dialog; + dialog.DoModal(); +} + +void CMakeSetupDialog::OnDeleteButton() +{ + std::string message = "Are you sure you want to delete the CMakeCache.txt file for:\n"; + message += m_WhereBuild; + if(::MessageBox(0, message.c_str(), "Delete Cache?", + MB_YESNO|MB_TASKMODAL) == IDNO) + { + return; + } + m_GeneratorPicked = false; + + if(m_WhereBuild != "" && this->m_CMakeInstance) + { + this->m_CMakeInstance->GetCacheManager()->DeleteCache(m_WhereBuild); + } + + // Make sure we are working from the cache on disk + this->LoadCacheFromDiskToGUI(); + + m_OKButton.EnableWindow(false); +} + +void CMakeSetupDialog::ShowAdvancedValues() +{ + m_CacheEntriesList.ShowAdvanced(); +} + +void CMakeSetupDialog::RemoveAdvancedValues() +{ + m_CacheEntriesList.HideAdvanced(); +} + + +void CMakeSetupDialog::OnSuppressDevValue() +{ +} + +void CMakeSetupDialog::OnDoubleclickedSuppressDevValue() +{ + this->OnSuppressDevValue(); +} + +void CMakeSetupDialog::OnAdvancedValues() +{ + this->UpdateData(); + if(m_AdvancedValues) + { + this->ShowAdvancedValues(); + } + else + { + this->RemoveAdvancedValues(); + } +} + +void CMakeSetupDialog::OnDoubleclickedAdvancedValues() +{ + this->OnAdvancedValues(); +} + +// Handle param or single dropped file. +void CMakeSetupDialog::ChangeDirectoriesFromFile(const char* arg) +{ + // Check if the argument refers to a CMakeCache.txt or + // CMakeLists.txt file. + std::string listPath; + std::string cachePath; + bool argIsFile = false; + if(cmSystemTools::FileIsDirectory(arg)) + { + std::string path = cmSystemTools::CollapseFullPath(arg); + cmSystemTools::ConvertToUnixSlashes(path); + std::string cacheFile = path; + cacheFile += "/CMakeCache.txt"; + std::string listFile = path; + listFile += "/CMakeLists.txt"; + if(cmSystemTools::FileExists(cacheFile.c_str())) + { + cachePath = path; + } + if(cmSystemTools::FileExists(listFile.c_str())) + { + listPath = path; + } + } + else if(cmSystemTools::FileExists(arg)) + { + argIsFile = true; + std::string fullPath = cmSystemTools::CollapseFullPath(arg); + std::string name = cmSystemTools::GetFilenameName(fullPath.c_str()); + name = cmSystemTools::LowerCase(name); + if(name == "cmakecache.txt") + { + cachePath = cmSystemTools::GetFilenamePath(fullPath.c_str()); + } + else if(name == "cmakelists.txt") + { + listPath = cmSystemTools::GetFilenamePath(fullPath.c_str()); + } + } + + // If there is a CMakeCache.txt file, use its settings. + if(cachePath.length() > 0) + { + cmCacheManager* cachem = m_CMakeInstance->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + if(cachem->LoadCache(cachePath.c_str()) && it.Find("CMAKE_HOME_DIRECTORY")) + { + std::string path = ConvertToWindowsPath(cachePath.c_str()); + m_WhereBuild = path.c_str(); + + path = ConvertToWindowsPath(it.GetValue()); + m_WhereSource = path.c_str(); + + m_GeneratorDialog.m_GeneratorChoiceString = _T(""); + return; + } + } + + // If there is a CMakeLists.txt file, use it as the source tree. + if(listPath.length() > 0) + { + std::string path = ConvertToWindowsPath(listPath.c_str()); + m_WhereSource = path.c_str(); + + if(argIsFile) + { + // Source CMakeLists.txt file given. It was probably dropped + // onto the window or executable. Default to an in-source + // build. + m_WhereBuild = path.c_str(); + } + else + { + // Source directory given on command line. Use current working + // directory as build tree. + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + path = ConvertToWindowsPath(cwd.c_str()); + m_WhereBuild = path.c_str(); + } + } +} + + +// The framework calls this member function when the user releases the +// left mouse button over a window that has registered itself as the +// recipient of dropped files. + +void CMakeSetupDialog::OnDropFiles(HDROP hDropInfo) +{ + UINT nb_files = DragQueryFile(hDropInfo, 0xFFFFFFFF, NULL, 0); + if (nb_files > 0) + { + UINT buffer_size = DragQueryFile(hDropInfo, 0, NULL, 0); + char *buffer = new char [buffer_size + 1]; + DragQueryFile(hDropInfo, 0, buffer, buffer_size + 1); + + this->ChangeDirectoriesFromFile(buffer); + delete [] buffer; + + this->m_WhereSourceControl.SetWindowText(this->m_WhereSource); + this->m_WhereBuildControl.SetWindowText(this->m_WhereBuild); + + this->UpdateData(FALSE); + + this->OnChangeWhereSource(); + this->OnChangeWhereBuild(); + } + + DragFinish(hDropInfo); +} + +BOOL CMakeSetupDialog::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) +{ + CDialog::OnSetCursor(pWnd, nHitTest, message); + if(m_Cursor == LoadCursor(NULL, IDC_WAIT)) + { + ::SetCursor(m_Cursor); + } + return true; +} diff --git a/Source/MFCDialog/CMakeSetupDialog.h b/Source/MFCDialog/CMakeSetupDialog.h new file mode 100644 index 000000000..65a53d6c5 --- /dev/null +++ b/Source/MFCDialog/CMakeSetupDialog.h @@ -0,0 +1,152 @@ +/*========================================================================= + +Program: CMake - Cross-Platform Makefile Generator +Module: $RCSfile: CMakeSetupDialog.h,v $ +Language: C++ +Date: $Date: 2008-03-12 02:51:56 $ +Version: $Revision: 1.31 $ + +Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// CMakeSetupDialogDlg.h : header file +// + +#if !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) +#define AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +#include "PropertyList.h" +#include "CMakeGenDialog.h" + +///////////////////////////////////////////////////////////////////////////// +// CMakeSetupDialog dialog + +class CMakeCommandLineInfo; +class cmake; + +class CMakeSetupDialog : public CDialog +{ +// Construction +public: + CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo, + CWnd* pParent = NULL); + + ~CMakeSetupDialog(); + // return the cmake that is currently being used + cmake *GetCMakeInstance() { + return m_CMakeInstance; } +protected: + //! Load cache file from m_WhereBuild and display in GUI editor + void LoadCacheFromDiskToGUI(); + //! Save GUI values to cmCacheManager and then save to disk. + void SaveCacheFromGUI(); + void SaveToRegistry(); + void LoadFromRegistry(); + bool Browse(CString&, const char* title); + void ReadRegistryValue(HKEY hKey, + CString *val, + const char *key, + const char *aadefault); + void ShowAdvancedValues(); + void RemoveAdvancedValues(); + // Dialog Data + //{{AFX_DATA(CMakeSetupDialog) + enum { IDD = IDD_CMakeSetupDialog_DIALOG }; + CButton m_AdvancedValuesControl; + CButton m_SuppressDevWarningsControl; + CButton m_BrowseSource; + CButton m_BrowseBuild; + CButton m_HelpButton; + CButton m_DeleteButton; + CButton m_OKButton; + CButton m_CancelButton; + CString m_WhereSource; + CString m_WhereBuild; + CButton m_ListFrame; + bool m_BuildPathChanged; + CComboBox m_WhereSourceControl; + CComboBox m_WhereBuildControl; + CPropertyList m_CacheEntriesList; + CStatic m_MouseHelp; + CStatic m_StatusDisplay; + CButton m_Configure; + BOOL m_AdvancedValues; + BOOL m_SuppressDevValue; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMakeSetupDialog) +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + void RunCMake(bool generateProjectFiles); + // copy from the cache manager to the cache edit list box + void FillCacheGUIFromCacheManager(); + // copy from the list box to the cache manager + void FillCacheManagerFromCacheGUI(); + // Create a shortcut on the desktop with the current Source/Build dir. + int CreateShortcut(); + + // Set initial directories from a file path. + void ChangeDirectoriesFromFile(const char* arg); + + HICON m_hIcon; + CString m_RegistryKey; + CString m_PathToExecutable; + // Generated message map functions + //{{AFX_MSG(CMakeSetupDialog) + virtual BOOL OnInitDialog(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnCancel(); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + afx_msg void OnBrowseWhereSource(); + virtual void OnConfigure(); + afx_msg void OnBrowseWhereBuild(); + afx_msg void OnChangeWhereBuild(); + afx_msg void OnSelendokWhereBuild(); + afx_msg void OnChangeWhereSource(); + afx_msg void OnSelendokWhereSource(); + afx_msg void OnSize(UINT nType, int cx, int cy); + afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI ); + afx_msg void OnOk(); + afx_msg void OnHelpButton(); + afx_msg void OnDeleteButton(); + afx_msg void OnAdvancedValues(); + afx_msg void OnDoubleclickedAdvancedValues(); + afx_msg void OnSuppressDevValue(); + afx_msg void OnDoubleclickedSuppressDevValue(); + afx_msg void OnDropFiles(HDROP); + afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + + int m_oldCX; + int m_oldCY; + float m_deltaXRemainder; + cmake *m_CMakeInstance; + HCURSOR m_Cursor; + bool m_RunningConfigure; + bool m_GeneratorPicked; + + CCMakeGenDialog m_GeneratorDialog; + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) diff --git a/Source/MFCDialog/CMakeSetupManifest.xml b/Source/MFCDialog/CMakeSetupManifest.xml new file mode 100644 index 000000000..1a662f34a --- /dev/null +++ b/Source/MFCDialog/CMakeSetupManifest.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Source/MFCDialog/MakeHelp.cpp b/Source/MFCDialog/MakeHelp.cpp new file mode 100644 index 000000000..53ee3ee5b --- /dev/null +++ b/Source/MFCDialog/MakeHelp.cpp @@ -0,0 +1,43 @@ +// MakeHelp.cpp : implementation file +// + +#include "stdafx.h" +#include "CMakeSetup.h" +#include "MakeHelp.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CMakeHelp dialog + + +CMakeHelp::CMakeHelp(CWnd* pParent /*=NULL*/) + : CDialog(CMakeHelp::IDD, pParent) +{ + //{{AFX_DATA_INIT(CMakeHelp) + m_HelpMessage = _T("CMake is used to configure and generate build files for software projects. The basic steps for configuring a project are as follows:\r\n\r\n1. Select the source directory for the project. This should contain the CMakeLists.txt files for the project.\r\n\r\n2. Select the build directory for the project. This is the directory where the project will be built. It can be the same or a different directory than the source directory. For easy clean up, a separate build directory is recommended. CMake will create the directory if it does not exist.\r\n\r\n3. Once the source and binary directories are selected, it is time to press the Configure button. This will cause CMake to read all of the input files and discover all the variables used by the project. The first time a variable is displayed it will be in Red. Users should inspect red variables making sure the values are correct. For some projects the Configure process can be iterative, so continue to press the Configure button until there are no longer red entries.\r\n\r\n4. Once there are no longer red entries, you should click the OK button. This will write the build files to the build directory and exit CMake."); + //}}AFX_DATA_INIT +} + + +void CMakeHelp::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CMakeHelp) + DDX_Text(pDX, IDC_EDIT1, m_HelpMessage); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CMakeHelp, CDialog) + //{{AFX_MSG_MAP(CMakeHelp) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CMakeHelp message handlers diff --git a/Source/MFCDialog/MakeHelp.h b/Source/MFCDialog/MakeHelp.h new file mode 100644 index 000000000..a91e1a982 --- /dev/null +++ b/Source/MFCDialog/MakeHelp.h @@ -0,0 +1,62 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: MakeHelp.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#if !defined(AFX_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_) +#define AFX_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// MakeHelp.h : header file +// + +///////////////////////////////////////////////////////////////////////////// +// CMakeHelp dialog + +class CMakeHelp : public CDialog +{ +// Construction +public: + CMakeHelp(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CMakeHelp) + enum { IDD = IDD_CMAKE_HELP_DIALOG }; + CString m_HelpMessage; + //}}AFX_DATA + + +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMakeHelp) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CMakeHelp) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_MAKEHELP_H__DD327AED_1E65_43E8_A605_0933065D1757__INCLUDED_) diff --git a/Source/MFCDialog/PathDialog.cpp b/Source/MFCDialog/PathDialog.cpp new file mode 100644 index 000000000..d7bd42798 --- /dev/null +++ b/Source/MFCDialog/PathDialog.cpp @@ -0,0 +1,377 @@ +////////////////////////////////////////////////////////////////////////// +//PathDialog.h file +// +//Written by Nguyen Tan Hung +////////////////////////////////////////////////////////////////////////// + +#include "stdafx.h" +#include "PathDialog.h" +#include + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +#define IDC_FOLDERTREE 0x3741 +#define IDC_TITLE 0x3742 +#define IDC_STATUSTEXT 0x3743 + +#define IDC_NEW_EDIT_PATH 0x3744 + +// Class CDlgWnd +BEGIN_MESSAGE_MAP(CPathDialogSub, CWnd) + ON_BN_CLICKED(IDOK, OnOK) + ON_EN_CHANGE(IDC_NEW_EDIT_PATH, OnChangeEditPath) + END_MESSAGE_MAP() + + void CPathDialogSub::OnOK() +{ + ::GetWindowText(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH), + m_pPathDialog->m_szPathName, MAX_PATH); + + if(CPathDialog::MakeSurePathExists(m_pPathDialog->m_szPathName)==0) + { + m_pPathDialog->m_bGetSuccess=TRUE; + ::EndDialog(m_pPathDialog->m_hWnd, IDOK); + } + else + { + ::SetFocus(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH)); + } +} + +void CPathDialogSub::OnChangeEditPath() +{ + ::GetWindowText(::GetDlgItem(m_hWnd, IDC_NEW_EDIT_PATH), + m_pPathDialog->m_szPathName, MAX_PATH); + BOOL bEnableOKButton = (_tcslen(m_pPathDialog->m_szPathName)>0); + SendMessage(BFFM_ENABLEOK, 0, bEnableOKButton); +} +///////////////////////////////////////////////////////////////////////////// +// CPathDialog dialog + + +CPathDialog::CPathDialog(LPCTSTR lpszCaption, + LPCTSTR lpszTitle, + LPCTSTR lpszInitialPath, + CWnd* pParent) +{ + m_hWnd=NULL; + m_PathDialogSub.m_pPathDialog= this; + m_bParentDisabled = FALSE; + + // Get the true parent of the dialog + m_pParentWnd = CWnd::GetSafeOwner(pParent); + + m_lpszCaption = lpszCaption; + m_lpszInitialPath = lpszInitialPath; + + memset(&m_bi, 0, sizeof(BROWSEINFO) ); + m_bi.hwndOwner = (m_pParentWnd==NULL)?NULL:m_pParentWnd->GetSafeHwnd(); + m_bi.pszDisplayName = 0; + m_bi.pidlRoot = 0; + m_bi.ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT; + m_bi.lpfn = BrowseCallbackProc; + m_bi.lpszTitle = lpszTitle; +} + + +///////////////////////////////////////////////////////////////////////////// +// CPathDialog message handlers + +CString CPathDialog::GetPathName() +{ + return CString(m_szPathName); +} + +int CALLBACK CPathDialog::BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam, LPARAM pData) +{ + CPathDialog* pDlg = (CPathDialog*)pData; + + switch(uMsg) + { + case BFFM_INITIALIZED: + { + RECT rc; + HWND hEdit; + HFONT hFont; + + pDlg->m_hWnd = hwnd; + + if(pDlg->m_lpszCaption!=NULL) + { + ::SetWindowText(hwnd, pDlg->m_lpszCaption); + } + + VERIFY(pDlg->m_PathDialogSub.SubclassWindow(hwnd)); + ::ShowWindow(::GetDlgItem(hwnd, IDC_STATUSTEXT), SW_HIDE); + ::GetWindowRect(::GetDlgItem(hwnd, IDC_FOLDERTREE), &rc); + rc.bottom = rc.top - 4; + rc.top = rc.bottom - 23; + ::ScreenToClient(hwnd, (LPPOINT)&rc); + ::ScreenToClient(hwnd, ((LPPOINT)&rc)+1); + hEdit = ::CreateWindowEx(WS_EX_CLIENTEDGE, _T("EDIT"), _T(""), + WS_CHILD|WS_TABSTOP|WS_VISIBLE|ES_AUTOHSCROLL, + rc.left, rc.top, + rc.right-rc.left, rc.bottom-rc.top, + hwnd, NULL, NULL, NULL); + ::SetWindowLong(hEdit, GWL_ID, IDC_NEW_EDIT_PATH); + ::ShowWindow(hEdit, SW_SHOW); + + hFont = (HFONT)::SendMessage(hwnd, WM_GETFONT, 0, 0); + ::SendMessage(hEdit, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE, 0)); + + LPCTSTR lpszPath = pDlg->m_lpszInitialPath; + TCHAR szTemp[MAX_PATH]; + if(lpszPath==NULL) + { + ::GetCurrentDirectory(MAX_PATH, szTemp ); + lpszPath = szTemp; + } + // WParam is TRUE since you are passing a path. + // It would be FALSE if you were passing a pidl. + ::SendMessage(hwnd,BFFM_SETSELECTION,TRUE, + (LPARAM)lpszPath); + break; + } + case BFFM_SELCHANGED: + { + char szSelection[MAX_PATH]; + if(!::SHGetPathFromIDList((LPITEMIDLIST)lParam, szSelection) || + (szSelection[1] !=':' && szSelection[1] != '\\')) + { + szSelection[0] = '\0'; + ::SendMessage(hwnd, BFFM_ENABLEOK, 0, FALSE); + } + else + { + ::SendMessage(hwnd, BFFM_ENABLEOK, 0, TRUE); + } + ::SendMessage(hwnd,BFFM_SETSTATUSTEXT,0,(LPARAM)szSelection); + ::SetWindowText(::GetDlgItem(hwnd, IDC_NEW_EDIT_PATH), szSelection); + break; + } + default: + break; + } + return 0; +} + + + +int CPathDialog::DoModal() +{ + + ///////////////////////////////////////////////////////// + TCHAR szPathTemp[MAX_PATH]; + m_bi.lpfn = BrowseCallbackProc; // address of callback function + m_bi.lParam = (LPARAM)this; // pass address of object to callback function + m_bi.pszDisplayName = szPathTemp; + + LPITEMIDLIST pidl; + LPMALLOC pMalloc; + + int iResult=-1; + if(SUCCEEDED(SHGetMalloc(&pMalloc))) + { + m_bGetSuccess = FALSE; + pidl = SHBrowseForFolder(&m_bi); + if (pidl!=NULL) + { +#if defined(_WIN64) && defined(__INTEL_COMPILER) +# pragma warning ( disable : 167) +#endif + // In C++: + pMalloc->Free(pidl); + //In C: + //pMalloc->lpVtbl->Free(pMalloc,pidl); + //pMalloc->lpVtbl->Release(pMalloc); + } + if(m_bGetSuccess) + { + iResult = IDOK; + } + pMalloc->Release(); + } + + if(m_bParentDisabled && (m_pParentWnd!=NULL)) + { + m_pParentWnd->EnableWindow(TRUE); + } + m_bParentDisabled=FALSE; + + return iResult; +} + +BOOL CPathDialog::IsFileNameValid(LPCTSTR /* lpFileName */) +{ + return TRUE; +} + +const TCHAR c_FolderDoesNotExist[] = _T( + "The folder:\n\n" + "%s\n\n" + "does not exist. Do you want the folder to be created?"); +const TCHAR c_szErrInvalidPath[] = _T( + "The folder:" + "\n\n" + "%s\n\n" + "is invalid. Please reenter."); +const TCHAR c_szErrCreatePath[] = _T( + "The folder:" + "\n\n" + "%s" + "\n\ncan not be created. Please double check."); + +//return -1: user break; +//return 0: no error +//return 1: lpPath is invalid +//return 2: can not create lpPath +int CPathDialog::MakeSurePathExists(LPCTSTR lpPath) +{ + CString strMsg; + int iRet = -1; + try + { + //validate path + iRet=Touch(lpPath, TRUE); + if(iRet!=0) + { + throw iRet; + } + + if(_taccess(lpPath, 0)==0) + { + return (int)0; + } + + strMsg.Format(c_FolderDoesNotExist, lpPath); + if(AfxMessageBox(strMsg, MB_YESNO|MB_ICONQUESTION) == IDYES) + { + //create path + iRet=Touch(lpPath, FALSE); + if(iRet!=0) + { + throw iRet; + } + } + return 0; + } + catch(int nErrCode) + { + switch(nErrCode) + { + case 1: + strMsg.Format(c_szErrInvalidPath, lpPath); + break; + case 2: + default: + strMsg.Format(c_szErrCreatePath, lpPath); + break; + } + + AfxMessageBox(strMsg, MB_OK|MB_ICONEXCLAMATION); + } + + return iRet; +} + +//return 0: no error +//return 1: lpPath is invalid +//return 2: lpPath can not be created(bValidate==FALSE) +int CPathDialog::Touch(LPCTSTR lpPath, BOOL bValidate) +{ + if(lpPath==NULL) + { + return 1; + } + + TCHAR szPath[MAX_PATH]; + _tcscpy(szPath, lpPath); + size_t nLen = _tcslen(szPath); + + int i; + if(nLen==3) + { + if(!bValidate) + { + if(_access(szPath, 0)!=0) + { + return 2; + } + } + return 0; + } + + i = 3; + BOOL bLastOne=TRUE; + LPTSTR lpCurrentName; + while(szPath[i]!=0) + { + lpCurrentName = &szPath[i]; + while( (szPath[i]!=0) && (szPath[i]!=_T('\\')) ) + { + i++; + } + + bLastOne =(szPath[i]==0); + szPath[i] = 0; + + if(!bValidate) + { + CreateDirectory(szPath, NULL); + if(_taccess(szPath, 0)!=0) + { + return 2; + } + } + + if(bLastOne) + { + break; //it's done + } + else + { + szPath[i] = _T('\\'); + } + + i++; + } + + return (bLastOne?0:1); +} + +//return 0: ok +//return 1: error +int CPathDialog::ConcatPath(LPTSTR lpRoot, LPCTSTR lpMorePath) +{ + if(lpRoot==NULL) + { + return 1; + } + + size_t nLen = _tcslen(lpRoot); + + if(nLen<3) + { + return 1; + } + + if(lpMorePath==NULL) + { + return 0; + } + + if(nLen==3) + { + _tcscat(lpRoot, lpMorePath); + return 0; + } + + _tcscat(lpRoot, _T("\\")); + _tcscat(lpRoot, lpMorePath); + + return 0; +} diff --git a/Source/MFCDialog/PathDialog.h b/Source/MFCDialog/PathDialog.h new file mode 100644 index 000000000..be84c5235 --- /dev/null +++ b/Source/MFCDialog/PathDialog.h @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: PathDialog.h,v $ + Language: C++ + Date: $Date: 2002-10-23 22:03:27 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +////////////////////////////////////////////////////////////////////////// +//PathDialog.h file +// +//Written by Nguyen Tan Hung +////////////////////////////////////////////////////////////////////////// + +#if !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_) +#define AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// PathDialog.h : header file +// +#include "shlobj.h" + +class CPathDialog; + +// CPathDialogSub - intercepts messages from child controls +class CPathDialogSub : public CWnd +{ + friend CPathDialog; +public: + CPathDialog* m_pPathDialog; +protected: + afx_msg void OnOK(); // OK button clicked + afx_msg void OnChangeEditPath(); + DECLARE_MESSAGE_MAP() +private: +}; + +///////////////////////////////////////////////////////////////////////////// +// CPathDialog dialog + +class CPathDialog +{ + friend CPathDialogSub; +// Construction +public: + CPathDialog(LPCTSTR lpszCaption=NULL, + LPCTSTR lpszTitle=NULL, + LPCTSTR lpszInitialPath=NULL, + CWnd* pParent = NULL); + + CString GetPathName(); + virtual int DoModal(); + + static int Touch(LPCTSTR lpPath, BOOL bValidate=TRUE); + static int MakeSurePathExists(LPCTSTR lpPath); + static BOOL IsFileNameValid(LPCTSTR lpFileName); + static int ConcatPath(LPTSTR lpRoot, LPCTSTR lpMorePath); + +private: + static int CALLBACK BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam, LPARAM pData); + + LPCTSTR m_lpszCaption; + LPCTSTR m_lpszInitialPath; + + TCHAR m_szPathName[MAX_PATH]; + + BROWSEINFO m_bi; + HWND m_hWnd; + CWnd* m_pParentWnd; + BOOL m_bParentDisabled; + BOOL m_bGetSuccess; + + CPathDialogSub m_PathDialogSub; + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_) diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp new file mode 100644 index 000000000..e31645147 --- /dev/null +++ b/Source/MFCDialog/PropertyList.cpp @@ -0,0 +1,847 @@ +// PropertyList.cpp : implementation file +// + +#include "stdafx.h" +#include "shellapi.h" +#include "CMakeSetup.h" +#include "CMakeSetupDialog.h" +#include "PathDialog.h" +#include "../cmCacheManager.h" +#include "../cmSystemTools.h" +#include "../cmake.h" +#define IDC_PROPCMBBOX 712 +#define IDC_PROPEDITBOX 713 +#define IDC_PROPBTNCTRL 714 +#define IDC_PROPCHECKBOXCTRL 715 + +///////////////////////////////////////////////////////////////////////////// +// CPropertyList + +CPropertyList::CPropertyList() +{ + m_Dirty = false; + m_ShowAdvanced = false; + m_curSel = -1; +} + +CPropertyList::~CPropertyList() +{ + for(std::set::iterator i = m_PropertyItems.begin(); + i != m_PropertyItems.end(); ++i) + { + delete *i; + } +} + + +BEGIN_MESSAGE_MAP(CPropertyList, CListBox) + //{{AFX_MSG_MAP(CPropertyList) + ON_WM_CREATE() + ON_WM_VSCROLL() + ON_CONTROL_REFLECT(LBN_SELCHANGE, OnSelchange) + ON_WM_LBUTTONUP() + ON_WM_KILLFOCUS() + ON_WM_LBUTTONDOWN() + ON_WM_RBUTTONUP() + ON_WM_MOUSEMOVE() + //}}AFX_MSG_MAP + ON_CBN_KILLFOCUS(IDC_PROPCMBBOX, OnKillfocusCmbBox) + ON_CBN_SELCHANGE(IDC_PROPCMBBOX, OnSelchangeCmbBox) + ON_EN_KILLFOCUS(IDC_PROPEDITBOX, OnKillfocusEditBox) + ON_EN_CHANGE(IDC_PROPEDITBOX, OnChangeEditBox) + ON_BN_CLICKED(IDC_PROPBTNCTRL, OnButton) + ON_BN_CLICKED(IDC_PROPCHECKBOXCTRL, OnCheckBox) + ON_COMMAND(42, OnDelete) + ON_COMMAND(43, OnHelp) + ON_COMMAND(44, OnIgnore) +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropertyList message handlers + +BOOL CPropertyList::PreCreateWindow(CREATESTRUCT& cs) +{ + if (!CListBox::PreCreateWindow(cs)) + return FALSE; + + cs.style &= ~(LBS_OWNERDRAWVARIABLE | LBS_SORT); + cs.style |= LBS_OWNERDRAWFIXED; + + m_bTracking = FALSE; + m_nDivider = 0; + m_bDivIsSet = FALSE; + + return TRUE; +} + +void CPropertyList::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) +{ + lpMeasureItemStruct->itemHeight = 20; //pixels +} + + +void CPropertyList::DrawItem(LPDRAWITEMSTRUCT lpDIS) +{ + CDC dc; + dc.Attach(lpDIS->hDC); + CRect rectFull = lpDIS->rcItem; + CRect rect = rectFull; + if (m_nDivider==0) + m_nDivider = rect.Width() / 2; + rect.left = m_nDivider; + CRect rect2 = rectFull; + rect2.right = rect.left - 1; + UINT nIndex = lpDIS->itemID; + + if (nIndex != (UINT) -1) + { + //get the CPropertyItem for the current row + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(nIndex); + //draw two rectangles, one for each row column + if(pItem->m_NewValue) + { + dc.FillSolidRect(rect2,RGB(255,100, 100)); + } + else + { + dc.FillSolidRect(rect2,RGB(192,192,192)); + } + + dc.DrawEdge(rect2,EDGE_SUNKEN,BF_BOTTOMRIGHT); + dc.DrawEdge(rect,EDGE_SUNKEN,BF_BOTTOM); + + + //write the property name in the first rectangle + dc.SetBkMode(TRANSPARENT); + dc.DrawText(pItem->m_propName,CRect(rect2.left+3,rect2.top+3, + rect2.right-3,rect2.bottom+3), + DT_LEFT | DT_SINGLELINE); + + //write the initial property value in the second rectangle + dc.DrawText(pItem->m_curValue,CRect(rect.left+3,rect.top+3, + rect.right+3,rect.bottom+3), + DT_LEFT | DT_SINGLELINE); + } + dc.Detach(); +} + +int CPropertyList::AddItem(CString txt) +{ + int nIndex = AddString(txt); + return nIndex; +} +// order = 0 sorted +// order = 1 add to top +// order = 2 add to bottom +int CPropertyList::AddPropItem(CPropertyItem* pItem, int order) +{ + if(pItem->m_Advanced && ! m_ShowAdvanced) + { + m_PropertyItems.insert(pItem); + return 0; + } + this->HideControls(); + int nIndex; + if(order) + { + if(order == 1) + { + order = 0; + } + if(order == 2) + { + order = -1; + } + nIndex = InsertString(order, _T("")); + } + else + { + nIndex = AddString(pItem->m_propName); + } + SetItemDataPtr(nIndex,pItem); + m_PropertyItems.insert(pItem); + return nIndex; +} + +void CPropertyList::AddProperty(const char* name, + const char* value, + const char* helpString, + int type, + const char* comboItems, + bool reverseOrder, + bool advanced) +{ + CPropertyItem* pItem = 0; + for(std::set::iterator i = m_PropertyItems.begin(); + i != m_PropertyItems.end(); ++i) + { + CPropertyItem* item = *i; + if(item->m_propName == name) + { + pItem = item; + if(pItem->m_curValue != value) + { + pItem->m_curValue = value; + pItem->m_HelpString = helpString; + InvalidateList(); + } + pItem->m_Advanced = advanced; + return; + } + } + // if it is not found, then create a new one + if(!pItem) + { + pItem = new CPropertyItem(name, value, helpString, type, comboItems); + pItem->m_NewValue = true; + } + pItem->m_Advanced = advanced; + int order = 0; + if(reverseOrder) + { + order = 1; + } + this->AddPropItem(pItem, order); + return; +} + +int CPropertyList::OnCreate(LPCREATESTRUCT lpCreateStruct) +{ + if (CListBox::OnCreate(lpCreateStruct) == -1) + return -1; + + m_bDivIsSet = FALSE; + m_nDivider = 0; + m_bTracking = FALSE; + + m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE); + m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW); + + m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif")); + + return 0; +} + +void CPropertyList::OnSelchange() +{ + CRect rect; + CString lBoxSelText; + + GetItemRect(m_curSel,rect); + rect.left = m_nDivider; + + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + + if (m_btnCtrl) + m_btnCtrl.ShowWindow(SW_HIDE); + if (m_CheckBoxControl) + m_CheckBoxControl.ShowWindow(SW_HIDE); + + if (pItem->m_nItemType==CPropertyList::COMBO) + { + //display the combo box. If the combo box has already been + //created then simply move it to the new location, else create it + m_nLastBox = 0; + if (m_cmbBox) + m_cmbBox.MoveWindow(rect); + else + { + rect.bottom += 100; + m_cmbBox.Create(CBS_DROPDOWNLIST + | CBS_NOINTEGRALHEIGHT | WS_VISIBLE + | WS_CHILD | WS_BORDER, + rect,this,IDC_PROPCMBBOX); + m_cmbBox.SetFont(&m_SSerif8Font); + } + + //add the choices for this particular property + CString cmbItems = pItem->m_cmbItems; + lBoxSelText = pItem->m_curValue; + + m_cmbBox.ResetContent(); + int i,i2; + i=0; + while ((i2=cmbItems.Find('|',i)) != -1) + { + m_cmbBox.AddString(cmbItems.Mid(i,i2-i)); + i=i2+1; + } + if(i != 0) + m_cmbBox.AddString(cmbItems.Mid(i)); + + m_cmbBox.ShowWindow(SW_SHOW); + m_cmbBox.SetFocus(); + + //jump to the property's current value in the combo box + int j = m_cmbBox.FindStringExact(0,lBoxSelText); + if (j != CB_ERR) + m_cmbBox.SetCurSel(j); + else + m_cmbBox.SetCurSel(0); + } + else if (pItem->m_nItemType==CPropertyList::EDIT) + { + //display edit box + m_nLastBox = 1; + m_prevSel = m_curSel; + rect.bottom -= 3; + if (m_editBox) + m_editBox.MoveWindow(rect); + else + { + m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE + | WS_CHILD | WS_BORDER, + rect,this,IDC_PROPEDITBOX); + m_editBox.SetFont(&m_SSerif8Font); + } + + lBoxSelText = pItem->m_curValue; + + m_editBox.ShowWindow(SW_SHOW); + m_editBox.SetFocus(); + //set the text in the edit box to the property's current value + m_editBox.SetWindowText(lBoxSelText); + } + else if (pItem->m_nItemType == CPropertyList::CHECKBOX) + { + rect.bottom -= 3; + if (m_CheckBoxControl) + m_CheckBoxControl.MoveWindow(rect); + else + { + m_CheckBoxControl.Create("check",BS_CHECKBOX + | BM_SETCHECK |BS_LEFTTEXT + | WS_VISIBLE | WS_CHILD, + rect,this,IDC_PROPCHECKBOXCTRL); + m_CheckBoxControl.SetFont(&m_SSerif8Font); + } + + lBoxSelText = pItem->m_curValue; + + m_CheckBoxControl.ShowWindow(SW_SHOW); + m_CheckBoxControl.SetFocus(); + //set the text in the edit box to the property's current value + if(lBoxSelText == "ON") + { + m_CheckBoxControl.SetCheck(1); + } + else + { + m_CheckBoxControl.SetCheck(0); + } + } + + else + { + DisplayButton(rect); + m_nLastBox = 1; + m_prevSel = m_curSel; + rect.bottom -= 3; + rect.right -= 25; + if (m_editBox) + { + m_editBox.MoveWindow(rect); + } + else + { + m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE + | WS_CHILD | WS_BORDER, + rect,this,IDC_PROPEDITBOX); + m_editBox.SetFont(&m_SSerif8Font); + } + + lBoxSelText = pItem->m_curValue; + + m_editBox.ShowWindow(SW_SHOW); + m_editBox.SetFocus(); + //set the text in the edit box to the property's current value + m_editBox.SetWindowText(lBoxSelText); + } +} + +void CPropertyList::DisplayButton(CRect region) +{ + //displays a button if the property is a file/color/font chooser + m_nLastBox = 2; + m_prevSel = m_curSel; + + if (region.Width() > 25) + region.left = region.right - 25; + region.bottom -= 3; + + if (m_btnCtrl) + m_btnCtrl.MoveWindow(region); + else + { + m_btnCtrl.Create("...",BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, + region,this,IDC_PROPBTNCTRL); + m_btnCtrl.SetFont(&m_SSerif8Font); + } + + m_btnCtrl.ShowWindow(SW_SHOW); + m_btnCtrl.SetFocus(); +} + +void CPropertyList::OnKillFocus(CWnd* pNewWnd) +{ + //m_btnCtrl.ShowWindow(SW_HIDE); + + CListBox::OnKillFocus(pNewWnd); +} + +void CPropertyList::OnKillfocusCmbBox() +{ + m_cmbBox.ShowWindow(SW_HIDE); + + Invalidate(); +} + +void CPropertyList::OnKillfocusEditBox() +{ + CString newStr; + m_editBox.ShowWindow(SW_HIDE); + + Invalidate(); +} + +void CPropertyList::OnSelchangeCmbBox() +{ + CString selStr; + if (m_cmbBox) + { + m_cmbBox.GetLBText(m_cmbBox.GetCurSel(),selStr); + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + pItem->m_curValue = selStr; + m_Dirty = true; + } +} + +void CPropertyList::OnChangeEditBox() +{ + CString newStr; + m_editBox.GetWindowText(newStr); + + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + if(pItem->m_curValue != newStr) + { + pItem->m_curValue = newStr; + m_Dirty = true; + } +} + +void CPropertyList::HideControls() +{ + if(m_editBox) + { + m_editBox.ShowWindow(SW_HIDE); + } + if(m_cmbBox) + { + m_cmbBox.ShowWindow(SW_HIDE); + } + if(m_CheckBoxControl) + { + m_CheckBoxControl.ShowWindow(SW_HIDE); + } + if(m_btnCtrl) + { + m_btnCtrl.ShowWindow(SW_HIDE); + } +} + +void CPropertyList::OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar ) +{ + this->HideControls(); + CListBox::OnVScroll(nSBCode, nPos, pScrollBar); +} + +void CPropertyList::OnCheckBox() +{ + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + if(m_CheckBoxControl.GetCheck()) + { + pItem->m_curValue = "ON"; + } + else + { + pItem->m_curValue = "OFF"; + } + m_Dirty = true; +} + + +void CPropertyList::OnButton() +{ + if(m_PropertyItems.size() == 0) + { + return; + } + + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + + // The dialogs might change the working directory. Save it. + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + + //display the appropriate common dialog depending on what type + //of chooser is associated with the property + + if (pItem->m_nItemType == CPropertyList::FILE) + { + CString SelectedFile; + CString Filter("All Files (*.*)||"); + + CFileDialog FileDlg(TRUE, NULL, NULL, NULL, + Filter); + CString initialDir; + CString currPath = pItem->m_curValue; + if (currPath.Right(9) == "-NOTFOUND" || currPath == "NOTFOUND") + { + currPath = ""; + } + if (currPath.GetLength() > 0) + { + int endSlash = currPath.ReverseFind('\\'); + if(endSlash == -1) + { + endSlash = currPath.ReverseFind('/'); + } + initialDir = currPath.Left(endSlash); + } + initialDir.Replace("/", "\\"); + FileDlg.m_ofn.lpstrTitle = "Select file"; + if (currPath.GetLength() > 0) + FileDlg.m_ofn.lpstrInitialDir = initialDir; + + if(IDOK == FileDlg.DoModal()) + { + SelectedFile = FileDlg.GetPathName(); + + m_btnCtrl.ShowWindow(SW_HIDE); + std::string path = SelectedFile; + cmSystemTools::ConvertToUnixSlashes(path); + pItem->m_curValue = path.c_str(); + m_Dirty = true; + InvalidateList(); + } + } + else if (pItem->m_nItemType == CPropertyList::PATH) + { + CString initialDir = pItem->m_curValue; + // convert back to windos style path + initialDir.Replace("/", "\\"); + CString title = "Setting Cache Value: "; + title += pItem->m_propName; + CPathDialog dlg("Select Path", title, initialDir); + if(dlg.DoModal()==IDOK) + { + CString SelectedFile = dlg.GetPathName(); + m_btnCtrl.ShowWindow(SW_HIDE); + std::string path = SelectedFile; + cmSystemTools::ConvertToUnixSlashes(path); + pItem->m_curValue = path.c_str(); + m_Dirty = true; + InvalidateList(); + } + } + + cmSystemTools::ChangeDirectory(cwd.c_str()); +} + +void CPropertyList::OnLButtonUp(UINT nFlags, CPoint point) +{ + if (m_bTracking) + { + //if columns were being resized then this indicates + //that mouse is up so resizing is done. Need to redraw + //columns to reflect their new widths. + + m_bTracking = FALSE; + //if mouse was captured then release it + if (GetCapture()==this) + ::ReleaseCapture(); + + ::ClipCursor(NULL); + + CClientDC dc(this); + InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm)); + //set the divider position to the new value + m_nDivider = point.x; + + //redraw + Invalidate(); + } + else + { + BOOL loc; + int i = ItemFromPoint(point,loc); + m_curSel = i; + CListBox::OnLButtonUp(nFlags, point); + } +} + +void CPropertyList::OnLButtonDown(UINT nFlags, CPoint point) +{ + if ((point.x>=m_nDivider-5) && (point.x<=m_nDivider+5)) + { + //if mouse clicked on divider line, then start resizing + + ::SetCursor(m_hCursorSize); + + CRect windowRect; + GetWindowRect(windowRect); + windowRect.left += 10; windowRect.right -= 10; + //do not let mouse leave the list box boundary + ::ClipCursor(windowRect); + + if (m_cmbBox) + m_cmbBox.ShowWindow(SW_HIDE); + if (m_editBox) + m_editBox.ShowWindow(SW_HIDE); + + CRect clientRect; + GetClientRect(clientRect); + + m_bTracking = TRUE; + m_nDivTop = clientRect.top; + m_nDivBtm = clientRect.bottom; + m_nOldDivX = point.x; + + CClientDC dc(this); + InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm)); + + //capture the mouse + SetCapture(); + } + else + { + m_bTracking = FALSE; + CListBox::OnLButtonDown(nFlags, point); + } +} + +void CPropertyList::OnMouseMove(UINT nFlags, CPoint point) +{ + if (m_bTracking) + { + //move divider line to the mouse pos. if columns are + //currently being resized + CClientDC dc(this); + //remove old divider line + InvertLine(&dc,CPoint(m_nOldDivX,m_nDivTop),CPoint(m_nOldDivX,m_nDivBtm)); + //draw new divider line + InvertLine(&dc,CPoint(point.x,m_nDivTop),CPoint(point.x,m_nDivBtm)); + m_nOldDivX = point.x; + } + else if ((point.x >= m_nDivider-5) && (point.x <= m_nDivider+5)) + //set the cursor to a sizing cursor if the cursor is over the row divider + ::SetCursor(m_hCursorSize); + else + { + BOOL loc; + int curSel = ItemFromPoint(point,loc); + if(!loc && curSel < 65535) + { + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(curSel); + m_CMakeSetupDialog->SetDlgItemText(IDC_PROGRESS, pItem->m_HelpString); + } + CListBox::OnMouseMove(nFlags, point); + } + +} + +void CPropertyList::InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo) +{ + int nOldMode = pDC->SetROP2(R2_NOT); + + pDC->MoveTo(ptFrom); + pDC->LineTo(ptTo); + + pDC->SetROP2(nOldMode); +} + +void CPropertyList::PreSubclassWindow() +{ + m_bDivIsSet = FALSE; + m_nDivider = 0; + m_bTracking = FALSE; + m_curSel = 1; + + m_hCursorSize = AfxGetApp()->LoadStandardCursor(IDC_SIZEWE); + m_hCursorArrow = AfxGetApp()->LoadStandardCursor(IDC_ARROW); + + m_SSerif8Font.CreatePointFont(80,_T("MS Sans Serif")); +} + +CPropertyItem* CPropertyList::GetItem(int index) +{ + return (CPropertyItem*)GetItemDataPtr(index); +} + +void CPropertyList::OnRButtonUp( UINT /* nFlags */, CPoint point ) +{ + CMenu menu; + CRect rect; + this->GetWindowRect(&rect); + BOOL loc; + m_curSel = ItemFromPoint(point,loc); + menu.CreatePopupMenu(); + menu.AppendMenu(MF_STRING | MF_ENABLED, 44, "Ignore Cache Entry"); + menu.AppendMenu(MF_STRING | MF_ENABLED, 42, "Delete Cache Entry"); + menu.AppendMenu(MF_STRING | MF_ENABLED, 43, "Help For Cache Entry"); + menu.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, + rect.TopLeft().x + point.x, + rect.TopLeft().y + point.y, this, NULL); +} + +void CPropertyList::RemoveProperty(const char* name) +{ + this->HideControls(); + for(int i =0; i < this->GetCount(); ++i) + { + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(i); + if(pItem->m_propName == name) + { + m_PropertyItems.erase(pItem); + delete pItem; + this->DeleteString(i); + return; + } + } +} + +void CPropertyList::OnIgnore() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + pItem->m_curValue = "IGNORE"; + InvalidateList(); +} + + + +void CPropertyList::OnDelete() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + m_CMakeSetupDialog->GetCMakeInstance()->GetCacheManager()->RemoveCacheEntry(pItem->m_propName); + m_PropertyItems.erase(pItem); + delete pItem; + this->DeleteString(m_curSel); + this->HideControls(); + this->SetTopIndex(0); + InvalidateList(); + m_curSel += 1; + if(m_curSel > this->GetCount()) + { + m_curSel = this->GetCount(); + } + this->SetCurSel(m_curSel); +} + +void CPropertyList::OnHelp() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + CPropertyItem* pItem = (CPropertyItem*) GetItemDataPtr(m_curSel); + MessageBox(pItem->m_HelpString, pItem->m_propName, MB_OK|MB_ICONINFORMATION); +} + +void CPropertyList::RemoveAll() +{ + int c = this->GetCount(); + for(int i =0; i < c; ++i) + { + this->DeleteString(0); + } + for(std::set::iterator ii = m_PropertyItems.begin(); + ii != m_PropertyItems.end(); ++ii) + { + delete *ii; + } + m_PropertyItems.clear(); + m_Dirty = false; + this->HideControls(); + InvalidateList(); +} + +void CPropertyList::InvalidateList() +{ + Invalidate(); + m_Dirty = true; +} + +void CPropertyList::ShowAdvanced() +{ + this->SetRedraw(FALSE); + this->ResetContent(); + m_ShowAdvanced = true; + std::map sortProps; + for(std::set::iterator i = m_PropertyItems.begin(); + i != m_PropertyItems.end(); ++i) + { + sortProps[(const char*)(*i)->m_propName] = *i; + } + for(std::map::iterator i = sortProps.begin(); + i != sortProps.end(); ++i) + { + CPropertyItem* item = i->second; + if(item->m_NewValue) + { + this->AddPropItem(item, 2); + } + } + for(std::map::iterator i = sortProps.begin(); + i != sortProps.end(); ++i) + { + CPropertyItem* item = i->second; + if(!item->m_NewValue) + { + this->AddPropItem(item, 2); + } + } + this->SetRedraw(TRUE); + this->InvalidateList(); +} + + +void CPropertyList::HideAdvanced() +{ + this->SetRedraw(FALSE); + this->ResetContent(); + m_ShowAdvanced = false; + std::map sortProps; + for(std::set::iterator i = m_PropertyItems.begin(); + i != m_PropertyItems.end(); ++i) + { + sortProps[(const char*)(*i)->m_propName] = *i; + } + for(std::map::iterator i = sortProps.begin(); + i != sortProps.end(); ++i) + { + CPropertyItem* item = i->second; + if(item->m_NewValue && !item->m_Advanced) + { + this->AddPropItem(item, 2); + } + } + for(std::map::iterator i = sortProps.begin(); + i != sortProps.end(); ++i) + { + CPropertyItem* item = i->second; + if(!item->m_Advanced && !item->m_NewValue) + { + this->AddPropItem(item, 2); + } + } + this->SetRedraw(TRUE); + this->InvalidateList(); +} + diff --git a/Source/MFCDialog/PropertyList.h b/Source/MFCDialog/PropertyList.h new file mode 100644 index 000000000..dfe0f3c09 --- /dev/null +++ b/Source/MFCDialog/PropertyList.h @@ -0,0 +1,179 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: PropertyList.h,v $ + Language: C++ + Date: $Date: 2004-01-02 22:24:19 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef CPROPERTYLIST_H +#define CPROPERTYLIST_H + + + +#include "../cmStandardIncludes.h" +class CMakeSetupDialog; + +///////////////////////////////////////////////////////////////////////////// +//CPropertyList Items +class CPropertyItem +{ +// Attributes +public: + CString m_HelpString; + CString m_propName; + CString m_curValue; + int m_nItemType; + CString m_cmbItems; + bool m_NewValue; + bool m_Removed; + bool m_Advanced; + +public: + CPropertyItem(CString propName, CString curValue, + CString helpString, + int nItemType, CString cmbItems) + { + m_NewValue = true; + m_HelpString = helpString; + m_Removed = false; + m_propName = propName; + m_curValue = curValue; + m_nItemType = nItemType; + m_cmbItems = cmbItems; + m_Advanced = false; + } +}; + +///////////////////////////////////////////////////////////////////////////// +// CPropertyList window + +class CPropertyList : public CListBox +{ +// Construction +public: + enum ItemType + { + COMBO = 0, + EDIT, + COLOR, + FONT, + FILE, + CHECKBOX, + PATH + }; + CPropertyList(); + +// Attributes +public: + CMakeSetupDialog *m_CMakeSetupDialog; + +// Operations +public: + bool GetShowAdvanced() {return m_ShowAdvanced;} + bool IsDirty() { return m_Dirty; } + void ClearDirty() { m_Dirty = false; } + + int AddItem(CString txt); + void AddProperty(const char* name, + const char* value, + const char* helpString, + int type, + const char* comboItems, + bool reverseOrder, + bool advanced); + void RemoveProperty(const char* name); + void HideControls(); + void ShowAdvanced(); + void HideAdvanced(); + std::set GetItems() + { + return m_PropertyItems; + } + void RemoveAll(); + CPropertyItem* GetItem(int index); +// Overrides + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CPropertyList) +public: + virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct); + virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); +protected: + virtual BOOL PreCreateWindow(CREATESTRUCT& cs); + virtual void PreSubclassWindow(); + //}}AFX_VIRTUAL + +// Implementation +public: + virtual ~CPropertyList(); + + // Generated message map functions +protected: + //{{AFX_MSG(CPropertyList) + afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); + afx_msg void OnSelchange(); + afx_msg void OnLButtonUp(UINT nFlags, CPoint point); + afx_msg void OnKillFocus(CWnd* pNewWnd); + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); + afx_msg void OnMouseMove(UINT nFlags, CPoint point); + afx_msg void OnRButtonUp( UINT nFlags, CPoint point ); + //}}AFX_MSG + afx_msg void OnKillfocusCmbBox(); + afx_msg void OnSelchangeCmbBox(); + afx_msg void OnKillfocusEditBox(); + afx_msg void OnChangeEditBox(); + afx_msg void OnButton(); + afx_msg void OnIgnore(); + afx_msg void OnDelete(); + afx_msg void OnHelp(); + afx_msg void OnCheckBox(); + afx_msg void OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar ); + + + DECLARE_MESSAGE_MAP() + + void InvertLine(CDC* pDC,CPoint ptFrom,CPoint ptTo); + void DisplayButton(CRect region); +// order = 0 sorted +// order = 1 add to top +// order = 2 add to bottom + int AddPropItem(CPropertyItem* pItem, int order); + void InvalidateList(); + + CComboBox m_cmbBox; + CEdit m_editBox; + CButton m_btnCtrl; + CButton m_CheckBoxControl; + + CFont m_SSerif8Font; + + bool m_Dirty; + int m_curSel; + int m_prevSel; + int m_nDivider; + int m_nDivTop; + int m_nDivBtm; + int m_nOldDivX; + int m_nLastBox; + BOOL m_bTracking; + BOOL m_bDivIsSet; + HCURSOR m_hCursorArrow; + HCURSOR m_hCursorSize; + bool m_ShowAdvanced; + std::set m_PropertyItems; +}; + +///////////////////////////////////////////////////////////////////////////// + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPERTYLIST_H__74205380_1B56_11D4_BC48_00105AA2186F__INCLUDED_) diff --git a/Source/MFCDialog/StdAfx.cpp b/Source/MFCDialog/StdAfx.cpp new file mode 100644 index 000000000..4ec72a4d6 --- /dev/null +++ b/Source/MFCDialog/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// pcbuilderdialog.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + + + diff --git a/Source/MFCDialog/StdAfx.h b/Source/MFCDialog/StdAfx.h new file mode 100644 index 000000000..913b22ccc --- /dev/null +++ b/Source/MFCDialog/StdAfx.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: StdAfx.h,v $ + Language: C++ + Date: $Date: 2007-09-17 19:20:55 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) +#define AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_ +#define _WIN32_WINNT 0x0400 +#define _WIN32_IE 0x0400 + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + +#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers + +#include // MFC core and standard components +#include // MFC extensions +#include // MFC Automation classes +#include // MFC support for Internet Explorer 4 Common Controls +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC support for Windows Common Controls +#endif // _AFX_NO_AFXCMN_SUPPORT + + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__AC17A6F8_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_) diff --git a/Source/MFCDialog/res/CMakeSetupDialog.ico b/Source/MFCDialog/res/CMakeSetupDialog.ico new file mode 100644 index 0000000000000000000000000000000000000000..e13bb156f4e0bd05a4c5df7de920ebc681e82799 GIT binary patch literal 24542 zcmeHPO^9X16|P~%^rR6-vzTlQuOkjPLl}iS1l-u2At?BhaglcGki|_03?c+(6L^h_ z-Z+GSFf(uGBFQxi6A;{nUS$z4^iDSs8e9k_(BsM;BHn!8sXFy@|KID^i=?~8dZ$iR zopZiZ_ujfybx&)|8S{{N^ihL!-fTT&%xfsEty%v4^TzxQbhAvf13+G_Sn!in)IMx_S25XU+C+ zEA#5Bm3h~EVyb_a=I@^zm`}d=!ukQWFHv8jzC=Zd`U-pnzAD9XhTjbKGbqX+l$pwidHiI+ zkO4ym3>h#8Bw)yZAp?dC7&2fGn81($Lk0{PFl4|W(19TXh71@oV901JW88FN+4!mp_74aT5p!nrw#2A#YR{~oJ z93||@r6mrGK?xisalkRT+z={(r397|AW9gNTL4%}2$twnqM`&A{D%xZxF#jAlpGJi z!n=W20d>Go0Ye206);r5PyvJ7PQXwCLj?>KFqFUmHOS}>3>7d`z)%4LR3oDv7%E_> zfT03_3ieAVs~}jRQw|+D_#8MY(ak=&`JwrvdHwa*&8=Iv%+Ah^xpU`^`S|0H&4(X; zXg>Y)Q}fwppPA1;|J;1}<(KBGuf8&ehll3=e=75b_uj*Eyp7T2Ge81;!ci|-a<%jp zo@7lgzGPO-cQTu03z>J%+PuGF z4D_=5MDmoHEa@LB|HNpJ&g3(Zo6Sbe=t(XE~=~ewdxkvnO(%ji#LT zqRtoX6cg2r8=E)U(&pxkH#xhRH{3*BBiF86vh8~x{Jho#_UTK0V#dV%v$Vt2D{R%7 z*zBbpM3n71w{qrx%W2rW`!buD{8UT@g`nKLd$96?Z4KfwuNQcm+`YH5a&VySUL5UI zz_-f*lD4aL4l5C82d6#~_X>)SAn)2^aj&4*JCGMz1m0dXhoC6-erM%V@t~l1TiO%r zg3!896c0&zT|6kj3$kH7R)7~~JaiVGbg*Nv(Jt=CfbC7|K>^wu;H?om254^=cP?~_ zTLibe#YMsGF6)ADuejZ5-Ma902Y7X1s|&pA@XP-8)q!TKCHlo$tJ*c@>^4>dpv-6Y zZC<%=4D*FUnJ>eYbt8mhVeOZ(T~w{E3Z+@NY%59)%h zO?@y>?Agv?0Vw_J>fI1=DYb{LOm0Egu0ApV0WlHxZ>o!wQ zO?_ejOXii(Ke}_`XPmdGPkT}ScJ--&V()py-=RMBpeVQimDHuaWr`XhyR|*DuJgFo-Lw+~Vv*h;y!_gH|7*=|LJOC)2 zkmqL7(REU8Djl7YA}eLtZZd^plS#_Wrci7)NxA71icKdeH=jbW`6T5gROrM~Zbr#- zLrTg`snDsV6%u(%xli3d-bVKO)JMT+I^Cz9?o;v9;0xaAdHM7 zQ$8}kx{8Hc`$jvGWYLYh;nvHPNK*|xFC`bxNVUs=FGT49fas}vPkG(7#tP)Tp+&yMya(Vf z13ym54n95L0Dw000f4;>*0h`$q^^T&H6H-*)0ZA*)D9dvy^lwrDBic9#>9GZU?K7y z<|6>^D8kBz0|V^fIQkRdPdm4?C-UD(c?OFJB`5yBr07dY9 z>$dyt_MSiz0B#ihfk^-0TR#MO_~D6Aa{Kk0Zvfyo(nP-3dqN1dZE5cyc7Mox6F~8o zSbora6M#Da5iP^!n*d_@5#}2JBKf{s&t5+M*6sm&z+$g`=+swAFF}wWXTA;~$oJVy z+7bYIewMs&lkN>B838Zf=+<2k15o*~-cxG~KySZpYb`Ai04G0>`51uSJ}pN2syqNE zKcD#sfRpdD)!L>2?CmqJ`2fJmx0>j$bO1zte)ArH+&=x5I$A9N$}eJG0Z_ifz)-aS zfc#?S9e~Bn%S?#dXHoM40P;g__O#1+XHWZ3(+=WGhx+uk<2B zC%xI87dC(8{1r!_avp2rYIt(U_!=h0*u<1^HcUzxbHk)`ila#;r92*Ga+Gm6WR)@= zhrCk8<&am(_#E;|CpZ=*uXG*9qvVxNE1r$gyrm%afY?%)6#z?gyTl;6Q;8aU>p<%%{7CHqIxRHdTL&7a^dprc z#?j&Kg6|wy$Ux&8M;m-~z@PGuhrX6#2iF*VKFPd=nCAH=mX5mGX&HSn;7+%Oqg9=6 zN%*HK?}8s3D0X_ITXo<WlsZ5{pi3Je<9e5qBjt?Yy! zJJ53*A$&DGdav2)gdbgj?%SyA%a%9N13z(~ZL-kF+vMoqYqo_R_^AVp+bBfp#-Xt_ z^}X;@2a?;!L+8hz9{s)WYYxPJ%@%!^>(f5~zwUtCMhSHJc2)m!7RG1*e#3#{jpUPJ z`}>dK>W$l=}*7h1^px7w>cnxZWs?x z@?|clA2IszdjOM!roC8u?aN`%KMH=U1NuqSnF%W6(n$DiR{&A=5(D3>e!Tzukf8Hfq;D8h)1p{x)iTyyk%4<$zx0R{e9p?{vT!XwyFz{7wh#ZPYeB%mu&O z0lAG@^v?;u+X380ZL5bl;rBUE{Ixm#%niTKf#N6etRUsN;rBYwP`?2D9tYf))5yvK z@OvC+=wAqaw*w9R3&HPpAOsfJAzBcArvr8U3&QVopr(Ie_+1YCD!Ow}To`_r1N^ca z(h=ZyIFRZ;0{jjK68%Sl-|j#d8+^&c62 ziv!W)y9D@62O|ATfZuc==wAx_h6Ca8S_=Gz1781<;MX1S`j-U1?tnhNOM_o?K=m&T ze(HceUQ2|ZIH3BM2tRSa>0c`R*a7!=Efs$3fYrZb_>luv|B~TH4#?xRbojvm(Z6)~ z!2#+&2Ke3q>OThf-htzS?;POcbu93m1JHjgqpt^B(0@$utpi)f2Vbth*73m?2j=@b zZI0?Z$?R+$+vpRA$)8KV>&^piOkV^5jOljT=cJ54NBH2VY8M;IppuD;8)aEzNTojR z6O}c7lzrl|#*wl!Y&9m9jc6YkVo|<1!*HU7%}-Ib|P2TzUuM^2EiTvQJ!I zcX6n!kIU1_#-Xx4E~DB7#@fH+-)0Aa>;h!dvc{*fPh8eGRo2I42^e(_#N`R?x>1kI z>#WyE-l#lf*+=w-vQ+!XUUJ)npz*EsvOq?BE9>L3Kz3IkE(_!k`Ahxc%!DQ9z(k7H znRQ#%NMLeOp4xgJ5logCT(y9X$_{>r5N6x1hb#^__)>O|#eul&;0x%uJW*S?0&#g= z>ot;?Jjzq8_YuXc2=F=TzKi^S4wd8ofU$%QL$|)te*w4VW6l5o literal 0 HcmV?d00001 diff --git a/Source/MFCDialog/res/CMakeSetupDialog.rc2 b/Source/MFCDialog/res/CMakeSetupDialog.rc2 new file mode 100644 index 000000000..8a619b331 --- /dev/null +++ b/Source/MFCDialog/res/CMakeSetupDialog.rc2 @@ -0,0 +1,13 @@ +// +// PCBUILDERDIALOG.RC2 - resources Microsoft Visual C++ does not edit directly +// + +#ifdef APSTUDIO_INVOKED + #error this file is not editable by Microsoft Visual C++ +#endif //APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// Add manually edited resources here... + +///////////////////////////////////////////////////////////////////////////// diff --git a/Source/MFCDialog/resource.h b/Source/MFCDialog/resource.h new file mode 100644 index 000000000..0395b76fc --- /dev/null +++ b/Source/MFCDialog/resource.h @@ -0,0 +1,48 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by CMakeSetup.rc +// +#define IDM_ABOUTBOX 0x0010 +#define IDM_CREATESHORTCUT 0x0020 +#define IDD_ABOUTBOX 100 +#define IDS_ABOUTBOX 101 +#define IDD_CMakeSetupDialog_DIALOG 102 +#define IDS_CREATESHORTCUT 102 +#define IDR_MAINFRAME 128 +#define IDD_CMAKE_HELP_DIALOG 133 +#define IDD_GEN_DIALOG 134 +#define IDC_WhereSource 1001 +#define IDC_BUTTON2 1002 +#define IDC_BROWSE_SOURCE 1002 +#define IDC_WhereBuild 1003 +#define IDC_BUTTON3 1004 +#define IDC_BROWSE_BUILD 1004 +#define IDC_BuildProjects 1006 +#define IDC_LIST2 1007 +#define IDC_LIST3 1010 +#define IDC_CMAKE_VERSION 1014 +#define IDC_FRAME 1015 +#define IDC_MouseHelpCaption 1016 +#define IDC_OK 1018 +#define IDC_Generator 1019 +#define IDC_GeneratorLabel 1020 +#define IDC_HELP_BUTTON 1021 +#define IDC_HELP_BUTTON2 1022 +#define IDC_DELETE_BUTTON 1022 +#define IDC_EDIT1 1025 +#define IDC_AdvancedValues 1027 +#define IDC_PROGRESS 1028 +#define IDC_BuildForLabel 1029 +#define IDC_CHECK1 1030 +#define IDC_SUPPRESS_DEV_WARNINGS 1030 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 135 +#define _APS_NEXT_COMMAND_VALUE 32771 +#define _APS_NEXT_CONTROL_VALUE 1031 +#define _APS_NEXT_SYMED_VALUE 102 +#endif +#endif diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx new file mode 100644 index 000000000..b758702ec --- /dev/null +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: AddCacheEntry.cxx,v $ + Language: C++ + Date: $Date: 2007-11-17 02:18:48 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "AddCacheEntry.h" +#include + +static const int NumTypes = 4; +static const QString TypeStrings[NumTypes] = + { "BOOL", "PATH", "FILEPATH", "STRING" }; +static const QCMakeCacheProperty::PropertyType Types[NumTypes] = + { QCMakeCacheProperty::BOOL, QCMakeCacheProperty::PATH, + QCMakeCacheProperty::FILEPATH, QCMakeCacheProperty::STRING}; + +AddCacheEntry::AddCacheEntry(QWidget* p) + : QWidget(p) +{ + this->setupUi(this); + for(int i=0; iType->addItem(TypeStrings[i]); + } + QWidget* cb = new QCheckBox(); + QWidget* path = new QCMakeCachePathEditor(); + QWidget* filepath = new QCMakeCacheFilePathEditor(); + QWidget* string = new QLineEdit(); + this->StackedWidget->addWidget(cb); + this->StackedWidget->addWidget(path); + this->StackedWidget->addWidget(filepath); + this->StackedWidget->addWidget(string); + this->setTabOrder(this->Name, this->Type); + this->setTabOrder(this->Type, cb); + this->setTabOrder(cb, path); + this->setTabOrder(path, filepath); + this->setTabOrder(filepath, string); + this->setTabOrder(string, this->Description); +} + +QString AddCacheEntry::name() const +{ + return this->Name->text(); +} + +QVariant AddCacheEntry::value() const +{ + QWidget* w = this->StackedWidget->currentWidget(); + if(qobject_cast(w)) + { + return static_cast(w)->text(); + } + else if(qobject_cast(w)) + { + return static_cast(w)->isChecked(); + } + return QVariant(); +} + +QString AddCacheEntry::description() const +{ + return this->Description->text(); +} + +QCMakeCacheProperty::PropertyType AddCacheEntry::type() const +{ + int idx = this->Type->currentIndex(); + if(idx >= 0 && idx < NumTypes) + { + return Types[idx]; + } + return QCMakeCacheProperty::BOOL; +} + + diff --git a/Source/QtDialog/AddCacheEntry.h b/Source/QtDialog/AddCacheEntry.h new file mode 100644 index 000000000..0d6579621 --- /dev/null +++ b/Source/QtDialog/AddCacheEntry.h @@ -0,0 +1,40 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: AddCacheEntry.h,v $ + Language: C++ + Date: $Date: 2007-11-13 04:59:25 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef AddCacheEntry_h +#define AddCacheEntry_h + +#include +#include + +#include "QCMake.h" +#include "ui_AddCacheEntry.h" + +class AddCacheEntry : public QWidget, public Ui::AddCacheEntry +{ + Q_OBJECT +public: + AddCacheEntry(QWidget* p); + + QString name() const; + QVariant value() const; + QString description() const; + QCMakeCacheProperty::PropertyType type() const; +}; + +#endif + diff --git a/Source/QtDialog/AddCacheEntry.ui b/Source/QtDialog/AddCacheEntry.ui new file mode 100644 index 000000000..3ed9b490b --- /dev/null +++ b/Source/QtDialog/AddCacheEntry.ui @@ -0,0 +1,97 @@ + + AddCacheEntry + + + + 0 + 0 + 380 + 158 + + + + Form + + + + 0 + + + + + Name: + + + + + + + + + + Type: + + + + + + + + + + + Value: + + + + + + + 0 + + + + + + + Description: + + + + + + + + + + + QCMakeCachePathEditor + QLineEdit +
QCMakeCacheView.h
+
+ + QCMakeCacheFilePathEditor + QLineEdit +
QCMakeCacheView.h
+
+
+ + + + Type + currentIndexChanged(int) + StackedWidget + setCurrentIndex(int) + + + 229 + 34 + + + 287 + 65 + + + + +
diff --git a/Source/QtDialog/CMake.desktop b/Source/QtDialog/CMake.desktop new file mode 100644 index 000000000..0c82538ad --- /dev/null +++ b/Source/QtDialog/CMake.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Version=1.0 +Encoding=UTF-8 +Name=CMake +Comment=Cross-platform buildsystem +Exec=cmake-gui %f +Icon=CMakeSetup.png +Terminal=false +X-MultipleArgs=false +Type=Application +Categories=Application;Development; +StartupNotify=true +MimeType=application/x-cmakecache; diff --git a/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake new file mode 100755 index 000000000..37e470142 --- /dev/null +++ b/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake @@ -0,0 +1,339 @@ +# +# CMakeIngestOSXBundleLibraries.cmake +# +# Only for the Mac build. +# +# Depends on OS tools: +# otool +# install_name_tool +# +# This script ingests libraries and frameworks into an existing .app bundle and +# then uses install_name_tool to fixup the references to the newly embedded +# libraries so that they all refer to each other via "@executable_path." +# +# The main intent (and simplifying assumption used for developing the script) +# is to have a single executable .app bundle that becomes "self-contained" by +# copying all non-system libs that it depends on into itself. The further +# assumption is that all such dependencies are simple .dylib shared library +# files or Mac Framework libraries. +# +# This script can be used as part of the build via ADD_CUSTOM_COMMAND, or used +# only during make install via INSTALL SCRIPT. +# +if(NOT DEFINED input_file) + message(FATAL_ERROR " +${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): error: Variable input_file is not defined. + +Use a command line like this to use this script: + cmake \"-Dinput_file=filename\" \"-Dextra_libs=/path/to/lib1;/path/to/lib2\" \"-Dlib_path=/path/to/unqualified/libs\" -P \"${CMAKE_CURRENT_LIST_FILE}\" + +'input_file' should be the main executable inside a Mac bundle directory structure. +For example, use 'bin/paraview.app/Contents/MacOS/paraview' from a ParaView binary dir. + +'extra_libs' should be a semi-colon separated list of full path names to extra libraries +to copy into the bundle that cannot be derived from otool -L output. For example, you may +also want to fixup dynamically loaded plugins from your build tree and copy them into the +bundle. + +'lib_path' should be the path where to find libraries referenced without a path name in +otool -L output. + +") +endif(NOT DEFINED input_file) +message("ingest ${input_file}") +set(eol_char "E") + +if(APPLE) + set(dep_tool "otool") + set(dep_cmd_args "-L") + set(dep_regex "^\t([^\t]+) \\(compatibility version ([0-9]+.[0-9]+.[0-9]+), current version ([0-9]+.[0-9]+.[0-9]+)\\)${eol_char}$") +endif(APPLE) + +message("") +message("# Script \"${CMAKE_CURRENT_LIST_FILE}\" running...") +message("") +message("input_file: '${input_file}'") +message("extra_libs: '${extra_libs}'") +message("lib_path: '${lib_path}'") +message("") + +get_filename_component(input_file_full "${input_file}" ABSOLUTE) +message("input_file_full: '${input_file_full}'") + +get_filename_component(bundle "${input_file_full}/../../.." ABSOLUTE) +message("bundle: '${bundle}'") + + +find_program(dep_cmd ${dep_tool}) + +# find the full path to the framework in path set the result +# in pathout +macro(find_framework_full_path path pathout) + set(${pathout} "${path}") + if(NOT EXISTS "${path}") + set(FRAMEWORK_SEARCH "/Library/Frameworks" + "/System/Library/Frameworks" ) + set(__FOUND FALSE) + foreach(f ${FRAMEWORK_SEARCH}) + set(newd "${f}/${path}") + if(EXISTS "${newd}" AND NOT __FOUND) + set(${pathout} "${newd}") + set(__FOUND TRUE) + endif(EXISTS "${newd}" AND NOT __FOUND) + endforeach(f) + endif(NOT EXISTS "${path}") +endmacro(find_framework_full_path) + + +macro(append_unique au_list_var au_value) + set(${au_list_var} ${${au_list_var}} "${au_value}") +endmacro(append_unique) + + +macro(gather_dependents gd_target gd_dependents_var) + execute_process( + COMMAND ${dep_cmd} ${dep_cmd_args} ${gd_target} + OUTPUT_VARIABLE dep_tool_ov + ) + + string(REGEX REPLACE ";" "\\\\;" dep_candidates "${dep_tool_ov}") + string(REGEX REPLACE "\n" "${eol_char};" dep_candidates "${dep_candidates}") + + set(${gd_dependents_var} "") + + foreach(candidate ${dep_candidates}) + if("${candidate}" MATCHES "${dep_regex}") + string(REGEX REPLACE "${dep_regex}" "\\1" raw_item "${candidate}") + string(REGEX REPLACE "${dep_regex}" "\\2" raw_compat_version "${candidate}") + string(REGEX REPLACE "${dep_regex}" "\\3" raw_current_version "${candidate}") + + set(item "${raw_item}") + + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" compat_major_version "${raw_compat_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" compat_minor_version "${raw_compat_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" compat_patch_version "${raw_compat_version}") + + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\1" current_major_version "${raw_current_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\2" current_minor_version "${raw_current_version}") + string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$" "\\3" current_patch_version "${raw_current_version}") + + #message("${raw_item} - compat ${raw_compat_version} - current ${raw_current_version}") + append_unique("${gd_dependents_var}" "${item}") + else("${candidate}" MATCHES "${dep_regex}") + if("${candidate}" STREQUAL "${gd_target}:${eol_char}") + #message("info: ignoring target name...") + else("${candidate}" STREQUAL "${gd_target}:${eol_char}") + message("error: candidate='${candidate}'") + endif("${candidate}" STREQUAL "${gd_target}:${eol_char}") + endif("${candidate}" MATCHES "${dep_regex}") + endforeach(candidate) +endmacro(gather_dependents) + + +message("Gathering dependent libraries for '${input_file_full}'...") +gather_dependents("${input_file_full}" deps) +message("") + + +# Order lexicographically: +# +list(SORT deps) + + +# Split into separate lists, "system" "embedded" and "nonsystem" libraries. +# System libs are assumed to be available on all target runtime Macs and do not +# need to be copied/fixed-up by this script. Embedded libraries are assumed to +# be in the bundle and fixed-up already. Only non-system, non-embedded libs +# need copying and fixing up... +# +set(system_deps "") +set(embedded_deps "") +set(nonsystem_deps "") + +foreach(d ${deps}) + set(d_is_embedded_lib 0) + set(d_is_system_lib 0) + + if("${d}" MATCHES "^(/System/Library|/usr/lib)") + set(d_is_system_lib 1) + else("${d}" MATCHES "^(/System/Library|/usr/lib)") + if("${d}" MATCHES "^@executable_path") + set(d_is_embedded_lib 1) + endif("${d}" MATCHES "^@executable_path") + endif("${d}" MATCHES "^(/System/Library|/usr/lib)") + + if(d_is_system_lib) + set(system_deps ${system_deps} "${d}") + else(d_is_system_lib) + if(d_is_embedded_lib) + set(embedded_deps ${embedded_deps} "${d}") + else(d_is_embedded_lib) + set(nonsystem_deps ${nonsystem_deps} "${d}") + endif(d_is_embedded_lib) + endif(d_is_system_lib) +endforeach(d) + +message("") +message("system_deps:") +foreach(d ${system_deps}) + message("${d}") +endforeach(d ${system_deps}) + +message("") +message("embedded_deps:") +foreach(d ${embedded_deps}) + message("${d}") +endforeach(d ${embedded_deps}) + +message("") +message("nonsystem_deps:") +foreach(d ${nonsystem_deps}) + message("${d}") +endforeach(d ${nonsystem_deps}) + +message("") + + +macro(copy_library_into_bundle clib_bundle clib_libsrc clib_dstlibs clib_fixups) + # + # If the source library is a framework, copy just the shared lib bit of the framework + # into the bundle under "${clib_bundle}/Contents/Frameworks" - if it is just a dylib + # copy it into the same directory with the main bundle executable under + # "${clib_bundle}/Contents/MacOS" + # + if("${clib_libsrc}" MATCHES ".framework/.*/.*/.*") + # make sure clib_libsrc is a full path to the framework as a framework + # maybe linked in with relative paths in some cases + find_framework_full_path("${clib_libsrc}" fw_full_src) + get_filename_component(fw_src "${fw_full_src}" ABSOLUTE) + get_filename_component(fw_srcdir "${clib_libsrc}/../../.." ABSOLUTE) + get_filename_component(fwdirname "${fw_srcdir}" NAME) + string(REGEX REPLACE "^(.*)\\.framework$" "\\1" fwname "${fwdirname}") + string(REGEX REPLACE "^.*/${fwname}\\.framework/(.*)$" "\\1" fwlibname "${clib_libsrc}") + set(fw_dstdir "${clib_bundle}/Contents/Frameworks/${fwdirname}") + +# message("") +# message("fwdirname: '${fwdirname}'") +# message("fwname: '${fwname}'") +# message("fwlibname: '${fwlibname}'") +# message("fw_src: '${fw_src}'") +# message("fw_srcdir: '${fw_srcdir}'") +# message("fw_dstdir: '${fw_dstdir}'") +# message("new_name: '@executable_path/../Frameworks/${fwdirname}/${fwlibname}'") +# message("") + + message("Copying ${fw_srcdir} into bundle...") + + # This command copies the *entire* framework recursively: + # +# execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory +# "${fw_srcdir}" "${fw_dstdir}" +# ) + + # This command copies just the main shared lib of the framework: + # (This technique will not work for frameworks that have necessary + # resource or auxiliary files...) + # + message("fw_src = [${fw_src}] fw_full_src = [${fw_full_src}]") + message("Copy: ${CMAKE_COMMAND} -E copy \"${fw_src}\" \"${fw_dstdir}/${fwlibname}\"") + execute_process(COMMAND ${CMAKE_COMMAND} -E copy + "${fw_src}" "${fw_dstdir}/${fwlibname}" + ) + + execute_process(COMMAND install_name_tool + -id "@executable_path/../Frameworks/${fwdirname}/${fwlibname}" + "${clib_bundle}/Contents/Frameworks/${fwdirname}/${fwlibname}" + ) + set(${clib_dstlibs} ${${clib_dstlibs}} + "${clib_bundle}/Contents/Frameworks/${fwdirname}/${fwlibname}" + ) + set(${clib_fixups} ${${clib_fixups}} + "-change" + "${clib_libsrc}" + "@executable_path/../Frameworks/${fwdirname}/${fwlibname}" + ) + else("${clib_libsrc}" MATCHES ".framework/.*/.*/.*") + if("${clib_libsrc}" MATCHES "/") + set(clib_libsrcfull "${clib_libsrc}") + else("${clib_libsrc}" MATCHES "/") + set(clib_libsrcfull "${lib_path}/${clib_libsrc}") + if(NOT EXISTS "${clib_libsrcfull}") + message(FATAL_ERROR "error: '${clib_libsrcfull}' does not exist...") + endif(NOT EXISTS "${clib_libsrcfull}") + endif("${clib_libsrc}" MATCHES "/") + + get_filename_component(dylib_src "${clib_libsrcfull}" ABSOLUTE) + get_filename_component(dylib_name "${dylib_src}" NAME) + set(dylib_dst "${clib_bundle}/Contents/MacOS/${dylib_name}") + +# message("dylib_src: ${dylib_src}") +# message("dylib_dst: ${dylib_dst}") +# message("new_name: '@executable_path/${dylib_name}'") + + message("Copying ${dylib_src} into bundle...") + execute_process(COMMAND ${CMAKE_COMMAND} -E copy + "${dylib_src}" "${dylib_dst}") + execute_process(COMMAND install_name_tool + -id "@executable_path/${dylib_name}" + "${dylib_dst}" + ) + set(${clib_dstlibs} ${${clib_dstlibs}} + "${dylib_dst}" + ) + set(${clib_fixups} ${${clib_fixups}} + "-change" + "${clib_libsrc}" + "@executable_path/${dylib_name}" + ) + endif("${clib_libsrc}" MATCHES ".framework/.*/.*/.*") +endmacro(copy_library_into_bundle) + + +# Copy dependent "nonsystem" libraries into the bundle: +# +message("Copying dependent libraries into bundle...") +set(srclibs ${nonsystem_deps} ${extra_libs}) +set(dstlibs "") +set(fixups "") +foreach(d ${srclibs}) + message("copy it --- ${d}") + copy_library_into_bundle("${bundle}" "${d}" dstlibs fixups) +endforeach(d) + +message("") +message("dstlibs='${dstlibs}'") +message("") +message("fixups='${fixups}'") +message("") + + +# Fixup references to copied libraries in the main bundle executable and in the +# copied libraries themselves: +# +if(NOT "${fixups}" STREQUAL "") + message("Fixing up references...") + foreach(d ${dstlibs} "${input_file_full}") + message("fixing up references in: '${d}'") + execute_process(COMMAND install_name_tool ${fixups} "${d}") + endforeach(d) + message("") +endif(NOT "${fixups}" STREQUAL "") + + +# List all references to eyeball them and make sure they look right: +# +message("Listing references...") +foreach(d ${dstlibs} "${input_file_full}") + execute_process(COMMAND otool -L "${d}") + message("") +endforeach(d) +message("") + + +# Output file: +# +#get_filename_component(script_name "${CMAKE_CURRENT_LIST_FILE}" NAME) +#file(WRITE "${input_file_full}_${script_name}" "# Script \"${CMAKE_CURRENT_LIST_FILE}\" completed.\n") +message("") +message("# Script \"${CMAKE_CURRENT_LIST_FILE}\" completed.") +message("") diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt new file mode 100644 index 000000000..37f96ed6f --- /dev/null +++ b/Source/QtDialog/CMakeLists.txt @@ -0,0 +1,100 @@ +PROJECT(QtDialog) +SET(QT_MIN_VERSION "4.2.0") +FIND_PACKAGE(Qt4 REQUIRED) + +IF(NOT QT4_FOUND) + MESSAGE(SEND_ERROR "Failed to find Qt 4.3 or greater.") +ELSE(NOT QT4_FOUND) + + INCLUDE(${QT_USE_FILE}) + SET(CMAKE_PACKAGE_QTGUI TRUE) + # i don't want to install or package the qt gui on windows + # unless qt is static + IF(WIN32 AND NOT QT_CONFIG MATCHES "static") + SET(CMAKE_PACKAGE_QTGUI FALSE) + ENDIF(WIN32 AND NOT QT_CONFIG MATCHES "static") + SET(SRCS + AddCacheEntry.cxx + AddCacheEntry.h + CMakeSetup.cxx + CMakeSetupDialog.cxx + CMakeSetupDialog.h + QCMake.cxx + QCMake.h + QCMakeCacheView.cxx + QCMakeCacheView.h + QMacInstallDialog.cxx + QMacInstallDialog.h + ) + QT4_WRAP_UI(UI_SRCS + CMakeSetupDialog.ui + AddCacheEntry.ui + MacInstallDialog.ui + ) + QT4_WRAP_CPP(MOC_SRCS + AddCacheEntry.h + CMakeSetupDialog.h + QCMake.h + QCMakeCacheView.h + QMacInstallDialog.h + ) + QT4_ADD_RESOURCES(RC_SRCS CMakeSetup.qrc) + + SET(SRCS ${SRCS} ${UI_SRCS} ${MOC_SRCS} ${RC_SRCS}) + IF(Q_WS_WIN) + SET(SRCS ${SRCS} CMakeSetup.rc) + ENDIF(Q_WS_WIN) + IF(Q_WS_MAC) + SET(SRCS ${SRCS} CMakeSetup.icns) + SET(MACOSX_BUNDLE_ICON_FILE CMakeSetup.icns) + SET_SOURCE_FILES_PROPERTIES(CMakeSetup.icns PROPERTIES + MACOSX_PACKAGE_LOCATION Resources) + ENDIF(Q_WS_MAC) + + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) + + ADD_EXECUTABLE(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS}) + TARGET_LINK_LIBRARIES(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES}) + IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + IF(APPLE) + SET_TARGET_PROPERTIES(cmake-gui PROPERTIES + OUTPUT_NAME ${CMAKE_BUNDLE_NAME}) + ENDIF(APPLE) + SET(CMAKE_INSTALL_DESTINATION_ARGS + BUNDLE DESTINATION "${CMAKE_BUNDLE_LOCATION}") + ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.4) + # if qt is not static and we are on windows then skip the install + # I don't want to distribute qt dlls + IF(CMAKE_PACKAGE_QTGUI) + INSTALL(TARGETS cmake-gui RUNTIME DESTINATION bin + ${CMAKE_INSTALL_DESTINATION_ARGS}) + ENDIF(CMAKE_PACKAGE_QTGUI) + + IF(UNIX) + # install a desktop file so CMake appears in the application start menu + # with an icon + INSTALL(FILES CMake.desktop DESTINATION share/applications ) + INSTALL(FILES CMakeSetup.png DESTINATION share/pixmaps ) + INSTALL(FILES cmakecache.xml DESTINATION share/mime/packages ) + ENDIF(UNIX) + + IF(APPLE) + SET(CMAKE_POSTFLIGHT_SCRIPT + "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh") + SET(CMAKE_POSTUPGRADE_SCRIPT + "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh") + configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postflight.sh.in" + "${CMake_BINARY_DIR}/Source/QtDialog/postflight.sh") + configure_file("${CMake_SOURCE_DIR}/Source/QtDialog/postupgrade.sh.in" + "${CMake_BINARY_DIR}/Source/QtDialog/postupgrade.sh") + INSTALL(CODE "execute_process(COMMAND ln -s \"../MacOS/${CMAKE_BUNDLE_NAME}\" cmake-gui + WORKING_DIRECTORY \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin)") + INSTALL(CODE "set(input_file + \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/MacOS/${CMAKE_BUNDLE_NAME}\")") + INSTALL(SCRIPT "${CMake_SOURCE_DIR}/Source/QtDialog/CMakeIngestOSXBundleLibraries.cmake") + ENDIF(APPLE) + CONFIGURE_FILE("${QtDialog_SOURCE_DIR}/QtDialogCPack.cmake.in" + "${QtDialog_BINARY_DIR}/QtDialogCPack.cmake" @ONLY) +ENDIF(NOT QT4_FOUND) + diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx new file mode 100644 index 000000000..8389fc338 --- /dev/null +++ b/Source/QtDialog/CMakeSetup.cxx @@ -0,0 +1,189 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeSetup.cxx,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:51 $ + Version: $Revision: 1.17.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "QCMake.h" // include to disable MS warnings +#include +#include +#include +#include +#include +#include "QMacInstallDialog.h" + +#include "CMakeSetupDialog.h" +#include "cmDocumentation.h" +#include "cmake.h" +#include "cmVersion.h" +#include + +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " cmake-gui - CMake GUI.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " cmake-gui [options]\n" + " cmake-gui [options] \n" + " cmake-gui [options] ", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"cmake-gui\" executable is the CMake GUI. Project " + "configuration settings may be specified interactively. " + "Brief instructions are provided at the bottom of the " + "window when the program is running.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + {0,0,0} +}; + +int main(int argc, char** argv) +{ + cmSystemTools::FindExecutableDirectory(argv[0]); + QApplication app(argc, argv); + + // clean out standard Qt paths for plugins, which we don't use anyway + // when creating Mac bundles, it potentially causes problems + foreach(QString p, QApplication::libraryPaths()) + { + QApplication::removeLibraryPath(p); + } + + // if arg for install + for(int i =0; i < argc; i++) + { + if(strcmp(argv[i], "--mac-install") == 0) + { + QMacInstallDialog setupdialog(0); + setupdialog.exec(); + return 0; + } + } + // tell the cmake library where cmake is + QDir cmExecDir(QApplication::applicationDirPath()); +#if defined(Q_OS_MAC) + cmExecDir.cd("../../../"); +#endif + + // pick up translation files if they exists in the data directory + QDir translationsDir = cmExecDir; + translationsDir.cd(".." CMAKE_DATA_DIR); + translationsDir.cd("i18n"); + QTranslator translator; + QString transfile = QString("cmake_%1").arg(QLocale::system().name()); + translator.load(transfile, translationsDir.path()); + app.installTranslator(&translator); + + // app setup + app.setApplicationName("CMakeSetup"); + app.setOrganizationName("Kitware"); + app.setWindowIcon(QIcon(":/Icons/CMakeSetup.png")); + + // do docs, if args were given + cmDocumentation doc; + if(app.arguments().size() > 1 && + doc.CheckOptions(app.argc(), app.argv())) + { + // Construct and print requested documentation. + cmake hcm; + hcm.AddCMakePaths(); + // just incase the install is bad avoid a seg fault + const char* root = hcm.GetCacheDefinition("CMAKE_ROOT"); + if(root) + { + doc.SetCMakeRoot(root); + } + std::vector commands; + std::vector compatCommands; + std::map propDocs; + + std::vector generators; + hcm.GetCommandDocumentation(commands, true, false); + hcm.GetCommandDocumentation(compatCommands, false, true); + hcm.GetGeneratorDocumentation(generators); + hcm.GetPropertiesDocumentation(propDocs); + doc.SetName("cmake"); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.AppendSection("Generators",generators); + doc.PrependSection("Options",cmDocumentationOptions); + doc.SetSection("Commands",commands); + doc.SetSection("Compatilbility Commands", compatCommands); + doc.SetSections(propDocs); + + return (doc.PrintRequestedDocumentation(std::cout)? 0:1); + } + + CMakeSetupDialog dialog; + QString title = QString("CMake %1"); + title = title.arg(cmVersion::GetCMakeVersion().c_str()); + dialog.setWindowTitle(title); + dialog.show(); + + cmsys::CommandLineArguments arg; + arg.Initialize(argc, argv); + std::string binaryDirectory; + std::string sourceDirectory; + typedef cmsys::CommandLineArguments argT; + arg.AddArgument("-B", argT::CONCAT_ARGUMENT, + &binaryDirectory, "Binary Directory"); + arg.AddArgument("-H", argT::CONCAT_ARGUMENT, + &sourceDirectory, "Source Directory"); + // do not complain about unknown options + arg.StoreUnusedArguments(true); + arg.Parse(); + if(!sourceDirectory.empty() && !binaryDirectory.empty()) + { + dialog.setSourceDirectory(sourceDirectory.c_str()); + dialog.setBinaryDirectory(binaryDirectory.c_str()); + } + else + { + QStringList args = app.arguments(); + if(args.count() == 2) + { + QFileInfo buildFileInfo(args[1], "CMakeCache.txt"); + QFileInfo srcFileInfo(args[1], "CMakeLists.txt"); + if(buildFileInfo.exists()) + { + dialog.setBinaryDirectory(buildFileInfo.absolutePath()); + } + else if(srcFileInfo.exists()) + { + dialog.setSourceDirectory(srcFileInfo.absolutePath()); + dialog.setBinaryDirectory(QDir::currentPath()); + } + } + } + + return app.exec(); +} + diff --git a/Source/QtDialog/CMakeSetup.icns b/Source/QtDialog/CMakeSetup.icns new file mode 100644 index 0000000000000000000000000000000000000000..8808dd62db64540292417e8865bdf627aaf8792e GIT binary patch literal 33452 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 literal 0 HcmV?d00001 diff --git a/Source/QtDialog/CMakeSetup.ico b/Source/QtDialog/CMakeSetup.ico new file mode 100644 index 0000000000000000000000000000000000000000..e13bb156f4e0bd05a4c5df7de920ebc681e82799 GIT binary patch literal 24542 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 literal 0 HcmV?d00001 diff --git a/Source/QtDialog/CMakeSetup.png b/Source/QtDialog/CMakeSetup.png new file mode 100644 index 0000000000000000000000000000000000000000..7bbcee413c54c4d10e0c484c4d57a3c3eb0f9761 GIT binary patch literal 358 zcmV-s0h#`ZP);p`P#|k5gaOX1ehQ$a*%U$mXICEv z7-=R2H^3FuhXC42o$&b59kXA>0ZNg9W0pk{oh`_NlMgoiG zN01^BD}@Y@C$4zu6(C2|=fK*##ijCGFx&8#y8X}T3*E!3SIemRGXMYp07*qoM6N<$ Eg5PG87XSbN literal 0 HcmV?d00001 diff --git a/Source/QtDialog/CMakeSetup.qrc b/Source/QtDialog/CMakeSetup.qrc new file mode 100644 index 000000000..5ceb1df0c --- /dev/null +++ b/Source/QtDialog/CMakeSetup.qrc @@ -0,0 +1,7 @@ + + + CMakeSetup.png + Delete16.png + Plus16.png + + diff --git a/Source/QtDialog/CMakeSetup.rc b/Source/QtDialog/CMakeSetup.rc new file mode 100644 index 000000000..fcc887ddb --- /dev/null +++ b/Source/QtDialog/CMakeSetup.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "CMakeSetup.ico" diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx new file mode 100644 index 000000000..cb52351e3 --- /dev/null +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -0,0 +1,887 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeSetupDialog.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:53 $ + Version: $Revision: 1.40.2.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "CMakeSetupDialog.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "QCMake.h" +#include "QCMakeCacheView.h" +#include "AddCacheEntry.h" + +QCMakeThread::QCMakeThread(QObject* p) + : QThread(p), CMakeInstance(NULL) +{ +} + +QCMake* QCMakeThread::cmakeInstance() const +{ + return this->CMakeInstance; +} + +void QCMakeThread::run() +{ + this->CMakeInstance = new QCMake; + // emit that this cmake thread is ready for use + emit this->cmakeInitialized(); + this->exec(); + delete this->CMakeInstance; + this->CMakeInstance = NULL; +} + +CMakeSetupDialog::CMakeSetupDialog() + : ExitAfterGenerate(true), CacheModified(false), CurrentState(Interrupting) +{ + this->SuppressDevWarnings = false; + // create the GUI + QSettings settings; + settings.beginGroup("Settings/StartPath"); + int h = settings.value("Height", 500).toInt(); + int w = settings.value("Width", 700).toInt(); + this->resize(w, h); + + QWidget* cont = new QWidget(this); + this->setupUi(cont); + this->Splitter->setStretchFactor(0, 3); + this->Splitter->setStretchFactor(1, 1); + this->setCentralWidget(cont); + this->ProgressBar->reset(); + this->RemoveEntry->setEnabled(false); + this->AddEntry->setEnabled(false); + + QMenu* FileMenu = this->menuBar()->addMenu(tr("&File")); + this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache")); + QObject::connect(this->ReloadCacheAction, SIGNAL(triggered(bool)), + this, SLOT(doReloadCache())); + this->DeleteCacheAction = FileMenu->addAction(tr("&Delete Cache")); + QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)), + this, SLOT(doDeleteCache())); + this->ExitAction = FileMenu->addAction(tr("E&xit")); + QObject::connect(this->ExitAction, SIGNAL(triggered(bool)), + this, SLOT(close())); + + QMenu* ToolsMenu = this->menuBar()->addMenu(tr("&Tools")); + this->ConfigureAction = ToolsMenu->addAction(tr("&Configure")); + // prevent merging with Preferences menu item on Mac OS X + this->ConfigureAction->setMenuRole(QAction::NoRole); + QObject::connect(this->ConfigureAction, SIGNAL(triggered(bool)), + this, SLOT(doConfigure())); + this->GenerateAction = ToolsMenu->addAction(tr("&Generate")); + QObject::connect(this->GenerateAction, SIGNAL(triggered(bool)), + this, SLOT(doGenerate())); +#if defined(Q_WS_MAC) + this->InstallForCommandLineAction + = ToolsMenu->addAction(tr("&Install For Command Line Use")); + QObject::connect(this->InstallForCommandLineAction, SIGNAL(triggered(bool)), + this, SLOT(doInstallForCommandLine())); +#endif + QMenu* OptionsMenu = this->menuBar()->addMenu(tr("&Options")); + QAction* supressDevWarningsAction = OptionsMenu->addAction(tr("&Suppress dev Warnings (-Wno-dev)")); + QObject::connect(supressDevWarningsAction, SIGNAL(triggered(bool)), + this, SLOT(doSuppressDev())); + + supressDevWarningsAction->setCheckable(true); + QAction* debugAction = OptionsMenu->addAction(tr("&Debug Output")); + debugAction->setCheckable(true); + QObject::connect(debugAction, SIGNAL(toggled(bool)), + this, SLOT(setDebugOutput(bool))); + + QMenu* HelpMenu = this->menuBar()->addMenu(tr("&Help")); + QAction* a = HelpMenu->addAction(tr("About")); + QObject::connect(a, SIGNAL(triggered(bool)), + this, SLOT(doAbout())); + a = HelpMenu->addAction(tr("Help")); + QObject::connect(a, SIGNAL(triggered(bool)), + this, SLOT(doHelp())); + + QShortcut* filterShortcut = new QShortcut(QKeySequence::Find, this); + QObject::connect(filterShortcut, SIGNAL(activated()), + this, SLOT(startSearch())); + + this->setAcceptDrops(true); + + // get the saved binary directories + QStringList buildPaths = this->loadBuildPaths(); + this->BinaryDirectory->addItems(buildPaths); + + this->BinaryDirectory->setCompleter(new QCMakeFileCompleter(this, true)); + this->SourceDirectory->setCompleter(new QCMakeFileCompleter(this, true)); + + // fixed pitch font in output window + QFont outputFont("Courier"); + this->Output->setFont(outputFont); + this->ErrorFormat.setForeground(QBrush(Qt::red)); + + // start the cmake worker thread + this->CMakeThread = new QCMakeThread(this); + QObject::connect(this->CMakeThread, SIGNAL(cmakeInitialized()), + this, SLOT(initialize()), Qt::QueuedConnection); + this->CMakeThread->start(); + + this->enterState(ReadyConfigure); +} + +void CMakeSetupDialog::initialize() +{ + // now the cmake worker thread is running, lets make our connections to it + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(propertiesChanged(const QCMakeCachePropertyList&)), + this->CacheValues->cacheModel(), + SLOT(setProperties(const QCMakeCachePropertyList&))); + + QObject::connect(this->ConfigureButton, SIGNAL(clicked(bool)), + this, SLOT(doConfigure())); + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(configureDone(int)), + this, SLOT(finishConfigure(int))); + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(generateDone(int)), + this, SLOT(finishGenerate(int))); + + QObject::connect(this->GenerateButton, SIGNAL(clicked(bool)), + this, SLOT(doGenerate())); + + QObject::connect(this->BrowseSourceDirectoryButton, SIGNAL(clicked(bool)), + this, SLOT(doSourceBrowse())); + QObject::connect(this->BrowseBinaryDirectoryButton, SIGNAL(clicked(bool)), + this, SLOT(doBinaryBrowse())); + + QObject::connect(this->BinaryDirectory, SIGNAL(editTextChanged(QString)), + this, SLOT(onBinaryDirectoryChanged(QString))); + QObject::connect(this->SourceDirectory, SIGNAL(textChanged(QString)), + this, SLOT(onSourceDirectoryChanged(QString))); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(sourceDirChanged(QString)), + this, SLOT(updateSourceDirectory(QString))); + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(binaryDirChanged(QString)), + this, SLOT(updateBinaryDirectory(QString))); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(progressChanged(QString, float)), + this, SLOT(showProgress(QString,float))); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(errorMessage(QString)), + this, SLOT(error(QString))); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(outputMessage(QString)), + this, SLOT(message(QString))); + + QObject::connect(this->Advanced, SIGNAL(clicked(bool)), + this->CacheValues, SLOT(setShowAdvanced(bool))); + QObject::connect(this->Search, SIGNAL(textChanged(QString)), + this->CacheValues, SLOT(setSearchFilter(QString))); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(generatorChanged(QString)), + this, SLOT(updateGeneratorLabel(QString))); + this->updateGeneratorLabel(QString()); + + QObject::connect(this->CacheValues->cacheModel(), + SIGNAL(dataChanged(QModelIndex,QModelIndex)), + this, SLOT(setCacheModified())); + + QObject::connect(this->CacheValues->selectionModel(), + SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + this, SLOT(selectionChanged())); + QObject::connect(this->RemoveEntry, SIGNAL(clicked(bool)), + this, SLOT(removeSelectedCacheEntries())); + QObject::connect(this->AddEntry, SIGNAL(clicked(bool)), + this, SLOT(addCacheEntry())); + + + if(!this->SourceDirectory->text().isEmpty() || + !this->BinaryDirectory->lineEdit()->text().isEmpty()) + { + this->onSourceDirectoryChanged(this->SourceDirectory->text()); + this->onBinaryDirectoryChanged(this->BinaryDirectory->lineEdit()->text()); + } + else + { + this->onBinaryDirectoryChanged(this->BinaryDirectory->lineEdit()->text()); + } +} + +CMakeSetupDialog::~CMakeSetupDialog() +{ + QSettings settings; + settings.beginGroup("Settings/StartPath"); + settings.setValue("Height", this->height()); + settings.setValue("Width", this->width()); + + // wait for thread to stop + this->CMakeThread->quit(); + this->CMakeThread->wait(2000); +} + +void CMakeSetupDialog::doConfigure() +{ + if(this->CurrentState == Configuring) + { + // stop configure + doInterrupt(); + return; + } + + // make sure build directory exists + QString bindir = this->CMakeThread->cmakeInstance()->binaryDirectory(); + QDir dir(bindir); + if(!dir.exists()) + { + QString message = tr("Build directory does not exist, " + "should I create it?") + + "\n\n" + + tr("Directory: "); + message += bindir; + QString title = tr("Create Directory"); + QMessageBox::StandardButton btn; + btn = QMessageBox::information(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::No) + { + return; + } + dir.mkpath("."); + } + + // prompt for generator if it hasn't been set + if(this->CMakeThread->cmakeInstance()->generator().isEmpty()) + { + if(!this->promptForGenerator()) + { + return; + } + } + + // remember path + this->addBinaryPath(dir.absolutePath()); + + this->enterState(Configuring); + + this->CacheValues->selectionModel()->clear(); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "setProperties", Qt::QueuedConnection, + Q_ARG(QCMakeCachePropertyList, + this->CacheValues->cacheModel()->properties())); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "configure", Qt::QueuedConnection); +} + +void CMakeSetupDialog::finishConfigure(int err) +{ + if(0 == err && 0 == this->CacheValues->cacheModel()->newCount()) + { + this->enterState(ReadyGenerate); + } + else + { + this->enterState(ReadyConfigure); + this->CacheValues->scrollToTop(); + } + + if(err != 0) + { + QMessageBox::critical(this, tr("Error"), + tr("Error in configuration process, project files may be invalid"), + QMessageBox::Ok); + } +} + +void CMakeSetupDialog::finishGenerate(int err) +{ + this->enterState(ReadyGenerate); + if(err != 0) + { + QMessageBox::critical(this, tr("Error"), + tr("Error in generation process, project files may be invalid"), + QMessageBox::Ok); + } +} + +void CMakeSetupDialog::doSuppressDev() +{ + this->SuppressDevWarnings = !this->SuppressDevWarnings; + this->CMakeThread->cmakeInstance()-> + SetSuppressDevWarnings(this->SuppressDevWarnings); +} + +void CMakeSetupDialog::doInstallForCommandLine() +{ + QMacInstallDialog setupdialog(0); + setupdialog.exec(); +} + +void CMakeSetupDialog::doGenerate() +{ + if(this->CurrentState == Generating) + { + // stop generate + doInterrupt(); + return; + } + this->enterState(Generating); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "generate", Qt::QueuedConnection); +} + +void CMakeSetupDialog::closeEvent(QCloseEvent* e) +{ + // prompt for close if there are unsaved changes, and we're not busy + if(this->CacheModified) + { + QString message = tr("You have changed options but not rebuilt, " + "are you sure you want to exit?"); + QString title = tr("Confirm Exit"); + QMessageBox::StandardButton btn; + btn = QMessageBox::critical(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::No) + { + e->ignore(); + } + } + + // don't close if we're busy, unless the user really wants to + if(this->CurrentState == Configuring) + { + QString message = "You are in the middle of a Configure.\n" + "If you Exit now the configure information will be lost.\n" + "Are you sure you want to Exit?"; + QString title = tr("Confirm Exit"); + QMessageBox::StandardButton btn; + btn = QMessageBox::critical(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::No) + { + e->ignore(); + } + else + { + this->doInterrupt(); + } + } + + // let the generate finish + if(this->CurrentState == Generating) + { + e->ignore(); + } +} + +void CMakeSetupDialog::doHelp() +{ + QString msg = tr("CMake is used to configure and generate build files for " + "software projects. The basic steps for configuring a project are as " + "follows:\r\n\r\n1. Select the source directory for the project. This should " + "contain the CMakeLists.txt files for the project.\r\n\r\n2. Select the build " + "directory for the project. This is the directory where the project will be " + "built. It can be the same or a different directory than the source " + "directory. For easy clean up, a separate build directory is recommended. " + "CMake will create the directory if it does not exist.\r\n\r\n3. Once the " + "source and binary directories are selected, it is time to press the " + "Configure button. This will cause CMake to read all of the input files and " + "discover all the variables used by the project. The first time a variable " + "is displayed it will be in Red. Users should inspect red variables making " + "sure the values are correct. For some projects the Configure process can " + "be iterative, so continue to press the Configure button until there are no " + "longer red entries.\r\n\r\n4. Once there are no longer red entries, you " + "should click the Generate button. This will write the build files to the build " + "directory."); + + QDialog dialog; + QFontMetrics met(this->font()); + int msgWidth = met.width(msg); + dialog.setMinimumSize(msgWidth/15,20); + dialog.setWindowTitle(tr("Help")); + QVBoxLayout* l = new QVBoxLayout(&dialog); + QLabel* lab = new QLabel(&dialog); + lab->setText(msg); + lab->setWordWrap(true); + QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, + Qt::Horizontal, &dialog); + QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + l->addWidget(lab); + l->addWidget(btns); + dialog.exec(); +} + +void CMakeSetupDialog::doInterrupt() +{ + this->enterState(Interrupting); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "interrupt", Qt::QueuedConnection); +} + +void CMakeSetupDialog::doSourceBrowse() +{ + QString dir = QFileDialog::getExistingDirectory(this, + tr("Enter Path to Source"), this->SourceDirectory->text()); + if(!dir.isEmpty()) + { + this->setSourceDirectory(dir); + } +} + +void CMakeSetupDialog::updateSourceDirectory(const QString& dir) +{ + if(this->SourceDirectory->text() != dir) + { + this->SourceDirectory->blockSignals(true); + this->SourceDirectory->setText(dir); + this->SourceDirectory->blockSignals(false); + } +} + +void CMakeSetupDialog::updateBinaryDirectory(const QString& dir) +{ + if(this->BinaryDirectory->currentText() != dir) + { + this->BinaryDirectory->blockSignals(true); + this->BinaryDirectory->setEditText(dir); + this->BinaryDirectory->blockSignals(false); + } +} + +void CMakeSetupDialog::doBinaryBrowse() +{ + QString dir = QFileDialog::getExistingDirectory(this, + tr("Enter Path to Build"), this->BinaryDirectory->currentText()); + if(!dir.isEmpty() && dir != this->BinaryDirectory->currentText()) + { + this->setBinaryDirectory(dir); + } +} + +void CMakeSetupDialog::setBinaryDirectory(const QString& dir) +{ + this->BinaryDirectory->setEditText(dir); +} + +void CMakeSetupDialog::onSourceDirectoryChanged(const QString& dir) +{ + this->Output->clear(); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "setSourceDirectory", Qt::QueuedConnection, Q_ARG(QString, dir)); +} + +void CMakeSetupDialog::onBinaryDirectoryChanged(const QString& dir) +{ + this->CacheModified = false; + this->CacheValues->cacheModel()->clear(); + this->Output->clear(); + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "setBinaryDirectory", Qt::QueuedConnection, Q_ARG(QString, dir)); +} + +void CMakeSetupDialog::setSourceDirectory(const QString& dir) +{ + this->SourceDirectory->setText(dir); +} + +void CMakeSetupDialog::showProgress(const QString& /*msg*/, float percent) +{ + this->ProgressBar->setValue(qRound(percent * 100)); +} + +void CMakeSetupDialog::error(const QString& message) +{ + this->Output->setCurrentCharFormat(this->ErrorFormat); + this->Output->append(message); +} + +void CMakeSetupDialog::message(const QString& message) +{ + this->Output->setCurrentCharFormat(this->MessageFormat); + this->Output->append(message); +} + +void CMakeSetupDialog::setEnabledState(bool enabled) +{ + // disable parts of the GUI during configure/generate + this->CacheValues->cacheModel()->setEditEnabled(enabled); + this->SourceDirectory->setEnabled(enabled); + this->BrowseSourceDirectoryButton->setEnabled(enabled); + this->BinaryDirectory->setEnabled(enabled); + this->BrowseBinaryDirectoryButton->setEnabled(enabled); + this->ReloadCacheAction->setEnabled(enabled); + this->DeleteCacheAction->setEnabled(enabled); + this->ExitAction->setEnabled(enabled); + this->ConfigureAction->setEnabled(enabled); + this->AddEntry->setEnabled(enabled); + this->RemoveEntry->setEnabled(false); // let selection re-enable it +} + +bool CMakeSetupDialog::promptForGenerator() +{ + QSettings settings; + settings.beginGroup("Settings/StartPath"); + QString lastGen = settings.value("LastGenerator").toString(); + + QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators(); + QDialog dialog; + dialog.setWindowTitle(tr("Choose Generator")); + QLabel* lab = new QLabel(&dialog); + lab->setText(tr("Please select what build system you want CMake to generate files for.\n" + "You should select the tool that you will use to build the project.\n" + "Press OK once you have made your selection.")); + QComboBox* combo = new QComboBox(&dialog); + combo->addItems(gens); + int idx = combo->findText(lastGen); + if(idx != -1) + { + combo->setCurrentIndex(idx); + } + QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok | + QDialogButtonBox::Cancel, + Qt::Horizontal, &dialog); + QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(reject())); + + QVBoxLayout* l = new QVBoxLayout(&dialog); + l->addWidget(lab); + l->addWidget(combo); + l->addWidget(btns); + if(dialog.exec() == QDialog::Accepted) + { + lastGen = combo->currentText(); + settings.setValue("LastGenerator", lastGen); + this->CMakeThread->cmakeInstance()->setGenerator(combo->currentText()); + return true; + } + + return false; +} + +void CMakeSetupDialog::updateGeneratorLabel(const QString& gen) +{ + QString str = tr("Current Generator: "); + if(gen.isEmpty()) + { + str += tr("None"); + } + else + { + str += gen; + } + this->Generator->setText(str); +} + +void CMakeSetupDialog::doReloadCache() +{ + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "reloadCache", Qt::QueuedConnection); +} + +void CMakeSetupDialog::doDeleteCache() +{ + QString title = tr("Delete Cache"); + QString message = "Are you sure you want to delete the cache?"; + QMessageBox::StandardButton btn; + btn = QMessageBox::information(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::No) + { + return; + } + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "deleteCache", Qt::QueuedConnection); +} + +void CMakeSetupDialog::doAbout() +{ + QString msg = "CMake\nwww.cmake.org"; + + QDialog dialog; + dialog.setWindowTitle(tr("About")); + QVBoxLayout* l = new QVBoxLayout(&dialog); + QLabel* lab = new QLabel(&dialog); + l->addWidget(lab); + lab->setText(msg); + lab->setWordWrap(true); + QDialogButtonBox* btns = new QDialogButtonBox(QDialogButtonBox::Ok, + Qt::Horizontal, &dialog); + QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + l->addWidget(btns); + dialog.exec(); +} + +void CMakeSetupDialog::setExitAfterGenerate(bool b) +{ + this->ExitAfterGenerate = b; +} + +void CMakeSetupDialog::addBinaryPath(const QString& path) +{ + QString cleanpath = QDir::cleanPath(path); + + // update UI + this->BinaryDirectory->blockSignals(true); + int idx = this->BinaryDirectory->findText(cleanpath); + if(idx != -1) + { + this->BinaryDirectory->removeItem(idx); + } + this->BinaryDirectory->insertItem(0, cleanpath); + this->BinaryDirectory->setCurrentIndex(0); + this->BinaryDirectory->blockSignals(false); + + // save to registry + QStringList buildPaths = this->loadBuildPaths(); + buildPaths.removeAll(cleanpath); + buildPaths.prepend(cleanpath); + this->saveBuildPaths(buildPaths); +} + +void CMakeSetupDialog::dragEnterEvent(QDragEnterEvent* e) +{ + if(!(this->CurrentState == ReadyConfigure || + this->CurrentState == ReadyGenerate)) + { + e->ignore(); + return; + } + + const QMimeData* dat = e->mimeData(); + QList urls = dat->urls(); + QString file = urls.count() ? urls[0].toLocalFile() : QString(); + if(!file.isEmpty() && + (file.endsWith("CMakeCache.txt", Qt::CaseInsensitive) || + file.endsWith("CMakeLists.txt", Qt::CaseInsensitive) ) ) + { + e->accept(); + } + else + { + e->ignore(); + } +} + +void CMakeSetupDialog::dropEvent(QDropEvent* e) +{ + if(!(this->CurrentState == ReadyConfigure || + this->CurrentState == ReadyGenerate)) + { + return; + } + + const QMimeData* dat = e->mimeData(); + QList urls = dat->urls(); + QString file = urls.count() ? urls[0].toLocalFile() : QString(); + if(file.endsWith("CMakeCache.txt", Qt::CaseInsensitive)) + { + QFileInfo info(file); + if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath()) + { + this->setBinaryDirectory(info.absolutePath()); + } + } + else if(file.endsWith("CMakeLists.txt", Qt::CaseInsensitive)) + { + QFileInfo info(file); + if(this->CMakeThread->cmakeInstance()->binaryDirectory() != info.absolutePath()) + { + this->setSourceDirectory(info.absolutePath()); + this->setBinaryDirectory(info.absolutePath()); + } + } +} + +QStringList CMakeSetupDialog::loadBuildPaths() +{ + QSettings settings; + settings.beginGroup("Settings/StartPath"); + + QStringList buildPaths; + for(int i=0; i<10; i++) + { + QString p = settings.value(QString("WhereBuild%1").arg(i)).toString(); + if(!p.isEmpty()) + { + buildPaths.append(p); + } + } + return buildPaths; +} + +void CMakeSetupDialog::saveBuildPaths(const QStringList& paths) +{ + QSettings settings; + settings.beginGroup("Settings/StartPath"); + + int num = paths.count(); + if(num > 10) + { + num = 10; + } + + for(int i=0; iCacheModified = true; + this->enterState(ReadyConfigure); +} + +void CMakeSetupDialog::removeSelectedCacheEntries() +{ + QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows(); + QList pidxs; + foreach(QModelIndex i, idxs) + { + pidxs.append(i); + } + foreach(QPersistentModelIndex pi, pidxs) + { + this->CacheValues->model()->removeRow(pi.row()); + } +} + +void CMakeSetupDialog::selectionChanged() +{ + QModelIndexList idxs = this->CacheValues->selectionModel()->selectedRows(); + if(idxs.count() && + (this->CurrentState == ReadyConfigure || + this->CurrentState == ReadyGenerate) ) + { + this->RemoveEntry->setEnabled(true); + } + else + { + this->RemoveEntry->setEnabled(false); + } +} + +void CMakeSetupDialog::enterState(CMakeSetupDialog::State s) +{ + if(s == this->CurrentState) + { + return; + } + + this->CurrentState = s; + + if(s == Interrupting) + { + this->ConfigureButton->setEnabled(false); + this->GenerateButton->setEnabled(false); + } + else if(s == Configuring) + { + this->Output->clear(); + this->setEnabledState(false); + this->GenerateButton->setEnabled(false); + this->GenerateAction->setEnabled(false); + this->ConfigureButton->setText(tr("&Stop")); + } + else if(s == Generating) + { + this->CacheModified = false; + this->setEnabledState(false); + this->ConfigureButton->setEnabled(false); + this->GenerateAction->setEnabled(false); + this->GenerateButton->setText(tr("&Stop")); + } + else if(s == ReadyConfigure) + { + this->ProgressBar->reset(); + this->setEnabledState(true); + this->GenerateButton->setEnabled(false); + this->GenerateAction->setEnabled(false); + this->ConfigureButton->setEnabled(true); + this->ConfigureButton->setText(tr("&Configure")); + this->GenerateButton->setText(tr("&Generate")); + } + else if(s == ReadyGenerate) + { + this->ProgressBar->reset(); + this->setEnabledState(true); + this->GenerateButton->setEnabled(true); + this->GenerateAction->setEnabled(true); + this->ConfigureButton->setEnabled(true); + this->ConfigureButton->setText(tr("&Configure")); + this->GenerateButton->setText(tr("&Generate")); + } +} + +void CMakeSetupDialog::addCacheEntry() +{ + QDialog dialog(this); + dialog.resize(400, 200); + dialog.setWindowTitle(tr("Add Cache Entry")); + QVBoxLayout* l = new QVBoxLayout(&dialog); + AddCacheEntry* w = new AddCacheEntry(&dialog); + QDialogButtonBox* btns = new QDialogButtonBox( + QDialogButtonBox::Ok | QDialogButtonBox::Cancel, + Qt::Horizontal, &dialog); + QObject::connect(btns, SIGNAL(accepted()), &dialog, SLOT(accept())); + QObject::connect(btns, SIGNAL(rejected()), &dialog, SLOT(reject())); + l->addWidget(w); + l->addStretch(); + l->addWidget(btns); + if(QDialog::Accepted == dialog.exec()) + { + QCMakeCacheModel* m = this->CacheValues->cacheModel(); + m->insertRows(0, 1, QModelIndex()); + m->setData(m->index(0, 0), w->type(), QCMakeCacheModel::TypeRole); + m->setData(m->index(0, 0), w->name(), Qt::DisplayRole); + m->setData(m->index(0, 0), w->description(), QCMakeCacheModel::HelpRole); + m->setData(m->index(0, 0), 0, QCMakeCacheModel::AdvancedRole); + if(w->type() == QCMakeCacheProperty::BOOL) + { + m->setData(m->index(0, 1), w->value().toBool() ? + Qt::Checked : Qt::Unchecked, Qt::CheckStateRole); + } + else + { + m->setData(m->index(0, 1), w->value(), Qt::DisplayRole); + } + } +} + +void CMakeSetupDialog::startSearch() +{ + this->Search->setFocus(Qt::OtherFocusReason); + this->Search->selectAll(); +} + +void CMakeSetupDialog::setDebugOutput(bool flag) +{ + QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(), + "setDebugOutput", Qt::QueuedConnection, Q_ARG(bool, flag)); +} + diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h new file mode 100644 index 000000000..c35cf2e78 --- /dev/null +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -0,0 +1,123 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: CMakeSetupDialog.h,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:54 $ + Version: $Revision: 1.21.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef CMakeSetupDialog_h +#define CMakeSetupDialog_h + +#include "QCMake.h" +#include +#include +#include "ui_CMakeSetupDialog.h" + +class QCMakeThread; +class CMakeCacheModel; +class QProgressBar; +class QToolButton; + +/// Qt user interface for CMake +class CMakeSetupDialog : public QMainWindow, public Ui::CMakeSetupDialog +{ + Q_OBJECT +public: + CMakeSetupDialog(); + ~CMakeSetupDialog(); + +public slots: + void setBinaryDirectory(const QString& dir); + void setSourceDirectory(const QString& dir); + +protected slots: + void initialize(); + void doConfigure(); + void doGenerate(); + void doSuppressDev(); + void doInstallForCommandLine(); + void doHelp(); + void doAbout(); + void doInterrupt(); + void finishConfigure(int error); + void finishGenerate(int error); + void error(const QString& message); + void message(const QString& message); + + void doSourceBrowse(); + void doBinaryBrowse(); + void doReloadCache(); + void doDeleteCache(); + void updateSourceDirectory(const QString& dir); + void updateBinaryDirectory(const QString& dir); + void showProgress(const QString& msg, float percent); + void setEnabledState(bool); + bool promptForGenerator(); + void updateGeneratorLabel(const QString& gen); + void setExitAfterGenerate(bool); + void addBinaryPath(const QString&); + QStringList loadBuildPaths(); + void saveBuildPaths(const QStringList&); + void onBinaryDirectoryChanged(const QString& dir); + void onSourceDirectoryChanged(const QString& dir); + void setCacheModified(); + void removeSelectedCacheEntries(); + void selectionChanged(); + void addCacheEntry(); + void startSearch(); + void setDebugOutput(bool); + +protected: + + enum State { Interrupting, ReadyConfigure, ReadyGenerate, Configuring, Generating }; + void enterState(State s); + + void closeEvent(QCloseEvent*); + void dragEnterEvent(QDragEnterEvent*); + void dropEvent(QDropEvent*); + + QCMakeThread* CMakeThread; + bool ExitAfterGenerate; + bool CacheModified; + bool SuppressDevWarnings; + QAction* ReloadCacheAction; + QAction* DeleteCacheAction; + QAction* ExitAction; + QAction* ConfigureAction; + QAction* GenerateAction; + QAction* SuppressDevWarningsAction; + QAction* InstallForCommandLineAction; + State CurrentState; + + QTextCharFormat ErrorFormat; + QTextCharFormat MessageFormat; + +}; + +// QCMake instance on a thread +class QCMakeThread : public QThread +{ + Q_OBJECT +public: + QCMakeThread(QObject* p); + QCMake* cmakeInstance() const; + +signals: + void cmakeInitialized(); + +protected: + virtual void run(); + QCMake* CMakeInstance; +}; + +#endif // CMakeSetupDialog_h diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui new file mode 100644 index 000000000..12984b24e --- /dev/null +++ b/Source/QtDialog/CMakeSetupDialog.ui @@ -0,0 +1,306 @@ + + CMakeSetupDialog + + + + 0 + 0 + 707 + 582 + + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + Where is the source code: + + + + + + + + + + Browse &Source... + + + + + + + Where to build the binaries: + + + + + + + + 7 + 0 + 0 + 0 + + + + true + + + + + + + Browse &Build... + + + + + + + + + Qt::Vertical + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 6 + + + + + 0 + + + 6 + + + + + + 0 + 0 + 0 + 0 + + + + Search: + + + + + + + + 7 + 0 + 0 + 0 + + + + + + + + Show Ad&vanced Entries + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 23 + + + + + + + + Add New Entry + + + &Add Entry + + + :/Icons/Plus16.png + + + Qt::ToolButtonTextBesideIcon + + + + + + + Remove Selected Entries + + + &Remove Entry + + + :/Icons/Delete16.png + + + Qt::ToolButtonTextBesideIcon + + + + + + + + + true + + + QAbstractItemView::ExtendedSelection + + + QAbstractItemView::SelectRows + + + + + + + Press Configure to update and display new values in red, then press Generate to generate selected build files. + + + Qt::AlignCenter + + + true + + + + + + + 0 + + + 6 + + + + + &Configure + + + + + + + &Generate + + + + + + + Current Generator: + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 121 + 27 + + + + + + + + 0 + + + 100 + + + 0 + + + false + + + Qt::Horizontal + + + QProgressBar::BottomToTop + + + + + + + + + + QTextEdit::NoWrap + + + true + + + + + + + + + QCMakeCacheView + QTableView +
QCMakeCacheView.h
+
+
+ + + + +
diff --git a/Source/QtDialog/Delete16.png b/Source/QtDialog/Delete16.png new file mode 100644 index 0000000000000000000000000000000000000000..16989fee1288db63c3d4831a6f7ddc52443df7e0 GIT binary patch literal 731 zcmV<10wn#3P)s0$52zK~#9!ty4`;6HydBZ$3IxL52jECL*S_$cTJ}AovmZ1+Y+y z+K4XISRtYbVQXBdAq_!eqH9Pn#!7`BfCeVPAW&GiaHA2aNP&Tw_h#BY7t#qrWW`PH z;=Pk|-o5v{3+#79qv85Ju*RKt;`T##*OgXPlHzAiR|ab8E8ZDK(!+W>+n-86e^Z10 z?c-!}W|zSIuB)vjiu$r!uh2|J%hC=DRoClr!$_jHv%N1Uk{h>u*}?^vpRZ}qmp&Nt zGXOxgN;@VC!otJqDxc4F0EgoBkHz)R8+HQVzk(t5h5;?a4(HaK{wbe&TRuuQaloi1X66b7Js6&OY`eXc?O zG7G7tcJsIYy`q^@{^GF>QNHlFe>f3psx3{)YB03=QyDnfvSQ1=dr$g@N4<}fj|X=y zUXpn36*wQ+5ar9;r`>b2?HPb;oRF?Z18-jJwM=KC(J=WB*1YfA`v>dX9zW4_2%i7| N002ovPDHLkV1l+-LHGaw literal 0 HcmV?d00001 diff --git a/Source/QtDialog/MacInstallDialog.ui b/Source/QtDialog/MacInstallDialog.ui new file mode 100755 index 000000000..c7e31dbbe --- /dev/null +++ b/Source/QtDialog/MacInstallDialog.ui @@ -0,0 +1,103 @@ + + Dialog + + + + 0 + 0 + 470 + 159 + + + + Install Command Line Tools + + + + 9 + + + 6 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Skip Install Command Line + + + + + + + Install Command Line Links + + + + + + + + + Choose... + + + + + + + Install Folder: + + + + + + + + + + This will create symbolic links to the command line tools of cmake into the specified install folder. + + + true + + + + + + + + diff --git a/Source/QtDialog/Plus16.png b/Source/QtDialog/Plus16.png new file mode 100644 index 0000000000000000000000000000000000000000..552f6f0045f036955e577ac8ca64650e58a083f1 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;RN#5=* z4F5rJ!QSPQfg+p*9+AZi4BWyX%*Zfnjs#GUy~NYkmHirxiUnk8ypU!@Qr>oI5@}!XTZnLP> zL1)fBe)s8b)#Q*3r(_jpJ1k8zYo6(|XodbY;Z6Oe#jGh#DQO#9V$ZkFRW4B5^lXL8 z$1qW&eVkRyjXRQNo~(Z=q`F`V`|Zb^0!)GhyRUfMZH +#include + +#include "cmake.h" +#include "cmCacheManager.h" +#include "cmSystemTools.h" +#include "cmExternalMakefileProjectGenerator.h" + +QCMake::QCMake(QObject* p) + : QObject(p) +{ + this->SuppressDevWarnings = false; + qRegisterMetaType(); + qRegisterMetaType(); + + QDir execDir(QCoreApplication::applicationDirPath()); + +#if defined(Q_OS_MAC) + if(execDir.exists("../bin/cmake")) + { + execDir.cd("../bin"); + } + else + { + execDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment) + } +#endif + + QString cmakeCommand = QString("cmake")+cmSystemTools::GetExecutableExtension(); + cmakeCommand = execDir.filePath(cmakeCommand); + + cmSystemTools::DisableRunCommandOutput(); + cmSystemTools::SetRunCommandHideConsole(true); + cmSystemTools::SetErrorCallback(QCMake::errorCallback, this); + cmSystemTools::FindExecutableDirectory(cmakeCommand.toAscii().data()); + + this->CMakeInstance = new cmake; + this->CMakeInstance->SetCMakeCommand(cmakeCommand.toAscii().data()); +#if defined(Q_OS_MAC) + this->CMakeInstance->SetCMakeEditCommand("cmake-gui.app/Contents/MacOS/cmake-gui"); +#else + this->CMakeInstance->SetCMakeEditCommand("cmake-gui"); +#endif + this->CMakeInstance->SetProgressCallback(QCMake::progressCallback, this); + + std::vector generators; + this->CMakeInstance->GetRegisteredGenerators(generators); + std::vector::iterator iter; + for(iter = generators.begin(); iter != generators.end(); ++iter) + { + this->AvailableGenerators.append(iter->c_str()); + } +} + +QCMake::~QCMake() +{ + delete this->CMakeInstance; + //cmDynamicLoader::FlushCache(); +} + +void QCMake::loadCache(const QString& dir) +{ + this->setBinaryDirectory(dir); +} + +void QCMake::setSourceDirectory(const QString& dir) +{ + if(this->SourceDirectory != dir) + { + this->SourceDirectory = QDir::fromNativeSeparators(dir); + emit this->sourceDirChanged(this->SourceDirectory); + } +} + +void QCMake::setBinaryDirectory(const QString& dir) +{ + if(this->BinaryDirectory != dir) + { + this->BinaryDirectory = QDir::fromNativeSeparators(dir); + emit this->binaryDirChanged(this->BinaryDirectory); + cmCacheManager *cachem = this->CMakeInstance->GetCacheManager(); + this->setGenerator(QString()); + if(!this->CMakeInstance->GetCacheManager()->LoadCache( + this->BinaryDirectory.toLocal8Bit().data())) + { + QDir testDir(this->BinaryDirectory); + if(testDir.exists("CMakeCache.txt")) + { + cmSystemTools::Error("There is a CMakeCache.txt file for the current binary " + "tree but cmake does not have permission to read it. " + "Please check the permissions of the directory you are trying to run CMake on."); + } + } + + QCMakeCachePropertyList props = this->properties(); + emit this->propertiesChanged(props); + cmCacheManager::CacheIterator itm = cachem->NewIterator(); + if ( itm.Find("CMAKE_HOME_DIRECTORY")) + { + setSourceDirectory(itm.GetValue()); + } + if ( itm.Find("CMAKE_GENERATOR")) + { + const char* extraGen = cachem->GetCacheValue("CMAKE_EXTRA_GENERATOR"); + std::string curGen = cmExternalMakefileProjectGenerator:: + CreateFullGeneratorName(itm.GetValue(), extraGen); + this->setGenerator(curGen.c_str()); + } + } +} + + +void QCMake::setGenerator(const QString& gen) +{ + if(this->Generator != gen) + { + this->Generator = gen; + emit this->generatorChanged(this->Generator); + } +} + +void QCMake::configure() +{ + this->CMakeInstance->SetHomeDirectory(this->SourceDirectory.toAscii().data()); + this->CMakeInstance->SetStartDirectory(this->SourceDirectory.toAscii().data()); + this->CMakeInstance->SetHomeOutputDirectory(this->BinaryDirectory.toAscii().data()); + this->CMakeInstance->SetStartOutputDirectory(this->BinaryDirectory.toAscii().data()); + this->CMakeInstance->SetGlobalGenerator( + this->CMakeInstance->CreateGlobalGenerator(this->Generator.toAscii().data())); + this->CMakeInstance->LoadCache(); + this->CMakeInstance->SetSuppressDevWarnings(this->SuppressDevWarnings); + this->CMakeInstance->PreLoadCMakeFiles(); + + cmSystemTools::ResetErrorOccuredFlag(); + + int err = this->CMakeInstance->Configure(); + + emit this->propertiesChanged(this->properties()); + emit this->configureDone(err); +} + +void QCMake::generate() +{ + cmSystemTools::ResetErrorOccuredFlag(); + int err = this->CMakeInstance->Generate(); + emit this->generateDone(err); +} + +void QCMake::setProperties(const QCMakeCachePropertyList& newProps) +{ + QCMakeCachePropertyList props = newProps; + + QStringList toremove; + + // set the value of properties + cmCacheManager *cachem = this->CMakeInstance->GetCacheManager(); + for(cmCacheManager::CacheIterator i = cachem->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + + if(i.GetType() == cmCacheManager::INTERNAL || + i.GetType() == cmCacheManager::STATIC) + { + continue; + } + + QCMakeCacheProperty prop; + prop.Key = i.GetName(); + int idx = props.indexOf(prop); + if(idx == -1) + { + toremove.append(i.GetName()); + } + else + { + prop = props[idx]; + if(prop.Value.type() == QVariant::Bool) + { + i.SetValue(prop.Value.toBool() ? "ON" : "OFF"); + } + else + { + i.SetValue(prop.Value.toString().toAscii().data()); + } + props.removeAt(idx); + } + + } + + // remove some properites + foreach(QString s, toremove) + { + cachem->RemoveCacheEntry(s.toAscii().data()); + } + + // add some new properites + foreach(QCMakeCacheProperty s, props) + { + if(s.Type == QCMakeCacheProperty::BOOL) + { + this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(), + s.Value.toBool() ? "ON" : "OFF", + s.Help.toAscii().data(), + cmCacheManager::BOOL); + } + else if(s.Type == QCMakeCacheProperty::STRING) + { + this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(), + s.Value.toString().toAscii().data(), + s.Help.toAscii().data(), + cmCacheManager::STRING); + } + else if(s.Type == QCMakeCacheProperty::PATH) + { + this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(), + s.Value.toString().toAscii().data(), + s.Help.toAscii().data(), + cmCacheManager::PATH); + } + else if(s.Type == QCMakeCacheProperty::FILEPATH) + { + this->CMakeInstance->AddCacheEntry(s.Key.toAscii().data(), + s.Value.toString().toAscii().data(), + s.Help.toAscii().data(), + cmCacheManager::FILEPATH); + } + } + + cachem->SaveCache(this->BinaryDirectory.toAscii().data()); +} + +QCMakeCachePropertyList QCMake::properties() const +{ + QCMakeCachePropertyList ret; + + cmCacheManager *cachem = this->CMakeInstance->GetCacheManager(); + for(cmCacheManager::CacheIterator i = cachem->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + + if(i.GetType() == cmCacheManager::INTERNAL || + i.GetType() == cmCacheManager::STATIC || + i.GetType() == cmCacheManager::UNINITIALIZED) + { + continue; + } + + QCMakeCacheProperty prop; + prop.Key = i.GetName(); + prop.Help = i.GetProperty("HELPSTRING"); + prop.Value = i.GetValue(); + prop.Advanced = i.GetPropertyAsBool("ADVANCED"); + + if(i.GetType() == cmCacheManager::BOOL) + { + prop.Type = QCMakeCacheProperty::BOOL; + prop.Value = cmSystemTools::IsOn(i.GetValue()); + } + else if(i.GetType() == cmCacheManager::PATH) + { + prop.Type = QCMakeCacheProperty::PATH; + } + else if(i.GetType() == cmCacheManager::FILEPATH) + { + prop.Type = QCMakeCacheProperty::FILEPATH; + } + else if(i.GetType() == cmCacheManager::STRING) + { + prop.Type = QCMakeCacheProperty::STRING; + } + + ret.append(prop); + } + + return ret; +} + +void QCMake::interrupt() +{ + cmSystemTools::SetFatalErrorOccured(); +} + +void QCMake::progressCallback(const char* msg, float percent, void* cd) +{ + QCMake* self = reinterpret_cast(cd); + if(percent >= 0) + { + emit self->progressChanged(msg, percent); + } + else + { + emit self->outputMessage(msg); + } + QCoreApplication::processEvents(); +} + +void QCMake::errorCallback(const char* msg, const char* /*title*/, + bool& /*stop*/, void* cd) +{ + QCMake* self = reinterpret_cast(cd); + emit self->errorMessage(msg); + QCoreApplication::processEvents(); +} + +QString QCMake::binaryDirectory() const +{ + return this->BinaryDirectory; +} + +QString QCMake::sourceDirectory() const +{ + return this->SourceDirectory; +} + +QString QCMake::generator() const +{ + return this->Generator; +} + +QStringList QCMake::availableGenerators() const +{ + return this->AvailableGenerators; +} + +void QCMake::deleteCache() +{ + // delete cache + this->CMakeInstance->GetCacheManager()->DeleteCache(this->BinaryDirectory.toAscii().data()); + // reload to make our cache empty + this->CMakeInstance->GetCacheManager()->LoadCache(this->BinaryDirectory.toAscii().data()); + // emit no generator and no properties + this->setGenerator(QString()); + QCMakeCachePropertyList props = this->properties(); + emit this->propertiesChanged(props); +} + +void QCMake::reloadCache() +{ + // emit that the cache was cleaned out + QCMakeCachePropertyList props; + emit this->propertiesChanged(props); + // reload + this->CMakeInstance->GetCacheManager()->LoadCache(this->BinaryDirectory.toAscii().data()); + // emit new cache properties + props = this->properties(); + emit this->propertiesChanged(props); +} + +void QCMake::setDebugOutput(bool flag) +{ + if(flag != this->CMakeInstance->GetDebugOutput()) + { + this->CMakeInstance->SetDebugOutputOn(flag); + emit this->debugOutputChanged(flag); + } +} + +bool QCMake::getDebugOutput() const +{ + return this->CMakeInstance->GetDebugOutput(); +} + + +void QCMake::SetSuppressDevWarnings(bool value) +{ + this->SuppressDevWarnings = value; +} diff --git a/Source/QtDialog/QCMake.h b/Source/QtDialog/QCMake.h new file mode 100644 index 000000000..dbe7c7aed --- /dev/null +++ b/Source/QtDialog/QCMake.h @@ -0,0 +1,145 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: QCMake.h,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:51 $ + Version: $Revision: 1.9.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef __QCMake_h +#define __QCMake_h +#ifdef _MSC_VER +#pragma warning ( disable : 4127 ) +#pragma warning ( disable : 4512 ) +#endif + +#include +#include +#include +#include +#include +#include + +class cmake; + +/// struct to represent cache properties in Qt +/// Value is of type String or Bool +struct QCMakeCacheProperty +{ + enum PropertyType { BOOL, PATH, FILEPATH, STRING }; + QString Key; + QVariant Value; + QString Help; + PropertyType Type; + bool Advanced; + bool operator==(const QCMakeCacheProperty& other) const + { + return this->Key == other.Key; + } + bool operator<(const QCMakeCacheProperty& other) const + { + return this->Key < other.Key; + } +}; + +// make types usable with QVariant +Q_DECLARE_METATYPE(QCMakeCacheProperty) +typedef QList QCMakeCachePropertyList; +Q_DECLARE_METATYPE(QCMakeCachePropertyList) + +/// Qt API for CMake library. +/// Wrapper like class allows for easier integration with +/// Qt features such as, signal/slot connections, multi-threading, etc.. +class QCMake : public QObject +{ + Q_OBJECT +public: + QCMake(QObject* p=0); + ~QCMake(); + void SetSuppressDevWarnings(bool value); +public slots: + /// load the cache file in a directory + void loadCache(const QString& dir); + /// set the source directory containing the source + void setSourceDirectory(const QString& dir); + /// set the binary directory to build in + void setBinaryDirectory(const QString& dir); + /// set the desired generator to use + void setGenerator(const QString& generator); + /// do the configure step + void configure(); + /// generate the files + void generate(); + /// set the property values + void setProperties(const QCMakeCachePropertyList&); + /// interrupt the configure or generate process + void interrupt(); + /// delete the cache in binary directory + void deleteCache(); + /// reload the cache in binary directory + void reloadCache(); + /// set whether to do debug output + void setDebugOutput(bool); + +public: + /// get the list of cache properties + QCMakeCachePropertyList properties() const; + /// get the current binary directory + QString binaryDirectory() const; + /// get the current source directory + QString sourceDirectory() const; + /// get the current generator + QString generator() const; + /// get the available generators + QStringList availableGenerators() const; + /// get whether to do debug output + bool getDebugOutput() const; + +signals: + /// signal when properties change (during read from disk or configure process) + void propertiesChanged(const QCMakeCachePropertyList& vars); + /// signal when the generator changes + void generatorChanged(const QString& gen); + /// signal when the source directory changes (binary directory already + /// containing a CMakeCache.txt file) + void sourceDirChanged(const QString& dir); + /// signal when the binary directory changes + void binaryDirChanged(const QString& dir); + /// signal for progress events + void progressChanged(const QString& msg, float percent); + /// signal when configure is done + void configureDone(int error); + /// signal when generate is done + void generateDone(int error); + /// signal when there is an output message + void outputMessage(const QString& msg); + /// signal when there is an error message + void errorMessage(const QString& msg); + /// signal when debug output changes + void debugOutputChanged(bool); + +protected: + cmake* CMakeInstance; + + static void progressCallback(const char* msg, float percent, void* cd); + static void errorCallback(const char* msg, const char* title, + bool&, void* cd); + bool SuppressDevWarnings; + QString SourceDirectory; + QString BinaryDirectory; + QString Generator; + QStringList AvailableGenerators; + QString CMakeExecutable; +}; + +#endif // __QCMake_h + diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx new file mode 100644 index 000000000..20e9ba5ef --- /dev/null +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -0,0 +1,567 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: QCMakeCacheView.cxx,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:51 $ + Version: $Revision: 1.26.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "QCMakeCacheView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static QRegExp AdvancedRegExp[2] = { QRegExp("(false)"), QRegExp("(true|false)") }; + +// filter for searches +class QCMakeSearchFilter : public QSortFilterProxyModel +{ +public: + QCMakeSearchFilter(QObject* o) : QSortFilterProxyModel(o) {} +protected: + bool filterAcceptsRow(int row, const QModelIndex& p) const + { + // accept row if either column matches + QModelIndex idx0 = this->sourceModel()->index(row, 0, p); + QModelIndex idx1 = this->sourceModel()->index(row, 1, p); + QString str0 = this->sourceModel()->data(idx0).toString(); + QString str1 = this->sourceModel()->data(idx1).toString(); + + return str0.contains(this->filterRegExp()) || + str1.contains(this->filterRegExp()); + } +}; + +QCMakeCacheView::QCMakeCacheView(QWidget* p) + : QTableView(p), Init(false) +{ + // hook up our model and search/filter proxies + this->CacheModel = new QCMakeCacheModel(this); + this->AdvancedFilter = new QSortFilterProxyModel(this); + this->AdvancedFilter->setSourceModel(this->CacheModel); + this->AdvancedFilter->setFilterRole(QCMakeCacheModel::AdvancedRole); + this->AdvancedFilter->setFilterRegExp(AdvancedRegExp[0]); + this->AdvancedFilter->setDynamicSortFilter(true); + this->SearchFilter = new QCMakeSearchFilter(this); + this->SearchFilter->setSourceModel(this->AdvancedFilter); + this->SearchFilter->setFilterCaseSensitivity(Qt::CaseInsensitive); + this->SearchFilter->setDynamicSortFilter(true); + this->setModel(this->SearchFilter); + + // our delegate for creating our editors + QCMakeCacheModelDelegate* delegate = new QCMakeCacheModelDelegate(this); + this->setItemDelegate(delegate); + + this->setEditTriggers(QAbstractItemView::DoubleClicked | + QAbstractItemView::SelectedClicked | + QAbstractItemView::EditKeyPressed | + QAbstractItemView::AnyKeyPressed); + + // tab, backtab doesn't step through items + this->setTabKeyNavigation(false); + + // set up headers and sizes + int h = 0; + QFontMetrics met(this->font()); + h = qMax(met.height(), this->style()->pixelMetric(QStyle::PM_IndicatorHeight)); + this->verticalHeader()->setDefaultSectionSize(h + 4); + this->horizontalHeader()->setStretchLastSection(true); + this->verticalHeader()->hide(); +} + +void QCMakeCacheView::showEvent(QShowEvent* e) +{ + if(!this->Init) + { + // initialize the table view column size + int colWidth = this->columnWidth(0) + this->columnWidth(1); + this->setColumnWidth(0, colWidth/2); + this->setColumnWidth(1, colWidth/2); + this->Init = true; + } + return QTableView::showEvent(e); +} + +QCMakeCacheModel* QCMakeCacheView::cacheModel() const +{ + return this->CacheModel; +} + +QModelIndex QCMakeCacheView::moveCursor(CursorAction act, + Qt::KeyboardModifiers mod) +{ + // want home/end to go to begin/end of rows, not columns + if(act == MoveHome) + { + return this->model()->index(0, 1); + } + else if(act == MoveEnd) + { + return this->model()->index(this->model()->rowCount()-1, 1); + } + return QTableView::moveCursor(act, mod); +} + +void QCMakeCacheView::setShowAdvanced(bool s) +{ + this->AdvancedFilter->setFilterRegExp( + s ? AdvancedRegExp[1] : AdvancedRegExp[0]); +} + +bool QCMakeCacheView::showAdvanced() const +{ + return this->AdvancedFilter->filterRegExp() == AdvancedRegExp[1]; +} + +void QCMakeCacheView::setSearchFilter(const QString& s) +{ + this->SearchFilter->setFilterFixedString(s); +} + +QCMakeCacheModel::QCMakeCacheModel(QObject* p) + : QAbstractTableModel(p), + NewCount(0), EditEnabled(true) +{ +} + +QCMakeCacheModel::~QCMakeCacheModel() +{ +} + +static uint qHash(const QCMakeCacheProperty& p) +{ + return qHash(p.Key); +} + +void QCMakeCacheModel::clear() +{ + this->setProperties(QCMakeCachePropertyList()); +} + +void QCMakeCacheModel::setProperties(const QCMakeCachePropertyList& props) +{ + QSet newProps = props.toSet(); + QSet newProps2 = props.toSet(); + QSet oldProps = this->Properties.toSet(); + + oldProps.intersect(newProps); + newProps.subtract(oldProps); + newProps2.subtract(newProps); + + this->NewCount = newProps.count(); + this->Properties.clear(); + + this->Properties = newProps.toList(); + qSort(this->Properties); + QCMakeCachePropertyList tmp = newProps2.toList(); + qSort(tmp); + this->Properties += tmp; + + this->reset(); +} + +QCMakeCachePropertyList QCMakeCacheModel::properties() const +{ + return this->Properties; +} + +void QCMakeCacheModel::setEditEnabled(bool e) +{ + this->EditEnabled = e; +} + +bool QCMakeCacheModel::editEnabled() const +{ + return this->EditEnabled; +} + +int QCMakeCacheModel::newCount() const +{ + return this->NewCount; +} + +int QCMakeCacheModel::columnCount (const QModelIndex& /*p*/ ) const +{ + return 2; +} + +QVariant QCMakeCacheModel::data (const QModelIndex& idx, int role) const +{ + if(idx.column() == 0 && (role == Qt::DisplayRole || role == Qt::EditRole)) + { + return this->Properties[idx.row()].Key; + } + else if(idx.column() == 0 && role == Qt::ToolTipRole) + { + return this->data(idx, Qt::DisplayRole).toString() + "\n" + + this->data(idx, QCMakeCacheModel::HelpRole).toString(); + } + else if(idx.column() == 1 && (role == Qt::DisplayRole || role == Qt::EditRole)) + { + if(this->Properties[idx.row()].Type != QCMakeCacheProperty::BOOL) + { + return this->Properties[idx.row()].Value; + } + } + else if(idx.column() == 1 && role == Qt::CheckStateRole) + { + if(this->Properties[idx.row()].Type == QCMakeCacheProperty::BOOL) + { + return this->Properties[idx.row()].Value.toBool() ? Qt::Checked : Qt::Unchecked; + } + } + else if(role == QCMakeCacheModel::HelpRole) + { + return this->Properties[idx.row()].Help; + } + else if(role == QCMakeCacheModel::TypeRole) + { + return this->Properties[idx.row()].Type; + } + else if(role == QCMakeCacheModel::AdvancedRole) + { + return this->Properties[idx.row()].Advanced; + } + else if(role == Qt::BackgroundRole && idx.row()+1 <= this->NewCount) + { + return QBrush(QColor(255,100,100)); + } + return QVariant(); +} + +QModelIndex QCMakeCacheModel::parent (const QModelIndex& /*idx*/) const +{ + return QModelIndex(); +} + +int QCMakeCacheModel::rowCount (const QModelIndex& p) const +{ + if(p.isValid()) + { + return 0; + } + return this->Properties.count(); +} + +QVariant QCMakeCacheModel::headerData (int section, Qt::Orientation orient, int role) const +{ + // return header labels + if(role == Qt::DisplayRole && orient == Qt::Horizontal) + { + return section == 0 ? "Name" : "Value"; + } + return QVariant(); +} + +Qt::ItemFlags QCMakeCacheModel::flags (const QModelIndex& idx) const +{ + Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable; + // all column 1's are editable + if(idx.column() == 1 && this->EditEnabled) + { + f |= Qt::ItemIsEditable; + // booleans are editable in place + if(this->Properties[idx.row()].Type == QCMakeCacheProperty::BOOL) + { + f |= Qt::ItemIsUserCheckable; + } + } + return f; +} + + +bool QCMakeCacheModel::setData (const QModelIndex& idx, const QVariant& value, int role) +{ + if(idx.column() == 0 && (role == Qt::DisplayRole || role == Qt::EditRole)) + { + this->Properties[idx.row()].Key = value.toString(); + emit this->dataChanged(idx, idx); + } + else if(idx.column() == 1 && (role == Qt::DisplayRole || role == Qt::EditRole)) + { + this->Properties[idx.row()].Value = value.toString(); + emit this->dataChanged(idx, idx); + } + else if(idx.column() == 1 && (role == Qt::CheckStateRole)) + { + this->Properties[idx.row()].Value = value.toInt() == Qt::Checked; + emit this->dataChanged(idx, idx); + } + else if(role == QCMakeCacheModel::HelpRole) + { + this->Properties[idx.row()].Help = value.toString(); + emit this->dataChanged(idx, idx); + } + else if(role == QCMakeCacheModel::TypeRole) + { + this->Properties[idx.row()].Type = static_cast(value.toInt()); + } + else if(role == QCMakeCacheModel::AdvancedRole) + { + this->Properties[idx.row()].Advanced = value.toBool(); + } + return false; +} + +QModelIndex QCMakeCacheModel::buddy(const QModelIndex& idx) const +{ + if(idx.column() == 0) + { + if(this->Properties[idx.row()].Type != QCMakeCacheProperty::BOOL) + { + return this->index(idx.row(), 1); + } + } + return idx; +} + +bool QCMakeCacheModel::removeRows(int row, int num, const QModelIndex&) +{ + if(row < 0 || row+num > this->Properties.count()) + { + return false; + } + this->beginRemoveRows(QModelIndex(), row, row+num-1); + for(int i=0; iProperties.removeAt(row); + if(this->NewCount >= row+1) + { + this->NewCount--; + } + } + this->endRemoveRows(); + return true; +} + +bool QCMakeCacheModel::insertRows(int row, int num, const QModelIndex&) +{ + if(row < 0) + row = 0; + if(row > this->rowCount()) + row = this->rowCount(); + + this->beginInsertRows(QModelIndex(), row, row+num-1); + for(int i=0; iProperties.insert(row+i, QCMakeCacheProperty()); + if(this->NewCount >= row) + { + this->NewCount++; + } + } + this->endInsertRows(); + return true; +} + +QCMakeCacheModelDelegate::QCMakeCacheModelDelegate(QObject* p) + : QItemDelegate(p), FileDialogFlag(false) +{ +} + +void QCMakeCacheModelDelegate::setFileDialogFlag(bool f) +{ + this->FileDialogFlag = f; +} + +QWidget* QCMakeCacheModelDelegate::createEditor(QWidget* p, + const QStyleOptionViewItem&, const QModelIndex& idx) const +{ + const QAbstractItemModel* model = idx.model(); + QModelIndex var = model->index(idx.row(), 0); + QVariant type = idx.data(QCMakeCacheModel::TypeRole); + if(type == QCMakeCacheProperty::BOOL) + { + return NULL; + } + else if(type == QCMakeCacheProperty::PATH) + { + QCMakeCachePathEditor* editor = + new QCMakeCachePathEditor(p, + var.data(Qt::DisplayRole).toString()); + QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, + SLOT(setFileDialogFlag(bool))); + return editor; + } + else if(type == QCMakeCacheProperty::FILEPATH) + { + QCMakeCacheFilePathEditor* editor = + new QCMakeCacheFilePathEditor(p, + var.data(Qt::DisplayRole).toString()); + QObject::connect(editor, SIGNAL(fileDialogExists(bool)), this, + SLOT(setFileDialogFlag(bool))); + return editor; + } + + return new QLineEdit(p); +} + +bool QCMakeCacheModelDelegate::editorEvent(QEvent* e, QAbstractItemModel* model, + const QStyleOptionViewItem& option, const QModelIndex& index) +{ + Qt::ItemFlags flags = model->flags(index); + if (!(flags & Qt::ItemIsUserCheckable) || !(option.state & QStyle::State_Enabled) + || !(flags & Qt::ItemIsEnabled)) + { + return false; + } + + QVariant value = index.data(Qt::CheckStateRole); + if (!value.isValid()) + { + return false; + } + + if ((e->type() == QEvent::MouseButtonRelease) + || (e->type() == QEvent::MouseButtonDblClick)) + { + // eat the double click events inside the check rect + if (e->type() == QEvent::MouseButtonDblClick) + { + return true; + } + } + else if (e->type() == QEvent::KeyPress) + { + if(static_cast(e)->key() != Qt::Key_Space && + static_cast(e)->key() != Qt::Key_Select) + { + return false; + } + } + else + { + return false; + } + + Qt::CheckState state = (static_cast(value.toInt()) == Qt::Checked + ? Qt::Unchecked : Qt::Checked); + return model->setData(index, state, Qt::CheckStateRole); +} + +bool QCMakeCacheModelDelegate::eventFilter(QObject* object, QEvent* event) +{ + // workaround for what looks like a bug in Qt on Mac OS X + if(event->type() == QEvent::FocusOut && this->FileDialogFlag) + { + return false; + } + return QItemDelegate::eventFilter(object, event); +} + + +QCMakeCacheFileEditor::QCMakeCacheFileEditor(QWidget* p, const QString& var) + : QLineEdit(p), Variable(var) +{ + // this *is* instead of has a line edit so QAbstractItemView + // doesn't get confused with what the editor really is + this->setContentsMargins(0, 0, 0, 0); + this->ToolButton = new QToolButton(this); + this->ToolButton->setText("..."); + this->ToolButton->setCursor(QCursor(Qt::ArrowCursor)); + QObject::connect(this->ToolButton, SIGNAL(clicked(bool)), + this, SLOT(chooseFile())); +} + +QCMakeCacheFilePathEditor::QCMakeCacheFilePathEditor(QWidget* p, const QString& var) + : QCMakeCacheFileEditor(p, var) +{ + this->setCompleter(new QCMakeFileCompleter(this, false)); +} + +QCMakeCachePathEditor::QCMakeCachePathEditor(QWidget* p, const QString& var) + : QCMakeCacheFileEditor(p, var) +{ +this->setCompleter(new QCMakeFileCompleter(this, true)); +} + +void QCMakeCacheFileEditor::resizeEvent(QResizeEvent* e) +{ + // make the tool button fit on the right side + int h = e->size().height(); + this->ToolButton->resize(h, h); + this->ToolButton->move(this->width() - h, 0); + this->setContentsMargins(0, 0, h, 0); +} + +void QCMakeCacheFilePathEditor::chooseFile() +{ + // choose a file and set it + QString path; + QFileInfo info(this->text()); + QString title; + if(this->Variable.isEmpty()) + { + title = tr("Select File"); + } + else + { + title = tr("Select File for %1"); + title = title.arg(this->Variable); + } + this->fileDialogExists(true); + path = QFileDialog::getOpenFileName(this, title, info.absolutePath()); + this->fileDialogExists(false); + + if(!path.isEmpty()) + { + this->setText(QDir::fromNativeSeparators(path)); + } +} + +void QCMakeCachePathEditor::chooseFile() +{ + // choose a file and set it + QString path; + QString title; + if(this->Variable.isEmpty()) + { + title = tr("Select Path"); + } + else + { + title = tr("Select Path for %1"); + title = title.arg(this->Variable); + } + this->fileDialogExists(true); + path = QFileDialog::getExistingDirectory(this, title, this->text()); + this->fileDialogExists(false); + if(!path.isEmpty()) + { + this->setText(QDir::fromNativeSeparators(path)); + } +} + +QCMakeFileCompleter::QCMakeFileCompleter(QObject* o, bool dirs) + : QCompleter(o) +{ + QDirModel* model = new QDirModel(this); + if(dirs) + { + model->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot); + } + this->setModel(model); +} + +QString QCMakeFileCompleter::pathFromIndex(const QModelIndex& idx) const +{ + return QDir::fromNativeSeparators(QCompleter::pathFromIndex(idx)); +} + diff --git a/Source/QtDialog/QCMakeCacheView.h b/Source/QtDialog/QCMakeCacheView.h new file mode 100644 index 000000000..bff6a5104 --- /dev/null +++ b/Source/QtDialog/QCMakeCacheView.h @@ -0,0 +1,159 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: QCMakeCacheView.h,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:51 $ + Version: $Revision: 1.17.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef QCMakeCacheView_h +#define QCMakeCacheView_h + +#include "QCMake.h" +#include +#include +#include +#include +#include +#include +#include + +class QCMakeCacheModel; +class QToolButton; + + +/// Qt view class for cache properties +class QCMakeCacheView : public QTableView +{ + Q_OBJECT +public: + QCMakeCacheView(QWidget* p); + + QCMakeCacheModel* cacheModel() const; + bool showAdvanced() const; + +public slots: + void setShowAdvanced(bool); + void setSearchFilter(const QString&); + +protected: + QModelIndex moveCursor(CursorAction, Qt::KeyboardModifiers); + void showEvent(QShowEvent* e); + bool Init; + QCMakeCacheModel* CacheModel; + QSortFilterProxyModel* AdvancedFilter; + QSortFilterProxyModel* SearchFilter; +}; + +/// Qt model class for cache properties +class QCMakeCacheModel : public QAbstractTableModel +{ + Q_OBJECT +public: + QCMakeCacheModel(QObject* parent); + ~QCMakeCacheModel(); + + enum { HelpRole = Qt::UserRole, TypeRole, AdvancedRole }; + +public slots: + void setProperties(const QCMakeCachePropertyList& props); + void clear(); + void setEditEnabled(bool); + bool removeRows(int row, int count, const QModelIndex& idx = QModelIndex()); + bool insertRows(int row, int num, const QModelIndex&); + +public: + // satisfy [pure] virtuals + int columnCount (const QModelIndex& parent) const; + QVariant data (const QModelIndex& index, int role = Qt::DisplayRole) const; + QModelIndex parent (const QModelIndex& index) const; + int rowCount (const QModelIndex& parent = QModelIndex()) const; + QVariant headerData (int section, Qt::Orientation orient, int role) const; + Qt::ItemFlags flags (const QModelIndex& index) const; + bool setData (const QModelIndex& index, const QVariant& value, int role); + QModelIndex buddy (const QModelIndex& index) const; + + // get the properties + QCMakeCachePropertyList properties() const; + + // editing enabled + bool editEnabled() const; + + int newCount() const; + +protected: + QCMakeCachePropertyList Properties; + int NewCount; + bool EditEnabled; +}; + +/// Qt delegate class for interaction (or other customization) +/// with cache properties +class QCMakeCacheModelDelegate : public QItemDelegate +{ + Q_OBJECT +public: + QCMakeCacheModelDelegate(QObject* p); + /// create our own editors for cache properties + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, + const QModelIndex& index ) const; + bool editorEvent (QEvent* event, QAbstractItemModel* model, + const QStyleOptionViewItem& option, const QModelIndex& index); + bool eventFilter(QObject* object, QEvent* event); +protected slots: + void setFileDialogFlag(bool); +protected: + bool FileDialogFlag; +}; + +/// Editor widget for editing paths or file paths +class QCMakeCacheFileEditor : public QLineEdit +{ + Q_OBJECT +public: + QCMakeCacheFileEditor(QWidget* p, const QString& var); +protected slots: + virtual void chooseFile() = 0; +signals: + void fileDialogExists(bool); +protected: + void resizeEvent(QResizeEvent* e); + QToolButton* ToolButton; + QString Variable; +}; + +class QCMakeCachePathEditor : public QCMakeCacheFileEditor +{ + Q_OBJECT +public: + QCMakeCachePathEditor(QWidget* p = NULL, const QString& var = QString()); + void chooseFile(); +}; + +class QCMakeCacheFilePathEditor : public QCMakeCacheFileEditor +{ + Q_OBJECT +public: + QCMakeCacheFilePathEditor(QWidget* p = NULL, const QString& var = QString()); + void chooseFile(); +}; + +/// completer class that returns native cmake paths +class QCMakeFileCompleter : public QCompleter +{ +public: + QCMakeFileCompleter(QObject* o, bool dirs); + virtual QString pathFromIndex(const QModelIndex& idx) const; +}; + +#endif + diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx new file mode 100755 index 000000000..fbeb10efb --- /dev/null +++ b/Source/QtDialog/QMacInstallDialog.cxx @@ -0,0 +1,122 @@ +#include "QMacInstallDialog.h" +#include +#include "cmSystemTools.h" +#include +#include +#include "ui_MacInstallDialog.h" + +class QMacInstallDialog::QMacInstallDialogInternals : public Ui::Dialog +{ +public: +}; + +QMacInstallDialog::QMacInstallDialog(QWidget*w) + :QDialog(w) +{ + this->Internals = new QMacInstallDialogInternals; + this->Internals->setupUi(this); + QObject::connect(this->Internals->choosePathButton, SIGNAL(pressed()), + this, SLOT(ShowBrowser())); + QObject::connect(this->Internals->skipInstallButton, SIGNAL(pressed()), + this, SLOT(SkipInstall())); + QObject::connect(this->Internals->doInstallButton, SIGNAL(pressed()), + this, SLOT(DoInstall())); + this->Internals->InstallPrefix->setText("/usr/bin/"); + +} + +QMacInstallDialog::~QMacInstallDialog() +{ + delete this->Internals; +} + +void QMacInstallDialog::DoInstall() +{ + QDir installDir(this->Internals->InstallPrefix->text()); + std::string installTo = installDir.path().toStdString(); + if(!cmSystemTools::FileExists(installTo.c_str())) + { + QString message = tr("Build install does not exist, " + "should I create it?") + + "\n\n" + + tr("Directory: "); + message += installDir.path(); + QString title = tr("Create Directory"); + QMessageBox::StandardButton btn; + btn = QMessageBox::information(this, title, message, + QMessageBox::Yes | QMessageBox::No); + if(btn == QMessageBox::Yes) + { + cmSystemTools::MakeDirectory(installTo.c_str()); + } + } + QDir cmExecDir(QApplication::applicationDirPath()); + cmExecDir.cd("../bin"); + QFileInfoList list = cmExecDir.entryInfoList(); + for (int i = 0; i < list.size(); ++i) + { + QFileInfo fileInfo = list.at(i); + std::string filename = fileInfo.fileName().toStdString(); + if(filename.size() && filename[0] == '.') + { + continue; + } + std::string file = fileInfo.absoluteFilePath().toStdString(); + std::string newName = installTo; + newName += "/"; + newName += filename; + // Remove the old files + if(cmSystemTools::FileExists(newName.c_str())) + { + std::cout << "rm [" << newName << "]\n"; + if(!cmSystemTools::RemoveFile(newName.c_str())) + { + QString message = tr("Failed to remove file " + "installation may be incomplete: "); + message += newName.c_str(); + QString title = tr("Error Removing file"); + QMessageBox::StandardButton btn = + QMessageBox::critical(this, title, message, + QMessageBox::Ok|QMessageBox::Abort); + if(btn == QMessageBox::Abort) + { + return; + } + } + } + std::cout << "ln -s [" << file << "] ["; + std::cout << newName << "]\n"; + if(!cmSystemTools::CreateSymlink(file.c_str(), + newName.c_str())) + { + QString message = tr("Failed create symlink " + "installation may be incomplete: "); + message += newName.c_str(); + QString title = tr("Error Creating Symlink"); + QMessageBox::StandardButton btn = + QMessageBox::critical(this, title, message, + QMessageBox::Ok|QMessageBox::Abort); + if(btn == QMessageBox::Abort) + { + return; + } + } + } + this->done(0); +} + +void QMacInstallDialog::SkipInstall() +{ + this->done(0); +} + + +void QMacInstallDialog::ShowBrowser() +{ + QString dir = QFileDialog::getExistingDirectory(this, + tr("Enter Install Prefix"), this->Internals->InstallPrefix->text()); + if(!dir.isEmpty()) + { + this->Internals->InstallPrefix->setText(dir); + } +} diff --git a/Source/QtDialog/QMacInstallDialog.h b/Source/QtDialog/QMacInstallDialog.h new file mode 100755 index 000000000..efe67dfaf --- /dev/null +++ b/Source/QtDialog/QMacInstallDialog.h @@ -0,0 +1,20 @@ +#ifndef QMacInstallDialog_h +#define QMacInstallDialog_h +#include + +class QMacInstallDialog : public QDialog +{ + Q_OBJECT; +public: + QMacInstallDialog(QWidget*w); + ~QMacInstallDialog(); +private slots: + void ShowBrowser(); + void SkipInstall(); + void DoInstall(); +private: + class QMacInstallDialogInternals; + QMacInstallDialogInternals* Internals; +}; + +#endif diff --git a/Source/QtDialog/QtDialogCPack.cmake.in b/Source/QtDialog/QtDialogCPack.cmake.in new file mode 100755 index 000000000..27bcbada9 --- /dev/null +++ b/Source/QtDialog/QtDialogCPack.cmake.in @@ -0,0 +1,17 @@ +SET(IS_APPLE @APPLE@) +SET(CMAKE_PACKAGE_QTGUI @CMAKE_PACKAGE_QTGUI@) + +IF(CMAKE_PACKAGE_QTGUI) + SET(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "cmake-gui" "cmake-gui(beta)") + IF(IS_APPLE) + # for apple install we set the install prefix to + # / and then install + # cmake into the bundle for cmake-gui and must use DESTDIR + SET(CPACK_SET_DESTDIR TRUE) + # we also want to run post install stuff to setup command line + SET(CPACK_POSTFLIGHT_SCRIPT "@CMAKE_POSTFLIGHT_SCRIPT@") + SET(CPACK_POSTUPGRADE_SCRIPT "@CMAKE_POSTUPGRADE_SCRIPT@") + ENDIF(IS_APPLE) +ENDIF(CMAKE_PACKAGE_QTGUI) + + diff --git a/Source/QtDialog/README b/Source/QtDialog/README new file mode 100755 index 000000000..0701a2be0 --- /dev/null +++ b/Source/QtDialog/README @@ -0,0 +1,3 @@ +This is the Qt interface to CMake. It has a BSD license compatible with the +Qt license exception. Only developers with a paid QT license are permitted +to make changes to this code. Small patches and bug fixes can diff --git a/Source/QtDialog/cmakecache.xml b/Source/QtDialog/cmakecache.xml new file mode 100644 index 000000000..a13b5b19c --- /dev/null +++ b/Source/QtDialog/cmakecache.xml @@ -0,0 +1,8 @@ + + + + CMake cache file + + + + diff --git a/Source/QtDialog/postflight.sh.in b/Source/QtDialog/postflight.sh.in new file mode 100644 index 000000000..33be35206 --- /dev/null +++ b/Source/QtDialog/postflight.sh.in @@ -0,0 +1,3 @@ +#!/bin/bash +"$2@CMAKE_INSTALL_SUBDIR@/@CMAKE_BUNDLE_NAME@.app/Contents/MacOS/@CMAKE_BUNDLE_NAME@" --mac-install +exit 0 diff --git a/Source/QtDialog/postupgrade.sh.in b/Source/QtDialog/postupgrade.sh.in new file mode 100644 index 000000000..06bd98656 --- /dev/null +++ b/Source/QtDialog/postupgrade.sh.in @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 diff --git a/Source/WXDialog/CMakeIcon.xpm b/Source/WXDialog/CMakeIcon.xpm new file mode 100644 index 000000000..4c694c3a6 --- /dev/null +++ b/Source/WXDialog/CMakeIcon.xpm @@ -0,0 +1,276 @@ +/* XPM */ +static char *CMakeIcon_xpm[] = { +"16 16 256 3", +"000 c black", +"001 c #003F00", +"002 c #003F3F", +"003 c #3F0000", +"004 c #3F003F", +"005 c #3F3F00", +"006 c gray19", +"007 c #00007F", +"008 c #007F00", +"009 c #306F30", +"010 c #7F0000", +"011 c #606060", +"012 c #0000BF", +"013 c blue", +"014 c #00BF00", +"015 c green", +"016 c #BF0000", +"017 c red", +"018 c #909090", +"019 c #C0C0C0", +"020 c none", +"021 c black", +"022 c black", +"023 c black", +"024 c black", +"025 c black", +"026 c black", +"027 c black", +"028 c black", +"029 c black", +"030 c black", +"031 c black", +"032 c black", +"033 c black", +"034 c black", +"035 c black", +"036 c black", +"037 c black", +"038 c black", +"039 c black", +"040 c black", +"041 c black", +"042 c black", +"043 c black", +"044 c black", +"045 c black", +"046 c black", +"047 c black", +"048 c black", +"049 c black", +"050 c black", +"051 c black", +"052 c black", +"053 c black", +"054 c black", +"055 c black", +"056 c black", +"057 c black", +"058 c black", +"059 c black", +"060 c black", +"061 c black", +"062 c black", +"063 c black", +"064 c black", +"065 c black", +"066 c black", +"067 c black", +"068 c black", +"069 c black", +"070 c black", +"071 c black", +"072 c black", +"073 c black", +"074 c black", +"075 c black", +"076 c black", +"077 c black", +"078 c black", +"079 c black", +"080 c black", +"081 c black", +"082 c black", +"083 c black", +"084 c black", +"085 c black", +"086 c black", +"087 c black", +"088 c black", +"089 c black", +"090 c black", +"091 c black", +"092 c black", +"093 c black", +"094 c black", +"095 c black", +"096 c black", +"097 c black", +"098 c black", +"099 c black", +"100 c black", +"101 c black", +"102 c black", +"103 c black", +"104 c black", +"105 c black", +"106 c black", +"107 c black", +"108 c black", +"109 c black", +"110 c black", +"111 c black", +"112 c black", +"113 c black", +"114 c black", +"115 c black", +"116 c black", +"117 c black", +"118 c black", +"119 c black", +"120 c black", +"121 c black", +"122 c black", +"123 c black", +"124 c black", +"125 c black", +"126 c black", +"127 c black", +"128 c black", +"129 c black", +"130 c black", +"131 c black", +"132 c black", +"133 c black", +"134 c black", +"135 c black", +"136 c black", +"137 c black", +"138 c black", +"139 c black", +"140 c black", +"141 c black", +"142 c black", +"143 c black", +"144 c black", +"145 c black", +"146 c black", +"147 c black", +"148 c black", +"149 c black", +"150 c black", +"151 c black", +"152 c black", +"153 c black", +"154 c black", +"155 c black", +"156 c black", +"157 c black", +"158 c black", +"159 c black", +"160 c black", +"161 c black", +"162 c black", +"163 c black", +"164 c black", +"165 c black", +"166 c black", +"167 c black", +"168 c black", +"169 c black", +"170 c black", +"171 c black", +"172 c black", +"173 c black", +"174 c black", +"175 c black", +"176 c black", +"177 c black", +"178 c black", +"179 c black", +"180 c black", +"181 c black", +"182 c black", +"183 c black", +"184 c black", +"185 c black", +"186 c black", +"187 c black", +"188 c black", +"189 c black", +"190 c black", +"191 c black", +"192 c black", +"193 c black", +"194 c black", +"195 c black", +"196 c black", +"197 c black", +"198 c black", +"199 c black", +"200 c black", +"201 c black", +"202 c black", +"203 c black", +"204 c black", +"205 c black", +"206 c black", +"207 c black", +"208 c black", +"209 c black", +"210 c black", +"211 c black", +"212 c black", +"213 c black", +"214 c black", +"215 c black", +"216 c black", +"217 c black", +"218 c black", +"219 c black", +"220 c black", +"221 c black", +"222 c black", +"223 c black", +"224 c black", +"225 c black", +"226 c black", +"227 c black", +"228 c black", +"229 c black", +"230 c black", +"231 c black", +"232 c black", +"233 c black", +"234 c black", +"235 c black", +"236 c black", +"237 c black", +"238 c black", +"239 c black", +"240 c black", +"241 c black", +"242 c black", +"243 c black", +"244 c black", +"245 c black", +"246 c black", +"247 c black", +"248 c black", +"249 c black", +"250 c black", +"251 c black", +"252 c black", +"253 c black", +"254 c black", +"255 c black", +"020020020020020020020020020020020020020020020020", +"020020020020020020020000000020020020020020020020", +"020020020020020020020000003020020020020020020020", +"020020020020020020000012010000020020020020020020", +"020020020020020020007013010003020020020020020020", +"020020020020020000013013010016000020020020020020", +"020020020020020007013013004017003020020020020020", +"020020020020000013013013007017016000020020020020", +"020020020020007013013012006017017003020020020020", +"020020020000012013012018011017017016000020020020", +"020020020007013012009018019010017017003020020020", +"020020000013012014015014009010017017016000020020", +"020020007007014015015015015008005016017003020020", +"020000002015015015015015015015015014005010000020", +"020000008008008008008008008008008008008001000020", +"020020020020020020020020020020020020020020020020" +}; diff --git a/Source/WXDialog/CMakeLists.txt b/Source/WXDialog/CMakeLists.txt new file mode 100644 index 000000000..9644b0563 --- /dev/null +++ b/Source/WXDialog/CMakeLists.txt @@ -0,0 +1,87 @@ +##--------------------------------------------------------------------------- +## $RCSfile: CMakeLists.txt,v $ +## $Source: /cvsroot/CMake/CMake/Source/WXDialog/CMakeLists.txt,v $ +## $Revision: 1.25 $ +## $Date: 2007-11-05 19:47:20 $ +##--------------------------------------------------------------------------- +## Author: Jorgen Bodde +## Copyright: (c) Jorgen Bodde +## License: wxWidgets License +##--------------------------------------------------------------------------- + +# wxWindows -> wxWidgets Jan Woetzel 07/2006 +# tested with wx 2.6.3 with "multilib" build on Windows XP + +# CMake Options +SET(CMAKE_VERBOSE_MAKEFILE TRUE) + +# suppress wx header warnings? +#SET(HAVE_ISYSTEM 1) + +# in addition to wx std libs we need +SET( wxWidgets_USE_LIBS + std + html adv xml xrc ) +FIND_PACKAGE(wxWidgets REQUIRED) +#INCLUDE(${CMAKE_ROOT}/Modules/FindwxWidgets.cmake) + +# Start using wx stuff when it is fully found and set +IF(wxWidgets_FOUND) + INCLUDE( ${wxWidgets_USE_FILE} ) + + SET (CMAKE_SRCS + CMakeSetupFrame.cpp + CMakeSetup.cpp + CMakeSetupFrame.h + CMakeSetup.h + PropertyList.cpp + PropertyList.h + app_resources.cpp + app_resources.h + progressdlg.cpp + progressdlg.h + aboutdlg.cpp + aboutdlg.h + optionsdlg.cpp + optionsdlg.h + config.h + CommandLineInfo.cpp + CommandLineInfo.h ) + + # include .rc when windows + IF(WIN32) + SET ( CMAKE_SRCS ${CMAKE_SRCS} CMakeSetup.rc ) + ENDIF(WIN32) + + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/Source/WXDialog + ${wxWidgets_INCLUDE_DIR} ) + LINK_DIRECTORIES( ${wxWidgets_LINK_DIRECTORIES} + ${CMake_BINARY_DIR}/Source + ${CMake_BINARY_DIR}/Source/kwsys ) + + IF(APPLE) + ADD_EXECUTABLE(WXDialog MACOSX_BUNDLE ${CMAKE_SRCS}) + ELSE(APPLE) + ADD_EXECUTABLE(WXDialog WIN32 ${CMAKE_SRCS}) + ENDIF(APPLE) + INSTALL_TARGETS(/bin WXDialog) + + # not required on MSVS beause bound to _DEBUG, + # but other compiler may need it. + # However, the define prevents multiple build configurations + # in one build tree, + # e.g. MSVS supports Debug;Release + # TODO: shall we add the define or not - + # favor multi config or all compilers? (JW) + SET(CMAKE_CXX_FLAGS_DEBUG + "${CMAKE_CXX_FLAGS_DEBUG} -D__WXDEBUG__ -DWXDEBUG=1") + + IF(LINUX) + ADD_DEFINITIONS( -DLINUX=1 ) + ENDIF(LINUX) + + # if the checkbox view functionality is not desired, + # exclude this part from the smple + TARGET_LINK_LIBRARIES(WXDialog ${wxWidgets_LIBRARIES} cmsys CMakeLib) + INSTALL_TARGETS(/bin WXDialog) +ENDIF(wxWidgets_FOUND) diff --git a/Source/WXDialog/CMakeSetup.cpp b/Source/WXDialog/CMakeSetup.cpp new file mode 100644 index 000000000..23b3f0952 --- /dev/null +++ b/Source/WXDialog/CMakeSetup.cpp @@ -0,0 +1,123 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CMakeSetup.cpp,v $ + Language: C++ + Date: $Date: 2005-08-09 19:42:49 $ + Version: $Revision: 1.3 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "CMakeSetup.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include + +#include "cmSystemTools.h" +#include "CommandLineInfo.h" + +#include "CMakeSetup.h" +#include "CMakeSetupFrame.h" + +////@begin XPM images +////@end XPM images + +/*! + * Application instance implementation + */ + +////@begin implement app +IMPLEMENT_APP( CMakeSetupApp ) +////@end implement app + +/*! + * CMakeSetupApp type definition + */ + +IMPLEMENT_CLASS( CMakeSetupApp, wxApp ) + +/*! + * CMakeSetupApp event table definition + */ + +BEGIN_EVENT_TABLE( CMakeSetupApp, wxApp ) + +////@begin CMakeSetupApp event table entries +////@end CMakeSetupApp event table entries + +END_EVENT_TABLE() + +/*! + * Constructor for CMakeSetupApp + */ + +CMakeSetupApp::CMakeSetupApp() +{ +////@begin CMakeSetupApp member initialisation +////@end CMakeSetupApp member initialisation +} + +/*! + * Initialisation for CMakeSetupApp + */ + +bool CMakeSetupApp::OnInit() +{ + cmSystemTools::DisableRunCommandOutput(); + + // parse command line params + cmCommandLineInfo cm; + if(!cm.ParseCommandLine(wxApp::argc, wxApp::argv)) + { + printf("Error while parsing the command line\n"); + return false; + } + + // set vendor name and app for config + SetVendorName("Kitware"); + SetAppName("CMakeSetup"); + + CMakeSetupFrm *MyFrame = new CMakeSetupFrm(NULL); + + // alternative app path way, somehow otherwise it does not work + wxFileName fname(argv[0]); + MyFrame->DoInitFrame(cm, fname.GetPath(wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME)); + MyFrame->Show(TRUE); + + return true; +} + +/*! + * Cleanup for CMakeSetupApp + */ +int CMakeSetupApp::OnExit() +{ +////@begin CMakeSetupApp cleanup + return wxApp::OnExit(); +////@end CMakeSetupApp cleanup +} + diff --git a/Source/WXDialog/CMakeSetup.h b/Source/WXDialog/CMakeSetup.h new file mode 100644 index 000000000..00c3c25e5 --- /dev/null +++ b/Source/WXDialog/CMakeSetup.h @@ -0,0 +1,92 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CMakeSetup.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _CMAKESETUP_H_ +#define _CMAKESETUP_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "CMakeSetup.cpp" +#endif + +/*! + * Includes + */ + +////@begin includes +#include "wx/image.h" +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +////@end control identifiers + +/*! + * CMakeSetupApp class declaration + */ + +class CMakeSetupApp: public wxApp +{ + DECLARE_CLASS( CMakeSetupApp ) + DECLARE_EVENT_TABLE() + +public: + /// Constructor + CMakeSetupApp(); + + /// Initialises the application + virtual bool OnInit(); + + /// Called on exit + virtual int OnExit(); + +////@begin CMakeSetupApp event handler declarations + +////@end CMakeSetupApp event handler declarations + +////@begin CMakeSetupApp member function declarations + +////@end CMakeSetupApp member function declarations + +////@begin CMakeSetupApp member variables +////@end CMakeSetupApp member variables + +private: + wxString m_AppPath; +}; + +/*! + * Application instance declaration + */ + +////@begin declare app +DECLARE_APP(CMakeSetupApp) +////@end declare app + +#endif + // _CMAKESETUP_H_ diff --git a/Source/WXDialog/CMakeSetup.pjd b/Source/WXDialog/CMakeSetup.pjd new file mode 100644 index 000000000..fec0a4f63 --- /dev/null +++ b/Source/WXDialog/CMakeSetup.pjd @@ -0,0 +1,3514 @@ + + + + 1.0 + dialogblocks + + Project File + + + 0 + + + + + 87 + + FALSE + FALSE + FALSE + TRUE + TRUE + FALSE + Jorgen Bodde + + + FALSE + <All platforms> + <Any> + ///////////////////////////////////////////////////////////////////////////// +// Name: %HEADER-FILENAME% +// Purpose: +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + + + ///////////////////////////////////////////////////////////////////////////// +// Name: %SOURCE-FILENAME% +// Purpose: +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + + + /*! + * %BODY% + */ + + + ///////////////////////////////////////////////////////////////////////////// +// Name: %SYMBOLS-FILENAME% +// Purpose: Symbols file +// Author: %AUTHOR% +// Modified by: +// Created: %DATE% +// RCS-ID: +// Copyright: %COPYRIGHT% +// Licence: +///////////////////////////////////////////////////////////////////////////// + + + app_resources.h + app_resources.cpp + AppResources + app.h + app.cpp + Application + FALSE + + <None> + + + 15088528 + data-document + + + 0 + 1 + 0 + 0 + 0 + + Configurations + 15310432 + config-data-document + + + 0 + 1 + 0 + 15088528 + 0 + + TRUE + + Debug + ANSI + Static + Modular + GUI + wxMSW + Dynamic + Yes + No + No + %WXVERSION% + %EXECUTABLE% + + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + %AUTO% + + + + Projects + 15057456 + root-document + + project + 1 + 1 + 0 + 0 + 0 + + Windows + 15140496 + html-document + + dialogsfolder + 1 + 1 + 0 + 15057456 + 1 + + CMakeSetupApp + 14833712 + dialog-document + + app + 0 + 1 + 0 + 15140496 + 0 + 7/4/2005 + wbAppProxy + 10000 + FALSE + + CMakeSetupApp + wxApp + CMakeSetup.cpp + CMakeSetup.h + + + + + CMake Setup + 15139352 + dialog-document + + frame + 0 + 1 + 0 + 15140496 + 0 + 7/4/2005 + wbFrameProxy + 10100 + FALSE + + wxEVT_CLOSE_WINDOW|OnCloseWindow + ID_FRAME + 10100 + CMakeSetupFrm + wxFrame + CMakeSetupFrame.cpp + CMakeSetupFrame.h + + CMake Setup v2.0.x + TRUE + cmake_icon.xpm + FALSE + + + + + + FALSE + <Any platform> + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + + FALSE + FALSE + -1 + -1 + 600 + 550 + + + wxSplitterWindow: ID_SPLITTERWINDOW + 15327264 + dialog-control-document + + splitter + 0 + 1 + 0 + 15139352 + 0 + 7/4/2005 + wbSplitterWindowProxy + wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING|OnSplitterPosChanging + wxEVT_COMMAND_SPLITTER_DOUBLECLICKED|OnSplitterwindowSashDClick + ID_SPLITTERWINDOW + 10101 + wxSplitterWindow + wxSplitterWindow + m_splitter + TRUE + Horizontal + 300 + + + + + + FALSE + <Any platform> + TRUE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 100 + 100 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + wxPanel: ID_MAINPANEL + 15222232 + dialog-control-document + + panel + 0 + 1 + 0 + 15327264 + 0 + 7/4/2005 + wbPanelProxy + ID_MAINPANEL + 10102 + wxPanel + wxPanel + + FALSE + + + + + + FALSE + <Any platform> + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + TRUE + FALSE + + TRUE + -1 + -1 + 600 + 400 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + TRUE + + + + + wxBoxSizer V + 15211392 + dialog-control-document + + sizer + 0 + 1 + 0 + 15222232 + 0 + 7/4/2005 + wbBoxSizerProxy + Vertical + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxBoxSizer H + 15336232 + dialog-control-document + + sizer + 0 + 1 + 0 + 15211392 + 0 + 7/4/2005 + wbBoxSizerProxy + Horizontal + + Expand + Centre + 0 + 5 + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxFlexGridSizer + 15345208 + dialog-control-document + + sizer + 0 + 1 + 0 + 15336232 + 0 + 7/4/2005 + wbFlexGridSizerProxy + 1 + 1 + 3 + 2 + 0 + 0 + + <Any platform> + Centre + Top + 1 + 5 + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + wxStaticText: wxID_STATIC + 15174904 + dialog-control-document + + statictext + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbStaticTextProxy + wxID_STATIC + 5105 + wxStaticText + + CMake project path + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Left + Centre + 0 + 5 + TRUE + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + + + + + wxTextCtrl: ID_PROJECT_PATH + 15369448 + dialog-control-document + + textctrl + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbTextCtrlProxy + ID_PROJECT_PATH + 10103 + wxTextCtrl + m_cmProjectPath + + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 50 + -1 + Expand + Centre + 1 + 5 + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: ID_BROWSE_PROJECT + 15341600 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonBrowseProject + ID_BROWSE_PROJECT + 10104 + wxButton + m_BrowseProjectPathButton + Browse + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 55 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxStaticText: wxID_STATIC + 15095456 + dialog-control-document + + statictext + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbStaticTextProxy + wxID_STATIC + 5105 + wxStaticText + + Project build path + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Left + Centre + 0 + 5 + TRUE + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + + + + + wxTextCtrl: ID_SOURCE_BUILD_PATH + 15114544 + dialog-control-document + + textctrl + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbTextCtrlProxy + wxEVT_COMMAND_TEXT_UPDATED|OnSourceBuildPathUpdated + wxEVT_COMMAND_TEXT_ENTER|OnSourceBuildPathEnter + ID_SOURCE_BUILD_PATH + 10105 + wxTextCtrl + m_cmBuildPath + + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 50 + -1 + Expand + Top + 1 + 5 + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: ID_BROWSE_BUILD + 15258912 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 15345208 + 0 + 7/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonBrowseBuild + ID_BROWSE_BUILD + 10106 + wxButton + m_BrowseSourcePathButton + Browse + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 55 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + wxBoxSizer V + 15234376 + dialog-control-document + + sizer + 0 + 1 + 0 + 15336232 + 0 + 7/4/2005 + wbBoxSizerProxy + Vertical + + Centre + Expand + 0 + 5 + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + <Any platform> + + wxFlexGridSizer + 15190200 + dialog-control-document + + sizer + 0 + 1 + 0 + 15234376 + 0 + 21/4/2005 + wbFlexGridSizerProxy + + + 2 + 2 + 0 + 0 + + <Any platform> + Centre + Centre + 0 + 5 + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + + wxStaticText: wxID_STATIC + 15184416 + dialog-control-document + + statictext + 0 + 1 + 0 + 15190200 + 0 + 28/4/2005 + wbStaticTextProxy + wxID_STATIC + 5105 + wxStaticText + + Generate + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Left + Centre + 0 + 5 + FALSE + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + + + + + wxComboBox: ID_CHOOSE_GENERATOR + 15380104 + dialog-control-document + + combobox + 0 + 1 + 0 + 15190200 + 0 + 28/4/2005 + wbComboBoxProxy + ID_CHOOSE_GENERATOR + 10107 + wxComboBox + m_cmGeneratorChoice + + + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + TRUE + FALSE + FALSE + + -1 + -1 + 170 + -1 + Centre + Expand + 1 + 5 + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxStaticText: wxID_STATIC + 15143832 + dialog-control-document + + statictext + 0 + 1 + 0 + 15190200 + 0 + 21/4/2005 + wbStaticTextProxy + wxID_STATIC + 5105 + wxStaticText + + Search + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Left + Centre + 0 + 5 + FALSE + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + + + + + wxComboBox: ID_SEARCHQUERY + 15164688 + dialog-control-document + + combobox + 0 + 1 + 0 + 15190200 + 0 + 21/4/2005 + wbComboBoxProxy + wxEVT_COMMAND_COMBOBOX_SELECTED|OnSearchquerySelected + wxEVT_COMMAND_TEXT_UPDATED|OnSearchqueryUpdated + ID_SEARCHQUERY + 10109 + wxComboBox + m_cmSearchQuery + + + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + TRUE + + -1 + -1 + 170 + -1 + Centre + Expand + 1 + 5 + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + wxCheckBox: ID_SHOW_ADVANCED + 15248616 + dialog-control-document + + checkbox + 0 + 1 + 0 + 15234376 + 0 + 7/4/2005 + wbCheckBoxProxy + wxEVT_COMMAND_CHECKBOX_CLICKED|OnShowAdvancedValues + ID_SHOW_ADVANCED + 10108 + wxCheckBox + m_cmShowAdvanced + Show advanced values + FALSE + + + + + + + + FALSE + <Any platform> + FALSE + TRUE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Right + Centre + 0 + 5 + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + + + + + + + wxGrid: ID_OPTIONS + 15335040 + dialog-control-document + + grid + 0 + 1 + 0 + 15211392 + 0 + 7/4/2005 + wbGridProxy + wxEVT_GRID_CELL_CHANGE|OnCellChange + wxEVT_GRID_SELECT_CELL|OnGridSelectCell + wxEVT_MOTION|OnPropertyMotion + ID_OPTIONS + 10110 + wxPropertyList + wxGrid + m_cmOptions + TRUE + 10 + 2 + 250 + 25 + 20 + 0 + Rows + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + TRUE + FALSE + FALSE + TRUE + FALSE + + -1 + -1 + 200 + 150 + Expand + Centre + 1 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + + wxPanel: ID_LOGPANEL + 15443800 + dialog-control-document + + panel + 0 + 1 + 0 + 15327264 + 0 + 7/4/2005 + wbPanelProxy + ID_LOGPANEL + 10111 + wxPanel + wxPanel + + FALSE + + + + + + FALSE + <Any platform> + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + + TRUE + -1 + -1 + -1 + 100 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + TRUE + + + + + wxBoxSizer V + 15414728 + dialog-control-document + + sizer + 0 + 1 + 0 + 15443800 + 0 + 7/4/2005 + wbBoxSizerProxy + Vertical + + Centre + Centre + 1 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxBoxSizer H + 15422736 + dialog-control-document + + sizer + 0 + 1 + 0 + 15414728 + 0 + 8/4/2005 + wbBoxSizerProxy + Horizontal + + Expand + Centre + 1 + 5 + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + <Any platform> + + wxTextCtrl: ID_LOG_AREA + 15432752 + dialog-control-document + + textctrl + 0 + 1 + 0 + 15422736 + 0 + 8/4/2005 + wbTextCtrlProxy + ID_LOG_AREA + 10112 + wxTextCtrl + m_cmLog + Select your project path (where CMakeLists.txt is) and then select the build path (where the projects should be saved), or select a previous build path. + +Right click on a cache value for additional options (delete and ignore). Press configure to update and display new values in red, press OK to generate the projects and exit. + + + + + + FALSE + <Any platform> + + + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + + -1 + -1 + -1 + -1 + Expand + Expand + 1 + 5 + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + + + + + wxTextCtrl: ID_DESCRIPTION + 35749000 + dialog-control-document + + textctrl + 0 + 1 + 0 + 15422736 + 0 + 8/4/2005 + wbTextCtrlProxy + ID_DESCRIPTION + 10113 + wxTextCtrl + m_cmDescription + + + + + + + FALSE + <Any platform> + + + TRUE + FALSE + FALSE + FALSE + TRUE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + + -1 + -1 + 200 + -1 + Centre + Expand + 0 + 5 + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + + + + + wxBoxSizer H + 35769328 + dialog-control-document + + sizer + 0 + 1 + 0 + 15414728 + 0 + 7/4/2005 + wbBoxSizerProxy + Horizontal + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxButton: ID_DO_CONFIGURE + 35775496 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 7/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonConfigure + ID_DO_CONFIGURE + 10114 + wxButton + m_ConfigureButton + Co&nfigure + TRUE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: ID_DO_OK + 35789784 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 7/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonOk + ID_DO_OK + 10115 + wxButton + m_OkButton + &Generate! + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: ID_DO_CANCEL + 35804120 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 23/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonCancel + ID_DO_CANCEL + 10116 + wxButton + m_CancelButton + C&ancel + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxStaticLine: wxID_STATIC + 35818312 + dialog-control-document + + staticline + 0 + 1 + 0 + 35769328 + 0 + 23/4/2005 + wbStaticLineProxy + wxID_STATIC + 5105 + wxStaticLine + + + + + FALSE + __WXMSW__ + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Expand + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + wxButton: ID_DO_DELETE_CACHE + 35831264 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 8/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnButtonDeleteCache + ID_DO_DELETE_CACHE + 10117 + wxButton + m_DeleteCacheButton + &Delete Cache + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: ID_CLEAR_LOG + 35845416 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 23/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnClearLogClick + ID_CLEAR_LOG + 10118 + wxButton + m_ClearLogButton + Clear &Log + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxStaticLine: wxID_STATIC + 35859640 + dialog-control-document + + staticline + 0 + 1 + 0 + 35769328 + 0 + 23/4/2005 + wbStaticLineProxy + wxID_STATIC + 5105 + wxStaticLine + + + + + FALSE + __WXMSW__ + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Expand + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + wxButton: ID_BROWSE_GRID + 35872520 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35769328 + 0 + 23/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnBrowseGridClick + ID_BROWSE_GRID + 10119 + wxButton + m_cmBrowseCell + &Browse + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + + + + wxStatusBar: ID_STATUSBAR + 15182152 + dialog-control-document + + statusbar + 0 + 1 + 0 + 15139352 + 0 + 7/4/2005 + wbStatusBarProxy + ID_STATUSBAR + 10120 + wxStatusBar + + + + + + + FALSE + <Any platform> + 2 + + + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxMenuBar: ID_CMAKE_MENUBAR + 35895160 + dialog-control-document + + menubar + 0 + 1 + 0 + 15139352 + 0 + 19/4/2005 + wbMenuBarProxy + ID_CMAKE_MENUBAR + <Any platform> + + File + 35897080 + dialog-control-document + + menu + 0 + 1 + 0 + 35895160 + 0 + 19/4/2005 + wbMenuProxy + &File + <Any platform> + + &Reload Cache\tCtrl+R: ID_MENU_RELOAD_CACHE + 35899080 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35897080 + 0 + 19/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuReloadCacheClick + ID_MENU_RELOAD_CACHE + 10122 + &Reload Cache\tCtrl+R + Normal + FALSE + Reload the cache from disk + + <Any platform> + + + &Delete Cache\tCtrl+D: ID_MENU_DELETE_CACHE + 35902816 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35897080 + 0 + 19/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuDeleteCacheClick + ID_MENU_DELETE_CACHE + 10123 + &Delete Cache\tCtrl+D + Normal + FALSE + Delete the cache on disk of the current path + + <Any platform> + + + ------------ + 35906472 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35897080 + 0 + 19/4/2005 + wbMenuSeparatorProxy + <Any platform> + + + E&xit\tAlt+F4: ID_MENU_QUIT + 35908352 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35897080 + 0 + 19/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuQuitClick + ID_MENU_QUIT + 10125 + E&xit\tAlt+F4 + Normal + FALSE + Quit CMake Setup + + <Any platform> + + + + Tools + 35912048 + dialog-control-document + + menu + 0 + 1 + 0 + 35895160 + 0 + 29/4/2005 + wbMenuProxy + &Tools + <Any platform> + + &Configure\tCtrl+N: ID_MENU_CONFIGURE + 35913904 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35912048 + 0 + 31/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuConfigureClick + ID_MENU_CONFIGURE + 10126 + &Configure\tCtrl+N + Normal + FALSE + + + <Any platform> + + + &Generate and Exit\tCtrl+G: ID_MENU_EXITGENERATE + 35917648 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35912048 + 0 + 31/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuGenerateClick + ID_MENU_EXITGENERATE + 10127 + &Generate and Exit\tCtrl+G + Normal + FALSE + + + <Any platform> + + + Toggle &Advanced\tCtrl+A: ID_MENU_TOGGLE_ADVANCED + 35921344 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35912048 + 0 + 31/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnMenuToggleAdvancedClick + ID_MENU_TOGGLE_ADVANCED + 10128 + Toggle &Advanced\tCtrl+A + Normal + FALSE + + + <Any platform> + + + ------------ + 35925000 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35912048 + 0 + 31/4/2005 + wbMenuSeparatorProxy + <Any platform> + + + &Options\tCtrl+O: ID_CMAKE_OPTIONS + 35926880 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35912048 + 0 + 31/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnOptionsClick + ID_CMAKE_OPTIONS + 10124 + &Options\tCtrl+O + Normal + FALSE + + + <Any platform> + + + + Help + 35930576 + dialog-control-document + + menu + 0 + 1 + 0 + 35895160 + 0 + 29/4/2005 + wbMenuProxy + &Help + <Any platform> + + &About ...: ID_ABOUTDLG + 35932424 + dialog-control-document + + menuitem + 0 + 1 + 0 + 35930576 + 0 + 29/4/2005 + wbMenuItemProxy + wxEVT_COMMAND_MENU_SELECTED|OnAboutClick + ID_ABOUTDLG + 10121 + &About ... + Normal + FALSE + Shows the about dialog ... + + <Any platform> + + + + + + CachePopupMenu + 15138824 + dialog-document + + menu + 0 + 1 + 0 + 15140496 + 0 + wbStandaloneMenuProxy + 10050 + FALSE + + ID_MENU + CreatePopupMenu + <Any platform> + + &Ignore cache entry: ID_CACHE_IGNORE + 35936824 + dialog-control-document + + menuitem + 0 + 1 + 0 + 15138824 + 0 + 16/4/2005 + wbMenuItemProxy + ID_CACHE_IGNORE + 10051 + &Ignore cache entry + Normal + FALSE + Ignores the value of the current cache entry + + <Any platform> + + + &Delete cache entry: ID_CACHE_DELETE + 35940576 + dialog-control-document + + menuitem + 0 + 1 + 0 + 15138824 + 0 + 16/4/2005 + wbMenuItemProxy + ID_CACHE_DELETE + 10052 + &Delete cache entry + Normal + FALSE + Deletes the current cache entry (reverts on next configure) + + <Any platform> + + + ------------ + 35944192 + dialog-control-document + + menuitem + 0 + 1 + 0 + 15138824 + 0 + 23/4/2005 + wbMenuSeparatorProxy + <Any platform> + + + &Browse ...: ID_CACHE_BROWSE + 35945856 + dialog-control-document + + menuitem + 0 + 1 + 0 + 15138824 + 0 + 23/4/2005 + wbMenuItemProxy + ID_CACHE_BROWSE + 10053 + &Browse ... + Normal + FALSE + + + <Any platform> + + + + Progress Dialog + 35949536 + dialog-document + + dialog + 0 + 1 + 0 + 15140496 + 0 + 27/4/2005 + wbDialogProxy + 10000 + FALSE + + ID_PROGRESSDLG + 10000 + CMProgressDialog + wxDialog + wxDialog + progressdlg.cpp + progressdlg.h + + Progress Dialog + TRUE + + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + + FALSE + TRUE + -1 + -1 + 400 + 300 + + + wxBoxSizer V + 35967376 + dialog-control-document + + sizer + 0 + 1 + 0 + 35949536 + 0 + wbBoxSizerProxy + Vertical + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + Spacer + 35975296 + dialog-control-document + + spacer + 0 + 1 + 0 + 35967376 + 0 + 27/4/2005 + wbSpacerProxy + 5 + 5 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + + wxStaticText: wxID_STATIC + 35982864 + dialog-control-document + + statictext + 0 + 1 + 0 + 35967376 + 0 + 27/4/2005 + wbStaticTextProxy + wxID_STATIC + 5105 + wxStaticText + m_textMessage + Please wait while CMake configures ... + + + + + + FALSE + <Any platform> + + + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + TRUE + FALSE + + + + + wxBoxSizer H + 35998688 + dialog-control-document + + sizer + 0 + 1 + 0 + 35967376 + 0 + 27/4/2005 + wbBoxSizerProxy + Horizontal + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxGauge: ID_CMAKE_PROGRESS + 36006648 + dialog-control-document + + gauge + 0 + 1 + 0 + 35998688 + 0 + 27/4/2005 + wbGaugeProxy + ID_CMAKE_PROGRESS + 10001 + wxGauge + m_progress + 0 + 100 + + + + + + FALSE + <Any platform> + + + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 250 + 20 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + wxButton: ID_CMAKE_BUTTON + 36022448 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 35967376 + 0 + 27/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnCmakeCancelClick + ID_CMAKE_BUTTON + 10002 + wxButton + + &Cancel + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + Spacer + 36035776 + dialog-control-document + + spacer + 0 + 1 + 0 + 35967376 + 0 + 27/4/2005 + wbSpacerProxy + 5 + 5 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + <Any platform> + + + + + About ... + 15317784 + dialog-document + + dialog + 0 + 1 + 0 + 15140496 + 0 + 27/4/2005 + wbDialogProxy + 10000 + FALSE + + ID_SOME_ABOUTDLG + 10003 + CMAboutDlg + wxDialog + wxDialog + aboutdlg.cpp + aboutdlg.h + + About ... + TRUE + + FALSE + + + + + + FALSE + <Any platform> + FALSE + TRUE + TRUE + FALSE + TRUE + FALSE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + + FALSE + TRUE + -1 + -1 + 400 + 300 + + + wxBoxSizer V + 36057296 + dialog-control-document + + sizer + 0 + 1 + 0 + 15317784 + 0 + wbBoxSizerProxy + Vertical + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxFlexGridSizer + 36065536 + dialog-control-document + + sizer + 0 + 1 + 0 + 36057296 + 0 + 28/4/2005 + wbFlexGridSizerProxy + 1 + 0 + 2 + 1 + 0 + 0 + + <Any platform> + Expand + Centre + 1 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + wxStaticBitmap: wxID_STATIC + 36075864 + dialog-control-document + + staticbitmap + 0 + 1 + 0 + 36065536 + 0 + 28/4/2005 + wbStaticBitmapProxy + wxID_STATIC + 5105 + wxStaticBitmap + m_cmIcon + + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + 32 + 32 + Centre + Top + 0 + 5 + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + FALSE + + + + + wxHtmlWindow: ID_HTMLWINDOW + 36090408 + dialog-control-document + + htmlwindow + 0 + 1 + 0 + 36065536 + 0 + 28/4/2005 + wbHtmlWindowProxy + ID_HTMLWINDOW + 10000 + wxHtmlWindow + m_html + + + + + + + + FALSE + <Any platform> + + + FALSE + TRUE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + TRUE + FALSE + + -1 + -1 + 500 + 300 + Expand + Expand + 1 + 5 + FALSE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + wxButton: ID_ABOUT_DLG_OK + 36107664 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 36057296 + 0 + 28/4/2005 + wbButtonProxy + wxEVT_COMMAND_BUTTON_CLICKED|OnAboutDlgClick + ID_ABOUT_DLG_OK + 10005 + wxButton + + &Ok + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + + CMakeSetup Options ... + 35982000 + dialog-document + + dialog + 0 + 1 + 0 + 15140496 + 0 + 29/4/2005 + wbDialogProxy + 10000 + FALSE + + ID_DIALOG + 10004 + CMOptionsDlg + wxDialog + wxDialog + optionsdlg.cpp + optionsdlg.h + + CMakeSetup Options ... + TRUE + + FALSE + + + + + + FALSE + <Any platform> + FALSE + TRUE + TRUE + FALSE + TRUE + FALSE + FALSE + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + + FALSE + FALSE + -1 + -1 + 400 + 300 + + + wxBoxSizer V + 36135880 + dialog-control-document + + sizer + 0 + 1 + 0 + 35982000 + 0 + wbBoxSizerProxy + Vertical + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxNotebook: ID_NOTEBOOK + 36145472 + dialog-control-document + + notebook + 0 + 1 + 0 + 36135880 + 0 + 29/4/2005 + wbNotebookProxy + ID_NOTEBOOK + 10006 + wxNotebook + + FALSE + + + + + + FALSE + <Any platform> + + + TRUE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Expand + Centre + 1 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + TRUE + + + + wxPanel: ID_PANEL + 36166888 + dialog-control-document + + panel + 0 + 1 + 0 + 36145472 + 0 + 29/4/2005 + wbPanelProxy + ID_PANEL + 10007 + wxPanel + wxPanel + + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + TRUE + FALSE + FALSE + + TRUE + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + General + + + wxBoxSizer V + 36317128 + dialog-control-document + + sizer + 0 + 1 + 0 + 36166888 + 0 + 29/4/2005 + wbBoxSizerProxy + Vertical + + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + Spacer + 36325216 + dialog-control-document + + spacer + 0 + 1 + 0 + 36317128 + 0 + 29/4/2005 + wbSpacerProxy + 5 + 5 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + + wxCheckBox: ID_CHECKBOX_CLOSECMAKE + 36332952 + dialog-control-document + + checkbox + 0 + 1 + 0 + 36317128 + 0 + 29/4/2005 + wbCheckBoxProxy + wxEVT_COMMAND_CHECKBOX_CLICKED|OnButtonOK + ID_CHECKBOX_CLOSECMAKE + 10008 + wxCheckBox + m_closeAfterGenerate + Close down CMakeSetup after generation of project + FALSE + + + + + + + + FALSE + <Any platform> + FALSE + TRUE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Left + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + + + wxBoxSizer H + 36164088 + dialog-control-document + + sizer + 0 + 1 + 0 + 36135880 + 0 + 29/4/2005 + wbBoxSizerProxy + Horizontal + + Centre + Centre + 0 + 5 + TRUE + TRUE + FALSE + TRUE + FALSE + FALSE + FALSE + <Any platform> + + wxButton: wxID_OK + 36348448 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 36164088 + 0 + 29/4/2005 + wbButtonProxy + wxID_OK + 5100 + wxButton + + &OK + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + wxButton: wxID_CANCEL + 36362168 + dialog-control-document + + dialogcontrol + 0 + 1 + 0 + 36164088 + 0 + 29/4/2005 + wbButtonProxy + wxID_CANCEL + 5101 + wxButton + + &Cancel + FALSE + + + + + + FALSE + <Any platform> + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + FALSE + + -1 + -1 + -1 + -1 + Centre + Centre + 0 + 5 + TRUE + TRUE + TRUE + TRUE + FALSE + FALSE + FALSE + + + + + + + + + Sources + 15191936 + html-document + + sourcesfolder + 1 + 1 + 0 + 15057456 + 1 + + CMakeSetup.rc + 15091464 + source-editor-document + CMakeSetup.rc + source-editor + 0 + 0 + 1 + 15191936 + 0 + 7/4/2005 + + + + + Images + 36089928 + html-document + + bitmapsfolder + 1 + 1 + 0 + 15057456 + 1 + + NGDialog.ico + 36090080 + image-document + NGDialog.ico + image + 0 + 0 + 0 + 36089928 + 0 + 25/4/2005 + 100 + + + + diff --git a/Source/WXDialog/CMakeSetup.rc b/Source/WXDialog/CMakeSetup.rc new file mode 100644 index 000000000..1cd7ef290 --- /dev/null +++ b/Source/WXDialog/CMakeSetup.rc @@ -0,0 +1,12 @@ +#ifndef APSTUDIO_INVOKED +#include "wx/msw/wx.rc" +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +DID_AAAAAAA ICON "NGDialog.ico" diff --git a/Source/WXDialog/CMakeSetupFrame.cpp b/Source/WXDialog/CMakeSetupFrame.cpp new file mode 100644 index 000000000..26ac226b1 --- /dev/null +++ b/Source/WXDialog/CMakeSetupFrame.cpp @@ -0,0 +1,1778 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CMakeSetupFrame.cpp,v $ + Language: C++ + Date: $Date: 2007-11-05 19:47:20 $ + Version: $Revision: 1.3 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "CMakeSetupFrame.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include +#include +#include + +#include "CMakeSetupFrame.h" +#include "PropertyList.h" +#include "app_resources.h" +#include "CMakeIcon.xpm" +#include "aboutdlg.h" + +// cmake includes +#include "../cmVersion.h" +#include "../cmListFileCache.h" +#include "../cmCacheManager.h" +#include "../cmGlobalGenerator.h" +#include "../cmDynamicLoader.h" + +////@begin XPM images +////@end XPM images + +/*! + * CMakeSetupFrm type definition + */ + +IMPLEMENT_CLASS( CMakeSetupFrm, wxFrame ) + +/*! + * CMakeSetupFrm event table definition + */ + +BEGIN_EVENT_TABLE( CMakeSetupFrm, wxFrame ) + +////@begin CMakeSetupFrm event table entries + EVT_CLOSE( CMakeSetupFrm::OnCloseWindow ) + + EVT_SPLITTER_SASH_POS_CHANGING( ID_SPLITTERWINDOW, CMakeSetupFrm::OnSplitterPosChanging ) + EVT_SPLITTER_DCLICK( ID_SPLITTERWINDOW, CMakeSetupFrm::OnSplitterwindowSashDClick ) + + EVT_BUTTON( ID_BROWSE_PROJECT, CMakeSetupFrm::OnButtonBrowseProject ) + + EVT_TEXT( ID_SOURCE_BUILD_PATH, CMakeSetupFrm::OnSourceBuildPathUpdated ) + EVT_TEXT_ENTER( ID_SOURCE_BUILD_PATH, CMakeSetupFrm::OnSourceBuildPathEnter ) + + EVT_BUTTON( ID_BROWSE_BUILD, CMakeSetupFrm::OnButtonBrowseBuild ) + + EVT_COMBOBOX( ID_SEARCHQUERY, CMakeSetupFrm::OnSearchquerySelected ) + EVT_TEXT( ID_SEARCHQUERY, CMakeSetupFrm::OnSearchqueryUpdated ) + + EVT_CHECKBOX( ID_SHOW_ADVANCED, CMakeSetupFrm::OnShowAdvancedValues ) + + EVT_GRID_CELL_CHANGE( CMakeSetupFrm::OnCellChange ) + EVT_GRID_SELECT_CELL( CMakeSetupFrm::OnGridSelectCell ) + EVT_MOTION( CMakeSetupFrm::OnPropertyMotion ) + + EVT_BUTTON( ID_DO_CONFIGURE, CMakeSetupFrm::OnButtonConfigure ) + + EVT_BUTTON( ID_DO_OK, CMakeSetupFrm::OnButtonOk ) + + EVT_BUTTON( ID_DO_CANCEL, CMakeSetupFrm::OnButtonCancel ) + + EVT_BUTTON( ID_DO_DELETE_CACHE, CMakeSetupFrm::OnButtonDeleteCache ) + + EVT_BUTTON( ID_CLEAR_LOG, CMakeSetupFrm::OnClearLogClick ) + + EVT_BUTTON( ID_BROWSE_GRID, CMakeSetupFrm::OnBrowseGridClick ) + + EVT_MENU( ID_MENU_RELOAD_CACHE, CMakeSetupFrm::OnMenuReloadCacheClick ) + + EVT_MENU( ID_MENU_DELETE_CACHE, CMakeSetupFrm::OnMenuDeleteCacheClick ) + + EVT_MENU( ID_MENU_QUIT, CMakeSetupFrm::OnMenuQuitClick ) + + EVT_MENU( ID_MENU_CONFIGURE, CMakeSetupFrm::OnMenuConfigureClick ) + + EVT_MENU( ID_MENU_EXITGENERATE, CMakeSetupFrm::OnMenuGenerateClick ) + + EVT_MENU( ID_MENU_TOGGLE_ADVANCED, CMakeSetupFrm::OnMenuToggleAdvancedClick ) + + EVT_MENU( ID_CMAKE_OPTIONS, CMakeSetupFrm::OnOptionsClick ) + + EVT_MENU( ID_ABOUTDLG, CMakeSetupFrm::OnAboutClick ) + +////@end CMakeSetupFrm event table entries + + EVT_MENU_RANGE(CM_RECENT_BUILD_ITEM, CM_RECENT_BUILD_ITEM + CM_MAX_RECENT_PATHS, CMakeSetupFrm::OnRecentFileMenu) + + EVT_TEXT_ENTER(ID_SEARCHQUERY, CMakeSetupFrm::OnAddQuery ) + +END_EVENT_TABLE() + +/** Callback function for CMake generator, to tell user how + far the generation actually is */ +void updateProgress(const char *msg, float prog, void *cd) +{ + // TODO: Make some kind of progress counter + + CMakeSetupFrm *fm = (CMakeSetupFrm *)cd; + + if(fm) + { + if(prog < 0) + fm->LogMessage(0, msg); + else + { + fm->UpdateProgress(prog); + fm->IssueUpdate(); + } + } +} + +/** Callback function for CMake generator, to tell user about stuff. This should be + logged in the m_log window */ +void MFCMessageCallback(const char* m, const char* title, bool& nomore, void *clientdata) +{ + CMakeSetupFrm *fm = (CMakeSetupFrm *)clientdata; + + if(fm) + { + wxString what = m, msg; + if(what.StartsWith("CMake Error: ")) + fm->LogMessage(-1, m); + else + fm->LogMessage(1, m); + } +} + +// Convert to Win32 path (slashes). This calls the system tools one and then +// removes the spaces. It is not in system tools because we don't want any +// generators accidentally use it +std::string ConvertToWindowsPath(const char* path) +{ + // Convert to output path. + // Remove the "" around it (if any) since it's an output path for + // the shell. If another shell-oriented feature is not designed + // for a GUI use, then we are in trouble. + // save the value of the force to unix path option + bool saveForce = cmSystemTools::GetForceUnixPaths(); + // make sure we get windows paths no matter what for the GUI + cmSystemTools::SetForceUnixPaths(false); + std::string s = cmSystemTools::ConvertToOutputPath(path); + // now restore the force unix path to its previous value + cmSystemTools::SetForceUnixPaths(saveForce); + if (s.size()) + { + std::string::iterator i = s.begin(); + if (*i == '\"') + { + s.erase(i, i + 1); + } + i = s.begin() + s.length() - 1; + if (*i == '\"') + { + s.erase(i, i + 1); + } + } + return s; +} + + +bool DnDFile::OnDropFiles(wxCoord, wxCoord, const wxArrayString& filenames) +{ + size_t nFiles = filenames.GetCount(); + + // only one item allowed + if(nFiles > 1) + return false; + + if(nFiles == 1) + { + // only one dir allowed + if(!wxDirExists(filenames[0])) + return false; + + // strip the seperator + wxFileName name; + name.AssignDir(filenames[0]); + + // issue a 'drop' by changing text ctrl + m_pOwner->SetValue(name.GetFullPath()); + + return true; + } + + return false; +} + +/*! + * CMakeSetupFrm constructors + */ + +CMakeSetupFrm::CMakeSetupFrm( ) + : m_cmake(0) +{ +} + +CMakeSetupFrm::CMakeSetupFrm( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) + : m_cmake(0) +{ + Create( parent, id, caption, pos, size, style ); +} + +/*! + * CMakeSetupFrm creator + */ + +bool CMakeSetupFrm::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ +////@begin CMakeSetupFrm member initialisation + m_splitter = NULL; + m_cmProjectPath = NULL; + m_BrowseProjectPathButton = NULL; + m_cmBuildPath = NULL; + m_BrowseSourcePathButton = NULL; + m_cmGeneratorChoice = NULL; + m_cmSearchQuery = NULL; + m_cmShowAdvanced = NULL; + m_cmOptions = NULL; + m_cmLog = NULL; + m_cmDescription = NULL; + m_ConfigureButton = NULL; + m_OkButton = NULL; + m_CancelButton = NULL; + m_DeleteCacheButton = NULL; + m_ClearLogButton = NULL; + m_cmBrowseCell = NULL; +////@end CMakeSetupFrm member initialisation + + wxFrame::Create( parent, id, caption, pos, size, style ); + + // make sure the developer does not assign more then 100 + // would be rediculous but also overlap other id's + wxASSERT(CM_MAX_RECENT_PATHS < 100); + + m_ExitTimer = 0; + + m_progressDlg = 0; + m_noRefresh = false; + m_quitAfterGenerating = false; + + m_config = new wxConfig("CMakeSetup"); + + wxIcon icon(CMakeIcon_xpm); + SetIcon(icon); + + CreateControls(); + + //SetIcon(GetIconResource(wxT("cmake_icon.xpm"))); + //SetIcon(wxIcon("NGDialog.ico", wxBITMAP_TYPE_ICO_RESOURCE)); + Centre(); + + // is it needed to hide console? + m_RunningConfigure = false; + cmSystemTools::SetRunCommandHideConsole(true); + cmSystemTools::SetErrorCallback(MFCMessageCallback, (void *)this); + + // create our cmake instance + m_cmake = new cmake; + m_cmake->SetProgressCallback(updateProgress, (void *)this); + + return TRUE; +} + +CMakeSetupFrm::~CMakeSetupFrm() +{ + wxString str; + + // write configs back to disk + m_config->Write(CM_LASTPROJECT_PATH, m_cmProjectPath->GetValue()); + m_config->Write(CM_LASTBUILD_PATH, m_cmBuildPath->GetValue()); + + // clear the config first + for(size_t i = 0 ; i < CM_MAX_RECENT_PATHS; i++) + { + str.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); + m_config->Write(str, _("")); + } + + // write the last CM_MAX_RECENT_PATHS items back to config + int i = (m_recentPaths.Count() >= CM_MAX_RECENT_PATHS ? CM_MAX_RECENT_PATHS : m_recentPaths.Count()); + while(i > 0) + { + str.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); + m_config->Write(str, m_recentPaths[i - 1]); + i--; + } + + // write recent query list to config + for(int j = 0; j < m_cmSearchQuery->GetCount(); j++) + { + // allow max to be written + if(j < CM_MAX_SEARCH_QUERIES) + { + str.Printf("%s%i", _(CM_SEARCH_QUERY), j); + m_config->Write(str, m_cmSearchQuery->GetString(j)); + } + else + break; + } + + // set window pos + size in settings + if(!IsIconized() && !IsMaximized()) + { + int xsize, ysize; + GetSize(&xsize, &ysize); + if(xsize > 0 && ysize > 0) + { + m_config->Write(CM_XSIZE, (long)xsize); + m_config->Write(CM_YSIZE, (long)ysize); + } + + if(m_splitter->GetSashPosition() > 0) + m_config->Write(CM_SPLITTERPOS, (long)m_splitter->GetSashPosition()); + + GetPosition(&xsize, &ysize); + if(xsize != 0 && ysize != 0) + { + m_config->Write(CM_XPOS, (long)xsize); + m_config->Write(CM_YPOS, (long)ysize); + } + } + + // write changes (will be done before deletion) + delete m_config; + + // delete timer + if(m_ExitTimer) + delete m_ExitTimer; + + // delete our cmake instance again + if(m_cmake) + delete m_cmake; +} + +void CMakeSetupFrm::UpdateWindowState() +{ + bool dogenerate = !m_RunningConfigure && !m_cmOptions->IsCacheDirty() && + (m_cmOptions->GetCount() != 0); + + // when configure is running, disable a lot of stuff + m_cmProjectPath->Enable(!m_RunningConfigure); + m_BrowseProjectPathButton->Enable(!m_RunningConfigure); + m_cmBuildPath->Enable(!m_RunningConfigure); + m_BrowseSourcePathButton->Enable(!m_RunningConfigure); + m_cmGeneratorChoice->Enable(!m_RunningConfigure); + m_cmShowAdvanced->Enable(!m_RunningConfigure); + m_cmOptions->Enable(!m_RunningConfigure); + m_ConfigureButton->Enable(!m_RunningConfigure); + m_OkButton->Enable(dogenerate); + m_CancelButton->Enable(m_RunningConfigure); + m_DeleteCacheButton->Enable(!m_RunningConfigure); + m_ClearLogButton->Enable(!m_RunningConfigure); + if(m_RunningConfigure) + m_cmBrowseCell->Enable(false); + + // when cache loaded (items available show other control) + m_cmGeneratorChoice->Enable(m_cmOptions->GetCount() == 0 && !m_RunningConfigure); + m_cmSearchQuery->Enable(!m_RunningConfigure); + m_cmBrowseCell->Enable(!m_RunningConfigure && m_cmOptions->IsSelectedItemBrowsable()); + + // disable the menus when configuring + if(GetMenuBar()) + { + // disable configure button when there is nothing, and generate and exit + // only when it is allowed to generate + GetMenuBar()->Enable(ID_MENU_EXITGENERATE, dogenerate); + GetMenuBar()->Enable(ID_MENU_CONFIGURE, !m_RunningConfigure); + + for(size_t i = 0; i < GetMenuBar()->GetMenuCount(); i++) + GetMenuBar()->EnableTop(i, !m_RunningConfigure); + } +} + +void CMakeSetupFrm::LogMessage(int logkind, const char *msg) +{ + // put CR first but prevent a CR at the end +#ifndef __LINUX__ + if(m_cmLog->IsModified()) + (*m_cmLog) << wxT("\n"); +#else + // Linux requires a different approach + if(!m_cmLog->GetValue().IsEmpty()) + (*m_cmLog) << wxT("\n"); +#endif + + // log error, warning, or message + wxTextAttr defattr = m_cmLog->GetDefaultStyle(); + + switch(logkind) + { + // user message + case 1: + { + wxTextAttr colattr(*wxBLUE); + m_cmLog->SetDefaultStyle(colattr); + (*m_cmLog) << msg; + m_cmLog->SetDefaultStyle(defattr); + } + break; + + // progress + case 0: + (*m_cmLog) << msg; + break; + + // error + case -1: + { + wxTextAttr colattr(*wxRED); + m_cmLog->SetDefaultStyle(colattr); + (*m_cmLog) << msg; + m_cmLog->SetDefaultStyle(defattr); + } + break; + } + + IssueUpdate(); +} + +void CMakeSetupFrm::IssueUpdate() +{ + //::wxSafeYield(m_CancelButton, true); + ::wxYield(); + + // when we pressed cancel on the progress dialog + // stop all activities + if(m_progressDlg) + { + if(m_progressDlg->CancelPressed() && !m_progressDlg->IsCancelling()) + { + m_progressDlg->CancelAcknowledged(); + + // send a button event to cancel the progress + wxCommandEvent event( wxEVT_COMMAND_BUTTON_CLICKED, ID_DO_CANCEL); + wxPostEvent(this, event); + } + } +} + +/*! + * Control creation for CMakeSetupFrm + */ + +void CMakeSetupFrm::CreateControls() +{ +////@begin CMakeSetupFrm content construction + CMakeSetupFrm* itemFrame1 = this; + + wxMenuBar* menuBar = new wxMenuBar; + wxMenu* itemMenu37 = new wxMenu; + itemMenu37->Append(ID_MENU_RELOAD_CACHE, _("&Reload Cache\tCtrl+R"), _("Reload the cache from disk"), wxITEM_NORMAL); + itemMenu37->Append(ID_MENU_DELETE_CACHE, _("&Delete Cache\tCtrl+D"), _("Delete the cache on disk of the current path"), wxITEM_NORMAL); + itemMenu37->AppendSeparator(); + itemMenu37->Append(ID_MENU_QUIT, _("E&xit\tAlt+F4"), _("Quit CMake Setup"), wxITEM_NORMAL); + menuBar->Append(itemMenu37, _("&File")); + wxMenu* itemMenu42 = new wxMenu; + itemMenu42->Append(ID_MENU_CONFIGURE, _("&Configure\tCtrl+N"), _T(""), wxITEM_NORMAL); + itemMenu42->Append(ID_MENU_EXITGENERATE, _("&Generate and Exit\tCtrl+G"), _T(""), wxITEM_NORMAL); + itemMenu42->Append(ID_MENU_TOGGLE_ADVANCED, _("Toggle &Advanced\tCtrl+A"), _T(""), wxITEM_NORMAL); + itemMenu42->AppendSeparator(); + itemMenu42->Append(ID_CMAKE_OPTIONS, _("&Options\tCtrl+O"), _T(""), wxITEM_NORMAL); + menuBar->Append(itemMenu42, _("&Tools")); + wxMenu* itemMenu48 = new wxMenu; + itemMenu48->Append(ID_ABOUTDLG, _("&About ..."), _("Shows the about dialog ..."), wxITEM_NORMAL); + menuBar->Append(itemMenu48, _("&Help")); + itemFrame1->SetMenuBar(menuBar); + + m_splitter = new wxSplitterWindow( itemFrame1, ID_SPLITTERWINDOW, wxDefaultPosition, wxSize(100, 100), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER ); + + wxPanel* itemPanel3 = new wxPanel( m_splitter, ID_MAINPANEL, wxDefaultPosition, wxSize(600, 400), wxNO_BORDER|wxTAB_TRAVERSAL ); + itemPanel3->SetExtraStyle(itemPanel3->GetExtraStyle()|wxWS_EX_VALIDATE_RECURSIVELY); + wxBoxSizer* itemBoxSizer4 = new wxBoxSizer(wxVERTICAL); + itemPanel3->SetSizer(itemBoxSizer4); + + wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer4->Add(itemBoxSizer5, 0, wxGROW|wxTOP|wxBOTTOM, 5); + wxFlexGridSizer* itemFlexGridSizer6 = new wxFlexGridSizer(2, 3, 0, 0); + itemFlexGridSizer6->AddGrowableRow(1); + itemFlexGridSizer6->AddGrowableCol(1); + itemBoxSizer5->Add(itemFlexGridSizer6, 1, wxALIGN_TOP|wxLEFT, 5); + wxStaticText* itemStaticText7 = new wxStaticText( itemPanel3, wxID_STATIC, _("CMake project path"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer6->Add(itemStaticText7, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); + + m_cmProjectPath = new wxTextCtrl( itemPanel3, ID_PROJECT_PATH, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + itemFlexGridSizer6->Add(m_cmProjectPath, 1, wxGROW|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5); + + m_BrowseProjectPathButton = new wxButton( itemPanel3, ID_BROWSE_PROJECT, _("Browse"), wxDefaultPosition, wxSize(55, -1), 0 ); + itemFlexGridSizer6->Add(m_BrowseProjectPathButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxStaticText* itemStaticText10 = new wxStaticText( itemPanel3, wxID_STATIC, _("Project build path"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer6->Add(itemStaticText10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); + + m_cmBuildPath = new wxTextCtrl( itemPanel3, ID_SOURCE_BUILD_PATH, _T(""), wxDefaultPosition, wxSize(50, -1), 0 ); + itemFlexGridSizer6->Add(m_cmBuildPath, 1, wxGROW|wxALIGN_TOP|wxTOP|wxBOTTOM, 5); + + m_BrowseSourcePathButton = new wxButton( itemPanel3, ID_BROWSE_BUILD, _("Browse"), wxDefaultPosition, wxSize(55, -1), 0 ); + itemFlexGridSizer6->Add(m_BrowseSourcePathButton, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxBoxSizer* itemBoxSizer13 = new wxBoxSizer(wxVERTICAL); + itemBoxSizer5->Add(itemBoxSizer13, 0, wxGROW|wxLEFT|wxRIGHT, 5); + wxFlexGridSizer* itemFlexGridSizer14 = new wxFlexGridSizer(2, 2, 0, 0); + itemBoxSizer13->Add(itemFlexGridSizer14, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT, 5); + wxStaticText* itemStaticText15 = new wxStaticText( itemPanel3, wxID_STATIC, _("Generate"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer14->Add(itemStaticText15, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxADJUST_MINSIZE, 5); + + wxString* m_cmGeneratorChoiceStrings = NULL; + m_cmGeneratorChoice = new wxComboBox( itemPanel3, ID_CHOOSE_GENERATOR, _T(""), wxDefaultPosition, wxSize(170, -1), 0, m_cmGeneratorChoiceStrings, wxCB_READONLY ); + itemFlexGridSizer14->Add(m_cmGeneratorChoice, 1, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxTOP|wxBOTTOM, 5); + + wxStaticText* itemStaticText17 = new wxStaticText( itemPanel3, wxID_STATIC, _("Search"), wxDefaultPosition, wxDefaultSize, 0 ); + itemFlexGridSizer14->Add(itemStaticText17, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxADJUST_MINSIZE, 5); + + wxString* m_cmSearchQueryStrings = NULL; + m_cmSearchQuery = new wxComboBox( itemPanel3, ID_SEARCHQUERY, _T(""), wxDefaultPosition, wxSize(170, -1), 0, m_cmSearchQueryStrings, wxWANTS_CHARS ); + itemFlexGridSizer14->Add(m_cmSearchQuery, 1, wxALIGN_CENTER_HORIZONTAL|wxGROW|wxTOP|wxBOTTOM, 5); + + m_cmShowAdvanced = new wxCheckBox( itemPanel3, ID_SHOW_ADVANCED, _("Show advanced values"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_cmShowAdvanced->SetValue(FALSE); + itemBoxSizer13->Add(m_cmShowAdvanced, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5); + + m_cmOptions = new wxPropertyList( itemPanel3, ID_OPTIONS, wxDefaultPosition, wxSize(200, 150), wxSTATIC_BORDER|wxWANTS_CHARS|wxVSCROLL ); + m_cmOptions->SetDefaultColSize(250); + m_cmOptions->SetDefaultRowSize(25); + m_cmOptions->SetColLabelSize(20); + m_cmOptions->SetRowLabelSize(0); + m_cmOptions->CreateGrid(10, 2, wxGrid::wxGridSelectRows); + itemBoxSizer4->Add(m_cmOptions, 1, wxGROW|wxALL, 5); + + wxPanel* itemPanel21 = new wxPanel( m_splitter, ID_LOGPANEL, wxDefaultPosition, wxSize(-1, 100), wxNO_BORDER|wxTAB_TRAVERSAL ); + wxBoxSizer* itemBoxSizer22 = new wxBoxSizer(wxVERTICAL); + itemPanel21->SetSizer(itemBoxSizer22); + + wxBoxSizer* itemBoxSizer23 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer22->Add(itemBoxSizer23, 1, wxGROW|wxLEFT|wxRIGHT|wxTOP, 5); + m_cmLog = new wxTextCtrl( itemPanel21, ID_LOG_AREA, _("Select your project path (where CMakeLists.txt is) and then select the build path (where the projects should be saved), or select a previous build path.\n\nRight click on a cache value for additional options (delete and ignore). Press configure to update and display new values in red, press OK to generate the projects and exit."), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxSTATIC_BORDER ); + itemBoxSizer23->Add(m_cmLog, 1, wxGROW|wxRIGHT, 5); + + m_cmDescription = new wxTextCtrl( itemPanel21, ID_DESCRIPTION, _T(""), wxDefaultPosition, wxSize(200, -1), wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH2|wxSTATIC_BORDER ); + itemBoxSizer23->Add(m_cmDescription, 0, wxGROW|wxLEFT, 5); + + wxBoxSizer* itemBoxSizer26 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer22->Add(itemBoxSizer26, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + m_ConfigureButton = new wxButton( itemPanel21, ID_DO_CONFIGURE, _("Co&nfigure"), wxDefaultPosition, wxDefaultSize, 0 ); + m_ConfigureButton->SetDefault(); + itemBoxSizer26->Add(m_ConfigureButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_OkButton = new wxButton( itemPanel21, ID_DO_OK, _("&Generate!"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(m_OkButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_CancelButton = new wxButton( itemPanel21, ID_DO_CANCEL, _("C&ancel"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(m_CancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + +#if defined(__WXMSW__) + wxStaticLine* itemStaticLine30 = new wxStaticLine( itemPanel21, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + itemBoxSizer26->Add(itemStaticLine30, 0, wxGROW|wxALL, 5); +#endif + + m_DeleteCacheButton = new wxButton( itemPanel21, ID_DO_DELETE_CACHE, _("&Delete Cache"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(m_DeleteCacheButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_ClearLogButton = new wxButton( itemPanel21, ID_CLEAR_LOG, _("Clear &Log"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(m_ClearLogButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + +#if defined(__WXMSW__) + wxStaticLine* itemStaticLine33 = new wxStaticLine( itemPanel21, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + itemBoxSizer26->Add(itemStaticLine33, 0, wxGROW|wxALL, 5); +#endif + + m_cmBrowseCell = new wxButton( itemPanel21, ID_BROWSE_GRID, _("&Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer26->Add(m_cmBrowseCell, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + m_splitter->SplitHorizontally(itemPanel3, itemPanel21, 300); + + wxStatusBar* itemStatusBar35 = new wxStatusBar( itemFrame1, ID_STATUSBAR, wxST_SIZEGRIP|wxNO_BORDER ); + itemStatusBar35->SetFieldsCount(2); + itemFrame1->SetStatusBar(itemStatusBar35); + +////@end CMakeSetupFrm content construction +} + +void CMakeSetupFrm::DoInitFrame(cmCommandLineInfo &cm, const wxString &fn) +{ + // path to where cmake.exe is + // m_PathToExecutable = cm.GetPathToExecutable().c_str(); + m_PathToExecutable = fn; + + // adjust size of last bar, to display % progress + wxStatusBar *bar = GetStatusBar(); + if(bar) + { + wxASSERT(bar->GetFieldsCount() > 1); + + // fill all with -1. Why this way? because the count of the status bars + // can change. All of the widths must be accounted for and initialised + int *widths = new int[bar->GetFieldsCount()]; + for(int i = 0; i < bar->GetFieldsCount(); i++) + widths[i] = -1; + + // the % field + widths[1] = 75; + bar->SetStatusWidths(bar->GetFieldsCount(), widths); + delete widths; + } + + wxString name, generator; + std::vector names; + + m_RunningConfigure = false; + + // set grid labels + m_cmOptions->SetColLabelValue(0, wxT("Cache Name")); + m_cmOptions->SetColLabelValue(1, wxT("Cache Value")); + m_cmOptions->SetProjectGenerated(false); + + // set drop target + m_cmOptions->SetDropTarget(new DnDFile(m_cmBuildPath)); + + m_cmake->GetRegisteredGenerators(names); + for(std::vector::iterator i = names.begin(); i != names.end(); ++i) + { + name = i->c_str(); + m_cmGeneratorChoice->Append(name); + } + + // sync advanced option with grid + m_cmOptions->SetShowAdvanced(m_cmShowAdvanced->GetValue()); + + // if we have a command line query that a generator + // needs to be chosen instead of the default, take it + bool foundGivenGenerator = false; + if(!cm.m_GeneratorChoiceString.IsEmpty()) + { + // set proper discovered generator + foundGivenGenerator = m_cmGeneratorChoice->SetStringSelection(cm.m_GeneratorChoiceString); + } + + // if none selected, we will see if VS8, VS7 or VS6 is present + if(!foundGivenGenerator || m_cmGeneratorChoice->GetValue().IsEmpty()) + { + std::string mp; + mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\Setup;Dbghelp_path]"; + cmSystemTools::ExpandRegistryValues(mp); + if(mp != "/registry") + generator = wxT("Visual Studio 8 2005"); + else + { + mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1;InstallDir]"; + cmSystemTools::ExpandRegistryValues(mp); + if (mp != "/registry") + generator = wxT("Visual Studio 7 .NET 2003"); + else + { + mp = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0;InstallDir]"; + cmSystemTools::ExpandRegistryValues(mp); + if (mp != "/registry") + generator = wxT("Visual Studio 7"); + else + generator = wxT("Visual Studio 6"); + } + } + } + + // set proper discovered generator + m_cmGeneratorChoice->SetStringSelection(generator); + + wxString str; + str.Printf("CMake %d.%d - %s", cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion(), + cmVersion::GetReleaseVersion().c_str()); + str.Printf("CMakeSetup v%i.%i%s", CMAKEGUI_MAJORVER, CMAKEGUI_MINORVER, CMAKEGUI_ADDVER); + + SetTitle(str); + wxString path; + + // get last 5 used projects + for(size_t i = 0; i < CM_MAX_RECENT_PATHS; i++) + { + path.Printf("%s%i", _(CM_RECENT_BUILD_PATH), i); + if(m_config->Read(path, &str)) + AppendPathToRecentList(str); + } + + // get query items + for(size_t i = 0; i < CM_MAX_SEARCH_QUERIES; i++) + { + path.Printf("%s%i", _(CM_SEARCH_QUERY), i); + if(m_config->Read(path, &str)) + m_cmSearchQuery->Append(str); + } + + + // make sure the call to update grid is not executed + m_noRefresh = true; + m_cmSearchQuery->SetValue(_("")); + m_noRefresh = false; + + // Get the parameters from the command line info + // If an unknown parameter is found, try to interpret it too, since it + // is likely to be a file dropped on the shortcut :) + bool sourceDirLoaded = false, + buildDirLoaded = false; + + if(cm.m_LastUnknownParameter.empty()) + { + if(cm.m_WhereSource.size() > 0 ) + { + m_cmProjectPath->SetValue(cm.m_WhereSource.c_str()); + sourceDirLoaded = true; + } + + if (cm.m_WhereBuild.size() > 0 ) + { + m_cmBuildPath->SetValue(cm.m_WhereBuild.c_str()); + buildDirLoaded = true; + } + + m_cmShowAdvanced->SetValue(cm.m_AdvancedValues); + } + else + { + m_cmShowAdvanced->SetValue(false); + + // TODO: Interpret directory from dropped shortcut + //this->ChangeDirectoriesFromFile(cmdInfo->m_LastUnknownParameter.c_str()); + } + + if (cm.m_ExitAfterLoad) + { + int id = GetId(); + m_ExitTimer = new wxTimer(this, id); + m_ExitTimer->Start(3000); + + Connect( id, wxEVT_TIMER,(wxObjectEventFunction) &CMakeSetupFrm::OnExitTimer ); + + } + + // retrieve settings, this needs to be done here + // because writing to the m_cmBuildPath triggers a cache reload + if(!sourceDirLoaded && m_config->Read(CM_LASTPROJECT_PATH, &str)) + m_cmProjectPath->SetValue(str); + + if(!buildDirLoaded) + { + m_cmOptions->RemoveAll(); + if(m_config->Read(CM_LASTBUILD_PATH, &str)) + m_cmBuildPath->SetValue(str); + } + + // set window size from settings + long xsize, ysize, splitpos; + if(m_config->Read(CM_XSIZE, &xsize) && m_config->Read(CM_YSIZE, &ysize) && + m_config->Read(CM_SPLITTERPOS, &splitpos)) + { + SetSize(xsize, ysize); + m_splitter->SetSashPosition(splitpos); + } + + if(m_config->Read(CM_XPOS, &xsize) && m_config->Read(CM_YPOS, &ysize)) + SetSize(xsize, ysize, -1, -1, wxSIZE_USE_EXISTING); + + UpdateWindowState(); +} + +void CMakeSetupFrm::LoadCacheFromDiskToGUI() +{ + wxString builddir = m_cmBuildPath->GetValue(); + + cmCacheManager *cachem = m_cmake->GetCacheManager(); + if(cachem && !builddir.Trim().IsEmpty()) + { + if(cachem->LoadCache(builddir.c_str())) + AppendPathToRecentList(builddir); + + // represent this cache in the grid, but not before we + // wiped all of the old items + FillCacheGUIFromCacheManager(); + + // set the generator string to the one used in the cache + cmCacheManager::CacheIterator it = cachem->GetCacheIterator("CMAKE_GENERATOR"); + if(!it.IsAtEnd()) + { + wxString curGen = it.GetValue(); + m_cmGeneratorChoice->SetStringSelection(curGen); + } + } +} + +void CMakeSetupFrm::AppendPathToRecentList(const wxString &p) +{ + wxFileName path; + wxString str; + + if(p.IsEmpty()) + return; + + // cheap way to get rid of trailing seperators + path.AssignDir(p); + str = path.GetPath(); + + // append the item, or add it to end to make sure + // it is remembered between sessions + for(size_t i = 0; i < m_recentPaths.Count(); i++) + { + if(m_recentPaths[i].IsSameAs(str, false)) + { + m_recentPaths.RemoveAt(i); + + // only re-add when item is still valid + if(::wxDirExists(str)) + m_recentPaths.Add(str); + else + return; // no add when the item is not existing + + return; + } + } + + if(GetMenuBar()) + { + // get file menu + int lastUsedID = 0; + wxMenu *mnu = GetMenuBar()->GetMenu(0); + wxASSERT(mnu != 0); + + if(::wxDirExists(str)) + { + // add to array + if(m_recentPaths.Count() == 0) + mnu->AppendSeparator(); + + lastUsedID = CM_RECENT_BUILD_ITEM + m_recentPaths.Count(); + m_recentPaths.Add(str); + + // when we have more in list then we can display, prune and + // remove some menu items until we have room (and available ID's again) + if(m_recentPaths.Count() > CM_MAX_RECENT_PATHS) + { + // prune the list + while(m_recentPaths.Count() > CM_MAX_RECENT_PATHS) + m_recentPaths.RemoveAt(0); + + // now determine count, and remove until we have room + int index = mnu->GetMenuItemCount() - 1; + int count = 0; + wxASSERT(index > 0); + + wxMenuItem *item; + do + { + item = mnu->FindItemByPosition(index); + if(item) + { + if(item->IsSeparator()) + { + // next index is valid item + index ++; + break; + } + else + count ++; + } + + index --; + } + while(index >= 0 && item); + + // ok, if count > CM_MAX_RECENT_PATHS then we are going to + // delete some items on the index position + if(count >= CM_MAX_RECENT_PATHS) + { + // delete items that are exceeding + while(count >= CM_MAX_RECENT_PATHS) + { + lastUsedID = mnu->FindItemByPosition(index)->GetId(); + mnu->Delete(lastUsedID); + count --; + } + } + } + + // append item + mnu->Append(lastUsedID, str); + } + } +} + +bool CMakeSetupFrm::PerformCacheRun() +{ + bool enable = false; + cmCacheManager *cachem = m_cmake->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + + // remove all items that are no longer present + size_t j = 0; + while(j < m_cmOptions->GetCount()) + { + // check to see if it is still in the CMake cache + // if it is still in the cache then it is no longer new + wxPropertyItem *item = m_cmOptions->GetItem(j); + if ( !it.Find((const char*)item->GetPropName().c_str()) ) + m_cmOptions->RemoveProperty(item); + else + { + // ok we found it, mark as old + item->SetNewValue(false); + int row = m_cmOptions->FindProperty(item); + if(row != -1) + m_cmOptions->UpdatePropertyItem(item, row); + j++; + } + } + + if(cachem->GetSize() > 0 && !cmSystemTools::GetErrorOccuredFlag()) + { + bool enable = true; + for(size_t i = 0; i < m_cmOptions->GetCount(); i++) + { + wxPropertyItem* item = m_cmOptions->GetItem(i); + if(item->GetAdvanced()) + { + if(item->GetNewValue() && m_cmOptions->GetShowAdvanced()) + { + // if one new value then disable to OK button + enable = false; + break; + } + } + else + { + if(item->GetNewValue()) + { + // if one new value then disable to OK button + enable = false; + break; + } + } + } + } + + return enable; +} + +void CMakeSetupFrm::FillCacheGUIFromCacheManager() +{ + cmCacheManager *cachem = m_cmake->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + + // remove all items that are no longer present + size_t j = 0; + while(j < m_cmOptions->GetCount()) + { + // check to see if it is still in the CMake cache + // if it is still in the cache then it is no longer new + wxPropertyItem *item = m_cmOptions->GetItem(j); + if ( !it.Find((const char*)item->GetPropName().c_str()) ) + m_cmOptions->RemoveProperty(item); + else + j++; + } + + // if there are already entries in the cache, then + // put the new ones in the top, so they show up first + bool reverseOrder = false; + for(cmCacheManager::CacheIterator i = cachem->NewIterator(); !i.IsAtEnd(); i.Next()) + { + const char* key = i.GetName(); + + // if value has trailing space or tab, enclose it in single quotes + // to enforce the fact that it has 'invisible' trailing stuff + std::string value = i.GetValue(); + if (value.size() && (value[value.size() - 1] == ' ' || value[value.size() - 1] == '\t')) + value = '\'' + value + '\''; + + bool advanced = i.GetPropertyAsBool("ADVANCED"); + switch(i.GetType() ) + { + case cmCacheManager::BOOL: + { + wxString OnOff; + + if(cmSystemTools::IsOn(value.c_str())) + OnOff = wxT("ON"); + else + OnOff = wxT("OFF"); + + m_cmOptions->AddProperty(key, + OnOff.c_str(), + i.GetProperty("HELPSTRING"), + wxPropertyList::CHECKBOX, "ON|OFF", + reverseOrder, + advanced ); + } + break; + + case cmCacheManager::PATH: + m_cmOptions->AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + wxPropertyList::PATH,"", + reverseOrder, advanced); + break; + + case cmCacheManager::FILEPATH: + m_cmOptions->AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + wxPropertyList::FILE,"", + reverseOrder, advanced); + break; + + case cmCacheManager::STRING: + m_cmOptions->AddProperty(key, + value.c_str(), + i.GetProperty("HELPSTRING"), + wxPropertyList::EDIT,"", + reverseOrder, advanced); + break; + + case cmCacheManager::INTERNAL: + { + wxPropertyItem *pItem = m_cmOptions->FindPropertyByName(key); + if(pItem) + m_cmOptions->RemoveProperty(pItem); + } + break; + } + } +} + +void CMakeSetupFrm::OnExitTimer(wxTimerEvent &event) +{ + Close(); +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_PROJECT + */ + +void CMakeSetupFrm::OnButtonBrowseProject( wxCommandEvent& event ) +{ + const wxString& dir = wxDirSelector("Select project directory", m_cmProjectPath->GetValue()); + if(!dir.IsEmpty()) + m_cmProjectPath->SetValue(dir); +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_BUILD + */ + +void CMakeSetupFrm::OnButtonBrowseBuild( wxCommandEvent& event ) +{ + const wxString& dir = wxDirSelector("Select build directory", m_cmBuildPath->GetValue()); + if(!dir.IsEmpty()) + m_cmBuildPath->SetValue(dir); +} + +/*! + * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_SHOW_ADVANCED + */ + +void CMakeSetupFrm::OnShowAdvancedValues( wxCommandEvent& event ) +{ + if(m_cmShowAdvanced->GetValue()) + m_cmOptions->ShowAdvanced(); + else + m_cmOptions->HideAdvanced(); +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CONFIGURE + */ + +void CMakeSetupFrm::OnButtonConfigure( wxCommandEvent& event ) +{ + DoConfigure(); +} + +void CMakeSetupFrm::DoConfigure() +{ + // enable error messages each time configure is pressed + cmSystemTools::EnableMessages(); + m_cmOptions->HideControls(); + + cmSystemTools::ResetErrorOccuredFlag(); + + // instantiate a dialog for the progress meter + + PerformCacheRun(); + RunCMake(false); +} + +int CMakeSetupFrm::RunCMake(bool generateProjectFiles) +{ + int value = -1; + + // clear log + m_cmLog->Clear(); + m_cmLog->DiscardEdits(); + + wxString builddir = m_cmBuildPath->GetValue(), + sourcedir = m_cmProjectPath->GetValue(), + err = wxT("Error in configuration process, project files may be invalid"); + + + // sanity check for people pressing OK on empty dirs + if(builddir.Trim().IsEmpty() || sourcedir.Trim().IsEmpty()) + { + wxMessageBox(wxT("Please enter a valid source directory and build directory"), wxT("Error"), wxOK | wxICON_ERROR, this); + return -1; + } + + // check if the directory exists, if not, create it + if(!cmSystemTools::FileExists(builddir.c_str())) + { + wxString str; + str << wxT("Build directory does not exist, should I create it?\n\nDirectory: ") << builddir; + + int answer = wxMessageBox(str, wxT("Create directory"), wxYES_NO, this); + if (answer == wxYES) + { + if(!cmSystemTools::MakeDirectory(builddir.c_str())) + { + // could not create, tell and abort + wxMessageBox(wxT("Could not create directory"), wxT("Error"), wxOK | wxICON_ERROR, this); + return -1; + } + } + else + { + // we abort because the user did not want to make the directory + wxMessageBox(wxT("Build Project aborted, nothing done."), wxT("Aborted"), + wxOK | wxICON_EXCLAMATION, this); + return -1; + } + } + + /** show progress dialog that informs the user with a progress bar */ + if(m_progressDlg) + m_progressDlg->Destroy(); + + m_progressDlg = new CMProgressDialog(this); + m_progressDlg->Show(); + + // set the wait cursor + m_RunningConfigure = true; + UpdateWindowState(); + + // always save the current gui values to disk + SaveCacheFromGUI(); + + // Make sure we are working from the cache on disk + LoadCacheFromDiskToGUI(); + + // setup the cmake instance + if (generateProjectFiles) + { + if(m_cmake->Generate() != 0) + { + wxMessageBox(err, wxT("Error"), wxOK | wxICON_ERROR, this); + cmSystemTools::Error(err.c_str()); + value = -1; + } + else + { + value = 0; + m_cmOptions->SetProjectGenerated(true); // clear cache dirty when generated + } + } + else + { + // set paths + m_cmake->SetHomeDirectory(m_cmProjectPath->GetValue().c_str()); + m_cmake->SetStartDirectory(m_cmProjectPath->GetValue().c_str()); + m_cmake->SetHomeOutputDirectory(m_cmBuildPath->GetValue().c_str()); + m_cmake->SetStartOutputDirectory(m_cmBuildPath->GetValue().c_str()); + + m_cmake->SetGlobalGenerator(m_cmake->CreateGlobalGenerator(m_cmGeneratorChoice->GetValue().c_str())); + m_cmake->SetCMakeCommand(m_PathToExecutable.c_str()); + m_cmake->LoadCache(); + if(m_cmake->Configure() != 0) + { + wxMessageBox(err, wxT("Error"), wxOK | wxICON_ERROR, this); + cmSystemTools::Error(err.c_str()); + } + + // update the GUI with any new values in the caused by the + // generation process + LoadCacheFromDiskToGUI(); + } + + m_RunningConfigure = false; + + if(!value) + cmSystemTools::ResetErrorOccuredFlag(); + + m_progressDlg->Destroy(); + m_progressDlg = 0; + + // reset the statusbar progress + wxStatusBar *bar = GetStatusBar(); + if(bar) + bar->SetStatusText(wxEmptyString, 1); + + UpdateWindowState(); + return value; +} + +//! Save GUI values to cmCacheManager and then save to disk. +void CMakeSetupFrm::SaveCacheFromGUI() +{ + cmCacheManager *cachem = m_cmake->GetCacheManager(); + FillCacheManagerFromCacheGUI(); + + // write the cache to disk + if(!m_cmBuildPath->GetValue().Trim().IsEmpty()) + cachem->SaveCache(m_cmBuildPath->GetValue().c_str()); +} + +void CMakeSetupFrm::FillCacheManagerFromCacheGUI() +{ + cmCacheManager *cachem = m_cmake->GetCacheManager(); + + cmCacheManager::CacheIterator it = cachem->NewIterator(); + for(size_t i = 0; i < m_cmOptions->GetCount(); i++) + { + wxPropertyItem* item = m_cmOptions->GetItem(i); + if ( it.Find((const char*)item->GetPropName().c_str()) ) + { + // if value is enclosed in single quotes ('foo') then remove them + // they were used to enforce the fact that it had 'invisible' + // trailing stuff + if (item->GetCurValue().Len() >= 2 && + item->GetCurValue().GetChar(0) == '\'' && + item->GetCurValue().GetChar(item->GetCurValue().Len() - 1) == '\'') + { + it.SetValue(item->GetCurValue().Mid(1, item->GetCurValue().Len() - 2).c_str()); + } + else + it.SetValue(item->GetCurValue().c_str()); + } + } +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_OK + */ + +void CMakeSetupFrm::OnButtonOk( wxCommandEvent& event ) +{ + DoGenerate(); +} + +void CMakeSetupFrm::DoGenerate() +{ + cmSystemTools::EnableMessages(); + + cmSystemTools::ResetErrorOccuredFlag(); + + m_cmOptions->HideControls(); + PerformCacheRun(); + + if(!RunCMake(true)) + { + // issue a close when this is done (this is issued by menu "Generate and Exit" + if(m_quitAfterGenerating) + Close(); + else if(!wxGetKeyState(WXK_SHIFT)) + { + bool close; + m_config->Read(CM_CLOSEAFTERGEN, &close, CM_CLOSEAFTERGEN_DEF); + + if(!close) + wxMessageBox(wxT("Building of project files succesful!"), wxT("Success!"), wxOK|wxICON_INFORMATION); + else + Close(); + } + } +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CANCEL + */ + +void CMakeSetupFrm::OnButtonCancel( wxCommandEvent& event ) +{ + DoCancelButton(); +} + +void CMakeSetupFrm::DoCancelButton() +{ + if(m_RunningConfigure) + { + int result = wxMessageBox(wxT("You are in the middle of a Configure.\n" + "If you Cancel now the configure information will be lost.\n" + "Are you sure you want to Cancel?"), wxT("Warning"), wxYES_NO|wxICON_WARNING); + if(result == wxYES) + cmSystemTools::SetFatalErrorOccured(); + else + if(m_progressDlg) + m_progressDlg->ResetCancel(); + } +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_DELETE_CACHE + */ + +void CMakeSetupFrm::OnButtonDeleteCache( wxCommandEvent& event ) +{ + DoDeleteCache(); +} + +void CMakeSetupFrm::DoDeleteCache() +{ + bool deletecache = true; + if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) + { + int result = ::wxMessageBox(_("You have changed options, are you sure you want to delete all items?\n"), + _("Warning"), wxYES_NO|wxICON_QUESTION); + + // when user wants to wait, wait.. else quit + if(result == wxNO) + deletecache = false; + + } + + if(deletecache) + { + // indicate that we haven't generated a project yet + m_cmOptions->SetProjectGenerated(false); + + if(!m_cmBuildPath->GetValue().Trim().IsEmpty() && m_cmake != 0) + m_cmake->GetCacheManager()->DeleteCache(m_cmBuildPath->GetValue().Trim()); + + LoadCacheFromDiskToGUI(); + UpdateWindowState(); + } +} + +/*! + * Should we show tooltips? + */ + +bool CMakeSetupFrm::ShowToolTips() +{ + return TRUE; +} + +/*! + * Get bitmap resources + */ + +wxBitmap CMakeSetupFrm::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin CMakeSetupFrm bitmap retrieval + return wxNullBitmap; +////@end CMakeSetupFrm bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon CMakeSetupFrm::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin CMakeSetupFrm icon retrieval + if (name == wxT("cmake_icon.xpm")) + { + wxIcon icon(_T("cmake_icon.xpm"), wxBITMAP_TYPE_XPM); + return icon; + } + return wxNullIcon; +////@end CMakeSetupFrm icon retrieval +} + +/*! + * wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event handler for ID_SPLITTERWINDOW + */ + +void CMakeSetupFrm::OnSplitterPosChanging( wxSplitterEvent& event ) +{ + int width, height; + + GetSize(&width, &height); + + if((height > 100)) + { + if(event.GetSashPosition() < 170) + event.SetSashPosition(170); + else + { + if(event.GetSashPosition() > (height - 180)) + event.SetSashPosition(height - 180); + } + } + else + event.Veto(); + +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_LOG + */ + +void CMakeSetupFrm::OnClearLogClick( wxCommandEvent& event ) +{ + // delete the log text + m_cmLog->Clear(); + m_cmLog->DiscardEdits(); +} + + +/*! + * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SOURCE_BUILD_PATH + */ + +void CMakeSetupFrm::OnSourceBuildPathUpdated( wxCommandEvent& event ) +{ + DoReloadCache(); +} + +void CMakeSetupFrm::DoReloadCache() +{ + wxString buildpath = m_cmBuildPath->GetValue(); + // The build dir has changed, check if there is a cache, and + // grab the source dir from it + + // make sure the call to update grid is not executed + m_noRefresh = true; + m_cmSearchQuery->SetValue(_("")); + m_noRefresh = false; + + std::string path = buildpath.c_str(); + cmSystemTools::ConvertToUnixSlashes(path); + + // adjust the cmake instance + m_cmake->SetHomeOutputDirectory(buildpath.c_str()); + m_cmake->SetStartOutputDirectory(buildpath.c_str()); + + std::string cache_file = path; + cache_file += "/CMakeCache.txt"; + + // fill in the project path where the source is located, this is + // read from the CMake cache + cmCacheManager *cachem = m_cmake->GetCacheManager(); + cmCacheManager::CacheIterator it = cachem->NewIterator(); + if (cmSystemTools::FileExists(cache_file.c_str()) && cachem->LoadCache(path.c_str()) && + it.Find("CMAKE_HOME_DIRECTORY")) + { + path = ConvertToWindowsPath(it.GetValue()); + m_cmProjectPath->SetValue(path.c_str()); + } + + m_cmOptions->RemoveAll(); + LoadCacheFromDiskToGUI(); + UpdateWindowState(); +} + + +/*! + * wxEVT_COMMAND_TEXT_ENTER event handler for ID_SOURCE_BUILD_PATH + */ + +void CMakeSetupFrm::OnSourceBuildPathEnter( wxCommandEvent& event ) +{ + OnSourceBuildPathUpdated(event); +} + +/*! + * wxEVT_MOTION event handler for ID_OPTIONS + */ + +void CMakeSetupFrm::OnPropertyMotion( wxMouseEvent& event ) +{ + ShowPropertyDescription(m_cmOptions->YToRow(event.GetY())); + event.Skip(); +} + + +/*! + * wxEVT_GRID_SELECT_CELL event handler for ID_OPTIONS + */ + +void CMakeSetupFrm::OnGridSelectCell( wxGridEvent& event ) +{ + // show description + ShowPropertyDescription(event.GetRow()); + + // enable or disable the browse button + m_cmBrowseCell->Enable(m_cmOptions->IsSelectedItemBrowsable(event.GetRow())); + event.Skip(); +} + +void CMakeSetupFrm::ShowPropertyDescription(int row) +{ + if(row == wxNOT_FOUND || row < 0) + m_cmDescription->SetValue(wxEmptyString); + else + { + wxPropertyItem *pItem = m_cmOptions->GetPropertyItemFromRow(row); + if(pItem) + m_cmDescription->SetValue(pItem->GetHelpString()); + else + m_cmDescription->SetValue(wxEmptyString); + } +} + +/*! + * wxEVT_GRID_CELL_CHANGE event handler for ID_OPTIONS + */ + +void CMakeSetupFrm::OnCellChange( wxGridEvent& event ) +{ + // update the button state when the cache is invalidated + UpdateWindowState(); +} + +void CMakeSetupFrm::OnRecentFileMenu( wxCommandEvent &event ) +{ + if(GetMenuBar()) + { + // get file menu + wxMenu *mnu = GetMenuBar()->GetMenu(0); + wxASSERT(mnu != 0); + + wxMenuItem *item = mnu->FindItem(event.GetId()); + if(item) + m_cmBuildPath->SetValue(item->GetLabel()); + } +} +/*! + * wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_COMBOBOX + */ + +void CMakeSetupFrm::OnSearchquerySelected( wxCommandEvent& event ) +{ + m_cmOptions->SetQuery(m_cmSearchQuery->GetValue()); +} + +void CMakeSetupFrm::OnAddQuery ( wxCommandEvent &event ) +{ + // add current text if not yet present + if(m_cmSearchQuery->FindString(m_cmSearchQuery->GetValue()) == wxNOT_FOUND) + { + m_cmSearchQuery->Append(m_cmSearchQuery->GetValue()); + + // if too many items are present, prune + while(m_cmSearchQuery->GetCount() > CM_MAX_SEARCH_QUERIES) + m_cmSearchQuery->Delete(0); + } +} + +/*! + * wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SEARCHQUERY + */ + +void CMakeSetupFrm::OnSearchqueryUpdated( wxCommandEvent& event ) +{ + // only refresh when this event was caused by user + if(!m_noRefresh) + m_cmOptions->SetQuery(m_cmSearchQuery->GetValue()); +} + + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_GRID + */ + +void CMakeSetupFrm::OnBrowseGridClick( wxCommandEvent& event ) +{ + m_cmOptions->BrowseSelectedItem(); +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_RELOAD_CACHE + */ + +void CMakeSetupFrm::OnMenuReloadCacheClick( wxCommandEvent& event ) +{ + bool reload = true; + if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) + { + int result = ::wxMessageBox(_("You have changed options, are you sure you want to reload?\n"), + _("Warning"), wxYES_NO|wxICON_QUESTION); + + // when user wants to wait, wait.. else quit + if(result == wxNO) + reload = false; + + } + + if(reload) + DoReloadCache(); +} + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_DELETE_CACHE + */ + +void CMakeSetupFrm::OnMenuDeleteCacheClick( wxCommandEvent& event ) +{ + DoDeleteCache(); +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_QUIT + */ + +void CMakeSetupFrm::OnMenuQuitClick( wxCommandEvent& event ) +{ + // the close event will veto if the user + // did not want to quit due to unsaved changes + Close(); +} + + +/*! + * wxEVT_CLOSE_WINDOW event handler for ID_FRAME + */ + +void CMakeSetupFrm::OnCloseWindow( wxCloseEvent& event ) +{ + // ask quit if: + // - The cache is dirty + // - Or the cache is OK and has some items, and no project was generated recently (configure -> generate) + if(m_cmOptions->IsCacheDirty() || (m_cmOptions->GetCount() > 0 && !m_cmOptions->IsGenerated())) + { + int result = ::wxMessageBox(_("You have changed options, but not yet generated the projects\n" + "are you sure you want to quit?"), _("Warning"), wxYES_NO|wxICON_QUESTION); + + // when user wants to wait, wait.. else quit + if(result == wxNO) + event.Veto(); + else + event.Skip(); + } + else + event.Skip(); +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_ABOUTDLG + */ + +void CMakeSetupFrm::OnAboutClick( wxCommandEvent& event ) +{ + CMAboutDlg *dlg = new CMAboutDlg(this); + + wxArrayString generators; + std::vector names; + m_cmake->GetRegisteredGenerators(names); + for(std::vector::iterator i = names.begin(); i != names.end(); ++i) + generators.Add(i->c_str()); + + wxString cmversion, cmsversion; +// cmversion.Printf("v%i.%i %s", cmake::GetMajorVersion(), cmake::GetMinorVersion(), cmake::GetReleaseVersion()); + cmsversion.Printf("v%i.%i%s", CMAKEGUI_MAJORVER, CMAKEGUI_MINORVER, CMAKEGUI_ADDVER); + + dlg->SetAboutText(cmversion, cmsversion, generators); + + dlg->ShowModal(); + dlg->Destroy(); +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_CMAKE_OPTIONS + */ + +void CMakeSetupFrm::OnOptionsClick( wxCommandEvent& event ) +{ + CMOptionsDlg *dlg = new CMOptionsDlg(this); + + dlg->SetConfig(m_config); + if(dlg->ShowModal() == wxID_OK) + { + // store volatile settings + dlg->GetConfig(m_config); + + // apply non volatile setting such as clear search query, recent menu, etc. + SyncFormOptions(dlg); + } + + dlg->Destroy(); +} + +void CMakeSetupFrm::SyncFormOptions(CMOptionsDlg *dlg) +{ + // TODO: Clear search query etc. +} +/*! + * wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event handler for ID_SPLITTERWINDOW + */ + +void CMakeSetupFrm::OnSplitterwindowSashDClick( wxSplitterEvent& event ) +{ + event.Veto(); +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_CONFIGURE + */ + +void CMakeSetupFrm::OnMenuConfigureClick( wxCommandEvent& event ) +{ + DoConfigure(); +} + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_EXITGENERATE + */ + +void CMakeSetupFrm::OnMenuGenerateClick( wxCommandEvent& event ) +{ + // set flag so that a close command is issued + // after generating the cmake cache to projects + m_quitAfterGenerating = true; + DoGenerate(); + m_quitAfterGenerating = false; +} + + +/*! + * wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_TOGGLE_ADVANCED + */ + +void CMakeSetupFrm::OnMenuToggleAdvancedClick( wxCommandEvent& event ) +{ + // toggle the check box + m_cmShowAdvanced->SetValue(!m_cmShowAdvanced->GetValue()); + OnShowAdvancedValues(event); +} + + diff --git a/Source/WXDialog/CMakeSetupFrame.h b/Source/WXDialog/CMakeSetupFrame.h new file mode 100644 index 000000000..4237b7e1f --- /dev/null +++ b/Source/WXDialog/CMakeSetupFrame.h @@ -0,0 +1,360 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CMakeSetupFrame.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _CMAKESETUPFRAME_H_ +#define _CMAKESETUPFRAME_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "CMakeSetupFrame.cpp" +#endif + +/*! + * Includes + */ + +////@begin includes +#include "wx/frame.h" +#include "wx/splitter.h" +#include "wx/grid.h" +#include "wx/statline.h" +#include "wx/statusbr.h" +////@end includes + +#include +#include +#include + + +#include "../cmake.h" +#include "progressdlg.h" +#include "optionsdlg.h" +#include "CommandLineInfo.h" +#include "config.h" + +// this ID should be taken as base to make sure they are unique +// NOTE: DialogBlocks starts at 10100 so 10000 to 10099 are free +#define CM_NEXT_USABLEID CM_RECENT_BUILD_ITEM + CM_MAX_RECENT_PATHS + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxSplitterWindow; +class wxPropertyList; +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define ID_FRAME 10100 +#define SYMBOL_CMAKESETUPFRM_STYLE wxDEFAULT_FRAME_STYLE|wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxSUNKEN_BORDER +#define SYMBOL_CMAKESETUPFRM_TITLE _("CMake Setup v2.0.x") +#define SYMBOL_CMAKESETUPFRM_IDNAME ID_FRAME +#define SYMBOL_CMAKESETUPFRM_SIZE wxSize(600, 550) +#define SYMBOL_CMAKESETUPFRM_POSITION wxDefaultPosition +#define ID_SPLITTERWINDOW 10101 +#define ID_MAINPANEL 10102 +#define ID_PROJECT_PATH 10103 +#define ID_BROWSE_PROJECT 10104 +#define ID_SOURCE_BUILD_PATH 10105 +#define ID_BROWSE_BUILD 10106 +#define ID_CHOOSE_GENERATOR 10107 +#define ID_SEARCHQUERY 10109 +#define ID_SHOW_ADVANCED 10108 +#define ID_OPTIONS 10110 +#define ID_LOGPANEL 10111 +#define ID_LOG_AREA 10112 +#define ID_DESCRIPTION 10113 +#define ID_DO_CONFIGURE 10114 +#define ID_DO_OK 10115 +#define ID_DO_CANCEL 10116 +#define ID_DO_DELETE_CACHE 10117 +#define ID_CLEAR_LOG 10118 +#define ID_BROWSE_GRID 10119 +#define ID_STATUSBAR 10120 +#define ID_MENU_RELOAD_CACHE 10122 +#define ID_MENU_DELETE_CACHE 10123 +#define ID_MENU_QUIT 10125 +#define ID_MENU_CONFIGURE 10126 +#define ID_MENU_EXITGENERATE 10127 +#define ID_MENU_TOGGLE_ADVANCED 10128 +#define ID_CMAKE_OPTIONS 10124 +#define ID_ABOUTDLG 10121 +////@end control identifiers + +/*! + * Compatibility + */ + +#ifndef wxCLOSE_BOX +#define wxCLOSE_BOX 0x1000 +#endif +#ifndef wxFIXED_MINSIZE +#define wxFIXED_MINSIZE 0 +#endif + +class DnDFile : public wxFileDropTarget +{ +public: + DnDFile(wxTextCtrl *pOwner) + : m_pOwner(pOwner) + { + }; + + virtual bool OnDropFiles(wxCoord x, wxCoord y, + const wxArrayString& filenames); + +private: + wxTextCtrl *m_pOwner; +}; + + +/*! + * CMakeSetupFrm class declaration + */ + +class CMakeSetupFrm: public wxFrame +{ + DECLARE_CLASS( CMakeSetupFrm ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + CMakeSetupFrm( ); + CMakeSetupFrm( wxWindow* parent, wxWindowID id = SYMBOL_CMAKESETUPFRM_IDNAME, const wxString& caption = SYMBOL_CMAKESETUPFRM_TITLE, const wxPoint& pos = SYMBOL_CMAKESETUPFRM_POSITION, const wxSize& size = SYMBOL_CMAKESETUPFRM_SIZE, long style = SYMBOL_CMAKESETUPFRM_STYLE ); + + // Destructor + virtual ~CMakeSetupFrm(); + + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMAKESETUPFRM_IDNAME, const wxString& caption = SYMBOL_CMAKESETUPFRM_TITLE, const wxPoint& pos = SYMBOL_CMAKESETUPFRM_POSITION, const wxSize& size = SYMBOL_CMAKESETUPFRM_SIZE, long style = SYMBOL_CMAKESETUPFRM_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + /** Logs a message. For the kind parameter use; + 1 - neutral message + 0 - warning message (blue text) + -1 - error message (red text) + */ + void LogMessage(int logkind, const char *msg); + + void UpdateProgress(float progress) { + if(m_progressDlg) + m_progressDlg->SetProgress(progress); + + // also show in the tiny field + wxStatusBar *bar = GetStatusBar(); + if(bar) + { + wxString str; + str.Printf("%2.1f %%", (progress * 100)); + bar->SetStatusText(str, 1); + } + }; + + void IssueUpdate(); + + /** Initialise all crap in the frame, like listing the make generators, + selecting the best one to use, and loading the cache for the first time + when the build paths were set */ + void DoInitFrame(cmCommandLineInfo &cm, const wxString &fn); + +////@begin CMakeSetupFrm event handler declarations + + /// wxEVT_CLOSE_WINDOW event handler for ID_FRAME + void OnCloseWindow( wxCloseEvent& event ); + + /// wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING event handler for ID_SPLITTERWINDOW + void OnSplitterPosChanging( wxSplitterEvent& event ); + + /// wxEVT_COMMAND_SPLITTER_DOUBLECLICKED event handler for ID_SPLITTERWINDOW + void OnSplitterwindowSashDClick( wxSplitterEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_PROJECT + void OnButtonBrowseProject( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SOURCE_BUILD_PATH + void OnSourceBuildPathUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_ENTER event handler for ID_SOURCE_BUILD_PATH + void OnSourceBuildPathEnter( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_BUILD + void OnButtonBrowseBuild( wxCommandEvent& event ); + + /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_SEARCHQUERY + void OnSearchquerySelected( wxCommandEvent& event ); + + /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_SEARCHQUERY + void OnSearchqueryUpdated( wxCommandEvent& event ); + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_SHOW_ADVANCED + void OnShowAdvancedValues( wxCommandEvent& event ); + + /// wxEVT_GRID_CELL_CHANGE event handler for ID_OPTIONS + void OnCellChange( wxGridEvent& event ); + + /// wxEVT_GRID_SELECT_CELL event handler for ID_OPTIONS + void OnGridSelectCell( wxGridEvent& event ); + + /// wxEVT_MOTION event handler for ID_OPTIONS + void OnPropertyMotion( wxMouseEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CONFIGURE + void OnButtonConfigure( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_OK + void OnButtonOk( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_CANCEL + void OnButtonCancel( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_DO_DELETE_CACHE + void OnButtonDeleteCache( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CLEAR_LOG + void OnClearLogClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_BROWSE_GRID + void OnBrowseGridClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_RELOAD_CACHE + void OnMenuReloadCacheClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_DELETE_CACHE + void OnMenuDeleteCacheClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_QUIT + void OnMenuQuitClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_CONFIGURE + void OnMenuConfigureClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_EXITGENERATE + void OnMenuGenerateClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_MENU_TOGGLE_ADVANCED + void OnMenuToggleAdvancedClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_CMAKE_OPTIONS + void OnOptionsClick( wxCommandEvent& event ); + + /// wxEVT_COMMAND_MENU_SELECTED event handler for ID_ABOUTDLG + void OnAboutClick( wxCommandEvent& event ); + +////@end CMakeSetupFrm event handler declarations + + void OnRecentFileMenu( wxCommandEvent &event ); + + void OnAddQuery ( wxCommandEvent &event ); + +////@begin CMakeSetupFrm member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end CMakeSetupFrm member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + + /** Load cache for the CMakeLists to the GUI */ + void LoadCacheFromDiskToGUI(); + + /** Display the grid with the loaded cache. */ + void FillCacheGUIFromCacheManager(); + + int RunCMake(bool generateProjectFiles); + + /** Save cache to disk from the GUI */ + void SaveCacheFromGUI(); + + void FillCacheManagerFromCacheGUI(); + + /** Update the cache and mark all the new items as old */ + bool PerformCacheRun(); + + /** Shows the property matched by the row in the description area + or nothing when the row is not correct */ + void ShowPropertyDescription(int row); + + /** Disable or enable controls based upon the internal state of the + program */ + void UpdateWindowState(); + + void AppendPathToRecentList(const wxString &p); + + /** Used to synchonise any options that have immediate effect on the GUI + form, like clearing a search list, resetting a spitter perhaps, etc */ + void SyncFormOptions(CMOptionsDlg *dlg); + + void DoCancelButton(); + + void DoReloadCache(); + + void DoDeleteCache(); + + void DoConfigure(); + + void DoGenerate(); + + void OnExitTimer(wxTimerEvent &event); + +////@begin CMakeSetupFrm member variables + wxSplitterWindow* m_splitter; + wxTextCtrl* m_cmProjectPath; + wxButton* m_BrowseProjectPathButton; + wxTextCtrl* m_cmBuildPath; + wxButton* m_BrowseSourcePathButton; + wxComboBox* m_cmGeneratorChoice; + wxComboBox* m_cmSearchQuery; + wxCheckBox* m_cmShowAdvanced; + wxPropertyList* m_cmOptions; + wxTextCtrl* m_cmLog; + wxTextCtrl* m_cmDescription; + wxButton* m_ConfigureButton; + wxButton* m_OkButton; + wxButton* m_CancelButton; + wxButton* m_DeleteCacheButton; + wxButton* m_ClearLogButton; + wxButton* m_cmBrowseCell; +////@end CMakeSetupFrm member variables + + // this is the cmake instance with which we will communicate + // to generate our stuff, and get the info from. + cmake *m_cmake; + + // the config class for project build dir and source path + wxTimer *m_ExitTimer; + wxConfig *m_config; + wxString m_PathToExecutable; + wxArrayString m_recentPaths; + CMProgressDialog *m_progressDlg; + bool m_RunningConfigure; + bool m_noRefresh; + bool m_quitAfterGenerating; +}; + +#endif + // _CMAKESETUPFRAME_H_ diff --git a/Source/WXDialog/CommandLineInfo.cpp b/Source/WXDialog/CommandLineInfo.cpp new file mode 100644 index 000000000..261c3d939 --- /dev/null +++ b/Source/WXDialog/CommandLineInfo.cpp @@ -0,0 +1,191 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CommandLineInfo.cpp,v $ + Language: C++ + Date: $Date: 2005-08-10 20:18:54 $ + Version: $Revision: 1.4 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#include "CommandLineInfo.h" + +#include "cmSystemTools.h" + +/////////////////////////////////////////////////////////////// +// cmCommandLineInfo + +cmCommandLineInfo::cmCommandLineInfo() +{ + m_WhereSource = _(""); + m_WhereBuild = _(""); + m_AdvancedValues = false; + m_GeneratorChoiceString.Empty(); + m_LastUnknownParameter = ""; + m_ValidArguments = ""; + m_ExitAfterLoad = false; +} + +/////////////////////////////////////////////////////////////// +cmCommandLineInfo::~cmCommandLineInfo() +{ +} + +/////////////////////////////////////////////////////////////// +bool cmCommandLineInfo::ParseCommandLine(int argc, char* argv[]) +{ + bool result = true; + wxString cachePath; + + // parse all commands + int cc = 1; + if(argc < cc) + return true; // no command line options + + while(cc < argc) + { + wxString arg = argv[cc]; + + // if we have a switch + if(arg.Len() > 1 && arg.GetChar(0) == '-') + { + int next_argc = ParseSwitch(argv, cc, argc); + if(next_argc > 0) + cc += next_argc; + else + return false; // sorry error while parsing + } + else + { + // gather all what is left + for(int leftcc = cc; leftcc < argc; leftcc++) + { + if(cc != leftcc) + m_WhereBuild << _(" "); + m_WhereBuild << argv[leftcc]; + } + break; + } + } + + m_ExecutablePath = cmSystemTools::GetFilenamePath(argv[0]).c_str(); + + return true; +} + +/////////////////////////////////////////////////////////////// +int cmCommandLineInfo::GetBoolValue(const wxString& v) { + + wxString value = v.Lower(); + + if (!value.Cmp("1") || + !value.Cmp("on") || + !value.Cmp("true") || + !value.Cmp("yes")) + { + // true + return 1; + } + else if (!value.Cmp("0") || + !value.Cmp("off") || + !value.Cmp("false") || + !value.Cmp("no")) + { + // false + return -1; + } + + // not recognised + return 0; +} + +/////////////////////////////////////////////////////////////// +// Parse param + +size_t cmCommandLineInfo::ParseSwitch(char **argv, int arg_index, int argc) +{ + wxString param = argv[arg_index]; + + // we need this for a switch, at least 2 + if(param.Len() > 1) + { + // determine switch type + switch (param.GetChar(1)) + { + case 'G': + // when it's G<.....> we split else we take the + // other argc + if(param.Len() > 2) + { + m_GeneratorChoiceString = GetStringParam(param.Mid(2)); + return 1; // one arg is passed + } + else + { + if((arg_index+1) < argc) + { + m_GeneratorChoiceString = GetStringParam(wxString(argv[arg_index+1])); + return 2; // two args are passed + } + } + // no luck + return 0; + + case 'Q': + m_ExitAfterLoad = true; + return 1; + + // unknown param + default: + break; + } + } + + // error, unrecognised or too small arg + return 0; +} + +// When the string param given has string quotes around it +// we remove them and we pass back the string. If not, we +// simply pass back the string as-is +wxString cmCommandLineInfo::GetStringParam(const wxString &str) +{ + wxString mystr = str.Strip(wxString::both); + + // if we have only one (or no chars return the current string) + if(mystr.Len() < 2) + return str; + + // if we have quotes + if(mystr.GetChar(0) == '\"' && mystr.Last() == '\"') + { + // when we only have 2 in size, return empty string + if(mystr.Len() == 2) + return wxEmptyString; + + // now remove the outer and inner, and return + return mystr.Mid(1, mystr.Len()-1); + } + + return str; +} diff --git a/Source/WXDialog/CommandLineInfo.h b/Source/WXDialog/CommandLineInfo.h new file mode 100644 index 000000000..ad31f0938 --- /dev/null +++ b/Source/WXDialog/CommandLineInfo.h @@ -0,0 +1,67 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: CommandLineInfo.h,v $ + Language: C++ + Date: $Date: 2005-08-10 20:18:54 $ + Version: $Revision: 1.4 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if !defined(CMAKECOMMANDLINEINFO_H) +#define CMAKECOMMANDLINEINFO_H + +#include "cmStandardIncludes.h" + +/////////////////////////////////////////////////////////////// +// cmCommandLineInfo: +// See cmCommandLineInfo.cxx for the implementation of this class +// + +class cmCommandLineInfo +{ + // Construction +public: + cmCommandLineInfo(); + virtual ~cmCommandLineInfo(); + + // Parse the command line + bool ParseCommandLine(int argc, char* argv[]); + + // Retrieve the path of executable + wxString GetPathToExecutable() { return this->m_ExecutablePath; } + + // Attributes +public: + wxString m_WhereSource; + wxString m_WhereBuild; + bool m_AdvancedValues; + wxString m_GeneratorChoiceString; + wxString m_LastUnknownParameter; + wxString m_ExecutablePath; + bool m_ExitAfterLoad; + +private: + // Parse one argument + size_t ParseSwitch(char **argv, int arg_index, int argc); + + // Return boolean value of the string + static int GetBoolValue(const wxString&); + + // on windows the argument with spaces SUCKS! So we need to + // incorporate it with quotes. + wxString GetStringParam(const wxString &str); + + wxString m_ValidArguments; +}; + +#endif // !defined(CMAKECOMMANDLINEINFO_H) diff --git a/Source/WXDialog/NGDialog.exe.manifest b/Source/WXDialog/NGDialog.exe.manifest new file mode 100644 index 000000000..6cdabd031 --- /dev/null +++ b/Source/WXDialog/NGDialog.exe.manifest @@ -0,0 +1,22 @@ + + + + CMake Next Generation Dialog + + + + + + \ No newline at end of file diff --git a/Source/WXDialog/NGDialog.ico b/Source/WXDialog/NGDialog.ico new file mode 100644 index 0000000000000000000000000000000000000000..e13bb156f4e0bd05a4c5df7de920ebc681e82799 GIT binary patch literal 24542 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 literal 0 HcmV?d00001 diff --git a/Source/WXDialog/PropertyList.cpp b/Source/WXDialog/PropertyList.cpp new file mode 100644 index 000000000..f7d1918e1 --- /dev/null +++ b/Source/WXDialog/PropertyList.cpp @@ -0,0 +1,856 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: PropertyList.cpp,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +/* for compilers that support precompilation + includes "wx/wx.h" */ + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#include "PropertyList.h" +#include "app_resources.h" + +#include "../cmCacheManager.h" +#include "../cmSystemTools.h" +#include "../cmake.h" + +BEGIN_EVENT_TABLE( wxPropertyList, wxGrid ) + EVT_GRID_CELL_LEFT_CLICK( wxPropertyList::OnSelectCell ) + EVT_GRID_CELL_CHANGE( wxPropertyList::OnCellChange ) + EVT_GRID_CMD_CELL_RIGHT_CLICK( wxID_ANY, wxPropertyList::OnCellPopup ) + EVT_MENU ( ID_CACHE_DELETE, wxPropertyList::OnDeleteCache ) + EVT_MENU ( ID_CACHE_IGNORE, wxPropertyList::OnIgnoreCache ) + EVT_MENU ( ID_CACHE_BROWSE, wxPropertyList::OnBrowseItem ) + EVT_SIZE ( wxPropertyList::OnSizeGrid ) + EVT_CHAR ( wxPropertyList::OnKeyPressed ) +END_EVENT_TABLE() + +#if 0 + +// ---------------------------------------------------------------------------- +// wxGridCellPathEditor +// ---------------------------------------------------------------------------- + +wxGridCellPathEditor::wxGridCellPathEditor() +{ + m_maxChars = 0; +} + +void wxGridCellPathEditor::Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler) +{ + m_control = new wxTextCtrl(parent, id, wxEmptyString, + wxDefaultPosition, wxDefaultSize +#if defined(__WXMSW__) + , wxTE_PROCESS_TAB | wxTE_AUTO_SCROLL +#endif + ); +// +// m_button = new wxButton(parent, id+1, _("..."), +// wxDefaultPosition, wxDefaultSize); +// + + // set max length allowed in the textctrl, if the parameter was set + if (m_maxChars != 0) + { + ((wxTextCtrl*)m_control)->SetMaxLength(m_maxChars); + } + + wxGridCellEditor::Create(parent, id, evtHandler); +} + +void wxGridCellPathEditor::PaintBackground(const wxRect& WXUNUSED(rectCell), + wxGridCellAttr * WXUNUSED(attr)) +{ + // as we fill the entire client area, don't do anything here to minimize + // flicker +} + +void wxGridCellPathEditor::SetSize(const wxRect& rectOrig) +{ + wxRect rect(rectOrig); + + // Make the edit control large enough to allow for internal + // margins + // + // TODO: remove this if the text ctrl sizing is improved esp. for + // unix + // +#if defined(__WXGTK__) + if (rect.x != 0) + { + rect.x += 1; + rect.y += 1; + rect.width -= 1; + rect.height -= 1; + } +#else // !GTK + int extra_x = ( rect.x > 2 )? 2 : 1; + +// MB: treat MSW separately here otherwise the caret doesn't show +// when the editor is in the first row. +#if defined(__WXMSW__) + int extra_y = 2; +#else + int extra_y = ( rect.y > 2 )? 2 : 1; +#endif // MSW + +#if defined(__WXMOTIF__) + extra_x *= 2; + extra_y *= 2; +#endif + rect.SetLeft( wxMax(0, rect.x - extra_x) ); + rect.SetTop( wxMax(0, rect.y - extra_y) ); + rect.SetRight( rect.GetRight() + 2*extra_x ); + rect.SetBottom( rect.GetBottom() + 2*extra_y ); +#endif // GTK/!GTK + + wxGridCellEditor::SetSize(rect); +} + +void wxGridCellPathEditor::BeginEdit(int row, int col, wxGrid* grid) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be Created first!")); + + m_startValue = grid->GetTable()->GetValue(row, col); + + DoBeginEdit(m_startValue); +} + +void wxGridCellPathEditor::DoBeginEdit(const wxString& startValue) +{ + Text()->SetValue(startValue); + Text()->SetInsertionPointEnd(); + Text()->SetSelection(-1,-1); + Text()->SetFocus(); +} + +bool wxGridCellPathEditor::EndEdit(int row, int col, + wxGrid* grid) +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be Created first!")); + + bool changed = false; + wxString value = Text()->GetValue(); + if (value != m_startValue) + changed = true; + + if (changed) + grid->GetTable()->SetValue(row, col, value); + + m_startValue = wxEmptyString; + // No point in setting the text of the hidden control + //Text()->SetValue(m_startValue); + + return changed; +} + + +void wxGridCellPathEditor::Reset() +{ + wxASSERT_MSG(m_control, + wxT("The wxGridCellEditor must be Created first!")); + + DoReset(m_startValue); +} + +void wxGridCellPathEditor::DoReset(const wxString& startValue) +{ + Text()->SetValue(startValue); + Text()->SetInsertionPointEnd(); +} + +bool wxGridCellPathEditor::IsAcceptedKey(wxKeyEvent& event) +{ + return wxGridCellEditor::IsAcceptedKey(event); +} + +void wxGridCellPathEditor::StartingKey(wxKeyEvent& event) +{ + // Since this is now happening in the EVT_CHAR event EmulateKeyPress is no + // longer an appropriate way to get the character into the text control. + // Do it ourselves instead. We know that if we get this far that we have + // a valid character, so not a whole lot of testing needs to be done. + + wxTextCtrl* tc = Text(); + wxChar ch; + long pos; + +#if wxUSE_UNICODE + ch = event.GetUnicodeKey(); + if (ch <= 127) + ch = (wxChar)event.GetKeyCode(); +#else + ch = (wxChar)event.GetKeyCode(); +#endif + switch (ch) + { + case WXK_DELETE: + // delete the character at the cursor + pos = tc->GetInsertionPoint(); + if (pos < tc->GetLastPosition()) + tc->Remove(pos, pos+1); + break; + + case WXK_BACK: + // delete the character before the cursor + pos = tc->GetInsertionPoint(); + if (pos > 0) + tc->Remove(pos-1, pos); + break; + + default: + tc->WriteText(ch); + break; + } +} + +void wxGridCellPathEditor::HandleReturn( wxKeyEvent &event ) +{ +#if defined(__WXMOTIF__) || defined(__WXGTK__) + // wxMotif needs a little extra help... + size_t pos = (size_t)( Text()->GetInsertionPoint() ); + wxString s( Text()->GetValue() ); + s = s.Left(pos) + wxT("\n") + s.Mid(pos); + Text()->SetValue(s); + Text()->SetInsertionPoint( pos ); +#else + // the other ports can handle a Return key press + // + event.Skip(); +#endif +} + +void wxGridCellPathEditor::SetParameters(const wxString& params) +{ + if ( !params ) + { + // reset to default + m_maxChars = 0; + } + else + { + long tmp; + if ( !params.ToLong(&tmp) ) + { + wxLogDebug(_T("Invalid wxGridCellPathEditor parameter string '%s' ignored"), params.c_str()); + } + else + { + m_maxChars = (size_t)tmp; + } + } +} + +// return the value in the text control +wxString wxGridCellPathEditor::GetValue() const +{ + return Text()->GetValue(); +} + +#endif + +///////////////////////////////////////////////////////////////////////////// +// wxPropertyItem + +// returns true when this property item is a filepath +bool wxPropertyItem::IsFilePath() +{ + return m_nItemType == wxPropertyList::FILE; +} + +// returns true when this property item is a dir path +bool wxPropertyItem::IsDirPath() +{ + return m_nItemType == wxPropertyList::PATH; +} + +///////////////////////////////////////////////////////////////////////////// +// wxPropertyList + +wxPropertyList::~wxPropertyList() +{ + WX_CLEAR_ARRAY(m_PropertyItems); +} + +int wxPropertyList::AddItem(const wxString &txt) +{ + // TODO: Add the item to the grid! + + //int nIndex = AddString(txt); + //return nIndex; + + return 0; +} + +// order = 0 sorted (not supported yet) +// order = 1 add to top +// order = 2 add to bottom +int wxPropertyList::AddPropItem(wxPropertyItem* pItem, int order) +{ + m_PropertyItems.Add(pItem); + if(pItem->GetAdvanced() && ! m_ShowAdvanced) + return 0; + + // disable in progress editing + HideControls(); + + return AddPropertyToGrid(pItem, order); +} + +int wxPropertyList::AddPropertyToGrid(wxPropertyItem *pItem, int order) +{ + int row = 0; + if(order == 1) + InsertRows(0,1); + else + { + AppendRows(1); + row = GetNumberRows() - 1; + } + + // initialise the type of renderer + if(pItem->GetItemType() == wxPropertyList::CHECKBOX) + { + SetCellRenderer(row, 1, new wxGridCellBoolRenderer); + SetCellEditor(row, 1, new wxGridCellBoolEditor); + } + +#ifdef __LINUX__ + // fix to make sure scrollbars are drawn properly + wxGrid::AdjustScrollbars(); +#endif + + // the property display is read only + UpdatePropertyItem(pItem, row); + return row; +} + +void wxPropertyList::AddProperty(const char* name, const char* value, const char* helpString, + int type, const char* comboItems, bool reverseOrder, bool advanced) +{ + wxPropertyItem* pItem = 0; + + // add or update the property item + for(size_t i = 0; i < m_PropertyItems.Count(); i++) + { + if(m_PropertyItems[i]->GetPropName().IsSameAs(name)) + { + pItem = m_PropertyItems[i]; + if(!pItem->GetCurValue().IsSameAs(value)) + { + pItem->SetCurValue(value); + pItem->SetHelpString(helpString); + pItem->SetAdvanced(advanced); + + // update the property item + int row = FindProperty(pItem); + if(row != -1) + UpdatePropertyItem(pItem, row); + } + return; + } + } + + // if it is not found, then create a new one + if(!pItem) + { + pItem = new wxPropertyItem(name, value, helpString, type, comboItems); + pItem->SetAdvanced(advanced); + + AddPropItem(pItem, 1); + } +} + +void wxPropertyList::UpdateGridView() +{ + // make sure all items are shown, remove items that should not be shown + bool keepItem; + int row; + for(size_t i = 0; i < m_PropertyItems.Count(); i++) + { + // to begin with, does this item fit the query? + keepItem = m_strQuery.IsEmpty() || (m_PropertyItems[i]->GetPropName().Find(m_strQuery) != -1); + if(keepItem) + { + // when advanced items are allowed to be shown, keep when ok + if(!m_ShowAdvanced) + keepItem = !m_PropertyItems[i]->GetAdvanced(); + } + + // find the item, if not present but keep is true, add, if + // present but keep is false, remove + row = -1; + for(size_t j = 0; j < (size_t)GetNumberRows(); j++) + { + if(m_PropertyItems[i]->GetPropName().IsSameAs(GetCellValue(j, 0))) + { + row = j; + break; + } + } + + if(row == -1 && keepItem) + AddPropertyToGrid(m_PropertyItems[i], (m_ShowAdvanced ? 2 : 0)); + else if(row != -1 && !keepItem) + DeleteRows(row, 1); + } + +#ifdef __LINUX__ + // fix to make sure scrollbars are drawn properly + wxGrid::AdjustScrollbars(); +#endif +} + +void wxPropertyList::HideControls() +{ + DisableCellEditControl(); +} + +void wxPropertyList::RemoveProperty(wxPropertyItem *pItem) +{ + HideControls(); + + // look for property in grid, delete it when present + for(size_t j = 0; j < (size_t)GetNumberRows(); j++) + { + if(pItem->GetPropName().IsSameAs(GetCellValue(j, 0), false)) + { + DeleteRows(j, 1); + +#ifdef __LINUX__ + // fix to make sure scrollbars are drawn properly + wxGrid::AdjustScrollbars(); +#endif + break; + } + } + + // delete the item from the list + m_PropertyItems.Remove(pItem); + delete pItem; +} + +wxPropertyItem *wxPropertyList::FindPropertyByName(const wxString &name) +{ + for(size_t i = 0; i < m_PropertyItems.Count(); i++) + { + // we have an advanced item, go through table and if not present, show it + if(m_PropertyItems[i]->GetPropName().IsSameAs(name, true)) + return m_PropertyItems[i]; + } + + return 0; +} + +/** +void wxPropertyList::OnIgnore() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); + pItem->m_curValue = "IGNORE"; + InvalidateList(); +} +*/ + +/** +void wxPropertyList::OnDelete() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); + m_CMakeSetupDialog->GetCMakeInstance()->GetCacheManager()->RemoveCacheEntry(pItem->m_propName); + m_PropertyItems.erase(pItem); + delete pItem; + this->DeleteString(m_curSel); + this->HideControls(); + this->SetTopIndex(0); + InvalidateList(); +} +*/ + +/** +void wxPropertyList::OnHelp() +{ + if(m_curSel == -1 || this->GetCount() <= 0) + { + return; + } + wxPropertyItem* pItem = (wxPropertyItem*) GetItemDataPtr(m_curSel); + MessageBox(pItem->m_HelpString, pItem->m_propName, MB_OK|MB_ICONINFORMATION); +} +*/ + +void wxPropertyList::RemoveAll() +{ + WX_CLEAR_ARRAY(m_PropertyItems); + m_generatedProjects = false; + + if(GetNumberRows() > 0) + DeleteRows(0, GetNumberRows()); + + m_strQuery.Empty(); + +#ifdef __LINUX__ + // fix to make sure scrollbars are drawn properly + wxGrid::AdjustScrollbars(); +#endif +} + +void wxPropertyList::ShowAdvanced() +{ + // set flag in the control + m_ShowAdvanced = true; + UpdateGridView(); +} + + +void wxPropertyList::HideAdvanced() +{ + // set flag in the control + m_ShowAdvanced = false; + UpdateGridView(); +} + +int wxPropertyList::FindProperty(wxPropertyItem *pItem) +{ + if(GetNumberRows() > 0 && pItem != 0) + { + // find the property the traditional way + for(size_t j = 0; j < (size_t)GetNumberRows(); j++) + { + if(pItem->GetPropName().IsSameAs(GetCellValue(j, 0))) + return j; + } + } + + return -1; +} + +wxPropertyItem *wxPropertyList::GetPropertyItemFromRow(int row) +{ + if(row < GetNumberRows() && row >= 0) + { + wxString str = GetCellValue(row, 0); + // find the property the traditional way + for(size_t i = 0; i < (size_t)m_PropertyItems.Count(); i++) + { + if(m_PropertyItems[i]->GetPropName().IsSameAs(str)) + return m_PropertyItems[i]; + } + } + + return 0; +} + +bool wxPropertyList::UpdatePropertyItem(wxPropertyItem *pItem, int row) +{ + wxCHECK(row < GetNumberRows(), false); + + // reflect the property's state to match the grid row + + SetReadOnly(row, 0); + // TODO: Make this a UpdatePropItem where ADVANCED, and new edit values are reflected + SetCellValue(row,0, pItem->GetPropName()); + + // boolean renderer + if(pItem->GetItemType() == wxPropertyList::CHECKBOX) + { + // translate ON or TRUE (case insensitive to a checkbox) + if(pItem->GetCurValue().IsSameAs(wxT("ON"), false) || + pItem->GetCurValue().IsSameAs(wxT("TRUE"), false)) + SetCellValue(row, 1, wxT("1")); + else + SetCellValue(row, 1, wxT("0")); + } + else + { + // for normal path values, give bold in cell when + // the NOTFOUND is present, for emphasis + wxString str = pItem->GetPropName() + wxT("-NOTFOUND"); + if(pItem->GetCurValue().IsSameAs(str)) + { + wxFont fnt = GetCellFont(row, 0); + fnt.SetWeight(wxFONTWEIGHT_BOLD); + SetCellFont(row, 1, fnt); + } + else + SetCellFont(row, 1, GetCellFont(row, 0)); + + SetCellValue(row,1, pItem->GetCurValue()); + } + + if(pItem->GetCurValue().IsSameAs("IGNORE")) + { + // ignored cell is completely dimmed + wxColour col(192,192,192); + SetCellTextColour(row, 1, col); + } + else + { + // we colour paths blue, filenames green, all else black + wxColour col; + if(pItem->IsDirPath()) + col.Set(0,0,255); + else if(pItem->IsFilePath()) + col.Set(0,128,0); + else + col = GetCellTextColour(row, 0); + + SetCellTextColour(row, 1, col); + } + + if(pItem->GetNewValue()) + { + // new cell is red + wxColour col(255,100,100); + SetCellBackgroundColour(row, 0, col); + } + else + { + // old cell is grey + wxColour col(192, 192, 192); + SetCellBackgroundColour(row, 0, col); + } + + return true; +} + +void wxPropertyList::OnSelectCell( wxGridEvent& event ) +{ + this->SetFocus(); + event.Skip(); +} + +void wxPropertyList::OnCellChange( wxGridEvent& event ) +{ + int row = event.GetRow(); + + wxPropertyItem *pItem = GetPropertyItemFromRow(row); + if(pItem && row != wxNOT_FOUND) + { + // write propery back, and set as new + pItem->SetNewValue(true); + + // write back bool + if(pItem->GetItemType() == CHECKBOX) + { + if(GetCellValue(row, 1).IsSameAs("1")) + pItem->SetCurValue("ON"); + else + pItem->SetCurValue("OFF"); + } + else + pItem->SetCurValue(GetCellValue(row, 1)); + + UpdatePropertyItem(pItem, row); + event.Skip(); + } +} + +void wxPropertyList::OnCellPopup( wxGridEvent& event ) +{ + wxPoint pt; + int row = event.GetRow(); + + //pt = ::wxGetMousePosition(); + //ScreenToClient(pt); + + //row = YToRow(pt.y); + if(row != wxNOT_FOUND) + { + wxPropertyItem *pItem = GetPropertyItemFromRow(row); + + if(pItem) + { + // select the row first if already in selection, don't + // this will clear the previous selection + if(!IsInSelection(row, 0)) + SelectRow(row); + + // show popup menu + wxMenu *menu = AppResources::CreatePopupMenu(); + + // enable when it is browsable, and selected one only + wxMenuItem *item = menu->FindItem(ID_CACHE_BROWSE); + if(item) + item->Enable(IsSelectedItemBrowsable()); + + PopupMenu(menu); + + delete menu; + } + } +} + +void wxPropertyList::OnIgnoreCache( wxCommandEvent& event ) +{ + HideControls(); + + // ignore all selected items + for(size_t i = 0; i < (size_t)GetNumberRows(); i++) + { + if(IsInSelection(i, 0)) + { + wxPropertyItem *pItem = GetPropertyItemFromRow(i); + if(pItem) + { + pItem->SetCurValue("IGNORE"); + UpdatePropertyItem(pItem, i); + } + } + } +} + +void wxPropertyList::OnDeleteCache( wxCommandEvent& event ) +{ + HideControls(); + + // convert selections to prop items + wxArrayPtrVoid items; + for(size_t i = 0; i < (size_t)GetNumberRows(); i++) + { + // if selected, query for removal + if(IsInSelection(i, 0)) + { + wxPropertyItem *pItem = GetPropertyItemFromRow(i); + if(pItem) + items.Add((void *)pItem); + } + } + + // now delete all prop items in cells + for(size_t i = 0; i < items.Count(); i++) + RemoveProperty((wxPropertyItem *)items[i]); +} + +void wxPropertyList::OnBrowseItem( wxCommandEvent& event ) +{ + BrowseSelectedItem(); +} + +bool wxPropertyList::IsSelectedItemBrowsable(int row) +{ + // when there is only one selection, and our current item + // is browsable, make sure it can be selected. + wxPropertyItem *pItem = 0; + + size_t count = 0; + for(size_t i = 0; i < (size_t)GetNumberRows() && (count < 2); i++) + { + if(IsInSelection(i, 0)) + { + if(!pItem) + pItem = GetPropertyItemFromRow(i); + count ++; + } + } + + // if we found nothing, take row (because the event EVT_GRID_CELL_SELECTED + // deselects the cells first before selecting the new one again + if(row != -1 && !pItem) + { + pItem = GetPropertyItemFromRow(row); + count ++; // needed because of next loop + } + + // only one item allowed to select + if(pItem && count == 1) + { + if(pItem) + return pItem->IsDirPath() || pItem->IsFilePath(); + } + + return false; +} + + +void wxPropertyList::BrowseSelectedItem() +{ + HideControls(); + + for(size_t i = 0; i < (size_t)GetNumberRows(); i++) + { + if(IsInSelection(i, 0)) + { + // browse for file or directory + wxPropertyItem *pItem = GetPropertyItemFromRow(i); + if(pItem) + { + wxString title; + wxString str = pItem->GetPropName() + _("-NOTFOUND"); + if(pItem->GetCurValue().IsSameAs(str, true)) + str.Empty(); + else + str = pItem->GetCurValue(); + + // browse the directory path + + if(pItem->IsDirPath()) + { + title = _("Select path for ") + pItem->GetPropName(); + str = ::wxDirSelector(title, str, 0, wxDefaultPosition, this); + } + else if(pItem->IsFilePath()) + { + title = _("Select file for ") + pItem->GetPropName(); + str = ::wxFileSelector(title, str, _(""), _(""), _(MC_DEFAULT_WILDCARD), wxFILE_MUST_EXIST, this); + } + else + str.Empty(); + + if(!str.IsEmpty()) + { + pItem->SetCurValue(str.c_str()); + UpdatePropertyItem(pItem, i); + } + } + + // only allow one item to browse + break; + } + } +} + +void wxPropertyList::OnSizeGrid( wxSizeEvent &event ) +{ + int width, height; + + // make sure the grid's cells are equally adjusted + GetClientSize(&width, &height); + SetDefaultColSize(width / 2, true); + + wxGrid::AdjustScrollbars(); +} + +void wxPropertyList::OnKeyPressed( wxKeyEvent &event ) +{ + event.Skip(); +} diff --git a/Source/WXDialog/PropertyList.h b/Source/WXDialog/PropertyList.h new file mode 100644 index 000000000..0032bfdc7 --- /dev/null +++ b/Source/WXDialog/PropertyList.h @@ -0,0 +1,339 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: PropertyList.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef __WXPROPERTYLIST_H +#define __WXPROPERTYLIST_H + + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#include +#include + +#include "../cmStandardIncludes.h" + +#ifdef __LINUX__ + #define MC_DEFAULT_WILDCARD "*" +#else + #define MC_DEFAULT_WILDCARD "*.*" +#endif + +#if 0 + +// the editor for string/text data +class wxGridCellPathEditor : public wxGridCellEditor +{ +public: + wxGridCellPathEditor(); + + virtual void Create(wxWindow* parent, + wxWindowID id, + wxEvtHandler* evtHandler); + virtual void SetSize(const wxRect& rect); + + virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + + virtual bool IsAcceptedKey(wxKeyEvent& event); + virtual void BeginEdit(int row, int col, wxGrid* grid); + virtual bool EndEdit(int row, int col, wxGrid* grid); + + virtual void Reset(); + virtual void StartingKey(wxKeyEvent& event); + virtual void HandleReturn(wxKeyEvent& event); + + // parameters string format is "max_width" + virtual void SetParameters(const wxString& params); + + virtual wxGridCellEditor *Clone() const + { return new wxGridCellPathEditor; } + + // DJC MAPTEK + // added GetValue so we can get the value which is in the control + virtual wxString GetValue() const; +protected: + wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; } + + // parts of our virtual functions reused by the derived classes + void DoBeginEdit(const wxString& startValue); + void DoReset(const wxString& startValue); + +private: + size_t m_maxChars; // max number of chars allowed + wxString m_startValue; + + DECLARE_NO_COPY_CLASS(wxGridCellPathEditor) +}; + +#endif + +///////////////////////////////////////////////////////////////////////////// +//wxPropertyItem Items +class wxPropertyItem +{ +public: + wxPropertyItem(const wxString &propName, const wxString &curValue, + const wxString &helpString, int nItemType, const wxString &cmbItems) + : m_NewValue(true) + , m_HelpString(helpString) + , m_Removed(false) + , m_propName(propName) + , m_curValue(curValue) + , m_nItemType(nItemType) + , m_cmbItems(cmbItems) + , m_Advanced(false) + { + //m_NewValue = true; + //m_HelpString = helpString; + //m_Removed = false; + //m_propName = propName; + //m_curValue = curValue; + //m_nItemType = nItemType; + //m_cmbItems = cmbItems; + //m_Advanced = false; + } + + const wxString &GetCurValue() const { + return m_curValue; + }; + + const wxString &GetPropName() const { + return m_propName; + }; + + void SetCurValue(const char *str) { + m_curValue = str; + }; + + void SetPropName(const char *str) { + m_propName = str; + }; + + void SetAdvanced(bool value) { + m_Advanced = value; + }; + + void SetHelpString(const char *str) { + m_HelpString = str; + }; + + bool GetAdvanced() const { + return m_Advanced; + }; + + void SetNewValue(bool value) { + m_NewValue = value; + }; + + bool GetNewValue() const { + return m_NewValue; + }; + + int GetItemType() const { + return m_nItemType; + }; + + const wxString &GetHelpString() const { + return m_HelpString; + }; + + // returns true when this property item is a filepath + bool IsFilePath(); + + // returns true when this property item is a dir path + bool IsDirPath(); + +private: + wxString m_HelpString; + wxString m_propName; + wxString m_curValue; + int m_nItemType; + wxString m_cmbItems; + bool m_NewValue; + bool m_Removed; + bool m_Advanced; +}; + +WX_DEFINE_ARRAY(wxPropertyItem *, wxPropertyItems); + +///////////////////////////////////////////////////////////////////////////// +// wxPropertyList Grid +class wxPropertyList : public wxGrid +{ +// Construction +public: + wxPropertyList(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS, + const wxString& name = wxPanelNameStr) + : wxGrid(parent, id, pos, size, style, name) + { + }; + + enum ItemType + { + COMBO = 0, + EDIT, + COLOR, + FONT, + FILE, + CHECKBOX, + PATH + }; + + virtual ~wxPropertyList(); + +public: + bool GetShowAdvanced() const { + return m_ShowAdvanced; + }; + + void SetProjectGenerated(bool value) { + m_generatedProjects = value; + }; + + bool IsGenerated() { + return m_generatedProjects; + }; + + int AddItem(const wxString &txt); + + void AddProperty(const char* name, const char* value, const char* helpString, int type, + const char* comboItems, bool reverseOrder, bool advanced); + + void RemoveProperty(wxPropertyItem *pItem); + + void HideControls(); + void ShowAdvanced(); + void HideAdvanced(); + + void RemoveAll(); + + wxPropertyItem* GetItem(size_t index) { + wxCHECK(index < GetCount(), 0); + return m_PropertyItems[index]; + }; + + size_t GetCount() const { + return m_PropertyItems.Count(); + }; + + const wxPropertyItems &GetItems() { + return m_PropertyItems; + }; + + void SetShowAdvanced(bool value) { + m_ShowAdvanced = value; + }; + + bool UpdatePropertyItem(wxPropertyItem *pItem, int row); + + /** Returns the row of the grid on which the item is found. -1 is returned when not found */ + int FindProperty(wxPropertyItem *pItem); + + /** Returns true when the cache is still dirty, which means + after a configuration run, there are still new items */ + bool IsCacheDirty() { + // check if we have items that are new + for(size_t i = 0; i < m_PropertyItems.Count(); i++) + { + //if((m_PropertyItems[i]->GetNewValue() && m_ShowAdvanced && m_PropertyItems[i]->GetAdvanced()) || + // (m_PropertyItems[i]->GetNewValue() && !m_ShowAdvanced)) + if(m_PropertyItems[i]->GetNewValue()) + return true; + } + + // return flag if generated cache or not + return false; + }; + + /** Returns the property item from the current row. 0 if no property item found */ + wxPropertyItem *GetPropertyItemFromRow(int row); + + /** Finds the property by name and returns the property item */ + wxPropertyItem *FindPropertyByName(const wxString &name); + + /** Sets the search filter. Making sure that the items currently displayed + match this substring query */ + void SetQuery(const wxString &query) { + m_strQuery = query; + UpdateGridView(); + }; + + /** Returns the last used query. */ + const wxString &GetQuery() { + return m_strQuery; + }; + + /** Function that tries to browse for the item that is selected */ + void BrowseSelectedItem(); + + /** Returns true when the item is browsable (file or path) and only one item is + selected */ + bool IsSelectedItemBrowsable(int row = -1); + +private: + // order = 0 sorted + // order = 1 add to top + // order = 2 add to bottom + int AddPropItem(wxPropertyItem* pItem, int order); + + /** Adds the property item to the grid. */ + int AddPropertyToGrid(wxPropertyItem *pItem, int order) ; + + /** Adds / removes all the items that are currently (not) matching the + query filter */ + void UpdateGridView(); + + void OnSelectCell( wxGridEvent& event ); + + void OnCellChange( wxGridEvent& event ); + + void OnCellPopup( wxGridEvent& event ); + + void OnIgnoreCache( wxCommandEvent& event ); + + void OnDeleteCache( wxCommandEvent& event ); + + void OnSizeGrid( wxSizeEvent &event ); + + void OnBrowseItem( wxCommandEvent& event ); + + void OnKeyPressed( wxKeyEvent &event ); + + int m_curSel; + int m_prevSel; + int m_nDivider; + int m_nDivTop; + int m_nDivBtm; + int m_nOldDivX; + int m_nLastBox; + bool m_bTracking; + bool m_bDivIsSet; + bool m_ShowAdvanced; + // flag to indicate the last cache load has resulted + // in generating a valid project + bool m_generatedProjects; + wxString m_strQuery; + wxPropertyItems m_PropertyItems; + + DECLARE_EVENT_TABLE() +}; + +#endif diff --git a/Source/WXDialog/about.html b/Source/WXDialog/about.html new file mode 100644 index 000000000..52187ed91 --- /dev/null +++ b/Source/WXDialog/about.html @@ -0,0 +1,21 @@ + + +CMake - CMakeSetup GUI Build System + + + +CMake - CMakeSetup GUI Build System +

Welcome to CMake! The cross-platform, open-source make system. + +CMake is used to control the software compilation process using simple platform and compiler independent configuration files. +CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. +Please go to http://www.cmake.org to learn more about CMake.

+CMakeSetup.exe is enhanced and ported to wxWidgets 2.6.0 by Jorgen Bodde (jorgb@xs4all.nl).
+Current CMakeSetup version is: @V@
+Current CMake build system is: @B@

+Current generators are supported:
+@G@ +
+

+ + diff --git a/Source/WXDialog/aboutdlg.cpp b/Source/WXDialog/aboutdlg.cpp new file mode 100644 index 000000000..a87399365 --- /dev/null +++ b/Source/WXDialog/aboutdlg.cpp @@ -0,0 +1,210 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: aboutdlg.cpp,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "aboutdlg.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include "cmake_logo.xpm" +#include "aboutdlg.h" + +////@begin XPM images +////@end XPM images + +/*! + * CMAboutDlg type definition + */ + +IMPLEMENT_DYNAMIC_CLASS( CMAboutDlg, wxDialog ) + +/*! + * CMAboutDlg event table definition + */ + +BEGIN_EVENT_TABLE( CMAboutDlg, wxDialog ) + +////@begin CMAboutDlg event table entries + EVT_BUTTON( ID_ABOUT_DLG_OK, CMAboutDlg::OnAboutDlgClick ) + +////@end CMAboutDlg event table entries + +END_EVENT_TABLE() + +/*! + * CMAboutDlg constructors + */ + +CMAboutDlg::CMAboutDlg( ) +{ +} + +CMAboutDlg::CMAboutDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ + Create(parent, id, caption, pos, size, style); +} + +/*! + * CMAboutDlg creator + */ + +bool CMAboutDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ +////@begin CMAboutDlg member initialisation + m_cmIcon = NULL; + m_html = NULL; +////@end CMAboutDlg member initialisation + +////@begin CMAboutDlg creation + SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + wxDialog::Create( parent, id, caption, pos, size, style ); + + CreateControls(); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + Centre(); +////@end CMAboutDlg creation + + // set logo on the dialog + wxBitmap bmp(cmake_logo); + m_cmIcon->SetBitmap(bmp); + + return TRUE; +} + +/*! + * Control creation for CMAboutDlg + */ + +void CMAboutDlg::CreateControls() +{ +////@begin CMAboutDlg content construction + CMAboutDlg* itemDialog1 = this; + + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + itemDialog1->SetSizer(itemBoxSizer2); + + wxFlexGridSizer* itemFlexGridSizer3 = new wxFlexGridSizer(1, 2, 0, 0); + itemFlexGridSizer3->AddGrowableRow(0); + itemFlexGridSizer3->AddGrowableCol(1); + itemBoxSizer2->Add(itemFlexGridSizer3, 1, wxGROW|wxALL, 5); + + wxBitmap m_cmIconBitmap(wxNullBitmap); + m_cmIcon = new wxStaticBitmap( itemDialog1, wxID_STATIC, m_cmIconBitmap, wxDefaultPosition, wxSize(32, 32), 0 ); + itemFlexGridSizer3->Add(m_cmIcon, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_TOP|wxLEFT|wxRIGHT|wxTOP, 5); + + m_html = new wxHtmlWindow( itemDialog1, ID_HTMLWINDOW, wxDefaultPosition, wxSize(500, 300), wxHW_SCROLLBAR_AUTO|wxNO_BORDER|wxHSCROLL|wxVSCROLL ); + itemFlexGridSizer3->Add(m_html, 1, wxGROW|wxGROW|wxRIGHT|wxTOP|wxBOTTOM, 5); + + wxButton* itemButton6 = new wxButton( itemDialog1, ID_ABOUT_DLG_OK, _("&Ok"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer2->Add(itemButton6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + +////@end CMAboutDlg content construction +} + +/*! + * Should we show tooltips? + */ + +bool CMAboutDlg::ShowToolTips() +{ + return TRUE; +} + +void CMAboutDlg::SetAboutText(const wxString &cmversion, const wxString &cmsversion, const wxArrayString &generators) +{ + // set HTML text in window + + wxString text = _("CMakeSetup - GUI Build System for CMake" + "CMakeSetup - GUI Build System for CMake" + "

Welcome to CMake! The cross-platform, open-source make system." + "CMake is used to control the software compilation process using simple platform and compiler independent configuration files. " + "CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. " + "Please go to http://www.cmake.org to learn more about CMake.

" + "CMakeSetup.exe is enhanced and ported by Jorgen Bodde using @WXV@. The original CMakeSetup.exe is " + "written by Bill Hoffman, Ken Martin, Brad King and Andy Cedilnik.

" + "Current CMakeSetup version is: @B@
" + "Current CMake build system is: @V@

" + "Current generators are supported:
" + "@G@

"); + + // compile list of generators in a bulleted list + wxString gens = _("
    "); + for(size_t i = 0; i < generators.Count(); i++) + gens << "
  • " << generators[i] << "
  • "; + gens << _("
"); + + // replace stuff + text.Replace(_("@V@"), cmversion, true); + text.Replace(_("@B@"), cmsversion, true); + text.Replace(_("@G@"), gens, true); + text.Replace(_("@WXV@"), wxVERSION_STRING, true); + + m_html->SetPage(text); + + // set color of HTML window to bg window + m_html->SetBackgroundColour(GetBackgroundColour()); +} + +/*! + * Get bitmap resources + */ + +wxBitmap CMAboutDlg::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin CMAboutDlg bitmap retrieval + return wxNullBitmap; +////@end CMAboutDlg bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon CMAboutDlg::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin CMAboutDlg icon retrieval + return wxNullIcon; +////@end CMAboutDlg icon retrieval +} +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ABOUT_DLG_OK + */ + +void CMAboutDlg::OnAboutDlgClick( wxCommandEvent& event ) +{ + Close(); +} + + diff --git a/Source/WXDialog/aboutdlg.h b/Source/WXDialog/aboutdlg.h new file mode 100644 index 000000000..da2d0665b --- /dev/null +++ b/Source/WXDialog/aboutdlg.h @@ -0,0 +1,117 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: aboutdlg.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _ABOUTDLG_H_ +#define _ABOUTDLG_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "aboutdlg.cpp" +#endif + +/*! + * Includes + */ + +////@begin includes +#include "wx/html/htmlwin.h" +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +class wxHtmlWindow; +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define ID_SOME_ABOUTDLG 10003 +#define SYMBOL_CMABOUTDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX +#define SYMBOL_CMABOUTDLG_TITLE _("About ...") +#define SYMBOL_CMABOUTDLG_IDNAME ID_SOME_ABOUTDLG +#define SYMBOL_CMABOUTDLG_SIZE wxSize(400, 300) +#define SYMBOL_CMABOUTDLG_POSITION wxDefaultPosition +#define ID_HTMLWINDOW 10000 +#define ID_ABOUT_DLG_OK 10005 +////@end control identifiers + +/*! + * Compatibility + */ + +#ifndef wxCLOSE_BOX +#define wxCLOSE_BOX 0x1000 +#endif +#ifndef wxFIXED_MINSIZE +#define wxFIXED_MINSIZE 0 +#endif + +/*! + * CMAboutDlg class declaration + */ + +class CMAboutDlg: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( CMAboutDlg ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + CMAboutDlg( ); + CMAboutDlg( wxWindow* parent, wxWindowID id = SYMBOL_CMABOUTDLG_IDNAME, const wxString& caption = SYMBOL_CMABOUTDLG_TITLE, const wxPoint& pos = SYMBOL_CMABOUTDLG_POSITION, const wxSize& size = SYMBOL_CMABOUTDLG_SIZE, long style = SYMBOL_CMABOUTDLG_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMABOUTDLG_IDNAME, const wxString& caption = SYMBOL_CMABOUTDLG_TITLE, const wxPoint& pos = SYMBOL_CMABOUTDLG_POSITION, const wxSize& size = SYMBOL_CMABOUTDLG_SIZE, long style = SYMBOL_CMABOUTDLG_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + void SetAboutText(const wxString &cmversion, const wxString &cmsversion, const wxArrayString &generators); + +////@begin CMAboutDlg event handler declarations + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_ABOUT_DLG_OK + void OnAboutDlgClick( wxCommandEvent& event ); + +////@end CMAboutDlg event handler declarations + +////@begin CMAboutDlg member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end CMAboutDlg member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + +////@begin CMAboutDlg member variables + wxStaticBitmap* m_cmIcon; + wxHtmlWindow* m_html; +////@end CMAboutDlg member variables +}; + +#endif + // _ABOUTDLG_H_ diff --git a/Source/WXDialog/app_resources.cpp b/Source/WXDialog/app_resources.cpp new file mode 100644 index 000000000..6d1203c46 --- /dev/null +++ b/Source/WXDialog/app_resources.cpp @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: app_resources.cpp,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "app_resources.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include "app_resources.h" + +////@begin XPM images +////@end XPM images + +/*! + * Resource functions + */ + +////@begin AppResources resource functions +/*! + * Menu creation function for ID_MENU + */ + +wxMenu* AppResources::CreatePopupMenu() +{ + wxMenu* itemMenu1 = new wxMenu; + itemMenu1->Append(ID_CACHE_IGNORE, _("&Ignore cache entry"), _("Ignores the value of the current cache entry"), wxITEM_NORMAL); + itemMenu1->Append(ID_CACHE_DELETE, _("&Delete cache entry"), _("Deletes the current cache entry (reverts on next configure)"), wxITEM_NORMAL); + itemMenu1->AppendSeparator(); + itemMenu1->Append(ID_CACHE_BROWSE, _("&Browse ..."), _T(""), wxITEM_NORMAL); + return itemMenu1; +} + +////@end AppResources resource functions + +/*! + * Get bitmap resources + */ + +wxBitmap AppResources::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin AppResources bitmap retrieval + return wxNullBitmap; +////@end AppResources bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon AppResources::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin AppResources icon retrieval + return wxNullIcon; +////@end AppResources icon retrieval +} diff --git a/Source/WXDialog/app_resources.h b/Source/WXDialog/app_resources.h new file mode 100644 index 000000000..6fb814806 --- /dev/null +++ b/Source/WXDialog/app_resources.h @@ -0,0 +1,60 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: app_resources.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _APP_RESOURCES_H_ +#define _APP_RESOURCES_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "app_resources.cpp" +#endif + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define ID_CACHE_IGNORE 10051 +#define ID_CACHE_DELETE 10052 +#define ID_CACHE_BROWSE 10053 +////@end control identifiers + +class AppResources +{ +public: + AppResources() {} + +/*! + * Resource functions + */ + +////@begin AppResources resource functions + /// Menu creation function for ID_MENU + static wxMenu* CreatePopupMenu(); + + /// Retrieves bitmap resources + static wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + static wxIcon GetIconResource( const wxString& name ); +////@end AppResources resource functions + +}; + +#endif + // _APP_RESOURCES_H_ diff --git a/Source/WXDialog/bin/FindUPX.cmake b/Source/WXDialog/bin/FindUPX.cmake new file mode 100644 index 000000000..fc9113dc5 --- /dev/null +++ b/Source/WXDialog/bin/FindUPX.cmake @@ -0,0 +1,18 @@ +# +# Find the UPX packer program +# +# UPX_PROGRAM_PATH The full path to the UPX command (or UPX_PROGRAM_PATH-NOTFOUND when not found) +# UPX_FOUND Is set to 1 when upx is found + +FIND_PATH(UPX_PROGRAM_PATH upx.exe + ${UPX_DIR} + $ENV{UPX_DIR} + "$ENV{ProgramFiles}/upx" + ) + +# when found, note this as target +IF(UPX_PROGRAM_PATH) + SET(UPX_FOUND 1) +ELSE(UPX_PROGRAM_PATH) + SET(UPX_FOUND 0) +ENDIF(UPX_PROGRAM_PATH) diff --git a/Source/WXDialog/bin/FindwxW.cmake b/Source/WXDialog/bin/FindwxW.cmake new file mode 100644 index 000000000..f88eb0e3f --- /dev/null +++ b/Source/WXDialog/bin/FindwxW.cmake @@ -0,0 +1,438 @@ + +MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") + +# +# FindwxW.cmake +# v1.01 2005-05-27 +# Jerry Fath 2005 +# Based on work by Jorgen Bodde +# +# This module finds if wxWindows is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix +# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix ) +# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows +# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows +# WXWIDGETS_DEFINITIONS = all flags of wxWindows + + +# NOTE: This module REQUIRES that an environment variable named WXWIN +# be set to the base wxWidgets installation directory. +# Under Unix, you must also set and environment variable named WXWINCFG +# to the name of the active build subdirectory (eg buildgtk). +# + +# These variable should be set before including this module +# +# WXWIDGETS_FILE_VERSION (26) +# WXWIDGETS_VERSION (2.6) +# + +# +# Set WX_USE vars in CMakeLists if you don't want to default to all off +# +SET(WXWIDGETS_USE_DEBUG ${WXW_USE_DEBUG} CACHE BOOL "Use Debug versions of wxWindows libraries") +SET(WXWIDGETS_USE_UNICODE ${WXW_USE_UNICODE} CACHE BOOL "Use Unicode versions of wxWindows libraries") +SET(WXWIDGETS_USE_SHARED ${WXW_USE_SHARED} CACHE BOOL "Use shared versions of wxWindows libraries") +SET(WXWIDGETS_USE_UNIV ${WXW_USE_UNIV} CACHE BOOL "Use Universal versions of wxWindows libraries") +SET(WXWIDGETS_USE_MONO ${WXW_USE_MONO} CACHE BOOL "Use monolithic versions of wxWindows libraries") + +# +# Style can be non-Win32 even under Windows when using MinGW +# +IF(WIN32) + SET(WIN32_STYLE_FIND 1) +ENDIF(WIN32) +IF(MINGW) + SET(WIN32_STYLE_FIND 0) + SET(UNIX_STYLE_FIND 1) +ENDIF(MINGW) +IF(UNIX) + SET(UNIX_STYLE_FIND 1) +ENDIF(UNIX) + +# +# Versions should be set before this file is included. If not, +# default to 2.6 +# +IF(WXW_FILE_VERSION) + SET( WXVERSIONSUFFIX ${WXW_FILE_VERSION}) +ELSE(WXW_FILE_VERSION) + SET( WXVERSIONSUFFIX "26") +ENDIF(WXW_FILE_VERSION) + +IF(WXW_VERSION) + SET( WXVERSION ${WXW_VERSION}) +ELSE(WXW_VERSION) + SET( WXVERSION "2.6") +ENDIF(WXW_VERSION) + +# +# Find the base wxWidgets install path +# NOTE: WXWIN must be set +# +FIND_PATH( WXWIDGETS_INSTALL_PATH + wx-config.in + $ENV{WXWIN} +) +IF(WXWIDGETS_INSTALL_PATH STREQUAL "WXWIDGETS_INSTALL_PATH-NOTFOUND") + MESSAGE( FATAL_ERROR "FATAL_ERROR: wx-config.in NOT found. Set WXWIN") +ENDIF(WXWIDGETS_INSTALL_PATH STREQUAL "WXWIDGETS_INSTALL_PATH-NOTFOUND") +SET(WXWIDGETS_CONFIG_PATH ${WXWIDGETS_INSTALL_PATH}) + +# +# Find library path (platform specific) +# +IF( WIN32_STYLE_FIND ) + + IF( WXWIDGETS_USE_SHARED ) + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_INSTALL_PATH}/lib/vc_dll" ) + ELSE( WXWIDGETS_USE_SHARED ) + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_INSTALL_PATH}/lib/vc_lib" ) + ENDIF( WXWIDGETS_USE_SHARED ) + SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) + +ELSE( WIN32_STYLE_FIND ) + IF (UNIX_STYLE_FIND) + + # + # Unix uses a config specific directory under the install path + # specified in the WXWINCFG environment variable. + # + SET(WXWIDGETS_CONFIG_PATH "${WXWIDGETS_INSTALL_PATH}/$ENV{WXWINCFG}") + + # + # Check wether wx-config can be found + # + SET(WX_WXCONFIG_EXECUTABLE "${WXWIDGETS_CONFIG_PATH}/wx-config" ) + IF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) + # we really need wx-config... + MESSAGE(FATAL_ERROR "FATAL_ERROR: Cannot find wx-config. Set WXWIN and WXWINCFG environment variables.") + ENDIF(NOT EXISTS ${WX_WXCONFIG_EXECUTABLE}) + + SET(WXWIDGETS_LIB_PATH "${WXWIDGETS_CONFIG_PATH}/lib" ) + SET( WXWIDGETS_LINK_DIRECTORIES ${WXWIDGETS_LIB_PATH} ) + + ELSE(UNIX_STYLE_FIND) + MESSAGE(FATAL_ERROR "FATAL_ERROR: FindwxWindows.cmake: Platform unsupported by FindwxW.cmake. It's neither WIN32 nor UNIX") + ENDIF(UNIX_STYLE_FIND) +ENDIF( WIN32_STYLE_FIND ) + +# +# Check options against installed libraries +# +SET(WX_CONFIG_ARGS "") +SET( LIBRARYWANT "${WXWIDGETS_LIB_PATH}/msw" ) + +IF( WXWIDGETS_USE_UNIV ) + SET( LIBRARYWANT "${LIBRARYWANT}univ") + SET( PFUNIV "univ" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=yes") +ELSE( WXWIDGETS_USE_UNIV ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --universal=no") +ENDIF( WXWIDGETS_USE_UNIV ) + +IF( WXWIDGETS_USE_UNICODE ) + SET( LIBRARYWANT "${LIBRARYWANT}u" ) + SET( PFUNICODE "u" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=yes") +ELSE( WXWIDGETS_USE_UNICODE ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --unicode=no") +ENDIF( WXWIDGETS_USE_UNICODE ) + +IF( WXWIDGETS_USE_DEBUG ) + SET( LIBRARYWANT "${LIBRARYWANT}d" ) + SET( PFDEBUG "d" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=yes") +ELSE( WXWIDGETS_USE_DEBUG ) + SET( PFDEBUG "" ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --debug=no") +ENDIF( WXWIDGETS_USE_DEBUG ) + +IF( WXWIDGETS_USE_SHARED ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=no") +ELSE( WXWIDGETS_USE_SHARED ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS} --static=yes") +ENDIF( WXWIDGETS_USE_SHARED ) + +# Not sure how to check this yet!!!!! +IF( WXWIDGETS_USE_MONO ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") +ELSE( WXWIDGETS_USE_MONO ) + SET(WX_CONFIG_ARGS "${WX_CONFIG_ARGS}") +ENDIF( WXWIDGETS_USE_MONO ) + +SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS} --libs") + +# +# Platform specific method for testing installed wx Builds +# +IF( WIN32_STYLE_FIND ) + + IF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) + MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") + ENDIF( NOT EXISTS "${LIBRARYWANT}/wx/setup.h" ) + +ELSE( WIN32_STYLE_FIND ) + + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS ${WX_CONFIG_ARGS_LIBS} + OUTPUT_VARIABLE WXWIDGETS_LIBRARIES + RETURN_VALUE BAD_WXCONFIG ) + IF(BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: WXWidgets config NOT found ${WX_CONFIG_ARGS}") + ENDIF(BAD_WXCONFIG) + +ENDIF( WIN32_STYLE_FIND ) + +# +# Get compiler flags +# +IF( WIN32_STYLE_FIND ) + # Not used for Windows + SET( WXWIDGETS_CXX_FLAGS "" ) +ELSE( WIN32_STYLE_FIND ) + # + # Get CXXFLAGS from wx-config + # + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS "--cxxflags" + OUTPUT_VARIABLE WXWIDGETS_CXX_FLAGS + RETURN_VALUE BAD_WXCONFIG ) + IF (BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: wx-config --cxxflags returned an error") + ENDIF (BAD_WXCONFIG) +ENDIF( WIN32_STYLE_FIND ) + +# +# Find include directories (platform specific) +# +IF( WIN32_STYLE_FIND ) + # + # Set non-build specific include directories + # + SET ( WX_INCLUDE_PATH ${WXWIDGETS_INSTALL_PATH}/include ) + SET ( WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_PATH} ) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${WXWIDGETS_INCLUDE_DIR}/../contrib/include ) + # + # Append the build specific include dir for wx/setup.h: + # + IF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) + SET( WX_INCLUDE_LIB_PATH ${LIBRARYWANT}) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${LIBRARYWANT} ) + ELSE ( EXISTS ${LIBRARYWANT}/wx/setup.h ) + SET( WX_INCLUDE_LIB_PATH, "") + MESSAGE(SEND_ERROR "ERROR: Can't find ${LIBRARYWANT}/wx/setup.h") + ENDIF ( EXISTS ${LIBRARYWANT}/wx/setup.h ) +ELSE( WIN32_STYLE_FIND ) + + # Pull out -I options + # evaluate wx-config output to separate include dirs + SET(WX_INCLUDE_DIR ${WXWIDGETS_CXX_FLAGS}) + # extract include dirs (-I) + # use regular expression to match wildcard equivalent "-I*" + # with is a space or a semicolon + STRING(REGEX MATCHALL "[-][I]([^ ;])+" WX_INCLUDE_DIRS_WITH_PREFIX "${WX_INCLUDE_DIR}" ) + # remove prefix -I because we need the pure directory + IF(WX_INCLUDE_DIRS_WITH_PREFIX) + STRING(REGEX REPLACE "[-][I]" ";" WXWIDGETS_INCLUDE_DIR ${WX_INCLUDE_DIRS_WITH_PREFIX} ) + ENDIF(WX_INCLUDE_DIRS_WITH_PREFIX) + # replace space separated string by semicolon separated vector + SEPARATE_ARGUMENTS(WXWIDGETS_INCLUDE_DIR) + # Remove the -I options from the CXX_FLAGS no need to duplicate + STRING(REGEX REPLACE "[-][I]([^ ;])+" "" WXWIDGETS_CXX_FLAGS ${WXWIDGETS_CXX_FLAGS} ) + + # + # Find XWindows + # + IF( NOT CYGWIN OR MINGW ) + INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) + SET( WXWIDGETS_INCLUDE_DIR ${WXWIDGETS_INCLUDE_DIR} ${X11_INCLUDE_DIR} ) + ENDIF( NOT CYGWIN OR MINGW ) +ENDIF( WIN32_STYLE_FIND ) + +# +# Find library list (platform specific) +# +IF( WIN32_STYLE_FIND ) + # + #Misc vars used to build lib names + # + SET( PFLIBEXT ${CMAKE_STATIC_LIBRARY_SUFFIX} ) + SET( WXPF "${WXPF}${WXVERSIONSUFFIX}" ) + SET( PFVERSION ${WXVERSIONSUFFIX} ) + SET( PFCOMPILER "" ) + + # + # Build the libraries list + # + SET( WXWIDGETS_LIBRARIES "" ) + SET( WXWIDGETS_MULTI_LIBRARIES "" ) + SET( WXWIDGETS_MONO_LIBRARIES "" ) + + SET(WX_LIBRARIES ${WX_LIBRARIES} comctl32${PFLIBEXT} wsock32${PFLIBEXT} rpcrt4${PFLIBEXT}) + #MESSAGE( "WX_LIBRARIES: ${WX_LIBRARIES}") + + #start filling library string with needed libraries for the choosen configuration. + SET( WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WX_LIBRARIES} ) + + SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) + SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} + wxbase${WXPF}${PFCOMPILER}${PFLIBEXT} + wxbase${WXPF}_net${PFCOMPILER}${PFLIBEXT} wxbase${WXPF}_xml${PFCOMPILER}${PFLIBEXT} + ) + + SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) + SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} + wxmsw${WXPF}_adv${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_html${PFCOMPILER}${PFLIBEXT} + wxmsw${WXPF}_xrc${PFCOMPILER}${PFLIBEXT} +# wxmsw${WXPF}_media${PFCOMPILER}${PFLIBEXT} + ) + + IF( NOT WXWIDGETS_USE_SHARED ) + SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) + # ODBC is not needed + #SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} wxbase${WXPF}_odbc${PFCOMPILER}${PFLIBEXT} ) + + SET( WXPF "${PFVERSION}${PFUNICODE}${PFDEBUG}" ) + #SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} + # wxmsw${WXPF}_dbgrid${PFLIBEXT} + # wxmsw${WXPF}_gl${PFCOMPILER}${PFLIBEXT} + #) + ENDIF( NOT WXWIDGETS_USE_SHARED ) + + IF ( WXWIDGETS_USE_UNIV ) + SET( WXPF "${PFUNIV}${PFVERSION}${PFUNICODE}${PFDEBUG}" ) + SET(WXWIDGETS_MULTI_LIBRARIES ${WXWIDGETS_MULTI_LIBRARIES} + wxmsw${WXPF}_core${PFCOMPILER}${PFLIBEXT} + ) + ENDIF ( WXWIDGETS_USE_UNIV ) + + SET(WXWIDGETS_MONO_LIBRARIES ${WXWIDGETS_MONO_LIBRARIES} + wxmsw${WXPF}${PFCOMPILER}${PFLIBEXT} + ) + + IF ( WXWIDGETS_USE_MONO ) + SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WXWIDGETS_MONO_LIBRARIES}) + ELSE ( WXWIDGETS_USE_MONO ) + SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ${WXWIDGETS_MULTI_LIBRARIES}) + ENDIF ( WXWIDGETS_USE_MONO ) + + SET( WXPF "${PFUNICODE}${PFDEBUG}" ) + SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} + wxregex${WXPF}.lib + ) + + SET( WXPF "${PFDEBUG}" ) + SET(WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} + wxexpat${WXPF}.lib + wxpng${WXPF}.lib + wxtiff${WXPF}.lib + wxjpeg${WXPF}.lib + wxzlib${WXPF}.lib + ) + +ELSE( WIN32_STYLE_FIND ) + # + # Get Library list from wx-config + # + # do we need additionial wx GL stuff like GLCanvas ? + IF(WXWIDGETS_USE_GL) + SET(WX_CONFIG_ARGS_LIBS "${WX_CONFIG_ARGS_LIBS} --gl-libs" ) + ENDIF(WXWIDGETS_USE_GL) + + EXEC_PROGRAM(${WX_WXCONFIG_EXECUTABLE} + ARGS ${WX_CONFIG_ARGS_LIBS} + OUTPUT_VARIABLE WXWIDGETS_LIBRARIES + RETURN_VALUE BAD_WXCONFIG ) + IF (BAD_WXCONFIG) + MESSAGE( SEND_ERROR "ERROR: Specified WXWidgets config NOT found") + ENDIF (BAD_WXCONFIG) + + # Pull out the -L options + # evaluate wx-config output to separate linker flags and linkdirs for + # rpath: + SET(WX_CONFIG_LIBS ${WXWIDGETS_LIBRARIES}) + # extract linkdirs (-L) for rpath + # use regular expression to match wildcard equivalent "-L*" + # with is a space or a semicolon + STRING(REGEX MATCHALL "[-][L]([^ ;])+" WX_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" ) + #MESSAGE("DBG WX_LINK_DIRECTORIES_WITH_PREFIX=${WX_LINK_DIRECTORIES_WITH_PREFIX}") + # remove prefix -L because we need the pure directory for LINK_DIRECTORIES + # replace -L by ; because the separator seems to be lost otherwise (bug or + # feature?) + IF(WX_LINK_DIRECTORIES_WITH_PREFIX) + STRING(REGEX REPLACE "[-][L]" ";" WXWIDGETS_LINK_DIRECTORIES ${WX_LINK_DIRECTORIES_WITH_PREFIX} ) + #MESSAGE("DBG WXWIDGETS_LINK_DIRECTORIES=${WXWIDGETS_LINK_DIRECTORIES}") + ENDIF(WX_LINK_DIRECTORIES_WITH_PREFIX) + # replace space separated string by semicolon separated vector to make it + # work with LINK_DIRECTORIES + SEPARATE_ARGUMENTS(WXWIDGETS_LINK_DIRECTORIES) + # Remove -L options from lib list, no need to duplicate + STRING(REGEX REPLACE "[-][L]([^ ;])+" "" WXWIDGETS_LIBRARIES ${WXWIDGETS_LIBRARIES} ) + + +ENDIF( WIN32_STYLE_FIND ) + + +# +# Find wx.rc +# +SET( WXWIDGETS_RC ${WXWIDGETS_INSTALL_PATH}/include/wx/msw/wx.rc ) +IF( NOT WIN32_STYLE_FIND ) + IF( NOT CYGWIN OR MINGW ) + SET( WXWIDGETS_RC "" ) + ENDIF( NOT CYGWIN OR MINGW ) +ENDIF( NOT WIN32_STYLE_FIND ) + +# +# Set preprocessor defs +# +STRING(TOUPPER ${CMAKE_SYSTEM_NAME} WX_SYSNAME) +SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} "-D${WX_SYSNAME}" ) + +IF(WIN32_STYLE_FIND) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWIN32 -D__WXMSW__ ) +ELSE(WIN32_STYLE_FIND) + IF( CYGWIN ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall ) + ENDIF( CYGWIN ) +ENDIF(WIN32_STYLE_FIND) + +IF( WXWIDGETS_USE_SHARED ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DWXUSINGDLL ) +ENDIF( WXWIDGETS_USE_SHARED ) + +IF( WXWIDGETS_USE_DEBUG ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -D_DEBUG_ -D__WXDEBUG__ -DWXDEBUG=1 ) +ENDIF( WXWIDGETS_USE_DEBUG ) + +IF ( WXWIDGETS_USE_UNICODE ) + SET( WXWIDGETS_DEFINITIONS ${WXWIDGETS_DEFINITIONS} -DwxUSE_UNICODE ) +ENDIF ( WXWIDGETS_USE_UNICODE ) + +# +# Set the WXWIDGETS_FOUND var +# +IF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) + SET(WXWIDGETS_FOUND 1) +ENDIF(WXWIDGETS_LIBRARIES AND WXWIDGETS_INCLUDE_DIR) + +# +# Mark advanced vars +# +MARK_AS_ADVANCED(WXWIDGETS_INSTALL_PATH) + +# +# Log results +# +FILE( WRITE "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_FOUND: ${WXWIDGETS_FOUND}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_LIBRARIES: ${WXWIDGETS_LIBRARIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_CXX_FLAGS: ${WXWIDGETS_CXX_FLAGS}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_INCLUDE_DIR: ${WXWIDGETS_INCLUDE_DIR}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/findwxw.log" "WXWIDGETS_DEFINITIONS: ${WXWIDGETS_DEFINITIONS}\n" ) diff --git a/Source/WXDialog/bin/FindwxWin.cmake b/Source/WXDialog/bin/FindwxWin.cmake new file mode 100644 index 000000000..fdeee37dd --- /dev/null +++ b/Source/WXDialog/bin/FindwxWin.cmake @@ -0,0 +1,469 @@ + + +MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") + + +##--------------------------------------------------------------------------- +## $RCSfile: FindwxWin.cmake,v $ +## $Source: /cvsroot/CMake/CMake/Source/WXDialog/bin/FindwxWin.cmake,v $ +## $Revision: 1.5 $ +## $Date: 2006-07-21 19:43:19 $ +##--------------------------------------------------------------------------- +## Author: Jorgen Bodde +## Copyright: (c) Jorgen Bodde +## License: wxWidgets License +##--------------------------------------------------------------------------- +## +## This module finds if wxWindows 2.5.x / 2.6.x is installed and determines +## where the include files and seperate libraries are. It also determines what +## the name of the library is. +## +## WARNING: Monolithic build support is not present here (it is not desired +## by wxWidgets anyway). Also the shared DLL option is not yet present. +## +## Current working combinations are; +## - Static debug and release libs +## - Static unicode debug and release libs +## - Static universal unicode debug and release libs +## - Static unicode universal unicode debug and release libs +## +## +## The linux part of this CMake file is unaltered and will always use because of +## 'wx-config'. The linux part will not use the WX_LIB_IGNORE vars because of +## the way wxWidgets is built and configured. +## +## This code sets the following variables: +## +## ------------------------------------------------------------------ +## +## WXWINDOWS_FOUND = system has WxWindows (in desired config. build) +## +## WXWINDOWS_LIBRARIES = full path to the wxWindows libraries +## on Unix/Linux with additional linker flags from +## "wx-config --libs" +## +## CMAKE_WXWINDOWS_CXX_FLAGS = Unix compiler flags for wxWindows, essentially +## "`wx-config --cxxflags`" +## +## WXWINDOWS_INCLUDE_DIR = where to find headers "wx/wx.h" "wx/setup.h" +## +## WXWINDOWS_LINK_DIRECTORIES = link directories, useful for rpath on Unix +## +## WXWINDOWS_DEFINITIONS = extra defines +## + +IF( WIN32 ) + + ## + ## Find root path of wxWidgets, either in the registry or as environment var + ## + + SET (WXWINDOWS_POSSIBLE_ROOT_PATHS + $ENV{WXWIN} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\wxWindows_is1;Inno Setup: App Path]" ) + + FIND_PATH(WXWIDGETS_PATH_ROOT include/wx/wx.h + ${WXWINDOWS_POSSIBLE_ROOT_PATHS} ) + + SET(WXWINDOWS_FOUND 0) + IF(NOT WXWIDGETS_PATH_ROOT) + MESSAGE(SEND_ERROR "wxWidgets root is not found. Please point out the wxWidgets root using the WXWIN environment var") + ENDIF(NOT WXWIDGETS_PATH_ROOT) + + OPTION(WX_USE_DEBUG_ONLY "Only attempt to setup the debug libraries, ignore the release libraries." ON) + + ## Find a multi library path, this is the path where the seperate libs are located + SET(WXMSW_SETUPH "wx/setup.h") + + SET(WXDEBUG_POSTFIX "") + IF(WX_USE_DEBUG_ONLY) + SET(WXDEBUG_POSTFIX "d") + ENDIF(WX_USE_DEBUG_ONLY) + + ## Try the VS compilation path + SET(WXWINDOWS_POSSIBLE_SETUPH + "${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXDEBUG_POSTFIX}/${WXMSW_SETUPH}") + + ## Try borland and VS7 path + IF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + SET(WXWINDOWS_POSSIBLE_MULTILIB_PATHS + "${WXWIDGETS_PATH_ROOT}/lib/vc_lib") + ELSE(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + ## Try the borland path + SET(WXWINDOWS_POSSIBLE_SETUPH + "${WXWIDGETS_PATH_ROOT}/lib/bcc_lib/msw${WXDEBUG_POSTFIX}/${WXMSW_SETUPH}") + IF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + SET(WXWINDOWS_POSSIBLE_MULTILIB_PATHS + "${WXWIDGETS_PATH_ROOT}/lib/bcc_lib") + ELSE(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + MESSAGE(SEND_ERROR "wxWidgets libraries are not found.") + ENDIF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + ENDIF(EXISTS ${WXWINDOWS_POSSIBLE_SETUPH}) + + ## Ask user what config should be used, after asking, verify if it will work + OPTION(WX_LINK_AGAINST_UNIVERSAL "Use wxWidgets universal builds" OFF) + OPTION(WX_LINK_AGAINST_UNICODE "Use wxWidgets unicode builds" OFF) + + SET(WXMSW_SETUPH "wx/setup.h") + + SET(WX_RELEASE 0) + SET(WX_DEBUG 0) + + SET(WX_RELEASE_UNI 0) + SET(WX_DEBUG_UNI 0) + + SET(WX_RELEASE_UNIV 0) + SET(WX_DEBUG_UNIV 0) + + SET(WX_RELEASE_UNIV_UNI 0) + SET(WX_DEBUG_UNIV_UNI 0) + + SET(WX_FOUND_VALID_CONF 0) + + ## Scan for wxWidgets static multilib release + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_RELEASE 1) + SET(WX_RELEASE_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/msw/${WXMSW_SETUPH}") + + ## Scan for wxWidgets static multilib debug + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_DEBUG 1) + SET(WX_DEBUG_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswd/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib unicode + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_RELEASE_UNI 1) + SET(WX_RELEASE_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib unicode debug + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswud/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_DEBUG_UNI 1) + SET(WX_DEBUG_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswu/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswud/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib universal + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_RELEASE_UNIV 1) + SET(WX_RELEASE_UNIV_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswuniv/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib universal debug + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_DEBUG_UNIV 1) + SET(WX_DEBUG_UNIV_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivd/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib universal unicode + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_RELEASE_UNIV_UNI 1) + SET(WX_RELEASE_UNIV_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivu/${WXMSW_SETUPH}") + + ## Scan for wxWidgets multilib universal unicode debug + IF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH}") + SET(WX_FOUND_VALID_CONF 1) + SET(WX_DEBUG_UNIV_UNI 1) + SET(WX_DEBUG_UNIV_UNI_SETUPH ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH} ) + ENDIF(EXISTS "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/mswunivud/${WXMSW_SETUPH}") + + ## If no valid config is found, mention this + IF(NOT WX_FOUND_VALID_CONF) + MESSAGE(SEND_ERROR "Did not found a valid setup.h for any library. Please compile your wxWidgets libraries first") + ENDIF(NOT WX_FOUND_VALID_CONF) + + ## Search for wx version automatically + SET (WXVERSION "") + + SET(WXLIBS + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25d.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25u.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase25ud.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25d_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25u_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv25ud_core.lib" ) + + FOREACH(WXLIB ${WXLIBS}) + IF(EXISTS "${WXLIB}") + SET(WXVERSION "25") + ENDIF(EXISTS "${WXLIB}") + ENDFOREACH(WXLIB ${WXLIBS}) + + IF(NOT WXLIB) + SET(WXLIBS + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26d.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26u.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxbase26ud.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26d_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26u_core.lib" + "${WXWINDOWS_POSSIBLE_MULTILIB_PATHS}/wxmswuniv26ud_core.lib") + + FOREACH(WXLIB ${WXLIBS}) + IF(EXISTS "${WXLIB}") + SET(WXVERSION "26") + ENDIF(EXISTS "${WXLIB}") + ENDFOREACH(WXLIB ${WXLIBS}) + ENDIF(NOT WXLIB) + + IF(NOT WXVERSION) + MESSAGE(SEND_ERROR "There are no suitable wxWidgets libraries found (monolithic builds are no longer supported") + ENDIF(NOT WXVERSION) + + ## + ## Verify unicode universal builds + ## + IF(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + IF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV AND NOT WX_RELEASE_UNIV_UNI AND NOT WX_DEBUG_UNIV_UNI) + MESSAGE(SEND_ERROR "Not all wx${WXVERSION} universal unicode libraries are found (check debug and release builds)") + ENDIF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV AND NOT WX_RELEASE_UNIV_UNI AND NOT WX_DEBUG_UNIV_UNI) + ELSE(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + ## + ## Verify unicode builds + ## + IF(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + IF(NOT WX_RELEASE_UNI AND NOT WX_DEBUG_UNI) + MESSAGE(SEND_ERROR "Not all wx${WXVERSION} unicode libraries are found (check debug and release builds)") + ENDIF(NOT WX_RELEASE_UNI AND NOT WX_DEBUG_UNI) + ELSE(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + ## + ## Verify universal builds + ## + IF(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) + IF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV) + MESSAGE(SEND_ERROR "Not all wx${WXVERSION} universal libraries are found (check debug and release builds)") + ENDIF(NOT WX_RELEASE_UNIV AND NOT WX_DEBUG_UNIV) + ELSE(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) + ## + ## Must be normal build now + ## + IF(NOT WX_RELEASE AND NOT WX_DEBUG) + MESSAGE(SEND_ERROR "Not all wx${WXVERSION} libraries are found (check debug and release builds)") + ENDIF(NOT WX_RELEASE AND NOT WX_DEBUG) + ENDIF(WX_LINK_AGAINST_UNIVERSAL AND NOT WX_LINK_AGAINST_UNICODE) + ENDIF(NOT WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + ENDIF(WX_LINK_AGAINST_UNIVERSAL AND WX_LINK_AGAINST_UNICODE) + + ## Prepare the representation for the library + IF(WX_LINK_AGAINST_UNICODE) + SET(WXLIB_POST "u") + ELSE(WX_LINK_AGAINST_UNICODE) + SET(WXLIB_POST "") + ENDIF(WX_LINK_AGAINST_UNICODE) + + ## Prepare for universal presentation + IF(WX_LINK_AGAINST_UNIVERSAL) + SET(WXLIB_UNIV "univ") + ELSE(WX_LINK_AGAINST_UNIVERSAL) + SET(WXLIB_UNIV "") + ENDIF(WX_LINK_AGAINST_UNIVERSAL) + + FIND_PATH(WXWINDOWS_INCLUDE_DIR_SETUPH wx/setup.h + ${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXLIB_UNIV}${WXLIB_POST} + ${WXWIDGETS_PATH_ROOT}/lib/vc_lib/msw${WXLIB_UNIV}${WXLIB_POST}d ) + + ## Find setup.h belonging to multi libs + SET(WXWINDOWS_LINK_DIRECTORIES + ${WXWINDOWS_POSSIBLE_MULTILIB_PATHS} ) + + ## Append all multi libs + SET (WXWINDOWS_STATIC_RELEASE_LIBS + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_gl.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_xrc.lib + optimized wxbase${WXVERSION}${WXLIB_POST}_xml.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_qa.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_html.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_dbgrid.lib + optimized wxbase${WXVERSION}${WXLIB_POST}_odbc.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_media.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_adv.lib + optimized wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}_core.lib + optimized wxbase${WXVERSION}${WXLIB_POST}_net.lib + optimized wxbase${WXVERSION}${WXLIB_POST}.lib + optimized wxexpat.lib + optimized wxtiff.lib + optimized wxjpeg.lib + optimized wxpng.lib + optimized wxzlib.lib + optimized wxregex${WXLIB_POST}.lib ) + + SET (WXWINDOWS_STATIC_DEBUG_LIBS + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_gl.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_xrc.lib + debug wxbase${WXVERSION}${WXLIB_POST}d_xml.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_qa.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_html.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_dbgrid.lib + debug wxbase${WXVERSION}${WXLIB_POST}d_odbc.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_media.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_adv.lib + debug wxmsw${WXLIB_UNIV}${WXVERSION}${WXLIB_POST}d_core.lib + debug wxbase${WXVERSION}${WXLIB_POST}d_net.lib + debug wxbase${WXVERSION}${WXLIB_POST}d.lib + debug wxexpatd.lib + debug wxtiffd.lib + debug wxjpegd.lib + debug wxpngd.lib + debug wxzlibd.lib + debug wxregex${WXLIB_POST}d.lib ) + + ## Add the common libraries to the big list + SET(CMAKE_WXWINDOWS_COMMON_LIBRARIES + winmm + comctl32 + rpcrt4 + wsock32 ) + + ## Set wxWidgets library in WXWINDOWS_LIBRARIES + SET(WXWINDOWS_LIBRARIES + ${CMAKE_WXWINDOWS_COMMON_LIBRARIES} + ${WXWINDOWS_STATIC_DEBUG_LIBS} + ${WXWINDOWS_STATIC_RELEASE_LIBS} ) + + ## Find include directory + SET (WXWINDOWS_POSSIBLE_INCLUDE_PATHS + "${WXWIDGETS_PATH_ROOT}/include" ) + + FIND_PATH(WXWIDGETS_INCLUDE_DIR wx/wx.h + ${WXWINDOWS_POSSIBLE_INCLUDE_PATHS} ) + + ## Blank the setup.h dir when this is not found + IF (NOT WXWINDOWS_INCLUDE_DIR_SETUPH) + SET(WXWINDOWS_INCLUDE_DIR_SETUPH "") + ENDIF (NOT WXWINDOWS_INCLUDE_DIR_SETUPH) + + ## Set include paths + SET(WXWINDOWS_INCLUDE_DIR + ${WXWIDGETS_INCLUDE_DIR} + ${WXWINDOWS_INCLUDE_DIR_SETUPH} ) + + IF(WX_LINK_AGAINST_UNICODE) + SET(WX_UNICODE_FLAGS " -DUNICODE=1" ) + ELSE(WX_LINK_AGAINST_UNICODE) + SET(WX_UNICODE_FLAGS "" ) + ENDIF(WX_LINK_AGAINST_UNICODE) + + SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}${WX_UNICODE_FLAGS} -D__WXDEBUG__ -D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1") + + SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}${WX_UNICODE_FLAGS} -D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1" ) + + ## TODO: Once these tags work, this is more efficient + ##ADD_DEFINITIONS(debug ) + ##ADD_DEFINITIONS(-D__WXMSW__ -DWINVER=0x0400 -DwxUSE_BASE=1 ) + + MARK_AS_ADVANCED( + WXWIDGETS_INCLUDE_DIR + WXWIDGETS_PATH_MONOLIB_DEBUG + WXWIDGETS_PATH_MONOLIB_RELEASE + WXWIDGETS_PATH_ROOT + WXWINDOWS_INCLUDE_DIR_SETUPH ) + + IF(WXWINDOWS_LINK_DIRECTORIES AND WXWINDOWS_LIBRARIES AND WXWINDOWS_INCLUDE_DIR) + SET(WXWINDOWS_FOUND 1) + ENDIF(WXWINDOWS_LINK_DIRECTORIES AND WXWINDOWS_LIBRARIES AND WXWINDOWS_INCLUDE_DIR) + +ELSE( WIN32 ) + + FIND_PROGRAM( CMAKE_WX_CONFIG wx-config ../wx/bin ../../wx/bin ) + IF(CMAKE_WX_CONFIG) + SET(WXWINDOWS_FOUND 1) + # run the config program to get cxxflags + EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --cxxflags OUTPUT_VARIABLE + CMAKE_WX_CXX_FLAGS RETURN_VALUE RET1) + # run the config program to get the libs + EXEC_PROGRAM(${CMAKE_WX_CONFIG} ARGS --libs OUTPUT_VARIABLE + WXWINDOWS_LIBRARIES_TMP RETURN_VALUE RET2) + # for libraries break things up into a ; separated variable + SEPARATE_ARGUMENTS(WXWINDOWS_LIBRARIES_TMP) + SET(LAST_FRAME 0) + # now put the stuff back into WXWINDOWS_LIBRARIES + # but combine all the -framework foo arguments back together + FOREACH(arg ${WXWINDOWS_LIBRARIES_TMP}) + IF(${arg} MATCHES "-framework") + SET(LAST_FRAME 1) + ELSE(${arg} MATCHES "-framework") + # not a -framework argument + IF(LAST_FRAME) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} "-framework ${arg}") + SET(LAST_FRAME 0) + ELSE(LAST_FRAME) + SET(WXWINDOWS_LIBRARIES ${WXWINDOWS_LIBRARIES} ${arg}) + ENDIF(LAST_FRAME) + ENDIF(${arg} MATCHES "-framework") + ENDFOREACH(arg) + ENDIF(CMAKE_WX_CONFIG) + + + ## extract linkdirs (-L) for rpath + ## use regular expression to match wildcard equivalent "-L*" + ## with is a space or a semicolon + STRING(REGEX MATCHALL "[-][L]([^ ;])+" WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX "${WX_CONFIG_LIBS}" ) + #MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX=${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX}") + + ## remove prefix -L because we need the pure directory for LINK_DIRECTORIES + ## replace -L by ; because the separator seems to be lost otherwise (bug or + ## feature?) + IF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) + STRING(REGEX REPLACE "[-][L]" ";" WXWINDOWS_LINK_DIRECTORIES ${WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX} ) + #MESSAGE("DBG WXWINDOWS_LINK_DIRECTORIES=${WXWINDOWS_LINK_DIRECTORIES}") + ENDIF(WXWINDOWS_LINK_DIRECTORIES_WITH_PREFIX) + + ## replace space separated string by semicolon separated vector to make it + ## work with LINK_DIRECTORIES + SEPARATE_ARGUMENTS(WXWINDOWS_LINK_DIRECTORIES) + + IF( CYGWIN OR MINGW ) + GET_FILENAME_COMPONENT(WXWINDOWS_INSTALL_PATH ${CMAKE_WX_CONFIG} PATH) + SET( WXWINDOWS_INSTALL_PATH ${WXWINDOWS_INSTALL_PATH}/.. ) + SET( WXWINDOWS_RC ${WXWINDOWS_INSTALL_PATH}/include/wx/msw/wx.rc ) + ELSE( CYGWIN OR MINGW ) + SET( WXWINDOWS_RC "" ) + ENDIF( CYGWIN OR MINGW ) + SET( WIN32GUI "" ) + + #keep debug settings as indicated by wx-config + #SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} "${CMAKE_WX_CXX_FLAGS}" ) + #IF( WXWINDOWS_USE_DEBUG ) + # SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} -ggdb ) + #ENDIF( WXWINDOWS_USE_DEBUG ) + + IF( CYGWIN OR MINGW ) + IF( CYGWIN ) + SET( WXWINDOWS_DEFINITIONS ${WXWINDOWS_DEFINITIONS} -D__GNUWIN32__ -O2 -D_WIN32_IE=0x400 -MMD -Wall ) + ENDIF( CYGWIN ) + ELSE( CYGWIN OR MINGW ) + # just in case `gtk-config --cflags`does not work + # SET( WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} /usr/include/gtk-2.0 /usr/include/gtk-2.0/include /usr/lib/gtk-2.0/include /usr/include/glib-2.0 /usr/lib/glib-2.0/include /usr/include/pango-1.0 /usr/include/atk-1.0 ) + # What about FindGTK.cmake? and what if somebody uses wxMotif? + IF(NOT APPLE) + SET( CMAKE_WX_CXX_FLAGS "${CMAKE_WX_CXX_FLAGS} `gtk-config --cflags`" ) + #find Xwindows + INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) + SET( WXWINDOWS_INCLUDE_DIR ${WXWINDOWS_INCLUDE_DIR} ${X11_INCLUDE_DIR} ) + ENDIF(NOT APPLE) + ENDIF( CYGWIN OR MINGW ) + +ENDIF( WIN32 ) + +MARK_AS_ADVANCED( + CMAKE_WX_CXX_FLAGS +) + +#MESSAGE( "${WXWINDOWS_LINK_DIRECTORIES}" ) +#MESSAGE( "${WXWINDOWS_LIBRARIES}" ) +#MESSAGE( "CMAKE_WX_CXX_FLAGS}" ) +#MESSAGE( "WXWINDOWS_INCLUDE_PATH}" ) +#MESSAGE( "WXWINDOWS_INCLUDE_DIR}" ) +#MESSAGE( "WXWINDOWS_DEFINITIONS}" ) diff --git a/Source/WXDialog/bin/UsewxW.cmake b/Source/WXDialog/bin/UsewxW.cmake new file mode 100644 index 000000000..702ab9d99 --- /dev/null +++ b/Source/WXDialog/bin/UsewxW.cmake @@ -0,0 +1,80 @@ + +MESSAGE("${CMAKE_CURRENT_FILE} is deprecated, please use FindwxWidgets.cmake instead.") + + +# +# UsewxW.cmake +# v1.0 2005-05-27 +# Jerry Fath 2005 +# Based on work by Jorgen Bodde +# + +# +# wxWidgets CMake helper +# + +# These project specific variables should be set before including this file +#PROJECT_NAME +#PROJECT_SOURCE_FILES +#PROJECT_SOURCE_DIR +#PROJECT_BINARY_DIR +# These variables can be set to add addition directories, libraries, and definitions +#PROJECT_DEFINITIONS +#PROJECT_INCLUDE_PATH +#PROJECT_LINK_DIRECTORIES +#PROJECT_LIBRARIES + +#These WX specific variable should be set by FindwxW.cmake before including this file +# WXWIDGETS_LINK_DIRECTORIES = link directories, useful for rpath on Unix +# WXWIDGETS_LIBRARIES = all the wxWindows libraries ( and linker flags on unix ) +# WXWIDGETS_CXX_FLAGS = compiler flags for building wxWindows +# WXWIDGETS_INCLUDE_DIR = all include path of wxWindows +# WXWIDGETS_DEFINITIONS = all flags of wxWindows + + +# +# The flags for the compiler are stored in WXWIDGETS_CXX_FLAGS, we will set those so that +# we know we will always compile wxWidgets programs properly. In case of debugging, we +# will add the __WXDEBUG__ and WXDEBUG flags as well. For linux, you might want LINUX +# to be defined. +# +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WXWIDGETS_CXX_FLAGS}") + +ADD_DEFINITIONS( ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS} ) + +# +# The include dirs +# +INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR} + ${PROJECT_INCLUDE_PATH} + ${WXWIDGETS_INCLUDE_DIR}) + +# +# This is needed to tell CMake what directories contain the libraries we need. This will +# allow us to just specify the lib files without prepending them with a full path to that +# library +# +LINK_DIRECTORIES( ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES}) + +# +# This is our target. As you can see, we specify WIN32 for windows makefiles. In Linux and +# other OS'es this flag is ignored. Under windows it will make sure we generate a Win32 file with GUI. +# +ADD_EXECUTABLE(${PROJECT_NAME} WIN32 ${PROJECT_SOURCE_FILES} ${PROJECT_RC_FILE}) + +# +# Here we specify what libraries are linked to our project +# +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES}) + +# +# Log results +# +FILE( WRITE "${PROJECT_BINARY_DIR}/usewxw.log" "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Definitions: ${WXWIDGETS_DEFINITIONS} ${PROJECT_DEFINITIONS}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "INCLUDE_DIRECTORIES: ${PROJECT_SOURCE_DIR} ${PROJECT_INCLUDE_PATH} ${WXWIDGETS_INCLUDE_DIR}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "LINK_DIRECTORIES: ${WXWIDGETS_LINK_DIRECTORIES} ${PROJECT_LINK_DIRECTORIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "TARGET_LINK_LIBRARIES: ${PROJECT_NAME} ${WXWIDGETS_LIBRARIES} ${PROJECT_LIBRARIES}\n" ) +FILE( APPEND "${PROJECT_BINARY_DIR}/usewxw.log" "Sources: ${PROJECT_SOURCE_FILES}\n" ) + + diff --git a/Source/WXDialog/changelog.txt b/Source/WXDialog/changelog.txt new file mode 100644 index 000000000..3f94d0e17 --- /dev/null +++ b/Source/WXDialog/changelog.txt @@ -0,0 +1,22 @@ +Changes for new CMakeSetup dialog (v0.9) +- Cancel button on progress dialog now cancels the process +- Generator cannot be chosen anymore after there are cache items (this is pointless anyway) +- Drop target on grid (a folder) will load this in the build path and load up the cache +- Deletion of cache before something is generated, will ask the user if this is what he/she wants +- Reloading of cache added, after deleting cache items (and it was a mistake, a reload can bring it back to previous state) +- Added a search query. Typing a substring will narrow the search. When ENTER is pressed the substring is stored in the search query history for easy lookup +- Added a message display window, that will show all messages for easy copy-pasting and reference. This also obsoleted the "stop reporting errors" option +- A status percentage is shown in the task bar (when configuring, next to the configure window) +- Added menu bar with most common options (reload cache, delete cache, options, about etc) +- Added browse option in context menu on grid. Blue and green items are browsable (paths and files) +- Added about dialog +- Added options dialog (for future options) +- OPTION cache items are now implemented as checkboxes instead of comboboxes. Easier to double click instead of figuring out if you want to go up or down for YES or NO +- Added XP look to window (XP manifest) +- Added progress dialog that shows configuration progress +- Closing of dialog can be postponed by SHIFT (when option "close after generation is done" is selected) +- Window position X, Y and size is remembered between sessions +- Added most recent used list, with 5 last used build directories for easy lookup +- Cache options for paths are colored blue, cache options for files are green, and the rest is black +- NOTFOUND entries are made bold for easy recognition +- The selected item is described in a seperate text box for easy reading instead of in the statusbar diff --git a/Source/WXDialog/cmake_icon.gif b/Source/WXDialog/cmake_icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..ccf1f992e0a92692b3c8dcbb4de311ea3b4770dc GIT binary patch literal 892 zcmZ?wbhEHb diff --git a/Source/WXDialog/cmakesetup.xml b/Source/WXDialog/cmakesetup.xml new file mode 100644 index 000000000..e2dddf21e --- /dev/null +++ b/Source/WXDialog/cmakesetup.xml @@ -0,0 +1,104 @@ + + diff --git a/Source/WXDialog/config.h b/Source/WXDialog/config.h new file mode 100644 index 000000000..a85ede860 --- /dev/null +++ b/Source/WXDialog/config.h @@ -0,0 +1,43 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: config.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef __CMAKE_CONFIG_H__ +#define __CMAKE_CONFIG_H__ + +#define CM_LASTPROJECT_PATH "LastProjectPath" // last project path for CMakeLists.txt in edit box +#define CM_LASTBUILD_PATH "LastBuildPath" // last build path for cache in edit box +#define CM_MAX_RECENT_PATHS 5 // max amount most recent used paths in menu +#define CM_MAX_SEARCH_QUERIES 10 // max amount of entries in search query window +#define CM_RECENT_BUILD_PATH "LastRecentPath" // will be enumerated like LastRecentPath0 LastRecentPath1 etc +#define CM_SEARCH_QUERY "SearchQuery" // will be enumerated like SearchQuery0 SearchQuery1 etc +#define CM_XSIZE "CMakeXSize" // x size of window +#define CM_YSIZE "CMakeYSize" // y size of window +#define CM_XPOS "CMakeXPos" // x pos of window +#define CM_YPOS "CMakeYPos" // y pos of window +#define CM_SPLITTERPOS "CMakeSplitterPos" // position of splitter window + +#define CM_CLOSEAFTERGEN "CMakeCloseAfterGenerate" // close CMake after succesful generation (old behaviour) +#define CM_CLOSEAFTERGEN_DEF false // inherit default false when not present + +#define CM_RECENT_BUILD_ITEM 10000 // ID of menu item for recent builds +#define CMAKEGUI_MAJORVER 0 // major build +#define CMAKEGUI_MINORVER 9 // minor build +#define CMAKEGUI_ADDVER "b" // postfix (beta, alpha, none) + +#endif diff --git a/Source/WXDialog/optionsdlg.cpp b/Source/WXDialog/optionsdlg.cpp new file mode 100644 index 000000000..9968acb17 --- /dev/null +++ b/Source/WXDialog/optionsdlg.cpp @@ -0,0 +1,199 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: optionsdlg.cpp,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "optionsdlg.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include "optionsdlg.h" + +////@begin XPM images +////@end XPM images + +/*! + * CMOptionsDlg type definition + */ + +IMPLEMENT_DYNAMIC_CLASS( CMOptionsDlg, wxDialog ) + +/*! + * CMOptionsDlg event table definition + */ + +BEGIN_EVENT_TABLE( CMOptionsDlg, wxDialog ) + +////@begin CMOptionsDlg event table entries + EVT_CHECKBOX( ID_CHECKBOX_CLOSECMAKE, CMOptionsDlg::OnButtonOK ) + +////@end CMOptionsDlg event table entries + +END_EVENT_TABLE() + +/*! + * CMOptionsDlg constructors + */ + +CMOptionsDlg::CMOptionsDlg( ) +{ +} + +CMOptionsDlg::CMOptionsDlg( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ + Create(parent, id, caption, pos, size, style); +} + +/*! + * CMOptionsDlg creator + */ + +bool CMOptionsDlg::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ +////@begin CMOptionsDlg member initialisation + m_closeAfterGenerate = NULL; +////@end CMOptionsDlg member initialisation + +////@begin CMOptionsDlg creation + SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + wxDialog::Create( parent, id, caption, pos, size, style ); + + CreateControls(); + Centre(); +////@end CMOptionsDlg creation + return TRUE; +} + +/*! + * Control creation for CMOptionsDlg + */ + +void CMOptionsDlg::CreateControls() +{ +////@begin CMOptionsDlg content construction + CMOptionsDlg* itemDialog1 = this; + + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + itemDialog1->SetSizer(itemBoxSizer2); + + wxNotebook* itemNotebook3 = new wxNotebook( itemDialog1, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, wxNB_TOP ); + + wxPanel* itemPanel4 = new wxPanel( itemNotebook3, ID_PANEL, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxVERTICAL); + itemPanel4->SetSizer(itemBoxSizer5); + + itemBoxSizer5->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + m_closeAfterGenerate = new wxCheckBox( itemPanel4, ID_CHECKBOX_CLOSECMAKE, _("Close down CMakeSetup after generation of project"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); + m_closeAfterGenerate->SetValue(FALSE); + itemBoxSizer5->Add(m_closeAfterGenerate, 0, wxALIGN_LEFT|wxALL, 5); + + itemNotebook3->AddPage(itemPanel4, _("General")); + + itemBoxSizer2->Add(itemNotebook3, 1, wxGROW|wxALL|wxFIXED_MINSIZE, 5); + + wxBoxSizer* itemBoxSizer8 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer2->Add(itemBoxSizer8, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxBOTTOM, 5); + + wxButton* itemButton9 = new wxButton( itemDialog1, wxID_OK, _("&OK"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(itemButton9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton10 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer8->Add(itemButton10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + +////@end CMOptionsDlg content construction +} + +/*! + * Should we show tooltips? + */ + +bool CMOptionsDlg::ShowToolTips() +{ + return TRUE; +} + +/*! + * Get bitmap resources + */ + +wxBitmap CMOptionsDlg::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin CMOptionsDlg bitmap retrieval + return wxNullBitmap; +////@end CMOptionsDlg bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon CMOptionsDlg::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin CMOptionsDlg icon retrieval + return wxNullIcon; +////@end CMOptionsDlg icon retrieval +} + +void CMOptionsDlg::SetConfig(wxConfig *cfg) +{ + bool boolval; + + // close after generation + cfg->Read(CM_CLOSEAFTERGEN, &boolval, CM_CLOSEAFTERGEN_DEF); + m_closeAfterGenerate->SetValue(boolval); +} + +void CMOptionsDlg::GetConfig(wxConfig *cfg) +{ + // close after generation + cfg->Write(CM_CLOSEAFTERGEN, m_closeAfterGenerate->GetValue()); +} + +/*! + * wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE + */ + +void CMOptionsDlg::OnButtonOK( wxCommandEvent& event ) +{ +////@begin wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE in CMOptionsDlg. + // Before editing this code, remove the block markers. + event.Skip(); +////@end wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE in CMOptionsDlg. +} + + + + + + diff --git a/Source/WXDialog/optionsdlg.h b/Source/WXDialog/optionsdlg.h new file mode 100644 index 000000000..541d0c10e --- /dev/null +++ b/Source/WXDialog/optionsdlg.h @@ -0,0 +1,125 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: optionsdlg.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _OPTIONSDLG_H_ +#define _OPTIONSDLG_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "optionsdlg.cpp" +#endif + +/*! + * Includes + */ + +////@begin includes +#include "wx/notebook.h" +////@end includes + +#include +#include "config.h" + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define ID_DIALOG 10004 +#define SYMBOL_CMOPTIONSDLG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX +#define SYMBOL_CMOPTIONSDLG_TITLE _("CMakeSetup Options ...") +#define SYMBOL_CMOPTIONSDLG_IDNAME ID_DIALOG +#define SYMBOL_CMOPTIONSDLG_SIZE wxSize(400, 300) +#define SYMBOL_CMOPTIONSDLG_POSITION wxDefaultPosition +#define ID_NOTEBOOK 10006 +#define ID_PANEL 10007 +#define ID_CHECKBOX_CLOSECMAKE 10008 +////@end control identifiers + +/*! + * Compatibility + */ + +#ifndef wxCLOSE_BOX +#define wxCLOSE_BOX 0x1000 +#endif +#ifndef wxFIXED_MINSIZE +#define wxFIXED_MINSIZE 0 +#endif + +/*! + * CMOptionsDlg class declaration + */ + +class CMOptionsDlg: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( CMOptionsDlg ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + CMOptionsDlg( ); + CMOptionsDlg( wxWindow* parent, wxWindowID id = SYMBOL_CMOPTIONSDLG_IDNAME, const wxString& caption = SYMBOL_CMOPTIONSDLG_TITLE, const wxPoint& pos = SYMBOL_CMOPTIONSDLG_POSITION, const wxSize& size = SYMBOL_CMOPTIONSDLG_SIZE, long style = SYMBOL_CMOPTIONSDLG_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMOPTIONSDLG_IDNAME, const wxString& caption = SYMBOL_CMOPTIONSDLG_TITLE, const wxPoint& pos = SYMBOL_CMOPTIONSDLG_POSITION, const wxSize& size = SYMBOL_CMOPTIONSDLG_SIZE, long style = SYMBOL_CMOPTIONSDLG_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + +////@begin CMOptionsDlg event handler declarations + + /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_CHECKBOX_CLOSECMAKE + void OnButtonOK( wxCommandEvent& event ); + +////@end CMOptionsDlg event handler declarations + +////@begin CMOptionsDlg member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end CMOptionsDlg member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + + // write values from config to GUI controls + void SetConfig(wxConfig *cfg); + + // write GUI controls back to config + void GetConfig(wxConfig *cfg); + +private: + +////@begin CMOptionsDlg member variables + wxCheckBox* m_closeAfterGenerate; +////@end CMOptionsDlg member variables +}; + +#endif + // _OPTIONSDLG_H_ diff --git a/Source/WXDialog/progressdlg.cpp b/Source/WXDialog/progressdlg.cpp new file mode 100644 index 000000000..c05966bcb --- /dev/null +++ b/Source/WXDialog/progressdlg.cpp @@ -0,0 +1,177 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: progressdlg.cpp,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma implementation "progressdlg.h" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +////@begin includes +////@end includes + +#include "progressdlg.h" + +////@begin XPM images +////@end XPM images + +/*! + * CMProgressDialog type definition + */ + +IMPLEMENT_DYNAMIC_CLASS( CMProgressDialog, wxDialog ) + +/*! + * CMProgressDialog event table definition + */ + +BEGIN_EVENT_TABLE( CMProgressDialog, wxDialog ) + +////@begin CMProgressDialog event table entries + EVT_BUTTON( ID_CMAKE_BUTTON, CMProgressDialog::OnCmakeCancelClick ) + +////@end CMProgressDialog event table entries + +END_EVENT_TABLE() + +/*! + * CMProgressDialog constructors + */ + +CMProgressDialog::CMProgressDialog( ) +{ +} + +CMProgressDialog::CMProgressDialog( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ + Create(parent, id, caption, pos, size, style); +} + +/*! + * CMProgressDialog creator + */ + +bool CMProgressDialog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) +{ +////@begin CMProgressDialog member initialisation + m_textMessage = NULL; + m_progress = NULL; +////@end CMProgressDialog member initialisation + +////@begin CMProgressDialog creation + SetExtraStyle(GetExtraStyle()|wxWS_EX_BLOCK_EVENTS); + wxDialog::Create( parent, id, caption, pos, size, style ); + + CreateControls(); + GetSizer()->Fit(this); + GetSizer()->SetSizeHints(this); + Centre(); +////@end CMProgressDialog creation + + m_cancelPressed = false; + m_cancelling = false; + + return TRUE; +} + +/*! + * Control creation for CMProgressDialog + */ + +void CMProgressDialog::CreateControls() +{ +////@begin CMProgressDialog content construction + CMProgressDialog* itemDialog1 = this; + + wxBoxSizer* itemBoxSizer2 = new wxBoxSizer(wxVERTICAL); + itemDialog1->SetSizer(itemBoxSizer2); + + itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + m_textMessage = new wxStaticText( itemDialog1, wxID_STATIC, _("Please wait while CMake configures ..."), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer2->Add(m_textMessage, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxADJUST_MINSIZE, 5); + + wxBoxSizer* itemBoxSizer5 = new wxBoxSizer(wxHORIZONTAL); + itemBoxSizer2->Add(itemBoxSizer5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + m_progress = new wxGauge( itemDialog1, ID_CMAKE_PROGRESS, 100, wxDefaultPosition, wxSize(250, 20), wxGA_HORIZONTAL ); + m_progress->SetValue(0); + itemBoxSizer5->Add(m_progress, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); + + wxButton* itemButton7 = new wxButton( itemDialog1, ID_CMAKE_BUTTON, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + itemBoxSizer2->Add(itemButton7, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); + + itemBoxSizer2->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP, 5); + +////@end CMProgressDialog content construction +} + +/*! + * wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CMAKE_BUTTON + */ + +void CMProgressDialog::OnCmakeCancelClick( wxCommandEvent& event ) +{ + m_cancelPressed = true; +} + +/*! + * Should we show tooltips? + */ + +bool CMProgressDialog::ShowToolTips() +{ + return TRUE; +} + +/*! + * Get bitmap resources + */ + +wxBitmap CMProgressDialog::GetBitmapResource( const wxString& name ) +{ + // Bitmap retrieval +////@begin CMProgressDialog bitmap retrieval + return wxNullBitmap; +////@end CMProgressDialog bitmap retrieval +} + +/*! + * Get icon resources + */ + +wxIcon CMProgressDialog::GetIconResource( const wxString& name ) +{ + // Icon retrieval +////@begin CMProgressDialog icon retrieval + return wxNullIcon; +////@end CMProgressDialog icon retrieval +} + + + diff --git a/Source/WXDialog/progressdlg.h b/Source/WXDialog/progressdlg.h new file mode 100644 index 000000000..7be7e2c3a --- /dev/null +++ b/Source/WXDialog/progressdlg.h @@ -0,0 +1,139 @@ +/*========================================================================= + + Program: WXDialog - wxWidgets X-platform GUI Front-End for CMake + Module: $RCSfile: progressdlg.h,v $ + Language: C++ + Date: $Date: 2005-06-30 19:54:14 $ + Version: $Revision: 1.1 $ + + Author: Jorgen Bodde + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef _PROGRESSDLG_H_ +#define _PROGRESSDLG_H_ + +#if defined(__GNUG__) && !defined(__APPLE__) +#pragma interface "progressdlg.cpp" +#endif + +/*! + * Includes + */ + +////@begin includes +////@end includes + +/*! + * Forward declarations + */ + +////@begin forward declarations +////@end forward declarations + +/*! + * Control identifiers + */ + +////@begin control identifiers +#define ID_PROGRESSDLG 10000 +#define SYMBOL_CMPROGRESSDIALOG_STYLE wxRAISED_BORDER +#define SYMBOL_CMPROGRESSDIALOG_TITLE _("Progress Dialog") +#define SYMBOL_CMPROGRESSDIALOG_IDNAME ID_PROGRESSDLG +#define SYMBOL_CMPROGRESSDIALOG_SIZE wxSize(400, 300) +#define SYMBOL_CMPROGRESSDIALOG_POSITION wxDefaultPosition +#define ID_CMAKE_PROGRESS 10001 +#define ID_CMAKE_BUTTON 10002 +////@end control identifiers + +/*! + * Compatibility + */ + +#ifndef wxCLOSE_BOX +#define wxCLOSE_BOX 0x1000 +#endif +#ifndef wxFIXED_MINSIZE +#define wxFIXED_MINSIZE 0 +#endif + +/*! + * CMProgressDialog class declaration + */ + +class CMProgressDialog: public wxDialog +{ + DECLARE_DYNAMIC_CLASS( CMProgressDialog ) + DECLARE_EVENT_TABLE() + +public: + /// Constructors + CMProgressDialog( ); + CMProgressDialog( wxWindow* parent, wxWindowID id = SYMBOL_CMPROGRESSDIALOG_IDNAME, const wxString& caption = SYMBOL_CMPROGRESSDIALOG_TITLE, const wxPoint& pos = SYMBOL_CMPROGRESSDIALOG_POSITION, const wxSize& size = SYMBOL_CMPROGRESSDIALOG_SIZE, long style = SYMBOL_CMPROGRESSDIALOG_STYLE ); + + /// Creation + bool Create( wxWindow* parent, wxWindowID id = SYMBOL_CMPROGRESSDIALOG_IDNAME, const wxString& caption = SYMBOL_CMPROGRESSDIALOG_TITLE, const wxPoint& pos = SYMBOL_CMPROGRESSDIALOG_POSITION, const wxSize& size = SYMBOL_CMPROGRESSDIALOG_SIZE, long style = SYMBOL_CMPROGRESSDIALOG_STYLE ); + + /// Creates the controls and sizers + void CreateControls(); + + void SetProgress(float progress) { + m_progress->SetValue((int)(progress * 100)); + }; + +////@begin CMProgressDialog event handler declarations + + /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_CMAKE_BUTTON + void OnCmakeCancelClick( wxCommandEvent& event ); + +////@end CMProgressDialog event handler declarations + +////@begin CMProgressDialog member function declarations + + /// Retrieves bitmap resources + wxBitmap GetBitmapResource( const wxString& name ); + + /// Retrieves icon resources + wxIcon GetIconResource( const wxString& name ); +////@end CMProgressDialog member function declarations + + /// Should we show tooltips? + static bool ShowToolTips(); + + bool CancelPressed() const { + return m_cancelPressed; + }; + + void CancelAcknowledged() { + m_cancelling = true; + }; + + bool IsCancelling() const { + return m_cancelling; + }; + + void ResetCancel() { + m_cancelling = false; + m_cancelPressed = false; + }; + +////@begin CMProgressDialog member variables + wxStaticText* m_textMessage; + wxGauge* m_progress; +////@end CMProgressDialog member variables + +private: + bool m_cancelPressed; + bool m_cancelling; + +}; + +#endif + // _PROGRESSDLG_H_ diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx new file mode 100644 index 000000000..04366bd41 --- /dev/null +++ b/Source/cmAddCustomCommandCommand.cxx @@ -0,0 +1,378 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddCustomCommandCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-30 16:22:10 $ + Version: $Revision: 1.37 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddCustomCommandCommand.h" + +#include "cmTarget.h" + +#include "cmSourceFile.h" + +// cmAddCustomCommandCommand +bool cmAddCustomCommandCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + /* Let's complain at the end of this function about the lack of a particular + arg. For the moment, let's say that COMMAND, and either TARGET or SOURCE + are required. + */ + if (args.size() < 4) + { + this->SetError("called with wrong number of arguments."); + return false; + } + + std::string source, target, main_dependency, working; + std::string comment_buffer; + const char* comment = 0; + std::vector depends, outputs, output; + bool verbatim = false; + bool append = false; + std::string implicit_depends_lang; + cmCustomCommand::ImplicitDependsList implicit_depends; + + // Accumulate one command line at a time. + cmCustomCommandLine currentLine; + + // Save all command lines. + cmCustomCommandLines commandLines; + + cmTarget::CustomCommandType cctype = cmTarget::POST_BUILD; + + enum tdoing { + doing_source, + doing_command, + doing_target, + doing_depends, + doing_implicit_depends_lang, + doing_implicit_depends_file, + doing_main_dependency, + doing_output, + doing_outputs, + doing_comment, + doing_working_directory, + doing_nothing + }; + + tdoing doing = doing_nothing; + + for (unsigned int j = 0; j < args.size(); ++j) + { + std::string const& copy = args[j]; + + if(copy == "SOURCE") + { + doing = doing_source; + } + else if(copy == "COMMAND") + { + doing = doing_command; + + // Save the current command before starting the next command. + if(!currentLine.empty()) + { + commandLines.push_back(currentLine); + currentLine.clear(); + } + } + else if(copy == "PRE_BUILD") + { + cctype = cmTarget::PRE_BUILD; + } + else if(copy == "PRE_LINK") + { + cctype = cmTarget::PRE_LINK; + } + else if(copy == "POST_BUILD") + { + cctype = cmTarget::POST_BUILD; + } + else if(copy == "VERBATIM") + { + verbatim = true; + } + else if(copy == "APPEND") + { + append = true; + } + else if(copy == "TARGET") + { + doing = doing_target; + } + else if(copy == "ARGS") + { + // Ignore this old keyword. + } + else if (copy == "DEPENDS") + { + doing = doing_depends; + } + else if (copy == "OUTPUTS") + { + doing = doing_outputs; + } + else if (copy == "OUTPUT") + { + doing = doing_output; + } + else if (copy == "WORKING_DIRECTORY") + { + doing = doing_working_directory; + } + else if (copy == "MAIN_DEPENDENCY") + { + doing = doing_main_dependency; + } + else if (copy == "IMPLICIT_DEPENDS") + { + doing = doing_implicit_depends_lang; + } + else if (copy == "COMMENT") + { + doing = doing_comment; + } + else + { + std::string filename; + switch (doing) + { + case doing_output: + case doing_outputs: + if (!cmSystemTools::FileIsFullPath(copy.c_str())) + { + // This is an output to be generated, so it should be + // under the build tree. CMake 2.4 placed this under the + // source tree. However the only case that this change + // will break is when someone writes + // + // add_custom_command(OUTPUT out.txt ...) + // + // and later references "${CMAKE_CURRENT_SOURCE_DIR}/out.txt". + // This is fairly obscure so we can wait for someone to + // complain. + filename = this->Makefile->GetCurrentOutputDirectory(); + filename += "/"; + } + filename += copy; + break; + case doing_source: + // We do not want to convert the argument to SOURCE because + // that option is only available for backward compatibility. + // Old-style use of this command may use the SOURCE==TARGET + // trick which we must preserve. If we convert the source + // to a full path then it will no longer equal the target. + default: + break; + } + + switch (doing) + { + case doing_working_directory: + working = copy; + break; + case doing_source: + source = copy; + break; + case doing_output: + output.push_back(filename); + break; + case doing_main_dependency: + main_dependency = copy; + break; + case doing_implicit_depends_lang: + implicit_depends_lang = copy; + doing = doing_implicit_depends_file; + break; + case doing_implicit_depends_file: + { + // An implicit dependency starting point is also an + // explicit dependency. + depends.push_back(copy); + + // Add the implicit dependency language and file. + cmCustomCommand::ImplicitDependsPair + entry(implicit_depends_lang, copy); + implicit_depends.push_back(entry); + + // Switch back to looking for a language. + doing = doing_implicit_depends_lang; + } + break; + case doing_command: + currentLine.push_back(copy); + break; + case doing_target: + target = copy; + break; + case doing_depends: + depends.push_back(copy); + break; + case doing_outputs: + outputs.push_back(filename); + break; + case doing_comment: + comment_buffer = copy; + comment = comment_buffer.c_str(); + break; + default: + this->SetError("Wrong syntax. Unknown type of argument."); + return false; + } + } + } + + // Store the last command line finished. + if(!currentLine.empty()) + { + commandLines.push_back(currentLine); + currentLine.clear(); + } + + // At this point we could complain about the lack of arguments. For + // the moment, let's say that COMMAND, TARGET are always required. + if(output.empty() && target.empty()) + { + this->SetError("Wrong syntax. A TARGET or OUTPUT must be specified."); + return false; + } + + if(source.empty() && !target.empty() && !output.empty()) + { + this->SetError( + "Wrong syntax. A TARGET and OUTPUT can not both be specified."); + return false; + } + if(append && output.empty()) + { + this->SetError("given APPEND option with no OUTPUT."); + return false; + } + + // Make sure the output names and locations are safe. + if(!this->CheckOutputs(output) || !this->CheckOutputs(outputs)) + { + return false; + } + + // Check for an append request. + if(append) + { + // Lookup an existing command. + if(cmSourceFile* sf = + this->Makefile->GetSourceFileWithOutput(output[0].c_str())) + { + if(cmCustomCommand* cc = sf->GetCustomCommand()) + { + cc->AppendCommands(commandLines); + cc->AppendDepends(depends); + cc->AppendImplicitDepends(implicit_depends); + return true; + } + } + + // No command for this output exists. + cmOStringStream e; + e << "given APPEND option with output \"" << output[0].c_str() + << "\" which is not already a custom command output."; + this->SetError(e.str().c_str()); + return false; + } + + // Choose which mode of the command to use. + bool escapeOldStyle = !verbatim; + if(source.empty() && output.empty()) + { + // Source is empty, use the target. + std::vector no_depends; + this->Makefile->AddCustomCommandToTarget(target.c_str(), no_depends, + commandLines, cctype, + comment, working.c_str(), + escapeOldStyle); + } + else if(target.empty()) + { + // Target is empty, use the output. + this->Makefile->AddCustomCommandToOutput(output, depends, + main_dependency.c_str(), + commandLines, comment, + working.c_str(), false, + escapeOldStyle); + + // Add implicit dependency scanning requests if any were given. + if(!implicit_depends.empty()) + { + bool okay = false; + if(cmSourceFile* sf = + this->Makefile->GetSourceFileWithOutput(output[0].c_str())) + { + if(cmCustomCommand* cc = sf->GetCustomCommand()) + { + okay = true; + cc->SetImplicitDepends(implicit_depends); + } + } + if(!okay) + { + cmOStringStream e; + e << "could not locate source file with a custom command producing \"" + << output[0] << "\" even though this command tried to create it!"; + this->SetError(e.str().c_str()); + return false; + } + } + } + else + { + // Use the old-style mode for backward compatibility. + this->Makefile->AddCustomCommandOldStyle(target.c_str(), outputs, depends, + source.c_str(), commandLines, + comment); + } + + return true; +} + +//---------------------------------------------------------------------------- +bool +cmAddCustomCommandCommand +::CheckOutputs(const std::vector& outputs) +{ + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + // Make sure the file will not be generated into the source + // directory during an out of source build. + if(!this->Makefile->CanIWriteThisFile(o->c_str())) + { + std::string e = "attempted to have a file \"" + *o + + "\" in a source directory as an output of custom command."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + + // Make sure the output file name has no invalid characters. + std::string::size_type pos = o->find_first_of("#<>"); + if(pos != o->npos) + { + cmOStringStream msg; + msg << "called with OUTPUT containing a \"" << (*o)[pos] + << "\". This character is not allowed."; + this->SetError(msg.str().c_str()); + return false; + } + } + return true; +} diff --git a/Source/cmAddCustomCommandCommand.h b/Source/cmAddCustomCommandCommand.h new file mode 100644 index 000000000..f6cbaa7a3 --- /dev/null +++ b/Source/cmAddCustomCommandCommand.h @@ -0,0 +1,169 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddCustomCommandCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-30 16:22:10 $ + Version: $Revision: 1.33 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAddCustomCommandCommand_h +#define cmAddCustomCommandCommand_h + +#include "cmCommand.h" + +/** \class cmAddCustomCommandCommand + * \brief + * + * cmAddCustomCommandCommand defines a new command (rule) that can + * be executed within the build process + * + */ + +class cmAddCustomCommandCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddCustomCommandCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "add_custom_command";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a custom build rule to the generated build system."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "There are two main signatures for add_custom_command " + "The first signature is for adding a custom command " + "to produce an output.\n" + " add_custom_command(OUTPUT output1 [output2 ...]\n" + " COMMAND command1 [ARGS] [args1...]\n" + " [COMMAND command2 [ARGS] [args2...] ...]\n" + " [MAIN_DEPENDENCY depend]\n" + " [DEPENDS [depends...]]\n" + " [IMPLICIT_DEPENDS depend1 ...]\n" + " [WORKING_DIRECTORY dir]\n" + " [COMMENT comment] [VERBATIM] [APPEND])\n" + "This defines a new command that can be executed during the build " + "process. The outputs named should be listed as source files in the " + "target for which they are to be generated. " + "If an output name is a relative path it will be interpreted " + "relative to the build tree directory corresponding to the current " + "source directory. " + "Note that MAIN_DEPENDENCY is completely optional and is " + "used as a suggestion to visual studio about where to hang the " + "custom command. In makefile terms this creates a new target in the " + "following form:\n" + " OUTPUT: MAIN_DEPENDENCY DEPENDS\n" + " COMMAND\n" + "If more than one command is specified they will be executed in order. " + "The optional ARGS argument is for backward compatibility and will be " + "ignored.\n" + "The second signature adds a custom command to a target " + "such as a library or executable. This is useful for " + "performing an operation before or after building the target. " + "The command becomes part of the target and will only execute " + "when the target itself is built. If the target is already built," + " the command will not execute.\n" + " add_custom_command(TARGET target\n" + " PRE_BUILD | PRE_LINK | POST_BUILD\n" + " COMMAND command1 [ARGS] [args1...]\n" + " [COMMAND command2 [ARGS] [args2...] ...]\n" + " [WORKING_DIRECTORY dir]\n" + " [COMMENT comment] [VERBATIM])\n" + "This defines a new command that will be associated with " + "building the specified target. When the command will " + "happen is determined by which of the following is specified:\n" + " PRE_BUILD - run before all other dependencies\n" + " PRE_LINK - run after other dependencies\n" + " POST_BUILD - run after the target has been built\n" + "Note that the PRE_BUILD option is only supported on Visual " + "Studio 7 or later. For all other generators PRE_BUILD " + "will be treated as PRE_LINK.\n" + "If WORKING_DIRECTORY is specified the command will be executed " + "in the directory given. " + "If COMMENT is set, the value will be displayed as a " + "message before the commands are executed at build time. " + "If APPEND is specified the COMMAND and DEPENDS option values " + "are appended to the custom command for the first output specified. " + "There must have already been a previous call to this command with " + "the same output. The COMMENT, WORKING_DIRECTORY, and MAIN_DEPENDENCY " + "options are currently ignored when APPEND is given, " + "but may be used in the future." + "\n" + "If VERBATIM is given then all the arguments to the commands will be " + "passed exactly as specified no matter the build tool used. " + "Note that one level of escapes is still used by the CMake language " + "processor before ADD_CUSTOM_TARGET even sees the arguments. " + "Use of VERBATIM is recommended as it enables correct behavior. " + "When VERBATIM is not given the behavior is platform specific. " + "In the future VERBATIM may be enabled by default. The only reason " + "it is an option is to preserve compatibility with older CMake code.\n" + "If the output of the custom command is not actually " + "created as a file on disk it should be marked as SYMBOLIC with " + "SET_SOURCE_FILES_PROPERTIES.\n" + + "The IMPLICIT_DEPENDS option requests scanning of implicit " + "dependencies of an input file. The language given specifies the " + "programming language whose corresponding dependency scanner should " + "be used. Currently only C and CXX language scanners are supported. " + "Dependencies discovered from the scanning are added to those of " + "the custom command at build time. Note that the IMPLICIT_DEPENDS " + "option is currently supported only for Makefile generators and " + "will be ignored by other generators." + "\n" + "If COMMAND specifies an executable target (created by " + "ADD_EXECUTABLE) it will automatically be replaced by the location " + "of the executable created at build time. Additionally a " + "target-level dependency will be added so that the executable target " + "will be built before any target using this custom command. However " + "this does NOT add a file-level dependency that would cause the " + "custom command to re-run whenever the executable is recompiled.\n" + + "If DEPENDS specifies any target (created by an ADD_* command) " + "a target-level dependency is created to make sure the target is " + "built before any target using this custom command. Additionally, " + "if the target is an executable or library a file-level dependency " + "is created to cause the custom command to re-run whenever the target " + "is recompiled.\n" + ; + } + + cmTypeMacro(cmAddCustomCommandCommand, cmCommand); +protected: + bool CheckOutputs(const std::vector& outputs); +}; + + +#endif diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx new file mode 100644 index 000000000..ceaf91491 --- /dev/null +++ b/Source/cmAddCustomTargetCommand.cxx @@ -0,0 +1,172 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddCustomTargetCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 22:05:06 $ + Version: $Revision: 1.37 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddCustomTargetCommand.h" + +// cmAddCustomTargetCommand +bool cmAddCustomTargetCommand +::InitialPass(std::vector const& args, + cmExecutionStatus&) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Check the target name. + if(args[0].find_first_of("/\\") != args[0].npos) + { + if(!this->Makefile->NeedBackwardsCompatibility(2,2)) + { + cmOStringStream e; + e << "called with invalid target name \"" << args[0] + << "\". Target names may not contain a slash. " + << "Use ADD_CUSTOM_COMMAND to generate files. " + << "Set CMAKE_BACKWARDS_COMPATIBILITY to 2.2 " + << "or lower to skip this check."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Accumulate one command line at a time. + cmCustomCommandLine currentLine; + + // Save all command lines. + cmCustomCommandLines commandLines; + + // Accumulate dependencies. + std::vector depends; + std::string working_directory; + bool verbatim = false; + std::string comment_buffer; + const char* comment = 0; + + // Keep track of parser state. + enum tdoing { + doing_command, + doing_depends, + doing_working_directory, + doing_comment, + doing_verbatim + }; + tdoing doing = doing_command; + + // Look for the ALL option. + bool excludeFromAll = true; + unsigned int start = 1; + if(args.size() > 1) + { + if(args[1] == "ALL") + { + excludeFromAll = false; + start = 2; + } + } + + // Parse the rest of the arguments. + for(unsigned int j = start; j < args.size(); ++j) + { + std::string const& copy = args[j]; + + if(copy == "DEPENDS") + { + doing = doing_depends; + } + else if(copy == "WORKING_DIRECTORY") + { + doing = doing_working_directory; + } + else if(copy == "VERBATIM") + { + doing = doing_verbatim; + verbatim = true; + } + else if (copy == "COMMENT") + { + doing = doing_comment; + } + else if(copy == "COMMAND") + { + doing = doing_command; + + // Save the current command before starting the next command. + if(!currentLine.empty()) + { + commandLines.push_back(currentLine); + currentLine.clear(); + } + } + else + { + switch (doing) + { + case doing_working_directory: + working_directory = copy; + break; + case doing_command: + currentLine.push_back(copy); + break; + case doing_depends: + depends.push_back(copy); + break; + case doing_comment: + comment_buffer = copy; + comment = comment_buffer.c_str(); + break; + default: + this->SetError("Wrong syntax. Unknown type of argument."); + return false; + } + } + } + + std::string::size_type pos = args[0].find_first_of("#<>"); + if(pos != args[0].npos) + { + cmOStringStream msg; + msg << "called with target name containing a \"" << args[0][pos] + << "\". This character is not allowed."; + this->SetError(msg.str().c_str()); + return false; + } + + // Store the last command line finished. + if(!currentLine.empty()) + { + commandLines.push_back(currentLine); + currentLine.clear(); + } + + // Enforce name uniqueness. + { + std::string msg; + if(!this->Makefile->EnforceUniqueName(args[0], msg, true)) + { + this->SetError(msg.c_str()); + return false; + } + } + + // Add the utility target to the makefile. + bool escapeOldStyle = !verbatim; + this->Makefile->AddUtilityCommand(args[0].c_str(), excludeFromAll, + working_directory.c_str(), depends, + commandLines, escapeOldStyle, comment); + + return true; +} diff --git a/Source/cmAddCustomTargetCommand.h b/Source/cmAddCustomTargetCommand.h new file mode 100644 index 000000000..f4310d1ea --- /dev/null +++ b/Source/cmAddCustomTargetCommand.h @@ -0,0 +1,103 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddCustomTargetCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.22 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAddCustomTargetCommand_h +#define cmAddCustomTargetCommand_h + +#include "cmCommand.h" + +/** \class cmAddCustomTargetCommand + * \brief Command that adds a target to the build system. + * + * cmAddCustomTargetCommand adds an extra target to the build system. + * This is useful when you would like to add special + * targets like "install,", "clean," and so on. + */ +class cmAddCustomTargetCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddCustomTargetCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() + {return "add_custom_target";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a target with no output so it will always be built."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_custom_target(Name [ALL] [command1 [args1...]]\n" + " [COMMAND command2 [args2...] ...]\n" + " [DEPENDS depend depend depend ... ]\n" + " [WORKING_DIRECTORY dir]\n" + " [COMMENT comment] [VERBATIM])\n" + "Adds a target with the given name that executes the given commands. " + "The target has no output file and is ALWAYS CONSIDERED OUT OF DATE " + "even if the commands try to create a file with the name of the " + "target. Use ADD_CUSTOM_COMMAND to generate a file with dependencies. " + "By default nothing depends on the custom target. Use " + "ADD_DEPENDENCIES to add dependencies to or from other targets. " + "If the ALL option is specified " + "it indicates that this target should be added to the default build " + "target so that it will be run every time " + "(the command cannot be called ALL). " + "The command and arguments are optional and if not specified an " + "empty target will be created. " + "If WORKING_DIRECTORY is set, then the command will be run in that " + "directory. " + "If COMMENT is set, the value will be displayed as a " + "message before the commands are executed at build time. " + "Dependencies listed with the DEPENDS argument may reference files " + "and outputs of custom commands created with ADD_CUSTOM_COMMAND.\n" + "If VERBATIM is given then all the arguments to the commands will be " + "passed exactly as specified no matter the build tool used. " + "Note that one level of escapes is still used by the CMake language " + "processor before add_custom_target even sees the arguments. " + "Use of VERBATIM is recommended as it enables correct behavior. " + "When VERBATIM is not given the behavior is platform specific. " + "In the future VERBATIM may be enabled by default. The only reason " + "it is an option is to preserve compatibility with older CMake code."; + } + + cmTypeMacro(cmAddCustomTargetCommand, cmCommand); +}; + +#endif diff --git a/Source/cmAddDefinitionsCommand.cxx b/Source/cmAddDefinitionsCommand.cxx new file mode 100644 index 000000000..f4b8c8ce0 --- /dev/null +++ b/Source/cmAddDefinitionsCommand.cxx @@ -0,0 +1,36 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddDefinitionsCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddDefinitionsCommand.h" + +// cmAddDefinitionsCommand +bool cmAddDefinitionsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + // it is OK to have no arguments + if(args.size() < 1 ) + { + return true; + } + + for(std::vector::const_iterator i = args.begin(); + i != args.end(); ++i) + { + this->Makefile->AddDefineFlag(i->c_str()); + } + return true; +} + diff --git a/Source/cmAddDefinitionsCommand.h b/Source/cmAddDefinitionsCommand.h new file mode 100644 index 000000000..9462602b7 --- /dev/null +++ b/Source/cmAddDefinitionsCommand.h @@ -0,0 +1,87 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddDefinitionsCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAddDefinitionsCommand_h +#define cmAddDefinitionsCommand_h + +#include "cmCommand.h" + +/** \class cmAddDefinitionsCommand + * \brief Specify a list of compiler defines + * + * cmAddDefinitionsCommand specifies a list of compiler defines. These defines + * will be added to the compile command. + */ +class cmAddDefinitionsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddDefinitionsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "add_definitions";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Adds -D define flags to the compilation of source files."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_definitions(-DFOO -DBAR ...)\n" + "Adds flags to the compiler command line for sources in the current " + "directory and below. This command can be used to add any flags, " + "but it was originally intended to add preprocessor definitions. " + "Flags beginning in -D or /D that look like preprocessor definitions " + "are automatically added to the COMPILE_DEFINITIONS property for " + "the current directory. Definitions with non-trival values may be " + "left in the set of flags instead of being converted for reasons of " + "backwards compatibility. See documentation of the directory, " + "target, and source file COMPILE_DEFINITIONS properties for details " + "on adding preprocessor definitions to specific scopes and " + "configurations." + ; + } + + cmTypeMacro(cmAddDefinitionsCommand, cmCommand); +private: + bool ParseDefinition(std::string const& def); +}; + + + +#endif diff --git a/Source/cmAddDependenciesCommand.cxx b/Source/cmAddDependenciesCommand.cxx new file mode 100644 index 000000000..6a375fa84 --- /dev/null +++ b/Source/cmAddDependenciesCommand.cxx @@ -0,0 +1,55 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddDependenciesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.17 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddDependenciesCommand.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + +// cmDependenciesCommand +bool cmAddDependenciesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string target_name = args[0]; + + cmTarget* target = + this->GetMakefile()->GetLocalGenerator()-> + GetGlobalGenerator()->FindTarget(0, target_name.c_str()); + if(target) + { + std::vector::const_iterator s = args.begin(); + ++s; // skip over target_name + for (; s != args.end(); ++s) + { + target->AddUtility(s->c_str()); + } + } + else + { + std::string error = "Adding dependency to non-existent target: "; + error += target_name; + this->SetError(error.c_str()); + return false; + } + + return true; +} + diff --git a/Source/cmAddDependenciesCommand.h b/Source/cmAddDependenciesCommand.h new file mode 100644 index 000000000..141ea00b2 --- /dev/null +++ b/Source/cmAddDependenciesCommand.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddDependenciesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependenciessCommand_h +#define cmDependenciessCommand_h + +#include "cmCommand.h" + +/** \class cmAddDependenciesCommand + * \brief Add a dependency to a target + * + * cmAddDependenciesCommand adds a dependency to a target + */ +class cmAddDependenciesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddDependenciesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_dependencies";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a dependency between top-level targets."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_dependencies(target-name depend-target1\n" + " depend-target2 ...)\n" + "Make a top-level target depend on other top-level targets. A " + "top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, " + "or ADD_CUSTOM_TARGET. Adding dependencies with this command " + "can be used to make sure one target is built before another target. " + "See the DEPENDS option of ADD_CUSTOM_TARGET " + "and ADD_CUSTOM_COMMAND for adding file-level dependencies in custom " + "rules. See the OBJECT_DEPENDS option in " + "SET_SOURCE_FILES_PROPERTIES to add file-level dependencies to object " + "files."; + } + + cmTypeMacro(cmAddDependenciesCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx new file mode 100644 index 000000000..3a165e38a --- /dev/null +++ b/Source/cmAddExecutableCommand.cxx @@ -0,0 +1,133 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddExecutableCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-11 22:33:46 $ + Version: $Revision: 1.35 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddExecutableCommand.h" + +// cmExecutableCommand +bool cmAddExecutableCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::vector::const_iterator s = args.begin(); + + std::string exename = *s; + + ++s; + bool use_win32 = false; + bool use_macbundle = false; + bool excludeFromAll = false; + bool importTarget = false; + while ( s != args.end() ) + { + if (*s == "WIN32") + { + ++s; + use_win32 = true; + } + else if ( *s == "MACOSX_BUNDLE" ) + { + ++s; + use_macbundle = true; + } + else if(*s == "EXCLUDE_FROM_ALL") + { + ++s; + excludeFromAll = true; + } + else if(*s == "IMPORTED") + { + ++s; + importTarget = true; + } + else + { + break; + } + } + + // Special modifiers are not allowed with IMPORTED signature. + if(importTarget && (use_win32 || use_macbundle || excludeFromAll)) + { + if(use_win32) + { + this->SetError("may not be given WIN32 for an IMPORTED target."); + } + else if(use_macbundle) + { + this->SetError( + "may not be given MACOSX_BUNDLE for an IMPORTED target."); + } + else // if(excludeFromAll) + { + this->SetError( + "may not be given EXCLUDE_FROM_ALL for an IMPORTED target."); + } + return false; + } + + // Handle imported target creation. + if(importTarget) + { + // Make sure the target does not already exist. + if(this->Makefile->FindTargetToUse(exename.c_str())) + { + cmOStringStream e; + e << "cannot create imported target \"" << exename + << "\" because another target with the same name already exists."; + this->SetError(e.str().c_str()); + return false; + } + + // Create the imported target. + this->Makefile->AddImportedTarget(exename.c_str(), cmTarget::EXECUTABLE); + return true; + } + + // Enforce name uniqueness. + { + std::string msg; + if(!this->Makefile->EnforceUniqueName(exename, msg)) + { + this->SetError(msg.c_str()); + return false; + } + } + + if (s == args.end()) + { + this->SetError + ("called with incorrect number of arguments, no sources provided"); + return false; + } + + std::vector srclists(s, args.end()); + cmTarget* tgt = this->Makefile->AddExecutable(exename.c_str(), srclists, + excludeFromAll); + if ( use_win32 ) + { + tgt->SetProperty("WIN32_EXECUTABLE", "ON"); + } + if ( use_macbundle) + { + tgt->SetProperty("MACOSX_BUNDLE", "ON"); + } + + return true; +} diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h new file mode 100644 index 000000000..a113ffb81 --- /dev/null +++ b/Source/cmAddExecutableCommand.h @@ -0,0 +1,121 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddExecutableCommand.h,v $ + Language: C++ + Date: $Date: 2008-02-11 18:35:39 $ + Version: $Revision: 1.21 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExecutablesCommand_h +#define cmExecutablesCommand_h + +#include "cmCommand.h" + +/** \class cmExecutablesCommand + * \brief Defines a list of executables to build. + * + * cmExecutablesCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmAddExecutableCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddExecutableCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_executable";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Add an executable to the project using the specified source files."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_executable( [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]\n" + " source1 source2 ... sourceN)\n" + "Adds an executable target called to be built from the " + "source files listed in the command invocation. " + "The corresponds to the logical target name and must be " + "globally unique within a project. " + "The actual file name of the executable built is constructed based on " + "conventions of the native platform " + "(such as .exe or just ). " + "\n" + "By default the executable file will be created in the build tree " + "directory corresponding to the source tree directory in which " + "the command was invoked. " + "See documentation of the RUNTIME_OUTPUT_DIRECTORY " + "target property to change this location. " + "See documentation of the OUTPUT_NAME target property to change " + "the part of the final file name. " + "\n" + "If WIN32 is given the property WIN32_EXECUTABLE will be set on the " + "target created. " + "See documentation of that target property for details." + "\n" + "If MACOSX_BUNDLE is given the corresponding property will be " + "set on the created target. " + "See documentation of the MACOSX_BUNDLE target property for details." + "\n" + "If EXCLUDE_FROM_ALL is given the corresponding property will be " + "set on the created target. " + "See documentation of the EXCLUDE_FROM_ALL target property for " + "details." + "\n" + "The add_executable command can also create IMPORTED executable " + "targets using this signature:\n" + " add_executable( IMPORTED)\n" + "An IMPORTED executable target references an executable file located " + "outside the project. " + "No rules are generated to build it. " + "The target name has scope in the directory in which it is created " + "and below. " + "It may be referenced like any target built within the project. " + "IMPORTED executables are useful for convenient reference from " + "commands like add_custom_command. " + "Details about the imported executable are specified by setting " + "properties whose names begin in \"IMPORTED_\". " + "The most important such property is IMPORTED_LOCATION " + "(and its per-configuration version IMPORTED_LOCATION_) " + "which specifies the location of the main executable file on disk. " + "See documentation of the IMPORTED_* properties for more information." + ; + } + + cmTypeMacro(cmAddExecutableCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx new file mode 100644 index 000000000..e9ddcd61b --- /dev/null +++ b/Source/cmAddLibraryCommand.cxx @@ -0,0 +1,162 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddLibraryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-11 22:33:46 $ + Version: $Revision: 1.36 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddLibraryCommand.h" + +#include "cmake.h" + +// cmLibraryCommand +bool cmAddLibraryCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + // Library type defaults to value of BUILD_SHARED_LIBS, if it exists, + // otherwise it defaults to static library. + cmTarget::TargetType type = cmTarget::SHARED_LIBRARY; + if (cmSystemTools::IsOff(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) + { + type = cmTarget::STATIC_LIBRARY; + } + bool excludeFromAll = false; + bool importTarget = false; + + std::vector::const_iterator s = args.begin(); + + std::string libName = *s; + + ++s; + + // If the second argument is "SHARED" or "STATIC", then it controls + // the type of library. Otherwise, it is treated as a source or + // source list name. There may be two keyword arguments, check for them + bool haveSpecifiedType = false; + while ( s != args.end() ) + { + std::string libType = *s; + if(libType == "STATIC") + { + ++s; + type = cmTarget::STATIC_LIBRARY; + haveSpecifiedType = true; + } + else if(libType == "SHARED") + { + ++s; + type = cmTarget::SHARED_LIBRARY; + haveSpecifiedType = true; + } + else if(libType == "MODULE") + { + ++s; + type = cmTarget::MODULE_LIBRARY; + haveSpecifiedType = true; + } + else if(*s == "EXCLUDE_FROM_ALL") + { + ++s; + excludeFromAll = true; + } + else if(*s == "IMPORTED") + { + ++s; + importTarget = true; + } + else + { + break; + } + } + + /* ideally we should check whether for the linker language of the target + CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to + STATIC. But at this point we know only the name of the target, but not + yet its linker language. */ + if ((type != cmTarget::STATIC_LIBRARY) && + (this->Makefile->GetCMakeInstance()->GetPropertyAsBool( + "TARGET_SUPPORTS_SHARED_LIBS") == false)) + { + std::string msg = "ADD_LIBRARY for library "; + msg += args[0]; + msg += " is used with the "; + msg += type==cmTarget::SHARED_LIBRARY ? "SHARED" : "MODULE"; + msg += " option, but the target platform supports only STATIC libraries. " + "Building it STATIC instead. This may lead to problems."; + cmSystemTools::Message(msg.c_str() ,"Warning"); + type = cmTarget::STATIC_LIBRARY; + } + + // The IMPORTED signature requires a type to be specified explicitly. + if(importTarget && !haveSpecifiedType) + { + this->SetError("called with IMPORTED argument but no library type."); + return false; + } + + // Handle imported target creation. + if(importTarget) + { + // Make sure the target does not already exist. + if(this->Makefile->FindTargetToUse(libName.c_str())) + { + cmOStringStream e; + e << "cannot create imported target \"" << libName + << "\" because another target with the same name already exists."; + this->SetError(e.str().c_str()); + return false; + } + + // Create the imported target. + this->Makefile->AddImportedTarget(libName.c_str(), type); + return true; + } + + // Enforce name uniqueness. + { + std::string msg; + if(!this->Makefile->EnforceUniqueName(libName, msg)) + { + this->SetError(msg.c_str()); + return false; + } + } + + if (s == args.end()) + { + std::string msg = "You have called ADD_LIBRARY for library "; + msg += args[0]; + msg += " without any source files. This typically indicates a problem "; + msg += "with your CMakeLists.txt file"; + cmSystemTools::Message(msg.c_str() ,"Warning"); + } + + std::vector srclists; + while (s != args.end()) + { + srclists.push_back(*s); + ++s; + } + + this->Makefile->AddLibrary(libName.c_str(), type, srclists, + excludeFromAll); + + return true; +} + + diff --git a/Source/cmAddLibraryCommand.h b/Source/cmAddLibraryCommand.h new file mode 100644 index 000000000..e0c98de57 --- /dev/null +++ b/Source/cmAddLibraryCommand.h @@ -0,0 +1,125 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddLibraryCommand.h,v $ + Language: C++ + Date: $Date: 2008-02-11 18:35:39 $ + Version: $Revision: 1.22 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLibrarysCommand_h +#define cmLibrarysCommand_h + +#include "cmCommand.h" + +/** \class cmLibrarysCommand + * \brief Defines a list of executables to build. + * + * cmLibrarysCommand defines a list of executable (i.e., test) + * programs to create. + */ +class cmAddLibraryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddLibraryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_library";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a library to the project using the specified source files."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_library( [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL]\n" + " source1 source2 ... sourceN)\n" + "Adds a library target called to be built from the " + "source files listed in the command invocation. " + "The corresponds to the logical target name and must be " + "globally unique within a project. " + "The actual file name of the library built is constructed based on " + "conventions of the native platform " + "(such as lib.a or .lib)." + "\n" + "STATIC, SHARED, or MODULE may be given to specify the type of library " + "to be created. " + "STATIC libraries are archives of object files for use when linking " + "other targets. " + "SHARED libraries are linked dynamically and loaded at runtime. " + "MODULE libraries are plugins that are not linked into other targets " + "but may be loaded dynamically at runtime using dlopen-like " + "functionality. " + "If no type is given explicitly the type is STATIC or SHARED based " + "on whether the current value of the variable BUILD_SHARED_LIBS is " + "true." + "\n" + "By default the library file will be created in the build tree " + "directory corresponding to the source tree directory in which " + "the command was invoked. " + "See documentation of the ARCHIVE_OUTPUT_DIRECTORY, " + "LIBRARY_OUTPUT_DIRECTORY, and RUNTIME_OUTPUT_DIRECTORY " + "target properties to change this location. " + "See documentation of the OUTPUT_NAME target property to change " + "the part of the final file name. " + "\n" + "If EXCLUDE_FROM_ALL is given the corresponding property will be " + "set on the created target. " + "See documentation of the EXCLUDE_FROM_ALL target property for " + "details." + "\n" + "The add_library command can also create IMPORTED library " + "targets using this signature:\n" + " add_library( IMPORTED)\n" + "An IMPORTED library target references a library file located " + "outside the project. " + "No rules are generated to build it. " + "The target name has scope in the directory in which it is created " + "and below. " + "It may be referenced like any target built within the project. " + "IMPORTED libraries are useful for convenient reference from " + "commands like target_link_libraries. " + "Details about the imported library are specified by setting " + "properties whose names begin in \"IMPORTED_\". " + "The most important such property is IMPORTED_LOCATION " + "(and its per-configuration version IMPORTED_LOCATION_) " + "which specifies the location of the main library file on disk. " + "See documentation of the IMPORTED_* properties for more information." + ; + } + + cmTypeMacro(cmAddLibraryCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmAddSubDirectoryCommand.cxx b/Source/cmAddSubDirectoryCommand.cxx new file mode 100644 index 000000000..76009e936 --- /dev/null +++ b/Source/cmAddSubDirectoryCommand.cxx @@ -0,0 +1,128 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddSubDirectoryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddSubDirectoryCommand.h" + +// cmAddSubDirectoryCommand +bool cmAddSubDirectoryCommand::InitialPass +(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // store the binpath + std::string srcArg = args[0]; + std::string binArg; + + bool excludeFromAll = false; + + // process the rest of the arguments looking for optional args + std::vector::const_iterator i = args.begin(); + ++i; + for(;i != args.end(); ++i) + { + if(*i == "EXCLUDE_FROM_ALL") + { + excludeFromAll = true; + continue; + } + else if (!binArg.size()) + { + binArg = *i; + } + else + { + this->SetError("called with incorrect number of arguments"); + return false; + } + } + + // Compute the full path to the specified source directory. + // Interpret a relative path with respect to the current source directory. + std::string srcPath; + if(cmSystemTools::FileIsFullPath(srcArg.c_str())) + { + srcPath = srcArg; + } + else + { + srcPath = this->Makefile->GetCurrentDirectory(); + srcPath += "/"; + srcPath += srcArg; + } + if(!cmSystemTools::FileIsDirectory(srcPath.c_str())) + { + std::string error = "given source \""; + error += srcArg; + error += "\" which is not an existing directory."; + this->SetError(error.c_str()); + return false; + } + srcPath = cmSystemTools::CollapseFullPath(srcPath.c_str()); + + // Compute the full path to the binary directory. + std::string binPath; + if(binArg.empty()) + { + // No binary directory was specified. If the source directory is + // not a subdirectory of the current directory then it is an + // error. + if(!cmSystemTools::FindLastString(srcPath.c_str(), + this->Makefile->GetCurrentDirectory())) + { + cmOStringStream e; + e << "not given a binary directory but the given source directory " + << "\"" << srcPath << "\" is not a subdirectory of \"" + << this->Makefile->GetCurrentDirectory() << "\". " + << "When specifying an out-of-tree source a binary directory " + << "must be explicitly specified."; + this->SetError(e.str().c_str()); + return false; + } + + // Remove the CurrentDirectory from the srcPath and replace it + // with the CurrentOutputDirectory. + binPath = srcPath; + cmSystemTools::ReplaceString(binPath, + this->Makefile->GetCurrentDirectory(), + this->Makefile->GetCurrentOutputDirectory()); + } + else + { + // Use the binary directory specified. + // Interpret a relative path with respect to the current binary directory. + if(cmSystemTools::FileIsFullPath(binArg.c_str())) + { + binPath = binArg; + } + else + { + binPath = this->Makefile->GetCurrentOutputDirectory(); + binPath += "/"; + binPath += binArg; + } + } + binPath = cmSystemTools::CollapseFullPath(binPath.c_str()); + + // Add the subdirectory using the computed full paths. + this->Makefile->AddSubDirectory(srcPath.c_str(), binPath.c_str(), + excludeFromAll, false, true); + + return true; +} diff --git a/Source/cmAddSubDirectoryCommand.h b/Source/cmAddSubDirectoryCommand.h new file mode 100644 index 000000000..ffd976ad5 --- /dev/null +++ b/Source/cmAddSubDirectoryCommand.h @@ -0,0 +1,96 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddSubDirectoryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAddSubDirectoryCommand_h +#define cmAddSubDirectoryCommand_h + +#include "cmCommand.h" + +/** \class cmAddSubDirectoryCommand + * \brief Specify a subdirectory to build + * + * cmAddSubDirectoryCommand specifies a subdirectory to process + * by CMake. CMake will descend + * into the specified source directory and process any CMakeLists.txt found. + */ +class cmAddSubDirectoryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddSubDirectoryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_subdirectory";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a subdirectory to the build."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_subdirectory(source_dir [binary_dir] \n" + " [EXCLUDE_FROM_ALL])\n" + "Add a subdirectory to the build. The source_dir specifies the " + "directory in which the source CmakeLists.txt and code files are " + "located. If it is a relative " + "path it will be evaluated with respect to the current " + "directory (the typical usage), but it may also be an absolute path. " + "The binary_dir specifies the directory in which to place the output " + "files. If it is a relative path it will be evaluated with respect " + "to the current output directory, but it may also be an absolute " + "path. If binary_dir is not specified, the value of source_dir, " + "before expanding any relative path, will be used (the typical usage). " + "The CMakeLists.txt file in the specified source directory will " + "be processed immediately by CMake before processing in the current " + "input file continues beyond this command.\n" + + "If the EXCLUDE_FROM_ALL argument is provided then this subdirectory " + "will not be included in build by default. Users will have to " + "explicitly start a build in the generated output directory. " + "This is useful for having cmake create a build system for a " + "set of examples in a project. One would want cmake to generate " + "a single build system for all the examples, but one may not want " + "the targets to show up in the main build system."; + } + + cmTypeMacro(cmAddSubDirectoryCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx new file mode 100644 index 000000000..0cc0d7685 --- /dev/null +++ b/Source/cmAddTestCommand.cxx @@ -0,0 +1,50 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddTestCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.29 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAddTestCommand.h" + +#include "cmTest.h" + + +// cmExecutableCommand +bool cmAddTestCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + // First argument is the name of the test Second argument is the name of + // the executable to run (a target or external program) Remaining arguments + // are the arguments to pass to the executable + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // store the arguments for the final pass + // also expand any CMake variables + + std::vector arguments; + std::vector::const_iterator it; + for ( it = args.begin() + 2; it != args.end(); ++ it ) + { + arguments.push_back(*it); + } + + cmTest* test = this->Makefile->CreateTest(args[0].c_str()); + test->SetCommand(args[1].c_str()); + test->SetArguments(arguments); + + return true; +} diff --git a/Source/cmAddTestCommand.h b/Source/cmAddTestCommand.h new file mode 100644 index 000000000..f913971cf --- /dev/null +++ b/Source/cmAddTestCommand.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAddTestCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAddTestCommand_h +#define cmAddTestCommand_h + +#include "cmCommand.h" + +/** \class cmAddTestCommand + * \brief Add a test to the lists of tests to run. + * + * cmAddTestCommand adds a test to the list of tests to run . + */ +class cmAddTestCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAddTestCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "add_test";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add a test to the project with the specified arguments."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " add_test(testname Exename arg1 arg2 ...)\n" + "If the ENABLE_TESTING command has been run, this command adds a " + "test target to the current directory. If ENABLE_TESTING has not " + "been run, this command does nothing. " + "The tests are run by the testing subsystem by executing Exename " + "with the specified arguments. Exename can be either an executable " + "built by this project or an arbitrary executable on the " + "system (like tclsh). The test will be run with the current working " + "directory set to the CMakeList.txt files corresponding directory " + "in the binary tree."; + } + + cmTypeMacro(cmAddTestCommand, cmCommand); + +}; + + +#endif diff --git a/Source/cmAuxSourceDirectoryCommand.cxx b/Source/cmAuxSourceDirectoryCommand.cxx new file mode 100644 index 000000000..06159ddfd --- /dev/null +++ b/Source/cmAuxSourceDirectoryCommand.cxx @@ -0,0 +1,94 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAuxSourceDirectoryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.26.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmAuxSourceDirectoryCommand.h" +#include "cmSourceFile.h" + +#include + +// cmAuxSourceDirectoryCommand +bool cmAuxSourceDirectoryCommand::InitialPass +(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 || args.size() > 2) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string sourceListValue; + std::string templateDirectory = args[0]; + this->Makefile->AddExtraDirectory(templateDirectory.c_str()); + std::string tdir; + if(!cmSystemTools::FileIsFullPath(templateDirectory.c_str())) + { + tdir = this->Makefile->GetCurrentDirectory(); + tdir += "/"; + tdir += templateDirectory; + } + else + { + tdir = templateDirectory; + } + + // was the list already populated + const char *def = this->Makefile->GetDefinition(args[1].c_str()); + if (def) + { + sourceListValue = def; + } + + // Load all the files in the directory + cmsys::Directory dir; + if(dir.Load(tdir.c_str())) + { + size_t numfiles = dir.GetNumberOfFiles(); + for(size_t i =0; i < numfiles; ++i) + { + std::string file = dir.GetFile(static_cast(i)); + // Split the filename into base and extension + std::string::size_type dotpos = file.rfind("."); + if( dotpos != std::string::npos ) + { + std::string ext = file.substr(dotpos+1); + std::string base = file.substr(0, dotpos); + // Process only source files + if( base.size() != 0 + && std::find( this->Makefile->GetSourceExtensions().begin(), + this->Makefile->GetSourceExtensions().end(), ext ) + != this->Makefile->GetSourceExtensions().end() ) + { + std::string fullname = templateDirectory; + fullname += "/"; + fullname += file; + // add the file as a class file so + // depends can be done + cmSourceFile* sf = + this->Makefile->GetOrCreateSource(fullname.c_str()); + sf->SetProperty("ABSTRACT","0"); + if(!sourceListValue.empty()) + { + sourceListValue += ";"; + } + sourceListValue += fullname; + } + } + } + } + this->Makefile->AddDefinition(args[1].c_str(), sourceListValue.c_str()); + return true; +} + diff --git a/Source/cmAuxSourceDirectoryCommand.h b/Source/cmAuxSourceDirectoryCommand.h new file mode 100644 index 000000000..4802bb11c --- /dev/null +++ b/Source/cmAuxSourceDirectoryCommand.h @@ -0,0 +1,91 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmAuxSourceDirectoryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmAuxSourceDirectoryCommand_h +#define cmAuxSourceDirectoryCommand_h + +#include "cmCommand.h" + +/** \class cmAuxSourceDirectoryCommand + * \brief Specify auxiliary source code directories. + * + * cmAuxSourceDirectoryCommand specifies source code directories + * that must be built as part of this build process. This directories + * are not recursively processed like the SUBDIR command (cmSubdirCommand). + * A side effect of this command is to create a subdirectory in the build + * directory structure. + */ +class cmAuxSourceDirectoryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmAuxSourceDirectoryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "aux_source_directory";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Find all source files in a directory."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " aux_source_directory( )\n" + "Collects the names of all the source files in the specified " + "directory and stores the list in the provided. This " + "command is intended to be used by projects that use explicit " + "template instantiation. Template instantiation files can be " + "stored in a \"Templates\" subdirectory and collected automatically " + "using this command to avoid manually listing all instantiations.\n" + "It is tempting to use this command to avoid writing the list of " + "source files for a library or executable target. While this seems " + "to work, there is no way for CMake to generate a build system that " + "knows when a new source file has been added. Normally the " + "generated build system knows when it needs to rerun CMake because " + "the CMakeLists.txt file is modified to add a new source. When the " + "source is just added to the directory without modifying this file, " + "one would have to manually rerun CMake to generate a build system " + "incorporating the new file."; + } + + cmTypeMacro(cmAuxSourceDirectoryCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmBootstrapCommands.cxx b/Source/cmBootstrapCommands.cxx new file mode 100644 index 000000000..8a636509c --- /dev/null +++ b/Source/cmBootstrapCommands.cxx @@ -0,0 +1,164 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBootstrapCommands.cxx,v $ + Language: C++ + Date: $Date: 2008-03-01 20:20:35 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// This file is used to compile all the commands +// that CMake knows about at compile time. +// This is sort of a boot strapping approach since you would +// like to have CMake to build CMake. +#include "cmCommands.h" +#include "cmAddCustomCommandCommand.cxx" +#include "cmAddCustomTargetCommand.cxx" +#include "cmAddDefinitionsCommand.cxx" +#include "cmAddDependenciesCommand.cxx" +#include "cmAddExecutableCommand.cxx" +#include "cmAddLibraryCommand.cxx" +#include "cmAddSubDirectoryCommand.cxx" +#include "cmAddTestCommand.cxx" +#include "cmBreakCommand.cxx" +#include "cmBuildCommand.cxx" +#include "cmCMakeMinimumRequired.cxx" +#include "cmCMakePolicyCommand.cxx" +#include "cmCommandArgumentsHelper.cxx" +#include "cmConfigureFileCommand.cxx" +#include "cmCoreTryCompile.cxx" +#include "cmCreateTestSourceList.cxx" +#include "cmDefinePropertyCommand.cxx" +#include "cmElseCommand.cxx" +#include "cmEnableTestingCommand.cxx" +#include "cmEndForEachCommand.cxx" +#include "cmEndFunctionCommand.cxx" +#include "cmEndIfCommand.cxx" +#include "cmEndMacroCommand.cxx" +#include "cmExecProgramCommand.cxx" +#include "cmExecuteProcessCommand.cxx" +#include "cmExternalMakefileProjectGenerator.cxx" +#include "cmFindBase.cxx" +#include "cmFindCommon.cxx" +#include "cmFileCommand.cxx" +#include "cmFindFileCommand.cxx" +#include "cmFindLibraryCommand.cxx" +#include "cmFindPackageCommand.cxx" +#include "cmFindPathCommand.cxx" +#include "cmFindProgramCommand.cxx" +#include "cmForEachCommand.cxx" +#include "cmFunctionCommand.cxx" +#include "cmGetCMakePropertyCommand.cxx" +#include "cmGetDirectoryPropertyCommand.cxx" +#include "cmGetFilenameComponentCommand.cxx" +#include "cmGetPropertyCommand.cxx" +#include "cmGetSourceFilePropertyCommand.cxx" +#include "cmGetTargetPropertyCommand.cxx" +#include "cmHexFileConverter.cxx" +#include "cmIfCommand.cxx" +#include "cmIncludeCommand.cxx" +#include "cmIncludeDirectoryCommand.cxx" +#include "cmIncludeRegularExpressionCommand.cxx" +#include "cmInstallFilesCommand.cxx" +#include "cmInstallCommandArguments.cxx" +#include "cmInstallCommand.cxx" +#include "cmInstallTargetsCommand.cxx" +#include "cmLinkDirectoriesCommand.cxx" +#include "cmListCommand.cxx" +#include "cmMacroCommand.cxx" +#include "cmMakeDirectoryCommand.cxx" +#include "cmMarkAsAdvancedCommand.cxx" +#include "cmMathCommand.cxx" +#include "cmMessageCommand.cxx" +#include "cmOptionCommand.cxx" +#include "cmProjectCommand.cxx" +#include "cmReturnCommand.cxx" +#include "cmSeparateArgumentsCommand.cxx" +#include "cmSetCommand.cxx" +#include "cmSetPropertyCommand.cxx" +#include "cmSetSourceFilesPropertiesCommand.cxx" +#include "cmSetTargetPropertiesCommand.cxx" +#include "cmSetTestsPropertiesCommand.cxx" +#include "cmSiteNameCommand.cxx" +#include "cmStringCommand.cxx" +#include "cmSubdirCommand.cxx" +#include "cmTargetLinkLibrariesCommand.cxx" +#include "cmTryCompileCommand.cxx" +#include "cmTryRunCommand.cxx" + +void GetBootstrapCommands(std::list& commands) +{ + commands.push_back(new cmAddCustomCommandCommand); + commands.push_back(new cmAddCustomTargetCommand); + commands.push_back(new cmAddDefinitionsCommand); + commands.push_back(new cmAddDependenciesCommand); + commands.push_back(new cmAddExecutableCommand); + commands.push_back(new cmAddLibraryCommand); + commands.push_back(new cmAddSubDirectoryCommand); + commands.push_back(new cmAddTestCommand); + commands.push_back(new cmBreakCommand); + commands.push_back(new cmBuildCommand); + commands.push_back(new cmCMakeMinimumRequired); + commands.push_back(new cmCMakePolicyCommand); + commands.push_back(new cmConfigureFileCommand); + commands.push_back(new cmCreateTestSourceList); + commands.push_back(new cmDefinePropertyCommand); + commands.push_back(new cmElseCommand); + commands.push_back(new cmEnableTestingCommand); + commands.push_back(new cmEndForEachCommand); + commands.push_back(new cmEndFunctionCommand); + commands.push_back(new cmEndIfCommand); + commands.push_back(new cmEndMacroCommand); + commands.push_back(new cmExecProgramCommand); + commands.push_back(new cmExecuteProcessCommand); + commands.push_back(new cmFileCommand); + commands.push_back(new cmFindFileCommand); + commands.push_back(new cmFindLibraryCommand); + commands.push_back(new cmFindPackageCommand); + commands.push_back(new cmFindPathCommand); + commands.push_back(new cmFindProgramCommand); + commands.push_back(new cmForEachCommand); + commands.push_back(new cmFunctionCommand); + commands.push_back(new cmGetCMakePropertyCommand); + commands.push_back(new cmGetDirectoryPropertyCommand); + commands.push_back(new cmGetFilenameComponentCommand); + commands.push_back(new cmGetPropertyCommand); + commands.push_back(new cmGetSourceFilePropertyCommand); + commands.push_back(new cmGetTargetPropertyCommand); + commands.push_back(new cmIfCommand); + commands.push_back(new cmIncludeCommand); + commands.push_back(new cmIncludeDirectoryCommand); + commands.push_back(new cmIncludeRegularExpressionCommand); + commands.push_back(new cmInstallCommand); + commands.push_back(new cmInstallFilesCommand); + commands.push_back(new cmInstallTargetsCommand); + commands.push_back(new cmLinkDirectoriesCommand); + commands.push_back(new cmListCommand); + commands.push_back(new cmMacroCommand); + commands.push_back(new cmMakeDirectoryCommand); + commands.push_back(new cmMarkAsAdvancedCommand); + commands.push_back(new cmMathCommand); + commands.push_back(new cmMessageCommand); + commands.push_back(new cmOptionCommand); + commands.push_back(new cmProjectCommand); + commands.push_back(new cmReturnCommand); + commands.push_back(new cmSeparateArgumentsCommand); + commands.push_back(new cmSetCommand); + commands.push_back(new cmSetPropertyCommand); + commands.push_back(new cmSetSourceFilesPropertiesCommand); + commands.push_back(new cmSetTargetPropertiesCommand); + commands.push_back(new cmSetTestsPropertiesCommand); + commands.push_back(new cmSiteNameCommand); + commands.push_back(new cmStringCommand); + commands.push_back(new cmSubdirCommand); + commands.push_back(new cmTargetLinkLibrariesCommand); + commands.push_back(new cmTryCompileCommand); + commands.push_back(new cmTryRunCommand); +} diff --git a/Source/cmBreakCommand.cxx b/Source/cmBreakCommand.cxx new file mode 100755 index 000000000..268490aca --- /dev/null +++ b/Source/cmBreakCommand.cxx @@ -0,0 +1,26 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBreakCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:26 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmBreakCommand.h" + +// cmBreakCommand +bool cmBreakCommand::InitialPass(std::vector const&, + cmExecutionStatus &status) +{ + status.SetBreakInvoked(true); + return true; +} + diff --git a/Source/cmBreakCommand.h b/Source/cmBreakCommand.h new file mode 100755 index 000000000..8d9f7609a --- /dev/null +++ b/Source/cmBreakCommand.h @@ -0,0 +1,78 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBreakCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:26 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmBreakCommand_h +#define cmBreakCommand_h + +#include "cmCommand.h" + +/** \class cmBreakCommand + * \brief Break from an enclosing foreach or while loop + * + * cmBreakCommand returns from an enclosing foreach or while loop + */ +class cmBreakCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmBreakCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "break";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Break from an enclosing foreach or while loop."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " break()\n" + "Breaks from an enclosing foreach loop or while loop"; + } + + cmTypeMacro(cmBreakCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx new file mode 100644 index 000000000..0482bab8e --- /dev/null +++ b/Source/cmBuildCommand.cxx @@ -0,0 +1,57 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBuildCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmBuildCommand.h" + +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + +// cmBuildCommand +bool cmBuildCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + const char* define = args[0].c_str(); + const char* cacheValue + = this->Makefile->GetDefinition(define); + std::string makeprogram = args[1]; + std::string configType = "Release"; + const char* cfg = getenv("CMAKE_CONFIG_TYPE"); + if ( cfg ) + { + configType = cfg; + } + std::string makecommand = this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->GenerateBuildCommand + (makeprogram.c_str(), this->Makefile->GetProjectName(), 0, + 0, configType.c_str(), true, false); + + if(cacheValue) + { + return true; + } + this->Makefile->AddCacheDefinition(define, + makecommand.c_str(), + "Command used to build entire project " + "from the command line.", + cmCacheManager::STRING); + return true; +} + diff --git a/Source/cmBuildCommand.h b/Source/cmBuildCommand.h new file mode 100644 index 000000000..054434683 --- /dev/null +++ b/Source/cmBuildCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBuildCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmBuildCommand_h +#define cmBuildCommand_h + +#include "cmCommand.h" + +/** \class cmBuildCommand + * \brief Build a CMAKE variable + * + * cmBuildCommand sets a variable to a value with expansion. + */ +class cmBuildCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmBuildCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "build_command";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get the command line that will build this project."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " build_command( )\n" + "Sets the given to a string containing the command that " + "will build this project from the root of the build tree using the " + "build tool given by . should be msdev, " + "nmake, make or one of the end user build tools. " + "This is useful for configuring testing systems."; + } + + cmTypeMacro(cmBuildCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmBuildNameCommand.cxx b/Source/cmBuildNameCommand.cxx new file mode 100644 index 000000000..08a9e2a21 --- /dev/null +++ b/Source/cmBuildNameCommand.cxx @@ -0,0 +1,82 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBuildNameCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmBuildNameCommand.h" + +#include + +// cmBuildNameCommand +bool cmBuildNameCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); + if(cacheValue) + { + // do we need to correct the value? + cmsys::RegularExpression reg("[()/]"); + if (reg.find(cacheValue)) + { + std::string cv = cacheValue; + cmSystemTools::ReplaceString(cv,"/", "_"); + cmSystemTools::ReplaceString(cv,"(", "_"); + cmSystemTools::ReplaceString(cv,")", "_"); + this->Makefile->AddCacheDefinition(args[0].c_str(), + cv.c_str(), + "Name of build.", + cmCacheManager::STRING); + } + return true; + } + + + std::string buildname = "WinNT"; + if(this->Makefile->GetDefinition("UNIX")) + { + buildname = ""; + cmSystemTools::RunSingleCommand("uname -a", &buildname); + if(buildname.length()) + { + std::string RegExp = "([^ ]*) [^ ]* ([^ ]*) "; + cmsys::RegularExpression reg( RegExp.c_str() ); + if(reg.find(buildname.c_str())) + { + buildname = reg.match(1) + "-" + reg.match(2); + } + } + } + std::string compiler = "${CMAKE_CXX_COMPILER}"; + this->Makefile->ExpandVariablesInString ( compiler ); + buildname += "-"; + buildname += cmSystemTools::GetFilenameName(compiler); + cmSystemTools::ReplaceString(buildname, + "/", "_"); + cmSystemTools::ReplaceString(buildname, + "(", "_"); + cmSystemTools::ReplaceString(buildname, + ")", "_"); + + this->Makefile->AddCacheDefinition(args[0].c_str(), + buildname.c_str(), + "Name of build.", + cmCacheManager::STRING); + return true; +} + diff --git a/Source/cmBuildNameCommand.h b/Source/cmBuildNameCommand.h new file mode 100644 index 000000000..d4184a80f --- /dev/null +++ b/Source/cmBuildNameCommand.h @@ -0,0 +1,87 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmBuildNameCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmBuildNameCommand_h +#define cmBuildNameCommand_h + +#include "cmCommand.h" + +/** \class cmBuildNameCommand + * \brief BuildName a CMAKE variable + * + * cmBuildNameCommand sets a variable to a value with expansion. + */ +class cmBuildNameCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmBuildNameCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "build_name";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Deprecated. Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " build_name(variable)\n" + "Sets the specified variable to a string representing the platform " + "and compiler settings. These values are now available through the " + "CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmBuildNameCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmCMakeMinimumRequired.cxx b/Source/cmCMakeMinimumRequired.cxx new file mode 100644 index 000000000..14a64c022 --- /dev/null +++ b/Source/cmCMakeMinimumRequired.cxx @@ -0,0 +1,121 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCMakeMinimumRequired.cxx,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.17.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCMakeMinimumRequired.h" + +#include "cmVersion.h" + +// cmCMakeMinimumRequired +bool cmCMakeMinimumRequired +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + // Process arguments. + std::string version_string; + bool doing_version = false; + for(unsigned int i=0; i < args.size(); ++i) + { + if(args[i] == "VERSION") + { + doing_version = true; + } + else if(args[i] == "FATAL_ERROR") + { + if(doing_version) + { + this->SetError("called with no value for VERSION."); + return false; + } + doing_version = false; + } + else if(doing_version) + { + doing_version = false; + version_string = args[i]; + } + else + { + cmOStringStream e; + e << "called with unknown argument \"" << args[i].c_str() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + if(doing_version) + { + this->SetError("called with no value for VERSION."); + return false; + } + + // Make sure there was a version to check. + if(version_string.empty()) + { + return true; + } + + // Save the required version string. + this->Makefile->AddDefinition("CMAKE_MINIMUM_REQUIRED_VERSION", + version_string.c_str()); + + + // Get the current version number. + int current_major = cmVersion::GetMajorVersion(); + int current_minor = cmVersion::GetMinorVersion(); + int current_patch = cmVersion::GetPatchVersion(); + + // Parse the required version number. If no patch-level is given + // use zero. + int required_major = 0; + int required_minor = 0; + int required_patch = 0; + if(sscanf(version_string.c_str(), "%d.%d.%d", + &required_major, &required_minor, &required_patch) < 2) + { + cmOStringStream e; + e << "could not parse VERSION \"" << version_string.c_str() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + + // Compare the version numbers. + if(current_major < required_major || + current_major == required_major && + current_minor < required_minor || + current_major == required_major && + current_minor == required_minor && + current_patch < required_patch) + { + // The current version is too low. + cmOStringStream e; + e << "CMake " << version_string.c_str() + << " or higher is required. You are running version " + << current_major << "." << current_minor << "." << current_patch; + this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); + cmSystemTools::SetFatalErrorOccured(); + return true; + } + + if (required_major < 2 || required_major == 2 && required_minor < 4) + { + this->Makefile->SetPolicyVersion("2.4"); + } + else + { + this->Makefile->SetPolicyVersion(version_string.c_str()); + } + + return true; +} + diff --git a/Source/cmCMakeMinimumRequired.h b/Source/cmCMakeMinimumRequired.h new file mode 100644 index 000000000..23c616d19 --- /dev/null +++ b/Source/cmCMakeMinimumRequired.h @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCMakeMinimumRequired.h,v $ + Language: C++ + Date: $Date: 2008-03-18 14:23:54 $ + Version: $Revision: 1.12.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCMakeMinimumRequired_h +#define cmCMakeMinimumRequired_h + +#include "cmCommand.h" + +/** \class cmCMakeMinimumRequired + * \brief Build a CMAKE variable + * + * cmCMakeMinimumRequired sets a variable to a value with expansion. + */ +class cmCMakeMinimumRequired : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmCMakeMinimumRequired; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "cmake_minimum_required";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set the minimum required version of cmake for a project."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " cmake_minimum_required(VERSION major[.minor[.patch]]\n" + " [FATAL_ERROR])\n" + "If the current version of CMake is lower than that required " + "it will stop processing the project and report an error. " + "When a version higher than 2.4 is specified the command implicitly " + "invokes\n" + " cmake_policy(VERSION major[.minor[.patch]])\n" + "which sets the cmake policy version level to the version specified. " + "When version 2.4 or lower is given the command implicitly invokes\n" + " cmake_policy(VERSION 2.4)\n" + "which enables compatibility features for CMake 2.4 and lower.\n" + "The FATAL_ERROR option is accepted but ignored. It is left from " + "CMake versions 2.4 and lower in which failure to meet the minimum " + "version was a warning by default."; + } + + cmTypeMacro(cmCMakeMinimumRequired, cmCommand); +}; + + + +#endif diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx new file mode 100755 index 000000000..6504f5198 --- /dev/null +++ b/Source/cmCMakePolicyCommand.cxx @@ -0,0 +1,122 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCMakePolicyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.2.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCMakePolicyCommand.h" + +#include "cmVersion.h" + +// cmCMakePolicyCommand +bool cmCMakePolicyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("requires at least one argument."); + return false; + } + + if(args[0] == "SET") + { + return this->HandleSetMode(args); + } + else if(args[0] == "PUSH") + { + if(args.size() > 1) + { + this->SetError("PUSH may not be given additional arguments."); + return false; + } + return this->Makefile->PushPolicy(); + } + else if(args[0] == "POP") + { + if(args.size() > 1) + { + this->SetError("POP may not be given additional arguments."); + return false; + } + if(this->Makefile->PopPolicy(false)) + { + return true; + } + else + { + this->SetError("POP without matching PUSH"); + return false; + } + } + else if(args[0] == "VERSION") + { + return this->HandleVersionMode(args); + } + + cmOStringStream e; + e << "given unknown first argument \"" << args[0] << "\""; + this->SetError(e.str().c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmCMakePolicyCommand::HandleSetMode(std::vector const& args) +{ + if(args.size() != 3) + { + this->SetError("SET must be given exactly 2 additional arguments."); + return false; + } + + cmPolicies::PolicyStatus status; + if(args[2] == "OLD") + { + status = cmPolicies::OLD; + } + else if(args[2] == "NEW") + { + status = cmPolicies::NEW; + } + else + { + cmOStringStream e; + e << "SET given unrecognized policy status \"" << args[2] << "\""; + this->SetError(e.str().c_str()); + return false; + } + + if(!this->Makefile->SetPolicy(args[1].c_str(), status)) + { + this->SetError("SET failed to set policy."); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool +cmCMakePolicyCommand::HandleVersionMode(std::vector const& args) +{ + if(args.size() <= 1) + { + this->SetError("VERSION not given an argument"); + return false; + } + else if(args.size() >= 3) + { + this->SetError("VERSION given too many arguments"); + return false; + } + this->Makefile->SetPolicyVersion(args[1].c_str()); + return true; +} diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h new file mode 100755 index 000000000..229b1fe5c --- /dev/null +++ b/Source/cmCMakePolicyCommand.h @@ -0,0 +1,131 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCMakePolicyCommand.h,v $ + Language: C++ + Date: $Date: 2008-03-18 14:23:54 $ + Version: $Revision: 1.4.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCMakePolicyCommand_h +#define cmCMakePolicyCommand_h + +#include "cmCommand.h" + +/** \class cmCMakePolicyCommand + * \brief Set how CMake should handle policies + * + * cmCMakePolicyCommand sets how CMake should deal with backwards + * compatibility policies. + */ +class cmCMakePolicyCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmCMakePolicyCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "cmake_policy";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Manage CMake Policy settings."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "As CMake evolves it is sometimes necessary to change existing " + "behavior in order to fix bugs or improve implementations of " + "existing features. " + "The CMake Policy mechanism is designed to help keep existing projects " + "building as new versions of CMake introduce changes in behavior. " + "Each new policy (behavioral change) is given an identifier of " + "the form \"CMP\" where \"\" is an integer index. " + "Documentation associated with each policy describes the OLD and NEW " + "behavior and the reason the policy was introduced. " + "Projects may set each policy to select the desired behavior. " + "When CMake needs to know which behavior to use it checks for " + "a setting specified by the project. " + "If no setting is available the OLD behavior is assumed and a warning " + "is produced requesting that the policy be set.\n" + "The cmake_policy command is used to set policies to OLD or NEW " + "behavior. " + "While setting policies individually is supported, we encourage " + "projects to set policies based on CMake versions.\n" + " cmake_policy(VERSION major.minor[.patch])\n" + "Specify that the current CMake list file is written for the " + "given version of CMake. " + "All policies introduced in the specified version or earlier " + "will be set to use NEW behavior. " + "All policies introduced after the specified version will be reset " + "to use OLD behavior with a warning. " + "This effectively requests behavior preferred as of a given CMake " + "version and tells newer CMake versions to warn about their new " + "policies. " + "The policy version specified must be at least 2.4 or the command " + "will report an error. " + "In order to get compatibility features supporting versions earlier " + "than 2.4 see documentation of policy CMP0001." + "\n" + " cmake_policy(SET CMP NEW)\n" + " cmake_policy(SET CMP OLD)\n" + "Tell CMake to use the OLD or NEW behavior for a given policy. " + "Projects depending on the old behavior of a given policy may " + "silence a policy warning by setting the policy state to OLD. " + "Alternatively one may fix the project to work with the new behavior " + "and set the policy state to NEW." + "\n" + " cmake_policy(PUSH)\n" + " cmake_policy(POP)\n" + "Push and pop the current policy setting state on a stack. " + "Each PUSH must have a matching POP. " + "This is useful when mixing multiple projects, subprojects, and " + "files included from external projects that may each have been " + "written for a different version of CMake. " + "Each subdirectory entered by the project automatically pushes " + "a new level on the stack to isolate the subdirectories from " + "their parents."; + } + + cmTypeMacro(cmCMakePolicyCommand, cmCommand); +private: + bool HandleSetMode(std::vector const& args); + bool HandleVersionMode(std::vector const& args); +}; + + + +#endif diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx new file mode 100644 index 000000000..e21354980 --- /dev/null +++ b/Source/cmCPluginAPI.cxx @@ -0,0 +1,950 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPluginAPI.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.42 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + this file contains the implementation of the C API to CMake. Generally + these routines just manipulate arguments and then call the associated + methods on the CMake classes. */ + +#include "cmMakefile.h" +#include "cmCPluginAPI.h" +#include "cmVersion.h" + +#include "cmSourceFile.h" + +#include + +#ifdef __QNX__ +# include /* for malloc/free on QNX */ +#endif + +extern "C" +{ + +void CCONV *cmGetClientData(void *info) +{ + return ((cmLoadedCommandInfo *)info)->ClientData; +} + +void CCONV cmSetClientData(void *info, void *cd) +{ + ((cmLoadedCommandInfo *)info)->ClientData = cd; +} + +void CCONV cmSetError(void *info, const char *err) +{ + if (((cmLoadedCommandInfo *)info)->Error) + { + free(((cmLoadedCommandInfo *)info)->Error); + } + ((cmLoadedCommandInfo *)info)->Error = strdup(err); +} + +unsigned int CCONV cmGetCacheMajorVersion(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetCacheMajorVersion(); +} +unsigned int CCONV cmGetCacheMinorVersion(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetCacheMinorVersion(); +} + +unsigned int CCONV cmGetMajorVersion(void *) +{ + return cmVersion::GetMajorVersion(); +} + +unsigned int CCONV cmGetMinorVersion(void *) +{ + return cmVersion::GetMinorVersion(); +} + +void CCONV cmAddDefinition(void *arg, const char* name, const char* value) +{ + cmMakefile *mf = static_cast(arg); + mf->AddDefinition(name,value); +} + +/* Add a definition to this makefile and the global cmake cache. */ +void CCONV cmAddCacheDefinition(void *arg, const char* name, + const char* value, const char* doc, int type) +{ + cmMakefile *mf = static_cast(arg); + + switch (type) + { + case CM_CACHE_BOOL: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::BOOL); + break; + case CM_CACHE_PATH: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::PATH); + break; + case CM_CACHE_FILEPATH: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::FILEPATH); + break; + case CM_CACHE_STRING: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::STRING); + break; + case CM_CACHE_INTERNAL: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::INTERNAL); + break; + case CM_CACHE_STATIC: + mf->AddCacheDefinition(name,value,doc, + cmCacheManager::STATIC); + break; + } +} + +const char* CCONV cmGetProjectName(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetProjectName(); +} + +const char* CCONV cmGetHomeDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetHomeDirectory(); +} +const char* CCONV cmGetHomeOutputDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetHomeOutputDirectory(); +} +const char* CCONV cmGetStartDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetStartDirectory(); +} +const char* CCONV cmGetStartOutputDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetStartOutputDirectory(); +} +const char* CCONV cmGetCurrentDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetCurrentDirectory(); +} +const char* CCONV cmGetCurrentOutputDirectory(void *arg) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetCurrentOutputDirectory(); +} +const char* CCONV cmGetDefinition(void *arg,const char*def) +{ + cmMakefile *mf = static_cast(arg); + return mf->GetDefinition(def); +} + +int CCONV cmIsOn(void *arg, const char* name) +{ + cmMakefile *mf = static_cast(arg); + return static_cast(mf->IsOn(name)); +} + +/** Check if a command exists. */ +int CCONV cmCommandExists(void *arg, const char* name) +{ + cmMakefile *mf = static_cast(arg); + return static_cast(mf->CommandExists(name)); +} + +void CCONV cmAddDefineFlag(void *arg, const char* definition) +{ + cmMakefile *mf = static_cast(arg); + mf->AddDefineFlag(definition); +} + +void CCONV cmAddLinkDirectoryForTarget(void *arg, const char *tgt, + const char* d) +{ + cmMakefile *mf = static_cast(arg); + mf->AddLinkDirectoryForTarget(tgt,d); +} + + +void CCONV cmAddExecutable(void *arg, const char *exename, + int numSrcs, const char **srcs, int win32) +{ + cmMakefile *mf = static_cast(arg); + std::vector srcs2; + int i; + for (i = 0; i < numSrcs; ++i) + { + srcs2.push_back(srcs[i]); + } + cmTarget* tg = mf->AddExecutable(exename, srcs2); + if ( win32 ) + { + tg->SetProperty("WIN32_EXECUTABLE", "ON"); + } +} + +void CCONV cmAddUtilityCommand(void *arg, const char* utilityName, + const char* command, + const char* arguments, + int all, + int numDepends, + const char **depends, + int, + const char **) +{ + // Get the makefile instance. Perform an extra variable expansion + // now because the API caller expects it. + cmMakefile* mf = static_cast(arg); + + // Construct the command line for the command. + cmCustomCommandLine commandLine; + std::string expand = command; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + if(arguments && arguments[0]) + { + // TODO: Parse arguments! + expand = arguments; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + } + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Accumulate the list of dependencies. + std::vector depends2; + for(int i = 0; i < numDepends; ++i) + { + expand = depends[i]; + depends2.push_back(mf->ExpandVariablesInString(expand)); + } + + // Pass the call to the makefile instance. + mf->AddUtilityCommand(utilityName, (all ? false : true), + 0, depends2, commandLines); +} +void CCONV cmAddCustomCommand(void *arg, const char* source, + const char* command, + int numArgs, const char **args, + int numDepends, const char **depends, + int numOutputs, const char **outputs, + const char *target) +{ + // Get the makefile instance. Perform an extra variable expansion + // now because the API caller expects it. + cmMakefile* mf = static_cast(arg); + + // Construct the command line for the command. + cmCustomCommandLine commandLine; + std::string expand = command; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + for(int i=0; i < numArgs; ++i) + { + expand = args[i]; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + } + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Accumulate the list of dependencies. + std::vector depends2; + for(int i = 0; i < numDepends; ++i) + { + expand = depends[i]; + depends2.push_back(mf->ExpandVariablesInString(expand)); + } + + // Accumulate the list of outputs. + std::vector outputs2; + for(int i = 0; i < numOutputs; ++i) + { + expand = outputs[i]; + outputs2.push_back(mf->ExpandVariablesInString(expand)); + } + + // Pass the call to the makefile instance. + const char* no_comment = 0; + mf->AddCustomCommandOldStyle(target, outputs2, depends2, source, + commandLines, no_comment); +} + +void CCONV cmAddCustomCommandToOutput(void *arg, const char* output, + const char* command, + int numArgs, const char **args, + const char* main_dependency, + int numDepends, const char **depends) +{ + // Get the makefile instance. Perform an extra variable expansion + // now because the API caller expects it. + cmMakefile* mf = static_cast(arg); + + // Construct the command line for the command. + cmCustomCommandLine commandLine; + std::string expand = command; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + for(int i=0; i < numArgs; ++i) + { + expand = args[i]; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + } + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Accumulate the list of dependencies. + std::vector depends2; + for(int i = 0; i < numDepends; ++i) + { + expand = depends[i]; + depends2.push_back(mf->ExpandVariablesInString(expand)); + } + + // Pass the call to the makefile instance. + const char* no_comment = 0; + const char* no_working_dir = 0; + mf->AddCustomCommandToOutput(output, depends2, main_dependency, + commandLines, no_comment, no_working_dir); +} + +void CCONV cmAddCustomCommandToTarget(void *arg, const char* target, + const char* command, + int numArgs, const char **args, + int commandType) +{ + // Get the makefile instance. + cmMakefile* mf = static_cast(arg); + + // Construct the command line for the command. Perform an extra + // variable expansion now because the API caller expects it. + cmCustomCommandLine commandLine; + std::string expand = command; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + for(int i=0; i < numArgs; ++i) + { + expand = args[i]; + commandLine.push_back(mf->ExpandVariablesInString(expand)); + } + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Select the command type. + cmTarget::CustomCommandType cctype = cmTarget::POST_BUILD; + switch (commandType) + { + case CM_PRE_BUILD: + cctype = cmTarget::PRE_BUILD; + break; + case CM_PRE_LINK: + cctype = cmTarget::PRE_LINK; + break; + case CM_POST_BUILD: + cctype = cmTarget::POST_BUILD; + break; + } + + // Pass the call to the makefile instance. + std::vector no_depends; + const char* no_comment = 0; + const char* no_working_dir = 0; + mf->AddCustomCommandToTarget(target, no_depends, commandLines, + cctype, no_comment, no_working_dir); +} + +void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt, + const char*value, int libtype) +{ + cmMakefile *mf = static_cast(arg); + + switch (libtype) + { + case CM_LIBRARY_GENERAL: + mf->AddLinkLibraryForTarget(tgt,value, cmTarget::GENERAL); + break; + case CM_LIBRARY_DEBUG: + mf->AddLinkLibraryForTarget(tgt,value, cmTarget::DEBUG); + break; + case CM_LIBRARY_OPTIMIZED: + mf->AddLinkLibraryForTarget(tgt,value, cmTarget::OPTIMIZED); + break; + } +} + +void CCONV cmAddLibrary(void *arg, const char *libname, int shared, + int numSrcs, const char **srcs) +{ + cmMakefile *mf = static_cast(arg); + std::vector srcs2; + int i; + for (i = 0; i < numSrcs; ++i) + { + srcs2.push_back(srcs[i]); + } + mf->AddLibrary(libname, + (shared? cmTarget::SHARED_LIBRARY : cmTarget::STATIC_LIBRARY), + srcs2); +} + +char CCONV *cmExpandVariablesInString(void *arg, const char *source, + int escapeQuotes, int atOnly) +{ + cmMakefile *mf = static_cast(arg); + std::string barf = source; + std::string result = + mf->ExpandVariablesInString(barf, + (escapeQuotes ? true : false), + (atOnly ? true : false)); + char *res = static_cast(malloc(result.size() + 1)); + if (result.size()) + { + strcpy(res,result.c_str()); + } + res[result.size()] = '\0'; + return res; +} + + +int CCONV cmExecuteCommand(void *arg, const char *name, + int numArgs, const char **args) +{ + cmMakefile *mf = static_cast(arg); + cmListFileFunction lff; + lff.Name = name; + for(int i = 0; i < numArgs; ++i) + { + // Assume all arguments are quoted. + lff.Arguments.push_back(cmListFileArgument(args[i], true, + "[CMake-Plugin]", 0)); + } + cmExecutionStatus status; + return mf->ExecuteCommand(lff,status); +} + +void CCONV cmExpandSourceListArguments(void *arg, + int numArgs, + const char **args, + int *resArgc, + char ***resArgv, + unsigned int startArgumentIndex) +{ + cmMakefile *mf = static_cast(arg); + std::vector result; + std::vector args2; + int i; + for (i = 0; i < numArgs; ++i) + { + args2.push_back(args[i]); + } + mf->ExpandSourceListArguments(args2, result, startArgumentIndex); + int resargc = static_cast(result.size()); + char **resargv = 0; + if (resargc) + { + resargv = (char **)malloc(resargc*sizeof(char *)); + } + for (i = 0; i < resargc; ++i) + { + resargv[i] = strdup(result[i].c_str()); + } + *resArgc = resargc; + *resArgv = resargv; +} + +void CCONV cmFreeArguments(int argc, char **argv) +{ + int i; + for (i = 0; i < argc; ++i) + { + free(argv[i]); + } + if (argv) + { + free(argv); + } +} + +int CCONV cmGetTotalArgumentSize(int argc, char **argv) +{ + int i; + int result = 0; + for (i = 0; i < argc; ++i) + { + if (argv[i]) + { + result = result + static_cast(strlen(argv[i])); + } + } + return result; +} + +// Source file proxy object to support the old cmSourceFile/cmMakefile +// API for source files. +struct cmCPluginAPISourceFile +{ + cmCPluginAPISourceFile(): RealSourceFile(0) {} + cmSourceFile* RealSourceFile; + std::string SourceName; + std::string SourceExtension; + std::string FullPath; + std::vector Depends; + cmPropertyMap Properties; +}; + +// Keep a map from real cmSourceFile instances stored in a makefile to +// the CPluginAPI proxy source file. +class cmCPluginAPISourceFileMap: + public std::map +{ +public: + typedef std::map derived; + typedef derived::iterator iterator; + typedef derived::value_type value_type; + ~cmCPluginAPISourceFileMap() + { + for(iterator i=this->begin(); i != this->end(); ++i) + { + delete i->second; + } + } +}; +cmCPluginAPISourceFileMap cmCPluginAPISourceFiles; + +void * CCONV cmCreateSourceFile() +{ + return (void*)new cmCPluginAPISourceFile; +} + +void * CCONV cmCreateNewSourceFile(void *arg) +{ + cmMakefile *mf = static_cast(arg); + cmCPluginAPISourceFile *sf = new cmCPluginAPISourceFile; + sf->Properties.SetCMakeInstance(mf->GetCMakeInstance()); + return (void*)sf; +} + +void CCONV cmDestroySourceFile(void *arg) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + // Only delete if it was created by cmCreateSourceFile or + // cmCreateNewSourceFile and is therefore not in the map. + if(!sf->RealSourceFile) + { + delete sf; + } +} + +void CCONV *cmGetSource(void *arg, const char *name) +{ + cmMakefile *mf = static_cast(arg); + if(cmSourceFile* rsf = mf->GetSource(name)) + { + // Lookup the proxy source file object for this source. + cmCPluginAPISourceFileMap::iterator i = cmCPluginAPISourceFiles.find(rsf); + if(i == cmCPluginAPISourceFiles.end()) + { + // Create a proxy source file object for this source. + cmCPluginAPISourceFile* sf = new cmCPluginAPISourceFile; + sf->RealSourceFile = rsf; + sf->FullPath = rsf->GetFullPath(); + sf->SourceName = + cmSystemTools::GetFilenameWithoutLastExtension(sf->FullPath.c_str()); + sf->SourceExtension = + cmSystemTools::GetFilenameLastExtension(sf->FullPath.c_str()); + + // Store the proxy in the map so it can be re-used and deleted later. + cmCPluginAPISourceFileMap::value_type entry(rsf, sf); + i = cmCPluginAPISourceFiles.insert(entry).first; + } + return (void *)i->second; + } + else + { + return 0; + } +} + +void * CCONV cmAddSource(void *arg, void *arg2) +{ + cmMakefile *mf = static_cast(arg); + cmCPluginAPISourceFile* osf = static_cast(arg2); + if(osf->FullPath.empty()) + { + return 0; + } + + // Create the real cmSourceFile instance and copy over saved information. + cmSourceFile* rsf = mf->GetOrCreateSource(osf->FullPath.c_str()); + rsf->GetProperties() = osf->Properties; + for(std::vector::iterator i = osf->Depends.begin(); + i != osf->Depends.end(); ++i) + { + rsf->AddDepend(i->c_str()); + } + + // Create the proxy for the real source file. + cmCPluginAPISourceFile* sf = new cmCPluginAPISourceFile; + sf->RealSourceFile = rsf; + sf->FullPath = osf->FullPath; + sf->SourceName = osf->SourceName; + sf->SourceExtension = osf->SourceExtension; + + // Store the proxy in the map so it can be re-used and deleted later. + cmCPluginAPISourceFiles[rsf] = sf; + return (void *)sf; +} + +const char * CCONV cmSourceFileGetSourceName(void *arg) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + return sf->SourceName.c_str(); +} + +const char * CCONV cmSourceFileGetFullPath(void *arg) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + return sf->FullPath.c_str(); +} + +const char * CCONV cmSourceFileGetProperty(void *arg,const char *prop) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(cmSourceFile* rsf = sf->RealSourceFile) + { + return rsf->GetProperty(prop); + } + else + { + if(!strcmp(prop,"LOCATION")) + { + return sf->FullPath.c_str(); + } + bool chain = false; + // Ignore chain because old code will not expect it and it is a + // pain to implement here anyway. + return sf->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, + chain); + } +} + +int CCONV cmSourceFileGetPropertyAsBool(void *arg,const char *prop) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(cmSourceFile* rsf = sf->RealSourceFile) + { + return rsf->GetPropertyAsBool(prop) ? 1:0; + } + else + { + return cmSystemTools::IsOn(cmSourceFileGetProperty(arg, prop))? 1:0; + } +} + +void CCONV cmSourceFileSetProperty(void *arg,const char *prop, + const char *value) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(cmSourceFile* rsf = sf->RealSourceFile) + { + rsf->SetProperty(prop, value); + } + else if(prop) + { + if(!value) { value = "NOTFOUND"; } + sf->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE); + } +} + +void CCONV cmSourceFileAddDepend(void *arg, const char *depend) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(cmSourceFile* rsf = sf->RealSourceFile) + { + rsf->AddDepend(depend); + } + else + { + sf->Depends.push_back(depend); + } +} + +void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir, + int numSourceExtensions, + const char **sourceExtensions, + int numHeaderExtensions, + const char **headerExtensions) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(sf->RealSourceFile) + { + // SetName is allowed only on temporary source files created by + // the command for building and passing to AddSource. + return; + } + std::vector sourceExts; + std::vector headerExts; + int i; + for (i = 0; i < numSourceExtensions; ++i) + { + sourceExts.push_back(sourceExtensions[i]); + } + for (i = 0; i < numHeaderExtensions; ++i) + { + headerExts.push_back(headerExtensions[i]); + } + + // Implement the old SetName method code here. + sf->Properties.SetProperty("HEADER_FILE_ONLY", "1", + cmProperty::SOURCE_FILE); + + // Save the original name given. + sf->SourceName = name; + + // Convert the name to a full path in case the given name is a + // relative path. + std::string pathname = cmSystemTools::CollapseFullPath(name, dir); + + // First try and see whether the listed file can be found + // as is without extensions added on. + std::string hname = pathname; + if(cmSystemTools::FileExists(hname.c_str())) + { + sf->SourceName = cmSystemTools::GetFilenamePath(name); + if ( sf->SourceName.size() > 0 ) + { + sf->SourceName += "/"; + } + sf->SourceName += cmSystemTools::GetFilenameWithoutLastExtension(name); + std::string::size_type pos = hname.rfind('.'); + if(pos != std::string::npos) + { + sf->SourceExtension = hname.substr(pos+1, hname.size()-pos); + if ( cmSystemTools::FileIsFullPath(name) ) + { + std::string::size_type pos2 = hname.rfind('/'); + if(pos2 != std::string::npos) + { + sf->SourceName = hname.substr(pos2+1, pos - pos2-1); + } + } + } + + // See if the file is a header file + if(std::find( headerExts.begin(), headerExts.end(), + sf->SourceExtension ) == headerExts.end()) + { + sf->Properties.SetProperty("HEADER_FILE_ONLY", "0", + cmProperty::SOURCE_FILE); + } + sf->FullPath = hname; + return; + } + + // Next, try the various source extensions + for( std::vector::const_iterator ext = sourceExts.begin(); + ext != sourceExts.end(); ++ext ) + { + hname = pathname; + hname += "."; + hname += *ext; + if(cmSystemTools::FileExists(hname.c_str())) + { + sf->SourceExtension = *ext; + sf->Properties.SetProperty("HEADER_FILE_ONLY", "0", + cmProperty::SOURCE_FILE); + sf->FullPath = hname; + return; + } + } + + // Finally, try the various header extensions + for( std::vector::const_iterator ext = headerExts.begin(); + ext != headerExts.end(); ++ext ) + { + hname = pathname; + hname += "."; + hname += *ext; + if(cmSystemTools::FileExists(hname.c_str())) + { + sf->SourceExtension = *ext; + sf->FullPath = hname; + return; + } + } + + cmOStringStream e; + e << "Cannot find source file \"" << pathname << "\""; + e << "\n\nTried extensions"; + for( std::vector::const_iterator ext = sourceExts.begin(); + ext != sourceExts.end(); ++ext ) + { + e << " ." << *ext; + } + for( std::vector::const_iterator ext = headerExts.begin(); + ext != headerExts.end(); ++ext ) + { + e << " ." << *ext; + } + cmSystemTools::Error(e.str().c_str()); + return; +} + +void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir, + const char *ext, int headerFileOnly) +{ + cmCPluginAPISourceFile* sf = static_cast(arg); + if(sf->RealSourceFile) + { + // SetName is allowed only on temporary source files created by + // the command for building and passing to AddSource. + return; + } + + // Implement the old SetName method code here. + sf->Properties.SetProperty("HEADER_FILE_ONLY", + headerFileOnly? "1" : "0", + cmProperty::SOURCE_FILE); + sf->SourceName = name; + std::string fname = sf->SourceName; + if(ext && strlen(ext)) + { + fname += "."; + fname += ext; + } + sf->FullPath = cmSystemTools::CollapseFullPath(fname.c_str(), dir); + cmSystemTools::ConvertToUnixSlashes(sf->FullPath); + sf->SourceExtension = ext; +} + +char * CCONV cmGetFilenameWithoutExtension(const char *name) +{ + std::string sres = cmSystemTools::GetFilenameWithoutExtension(name); + char *result = (char *)malloc(sres.size()+1); + strcpy(result,sres.c_str()); + return result; +} + +char * CCONV cmGetFilenamePath(const char *name) +{ + std::string sres = cmSystemTools::GetFilenamePath(name); + char *result = (char *)malloc(sres.size()+1); + strcpy(result,sres.c_str()); + return result; +} + +char * CCONV cmCapitalized(const char *name) +{ + std::string sres = cmSystemTools::Capitalized(name); + char *result = (char *)malloc(sres.size()+1); + strcpy(result,sres.c_str()); + return result; +} + +void CCONV cmCopyFileIfDifferent(const char *name1, const char *name2) +{ + cmSystemTools::CopyFileIfDifferent(name1,name2); +} + +void CCONV cmRemoveFile(const char *name) +{ + cmSystemTools::RemoveFile(name); +} + +void CCONV cmDisplayStatus(void *arg, const char* message) +{ + cmMakefile *mf = static_cast(arg); + mf->DisplayStatus(message, -1); +} + +void CCONV cmFree(void *data) +{ + free(data); +} + +void CCONV DefineSourceFileProperty (void *arg, const char *name, + const char *briefDocs, + const char *longDocs, + int chained) +{ + cmMakefile *mf = static_cast(arg); + mf->GetCMakeInstance()->DefineProperty(name,cmProperty::SOURCE_FILE, + briefDocs, longDocs, + chained != 0); +} + +} // close the extern "C" scope + +cmCAPI cmStaticCAPI = +{ + cmGetClientData, + cmGetTotalArgumentSize, + cmFreeArguments, + cmSetClientData, + cmSetError, + cmAddCacheDefinition, + cmAddCustomCommand, + cmAddDefineFlag, + cmAddDefinition, + cmAddExecutable, + cmAddLibrary, + cmAddLinkDirectoryForTarget, + cmAddLinkLibraryForTarget, + cmAddUtilityCommand, + cmCommandExists, + cmExecuteCommand, + cmExpandSourceListArguments, + cmExpandVariablesInString, + cmGetCacheMajorVersion, + cmGetCacheMinorVersion, + cmGetCurrentDirectory, + cmGetCurrentOutputDirectory, + cmGetDefinition, + cmGetHomeDirectory, + cmGetHomeOutputDirectory, + cmGetMajorVersion, + cmGetMinorVersion, + cmGetProjectName, + cmGetStartDirectory, + cmGetStartOutputDirectory, + cmIsOn, + + cmAddSource, + cmCreateSourceFile, + cmDestroySourceFile, + cmGetSource, + cmSourceFileAddDepend, + cmSourceFileGetProperty, + cmSourceFileGetPropertyAsBool, + cmSourceFileGetSourceName, + cmSourceFileGetFullPath, + cmSourceFileSetName, + cmSourceFileSetName2, + cmSourceFileSetProperty, + + cmCapitalized, + cmCopyFileIfDifferent, + cmGetFilenameWithoutExtension, + cmGetFilenamePath, + cmRemoveFile, + cmFree, + + cmAddCustomCommandToOutput, + cmAddCustomCommandToTarget, + cmDisplayStatus, + cmCreateNewSourceFile, + DefineSourceFileProperty, +}; + diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h new file mode 100644 index 000000000..669ea5586 --- /dev/null +++ b/Source/cmCPluginAPI.h @@ -0,0 +1,248 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCPluginAPI.h,v $ + Language: C++ + Date: $Date: 2006-12-07 14:44:45 $ + Version: $Revision: 1.25 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* This header file defines the API that loadable commands can use. In many + of these commands C++ instances of cmMakefile of cmSourceFile are passed + in as arguments or returned. In these cases they are passed as a void * + argument. In the function prototypes mf is used to represent a makefile + and sf is used to represent a source file. The functions are grouped + loosely into four groups 1) Utility 2) cmMakefile 3) cmSourceFile 4) + cmSystemTools. Within each grouping functions are listed alphabetically */ +/*=========================================================================*/ +#ifndef cmCPluginAPI_h +#define cmCPluginAPI_h + +#define CMAKE_VERSION_MAJOR 2 +#define CMAKE_VERSION_MINOR 5 + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __WATCOMC__ +#define CCONV __cdecl +#else +#define CCONV +#endif +/*========================================================================= +this is the structure of function entry points that a plugin may call. This +structure must be kept in sync with the static decaled at the bottom of +cmCPLuginAPI.cxx +=========================================================================*/ +typedef struct +{ + /*========================================================================= + Here we define the set of functions that a plugin may call. The first goup + of functions are utility functions that are specific to the plugin API + =========================================================================*/ + /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how + information is passed from the InitialPass to FInalPass for commands + that need a FinalPass and need information from the InitialPass */ + void *(CCONV *GetClientData) (void *info); + /* return the summed size in characters of all the arguments */ + int (CCONV *GetTotalArgumentSize) (int argc, char **argv); + /* free all the memory associated with an argc, argv pair */ + void (CCONV *FreeArguments) (int argc, char **argv); + /* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how + information is passed from the InitialPass to FInalPass for commands + that need a FinalPass and need information from the InitialPass */ + void (CCONV *SetClientData) (void *info, void *cd); + /* when an error occurs, call this function to set the error string */ + void (CCONV *SetError) (void *info, const char *err); + + /*========================================================================= + The following functions all directly map to methods in the cmMakefile + class. See cmMakefile.h for descriptions of what each method does. All of + these methods take the void * makefile pointer as their first argument. + =========================================================================*/ + void (CCONV *AddCacheDefinition) (void *mf, const char* name, + const char* value, + const char* doc, int cachetype); + void (CCONV *AddCustomCommand) (void *mf, const char* source, + const char* command, + int numArgs, const char **args, + int numDepends, const char **depends, + int numOutputs, const char **outputs, + const char *target); + void (CCONV *AddDefineFlag) (void *mf, const char* definition); + void (CCONV *AddDefinition) (void *mf, const char* name, + const char* value); + void (CCONV *AddExecutable) (void *mf, const char *exename, + int numSrcs, const char **srcs, int win32); + void (CCONV *AddLibrary) (void *mf, const char *libname, + int shared, int numSrcs, const char **srcs); + void (CCONV *AddLinkDirectoryForTarget) (void *mf, const char *tgt, + const char* d); + void (CCONV *AddLinkLibraryForTarget) (void *mf, const char *tgt, + const char *libname, int libtype); + void (CCONV *AddUtilityCommand) (void *mf, const char* utilityName, + const char *command, const char *arguments, + int all, int numDepends, const char **depends, + int numOutputs, const char **outputs); + int (CCONV *CommandExists) (void *mf, const char* name); + int (CCONV *ExecuteCommand) (void *mf, const char *name, + int numArgs, const char **args); + void (CCONV *ExpandSourceListArguments) (void *mf,int argc, + const char **argv, + int *resArgc, char ***resArgv, + unsigned int startArgumentIndex); + char *(CCONV *ExpandVariablesInString) (void *mf, const char *source, + int escapeQuotes, int atOnly); + unsigned int (CCONV *GetCacheMajorVersion) (void *mf); + unsigned int (CCONV *GetCacheMinorVersion) (void *mf); + const char* (CCONV *GetCurrentDirectory) (void *mf); + const char* (CCONV *GetCurrentOutputDirectory) (void *mf); + const char* (CCONV *GetDefinition) (void *mf, const char *def); + const char* (CCONV *GetHomeDirectory) (void *mf); + const char* (CCONV *GetHomeOutputDirectory) (void *mf); + unsigned int (CCONV *GetMajorVersion) (void *mf); + unsigned int (CCONV *GetMinorVersion) (void *mf); + const char* (CCONV *GetProjectName) (void *mf); + const char* (CCONV *GetStartDirectory) (void *mf); + const char* (CCONV *GetStartOutputDirectory) (void *mf); + int (CCONV *IsOn) (void *mf, const char* name); + + + /*========================================================================= + The following functions are designed to operate or manipulate + cmSourceFiles. Please see cmSourceFile.h for additional information on many + of these methods. Some of these methods are in cmMakefile.h. + =========================================================================*/ + void *(CCONV *AddSource) (void *mf, void *sf); + void *(CCONV *CreateSourceFile) (); + void (CCONV *DestroySourceFile) (void *sf); + void *(CCONV *GetSource) (void *mf, const char* sourceName); + void (CCONV *SourceFileAddDepend) (void *sf, const char *depend); + const char *(CCONV *SourceFileGetProperty) (void *sf, const char *prop); + int (CCONV *SourceFileGetPropertyAsBool) (void *sf, const char *prop); + const char *(CCONV *SourceFileGetSourceName) (void *sf); + const char *(CCONV *SourceFileGetFullPath) (void *sf); + void (CCONV *SourceFileSetName) (void *sf, const char* name, + const char* dir, + int numSourceExtensions, + const char **sourceExtensions, + int numHeaderExtensions, + const char **headerExtensions); + void (CCONV *SourceFileSetName2) (void *sf, const char* name, + const char* dir, + const char *ext, int headerFileOnly); + void (CCONV *SourceFileSetProperty) (void *sf, const char *prop, + const char *value); + + + /*========================================================================= + The following methods are from cmSystemTools.h see that file for specific + documentation on each method. + =========================================================================*/ + char *(CCONV *Capitalized)(const char *); + void (CCONV *CopyFileIfDifferent)(const char *f1, const char *f2); + char *(CCONV *GetFilenameWithoutExtension)(const char *); + char *(CCONV *GetFilenamePath)(const char *); + void (CCONV *RemoveFile)(const char *f1); + void (CCONV *Free)(void *); + + /*========================================================================= + The following are new functions added after 1.6 + =========================================================================*/ + void (CCONV *AddCustomCommandToOutput) (void *mf, const char* output, + const char* command, + int numArgs, const char **args, + const char* main_dependency, + int numDepends, const char **depends); + void (CCONV *AddCustomCommandToTarget) (void *mf, const char* target, + const char* command, + int numArgs, const char **args, + int commandType); + + /* display status information */ + void (CCONV *DisplaySatus) (void *info, const char *message); + + /* new functions added after 2.4 */ + void *(CCONV *CreateNewSourceFile) (void *mf); + void (CCONV *DefineSourceFileProperty) (void *mf, const char *name, + const char *briefDocs, + const char *longDocs, + int chained); + + /* this is the end of the C function stub API structure */ +} cmCAPI; + + +/*========================================================================= +CM_PLUGIN_EXPORT should be used by plugins +=========================================================================*/ +#ifdef _WIN32 +#define CM_PLUGIN_EXPORT __declspec( dllexport ) +#else +#define CM_PLUGIN_EXPORT +#endif + +/*========================================================================= +define the different types of cache entries, see cmCacheManager.h for more +information +=========================================================================*/ +#define CM_CACHE_BOOL 0 +#define CM_CACHE_PATH 1 +#define CM_CACHE_FILEPATH 2 +#define CM_CACHE_STRING 3 +#define CM_CACHE_INTERNAL 4 +#define CM_CACHE_STATIC 5 + +/*========================================================================= +define the different types of compiles a library may be +=========================================================================*/ +#define CM_LIBRARY_GENERAL 0 +#define CM_LIBRARY_DEBUG 1 +#define CM_LIBRARY_OPTIMIZED 2 + +/*========================================================================= +define the different types of custom commands for a target +=========================================================================*/ +#define CM_PRE_BUILD 0 +#define CM_PRE_LINK 1 +#define CM_POST_BUILD 2 + +/*========================================================================= +Finally we define the key data structures and function prototypes +=========================================================================*/ + typedef const char* (CCONV *CM_DOC_FUNCTION)(); + typedef int (CCONV *CM_INITIAL_PASS_FUNCTION)(void *info, void *mf, + int argc, char *[]); + typedef void (CCONV *CM_FINAL_PASS_FUNCTION)(void *info, void *mf); + typedef void (CCONV *CM_DESTRUCTOR_FUNCTION)(void *info); + + typedef struct { + unsigned long reserved1; /* Reserved for future use. DO NOT USE. */ + unsigned long reserved2; /* Reserved for future use. DO NOT USE. */ + cmCAPI *CAPI; + int m_Inherited; /* this ivar is no longer used in CMake 2.2 or later */ + CM_INITIAL_PASS_FUNCTION InitialPass; + CM_FINAL_PASS_FUNCTION FinalPass; + CM_DESTRUCTOR_FUNCTION Destructor; + CM_DOC_FUNCTION GetTerseDocumentation; + CM_DOC_FUNCTION GetFullDocumentation; + const char *Name; + char *Error; + void *ClientData; + } cmLoadedCommandInfo; + + typedef void (CCONV *CM_INIT_FUNCTION)(cmLoadedCommandInfo *); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx new file mode 100644 index 000000000..4c2622c63 --- /dev/null +++ b/Source/cmCTest.cxx @@ -0,0 +1,2609 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTest.cxx,v $ + Language: C++ + Date: $Date: 2008-02-03 13:57:41 $ + Version: $Revision: 1.334 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cm_curl.h" + +#include "cmCTest.h" +#include "cmake.h" +#include "cmMakefile.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" +#include +#include +#include "cmDynamicLoader.h" +#include "cmGeneratedFileStream.h" +#include "cmCTestCommand.h" + +#include "cmCTestBuildHandler.h" +#include "cmCTestBuildAndTestHandler.h" +#include "cmCTestConfigureHandler.h" +#include "cmCTestCoverageHandler.h" +#include "cmCTestMemCheckHandler.h" +#include "cmCTestScriptHandler.h" +#include "cmCTestTestHandler.h" +#include "cmCTestUpdateHandler.h" +#include "cmCTestSubmitHandler.h" + +#include "cmVersion.h" + +#include +#include +#include + +#include +#include +#include + +#include // auto_ptr + +#if defined(__BEOS__) +#include /* disable_debugger() API. */ +#endif + +#define DEBUGOUT std::cout << __LINE__ << " "; std::cout +#define DEBUGERR std::cerr << __LINE__ << " "; std::cerr + +//---------------------------------------------------------------------- +struct tm* cmCTest::GetNightlyTime(std::string str, + bool tomorrowtag) +{ + struct tm* lctime; + time_t tctime = time(0); + lctime = gmtime(&tctime); + char buf[1024]; + // add todays year day and month to the time in str because + // curl_getdate no longer assumes the day is today + sprintf(buf, "%d%02d%02d %s", lctime->tm_year+1900, lctime->tm_mday, + lctime->tm_mon, str.c_str()); + cmCTestLog(this, OUTPUT, "Determine Nightly Start Time" << std::endl + << " Specified time: " << str.c_str() << std::endl); + //Convert the nightly start time to seconds. Since we are + //providing only a time and a timezone, the current date of + //the local machine is assumed. Consequently, nightlySeconds + //is the time at which the nightly dashboard was opened or + //will be opened on the date of the current client machine. + //As such, this time may be in the past or in the future. + time_t ntime = curl_getdate(buf, &tctime); + cmCTestLog(this, DEBUG, " Get curl time: " << ntime << std::endl); + tctime = time(0); + cmCTestLog(this, DEBUG, " Get the current time: " << tctime << std::endl); + + const int dayLength = 24 * 60 * 60; + cmCTestLog(this, DEBUG, "Seconds: " << tctime << std::endl); + while ( ntime > tctime ) + { + // If nightlySeconds is in the past, this is the current + // open dashboard, then return nightlySeconds. If + // nightlySeconds is in the future, this is the next + // dashboard to be opened, so subtract 24 hours to get the + // time of the current open dashboard + ntime -= dayLength; + cmCTestLog(this, DEBUG, "Pick yesterday" << std::endl); + cmCTestLog(this, DEBUG, " Future time, subtract day: " << ntime + << std::endl); + } + while ( tctime > (ntime + dayLength) ) + { + ntime += dayLength; + cmCTestLog(this, DEBUG, " Past time, add day: " << ntime << std::endl); + } + cmCTestLog(this, DEBUG, "nightlySeconds: " << ntime << std::endl); + cmCTestLog(this, DEBUG, " Current time: " << tctime + << " Nightly time: " << ntime << std::endl); + if ( tomorrowtag ) + { + cmCTestLog(this, OUTPUT, " Use future tag, Add a day" << std::endl); + ntime += dayLength; + } + lctime = gmtime(&ntime); + return lctime; +} + +//---------------------------------------------------------------------- +std::string cmCTest::CleanString(const std::string& str) +{ + std::string::size_type spos = str.find_first_not_of(" \n\t\r\f\v"); + std::string::size_type epos = str.find_last_not_of(" \n\t\r\f\v"); + if ( spos == str.npos ) + { + return std::string(); + } + if ( epos != str.npos ) + { + epos = epos - spos + 1; + } + return str.substr(spos, epos); +} + +//---------------------------------------------------------------------- +std::string cmCTest::CurrentTime() +{ + time_t currenttime = time(0); + struct tm* t = localtime(¤ttime); + //return ::CleanString(ctime(¤ttime)); + char current_time[1024]; + if ( this->ShortDateFormat ) + { + strftime(current_time, 1000, "%b %d %H:%M %Z", t); + } + else + { + strftime(current_time, 1000, "%a %b %d %H:%M:%S %Z %Y", t); + } + cmCTestLog(this, DEBUG, " Current_Time: " << current_time << std::endl); + return cmCTest::MakeXMLSafe(cmCTest::CleanString(current_time)); +} + + +//---------------------------------------------------------------------- +std::string cmCTest::MakeXMLSafe(const std::string& str) +{ + std::vector result; + result.reserve(500); + const char* pos = str.c_str(); + for ( ;*pos; ++pos) + { + char ch = *pos; + if ( (ch > 126 || ch < 32) && ch != 9 && + ch != 10 && ch != 13 && ch != '\r' ) + { + char buffer[33]; + sprintf(buffer, "<%d>", (int)ch); + //sprintf(buffer, "&#x%0x;", (unsigned int)ch); + result.insert(result.end(), buffer, buffer+strlen(buffer)); + } + else + { + const char* const encodedChars[] = { + "&", + "<", + ">" + }; + switch ( ch ) + { + case '&': + result.insert(result.end(), encodedChars[0], encodedChars[0]+5); + break; + case '<': + result.insert(result.end(), encodedChars[1], encodedChars[1]+4); + break; + case '>': + result.insert(result.end(), encodedChars[2], encodedChars[2]+4); + break; + case '\n': + result.push_back('\n'); + break; + case '\r': break; // Ignore \r + default: + result.push_back(ch); + } + } + } + if ( result.size() == 0 ) + { + return ""; + } + return std::string(&*result.begin(), result.size()); +} + +//---------------------------------------------------------------------- +std::string cmCTest::MakeURLSafe(const std::string& str) +{ + cmOStringStream ost; + char buffer[10]; + for ( std::string::size_type pos = 0; pos < str.size(); pos ++ ) + { + unsigned char ch = str[pos]; + if ( ( ch > 126 || ch < 32 || + ch == '&' || + ch == '%' || + ch == '+' || + ch == '=' || + ch == '@' + ) && ch != 9 ) + { + sprintf(buffer, "%02x;", (unsigned int)ch); + ost << buffer; + } + else + { + ost << ch; + } + } + return ost.str(); +} + +//---------------------------------------------------------------------- +cmCTest::cmCTest() +{ + this->SubmitIndex = 0; + this->ForceNewCTestProcess = false; + this->TomorrowTag = false; + this->Verbose = false; + this->Debug = false; + this->ShowLineNumbers = false; + this->Quiet = false; + this->ExtraVerbose = false; + this->ProduceXML = false; + this->ShowOnly = false; + this->RunConfigurationScript = false; + this->TestModel = cmCTest::EXPERIMENTAL; + this->InteractiveDebugMode = true; + this->TimeOut = 0; + this->CompressXMLFiles = false; + this->CTestConfigFile = ""; + this->OutputLogFile = 0; + this->OutputLogFileLastTag = -1; + this->SuppressUpdatingCTestConfiguration = false; + this->DartVersion = 1; + + int cc; + for ( cc=0; cc < cmCTest::LAST_TEST; cc ++ ) + { + this->Tests[cc] = 0; + } + this->ShortDateFormat = true; + + this->TestingHandlers["build"] = new cmCTestBuildHandler; + this->TestingHandlers["buildtest"] = new cmCTestBuildAndTestHandler; + this->TestingHandlers["coverage"] = new cmCTestCoverageHandler; + this->TestingHandlers["script"] = new cmCTestScriptHandler; + this->TestingHandlers["test"] = new cmCTestTestHandler; + this->TestingHandlers["update"] = new cmCTestUpdateHandler; + this->TestingHandlers["configure"] = new cmCTestConfigureHandler; + this->TestingHandlers["memcheck"] = new cmCTestMemCheckHandler; + this->TestingHandlers["submit"] = new cmCTestSubmitHandler; + + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); ++ it ) + { + it->second->SetCTestInstance(this); + } + + // Make sure we can capture the build tool output. + cmSystemTools::EnableVSConsoleOutput(); +} + +//---------------------------------------------------------------------- +cmCTest::~cmCTest() +{ + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); ++ it ) + { + delete it->second; + it->second = 0; + } + this->SetOutputLogFileName(0); +} + +//---------------------------------------------------------------------- +int cmCTest::Initialize(const char* binary_dir, bool new_tag, + bool verbose_tag) +{ + cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl); + if(!this->InteractiveDebugMode) + { + this->BlockTestErrorDiagnostics(); + } + else + { + cmSystemTools::PutEnv("CTEST_INTERACTIVE_DEBUG_MODE=1"); + } + + this->BinaryDir = binary_dir; + cmSystemTools::ConvertToUnixSlashes(this->BinaryDir); + + this->UpdateCTestConfiguration(); + + cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl); + if ( this->ProduceXML ) + { + cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl); + cmCTestLog(this, OUTPUT, + " Site: " << this->GetCTestConfiguration("Site") << std::endl + << " Build name: " << this->GetCTestConfiguration("BuildName") + << std::endl); + cmCTestLog(this, DEBUG, "Produce XML is on" << std::endl); + if ( this->TestModel == cmCTest::NIGHTLY && + this->GetCTestConfiguration("NightlyStartTime").empty() ) + { + cmCTestLog(this, WARNING, + "WARNING: No nightly start time found please set in" + " CTestConfig.cmake or DartConfig.cmake" << std::endl); + cmCTestLog(this, DEBUG, "Here: " << __LINE__ << std::endl); + return 0; + } + } + + cmake cm; + cmGlobalGenerator gg; + gg.SetCMakeInstance(&cm); + std::auto_ptr lg(gg.CreateLocalGenerator()); + lg->SetGlobalGenerator(&gg); + cmMakefile *mf = lg->GetMakefile(); + if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) ) + { + cmCTestLog(this, DEBUG, "Cannot find custom configuration file tree" + << std::endl); + return 0; + } + + if ( this->ProduceXML ) + { + std::string testingDir = this->BinaryDir + "/Testing"; + if ( cmSystemTools::FileExists(testingDir.c_str()) ) + { + if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) ) + { + cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir + << " is in the place of the testing directory" << std::endl); + return 0; + } + } + else + { + if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) ) + { + cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " + << testingDir << std::endl); + return 0; + } + } + std::string tagfile = testingDir + "/TAG"; + std::ifstream tfin(tagfile.c_str()); + std::string tag; + time_t tctime = time(0); + if ( this->TomorrowTag ) + { + tctime += ( 24 * 60 * 60 ); + } + struct tm *lctime = gmtime(&tctime); + if ( tfin && cmSystemTools::GetLineFromStream(tfin, tag) ) + { + int year = 0; + int mon = 0; + int day = 0; + int hour = 0; + int min = 0; + sscanf(tag.c_str(), "%04d%02d%02d-%02d%02d", + &year, &mon, &day, &hour, &min); + if ( year != lctime->tm_year + 1900 || + mon != lctime->tm_mon+1 || + day != lctime->tm_mday ) + { + tag = ""; + } + std::string tagmode; + if ( cmSystemTools::GetLineFromStream(tfin, tagmode) ) + { + if ( tagmode.size() > 4 && !( this->Tests[cmCTest::START_TEST] || + this->Tests[ALL_TEST] )) + { + this->TestModel = cmCTest::GetTestModelFromString(tagmode.c_str()); + } + } + tfin.close(); + } + if ( tag.size() == 0 || new_tag || this->Tests[cmCTest::START_TEST] || + this->Tests[ALL_TEST]) + { + cmCTestLog(this, DEBUG, "TestModel: " << this->GetTestModelString() + << std::endl); + cmCTestLog(this, DEBUG, "TestModel: " << this->TestModel << std::endl); + if ( this->TestModel == cmCTest::NIGHTLY ) + { + lctime = this->GetNightlyTime( + this->GetCTestConfiguration("NightlyStartTime"), this->TomorrowTag); + } + char datestring[100]; + sprintf(datestring, "%04d%02d%02d-%02d%02d", + lctime->tm_year + 1900, + lctime->tm_mon+1, + lctime->tm_mday, + lctime->tm_hour, + lctime->tm_min); + tag = datestring; + std::ofstream ofs(tagfile.c_str()); + if ( ofs ) + { + ofs << tag << std::endl; + ofs << this->GetTestModelString() << std::endl; + } + ofs.close(); + if ( verbose_tag ) + { + cmCTestLog(this, OUTPUT, "Create new tag: " << tag << " - " + << this->GetTestModelString() << std::endl); + } + } + this->CurrentTag = tag; + } + return 1; +} + +//---------------------------------------------------------------------- +bool cmCTest::InitializeFromCommand(cmCTestCommand* command, bool first) +{ + if ( !first && !this->CurrentTag.empty() ) + { + return true; + } + + std::string src_dir + = this->GetCTestConfiguration("SourceDirectory").c_str(); + std::string bld_dir = this->GetCTestConfiguration("BuildDirectory").c_str(); + this->DartVersion = 1; + this->SubmitFiles.clear(); + + cmMakefile* mf = command->GetMakefile(); + std::string fname = src_dir; + fname += "/CTestConfig.cmake"; + cmSystemTools::ConvertToUnixSlashes(fname); + if ( cmSystemTools::FileExists(fname.c_str()) ) + { + cmCTestLog(this, OUTPUT, " Reading ctest configuration file: " + << fname.c_str() << std::endl); + bool readit = mf->ReadListFile(mf->GetCurrentListFile(), + fname.c_str() ); + if(!readit) + { + std::string m = "Could not find include file: "; + m += fname; + command->SetError(m.c_str()); + return false; + } + } + else if ( !first ) + { + cmCTestLog(this, WARNING, "Cannot locate CTest configuration: " + << fname.c_str() << std::endl); + } + else + { + cmCTestLog(this, HANDLER_OUTPUT, " Cannot locate CTest configuration: " + << fname.c_str() << std::endl + << " Delay the initialization of CTest" << std::endl); + } + + this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime", + "CTEST_NIGHTLY_START_TIME"); + this->SetCTestConfigurationFromCMakeVariable(mf, "Site", "CTEST_SITE"); + this->SetCTestConfigurationFromCMakeVariable(mf, "BuildName", + "CTEST_BUILD_NAME"); + const char* dartVersion = mf->GetDefinition("CTEST_DART_SERVER_VERSION"); + if ( dartVersion ) + { + this->DartVersion = atoi(dartVersion); + if ( this->DartVersion < 0 ) + { + cmCTestLog(this, ERROR_MESSAGE, "Invalid Dart server version: " + << dartVersion << ". Please specify the version number." + << std::endl); + return false; + } + } + + if ( !this->Initialize(bld_dir.c_str(), true, false) ) + { + if ( this->GetCTestConfiguration("NightlyStartTime").empty() && first) + { + return true; + } + return false; + } + cmCTestLog(this, OUTPUT, " Use " << this->GetTestModelString() + << " tag: " << this->GetCurrentTag() << std::endl); + return true; +} + + +//---------------------------------------------------------------------- +bool cmCTest::UpdateCTestConfiguration() +{ + if ( this->SuppressUpdatingCTestConfiguration ) + { + return true; + } + std::string fileName = this->CTestConfigFile; + if ( fileName.empty() ) + { + fileName = this->BinaryDir + "/CTestConfiguration.ini"; + if ( !cmSystemTools::FileExists(fileName.c_str()) ) + { + fileName = this->BinaryDir + "/DartConfiguration.tcl"; + } + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "UpdateCTestConfiguration from :" + << fileName.c_str() << "\n"); + if ( !cmSystemTools::FileExists(fileName.c_str()) ) + { + // No need to exit if we are not producing XML + if ( this->ProduceXML ) + { + cmCTestLog(this, ERROR_MESSAGE, "Cannot find file: " << fileName.c_str() + << std::endl); + return false; + } + } + else + { + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Parse Config file:" + << fileName.c_str() << "\n"); + // parse the dart test file + std::ifstream fin(fileName.c_str()); + if(!fin) + { + return false; + } + + char buffer[1024]; + while ( fin ) + { + buffer[0] = 0; + fin.getline(buffer, 1023); + buffer[1023] = 0; + std::string line = cmCTest::CleanString(buffer); + if(line.size() == 0) + { + continue; + } + while ( fin && (line[line.size()-1] == '\\') ) + { + line = line.substr(0, line.size()-1); + buffer[0] = 0; + fin.getline(buffer, 1023); + buffer[1023] = 0; + line += cmCTest::CleanString(buffer); + } + if ( line[0] == '#' ) + { + continue; + } + std::string::size_type cpos = line.find_first_of(":"); + if ( cpos == line.npos ) + { + continue; + } + std::string key = line.substr(0, cpos); + std::string value + = cmCTest::CleanString(line.substr(cpos+1, line.npos)); + this->CTestConfiguration[key] = value; + } + fin.close(); + } + if ( !this->GetCTestConfiguration("BuildDirectory").empty() ) + { + this->BinaryDir = this->GetCTestConfiguration("BuildDirectory"); + cmSystemTools::ChangeDirectory(this->BinaryDir.c_str()); + } + this->TimeOut = atoi(this->GetCTestConfiguration("TimeOut").c_str()); + if ( this->ProduceXML ) + { + this->CompressXMLFiles = cmSystemTools::IsOn( + this->GetCTestConfiguration("CompressSubmission").c_str()); + } + return true; +} + +//---------------------------------------------------------------------- +void cmCTest::BlockTestErrorDiagnostics() +{ + cmSystemTools::PutEnv("DART_TEST_FROM_DART=1"); + cmSystemTools::PutEnv("DASHBOARD_TEST_FROM_CTEST=" CMake_VERSION); +#if defined(_WIN32) + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); +#elif defined(__BEOS__) + disable_debugger(1); +#endif +} + +//---------------------------------------------------------------------- +void cmCTest::SetTestModel(int mode) +{ + this->InteractiveDebugMode = false; + this->TestModel = mode; +} + +//---------------------------------------------------------------------- +bool cmCTest::SetTest(const char* ttype, bool report) +{ + if ( cmSystemTools::LowerCase(ttype) == "all" ) + { + this->Tests[cmCTest::ALL_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "start" ) + { + this->Tests[cmCTest::START_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "update" ) + { + this->Tests[cmCTest::UPDATE_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "configure" ) + { + this->Tests[cmCTest::CONFIGURE_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "build" ) + { + this->Tests[cmCTest::BUILD_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "test" ) + { + this->Tests[cmCTest::TEST_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "coverage" ) + { + this->Tests[cmCTest::COVERAGE_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "memcheck" ) + { + this->Tests[cmCTest::MEMCHECK_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "notes" ) + { + this->Tests[cmCTest::NOTES_TEST] = 1; + } + else if ( cmSystemTools::LowerCase(ttype) == "submit" ) + { + this->Tests[cmCTest::SUBMIT_TEST] = 1; + } + else + { + if ( report ) + { + cmCTestLog(this, ERROR_MESSAGE, "Don't know about test \"" << ttype + << "\" yet..." << std::endl); + } + return false; + } + return true; +} + +//---------------------------------------------------------------------- +void cmCTest::Finalize() +{ +} + +//---------------------------------------------------------------------- +bool cmCTest::OpenOutputFile(const std::string& path, + const std::string& name, cmGeneratedFileStream& stream, + bool compress) +{ + std::string testingDir = this->BinaryDir + "/Testing"; + if ( path.size() > 0 ) + { + testingDir += "/" + path; + } + if ( cmSystemTools::FileExists(testingDir.c_str()) ) + { + if ( !cmSystemTools::FileIsDirectory(testingDir.c_str()) ) + { + cmCTestLog(this, ERROR_MESSAGE, "File " << testingDir + << " is in the place of the testing directory" + << std::endl); + return false; + } + } + else + { + if ( !cmSystemTools::MakeDirectory(testingDir.c_str()) ) + { + cmCTestLog(this, ERROR_MESSAGE, "Cannot create directory " << testingDir + << std::endl); + return false; + } + } + std::string filename = testingDir + "/" + name; + stream.Open(filename.c_str()); + if( !stream ) + { + cmCTestLog(this, ERROR_MESSAGE, "Problem opening file: " << filename + << std::endl); + return false; + } + if ( compress ) + { + if ( this->CompressXMLFiles ) + { + stream.SetCompression(true); + } + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTest::AddIfExists(SetOfStrings& files, const char* file) +{ + if ( this->CTestFileExists(file) ) + { + files.insert(file); + } + else + { + std::string name = file; + name += ".gz"; + if ( this->CTestFileExists(name.c_str()) ) + { + files.insert(name.c_str()); + } + else + { + return false; + } + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTest::CTestFileExists(const std::string& filename) +{ + std::string testingDir = this->BinaryDir + "/Testing/" + + this->CurrentTag + "/" + filename; + return cmSystemTools::FileExists(testingDir.c_str()); +} + +//---------------------------------------------------------------------- +cmCTestGenericHandler* cmCTest::GetInitializedHandler(const char* handler) +{ + cmCTest::t_TestingHandlers::iterator it = + this->TestingHandlers.find(handler); + if ( it == this->TestingHandlers.end() ) + { + return 0; + } + it->second->Initialize(); + return it->second; +} + +//---------------------------------------------------------------------- +cmCTestGenericHandler* cmCTest::GetHandler(const char* handler) +{ + cmCTest::t_TestingHandlers::iterator it = + this->TestingHandlers.find(handler); + if ( it == this->TestingHandlers.end() ) + { + return 0; + } + return it->second; +} + +//---------------------------------------------------------------------- +int cmCTest::ExecuteHandler(const char* shandler) +{ + cmCTestGenericHandler* handler = this->GetHandler(shandler); + if ( !handler ) + { + return -1; + } + handler->Initialize(); + return handler->ProcessHandler(); +} + +//---------------------------------------------------------------------- +int cmCTest::ProcessTests() +{ + int res = 0; + bool notest = true; + int cc; + int update_count = 0; + + cmCTestLog(this, OUTPUT, "Start processing tests" << std::endl); + + for ( cc = 0; cc < LAST_TEST; cc ++ ) + { + if ( this->Tests[cc] ) + { + notest = false; + break; + } + } + if (( this->Tests[UPDATE_TEST] || this->Tests[ALL_TEST] ) && + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + cmCTestGenericHandler* uphandler = this->GetHandler("update"); + uphandler->SetPersistentOption("SourceDirectory", + this->GetCTestConfiguration("SourceDirectory").c_str()); + update_count = uphandler->ProcessHandler(); + if ( update_count < 0 ) + { + res |= cmCTest::UPDATE_ERRORS; + } + } + if ( this->TestModel == cmCTest::CONTINUOUS && !update_count ) + { + return 0; + } + if (( this->Tests[CONFIGURE_TEST] || this->Tests[ALL_TEST] )&& + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + if (this->GetHandler("configure")->ProcessHandler() < 0) + { + res |= cmCTest::CONFIGURE_ERRORS; + } + } + if (( this->Tests[BUILD_TEST] || this->Tests[ALL_TEST] )&& + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + this->UpdateCTestConfiguration(); + if (this->GetHandler("build")->ProcessHandler() < 0) + { + res |= cmCTest::BUILD_ERRORS; + } + } + if (( this->Tests[TEST_TEST] || this->Tests[ALL_TEST] || notest ) && + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + this->UpdateCTestConfiguration(); + if (this->GetHandler("test")->ProcessHandler() < 0) + { + res |= cmCTest::TEST_ERRORS; + } + } + if (( this->Tests[COVERAGE_TEST] || this->Tests[ALL_TEST] ) && + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + this->UpdateCTestConfiguration(); + if (this->GetHandler("coverage")->ProcessHandler() < 0) + { + res |= cmCTest::COVERAGE_ERRORS; + } + } + if (( this->Tests[MEMCHECK_TEST] || this->Tests[ALL_TEST] )&& + (this->GetRemainingTimeAllowed() - 120 > 0)) + { + this->UpdateCTestConfiguration(); + if (this->GetHandler("memcheck")->ProcessHandler() < 0) + { + res |= cmCTest::MEMORY_ERRORS; + } + } + if ( !notest ) + { + std::string notes_dir = this->BinaryDir + "/Testing/Notes"; + if ( cmSystemTools::FileIsDirectory(notes_dir.c_str()) ) + { + cmsys::Directory d; + d.Load(notes_dir.c_str()); + unsigned long kk; + for ( kk = 0; kk < d.GetNumberOfFiles(); kk ++ ) + { + const char* file = d.GetFile(kk); + std::string fullname = notes_dir + "/" + file; + if ( cmSystemTools::FileExists(fullname.c_str()) && + !cmSystemTools::FileIsDirectory(fullname.c_str()) ) + { + if ( this->NotesFiles.size() > 0 ) + { + this->NotesFiles += ";"; + } + this->NotesFiles += fullname; + this->Tests[NOTES_TEST] = 1; + } + } + } + } + if ( this->Tests[NOTES_TEST] || this->Tests[ALL_TEST] ) + { + this->UpdateCTestConfiguration(); + if ( this->NotesFiles.size() ) + { + this->GenerateNotesFile(this->NotesFiles.c_str()); + } + } + if ( this->Tests[SUBMIT_TEST] || this->Tests[ALL_TEST] ) + { + this->UpdateCTestConfiguration(); + if (this->GetHandler("submit")->ProcessHandler() < 0) + { + res |= cmCTest::SUBMIT_ERRORS; + } + } + if ( res != 0 ) + { + cmCTestLog(this, ERROR_MESSAGE, "Errors while running CTest" + << std::endl); + } + return res; +} + +//---------------------------------------------------------------------- +std::string cmCTest::GetTestModelString() +{ + if ( !this->SpecificTrack.empty() ) + { + return this->SpecificTrack; + } + switch ( this->TestModel ) + { + case cmCTest::NIGHTLY: + return "Nightly"; + case cmCTest::CONTINUOUS: + return "Continuous"; + } + return "Experimental"; +} + +//---------------------------------------------------------------------- +int cmCTest::GetTestModelFromString(const char* str) +{ + if ( !str ) + { + return cmCTest::EXPERIMENTAL; + } + std::string rstr = cmSystemTools::LowerCase(str); + if ( strncmp(rstr.c_str(), "cont", 4) == 0 ) + { + return cmCTest::CONTINUOUS; + } + if ( strncmp(rstr.c_str(), "nigh", 4) == 0 ) + { + return cmCTest::NIGHTLY; + } + return cmCTest::EXPERIMENTAL; +} + +//###################################################################### +//###################################################################### +//###################################################################### +//###################################################################### + +//---------------------------------------------------------------------- +int cmCTest::RunMakeCommand(const char* command, std::string* output, + int* retVal, const char* dir, int timeout, std::ofstream& ofs) +{ + // First generate the command and arguments + std::vector args = cmSystemTools::ParseArguments(command); + + if(args.size() < 1) + { + return false; + } + + std::vector argv; + for(std::vector::const_iterator a = args.begin(); + a != args.end(); ++a) + { + argv.push_back(a->c_str()); + } + argv.push_back(0); + + if ( output ) + { + *output = ""; + } + + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Run command:"); + std::vector::iterator ait; + for ( ait = argv.begin(); ait != argv.end() && *ait; ++ ait ) + { + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, " \"" << *ait << "\""); + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, std::endl); + + // Now create process object + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmsysProcess_SetWorkingDirectory(cp, dir); + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_Execute(cp); + + // Initialize tick's + std::string::size_type tick = 0; + std::string::size_type tick_len = 1024; + std::string::size_type tick_line_len = 50; + + char* data; + int length; + cmCTestLog(this, HANDLER_OUTPUT, + " Each . represents " << tick_len << " bytes of output" << std::endl + << " " << std::flush); + while(cmsysProcess_WaitForData(cp, &data, &length, 0)) + { + if ( output ) + { + for(int cc =0; cc < length; ++cc) + { + if(data[cc] == 0) + { + data[cc] = '\n'; + } + } + + output->append(data, length); + while ( output->size() > (tick * tick_len) ) + { + tick ++; + cmCTestLog(this, HANDLER_OUTPUT, "." << std::flush); + if ( tick % tick_line_len == 0 && tick > 0 ) + { + cmCTestLog(this, HANDLER_OUTPUT, " Size: " + << int((output->size() / 1024.0) + 1) << "K" << std::endl + << " " << std::flush); + } + } + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, cmCTestLogWrite(data, length)); + if ( ofs ) + { + ofs << cmCTestLogWrite(data, length); + } + } + cmCTestLog(this, OUTPUT, " Size of output: " + << int(output->size() / 1024.0) << "K" << std::endl); + + cmsysProcess_WaitForExit(cp, 0); + + int result = cmsysProcess_GetState(cp); + + if(result == cmsysProcess_State_Exited) + { + *retVal = cmsysProcess_GetExitValue(cp); + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "Command exited with the value: " + << *retVal << std::endl); + } + else if(result == cmsysProcess_State_Exception) + { + *retVal = cmsysProcess_GetExitException(cp); + cmCTestLog(this, WARNING, "There was an exception: " << *retVal + << std::endl); + } + else if(result == cmsysProcess_State_Expired) + { + cmCTestLog(this, WARNING, "There was a timeout" << std::endl); + } + else if(result == cmsysProcess_State_Error) + { + *output += "\n*** ERROR executing: "; + *output += cmsysProcess_GetErrorString(cp); + *output += "\n***The build process failed."; + cmCTestLog(this, ERROR_MESSAGE, "There was an error: " + << cmsysProcess_GetErrorString(cp) << std::endl); + } + + cmsysProcess_Delete(cp); + + return result; +} + +//###################################################################### +//###################################################################### +//###################################################################### +//###################################################################### + +//---------------------------------------------------------------------- +int cmCTest::RunTest(std::vector argv, + std::string* output, int *retVal, + std::ostream* log, double testTimeOut) +{ + // determine how much time we have + double timeout = this->GetRemainingTimeAllowed() - 120; + if (this->TimeOut && this->TimeOut < timeout) + { + timeout = this->TimeOut; + } + if (testTimeOut + && testTimeOut < this->GetRemainingTimeAllowed()) + { + timeout = testTimeOut; + } + + // always have at least 1 second if we got to here + if (timeout <= 0) + { + timeout = 1; + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, + "Test timeout computed to be: " << timeout << "\n"); + if(cmSystemTools::SameFile(argv[0], this->CTestSelf.c_str()) && + !this->ForceNewCTestProcess) + { + cmCTest inst; + inst.ConfigType = this->ConfigType; + inst.TimeOut = timeout; + std::vector args; + for(unsigned int i =0; i < argv.size(); ++i) + { + if(argv[i]) + { + // make sure we pass the timeout in for any build and test + // invocations. Since --build-generator is required this is a + // good place to check for it, and to add the arguments in + if (strcmp(argv[i],"--build-generator") == 0 && timeout) + { + args.push_back("--test-timeout"); + cmOStringStream msg; + msg << timeout; + args.push_back(msg.str()); + } + args.push_back(argv[i]); + } + } + if ( *log ) + { + *log << "* Run internal CTest" << std::endl; + } + std::string oldpath = cmSystemTools::GetCurrentWorkingDirectory(); + + *retVal = inst.Run(args, output); + if ( *log ) + { + *log << output->c_str(); + } + cmSystemTools::ChangeDirectory(oldpath.c_str()); + + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, + "Internal cmCTest object used to run test." << std::endl + << *output << std::endl); + return cmsysProcess_State_Exited; + } + std::vector tempOutput; + if ( output ) + { + *output = ""; + } + + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmCTestLog(this, DEBUG, "Command is: " << argv[0] << std::endl); + if(cmSystemTools::GetRunCommandHideConsole()) + { + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + } + + cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_Execute(cp); + + char* data; + int length; + while(cmsysProcess_WaitForData(cp, &data, &length, 0)) + { + if ( output ) + { + tempOutput.insert(tempOutput.end(), data, data+length); + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, cmCTestLogWrite(data, length)); + if ( log ) + { + log->write(data, length); + } + } + + cmsysProcess_WaitForExit(cp, 0); + if(output && tempOutput.begin() != tempOutput.end()) + { + output->append(&*tempOutput.begin(), tempOutput.size()); + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "-- Process completed" + << std::endl); + + int result = cmsysProcess_GetState(cp); + + if(result == cmsysProcess_State_Exited) + { + *retVal = cmsysProcess_GetExitValue(cp); + } + else if(result == cmsysProcess_State_Exception) + { + *retVal = cmsysProcess_GetExitException(cp); + std::string outerr = "\n*** Exception executing: "; + outerr += cmsysProcess_GetExceptionString(cp); + *output += outerr; + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl + << std::flush); + } + else if(result == cmsysProcess_State_Error) + { + std::string outerr = "\n*** ERROR executing: "; + outerr += cmsysProcess_GetErrorString(cp); + *output += outerr; + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, outerr.c_str() << std::endl + << std::flush); + } + cmsysProcess_Delete(cp); + + return result; +} + +//---------------------------------------------------------------------- +void cmCTest::StartXML(std::ostream& ostr) +{ + if(this->CurrentTag.empty()) + { + cmCTestLog(this, ERROR_MESSAGE, + "Current Tag empty, this may mean" + " NightlStartTime was not set correctly." << std::endl); + cmSystemTools::SetFatalErrorOccured(); + } + // find out about the system + cmsys::SystemInformation info; + info.RunCPUCheck(); + info.RunOSCheck(); + info.RunMemoryCheck(); + ostr << "\n" + << "GetCTestConfiguration("BuildName") + << "\"\n\tBuildStamp=\"" << this->CurrentTag << "-" + << this->GetTestModelString() << "\"\n\tName=\"" + << this->GetCTestConfiguration("Site") << "\"\n\tGenerator=\"ctest" + << cmVersion::GetCMakeVersion() << "\"" + << "\tOSName=\"" << info.GetOSName() << "\"\n" + << "\tHostname=\"" << info.GetHostname() << "\"\n" + << "\tOSRelease=\"" << info.GetOSRelease() << "\"\n" + << "\tOSVersion=\"" << info.GetOSVersion() << "\"\n" + << "\tOSPlatform=\"" << info.GetOSPlatform() << "\"\n" + << "\tIs64Bits=\"" << info.Is64Bits() << "\"\n" + << "\tVendorString=\"" << info.GetVendorString() << "\"\n" + << "\tVendorID=\"" << info.GetVendorID() << "\"\n" + << "\tFamilyID=\"" << info.GetFamilyID() << "\"\n" + << "\tModelID=\"" << info.GetModelID() << "\"\n" + << "\tProcessorCacheSize=\"" << info.GetProcessorCacheSize() << "\"\n" + << "\tNumberOfLogicalCPU=\"" << info.GetNumberOfLogicalCPU() << "\"\n" + << "\tNumberOfPhysicalCPU=\""<< info.GetNumberOfPhysicalCPU() << "\"\n" + << "\tTotalVirtualMemory=\"" << info.GetTotalVirtualMemory() << "\"\n" + << "\tTotalPhysicalMemory=\""<< info.GetTotalPhysicalMemory() << "\"\n" + << "\tLogicalProcessorsPerPhysical=\"" + << info.GetLogicalProcessorsPerPhysical() << "\"\n" + << "\tProcessorClockFrequency=\"" + << info.GetProcessorClockFrequency() << "\"\n" + << ">" << std::endl; +} + +//---------------------------------------------------------------------- +void cmCTest::EndXML(std::ostream& ostr) +{ + ostr << "" << std::endl; +} + +//---------------------------------------------------------------------- +int cmCTest::GenerateCTestNotesOutput(std::ostream& os, + const cmCTest::VectorOfStrings& files) +{ + cmCTest::VectorOfStrings::const_iterator it; + os << "\n" + << " \"?>\n" + << "GetCTestConfiguration("BuildName") + << "\" BuildStamp=\"" + << this->CurrentTag << "-" << this->GetTestModelString() << "\" Name=\"" + << this->GetCTestConfiguration("Site") << "\" Generator=\"ctest" + << cmVersion::GetCMakeVersion() + << "\">\n" + << "" << std::endl; + + for ( it = files.begin(); it != files.end(); it ++ ) + { + cmCTestLog(this, OUTPUT, "\tAdd file: " << it->c_str() << std::endl); + std::string note_time = this->CurrentTime(); + os << "MakeXMLSafe(it->c_str()) << "\">\n" + << "\n" + << "" << note_time << "\n" + << "" << std::endl; + std::ifstream ifs(it->c_str()); + if ( ifs ) + { + std::string line; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + os << this->MakeXMLSafe(line) << std::endl; + } + ifs.close(); + } + else + { + os << "Problem reading file: " << it->c_str() << std::endl; + cmCTestLog(this, ERROR_MESSAGE, "Problem reading file: " << it->c_str() + << " while creating notes" << std::endl); + } + os << "\n" + << "" << std::endl; + } + os << "\n" + << "" << std::endl; + return 1; +} + +//---------------------------------------------------------------------- +int cmCTest::GenerateNotesFile(const std::vector &files) +{ + cmGeneratedFileStream ofs; + if ( !this->OpenOutputFile(this->CurrentTag, "Notes.xml", ofs) ) + { + cmCTestLog(this, ERROR_MESSAGE, "Cannot open notes file" << std::endl); + return 1; + } + + this->GenerateCTestNotesOutput(ofs, files); + return 0; +} + +//---------------------------------------------------------------------- +int cmCTest::GenerateNotesFile(const char* cfiles) +{ + if ( !cfiles ) + { + return 1; + } + + std::vector files; + + cmCTestLog(this, OUTPUT, "Create notes file" << std::endl); + + files = cmSystemTools::SplitString(cfiles, ';'); + if ( files.size() == 0 ) + { + return 1; + } + + return this->GenerateNotesFile(files); +} + +//---------------------------------------------------------------------- +bool cmCTest::SubmitExtraFiles(const std::vector &files) +{ + std::vector::const_iterator it; + for ( it = files.begin(); + it != files.end(); + ++ it ) + { + if ( !cmSystemTools::FileExists(it->c_str()) ) + { + cmCTestLog(this, ERROR_MESSAGE, "Cannot find extra file: " + << it->c_str() << " to submit." + << std::endl;); + return false; + } + this->AddSubmitFile(it->c_str()); + } + return true; +} + +//---------------------------------------------------------------------- +bool cmCTest::SubmitExtraFiles(const char* cfiles) +{ + if ( !cfiles ) + { + return 1; + } + + std::vector files; + + cmCTestLog(this, OUTPUT, "Submit extra files" << std::endl); + + files = cmSystemTools::SplitString(cfiles, ';'); + if ( files.size() == 0 ) + { + return 1; + } + + return this->SubmitExtraFiles(files); +} + + +//------------------------------------------------------- +// for a -D argument convert the next argument into +// the proper list of dashboard steps via SetTest +bool cmCTest::AddTestsForDashboardType(std::string &targ) +{ + if ( targ == "Experimental" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Start"); + this->SetTest("Configure"); + this->SetTest("Build"); + this->SetTest("Test"); + this->SetTest("Coverage"); + this->SetTest("Submit"); + } + else if ( targ == "ExperimentalStart" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Start"); + } + else if ( targ == "ExperimentalUpdate" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Update"); + } + else if ( targ == "ExperimentalConfigure" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Configure"); + } + else if ( targ == "ExperimentalBuild" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Build"); + } + else if ( targ == "ExperimentalTest" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Test"); + } + else if ( targ == "ExperimentalMemCheck" + || targ == "ExperimentalPurify" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("MemCheck"); + } + else if ( targ == "ExperimentalCoverage" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Coverage"); + } + else if ( targ == "ExperimentalSubmit" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Submit"); + } + else if ( targ == "Continuous" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Start"); + this->SetTest("Update"); + this->SetTest("Configure"); + this->SetTest("Build"); + this->SetTest("Test"); + this->SetTest("Coverage"); + this->SetTest("Submit"); + } + else if ( targ == "ContinuousStart" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Start"); + } + else if ( targ == "ContinuousUpdate" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Update"); + } + else if ( targ == "ContinuousConfigure" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Configure"); + } + else if ( targ == "ContinuousBuild" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Build"); + } + else if ( targ == "ContinuousTest" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Test"); + } + else if ( targ == "ContinuousMemCheck" + || targ == "ContinuousPurify" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("MemCheck"); + } + else if ( targ == "ContinuousCoverage" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Coverage"); + } + else if ( targ == "ContinuousSubmit" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + this->SetTest("Submit"); + } + else if ( targ == "Nightly" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Start"); + this->SetTest("Update"); + this->SetTest("Configure"); + this->SetTest("Build"); + this->SetTest("Test"); + this->SetTest("Coverage"); + this->SetTest("Submit"); + } + else if ( targ == "NightlyStart" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Start"); + } + else if ( targ == "NightlyUpdate" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Update"); + } + else if ( targ == "NightlyConfigure" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Configure"); + } + else if ( targ == "NightlyBuild" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Build"); + } + else if ( targ == "NightlyTest" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Test"); + } + else if ( targ == "NightlyMemCheck" + || targ == "NightlyPurify" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("MemCheck"); + } + else if ( targ == "NightlyCoverage" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Coverage"); + } + else if ( targ == "NightlySubmit" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Submit"); + } + else if ( targ == "MemoryCheck" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + this->SetTest("Start"); + this->SetTest("Configure"); + this->SetTest("Build"); + this->SetTest("MemCheck"); + this->SetTest("Coverage"); + this->SetTest("Submit"); + } + else if ( targ == "NightlyMemoryCheck" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + this->SetTest("Start"); + this->SetTest("Update"); + this->SetTest("Configure"); + this->SetTest("Build"); + this->SetTest("MemCheck"); + this->SetTest("Coverage"); + this->SetTest("Submit"); + } + else + { + cmCTestLog(this, ERROR_MESSAGE, + "CTest -D called with incorrect option: " + << targ << std::endl); + cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl + << " " << "ctest" << " -D Continuous" << std::endl + << " " << "ctest" + << " -D Continuous(Start|Update|Configure|Build)" << std::endl + << " " << "ctest" + << " -D Continuous(Test|Coverage|MemCheck|Submit)" + << std::endl + << " " << "ctest" << " -D Experimental" << std::endl + << " " << "ctest" + << " -D Experimental(Start|Update|Configure|Build)" + << std::endl + << " " << "ctest" + << " -D Experimental(Test|Coverage|MemCheck|Submit)" + << std::endl + << " " << "ctest" << " -D Nightly" << std::endl + << " " << "ctest" + << " -D Nightly(Start|Update|Configure|Build)" << std::endl + << " " << "ctest" + << " -D Nightly(Test|Coverage|MemCheck|Submit)" << std::endl + << " " << "ctest" << " -D NightlyMemoryCheck" << std::endl); + return false; + } + return true; +} + + +//---------------------------------------------------------------------- +bool cmCTest::CheckArgument(const std::string& arg, const char* varg1, + const char* varg2) +{ + if ( varg1 && arg == varg1 || varg2 && arg == varg2 ) + { + return true; + } + return false; +} + + +//---------------------------------------------------------------------- +// Processes one command line argument (and its arguments if any) +// for many simple options and then returns +void cmCTest::HandleCommandLineArguments(size_t &i, + std::vector &args) +{ + std::string arg = args[i]; + if(this->CheckArgument(arg, "--ctest-config") && i < args.size() - 1) + { + i++; + this->CTestConfigFile= args[i]; + } + + if(this->CheckArgument(arg, "-C", "--build-config") && + i < args.size() - 1) + { + i++; + this->SetConfigType(args[i].c_str()); + } + + if(this->CheckArgument(arg, "--debug")) + { + this->Debug = true; + this->ShowLineNumbers = true; + } + if(this->CheckArgument(arg, "--track") && i < args.size() - 1) + { + i++; + this->SpecificTrack = args[i]; + } + if(this->CheckArgument(arg, "--show-line-numbers")) + { + this->ShowLineNumbers = true; + } + if(this->CheckArgument(arg, "-Q", "--quiet")) + { + this->Quiet = true; + } + if(this->CheckArgument(arg, "-V", "--verbose")) + { + this->Verbose = true; + } + if(this->CheckArgument(arg, "-VV", "--extra-verbose")) + { + this->ExtraVerbose = true; + this->Verbose = true; + } + + if(this->CheckArgument(arg, "-N", "--show-only")) + { + this->ShowOnly = true; + } + + if(this->CheckArgument(arg, "-O", "--output-log") && i < args.size() - 1 ) + { + i++; + this->SetOutputLogFileName(args[i].c_str()); + } + + if(this->CheckArgument(arg, "--tomorrow-tag")) + { + this->TomorrowTag = true; + } + if(this->CheckArgument(arg, "--force-new-ctest-process")) + { + this->ForceNewCTestProcess = true; + } + if(this->CheckArgument(arg, "--interactive-debug-mode") && + i < args.size() - 1 ) + { + i++; + this->InteractiveDebugMode = cmSystemTools::IsOn(args[i].c_str()); + } + if(this->CheckArgument(arg, "--submit-index") && i < args.size() - 1 ) + { + i++; + this->SubmitIndex = atoi(args[i].c_str()); + if ( this->SubmitIndex < 0 ) + { + this->SubmitIndex = 0; + } + } + + if(this->CheckArgument(arg, "--overwrite") && i < args.size() - 1) + { + i++; + this->AddCTestConfigurationOverwrite(args[i].c_str()); + } + if(this->CheckArgument(arg, "-A", "--add-notes") && i < args.size() - 1) + { + this->ProduceXML = true; + this->SetTest("Notes"); + i++; + this->SetNotesFiles(args[i].c_str()); + } + + // options that control what tests are run + if(this->CheckArgument(arg, "-I", "--tests-information") && + i < args.size() - 1) + { + i++; + this->GetHandler("test")->SetPersistentOption("TestsToRunInformation", + args[i].c_str()); + this->GetHandler("memcheck")-> + SetPersistentOption("TestsToRunInformation",args[i].c_str()); + } + if(this->CheckArgument(arg, "-U", "--union")) + { + this->GetHandler("test")->SetPersistentOption("UseUnion", "true"); + this->GetHandler("memcheck")->SetPersistentOption("UseUnion", "true"); + } + if(this->CheckArgument(arg, "-R", "--tests-regex") && i < args.size() - 1) + { + i++; + this->GetHandler("test")-> + SetPersistentOption("IncludeRegularExpression", args[i].c_str()); + this->GetHandler("memcheck")-> + SetPersistentOption("IncludeRegularExpression", args[i].c_str()); + } + + if(this->CheckArgument(arg, "-E", "--exclude-regex") && + i < args.size() - 1) + { + i++; + this->GetHandler("test")-> + SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); + this->GetHandler("memcheck")-> + SetPersistentOption("ExcludeRegularExpression", args[i].c_str()); + } +} + +//---------------------------------------------------------------------- +// handle the -S -SR and -SP arguments +void cmCTest::HandleScriptArguments(size_t &i, + std::vector &args, + bool &SRArgumentSpecified) +{ + std::string arg = args[i]; + if(this->CheckArgument(arg, "-SP", "--script-new-process") && + i < args.size() - 1 ) + { + this->RunConfigurationScript = true; + i++; + cmCTestScriptHandler* ch + = static_cast(this->GetHandler("script")); + // -SR is an internal argument, -SP should be ignored when it is passed + if (!SRArgumentSpecified) + { + ch->AddConfigurationScript(args[i].c_str(),false); + } + } + + if(this->CheckArgument(arg, "-SR", "--script-run") && + i < args.size() - 1 ) + { + SRArgumentSpecified = true; + this->RunConfigurationScript = true; + i++; + cmCTestScriptHandler* ch + = static_cast(this->GetHandler("script")); + ch->AddConfigurationScript(args[i].c_str(),true); + } + + if(this->CheckArgument(arg, "-S", "--script") && i < args.size() - 1 ) + { + this->RunConfigurationScript = true; + i++; + cmCTestScriptHandler* ch + = static_cast(this->GetHandler("script")); + // -SR is an internal argument, -S should be ignored when it is passed + if (!SRArgumentSpecified) + { + ch->AddConfigurationScript(args[i].c_str(),true); + } + } +} + +//---------------------------------------------------------------------- +// the main entry point of ctest, called from main +int cmCTest::Run(std::vector &args, std::string* output) +{ + this->FindRunningCMake(); + const char* ctestExec = "ctest"; + bool cmakeAndTest = false; + bool performSomeTest = true; + bool SRArgumentSpecified = false; + + // copy the command line + for(size_t i=0; i < args.size(); ++i) + { + this->InitialCommandLineArguments.push_back(args[i]); + } + + // process the command line arguments + for(size_t i=1; i < args.size(); ++i) + { + // handle the simple commandline arguments + this->HandleCommandLineArguments(i,args); + + // handle the script arguments -S -SR -SP + this->HandleScriptArguments(i,args,SRArgumentSpecified); + + // handle a request for a dashboard + std::string arg = args[i]; + if(this->CheckArgument(arg, "-D", "--dashboard") && i < args.size() - 1 ) + { + this->ProduceXML = true; + i++; + std::string targ = args[i]; + // AddTestsForDashboard parses the dashborad type and converts it + // into the seperate stages + if (!this->AddTestsForDashboardType(targ)) + { + performSomeTest = false; + } + } + + if(this->CheckArgument(arg, "-T", "--test-action") && + (i < args.size() -1) ) + { + this->ProduceXML = true; + i++; + if ( !this->SetTest(args[i].c_str(), false) ) + { + performSomeTest = false; + cmCTestLog(this, ERROR_MESSAGE, + "CTest -T called with incorrect option: " + << args[i].c_str() << std::endl); + cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl + << " " << ctestExec << " -T all" << std::endl + << " " << ctestExec << " -T start" << std::endl + << " " << ctestExec << " -T update" << std::endl + << " " << ctestExec << " -T configure" << std::endl + << " " << ctestExec << " -T build" << std::endl + << " " << ctestExec << " -T test" << std::endl + << " " << ctestExec << " -T coverage" << std::endl + << " " << ctestExec << " -T memcheck" << std::endl + << " " << ctestExec << " -T notes" << std::endl + << " " << ctestExec << " -T submit" << std::endl); + } + } + + // what type of test model + if(this->CheckArgument(arg, "-M", "--test-model") && + (i < args.size() -1) ) + { + i++; + std::string const& str = args[i]; + if ( cmSystemTools::LowerCase(str) == "nightly" ) + { + this->SetTestModel(cmCTest::NIGHTLY); + } + else if ( cmSystemTools::LowerCase(str) == "continuous" ) + { + this->SetTestModel(cmCTest::CONTINUOUS); + } + else if ( cmSystemTools::LowerCase(str) == "experimental" ) + { + this->SetTestModel(cmCTest::EXPERIMENTAL); + } + else + { + performSomeTest = false; + cmCTestLog(this, ERROR_MESSAGE, + "CTest -M called with incorrect option: " << str.c_str() + << std::endl); + cmCTestLog(this, ERROR_MESSAGE, "Available options are:" << std::endl + << " " << ctestExec << " -M Continuous" << std::endl + << " " << ctestExec << " -M Experimental" << std::endl + << " " << ctestExec << " -M Nightly" << std::endl); + } + } + + if(this->CheckArgument(arg, "--extra-submit") && i < args.size() - 1) + { + this->ProduceXML = true; + this->SetTest("Submit"); + i++; + if ( !this->SubmitExtraFiles(args[i].c_str()) ) + { + return 0; + } + } + + // --build-and-test options + if(this->CheckArgument(arg, "--build-and-test") && i < args.size() - 1) + { + cmakeAndTest = true; + } + + // pass the argument to all the handlers as well, but i may no longer be + // set to what it was originally so I'm not sure this is working as + // intended + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); + ++ it ) + { + if ( !it->second->ProcessCommandLineArguments(arg, i, args) ) + { + cmCTestLog(this, ERROR_MESSAGE, + "Problem parsing command line arguments within a handler"); + return 0; + } + } + } // the close of the for argument loop + + + // now what sould cmake do? if --build-and-test was specified then + // we run the build and test handler and return + if(cmakeAndTest) + { + this->Verbose = true; + cmCTestBuildAndTestHandler* handler = + static_cast(this->GetHandler("buildtest")); + int retv = handler->ProcessHandler(); + *output = handler->GetOutput(); +#ifdef CMAKE_BUILD_WITH_CMAKE + cmDynamicLoader::FlushCache(); +#endif + return retv; + } + + // if some tests must be run + if(performSomeTest) + { + int res; + // call process directory + if (this->RunConfigurationScript) + { + if ( this->ExtraVerbose ) + { + cmCTestLog(this, OUTPUT, "* Extra verbosity turned on" << std::endl); + } + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); + ++ it ) + { + it->second->SetVerbose(this->ExtraVerbose); + it->second->SetSubmitIndex(this->SubmitIndex); + } + this->GetHandler("script")->SetVerbose(this->Verbose); + res = this->GetHandler("script")->ProcessHandler(); + } + else + { + this->ExtraVerbose = this->Verbose; + this->Verbose = true; + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); + ++ it ) + { + it->second->SetVerbose(this->Verbose); + it->second->SetSubmitIndex(this->SubmitIndex); + } + if ( !this->Initialize( + cmSystemTools::GetCurrentWorkingDirectory().c_str()) ) + { + res = 12; + cmCTestLog(this, ERROR_MESSAGE, "Problem initializing the dashboard." + << std::endl); + } + else + { + res = this->ProcessTests(); + } + this->Finalize(); + } + return res; + } + + return 1; +} + +//---------------------------------------------------------------------- +void cmCTest::FindRunningCMake() +{ + // Find our own executable. + this->CTestSelf = cmSystemTools::GetExecutableDirectory(); + this->CTestSelf += "/ctest"; + this->CTestSelf += cmSystemTools::GetExecutableExtension(); + if(!cmSystemTools::FileExists(this->CTestSelf.c_str())) + { + cmSystemTools::Error("CTest executable cannot be found at ", + this->CTestSelf.c_str()); + } + + this->CMakeSelf = cmSystemTools::GetExecutableDirectory(); + this->CMakeSelf += "/cmake"; + this->CMakeSelf += cmSystemTools::GetExecutableExtension(); + if(!cmSystemTools::FileExists(this->CMakeSelf.c_str())) + { + cmSystemTools::Error("CMake executable cannot be found at ", + this->CMakeSelf.c_str()); + } +} + +//---------------------------------------------------------------------- +void cmCTest::SetNotesFiles(const char* notes) +{ + if ( !notes ) + { + return; + } + this->NotesFiles = notes; +} + +//---------------------------------------------------------------------- +int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf) +{ + bool found = false; + VectorOfStrings dirs; + VectorOfStrings ndirs; + cmCTestLog(this, DEBUG, "* Read custom CTest configuration directory: " + << dir << std::endl); + + std::string fname = dir; + fname += "/CTestCustom.cmake"; + cmCTestLog(this, DEBUG, "* Check for file: " + << fname.c_str() << std::endl); + if ( cmSystemTools::FileExists(fname.c_str()) ) + { + cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: " + << fname.c_str() << std::endl); + bool erroroc = cmSystemTools::GetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccuredFlag(); + + if ( !mf->ReadListFile(0, fname.c_str()) || + cmSystemTools::GetErrorOccuredFlag() ) + { + cmCTestLog(this, ERROR_MESSAGE, + "Problem reading custom configuration: " + << fname.c_str() << std::endl); + } + found = true; + if ( erroroc ) + { + cmSystemTools::SetErrorOccured(); + } + } + + std::string rexpr = dir; + rexpr += "/CTestCustom.ctest"; + cmCTestLog(this, DEBUG, "* Check for file: " + << rexpr.c_str() << std::endl); + if ( !found && cmSystemTools::FileExists(rexpr.c_str()) ) + { + cmsys::Glob gl; + gl.RecurseOn(); + gl.FindFiles(rexpr); + std::vector& files = gl.GetFiles(); + std::vector::iterator fileIt; + for ( fileIt = files.begin(); fileIt != files.end(); + ++ fileIt ) + { + cmCTestLog(this, DEBUG, "* Read custom CTest configuration file: " + << fileIt->c_str() << std::endl); + if ( !mf->ReadListFile(0, fileIt->c_str()) || + cmSystemTools::GetErrorOccuredFlag() ) + { + cmCTestLog(this, ERROR_MESSAGE, + "Problem reading custom configuration: " + << fileIt->c_str() << std::endl); + } + } + found = true; + } + + if ( found ) + { + cmCTest::t_TestingHandlers::iterator it; + for ( it = this->TestingHandlers.begin(); + it != this->TestingHandlers.end(); ++ it ) + { + cmCTestLog(this, DEBUG, + "* Read custom CTest configuration vectors for handler: " + << it->first.c_str() << " (" << it->second << ")" << std::endl); + it->second->PopulateCustomVectors(mf); + } + } + + return 1; +} + +//---------------------------------------------------------------------- +void cmCTest::PopulateCustomVector(cmMakefile* mf, const char* def, + VectorOfStrings& vec) +{ + if ( !def) + { + return; + } + const char* dval = mf->GetDefinition(def); + if ( !dval ) + { + return; + } + cmCTestLog(this, DEBUG, "PopulateCustomVector: " << def << std::endl); + std::vector slist; + cmSystemTools::ExpandListArgument(dval, slist); + std::vector::iterator it; + + for ( it = slist.begin(); it != slist.end(); ++it ) + { + cmCTestLog(this, DEBUG, " -- " << it->c_str() << std::endl); + vec.push_back(it->c_str()); + } +} + +//---------------------------------------------------------------------- +void cmCTest::PopulateCustomInteger(cmMakefile* mf, const char* def, int& val) +{ + if ( !def) + { + return; + } + const char* dval = mf->GetDefinition(def); + if ( !dval ) + { + return; + } + val = atoi(dval); +} + +//---------------------------------------------------------------------- +std::string cmCTest::GetShortPathToFile(const char* cfname) +{ + const std::string& sourceDir + = cmSystemTools::CollapseFullPath( + this->GetCTestConfiguration("SourceDirectory").c_str()); + const std::string& buildDir + = cmSystemTools::CollapseFullPath( + this->GetCTestConfiguration("BuildDirectory").c_str()); + std::string fname = cmSystemTools::CollapseFullPath(cfname); + + // Find relative paths to both directories + std::string srcRelpath + = cmSystemTools::RelativePath(sourceDir.c_str(), fname.c_str()); + std::string bldRelpath + = cmSystemTools::RelativePath(buildDir.c_str(), fname.c_str()); + + // If any contains "." it is not parent directory + bool inSrc = srcRelpath.find("..") == srcRelpath.npos; + bool inBld = bldRelpath.find("..") == bldRelpath.npos; + // TODO: Handle files with .. in their name + + std::string* res = 0; + + if ( inSrc && inBld ) + { + // If both have relative path with no dots, pick the shorter one + if ( srcRelpath.size() < bldRelpath.size() ) + { + res = &srcRelpath; + } + else + { + res = &bldRelpath; + } + } + else if ( inSrc ) + { + res = &srcRelpath; + } + else if ( inBld ) + { + res = &bldRelpath; + } + + std::string path; + + if ( !res ) + { + path = fname; + } + else + { + cmSystemTools::ConvertToUnixSlashes(*res); + + path = "./" + *res; + if ( path[path.size()-1] == '/' ) + { + path = path.substr(0, path.size()-1); + } + } + + cmsys::SystemTools::ReplaceString(path, ":", "_"); + cmsys::SystemTools::ReplaceString(path, " ", "_"); + return path; +} + +//---------------------------------------------------------------------- +std::string cmCTest::GetCTestConfiguration(const char *name) +{ + if ( this->CTestConfigurationOverwrites.find(name) != + this->CTestConfigurationOverwrites.end() ) + { + return this->CTestConfigurationOverwrites[name]; + } + return this->CTestConfiguration[name]; +} + +//---------------------------------------------------------------------- +void cmCTest::EmptyCTestConfiguration() +{ + this->CTestConfiguration.clear(); +} + +//---------------------------------------------------------------------- +void cmCTest::SetCTestConfiguration(const char *name, const char* value) +{ + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, "SetCTestConfiguration:" + << name << ":" << value << "\n"); + + if ( !name ) + { + return; + } + if ( !value ) + { + this->CTestConfiguration.erase(name); + return; + } + this->CTestConfiguration[name] = value; +} + + +//---------------------------------------------------------------------- +std::string cmCTest::GetCurrentTag() +{ + return this->CurrentTag; +} + +//---------------------------------------------------------------------- +std::string cmCTest::GetBinaryDir() +{ + return this->BinaryDir; +} + +//---------------------------------------------------------------------- +std::string const& cmCTest::GetConfigType() +{ + return this->ConfigType; +} + +//---------------------------------------------------------------------- +bool cmCTest::GetShowOnly() +{ + return this->ShowOnly; +} + +//---------------------------------------------------------------------- +void cmCTest::SetProduceXML(bool v) +{ + this->ProduceXML = v; +} + +//---------------------------------------------------------------------- +bool cmCTest::GetProduceXML() +{ + return this->ProduceXML; +} + +//---------------------------------------------------------------------- +const char* cmCTest::GetSpecificTrack() +{ + if ( this->SpecificTrack.empty() ) + { + return 0; + } + return this->SpecificTrack.c_str(); +} + +//---------------------------------------------------------------------- +void cmCTest::SetSpecificTrack(const char* track) +{ + if ( !track ) + { + this->SpecificTrack = ""; + return; + } + this->SpecificTrack = track; +} + +//---------------------------------------------------------------------- +void cmCTest::AddSubmitFile(const char* name) +{ + this->SubmitFiles.insert(name); +} + +//---------------------------------------------------------------------- +void cmCTest::AddCTestConfigurationOverwrite(const char* encstr) +{ + std::string overStr = encstr; + size_t epos = overStr.find("="); + if ( epos == overStr.npos ) + { + cmCTestLog(this, ERROR_MESSAGE, + "CTest configuration overwrite specified in the wrong format." + << std::endl + << "Valid format is: --overwrite key=value" << std::endl + << "The specified was: --overwrite " << overStr.c_str() << std::endl); + return; + } + std::string key = overStr.substr(0, epos); + std::string value = overStr.substr(epos+1, overStr.npos); + this->CTestConfigurationOverwrites[key] = value; +} + +//---------------------------------------------------------------------- +void cmCTest::SetConfigType(const char* ct) +{ + this->ConfigType = ct?ct:""; + cmSystemTools::ReplaceString(this->ConfigType, ".\\", ""); + std::string confTypeEnv + = "CMAKE_CONFIG_TYPE=" + this->ConfigType; + cmSystemTools::PutEnv(confTypeEnv.c_str()); +} + +//---------------------------------------------------------------------- +bool cmCTest::SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, + const char* dconfig, const char* cmake_var) +{ + const char* ctvar; + ctvar = mf->GetDefinition(cmake_var); + if ( !ctvar ) + { + return false; + } + cmCTestLog(this, HANDLER_VERBOSE_OUTPUT, + "SetCTestConfigurationFromCMakeVariable:" + << dconfig << ":" << cmake_var); + this->SetCTestConfiguration(dconfig, ctvar); + return true; +} + +bool cmCTest::RunCommand( + const char* command, + std::string* stdOut, + std::string* stdErr, + int *retVal, + const char* dir, + double timeout) +{ + std::vector args = cmSystemTools::ParseArguments(command); + + if(args.size() < 1) + { + return false; + } + + std::vector argv; + for(std::vector::const_iterator a = args.begin(); + a != args.end(); ++a) + { + argv.push_back(a->c_str()); + } + argv.push_back(0); + + *stdOut = ""; + *stdErr = ""; + + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmsysProcess_SetWorkingDirectory(cp, dir); + if(cmSystemTools::GetRunCommandHideConsole()) + { + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + } + cmsysProcess_SetTimeout(cp, timeout); + cmsysProcess_Execute(cp); + + std::vector tempOutput; + std::vector tempError; + char* data; + int length; + int res; + bool done = false; + while(!done) + { + res = cmsysProcess_WaitForData(cp, &data, &length, 0); + switch ( res ) + { + case cmsysProcess_Pipe_STDOUT: + tempOutput.insert(tempOutput.end(), data, data+length); + break; + case cmsysProcess_Pipe_STDERR: + tempError.insert(tempError.end(), data, data+length); + break; + default: + done = true; + } + if ( (res == cmsysProcess_Pipe_STDOUT || + res == cmsysProcess_Pipe_STDERR) && this->ExtraVerbose ) + { + cmSystemTools::Stdout(data, length); + } + } + + cmsysProcess_WaitForExit(cp, 0); + if ( tempOutput.size() > 0 ) + { + stdOut->append(&*tempOutput.begin(), tempOutput.size()); + } + if ( tempError.size() > 0 ) + { + stdErr->append(&*tempError.begin(), tempError.size()); + } + + bool result = true; + if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) + { + if ( retVal ) + { + *retVal = cmsysProcess_GetExitValue(cp); + } + else + { + if ( cmsysProcess_GetExitValue(cp) != 0 ) + { + result = false; + } + } + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exception) + { + const char* exception_str = cmsysProcess_GetExceptionString(cp); + cmCTestLog(this, ERROR_MESSAGE, exception_str << std::endl); + stdErr->append(exception_str, strlen(exception_str)); + result = false; + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error) + { + const char* error_str = cmsysProcess_GetErrorString(cp); + cmCTestLog(this, ERROR_MESSAGE, error_str << std::endl); + stdErr->append(error_str, strlen(error_str)); + result = false; + } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired) + { + const char* error_str = "Process terminated due to timeout\n"; + cmCTestLog(this, ERROR_MESSAGE, error_str << std::endl); + stdErr->append(error_str, strlen(error_str)); + result = false; + } + + cmsysProcess_Delete(cp); + return result; +} + +//---------------------------------------------------------------------- +void cmCTest::SetOutputLogFileName(const char* name) +{ + if ( this->OutputLogFile) + { + delete this->OutputLogFile; + this->OutputLogFile= 0; + } + if ( name ) + { + this->OutputLogFile = new cmGeneratedFileStream(name); + } +} + +//---------------------------------------------------------------------- +static const char* cmCTestStringLogType[] = +{ + "DEBUG", + "OUTPUT", + "HANDLER_OUTPUT", + "HANDLER_VERBOSE_OUTPUT", + "WARNING", + "ERROR_MESSAGE", + 0 +}; + +//---------------------------------------------------------------------- +#ifdef cerr +# undef cerr +#endif +#ifdef cout +# undef cout +#endif + +#define cmCTestLogOutputFileLine(stream) \ + if ( this->ShowLineNumbers ) \ + { \ + (stream) << std::endl << file << ":" << line << " "; \ + } + +void cmCTest::Log(int logType, const char* file, int line, const char* msg) +{ + if ( !msg || !*msg ) + { + return; + } + if ( this->OutputLogFile ) + { + bool display = true; + if ( logType == cmCTest::DEBUG && !this->Debug ) { display = false; } + if ( logType == cmCTest::HANDLER_VERBOSE_OUTPUT && !this->Debug && + !this->ExtraVerbose ) { display = false; } + if ( display ) + { + cmCTestLogOutputFileLine(*this->OutputLogFile); + if ( logType != this->OutputLogFileLastTag ) + { + *this->OutputLogFile << "["; + if ( logType >= OTHER || logType < 0 ) + { + *this->OutputLogFile << "OTHER"; + } + else + { + *this->OutputLogFile << cmCTestStringLogType[logType]; + } + *this->OutputLogFile << "] " << std::endl << std::flush; + } + *this->OutputLogFile << msg << std::flush; + if ( logType != this->OutputLogFileLastTag ) + { + *this->OutputLogFile << std::endl << std::flush; + this->OutputLogFileLastTag = logType; + } + } + } + if ( !this->Quiet ) + { + switch ( logType ) + { + case DEBUG: + if ( this->Debug ) + { + cmCTestLogOutputFileLine(std::cout); + std::cout << msg; + std::cout.flush(); + } + break; + case OUTPUT: case HANDLER_OUTPUT: + if ( this->Debug || this->Verbose ) + { + cmCTestLogOutputFileLine(std::cout); + std::cout << msg; + std::cout.flush(); + } + break; + case HANDLER_VERBOSE_OUTPUT: + if ( this->Debug || this->ExtraVerbose ) + { + cmCTestLogOutputFileLine(std::cout); + std::cout << msg; + std::cout.flush(); + } + break; + case WARNING: + cmCTestLogOutputFileLine(std::cerr); + std::cerr << msg; + std::cerr.flush(); + break; + case ERROR_MESSAGE: + cmCTestLogOutputFileLine(std::cerr); + std::cerr << msg; + std::cerr.flush(); + cmSystemTools::SetErrorOccured(); + break; + default: + cmCTestLogOutputFileLine(std::cout); + std::cout << msg; + std::cout.flush(); + } + } +} + +//------------------------------------------------------------------------- +double cmCTest::GetRemainingTimeAllowed() +{ + if (!this->GetHandler("script")) + { + return 1.0e7; + } + + cmCTestScriptHandler* ch + = static_cast(this->GetHandler("script")); + + return ch->GetRemainingTimeAllowed(); +} diff --git a/Source/cmCTest.h b/Source/cmCTest.h new file mode 100644 index 000000000..022859fb9 --- /dev/null +++ b/Source/cmCTest.h @@ -0,0 +1,445 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCTest.h,v $ + Language: C++ + Date: $Date: 2008-02-03 13:57:41 $ + Version: $Revision: 1.100 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmCTest_h +#define cmCTest_h + +#include "cmStandardIncludes.h" +#include "cmListFileCache.h" +#include + +class cmake; +class cmMakefile; +class cmCTestGenericHandler; +class cmGeneratedFileStream; +class cmCTestCommand; + +#define cmCTestLog(ctSelf, logType, msg) \ + do { \ + cmOStringStream cmCTestLog_msg; \ + cmCTestLog_msg << msg; \ + (ctSelf)->Log(cmCTest::logType, __FILE__, __LINE__,\ + cmCTestLog_msg.str().c_str());\ + } while ( 0 ) + +#ifdef cerr +# undef cerr +#endif +#define cerr no_cerr_use_cmCTestLog + +#ifdef cout +# undef cout +#endif +#define cout no_cout_use_cmCTestLog + +class cmCTest +{ +public: + typedef std::vector VectorOfStrings; + typedef std::set SetOfStrings; + + ///! Process Command line arguments + int Run(std::vector &, std::string* output = 0); + + /** + * Initialize and finalize testing + */ + int Initialize(const char* binary_dir, bool new_tag = false, + bool verbose_tag = true); + bool InitializeFromCommand(cmCTestCommand* command, bool first = false); + void Finalize(); + + /** + * Process the tests. This is the main routine. The execution of the + * tests should look like this: + * + * ctest foo; + * foo.Initialize(); + * // Set some things on foo + * foo.ProcessTests(); + * foo.Finalize(); + */ + int ProcessTests(); + + /* + * A utility function that returns the nightly time + */ + struct tm* GetNightlyTime(std::string str, + bool tomorrowtag); + + /* + * Is the tomorrow tag set? + */ + bool GetTomorrowTag() { return this->TomorrowTag; }; + + /** + * Try to run tests of the project + */ + int TestDirectory(bool memcheck); + + ///! what is the configuraiton type, e.g. Debug, Release etc. + std::string const& GetConfigType(); + double GetTimeOut() { return this->TimeOut; } + void SetTimeOut(double t) { this->TimeOut = t; } + + /** + * Check if CTest file exists + */ + bool CTestFileExists(const std::string& filename); + bool AddIfExists(SetOfStrings& files, const char* file); + + /** + * Set the cmake test + */ + bool SetTest(const char*, bool report = true); + + /** + * Set the cmake test mode (experimental, nightly, continuous). + */ + void SetTestModel(int mode); + int GetTestModel() { return this->TestModel; }; + + std::string GetTestModelString(); + static int GetTestModelFromString(const char* str); + static std::string CleanString(const std::string& str); + std::string GetCTestConfiguration(const char *name); + void SetCTestConfiguration(const char *name, const char* value); + void EmptyCTestConfiguration(); + + /** + * constructor and destructor + */ + cmCTest(); + ~cmCTest(); + + //! Set the notes files to be created. + void SetNotesFiles(const char* notes); + + void PopulateCustomVector(cmMakefile* mf, const char* definition, + VectorOfStrings& vec); + void PopulateCustomInteger(cmMakefile* mf, const char* def, + int& val); + + ///! Get the current time as string + std::string CurrentTime(); + + /** + * Return the time remaianing that the script is allowed to run in + * seconds if the user has set the variable CTEST_TIME_LIMIT. If that has + * not been set it returns 1e7 seconds + */ + double GetRemainingTimeAllowed(); + + ///! Open file in the output directory and set the stream + bool OpenOutputFile(const std::string& path, + const std::string& name, + cmGeneratedFileStream& stream, + bool compress = false); + + ///! Convert string to something that is XML safe + static std::string MakeXMLSafe(const std::string&); + + ///! Should we only show what we would do? + bool GetShowOnly(); + + /** + * Run a single executable command and put the stdout and stderr + * in output. + * + * If verbose is false, no user-viewable output from the program + * being run will be generated. + * + * If timeout is specified, the command will be terminated after + * timeout expires. Timeout is specified in seconds. + * + * Argument retVal should be a pointer to the location where the + * exit code will be stored. If the retVal is not specified and + * the program exits with a code other than 0, then the this + * function will return false. + * + * If the command has spaces in the path the caller MUST call + * cmSystemTools::ConvertToRunCommandPath on the command before passing + * it into this function or it will not work. The command must be correctly + * escaped for this to with spaces. + */ + bool RunCommand(const char* command, + std::string* stdOut, std::string* stdErr, + int* retVal = 0, const char* dir = 0, double timeout = 0.0); + + //! Start CTest XML output file + void StartXML(std::ostream& ostr); + + //! End CTest XML output file + void EndXML(std::ostream& ostr); + + //! Run command specialized for make and configure. Returns process status + // and retVal is return value or exception. + int RunMakeCommand(const char* command, std::string* output, + int* retVal, const char* dir, int timeout, + std::ofstream& ofs); + + /* + * return the current tag + */ + std::string GetCurrentTag(); + + //! Get the path to the build tree + std::string GetBinaryDir(); + + //! Get the short path to the file. This means if the file is in binary or + //source directory, it will become /.../relative/path/to/file + std::string GetShortPathToFile(const char* fname); + + //! Get the path to CTest + const char* GetCTestExecutable() { return this->CTestSelf.c_str(); } + const char* GetCMakeExecutable() { return this->CMakeSelf.c_str(); } + + enum { + EXPERIMENTAL, + NIGHTLY, + CONTINUOUS + }; + + // provide some more detailed info on the return code for ctest + enum { + UPDATE_ERRORS = 0x01, + CONFIGURE_ERRORS = 0x02, + BUILD_ERRORS = 0x04, + TEST_ERRORS = 0x08, + MEMORY_ERRORS = 0x10, + COVERAGE_ERRORS = 0x20, + SUBMIT_ERRORS = 0x40 + }; + + ///! Are we producing XML + bool GetProduceXML(); + void SetProduceXML(bool v); + + //! Run command specialized for tests. Returns process status and retVal is + // return value or exception. + int RunTest(std::vector args, std::string* output, int *retVal, + std::ostream* logfile, double testTimeOut); + + /** + * Execute handler and return its result. If the handler fails, it returns + * negative value. + */ + int ExecuteHandler(const char* handler); + + /* + * Get the handler object + */ + cmCTestGenericHandler* GetHandler(const char* handler); + cmCTestGenericHandler* GetInitializedHandler(const char* handler); + + /* + * Set the CTest variable from CMake variable + */ + bool SetCTestConfigurationFromCMakeVariable(cmMakefile* mf, + const char* dconfig, const char* cmake_var); + + //! Make string safe to be send as an URL + static std::string MakeURLSafe(const std::string&); + + //! Should ctect configuration be updated. When using new style ctest + // script, this should be true. + void SetSuppressUpdatingCTestConfiguration(bool val) + { + this->SuppressUpdatingCTestConfiguration = val; + } + + //! Add overwrite to ctest configuration. + // The format is key=value + void AddCTestConfigurationOverwrite(const char* encstr); + + //! Create XML file that contains all the notes specified + int GenerateNotesFile(const std::vector &files); + + //! Submit extra files to the server + bool SubmitExtraFiles(const char* files); + bool SubmitExtraFiles(const std::vector &files); + + //! Set the output log file name + void SetOutputLogFileName(const char* name); + + //! Set the visual studio or Xcode config type + void SetConfigType(const char* ct); + + //! Various log types + enum { + DEBUG = 0, + OUTPUT, + HANDLER_OUTPUT, + HANDLER_VERBOSE_OUTPUT, + WARNING, + ERROR_MESSAGE, + OTHER + }; + + //! Add log to the output + void Log(int logType, const char* file, int line, const char* msg); + + //! Get the version of dart server + int GetDartVersion() { return this->DartVersion; } + + //! Add file to be submitted + void AddSubmitFile(const char* name); + SetOfStrings* GetSubmitFiles() { return &this->SubmitFiles; } + + //! Read the custom configuration files and apply them to the current ctest + int ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf); + + std::vector &GetInitialCommandLineArguments() + { return this->InitialCommandLineArguments; }; + + //! Set the track to submit to + void SetSpecificTrack(const char* track); + const char* GetSpecificTrack(); + +private: + std::string ConfigType; + bool Verbose; + bool ExtraVerbose; + bool ProduceXML; + + bool ForceNewCTestProcess; + + bool RunConfigurationScript; + + int GenerateNotesFile(const char* files); + + // these are helper classes + typedef std::map t_TestingHandlers; + t_TestingHandlers TestingHandlers; + + bool ShowOnly; + + enum { + FIRST_TEST = 0, + UPDATE_TEST = 1, + START_TEST = 2, + CONFIGURE_TEST = 3, + BUILD_TEST = 4, + TEST_TEST = 5, + COVERAGE_TEST = 6, + MEMCHECK_TEST = 7, + SUBMIT_TEST = 8, + NOTES_TEST = 9, + ALL_TEST = 10, + LAST_TEST = 11 + }; + + //! Map of configuration properties + typedef std::map CTestConfigurationMap; + + std::string CTestConfigFile; + CTestConfigurationMap CTestConfiguration; + CTestConfigurationMap CTestConfigurationOverwrites; + int Tests[LAST_TEST]; + + std::string CurrentTag; + bool TomorrowTag; + + int TestModel; + std::string SpecificTrack; + + double TimeOut; + + int CompatibilityMode; + + // information for the --build-and-test options + std::string CMakeSelf; + std::string CTestSelf; + std::string BinaryDir; + + std::string NotesFiles; + + + bool InteractiveDebugMode; + + bool ShortDateFormat; + + bool CompressXMLFiles; + + void BlockTestErrorDiagnostics(); + + + //! parse the option after -D and convert it into the appropriate steps + bool AddTestsForDashboardType(std::string &targ); + + //! parse and process most common command line arguments + void HandleCommandLineArguments(size_t &i, + std::vector &args); + + //! hande the -S -SP and -SR arguments + void HandleScriptArguments(size_t &i, + std::vector &args, + bool &SRArgumentSpecified); + + //! Reread the configuration file + bool UpdateCTestConfiguration(); + + //! Create not from files. + int GenerateCTestNotesOutput(std::ostream& os, + const VectorOfStrings& files); + + ///! Find the running cmake + void FindRunningCMake(); + + //! Check if the argument is the one specified + bool CheckArgument(const std::string& arg, const char* varg1, + const char* varg2 = 0); + + bool SuppressUpdatingCTestConfiguration; + + bool Debug; + bool ShowLineNumbers; + bool Quiet; + + int DartVersion; + + std::set SubmitFiles; + std::vector InitialCommandLineArguments; + + int SubmitIndex; + + cmGeneratedFileStream* OutputLogFile; + int OutputLogFileLastTag; +}; + +class cmCTestLogWrite +{ +public: + cmCTestLogWrite(const char* data, size_t length) + : Data(data), Length(length) {} + + const char* Data; + size_t Length; +}; + +inline std::ostream& operator<< (std::ostream& os, const cmCTestLogWrite& c) +{ + if (!c.Length) + { + return os; + } + os.write(c.Data, c.Length); + os.flush(); + return os; +} + +#endif diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx new file mode 100644 index 000000000..42232f7eb --- /dev/null +++ b/Source/cmCacheManager.cxx @@ -0,0 +1,993 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCacheManager.cxx,v $ + Language: C++ + Date: $Date: 2008-01-29 22:30:48 $ + Version: $Revision: 1.100 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCacheManager.h" +#include "cmSystemTools.h" +#include "cmCacheManager.h" +#include "cmMakefile.h" +#include "cmake.h" +#include "cmVersion.h" + +#include +#include + +#include + +#if defined(_WIN32) || defined(__CYGWIN__) +# include +#endif // _WIN32 + +const char* cmCacheManagerTypes[] = +{ "BOOL", + "PATH", + "FILEPATH", + "STRING", + "INTERNAL", + "STATIC", + "UNINITIALIZED", + 0 +}; + +cmCacheManager::cmCacheManager() +{ + this->CacheMajorVersion = 0; + this->CacheMinorVersion = 0; +} + +const char* cmCacheManager::TypeToString(cmCacheManager::CacheEntryType type) +{ + if ( type > 6 ) + { + return cmCacheManagerTypes[6]; + } + return cmCacheManagerTypes[type]; +} + +cmCacheManager::CacheEntryType cmCacheManager::StringToType(const char* s) +{ + int i = 0; + while(cmCacheManagerTypes[i]) + { + if(strcmp(s, cmCacheManagerTypes[i]) == 0) + { + return static_cast(i); + } + ++i; + } + return STRING; +} + +bool cmCacheManager::LoadCache(cmMakefile* mf) +{ + return this->LoadCache(mf->GetHomeOutputDirectory()); +} + + +bool cmCacheManager::LoadCache(const char* path) +{ + return this->LoadCache(path,true); +} + +bool cmCacheManager::LoadCache(const char* path, + bool internal) +{ + std::set emptySet; + return this->LoadCache(path, internal, emptySet, emptySet); +} + +bool cmCacheManager::ParseEntry(const char* entry, + std::string& var, + std::string& value) +{ + // input line is: key:type=value + static cmsys::RegularExpression reg( + "^([^:]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + // input line is: "key":type=value + static cmsys::RegularExpression regQuoted( + "^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + bool flag = false; + if(regQuoted.find(entry)) + { + var = regQuoted.match(1); + value = regQuoted.match(2); + flag = true; + } + else if (reg.find(entry)) + { + var = reg.match(1); + value = reg.match(2); + flag = true; + } + + // if value is enclosed in single quotes ('foo') then remove them + // it is used to enclose trailing space or tab + if (flag && + value.size() >= 2 && + value[0] == '\'' && + value[value.size() - 1] == '\'') + { + value = value.substr(1, + value.size() - 2); + } + + return flag; +} + +bool cmCacheManager::ParseEntry(const char* entry, + std::string& var, + std::string& value, + CacheEntryType& type) +{ + // input line is: key:type=value + static cmsys::RegularExpression reg( + "^([^:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + // input line is: "key":type=value + static cmsys::RegularExpression regQuoted( + "^\"([^\"]*)\":([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$"); + bool flag = false; + if(regQuoted.find(entry)) + { + var = regQuoted.match(1); + type = cmCacheManager::StringToType(regQuoted.match(2).c_str()); + value = regQuoted.match(3); + flag = true; + } + else if (reg.find(entry)) + { + var = reg.match(1); + type = cmCacheManager::StringToType(reg.match(2).c_str()); + value = reg.match(3); + flag = true; + } + + // if value is enclosed in single quotes ('foo') then remove them + // it is used to enclose trailing space or tab + if (flag && + value.size() >= 2 && + value[0] == '\'' && + value[value.size() - 1] == '\'') + { + value = value.substr(1, + value.size() - 2); + } + + return flag; +} + +void cmCacheManager::CleanCMakeFiles(const char* path) +{ + std::string glob = path; + glob += cmake::GetCMakeFilesDirectory(); + glob += "/*.cmake"; + cmsys::Glob globIt; + globIt.FindFiles(glob); + std::vector files = globIt.GetFiles(); + for(std::vector::iterator i = files.begin(); + i != files.end(); ++i) + { + cmSystemTools::RemoveFile(i->c_str()); + } +} + +bool cmCacheManager::LoadCache(const char* path, + bool internal, + std::set& excludes, + std::set& includes) +{ + std::string cacheFile = path; + cacheFile += "/CMakeCache.txt"; + // clear the old cache, if we are reading in internal values + if ( internal ) + { + this->Cache.clear(); + } + if(!cmSystemTools::FileExists(cacheFile.c_str())) + { + this->CleanCMakeFiles(path); + return false; + } + + std::ifstream fin(cacheFile.c_str()); + if(!fin) + { + return false; + } + const char *realbuffer; + std::string buffer; + std::string entryKey; + while(fin) + { + // Format is key:type=value + CacheEntry e; + cmSystemTools::GetLineFromStream(fin, buffer); + realbuffer = buffer.c_str(); + while(*realbuffer != '0' && + (*realbuffer == ' ' || + *realbuffer == '\t' || + *realbuffer == '\r' || + *realbuffer == '\n')) + { + realbuffer++; + } + // skip blank lines and comment lines + if(realbuffer[0] == '#' || realbuffer[0] == 0) + { + continue; + } + while(realbuffer[0] == '/' && realbuffer[1] == '/') + { + if ((realbuffer[2] == '\\') && (realbuffer[3]=='n')) + { + e.Properties["HELPSTRING"] += "\n"; + e.Properties["HELPSTRING"] += &realbuffer[4]; + } + else + { + e.Properties["HELPSTRING"] += &realbuffer[2]; + } + cmSystemTools::GetLineFromStream(fin, buffer); + realbuffer = buffer.c_str(); + if(!fin) + { + continue; + } + } + if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value, e.Type)) + { + if ( excludes.find(entryKey) == excludes.end() ) + { + // Load internal values if internal is set. + // If the entry is not internal to the cache being loaded + // or if it is in the list of internal entries to be + // imported, load it. + if ( internal || (e.Type != INTERNAL) || + (includes.find(entryKey) != includes.end()) ) + { + // If we are loading the cache from another project, + // make all loaded entries internal so that it is + // not visible in the gui + if (!internal) + { + e.Type = INTERNAL; + e.Properties["HELPSTRING"] = "DO NOT EDIT, "; + e.Properties["HELPSTRING"] += entryKey; + e.Properties["HELPSTRING"] += " loaded from external file. " + "To change this value edit this file: "; + e.Properties["HELPSTRING"] += path; + e.Properties["HELPSTRING"] += "/CMakeCache.txt" ; + } + if ( e.Type == cmCacheManager::INTERNAL && + (entryKey.size() > strlen("-ADVANCED")) && + strcmp(entryKey.c_str() + (entryKey.size() - + strlen("-ADVANCED")), "-ADVANCED") == 0 ) + { + std::string value = e.Value; + std::string akey = + entryKey.substr(0, (entryKey.size() - strlen("-ADVANCED"))); + cmCacheManager::CacheIterator it = + this->GetCacheIterator(akey.c_str()); + if ( it.IsAtEnd() ) + { + e.Type = cmCacheManager::UNINITIALIZED; + this->Cache[akey] = e; + } + if (!it.Find(akey.c_str())) + { + cmSystemTools::Error("Internal CMake error when reading cache"); + } + it.SetProperty("ADVANCED", value.c_str()); + } + else if ( e.Type == cmCacheManager::INTERNAL && + (entryKey.size() > strlen("-MODIFIED")) && + strcmp(entryKey.c_str() + (entryKey.size() - + strlen("-MODIFIED")), "-MODIFIED") == 0 ) + { + std::string value = e.Value; + std::string akey = + entryKey.substr(0, (entryKey.size() - strlen("-MODIFIED"))); + cmCacheManager::CacheIterator it = + this->GetCacheIterator(akey.c_str()); + if ( it.IsAtEnd() ) + { + e.Type = cmCacheManager::UNINITIALIZED; + this->Cache[akey] = e; + } + if (!it.Find(akey.c_str())) + { + cmSystemTools::Error("Internal CMake error when reading cache"); + } + it.SetProperty("MODIFIED", value.c_str()); + } + else + { + e.Initialized = true; + this->Cache[entryKey] = e; + } + } + } + } + else + { + cmSystemTools::Error("Parse error in cache file ", cacheFile.c_str(), + ". Offending entry: ", realbuffer); + } + } + this->CacheMajorVersion = 0; + this->CacheMinorVersion = 0; + if(const char* cmajor = this->GetCacheValue("CMAKE_CACHE_MAJOR_VERSION")) + { + unsigned int v=0; + if(sscanf(cmajor, "%u", &v) == 1) + { + this->CacheMajorVersion = v; + } + if(const char* cminor = this->GetCacheValue("CMAKE_CACHE_MINOR_VERSION")) + { + if(sscanf(cminor, "%u", &v) == 1) + { + this->CacheMinorVersion = v; + } + } + } + else + { + // CMake version not found in the list file. + // Set as version 0.0 + this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0", + "Minor version of cmake used to create the " + "current loaded cache", cmCacheManager::INTERNAL); + this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0", + "Major version of cmake used to create the " + "current loaded cache", cmCacheManager::INTERNAL); + + } + // check to make sure the cache directory has not + // been moved + if ( internal && this->GetCacheValue("CMAKE_CACHEFILE_DIR") ) + { + std::string currentcwd = path; + std::string oldcwd = this->GetCacheValue("CMAKE_CACHEFILE_DIR"); + cmSystemTools::ConvertToUnixSlashes(currentcwd); + currentcwd += "/CMakeCache.txt"; + oldcwd += "/CMakeCache.txt"; + if(!cmSystemTools::SameFile(oldcwd.c_str(), currentcwd.c_str())) + { + std::string message = + std::string("The current CMakeCache.txt directory ") + + currentcwd + std::string(" is different than the directory ") + + std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) + + std::string(" where CMackeCache.txt was created. This may result " + "in binaries being created in the wrong place. If you " + "are not sure, reedit the CMakeCache.txt"); + cmSystemTools::Error(message.c_str()); + } + } + return true; +} + +bool cmCacheManager::SaveCache(cmMakefile* mf) +{ + return this->SaveCache(mf->GetHomeOutputDirectory()); +} + + +bool cmCacheManager::SaveCache(const char* path) +{ + std::string cacheFile = path; + cacheFile += "/CMakeCache.txt"; + std::string tempFile = cacheFile; + tempFile += ".tmp"; + std::ofstream fout(tempFile.c_str()); + if(!fout) + { + cmSystemTools::Error("Unable to open cache file for save. ", + cacheFile.c_str()); + cmSystemTools::ReportLastSystemError(""); + return false; + } + // before writing the cache, update the version numbers + // to the + char temp[1024]; + sprintf(temp, "%d", cmVersion::GetMinorVersion()); + this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp, + "Minor version of cmake used to create the " + "current loaded cache", cmCacheManager::INTERNAL); + sprintf(temp, "%d", cmVersion::GetMajorVersion()); + this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp, + "Major version of cmake used to create the " + "current loaded cache", cmCacheManager::INTERNAL); + + this->AddCacheEntry("CMAKE_CACHE_RELEASE_VERSION", + cmVersion::GetReleaseVersion().c_str(), + "Major version of cmake used to create the " + "current loaded cache", cmCacheManager::INTERNAL); + + // Let us store the current working directory so that if somebody + // Copies it, he will not be surprised + std::string currentcwd = path; + if ( currentcwd[0] >= 'A' && currentcwd[0] <= 'Z' && + currentcwd[1] == ':' ) + { + currentcwd[0] = currentcwd[0] - 'A' + 'a'; + } + cmSystemTools::ConvertToUnixSlashes(currentcwd); + this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(), + "This is the directory where this CMakeCahe.txt" + " was created", cmCacheManager::INTERNAL); + + fout << "# This is the CMakeCache file.\n" + << "# For build in directory: " << currentcwd << "\n"; + cmCacheManager::CacheEntry* cmakeCacheEntry + = this->GetCacheEntry("CMAKE_COMMAND"); + if ( cmakeCacheEntry ) + { + fout << "# It was generated by CMake: " << + cmakeCacheEntry->Value << std::endl; + } + + fout << "# You can edit this file to change values found and used by cmake." + << std::endl + << "# If you do not want to change any of the values, simply exit the " + "editor." << std::endl + << "# If you do want to change a value, simply edit, save, and exit " + "the editor." << std::endl + << "# The syntax for the file is as follows:\n" + << "# KEY:TYPE=VALUE\n" + << "# KEY is the name of a variable in the cache.\n" + << "# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT " + "TYPE!." << std::endl + << "# VALUE is the current value for the KEY.\n\n"; + + fout << "########################\n"; + fout << "# EXTERNAL cache entries\n"; + fout << "########################\n"; + fout << "\n"; + + for( std::map::const_iterator i = + this->Cache.begin(); i != this->Cache.end(); ++i) + { + const CacheEntry& ce = (*i).second; + CacheEntryType t = ce.Type; + if(!ce.Initialized) + { + /* + // This should be added in, but is not for now. + cmSystemTools::Error("Cache entry \"", (*i).first.c_str(), + "\" is uninitialized"); + */ + } + else if(t != INTERNAL) + { + // Format is key:type=value + std::map::const_iterator it = + ce.Properties.find("HELPSTRING"); + if ( it == ce.Properties.end() ) + { + cmCacheManager::OutputHelpString(fout, "Missing description"); + } + else + { + cmCacheManager::OutputHelpString(fout, it->second); + } + std::string key; + // support : in key name by double quoting + if((*i).first.find(':') != std::string::npos || + (*i).first.find("//") == 0) + { + key = "\""; + key += i->first; + key += "\""; + } + else + { + key = i->first; + } + fout << key.c_str() << ":" + << cmCacheManagerTypes[t] << "="; + // if value has trailing space or tab, enclose it in single quotes + if (ce.Value.size() && + (ce.Value[ce.Value.size() - 1] == ' ' || + ce.Value[ce.Value.size() - 1] == '\t')) + { + fout << '\'' << ce.Value << '\''; + } + else + { + fout << ce.Value; + } + fout << "\n\n"; + } + } + + fout << "\n"; + fout << "########################\n"; + fout << "# INTERNAL cache entries\n"; + fout << "########################\n"; + fout << "\n"; + + for( cmCacheManager::CacheIterator i = this->NewIterator(); + !i.IsAtEnd(); i.Next()) + { + if ( !i.Initialized() ) + { + continue; + } + + CacheEntryType t = i.GetType(); + bool advanced = i.PropertyExists("ADVANCED"); + if ( advanced ) + { + // Format is key:type=value + std::string key; + std::string rkey = i.GetName(); + std::string helpstring; + // If this is advanced variable, we have to do some magic for + // backward compatibility + helpstring = "Advanced flag for variable: "; + helpstring += i.GetName(); + rkey += "-ADVANCED"; + cmCacheManager::OutputHelpString(fout, helpstring.c_str()); + // support : in key name by double quoting + if(rkey.find(':') != std::string::npos || + rkey.find("//") == 0) + { + key = "\""; + key += rkey; + key += "\""; + } + else + { + key = rkey; + } + fout << key.c_str() << ":INTERNAL=" + << (i.GetPropertyAsBool("ADVANCED") ? "1" : "0") << "\n"; + } + bool modified = i.PropertyExists("MODIFIED"); + if ( modified ) + { + // Format is key:type=value + std::string key; + std::string rkey = i.GetName(); + std::string helpstring; + // If this is advanced variable, we have to do some magic for + // backward compatibility + helpstring = "Modified flag for variable: "; + helpstring += i.GetName(); + rkey += "-MODIFIED"; + cmCacheManager::OutputHelpString(fout, helpstring.c_str()); + // support : in key name by double quoting + if(rkey.find(':') != std::string::npos || + rkey.find("//") == 0) + { + key = "\""; + key += rkey; + key += "\""; + } + else + { + key = rkey; + } + fout << key.c_str() << ":INTERNAL=" + << (i.GetPropertyAsBool("MODIFIED") ? "1" : "0") << "\n"; + } + if(t == cmCacheManager::INTERNAL) + { + // Format is key:type=value + std::string key; + std::string rkey = i.GetName(); + std::string helpstring; + const char* hs = i.GetProperty("HELPSTRING"); + if ( hs ) + { + helpstring = i.GetProperty("HELPSTRING"); + } + else + { + helpstring = ""; + } + cmCacheManager::OutputHelpString(fout, helpstring.c_str()); + // support : in key name by double quoting + if(rkey.find(':') != std::string::npos || + rkey.find("//") == 0) + { + key = "\""; + key += rkey; + key += "\""; + } + else + { + key = rkey; + } + fout << key.c_str() << ":" + << cmCacheManagerTypes[t] << "="; + // if value has trailing space or tab, enclose it in single quotes + std::string value = i.GetValue(); + if (value.size() && + (value[value.size() - 1] == ' ' || + value[value.size() - 1] == '\t')) + { + fout << '\'' << value << '\''; + } + else + { + fout << value; + } + fout << "\n"; + } + } + fout << "\n"; + fout.close(); + cmSystemTools::CopyFileIfDifferent(tempFile.c_str(), + cacheFile.c_str()); + cmSystemTools::RemoveFile(tempFile.c_str()); + std::string checkCacheFile = path; + checkCacheFile += cmake::GetCMakeFilesDirectory(); + cmSystemTools::MakeDirectory(checkCacheFile.c_str()); + checkCacheFile += "/cmake.check_cache"; + std::ofstream checkCache(checkCacheFile.c_str()); + if(!checkCache) + { + cmSystemTools::Error("Unable to open check cache file for write. ", + checkCacheFile.c_str()); + return false; + } + checkCache << "# This file is generated by cmake for dependency checking " + "of the CMakeCache.txt file\n"; + return true; +} + +bool cmCacheManager::DeleteCache(const char* path) +{ + std::string cacheFile = path; + cmSystemTools::ConvertToUnixSlashes(cacheFile); + std::string cmakeFiles = cacheFile; + cacheFile += "/CMakeCache.txt"; + cmSystemTools::RemoveFile(cacheFile.c_str()); + // now remove the files in the CMakeFiles directory + // this cleans up language cache files + cmsys::Directory dir; + cmakeFiles += cmake::GetCMakeFilesDirectory(); + dir.Load(cmakeFiles.c_str()); + for (unsigned long fileNum = 0; + fileNum < dir.GetNumberOfFiles(); + ++fileNum) + { + if(!cmSystemTools:: + FileIsDirectory(dir.GetFile(fileNum))) + { + std::string fullPath = cmakeFiles; + fullPath += "/"; + fullPath += dir.GetFile(fileNum); + cmSystemTools::RemoveFile(fullPath.c_str()); + } + } + return true; +} + +void cmCacheManager::OutputHelpString(std::ofstream& fout, + const std::string& helpString) +{ + std::string::size_type end = helpString.size(); + if(end == 0) + { + return; + } + std::string oneLine; + std::string::size_type pos = 0; + for (std::string::size_type i=0; i<=end; i++) + { + if ((i==end) + || (helpString[i]=='\n') + || ((i-pos >= 60) && (helpString[i]==' '))) + { + fout << "//"; + if (helpString[pos] == '\n') + { + pos++; + fout << "\\n"; + } + oneLine = helpString.substr(pos, i - pos); + fout << oneLine.c_str() << "\n"; + pos = i; + } + } +} + +void cmCacheManager::RemoveCacheEntry(const char* key) +{ + CacheEntryMap::iterator i = this->Cache.find(key); + if(i != this->Cache.end()) + { + this->Cache.erase(i); + } + else + { + std::cerr << "Failed to remove entry:" << key << std::endl; + } +} + + +cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(const char* key) +{ + CacheEntryMap::iterator i = this->Cache.find(key); + if(i != this->Cache.end()) + { + return &i->second; + } + return 0; +} + +cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator( + const char *key) +{ + return CacheIterator(*this, key); +} + +const char* cmCacheManager::GetCacheValue(const char* key) const +{ + CacheEntryMap::const_iterator i = this->Cache.find(key); + if(i != this->Cache.end() && + i->second.Initialized) + { + return i->second.Value.c_str(); + } + return 0; +} + + +void cmCacheManager::PrintCache(std::ostream& out) const +{ + out << "=================================================" << std::endl; + out << "CMakeCache Contents:" << std::endl; + for(std::map::const_iterator i = + this->Cache.begin(); i != this->Cache.end(); ++i) + { + if((*i).second.Type != INTERNAL) + { + out << (*i).first.c_str() << " = " << (*i).second.Value.c_str() + << std::endl; + } + } + out << "\n\n"; + out << "To change values in the CMakeCache, " + << std::endl << "edit CMakeCache.txt in your output directory.\n"; + out << "=================================================" << std::endl; +} + + +void cmCacheManager::AddCacheEntry(const char* key, + const char* value, + const char* helpString, + CacheEntryType type) +{ + CacheEntry& e = this->Cache[key]; + if ( value ) + { + e.Value = value; + e.Initialized = true; + } + else + { + e.Value = ""; + } + e.Type = type; + // make sure we only use unix style paths + if(type == FILEPATH || type == PATH) + { + cmSystemTools::ConvertToUnixSlashes(e.Value); + } + if ( helpString ) + { + e.Properties["HELPSTRING"] = helpString; + } + else + { + e.Properties["HELPSTRING"] = + "(This variable does not exist and should not be used)"; + } + this->Cache[key] = e; +} + +void cmCacheManager::AddCacheEntry(const char* key, bool v, + const char* helpString) +{ + if(v) + { + this->AddCacheEntry(key, "ON", helpString, cmCacheManager::BOOL); + } + else + { + this->AddCacheEntry(key, "OFF", helpString, cmCacheManager::BOOL); + } +} + +bool cmCacheManager::CacheIterator::IsAtEnd() const +{ + return this->Position == this->Container.Cache.end(); +} + +void cmCacheManager::CacheIterator::Begin() +{ + this->Position = this->Container.Cache.begin(); +} + +bool cmCacheManager::CacheIterator::Find(const char* key) +{ + this->Position = this->Container.Cache.find(key); + return !this->IsAtEnd(); +} + +void cmCacheManager::CacheIterator::Next() +{ + if (!this->IsAtEnd()) + { + ++this->Position; + } +} + +void cmCacheManager::CacheIterator::SetValue(const char* value) +{ + if (this->IsAtEnd()) + { + return; + } + CacheEntry* entry = &this->GetEntry(); + if ( value ) + { + entry->Value = value; + entry->Initialized = true; + } + else + { + entry->Value = ""; + } +} + +const char* cmCacheManager::CacheIterator::GetProperty( + const char* property) const +{ + // make sure it is not at the end + if (this->IsAtEnd()) + { + return 0; + } + + if ( !strcmp(property, "TYPE") || !strcmp(property, "VALUE") ) + { + cmSystemTools::Error("Property \"", property, + "\" cannot be accessed through the GetProperty()"); + return 0; + } + const CacheEntry* ent = &this->GetEntry(); + std::map::const_iterator it = + ent->Properties.find(property); + if ( it == ent->Properties.end() ) + { + return 0; + } + return it->second.c_str(); +} + +void cmCacheManager::CacheIterator::SetProperty(const char* p, const char* v) +{ + // make sure it is not at the end + if (this->IsAtEnd()) + { + return; + } + + if ( !strcmp(p, "TYPE") || !strcmp(p, "VALUE") ) + { + cmSystemTools::Error("Property \"", p, + "\" cannot be accessed through the SetProperty()"); + return; + } + CacheEntry* ent = &this->GetEntry(); + ent->Properties[p] = v; +} + + +bool cmCacheManager::CacheIterator::GetValueAsBool() const +{ + return cmSystemTools::IsOn(this->GetEntry().Value.c_str()); +} + +bool cmCacheManager::CacheIterator::GetPropertyAsBool( + const char* property) const +{ + // make sure it is not at the end + if (this->IsAtEnd()) + { + return false; + } + + if ( !strcmp(property, "TYPE") || !strcmp(property, "VALUE") ) + { + cmSystemTools::Error("Property \"", property, + "\" cannot be accessed through the GetPropertyAsBool()"); + return false; + } + const CacheEntry* ent = &this->GetEntry(); + std::map::const_iterator it = + ent->Properties.find(property); + if ( it == ent->Properties.end() ) + { + return false; + } + return cmSystemTools::IsOn(it->second.c_str()); +} + + +void cmCacheManager::CacheIterator::SetProperty(const char* p, bool v) +{ + // make sure it is not at the end + if (this->IsAtEnd()) + { + return; + } + + if ( !strcmp(p, "TYPE") || !strcmp(p, "VALUE") ) + { + cmSystemTools::Error("Property \"", p, + "\" cannot be accessed through the SetProperty()"); + return; + } + CacheEntry* ent = &this->GetEntry(); + ent->Properties[p] = v ? "ON" : "OFF"; +} + +bool cmCacheManager::CacheIterator::PropertyExists(const char* property) const +{ + // make sure it is not at the end + if (this->IsAtEnd()) + { + return false; + } + + if ( !strcmp(property, "TYPE") || !strcmp(property, "VALUE") ) + { + cmSystemTools::Error("Property \"", property, + "\" cannot be accessed through the PropertyExists()"); + return false; + } + const CacheEntry* ent = &this->GetEntry(); + std::map::const_iterator it = + ent->Properties.find(property); + if ( it == ent->Properties.end() ) + { + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmCacheManager::NeedCacheCompatibility(int major, int minor) +{ + // Compatibility is not needed if the cache version is zero because + // the cache was created or modified by the user. + if(this->CacheMajorVersion == 0) + { + return false; + } + + // Compatibility is needed if the cache version is equal to or lower + // than the given version. + unsigned int actual_compat = + CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0); + return (actual_compat && + actual_compat <= CMake_VERSION_ENCODE(major, minor, 0)); +} diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h new file mode 100644 index 000000000..be9dbe817 --- /dev/null +++ b/Source/cmCacheManager.h @@ -0,0 +1,181 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCacheManager.h,v $ + Language: C++ + Date: $Date: 2008-03-07 16:43:47 $ + Version: $Revision: 1.49 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCacheManager_h +#define cmCacheManager_h + +#include "cmStandardIncludes.h" +class cmMakefile; +class cmMarkAsAdvancedCommand; + +/** \class cmCacheManager + * \brief Control class for cmake's cache + * + * Load and Save CMake cache files. + * + */ +class cmCacheManager +{ +public: + cmCacheManager(); + class CacheIterator; + friend class cmCacheManager::CacheIterator; + enum CacheEntryType{ BOOL=0, PATH, FILEPATH, STRING, INTERNAL,STATIC, + UNINITIALIZED }; + +private: + struct CacheEntry + { + std::string Value; + CacheEntryType Type; + std::map Properties; + bool Initialized; + CacheEntry() : Value(""), Type(UNINITIALIZED), Initialized(false) + {} + }; + +public: + class CacheIterator + { + public: + void Begin(); + bool Find(const char*); + bool IsAtEnd() const; + void Next(); + const char *GetName() const { + return this->Position->first.c_str(); } + const char* GetProperty(const char*) const ; + bool GetPropertyAsBool(const char*) const ; + bool PropertyExists(const char*) const; + void SetProperty(const char* property, const char* value); + void SetProperty(const char* property, bool value); + const char* GetValue() const { return this->GetEntry().Value.c_str(); } + bool GetValueAsBool() const; + void SetValue(const char*); + CacheEntryType GetType() const { return this->GetEntry().Type; } + void SetType(CacheEntryType ty) { this->GetEntry().Type = ty; } + bool Initialized() { return this->GetEntry().Initialized; } + cmCacheManager &Container; + std::map::iterator Position; + CacheIterator(cmCacheManager &cm) : Container(cm) { + this->Begin(); + } + CacheIterator(cmCacheManager &cm, const char* key) : Container(cm) + { + if ( key ) + { + this->Find(key); + } + } + private: + CacheEntry const& GetEntry() const { return this->Position->second; } + CacheEntry& GetEntry() { return this->Position->second; } + }; + + ///! return an iterator to iterate through the cache map + cmCacheManager::CacheIterator NewIterator() + { + return CacheIterator(*this); + } + + /** + * Types for the cache entries. These are useful as + * hints for a cache editor program. Path should bring + * up a file chooser, BOOL a check box, and STRING a + * text entry box, FILEPATH is a full path to a file which + * can be different than just a path input + */ + static CacheEntryType StringToType(const char*); + static const char* TypeToString(CacheEntryType); + + ///! Load a cache for given makefile. Loads from ouput home. + bool LoadCache(cmMakefile*); + ///! Load a cache for given makefile. Loads from path/CMakeCache.txt. + bool LoadCache(const char* path); + bool LoadCache(const char* path, bool internal); + bool LoadCache(const char* path, bool internal, + std::set& excludes, + std::set& includes); + + ///! Save cache for given makefile. Saves to ouput home CMakeCache.txt. + bool SaveCache(cmMakefile*) ; + ///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt + bool SaveCache(const char* path) ; + + ///! Delete the cache given + bool DeleteCache(const char* path); + + ///! Print the cache to a stream + void PrintCache(std::ostream&) const; + + ///! Get the iterator for an entry with a given key. + cmCacheManager::CacheIterator GetCacheIterator(const char *key=0); + + ///! Remove an entry from the cache + void RemoveCacheEntry(const char* key); + + ///! Get the number of entries in the cache + int GetSize() { + return static_cast(this->Cache.size()); } + + ///! Break up a line like VAR:type="value" into var, type and value + static bool ParseEntry(const char* entry, + std::string& var, + std::string& value, + CacheEntryType& type); + + static bool ParseEntry(const char* entry, + std::string& var, + std::string& value); + + ///! Get a value from the cache given a key + const char* GetCacheValue(const char* key) const; + + /** Get the version of CMake that wrote the cache. */ + unsigned int GetCacheMajorVersion() { return this->CacheMajorVersion; } + unsigned int GetCacheMinorVersion() { return this->CacheMinorVersion; } + bool NeedCacheCompatibility(int major, int minor); + +protected: + ///! Add an entry into the cache + void AddCacheEntry(const char* key, const char* value, + const char* helpString, CacheEntryType type); + + ///! Add a BOOL entry into the cache + void AddCacheEntry(const char* key, bool, const char* helpString); + + ///! Get a cache entry object for a key + CacheEntry *GetCacheEntry(const char *key); + ///! Clean out the CMakeFiles directory if no CMakeCache.txt + void CleanCMakeFiles(const char* path); + + // Cache version info + unsigned int CacheMajorVersion; + unsigned int CacheMinorVersion; +private: + typedef std::map CacheEntryMap; + static void OutputHelpString(std::ofstream& fout, + const std::string& helpString); + CacheEntryMap Cache; + // Only cmake and cmMakefile should be able to add cache values + // the commands should never use the cmCacheManager directly + friend class cmMakefile; // allow access to add cache values + friend class cmake; // allow access to add cache values + friend class cmakewizard; // allow access to add cache values + friend class cmMarkAsAdvancedCommand; // allow access to add cache values +}; + +#endif diff --git a/Source/cmCallVisualStudioMacro.cxx b/Source/cmCallVisualStudioMacro.cxx new file mode 100644 index 000000000..248dbcc79 --- /dev/null +++ b/Source/cmCallVisualStudioMacro.cxx @@ -0,0 +1,504 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCallVisualStudioMacro.cxx,v $ + Language: C++ + Date: $Date: 2008-02-15 16:49:58 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCallVisualStudioMacro.h" +#include "cmSystemTools.h" + + +#if defined(_MSC_VER) +#define HAVE_COMDEF_H +#endif + + +#if defined(HAVE_COMDEF_H) + + +#include + + +//---------------------------------------------------------------------------- +///! Use ReportHRESULT to make a cmSystemTools::Error after calling +///! a COM method that may have failed. +#define ReportHRESULT(hr, context) \ + if (FAILED(hr)) \ + { \ + std::ostringstream oss; \ + oss.flags(std::ios::hex); \ + oss << context << " failed HRESULT, hr = 0x" << hr << std::endl; \ + oss.flags(std::ios::dec); \ + oss << __FILE__ << "(" << __LINE__ << ")"; \ + cmSystemTools::Error(oss.str().c_str()); \ + } + + +//---------------------------------------------------------------------------- +///! Using the given instance of Visual Studio, call the named macro +HRESULT InstanceCallMacro( + IDispatch* vsIDE, + const std::string& macro, + const std::string& args) +{ + HRESULT hr = E_POINTER; + + _bstr_t macroName(macro.c_str()); + _bstr_t macroArgs(args.c_str()); + + if (0 != vsIDE) + { + DISPID dispid = (DISPID) -1; + OLECHAR *name = L"ExecuteCommand"; + + hr = vsIDE->GetIDsOfNames(IID_NULL, &name, 1, + LOCALE_USER_DEFAULT, &dispid); + ReportHRESULT(hr, "GetIDsOfNames(ExecuteCommand)"); + + if (SUCCEEDED(hr)) + { + VARIANTARG vargs[2]; + DISPPARAMS params; + VARIANT result; + EXCEPINFO excep; + UINT arg = (UINT) -1; + + // No VariantInit or VariantClear calls are necessary for + // these two vargs. They are both local _bstr_t variables + // that remain in scope for the duration of the Invoke call. + // + V_VT(&vargs[1]) = VT_BSTR; + V_BSTR(&vargs[1]) = macroName; + V_VT(&vargs[0]) = VT_BSTR; + V_BSTR(&vargs[0]) = macroArgs; + + params.rgvarg = &vargs[0]; + params.rgdispidNamedArgs = 0; + params.cArgs = sizeof(vargs)/sizeof(vargs[0]); + params.cNamedArgs = 0; + + VariantInit(&result); + + memset(&excep, 0, sizeof(excep)); + + hr = vsIDE->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT, + DISPATCH_METHOD, ¶ms, &result, &excep, &arg); + + std::ostringstream oss; + oss << std::endl; + oss << "Invoke(ExecuteCommand)" << std::endl; + oss << " Macro: " << macro.c_str() << std::endl; + oss << " Args: " << args.c_str() << std::endl; + + if (DISP_E_EXCEPTION == hr) + { + oss << "DISP_E_EXCEPTION EXCEPINFO:" << excep.wCode << std::endl; + oss << " wCode: " << excep.wCode << std::endl; + oss << " wReserved: " << excep.wReserved << std::endl; + if (excep.bstrSource) + { + oss << " bstrSource: " << + (const char*)(_bstr_t)excep.bstrSource << std::endl; + } + if (excep.bstrDescription) + { + oss << " bstrDescription: " << + (const char*)(_bstr_t)excep.bstrDescription << std::endl; + } + if (excep.bstrHelpFile) + { + oss << " bstrHelpFile: " << + (const char*)(_bstr_t)excep.bstrHelpFile << std::endl; + } + oss << " dwHelpContext: " << excep.dwHelpContext << std::endl; + oss << " pvReserved: " << excep.pvReserved << std::endl; + oss << " pfnDeferredFillIn: " << excep.pfnDeferredFillIn << std::endl; + oss << " scode: " << excep.scode << std::endl; + } + + std::string exstr(oss.str()); + ReportHRESULT(hr, exstr.c_str()); + + VariantClear(&result); + } + } + + return hr; +} + + +//---------------------------------------------------------------------------- +///! Get the Solution object from the IDE object +HRESULT GetSolutionObject( + IDispatch* vsIDE, + IDispatchPtr& vsSolution) +{ + HRESULT hr = E_POINTER; + + if (0 != vsIDE) + { + DISPID dispid = (DISPID) -1; + OLECHAR *name = L"Solution"; + + hr = vsIDE->GetIDsOfNames(IID_NULL, &name, 1, + LOCALE_USER_DEFAULT, &dispid); + ReportHRESULT(hr, "GetIDsOfNames(Solution)"); + + if (SUCCEEDED(hr)) + { + DISPPARAMS params; + VARIANT result; + EXCEPINFO excep; + UINT arg = (UINT) -1; + + params.rgvarg = 0; + params.rgdispidNamedArgs = 0; + params.cArgs = 0; + params.cNamedArgs = 0; + + VariantInit(&result); + + memset(&excep, 0, sizeof(excep)); + + hr = vsIDE->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT, + DISPATCH_PROPERTYGET, ¶ms, &result, &excep, &arg); + ReportHRESULT(hr, "Invoke(Solution)"); + + if (SUCCEEDED(hr)) + { + vsSolution = V_DISPATCH(&result); + } + + VariantClear(&result); + } + } + + return hr; +} + + +//---------------------------------------------------------------------------- +///! Get the FullName property from the Solution object +HRESULT GetSolutionFullName( + IDispatch* vsSolution, + std::string& fullName) +{ + HRESULT hr = E_POINTER; + + if (0 != vsSolution) + { + DISPID dispid = (DISPID) -1; + OLECHAR *name = L"FullName"; + + hr = vsSolution->GetIDsOfNames(IID_NULL, &name, 1, + LOCALE_USER_DEFAULT, &dispid); + ReportHRESULT(hr, "GetIDsOfNames(FullName)"); + + if (SUCCEEDED(hr)) + { + DISPPARAMS params; + VARIANT result; + EXCEPINFO excep; + UINT arg = (UINT) -1; + + params.rgvarg = 0; + params.rgdispidNamedArgs = 0; + params.cArgs = 0; + params.cNamedArgs = 0; + + VariantInit(&result); + + memset(&excep, 0, sizeof(excep)); + + hr = vsSolution->Invoke(dispid, IID_NULL, LOCALE_USER_DEFAULT, + DISPATCH_PROPERTYGET, ¶ms, &result, &excep, &arg); + ReportHRESULT(hr, "Invoke(FullName)"); + + if (SUCCEEDED(hr)) + { + fullName = (std::string) (_bstr_t) V_BSTR(&result); + } + + VariantClear(&result); + } + } + + return hr; +} + + +//---------------------------------------------------------------------------- +///! Get the FullName property from the Solution object, given the IDE object +HRESULT GetIDESolutionFullName( + IDispatch* vsIDE, + std::string& fullName) +{ + IDispatchPtr vsSolution; + HRESULT hr = GetSolutionObject(vsIDE, vsSolution); + ReportHRESULT(hr, "GetSolutionObject"); + + if (SUCCEEDED(hr)) + { + GetSolutionFullName(vsSolution, fullName); + ReportHRESULT(hr, "GetSolutionFullName"); + } + + return hr; +} + + +//---------------------------------------------------------------------------- +///! Get all running objects from the Windows running object table. +///! Save them in a map by their display names. +HRESULT GetRunningInstances(std::map& mrot) +{ + // mrot == Map of the Running Object Table + + IRunningObjectTablePtr runningObjectTable; + IEnumMonikerPtr monikerEnumerator; + IMonikerPtr moniker; + ULONG numFetched = 0; + + HRESULT hr = GetRunningObjectTable(0, &runningObjectTable); + ReportHRESULT(hr, "GetRunningObjectTable"); + + if(SUCCEEDED(hr)) + { + hr = runningObjectTable->EnumRunning(&monikerEnumerator); + ReportHRESULT(hr, "EnumRunning"); + } + + if(SUCCEEDED(hr)) + { + hr = monikerEnumerator->Reset(); + ReportHRESULT(hr, "Reset"); + } + + if(SUCCEEDED(hr)) + { + while (S_OK == monikerEnumerator->Next(1, &moniker, &numFetched)) + { + std::string runningObjectName; + IUnknownPtr runningObjectVal; + IBindCtxPtr ctx; + + hr = CreateBindCtx(0, &ctx); + ReportHRESULT(hr, "CreateBindCtx"); + + if(SUCCEEDED(hr)) + { + LPOLESTR displayName = 0; + hr = moniker->GetDisplayName(ctx, 0, &displayName); + ReportHRESULT(hr, "GetDisplayName"); + if (displayName) + { + runningObjectName = (std::string) (_bstr_t) displayName; + CoTaskMemFree(displayName); + } + + hr = runningObjectTable->GetObject(moniker, &runningObjectVal); + ReportHRESULT(hr, "GetObject"); + if(SUCCEEDED(hr)) + { + mrot.insert(std::make_pair(runningObjectName, runningObjectVal)); + } + } + + numFetched = 0; + moniker = 0; + } + } + + return hr; +} + + +//---------------------------------------------------------------------------- +///! Do the two file names refer to the same Visual Studio solution? Or are +///! we perhaps looking for any and all solutions? +bool FilesSameSolution( + const std::string& slnFile, + const std::string& slnName) +{ + if (slnFile == "ALL" || slnName == "ALL") + { + return true; + } + + // Otherwise, make lowercase local copies, convert to Unix slashes, and + // see if the resulting strings are the same: + std::string s1 = cmSystemTools::LowerCase(slnFile); + std::string s2 = cmSystemTools::LowerCase(slnName); + cmSystemTools::ConvertToUnixSlashes(s1); + cmSystemTools::ConvertToUnixSlashes(s2); + + return s1 == s2; +} + + +//---------------------------------------------------------------------------- +///! Find instances of Visual Studio with the given solution file +///! open. Pass "ALL" for slnFile to gather all running instances +///! of Visual Studio. +HRESULT FindVisualStudioInstances( + const std::string& slnFile, + std::vector& instances) +{ + std::map mrot; + + HRESULT hr = GetRunningInstances(mrot); + ReportHRESULT(hr, "GetRunningInstances"); + + if(SUCCEEDED(hr)) + { + std::map::iterator it; + for(it = mrot.begin(); it != mrot.end(); ++it) + { + if (cmSystemTools::StringStartsWith(it->first.c_str(), + "!VisualStudio.DTE.")) + { + IDispatchPtr disp(it->second); + if (disp != (IDispatch*) 0) + { + std::string slnName; + hr = GetIDESolutionFullName(disp, slnName); + ReportHRESULT(hr, "GetIDESolutionFullName"); + + if (FilesSameSolution(slnFile, slnName)) + { + instances.push_back(disp); + + //std::cout << "Found Visual Studio instance." << std::endl; + //std::cout << " ROT entry name: " << it->first << std::endl; + //std::cout << " ROT entry object: " + // << (IUnknown*) it->second << std::endl; + //std::cout << " slnFile: " << slnFile << std::endl; + //std::cout << " slnName: " << slnName << std::endl; + } + } + } + } + } + + return hr; +} + + +#endif //defined(HAVE_COMDEF_H) + + +//---------------------------------------------------------------------------- +int cmCallVisualStudioMacro::GetNumberOfRunningVisualStudioInstances( + const std::string& slnFile) +{ + int count = 0; + +#if defined(HAVE_COMDEF_H) + HRESULT hr = CoInitialize(0); + ReportHRESULT(hr, "CoInitialize"); + + if(SUCCEEDED(hr)) + { + std::vector instances; + hr = FindVisualStudioInstances(slnFile, instances); + ReportHRESULT(hr, "FindVisualStudioInstances"); + + if(SUCCEEDED(hr)) + { + count = static_cast(instances.size()); + } + + // Force release all COM pointers before CoUninitialize: + instances.clear(); + + CoUninitialize(); + } +#else + (void)slnFile; +#endif + + return count; +} + + +//---------------------------------------------------------------------------- +///! Get all running objects from the Windows running object table. +///! Save them in a map by their display names. +int cmCallVisualStudioMacro::CallMacro( + const std::string& slnFile, + const std::string& macro, + const std::string& args) +{ + int err = 1; // no comdef.h + +#if defined(HAVE_COMDEF_H) + err = 2; // error initializing + + HRESULT hr = CoInitialize(0); + ReportHRESULT(hr, "CoInitialize"); + + if(SUCCEEDED(hr)) + { + std::vector instances; + hr = FindVisualStudioInstances(slnFile, instances); + ReportHRESULT(hr, "FindVisualStudioInstances"); + + if(SUCCEEDED(hr)) + { + err = 0; // no error + + std::vector::iterator it; + for(it = instances.begin(); it != instances.end(); ++it) + { + hr = InstanceCallMacro(*it, macro, args); + ReportHRESULT(hr, "InstanceCallMacro"); + + if (FAILED(hr)) + { + err = 3; // error attempting to call the macro + } + } + + if(0 == instances.size()) + { + // no instances to call + + //cmSystemTools::Message( + // "cmCallVisualStudioMacro::CallMacro no instances found to call", + // "Warning"); + } + } + + // Force release all COM pointers before CoUninitialize: + instances.clear(); + + CoUninitialize(); + } +#else + (void)slnFile; + (void)macro; + (void)args; + cmSystemTools::Error("cmCallVisualStudioMacro::CallMacro is not " + "supported on this platform"); +#endif + + if (err) + { + std::ostringstream oss; + oss << "cmCallVisualStudioMacro::CallMacro failed, err = " << err; + cmSystemTools::Error(oss.str().c_str()); + } + + return err; +} diff --git a/Source/cmCallVisualStudioMacro.h b/Source/cmCallVisualStudioMacro.h new file mode 100644 index 000000000..fa4ab4248 --- /dev/null +++ b/Source/cmCallVisualStudioMacro.h @@ -0,0 +1,49 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCallVisualStudioMacro.h,v $ + Language: C++ + Date: $Date: 2007-11-16 12:01:58 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCallVisualStudioMacro_h +#define cmCallVisualStudioMacro_h + +#include "cmStandardIncludes.h" + +/** \class cmCallVisualStudioMacro + * \brief Control class for communicating with CMake's Visual Studio macros + * + * Find running instances of Visual Studio by full path solution name. + * Call a Visual Studio IDE macro in any of those instances. + */ +class cmCallVisualStudioMacro +{ +public: + ///! Call the named macro in instances of Visual Studio with the + ///! given solution file open. Pass "ALL" for slnFile to call the + ///! macro in each Visual Studio instance. + static int CallMacro(const std::string& slnFile, + const std::string& macro, + const std::string& args); + + ///! Count the number of running instances of Visual Studio with the + ///! given solution file open. Pass "ALL" for slnFile to count all + ///! running Visual Studio instances. + static int GetNumberOfRunningVisualStudioInstances( + const std::string& slnFile); + +protected: + +private: +}; + +#endif diff --git a/Source/cmCommand.h b/Source/cmCommand.h new file mode 100644 index 000000000..e9b3bfff3 --- /dev/null +++ b/Source/cmCommand.h @@ -0,0 +1,179 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommand.h,v $ + Language: C++ + Date: $Date: 2008-03-01 20:20:35 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCommand_h +#define cmCommand_h + +#include "cmObject.h" +#include "cmListFileCache.h" +#include "cmMakefile.h" +#include "cmCommandArgumentsHelper.h" + +/** \class cmCommand + * \brief Superclass for all commands in CMake. + * + * cmCommand is the base class for all commands in CMake. A command + * manifests as an entry in CMakeLists.txt and produces one or + * more makefile rules. Commands are associated with a particular + * makefile. This base class cmCommand defines the API for commands + * to support such features as enable/disable, inheritance, + * documentation, and construction. + */ +class cmCommand : public cmObject +{ +public: + cmTypeMacro(cmCommand, cmObject); + + /** + * Construct the command. By default it is enabled with no makefile. + */ + cmCommand() + {this->Makefile = 0; this->Enabled = true;} + + /** + * Need virtual destructor to destroy real command type. + */ + virtual ~cmCommand() {} + + /** + * Specify the makefile. + */ + void SetMakefile(cmMakefile*m) + {this->Makefile = m; } + cmMakefile* GetMakefile() { return this->Makefile; } + + /** + * This is called by the cmMakefile when the command is first + * encountered in the CMakeLists.txt file. It expands the command's + * arguments and then invokes the InitialPass. + */ + virtual bool InvokeInitialPass(const std::vector& args, + cmExecutionStatus &status) + { + std::vector expandedArguments; + this->Makefile->ExpandArguments(args, expandedArguments); + return this->InitialPass(expandedArguments,status); + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &) = 0; + + /** + * This is called at the end after all the information + * specified by the command is accumulated. Most commands do + * not implement this method. At this point, reading and + * writing to the cache can be done. + */ + virtual void FinalPass() {}; + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() = 0; + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() + { + return false; + } + + /** + * This determines if usage of the method is discouraged or not. + * This is currently only used for generating the documentation. + */ + virtual bool IsDiscouraged() + { + return false; + } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() = 0; + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() = 0; + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() = 0; + + /** + * Enable the command. + */ + void EnabledOn() + {this->Enabled = true;} + + /** + * Disable the command. + */ + void EnabledOff() + {this->Enabled = false;} + + /** + * Query whether the command is enabled. + */ + bool GetEnabled() + {return this->Enabled;} + + /** + * Disable or enable the command. + */ + void SetEnabled(bool enabled) + {this->Enabled = enabled;} + + /** + * Return the last error string. + */ + const char* GetError() + { + if(this->Error.length() == 0) + { + this->Error = this->GetName(); + this->Error += " unknown error."; + } + return this->Error.c_str(); + } + + /** + * Set the error message + */ + void SetError(const char* e) + { + this->Error = this->GetName(); + this->Error += " "; + this->Error += e; + } + +protected: + cmMakefile* Makefile; + cmCommandArgumentsHelper Helper; + +private: + bool Enabled; + std::string Error; +}; + +#endif diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx new file mode 100644 index 000000000..9305570f4 --- /dev/null +++ b/Source/cmCommandArgumentLexer.cxx @@ -0,0 +1,2006 @@ +#include "cmStandardIncludes.h" + +#line 2 "cmCommandArgumentLexer.cxx" + +#line 4 "cmCommandArgumentLexer.cxx" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmCommandArgument_yylex_init (yyscan_t* scanner); + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmCommandArgument_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmCommandArgument_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmCommandArgument_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmCommandArgument_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmCommandArgument_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmCommandArgument_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmCommandArgument_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 13 +#define YY_END_OF_BUFFER 14 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[26] = + { 0, + 0, 0, 0, 0, 0, 0, 14, 8, 9, 6, + 5, 13, 10, 4, 11, 12, 8, 0, 3, 6, + 0, 7, 1, 2, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, + 1, 1, 4, 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 5, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 6, 1, 1, 4, 1, 4, 4, 4, 4, + + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 7, 1, 8, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[9] = + { 0, + 1, 2, 3, 1, 3, 3, 3, 3 + } ; + +static yyconst flex_int16_t yy_base[28] = + { 0, + 0, 0, 18, 17, 16, 15, 20, 0, 5, 14, + 7, 25, 25, 25, 0, 25, 0, 3, 25, 0, + 9, 25, 25, 25, 25, 14, 16 + } ; + +static yyconst flex_int16_t yy_def[28] = + { 0, + 25, 1, 1, 1, 1, 1, 25, 26, 25, 26, + 25, 25, 25, 25, 27, 25, 26, 9, 25, 10, + 25, 25, 25, 25, 0, 25, 25 + } ; + +static yyconst flex_int16_t yy_nxt[34] = + { 0, + 8, 8, 9, 10, 11, 12, 13, 14, 18, 23, + 21, 19, 21, 24, 17, 17, 22, 20, 22, 25, + 16, 16, 15, 15, 7, 25, 25, 25, 25, 25, + 25, 25, 25 + } ; + +static yyconst flex_int16_t yy_chk[34] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 9, 18, + 11, 9, 21, 21, 26, 26, 27, 10, 27, 7, + 6, 5, 4, 3, 25, 25, 25, 25, 25, 25, + 25, 25, 25 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmCommandArgumentLexer.in.l" +#line 2 "cmCommandArgumentLexer.in.l" +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentLexer.cxx,v $ + Language: C++ + Date: $Date: 2007-09-24 15:16:13 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l + +Modify cmCommandArgumentLexer.cxx: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmCommandArgument_yyalloc, cmCommandArgument_yyrealloc, cmCommandArgument_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmCommandArgumentLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmCommandArgumentParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmCommandArgumentParserTokens.h" + +/*--------------------------------------------------------------------------*/ + + +#line 505 "cmCommandArgumentLexer.cxx" + +#define INITIAL 0 +#define ESCAPES 1 +#define NOESCAPES 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#else +extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmCommandArgument_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 62 "cmCommandArgumentLexer.in.l" + + +#line 727 "cmCommandArgumentLexer.cxx" + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmCommandArgument_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmCommandArgument_yy_load_buffer_state(yyscanner ); + } + + for(;;) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 26 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 25 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 64 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} +case 2: +YY_RULE_SETUP +#line 70 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} +case 3: +YY_RULE_SETUP +#line 76 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DCURLYVariable; + return cal_DCURLY; +} +case 4: +YY_RULE_SETUP +#line 83 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->RCURLYVariable; + return cal_RCURLY; +} +case 5: +YY_RULE_SETUP +#line 90 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->ATVariable; + return cal_AT; +} +case 6: +YY_RULE_SETUP +#line 97 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; +} +case 7: +YY_RULE_SETUP +#line 103 "cmCommandArgumentLexer.in.l" +{ + if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) + { + return cal_ERROR; + } + return cal_SYMBOL; +} +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 111 "cmCommandArgumentLexer.in.l" +{ + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; +} +case 9: +YY_RULE_SETUP +#line 117 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DOLLARVariable; + return cal_DOLLAR; +} +case 10: +YY_RULE_SETUP +#line 123 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->LCURLYVariable; + return cal_LCURLY; +} +case 11: +YY_RULE_SETUP +#line 129 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_BSLASH; +} +case 12: +YY_RULE_SETUP +#line 135 "cmCommandArgumentLexer.in.l" +{ + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_SYMBOL; +} +case 13: +YY_RULE_SETUP +#line 141 "cmCommandArgumentLexer.in.l" +ECHO; + YY_BREAK +#line 929 "cmCommandArgumentLexer.cxx" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(ESCAPES): +case YY_STATE_EOF(NOESCAPES): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmCommandArgument_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmCommandArgument_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +return 0; /* this should not happend but it should silence a warning */ +} /* end of cmCommandArgument_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmCommandArgument_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmCommandArgument_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 26 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 26 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 25); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmCommandArgument_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmCommandArgument_yywrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmCommandArgument_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmCommandArgument_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmCommandArgument_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmCommandArgument_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmCommandArgument_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmCommandArgument_yypop_buffer_state(); + * cmCommandArgument_yypush_buffer_state(new_buffer); + */ + cmCommandArgument_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmCommandArgument_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmCommandArgument_yywrap()) processing, but the only time this flag + * is looked at is after cmCommandArgument_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmCommandArgument_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmCommandArgument_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmCommandArgument_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmCommandArgument_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmCommandArgument_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmCommandArgument_yyfree((void *) b ,yyscanner ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmCommandArgument_yyrestart() or at EOF. + */ + static void cmCommandArgument_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmCommandArgument_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmCommandArgument_yy_init_buffer was _probably_ + * called from cmCommandArgument_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmCommandArgument_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmCommandArgument_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmCommandArgument_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmCommandArgument_yy_switch_to_buffer. */ + cmCommandArgument_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmCommandArgument_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmCommandArgument_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmCommandArgument_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) cmCommandArgument_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmCommandArgument_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmCommandArgument_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmCommandArgument_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmCommandArgument_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmCommandArgument_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) cmCommandArgument_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmCommandArgument_yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmCommandArgument_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmCommandArgument_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmCommandArgument_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmCommandArgument_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmCommandArgument_yyset_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmCommandArgument_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmCommandArgument_yy_switch_to_buffer + */ +void cmCommandArgument_yyset_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void cmCommandArgument_yyset_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmCommandArgument_yyset_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmCommandArgument_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmCommandArgument_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmCommandArgument_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmCommandArgument_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmCommandArgument_yylex_init() + */ + return 0; +} + +/* cmCommandArgument_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmCommandArgument_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmCommandArgument_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmCommandArgument_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmCommandArgument_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmCommandArgument_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmCommandArgument_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmCommandArgument_yyalloc (yy_size_t size , yyscan_t) +{ + return (void *) malloc( size ); +} + +void *cmCommandArgument_yyrealloc (void * ptr, yy_size_t size , yyscan_t) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void cmCommandArgument_yyfree (void * ptr , yyscan_t) +{ + free( (char *) ptr ); /* see cmCommandArgument_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 141 "cmCommandArgumentLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) +{ + /* Hack into the internal flex-generated scanner to set the state. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if(noEscapes) + { + BEGIN(NOESCAPES); + } + else + { + BEGIN(ESCAPES); + } +} + diff --git a/Source/cmCommandArgumentLexer.h b/Source/cmCommandArgumentLexer.h new file mode 100644 index 000000000..a5d00b352 --- /dev/null +++ b/Source/cmCommandArgumentLexer.h @@ -0,0 +1,344 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentLexer.h,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCommandArgument_yyHEADER_H +#define cmCommandArgument_yyHEADER_H 1 +#define cmCommandArgument_yyIN_HEADER 1 + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 33 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmCommandArgument_yylex_init (yyscan_t* scanner); + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmCommandArgument_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmCommandArgument_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_create_buffer (FILE *file,int size , + yyscan_t yyscanner ); +void cmCommandArgument_yy_delete_buffer (YY_BUFFER_STATE b , + yyscan_t yyscanner ); +void cmCommandArgument_yy_flush_buffer (YY_BUFFER_STATE b , + yyscan_t yyscanner ); +void cmCommandArgument_yypush_buffer_state (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +void cmCommandArgument_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmCommandArgument_yy_scan_buffer (char *base,yy_size_t size , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_string (yyconst char *yy_str , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmCommandArgument_yy_scan_bytes (yyconst char *bytes,int len , + yyscan_t yyscanner ); + +void *cmCommandArgument_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmCommandArgument_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmCommandArgument_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmCommandArgument_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define ESCAPES 1 +#define NOESCAPES 2 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmCommandArgument_yylex_destroy (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_debug (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmCommandArgument_yyget_extra (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_extra (YY_EXTRA_TYPE user_defined , + yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_in (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmCommandArgument_yyget_out (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmCommandArgument_yyget_leng (yyscan_t yyscanner ); + +char *cmCommandArgument_yyget_text (yyscan_t yyscanner ); + +int cmCommandArgument_yyget_lineno (yyscan_t yyscanner ); + +void cmCommandArgument_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#else +extern int cmCommandArgument_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmCommandArgument_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmCommandArgument_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before + the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#undef cmCommandArgument_yyIN_HEADER +#endif /* cmCommandArgument_yyHEADER_H */ diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l new file mode 100644 index 000000000..8fad73309 --- /dev/null +++ b/Source/cmCommandArgumentLexer.in.l @@ -0,0 +1,157 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentLexer.in.l,v $ + Language: C++ + Date: $Date: 2007-06-05 13:19:27 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmCommandArgument_yy --header-file=cmCommandArgumentLexer.h -ocmCommandArgumentLexer.cxx cmCommandArgumentLexer.in.l + +Modify cmCommandArgumentLexer.cxx: + - add #include "cmStandardIncludes.h" to top of file + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmCommandArgument_yyalloc, cmCommandArgument_yyrealloc, cmCommandArgument_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmCommandArgumentLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmCommandArgumentParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmCommandArgumentParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%pointer +%s ESCAPES +%s NOESCAPES + +%% + +\$[A-Za-z0-9/_.+-]+\{ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_NCURLY; +} + +@[A-Za-z0-9/_.+-]+@ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext+1, strlen(yytext)-2); + return cal_ATNAME; +} + +"${" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DCURLYVariable; + return cal_DCURLY; +} + +"}" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->RCURLYVariable; + return cal_RCURLY; +} + +"@" { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->ATVariable; + return cal_AT; +} + +[A-Za-z0-9/_.+-]+ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_NAME; +} + +\\. { + if ( !yyextra->HandleEscapeSymbol(yylvalp, *(yytext+1)) ) + { + return cal_ERROR; + } + return cal_SYMBOL; +} + +[^\${}\\@]+ { + //std::cerr << __LINE__ << " here: [" << yytext << "]" << std::endl; + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return cal_SYMBOL; +} + +"$" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->DOLLARVariable; + return cal_DOLLAR; +} + +"{" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->LCURLYVariable; + return cal_LCURLY; +} + +"\\" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_BSLASH; +} + +"\\" { + //yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + yylvalp->str = yyextra->BSLASHVariable; + return cal_SYMBOL; +} + +%% + +/*--------------------------------------------------------------------------*/ +void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes) +{ + /* Hack into the internal flex-generated scanner to set the state. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if(noEscapes) + { + BEGIN(NOESCAPES); + } + else + { + BEGIN(ESCAPES); + } +} diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx new file mode 100644 index 000000000..8ea1e3aee --- /dev/null +++ b/Source/cmCommandArgumentParser.cxx @@ -0,0 +1,1658 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParser.cxx,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* A Bison parser, made by GNU Bison 2.1. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, + Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* turn off some warning as this is generated code */ +#if defined(_MSC_VER) +# pragma warning ( disable : 4702 ) /* unreachable code */ +#endif + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.1" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse cmCommandArgument_yyparse +#define yylex cmCommandArgument_yylex +#define yyerror cmCommandArgument_yyerror +#define yylval cmCommandArgument_yylval +#define yychar cmCommandArgument_yychar +#define yydebug cmCommandArgument_yydebug +#define yynerrs cmCommandArgument_yynerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + cal_NCURLY = 258, + cal_DCURLY = 259, + cal_DOLLAR = 260, + cal_LCURLY = 261, + cal_RCURLY = 262, + cal_NAME = 263, + cal_BSLASH = 264, + cal_SYMBOL = 265, + cal_AT = 266, + cal_ERROR = 267, + cal_ATNAME = 268 + }; +#endif +/* Tokens. */ +#define cal_NCURLY 258 +#define cal_DCURLY 259 +#define cal_DOLLAR 260 +#define cal_LCURLY 261 +#define cal_RCURLY 262 +#define cal_NAME 263 +#define cal_BSLASH 264 +#define cal_SYMBOL 265 +#define cal_AT 266 +#define cal_ERROR 267 +#define cal_ATNAME 268 + + + + +/* Copy the first part of user declarations. */ +#line 1 "cmCommandArgumentParser.y" + +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParser.cxx,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmCommandArgument_yy + --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx + cmCommandArgumentParser.y + +Modify cmCommandArgumentParser.cxx: + - remove TABs + +*/ + +#include "cmStandardIncludes.h" + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmCommandArgument_yyerror(x) \ + cmCommandArgumentError(yyscanner, x) +#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) + +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include +#define YYMALLOC malloc +#define YYFREE free + +/*-------------------------------------------------------------------------*/ +#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ +#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ +#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmCommandArgumentError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +// Set these high so that +#define YYMAXDEPTH 100000 +#define YYINITDEPTH 10000 + + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no + case. */ +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 219 of yacc.c. */ +#line 195 "cmCommandArgumentParser.cxx" + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus)) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# else +# define YYSTACK_ALLOC alloca +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYINCLUDED_STDLIB_H +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1) +# endif +# ifdef __cplusplus +extern "C" { +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \ + && (defined (__STDC__) || defined (__cplusplus))) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifdef __cplusplus +} +# endif +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 21 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 25 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 14 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 9 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 21 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 27 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 268 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 5, 7, 10, 11, 14, 16, 18, + 20, 22, 24, 26, 28, 30, 34, 38, 40, 41, + 44, 46 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 15, 0, -1, 16, -1, 17, -1, 17, 9, -1, + -1, 18, 17, -1, 19, -1, 20, -1, 8, -1, + 11, -1, 5, -1, 6, -1, 7, -1, 10, -1, + 3, 21, 7, -1, 4, 21, 7, -1, 13, -1, + -1, 22, 21, -1, 8, -1, 20, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned char yyrline[] = +{ + 0, 95, 95, 102, 107, 113, 117, 123, 128, 134, + 139, 144, 149, 154, 159, 165, 171, 177, 183, 187, + 193, 198 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "cal_NCURLY", "cal_DCURLY", "\"$\"", + "\"{\"", "\"}\"", "cal_NAME", "\"\\\\\"", "cal_SYMBOL", "\"@\"", + "cal_ERROR", "cal_ATNAME", "$accept", "Start", + "GoalWithOptionalBackSlash", "Goal", "String", "OuterText", "Variable", + "MultipleIds", "ID", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 14, 15, 16, 16, 17, 17, 18, 18, 19, + 19, 19, 19, 19, 19, 20, 20, 20, 21, 21, + 22, 22 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 1, 2, 0, 2, 1, 1, 1, + 1, 1, 1, 1, 1, 3, 3, 1, 0, 2, + 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 5, 18, 18, 11, 12, 13, 9, 14, 10, 17, + 0, 2, 3, 5, 7, 8, 20, 21, 0, 18, + 0, 1, 4, 6, 15, 19, 16 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 10, 11, 12, 13, 14, 17, 18, 19 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -3 +static const yysigned_char yypact[] = +{ + -1, 12, 12, -3, -3, -3, -3, -3, -3, -3, + 8, -3, 2, -1, -3, -3, -3, -3, 6, 12, + 11, -3, -3, -3, -3, -3, -3 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -3, -3, -3, 9, -3, -3, 1, -2, -3 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const unsigned char yytable[] = +{ + 20, 15, 1, 2, 3, 4, 5, 6, 21, 7, + 8, 22, 9, 24, 15, 1, 2, 25, 26, 0, + 16, 0, 23, 0, 0, 9 +}; + +static const yysigned_char yycheck[] = +{ + 2, 0, 3, 4, 5, 6, 7, 8, 0, 10, + 11, 9, 13, 7, 13, 3, 4, 19, 7, -1, + 8, -1, 13, -1, -1, 13 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 3, 4, 5, 6, 7, 8, 10, 11, 13, + 15, 16, 17, 18, 19, 20, 8, 20, 21, 22, + 21, 0, 9, 17, 7, 21, 7 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (0) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (N) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (0) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + size_t yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +#endif /* YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + ; +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a look-ahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to look-ahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 96 "cmCommandArgumentParser.y" + { + (yyval.str) = 0; + yyGetParser->SetResult((yyvsp[0].str)); +} + break; + + case 3: +#line 103 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 4: +#line 108 "cmCommandArgumentParser.y" + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); +} + break; + + case 5: +#line 113 "cmCommandArgumentParser.y" + { + (yyval.str) = 0; +} + break; + + case 6: +#line 118 "cmCommandArgumentParser.y" + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); +} + break; + + case 7: +#line 124 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 8: +#line 129 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 9: +#line 135 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 10: +#line 140 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 11: +#line 145 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 12: +#line 150 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 13: +#line 155 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 14: +#line 160 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 15: +#line 166 "cmCommandArgumentParser.y" + { + (yyval.str) = + yyGetParser->ExpandSpecialVariable((yyvsp[-2].str),(yyvsp[-1].str)); + //std::cerr << __LINE__ << " here: [" << $1 << "] [" << $2 << "] + //[" << $3 << "]" << std::endl; +} + break; + + case 16: +#line 172 "cmCommandArgumentParser.y" + { + (yyval.str) = yyGetParser->ExpandVariable((yyvsp[-1].str)); + //std::cerr << __LINE__ << " here: [" << $1 << "] [" << $2 << "] + //[" << $3 << "]" << std::endl; +} + break; + + case 17: +#line 178 "cmCommandArgumentParser.y" + { + (yyval.str) = yyGetParser->ExpandVariableForAt((yyvsp[0].str)); +} + break; + + case 18: +#line 183 "cmCommandArgumentParser.y" + { + (yyval.str) = 0; +} + break; + + case 19: +#line 188 "cmCommandArgumentParser.y" + { + (yyval.str) = yyGetParser->CombineUnions((yyvsp[-1].str), (yyvsp[0].str)); +} + break; + + case 20: +#line 194 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + case 21: +#line 199 "cmCommandArgumentParser.y" + { + (yyval.str) = (yyvsp[0].str); +} + break; + + + default: break; + } + +/* Line 1126 of yacc.c. */ +#line 1338 "cmCommandArgumentParser.cxx" + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + char *yymsg = 0; +# define YYERROR_VERBOSE_ARGS_MAXIMUM 5 + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +#if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +#endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= yysize1 < yysize; + yysize = yysize1; + + if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM) + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yymsg; + int yyi = 0; + while ((*yyp = *yyf)) + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + { + yyerror (YY_("syntax error")); + goto yyexhaustedlab; + } + } + else +#endif /* YYERROR_VERBOSE */ + yyerror (YY_("syntax error")); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (0) + goto yyerrorlab; + +yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK; + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 204 "cmCommandArgumentParser.y" + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmCommandArgumentError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y new file mode 100644 index 000000000..8fa53299c --- /dev/null +++ b/Source/cmCommandArgumentParser.y @@ -0,0 +1,229 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParser.y,v $ + Language: C++ + Date: $Date: 2006-10-04 18:37:41 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmCommandArgument_yy --defines=cmCommandArgumentParserTokens.h -ocmCommandArgumentParser.cxx cmCommandArgumentParser.y + +Modify cmCommandArgumentParser.cxx: + - remove TABs + +*/ + +#include "cmStandardIncludes.h" + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmCommandArgument_yyerror(x) \ + cmCommandArgumentError(yyscanner, x) +#define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) + +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + +/* Make sure the parser uses standard memory allocation. The default + generated parser malloc/free declarations do not work on all + platforms. */ +#include +#define YYMALLOC malloc +#define YYFREE free + +/*-------------------------------------------------------------------------*/ +#include "cmCommandArgumentParserHelper.h" /* Interface to parser object. */ +#include "cmCommandArgumentLexer.h" /* Interface to lexer object. */ +#include "cmCommandArgumentParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmCommandArgumentError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +//#define YYMAXDEPTH 100000 +//#define YYINITDEPTH 10000 + + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no + case. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%pure_parser + +/* +%union { + char* string; +} +*/ + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token cal_NCURLY +%token cal_DCURLY +%token cal_DOLLAR "$" +%token cal_LCURLY "{" +%token cal_RCURLY "}" +%token cal_NAME +%token cal_BSLASH "\\" +%token cal_SYMBOL +%token cal_AT "@" +%token cal_ERROR +%token cal_ATNAME + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + + +Start: +GoalWithOptionalBackSlash +{ + $$ = 0; + yyGetParser->SetResult($1); +} + +GoalWithOptionalBackSlash: +Goal +{ + $$ = $1; +} +| +Goal cal_BSLASH +{ + $$ = yyGetParser->CombineUnions($1, $2); +} + +Goal: +{ + $$ = 0; +} +| +String Goal +{ + $$ = yyGetParser->CombineUnions($1, $2); +} + +String: +OuterText +{ + $$ = $1; +} +| +Variable +{ + $$ = $1; +} + +OuterText: +cal_NAME +{ + $$ = $1; +} +| +cal_AT +{ + $$ = $1; +} +| +cal_DOLLAR +{ + $$ = $1; +} +| +cal_LCURLY +{ + $$ = $1; +} +| +cal_RCURLY +{ + $$ = $1; +} +| +cal_SYMBOL +{ + $$ = $1; +} + +Variable: +cal_NCURLY MultipleIds cal_RCURLY +{ + $$ = yyGetParser->ExpandSpecialVariable($1,$2); + //std::cerr << __LINE__ << " here: [" << $1 << "] [" << $2 << "] [" << $3 << "]" << std::endl; +} +| +cal_DCURLY MultipleIds cal_RCURLY +{ + $$ = yyGetParser->ExpandVariable($2); + //std::cerr << __LINE__ << " here: [" << $1 << "] [" << $2 << "] [" << $3 << "]" << std::endl; +} +| +cal_ATNAME +{ + $$ = yyGetParser->ExpandVariableForAt($1); +} + +MultipleIds: +{ + $$ = 0; +} +| +ID MultipleIds +{ + $$ = yyGetParser->CombineUnions($1, $2); +} + +ID: +cal_NAME +{ + $$ = $1; +} +| +Variable +{ + $$ = $1; +} + + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmCommandArgumentError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} + diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx new file mode 100644 index 000000000..3295cb226 --- /dev/null +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -0,0 +1,320 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParserHelper.cxx,v $ + Language: C++ + Date: $Date: 2007-06-06 20:20:02 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCommandArgumentParserHelper.h" + +#include "cmSystemTools.h" +#include "cmCommandArgumentLexer.h" + +#include "cmMakefile.h" + +int cmCommandArgument_yyparse( yyscan_t yyscanner ); +// +cmCommandArgumentParserHelper::cmCommandArgumentParserHelper() +{ + this->FileLine = -1; + this->FileName = 0; + this->RemoveEmpty = true; + this->EmptyVariable[0] = 0; + strcpy(this->DCURLYVariable, "${"); + strcpy(this->RCURLYVariable, "}"); + strcpy(this->ATVariable, "@"); + strcpy(this->DOLLARVariable, "$"); + strcpy(this->LCURLYVariable, "{"); + strcpy(this->BSLASHVariable, "\\"); + + this->NoEscapeMode = false; + this->ReplaceAtSyntax = false; +} + + +cmCommandArgumentParserHelper::~cmCommandArgumentParserHelper() +{ + this->CleanupParser(); +} + +void cmCommandArgumentParserHelper::SetLineFile(long line, const char* file) +{ + this->FileLine = line; + this->FileName = file; +} + +char* cmCommandArgumentParserHelper::AddString(const char* str) +{ + if ( !str || !*str ) + { + return this->EmptyVariable; + } + char* stVal = new char[strlen(str)+1]; + strcpy(stVal, str); + this->Variables.push_back(stVal); + return stVal; +} + +char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, + const char* var) +{ + if ( !key ) + { + return this->ExpandVariable(var); + } + if ( strcmp(key, "ENV") == 0 ) + { + char *ptr = getenv(var); + if (ptr) + { + if (this->EscapeQuotes) + { + return this->AddString(cmSystemTools::EscapeQuotes(ptr).c_str()); + } + else + { + return ptr; + } + } + return this->EmptyVariable; + } + cmSystemTools::Error("Key ", key, + " is not used yet. For now only $ENV{..} is allowed"); + return 0; +} + +char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) +{ + if(!var) + { + return 0; + } + if(this->FileName && strcmp(var, "CMAKE_CURRENT_LIST_FILE") == 0) + { + return this->AddString(this->FileName); + } + else if(this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0) + { + cmOStringStream ostr; + ostr << this->FileLine; + return this->AddString(ostr.str().c_str()); + } + const char* value = this->Makefile->GetDefinition(var); + if(!value && !this->RemoveEmpty) + { + return 0; + } + if (this->EscapeQuotes && value) + { + return this->AddString(cmSystemTools::EscapeQuotes(value).c_str()); + } + return this->AddString(value); +} + +char* cmCommandArgumentParserHelper::ExpandVariableForAt(const char* var) +{ + if(this->ReplaceAtSyntax) + { + // try to expand the variable + char* ret = this->ExpandVariable(var); + // if the return was 0 and we want to replace empty strings + // then return an empty string + if(!ret && this->RemoveEmpty) + { + return this->AddString(ret); + } + // if the ret was not 0, then return it + if(ret) + { + return ret; + } + } + // at this point we want to put it back because of one of these cases: + // - this->ReplaceAtSyntax is false + // - this->ReplaceAtSyntax is true, but this->RemoveEmpty is false, + // and the variable was not defined + std::string ref = "@"; + ref += var; + ref += "@"; + return this->AddString(ref.c_str()); +} + +char* cmCommandArgumentParserHelper::CombineUnions(char* in1, char* in2) +{ + if ( !in1 ) + { + return in2; + } + else if ( !in2 ) + { + return in1; + } + size_t len = strlen(in1) + strlen(in2) + 1; + char* out = new char [ len ]; + strcpy(out, in1); + strcat(out, in2); + this->Variables.push_back(out); + return out; +} + +void cmCommandArgumentParserHelper::AllocateParserType +(cmCommandArgumentParserHelper::ParserType* pt,const char* str, int len) +{ + pt->str = 0; + if ( len == 0 ) + { + len = static_cast(strlen(str)); + } + if ( len == 0 ) + { + return; + } + pt->str = new char[ len + 1 ]; + strncpy(pt->str, str, len); + pt->str[len] = 0; + this->Variables.push_back(pt->str); +} + +bool cmCommandArgumentParserHelper::HandleEscapeSymbol +(cmCommandArgumentParserHelper::ParserType* pt, char symbol) +{ + switch ( symbol ) + { + case '\\': + case '"': + case ' ': + case '#': + case '(': + case ')': + case '$': + case '@': + case '^': + this->AllocateParserType(pt, &symbol, 1); + break; + case ';': + this->AllocateParserType(pt, "\\;", 2); + break; + case 't': + this->AllocateParserType(pt, "\t", 1); + break; + case 'n': + this->AllocateParserType(pt, "\n", 1); + break; + case 'r': + this->AllocateParserType(pt, "\r", 1); + break; + case '0': + this->AllocateParserType(pt, "\0", 1); + break; + default: + char buffer[2]; + buffer[0] = symbol; + buffer[1] = 0; + cmSystemTools::Error("Invalid escape sequence \\", buffer); + return false; + } + return true; +} + +void cmCommandArgument_SetupEscapes(yyscan_t yyscanner, bool noEscapes); + +int cmCommandArgumentParserHelper::ParseString(const char* str, int verb) +{ + if ( !str) + { + return 0; + } + this->Verbose = verb; + this->InputBuffer = str; + this->InputBufferPos = 0; + this->CurrentLine = 0; + + this->Result = ""; + + yyscan_t yyscanner; + cmCommandArgument_yylex_init(&yyscanner); + cmCommandArgument_yyset_extra(this, yyscanner); + cmCommandArgument_SetupEscapes(yyscanner, this->NoEscapeMode); + int res = cmCommandArgument_yyparse(yyscanner); + cmCommandArgument_yylex_destroy(yyscanner); + if ( res != 0 ) + { + return 0; + } + + this->CleanupParser(); + + if ( Verbose ) + { + std::cerr << "Expanding [" << str << "] produced: [" + << this->Result.c_str() << "]" << std::endl; + } + return 1; +} + +void cmCommandArgumentParserHelper::CleanupParser() +{ + std::vector::iterator sit; + for ( sit = this->Variables.begin(); + sit != this->Variables.end(); + ++ sit ) + { + delete [] *sit; + } + this->Variables.erase(this->Variables.begin(), this->Variables.end()); +} + +int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen) +{ + if ( maxlen < 1 ) + { + return 0; + } + if ( this->InputBufferPos < this->InputBuffer.size() ) + { + buf[0] = this->InputBuffer[ this->InputBufferPos++ ]; + if ( buf[0] == '\n' ) + { + this->CurrentLine ++; + } + return(1); + } + else + { + buf[0] = '\n'; + return( 0 ); + } +} + +void cmCommandArgumentParserHelper::Error(const char* str) +{ + unsigned long pos = static_cast(this->InputBufferPos); + cmOStringStream ostr; + ostr << str << " (" << pos << ")"; + this->ErrorString = ostr.str(); +} + +void cmCommandArgumentParserHelper::SetMakefile(const cmMakefile* mf) +{ + this->Makefile = mf; +} + +void cmCommandArgumentParserHelper::SetResult(const char* value) +{ + if ( !value ) + { + this->Result = ""; + return; + } + this->Result = value; +} + diff --git a/Source/cmCommandArgumentParserHelper.h b/Source/cmCommandArgumentParserHelper.h new file mode 100644 index 000000000..08e19a5f8 --- /dev/null +++ b/Source/cmCommandArgumentParserHelper.h @@ -0,0 +1,113 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParserHelper.h,v $ + Language: C++ + Date: $Date: 2007-06-06 20:20:02 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCommandArgumentParserHelper_h +#define cmCommandArgumentParserHelper_h + +#include "cmStandardIncludes.h" + +#define YYSTYPE cmCommandArgumentParserHelper::ParserType +#define YYSTYPE_IS_DECLARED +#define YY_EXTRA_TYPE cmCommandArgumentParserHelper* +#define YY_DECL int cmCommandArgument_yylex(YYSTYPE* yylvalp,\ + yyscan_t yyscanner) + +/** \class cmCommandArgumentParserHelper + * \brief Helper class for parsing java source files + * + * Finds dependencies for java file and list of outputs + */ + +class cmMakefile; + +class cmCommandArgumentParserHelper +{ +public: + typedef struct { + char* str; + } ParserType; + + cmCommandArgumentParserHelper(); + ~cmCommandArgumentParserHelper(); + + int ParseString(const char* str, int verb); + + // For the lexer: + void AllocateParserType(cmCommandArgumentParserHelper::ParserType* pt, + const char* str, int len = 0); + bool HandleEscapeSymbol(cmCommandArgumentParserHelper::ParserType* pt, + char symbol); + + int LexInput(char* buf, int maxlen); + void Error(const char* str); + + // For yacc + char* CombineUnions(char* in1, char* in2); + + char* ExpandSpecialVariable(const char* key, const char* var); + char* ExpandVariable(const char* var); + char* ExpandVariableForAt(const char* var); + void SetResult(const char* value); + + void SetMakefile(const cmMakefile* mf); + + std::string& GetResult() { return this->Result; } + + void SetLineFile(long line, const char* file); + void SetEscapeQuotes(bool b) { this->EscapeQuotes = b; } + void SetNoEscapeMode(bool b) { this->NoEscapeMode = b; } + void SetReplaceAtSyntax(bool b) { this->ReplaceAtSyntax = b; } + void SetRemoveEmpty(bool b) { this->RemoveEmpty = b; } + + const char* GetError() { return this->ErrorString.c_str(); } + char EmptyVariable[1]; + char DCURLYVariable[3]; + char RCURLYVariable[3]; + char ATVariable[3]; + char DOLLARVariable[3]; + char LCURLYVariable[3]; + char BSLASHVariable[3]; + +private: + cmStdString::size_type InputBufferPos; + cmStdString InputBuffer; + std::vector OutputBuffer; + int CurrentLine; + int UnionsAvailable; + int Verbose; + + void Print(const char* place, const char* str); + void SafePrintMissing(const char* str, int line, int cnt); + + char* AddString(const char* str); + + void CleanupParser(); + + std::vector Variables; + const cmMakefile* Makefile; + std::string Result; + const char* FileName; + long FileLine; + bool EscapeQuotes; + std::string ErrorString; + bool NoEscapeMode; + bool ReplaceAtSyntax; + bool RemoveEmpty; +}; + +#endif + + diff --git a/Source/cmCommandArgumentParserTokens.h b/Source/cmCommandArgumentParserTokens.h new file mode 100644 index 000000000..b6c094d80 --- /dev/null +++ b/Source/cmCommandArgumentParserTokens.h @@ -0,0 +1,88 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentParserTokens.h,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* A Bison parser, made by GNU Bison 2.1. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, + Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + cal_NCURLY = 258, + cal_DCURLY = 259, + cal_DOLLAR = 260, + cal_LCURLY = 261, + cal_RCURLY = 262, + cal_NAME = 263, + cal_BSLASH = 264, + cal_SYMBOL = 265, + cal_AT = 266, + cal_ERROR = 267, + cal_ATNAME = 268 + }; +#endif +/* Tokens. */ +#define cal_NCURLY 258 +#define cal_DCURLY 259 +#define cal_DOLLAR 260 +#define cal_LCURLY 261 +#define cal_RCURLY 262 +#define cal_NAME 263 +#define cal_BSLASH 264 +#define cal_SYMBOL 265 +#define cal_AT 266 +#define cal_ERROR 267 +#define cal_ATNAME 268 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/Source/cmCommandArgumentsHelper.cxx b/Source/cmCommandArgumentsHelper.cxx new file mode 100644 index 000000000..e23df2319 --- /dev/null +++ b/Source/cmCommandArgumentsHelper.cxx @@ -0,0 +1,312 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentsHelper.cxx,v $ + Language: C++ + Date: $Date: 2007-08-23 20:13:15 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmCommandArgumentsHelper.h" + +cmCommandArgument::cmCommandArgument(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group) +:Key(key) +,Group(group) +,WasActive(false) +,ArgumentsBeforeEmpty(true) +,CurrentIndex(0) +{ + if (args!=0) + { + args->AddArgument(this); + } + + if (this->Group!=0) + { + this->Group->ContainedArguments.push_back(this); + } +} + +void cmCommandArgument::Reset() +{ + this->WasActive =false; + this->CurrentIndex = 0; + this->DoReset(); +} + +void cmCommandArgument::Follows(const cmCommandArgument* arg) +{ + this->ArgumentsBeforeEmpty = false; + this->ArgumentsBefore.insert(arg); +} + +void cmCommandArgument::FollowsGroup(const cmCommandArgumentGroup* group) +{ + if (group!=0) + { + this->ArgumentsBeforeEmpty = false; + for(std::vector::const_iterator + argIt= group->ContainedArguments.begin(); + argIt != group->ContainedArguments.end(); + ++argIt) + { + this->ArgumentsBefore.insert(*argIt); + } + } +} + +bool cmCommandArgument::MayFollow(const cmCommandArgument* current) const +{ + if (this->ArgumentsBeforeEmpty) + { + return true; + } + + std::set::const_iterator argIt + = this->ArgumentsBefore.find(current); + if (argIt != this->ArgumentsBefore.end()) + { + return true; + } + + return false; +} + +bool cmCommandArgument::KeyMatches(const std::string& key) const +{ + if ((this->Key==0) || (this->Key[0]=='\0')) + { + return true; + } + return (key==this->Key); +} + +void cmCommandArgument::ApplyOwnGroup() +{ + if (this->Group!=0) + { + for (std::vector::const_iterator + it = this->Group->ContainedArguments.begin(); + it != this->Group->ContainedArguments.end(); + ++it) + { + if(*it != this) + { + this->ArgumentsBefore.insert(*it); + } + } + } +} + +void cmCommandArgument::Activate() +{ + this->WasActive = true; + this->CurrentIndex = 0; +} + +bool cmCommandArgument::Consume(const std::string& arg) +{ + bool res=this->DoConsume(arg, this->CurrentIndex); + this->CurrentIndex++; + return res; +} + + +cmCAStringVector::cmCAStringVector(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group) +:cmCommandArgument(args, key, group) +,Ignore(0) +{ + if ((key==0) || (*key==0)) + { + this->DataStart = 0; + } + else + { + this->DataStart = 1; + } +} + +bool cmCAStringVector::DoConsume(const std::string& arg,unsigned int index) +{ + if (index >= this->DataStart) + { + if ((this->Ignore==0) || (arg != this->Ignore)) + { + this->Vector.push_back(arg); + } + } + + return false; +} + +void cmCAStringVector::DoReset() +{ + this->Vector.clear(); +} + +cmCAString::cmCAString(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group) +:cmCommandArgument(args, key, group) +{ + if ((key==0) || (*key==0)) + { + this->DataStart = 0; + } + else + { + this->DataStart = 1; + } +} + +bool cmCAString::DoConsume(const std::string& arg, unsigned int index) +{ + if (index == this->DataStart) + { + this->String = arg; + } + + return index >= this->DataStart; +} + +void cmCAString::DoReset() +{ + this->String = this->DefaultString; +} + +cmCAEnabler::cmCAEnabler(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group) +:cmCommandArgument(args, key, group) +,Enabled(false) +{} + +bool cmCAEnabler::DoConsume(const std::string&, unsigned int index) +{ + if (index==0) + { + this->Enabled = true; + } + return true; +} + +void cmCAEnabler::DoReset() +{ + this->Enabled = false; +} + +cmCADisabler::cmCADisabler(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group) +:cmCommandArgument(args, key, group) +,Enabled(true) +{} + +bool cmCADisabler::DoConsume(const std::string&, unsigned int index) +{ + if (index==0) + { + this->Enabled = false; + } + return true; +} + +void cmCADisabler::DoReset() +{ + this->Enabled = true; +} + +void cmCommandArgumentGroup::Follows(const cmCommandArgument* arg) +{ + for(std::vector::iterator + it = this->ContainedArguments.begin(); + it != this->ContainedArguments.end(); + ++it) + { + (*it)->Follows(arg); + } +} + +void cmCommandArgumentGroup::FollowsGroup(const cmCommandArgumentGroup* group) +{ + for(std::vector::iterator + it = this->ContainedArguments.begin(); + it != this->ContainedArguments.end(); + ++it) + { + (*it)->FollowsGroup(group); + } +} + +void cmCommandArgumentsHelper::Parse(const std::vector* args, + std::vector* unconsumedArgs) +{ + if(args==0) + { + return; + } + + for(std::vector::iterator + argIt = this->Arguments.begin(); + argIt != this->Arguments.end(); + ++argIt) + { + (*argIt)->ApplyOwnGroup(); + (*argIt)->Reset(); + } + + cmCommandArgument* activeArgument = 0; + const cmCommandArgument* previousArgument = 0; + for(std::vector::const_iterator it = args->begin(); + it != args->end(); + ++it) + { + for(std::vector::iterator + argIt = this->Arguments.begin(); + argIt != this->Arguments.end(); + ++argIt) + { + if ((*argIt)->KeyMatches(*it) && ((*argIt)->MayFollow(previousArgument))) + { + activeArgument = *argIt; + activeArgument->Activate(); + break; + } + } + + if (activeArgument) + { + bool argDone = activeArgument->Consume(*it); + previousArgument = activeArgument; + if (argDone) + { + activeArgument = 0; + } + } + else + { + if (unconsumedArgs!=0) + { + unconsumedArgs->push_back(*it); + } + } + } +} + +void cmCommandArgumentsHelper::AddArgument(cmCommandArgument* arg) +{ + this->Arguments.push_back(arg); +} + diff --git a/Source/cmCommandArgumentsHelper.h b/Source/cmCommandArgumentsHelper.h new file mode 100644 index 000000000..2454fd363 --- /dev/null +++ b/Source/cmCommandArgumentsHelper.h @@ -0,0 +1,212 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommandArgumentsHelper.h,v $ + Language: C++ + Date: $Date: 2007-08-23 20:13:15 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCommandArgumentsHelper_h +#define cmCommandArgumentsHelper_h + +#include "cmStandardIncludes.h" + +class cmCommandArgumentsHelper; +class cmCommandArgumentGroup; + +/* cmCommandArgumentsHelper, cmCommandArgumentGroup and cmCommandArgument (i.e. +its derived classes cmCAXXX can be used to simplify the processing of +arguments to cmake commands. Maybe they can also be used to generate +documentation. + +For every argument supported by a command one cmCommandArgument is created +and added to cmCommandArgumentsHelper. cmCommand has a cmCommandArgumentsHelper +as member variable so this should be used. + +The order of the arguments is defined using the Follows(arg) method. It says +that this argument follows immediateley the given argument. It can be used +with multiple arguments if the argument can follow after different arguments. + +Arguments can be arranged in groups using cmCommandArgumentGroup. Every +member of a group can follow any other member of the group. These groups +can also be used to define the order. + +Once all arguments and groups are set up, cmCommandArgumentsHelper::Parse() +is called and afterwards the values of the arguments can be evaluated. + +For an example see cmExportCommand.cxx. +*/ +class cmCommandArgument +{ + public: + cmCommandArgument(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group=0); + virtual ~cmCommandArgument() {} + + /// this argument may follow after arg. 0 means it comes first. + void Follows(const cmCommandArgument* arg); + + /// this argument may follow after any of the arguments in the given group + void FollowsGroup(const cmCommandArgumentGroup* group); + + /// Returns true if the argument was found in the argument list + bool WasFound() const {return this->WasActive;} + + // The following methods are only called from + // cmCommandArgumentsHelper::Parse(), but making this a friend would + // give it access to everything + + /// Make the current argument the currently active argument + void Activate(); + /// Consume the current string + bool Consume(const std::string& arg); + + /// Return true if this argument may follow after the given argument. + bool MayFollow(const cmCommandArgument* current) const; + + /** Returns true if the given key matches the key for this argument. + If this argument has an empty key everything matches. */ + bool KeyMatches(const std::string& key) const; + + /// Make this argument follow all members of the own group + void ApplyOwnGroup(); + + /// Reset argument, so it's back to its initial state + void Reset(); + private: + const char* Key; + std::set ArgumentsBefore; + cmCommandArgumentGroup* Group; + bool WasActive; + bool ArgumentsBeforeEmpty; + unsigned int CurrentIndex; + + virtual bool DoConsume(const std::string& arg, unsigned int index) = 0; + virtual void DoReset() = 0; +}; + +/** cmCAStringVector is to be used for arguments which can consist of more +than one string, e.g. the FILES argument in INSTALL(FILES f1 f2 f3 ...). */ +class cmCAStringVector : public cmCommandArgument +{ + public: + cmCAStringVector(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group=0); + + /// Return the vector of strings + const std::vector& GetVector() const {return this->Vector;} + + /** Is there a keyword which should be skipped in + the arguments (e.g. ARGS for ADD_CUSTOM_COMMAND) ? */ + void SetIgnore(const char* ignore) {this->Ignore=ignore;} + private: + std::vector Vector; + unsigned int DataStart; + const char* Ignore; + cmCAStringVector(); + virtual bool DoConsume(const std::string& arg, unsigned int index); + virtual void DoReset(); +}; + +/** cmCAString is to be used for arguments which consist of one value, +e.g. the executable name in ADD_EXECUTABLE(). */ +class cmCAString : public cmCommandArgument +{ + public: + cmCAString(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group=0); + + /// Return the string + const std::string& GetString() const {return this->String;} + const char* GetCString() const {return this->String.c_str();} + void SetDefaultString(const char* text) + {this->DefaultString = (text ? text : "");} + private: + std::string String; + std::string DefaultString; + unsigned int DataStart; + virtual bool DoConsume(const std::string& arg, unsigned int index); + virtual void DoReset(); + cmCAString(); +}; + +/** cmCAEnabler is to be used for options which are off by default and can be +enabled using a special argument, e.g. EXCLUDE_FROM_ALL in ADD_EXECUTABLE(). */ +class cmCAEnabler : public cmCommandArgument +{ + public: + cmCAEnabler(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group=0); + + /// Has it been enabled ? + bool IsEnabled() const {return this->Enabled;} + private: + bool Enabled; + virtual bool DoConsume(const std::string& arg, unsigned int index); + virtual void DoReset(); + cmCAEnabler(); +}; + +/** cmCADisable is to be used for options which are on by default and can be +disabled using a special argument.*/ +class cmCADisabler : public cmCommandArgument +{ + public: + cmCADisabler(cmCommandArgumentsHelper* args, + const char* key, + cmCommandArgumentGroup* group=0); + + /// Is it still enabled ? + bool IsEnabled() const {return this->Enabled;} + private: + bool Enabled; + virtual bool DoConsume(const std::string& arg, unsigned int index); + virtual void DoReset(); + cmCADisabler(); +}; + + +/** Group of arguments, needed for ordering. E.g. WIN32, EXCLUDE_FROM_ALL and +MACSOX_BUNDLE from ADD_EXECUTABLE() are a group. +*/ +class cmCommandArgumentGroup +{ + friend class cmCommandArgument; + public: + cmCommandArgumentGroup() {} + + /// All members of this group may follow the given argument + void Follows(const cmCommandArgument* arg); + + /// All members of this group may follow all members of the given group + void FollowsGroup(const cmCommandArgumentGroup* group); + private: + std::vector ContainedArguments; +}; + +class cmCommandArgumentsHelper +{ + public: + /// Parse the argument list + void Parse(const std::vector* args, + std::vector* unconsumedArgs); + /// Add an argument. + void AddArgument(cmCommandArgument* arg); + private: + std::vector Arguments; +}; + + +#endif diff --git a/Source/cmCommands.cxx b/Source/cmCommands.cxx new file mode 100644 index 000000000..636451c50 --- /dev/null +++ b/Source/cmCommands.cxx @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommands.cxx,v $ + Language: C++ + Date: $Date: 2008-02-16 18:05:03 $ + Version: $Revision: 1.123 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCommands.h" +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmAuxSourceDirectoryCommand.cxx" +#include "cmBuildNameCommand.cxx" +#include "cmElseIfCommand.cxx" +#include "cmEnableLanguageCommand.cxx" +#include "cmEndWhileCommand.cxx" +#include "cmExportCommand.cxx" +#include "cmExportLibraryDependencies.cxx" +#include "cmFLTKWrapUICommand.cxx" +#include "cmGetTestPropertyCommand.cxx" +#include "cmIncludeExternalMSProjectCommand.cxx" +#include "cmInstallProgramsCommand.cxx" +#include "cmLinkLibrariesCommand.cxx" +#include "cmLoadCacheCommand.cxx" +#include "cmOutputRequiredFilesCommand.cxx" +#include "cmQTWrapCPPCommand.cxx" +#include "cmQTWrapUICommand.cxx" +#include "cmRemoveCommand.cxx" +#include "cmRemoveDefinitionsCommand.cxx" +#include "cmSetDirectoryPropertiesCommand.cxx" +#include "cmSourceGroupCommand.cxx" +#include "cmSubdirDependsCommand.cxx" +#include "cmUseMangledMesaCommand.cxx" +#include "cmUtilitySourceCommand.cxx" +#include "cmVariableRequiresCommand.cxx" +#include "cmVariableWatchCommand.cxx" + +#include "cmWhileCommand.cxx" +#include "cmWriteFileCommand.cxx" + +// This one must be last because it includes windows.h and +// windows.h #defines GetCurrentDirectory which is a member +// of cmMakefile +#include "cmLoadCommandCommand.cxx" +#endif + +void GetPredefinedCommands(std::list& +#if defined(CMAKE_BUILD_WITH_CMAKE) + commands +#endif + ) +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + commands.push_back(new cmAuxSourceDirectoryCommand); + commands.push_back(new cmBuildNameCommand); + commands.push_back(new cmElseIfCommand); + commands.push_back(new cmEnableLanguageCommand); + commands.push_back(new cmEndWhileCommand); + commands.push_back(new cmExportCommand); + commands.push_back(new cmExportLibraryDependenciesCommand); + commands.push_back(new cmFLTKWrapUICommand); + commands.push_back(new cmGetTestPropertyCommand); + commands.push_back(new cmIncludeExternalMSProjectCommand); + commands.push_back(new cmInstallProgramsCommand); + commands.push_back(new cmLinkLibrariesCommand); + commands.push_back(new cmLoadCacheCommand); + commands.push_back(new cmLoadCommandCommand); + commands.push_back(new cmOutputRequiredFilesCommand); + commands.push_back(new cmQTWrapCPPCommand); + commands.push_back(new cmQTWrapUICommand); + commands.push_back(new cmRemoveCommand); + commands.push_back(new cmRemoveDefinitionsCommand); + commands.push_back(new cmSetDirectoryPropertiesCommand); + commands.push_back(new cmSourceGroupCommand); + commands.push_back(new cmSubdirDependsCommand); + commands.push_back(new cmUseMangledMesaCommand); + commands.push_back(new cmUtilitySourceCommand); + commands.push_back(new cmVariableRequiresCommand); + commands.push_back(new cmVariableWatchCommand); + commands.push_back(new cmWhileCommand); + commands.push_back(new cmWriteFileCommand); +#endif +} diff --git a/Source/cmCommands.h b/Source/cmCommands.h new file mode 100644 index 000000000..5f464f3ba --- /dev/null +++ b/Source/cmCommands.h @@ -0,0 +1,33 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCommands.h,v $ + Language: C++ + Date: $Date: 2005-01-21 15:27:51 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCommands_h +#define cmCommands_h +#include "cmStandardIncludes.h" + +class cmCommand; +/** + * Global function to return all compiled in commands. + * To add a new command edit cmCommands.cxx or cmBootstrapCommands.cxx + * and add your command. + * It is up to the caller to delete the commands created by this + * call. + */ +void GetBootstrapCommands(std::list& commands); +void GetPredefinedCommands(std::list& commands); + + +#endif diff --git a/Source/cmComputeComponentGraph.cxx b/Source/cmComputeComponentGraph.cxx new file mode 100644 index 000000000..f785b164c --- /dev/null +++ b/Source/cmComputeComponentGraph.cxx @@ -0,0 +1,161 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeComponentGraph.cxx,v $ + Language: C++ + Date: $Date: 2008-02-07 21:14:05 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmComputeComponentGraph.h" + +#include + +#include + +//---------------------------------------------------------------------------- +cmComputeComponentGraph::cmComputeComponentGraph(Graph const& input): + InputGraph(input) +{ + // Identify components. + this->Tarjan(); + + // Compute the component graph. + this->ComponentGraph.resize(0); + this->ComponentGraph.resize(this->Components.size()); + this->TransferEdges(); +} + +//---------------------------------------------------------------------------- +cmComputeComponentGraph::~cmComputeComponentGraph() +{ +} + +//---------------------------------------------------------------------------- +void cmComputeComponentGraph::Tarjan() +{ + int n = static_cast(this->InputGraph.size()); + TarjanEntry entry = {0,0}; + this->TarjanEntries.resize(0); + this->TarjanEntries.resize(n, entry); + this->TarjanComponents.resize(0); + this->TarjanComponents.resize(n, -1); + this->TarjanWalkId = 0; + this->TarjanVisited.resize(0); + this->TarjanVisited.resize(n, 0); + for(int i = 0; i < n; ++i) + { + // Start a new DFS from this node if it has never been visited. + if(!this->TarjanVisited[i]) + { + assert(this->TarjanStack.empty()); + ++this->TarjanWalkId; + this->TarjanIndex = 0; + this->TarjanVisit(i); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeComponentGraph::TarjanVisit(int i) +{ + // We are now visiting this node. + this->TarjanVisited[i] = this->TarjanWalkId; + + // Initialize the entry. + this->TarjanEntries[i].Root = i; + this->TarjanComponents[i] = -1; + this->TarjanEntries[i].VisitIndex = ++this->TarjanIndex; + this->TarjanStack.push(i); + + // Follow outgoing edges. + NodeList const& nl = this->InputGraph[i]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int j = *ni; + + // Ignore edges to nodes that have been reached by a previous DFS + // walk. Since we did not reach the current node from that walk + // it must not belong to the same component and it has already + // been assigned to a component. + if(this->TarjanVisited[j] > 0 && + this->TarjanVisited[j] < this->TarjanWalkId) + { + continue; + } + + // Visit the destination if it has not yet been visited. + if(!this->TarjanVisited[j]) + { + this->TarjanVisit(j); + } + + // If the destination has not yet been assigned to a component, + // check if it has a better root for the current object. + if(this->TarjanComponents[j] < 0) + { + if(this->TarjanEntries[this->TarjanEntries[j].Root].VisitIndex < + this->TarjanEntries[this->TarjanEntries[i].Root].VisitIndex) + { + this->TarjanEntries[i].Root = this->TarjanEntries[j].Root; + } + } + } + + // Check if we have found a component. + if(this->TarjanEntries[i].Root == i) + { + // Yes. Create it. + int c = static_cast(this->Components.size()); + this->Components.push_back(NodeList()); + NodeList& component = this->Components[c]; + + // Populate the component list. + int j; + do + { + // Get the next member of the component. + j = this->TarjanStack.top(); + this->TarjanStack.pop(); + + // Assign the member to the component. + this->TarjanComponents[j] = c; + this->TarjanEntries[j].Root = i; + + // Store the node in its component. + component.push_back(j); + } while(j != i); + + // Sort the component members for clarity. + std::sort(component.begin(), component.end()); + } +} + +//---------------------------------------------------------------------------- +void cmComputeComponentGraph::TransferEdges() +{ + // Map inter-component edges in the original graph to edges in the + // component graph. + int n = static_cast(this->InputGraph.size()); + for(int i=0; i < n; ++i) + { + int i_component = this->TarjanComponents[i]; + NodeList const& nl = this->InputGraph[i]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int j = *ni; + int j_component = this->TarjanComponents[j]; + if(i_component != j_component) + { + this->ComponentGraph[i_component].push_back(j_component); + } + } + } +} diff --git a/Source/cmComputeComponentGraph.h b/Source/cmComputeComponentGraph.h new file mode 100644 index 000000000..47eea1af5 --- /dev/null +++ b/Source/cmComputeComponentGraph.h @@ -0,0 +1,87 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeComponentGraph.h,v $ + Language: C++ + Date: $Date: 2008-02-07 21:14:05 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmComputeComponentGraph_h +#define cmComputeComponentGraph_h + +#include "cmStandardIncludes.h" + +#include "cmGraphAdjacencyList.h" + +#include + +/** \class cmComputeComponentGraph + * \brief Analyze a graph to determine strongly connected components. + * + * Convert a directed graph into a directed acyclic graph whose nodes + * correspond to strongly connected components of the original graph. + * + * We use Tarjan's algorithm to enumerate the components efficiently. + * An advantage of this approach is that the components are identified + * in a topologically sorted order. + */ +class cmComputeComponentGraph +{ +public: + // Represent the graph with an adjacency list. + typedef cmGraphNodeList NodeList; + typedef cmGraphAdjacencyList Graph; + + cmComputeComponentGraph(Graph const& input); + ~cmComputeComponentGraph(); + + /** Get the adjacency list of the component graph. */ + Graph const& GetComponentGraph() const + { return this->ComponentGraph; } + NodeList const& GetComponentGraphEdges(int c) const + { return this->ComponentGraph[c]; } + + /** Get map from component index to original node indices. */ + std::vector const& GetComponents() const + { return this->Components; } + NodeList const& GetComponent(int c) const + { return this->Components[c]; } + + /** Get map from original node index to component index. */ + std::vector const& GetComponentMap() const + { return this->TarjanComponents; } + +private: + void TransferEdges(); + + Graph const& InputGraph; + Graph ComponentGraph; + + // Tarjan's algorithm. + struct TarjanEntry + { + int Root; + int VisitIndex; + }; + int TarjanWalkId; + std::vector TarjanVisited; + std::vector TarjanComponents; + std::vector TarjanEntries; + std::stack TarjanStack; + int TarjanIndex; + void Tarjan(); + void TarjanVisit(int i); + + // Connected components. + std::vector Components; +}; + +#endif diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx new file mode 100644 index 000000000..ecc28d822 --- /dev/null +++ b/Source/cmComputeLinkDepends.cxx @@ -0,0 +1,930 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeLinkDepends.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.12.2.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmComputeLinkDepends.h" + +#include "cmComputeComponentGraph.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +#include +#include + +#include + +/* + +This file computes an ordered list of link items to use when linking a +single target in one configuration. Each link item is identified by +the string naming it. A graph of dependencies is created in which +each node corresponds to one item and directed eges lead from nodes to +those which must *precede* them on the link line. For example, the +graph + + C -> B -> A + +will lead to the link line order + + A B C + +The set of items placed in the graph is formed with a breadth-first +search of the link dependencies starting from the main target. + +There are two types of items: those with known direct dependencies and +those without known dependencies. We will call the two types "known +items" and "unknown items", respecitvely. Known items are those whose +names correspond to targets (built or imported) and those for which an +old-style _LIB_DEPENDS variable is defined. All other items are +unknown and we must infer dependencies for them. + +Known items have dependency lists ordered based on how the user +specified them. We can use this order to infer potential dependencies +of unknown items. For example, if link items A and B are unknown and +items X and Y are known, then we might have the following dependency +lists: + + X: Y A B + Y: A B + +The explicitly known dependencies form graph edges + + X <- Y , X <- A , X <- B , Y <- A , Y <- B + +We can also infer the edge + + A <- B + +because *every* time A appears B is seen on its right. We do not know +whether A really needs symbols from B to link, but it *might* so we +must preserve their order. This is the case also for the following +explict lists: + + X: A B Y + Y: A B + +Here, A is followed by the set {B,Y} in one list, and {B} in the other +list. The intersection of these sets is {B}, so we can infer that A +depends on at most B. Meanwhile B is followed by the set {Y} in one +list and {} in the other. The intersection is {} so we can infer that +B has no dependencies. + +Let's make a more complex example by adding unknown item C and +considering these dependency lists: + + X: A B Y C + Y: A C B + +The explicit edges are + + X <- Y , X <- A , X <- B , X <- C , Y <- A , Y <- B , Y <- C + +For the unknown items, we infer dependencies by looking at the +"follow" sets: + + A: intersect( {B,Y,C} , {C,B} ) = {B,C} ; infer edges A <- B , A <- C + B: intersect( {Y,C} , {} ) = {} ; infer no edges + C: intersect( {} , {B} ) = {} ; infer no edges + +Note that targets are never inferred as dependees because outside +libraries should not depend on them. + +------------------------------------------------------------------------------ + +Once the complete graph is formed from all known and inferred +dependencies we must use it to produce a valid link line. If the +dependency graph were known to be acyclic a simple depth-first-search +would produce a correct link line. Unfortunately we cannot make this +assumption so the following technique is used. + +The original graph is converted to a directed acyclic graph in which +each node corresponds to a strongly connected component of the +original graph. For example, the dependency graph + + X <- A <- B <- C <- A <- Y + +contains strongly connected components {X}, {A,B,C}, and {Y}. The +implied directed acyclic graph (DAG) is + + {X} <- {A,B,C} <- {Y} + +The final list of link items is constructed by a series of +depth-first-searches through this DAG of components. When visiting a +component all outgoing edges are followed first because the neighbors +must precede it. Once neighbors across all edges have been emitted it +is safe to emit the current component. + +Trivial components (those with one item) are handled simply by +emitting the item. Non-trivial components (those with more than one +item) are assumed to consist only of static libraries that may be +safely repeated on the link line. We emit members of the component +multiple times (see code below for details). The final link line for +the example graph might be + + X A B C A B C Y + +------------------------------------------------------------------------------ + +The initial exploration of dependencies using a BFS associates an +integer index with each link item. When the graph is built outgoing +edges are sorted by this index. + +This preserves the original link order as much as possible subject to +the dependencies. We then further preserve the original link line by +appending items to make sure all those that might be static libraries +appear in the order and multiplicity that they do in the original +line. + +After the initial exploration of the link interface tree, any +transitive (dependent) shared libraries that were encountered and not +included in the interface are processed in their own BFS. This BFS +follows only the dependent library lists and not the link interfaces. +They are added to the link items with a mark indicating that the are +transitive dependencies. Then cmComputeLinkInformation deals with +them on a per-platform basis. + +*/ + +//---------------------------------------------------------------------------- +cmComputeLinkDepends +::cmComputeLinkDepends(cmTarget* target, const char* config) +{ + // Store context information. + this->Target = target; + this->Makefile = this->Target->GetMakefile(); + this->LocalGenerator = this->Makefile->GetLocalGenerator(); + this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); + this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); + + // The configuration being linked. + this->Config = config; + + // Enable debug mode if requested. + this->DebugMode = this->Makefile->IsOn("CMAKE_LINK_DEPENDS_DEBUG_MODE"); + + // Assume no compatibility until set. + this->OldLinkDirMode = false; +} + +//---------------------------------------------------------------------------- +cmComputeLinkDepends::~cmComputeLinkDepends() +{ + for(std::vector::iterator + i = this->InferredDependSets.begin(); + i != this->InferredDependSets.end(); ++i) + { + delete *i; + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::SetOldLinkDirMode(bool b) +{ + this->OldLinkDirMode = b; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::SetSharedRegex(std::string const& regex) +{ + this->SharedRegexString = regex; +} + +//---------------------------------------------------------------------------- +std::vector const& +cmComputeLinkDepends::Compute() +{ + // Follow the link dependencies of the target to be linked. + this->AddTargetLinkEntries(-1, this->Target->GetOriginalLinkLibraries()); + + // Complete the breadth-first search of dependencies. + while(!this->BFSQueue.empty()) + { + // Get the next entry. + BFSEntry qe = this->BFSQueue.front(); + this->BFSQueue.pop(); + + // Follow the entry's dependencies. + this->FollowLinkEntry(qe); + } + + // Complete the search of shared library dependencies. + while(!this->SharedDepQueue.empty()) + { + // Handle the next entry. + this->HandleSharedDependency(this->SharedDepQueue.front()); + this->SharedDepQueue.pop(); + } + + // Infer dependencies of targets for which they were not known. + this->InferDependencies(); + + // Cleanup the constraint graph. + this->CleanConstraintGraph(); + + // Display the constraint graph. + if(this->DebugMode) + { + fprintf(stderr, + "---------------------------------------" + "---------------------------------------\n"); + fprintf(stderr, "Link dependency analysis for target %s, config %s\n", + this->Target->GetName(), this->Config?this->Config:"noconfig"); + this->DisplayConstraintGraph(); + } + + // Compute the final ordering. + this->OrderLinkEntires(); + this->PreserveOriginalEntries(); + + // Compute the final set of link entries. + for(std::vector::const_iterator li = this->FinalLinkOrder.begin(); + li != this->FinalLinkOrder.end(); ++li) + { + this->FinalLinkEntries.push_back(this->EntryList[*li]); + } + + // Display the final set. + if(this->DebugMode) + { + this->DisplayFinalEntries(); + } + + return this->FinalLinkEntries; +} + +//---------------------------------------------------------------------------- +std::map::iterator +cmComputeLinkDepends::AllocateLinkEntry(std::string const& item) +{ + std::map::value_type + index_entry(item, static_cast(this->EntryList.size())); + std::map::iterator + lei = this->LinkEntryIndex.insert(index_entry).first; + this->EntryList.push_back(LinkEntry()); + this->InferredDependSets.push_back(0); + this->EntryConstraintGraph.push_back(NodeList()); + return lei; +} + +//---------------------------------------------------------------------------- +int cmComputeLinkDepends::AddLinkEntry(std::string const& item) +{ + // Check if the item entry has already been added. + std::map::iterator lei = this->LinkEntryIndex.find(item); + if(lei != this->LinkEntryIndex.end()) + { + // Yes. We do not need to follow the item's dependencies again. + return lei->second; + } + + // Allocate a spot for the item entry. + lei = this->AllocateLinkEntry(item); + + // Initialize the item entry. + int index = lei->second; + LinkEntry& entry = this->EntryList[index]; + entry.Item = item; + entry.Target = this->Makefile->FindTargetToUse(entry.Item.c_str()); + + // If the item has dependencies queue it to follow them. + if(entry.Target) + { + // Target dependencies are always known. Follow them. + BFSEntry qe = {index, 0}; + this->BFSQueue.push(qe); + } + else + { + // Look for an old-style _LIB_DEPENDS variable. + std::string var = entry.Item; + var += "_LIB_DEPENDS"; + if(const char* val = this->Makefile->GetDefinition(var.c_str())) + { + // The item dependencies are known. Follow them. + BFSEntry qe = {index, val}; + this->BFSQueue.push(qe); + } + else + { + // The item dependencies are not known. We need to infer them. + this->InferredDependSets[index] = new DependSetList; + } + } + + return index; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::FollowLinkEntry(BFSEntry const& qe) +{ + // Get this entry representation. + int depender_index = qe.Index; + LinkEntry const& entry = this->EntryList[depender_index]; + + // Follow the item's dependencies. + if(entry.Target) + { + // Follow the target dependencies. + if(cmTargetLinkInterface const* iface = + entry.Target->GetLinkInterface(this->Config)) + { + // This target provides its own link interface information. + this->AddLinkEntries(depender_index, iface->Libraries); + + // Handle dependent shared libraries. + this->QueueSharedDependencies(depender_index, iface->SharedDeps); + } + else if(!entry.Target->IsImported() && + entry.Target->GetType() != cmTarget::EXECUTABLE) + { + // Use the target's link implementation as the interface. + this->AddTargetLinkEntries(depender_index, + entry.Target->GetOriginalLinkLibraries()); + } + } + else + { + // Follow the old-style dependency list. + this->AddVarLinkEntries(depender_index, qe.LibDepends); + } +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkDepends +::QueueSharedDependencies(int depender_index, + std::vector const& deps) +{ + for(std::vector::const_iterator li = deps.begin(); + li != deps.end(); ++li) + { + SharedDepEntry qe; + qe.Item = *li; + qe.DependerIndex = depender_index; + this->SharedDepQueue.push(qe); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::HandleSharedDependency(SharedDepEntry const& dep) +{ + // Check if the target already has an entry. + std::map::iterator lei = + this->LinkEntryIndex.find(dep.Item); + if(lei == this->LinkEntryIndex.end()) + { + // Allocate a spot for the item entry. + lei = this->AllocateLinkEntry(dep.Item); + + // Initialize the item entry. + LinkEntry& entry = this->EntryList[lei->second]; + entry.Item = dep.Item; + entry.Target = this->Makefile->FindTargetToUse(dep.Item.c_str()); + + // This item was added specifically because it is a dependent + // shared library. It may get special treatment + // in cmComputeLinkInformation. + entry.IsSharedDep = true; + } + + // Get the link entry for this target. + int index = lei->second; + LinkEntry& entry = this->EntryList[index]; + + // This shared library dependency must be preceded by the item that + // listed it. + this->EntryConstraintGraph[index].push_back(dep.DependerIndex); + + // Target items may have their own dependencies. + if(entry.Target) + { + if(cmTargetLinkInterface const* iface = + entry.Target->GetLinkInterface(this->Config)) + { + // We use just the shared dependencies, not the interface. + this->QueueSharedDependencies(index, iface->SharedDeps); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::AddVarLinkEntries(int depender_index, + const char* value) +{ + // This is called to add the dependencies named by + // _LIB_DEPENDS. The variable contains a semicolon-separated + // list. The list contains link-type;item pairs and just items. + std::vector deplist; + cmSystemTools::ExpandListArgument(value, deplist); + + // Compute which library configuration to link. + cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED; + if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG") + { + linkType = cmTarget::DEBUG; + } + + // Look for entries meant for this configuration. + std::vector actual_libs; + cmTarget::LinkLibraryType llt = cmTarget::GENERAL; + bool haveLLT = false; + for(std::vector::const_iterator di = deplist.begin(); + di != deplist.end(); ++di) + { + if(*di == "debug") + { + llt = cmTarget::DEBUG; + haveLLT = true; + } + else if(*di == "optimized") + { + llt = cmTarget::OPTIMIZED; + haveLLT = true; + } + else if(*di == "general") + { + llt = cmTarget::GENERAL; + haveLLT = true; + } + else if(!di->empty()) + { + // If no explicit link type was given prior to this entry then + // check if the entry has its own link type variable. This is + // needed for compatibility with dependency files generated by + // the export_library_dependencies command from CMake 2.4 and + // lower. + if(!haveLLT) + { + std::string var = *di; + var += "_LINK_TYPE"; + if(const char* val = this->Makefile->GetDefinition(var.c_str())) + { + if(strcmp(val, "debug") == 0) + { + llt = cmTarget::DEBUG; + } + else if(strcmp(val, "optimized") == 0) + { + llt = cmTarget::OPTIMIZED; + } + } + } + + // If the library is meant for this link type then use it. + if(llt == cmTarget::GENERAL || llt == linkType) + { + actual_libs.push_back(*di); + } + else if(this->OldLinkDirMode) + { + this->CheckWrongConfigItem(*di); + } + + // Reset the link type until another explicit type is given. + llt = cmTarget::GENERAL; + haveLLT = false; + } + } + + // Add the entries from this list. + this->AddLinkEntries(depender_index, actual_libs); +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkDepends::AddTargetLinkEntries(int depender_index, + LinkLibraryVectorType const& libs) +{ + // Compute which library configuration to link. + cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED; + if(this->Config && cmSystemTools::UpperCase(this->Config) == "DEBUG") + { + linkType = cmTarget::DEBUG; + } + + // Look for entries meant for this configuration. + std::vector actual_libs; + for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + if(li->second == cmTarget::GENERAL || li->second == linkType) + { + actual_libs.push_back(li->first); + } + else if(this->OldLinkDirMode) + { + this->CheckWrongConfigItem(li->first); + } + } + + // Add these entries. + this->AddLinkEntries(depender_index, actual_libs); +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkDepends::AddLinkEntries(int depender_index, + std::vector const& libs) +{ + // Track inferred dependency sets implied by this list. + std::map dependSets; + + // Loop over the libraries linked directly by the depender. + for(std::vector::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + // Skip entries that will resolve to the target getting linked or + // are empty. + std::string item = this->CleanItemName(*li); + if(item == this->Target->GetName() || item.empty()) + { + continue; + } + + // Add a link entry for this item. + int dependee_index = this->AddLinkEntry(item); + + // The depender must come before the dependee. + if(depender_index >= 0) + { + this->EntryConstraintGraph[dependee_index].push_back(depender_index); + } + else + { + // This is a direct dependency of the target being linked. + this->OriginalEntries.push_back(dependee_index); + } + + // Update the inferred dependencies for earlier items. + for(std::map::iterator dsi = dependSets.begin(); + dsi != dependSets.end(); ++dsi) + { + // Add this item to the inferred dependencies of other items. + // Target items are never inferred dependees because unknown + // items are outside libraries that should not be depending on + // targets. + if(!this->EntryList[dependee_index].Target && + dependee_index != dsi->first) + { + dsi->second.insert(dependee_index); + } + } + + // If this item needs to have dependencies inferred, do so. + if(this->InferredDependSets[dependee_index]) + { + // Make sure an entry exists to hold the set for the item. + dependSets[dependee_index]; + } + } + + // Store the inferred dependency sets discovered for this list. + for(std::map::iterator dsi = dependSets.begin(); + dsi != dependSets.end(); ++dsi) + { + this->InferredDependSets[dsi->first]->push_back(dsi->second); + } +} + +//---------------------------------------------------------------------------- +std::string cmComputeLinkDepends::CleanItemName(std::string const& item) +{ + // Strip whitespace off the library names because we used to do this + // in case variables were expanded at generate time. We no longer + // do the expansion but users link to libraries like " ${VAR} ". + std::string lib = item; + std::string::size_type pos = lib.find_first_not_of(" \t\r\n"); + if(pos != lib.npos) + { + lib = lib.substr(pos, lib.npos); + } + pos = lib.find_last_not_of(" \t\r\n"); + if(pos != lib.npos) + { + lib = lib.substr(0, pos+1); + } + if(lib != item) + { + switch(this->Target->GetPolicyStatusCMP0004()) + { + case cmPolicies::WARN: + { + cmOStringStream w; + w << (this->Makefile->GetPolicies() + ->GetPolicyWarning(cmPolicies::CMP0004)) << "\n" + << "Target \"" << this->Target->GetName() << "\" links to item \"" + << item << "\" which has leading or trailing whitespace."; + this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(), + this->Target->GetBacktrace()); + } + case cmPolicies::OLD: + break; + case cmPolicies::NEW: + { + cmOStringStream e; + e << "Target \"" << this->Target->GetName() << "\" links to item \"" + << item << "\" which has leading or trailing whitespace. " + << "This is now an error according to policy CMP0004."; + this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(), + this->Target->GetBacktrace()); + } + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + { + cmOStringStream e; + e << (this->Makefile->GetPolicies() + ->GetRequiredPolicyError(cmPolicies::CMP0004)) << "\n" + << "Target \"" << this->Target->GetName() << "\" links to item \"" + << item << "\" which has leading or trailing whitespace."; + this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(), + this->Target->GetBacktrace()); + } + break; + } + } + return lib; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::InferDependencies() +{ + // The inferred dependency sets for each item list the possible + // dependencies. The intersection of the sets for one item form its + // inferred dependencies. + for(unsigned int depender_index=0; + depender_index < this->InferredDependSets.size(); ++depender_index) + { + // Skip items for which dependencies do not need to be inferred or + // for which the inferred dependency sets are empty. + DependSetList* sets = this->InferredDependSets[depender_index]; + if(!sets || sets->empty()) + { + continue; + } + + // Intersect the sets for this item. + DependSetList::const_iterator i = sets->begin(); + DependSet common = *i; + for(++i; i != sets->end(); ++i) + { + DependSet intersection; + cmsys_stl::set_intersection + (common.begin(), common.end(), i->begin(), i->end(), + std::inserter(intersection, intersection.begin())); + common = intersection; + } + + // Add the inferred dependencies to the graph. + for(DependSet::const_iterator j = common.begin(); j != common.end(); ++j) + { + int dependee_index = *j; + this->EntryConstraintGraph[dependee_index].push_back(depender_index); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::CleanConstraintGraph() +{ + for(Graph::iterator i = this->EntryConstraintGraph.begin(); + i != this->EntryConstraintGraph.end(); ++i) + { + // Sort the outgoing edges for each graph node so that the + // original order will be preserved as much as possible. + cmsys_stl::sort(i->begin(), i->end()); + + // Make the edge list unique. + NodeList::iterator last = cmsys_stl::unique(i->begin(), i->end()); + i->erase(last, i->end()); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::DisplayConstraintGraph() +{ + // Display the graph nodes and their edges. + cmOStringStream e; + for(unsigned int i=0; i < this->EntryConstraintGraph.size(); ++i) + { + NodeList const& nl = this->EntryConstraintGraph[i]; + e << "item " << i << " is [" << this->EntryList[i].Item << "]\n"; + for(NodeList::const_iterator j = nl.begin(); j != nl.end(); ++j) + { + e << " item " << *j << " must precede it\n"; + } + } + fprintf(stderr, "%s\n", e.str().c_str()); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::OrderLinkEntires() +{ + // Compute the DAG of strongly connected components. The algorithm + // used by cmComputeComponentGraph should identify the components in + // the same order in which the items were originally discovered in + // the BFS. This should preserve the original order when no + // constraints disallow it. + cmComputeComponentGraph ccg(this->EntryConstraintGraph); + Graph const& cgraph = ccg.GetComponentGraph(); + if(this->DebugMode) + { + this->DisplayComponents(ccg); + } + + // Setup visit tracking. + this->ComponentVisited.resize(cgraph.size(), 0); + + // The component graph is guaranteed to be acyclic. Start a DFS + // from every entry. + for(unsigned int c=0; c < cgraph.size(); ++c) + { + this->VisitComponent(ccg, c); + } +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkDepends::DisplayComponents(cmComputeComponentGraph const& ccg) +{ + fprintf(stderr, "The strongly connected components are:\n"); + std::vector const& components = ccg.GetComponents(); + for(unsigned int c=0; c < components.size(); ++c) + { + fprintf(stderr, "Component (%u):\n", c); + NodeList const& nl = components[c]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int i = *ni; + fprintf(stderr, " item %d [%s]\n", i, + this->EntryList[i].Item.c_str()); + } + } + fprintf(stderr, "\n"); +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkDepends::VisitComponent(cmComputeComponentGraph const& ccg, + unsigned int c) +{ + // Check if the node has already been visited. + if(this->ComponentVisited[c]) + { + return; + } + + // We are now visiting this component so mark it. + this->ComponentVisited[c] = 1; + + // Visit the neighbors of the component first. + NodeList const& nl = ccg.GetComponentGraphEdges(c); + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + this->VisitComponent(ccg, *ni); + } + + // Now that all items required to come before this one have been + // emmitted, emit this component's items. + this->EmitComponent(ccg.GetComponent(c)); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::EmitComponent(NodeList const& nl) +{ + assert(!nl.empty()); + + // Handle trivial components. + if(nl.size() == 1) + { + this->FinalLinkOrder.push_back(nl[0]); + return; + } + + // This is a non-trivial strongly connected component of the + // original graph. It consists of two or more libraries (archives) + // that mutually require objects from one another. In the worst + // case we may have to repeat the list of libraries as many times as + // there are object files in the biggest archive. For now we just + // list them twice. + // + // The list of items in the component has been sorted by the order + // of discovery in the original BFS of dependencies. This has the + // advantage that the item directly linked by a target requiring + // this component will come first which minimizes the number of + // repeats needed. + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + this->FinalLinkOrder.push_back(*ni); + } + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + this->FinalLinkOrder.push_back(*ni); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::DisplayFinalEntries() +{ + fprintf(stderr, "target [%s] links to:\n", this->Target->GetName()); + for(std::vector::const_iterator lei = + this->FinalLinkEntries.begin(); + lei != this->FinalLinkEntries.end(); ++lei) + { + if(lei->Target) + { + fprintf(stderr, " target [%s]\n", lei->Target->GetName()); + } + else + { + fprintf(stderr, " item [%s]\n", lei->Item.c_str()); + } + } + fprintf(stderr, "\n"); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::CheckWrongConfigItem(std::string const& item) +{ + if(!this->OldLinkDirMode) + { + return; + } + + // For CMake 2.4 bug-compatibility we need to consider the output + // directories of targets linked in another configuration as link + // directories. + if(cmTarget* tgt = this->Makefile->FindTargetToUse(item.c_str())) + { + if(!tgt->IsImported()) + { + this->OldWrongConfigItems.insert(tgt); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkDepends::PreserveOriginalEntries() +{ + // Regular expression to match shared libraries. + cmsys::RegularExpression shared_lib(this->SharedRegexString.c_str()); + + // Skip the part of the input sequence that already appears in the + // output. + std::vector::const_iterator in = this->OriginalEntries.begin(); + std::vector::const_iterator out = this->FinalLinkOrder.begin(); + while(in != this->OriginalEntries.end() && + out != this->FinalLinkOrder.end()) + { + cmTarget* tgt = this->EntryList[*in].Target; + if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) || + (!tgt && shared_lib.find(this->EntryList[*in].Item))) + { + // Skip input items known to not be static libraries. + ++in; + } + else if(*in == *out) + { + // The input and output items match. Move on to the next items. + ++in; + ++out; + } + else + { + // The output item does not match the next input item. Skip it. + ++out; + } + } + + // Append the part of the input sequence that does not already + // appear in the output. + while(in != this->OriginalEntries.end()) + { + cmTarget* tgt = this->EntryList[*in].Target; + if((tgt && tgt->GetType() != cmTarget::STATIC_LIBRARY) || + (!tgt && shared_lib.find(this->EntryList[*in].Item))) + { + // Skip input items known to not be static libraries. + ++in; + } + else + { + this->FinalLinkOrder.push_back(*in++); + } + } +} diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h new file mode 100644 index 000000000..9a7b1cdde --- /dev/null +++ b/Source/cmComputeLinkDepends.h @@ -0,0 +1,152 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeLinkDepends.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.5.2.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmComputeLinkDepends_h +#define cmComputeLinkDepends_h + +#include "cmStandardIncludes.h" +#include "cmTarget.h" + +#include "cmGraphAdjacencyList.h" + +#include + +class cmComputeComponentGraph; +class cmGlobalGenerator; +class cmLocalGenerator; +class cmMakefile; +class cmTarget; +class cmake; + +/** \class cmComputeLinkDepends + * \brief Compute link dependencies for targets. + */ +class cmComputeLinkDepends +{ +public: + cmComputeLinkDepends(cmTarget* target, const char* config); + ~cmComputeLinkDepends(); + + // Basic information about each link item. + struct LinkEntry + { + std::string Item; + cmTarget* Target; + bool IsSharedDep; + LinkEntry(): Item(), Target(0), IsSharedDep(false) {} + LinkEntry(LinkEntry const& r): + Item(r.Item), Target(r.Target), IsSharedDep(r.IsSharedDep) {} + }; + + typedef std::vector EntryVector; + EntryVector const& Compute(); + + void SetOldLinkDirMode(bool b); + std::set const& GetOldWrongConfigItems() const + { return this->OldWrongConfigItems; } + + /** Set a regular expression that matches strings ending in a shared + library extension. */ + void SetSharedRegex(std::string const& regex); + +private: + + // Context information. + cmTarget* Target; + cmMakefile* Makefile; + cmLocalGenerator* LocalGenerator; + cmGlobalGenerator* GlobalGenerator; + cmake* CMakeInstance; + bool DebugMode; + + // Configuration information. + const char* Config; + + // Output information. + EntryVector FinalLinkEntries; + + typedef cmTarget::LinkLibraryVectorType LinkLibraryVectorType; + + std::map::iterator + AllocateLinkEntry(std::string const& item); + int AddLinkEntry(std::string const& item); + void AddVarLinkEntries(int depender_index, const char* value); + void AddTargetLinkEntries(int depender_index, + LinkLibraryVectorType const& libs); + void AddLinkEntries(int depender_index, + std::vector const& libs); + std::string CleanItemName(std::string const& item); + + // One entry for each unique item. + std::vector EntryList; + std::map LinkEntryIndex; + + // BFS of initial dependencies. + struct BFSEntry + { + int Index; + const char* LibDepends; + }; + std::queue BFSQueue; + void FollowLinkEntry(BFSEntry const&); + + // Shared libraries that are included only because they are + // dependencies of other shared libraries, not because they are part + // of the interface. + struct SharedDepEntry + { + std::string Item; + int DependerIndex; + }; + std::queue SharedDepQueue; + void QueueSharedDependencies(int depender_index, + std::vector const& deps); + void HandleSharedDependency(SharedDepEntry const& dep); + + // Dependency inferral for each link item. + struct DependSet: public std::set {}; + struct DependSetList: public std::vector {}; + std::vector InferredDependSets; + void InferDependencies(); + + // Ordering constraint graph adjacency list. + typedef cmGraphNodeList NodeList; + typedef cmGraphAdjacencyList Graph; + Graph EntryConstraintGraph; + void CleanConstraintGraph(); + void DisplayConstraintGraph(); + + // Ordering algorithm. + void OrderLinkEntires(); + std::vector ComponentVisited; + std::vector FinalLinkOrder; + void DisplayComponents(cmComputeComponentGraph const& ccg); + void VisitComponent(cmComputeComponentGraph const& ccg, unsigned int i); + void EmitComponent(NodeList const& nl); + void DisplayFinalEntries(); + + // Preservation of original link line. + std::vector OriginalEntries; + void PreserveOriginalEntries(); + std::string SharedRegexString; + + // Compatibility help. + bool OldLinkDirMode; + void CheckWrongConfigItem(std::string const& item); + std::set OldWrongConfigItems; +}; + +#endif diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx new file mode 100644 index 000000000..e1c6556b4 --- /dev/null +++ b/Source/cmComputeLinkInformation.cxx @@ -0,0 +1,1633 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeLinkInformation.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.24.2.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmComputeLinkInformation.h" + +#include "cmComputeLinkDepends.h" +#include "cmOrderDirectories.h" + +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmTarget.h" +#include "cmake.h" + +#include + +//#define CM_COMPUTE_LINK_INFO_DEBUG + +/* +Notes about linking on various platforms: + +------------------------------------------------------------------------------ + +Linux, FreeBSD, Mac OS X, IRIX, Sun, Windows: + +Linking to libraries using the full path works fine. + +------------------------------------------------------------------------------ + +On AIX, more work is needed. + + The "-bnoipath" option is needed. From "man ld": + + Note: If you specify a shared object, or an archive file + containing a shared object, with an absolute or relative path + name, instead of with the -lName flag, the path name is + included in the import file ID string in the loader section of + the output file. You can override this behavior with the + -bnoipath option. + + noipath + + For shared objects listed on the command-line, rather than + specified with the -l flag, use a null path component when + listing the shared object in the loader section of the + output file. A null path component is always used for + shared objects specified with the -l flag. This option + does not affect the specification of a path component by + using a line beginning with #! in an import file. The + default is the ipath option. + + This prevents the full path specified on the compile line from being + compiled directly into the binary. + + By default the linker places -L paths in the embedded runtime path. + In order to implement CMake's RPATH interface correctly, we need the + -blibpath:Path option. From "man ld": + + libpath:Path + + Uses Path as the library path when writing the loader section + of the output file. Path is neither checked for validity nor + used when searching for libraries specified by the -l flag. + Path overrides any library paths generated when the -L flag is + used. + + If you do not specify any -L flags, or if you specify the + nolibpath option, the default library path information is + written in the loader section of the output file. The default + library path information is the value of the LIBPATH + environment variable if it is defined, and /usr/lib:/lib, + otherwise. + + We can pass -Wl,-blibpath:/usr/lib:/lib always to avoid the -L stuff + and not break when the user sets LIBPATH. Then if we want to add an + rpath we insert it into the option before /usr/lib. + +------------------------------------------------------------------------------ + +On HP-UX, more work is needed. There are differences between +versions. + +ld: 92453-07 linker linker ld B.10.33 990520 + + Linking with a full path works okay for static and shared libraries. + The linker seems to always put the full path to where the library + was found in the binary whether using a full path or -lfoo syntax. + Transitive link dependencies work just fine due to the full paths. + + It has the "-l:libfoo.sl" option. The +nodefaultrpath is accepted + but not documented and does not seem to do anything. There is no + +forceload option. + +ld: 92453-07 linker ld HP Itanium(R) B.12.41 IPF/IPF + + Linking with a full path works okay for static libraries. + + Linking with a full path works okay for shared libraries. However + dependent (transitive) libraries of those linked directly must be + either found with an rpath stored in the direct dependencies or + found in -L paths as if they were specified with "-l:libfoo.sl" + (really "-l:"). The search matches that of the dynamic + loader but only with -L paths. In other words, if we have an + executable that links to shared library bar which links to shared + library foo, the link line for the exe must contain + + /dir/with/bar/libbar.sl -L/dir/with/foo + + It does not matter whether the exe wants to link to foo directly or + whether /dir/with/foo/libfoo.sl is listed. The -L path must still + be present. It should match the runtime path computed for the + executable taking all directly and transitively linked libraries + into account. + + The "+nodefaultrpath" option should be used to avoid getting -L + paths in the rpath unless we add our own rpath with +b. This means + that skip-build-rpath should use this option. + + See documentation in "man ld", "man dld.so", and + http://docs.hp.com/en/B2355-90968/creatingandusinglibraries.htm + + +[no]defaultrpath + +defaultrpath is the default. Include any paths that are + specified with -L in the embedded path, unless you specify the + +b option. If you use +b, only the path list specified by +b is + in the embedded path. + + The +nodefaultrpath option removes all library paths that were + specified with the -L option from the embedded path. The linker + searches the library paths specified by the -L option at link + time. At run time, the only library paths searched are those + specified by the environment variables LD_LIBRARY_PATH and + SHLIB_PATH, library paths specified by the +b linker option, and + finally the default library paths. + + +rpathfirst + This option will cause the paths specified in RPATH (embedded + path) to be used before the paths specified in LD_LIBRARY_PATH + or SHLIB_PATH, in searching for shared libraries. This changes + the default search order of LD_LIBRARY_PATH, SHLIB_PATH, and + RPATH (embedded path). + +------------------------------------------------------------------------------ +Notes about dependent (transitive) shared libraries: + +On non-Windows systems shared libraries may have transitive +dependencies. In order to support LINK_INTERFACE_LIBRARIES we must +support linking to a shared library without listing all the libraries +to which it links. Some linkers want to be able to find the +transitive dependencies (dependent libraries) of shared libraries +listed on the command line. + + - On Windows, DLLs are not directly linked, and the import libraries + have no transitive dependencies. + + - On Mac, we need to actually list the transitive dependencies. + Otherwise when using -isysroot for universal binaries it cannot + find the dependent libraries. Listing them on the command line + tells the linker where to find them, but unfortunately also links + the library. + + - On HP-UX, the linker wants to find the transitive dependencies of + shared libraries in the -L paths even if the dependent libraries + are given on the link line. + + - On AIX the transitive dependencies are not needed. + + - On SGI, the linker wants to find the transitive dependencies of + shared libraries in the -L paths if they are not given on the link + line. Transitive linking can be disabled using the options + + -no_transitive_link -Wl,-no_transitive_link + + which disable it. Both options must be given when invoking the + linker through the compiler. + + - On Sun, the linker wants to find the transitive dependencies of + shared libraries in the -L paths if they are not given on the link + line. + + - On Linux, FreeBSD, and QNX: + + The linker wants to find the transitive dependencies of shared + libraries in the "-rpath-link" paths option if they have not been + given on the link line. The option is like rpath but just for + link time: + + -Wl,-rpath-link,"/path1:/path2" + +For -rpath-link, we need a separate runtime path ordering pass +including just the dependent libraries that are not linked. + +For -L paths on non-HP, we can do the same thing as with rpath-link +but put the results in -L paths. The paths should be listed at the +end to avoid conflicting with user search paths (?). + +For -L paths on HP, we should do a runtime path ordering pass with +all libraries, both linked and non-linked. Even dependent +libraries that are also linked need to be listed in -L paths. + +In our implementation we add all dependent libraries to the runtime +path computation. Then the auto-generated RPATH will find everything. + +------------------------------------------------------------------------------ +Notes about shared libraries with not builtin soname: + +Some UNIX shared libraries may be created with no builtin soname. On +some platforms such libraries cannot be linked using the path to their +location because the linker will copy the path into the field used to +find the library at runtime. + + Apple: ../libfoo.dylib ==> libfoo.dylib # ok, uses install_name + SGI: ../libfoo.so ==> libfoo.so # ok + AIX: ../libfoo.so ==> libfoo.so # ok + Linux: ../libfoo.so ==> ../libfoo.so # bad + HP-UX: ../libfoo.so ==> ../libfoo.so # bad + Sun: ../libfoo.so ==> ../libfoo.so # bad + FreeBSD: ../libfoo.so ==> ../libfoo.so # bad + +In order to link these libraries we need to use the old-style split +into -L.. and -lfoo options. This should be fairly safe because most +problems with -lfoo options were related to selecting shared libraries +instead of static but in this case we want the shared lib. Link +directory ordering needs to be done to make sure these shared +libraries are found first. There should be very few restrictions +because this need be done only for shared libraries without soname-s. + +*/ + +//---------------------------------------------------------------------------- +cmComputeLinkInformation +::cmComputeLinkInformation(cmTarget* target, const char* config) +{ + // Store context information. + this->Target = target; + this->Makefile = this->Target->GetMakefile(); + this->LocalGenerator = this->Makefile->GetLocalGenerator(); + this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator(); + this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); + + // The configuration being linked. + this->Config = config; + + // Allocate internals. + this->OrderLinkerSearchPath = + new cmOrderDirectories(this->GlobalGenerator, target->GetName(), + "linker search path"); + this->OrderRuntimeSearchPath = + new cmOrderDirectories(this->GlobalGenerator, target->GetName(), + "runtime search path"); + this->OrderDependentRPath = 0; + + // Get the language used for linking this target. + this->LinkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + if(!this->LinkLanguage) + { + // The Compute method will do nothing, so skip the rest of the + // initialization. + return; + } + + // Check whether we should use an import library for linking a target. + this->UseImportLibrary = + this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")?true:false; + + // On platforms without import libraries there may be a special flag + // to use when creating a plugin (module) that obtains symbols from + // the program that will load it. + this->LoaderFlag = 0; + if(!this->UseImportLibrary && + this->Target->GetType() == cmTarget::MODULE_LIBRARY) + { + std::string loader_flag_var = "CMAKE_SHARED_MODULE_LOADER_"; + loader_flag_var += this->LinkLanguage; + loader_flag_var += "_FLAG"; + this->LoaderFlag = this->Makefile->GetDefinition(loader_flag_var.c_str()); + } + + // Get options needed to link libraries. + this->LibLinkFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); + this->LibLinkFileFlag = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FILE_FLAG"); + this->LibLinkSuffix = + this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_SUFFIX"); + + // Get options needed to specify RPATHs. + this->RuntimeUseChrpath = false; + if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) + { + const char* tType = + ((this->Target->GetType() == cmTarget::EXECUTABLE)? + "EXECUTABLE" : "SHARED_LIBRARY"); + std::string rtVar = "CMAKE_"; + rtVar += tType; + rtVar += "_RUNTIME_"; + rtVar += this->LinkLanguage; + rtVar += "_FLAG"; + std::string rtSepVar = rtVar + "_SEP"; + this->RuntimeFlag = this->Makefile->GetSafeDefinition(rtVar.c_str()); + this->RuntimeSep = this->Makefile->GetSafeDefinition(rtSepVar.c_str()); + this->RuntimeAlways = + (this->Makefile-> + GetSafeDefinition("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH")); + this->RuntimeUseChrpath = this->Target->IsChrpathUsed(); + + // Get options needed to help find dependent libraries. + std::string rlVar = "CMAKE_"; + rlVar += tType; + rlVar += "_RPATH_LINK_"; + rlVar += this->LinkLanguage; + rlVar += "_FLAG"; + this->RPathLinkFlag = this->Makefile->GetSafeDefinition(rlVar.c_str()); + } + + // Check if we need to include the runtime search path at link time. + { + std::string var = "CMAKE_SHARED_LIBRARY_LINK_"; + var += this->LinkLanguage; + var += "_WITH_RUNTIME_PATH"; + this->LinkWithRuntimePath = this->Makefile->IsOn(var.c_str()); + } + + // Check the platform policy for missing soname case. + this->NoSONameUsesPath = + this->Makefile->IsOn("CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME"); + + // Get link type information. + this->ComputeLinkTypeInfo(); + + // Setup the link item parser. + this->ComputeItemParserInfo(); + + // Setup framework support. + this->ComputeFrameworkInfo(); + + // Choose a mode for dealing with shared library dependencies. + this->SharedDependencyMode = SharedDepModeNone; + if(this->Makefile->IsOn("CMAKE_LINK_DEPENDENT_LIBRARY_FILES")) + { + this->SharedDependencyMode = SharedDepModeLink; + } + else if(this->Makefile->IsOn("CMAKE_LINK_DEPENDENT_LIBRARY_DIRS")) + { + this->SharedDependencyMode = SharedDepModeLibDir; + } + else if(!this->RPathLinkFlag.empty()) + { + this->SharedDependencyMode = SharedDepModeDir; + this->OrderDependentRPath = + new cmOrderDirectories(this->GlobalGenerator, target->GetName(), + "dependent library path"); + } + + // Get the implicit link directories for this platform. + if(const char* implicitLinks = + (this->Makefile->GetDefinition + ("CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES"))) + { + std::vector implicitLinkVec; + cmSystemTools::ExpandListArgument(implicitLinks, implicitLinkVec); + for(std::vector::const_iterator + i = implicitLinkVec.begin(); + i != implicitLinkVec.end(); ++i) + { + this->ImplicitLinkDirs.insert(*i); + } + } + + // Add the search path entries requested by the user to path ordering. + this->OrderLinkerSearchPath + ->AddUserDirectories(this->Target->GetLinkDirectories()); + this->OrderRuntimeSearchPath + ->AddUserDirectories(this->Target->GetLinkDirectories()); + this->OrderLinkerSearchPath + ->SetImplicitDirectories(this->ImplicitLinkDirs); + this->OrderRuntimeSearchPath + ->SetImplicitDirectories(this->ImplicitLinkDirs); + if(this->OrderDependentRPath) + { + this->OrderDependentRPath + ->SetImplicitDirectories(this->ImplicitLinkDirs); + } + + // Decide whether to enable compatible library search path mode. + // There exists code that effectively does + // + // /path/to/libA.so -lB + // + // where -lB is meant to link to /path/to/libB.so. This is broken + // because it specified -lB without specifying a link directory (-L) + // in which to search for B. This worked in CMake 2.4 and below + // because -L/path/to would be added by the -L/-l split for A. In + // order to support such projects we need to add the directories + // containing libraries linked with a full path to the -L path. + this->OldLinkDirMode = + this->Target->GetPolicyStatusCMP0003() != cmPolicies::NEW; + if(this->OldLinkDirMode) + { + // Construct a mask to not bother with this behavior for link + // directories already specified by the user. + std::vector const& dirs = this->Target->GetLinkDirectories(); + for(std::vector::const_iterator di = dirs.begin(); + di != dirs.end(); ++di) + { + this->OldLinkDirMask.insert(*di); + } + } +} + +//---------------------------------------------------------------------------- +cmComputeLinkInformation::~cmComputeLinkInformation() +{ + delete this->OrderLinkerSearchPath; + delete this->OrderRuntimeSearchPath; + delete this->OrderDependentRPath; +} + +//---------------------------------------------------------------------------- +cmComputeLinkInformation::ItemVector const& +cmComputeLinkInformation::GetItems() +{ + return this->Items; +} + +//---------------------------------------------------------------------------- +std::vector const& cmComputeLinkInformation::GetDirectories() +{ + return this->OrderLinkerSearchPath->GetOrderedDirectories(); +} + +//---------------------------------------------------------------------------- +std::string cmComputeLinkInformation::GetRPathLinkString() +{ + // If there is no separate linker runtime search flag (-rpath-link) + // there is no reason to compute a string. + if(!this->OrderDependentRPath) + { + return ""; + } + + // Construct the linker runtime search path. + std::string rpath_link; + const char* sep = ""; + std::vector const& dirs = + this->OrderDependentRPath->GetOrderedDirectories(); + for(std::vector::const_iterator di = dirs.begin(); + di != dirs.end(); ++di) + { + rpath_link += sep; + sep = ":"; + rpath_link += *di; + } + return rpath_link; +} + +//---------------------------------------------------------------------------- +std::vector const& cmComputeLinkInformation::GetDepends() +{ + return this->Depends; +} + +//---------------------------------------------------------------------------- +std::vector const& cmComputeLinkInformation::GetFrameworkPaths() +{ + return this->FrameworkPaths; +} + +//---------------------------------------------------------------------------- +std::set const& +cmComputeLinkInformation::GetSharedLibrariesLinked() +{ + return this->SharedLibrariesLinked; +} + +//---------------------------------------------------------------------------- +bool cmComputeLinkInformation::Compute() +{ + // Skip targets that do not link. + if(!(this->Target->GetType() == cmTarget::EXECUTABLE || + this->Target->GetType() == cmTarget::SHARED_LIBRARY || + this->Target->GetType() == cmTarget::MODULE_LIBRARY || + this->Target->GetType() == cmTarget::STATIC_LIBRARY)) + { + return false; + } + + // We require a link language for the target. + if(!this->LinkLanguage) + { + cmSystemTools:: + Error("CMake can not determine linker language for target:", + this->Target->GetName()); + return false; + } + + // Compute the ordered link line items. + cmComputeLinkDepends cld(this->Target, this->Config); + cld.SetOldLinkDirMode(this->OldLinkDirMode); + cld.SetSharedRegex(this->SharedRegexString); + cmComputeLinkDepends::EntryVector const& linkEntries = cld.Compute(); + + // Add the link line items. + for(cmComputeLinkDepends::EntryVector::const_iterator + lei = linkEntries.begin(); + lei != linkEntries.end(); ++lei) + { + if(lei->IsSharedDep) + { + this->AddSharedDepItem(lei->Item, lei->Target); + } + else + { + this->AddItem(lei->Item, lei->Target); + } + } + + // Restore the target link type so the correct system runtime + // libraries are found. + const char* lss = this->Target->GetProperty("LINK_SEARCH_END_STATIC"); + if(cmSystemTools::IsOn(lss)) + { + this->SetCurrentLinkType(LinkStatic); + } + else + { + this->SetCurrentLinkType(this->StartLinkType); + } + + // Finish listing compatibility paths. + if(this->OldLinkDirMode) + { + // For CMake 2.4 bug-compatibility we need to consider the output + // directories of targets linked in another configuration as link + // directories. + std::set const& wrongItems = cld.GetOldWrongConfigItems(); + for(std::set::const_iterator i = wrongItems.begin(); + i != wrongItems.end(); ++i) + { + cmTarget* tgt = *i; + bool implib = + (this->UseImportLibrary && + (tgt->GetType() == cmTarget::SHARED_LIBRARY)); + std::string lib = tgt->GetFullPath(this->Config , implib, true); + this->OldLinkDirItems.push_back(lib); + } + } + + // Finish setting up linker search directories. + if(!this->FinishLinkerSearchDirectories()) + { + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddItem(std::string const& item, cmTarget* tgt) +{ + // Compute the proper name to use to link this library. + const char* config = this->Config; + bool impexe = (tgt && tgt->IsExecutableWithExports()); + if(impexe && !this->UseImportLibrary && !this->LoaderFlag) + { + // Skip linking to executables on platforms with no import + // libraries or loader flags. + return; + } + + if(tgt && (tgt->GetType() == cmTarget::STATIC_LIBRARY || + tgt->GetType() == cmTarget::SHARED_LIBRARY || + tgt->GetType() == cmTarget::MODULE_LIBRARY || + impexe)) + { + // This is a CMake target. Ask the target for its real name. + if(impexe && this->LoaderFlag) + { + // This link item is an executable that may provide symbols + // used by this target. A special flag is needed on this + // platform. Add it now. + std::string linkItem; + linkItem = this->LoaderFlag; + std::string exe = tgt->GetFullPath(config, this->UseImportLibrary, + true); + linkItem += exe; + this->Items.push_back(Item(linkItem, true)); + this->Depends.push_back(exe); + } + else + { + // Decide whether to use an import library. + bool implib = + (this->UseImportLibrary && + (impexe || tgt->GetType() == cmTarget::SHARED_LIBRARY)); + + // Pass the full path to the target file. + std::string lib = tgt->GetFullPath(config, implib, true); + this->Depends.push_back(lib); + + this->AddTargetItem(lib, tgt); + this->AddLibraryRuntimeInfo(lib, tgt); + } + } + else + { + // This is not a CMake target. Use the name given. + if(cmSystemTools::FileIsFullPath(item.c_str())) + { + if(cmSystemTools::FileIsDirectory(item.c_str())) + { + // This is a directory. + this->AddDirectoryItem(item); + } + else + { + // Use the full path given to the library file. + this->Depends.push_back(item); + this->AddFullItem(item); + this->AddLibraryRuntimeInfo(item); + } + } + else + { + // This is a library or option specified by the user. + this->AddUserItem(item); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, + cmTarget* tgt) +{ + // If dropping shared library dependencies, ignore them. + if(this->SharedDependencyMode == SharedDepModeNone) + { + return; + } + + // The user may have incorrectly named an item. Skip items that are + // not full paths to shared libraries. + if(tgt) + { + // The target will provide a full path. Make sure it is a shared + // library. + if(tgt->GetType() != cmTarget::SHARED_LIBRARY) + { + return; + } + } + else + { + // Skip items that are not full paths. We will not be able to + // reliably specify them. + if(!cmSystemTools::FileIsFullPath(item.c_str())) + { + return; + } + + // Get the name of the library from the file name. + std::string file = cmSystemTools::GetFilenameName(item); + if(!this->ExtractSharedLibraryName.find(file.c_str())) + { + // This is not the name of a shared library. + return; + } + } + + // If in linking mode, just link to the shared library. + if(this->SharedDependencyMode == SharedDepModeLink) + { + this->AddItem(item, tgt); + return; + } + + // Get a full path to the dependent shared library. + // Add it to the runtime path computation so that the target being + // linked will be able to find it. + std::string lib; + if(tgt) + { + lib = tgt->GetFullPath(this->Config, this->UseImportLibrary); + this->AddLibraryRuntimeInfo(lib, tgt); + } + else + { + lib = item; + this->AddLibraryRuntimeInfo(lib); + } + + // Check if we need to include the dependent shared library in other + // path ordering. + cmOrderDirectories* order = 0; + if(this->SharedDependencyMode == SharedDepModeLibDir && + !this->LinkWithRuntimePath /* AddLibraryRuntimeInfo adds it */) + { + // Add the item to the linker search path. + order = this->OrderLinkerSearchPath; + } + else if(this->SharedDependencyMode == SharedDepModeDir) + { + // Add the item to the separate dependent library search path. + order = this->OrderDependentRPath; + } + if(order) + { + if(tgt) + { + std::string soName = tgt->GetSOName(this->Config); + const char* soname = soName.empty()? 0 : soName.c_str(); + order->AddRuntimeLibrary(lib, soname); + } + else + { + order->AddRuntimeLibrary(lib); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::ComputeLinkTypeInfo() +{ + // Check whether archives may actually be shared libraries. + this->ArchivesMayBeShared = + this->CMakeInstance->GetPropertyAsBool( + "TARGET_ARCHIVES_MAY_BE_SHARED_LIBS"); + + // First assume we cannot do link type stuff. + this->LinkTypeEnabled = false; + + // Lookup link type selection flags. + const char* static_link_type_flag = 0; + const char* shared_link_type_flag = 0; + const char* target_type_str = 0; + switch(this->Target->GetType()) + { + case cmTarget::EXECUTABLE: target_type_str = "EXE"; break; + case cmTarget::SHARED_LIBRARY: target_type_str = "SHARED_LIBRARY"; break; + case cmTarget::MODULE_LIBRARY: target_type_str = "SHARED_MODULE"; break; + default: break; + } + if(target_type_str) + { + std::string static_link_type_flag_var = "CMAKE_"; + static_link_type_flag_var += target_type_str; + static_link_type_flag_var += "_LINK_STATIC_"; + static_link_type_flag_var += this->LinkLanguage; + static_link_type_flag_var += "_FLAGS"; + static_link_type_flag = + this->Makefile->GetDefinition(static_link_type_flag_var.c_str()); + + std::string shared_link_type_flag_var = "CMAKE_"; + shared_link_type_flag_var += target_type_str; + shared_link_type_flag_var += "_LINK_DYNAMIC_"; + shared_link_type_flag_var += this->LinkLanguage; + shared_link_type_flag_var += "_FLAGS"; + shared_link_type_flag = + this->Makefile->GetDefinition(shared_link_type_flag_var.c_str()); + } + + // We can support link type switching only if all needed flags are + // known. + if(static_link_type_flag && *static_link_type_flag && + shared_link_type_flag && *shared_link_type_flag) + { + this->LinkTypeEnabled = true; + this->StaticLinkTypeFlag = static_link_type_flag; + this->SharedLinkTypeFlag = shared_link_type_flag; + } + + // TODO: Lookup the starting link type from the target (is it being + // linked statically?). + this->StartLinkType = LinkShared; + this->CurrentLinkType = this->StartLinkType; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::ComputeItemParserInfo() +{ + // Get possible library name prefixes. + cmMakefile* mf = this->Makefile; + this->AddLinkPrefix(mf->GetDefinition("CMAKE_STATIC_LIBRARY_PREFIX")); + this->AddLinkPrefix(mf->GetDefinition("CMAKE_SHARED_LIBRARY_PREFIX")); + + // Import library names should be matched and treated as shared + // libraries for the purposes of linking. + this->AddLinkExtension(mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"), + LinkShared); + this->AddLinkExtension(mf->GetDefinition("CMAKE_STATIC_LIBRARY_SUFFIX"), + LinkStatic); + this->AddLinkExtension(mf->GetDefinition("CMAKE_SHARED_LIBRARY_SUFFIX"), + LinkShared); + this->AddLinkExtension(mf->GetDefinition("CMAKE_LINK_LIBRARY_SUFFIX"), + LinkUnknown); + if(const char* linkSuffixes = + mf->GetDefinition("CMAKE_EXTRA_LINK_EXTENSIONS")) + { + std::vector linkSuffixVec; + cmSystemTools::ExpandListArgument(linkSuffixes, linkSuffixVec); + for(std::vector::iterator i = linkSuffixVec.begin(); + i != linkSuffixVec.end(); ++i) + { + this->AddLinkExtension(i->c_str(), LinkUnknown); + } + } + + // Compute a regex to match link extensions. + std::string libext = this->CreateExtensionRegex(this->LinkExtensions); + + // Create regex to remove any library extension. + std::string reg("(.*)"); + reg += libext; + this->OrderLinkerSearchPath->SetLinkExtensionInfo(this->LinkExtensions, + reg); + + // Create a regex to match a library name. Match index 1 will be + // the prefix if it exists and empty otherwise. Match index 2 will + // be the library name. Match index 3 will be the library + // extension. + reg = "^("; + for(std::set::iterator p = this->LinkPrefixes.begin(); + p != this->LinkPrefixes.end(); ++p) + { + reg += *p; + reg += "|"; + } + reg += ")"; + reg += "([^/]*)"; + + // Create a regex to match any library name. + std::string reg_any = reg; + reg_any += libext; +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "any regex [%s]\n", reg_any.c_str()); +#endif + this->ExtractAnyLibraryName.compile(reg_any.c_str()); + + // Create a regex to match static library names. + if(!this->StaticLinkExtensions.empty()) + { + std::string reg_static = reg; + reg_static += this->CreateExtensionRegex(this->StaticLinkExtensions); +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "static regex [%s]\n", reg_static.c_str()); +#endif + this->ExtractStaticLibraryName.compile(reg_static.c_str()); + } + + // Create a regex to match shared library names. + if(!this->SharedLinkExtensions.empty()) + { + std::string reg_shared = reg; + this->SharedRegexString = + this->CreateExtensionRegex(this->SharedLinkExtensions); + reg_shared += this->SharedRegexString; +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "shared regex [%s]\n", reg_shared.c_str()); +#endif + this->ExtractSharedLibraryName.compile(reg_shared.c_str()); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddLinkPrefix(const char* p) +{ + if(p) + { + this->LinkPrefixes.insert(p); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddLinkExtension(const char* e, LinkType type) +{ + if(e && *e) + { + if(type == LinkStatic) + { + this->StaticLinkExtensions.push_back(e); + } + if(type == LinkShared) + { + this->SharedLinkExtensions.push_back(e); + } + this->LinkExtensions.push_back(e); + } +} + +//---------------------------------------------------------------------------- +std::string +cmComputeLinkInformation +::CreateExtensionRegex(std::vector const& exts) +{ + // Build a list of extension choices. + std::string libext = "("; + const char* sep = ""; + for(std::vector::const_iterator i = exts.begin(); + i != exts.end(); ++i) + { + // Separate this choice from the previous one. + libext += sep; + sep = "|"; + + // Store this extension choice with the "." escaped. + libext += "\\"; +#if defined(_WIN32) && !defined(__CYGWIN__) + libext += this->NoCaseExpression(i->c_str()); +#else + libext += *i; +#endif + } + + // Finish the list. + libext += ")$"; + return libext; +} + +//---------------------------------------------------------------------------- +std::string cmComputeLinkInformation::NoCaseExpression(const char* str) +{ + std::string ret; + const char* s = str; + while(*s) + { + if(*s == '.') + { + ret += *s; + } + else + { + ret += "["; + ret += tolower(*s); + ret += toupper(*s); + ret += "]"; + } + s++; + } + return ret; +} + +//------------------------------------------------------------------- +void cmComputeLinkInformation::SetCurrentLinkType(LinkType lt) +{ + // If we are changing the current link type add the flag to tell the + // linker about it. + if(this->CurrentLinkType != lt) + { + this->CurrentLinkType = lt; + + if(this->LinkTypeEnabled) + { + switch(this->CurrentLinkType) + { + case LinkStatic: + this->Items.push_back(Item(this->StaticLinkTypeFlag, false)); + break; + case LinkShared: + this->Items.push_back(Item(this->SharedLinkTypeFlag, false)); + break; + default: + break; + } + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddTargetItem(std::string const& item, + cmTarget* target) +{ + // This is called to handle a link item that is a full path to a target. + // If the target is not a static library make sure the link type is + // shared. This is because dynamic-mode linking can handle both + // shared and static libraries but static-mode can handle only + // static libraries. If a previous user item changed the link type + // to static we need to make sure it is back to shared. + if(target->GetType() != cmTarget::STATIC_LIBRARY) + { + this->SetCurrentLinkType(LinkShared); + } + + // Keep track of shared library targets linked. + if(target->GetType() == cmTarget::SHARED_LIBRARY) + { + this->SharedLibrariesLinked.insert(target); + } + + // Handle case of an imported shared library with no soname. + if(this->NoSONameUsesPath && + target->IsImportedSharedLibWithoutSOName(this->Config)) + { + this->AddSharedLibNoSOName(item); + return; + } + + // If this platform wants a flag before the full path, add it. + if(!this->LibLinkFileFlag.empty()) + { + this->Items.push_back(Item(this->LibLinkFileFlag, false)); + } + + // For compatibility with CMake 2.4 include the item's directory in + // the linker search path. + if(this->OldLinkDirMode && !target->IsFrameworkOnApple() && + this->OldLinkDirMask.find(cmSystemTools::GetFilenamePath(item)) == + this->OldLinkDirMask.end()) + { + this->OldLinkDirItems.push_back(item); + } + + // Now add the full path to the library. + this->Items.push_back(Item(item, true)); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddFullItem(std::string const& item) +{ + // Check for the implicit link directory special case. + if(this->CheckImplicitDirItem(item)) + { + return; + } + + // Check for case of shared library with no builtin soname. + if(this->NoSONameUsesPath && this->CheckSharedLibNoSOName(item)) + { + return; + } + + // This is called to handle a link item that is a full path. + // If the target is not a static library make sure the link type is + // shared. This is because dynamic-mode linking can handle both + // shared and static libraries but static-mode can handle only + // static libraries. If a previous user item changed the link type + // to static we need to make sure it is back to shared. + if(this->LinkTypeEnabled) + { + std::string name = cmSystemTools::GetFilenameName(item); + if(this->ExtractSharedLibraryName.find(name)) + { + this->SetCurrentLinkType(LinkShared); + } + else if(!this->ExtractStaticLibraryName.find(item)) + { + // We cannot determine the type. Assume it is the target's + // default type. + this->SetCurrentLinkType(this->StartLinkType); + } + } + + // For compatibility with CMake 2.4 include the item's directory in + // the linker search path. + if(this->OldLinkDirMode && + this->OldLinkDirMask.find(cmSystemTools::GetFilenamePath(item)) == + this->OldLinkDirMask.end()) + { + this->OldLinkDirItems.push_back(item); + } + + // If this platform wants a flag before the full path, add it. + if(!this->LibLinkFileFlag.empty()) + { + this->Items.push_back(Item(this->LibLinkFileFlag, false)); + } + + // Now add the full path to the library. + this->Items.push_back(Item(item, true)); +} + +//---------------------------------------------------------------------------- +bool cmComputeLinkInformation::CheckImplicitDirItem(std::string const& item) +{ + // We only switch to a pathless item if the link type may be + // enforced. Fortunately only platforms that support link types + // seem to have magic per-architecture implicit link directories. + if(!this->LinkTypeEnabled) + { + return false; + } + + // Check if this item is in an implicit link directory. + std::string dir = cmSystemTools::GetFilenamePath(item); + if(this->ImplicitLinkDirs.find(dir) == this->ImplicitLinkDirs.end()) + { + // Only libraries in implicit link directories are converted to + // pathless items. + return false; + } + + // Only apply the policy below if the library file is one that can + // be found by the linker. + std::string file = cmSystemTools::GetFilenameName(item); + if(!this->ExtractAnyLibraryName.find(file)) + { + return false; + } + + // Many system linkers support multiple architectures by + // automatically selecting the implicit linker search path for the + // current architecture. If the library appears in an implicit link + // directory then just report the file name without the directory + // portion. This will allow the system linker to locate the proper + // library for the architecture at link time. + this->AddUserItem(file); + return true; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddUserItem(std::string const& item) +{ + // This is called to handle a link item that does not match a CMake + // target and is not a full path. We check here if it looks like a + // library file name to automatically request the proper link type + // from the linker. For example: + // + // foo ==> -lfoo + // libfoo.a ==> -Wl,-Bstatic -lfoo + std::string lib; + + // Parse out the prefix, base, and suffix components of the + // library name. If the name matches that of a shared or static + // library then set the link type accordingly. + // + // Search for shared library names first because some platforms + // have shared libraries with names that match the static library + // pattern. For example cygwin and msys use the convention + // libfoo.dll.a for import libraries and libfoo.a for static + // libraries. On AIX a library with the name libfoo.a can be + // shared! + if(this->ExtractSharedLibraryName.find(item)) + { + // This matches a shared library file name. +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "shared regex matched [%s] [%s] [%s]\n", + this->ExtractSharedLibraryName.match(1).c_str(), + this->ExtractSharedLibraryName.match(2).c_str(), + this->ExtractSharedLibraryName.match(3).c_str()); +#endif + // Set the link type to shared. + this->SetCurrentLinkType(LinkShared); + + // Use just the library name so the linker will search. + lib = this->ExtractSharedLibraryName.match(2); + } + else if(this->ExtractStaticLibraryName.find(item)) + { + // This matches a static library file name. +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "static regex matched [%s] [%s] [%s]\n", + this->ExtractStaticLibraryName.match(1).c_str(), + this->ExtractStaticLibraryName.match(2).c_str(), + this->ExtractStaticLibraryName.match(3).c_str()); +#endif + // Set the link type to static. + this->SetCurrentLinkType(LinkStatic); + + // Use just the library name so the linker will search. + lib = this->ExtractStaticLibraryName.match(2); + } + else if(this->ExtractAnyLibraryName.find(item)) + { + // This matches a library file name. +#ifdef CM_COMPUTE_LINK_INFO_DEBUG + fprintf(stderr, "any regex matched [%s] [%s] [%s]\n", + this->ExtractAnyLibraryName.match(1).c_str(), + this->ExtractAnyLibraryName.match(2).c_str(), + this->ExtractAnyLibraryName.match(3).c_str()); +#endif + // Restore the target link type since this item does not specify + // one. + this->SetCurrentLinkType(this->StartLinkType); + + // Use just the library name so the linker will search. + lib = this->ExtractAnyLibraryName.match(2); + } + else if(item[0] == '-' || item[0] == '$' || item[0] == '`') + { + // if this is a -l option then we might need to warn about + // CMP0003 so put it in OldUserFlagItems, if it is not a -l + // or -Wl,-l (-framework -pthread), then allow it without a + // CMP0003 as -L will not affect those other linker flags + if(item.find("-l") == 0 || item.find("-Wl,-l") == 0) + { + // This is a linker option provided by the user. + this->OldUserFlagItems.push_back(item); + } + + // Restore the target link type since this item does not specify + // one. + this->SetCurrentLinkType(this->StartLinkType); + + // Use the item verbatim. + this->Items.push_back(Item(item, false)); + return; + } + else + { + // This is a name specified by the user. + this->OldUserFlagItems.push_back(item); + + // We must ask the linker to search for a library with this name. + // Restore the target link type since this item does not specify + // one. + this->SetCurrentLinkType(this->StartLinkType); + lib = item; + } + + // Create an option to ask the linker to search for the library. + std::string out = this->LibLinkFlag; + out += lib; + out += this->LibLinkSuffix; + this->Items.push_back(Item(out, false)); + + // Here we could try to find the library the linker will find and + // add a runtime information entry for it. It would probably not be + // reliable and we want to encourage use of full paths for library + // specification. +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddFrameworkItem(std::string const& item) +{ + // Try to separate the framework name and path. + if(!this->SplitFramework.find(item.c_str())) + { + cmOStringStream e; + e << "Could not parse framework path \"" << item << "\" " + << "linked by target " << this->Target->GetName() << "."; + cmSystemTools::Error(e.str().c_str()); + return; + } + + // Add the directory portion to the framework search path. + this->AddFrameworkPath(this->SplitFramework.match(1)); + + // Add the item using the -framework option. + std::string fw = "-framework "; + fw += this->SplitFramework.match(2); + this->Items.push_back(Item(fw, false)); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddDirectoryItem(std::string const& item) +{ +#ifdef __APPLE__ + if(cmSystemTools::IsPathToFramework(item.c_str())) + { + this->AddFrameworkItem(item); + } + else +#endif + { + this->DropDirectoryItem(item); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::DropDirectoryItem(std::string const& item) +{ + // A full path to a directory was found as a link item. Warn the + // user. + cmOStringStream e; + e << "WARNING: Target \"" << this->Target->GetName() + << "\" requests linking to directory \"" << item << "\". " + << "Targets may link only to libraries. " + << "CMake is dropping the item."; + cmSystemTools::Message(e.str().c_str()); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::ComputeFrameworkInfo() +{ + // Avoid adding system framework paths. See "man ld" on OS X. + this->FrameworkPathsEmmitted.insert("/Library/Frameworks"); + this->FrameworkPathsEmmitted.insert("/Network/Library/Frameworks"); + this->FrameworkPathsEmmitted.insert("/System/Library/Frameworks"); + + // Regular expression to extract a framework path and name. + this->SplitFramework.compile("(.*)/(.*)\\.framework$"); +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddFrameworkPath(std::string const& p) +{ + if(this->FrameworkPathsEmmitted.insert(p).second) + { + this->FrameworkPaths.push_back(p); + } +} + +//---------------------------------------------------------------------------- +bool cmComputeLinkInformation::CheckSharedLibNoSOName(std::string const& item) +{ + // This platform will use the path to a library as its soname if the + // library is given via path and was not built with an soname. If + // this is a shared library that might be the case. + std::string file = cmSystemTools::GetFilenameName(item); + if(this->ExtractSharedLibraryName.find(file)) + { + // If we can guess the soname fairly reliably then assume the + // library has one. Otherwise assume the library has no builtin + // soname. + std::string soname; + if(!cmSystemTools::GuessLibrarySOName(item, soname)) + { + this->AddSharedLibNoSOName(item); + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::AddSharedLibNoSOName(std::string const& item) +{ + // We have a full path to a shared library with no soname. We need + // to ask the linker to locate the item because otherwise the path + // we give to it will be embedded in the target linked. Then at + // runtime the dynamic linker will search for the library using the + // path instead of just the name. + std::string file = cmSystemTools::GetFilenameName(item); + this->AddUserItem(file); + + // Make sure the link directory ordering will find the library. + this->OrderLinkerSearchPath->AddLinkLibrary(item); +} + +//---------------------------------------------------------------------------- +bool cmComputeLinkInformation::FinishLinkerSearchDirectories() +{ + // Support broken projects if necessary. + if(this->OldLinkDirItems.empty() || this->OldUserFlagItems.empty() || + !this->OldLinkDirMode) + { + return true; + } + + // Enforce policy constraints. + switch(this->Target->GetPolicyStatusCMP0003()) + { + case cmPolicies::WARN: + if(!this->CMakeInstance->GetPropertyAsBool("CMP0003-WARNING-GIVEN")) + { + this->CMakeInstance->SetProperty("CMP0003-WARNING-GIVEN", "1"); + cmOStringStream w; + this->PrintLinkPolicyDiagnosis(w); + this->CMakeInstance->IssueMessage(cmake::AUTHOR_WARNING, w.str(), + this->Target->GetBacktrace()); + } + case cmPolicies::OLD: + // OLD behavior is to add the paths containing libraries with + // known full paths as link directories. + break; + case cmPolicies::NEW: + // Should never happen due to assignment of OldLinkDirMode + return true; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + { + cmOStringStream e; + e << (this->Makefile->GetPolicies()-> + GetRequiredPolicyError(cmPolicies::CMP0003)) << "\n"; + this->PrintLinkPolicyDiagnosis(e); + this->CMakeInstance->IssueMessage(cmake::FATAL_ERROR, e.str(), + this->Target->GetBacktrace()); + return false; + } + } + + // Add the link directories for full path items. + for(std::vector::const_iterator + i = this->OldLinkDirItems.begin(); + i != this->OldLinkDirItems.end(); ++i) + { + this->OrderLinkerSearchPath->AddLinkLibrary(*i); + } + return true; +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::PrintLinkPolicyDiagnosis(std::ostream& os) +{ + // Tell the user what to do. + os << "Policy CMP0003 should be set before this line. " + << "Add code such as\n" + << " if(COMMAND cmake_policy)\n" + << " cmake_policy(SET CMP0003 NEW)\n" + << " endif(COMMAND cmake_policy)\n" + << "as early as possible but after the most recent call to " + << "cmake_minimum_required or cmake_policy(VERSION). "; + + // List the items that might need the old-style paths. + os << "This warning appears because target \"" + << this->Target->GetName() << "\" " + << "links to some libraries for which the linker must search:\n"; + { + // Format the list of unknown items to be as short as possible while + // still fitting in the allowed width (a true solution would be the + // bin packing problem if we were allowed to change the order). + std::string::size_type max_size = 76; + std::string line; + const char* sep = " "; + for(std::vector::const_iterator + i = this->OldUserFlagItems.begin(); + i != this->OldUserFlagItems.end(); ++i) + { + // If the addition of another item will exceed the limit then + // output the current line and reset it. Note that the separator + // is either " " or ", " which is always 2 characters. + if(!line.empty() && (line.size() + i->size() + 2) > max_size) + { + os << line << "\n"; + sep = " "; + line = ""; + } + line += sep; + line += *i; + // Convert to the other separator. + sep = ", "; + } + if(!line.empty()) + { + os << line << "\n"; + } + } + + // List the paths old behavior is adding. + os << "and other libraries with known full path:\n"; + std::set emitted; + for(std::vector::const_iterator + i = this->OldLinkDirItems.begin(); + i != this->OldLinkDirItems.end(); ++i) + { + if(emitted.insert(cmSystemTools::GetFilenamePath(*i)).second) + { + os << " " << *i << "\n"; + } + } + + // Explain. + os << "CMake is adding directories in the second list to the linker " + << "search path in case they are needed to find libraries from the " + << "first list (for backwards compatibility with CMake 2.4). " + << "Set policy CMP0003 to OLD or NEW to enable or disable this " + << "behavior explicitly. " + << "Run \"cmake --help-policy CMP0003\" for more information."; +} + +//---------------------------------------------------------------------------- +std::vector const& +cmComputeLinkInformation::GetRuntimeSearchPath() +{ + return this->OrderRuntimeSearchPath->GetOrderedDirectories(); +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath, + cmTarget* target) +{ + // Skip targets that are not shared libraries (modules cannot be linked). + if(target->GetType() != cmTarget::SHARED_LIBRARY) + { + return; + } + + // Try to get the soname of the library. Only files with this name + // could possibly conflict. + std::string soName = target->GetSOName(this->Config); + const char* soname = soName.empty()? 0 : soName.c_str(); + + // Include this library in the runtime path ordering. + this->OrderRuntimeSearchPath->AddRuntimeLibrary(fullPath, soname); + if(this->LinkWithRuntimePath) + { + this->OrderLinkerSearchPath->AddRuntimeLibrary(fullPath, soname); + } +} + +//---------------------------------------------------------------------------- +void +cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath) +{ + // Get the name of the library from the file name. + std::string file = cmSystemTools::GetFilenameName(fullPath); + if(!this->ExtractSharedLibraryName.find(file.c_str())) + { + // On some platforms (AIX) a shared library may look static. + if(this->ArchivesMayBeShared) + { + if(!this->ExtractStaticLibraryName.find(file.c_str())) + { + // This is not the name of a shared library or archive. + return; + } + } + else + { + // This is not the name of a shared library. + return; + } + } + + // Include this library in the runtime path ordering. + this->OrderRuntimeSearchPath->AddRuntimeLibrary(fullPath); + if(this->LinkWithRuntimePath) + { + this->OrderLinkerSearchPath->AddRuntimeLibrary(fullPath); + } +} + +//---------------------------------------------------------------------------- +void cmComputeLinkInformation::GetRPath(std::vector& runtimeDirs, + bool for_install) +{ + // Select whether to generate runtime search directories. + bool outputRuntime = + !this->Makefile->IsOn("CMAKE_SKIP_RPATH") && !this->RuntimeFlag.empty(); + + // Select whether to generate an rpath for the install tree or the + // build tree. + bool linking_for_install = + (for_install || + this->Target->GetPropertyAsBool("BUILD_WITH_INSTALL_RPATH")); + bool use_install_rpath = + (outputRuntime && this->Target->HaveInstallTreeRPATH() && + linking_for_install); + bool use_build_rpath = + (outputRuntime && this->Target->HaveBuildTreeRPATH() && + !linking_for_install); + bool use_link_rpath = + outputRuntime && linking_for_install && + this->Target->GetPropertyAsBool("INSTALL_RPATH_USE_LINK_PATH"); + + // Construct the RPATH. + if(use_install_rpath) + { + const char* install_rpath = this->Target->GetProperty("INSTALL_RPATH"); + cmSystemTools::ExpandListArgument(install_rpath, runtimeDirs); + } + if(use_build_rpath || use_link_rpath) + { + std::vector const& rdirs = this->GetRuntimeSearchPath(); + for(std::vector::const_iterator ri = rdirs.begin(); + ri != rdirs.end(); ++ri) + { + // Put this directory in the rpath if using build-tree rpath + // support or if using the link path as an rpath. + if(use_build_rpath) + { + runtimeDirs.push_back(*ri); + } + else if(use_link_rpath) + { + // Do not add any path inside the source or build tree. + const char* topSourceDir = this->Makefile->GetHomeDirectory(); + const char* topBinaryDir = this->Makefile->GetHomeOutputDirectory(); + if(!cmSystemTools::ComparePath(ri->c_str(), topSourceDir) && + !cmSystemTools::ComparePath(ri->c_str(), topBinaryDir) && + !cmSystemTools::IsSubDirectory(ri->c_str(), topSourceDir) && + !cmSystemTools::IsSubDirectory(ri->c_str(), topBinaryDir)) + { + runtimeDirs.push_back(*ri); + } + } + } + } + + // Add runtime paths required by the platform to always be + // present. This is done even when skipping rpath support. + cmSystemTools::ExpandListArgument(this->RuntimeAlways.c_str(), runtimeDirs); +} + +//---------------------------------------------------------------------------- +std::string cmComputeLinkInformation::GetRPathString(bool for_install) +{ + // Get the directories to use. + std::vector runtimeDirs; + this->GetRPath(runtimeDirs, for_install); + + // Concatenate the paths. + std::string rpath; + const char* sep = ""; + for(std::vector::const_iterator ri = runtimeDirs.begin(); + ri != runtimeDirs.end(); ++ri) + { + // Separate from previous path. + rpath += sep; + sep = this->GetRuntimeSep().c_str(); + + // Add this path. + rpath += *ri; + } + + // If the rpath will be replaced at install time make sure it is + // long enough now. + if(!for_install && this->RuntimeUseChrpath) + { + std::string::size_type minLength = this->GetChrpathString().length(); + while(rpath.length() < minLength) + { + rpath += this->GetRuntimeSep(); + } + } + + return rpath; +} + +//---------------------------------------------------------------------------- +std::string cmComputeLinkInformation::GetChrpathString() +{ + if(!this->RuntimeUseChrpath) + { + return ""; + } + + return this->GetRPathString(true); +} diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h new file mode 100644 index 000000000..853f36932 --- /dev/null +++ b/Source/cmComputeLinkInformation.h @@ -0,0 +1,176 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeLinkInformation.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.15.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmComputeLinkInformation_h +#define cmComputeLinkInformation_h + +#include "cmStandardIncludes.h" + +#include + +class cmake; +class cmGlobalGenerator; +class cmLocalGenerator; +class cmMakefile; +class cmTarget; +class cmOrderDirectories; + +/** \class cmComputeLinkInformation + * \brief Compute link information for a target in one configuration. + */ +class cmComputeLinkInformation +{ +public: + cmComputeLinkInformation(cmTarget* target, const char* config); + ~cmComputeLinkInformation(); + bool Compute(); + + struct Item + { + Item(): Value(), IsPath(true) {} + Item(Item const& item): Value(item.Value), IsPath(item.IsPath) {} + Item(std::string const& v, bool p): Value(v), IsPath(p) {} + std::string Value; + bool IsPath; + }; + typedef std::vector ItemVector; + ItemVector const& GetItems(); + std::vector const& GetDirectories(); + std::vector const& GetDepends(); + std::vector const& GetFrameworkPaths(); + const char* GetLinkLanguage() const { return this->LinkLanguage; } + std::vector const& GetRuntimeSearchPath(); + std::string const& GetRuntimeFlag() const { return this->RuntimeFlag; } + std::string const& GetRuntimeSep() const { return this->RuntimeSep; } + void GetRPath(std::vector& runtimeDirs, bool for_install); + std::string GetRPathString(bool for_install); + std::string GetChrpathString(); + std::set const& GetSharedLibrariesLinked(); + + std::string const& GetRPathLinkFlag() const { return this->RPathLinkFlag; } + std::string GetRPathLinkString(); +private: + void AddItem(std::string const& item, cmTarget* tgt); + void AddSharedDepItem(std::string const& item, cmTarget* tgt); + + // Output information. + ItemVector Items; + std::vector Directories; + std::vector Depends; + std::vector FrameworkPaths; + std::vector RuntimeSearchPath; + std::set SharedLibrariesLinked; + + // Context information. + cmTarget* Target; + cmMakefile* Makefile; + cmLocalGenerator* LocalGenerator; + cmGlobalGenerator* GlobalGenerator; + cmake* CMakeInstance; + + // Configuration information. + const char* Config; + const char* LinkLanguage; + + // Modes for dealing with dependent shared libraries. + enum SharedDepMode + { + SharedDepModeNone, // Drop + SharedDepModeDir, // List dir in -rpath-link flag + SharedDepModeLibDir, // List dir in linker search path + SharedDepModeLink // List file on link line + }; + + // System info. + bool UseImportLibrary; + const char* LoaderFlag; + std::string LibLinkFlag; + std::string LibLinkFileFlag; + std::string LibLinkSuffix; + std::string RuntimeFlag; + std::string RuntimeSep; + std::string RuntimeAlways; + bool RuntimeUseChrpath; + bool NoSONameUsesPath; + bool LinkWithRuntimePath; + std::string RPathLinkFlag; + SharedDepMode SharedDependencyMode; + + // Link type adjustment. + void ComputeLinkTypeInfo(); + enum LinkType { LinkUnknown, LinkStatic, LinkShared }; + LinkType StartLinkType; + LinkType CurrentLinkType; + std::string StaticLinkTypeFlag; + std::string SharedLinkTypeFlag; + bool LinkTypeEnabled; + void SetCurrentLinkType(LinkType lt); + bool ArchivesMayBeShared; + + // Link item parsing. + void ComputeItemParserInfo(); + std::vector StaticLinkExtensions; + std::vector SharedLinkExtensions; + std::vector LinkExtensions; + std::set LinkPrefixes; + cmsys::RegularExpression ExtractStaticLibraryName; + cmsys::RegularExpression ExtractSharedLibraryName; + cmsys::RegularExpression ExtractAnyLibraryName; + std::string SharedRegexString; + void AddLinkPrefix(const char* p); + void AddLinkExtension(const char* e, LinkType type); + std::string CreateExtensionRegex(std::vector const& exts); + std::string NoCaseExpression(const char* str); + + // Handling of link items. + void AddTargetItem(std::string const& item, cmTarget* target); + void AddFullItem(std::string const& item); + bool CheckImplicitDirItem(std::string const& item); + void AddUserItem(std::string const& item); + void AddDirectoryItem(std::string const& item); + void AddFrameworkItem(std::string const& item); + void DropDirectoryItem(std::string const& item); + bool CheckSharedLibNoSOName(std::string const& item); + void AddSharedLibNoSOName(std::string const& item); + + // Framework info. + void ComputeFrameworkInfo(); + void AddFrameworkPath(std::string const& p); + std::set FrameworkPathsEmmitted; + cmsys::RegularExpression SplitFramework; + + // Linker search path computation. + cmOrderDirectories* OrderLinkerSearchPath; + bool FinishLinkerSearchDirectories(); + void PrintLinkPolicyDiagnosis(std::ostream&); + std::set ImplicitLinkDirs; + + // Linker search path compatibility mode. + std::set OldLinkDirMask; + std::vector OldLinkDirItems; + std::vector OldUserFlagItems; + bool OldLinkDirMode; + + // Runtime path computation. + cmOrderDirectories* OrderRuntimeSearchPath; + void AddLibraryRuntimeInfo(std::string const& fullPath, cmTarget* target); + void AddLibraryRuntimeInfo(std::string const& fullPath); + + // Dependent library path computation. + cmOrderDirectories* OrderDependentRPath; +}; + +#endif diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx new file mode 100644 index 000000000..5ec9ce31a --- /dev/null +++ b/Source/cmComputeTargetDepends.cxx @@ -0,0 +1,431 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeTargetDepends.cxx,v $ + Language: C++ + Date: $Date: 2008-02-07 21:14:05 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmComputeTargetDepends.h" + +#include "cmComputeComponentGraph.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +#include + +#include + +/* + +This class is meant to analyze inter-target dependencies globally +during the generation step. The goal is to produce a set of direct +dependencies for each target such that no cycles are left and the +build order is safe. + +For most target types cyclic dependencies are not allowed. However +STATIC libraries may depend on each other in a cyclic fasion. In +general the directed dependency graph forms a directed-acyclic-graph +of strongly connected components. All strongly connected components +should consist of only STATIC_LIBRARY targets. + +In order to safely break dependency cycles we must preserve all other +dependencies passing through the corresponding strongly connected component. +The approach taken by this class is as follows: + + - Collect all targets and form the original dependency graph + - Run Tarjan's algorithm to extract the strongly connected components + (error if any member of a non-trivial component is not STATIC) + - The original dependencies imply a DAG on the components. + Use the implied DAG to construct a final safe set of dependencies. + +The final dependency set is constructed as follows: + + - For each connected component targets are placed in an arbitrary + order. Each target depends on the target following it in the order. + The first target is designated the head and the last target the tail. + (most components will be just 1 target anyway) + + - Original dependencies between targets in different components are + converted to connect the depender's component tail to the + dependee's component head. + +In most cases this will reproduce the original dependencies. However +when there are cycles of static libraries they will be broken in a +safe manner. + +For example, consider targets A0, A1, A2, B0, B1, B2, and C with these +dependencies: + + A0 -> A1 -> A2 -> A0 , B0 -> B1 -> B2 -> B0 -> A0 , C -> B0 + +Components may be identified as + + Component 0: A0, A1, A2 + Component 1: B0, B1, B2 + Component 2: C + +Intra-component dependencies are: + + 0: A0 -> A1 -> A2 , head=A0, tail=A2 + 1: B0 -> B1 -> B2 , head=B0, tail=B2 + 2: head=C, tail=C + +The inter-component dependencies are converted as: + + B0 -> A0 is component 1->0 and becomes B2 -> A0 + C -> B0 is component 2->1 and becomes C -> B0 + +This leads to the final target dependencies: + + C -> B0 -> B1 -> B2 -> A0 -> A1 -> A2 + +These produce a safe build order since C depends directly or +transitively on all the static libraries it links. + +*/ + +//---------------------------------------------------------------------------- +cmComputeTargetDepends::cmComputeTargetDepends(cmGlobalGenerator* gg) +{ + this->GlobalGenerator = gg; + cmake* cm = this->GlobalGenerator->GetCMakeInstance(); + this->DebugMode = cm->GetPropertyAsBool("GLOBAL_DEPENDS_DEBUG_MODE"); +} + +//---------------------------------------------------------------------------- +cmComputeTargetDepends::~cmComputeTargetDepends() +{ +} + +//---------------------------------------------------------------------------- +bool cmComputeTargetDepends::Compute() +{ + // Build the original graph. + this->CollectTargets(); + this->CollectDepends(); + if(this->DebugMode) + { + this->DisplayGraph(this->InitialGraph, "initial"); + } + + // Identify components. + cmComputeComponentGraph ccg(this->InitialGraph); + if(this->DebugMode) + { + this->DisplayComponents(ccg); + } + if(!this->CheckComponents(ccg)) + { + return false; + } + + // Compute the final dependency graph. + this->ComputeFinalDepends(ccg); + if(this->DebugMode) + { + this->DisplayGraph(this->FinalGraph, "final"); + } + + return true; +} + +//---------------------------------------------------------------------------- +void +cmComputeTargetDepends::GetTargetDirectDepends(cmTarget* t, + std::set& deps) +{ + // Lookup the index for this target. All targets should be known by + // this point. + std::map::const_iterator tii = this->TargetIndex.find(t); + assert(tii != this->TargetIndex.end()); + int i = tii->second; + + // Get its final dependencies. + NodeList const& nl = this->FinalGraph[i]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + deps.insert(this->Targets[*ni]); + } +} + +//---------------------------------------------------------------------------- +void cmComputeTargetDepends::CollectTargets() +{ + // Collect all targets from all generators. + std::vector const& lgens = + this->GlobalGenerator->GetLocalGenerators(); + for(unsigned int i = 0; i < lgens.size(); ++i) + { + cmTargets& targets = lgens[i]->GetMakefile()->GetTargets(); + for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) + { + cmTarget* target = &ti->second; + int index = static_cast(this->Targets.size()); + this->TargetIndex[target] = index; + this->Targets.push_back(target); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeTargetDepends::CollectDepends() +{ + // Allocate the dependency graph adjacency lists. + this->InitialGraph.resize(this->Targets.size()); + + // Compute each dependency list. + for(unsigned int i=0; i < this->Targets.size(); ++i) + { + this->CollectTargetDepends(i); + } +} + +//---------------------------------------------------------------------------- +void cmComputeTargetDepends::CollectTargetDepends(int depender_index) +{ + // Get the depender. + cmTarget* depender = this->Targets[depender_index]; + + // Keep track of dependencies already listed. + std::set emitted; + + // A target should not depend on itself. + emitted.insert(depender->GetName()); + + // Loop over all targets linked directly. + cmTarget::LinkLibraryVectorType const& tlibs = + depender->GetOriginalLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); + lib != tlibs.end(); ++lib) + { + // Don't emit the same library twice for this target. + if(emitted.insert(lib->first).second) + { + this->AddTargetDepend(depender_index, lib->first.c_str()); + } + } + + // Loop over all utility dependencies. + std::set const& tutils = depender->GetUtilities(); + for(std::set::const_iterator util = tutils.begin(); + util != tutils.end(); ++util) + { + // Don't emit the same utility twice for this target. + if(emitted.insert(*util).second) + { + this->AddTargetDepend(depender_index, util->c_str()); + } + } +} + +//---------------------------------------------------------------------------- +void cmComputeTargetDepends::AddTargetDepend(int depender_index, + const char* dependee_name) +{ + // Get the depender. + cmTarget* depender = this->Targets[depender_index]; + + // Check the target's makefile first. + cmTarget* dependee = + depender->GetMakefile()->FindTarget(dependee_name); + + // Then search globally. + if(!dependee) + { + dependee = this->GlobalGenerator->FindTarget(0, dependee_name); + } + + // If not found then skip then the dependee. + if(!dependee) + { + return; + } + + // No imported targets should have been found. + assert(!dependee->IsImported()); + + // Lookup the index for this target. All targets should be known by + // this point. + std::map::const_iterator tii = + this->TargetIndex.find(dependee); + assert(tii != this->TargetIndex.end()); + int dependee_index = tii->second; + + // Add this entry to the dependency graph. + this->InitialGraph[depender_index].push_back(dependee_index); +} + +//---------------------------------------------------------------------------- +void +cmComputeTargetDepends::DisplayGraph(Graph const& graph, const char* name) +{ + fprintf(stderr, "The %s target dependency graph is:\n", name); + int n = static_cast(graph.size()); + for(int depender_index = 0; depender_index < n; ++depender_index) + { + NodeList const& nl = graph[depender_index]; + cmTarget* depender = this->Targets[depender_index]; + fprintf(stderr, "target %d is [%s]\n", + depender_index, depender->GetName()); + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int dependee_index = *ni; + cmTarget* dependee = this->Targets[dependee_index]; + fprintf(stderr, " depends on target %d [%s]\n", dependee_index, + dependee->GetName()); + } + } + fprintf(stderr, "\n"); +} + +//---------------------------------------------------------------------------- +void +cmComputeTargetDepends +::DisplayComponents(cmComputeComponentGraph const& ccg) +{ + fprintf(stderr, "The strongly connected components are:\n"); + std::vector const& components = ccg.GetComponents(); + int n = static_cast(components.size()); + for(int c = 0; c < n; ++c) + { + NodeList const& nl = components[c]; + fprintf(stderr, "Component (%d):\n", c); + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int i = *ni; + fprintf(stderr, " contains target %d [%s]\n", + i, this->Targets[i]->GetName()); + } + } + fprintf(stderr, "\n"); +} + +//---------------------------------------------------------------------------- +bool +cmComputeTargetDepends +::CheckComponents(cmComputeComponentGraph const& ccg) +{ + // All non-trivial components should consist only of static + // libraries. + std::vector const& components = ccg.GetComponents(); + int nc = static_cast(components.size()); + for(int c=0; c < nc; ++c) + { + // Get the current component. + NodeList const& nl = components[c]; + + // Skip trivial components. + if(nl.size() < 2) + { + continue; + } + + // Make sure the component is all STATIC_LIBRARY targets. + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + if(this->Targets[*ni]->GetType() != cmTarget::STATIC_LIBRARY) + { + this->ComplainAboutBadComponent(ccg, c); + return false; + } + } + } + return true; +} + +//---------------------------------------------------------------------------- +void +cmComputeTargetDepends +::ComplainAboutBadComponent(cmComputeComponentGraph const& ccg, int c) +{ + // Construct the error message. + cmOStringStream e; + e << "The inter-target dependency graph contains the following " + << "strongly connected component (cycle):\n"; + std::vector const& components = ccg.GetComponents(); + std::vector const& cmap = ccg.GetComponentMap(); + NodeList const& cl = components[c]; + for(NodeList::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) + { + // Get the depender. + int i = *ci; + cmTarget* depender = this->Targets[i]; + + // Describe the depender. + e << " " << depender->GetName() << " of type " + << cmTarget::TargetTypeNames[depender->GetType()] << "\n"; + + // List its dependencies that are inside the component. + NodeList const& nl = this->InitialGraph[i]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int j = *ni; + if(cmap[j] == c) + { + cmTarget* dependee = this->Targets[j]; + e << " depends on " << dependee->GetName() << "\n"; + } + } + } + e << "At least one of these targets is not a STATIC_LIBRARY. " + << "Cyclic dependencies are allowed only among static libraries."; + cmSystemTools::Error(e.str().c_str()); +} + +//---------------------------------------------------------------------------- +void +cmComputeTargetDepends +::ComputeFinalDepends(cmComputeComponentGraph const& ccg) +{ + // Get the component graph information. + std::vector const& components = ccg.GetComponents(); + Graph const& cgraph = ccg.GetComponentGraph(); + + // Allocate the final graph. + this->FinalGraph.resize(0); + this->FinalGraph.resize(this->InitialGraph.size()); + + // Convert inter-component edges to connect component tails to heads. + int n = static_cast(cgraph.size()); + for(int depender_component=0; depender_component < n; ++depender_component) + { + int depender_component_tail = components[depender_component].back(); + NodeList const& nl = cgraph[depender_component]; + for(NodeList::const_iterator ni = nl.begin(); ni != nl.end(); ++ni) + { + int dependee_component = *ni; + int dependee_component_head = components[dependee_component].front(); + this->FinalGraph[depender_component_tail] + .push_back(dependee_component_head); + } + } + + // Compute intra-component edges. + int nc = static_cast(components.size()); + for(int c=0; c < nc; ++c) + { + // Within the component each target depends on that following it. + NodeList const& nl = components[c]; + NodeList::const_iterator ni = nl.begin(); + int last_i = *ni; + for(++ni; ni != nl.end(); ++ni) + { + int i = *ni; + this->FinalGraph[last_i].push_back(i); + last_i = i; + } + } +} diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h new file mode 100644 index 000000000..24bce0928 --- /dev/null +++ b/Source/cmComputeTargetDepends.h @@ -0,0 +1,76 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmComputeTargetDepends.h,v $ + Language: C++ + Date: $Date: 2008-02-07 21:14:05 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmComputeTargetDepends_h +#define cmComputeTargetDepends_h + +#include "cmStandardIncludes.h" + +#include "cmGraphAdjacencyList.h" + +#include + +class cmComputeComponentGraph; +class cmGlobalGenerator; +class cmTarget; + +/** \class cmComputeTargetDepends + * \brief Compute global interdependencies among targets. + * + * Static libraries may form cycles in the target dependency graph. + * This class evaluates target dependencies globally and adjusts them + * to remove cycles while preserving a safe build order. + */ +class cmComputeTargetDepends +{ +public: + cmComputeTargetDepends(cmGlobalGenerator* gg); + ~cmComputeTargetDepends(); + + bool Compute(); + + std::vector const& GetTargets() const { return this->Targets; } + void GetTargetDirectDepends(cmTarget* t, std::set& deps); +private: + void CollectTargets(); + void CollectDepends(); + void CollectTargetDepends(int depender_index); + void AddTargetDepend(int depender_index, const char* dependee_name); + void ComputeFinalDepends(cmComputeComponentGraph const& ccg); + + cmGlobalGenerator* GlobalGenerator; + bool DebugMode; + + // Collect all targets. + std::vector Targets; + std::map TargetIndex; + + // Represent the target dependency graph. The entry at each + // top-level index corresponds to a depender whose dependencies are + // listed. + typedef cmGraphNodeList NodeList; + typedef cmGraphAdjacencyList Graph; + Graph InitialGraph; + Graph FinalGraph; + void DisplayGraph(Graph const& graph, const char* name); + + // Deal with connected components. + void DisplayComponents(cmComputeComponentGraph const& ccg); + bool CheckComponents(cmComputeComponentGraph const& ccg); + void ComplainAboutBadComponent(cmComputeComponentGraph const& ccg, int c); +}; + +#endif diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in new file mode 100644 index 000000000..0a0df01c6 --- /dev/null +++ b/Source/cmConfigure.cmake.h.in @@ -0,0 +1,32 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmConfigure.cmake.h.in,v $ + Language: C++ + Date: $Date: 2008-02-27 21:26:35 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#cmakedefine CMAKE_NO_STD_NAMESPACE +#cmakedefine CMAKE_NO_ANSI_STREAM_HEADERS +#cmakedefine CMAKE_NO_ANSI_STRING_STREAM +#cmakedefine CMAKE_NO_ANSI_FOR_SCOPE +#cmakedefine HAVE_ENVIRON_NOT_REQUIRE_PROTOTYPE +#cmakedefine HAVE_UNSETENV +#cmakedefine CMAKE_USE_ELF_PARSER +#cmakedefine CMAKE_STRICT +#define CMAKE_ROOT_DIR "${CMake_SOURCE_DIR}" +#define CMAKE_BUILD_DIR "${CMake_BINARY_DIR}" + +#define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@ +#define CMake_VERSION_MINOR @CMake_VERSION_MINOR@ +#define CMake_VERSION_PATCH @CMake_VERSION_PATCH@ +#cmakedefine CMake_VERSION_RC @CMake_VERSION_RC@ +#define CMAKE_DATA_DIR "@CMAKE_DATA_DIR@" diff --git a/Source/cmConfigureFileCommand.cxx b/Source/cmConfigureFileCommand.cxx new file mode 100644 index 000000000..3c93af9d0 --- /dev/null +++ b/Source/cmConfigureFileCommand.cxx @@ -0,0 +1,106 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmConfigureFileCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 20:30:33 $ + Version: $Revision: 1.34 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmConfigureFileCommand.h" + +#include + +// cmConfigureFileCommand +bool cmConfigureFileCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments, expected 2"); + return false; + } + this->InputFile = args[0]; + this->OuputFile = args[1]; + if ( !this->Makefile->CanIWriteThisFile(this->OuputFile.c_str()) ) + { + std::string e = "attempted to configure a file: " + this->OuputFile + + " into a source directory."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + this->CopyOnly = false; + this->EscapeQuotes = false; + + // for CMake 2.0 and earlier CONFIGURE_FILE defaults to the FinalPass, + // after 2.0 it only does InitialPass + this->Immediate = !this->Makefile->NeedBackwardsCompatibility(2,0); + + this->AtOnly = false; + for(unsigned int i=2;i < args.size();++i) + { + if(args[i] == "COPYONLY") + { + this->CopyOnly = true; + } + else if(args[i] == "ESCAPE_QUOTES") + { + this->EscapeQuotes = true; + } + else if(args[i] == "@ONLY") + { + this->AtOnly = true; + } + else if(args[i] == "IMMEDIATE") + { + this->Immediate = true; + } + } + + // If we were told to copy the file immediately, then do it on the + // first pass (now). + if(this->Immediate) + { + if ( !this->ConfigureFile() ) + { + this->SetError("Problem configuring file"); + return false; + } + } + + return true; +} + +void cmConfigureFileCommand::FinalPass() +{ + if(!this->Immediate) + { + this->ConfigureFile(); + } +} + +int cmConfigureFileCommand::ConfigureFile() +{ + std::string inFile = this->InputFile; + if (!cmSystemTools::FileIsFullPath(inFile.c_str())) + { + inFile = this->Makefile->GetStartDirectory(); + inFile += "/"; + inFile += this->InputFile; + } + return this->Makefile->ConfigureFile(inFile.c_str(), + this->OuputFile.c_str(), + this->CopyOnly, + this->AtOnly, + this->EscapeQuotes); +} + + diff --git a/Source/cmConfigureFileCommand.h b/Source/cmConfigureFileCommand.h new file mode 100644 index 000000000..e2ce55c67 --- /dev/null +++ b/Source/cmConfigureFileCommand.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmConfigureFileCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.22 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmConfigureFileCommand_h +#define cmConfigureFileCommand_h + +#include "cmCommand.h" + +class cmConfigureFileCommand : public cmCommand +{ +public: + cmTypeMacro(cmConfigureFileCommand, cmCommand); + + virtual cmCommand* Clone() + { + return new cmConfigureFileCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "configure_file";} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Copy a file to another location and modify its contents."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " configure_file(InputFile OutputFile\n" + " [COPYONLY] [ESCAPE_QUOTES] [@ONLY])\n" + "The Input and Output files have to have full paths. " + "This command replaces any variables in the input file referenced as " + "${VAR} or @VAR@ with their values as determined by CMake. If a " + "variable is not defined, it will be replaced with nothing. " + "If COPYONLY is specified, then no variable expansion will take " + "place. If ESCAPE_QUOTES is specified then any substituted quotes " + "will be C-style escaped. " + "The file will be configured with the current values of CMake " + "variables. If @ONLY is specified, only variables " + "of the form @VAR@ will be replaces and ${VAR} will be ignored. " + "This is useful for configuring scripts that use ${VAR}. " + "Any occurrences of #cmakedefine VAR will be replaced with " + "either #define VAR or /* #undef VAR */ depending on " + "the setting of VAR in CMake"; + } + + virtual void FinalPass(); +private: + int ConfigureFile(); + + std::string InputFile; + std::string OuputFile; + bool CopyOnly; + bool EscapeQuotes; + bool Immediate; + bool AtOnly; +}; + + + +#endif diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx new file mode 100644 index 000000000..2342fe000 --- /dev/null +++ b/Source/cmCoreTryCompile.cxx @@ -0,0 +1,445 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCoreTryCompile.cxx,v $ + Language: C++ + Date: $Date: 2008-03-26 18:08:25 $ + Version: $Revision: 1.7.2.2 $ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCoreTryCompile.h" +#include "cmake.h" +#include "cmCacheManager.h" +#include "cmGlobalGenerator.h" +#include + +int cmCoreTryCompile::TryCompileCode(std::vector const& argv) +{ + + this->BinaryDirectory = argv[1].c_str(); + this->OutputFile = ""; + // which signature were we called with ? + this->SrcFileSignature = false; + unsigned int i; + + const char* sourceDirectory = argv[2].c_str(); + const char* projectName = 0; + const char* targetName = 0; + int extraArgs = 0; + + // look for CMAKE_FLAGS and store them + std::vector cmakeFlags; + for (i = 3; i < argv.size(); ++i) + { + if (argv[i] == "CMAKE_FLAGS") + { + // CMAKE_FLAGS is the first argument because we need an argv[0] that + // is not used, so it matches regular command line parsing which has + // the program name as arg 0 + for (; i < argv.size() && argv[i] != "COMPILE_DEFINITIONS" && + argv[i] != "OUTPUT_VARIABLE"; + ++i) + { + extraArgs++; + cmakeFlags.push_back(argv[i]); + } + break; + } + } + + // look for OUTPUT_VARIABLE and store them + std::string outputVariable; + for (i = 3; i < argv.size(); ++i) + { + if (argv[i] == "OUTPUT_VARIABLE") + { + if ( argv.size() <= (i+1) ) + { + cmSystemTools::Error( + "OUTPUT_VARIABLE specified but there is no variable"); + return -1; + } + extraArgs += 2; + outputVariable = argv[i+1]; + break; + } + } + + // look for COMPILE_DEFINITIONS and store them + std::vector compileFlags; + for (i = 3; i < argv.size(); ++i) + { + if (argv[i] == "COMPILE_DEFINITIONS") + { + extraArgs++; + for (i = i + 1; i < argv.size() && argv[i] != "CMAKE_FLAGS" && + argv[i] != "OUTPUT_VARIABLE"; + ++i) + { + extraArgs++; + compileFlags.push_back(argv[i]); + } + break; + } + } + + // look for COPY_FILE + std::string copyFile; + for (i = 3; i < argv.size(); ++i) + { + if (argv[i] == "COPY_FILE") + { + if ( argv.size() <= (i+1) ) + { + cmSystemTools::Error( + "COPY_FILE specified but there is no variable"); + return -1; + } + extraArgs += 2; + copyFile = argv[i+1]; + break; + } + } + + // do we have a srcfile signature + if (argv.size() - extraArgs == 3) + { + this->SrcFileSignature = true; + } + + // compute the binary dir when TRY_COMPILE is called with a src file + // signature + if (this->SrcFileSignature) + { + this->BinaryDirectory += cmake::GetCMakeFilesDirectory(); + this->BinaryDirectory += "/CMakeTmp"; + } + else + { + // only valid for srcfile signatures + if (compileFlags.size()) + { + cmSystemTools::Error( + "COMPILE_FLAGS specified on a srcdir type TRY_COMPILE"); + return -1; + } + if (copyFile.size()) + { + cmSystemTools::Error("COPY_FILE specified on a srcdir type TRY_COMPILE"); + return -1; + } + } + // make sure the binary directory exists + cmSystemTools::MakeDirectory(this->BinaryDirectory.c_str()); + + // do not allow recursive try Compiles + if (this->BinaryDirectory == this->Makefile->GetHomeOutputDirectory()) + { + cmSystemTools::Error( + "Attempt at a recursive or nested TRY_COMPILE in directory ", + this->BinaryDirectory.c_str()); + return -1; + } + + std::string outFileName = this->BinaryDirectory + "/CMakeLists.txt"; + // which signature are we using? If we are using var srcfile bindir + if (this->SrcFileSignature) + { + // remove any CMakeCache.txt files so we will have a clean test + std::string ccFile = this->BinaryDirectory + "/CMakeCache.txt"; + cmSystemTools::RemoveFile(ccFile.c_str()); + + // we need to create a directory and CMakeList file etc... + // first create the directories + sourceDirectory = this->BinaryDirectory.c_str(); + + // now create a CMakeList.txt file in that directory + FILE *fout = fopen(outFileName.c_str(),"w"); + if (!fout) + { + cmSystemTools::Error("Failed to create CMakeList file for ", + outFileName.c_str()); + cmSystemTools::ReportLastSystemError(""); + return -1; + } + + std::string source = argv[2]; + std::string ext = cmSystemTools::GetFilenameExtension(source); + const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator() + ->GetLanguageFromExtension(ext.c_str())); + const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH"); + fprintf(fout, "cmake_minimum_required(VERSION %u.%u)\n", + cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion()); + if(def) + { + fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def); + } + if(lang) + { + fprintf(fout, "PROJECT(CMAKE_TRY_COMPILE %s)\n", lang); + } + else + { + cmOStringStream err; + err << "Unknown extension \"" << ext << "\" for file \"" + << source << "\". TRY_COMPILE only works for enabled languages.\n" + << "Currently enabled languages are:"; + std::vector langs; + this->Makefile->GetCMakeInstance()->GetGlobalGenerator()-> + GetEnabledLanguages(langs); + for(std::vector::iterator l = langs.begin(); + l != langs.end(); ++l) + { + err << " " << *l; + } + err << "\nSee PROJECT command for help enabling other languages."; + cmSystemTools::Error(err.str().c_str()); + fclose(fout); + return -1; + } + std::string langFlags = "CMAKE_"; + langFlags += lang; + langFlags += "_FLAGS"; + fprintf(fout, "SET(CMAKE_VERBOSE_MAKEFILE 1)\n"); + fprintf(fout, "SET(CMAKE_%s_FLAGS \"", lang); + const char* flags = this->Makefile->GetDefinition(langFlags.c_str()); + if(flags) + { + fprintf(fout, " %s ", flags); + } + fprintf(fout, " ${COMPILE_DEFINITIONS}\")\n"); + fprintf(fout, "INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES})\n"); + fprintf(fout, "SET(CMAKE_SUPPRESS_REGENERATION 1)\n"); + fprintf(fout, "LINK_DIRECTORIES(${LINK_DIRECTORIES})\n"); + // handle any compile flags we need to pass on + if (compileFlags.size()) + { + fprintf(fout, "ADD_DEFINITIONS( "); + for (i = 0; i < compileFlags.size(); ++i) + { + fprintf(fout,"%s ",compileFlags[i].c_str()); + } + fprintf(fout, ")\n"); + } + + /* for the TRY_COMPILEs we want to be able to specify the architecture. + So the user can set CMAKE_OSX_ARCHITECTURE to i386;ppc and then set + CMAKE_TRY_COMPILE_OSX_ARCHITECTURE first to i386 and then to ppc to + have the tests run for each specific architecture. Since + cmLocalGenerator doesn't allow building for "the other" + architecture only via CMAKE_OSX_ARCHITECTURES,use to CMAKE_DO_TRY_COMPILE + to enforce it for this case here. + */ + cmakeFlags.push_back("-DCMAKE_DO_TRY_COMPILE=TRUE"); + if(this->Makefile->GetDefinition("CMAKE_TRY_COMPILE_OSX_ARCHITECTURES")!=0) + { + std::string flag="-DCMAKE_OSX_ARCHITECTURES="; + flag += this->Makefile->GetSafeDefinition( + "CMAKE_TRY_COMPILE_OSX_ARCHITECTURES"); + cmakeFlags.push_back(flag); + } + else if (this->Makefile->GetDefinition("CMAKE_OSX_ARCHITECTURES")!=0) + { + std::string flag="-DCMAKE_OSX_ARCHITECTURES="; + flag += this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES"); + cmakeFlags.push_back(flag); + } + + fprintf(fout, "ADD_EXECUTABLE(cmTryCompileExec \"%s\")\n",source.c_str()); + fprintf(fout, + "TARGET_LINK_LIBRARIES(cmTryCompileExec ${LINK_LIBRARIES})\n"); + fclose(fout); + projectName = "CMAKE_TRY_COMPILE"; + targetName = "cmTryCompileExec"; + // if the source is not in CMakeTmp + if(source.find("CMakeTmp") == source.npos) + { + this->Makefile->AddCMakeDependFile(source.c_str()); + } + + } + // else the srcdir bindir project target signature + else + { + projectName = argv[3].c_str(); + + if (argv.size() - extraArgs == 5) + { + targetName = argv[4].c_str(); + } + } + + bool erroroc = cmSystemTools::GetErrorOccuredFlag(); + cmSystemTools::ResetErrorOccuredFlag(); + std::string output; + // actually do the try compile now that everything is setup + int res = this->Makefile->TryCompile(sourceDirectory, + this->BinaryDirectory.c_str(), + projectName, + targetName, + &cmakeFlags, + &output); + if ( erroroc ) + { + cmSystemTools::SetErrorOccured(); + } + + // set the result var to the return value to indicate success or failure + this->Makefile->AddCacheDefinition(argv[0].c_str(), + (res == 0 ? "TRUE" : "FALSE"), + "Result of TRY_COMPILE", + cmCacheManager::INTERNAL); + + if ( outputVariable.size() > 0 ) + { + this->Makefile->AddDefinition(outputVariable.c_str(), output.c_str()); + } + + if (this->SrcFileSignature) + { + this->FindOutputFile(targetName); + if ((res==0) && (copyFile.size())) + { + if(!cmSystemTools::CopyFileAlways(this->OutputFile.c_str(), + copyFile.c_str())) + { + cmSystemTools::Error("Could not COPY_FILE"); + return -1; + } + } + } + return res; +} + +void cmCoreTryCompile::CleanupFiles(const char* binDir) +{ + if ( !binDir ) + { + return; + } + + std::string bdir = binDir; + if(bdir.find("CMakeTmp") == std::string::npos) + { + cmSystemTools::Error( + "TRY_COMPILE attempt to remove -rf directory that does not contain " + "CMakeTmp:", binDir); + return; + } + + cmsys::Directory dir; + dir.Load(binDir); + size_t fileNum; + std::set deletedFiles; + for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum) + { + if (strcmp(dir.GetFile(static_cast(fileNum)),".") && + strcmp(dir.GetFile(static_cast(fileNum)),"..")) + { + + if(deletedFiles.find( dir.GetFile(static_cast(fileNum))) + == deletedFiles.end()) + { + deletedFiles.insert(dir.GetFile(static_cast(fileNum))); + std::string fullPath = binDir; + fullPath += "/"; + fullPath += dir.GetFile(static_cast(fileNum)); + if(cmSystemTools::FileIsDirectory(fullPath.c_str())) + { + this->CleanupFiles(fullPath.c_str()); + } + else + { + if(!cmSystemTools::RemoveFile(fullPath.c_str())) + { + bool removed = false; + int numAttempts = 0; + // sometimes anti-virus software hangs on to + // new files and we can not delete them, so try + // 5 times with .5 second delay between tries. + while(!removed && numAttempts < 5) + { + cmSystemTools::Delay(500); + if(cmSystemTools::RemoveFile(fullPath.c_str())) + { + removed = true; + } + numAttempts++; + } + if(!removed) + { + std::string m = "Remove failed on file: "; + m += fullPath; + cmSystemTools::ReportLastSystemError(m.c_str()); + } + } + } + } + } + } +} + +void cmCoreTryCompile::FindOutputFile(const char* targetName) +{ + this->FindErrorMessage = ""; + this->OutputFile = ""; + std::string tmpOutputFile = "/"; + tmpOutputFile += targetName; + tmpOutputFile +=this->Makefile->GetSafeDefinition("CMAKE_EXECUTABLE_SUFFIX"); + + // a list of directories where to search for the compilation result + // at first directly in the binary dir + std::vector searchDirs; + searchDirs.push_back(""); + + const char* config = this->Makefile->GetDefinition( + "CMAKE_TRY_COMPILE_CONFIGURATION"); + // if a config was specified try that first + if (config && config[0]) + { + std::string tmp = "/"; + tmp += config; + searchDirs.push_back(tmp); + } + searchDirs.push_back("/Debug"); + searchDirs.push_back("/Development"); + + for(std::vector::const_iterator it = searchDirs.begin(); + it != searchDirs.end(); + ++it) + { + std::string command = this->BinaryDirectory; + command += *it; + command += tmpOutputFile; + if(cmSystemTools::FileExists(command.c_str())) + { + tmpOutputFile = cmSystemTools::CollapseFullPath(command.c_str()); + this->OutputFile = tmpOutputFile; + return; + } + } + + cmOStringStream emsg; + emsg << "Unable to find executable for " << this->GetName() << ": tried \""; + for (unsigned int i = 0; i < searchDirs.size(); ++i) + { + emsg << this->BinaryDirectory << searchDirs[i] << tmpOutputFile; + if (i < searchDirs.size() - 1) + { + emsg << "\" and \""; + } + else + { + emsg << "\"."; + } + } + this->FindErrorMessage = emsg.str(); + return; +} diff --git a/Source/cmCoreTryCompile.h b/Source/cmCoreTryCompile.h new file mode 100644 index 000000000..127182185 --- /dev/null +++ b/Source/cmCoreTryCompile.h @@ -0,0 +1,65 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCoreTryCompile.h,v $ + Language: C++ + Date: $Date: 2007-05-24 15:27:51 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCoreTryCompile_h +#define cmCoreTryCompile_h + +#include "cmCommand.h" + +/** \class cmCoreTryCompile + * \brief Base class for cmTryCompileCommand and cmTryRunCommand + * + * cmCoreTryCompile implements the functionality to build a program. + * It is the base class for cmTryCompileCommand and cmTryRunCommand. + */ +class cmCoreTryCompile : public cmCommand +{ +public: + + protected: + /** + * This is the core code for try compile. It is here so that other + * commands, such as TryRun can access the same logic without + * duplication. + */ + int TryCompileCode(std::vector const& argv); + + /** + * This deletes all the files created by TryCompileCode. + * This way we do not have to rely on the timing and + * dependencies of makefiles. + */ + void CleanupFiles(const char* binDir); + + /** + * This tries to find the (executable) file created by + TryCompileCode. The result is stored in OutputFile. If nothing is found, + the error message is stored in FindErrorMessage. + */ + void FindOutputFile(const char* targetName); + + + cmTypeMacro(cmCoreTryCompile, cmCommand); + + std::string BinaryDirectory; + std::string OutputFile; + std::string FindErrorMessage; + bool SrcFileSignature; + +}; + + +#endif diff --git a/Source/cmCreateTestSourceList.cxx b/Source/cmCreateTestSourceList.cxx new file mode 100644 index 000000000..a0ca49422 --- /dev/null +++ b/Source/cmCreateTestSourceList.cxx @@ -0,0 +1,194 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCreateTestSourceList.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.44 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCreateTestSourceList.h" +#include "cmSourceFile.h" + +// cmCreateTestSourceList +bool cmCreateTestSourceList +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size() < 3) + { + this->SetError("called with wrong number of arguments."); + return false; + } + + + std::vector::const_iterator i = args.begin(); + std::string extraInclude; + std::string function; + std::vector tests; + // extract extra include and function ot + for(; i != args.end(); i++) + { + if(*i == "EXTRA_INCLUDE") + { + ++i; + if(i == args.end()) + { + this->SetError("incorrect arguments to EXTRA_INCLUDE"); + return false; + } + extraInclude = "#include \""; + extraInclude += *i; + extraInclude += "\"\n"; + } + else if(*i == "FUNCTION") + { + ++i; + if(i == args.end()) + { + this->SetError("incorrect arguments to FUNCTION"); + return false; + } + function = *i; + function += "(&ac, &av);\n"; + } + else + { + tests.push_back(*i); + } + } + i = tests.begin(); + + // Name of the source list + + const char* sourceList = i->c_str(); + ++i; + + // Name of the test driver + // make sure they specified an extension + if (cmSystemTools::GetFilenameExtension(*i).size() < 2) + { + this->SetError( + "You must specify a file extenion for the test driver file."); + return false; + } + std::string driver = this->Makefile->GetCurrentOutputDirectory(); + driver += "/"; + driver += *i; + ++i; + + std::string configFile = + this->Makefile->GetRequiredDefinition("CMAKE_ROOT"); + + configFile += "/Templates/TestDriver.cxx.in"; + // Create the test driver file + + std::vector::const_iterator testsBegin = i; + std::vector tests_func_name; + + // The rest of the arguments consist of a list of test source files. + // Sadly, they can be in directories. Let's find a unique function + // name for the corresponding test, and push it to the tests_func_name + // list. + // For the moment: + // - replace spaces ' ', ':' and '/' with underscores '_' + std::string forwardDeclareCode; + for(i = testsBegin; i != tests.end(); ++i) + { + if(*i == "EXTRA_INCLUDE") + { + break; + } + std::string func_name; + if (cmSystemTools::GetFilenamePath(*i).size() > 0) + { + func_name = cmSystemTools::GetFilenamePath(*i) + "/" + + cmSystemTools::GetFilenameWithoutLastExtension(*i); + } + else + { + func_name = cmSystemTools::GetFilenameWithoutLastExtension(*i); + } + cmSystemTools::ConvertToUnixSlashes(func_name); + cmSystemTools::ReplaceString(func_name, " ", "_"); + cmSystemTools::ReplaceString(func_name, "/", "_"); + cmSystemTools::ReplaceString(func_name, ":", "_"); + tests_func_name.push_back(func_name); + forwardDeclareCode += "int "; + forwardDeclareCode += func_name; + forwardDeclareCode += "(int, char*[]);\n"; + } + + std::string functionMapCode; + int numTests = 0; + std::vector::iterator j; + for(i = testsBegin, j = tests_func_name.begin(); i != tests.end(); ++i, ++j) + { + std::string func_name; + if (cmSystemTools::GetFilenamePath(*i).size() > 0) + { + func_name = cmSystemTools::GetFilenamePath(*i) + "/" + + cmSystemTools::GetFilenameWithoutLastExtension(*i); + } + else + { + func_name = cmSystemTools::GetFilenameWithoutLastExtension(*i); + } + functionMapCode += " {\n" + " \""; + functionMapCode += func_name; + functionMapCode += "\",\n" + " "; + functionMapCode += *j; + functionMapCode += "\n" + " },\n"; + numTests++; + } + if(extraInclude.size()) + { + this->Makefile->AddDefinition("CMAKE_TESTDRIVER_EXTRA_INCLUDES", + extraInclude.c_str()); + } + if(function.size()) + { + this->Makefile->AddDefinition("CMAKE_TESTDRIVER_ARGVC_FUNCTION", + function.c_str()); + } + this->Makefile->AddDefinition("CMAKE_FORWARD_DECLARE_TESTS", + forwardDeclareCode.c_str()); + this->Makefile->AddDefinition("CMAKE_FUNCTION_TABLE_ENTIRES", + functionMapCode.c_str()); + bool res = true; + if ( !this->Makefile->ConfigureFile(configFile.c_str(), driver.c_str(), + false, true, false) ) + { + res = false; + } + + // Construct the source list. + std::string sourceListValue; + { + cmSourceFile* sf = this->Makefile->GetOrCreateSource(driver.c_str()); + sf->SetProperty("ABSTRACT","0"); + sourceListValue = args[1]; + } + for(i = testsBegin; i != tests.end(); ++i) + { + cmSourceFile* sf = this->Makefile->GetOrCreateSource(i->c_str()); + sf->SetProperty("ABSTRACT","0"); + sourceListValue += ";"; + sourceListValue += *i; + } + + this->Makefile->AddDefinition(sourceList, sourceListValue.c_str()); + return res; +} + + + diff --git a/Source/cmCreateTestSourceList.h b/Source/cmCreateTestSourceList.h new file mode 100644 index 000000000..9fdc254f1 --- /dev/null +++ b/Source/cmCreateTestSourceList.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCreateTestSourceList.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCreateTestSourceList_h +#define cmCreateTestSourceList_h + +#include "cmCommand.h" + +/** \class cmCreateTestSourceList + * \brief + * + */ + +class cmCreateTestSourceList : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmCreateTestSourceList; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "create_test_sourcelist";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Create a test driver and source list for building test programs."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " create_test_sourcelist(sourceListName driverName\n" + " test1 test2 test3\n" + " EXTRA_INCLUDE include.h\n" + " FUNCTION function)\n" + "A test driver is a program that links together many small tests into " + "a single executable. This is useful when building static executables " + "with large libraries to shrink the total required size. " + "The list of source files " + "needed to build the test driver will be in sourceListName. " + "DriverName is the name of the test driver program. The rest of " + "the arguments consist of a list of test source files, can be " + "semicolon separated. Each test source file should have a function in " + "it that is the same name as the file with no extension (foo.cxx " + "should have int foo(int, char*[]);) DriverName will be able to " + "call each of the " + "tests by name on the command line. If EXTRA_INCLUDE is specified, " + "then the next argument is included into the generated file. If " + "FUNCTION is specified, then the next argument is taken as a function " + "name that is passed a pointer to ac and av. This can be used to add " + "extra command line processing to each test. The cmake variable " + "CMAKE_TESTDRIVER_BEFORE_TESTMAIN can be set to have code that will be " + "placed directly before calling the test main function. " + "CMAKE_TESTDRIVER_AFTER_TESTMAIN can be set to have code that will be " + "placed directly after the call to the test main function."; + } + + cmTypeMacro(cmCreateTestSourceList, cmCommand); +}; + + + +#endif diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx new file mode 100644 index 000000000..2b5f0bbed --- /dev/null +++ b/Source/cmCustomCommand.cxx @@ -0,0 +1,156 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCustomCommand.cxx,v $ + Language: C++ + Date: $Date: 2007-09-17 14:50:46 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCustomCommand.h" + +//---------------------------------------------------------------------------- +cmCustomCommand::cmCustomCommand() +{ + this->HaveComment = false; + this->EscapeOldStyle = true; + this->EscapeAllowMakeVars = false; +} + +//---------------------------------------------------------------------------- +cmCustomCommand::cmCustomCommand(const cmCustomCommand& r): + Outputs(r.Outputs), + Depends(r.Depends), + CommandLines(r.CommandLines), + HaveComment(r.HaveComment), + Comment(r.Comment), + WorkingDirectory(r.WorkingDirectory), + EscapeAllowMakeVars(r.EscapeAllowMakeVars), + EscapeOldStyle(r.EscapeOldStyle) +{ +} + +//---------------------------------------------------------------------------- +cmCustomCommand::cmCustomCommand(const std::vector& outputs, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + const char* comment, + const char* workingDirectory): + Outputs(outputs), + Depends(depends), + CommandLines(commandLines), + HaveComment(comment?true:false), + Comment(comment?comment:""), + WorkingDirectory(workingDirectory?workingDirectory:""), + EscapeAllowMakeVars(false), + EscapeOldStyle(true) +{ + this->EscapeOldStyle = true; + this->EscapeAllowMakeVars = false; +} + +//---------------------------------------------------------------------------- +const std::vector& cmCustomCommand::GetOutputs() const +{ + return this->Outputs; +} + +//---------------------------------------------------------------------------- +const char* cmCustomCommand::GetWorkingDirectory() const +{ + if(this->WorkingDirectory.size() == 0) + { + return 0; + } + return this->WorkingDirectory.c_str(); +} + +//---------------------------------------------------------------------------- +const std::vector& cmCustomCommand::GetDepends() const +{ + return this->Depends; +} + +//---------------------------------------------------------------------------- +const cmCustomCommandLines& cmCustomCommand::GetCommandLines() const +{ + return this->CommandLines; +} + +//---------------------------------------------------------------------------- +const char* cmCustomCommand::GetComment() const +{ + const char* no_comment = 0; + return this->HaveComment? this->Comment.c_str() : no_comment; +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::AppendCommands(const cmCustomCommandLines& commandLines) +{ + for(cmCustomCommandLines::const_iterator i=commandLines.begin(); + i != commandLines.end(); ++i) + { + this->CommandLines.push_back(*i); + } +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::AppendDepends(const std::vector& depends) +{ + for(std::vector::const_iterator i=depends.begin(); + i != depends.end(); ++i) + { + this->Depends.push_back(*i); + } +} + +//---------------------------------------------------------------------------- +bool cmCustomCommand::GetEscapeOldStyle() const +{ + return this->EscapeOldStyle; +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::SetEscapeOldStyle(bool b) +{ + this->EscapeOldStyle = b; +} + +//---------------------------------------------------------------------------- +bool cmCustomCommand::GetEscapeAllowMakeVars() const +{ + return this->EscapeAllowMakeVars; +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::SetEscapeAllowMakeVars(bool b) +{ + this->EscapeAllowMakeVars = b; +} + +//---------------------------------------------------------------------------- +cmCustomCommand::ImplicitDependsList const& +cmCustomCommand::GetImplicitDepends() const +{ + return this->ImplicitDepends; +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::SetImplicitDepends(ImplicitDependsList const& l) +{ + this->ImplicitDepends = l; +} + +//---------------------------------------------------------------------------- +void cmCustomCommand::AppendImplicitDepends(ImplicitDependsList const& l) +{ + this->ImplicitDepends.insert(this->ImplicitDepends.end(), + l.begin(), l.end()); +} diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h new file mode 100644 index 000000000..91ef23026 --- /dev/null +++ b/Source/cmCustomCommand.h @@ -0,0 +1,89 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmCustomCommand.h,v $ + Language: C++ + Date: $Date: 2007-09-17 14:50:46 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmCustomCommand_h +#define cmCustomCommand_h + +#include "cmStandardIncludes.h" + +/** \class cmCustomCommand + * \brief A class to encapsulate a custom command + * + * cmCustomCommand encapsulates the properties of a custom command + */ +class cmCustomCommand +{ +public: + /** Default and copy constructors for STL containers. */ + cmCustomCommand(); + cmCustomCommand(const cmCustomCommand& r); + + /** Main constructor specifies all information for the command. */ + cmCustomCommand(const std::vector& outputs, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + const char* comment, + const char* workingDirectory); + + /** Get the output file produced by the command. */ + const std::vector& GetOutputs() const; + + /** Get the working directory. */ + const char* GetWorkingDirectory() const; + + /** Get the vector that holds the list of dependencies. */ + const std::vector& GetDepends() const; + + /** Get the list of command lines. */ + const cmCustomCommandLines& GetCommandLines() const; + + /** Get the comment string for the command. */ + const char* GetComment() const; + + /** Append to the list of command lines. */ + void AppendCommands(const cmCustomCommandLines& commandLines); + + /** Append to the list of dependencies. */ + void AppendDepends(const std::vector& depends); + + /** Set/Get whether old-style escaping should be used. */ + bool GetEscapeOldStyle() const; + void SetEscapeOldStyle(bool b); + + /** Set/Get whether the build tool can replace variables in + arguments to the command. */ + bool GetEscapeAllowMakeVars() const; + void SetEscapeAllowMakeVars(bool b); + + typedef std::pair ImplicitDependsPair; + class ImplicitDependsList: public std::vector {}; + void SetImplicitDepends(ImplicitDependsList const&); + void AppendImplicitDepends(ImplicitDependsList const&); + ImplicitDependsList const& GetImplicitDepends() const; + +private: + std::vector Outputs; + std::vector Depends; + cmCustomCommandLines CommandLines; + bool HaveComment; + std::string Comment; + std::string WorkingDirectory; + bool EscapeAllowMakeVars; + bool EscapeOldStyle; + ImplicitDependsList ImplicitDepends; +}; + +#endif diff --git a/Source/cmData.h b/Source/cmData.h new file mode 100644 index 000000000..d4eb78372 --- /dev/null +++ b/Source/cmData.h @@ -0,0 +1,43 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmData.h,v $ + Language: C++ + Date: $Date: 2006-03-16 14:33:23 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmData_h +#define cmData_h + +#include "cmStandardIncludes.h" + +/** \class cmData + * \brief Hold extra data on a cmMakefile instance for a command. + * + * When CMake commands need to store extra information in a cmMakefile + * instance, but the information is not needed by the makefile generators, + * it can be held in a subclass of cmData. The cmMakefile class has a map + * from std::string to cmData*. On its destruction, it destroys all the + * extra data through the virtual destructor of cmData. + */ +class cmData +{ +public: + cmData(const char* name): Name(name) {} + virtual ~cmData() {} + + const std::string& GetName() const + { return this->Name; } +protected: + std::string Name; +}; + +#endif diff --git a/Source/cmDefinePropertyCommand.cxx b/Source/cmDefinePropertyCommand.cxx new file mode 100755 index 000000000..81de1a53d --- /dev/null +++ b/Source/cmDefinePropertyCommand.cxx @@ -0,0 +1,144 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDefinePropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-14 18:36:23 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDefinePropertyCommand.h" +#include "cmake.h" + +// cmDefinePropertiesCommand +bool cmDefinePropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Get the scope in which to define the property. + cmProperty::ScopeType scope; + if(args[0] == "GLOBAL") + { + scope = cmProperty::GLOBAL; + } + else if(args[0] == "DIRECTORY") + { + scope = cmProperty::DIRECTORY; + } + else if(args[0] == "TARGET") + { + scope = cmProperty::TARGET; + } + else if(args[0] == "SOURCE") + { + scope = cmProperty::SOURCE_FILE; + } + else if(args[0] == "TEST") + { + scope = cmProperty::TEST; + } + else if(args[0] == "VARIABLE") + { + scope = cmProperty::VARIABLE; + } + else if (args[0] == "CACHED_VARIABLE") + { + scope = cmProperty::CACHED_VARIABLE; + } + else + { + cmOStringStream e; + e << "given invalid scope " << args[0] << ". " + << "Valid scopes are " + << "GLOBAL, DIRECTORY, TARGET, SOURCE, " + << "TEST, VARIABLE, CACHED_VARIABLE."; + this->SetError(e.str().c_str()); + return false; + } + + // Parse remaining arguments. + bool inherited = false; + enum Doing { DoingNone, DoingProperty, DoingBrief, DoingFull }; + Doing doing = DoingNone; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "PROPERTY") + { + doing = DoingProperty; + } + else if(args[i] == "BRIEF_DOCS") + { + doing = DoingBrief; + } + else if(args[i] == "FULL_DOCS") + { + doing = DoingFull; + } + else if(args[i] == "INHERITED") + { + doing = DoingNone; + inherited = true; + } + else if(doing == DoingProperty) + { + doing = DoingNone; + this->PropertyName = args[i]; + } + else if(doing == DoingBrief) + { + doing = DoingNone; + this->BriefDocs = args[i]; + } + else if(doing == DoingFull) + { + doing = DoingNone; + this->FullDocs = args[i]; + } + else + { + cmOStringStream e; + e << "given invalid argument \"" << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Make sure a property name was found. + if(this->PropertyName.empty()) + { + this->SetError("not given a PROPERTY argument."); + return false; + } + + // Make sure documentation was given. + if(this->BriefDocs.empty()) + { + this->SetError("not given a BRIEF_DOCS argument."); + return false; + } + if(this->FullDocs.empty()) + { + this->SetError("not given a FULL_DOCS argument."); + return false; + } + + // Actually define the property. + this->Makefile->GetCMakeInstance()->DefineProperty + (this->PropertyName.c_str(), scope, + this->BriefDocs.c_str(), this->FullDocs.c_str(), inherited); + + return true; +} + diff --git a/Source/cmDefinePropertyCommand.h b/Source/cmDefinePropertyCommand.h new file mode 100755 index 000000000..8e587c8df --- /dev/null +++ b/Source/cmDefinePropertyCommand.h @@ -0,0 +1,98 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDefinePropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-02-14 18:36:23 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDefinesPropertyCommand_h +#define cmDefinesPropertyCommand_h + +#include "cmCommand.h" + +class cmDefinePropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmDefinePropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "define_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Define and document custom properties."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " define_property(\n" + " PROPERTY [INHERITED]\n" + " BRIEF_DOCS \n" + " FULL_DOCS )\n" + "Define one property in a scope for use with the " + "set_property and get_property commands. " + "This is primarily useful to associate documentation with property " + "names that may be retrieved with the get_property command. " + "The first argument determines the kind of scope in which the " + "property should be used. It must be one of the following:\n" + " GLOBAL = associated with the global namespace\n" + " DIRECTORY = associated with one directory\n" + " TARGET = associated with one target\n" + " SOURCE = associated with one source file\n" + " TEST = associated with a test named with add_test command\n" + " VARIABLE = documents a CMake language variable\n" + " CACHED_VARIABLE = documents a CMake cache variable\n" + "Note that unlike set_property and get_property no actual scope " + "needs to be given; only the kind of scope is important.\n" + "The required PROPERTY option is immediately followed by the name " + "of the property being defined.\n" + "If the INHERITED option then the get_property command will chain " + "up to the next higher scope when the requested property is not " + "set in the scope given to the command. " + "DIRECTORY scope chains to GLOBAL. " + "TARGET, SOURCE, and TEST chain to DIRECTORY.\n" + "The BRIEF_DOCS and FULL_DOCS options are followed by strings to be " + "associated with the property as its brief and full documentation. " + "Corresponding options to the get_property command will retrieve the " + "documentation."; + } + + cmTypeMacro(cmDefinePropertyCommand, cmCommand); +private: + std::string PropertyName; + std::string BriefDocs; + std::string FullDocs; +}; + + + +#endif diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx new file mode 100644 index 000000000..7f3b491f9 --- /dev/null +++ b/Source/cmDepends.cxx @@ -0,0 +1,234 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDepends.cxx,v $ + Language: C++ + Date: $Date: 2007-12-28 16:49:59 $ + Version: $Revision: 1.17 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDepends.h" + +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" +#include "cmFileTimeComparison.h" +#include + +//---------------------------------------------------------------------------- +cmDepends::cmDepends(): + CompileDirectory(), + LocalGenerator(0), + Verbose(false), + FileComparison(0), + MaxPath(cmSystemTools::GetMaximumFilePathLength()), + Dependee(new char[MaxPath]), + Depender(new char[MaxPath]) +{ +} + +//---------------------------------------------------------------------------- +cmDepends::~cmDepends() +{ + delete [] this->Dependee; + delete [] this->Depender; +} + +//---------------------------------------------------------------------------- +bool cmDepends::Write(std::ostream &makeDepends, + std::ostream &internalDepends) +{ + // Lookup the set of sources to scan. + std::string srcLang = "CMAKE_DEPENDS_CHECK_"; + srcLang += this->Language; + cmMakefile* mf = this->LocalGenerator->GetMakefile(); + const char* srcStr = mf->GetSafeDefinition(srcLang.c_str()); + std::vector pairs; + cmSystemTools::ExpandListArgument(srcStr, pairs); + + for(std::vector::iterator si = pairs.begin(); + si != pairs.end();) + { + // Get the source and object file. + std::string const& src = *si++; + if(si == pairs.end()) { break; } + std::string obj = *si++; + + // Make sure the object file is relative to the top of the build tree. + obj = this->LocalGenerator->Convert(obj.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + + // Write the dependencies for this pair. + if(!this->WriteDependencies(src.c_str(), obj.c_str(), + makeDepends, internalDepends)) + { + return false; + } + } + + return this->Finalize(makeDepends, internalDepends); +} + +//---------------------------------------------------------------------------- +bool cmDepends::Finalize(std::ostream&, + std::ostream&) +{ + return true; +} + +//---------------------------------------------------------------------------- +bool cmDepends::Check(const char *makeFile, const char *internalFile) +{ + // Dependency checks must be done in proper working directory. + std::string oldcwd = "."; + if(this->CompileDirectory != ".") + { + // Get the CWD but do not call CollapseFullPath because + // we only need it to cd back, and the form does not matter + oldcwd = cmSystemTools::GetCurrentWorkingDirectory(false); + cmSystemTools::ChangeDirectory(this->CompileDirectory.c_str()); + } + + // Check whether dependencies must be regenerated. + bool okay = true; + std::ifstream fin(internalFile); + if(!(fin && this->CheckDependencies(fin))) + { + // Clear all dependencies so they will be regenerated. + this->Clear(makeFile); + cmSystemTools::RemoveFile(internalFile); + okay = false; + } + + // Restore working directory. + if(oldcwd != ".") + { + cmSystemTools::ChangeDirectory(oldcwd.c_str()); + } + + return okay; +} + +//---------------------------------------------------------------------------- +void cmDepends::Clear(const char *file) +{ + // Print verbose output. + if(this->Verbose) + { + cmOStringStream msg; + msg << "Clearing dependencies in \"" << file << "\"." << std::endl; + cmSystemTools::Stdout(msg.str().c_str()); + } + + // Write an empty dependency file. + cmGeneratedFileStream depFileStream(file); + depFileStream + << "# Empty dependencies file\n" + << "# This may be replaced when dependencies are built." << std::endl; +} + +//---------------------------------------------------------------------------- +bool cmDepends::WriteDependencies(const char*, const char*, + std::ostream&, std::ostream&) +{ + // This should be implemented by the subclass. + return false; +} + +//---------------------------------------------------------------------------- +bool cmDepends::CheckDependencies(std::istream& internalDepends) +{ + // Parse dependencies from the stream. If any dependee is missing + // or newer than the depender then dependencies should be + // regenerated. + bool okay = true; + while(internalDepends.getline(this->Dependee, this->MaxPath)) + { + if ( this->Dependee[0] == 0 || this->Dependee[0] == '#' || + this->Dependee[0] == '\r' ) + { + continue; + } + size_t len = internalDepends.gcount()-1; + if ( this->Dependee[len-1] == '\r' ) + { + len --; + this->Dependee[len] = 0; + } + if ( this->Dependee[0] != ' ' ) + { + memcpy(this->Depender, this->Dependee, len+1); + continue; + } + /* + // Parse the dependency line. + if(!this->ParseDependency(line.c_str())) + { + continue; + } + */ + + // Dependencies must be regenerated if the dependee does not exist + // or if the depender exists and is older than the dependee. + bool regenerate = false; + const char* dependee = this->Dependee+1; + const char* depender = this->Depender; + if(!cmSystemTools::FileExists(dependee)) + { + // The dependee does not exist. + regenerate = true; + + // Print verbose output. + if(this->Verbose) + { + cmOStringStream msg; + msg << "Dependee \"" << dependee + << "\" does not exist for depender \"" + << depender << "\"." << std::endl; + cmSystemTools::Stdout(msg.str().c_str()); + } + } + else if(cmSystemTools::FileExists(depender)) + { + // The dependee and depender both exist. Compare file times. + int result = 0; + if((!this->FileComparison->FileTimeCompare(depender, dependee, + &result) || result < 0)) + { + // The depender is older than the dependee. + regenerate = true; + + // Print verbose output. + if(this->Verbose) + { + cmOStringStream msg; + msg << "Dependee \"" << dependee + << "\" is newer than depender \"" + << depender << "\"." << std::endl; + cmSystemTools::Stdout(msg.str().c_str()); + } + } + } + if(regenerate) + { + // Dependencies must be regenerated. + okay = false; + + // Remove the depender to be sure it is rebuilt. + cmSystemTools::RemoveFile(depender); + } + } + + return okay; +} + + diff --git a/Source/cmDepends.h b/Source/cmDepends.h new file mode 100644 index 000000000..fcde6ea3a --- /dev/null +++ b/Source/cmDepends.h @@ -0,0 +1,116 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDepends.h,v $ + Language: C++ + Date: $Date: 2007-12-28 16:49:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDepends_h +#define cmDepends_h + +#include "cmStandardIncludes.h" + +class cmFileTimeComparison; +class cmLocalGenerator; + +/** \class cmDepends + * \brief Dependency scanner superclass. + * + * This class is responsible for maintaining a .depends.make file in + * the build tree corresponding to an object file. Subclasses help it + * maintain dependencies for particular languages. + */ +class cmDepends +{ +public: + /** Instances need to know the build directory name and the relative + path from the build directory to the target file. */ + cmDepends(); + + /** at what level will the compile be done from */ + void SetCompileDirectory(const char *dir) {this->CompileDirectory = dir;}; + + /** Set the local generator for the directory in which we are + scanning dependencies. This is not a full local generator; it + has been setup to do relative path conversions for the current + directory. */ + void SetLocalGenerator(cmLocalGenerator* lg) { this->LocalGenerator = lg; } + + /** Set the specific language to be scanned. */ + void SetLanguage(const char* lang) { this->Language = lang; } + + /** Set the target build directory. */ + void SetTargetDirectory(const char* dir) { this->TargetDirectory = dir; } + + /** should this be verbose in its output */ + void SetVerbose(bool verb) { this->Verbose = verb; } + + /** Virtual destructor to cleanup subclasses properly. */ + virtual ~cmDepends(); + + /** Write dependencies for the target file. */ + bool Write(std::ostream &makeDepends, std::ostream &internalDepends); + + /** Check dependencies for the target file. Returns true if + dependencies are okay and false if they must be generated. If + they must be generated Clear has already been called to wipe out + the old dependencies. */ + bool Check(const char *makeFile, const char* internalFile); + + /** Clear dependencies for the target file so they will be regenerated. */ + void Clear(const char *file); + + /** Set the file comparison object */ + void SetFileComparison(cmFileTimeComparison* fc) { + this->FileComparison = fc; } + +protected: + + // Write dependencies for the target file to the given stream. + // Return true for success and false for failure. + virtual bool WriteDependencies(const char *src, const char* obj, + std::ostream& makeDepends, std::ostream& internalDepends); + + // Check dependencies for the target file in the given stream. + // Return false if dependencies must be regenerated and true + // otherwise. + virtual bool CheckDependencies(std::istream& internalDepends); + + // Finalize the dependency information for the target. + virtual bool Finalize(std::ostream& makeDepends, + std::ostream& internalDepends); + + // The directory in which the build rule for the target file is executed. + std::string CompileDirectory; + + // The local generator. + cmLocalGenerator* LocalGenerator; + + // Flag for verbose output. + bool Verbose; + cmFileTimeComparison* FileComparison; + + std::string Language; + + // The full path to the target's build directory. + std::string TargetDirectory; + + size_t MaxPath; + char* Dependee; + char* Depender; + +private: + cmDepends(cmDepends const&); // Purposely not implemented. + void operator=(cmDepends const&); // Purposely not implemented. +}; + +#endif diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx new file mode 100644 index 000000000..70d5e057e --- /dev/null +++ b/Source/cmDependsC.cxx @@ -0,0 +1,429 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsC.cxx,v $ + Language: C++ + Date: $Date: 2007-12-15 01:31:27 $ + Version: $Revision: 1.33 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDependsC.h" + +#include "cmFileTimeComparison.h" +#include "cmLocalGenerator.h" +#include "cmSystemTools.h" + +#include // isspace + + +#define INCLUDE_REGEX_LINE \ + "^[ \t]*#[ \t]*(include|import)[ \t]*[<\"]([^\">]+)([\">])" + +#define INCLUDE_REGEX_LINE_MARKER "#IncludeRegexLine: " +#define INCLUDE_REGEX_SCAN_MARKER "#IncludeRegexScan: " +#define INCLUDE_REGEX_COMPLAIN_MARKER "#IncludeRegexComplain: " + +//---------------------------------------------------------------------------- +cmDependsC::cmDependsC(): + IncludePath(0) +{ +} +//---------------------------------------------------------------------------- +// yummy look at all those constructor arguments +cmDependsC::cmDependsC(std::vector const& includes, + const char* scanRegex, const char* complainRegex, + const cmStdString& cacheFileName): + IncludePath(&includes), + IncludeRegexLine(INCLUDE_REGEX_LINE), + IncludeRegexScan(scanRegex), + IncludeRegexComplain(complainRegex), + IncludeRegexLineString(INCLUDE_REGEX_LINE_MARKER INCLUDE_REGEX_LINE), + IncludeRegexScanString(std::string(INCLUDE_REGEX_SCAN_MARKER)+scanRegex), + IncludeRegexComplainString( + std::string(INCLUDE_REGEX_COMPLAIN_MARKER)+complainRegex), + CacheFileName(cacheFileName) +{ + this->ReadCacheFile(); +} + +//---------------------------------------------------------------------------- +cmDependsC::~cmDependsC() +{ + this->WriteCacheFile(); + + for (std::map::iterator it= + this->FileCache.begin(); it!=this->FileCache.end(); ++it) + { + delete it->second; + } +} + +//---------------------------------------------------------------------------- +bool cmDependsC::WriteDependencies(const char *src, const char *obj, + std::ostream& makeDepends, std::ostream& internalDepends) +{ + // Make sure this is a scanning instance. + if(!src || src[0] == '\0') + { + cmSystemTools::Error("Cannot scan dependencies without a source file."); + return false; + } + if(!obj || obj[0] == '\0') + { + cmSystemTools::Error("Cannot scan dependencies without an object file."); + return false; + } + if(!this->IncludePath) + { + cmSystemTools::Error("Cannot scan dependencies without an include path."); + return false; + } + + // Walk the dependency graph starting with the source file. + bool first = true; + UnscannedEntry root; + root.FileName = src; + this->Unscanned.push(root); + this->Encountered.clear(); + this->Encountered.insert(src); + std::set dependencies; + std::set scanned; + + // Use reserve to allocate enough memory for both strings, + // so that during the loops no memory is allocated or freed + std::string cacheKey; + cacheKey.reserve(4*1024); + std::string tempPathStr; + tempPathStr.reserve(4*1024); + + while(!this->Unscanned.empty()) + { + // Get the next file to scan. + UnscannedEntry current = this->Unscanned.front(); + this->Unscanned.pop(); + + // If not a full path, find the file in the include path. + std::string fullName; + if(first || cmSystemTools::FileIsFullPath(current.FileName.c_str())) + { + if(cmSystemTools::FileExists(current.FileName.c_str(), true)) + { + fullName = current.FileName; + } + } + else if(!current.QuotedLocation.empty() && + cmSystemTools::FileExists(current.QuotedLocation.c_str(), true)) + { + // The include statement producing this entry was a double-quote + // include and the included file is present in the directory of + // the source containing the include statement. + fullName = current.QuotedLocation; + } + else + { + // With GCC distribution of STL, assigning to a string directly + // throws away the internal buffer of the left-hand-side. We + // want to keep the pre-allocated buffer so we use C-style + // string assignment and then operator+=. We could call + // .clear() instead of assigning to an empty string but the + // method does not exist on some older compilers. + cacheKey = ""; + cacheKey += current.FileName; + + for(std::vector::const_iterator i = + this->IncludePath->begin(); i != this->IncludePath->end(); ++i) + { + cacheKey+=*i; + } + std::map::iterator + headerLocationIt=this->HeaderLocationCache.find(cacheKey); + if (headerLocationIt!=this->HeaderLocationCache.end()) + { + fullName=headerLocationIt->second; + } + else for(std::vector::const_iterator i = + this->IncludePath->begin(); i != this->IncludePath->end(); ++i) + { + // Construct the name of the file as if it were in the current + // include directory. Avoid using a leading "./". + + tempPathStr = ""; + if((*i) == ".") + { + tempPathStr += current.FileName; + } + else + { + tempPathStr += *i; + tempPathStr+="/"; + tempPathStr+=current.FileName; + } + + // Look for the file in this location. + if(cmSystemTools::FileExists(tempPathStr.c_str(), true)) + { + fullName = tempPathStr; + HeaderLocationCache[cacheKey]=fullName; + break; + } + } + } + + // Complain if the file cannot be found and matches the complain + // regex. + if(fullName.empty() && + this->IncludeRegexComplain.find(current.FileName.c_str())) + { + cmSystemTools::Error("Cannot find file \"", + current.FileName.c_str(), "\"."); + return false; + } + + // Scan the file if it was found and has not been scanned already. + if(!fullName.empty() && (scanned.find(fullName) == scanned.end())) + { + // Record scanned files. + scanned.insert(fullName); + + // Check whether this file is already in the cache + std::map::iterator fileIt= + this->FileCache.find(fullName); + if (fileIt!=this->FileCache.end()) + { + fileIt->second->Used=true; + dependencies.insert(fullName); + for (std::vector::const_iterator incIt= + fileIt->second->UnscannedEntries.begin(); + incIt!=fileIt->second->UnscannedEntries.end(); ++incIt) + { + if (this->Encountered.find(incIt->FileName) == + this->Encountered.end()) + { + this->Encountered.insert(incIt->FileName); + this->Unscanned.push(*incIt); + } + } + } + else + { + + // Try to scan the file. Just leave it out if we cannot find + // it. + std::ifstream fin(fullName.c_str()); + if(fin) + { + // Add this file as a dependency. + dependencies.insert(fullName); + + // Scan this file for new dependencies. Pass the directory + // containing the file to handle double-quote includes. + std::string dir = cmSystemTools::GetFilenamePath(fullName); + this->Scan(fin, dir.c_str(), fullName); + } + } + } + + first = false; + } + + // Write the dependencies to the output stream. Makefile rules + // written by the original local generator for this directory + // convert the dependencies to paths relative to the home output + // directory. We must do the same here. + internalDepends << obj << std::endl; + for(std::set::iterator i=dependencies.begin(); + i != dependencies.end(); ++i) + { + makeDepends << obj << ": " << + this->LocalGenerator->Convert(i->c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE) + << std::endl; + internalDepends << " " << i->c_str() << std::endl; + } + makeDepends << std::endl; + + return true; +} + +//---------------------------------------------------------------------------- +void cmDependsC::ReadCacheFile() +{ + if(this->CacheFileName.size() == 0) + { + return; + } + std::ifstream fin(this->CacheFileName.c_str()); + if(!fin) + { + return; + } + + std::string line; + cmIncludeLines* cacheEntry=0; + bool haveFileName=false; + + while(cmSystemTools::GetLineFromStream(fin, line)) + { + if (line.empty()) + { + cacheEntry=0; + haveFileName=false; + continue; + } + //the first line after an empty line is the name of the parsed file + if (haveFileName==false) + { + haveFileName=true; + int newer=0; + cmFileTimeComparison comp; + bool res=comp.FileTimeCompare(this->CacheFileName.c_str(), + line.c_str(), &newer); + + if ((res==true) && (newer==1)) //cache is newer than the parsed file + { + cacheEntry=new cmIncludeLines; + this->FileCache[line]=cacheEntry; + } + // file doesn't exist, check that the regular expressions + // haven't changed + else if (res==false) + { + if (line.find(INCLUDE_REGEX_LINE_MARKER) == 0) + { + if (line != this->IncludeRegexLineString) + { + return; + } + } + else if (line.find(INCLUDE_REGEX_SCAN_MARKER) == 0) + { + if (line != this->IncludeRegexScanString) + { + return; + } + } + else if (line.find(INCLUDE_REGEX_COMPLAIN_MARKER) == 0) + { + if (line != this->IncludeRegexComplainString) + { + return; + } + } + } + } + else if (cacheEntry!=0) + { + UnscannedEntry entry; + entry.FileName = line; + if (cmSystemTools::GetLineFromStream(fin, line)) + { + if (line!="-") + { + entry.QuotedLocation=line; + } + cacheEntry->UnscannedEntries.push_back(entry); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmDependsC::WriteCacheFile() const +{ + if(this->CacheFileName.size() == 0) + { + return; + } + std::ofstream cacheOut(this->CacheFileName.c_str()); + if(!cacheOut) + { + return; + } + + cacheOut << this->IncludeRegexLineString << "\n\n"; + cacheOut << this->IncludeRegexScanString << "\n\n"; + cacheOut << this->IncludeRegexComplainString << "\n\n"; + + for (std::map::const_iterator fileIt= + this->FileCache.begin(); + fileIt!=this->FileCache.end(); ++fileIt) + { + if (fileIt->second->Used) + { + cacheOut<first.c_str()<::const_iterator + incIt=fileIt->second->UnscannedEntries.begin(); + incIt!=fileIt->second->UnscannedEntries.end(); ++incIt) + { + cacheOut<FileName.c_str()<QuotedLocation.empty()) + { + cacheOut<<"-"<QuotedLocation.c_str()<Used=true; + this->FileCache[fullName]=newCacheEntry; + + // Read one line at a time. + std::string line; + while(cmSystemTools::GetLineFromStream(is, line)) + { + // Match include directives. + if(this->IncludeRegexLine.find(line.c_str())) + { + // Get the file being included. + UnscannedEntry entry; + entry.FileName = this->IncludeRegexLine.match(2); + if(this->IncludeRegexLine.match(3) == "\"" && + !cmSystemTools::FileIsFullPath(entry.FileName.c_str())) + { + // This was a double-quoted include with a relative path. We + // must check for the file in the directory containing the + // file we are scanning. + entry.QuotedLocation = directory; + entry.QuotedLocation += "/"; + entry.QuotedLocation += entry.FileName; + } + + // Queue the file if it has not yet been encountered and it + // matches the regular expression for recursive scanning. Note + // that this check does not account for the possibility of two + // headers with the same name in different directories when one + // is included by double-quotes and the other by angle brackets. + // This kind of problem will be fixed when a more + // preprocessor-like implementation of this scanner is created. + if (this->IncludeRegexScan.find(entry.FileName.c_str())) + { + newCacheEntry->UnscannedEntries.push_back(entry); + if(this->Encountered.find(entry.FileName) == this->Encountered.end()) + { + this->Encountered.insert(entry.FileName); + this->Unscanned.push(entry); + } + } + } + } +} diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h new file mode 100644 index 000000000..41db42081 --- /dev/null +++ b/Source/cmDependsC.h @@ -0,0 +1,98 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsC.h,v $ + Language: C++ + Date: $Date: 2007-02-05 14:48:38 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsC_h +#define cmDependsC_h + +#include "cmDepends.h" +#include +#include + +/** \class cmDependsC + * \brief Dependency scanner for C and C++ object files. + */ +class cmDependsC: public cmDepends +{ +public: + /** Checking instances need to know the build directory name and the + relative path from the build directory to the target file. */ + cmDependsC(); + cmDependsC(std::vector const& includes, + const char* scanRegex, const char* complainRegex, + const cmStdString& cachFileName); + + /** Virtual destructor to cleanup subclasses properly. */ + virtual ~cmDependsC(); + +protected: + typedef std::vector t_CharBuffer; + + // Implement writing/checking methods required by superclass. + virtual bool WriteDependencies(const char *src, + const char *file, + std::ostream& makeDepends, + std::ostream& internalDepends); + + // Method to scan a single file. + void Scan(std::istream& is, const char* directory, + const cmStdString& fullName); + + // The include file search path. + std::vector const* IncludePath; + + // Regular expression to identify C preprocessor include directives. + cmsys::RegularExpression IncludeRegexLine; + + // Regular expressions to choose which include files to scan + // recursively and which to complain about not finding. + cmsys::RegularExpression IncludeRegexScan; + cmsys::RegularExpression IncludeRegexComplain; + const std::string IncludeRegexLineString; + const std::string IncludeRegexScanString; + const std::string IncludeRegexComplainString; + +public: + // Data structures for dependency graph walk. + struct UnscannedEntry + { + cmStdString FileName; + cmStdString QuotedLocation; + }; + + struct cmIncludeLines + { + cmIncludeLines(): Used(false) {} + std::vector UnscannedEntries; + bool Used; + }; +protected: + std::set Encountered; + std::queue Unscanned; + t_CharBuffer Buffer; + + std::map FileCache; + std::map HeaderLocationCache; + + cmStdString CacheFileName; + + void WriteCacheFile() const; + void ReadCacheFile(); +private: + cmDependsC(cmDependsC const&); // Purposely not implemented. + void operator=(cmDependsC const&); // Purposely not implemented. +}; + +#endif diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx new file mode 100644 index 000000000..9347966cf --- /dev/null +++ b/Source/cmDependsFortran.cxx @@ -0,0 +1,1255 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortran.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 19:21:57 $ + Version: $Revision: 1.46.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDependsFortran.h" + +#include "cmSystemTools.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" + +#include "cmDependsFortranParser.h" /* Interface to parser object. */ + +#include +#include + +// TODO: Test compiler for the case of the mod file. Some always +// use lower case and some always use upper case. I do not know if any +// use the case from the source code. + +//---------------------------------------------------------------------------- +// Information about a single source file. +class cmDependsFortranSourceInfo +{ +public: + // The name of the soruce file. + std::string Source; + + // Set of provided and required modules. + std::set Provides; + std::set Requires; + + // Set of files included in the translation unit. + std::set Includes; +}; + +//---------------------------------------------------------------------------- +// Parser methods not included in generated interface. + +// Get the current buffer processed by the lexer. +YY_BUFFER_STATE cmDependsFortranLexer_GetCurrentBuffer(yyscan_t yyscanner); + +// The parser entry point. +int cmDependsFortran_yyparse(yyscan_t); + +//---------------------------------------------------------------------------- +// Define parser object internal structure. +struct cmDependsFortranFile +{ + cmDependsFortranFile(FILE* file, YY_BUFFER_STATE buffer, + const std::string& dir): + File(file), Buffer(buffer), Directory(dir) {} + FILE* File; + YY_BUFFER_STATE Buffer; + std::string Directory; +}; + +struct cmDependsFortranParser_s +{ + cmDependsFortranParser_s(cmDependsFortran* self, + std::set& ppDefines, + cmDependsFortranSourceInfo& info); + ~cmDependsFortranParser_s(); + + // Pointer back to the main class. + cmDependsFortran* Self; + + // Lexical scanner instance. + yyscan_t Scanner; + + // Stack of open files in the translation unit. + std::stack FileStack; + + // Buffer for string literals. + std::string TokenString; + + // Flag for whether lexer is reading from inside an interface. + bool InInterface; + + int OldStartcond; + std::set PPDefinitions; + size_t InPPFalseBranch; + std::stack SkipToEnd; + + // Information about the parsed source. + cmDependsFortranSourceInfo& Info; +}; + +//---------------------------------------------------------------------------- +class cmDependsFortranInternals +{ +public: + // The set of modules provided by this target. + std::set TargetProvides; + + // Map modules required by this target to locations. + typedef std::map TargetRequiresMap; + TargetRequiresMap TargetRequires; + + // Information about each object file. + typedef std::map ObjectInfoMap; + ObjectInfoMap ObjectInfo; + + cmDependsFortranSourceInfo& CreateObjectInfo(const char* obj, + const char* src) + { + std::map::iterator i = + this->ObjectInfo.find(obj); + if(i == this->ObjectInfo.end()) + { + std::map::value_type + entry(obj, cmDependsFortranSourceInfo()); + i = this->ObjectInfo.insert(entry).first; + i->second.Source = src; + } + return i->second; + } +}; + +//---------------------------------------------------------------------------- +cmDependsFortran::cmDependsFortran(): + IncludePath(0), PPDefinitions(0), Internal(0) +{ +} + +//---------------------------------------------------------------------------- +cmDependsFortran +::cmDependsFortran(std::vector const& includes, + std::vector const& definitions): + IncludePath(&includes), + Internal(new cmDependsFortranInternals) +{ + // translate i.e. FOO=BAR to FOO and add it to the list of defined + // preprocessor symbols + for(std::vector::const_iterator + it = definitions.begin(); it != definitions.end(); ++it) + { + std::string def = *it; + std::string::size_type assignment = def.find("="); + if(assignment != std::string::npos) + { + def = it->substr(0, assignment); + } + this->PPDefinitions.push_back(def); + } +} + +//---------------------------------------------------------------------------- +cmDependsFortran::~cmDependsFortran() +{ + delete this->Internal; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::WriteDependencies(const char *src, const char *obj, + std::ostream&, std::ostream&) +{ + // Make sure this is a scanning instance. + if(!src || src[0] == '\0') + { + cmSystemTools::Error("Cannot scan dependencies without an source file."); + return false; + } + if(!obj || obj[0] == '\0') + { + cmSystemTools::Error("Cannot scan dependencies without an object file."); + return false; + } + if(!this->IncludePath) + { + cmSystemTools::Error("Cannot scan dependencies without an include path."); + return false; + } + + // Get the information object for this source. + cmDependsFortranSourceInfo& info = + this->Internal->CreateObjectInfo(obj, src); + + // Make a copy of the macros defined via ADD_DEFINITIONS + std::set ppDefines(this->PPDefinitions.begin(), + this->PPDefinitions.end()); + + // Create the parser object. The constructor takes ppMacro and info per + // reference, so we may look into the resulting objects later. + cmDependsFortranParser parser(this, ppDefines, info); + + // Push on the starting file. + cmDependsFortranParser_FilePush(&parser, src); + + // Parse the translation unit. + if(cmDependsFortran_yyparse(parser.Scanner) != 0) + { + // Failed to parse the file. Report failure to write dependencies. + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::Finalize(std::ostream& makeDepends, + std::ostream& internalDepends) +{ + // Prepare the module search process. + this->LocateModules(); + + // Get the directory in which stamp files will be stored. + const char* stamp_dir = this->TargetDirectory.c_str(); + + // Get the directory in which module files will be created. + const char* mod_dir; + cmMakefile* mf = this->LocalGenerator->GetMakefile(); + if(const char* target_mod_dir = + mf->GetDefinition("CMAKE_Fortran_TARGET_MODULE_DIR")) + { + mod_dir = target_mod_dir; + } + else + { + mod_dir = + this->LocalGenerator->GetMakefile()->GetCurrentOutputDirectory(); + } + + // Actually write dependencies to the streams. + typedef cmDependsFortranInternals::ObjectInfoMap ObjectInfoMap; + ObjectInfoMap const& objInfo = this->Internal->ObjectInfo; + for(ObjectInfoMap::const_iterator i = objInfo.begin(); + i != objInfo.end(); ++i) + { + if(!this->WriteDependenciesReal(i->first.c_str(), i->second, + mod_dir, stamp_dir, + makeDepends, internalDepends)) + { + return false; + } + } + + // Store the list of modules provided by this target. + std::string fiName = this->TargetDirectory; + fiName += "/fortran.internal"; + cmGeneratedFileStream fiStream(fiName.c_str()); + fiStream << "# The fortran modules provided by this target.\n"; + fiStream << "provides\n"; + std::set const& provides = this->Internal->TargetProvides; + for(std::set::const_iterator i = provides.begin(); + i != provides.end(); ++i) + { + fiStream << " " << *i << "\n"; + } + + // Create a script to clean the modules. + if(!provides.empty()) + { + std::string fcName = this->TargetDirectory; + fcName += "/cmake_clean_Fortran.cmake"; + cmGeneratedFileStream fcStream(fcName.c_str()); + fcStream << "# Remove fortran modules provided by this target.\n"; + fcStream << "FILE(REMOVE"; + for(std::set::const_iterator i = provides.begin(); + i != provides.end(); ++i) + { + std::string mod_upper = mod_dir; + mod_upper += "/"; + mod_upper += cmSystemTools::UpperCase(*i); + mod_upper += ".mod"; + std::string mod_lower = mod_dir; + mod_lower += "/"; + mod_lower += *i; + mod_lower += ".mod"; + std::string stamp = stamp_dir; + stamp += "/"; + stamp += *i; + stamp += ".mod.stamp"; + fcStream << "\n"; + fcStream << " \"" << + this->LocalGenerator->Convert(mod_lower.c_str(), + cmLocalGenerator::START_OUTPUT) + << "\"\n"; + fcStream << " \"" << + this->LocalGenerator->Convert(mod_upper.c_str(), + cmLocalGenerator::START_OUTPUT) + << "\"\n"; + fcStream << " \"" << + this->LocalGenerator->Convert(stamp.c_str(), + cmLocalGenerator::START_OUTPUT) + << "\"\n"; + } + fcStream << " )\n"; + } + return true; +} + +//---------------------------------------------------------------------------- +void cmDependsFortran::LocateModules() +{ + // Collect the set of modules provided and required by all sources. + typedef cmDependsFortranInternals::ObjectInfoMap ObjectInfoMap; + ObjectInfoMap const& objInfo = this->Internal->ObjectInfo; + for(ObjectInfoMap::const_iterator infoI = objInfo.begin(); + infoI != objInfo.end(); ++infoI) + { + cmDependsFortranSourceInfo const& info = infoI->second; + for(std::set::const_iterator i = info.Provides.begin(); + i != info.Provides.end(); ++i) + { + // Include this module in the set provided by this target. + this->Internal->TargetProvides.insert(*i); + } + + for(std::set::const_iterator i = info.Requires.begin(); + i != info.Requires.end(); ++i) + { + // Include this module in the set required by this target. + this->Internal->TargetRequires[*i] = ""; + } + } + + // Short-circuit for simple targets. + if(this->Internal->TargetRequires.empty()) + { + return; + } + + // Match modules provided by this target to those it requires. + this->MatchLocalModules(); + + // Load information about other targets. + cmMakefile* mf = this->LocalGenerator->GetMakefile(); + std::vector infoFiles; + if(const char* infoFilesValue = + mf->GetDefinition("CMAKE_TARGET_LINKED_INFO_FILES")) + { + cmSystemTools::ExpandListArgument(infoFilesValue, infoFiles); + } + for(std::vector::const_iterator i = infoFiles.begin(); + i != infoFiles.end(); ++i) + { + std::string targetDir = cmSystemTools::GetFilenamePath(*i); + std::string fname = targetDir + "/fortran.internal"; + std::ifstream fin(fname.c_str()); + if(fin) + { + this->MatchRemoteModules(fin, targetDir.c_str()); + } + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortran::MatchLocalModules() +{ + const char* stampDir = this->TargetDirectory.c_str(); + std::set const& provides = this->Internal->TargetProvides; + for(std::set::const_iterator i = provides.begin(); + i != provides.end(); ++i) + { + this->ConsiderModule(i->c_str(), stampDir); + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortran::MatchRemoteModules(std::istream& fin, + const char* stampDir) +{ + std::string line; + bool doing_provides = false; + while(cmSystemTools::GetLineFromStream(fin, line)) + { + // Ignore comments and empty lines. + if(line.empty() || line[0] == '#' || line[0] == '\r') + { + continue; + } + + if(line[0] == ' ') + { + if(doing_provides) + { + this->ConsiderModule(line.c_str()+1, stampDir); + } + } + else if(line == "provides") + { + doing_provides = true; + } + else + { + doing_provides = false; + } + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortran::ConsiderModule(const char* name, + const char* stampDir) +{ + // Locate each required module. + typedef cmDependsFortranInternals::TargetRequiresMap TargetRequiresMap; + TargetRequiresMap::iterator required = + this->Internal->TargetRequires.find(name); + if(required != this->Internal->TargetRequires.end() && + required->second.empty()) + { + // The module is provided by a CMake target. It will have a stamp file. + std::string stampFile = stampDir; + stampFile += "/"; + stampFile += name; + stampFile += ".mod.stamp"; + required->second = stampFile; + } +} + +//---------------------------------------------------------------------------- +bool +cmDependsFortran +::WriteDependenciesReal(const char *obj, + cmDependsFortranSourceInfo const& info, + const char* mod_dir, const char* stamp_dir, + std::ostream& makeDepends, + std::ostream& internalDepends) +{ + typedef cmDependsFortranInternals::TargetRequiresMap TargetRequiresMap; + + // Get the source file for this object. + const char* src = info.Source.c_str(); + + // Write the include dependencies to the output stream. + internalDepends << obj << std::endl; + internalDepends << " " << src << std::endl; + for(std::set::const_iterator i = info.Includes.begin(); + i != info.Includes.end(); ++i) + { + makeDepends << obj << ": " + << cmSystemTools::ConvertToOutputPath(i->c_str()).c_str() + << std::endl; + internalDepends << " " << i->c_str() << std::endl; + } + makeDepends << std::endl; + + // Write module requirements to the output stream. + for(std::set::const_iterator i = info.Requires.begin(); + i != info.Requires.end(); ++i) + { + // Require only modules not provided in the same source. + if(std::set::const_iterator(info.Provides.find(*i)) != + info.Provides.end()) + { + continue; + } + + // If the module is provided in this target special handling is + // needed. + if(this->Internal->TargetProvides.find(*i) != + this->Internal->TargetProvides.end()) + { + // The module is provided by a different source in the same + // target. Add the proxy dependency to make sure the other + // source builds first. + std::string proxy = stamp_dir; + proxy += "/"; + proxy += *i; + proxy += ".mod.proxy"; + proxy = this->LocalGenerator->Convert(proxy.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + + // since we require some things add them to our list of requirements + makeDepends << obj << ".requires: " << proxy << std::endl; + } + + // The object file should depend on timestamped files for the + // modules it uses. + TargetRequiresMap::const_iterator required = + this->Internal->TargetRequires.find(*i); + if(required == this->Internal->TargetRequires.end()) { abort(); } + if(!required->second.empty()) + { + // This module is known. Depend on its timestamp file. + std::string stampFile = + this->LocalGenerator->Convert(required->second.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::SHELL); + makeDepends << obj << ": " << stampFile << "\n"; + } + else + { + // This module is not known to CMake. Try to locate it where + // the compiler will and depend on that. + std::string module; + if(this->FindModule(*i, module)) + { + module = + this->LocalGenerator->Convert(module.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::SHELL); + makeDepends << obj << ": " << module << "\n"; + } + } + } + + // Write provided modules to the output stream. + for(std::set::const_iterator i = info.Provides.begin(); + i != info.Provides.end(); ++i) + { + std::string proxy = stamp_dir; + proxy += "/"; + proxy += *i; + proxy += ".mod.proxy"; + proxy = this->LocalGenerator->Convert(proxy.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + makeDepends << proxy << ": " << obj << ".provides" << std::endl; + } + + // If any modules are provided then they must be converted to stamp files. + if(!info.Provides.empty()) + { + // Create a target to copy the module after the object file + // changes. + makeDepends << obj << ".provides.build:\n"; + for(std::set::const_iterator i = info.Provides.begin(); + i != info.Provides.end(); ++i) + { + // Include this module in the set provided by this target. + this->Internal->TargetProvides.insert(*i); + + // Always use lower case for the mod stamp file name. The + // cmake_copy_f90_mod will call back to this class, which will + // try various cases for the real mod file name. + std::string m = cmSystemTools::LowerCase(*i); + std::string modFile = mod_dir; + modFile += "/"; + modFile += *i; + modFile = + this->LocalGenerator->Convert(modFile.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::SHELL); + std::string stampFile = stamp_dir; + stampFile += "/"; + stampFile += m; + stampFile += ".mod.stamp"; + stampFile = + this->LocalGenerator->Convert(stampFile.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::SHELL); + makeDepends << "\t$(CMAKE_COMMAND) -E cmake_copy_f90_mod " + << modFile << " " << stampFile; + cmMakefile* mf = this->LocalGenerator->GetMakefile(); + const char* cid = mf->GetDefinition("CMAKE_Fortran_COMPILER_ID"); + if(cid && *cid) + { + makeDepends << " " << cid; + } + makeDepends << "\n"; + } + // After copying the modules update the timestamp file so that + // copying will not be done again until the source rebuilds. + makeDepends << "\t$(CMAKE_COMMAND) -E touch " << obj + << ".provides.build\n"; + + // Make sure the module timestamp rule is evaluated by the time + // the target finishes building. + std::string driver = this->TargetDirectory; + driver += "/build"; + driver = this->LocalGenerator->Convert(driver.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + makeDepends << driver << ": " << obj << ".provides.build\n"; + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::FindModule(std::string const& name, + std::string& module) +{ + // Construct possible names for the module file. + std::string mod_upper = cmSystemTools::UpperCase(name); + std::string mod_lower = name; + mod_upper += ".mod"; + mod_lower += ".mod"; + + // Search the include path for the module. + std::string fullName; + for(std::vector::const_iterator i = + this->IncludePath->begin(); i != this->IncludePath->end(); ++i) + { + // Try the lower-case name. + fullName = *i; + fullName += "/"; + fullName += mod_lower; + if(cmSystemTools::FileExists(fullName.c_str(), true)) + { + module = fullName; + return true; + } + + // Try the upper-case name. + fullName = *i; + fullName += "/"; + fullName += mod_upper; + if(cmSystemTools::FileExists(fullName.c_str(), true)) + { + module = fullName; + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::CopyModule(const std::vector& args) +{ + // Implements + // + // $(CMAKE_COMMAND) -E cmake_copy_f90_mod input.mod output.mod.stamp + // [compiler-id] + // + // Note that the case of the .mod file depends on the compiler. In + // the future this copy could also account for the fact that some + // compilers include a timestamp in the .mod file so it changes even + // when the interface described in the module does not. + + std::string mod = args[2]; + std::string stamp = args[3]; + std::string compilerId; + if(args.size() >= 5) + { + compilerId = args[4]; + } + std::string mod_dir = cmSystemTools::GetFilenamePath(mod); + if(!mod_dir.empty()) { mod_dir += "/"; } + std::string mod_upper = mod_dir; + mod_upper += cmSystemTools::UpperCase(cmSystemTools::GetFilenameName(mod)); + std::string mod_lower = mod_dir; + mod_lower += cmSystemTools::LowerCase(cmSystemTools::GetFilenameName(mod)); + mod += ".mod"; + mod_upper += ".mod"; + mod_lower += ".mod"; + if(cmSystemTools::FileExists(mod_upper.c_str(), true)) + { + if(cmDependsFortran::ModulesDiffer(mod_upper.c_str(), stamp.c_str(), + compilerId.c_str())) + { + if(!cmSystemTools::CopyFileAlways(mod_upper.c_str(), stamp.c_str())) + { + std::cerr << "Error copying Fortran module from \"" + << mod_upper.c_str() << "\" to \"" << stamp.c_str() + << "\".\n"; + return false; + } + } + return true; + } + else if(cmSystemTools::FileExists(mod_lower.c_str(), true)) + { + if(cmDependsFortran::ModulesDiffer(mod_lower.c_str(), stamp.c_str(), + compilerId.c_str())) + { + if(!cmSystemTools::CopyFileAlways(mod_lower.c_str(), stamp.c_str())) + { + std::cerr << "Error copying Fortran module from \"" + << mod_lower.c_str() << "\" to \"" << stamp.c_str() + << "\".\n"; + return false; + } + } + return true; + } + + std::cerr << "Error copying Fortran module \"" << args[2].c_str() + << "\". Tried \"" << mod_upper.c_str() + << "\" and \"" << mod_lower.c_str() << "\".\n"; + return false; +} + +//---------------------------------------------------------------------------- +// Helper function to look for a short sequence in a stream. If this +// is later used for longer sequences it should be re-written using an +// efficient string search algorithm such as Boyer-Moore. +static +bool cmDependsFortranStreamContainsSequence(std::ifstream& ifs, + const char* seq, int len) +{ + assert(len > 0); + + int cur = 0; + while(cur < len) + { + // Get the next character. + int token = ifs.get(); + if(!ifs) + { + return false; + } + + // Check the character. + if(token == static_cast(seq[cur])) + { + ++cur; + } + else + { + // Assume the sequence has no repeating subsequence. + cur = 0; + } + } + + // The entire sequence was matched. + return true; +} + +//---------------------------------------------------------------------------- +// Helper function to compare the remaining content in two streams. +static bool cmDependsFortranStreamsDiffer(std::ifstream& ifs1, + std::ifstream& ifs2) +{ + // Compare the remaining content. + for(;;) + { + int ifs1_c = ifs1.get(); + int ifs2_c = ifs2.get(); + if(!ifs1 && !ifs2) + { + // We have reached the end of both streams simultaneously. + // The streams are identical. + return false; + } + + if(!ifs1 || !ifs2 || ifs1_c != ifs2_c) + { + // We have reached the end of one stream before the other or + // found differing content. The streams are different. + break; + } + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::ModulesDiffer(const char* modFile, + const char* stampFile, + const char* compilerId) +{ + /* + gnu: + A mod file is an ascii file. + + FORTRAN module created from /path/to/foo.f90 on Sun Dec 30 22:47:58 2007 + If you edit this, you'll get what you deserve. + ... + + As you can see the first line contains the date. + + intel: + A mod file is a binary file. + However, looking into both generated bar.mod files with a hex editor + shows that they differ only before a sequence linefeed-zero (0x0A 0x00) + which is located some bytes in front of the absoulte path to the source + file. + + sun: + A mod file is a binary file. Compiling twice produces identical modules. + + others: + TODO ... + */ + + + /* Compilers which do _not_ produce different mod content when the same + * source is compiled twice + * -SunPro + */ + if(strcmp(compilerId, "SunPro") == 0) + { + return cmSystemTools::FilesDiffer(modFile, stampFile); + } + +#if defined(_WIN32) || defined(__CYGWIN__) + std::ifstream finModFile(modFile, std::ios::in | std::ios::binary); + std::ifstream finStampFile(stampFile, std::ios::in | std::ios::binary); +#else + std::ifstream finModFile(modFile, std::ios::in); + std::ifstream finStampFile(stampFile, std::ios::in); +#endif + if(!finModFile || !finStampFile) + { + // At least one of the files does not exist. The modules differ. + return true; + } + + /* Compilers which _do_ produce different mod content when the same + * source is compiled twice + * -GNU + * -Intel + * + * Eat the stream content until all recompile only realated changes + * are left bedind. + */ + if (strcmp(compilerId, "GNU") == 0 ) + { + const char seq[1] = {'\n'}; + const int seqlen = 1; + + if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen)) + { + // The module is of unexpected format. Assume it is different. + std::cerr << compilerId << " fortran module " << modFile + << " has unexpected format." << std::endl; + return true; + } + + if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen)) + { + // The stamp must differ if the sequence is not contained. + return true; + } + } + else if(strcmp(compilerId, "Intel") == 0) + { + const char seq[2] = {'\n', '\0'}; + const int seqlen = 2; + + if(!cmDependsFortranStreamContainsSequence(finModFile, seq, seqlen)) + { + // The module is of unexpected format. Assume it is different. + std::cerr << compilerId << " fortran module " << modFile + << " has unexpected format." << std::endl; + return true; + } + + if(!cmDependsFortranStreamContainsSequence(finStampFile, seq, seqlen)) + { + // The stamp must differ if the sequence is not contained. + return true; + } + } + + // Compare the remainng content. If no compiler id matched above, + // including the case none was given, this will compare the whole + // content. + if(!cmDependsFortranStreamsDiffer(finModFile, finStampFile)) + { + return false; + } + + // The modules are different. + return true; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortran::FindIncludeFile(const char* dir, + const char* includeName, + std::string& fileName) +{ + // If the file is a full path, include it directly. + if(cmSystemTools::FileIsFullPath(includeName)) + { + fileName = includeName; + return cmSystemTools::FileExists(fileName.c_str(), true); + } + else + { + // Check for the file in the directory containing the including + // file. + std::string fullName = dir; + fullName += "/"; + fullName += includeName; + if(cmSystemTools::FileExists(fullName.c_str(), true)) + { + fileName = fullName; + return true; + } + + // Search the include path for the file. + for(std::vector::const_iterator i = + this->IncludePath->begin(); i != this->IncludePath->end(); ++i) + { + fullName = *i; + fullName += "/"; + fullName += includeName; + if(cmSystemTools::FileExists(fullName.c_str(), true)) + { + fileName = fullName; + return true; + } + } + } + return false; +} + +//---------------------------------------------------------------------------- +cmDependsFortranParser_s +::cmDependsFortranParser_s(cmDependsFortran* self, + std::set& ppDefines, + cmDependsFortranSourceInfo& info): + Self(self), PPDefinitions(ppDefines), Info(info) +{ + this->InInterface = 0; + this->InPPFalseBranch = 0; + + // Initialize the lexical scanner. + cmDependsFortran_yylex_init(&this->Scanner); + cmDependsFortran_yyset_extra(this, this->Scanner); + + // Create a dummy buffer that is never read but is the fallback + // buffer when the last file is popped off the stack. + YY_BUFFER_STATE buffer = + cmDependsFortran_yy_create_buffer(0, 4, this->Scanner); + cmDependsFortran_yy_switch_to_buffer(buffer, this->Scanner); +} + +//---------------------------------------------------------------------------- +cmDependsFortranParser_s::~cmDependsFortranParser_s() +{ + cmDependsFortran_yylex_destroy(this->Scanner); +} + +//---------------------------------------------------------------------------- +bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser, + const char* fname) +{ + // Open the new file and push it onto the stack. Save the old + // buffer with it on the stack. + if(FILE* file = fopen(fname, "rb")) + { + YY_BUFFER_STATE current = + cmDependsFortranLexer_GetCurrentBuffer(parser->Scanner); + std::string dir = cmSystemTools::GetParentDirectory(fname); + cmDependsFortranFile f(file, current, dir); + YY_BUFFER_STATE buffer = + cmDependsFortran_yy_create_buffer(0, 16384, parser->Scanner); + cmDependsFortran_yy_switch_to_buffer(buffer, parser->Scanner); + parser->FileStack.push(f); + return 1; + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser) +{ + // Pop one file off the stack and close it. Switch the lexer back + // to the next one on the stack. + if(parser->FileStack.empty()) + { + return 0; + } + else + { + cmDependsFortranFile f = parser->FileStack.top(); parser->FileStack.pop(); + fclose(f.File); + YY_BUFFER_STATE current = + cmDependsFortranLexer_GetCurrentBuffer(parser->Scanner); + cmDependsFortran_yy_delete_buffer(current, parser->Scanner); + cmDependsFortran_yy_switch_to_buffer(f.Buffer, parser->Scanner); + return 1; + } +} + +//---------------------------------------------------------------------------- +int cmDependsFortranParser_Input(cmDependsFortranParser* parser, + char* buffer, size_t bufferSize) +{ + // Read from the file on top of the stack. If the stack is empty, + // the end of the translation unit has been reached. + if(!parser->FileStack.empty()) + { + FILE* file = parser->FileStack.top().File; + return (int)fread(buffer, 1, bufferSize, file); + } + return 0; +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_StringStart(cmDependsFortranParser* parser) +{ + parser->TokenString = ""; +} + +//---------------------------------------------------------------------------- +const char* cmDependsFortranParser_StringEnd(cmDependsFortranParser* parser) +{ + return parser->TokenString.c_str(); +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser, + char c) +{ + parser->TokenString += c; +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser, + bool in) +{ + if(parser->InPPFalseBranch) + { + return; + } + + parser->InInterface = in; +} + +//---------------------------------------------------------------------------- +bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser) +{ + return parser->InInterface; +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser, + int arg) +{ + parser->OldStartcond = arg; +} + +//---------------------------------------------------------------------------- +int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser) +{ + return parser->OldStartcond; +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_Error(cmDependsFortranParser*, const char*) +{ + // If there is a parser error just ignore it. The source will not + // compile and the user will edit it. Then dependencies will have + // to be regenerated anyway. +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser, + const char* name) +{ + if(!parser->InPPFalseBranch) + { + parser->Info.Requires.insert(cmSystemTools::LowerCase(name) ); + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser, + const char* name) +{ + if(parser->InPPFalseBranch) + { + return; + } + + // If processing an include statement there must be an open file. + assert(!parser->FileStack.empty()); + + // Get the directory containing the source in which the include + // statement appears. This is always the first search location for + // Fortran include files. + std::string dir = parser->FileStack.top().Directory; + + // Find the included file. If it cannot be found just ignore the + // problem because either the source will not compile or the user + // does not care about depending on this included source. + std::string fullName; + if(parser->Self->FindIncludeFile(dir.c_str(), name, fullName)) + { + // Found the included file. Save it in the set of included files. + parser->Info.Includes.insert(fullName); + + // Parse it immediately to translate the source inline. + cmDependsFortranParser_FilePush(parser, fullName.c_str()); + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser, + const char* name) +{ + if(!parser->InPPFalseBranch && !parser->InInterface) + { + parser->Info.Provides.insert(cmSystemTools::LowerCase(name)); + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser, + const char* macro) +{ + if(!parser->InPPFalseBranch) + { + parser->PPDefinitions.insert(macro); + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser, + const char* macro) +{ + if(!parser->InPPFalseBranch) + { + std::set::iterator match; + match = parser->PPDefinitions.find(macro); + if(match != parser->PPDefinitions.end()) + { + parser->PPDefinitions.erase(match); + } + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser, + const char* macro) +{ + // A new PP branch has been opened + parser->SkipToEnd.push(false); + + if (parser->InPPFalseBranch) + { + parser->InPPFalseBranch++; + } + else if(parser->PPDefinitions.find(macro) == parser->PPDefinitions.end()) + { + parser->InPPFalseBranch=1; + } + else + { + parser->SkipToEnd.top() = true; + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser, + const char* macro) +{ + // A new PP branch has been opened + parser->SkipToEnd.push(false); + + if (parser->InPPFalseBranch) + { + parser->InPPFalseBranch++; + } + else if(parser->PPDefinitions.find(macro) != parser->PPDefinitions.end()) + { + parser->InPPFalseBranch = 1; + } + else + { + // ignore other branches + parser->SkipToEnd.top() = true; + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser) +{ + /* Note: The current parser is _not_ able to get statements like + * #if 0 + * #if 1 + * #if MYSMBOL + * #if defined(MYSYMBOL) + * #if defined(MYSYMBOL) && ... + * right. The same for #elif. Thus in + * #if SYMBOL_1 + * .. + * #elif SYMBOL_2 + * ... + * ... + * #elif SYMBOL_N + * .. + * #else + * .. + * #endif + * _all_ N+1 branches are considered. If you got something like this + * #if defined(MYSYMBOL) + * #if !defined(MYSYMBOL) + * use + * #ifdef MYSYMBOL + * #ifndef MYSYMBOL + * instead. + */ + + // A new PP branch has been opened + // Never skip! See note above. + parser->SkipToEnd.push(false); +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser) +{ + /* Note: There are parser limitations. See the note at + * cmDependsFortranParser_RuleIf(..) + */ + + // Allways taken unless an #ifdef or #ifndef-branch has been taken + // already. If the second condition isn't meet already + // (parser->InPPFalseBranch == 0) correct it. + if(!parser->SkipToEnd.empty() && + parser->SkipToEnd.top() && !parser->InPPFalseBranch) + { + parser->InPPFalseBranch = 1; + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser) +{ + // if the parent branch is false do nothing! + if(parser->InPPFalseBranch > 1) + { + return; + } + + // parser->InPPFalseBranch is either 0 or 1. We change it denpending on + // parser->SkipToEnd.top() + if(!parser->SkipToEnd.empty() && + parser->SkipToEnd.top()) + { + parser->InPPFalseBranch = 1; + } + else + { + parser->InPPFalseBranch = 0; + } +} + +//---------------------------------------------------------------------------- +void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser) +{ + if(!parser->SkipToEnd.empty()) + { + parser->SkipToEnd.pop(); + } + + // #endif doesn't know if there was a "#else" in before, so it + // always decreases InPPFalseBranch + if(parser->InPPFalseBranch) + { + parser->InPPFalseBranch--; + } +} diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h new file mode 100644 index 000000000..dae8ad780 --- /dev/null +++ b/Source/cmDependsFortran.h @@ -0,0 +1,100 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortran.h,v $ + Language: C++ + Date: $Date: 2008-01-09 15:30:10 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsFortran_h +#define cmDependsFortran_h + +#include "cmDepends.h" + +class cmDependsFortranInternals; +class cmDependsFortranSourceInfo; + +/** \class cmDependsFortran + * \brief Dependency scanner for Fortran object files. + */ +class cmDependsFortran: public cmDepends +{ +public: + /** Checking instances need to know the build directory name and the + relative path from the build directory to the target file. */ + cmDependsFortran(); + + /** Scanning need to know the build directory name, the relative + path from the build directory to the target file, the source + file from which to start scanning, the include file search + path, and the target directory. */ + cmDependsFortran(std::vector const& includes, + std::vector const& defines); + + /** Virtual destructor to cleanup subclasses properly. */ + virtual ~cmDependsFortran(); + + /** Callback from build system after a .mod file has been generated + by a Fortran90 compiler to copy the .mod file to the + corresponding stamp file. */ + static bool CopyModule(const std::vector& args); + + /** Determine if a mod file and the corresponding mod.stamp file + are representing different module information. */ + static bool ModulesDiffer(const char* modFile, const char* stampFile, + const char* compilerId); + + /** Method to find an included file in the include path. Fortran + always searches the directory containing the including source + first. */ + bool FindIncludeFile(const char* dir, const char* includeName, + std::string& fileName); + +protected: + // Finalize the dependency information for the target. + virtual bool Finalize(std::ostream& makeDepends, + std::ostream& internalDepends); + + // Find all the modules required by the target. + void LocateModules(); + void MatchLocalModules(); + void MatchRemoteModules(std::istream& fin, const char* stampDir); + void ConsiderModule(const char* name, const char* stampDir); + bool FindModule(std::string const& name, std::string& module); + + // Implement writing/checking methods required by superclass. + virtual bool WriteDependencies( + const char *src, const char *file, + std::ostream& makeDepends, std::ostream& internalDepends); + + // Actually write the depenencies to the streams. + bool WriteDependenciesReal(const char *obj, + cmDependsFortranSourceInfo const& info, + const char* mod_dir, const char* stamp_dir, + std::ostream& makeDepends, + std::ostream& internalDepends); + + // The source file from which to start scanning. + std::string SourceFile; + + // The include file search path. + std::vector const* IncludePath; + std::vector PPDefinitions; + + // Internal implementation details. + cmDependsFortranInternals* Internal; + +private: + cmDependsFortran(cmDependsFortran const&); // Purposely not implemented. + void operator=(cmDependsFortran const&); // Purposely not implemented. +}; + +#endif diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx new file mode 100644 index 000000000..6e868d70e --- /dev/null +++ b/Source/cmDependsFortranLexer.cxx @@ -0,0 +1,2398 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranLexer.cxx,v $ + Language: C++ + Date: $Date: 2008-04-24 16:56:25 $ + Version: $Revision: 1.10.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#line 2 "cmDependsFortranLexer.cxx" + +#line 4 "cmDependsFortranLexer.cxx" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 34 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmDependsFortran_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + * Given that the standard has decreed that size_t exists since 1989, + * I guess we can afford to depend on it. Manoj. + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmDependsFortran_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmDependsFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmDependsFortran_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmDependsFortran_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmDependsFortran_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmDependsFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmDependsFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsFortran_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmDependsFortran_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmDependsFortran_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmDependsFortran_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmDependsFortran_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 43 +#define YY_END_OF_BUFFER 44 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[161] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 44, 38, 40, 39, 42, 1, 38, 31, 2, 33, + 38, 39, 36, 38, 37, 38, 37, 40, 38, 39, + 38, 37, 9, 8, 9, 4, 3, 38, 0, 10, + 0, 0, 0, 0, 0, 31, 31, 32, 34, 36, + 38, 37, 0, 41, 37, 0, 0, 0, 0, 0, + 0, 0, 0, 38, 0, 11, 37, 0, 0, 5, + 0, 0, 0, 27, 0, 0, 31, 31, 31, 31, + 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, + 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 29, 0, 0, 0, 0, 0, 0, + 0, 22, 23, 0, 0, 0, 0, 0, 0, 0, + 0, 30, 25, 0, 0, 18, 0, 0, 24, 19, + 0, 0, 17, 0, 0, 16, 26, 0, 0, 15, + 20, 0, 7, 35, 7, 13, 0, 12, 14, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 6, 7, 8, 9, 1, 10, 11, 1, + 1, 12, 1, 13, 1, 1, 1, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, 16, 1, + 17, 18, 19, 1, 20, 20, 21, 22, 23, 24, + 20, 20, 25, 20, 20, 26, 20, 27, 20, 20, + 20, 20, 28, 20, 29, 20, 20, 20, 20, 20, + 1, 30, 1, 1, 31, 1, 20, 20, 32, 33, + + 34, 35, 20, 20, 36, 20, 20, 37, 20, 38, + 20, 20, 20, 20, 39, 20, 40, 20, 20, 20, + 20, 20, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[41] = + { 0, + 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, + 3, 1, 3, 5, 1, 3, 3, 1, 1, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 1, + 5, 6, 6, 6, 6, 6, 6, 6, 6, 6 + } ; + +static yyconst flex_int16_t yy_base[169] = + { 0, + 0, 39, 0, 40, 184, 47, 43, 53, 55, 63, + 186, 0, 476, 476, 164, 476, 79, 72, 476, 476, + 143, 476, 130, 126, 0, 83, 119, 85, 149, 139, + 189, 220, 476, 131, 89, 476, 476, 0, 132, 476, + 259, 37, 69, 76, 34, 119, 137, 476, 0, 476, + 121, 0, 150, 476, 0, 154, 298, 0, 75, 138, + 142, 72, 127, 338, 94, 476, 0, 84, 158, 186, + 81, 145, 108, 172, 147, 173, 260, 266, 284, 299, + 272, 173, 178, 286, 245, 258, 285, 285, 78, 71, + 207, 476, 288, 291, 296, 304, 310, 315, 317, 326, + + 330, 330, 335, 338, 338, 341, 343, 341, 348, 62, + 52, 346, 476, 476, 353, 355, 357, 352, 359, 359, + 359, 476, 476, 363, 365, 370, 366, 375, 46, 38, + 378, 476, 476, 378, 381, 476, 376, 384, 476, 476, + 384, 387, 476, 115, 0, 476, 476, 388, 393, 476, + 476, 394, 476, 476, 476, 476, 398, 476, 476, 476, + 432, 438, 443, 445, 451, 457, 463, 469 + } ; + +static yyconst flex_int16_t yy_def[169] = + { 0, + 160, 1, 1, 1, 1, 1, 161, 161, 161, 161, + 160, 162, 160, 160, 163, 160, 162, 160, 160, 160, + 162, 160, 160, 162, 164, 162, 164, 160, 162, 160, + 165, 160, 160, 160, 160, 160, 160, 162, 163, 160, + 160, 160, 160, 160, 160, 160, 166, 160, 162, 160, + 162, 164, 160, 160, 27, 160, 160, 57, 160, 160, + 160, 160, 160, 165, 165, 160, 32, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 166, 166, 166, 166, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 167, 168, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 0, + 160, 160, 160, 160, 160, 160, 160, 160 + } ; + +static yyconst flex_int16_t yy_nxt[517] = + { 0, + 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, + 19, 12, 20, 12, 21, 22, 23, 12, 24, 25, + 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, + 27, 25, 25, 25, 25, 25, 25, 25, 25, 25, + 28, 28, 145, 28, 28, 34, 29, 29, 28, 30, + 144, 28, 35, 36, 29, 34, 130, 34, 31, 71, + 76, 37, 35, 36, 35, 34, 129, 32, 32, 37, + 71, 76, 35, 46, 46, 111, 46, 47, 32, 32, + 41, 48, 110, 41, 53, 54, 56, 53, 90, 56, + 69, 70, 57, 69, 72, 73, 66, 83, 88, 74, + + 42, 43, 75, 44, 93, 72, 73, 45, 83, 88, + 74, 42, 43, 75, 44, 93, 154, 154, 45, 38, + 46, 46, 81, 46, 47, 81, 38, 38, 48, 96, + 38, 89, 55, 38, 40, 68, 38, 38, 78, 46, + 96, 78, 79, 63, 51, 82, 80, 50, 38, 55, + 58, 53, 54, 58, 53, 56, 82, 49, 56, 69, + 70, 57, 69, 84, 85, 86, 40, 99, 87, 94, + 59, 60, 95, 61, 84, 85, 86, 62, 99, 87, + 94, 59, 60, 95, 61, 160, 30, 91, 62, 64, + 91, 66, 160, 97, 100, 92, 64, 64, 98, 101, + + 64, 102, 64, 64, 97, 100, 64, 64, 91, 98, + 101, 91, 102, 160, 160, 160, 92, 160, 64, 64, + 65, 65, 66, 65, 65, 65, 65, 65, 65, 65, + 65, 65, 65, 67, 65, 65, 65, 65, 65, 67, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 65, + 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, + 41, 78, 46, 41, 78, 79, 105, 78, 46, 80, + 78, 79, 160, 81, 160, 80, 81, 105, 160, 106, + 42, 43, 160, 44, 107, 78, 46, 45, 78, 79, + 106, 42, 43, 80, 44, 107, 82, 160, 45, 58, + + 78, 46, 58, 78, 79, 108, 109, 82, 80, 160, + 103, 160, 112, 104, 113, 160, 108, 109, 114, 59, + 60, 103, 61, 112, 104, 113, 62, 160, 115, 114, + 59, 60, 116, 61, 160, 160, 117, 62, 64, 115, + 66, 160, 118, 116, 160, 64, 64, 117, 119, 64, + 120, 64, 64, 118, 121, 64, 64, 160, 122, 119, + 123, 120, 124, 125, 126, 121, 127, 64, 64, 122, + 128, 123, 131, 124, 125, 126, 132, 127, 133, 134, + 135, 128, 136, 131, 137, 138, 139, 132, 140, 133, + 134, 135, 141, 136, 142, 137, 138, 139, 143, 140, + + 146, 147, 148, 141, 149, 142, 150, 151, 152, 143, + 156, 146, 147, 148, 157, 149, 158, 150, 151, 152, + 159, 156, 160, 160, 160, 157, 160, 158, 160, 160, + 160, 159, 33, 33, 33, 33, 33, 33, 38, 160, + 160, 160, 38, 39, 39, 39, 39, 39, 39, 52, + 52, 65, 65, 65, 65, 65, 65, 77, 77, 77, + 77, 77, 77, 153, 153, 153, 160, 153, 153, 155, + 160, 155, 160, 155, 155, 11, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160 + } ; + +static yyconst flex_int16_t yy_chk[517] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 4, 130, 2, 4, 7, 2, 4, 6, 6, + 129, 6, 7, 7, 6, 8, 111, 9, 6, 42, + 45, 9, 8, 8, 9, 10, 110, 6, 6, 10, + 42, 45, 10, 18, 18, 90, 18, 18, 6, 6, + 17, 18, 89, 17, 26, 26, 28, 26, 68, 28, + 35, 35, 28, 35, 43, 43, 65, 59, 62, 44, + + 17, 17, 44, 17, 71, 43, 43, 17, 59, 62, + 44, 17, 17, 44, 17, 71, 144, 144, 17, 27, + 46, 46, 51, 46, 46, 51, 27, 27, 46, 73, + 27, 63, 27, 27, 39, 34, 27, 27, 47, 47, + 73, 47, 47, 30, 24, 51, 47, 23, 27, 27, + 29, 53, 53, 29, 53, 56, 51, 21, 56, 69, + 69, 56, 69, 60, 60, 61, 15, 75, 61, 72, + 29, 29, 72, 29, 60, 60, 61, 29, 75, 61, + 72, 29, 29, 72, 29, 11, 5, 70, 29, 31, + 70, 31, 0, 74, 76, 70, 31, 31, 74, 82, + + 31, 83, 31, 31, 74, 76, 31, 31, 91, 74, + 82, 91, 83, 0, 0, 0, 91, 0, 31, 31, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 41, 77, 77, 41, 77, 77, 85, 78, 78, 77, + 78, 78, 0, 81, 0, 78, 81, 85, 0, 86, + 41, 41, 0, 41, 86, 79, 79, 41, 79, 79, + 86, 41, 41, 79, 41, 86, 81, 0, 41, 57, + + 80, 80, 57, 80, 80, 87, 88, 81, 80, 0, + 84, 0, 93, 84, 94, 0, 87, 88, 95, 57, + 57, 84, 57, 93, 84, 94, 57, 0, 96, 95, + 57, 57, 97, 57, 0, 0, 98, 57, 64, 96, + 64, 0, 99, 97, 0, 64, 64, 98, 100, 64, + 101, 64, 64, 99, 102, 64, 64, 0, 103, 100, + 104, 101, 105, 106, 107, 102, 108, 64, 64, 103, + 109, 104, 112, 105, 106, 107, 115, 108, 116, 117, + 118, 109, 119, 112, 120, 121, 124, 115, 125, 116, + 117, 118, 126, 119, 127, 120, 121, 124, 128, 125, + + 131, 134, 135, 126, 137, 127, 138, 141, 142, 128, + 148, 131, 134, 135, 149, 137, 152, 138, 141, 142, + 157, 148, 0, 0, 0, 149, 0, 152, 0, 0, + 0, 157, 161, 161, 161, 161, 161, 161, 162, 0, + 0, 0, 162, 163, 163, 163, 163, 163, 163, 164, + 164, 165, 165, 165, 165, 165, 165, 166, 166, 166, + 166, 166, 166, 167, 167, 167, 0, 167, 167, 168, + 0, 168, 0, 168, 168, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + + 160, 160, 160, 160, 160, 160, 160, 160, 160, 160, + 160, 160, 160, 160, 160, 160 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmDependsFortranLexer.in.l" +#line 2 "cmDependsFortranLexer.in.l" +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranLexer.cxx,v $ + Language: C++ + Date: $Date: 2008-04-24 16:56:25 $ + Version: $Revision: 1.10.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex -i --prefix=cmDependsFortran_yy --header-file=cmDependsFortranLexer.h -ocmDependsFortranLexer.cxx cmDependsFortranLexer.in.l + +Modify cmDependsFortranLexer.cxx: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmDependsFortranLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#define cmDependsFortranLexer_cxx +#include "cmDependsFortranParser.h" /* Interface to parser object. */ + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmDependsFortranParser_Input(yyextra, buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsFortranParserTokens.h" + +/*--------------------------------------------------------------------------*/ + + +#line 670 "cmDependsFortranLexer.cxx" + +#define INITIAL 0 +#define free_fmt 1 +#define fixed_fmt 2 +#define str_sq 3 +#define str_dq 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +static int yy_init_globals (yyscan_t yyscanner ); + +int cmDependsFortran_yylex_init (yyscan_t* scanner); + +int cmDependsFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsFortran_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsFortran_yyget_debug (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsFortran_yyget_extra (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmDependsFortran_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsFortran_yyget_text (yyscan_t yyscanner ); + +int cmDependsFortran_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsFortran_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsFortran_yywrap (yyscan_t yyscanner ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + int n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsFortran_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsFortran_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if ( yyleng > 0 ) \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 75 "cmDependsFortranLexer.in.l" + + +#line 901 "cmDependsFortranLexer.cxx" + + if ( !yyg->yy_init ) + { + yyg->yy_init = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmDependsFortran_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsFortran_yy_load_buffer_state(yyscanner ); + } + + for(;;) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 161 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 476 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 77 "cmDependsFortranLexer.in.l" +{ + cmDependsFortranParser_StringStart(yyextra); + cmDependsFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_dq); +} + YY_BREAK +case 2: +YY_RULE_SETUP +#line 83 "cmDependsFortranLexer.in.l" +{ + cmDependsFortranParser_StringStart(yyextra); + cmDependsFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_sq); +} + YY_BREAK +case 3: +#line 90 "cmDependsFortranLexer.in.l" +case 4: +YY_RULE_SETUP +#line 90 "cmDependsFortranLexer.in.l" +{ + BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra) ); + yylvalp->string = strdup(cmDependsFortranParser_StringEnd(yyextra)); + return STRING; +} +case 5: +/* rule 5 can match eol */ +#line 97 "cmDependsFortranLexer.in.l" +case 6: +/* rule 6 can match eol */ +YY_RULE_SETUP +#line 97 "cmDependsFortranLexer.in.l" +/* Ignore (continued strings, free fmt) */ + YY_BREAK +case 7: +/* rule 7 can match eol */ +YY_RULE_SETUP +#line 99 "cmDependsFortranLexer.in.l" +{ + if (cmDependsFortranParser_GetOldStartcond(yyextra) == fixed_fmt) + ; /* Ignore (cont. strings, fixed fmt) */ + else + { + unput(yytext[strlen(yytext)-1]); + } +} + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 109 "cmDependsFortranLexer.in.l" +{ + unput ('\n'); + BEGIN(INITIAL); + return UNTERMINATED_STRING; +} +case 9: +YY_RULE_SETUP +#line 115 "cmDependsFortranLexer.in.l" +{ + cmDependsFortranParser_StringAppend(yyextra, yytext[0]); +} + YY_BREAK +case 10: +/* rule 10 can match eol */ +YY_RULE_SETUP +#line 119 "cmDependsFortranLexer.in.l" +{ return EOSTMT; } /* Treat comments like */ +case 11: +/* rule 11 can match eol */ +YY_RULE_SETUP +#line 120 "cmDependsFortranLexer.in.l" +{ return EOSTMT; } /* empty lines */ +case 12: +YY_RULE_SETUP +#line 122 "cmDependsFortranLexer.in.l" +{ return CPP_INCLUDE; } +case 13: +YY_RULE_SETUP +#line 123 "cmDependsFortranLexer.in.l" +{ return F90PPR_INCLUDE; } +case 14: +YY_RULE_SETUP +#line 124 "cmDependsFortranLexer.in.l" +{ return COCO_INCLUDE; } +case 15: +YY_RULE_SETUP +#line 126 "cmDependsFortranLexer.in.l" +{ return CPP_DEFINE; } +case 16: +YY_RULE_SETUP +#line 127 "cmDependsFortranLexer.in.l" +{ return F90PPR_DEFINE; } +case 17: +YY_RULE_SETUP +#line 129 "cmDependsFortranLexer.in.l" +{ return CPP_UNDEF; } +case 18: +YY_RULE_SETUP +#line 130 "cmDependsFortranLexer.in.l" +{ return F90PPR_UNDEF; } +case 19: +YY_RULE_SETUP +#line 132 "cmDependsFortranLexer.in.l" +{ return CPP_IFDEF; } +case 20: +YY_RULE_SETUP +#line 133 "cmDependsFortranLexer.in.l" +{ return CPP_IFNDEF; } +case 21: +YY_RULE_SETUP +#line 134 "cmDependsFortranLexer.in.l" +{ return CPP_IF; } +case 22: +YY_RULE_SETUP +#line 135 "cmDependsFortranLexer.in.l" +{ return CPP_ELIF; } +case 23: +YY_RULE_SETUP +#line 136 "cmDependsFortranLexer.in.l" +{ return CPP_ELSE; } +case 24: +YY_RULE_SETUP +#line 137 "cmDependsFortranLexer.in.l" +{ return CPP_ENDIF; } +case 25: +YY_RULE_SETUP +#line 139 "cmDependsFortranLexer.in.l" +{ return F90PPR_IFDEF; } +case 26: +YY_RULE_SETUP +#line 140 "cmDependsFortranLexer.in.l" +{ return F90PPR_IFNDEF; } +case 27: +YY_RULE_SETUP +#line 141 "cmDependsFortranLexer.in.l" +{ return F90PPR_IF; } +case 28: +YY_RULE_SETUP +#line 142 "cmDependsFortranLexer.in.l" +{ return F90PPR_ELIF; } +case 29: +YY_RULE_SETUP +#line 143 "cmDependsFortranLexer.in.l" +{ return F90PPR_ELSE; } +case 30: +YY_RULE_SETUP +#line 144 "cmDependsFortranLexer.in.l" +{ return F90PPR_ENDIF; } +/* Line continuations, possible involving comments. */ +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +#line 147 "cmDependsFortranLexer.in.l" + + YY_BREAK +case 32: +/* rule 32 can match eol */ +YY_RULE_SETUP +#line 148 "cmDependsFortranLexer.in.l" + + YY_BREAK +case 33: +YY_RULE_SETUP +#line 150 "cmDependsFortranLexer.in.l" +{ return COMMA; } +case 34: +YY_RULE_SETUP +#line 152 "cmDependsFortranLexer.in.l" +{ return DCOLON; } +case 35: +/* rule 35 can match eol */ +YY_RULE_SETUP +#line 154 "cmDependsFortranLexer.in.l" +{ return GARBAGE; } +case 36: +YY_RULE_SETUP +#line 156 "cmDependsFortranLexer.in.l" +{ return ASSIGNMENT_OP; } +case 37: +YY_RULE_SETUP +#line 158 "cmDependsFortranLexer.in.l" +{ + yylvalp->string = strdup(yytext); + return WORD; +} +case 38: +YY_RULE_SETUP +#line 163 "cmDependsFortranLexer.in.l" +{ return GARBAGE; } +case 39: +/* rule 39 can match eol */ +YY_RULE_SETUP +#line 165 "cmDependsFortranLexer.in.l" +{ return EOSTMT; } +case 40: +YY_RULE_SETUP +#line 168 "cmDependsFortranLexer.in.l" +/* Ignore */ + YY_BREAK +case 41: +/* rule 41 can match eol */ +YY_RULE_SETUP +#line 169 "cmDependsFortranLexer.in.l" +/* Ignore line-endings preceeded by \ */ + YY_BREAK +case 42: +YY_RULE_SETUP +#line 171 "cmDependsFortranLexer.in.l" +{ return *yytext; } +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(free_fmt): +case YY_STATE_EOF(fixed_fmt): +case YY_STATE_EOF(str_sq): +case YY_STATE_EOF(str_dq): +#line 173 "cmDependsFortranLexer.in.l" +{ + if(!cmDependsFortranParser_FilePop(yyextra) ) + { + return YY_NULL; + } +} + YY_BREAK +case 43: +YY_RULE_SETUP +#line 180 "cmDependsFortranLexer.in.l" +ECHO; + YY_BREAK +#line 1247 "cmDependsFortranLexer.cxx" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmDependsFortran_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmDependsFortran_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of cmDependsFortran_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmDependsFortran_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmDependsFortran_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) cmDependsFortran_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + yy_current_state += YY_AT_BOL(); + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 161 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 161 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 160); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) +{ + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_cp = yyg->yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yyg->yy_hold_char; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yyg->yy_n_chars + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + yyg->yytext_ptr = yy_bp; + yyg->yy_hold_char = *yy_cp; + yyg->yy_c_buf_p = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmDependsFortran_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmDependsFortran_yywrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmDependsFortran_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmDependsFortran_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsFortran_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsFortran_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmDependsFortran_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmDependsFortran_yypop_buffer_state(); + * cmDependsFortran_yypush_buffer_state(new_buffer); + */ + cmDependsFortran_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmDependsFortran_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmDependsFortran_yywrap()) processing, but the only time this flag + * is looked at is after cmDependsFortran_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmDependsFortran_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmDependsFortran_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmDependsFortran_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmDependsFortran_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmDependsFortran_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmDependsFortran_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmDependsFortran_yyfree((void *) b ,yyscanner ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmDependsFortran_yyrestart() or at EOF. + */ + static void cmDependsFortran_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmDependsFortran_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmDependsFortran_yy_init_buffer was _probably_ + * called from cmDependsFortran_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmDependsFortran_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmDependsFortran_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmDependsFortran_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmDependsFortran_yy_switch_to_buffer. */ + cmDependsFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmDependsFortran_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmDependsFortran_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" ); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsFortran_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + if ( ! yyg->yy_buffer_stack ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsFortran_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) cmDependsFortran_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmDependsFortran_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmDependsFortran_yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmDependsFortran_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) +{ + + return cmDependsFortran_yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmDependsFortran_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsFortran_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) cmDependsFortran_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsFortran_yy_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmDependsFortran_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmDependsFortran_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmDependsFortran_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmDependsFortran_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmDependsFortran_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmDependsFortran_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmDependsFortran_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmDependsFortran_yyset_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmDependsFortran_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmDependsFortran_yyset_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmDependsFortran_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmDependsFortran_yy_switch_to_buffer + */ +void cmDependsFortran_yyset_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void cmDependsFortran_yyset_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int cmDependsFortran_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmDependsFortran_yyset_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +/* User-visible API */ + +/* cmDependsFortran_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmDependsFortran_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmDependsFortran_yylex_init_extra has the same functionality as cmDependsFortran_yylex_init, but follows the + * convention of taking the scanner as the last argument. Note however, that + * this is a *pointer* to a scanner, as it will be allocated by this call (and + * is the reason, too, why this function also must handle its own declaration). + * The user defined value in the first argument will be available to cmDependsFortran_yyalloc in + * the yyextra field. + */ + +int cmDependsFortran_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) + +{ + struct yyguts_t dummy_yyguts; + + cmDependsFortran_yyset_extra (yy_user_defined, &dummy_yyguts); + + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmDependsFortran_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in + yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + cmDependsFortran_yyset_extra (yy_user_defined, *ptr_yy_globals); + + return yy_init_globals ( *ptr_yy_globals ); +} + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from cmDependsFortran_yylex_destroy(), so don't allocate here. + */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 0; + yyg->yy_start = 0; + + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = NULL; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmDependsFortran_yylex_init() + */ + return 0; +} + +/* cmDependsFortran_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmDependsFortran_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmDependsFortran_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmDependsFortran_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmDependsFortran_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmDependsFortran_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * cmDependsFortran_yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + + /* Destroy the main struct (reentrant only). */ + cmDependsFortran_yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmDependsFortran_yyalloc (yy_size_t size , yyscan_t) +{ + return (void *) malloc( size ); +} + +void *cmDependsFortran_yyrealloc (void * ptr, yy_size_t size , yyscan_t) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void cmDependsFortran_yyfree (void * ptr , yyscan_t) +{ + free( (char *) ptr ); /* see cmDependsFortran_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 180 "cmDependsFortranLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +YY_BUFFER_STATE cmDependsFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) +{ + /* Hack into the internal flex-generated scanner to get the buffer. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return YY_CURRENT_BUFFER; +} + diff --git a/Source/cmDependsFortranLexer.h b/Source/cmDependsFortranLexer.h new file mode 100644 index 000000000..d66e24267 --- /dev/null +++ b/Source/cmDependsFortranLexer.h @@ -0,0 +1,346 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranLexer.h,v $ + Language: C++ + Date: $Date: 2008-04-21 19:21:57 $ + Version: $Revision: 1.7.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsFortran_yyHEADER_H +#define cmDependsFortran_yyHEADER_H 1 +#define cmDependsFortran_yyIN_HEADER 1 + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 34 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + * Given that the standard has decreed that size_t exists since 1989, + * I guess we can afford to depend on it. Manoj. + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmDependsFortran_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsFortran_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmDependsFortran_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsFortran_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsFortran_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmDependsFortran_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmDependsFortran_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsFortran_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmDependsFortran_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsFortran_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsFortran_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmDependsFortran_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define free_fmt 1 +#define fixed_fmt 2 +#define str_sq 3 +#define str_dq 4 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +int cmDependsFortran_yylex_init (yyscan_t* scanner); + +int cmDependsFortran_yylex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsFortran_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsFortran_yyget_debug (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsFortran_yyget_extra (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmDependsFortran_yyget_in (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmDependsFortran_yyget_out (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmDependsFortran_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsFortran_yyget_text (yyscan_t yyscanner ); + +int cmDependsFortran_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsFortran_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsFortran_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsFortran_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsFortran_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsFortran_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#undef cmDependsFortran_yyIN_HEADER +#endif /* cmDependsFortran_yyHEADER_H */ diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l new file mode 100644 index 000000000..583aa8e2c --- /dev/null +++ b/Source/cmDependsFortranLexer.in.l @@ -0,0 +1,188 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranLexer.in.l,v $ + Language: C++ + Date: $Date: 2008-04-24 16:56:25 $ + Version: $Revision: 1.10.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex -i --prefix=cmDependsFortran_yy --header-file=cmDependsFortranLexer.h -ocmDependsFortranLexer.cxx cmDependsFortranLexer.in.l + +Modify cmDependsFortranLexer.cxx: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmDependsFortranLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#define cmDependsFortranLexer_cxx +#include "cmDependsFortranParser.h" /* Interface to parser object. */ + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmDependsFortranParser_Input(yyextra, buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsFortranParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + + +%option reentrant +%option noyywrap +%pointer + +%s free_fmt fixed_fmt +%x str_sq str_dq + +%% + +\" { + cmDependsFortranParser_StringStart(yyextra); + cmDependsFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_dq); +} + +' { + cmDependsFortranParser_StringStart(yyextra); + cmDependsFortranParser_SetOldStartcond(yyextra, YY_START); + BEGIN(str_sq); +} + +\" | +' { + BEGIN(cmDependsFortranParser_GetOldStartcond(yyextra) ); + yylvalp->string = strdup(cmDependsFortranParser_StringEnd(yyextra)); + return STRING; +} + +&[ \t]*\n | +&[ \t]*\n[ \t]*& /* Ignore (continued strings, free fmt) */ + +\n[ ]{5}[^ \t\n] { + if (cmDependsFortranParser_GetOldStartcond(yyextra) == fixed_fmt) + ; /* Ignore (cont. strings, fixed fmt) */ + else + { + unput(yytext[strlen(yytext)-1]); + } +} + + +\n { + unput ('\n'); + BEGIN(INITIAL); + return UNTERMINATED_STRING; +} + +. { + cmDependsFortranParser_StringAppend(yyextra, yytext[0]); +} + +!.*\n { return EOSTMT; } /* Treat comments like */ +^[cC*dD].*\n { return EOSTMT; } /* empty lines */ + +^[ \t]*#[ \t]*include { return CPP_INCLUDE; } +\$[ \t]*include { return F90PPR_INCLUDE; } +\?\?[ \t]*include { return COCO_INCLUDE; } + +^[ \t]*#[ \t]*define { return CPP_DEFINE; } +\$[ \t]*DEFINE { return F90PPR_DEFINE; } + +^[ \t]*#[ \t]*undef { return CPP_UNDEF; } +\$[ \t]*UNDEF { return F90PPR_UNDEF; } + +^[ \t]*#[ \t]*ifdef { return CPP_IFDEF; } +^[ \t]*#[ \t]*ifndef { return CPP_IFNDEF; } +^[ \t]*#[ \t]*if { return CPP_IF; } +^[ \t]*#[ \t]*elif { return CPP_ELIF; } +^[ \t]*#[ \t]*else { return CPP_ELSE; } +^[ \t]*#[ \t]*endif { return CPP_ENDIF; } + +$[ \t]*ifdef { return F90PPR_IFDEF; } +$[ \t]*ifndef { return F90PPR_IFNDEF; } +$[ \t]*if { return F90PPR_IF; } +$[ \t]*elif { return F90PPR_ELIF; } +$[ \t]*else { return F90PPR_ELSE; } +$[ \t]*endif { return F90PPR_ENDIF; } + + /* Line continuations, possible involving comments. */ +&([ \t\n]*|!.*)* +&([ \t\n]*|!.*)*& + +, { return COMMA; } + +:: { return DCOLON; } + +\n[ ]{5}[^ ] { return GARBAGE; } + +=|=> { return ASSIGNMENT_OP; } + +[a-zA-Z_][a-zA-Z_0-9]* { + yylvalp->string = strdup(yytext); + return WORD; +} + +[^ \t\n\r;,!'"a-zA-Z=&]+ { return GARBAGE; } + +;|\n { return EOSTMT; } + + +[ \t\r,] /* Ignore */ +\\[ \t]*\n /* Ignore line-endings preceeded by \ */ + +. { return *yytext; } + +<> { + if(!cmDependsFortranParser_FilePop(yyextra) ) + { + return YY_NULL; + } +} + +%% + +/*--------------------------------------------------------------------------*/ +YY_BUFFER_STATE cmDependsFortranLexer_GetCurrentBuffer(yyscan_t yyscanner) +{ + /* Hack into the internal flex-generated scanner to get the buffer. */ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return YY_CURRENT_BUFFER; +} diff --git a/Source/cmDependsFortranParser.cxx b/Source/cmDependsFortranParser.cxx new file mode 100644 index 000000000..2ce632df9 --- /dev/null +++ b/Source/cmDependsFortranParser.cxx @@ -0,0 +1,2038 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse cmDependsFortran_yyparse +#define yylex cmDependsFortran_yylex +#define yyerror cmDependsFortran_yyerror +#define yylval cmDependsFortran_yylval +#define yychar cmDependsFortran_yychar +#define yydebug cmDependsFortran_yydebug +#define yynerrs cmDependsFortran_yynerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EOSTMT = 258, + ASSIGNMENT_OP = 259, + GARBAGE = 260, + CPP_INCLUDE = 261, + F90PPR_INCLUDE = 262, + COCO_INCLUDE = 263, + F90PPR_DEFINE = 264, + CPP_DEFINE = 265, + F90PPR_UNDEF = 266, + CPP_UNDEF = 267, + CPP_IFDEF = 268, + CPP_IFNDEF = 269, + CPP_IF = 270, + CPP_ELSE = 271, + CPP_ELIF = 272, + CPP_ENDIF = 273, + F90PPR_IFDEF = 274, + F90PPR_IFNDEF = 275, + F90PPR_IF = 276, + F90PPR_ELSE = 277, + F90PPR_ELIF = 278, + F90PPR_ENDIF = 279, + COMMA = 280, + DCOLON = 281, + CPP_TOENDL = 282, + UNTERMINATED_STRING = 283, + STRING = 284, + WORD = 285 + }; +#endif +/* Tokens. */ +#define EOSTMT 258 +#define ASSIGNMENT_OP 259 +#define GARBAGE 260 +#define CPP_INCLUDE 261 +#define F90PPR_INCLUDE 262 +#define COCO_INCLUDE 263 +#define F90PPR_DEFINE 264 +#define CPP_DEFINE 265 +#define F90PPR_UNDEF 266 +#define CPP_UNDEF 267 +#define CPP_IFDEF 268 +#define CPP_IFNDEF 269 +#define CPP_IF 270 +#define CPP_ELSE 271 +#define CPP_ELIF 272 +#define CPP_ENDIF 273 +#define F90PPR_IFDEF 274 +#define F90PPR_IFNDEF 275 +#define F90PPR_IF 276 +#define F90PPR_ELSE 277 +#define F90PPR_ELIF 278 +#define F90PPR_ENDIF 279 +#define COMMA 280 +#define DCOLON 281 +#define CPP_TOENDL 282 +#define UNTERMINATED_STRING 283 +#define STRING 284 +#define WORD 285 + + + + +/* Copy the first part of user declarations. */ +#line 1 "cmDependsFortranParser.y" + +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranParser.cxx,v $ + Language: C++ + Date: $Date: 2008-04-24 16:56:25 $ + Version: $Revision: 1.16.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsFortran_yy + --defines=cmDependsFortranParserTokens.h + -ocmDependsFortranParser.cxx + cmDependsFortranParser.y + +Modify cmDependsFortranParser.cxx: + - remove TABs + - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] +*/ + +/*-------------------------------------------------------------------------*/ +#define cmDependsFortranParser_cxx +#include "cmDependsFortranParser.h" /* Interface to parser object. */ +#include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmDependsFortran_yyerror(x) \ + cmDependsFortranError(yyscanner, x) + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback. */ +static void cmDependsFortranError(yyscan_t yyscanner, const char* message) +{ + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_Error(parser, message); +} + +static char charmap[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +inline int strcasecmpCM(const char *s1, const char *s2) +{ + const char *cm = charmap; + const char* us1 = s1; + const char* us2 = s2; + + while(cm[*us1] == cm[*us2++]) + if(*us1++ == '\0') + { + return(0); + } + return(cm[*us1] - cm[*--us2]); +} + +static bool cmDependsFortranParserIsKeyword(const char* word, + const char* keyword) +{ + return strcasecmpCM(word, keyword) == 0; +} + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch contains default but no case. */ +# pragma warning (disable: 4701) /* Local variable may not be initialized. */ +# pragma warning (disable: 4702) /* Unreachable code. */ +# pragma warning (disable: 4127) /* Conditional expression is constant. */ +# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 141 "cmDependsFortranParser.y" +{ + char* string; +} +/* Line 187 of yacc.c. */ +#line 305 "cmDependsFortranParser.cxx" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 216 of yacc.c. */ +#line 318 "cmDependsFortranParser.cxx" + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int i) +#else +static int +YYID (i) + int i; +#endif +{ + return i; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 2 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 271 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 31 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 16 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 52 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 94 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 285 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 4, 7, 9, 11, 16, 19, 24, + 30, 38, 43, 48, 53, 58, 63, 68, 72, 76, + 80, 84, 89, 93, 95, 97, 99, 101, 103, 105, + 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, + 127, 129, 131, 133, 135, 136, 139, 141, 143, 145, + 147, 149, 151 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 32, 0, -1, -1, 32, 33, -1, 35, -1, 34, + -1, 30, 4, 45, 3, -1, 30, 3, -1, 30, + 30, 45, 3, -1, 30, 26, 30, 45, 3, -1, + 30, 25, 30, 26, 30, 45, 3, -1, 30, 29, + 45, 3, -1, 36, 29, 45, 3, -1, 37, 30, + 45, 3, -1, 38, 30, 45, 3, -1, 39, 30, + 45, 3, -1, 40, 30, 45, 3, -1, 41, 45, + 3, -1, 42, 45, 3, -1, 43, 45, 3, -1, + 44, 45, 3, -1, 30, 5, 45, 3, -1, 5, + 45, 3, -1, 3, -1, 1, -1, 6, -1, 7, + -1, 8, -1, 10, -1, 9, -1, 12, -1, 11, + -1, 13, -1, 19, -1, 14, -1, 20, -1, 15, + -1, 21, -1, 17, -1, 23, -1, 16, -1, 22, + -1, 18, -1, 24, -1, -1, 45, 46, -1, 30, + -1, 29, -1, 5, -1, 4, -1, 26, -1, 25, + -1, 28, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 162, 162, 162, 164, 164, 166, 172, 182, 212, + 223, 236, 247, 254, 260, 266, 272, 278, 283, 288, + 293, 298, 302, 303, 304, 309, 309, 309, 310, 310, + 311, 311, 312, 312, 313, 313, 314, 314, 315, 315, + 316, 316, 317, 317, 318, 318, 321, 322, 323, 324, + 325, 326, 327 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "EOSTMT", "ASSIGNMENT_OP", "GARBAGE", + "CPP_INCLUDE", "F90PPR_INCLUDE", "COCO_INCLUDE", "F90PPR_DEFINE", + "CPP_DEFINE", "F90PPR_UNDEF", "CPP_UNDEF", "CPP_IFDEF", "CPP_IFNDEF", + "CPP_IF", "CPP_ELSE", "CPP_ELIF", "CPP_ENDIF", "F90PPR_IFDEF", + "F90PPR_IFNDEF", "F90PPR_IF", "F90PPR_ELSE", "F90PPR_ELIF", + "F90PPR_ENDIF", "COMMA", "DCOLON", "CPP_TOENDL", "UNTERMINATED_STRING", + "STRING", "WORD", "$accept", "code", "stmt", "assignment_stmt", + "keyword_stmt", "include", "define", "undef", "ifdef", "ifndef", "if", + "elif", "else", "endif", "other", "misc_code", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 31, 32, 32, 33, 33, 34, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, + 35, 35, 35, 35, 35, 36, 36, 36, 37, 37, + 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, + 43, 43, 44, 44, 45, 45, 46, 46, 46, 46, + 46, 46, 46 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 1, 4, 2, 4, 5, + 7, 4, 4, 4, 4, 4, 4, 3, 3, 3, + 3, 4, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, + 1, 1, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 2, 0, 1, 24, 23, 44, 25, 26, 27, 29, + 28, 31, 30, 32, 34, 36, 40, 38, 42, 33, + 35, 37, 41, 39, 43, 0, 3, 5, 4, 0, + 0, 0, 0, 0, 44, 44, 44, 44, 0, 7, + 44, 44, 0, 0, 44, 44, 44, 44, 44, 44, + 44, 0, 0, 0, 0, 22, 49, 48, 51, 50, + 52, 47, 46, 45, 0, 0, 0, 44, 0, 0, + 0, 0, 0, 0, 0, 17, 18, 19, 20, 6, + 21, 0, 0, 11, 8, 12, 13, 14, 15, 16, + 44, 9, 0, 10 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = +{ + -1, 1, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 63 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -35 +static const yytype_int16 yypact[] = +{ + -35, 29, -35, -35, -35, -35, -35, -35, -35, -35, + -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, -35, -35, -35, -35, 241, -35, -35, -35, -25, + -22, -21, -13, -12, -35, -35, -35, -35, 57, -35, + -35, -35, -11, -10, -35, -35, -35, -35, -35, -35, + -35, 63, 69, 75, 103, -35, -35, -35, -35, -35, + -35, -35, -35, -35, 109, 115, -5, -35, 121, 149, + 155, 161, 167, 195, 201, -35, -35, -35, -35, -35, + -35, -8, 207, -35, -35, -35, -35, -35, -35, -35, + -35, -35, 213, -35 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = +{ + -35, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, -35, -35, -35, -34, -35 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const yytype_uint8 yytable[] = +{ + 51, 52, 53, 54, 46, 0, 64, 65, 47, 48, + 68, 69, 70, 71, 72, 73, 74, 49, 50, 66, + 67, 81, 90, 0, 0, 0, 0, 0, 0, 2, + 3, 0, 4, 82, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 0, 0, 92, 0, 0, 25, + 55, 56, 57, 0, 0, 0, 75, 56, 57, 0, + 0, 0, 76, 56, 57, 0, 0, 0, 77, 56, + 57, 0, 58, 59, 0, 60, 61, 62, 58, 59, + 0, 60, 61, 62, 58, 59, 0, 60, 61, 62, + 58, 59, 0, 60, 61, 62, 78, 56, 57, 0, + 0, 0, 79, 56, 57, 0, 0, 0, 80, 56, + 57, 0, 0, 0, 83, 56, 57, 0, 58, 59, + 0, 60, 61, 62, 58, 59, 0, 60, 61, 62, + 58, 59, 0, 60, 61, 62, 58, 59, 0, 60, + 61, 62, 84, 56, 57, 0, 0, 0, 85, 56, + 57, 0, 0, 0, 86, 56, 57, 0, 0, 0, + 87, 56, 57, 0, 58, 59, 0, 60, 61, 62, + 58, 59, 0, 60, 61, 62, 58, 59, 0, 60, + 61, 62, 58, 59, 0, 60, 61, 62, 88, 56, + 57, 0, 0, 0, 89, 56, 57, 0, 0, 0, + 91, 56, 57, 0, 0, 0, 93, 56, 57, 0, + 58, 59, 0, 60, 61, 62, 58, 59, 0, 60, + 61, 62, 58, 59, 0, 60, 61, 62, 58, 59, + 0, 60, 61, 62, 39, 40, 41, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 42, 43, 0, 0, + 44, 45 +}; + +static const yytype_int8 yycheck[] = +{ + 34, 35, 36, 37, 29, -1, 40, 41, 30, 30, + 44, 45, 46, 47, 48, 49, 50, 30, 30, 30, + 30, 26, 30, -1, -1, -1, -1, -1, -1, 0, + 1, -1, 3, 67, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, -1, -1, 90, -1, -1, 30, + 3, 4, 5, -1, -1, -1, 3, 4, 5, -1, + -1, -1, 3, 4, 5, -1, -1, -1, 3, 4, + 5, -1, 25, 26, -1, 28, 29, 30, 25, 26, + -1, 28, 29, 30, 25, 26, -1, 28, 29, 30, + 25, 26, -1, 28, 29, 30, 3, 4, 5, -1, + -1, -1, 3, 4, 5, -1, -1, -1, 3, 4, + 5, -1, -1, -1, 3, 4, 5, -1, 25, 26, + -1, 28, 29, 30, 25, 26, -1, 28, 29, 30, + 25, 26, -1, 28, 29, 30, 25, 26, -1, 28, + 29, 30, 3, 4, 5, -1, -1, -1, 3, 4, + 5, -1, -1, -1, 3, 4, 5, -1, -1, -1, + 3, 4, 5, -1, 25, 26, -1, 28, 29, 30, + 25, 26, -1, 28, 29, 30, 25, 26, -1, 28, + 29, 30, 25, 26, -1, 28, 29, 30, 3, 4, + 5, -1, -1, -1, 3, 4, 5, -1, -1, -1, + 3, 4, 5, -1, -1, -1, 3, 4, 5, -1, + 25, 26, -1, 28, 29, 30, 25, 26, -1, 28, + 29, 30, 25, 26, -1, 28, 29, 30, 25, 26, + -1, 28, 29, 30, 3, 4, 5, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 25, 26, -1, -1, + 29, 30 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 32, 0, 1, 3, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 30, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 3, + 4, 5, 25, 26, 29, 30, 29, 30, 30, 30, + 30, 45, 45, 45, 45, 3, 4, 5, 25, 26, + 28, 29, 30, 46, 45, 45, 30, 30, 45, 45, + 45, 45, 45, 45, 45, 3, 3, 3, 3, 3, + 3, 26, 45, 3, 3, 3, 3, 3, 3, 3, + 30, 3, 45, 3 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) +#else +static void +yy_stack_print (bottom, top) + yytype_int16 *bottom; + yytype_int16 *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + fprintf (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + fprintf (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ + + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The look-ahead symbol. */ +int yychar; + +/* The semantic value of the look-ahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + int yystate; + int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Look-ahead token as an internal (translated) token number. */ + int yytoken = 0; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss = yyssa; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp; + + + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + look-ahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to look-ahead token. */ + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a look-ahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the look-ahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 6: +#line 167 "cmDependsFortranParser.y" + { + free((yyvsp[(1) - (4)].string)); + } + break; + + case 7: +#line 173 "cmDependsFortranParser.y" + { + if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (2)].string), "interface")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, true); + } + free((yyvsp[(1) - (2)].string)); + } + break; + + case 8: +#line 183 "cmDependsFortranParser.y" + { + if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "use")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, (yyvsp[(2) - (4)].string)); + } + else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "module")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleModule(parser, (yyvsp[(2) - (4)].string)); + } + else if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "interface")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, true); + } + else if (cmDependsFortranParserIsKeyword((yyvsp[(2) - (4)].string), "interface") && + cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "end")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, false); + } + free((yyvsp[(1) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 9: +#line 213 "cmDependsFortranParser.y" + { + if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (5)].string), "use")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, (yyvsp[(3) - (5)].string)); + } + free((yyvsp[(1) - (5)].string)); + free((yyvsp[(3) - (5)].string)); + } + break; + + case 10: +#line 224 "cmDependsFortranParser.y" + { + if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (7)].string), "use") && + cmDependsFortranParserIsKeyword((yyvsp[(3) - (7)].string), "non_intrinsic") ) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, (yyvsp[(5) - (7)].string)); + } + free((yyvsp[(1) - (7)].string)); + free((yyvsp[(3) - (7)].string)); + free((yyvsp[(5) - (7)].string)); + } + break; + + case 11: +#line 237 "cmDependsFortranParser.y" + { + if (cmDependsFortranParserIsKeyword((yyvsp[(1) - (4)].string), "include")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string)); + } + free((yyvsp[(1) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 12: +#line 248 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleInclude(parser, (yyvsp[(2) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 13: +#line 255 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleDefine(parser, (yyvsp[(2) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 14: +#line 261 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUndef(parser, (yyvsp[(2) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 15: +#line 267 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIfdef(parser, (yyvsp[(2) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 16: +#line 273 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIfndef(parser, (yyvsp[(2) - (4)].string)); + free((yyvsp[(2) - (4)].string)); + } + break; + + case 17: +#line 279 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIf(parser); + } + break; + + case 18: +#line 284 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleElif(parser); + } + break; + + case 19: +#line 289 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleElse(parser); + } + break; + + case 20: +#line 294 "cmDependsFortranParser.y" + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleEndif(parser); + } + break; + + case 21: +#line 299 "cmDependsFortranParser.y" + { + free((yyvsp[(1) - (4)].string)); + } + break; + + case 46: +#line 321 "cmDependsFortranParser.y" + { free ((yyvsp[(1) - (1)].string)); } + break; + + case 47: +#line 322 "cmDependsFortranParser.y" + { free ((yyvsp[(1) - (1)].string)); } + break; + + +/* Line 1267 of yacc.c. */ +#line 1820 "cmDependsFortranParser.cxx" + default: break; + } + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse look-ahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + +#if 0 + /* Else will try to reuse look-ahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: +#endif + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEOF && yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + +#line 330 "cmDependsFortranParser.y" + +/* End of grammar */ + diff --git a/Source/cmDependsFortranParser.h b/Source/cmDependsFortranParser.h new file mode 100644 index 000000000..109ef7ee2 --- /dev/null +++ b/Source/cmDependsFortranParser.h @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranParser.h,v $ + Language: C++ + Date: $Date: 2007-10-03 19:41:39 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsFortranParser_h +#define cmDependsFortranParser_h + +#include /* size_t */ + +/* Forward declare parser object type. */ +typedef struct cmDependsFortranParser_s cmDependsFortranParser; + +/* Functions to enter/exit #include'd files in order. */ +bool cmDependsFortranParser_FilePush(cmDependsFortranParser* parser, + const char* fname); +bool cmDependsFortranParser_FilePop(cmDependsFortranParser* parser); + +/* Callbacks for lexer. */ +int cmDependsFortranParser_Input(cmDependsFortranParser* parser, + char* buffer, size_t bufferSize); + + +void cmDependsFortranParser_StringStart(cmDependsFortranParser* parser); +const char* cmDependsFortranParser_StringEnd(cmDependsFortranParser* parser); +void cmDependsFortranParser_StringAppend(cmDependsFortranParser* parser, + char c); + +void cmDependsFortranParser_SetInInterface(cmDependsFortranParser* parser, + bool is_in); +bool cmDependsFortranParser_GetInInterface(cmDependsFortranParser* parser); + + +void cmDependsFortranParser_SetInPPFalseBranch(cmDependsFortranParser* parser, + bool is_in); +bool cmDependsFortranParser_GetInPPFalseBranch(cmDependsFortranParser* parser); + + +void cmDependsFortranParser_SetOldStartcond(cmDependsFortranParser* parser, + int arg); +int cmDependsFortranParser_GetOldStartcond(cmDependsFortranParser* parser); + +/* Callbacks for parser. */ +void cmDependsFortranParser_Error(cmDependsFortranParser* parser, + const char* message); +void cmDependsFortranParser_RuleUse(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleInclude(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleModule(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleDefine(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleUndef(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleIfdef(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleIfndef(cmDependsFortranParser* parser, + const char* name); +void cmDependsFortranParser_RuleIf(cmDependsFortranParser* parser); +void cmDependsFortranParser_RuleElif(cmDependsFortranParser* parser); +void cmDependsFortranParser_RuleElse(cmDependsFortranParser* parser); +void cmDependsFortranParser_RuleEndif(cmDependsFortranParser* parser); + +/* Define the parser stack element type. */ +typedef union cmDependsFortran_yystype_u cmDependsFortran_yystype; +union cmDependsFortran_yystype_u +{ + char* string; +}; + +/* Setup the proper yylex interface. */ +#define YY_EXTRA_TYPE cmDependsFortranParser* +#define YY_DECL \ +int cmDependsFortran_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) +#define YYSTYPE cmDependsFortran_yystype +#define YYSTYPE_IS_DECLARED 1 +#if !defined(cmDependsFortranLexer_cxx) +# include "cmDependsFortranLexer.h" +#endif +#if !defined(cmDependsFortranLexer_cxx) +#if !defined(cmDependsFortranParser_cxx) +# undef YY_EXTRA_TYPE +# undef YY_DECL +# undef YYSTYPE +# undef YYSTYPE_IS_DECLARED +#endif +#endif + +#endif diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y new file mode 100644 index 000000000..4d0e760dc --- /dev/null +++ b/Source/cmDependsFortranParser.y @@ -0,0 +1,331 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsFortranParser.y,v $ + Language: C++ + Date: $Date: 2008-04-24 16:56:25 $ + Version: $Revision: 1.18.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/*------------------------------------------------------------------------- + Portions of this source have been derived from makedepf90 version 2.8.8, + + Copyright (C) 2000--2006 Erik Edelmann + + The code was originally distributed under the GPL but permission + from the copyright holder has been obtained to distribute this + derived work under the CMake license. +-------------------------------------------------------------------------*/ + +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsFortran_yy + --defines=cmDependsFortranParserTokens.h + -ocmDependsFortranParser.cxx + cmDependsFortranParser.y + +Modify cmDependsFortranParser.cxx: + - remove TABs + - Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"] +*/ + +/*-------------------------------------------------------------------------*/ +#define cmDependsFortranParser_cxx +#include "cmDependsFortranParser.h" /* Interface to parser object. */ +#include "cmDependsFortranParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmDependsFortran_yyerror(x) \ + cmDependsFortranError(yyscanner, x) + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Helper function to forward error callback. */ +static void cmDependsFortranError(yyscan_t yyscanner, const char* message) +{ + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_Error(parser, message); +} + +static char charmap[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377' +}; + +inline int strcasecmpCM(const char *s1, const char *s2) +{ + const char *cm = charmap; + const char* us1 = s1; + const char* us2 = s2; + + while(cm[*us1] == cm[*us2++]) + if(*us1++ == '\0') + { + return(0); + } + return(cm[*us1] - cm[*--us2]); +} + +static bool cmDependsFortranParserIsKeyword(const char* word, + const char* keyword) +{ + return strcasecmpCM(word, keyword) == 0; +} + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch contains default but no case. */ +# pragma warning (disable: 4701) /* Local variable may not be initialized. */ +# pragma warning (disable: 4702) /* Unreachable code. */ +# pragma warning (disable: 4127) /* Conditional expression is constant. */ +# pragma warning (disable: 4244) /* Conversion to smaller type, data loss. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%pure-parser + +%union { + char* string; +} + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token EOSTMT ASSIGNMENT_OP GARBAGE +%token CPP_INCLUDE F90PPR_INCLUDE COCO_INCLUDE +%token F90PPR_DEFINE CPP_DEFINE F90PPR_UNDEF CPP_UNDEF +%token CPP_IFDEF CPP_IFNDEF CPP_IF CPP_ELSE CPP_ELIF CPP_ENDIF +%token F90PPR_IFDEF F90PPR_IFNDEF F90PPR_IF +%token F90PPR_ELSE F90PPR_ELIF F90PPR_ENDIF +%token COMMA DCOLON +%token CPP_TOENDL +%token UNTERMINATED_STRING +%token STRING WORD + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + +code: /* empty */ | code stmt; + +stmt: keyword_stmt | assignment_stmt; + +assignment_stmt: WORD ASSIGNMENT_OP other EOSTMT /* Ignore */ + { + free($1); + } + +keyword_stmt: + WORD EOSTMT + { + if (cmDependsFortranParserIsKeyword($1, "interface")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, true); + } + free($1); + } +| WORD WORD other EOSTMT + { + if (cmDependsFortranParserIsKeyword($1, "use")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, $2); + } + else if (cmDependsFortranParserIsKeyword($1, "module")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleModule(parser, $2); + } + else if (cmDependsFortranParserIsKeyword($1, "interface")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, true); + } + else if (cmDependsFortranParserIsKeyword($2, "interface") && + cmDependsFortranParserIsKeyword($1, "end")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_SetInInterface(parser, false); + } + free($1); + free($2); + } +| WORD DCOLON WORD other EOSTMT + { + if (cmDependsFortranParserIsKeyword($1, "use")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, $3); + } + free($1); + free($3); + } +| WORD COMMA WORD DCOLON WORD other EOSTMT + { + if (cmDependsFortranParserIsKeyword($1, "use") && + cmDependsFortranParserIsKeyword($3, "non_intrinsic") ) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUse(parser, $5); + } + free($1); + free($3); + free($5); + } +| WORD STRING other EOSTMT /* Ignore */ + { + if (cmDependsFortranParserIsKeyword($1, "include")) + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleInclude(parser, $2); + } + free($1); + free($2); + } +| include STRING other EOSTMT + { + cmDependsFortranParser* parser = + cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleInclude(parser, $2); + free($2); + } +| define WORD other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleDefine(parser, $2); + free($2); + } +| undef WORD other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleUndef(parser, $2); + free($2); + } +| ifdef WORD other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIfdef(parser, $2); + free($2); + } +| ifndef WORD other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIfndef(parser, $2); + free($2); + } +| if other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleIf(parser); + } +| elif other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleElif(parser); + } +| else other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleElse(parser); + } +| endif other EOSTMT + { + cmDependsFortranParser* parser = cmDependsFortran_yyget_extra(yyscanner); + cmDependsFortranParser_RuleEndif(parser); + } +| WORD GARBAGE other EOSTMT /* Ignore */ + { + free($1); + } +| GARBAGE other EOSTMT +| EOSTMT +| error +; + + + +include: CPP_INCLUDE | F90PPR_INCLUDE | COCO_INCLUDE ; +define: CPP_DEFINE | F90PPR_DEFINE; +undef: CPP_UNDEF | F90PPR_UNDEF ; +ifdef: CPP_IFDEF | F90PPR_IFDEF ; +ifndef: CPP_IFNDEF | F90PPR_IFNDEF ; +if: CPP_IF | F90PPR_IF ; +elif: CPP_ELIF | F90PPR_ELIF ; +else: CPP_ELSE | F90PPR_ELSE ; +endif: CPP_ENDIF | F90PPR_ENDIF ; +other: /* empty */ | other misc_code ; + +misc_code: + WORD { free ($1); } +| STRING { free ($1); } +| GARBAGE +| ASSIGNMENT_OP +| DCOLON +| COMMA +| UNTERMINATED_STRING +; + +%% +/* End of grammar */ diff --git a/Source/cmDependsFortranParserTokens.h b/Source/cmDependsFortranParserTokens.h new file mode 100644 index 000000000..607927969 --- /dev/null +++ b/Source/cmDependsFortranParserTokens.h @@ -0,0 +1,117 @@ +/* A Bison parser, made by GNU Bison 2.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EOSTMT = 258, + ASSIGNMENT_OP = 259, + GARBAGE = 260, + CPP_INCLUDE = 261, + F90PPR_INCLUDE = 262, + COCO_INCLUDE = 263, + F90PPR_DEFINE = 264, + CPP_DEFINE = 265, + F90PPR_UNDEF = 266, + CPP_UNDEF = 267, + CPP_IFDEF = 268, + CPP_IFNDEF = 269, + CPP_IF = 270, + CPP_ELSE = 271, + CPP_ELIF = 272, + CPP_ENDIF = 273, + F90PPR_IFDEF = 274, + F90PPR_IFNDEF = 275, + F90PPR_IF = 276, + F90PPR_ELSE = 277, + F90PPR_ELIF = 278, + F90PPR_ENDIF = 279, + COMMA = 280, + DCOLON = 281, + CPP_TOENDL = 282, + UNTERMINATED_STRING = 283, + STRING = 284, + WORD = 285 + }; +#endif +/* Tokens. */ +#define EOSTMT 258 +#define ASSIGNMENT_OP 259 +#define GARBAGE 260 +#define CPP_INCLUDE 261 +#define F90PPR_INCLUDE 262 +#define COCO_INCLUDE 263 +#define F90PPR_DEFINE 264 +#define CPP_DEFINE 265 +#define F90PPR_UNDEF 266 +#define CPP_UNDEF 267 +#define CPP_IFDEF 268 +#define CPP_IFNDEF 269 +#define CPP_IF 270 +#define CPP_ELSE 271 +#define CPP_ELIF 272 +#define CPP_ENDIF 273 +#define F90PPR_IFDEF 274 +#define F90PPR_IFNDEF 275 +#define F90PPR_IF 276 +#define F90PPR_ELSE 277 +#define F90PPR_ELIF 278 +#define F90PPR_ENDIF 279 +#define COMMA 280 +#define DCOLON 281 +#define CPP_TOENDL 282 +#define UNTERMINATED_STRING 283 +#define STRING 284 +#define WORD 285 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 141 "cmDependsFortranParser.y" +{ + char* string; +} +/* Line 1489 of yacc.c. */ +#line 113 "cmDependsFortranParserTokens.h" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif diff --git a/Source/cmDependsJava.cxx b/Source/cmDependsJava.cxx new file mode 100644 index 000000000..06c93df61 --- /dev/null +++ b/Source/cmDependsJava.cxx @@ -0,0 +1,49 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJava.cxx,v $ + Language: C++ + Date: $Date: 2005-10-12 17:52:29 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDependsJava.h" + +#include "cmDependsJavaParserHelper.h" +#include "cmSystemTools.h" + +//---------------------------------------------------------------------------- +cmDependsJava::cmDependsJava() +{ +} + +//---------------------------------------------------------------------------- +cmDependsJava::~cmDependsJava() +{ +} + +//---------------------------------------------------------------------------- +bool cmDependsJava::WriteDependencies(const char *src, const char *, + std::ostream&, std::ostream&) +{ + // Make sure this is a scanning instance. + if(!src || src[0] == '\0') + { + cmSystemTools::Error("Cannot scan dependencies without an source file."); + return false; + } + + return true; +} + +bool cmDependsJava::CheckDependencies(std::istream&) +{ + return true; +} diff --git a/Source/cmDependsJava.h b/Source/cmDependsJava.h new file mode 100644 index 000000000..f331f3038 --- /dev/null +++ b/Source/cmDependsJava.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJava.h,v $ + Language: C++ + Date: $Date: 2005-10-12 17:52:29 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsJava_h +#define cmDependsJava_h + +#include "cmDepends.h" + +/** \class cmDependsJava + * \brief Dependency scanner for Java class files. + */ +class cmDependsJava: public cmDepends +{ +public: + /** Checking instances need to know the build directory name and the + relative path from the build directory to the target file. */ + cmDependsJava(); + + /** Virtual destructor to cleanup subclasses properly. */ + virtual ~cmDependsJava(); + +protected: + // Implement writing/checking methods required by superclass. + virtual bool WriteDependencies(const char *src, const char *file, + std::ostream& makeDepends, std::ostream& internalDepends); + virtual bool CheckDependencies(std::istream& internalDepends); + +private: + cmDependsJava(cmDependsJava const&); // Purposely not implemented. + void operator=(cmDependsJava const&); // Purposely not implemented. +}; + +#endif diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx new file mode 100644 index 000000000..9844c83ff --- /dev/null +++ b/Source/cmDependsJavaLexer.cxx @@ -0,0 +1,2547 @@ +#include "cmStandardIncludes.h" +#line 2 "cmDependsJavaLexer.cxx" + +#line 4 "cmDependsJavaLexer.cxx" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +#if defined(__BEOS__) +#include /* prevents a conflict with a #define later on... */ +#endif + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmDependsJava_yylex_init (yyscan_t* scanner); + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmDependsJava_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmDependsJava_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmDependsJava_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmDependsJava_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmDependsJava_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmDependsJava_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmDependsJava_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 111 +#define YY_END_OF_BUFFER 112 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[327] = + { 0, + 0, 0, 0, 0, 0, 0, 112, 110, 109, 109, + 77, 4, 73, 94, 60, 110, 93, 92, 105, 99, + 68, 89, 74, 71, 56, 56, 67, 103, 86, 75, + 79, 102, 107, 64, 63, 65, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 70, 96, 69, 104, 3, 3, 6, 111, 5, + 78, 95, 61, 62, 0, 0, 106, 101, 100, 91, + 90, 57, 1, 0, 72, 57, 56, 57, 0, 56, + 0, 88, 87, 76, 80, 81, 107, 66, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 18, 107, + + 107, 107, 107, 107, 107, 26, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 97, 98, 2, 55, 55, + 0, 0, 0, 108, 57, 0, 57, 58, 85, 82, + 83, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 25, 107, + 107, 30, 107, 107, 34, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, + 107, 50, 107, 107, 107, 0, 0, 58, 84, 107, + 107, 107, 107, 11, 12, 107, 14, 107, 107, 107, + + 107, 20, 107, 107, 107, 107, 107, 107, 107, 107, + 32, 107, 59, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 107, 46, 107, 107, 54, 51, 107, + 107, 107, 107, 107, 10, 13, 15, 107, 107, 107, + 107, 22, 24, 107, 107, 107, 107, 107, 107, 107, + 107, 107, 107, 40, 107, 107, 43, 107, 107, 47, + 107, 107, 53, 107, 8, 107, 107, 107, 19, 107, + 107, 107, 28, 107, 107, 33, 107, 107, 107, 38, + 39, 41, 107, 44, 107, 48, 107, 107, 107, 9, + 107, 17, 21, 23, 107, 107, 107, 35, 36, 107, + + 107, 107, 107, 107, 7, 16, 107, 107, 107, 107, + 42, 107, 107, 52, 107, 107, 31, 37, 107, 49, + 27, 29, 107, 107, 45, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 1, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, + 19, 19, 19, 19, 19, 20, 20, 21, 22, 23, + 24, 25, 26, 1, 27, 27, 27, 28, 29, 28, + 30, 30, 30, 30, 30, 31, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 30, 32, 30, 30, + 33, 34, 35, 36, 30, 1, 37, 38, 39, 40, + + 41, 42, 43, 44, 45, 30, 46, 47, 48, 49, + 50, 51, 30, 52, 53, 54, 55, 56, 57, 58, + 59, 60, 61, 62, 63, 64, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[65] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 4, + 4, 4, 1, 1, 1, 1, 3, 3, 3, 3, + 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 1, 1, 1, 1 + } ; + +static yyconst flex_int16_t yy_base[334] = + { 0, + 0, 0, 401, 400, 62, 63, 411, 414, 414, 414, + 386, 414, 414, 385, 61, 374, 414, 414, 383, 57, + 414, 56, 54, 65, 74, 43, 414, 414, 55, 382, + 59, 414, 0, 414, 414, 381, 38, 36, 60, 46, + 51, 75, 69, 354, 82, 76, 362, 85, 56, 352, + 357, 414, 100, 414, 414, 414, 383, 414, 414, 414, + 414, 414, 414, 414, 390, 127, 414, 414, 414, 414, + 414, 129, 414, 395, 414, 132, 95, 414, 165, 414, + 0, 373, 414, 414, 414, 109, 0, 414, 343, 342, + 344, 352, 338, 101, 354, 353, 340, 346, 332, 333, + + 331, 337, 334, 332, 329, 0, 329, 110, 330, 324, + 320, 329, 336, 93, 336, 319, 322, 89, 320, 325, + 320, 114, 131, 120, 323, 414, 414, 414, 414, 358, + 170, 357, 362, 414, 173, 157, 176, 150, 414, 414, + 340, 309, 321, 314, 323, 318, 317, 318, 304, 302, + 300, 316, 314, 310, 309, 296, 311, 310, 0, 153, + 292, 304, 301, 298, 0, 295, 295, 284, 285, 291, + 282, 284, 281, 289, 292, 278, 292, 277, 279, 279, + 286, 0, 286, 288, 277, 189, 314, 414, 414, 270, + 269, 279, 273, 0, 0, 274, 0, 264, 271, 260, + + 267, 0, 264, 271, 264, 256, 268, 256, 270, 254, + 0, 249, 0, 267, 266, 261, 256, 248, 245, 253, + 258, 244, 256, 250, 0, 236, 239, 0, 0, 237, + 249, 252, 234, 250, 0, 0, 0, 237, 238, 243, + 243, 235, 0, 233, 226, 230, 236, 236, 233, 221, + 235, 234, 223, 0, 232, 216, 0, 225, 216, 214, + 221, 220, 0, 225, 0, 214, 207, 207, 0, 207, + 200, 217, 0, 218, 219, 0, 214, 213, 199, 0, + 0, 0, 210, 0, 201, 0, 209, 202, 194, 0, + 206, 0, 0, 0, 197, 204, 205, 0, 0, 202, + + 191, 192, 191, 198, 0, 0, 163, 162, 170, 170, + 0, 164, 152, 0, 152, 157, 0, 0, 127, 0, + 0, 0, 115, 95, 0, 414, 218, 222, 226, 228, + 232, 96, 235 + } ; + +static yyconst flex_int16_t yy_def[334] = + { 0, + 326, 1, 327, 327, 328, 328, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 25, 326, 326, 326, 326, + 326, 326, 330, 326, 326, 326, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 329, 326, 326, 326, 326, + 326, 326, 326, 331, 326, 326, 25, 326, 326, 326, + 332, 326, 326, 326, 326, 326, 330, 326, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 326, 326, 326, 326, 326, + 326, 333, 331, 326, 326, 326, 326, 332, 326, 326, + 326, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 326, 333, 326, 326, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, + 330, 330, 330, 330, 330, 0, 326, 326, 326, 326, + 326, 326, 326 + } ; + +static yyconst flex_int16_t yy_nxt[479] = + { 0, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, + 27, 28, 29, 30, 31, 32, 33, 33, 33, 33, + 33, 33, 34, 8, 35, 36, 37, 38, 39, 40, + 41, 42, 33, 33, 43, 33, 44, 33, 45, 33, + 46, 47, 48, 49, 33, 50, 51, 33, 33, 33, + 52, 53, 54, 55, 59, 59, 60, 60, 63, 68, + 70, 72, 72, 72, 326, 89, 73, 82, 83, 71, + 69, 74, 85, 86, 64, 91, 98, 92, 75, 76, + 90, 77, 77, 77, 93, 99, 94, 100, 138, 122, + + 326, 78, 79, 95, 80, 81, 96, 123, 101, 97, + 106, 102, 113, 78, 79, 78, 107, 108, 110, 103, + 80, 104, 111, 126, 105, 173, 326, 114, 117, 326, + 115, 81, 140, 141, 325, 130, 112, 168, 118, 119, + 174, 120, 169, 121, 131, 131, 72, 72, 72, 135, + 135, 135, 326, 147, 148, 324, 78, 79, 178, 78, + 79, 127, 161, 162, 183, 179, 184, 180, 78, 79, + 78, 78, 79, 78, 137, 137, 137, 136, 129, 136, + 188, 132, 137, 137, 137, 181, 323, 186, 186, 182, + 135, 135, 135, 137, 137, 137, 188, 129, 322, 207, + + 78, 79, 208, 78, 321, 320, 186, 186, 319, 318, + 317, 316, 78, 79, 78, 78, 315, 78, 56, 56, + 56, 56, 58, 58, 58, 58, 65, 65, 65, 65, + 87, 87, 133, 133, 133, 133, 187, 187, 314, 313, + 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, + 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, + 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, + 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, + 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, + 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, + + 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, + 242, 228, 241, 240, 239, 238, 237, 236, 235, 234, + 233, 232, 129, 231, 230, 229, 228, 227, 226, 225, + 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, + 214, 213, 212, 211, 210, 209, 206, 205, 204, 203, + 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, + 192, 191, 190, 189, 134, 129, 129, 185, 177, 176, + 175, 172, 171, 170, 167, 166, 165, 164, 163, 160, + 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, + 149, 146, 145, 144, 143, 142, 139, 134, 129, 128, + + 125, 124, 116, 109, 88, 84, 67, 66, 62, 61, + 326, 57, 57, 7, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326 + } ; + +static yyconst flex_int16_t yy_chk[479] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 5, 6, 5, 6, 15, 20, + 22, 23, 23, 23, 26, 37, 24, 29, 29, 22, + 20, 24, 31, 31, 15, 38, 40, 38, 24, 25, + 37, 25, 25, 25, 38, 40, 39, 41, 332, 49, + + 26, 25, 25, 39, 25, 25, 39, 49, 41, 39, + 43, 42, 46, 25, 25, 25, 43, 43, 45, 42, + 25, 42, 45, 53, 42, 118, 77, 46, 48, 66, + 46, 25, 86, 86, 324, 66, 45, 114, 48, 48, + 118, 48, 114, 48, 66, 66, 72, 72, 72, 76, + 76, 76, 77, 94, 94, 323, 72, 72, 122, 76, + 76, 53, 108, 108, 124, 122, 124, 123, 72, 72, + 72, 76, 76, 76, 136, 136, 136, 79, 131, 79, + 138, 66, 79, 79, 79, 123, 319, 131, 131, 123, + 135, 135, 135, 137, 137, 137, 138, 186, 316, 160, + + 135, 135, 160, 137, 315, 313, 186, 186, 312, 310, + 309, 308, 135, 135, 135, 137, 307, 137, 327, 327, + 327, 327, 328, 328, 328, 328, 329, 329, 329, 329, + 330, 330, 331, 331, 331, 331, 333, 333, 304, 303, + 302, 301, 300, 297, 296, 295, 291, 289, 288, 287, + 285, 283, 279, 278, 277, 275, 274, 272, 271, 270, + 268, 267, 266, 264, 262, 261, 260, 259, 258, 256, + 255, 253, 252, 251, 250, 249, 248, 247, 246, 245, + 244, 242, 241, 240, 239, 238, 234, 233, 232, 231, + 230, 227, 226, 224, 223, 222, 221, 220, 219, 218, + + 217, 216, 215, 214, 212, 210, 209, 208, 207, 206, + 205, 204, 203, 201, 200, 199, 198, 196, 193, 192, + 191, 190, 187, 185, 184, 183, 181, 180, 179, 178, + 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, + 167, 166, 164, 163, 162, 161, 158, 157, 156, 155, + 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, + 144, 143, 142, 141, 133, 132, 130, 125, 121, 120, + 119, 117, 116, 115, 113, 112, 111, 110, 109, 107, + 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, + 95, 93, 92, 91, 90, 89, 82, 74, 65, 57, + + 51, 50, 47, 44, 36, 30, 19, 16, 14, 11, + 7, 4, 3, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326, 326, 326, + 326, 326, 326, 326, 326, 326, 326, 326 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmDependsJavaLexer.in.l" +#line 2 "cmDependsJavaLexer.in.l" +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaLexer.cxx,v $ + Language: C++ + Date: $Date: 2007-09-24 15:16:13 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l + +Modify cmDependsJavaLexer.c: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmDependsJava_yyalloc, cmDependsJava_yyrealloc, cmDependsJava_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmDependsJavaLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmDependsJavaParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsJavaParserTokens.h" + +#define KEYWORD yylvalp->str = 0 +#define SYMBOL yylvalp->str = 0 +#define PRIMITIVE yylvalp->str = 0 + +/*--------------------------------------------------------------------------*/ + + +#line 721 "cmDependsJavaLexer.cxx" + +#define INITIAL 0 +#define comment 1 +#define string 2 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsJava_yyget_debug (yyscan_t yyscanner ); + +void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); + +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); + +void cmDependsJava_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); + +void cmDependsJava_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmDependsJava_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsJava_yyget_text (yyscan_t yyscanner ); + +int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsJava_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsJava_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsJava_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 88 "cmDependsJavaLexer.in.l" + +#line 940 "cmDependsJavaLexer.cxx" + + if ( yyg->yy_init ) + { + yyg->yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmDependsJava_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsJava_yy_load_buffer_state(yyscanner ); + } + + for(;;) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 414 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 89 "cmDependsJavaLexer.in.l" +{ BEGIN(comment); } + YY_BREAK +case 2: +YY_RULE_SETUP +#line 90 "cmDependsJavaLexer.in.l" +{ BEGIN(INITIAL); } + YY_BREAK +case 3: +/* rule 3 can match eol */ +YY_RULE_SETUP +#line 91 "cmDependsJavaLexer.in.l" +{} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 93 "cmDependsJavaLexer.in.l" +{ BEGIN(string); } + YY_BREAK +case 5: +YY_RULE_SETUP +#line 94 "cmDependsJavaLexer.in.l" +{ BEGIN(INITIAL); return jp_STRINGLITERAL; } +case 6: +YY_RULE_SETUP +#line 95 "cmDependsJavaLexer.in.l" +{} + YY_BREAK +case 7: +YY_RULE_SETUP +#line 97 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ABSTRACT; } +case 8: +YY_RULE_SETUP +#line 98 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ASSERT; } +case 9: +YY_RULE_SETUP +#line 99 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BOOLEAN_TYPE; } +case 10: +YY_RULE_SETUP +#line 100 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BREAK; } +case 11: +YY_RULE_SETUP +#line 101 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_BYTE_TYPE; } +case 12: +YY_RULE_SETUP +#line 102 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CASE; } +case 13: +YY_RULE_SETUP +#line 103 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CATCH; } +case 14: +YY_RULE_SETUP +#line 104 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CHAR_TYPE; } +case 15: +YY_RULE_SETUP +#line 105 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CLASS; } +case 16: +YY_RULE_SETUP +#line 106 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_CONTINUE; } +case 17: +YY_RULE_SETUP +#line 107 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DEFAULT; } +case 18: +YY_RULE_SETUP +#line 108 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DO; } +case 19: +YY_RULE_SETUP +#line 109 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_DOUBLE_TYPE; } +case 20: +YY_RULE_SETUP +#line 110 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_ELSE; } +case 21: +YY_RULE_SETUP +#line 111 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_EXTENDS; } +case 22: +YY_RULE_SETUP +#line 112 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FINAL; } +case 23: +YY_RULE_SETUP +#line 113 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FINALLY; } +case 24: +YY_RULE_SETUP +#line 114 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FLOAT_TYPE; } +case 25: +YY_RULE_SETUP +#line 115 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_FOR; } +case 26: +YY_RULE_SETUP +#line 116 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IF; } +case 27: +YY_RULE_SETUP +#line 117 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IMPLEMENTS; } +case 28: +YY_RULE_SETUP +#line 118 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_IMPORT; } +case 29: +YY_RULE_SETUP +#line 119 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INSTANCEOF; } +case 30: +YY_RULE_SETUP +#line 120 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INT_TYPE; } +case 31: +YY_RULE_SETUP +#line 121 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_INTERFACE; } +case 32: +YY_RULE_SETUP +#line 122 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_LONG_TYPE; } +case 33: +YY_RULE_SETUP +#line 123 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_NATIVE; } +case 34: +YY_RULE_SETUP +#line 124 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_NEW; } +case 35: +YY_RULE_SETUP +#line 125 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PACKAGE; } +case 36: +YY_RULE_SETUP +#line 126 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PRIVATE; } +case 37: +YY_RULE_SETUP +#line 127 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PROTECTED; } +case 38: +YY_RULE_SETUP +#line 128 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_PUBLIC; } +case 39: +YY_RULE_SETUP +#line 129 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_RETURN; } +case 40: +YY_RULE_SETUP +#line 130 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SHORT_TYPE; } +case 41: +YY_RULE_SETUP +#line 131 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_STATIC; } +case 42: +YY_RULE_SETUP +#line 132 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_STRICTFP; } +case 43: +YY_RULE_SETUP +#line 133 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SUPER; } +case 44: +YY_RULE_SETUP +#line 134 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SWITCH; } +case 45: +YY_RULE_SETUP +#line 135 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_SYNCHRONIZED; } +case 46: +YY_RULE_SETUP +#line 136 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THIS; } +case 47: +YY_RULE_SETUP +#line 137 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THROW; } +case 48: +YY_RULE_SETUP +#line 138 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_THROWS; } +case 49: +YY_RULE_SETUP +#line 139 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_TRANSIENT; } +case 50: +YY_RULE_SETUP +#line 140 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_TRY; } +case 51: +YY_RULE_SETUP +#line 141 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_VOID; } +case 52: +YY_RULE_SETUP +#line 142 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_VOLATILE; } +case 53: +YY_RULE_SETUP +#line 143 "cmDependsJavaLexer.in.l" +{ KEYWORD; return jp_WHILE; } +case 54: +YY_RULE_SETUP +#line 145 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_BOOLEANLITERAL; } +case 55: +/* rule 55 can match eol */ +YY_RULE_SETUP +#line 146 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_CHARACTERLITERAL; } +case 56: +YY_RULE_SETUP +#line 147 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } +case 57: +YY_RULE_SETUP +#line 148 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } +case 58: +YY_RULE_SETUP +#line 149 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_HEXINTEGERLITERAL; } +case 59: +YY_RULE_SETUP +#line 150 "cmDependsJavaLexer.in.l" +{ PRIMITIVE; return jp_NULLLITERAL; } +case 60: +YY_RULE_SETUP +#line 152 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_AND; } +case 61: +YY_RULE_SETUP +#line 153 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_ANDAND; } +case 62: +YY_RULE_SETUP +#line 154 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_ANDEQUALS; } +case 63: +YY_RULE_SETUP +#line 155 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_BRACKETEND; } +case 64: +YY_RULE_SETUP +#line 156 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_BRACKETSTART; } +case 65: +YY_RULE_SETUP +#line 157 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CARROT; } +case 66: +YY_RULE_SETUP +#line 158 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CARROTEQUALS; } +case 67: +YY_RULE_SETUP +#line 159 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_COLON; } +case 68: +YY_RULE_SETUP +#line 160 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_COMMA; } +case 69: +YY_RULE_SETUP +#line 161 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CURLYEND; } +case 70: +YY_RULE_SETUP +#line 162 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_CURLYSTART; } +case 71: +YY_RULE_SETUP +#line 163 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DIVIDE; } +case 72: +YY_RULE_SETUP +#line 164 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DIVIDEEQUALS; } +case 73: +YY_RULE_SETUP +#line 165 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DOLLAR; } +case 74: +YY_RULE_SETUP +#line 166 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_DOT; } +case 75: +YY_RULE_SETUP +#line 167 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EQUALS; } +case 76: +YY_RULE_SETUP +#line 168 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EQUALSEQUALS; } +case 77: +YY_RULE_SETUP +#line 169 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EXCLAMATION; } +case 78: +YY_RULE_SETUP +#line 170 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_EXCLAMATIONEQUALS; } +case 79: +YY_RULE_SETUP +#line 171 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GREATER; } +case 80: +YY_RULE_SETUP +#line 172 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTEQUALS; } +case 81: +YY_RULE_SETUP +#line 173 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGT; } +case 82: +YY_RULE_SETUP +#line 174 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTEQUALS; } +case 83: +YY_RULE_SETUP +#line 175 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTGT; } +case 84: +YY_RULE_SETUP +#line 176 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_GTGTGTEQUALS; } +case 85: +YY_RULE_SETUP +#line 177 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LESLESEQUALS; } +case 86: +YY_RULE_SETUP +#line 178 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LESSTHAN; } +case 87: +YY_RULE_SETUP +#line 179 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LTEQUALS; } +case 88: +YY_RULE_SETUP +#line 180 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_LTLT; } +case 89: +YY_RULE_SETUP +#line 181 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUS; } +case 90: +YY_RULE_SETUP +#line 182 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUSEQUALS; } +case 91: +YY_RULE_SETUP +#line 183 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_MINUSMINUS; } +case 92: +YY_RULE_SETUP +#line 184 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PAREEND; } +case 93: +YY_RULE_SETUP +#line 185 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PARESTART; } +case 94: +YY_RULE_SETUP +#line 186 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PERCENT; } +case 95: +YY_RULE_SETUP +#line 187 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PERCENTEQUALS; } +case 96: +YY_RULE_SETUP +#line 188 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPE; } +case 97: +YY_RULE_SETUP +#line 189 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPEEQUALS; } +case 98: +YY_RULE_SETUP +#line 190 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PIPEPIPE; } +case 99: +YY_RULE_SETUP +#line 191 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUS; } +case 100: +YY_RULE_SETUP +#line 192 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUSEQUALS; } +case 101: +YY_RULE_SETUP +#line 193 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_PLUSPLUS; } +case 102: +YY_RULE_SETUP +#line 194 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_QUESTION; } +case 103: +YY_RULE_SETUP +#line 195 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_SEMICOL; } +case 104: +YY_RULE_SETUP +#line 196 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TILDE; } +case 105: +YY_RULE_SETUP +#line 197 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TIMES; } +case 106: +YY_RULE_SETUP +#line 198 "cmDependsJavaLexer.in.l" +{ SYMBOL; return jp_TIMESEQUALS; } +case 107: +YY_RULE_SETUP +#line 200 "cmDependsJavaLexer.in.l" +{ + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; +} +case 108: +/* rule 108 can match eol */ +YY_RULE_SETUP +#line 205 "cmDependsJavaLexer.in.l" +{ } + YY_BREAK +case 109: +/* rule 109 can match eol */ +YY_RULE_SETUP +#line 206 "cmDependsJavaLexer.in.l" +{ } + YY_BREAK +case 110: +YY_RULE_SETUP +#line 207 "cmDependsJavaLexer.in.l" +{ + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; +} +case 111: +YY_RULE_SETUP +#line 214 "cmDependsJavaLexer.in.l" +ECHO; + YY_BREAK +#line 1590 "cmDependsJavaLexer.cxx" +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(comment): +case YY_STATE_EOF(string): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmDependsJava_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmDependsJava_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +return 0; /* this should not happen but it silences a warning*/ +} /* end of cmDependsJava_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + size_t nuto_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( nuto_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmDependsJava_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( nuto_read > YY_READ_BUF_SIZE ) + nuto_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, nuto_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmDependsJava_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 327 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 326); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmDependsJava_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmDependsJava_yywrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmDependsJava_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmDependsJava_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmDependsJava_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmDependsJava_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmDependsJava_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmDependsJava_yypop_buffer_state(); + * cmDependsJava_yypush_buffer_state(new_buffer); + */ + cmDependsJava_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmDependsJava_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmDependsJava_yywrap()) processing, but the only time this flag + * is looked at is after cmDependsJava_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmDependsJava_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmDependsJava_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmDependsJava_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmDependsJava_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmDependsJava_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmDependsJava_yyfree((void *) b ,yyscanner ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmDependsJava_yyrestart() or at EOF. + */ + static void cmDependsJava_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmDependsJava_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmDependsJava_yy_init_buffer was _probably_ + * called from cmDependsJava_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmDependsJava_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmDependsJava_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmDependsJava_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmDependsJava_yy_switch_to_buffer. */ + cmDependsJava_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmDependsJava_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmDependsJava_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int nuto_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + nuto_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyalloc + (nuto_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = nuto_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + nuto_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmDependsJava_yyrealloc + (yyg->yy_buffer_stack, + nuto_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = nuto_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) cmDependsJava_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmDependsJava_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmDependsJava_yylex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmDependsJava_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) +{ + + return cmDependsJava_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmDependsJava_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) cmDependsJava_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmDependsJava_yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmDependsJava_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmDependsJava_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmDependsJava_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmDependsJava_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmDependsJava_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmDependsJava_yyset_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmDependsJava_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmDependsJava_yy_switch_to_buffer + */ +void cmDependsJava_yyset_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void cmDependsJava_yyset_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int cmDependsJava_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmDependsJava_yyset_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + This function is called once per scanner lifetime. */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 1; + yyg->yy_start = 0; + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = (int *) 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmDependsJava_yylex_init() + */ + return 0; +} + +/* User-visible API */ + +/* cmDependsJava_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmDependsJava_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmDependsJava_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + memset(*ptr_yy_globals,0,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmDependsJava_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmDependsJava_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmDependsJava_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmDependsJava_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmDependsJava_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmDependsJava_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Destroy the main struct (reentrant only). */ + cmDependsJava_yyfree ( yyscanner , yyscanner ); + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmDependsJava_yyalloc (yy_size_t size , yyscan_t) +{ + return (void *) malloc( size ); +} + +void *cmDependsJava_yyrealloc (void * ptr, yy_size_t size , yyscan_t) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void cmDependsJava_yyfree (void * ptr , yyscan_t) +{ + free( (char *) ptr ); /* see cmDependsJava_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif +#line 214 "cmDependsJavaLexer.in.l" + + + diff --git a/Source/cmDependsJavaLexer.h b/Source/cmDependsJavaLexer.h new file mode 100644 index 000000000..45939cb80 --- /dev/null +++ b/Source/cmDependsJavaLexer.h @@ -0,0 +1,339 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaLexer.h,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsJava_yyHEADER_H +#define cmDependsJava_yyHEADER_H 1 +#define cmDependsJava_yyIN_HEADER 1 + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +#if defined(__BEOS__) +#include /* prevents a conflict with a #define later on... */ +#endif + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmDependsJava_yylex_init (yyscan_t* scanner); + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmDependsJava_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmDependsJava_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_create_buffer (FILE *file,int size , + yyscan_t yyscanner ); +void cmDependsJava_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmDependsJava_yypush_buffer_state (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +void cmDependsJava_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmDependsJava_yy_scan_buffer (char *base,yy_size_t size , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_string (yyconst char *yy_str , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmDependsJava_yy_scan_bytes (yyconst char *bytes,int len , + yyscan_t yyscanner ); + +void *cmDependsJava_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmDependsJava_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmDependsJava_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmDependsJava_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 +#define comment 1 +#define string 2 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmDependsJava_yylex_destroy (yyscan_t yyscanner ); + +int cmDependsJava_yyget_debug (yyscan_t yyscanner ); + +void cmDependsJava_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmDependsJava_yyget_extra (yyscan_t yyscanner ); + +void cmDependsJava_yyset_extra (YY_EXTRA_TYPE user_defined , + yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_in (yyscan_t yyscanner ); + +void cmDependsJava_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmDependsJava_yyget_out (yyscan_t yyscanner ); + +void cmDependsJava_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmDependsJava_yyget_leng (yyscan_t yyscanner ); + +char *cmDependsJava_yyget_text (yyscan_t yyscanner ); + +int cmDependsJava_yyget_lineno (yyscan_t yyscanner ); + +void cmDependsJava_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmDependsJava_yywrap (yyscan_t yyscanner ); +#else +extern int cmDependsJava_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmDependsJava_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmDependsJava_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the + EOB char was reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + +#undef cmDependsJava_yyIN_HEADER +#endif /* cmDependsJava_yyHEADER_H */ diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l new file mode 100644 index 000000000..496c3eb7f --- /dev/null +++ b/Source/cmDependsJavaLexer.in.l @@ -0,0 +1,193 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaLexer.in.l,v $ + Language: C++ + Date: $Date: 2006-08-08 18:00:27 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmDependsJava_yy --header-file=cmDependsJavaLexer.h -ocmDependsJavaLexer.cxx cmDependsJavaLexer.in.l + +Modify cmDependsJavaLexer.c: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmDependsJava_yyalloc, cmDependsJava_yyrealloc, cmDependsJava_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmDependsJavaLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmDependsJavaParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmDependsJavaParserTokens.h" + +#define KEYWORD yylvalp->str = 0 +#define SYMBOL yylvalp->str = 0 +#define PRIMITIVE yylvalp->str = 0 + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%pointer + +%x comment +%x string + +%% +"/*" { BEGIN(comment); } +"*/" { BEGIN(INITIAL); } +.|\n {} + +\" { BEGIN(string); } +\" { BEGIN(INITIAL); return jp_STRINGLITERAL; } +. {} + +abstract { KEYWORD; return jp_ABSTRACT; } +assert { KEYWORD; return jp_ASSERT; } +boolean { KEYWORD; return jp_BOOLEAN_TYPE; } +break { KEYWORD; return jp_BREAK; } +byte { KEYWORD; return jp_BYTE_TYPE; } +case { KEYWORD; return jp_CASE; } +catch { KEYWORD; return jp_CATCH; } +char { KEYWORD; return jp_CHAR_TYPE; } +class { KEYWORD; return jp_CLASS; } +continue { KEYWORD; return jp_CONTINUE; } +default { KEYWORD; return jp_DEFAULT; } +do { KEYWORD; return jp_DO; } +double { KEYWORD; return jp_DOUBLE_TYPE; } +else { KEYWORD; return jp_ELSE; } +extends { KEYWORD; return jp_EXTENDS; } +final { KEYWORD; return jp_FINAL; } +finally { KEYWORD; return jp_FINALLY; } +float { KEYWORD; return jp_FLOAT_TYPE; } +for { KEYWORD; return jp_FOR; } +if { KEYWORD; return jp_IF; } +implements { KEYWORD; return jp_IMPLEMENTS; } +import { KEYWORD; return jp_IMPORT; } +instanceof { KEYWORD; return jp_INSTANCEOF; } +int { KEYWORD; return jp_INT_TYPE; } +interface { KEYWORD; return jp_INTERFACE; } +long { KEYWORD; return jp_LONG_TYPE; } +native { KEYWORD; return jp_NATIVE; } +new { KEYWORD; return jp_NEW; } +package { KEYWORD; return jp_PACKAGE; } +private { KEYWORD; return jp_PRIVATE; } +protected { KEYWORD; return jp_PROTECTED; } +public { KEYWORD; return jp_PUBLIC; } +return { KEYWORD; return jp_RETURN; } +short { KEYWORD; return jp_SHORT_TYPE; } +static { KEYWORD; return jp_STATIC; } +strictfp { KEYWORD; return jp_STRICTFP; } +super { KEYWORD; return jp_SUPER; } +switch { KEYWORD; return jp_SWITCH; } +synchronized { KEYWORD; return jp_SYNCHRONIZED; } +this { KEYWORD; return jp_THIS; } +throw { KEYWORD; return jp_THROW; } +throws { KEYWORD; return jp_THROWS; } +transient { KEYWORD; return jp_TRANSIENT; } +try { KEYWORD; return jp_TRY; } +void { KEYWORD; return jp_VOID; } +volatile { KEYWORD; return jp_VOLATILE; } +while { KEYWORD; return jp_WHILE; } + +(true|false) { PRIMITIVE; return jp_BOOLEANLITERAL; } +\'([^\\]|\\.|\\u[0-9a-fA-F]*|\\[0-7]*)\' { PRIMITIVE; return jp_CHARACTERLITERAL; } +(0|[0-9]+)[lL]? { PRIMITIVE; return jp_DECIMALINTEGERLITERAL; } +([0-9]+\.[0-9]*|\.[0-9]+|[0-9]+)([eE][+\-]?[0-9]+)?[fFdD]? { PRIMITIVE; return jp_FLOATINGPOINTLITERAL; } +0[xX][0-9a-fA-F]+[lL]? { PRIMITIVE; return jp_HEXINTEGERLITERAL; } +null { PRIMITIVE; return jp_NULLLITERAL; } + +"&" { SYMBOL; return jp_AND; } +"&&" { SYMBOL; return jp_ANDAND; } +"&=" { SYMBOL; return jp_ANDEQUALS; } +"\]" { SYMBOL; return jp_BRACKETEND; } +"\[" { SYMBOL; return jp_BRACKETSTART; } +"\^" { SYMBOL; return jp_CARROT; } +"\^=" { SYMBOL; return jp_CARROTEQUALS; } +":" { SYMBOL; return jp_COLON; } +"," { SYMBOL; return jp_COMMA; } +"}" { SYMBOL; return jp_CURLYEND; } +"{" { SYMBOL; return jp_CURLYSTART; } +"/" { SYMBOL; return jp_DIVIDE; } +"/=" { SYMBOL; return jp_DIVIDEEQUALS; } +"\$" { SYMBOL; return jp_DOLLAR; } +"\." { SYMBOL; return jp_DOT; } +"=" { SYMBOL; return jp_EQUALS; } +"==" { SYMBOL; return jp_EQUALSEQUALS; } +"\!" { SYMBOL; return jp_EXCLAMATION; } +"\!=" { SYMBOL; return jp_EXCLAMATIONEQUALS; } +">" { SYMBOL; return jp_GREATER; } +">=" { SYMBOL; return jp_GTEQUALS; } +">>" { SYMBOL; return jp_GTGT; } +">>=" { SYMBOL; return jp_GTGTEQUALS; } +">>>" { SYMBOL; return jp_GTGTGT; } +">>>=" { SYMBOL; return jp_GTGTGTEQUALS; } +"<<=" { SYMBOL; return jp_LESLESEQUALS; } +"<" { SYMBOL; return jp_LESSTHAN; } +"<=" { SYMBOL; return jp_LTEQUALS; } +"<<" { SYMBOL; return jp_LTLT; } +"-" { SYMBOL; return jp_MINUS; } +"-=" { SYMBOL; return jp_MINUSEQUALS; } +"--" { SYMBOL; return jp_MINUSMINUS; } +"\)" { SYMBOL; return jp_PAREEND; } +"\(" { SYMBOL; return jp_PARESTART; } +"%" { SYMBOL; return jp_PERCENT; } +"%=" { SYMBOL; return jp_PERCENTEQUALS; } +"\|" { SYMBOL; return jp_PIPE; } +"\|=" { SYMBOL; return jp_PIPEEQUALS; } +"\|\|" { SYMBOL; return jp_PIPEPIPE; } +"\+" { SYMBOL; return jp_PLUS; } +"\+=" { SYMBOL; return jp_PLUSEQUALS; } +"\+\+" { SYMBOL; return jp_PLUSPLUS; } +"\?" { SYMBOL; return jp_QUESTION; } +";" { SYMBOL; return jp_SEMICOL; } +"\~" { SYMBOL; return jp_TILDE; } +"\*" { SYMBOL; return jp_TIMES; } +"\*=" { SYMBOL; return jp_TIMESEQUALS; } + +[a-z_A-Z][a-z_0-9A-Z]* { + yyextra->AllocateParserType(yylvalp, yytext, strlen(yytext)); + return jp_NAME; +} + +\/\/.*\n { } +[ \f\t\n\r] { } +. { + std::cerr << "Unknown character: " << yytext[0] + << " (" << (int)yytext[0] << ")" << std::endl; + yyextra->Error("Unknown character"); + return jp_ERROR; +} + +%% diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx new file mode 100644 index 000000000..93ee3424d --- /dev/null +++ b/Source/cmDependsJavaParser.cxx @@ -0,0 +1,6026 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* turn off some warning as this is generated code */ +#if defined(_MSC_VER) +# pragma warning ( disable : 4702 ) /* unreachable code */ +#endif + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ +#define yyparse cmDependsJava_yyparse +#define yylex cmDependsJava_yylex +#define yyerror cmDependsJava_yyerror +#define yylval cmDependsJava_yylval +#define yychar cmDependsJava_yychar +#define yydebug cmDependsJava_yydebug +#define yynerrs cmDependsJava_yynerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + jp_ABSTRACT = 258, + jp_ASSERT = 259, + jp_BOOLEAN_TYPE = 260, + jp_BREAK = 261, + jp_BYTE_TYPE = 262, + jp_CASE = 263, + jp_CATCH = 264, + jp_CHAR_TYPE = 265, + jp_CLASS = 266, + jp_CONTINUE = 267, + jp_DEFAULT = 268, + jp_DO = 269, + jp_DOUBLE_TYPE = 270, + jp_ELSE = 271, + jp_EXTENDS = 272, + jp_FINAL = 273, + jp_FINALLY = 274, + jp_FLOAT_TYPE = 275, + jp_FOR = 276, + jp_IF = 277, + jp_IMPLEMENTS = 278, + jp_IMPORT = 279, + jp_INSTANCEOF = 280, + jp_INT_TYPE = 281, + jp_INTERFACE = 282, + jp_LONG_TYPE = 283, + jp_NATIVE = 284, + jp_NEW = 285, + jp_PACKAGE = 286, + jp_PRIVATE = 287, + jp_PROTECTED = 288, + jp_PUBLIC = 289, + jp_RETURN = 290, + jp_SHORT_TYPE = 291, + jp_STATIC = 292, + jp_STRICTFP = 293, + jp_SUPER = 294, + jp_SWITCH = 295, + jp_SYNCHRONIZED = 296, + jp_THIS = 297, + jp_THROW = 298, + jp_THROWS = 299, + jp_TRANSIENT = 300, + jp_TRY = 301, + jp_VOID = 302, + jp_VOLATILE = 303, + jp_WHILE = 304, + jp_BOOLEANLITERAL = 305, + jp_CHARACTERLITERAL = 306, + jp_DECIMALINTEGERLITERAL = 307, + jp_FLOATINGPOINTLITERAL = 308, + jp_HEXINTEGERLITERAL = 309, + jp_NULLLITERAL = 310, + jp_STRINGLITERAL = 311, + jp_NAME = 312, + jp_AND = 313, + jp_ANDAND = 314, + jp_ANDEQUALS = 315, + jp_BRACKETEND = 316, + jp_BRACKETSTART = 317, + jp_CARROT = 318, + jp_CARROTEQUALS = 319, + jp_COLON = 320, + jp_COMMA = 321, + jp_CURLYEND = 322, + jp_CURLYSTART = 323, + jp_DIVIDE = 324, + jp_DIVIDEEQUALS = 325, + jp_DOLLAR = 326, + jp_DOT = 327, + jp_EQUALS = 328, + jp_EQUALSEQUALS = 329, + jp_EXCLAMATION = 330, + jp_EXCLAMATIONEQUALS = 331, + jp_GREATER = 332, + jp_GTEQUALS = 333, + jp_GTGT = 334, + jp_GTGTEQUALS = 335, + jp_GTGTGT = 336, + jp_GTGTGTEQUALS = 337, + jp_LESLESEQUALS = 338, + jp_LESSTHAN = 339, + jp_LTEQUALS = 340, + jp_LTLT = 341, + jp_MINUS = 342, + jp_MINUSEQUALS = 343, + jp_MINUSMINUS = 344, + jp_PAREEND = 345, + jp_PARESTART = 346, + jp_PERCENT = 347, + jp_PERCENTEQUALS = 348, + jp_PIPE = 349, + jp_PIPEEQUALS = 350, + jp_PIPEPIPE = 351, + jp_PLUS = 352, + jp_PLUSEQUALS = 353, + jp_PLUSPLUS = 354, + jp_QUESTION = 355, + jp_SEMICOL = 356, + jp_TILDE = 357, + jp_TIMES = 358, + jp_TIMESEQUALS = 359, + jp_ERROR = 360 + }; +#endif +#define jp_ABSTRACT 258 +#define jp_ASSERT 259 +#define jp_BOOLEAN_TYPE 260 +#define jp_BREAK 261 +#define jp_BYTE_TYPE 262 +#define jp_CASE 263 +#define jp_CATCH 264 +#define jp_CHAR_TYPE 265 +#define jp_CLASS 266 +#define jp_CONTINUE 267 +#define jp_DEFAULT 268 +#define jp_DO 269 +#define jp_DOUBLE_TYPE 270 +#define jp_ELSE 271 +#define jp_EXTENDS 272 +#define jp_FINAL 273 +#define jp_FINALLY 274 +#define jp_FLOAT_TYPE 275 +#define jp_FOR 276 +#define jp_IF 277 +#define jp_IMPLEMENTS 278 +#define jp_IMPORT 279 +#define jp_INSTANCEOF 280 +#define jp_INT_TYPE 281 +#define jp_INTERFACE 282 +#define jp_LONG_TYPE 283 +#define jp_NATIVE 284 +#define jp_NEW 285 +#define jp_PACKAGE 286 +#define jp_PRIVATE 287 +#define jp_PROTECTED 288 +#define jp_PUBLIC 289 +#define jp_RETURN 290 +#define jp_SHORT_TYPE 291 +#define jp_STATIC 292 +#define jp_STRICTFP 293 +#define jp_SUPER 294 +#define jp_SWITCH 295 +#define jp_SYNCHRONIZED 296 +#define jp_THIS 297 +#define jp_THROW 298 +#define jp_THROWS 299 +#define jp_TRANSIENT 300 +#define jp_TRY 301 +#define jp_VOID 302 +#define jp_VOLATILE 303 +#define jp_WHILE 304 +#define jp_BOOLEANLITERAL 305 +#define jp_CHARACTERLITERAL 306 +#define jp_DECIMALINTEGERLITERAL 307 +#define jp_FLOATINGPOINTLITERAL 308 +#define jp_HEXINTEGERLITERAL 309 +#define jp_NULLLITERAL 310 +#define jp_STRINGLITERAL 311 +#define jp_NAME 312 +#define jp_AND 313 +#define jp_ANDAND 314 +#define jp_ANDEQUALS 315 +#define jp_BRACKETEND 316 +#define jp_BRACKETSTART 317 +#define jp_CARROT 318 +#define jp_CARROTEQUALS 319 +#define jp_COLON 320 +#define jp_COMMA 321 +#define jp_CURLYEND 322 +#define jp_CURLYSTART 323 +#define jp_DIVIDE 324 +#define jp_DIVIDEEQUALS 325 +#define jp_DOLLAR 326 +#define jp_DOT 327 +#define jp_EQUALS 328 +#define jp_EQUALSEQUALS 329 +#define jp_EXCLAMATION 330 +#define jp_EXCLAMATIONEQUALS 331 +#define jp_GREATER 332 +#define jp_GTEQUALS 333 +#define jp_GTGT 334 +#define jp_GTGTEQUALS 335 +#define jp_GTGTGT 336 +#define jp_GTGTGTEQUALS 337 +#define jp_LESLESEQUALS 338 +#define jp_LESSTHAN 339 +#define jp_LTEQUALS 340 +#define jp_LTLT 341 +#define jp_MINUS 342 +#define jp_MINUSEQUALS 343 +#define jp_MINUSMINUS 344 +#define jp_PAREEND 345 +#define jp_PARESTART 346 +#define jp_PERCENT 347 +#define jp_PERCENTEQUALS 348 +#define jp_PIPE 349 +#define jp_PIPEEQUALS 350 +#define jp_PIPEPIPE 351 +#define jp_PLUS 352 +#define jp_PLUSEQUALS 353 +#define jp_PLUSPLUS 354 +#define jp_QUESTION 355 +#define jp_SEMICOL 356 +#define jp_TILDE 357 +#define jp_TIMES 358 +#define jp_TIMESEQUALS 359 +#define jp_ERROR 360 + + + + +/* Copy the first part of user declarations. */ +#line 1 "cmDependsJavaParser.y" + +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaParser.cxx,v $ + Language: C++ + Date: $Date: 2007-03-05 15:36:06 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsJava_yy + --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx + cmDependsJavaParser.y + +Modify cmDependsJavaParser.c: + - remove TABs + +*/ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmDependsJava_yyerror(x) \ + cmDependsJavaError(yyscanner, x) +#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ +#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ +#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmDependsJavaError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +#define YYMAXDEPTH 1000000 + + +#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); +#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) +#define jpStoreClass(str) \ +yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but + no case. */ +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ +#line 372 "cmDependsJavaParser.cxx" + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 23 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 2215 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 106 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 158 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 351 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 575 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 360 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned short int yyprhs[] = +{ + 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, + 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, + 39, 41, 43, 45, 47, 49, 51, 54, 57, 59, + 61, 63, 65, 68, 72, 76, 80, 84, 86, 88, + 92, 93, 95, 96, 99, 100, 103, 107, 109, 111, + 115, 121, 123, 125, 127, 129, 132, 134, 136, 138, + 140, 142, 144, 146, 148, 150, 152, 154, 158, 161, + 165, 169, 174, 175, 177, 180, 183, 185, 189, 193, + 194, 197, 199, 201, 203, 205, 207, 209, 214, 216, + 220, 222, 226, 228, 232, 234, 236, 239, 242, 246, + 251, 256, 257, 259, 264, 268, 269, 271, 273, 277, + 281, 284, 286, 290, 292, 295, 300, 306, 311, 316, + 317, 320, 326, 332, 336, 340, 341, 343, 346, 350, + 354, 355, 358, 360, 362, 364, 367, 369, 372, 374, + 377, 379, 382, 386, 387, 389, 392, 394, 398, 402, + 403, 405, 407, 410, 412, 414, 416, 419, 423, 426, + 428, 430, 432, 434, 436, 438, 440, 442, 444, 446, + 448, 450, 452, 454, 456, 458, 460, 462, 464, 466, + 468, 470, 472, 474, 478, 482, 485, 487, 489, 491, + 493, 495, 497, 499, 505, 513, 521, 527, 532, 533, + 535, 536, 539, 542, 544, 547, 551, 554, 560, 566, + 574, 584, 585, 587, 588, 590, 600, 601, 603, 605, + 607, 609, 611, 615, 619, 625, 629, 630, 632, 636, + 640, 644, 650, 654, 659, 660, 662, 664, 667, 673, + 676, 678, 680, 682, 684, 688, 690, 692, 694, 696, + 703, 704, 706, 707, 709, 711, 715, 720, 725, 730, + 735, 736, 738, 740, 743, 747, 750, 754, 758, 762, + 766, 770, 775, 782, 789, 796, 801, 806, 808, 810, + 814, 816, 818, 821, 824, 826, 828, 831, 834, 836, + 839, 842, 844, 847, 850, 852, 858, 863, 869, 871, + 875, 879, 883, 885, 889, 893, 895, 899, 903, 907, + 909, 913, 917, 921, 925, 929, 931, 935, 939, 941, + 945, 947, 951, 953, 957, 959, 963, 965, 969, 971, + 977, 979, 981, 985, 987, 989, 991, 993, 995, 997, + 999, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015, 1017, + 1019, 1021 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const short int yyrhs[] = +{ + 107, 0, -1, 122, -1, 109, -1, 53, -1, 50, + -1, 51, -1, 56, -1, 55, -1, 52, -1, 54, + -1, 111, -1, 112, -1, 7, -1, 36, -1, 26, + -1, 28, -1, 10, -1, 20, -1, 15, -1, 5, + -1, 113, -1, 116, -1, 117, -1, 113, -1, 113, + -1, 111, 234, -1, 117, 234, -1, 118, -1, 120, + -1, 119, -1, 57, -1, 71, 57, -1, 117, 72, + 119, -1, 117, 72, 11, -1, 117, 72, 42, -1, + 121, 72, 11, -1, 111, -1, 47, -1, 123, 124, + 125, -1, -1, 126, -1, -1, 124, 127, -1, -1, + 125, 130, -1, 31, 117, 101, -1, 128, -1, 129, + -1, 24, 117, 101, -1, 24, 117, 72, 103, 101, + -1, 134, -1, 165, -1, 101, -1, 132, -1, 131, + 132, -1, 34, -1, 33, -1, 32, -1, 37, -1, + 3, -1, 18, -1, 29, -1, 41, -1, 45, -1, + 48, -1, 38, -1, 135, 11, 119, -1, 133, 139, + -1, 133, 137, 139, -1, 133, 136, 139, -1, 133, + 136, 137, 139, -1, -1, 131, -1, 17, 114, -1, + 23, 138, -1, 115, -1, 138, 66, 115, -1, 68, + 140, 67, -1, -1, 140, 141, -1, 142, -1, 158, + -1, 159, -1, 130, -1, 143, -1, 148, -1, 135, + 110, 144, 101, -1, 145, -1, 144, 66, 145, -1, + 146, -1, 146, 73, 147, -1, 119, -1, 146, 62, + 61, -1, 261, -1, 174, -1, 149, 101, -1, 149, + 157, -1, 149, 157, 101, -1, 135, 110, 151, 150, + -1, 135, 47, 151, 150, -1, -1, 155, -1, 119, + 91, 152, 90, -1, 151, 62, 61, -1, -1, 153, + -1, 154, -1, 153, 66, 154, -1, 135, 110, 146, + -1, 44, 156, -1, 114, -1, 156, 66, 114, -1, + 177, -1, 37, 177, -1, 135, 160, 150, 161, -1, + 135, 160, 150, 161, 101, -1, 118, 91, 152, 90, + -1, 68, 162, 178, 67, -1, -1, 162, 163, -1, + 42, 91, 228, 90, 101, -1, 39, 91, 228, 90, + 101, -1, 135, 27, 119, -1, 164, 166, 168, -1, + -1, 167, -1, 17, 115, -1, 167, 66, 115, -1, + 68, 169, 67, -1, -1, 169, 170, -1, 171, -1, + 172, -1, 134, -1, 134, 101, -1, 165, -1, 165, + 101, -1, 143, -1, 149, 173, -1, 101, -1, 173, + 101, -1, 68, 175, 67, -1, -1, 176, -1, 176, + 66, -1, 147, -1, 176, 66, 147, -1, 68, 178, + 67, -1, -1, 179, -1, 180, -1, 179, 180, -1, + 181, -1, 183, -1, 134, -1, 182, 101, -1, 131, + 110, 144, -1, 110, 144, -1, 185, -1, 187, -1, + 191, -1, 192, -1, 201, -1, 204, -1, 185, -1, + 188, -1, 193, -1, 202, -1, 207, -1, 177, -1, + 186, -1, 189, -1, 194, -1, 203, -1, 213, -1, + 215, -1, 216, -1, 218, -1, 217, -1, 219, -1, + 212, -1, 101, -1, 119, 65, 183, -1, 119, 65, + 184, -1, 190, 101, -1, 258, -1, 242, -1, 243, + -1, 239, -1, 240, -1, 236, -1, 226, -1, 22, + 91, 261, 90, 183, -1, 22, 91, 261, 90, 184, + 16, 183, -1, 22, 91, 261, 90, 184, 16, 184, + -1, 40, 91, 261, 90, 195, -1, 68, 197, 196, + 67, -1, -1, 199, -1, -1, 197, 198, -1, 199, + 179, -1, 200, -1, 199, 200, -1, 8, 262, 65, + -1, 13, 65, -1, 49, 91, 261, 90, 183, -1, + 49, 91, 261, 90, 184, -1, 14, 183, 49, 91, + 261, 90, 101, -1, 21, 91, 206, 101, 208, 101, + 205, 90, 183, -1, -1, 210, -1, -1, 209, -1, + 21, 91, 206, 101, 208, 101, 205, 90, 184, -1, + -1, 261, -1, 211, -1, 182, -1, 211, -1, 190, + -1, 211, 66, 190, -1, 4, 261, 101, -1, 4, + 261, 65, 261, 101, -1, 6, 214, 101, -1, -1, + 119, -1, 12, 214, 101, -1, 35, 208, 101, -1, + 43, 261, 101, -1, 41, 91, 261, 90, 177, -1, + 46, 177, 221, -1, 46, 177, 220, 223, -1, -1, + 221, -1, 222, -1, 221, 222, -1, 9, 91, 154, + 90, 177, -1, 19, 177, -1, 225, -1, 230, -1, + 108, -1, 42, -1, 91, 261, 90, -1, 226, -1, + 235, -1, 236, -1, 237, -1, 263, 114, 91, 228, + 90, 227, -1, -1, 139, -1, -1, 229, -1, 261, + -1, 229, 66, 261, -1, 263, 111, 232, 231, -1, + 263, 113, 232, 231, -1, 263, 111, 234, 174, -1, + 263, 113, 234, 174, -1, -1, 234, -1, 233, -1, + 232, 233, -1, 62, 261, 61, -1, 62, 61, -1, + 234, 62, 61, -1, 224, 72, 119, -1, 39, 72, + 119, -1, 42, 72, 119, -1, 224, 72, 42, -1, + 117, 91, 228, 90, -1, 224, 72, 119, 91, 228, + 90, -1, 39, 72, 119, 91, 228, 90, -1, 42, + 72, 119, 91, 228, 90, -1, 117, 62, 261, 61, + -1, 225, 62, 261, 61, -1, 224, -1, 117, -1, + 116, 72, 11, -1, 239, -1, 240, -1, 238, 99, + -1, 238, 89, -1, 242, -1, 243, -1, 97, 241, + -1, 87, 241, -1, 244, -1, 99, 241, -1, 89, + 241, -1, 238, -1, 102, 241, -1, 75, 241, -1, + 245, -1, 91, 111, 231, 90, 241, -1, 91, 261, + 90, 244, -1, 91, 117, 234, 90, 244, -1, 241, + -1, 246, 103, 241, -1, 246, 69, 241, -1, 246, + 92, 241, -1, 246, -1, 247, 97, 246, -1, 247, + 87, 246, -1, 247, -1, 248, 86, 247, -1, 248, + 79, 247, -1, 248, 81, 247, -1, 248, -1, 249, + 84, 248, -1, 249, 77, 248, -1, 249, 85, 248, + -1, 249, 78, 248, -1, 249, 25, 112, -1, 249, + -1, 250, 74, 249, -1, 250, 76, 249, -1, 250, + -1, 251, 58, 250, -1, 251, -1, 252, 63, 251, + -1, 252, -1, 253, 94, 252, -1, 253, -1, 254, + 59, 253, -1, 254, -1, 255, 96, 254, -1, 255, + -1, 255, 100, 261, 65, 256, -1, 256, -1, 258, + -1, 259, 260, 257, -1, 117, -1, 235, -1, 237, + -1, 73, -1, 104, -1, 70, -1, 93, -1, 98, + -1, 88, -1, 83, -1, 80, -1, 82, -1, 60, + -1, 64, -1, 95, -1, 257, -1, 261, -1, 30, + -1, 117, 72, 30, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned short int yyrline[] = +{ + 0, 191, 191, 200, 208, 216, 224, 232, 240, 249, + 257, 266, 274, 283, 288, 293, 298, 303, 308, 313, + 318, 324, 332, 341, 351, 360, 369, 377, 387, 393, + 400, 407, 413, 420, 429, 439, 449, 458, 466, 475, + 484, 490, 499, 505, 514, 520, 529, 541, 549, 558, + 570, 583, 591, 599, 608, 616, 625, 625, 625, 626, + 627, 627, 627, 627, 627, 627, 628, 631, 641, 650, + 659, 668, 678, 684, 693, 702, 711, 719, 728, 737, + 743, 752, 760, 768, 776, 785, 793, 802, 808, 816, + 825, 833, 842, 851, 860, 868, 877, 885, 893, 902, + 911, 921, 928, 938, 948, 955, 962, 965, 971, 981, + 991, 1001, 1007, 1017, 1027, 1037, 1046, 1056, 1067, 1077, + 1084, 1094, 1103, 1113, 1122, 1132, 1138, 1148, 1157, 1167, + 1177, 1184, 1193, 1202, 1211, 1220, 1228, 1237, 1246, 1256, + 1266, 1275, 1285, 1295, 1302, 1311, 1321, 1330, 1340, 1349, + 1356, 1366, 1375, 1385, 1394, 1403, 1413, 1423, 1432, 1442, + 1451, 1460, 1469, 1478, 1487, 1497, 1506, 1515, 1524, 1533, + 1543, 1552, 1561, 1570, 1579, 1588, 1597, 1606, 1615, 1624, + 1633, 1642, 1652, 1662, 1673, 1683, 1693, 1702, 1711, 1720, + 1729, 1738, 1747, 1757, 1767, 1777, 1787, 1794, 1801, 1808, + 1818, 1825, 1835, 1845, 1854, 1864, 1873, 1883, 1890, 1897, + 1904, 1912, 1919, 1929, 1936, 1946, 1956, 1963, 1973, 1982, + 1992, 2002, 2011, 2021, 2030, 2040, 2051, 2058, 2065, 2076, + 2086, 2096, 2106, 2115, 2125, 2132, 2142, 2151, 2161, 2168, + 2178, 2187, 2197, 2206, 2212, 2221, 2230, 2239, 2248, 2258, + 2268, 2275, 2285, 2292, 2302, 2311, 2321, 2330, 2339, 2348, + 2358, 2365, 2375, 2384, 2394, 2404, 2410, 2417, 2427, 2437, + 2447, 2458, 2468, 2479, 2489, 2500, 2510, 2520, 2529, 2538, + 2547, 2556, 2566, 2576, 2586, 2595, 2604, 2613, 2622, 2632, + 2642, 2652, 2661, 2670, 2679, 2689, 2698, 2707, 2714, 2723, + 2732, 2741, 2751, 2760, 2769, 2779, 2788, 2797, 2806, 2816, + 2825, 2834, 2843, 2852, 2861, 2871, 2880, 2889, 2899, 2908, + 2918, 2927, 2937, 2946, 2956, 2965, 2975, 2984, 2994, 3003, + 3013, 3022, 3032, 3042, 3052, 3061, 3071, 3080, 3089, 3098, + 3107, 3116, 3125, 3134, 3143, 3152, 3161, 3170, 3180, 3190, + 3200, 3209 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "jp_ABSTRACT", "jp_ASSERT", + "jp_BOOLEAN_TYPE", "jp_BREAK", "jp_BYTE_TYPE", "jp_CASE", "jp_CATCH", + "jp_CHAR_TYPE", "jp_CLASS", "jp_CONTINUE", "jp_DEFAULT", "jp_DO", + "jp_DOUBLE_TYPE", "jp_ELSE", "jp_EXTENDS", "jp_FINAL", "jp_FINALLY", + "jp_FLOAT_TYPE", "jp_FOR", "jp_IF", "jp_IMPLEMENTS", "jp_IMPORT", + "jp_INSTANCEOF", "jp_INT_TYPE", "jp_INTERFACE", "jp_LONG_TYPE", + "jp_NATIVE", "jp_NEW", "jp_PACKAGE", "jp_PRIVATE", "jp_PROTECTED", + "jp_PUBLIC", "jp_RETURN", "jp_SHORT_TYPE", "jp_STATIC", "jp_STRICTFP", + "jp_SUPER", "jp_SWITCH", "jp_SYNCHRONIZED", "jp_THIS", "jp_THROW", + "jp_THROWS", "jp_TRANSIENT", "jp_TRY", "jp_VOID", "jp_VOLATILE", + "jp_WHILE", "jp_BOOLEANLITERAL", "jp_CHARACTERLITERAL", + "jp_DECIMALINTEGERLITERAL", "jp_FLOATINGPOINTLITERAL", + "jp_HEXINTEGERLITERAL", "jp_NULLLITERAL", "jp_STRINGLITERAL", "jp_NAME", + "jp_AND", "jp_ANDAND", "jp_ANDEQUALS", "jp_BRACKETEND", + "jp_BRACKETSTART", "jp_CARROT", "jp_CARROTEQUALS", "jp_COLON", + "jp_COMMA", "jp_CURLYEND", "jp_CURLYSTART", "jp_DIVIDE", + "jp_DIVIDEEQUALS", "jp_DOLLAR", "jp_DOT", "jp_EQUALS", "jp_EQUALSEQUALS", + "jp_EXCLAMATION", "jp_EXCLAMATIONEQUALS", "jp_GREATER", "jp_GTEQUALS", + "jp_GTGT", "jp_GTGTEQUALS", "jp_GTGTGT", "jp_GTGTGTEQUALS", + "jp_LESLESEQUALS", "jp_LESSTHAN", "jp_LTEQUALS", "jp_LTLT", "jp_MINUS", + "jp_MINUSEQUALS", "jp_MINUSMINUS", "jp_PAREEND", "jp_PARESTART", + "jp_PERCENT", "jp_PERCENTEQUALS", "jp_PIPE", "jp_PIPEEQUALS", + "jp_PIPEPIPE", "jp_PLUS", "jp_PLUSEQUALS", "jp_PLUSPLUS", "jp_QUESTION", + "jp_SEMICOL", "jp_TILDE", "jp_TIMES", "jp_TIMESEQUALS", "jp_ERROR", + "$accept", "Goal", "Literal", "IntegerLiteral", "Type", "PrimitiveType", + "ReferenceType", "ClassOrInterfaceType", "ClassType", "InterfaceType", + "ArrayType", "Name", "SimpleName", "Identifier", "QualifiedName", + "SimpleType", "CompilationUnit", "PackageDeclarationopt", + "ImportDeclarations", "TypeDeclarations", "PackageDeclaration", + "ImportDeclaration", "SingleTypeImportDeclaration", + "TypeImportOnDemandDeclaration", "TypeDeclaration", "Modifiers", + "Modifier", "ClassHeader", "ClassDeclaration", "Modifiersopt", "Super", + "Interfaces", "InterfaceTypeList", "ClassBody", "ClassBodyDeclarations", + "ClassBodyDeclaration", "ClassMemberDeclaration", "FieldDeclaration", + "VariableDeclarators", "VariableDeclarator", "VariableDeclaratorId", + "VariableInitializer", "MethodDeclaration", "MethodHeader", "Throwsopt", + "MethodDeclarator", "FormalParameterListopt", "FormalParameterList", + "FormalParameter", "Throws", "ClassTypeList", "MethodBody", + "StaticInitializer", "ConstructorDeclaration", "ConstructorDeclarator", + "ConstructorBody", "ExplicitConstructorInvocationopt", + "ExplicitConstructorInvocation", "InterfaceHeader", + "InterfaceDeclaration", "ExtendsInterfacesopt", "ExtendsInterfaces", + "InterfaceBody", "InterfaceMemberDeclarations", + "InterfaceMemberDeclaration", "ConstantDeclaration", + "AbstractMethodDeclaration", "Semicols", "ArrayInitializer", + "VariableInitializersOptional", "VariableInitializers", "Block", + "BlockStatementsopt", "BlockStatements", "BlockStatement", + "LocalVariableDeclarationStatement", "LocalVariableDeclaration", + "Statement", "StatementNoShortIf", + "StatementWithoutTrailingSubstatement", "EmptyStatement", + "LabeledStatement", "LabeledStatementNoShortIf", "ExpressionStatement", + "StatementExpression", "IfThenStatement", "IfThenElseStatement", + "IfThenElseStatementNoShortIf", "SwitchStatement", "SwitchBlock", + "SwitchLabelsopt", "SwitchBlockStatementGroups", + "SwitchBlockStatementGroup", "SwitchLabels", "SwitchLabel", + "WhileStatement", "WhileStatementNoShortIf", "DoStatement", + "ForStatement", "ForUpdateopt", "ForInitopt", "ForStatementNoShortIf", + "Expressionopt", "ForInit", "ForUpdate", "StatementExpressionList", + "AssertStatement", "BreakStatement", "Identifieropt", + "ContinueStatement", "ReturnStatement", "ThrowStatement", + "SynchronizedStatement", "TryStatement", "Catchesopt", "Catches", + "CatchClause", "Finally", "Primary", "PrimaryNoNewArray", + "ClassInstanceCreationExpression", "ClassBodyOpt", "ArgumentListopt", + "ArgumentList", "ArrayCreationExpression", "Dimsopt", "DimExprs", + "DimExpr", "Dims", "FieldAccess", "MethodInvocation", "ArrayAccess", + "PostfixExpression", "PostIncrementExpression", + "PostDecrementExpression", "UnaryExpression", "PreIncrementExpression", + "PreDecrementExpression", "UnaryExpressionNotPlusMinus", + "CastExpression", "MultiplicativeExpression", "AdditiveExpression", + "ShiftExpression", "RelationalExpression", "EqualityExpression", + "AndExpression", "ExclusiveOrExpression", "InclusiveOrExpression", + "ConditionalAndExpression", "ConditionalOrExpression", + "ConditionalExpression", "AssignmentExpression", "Assignment", + "LeftHandSide", "AssignmentOperator", "Expression", "ConstantExpression", + "New", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, + 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, + 355, 356, 357, 358, 359, 360 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned short int yyr1[] = +{ + 0, 106, 107, 108, 108, 108, 108, 108, 108, 109, + 109, 110, 110, 111, 111, 111, 111, 111, 111, 111, + 111, 112, 112, 113, 114, 115, 116, 116, 117, 117, + 118, 119, 119, 120, 120, 120, 120, 121, 121, 122, + 123, 123, 124, 124, 125, 125, 126, 127, 127, 128, + 129, 130, 130, 130, 131, 131, 132, 132, 132, 132, + 132, 132, 132, 132, 132, 132, 132, 133, 134, 134, + 134, 134, 135, 135, 136, 137, 138, 138, 139, 140, + 140, 141, 141, 141, 141, 142, 142, 143, 144, 144, + 145, 145, 146, 146, 147, 147, 148, 148, 148, 149, + 149, 150, 150, 151, 151, 152, 152, 153, 153, 154, + 155, 156, 156, 157, 158, 159, 159, 160, 161, 162, + 162, 163, 163, 164, 165, 166, 166, 167, 167, 168, + 169, 169, 170, 170, 170, 170, 170, 170, 171, 172, + 173, 173, 174, 175, 175, 175, 176, 176, 177, 178, + 178, 179, 179, 180, 180, 180, 181, 182, 182, 183, + 183, 183, 183, 183, 183, 184, 184, 184, 184, 184, + 185, 185, 185, 185, 185, 185, 185, 185, 185, 185, + 185, 185, 186, 187, 188, 189, 190, 190, 190, 190, + 190, 190, 190, 191, 192, 193, 194, 195, 196, 196, + 197, 197, 198, 199, 199, 200, 200, 201, 202, 203, + 204, 205, 205, 206, 206, 207, 208, 208, 209, 209, + 210, 211, 211, 212, 212, 213, 214, 214, 215, 216, + 217, 218, 219, 219, 220, 220, 221, 221, 222, 223, + 224, 224, 225, 225, 225, 225, 225, 225, 225, 226, + 227, 227, 228, 228, 229, 229, 230, 230, 230, 230, + 231, 231, 232, 232, 233, 234, 234, 235, 235, 235, + 235, 236, 236, 236, 236, 237, 237, 238, 238, 238, + 238, 238, 239, 240, 241, 241, 241, 241, 241, 242, + 243, 244, 244, 244, 244, 245, 245, 245, 246, 246, + 246, 246, 247, 247, 247, 248, 248, 248, 248, 249, + 249, 249, 249, 249, 249, 250, 250, 250, 251, 251, + 252, 252, 253, 253, 254, 254, 255, 255, 256, 256, + 257, 257, 258, 259, 259, 259, 260, 260, 260, 260, + 260, 260, 260, 260, 260, 260, 260, 260, 261, 262, + 263, 263 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, + 1, 1, 2, 3, 3, 3, 3, 1, 1, 3, + 0, 1, 0, 2, 0, 2, 3, 1, 1, 3, + 5, 1, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 3, 2, 3, + 3, 4, 0, 1, 2, 2, 1, 3, 3, 0, + 2, 1, 1, 1, 1, 1, 1, 4, 1, 3, + 1, 3, 1, 3, 1, 1, 2, 2, 3, 4, + 4, 0, 1, 4, 3, 0, 1, 1, 3, 3, + 2, 1, 3, 1, 2, 4, 5, 4, 4, 0, + 2, 5, 5, 3, 3, 0, 1, 2, 3, 3, + 0, 2, 1, 1, 1, 2, 1, 2, 1, 2, + 1, 2, 3, 0, 1, 2, 1, 3, 3, 0, + 1, 1, 2, 1, 1, 1, 2, 3, 2, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 3, 3, 2, 1, 1, 1, 1, + 1, 1, 1, 5, 7, 7, 5, 4, 0, 1, + 0, 2, 2, 1, 2, 3, 2, 5, 5, 7, + 9, 0, 1, 0, 1, 9, 0, 1, 1, 1, + 1, 1, 3, 3, 5, 3, 0, 1, 3, 3, + 3, 5, 3, 4, 0, 1, 1, 2, 5, 2, + 1, 1, 1, 1, 3, 1, 1, 1, 1, 6, + 0, 1, 0, 1, 1, 3, 4, 4, 4, 4, + 0, 1, 1, 2, 3, 2, 3, 3, 3, 3, + 3, 4, 6, 6, 6, 4, 4, 1, 1, 3, + 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, + 2, 1, 2, 2, 1, 5, 4, 5, 1, 3, + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, + 3, 3, 3, 3, 3, 1, 3, 3, 1, 3, + 1, 3, 1, 3, 1, 3, 1, 3, 1, 5, + 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned short int yydefact[] = +{ + 40, 0, 0, 2, 42, 41, 20, 13, 17, 19, + 18, 15, 16, 14, 38, 31, 0, 37, 0, 28, + 30, 29, 0, 1, 44, 32, 0, 46, 0, 0, + 72, 43, 47, 48, 34, 35, 33, 36, 0, 60, + 61, 62, 58, 57, 56, 59, 66, 63, 64, 65, + 53, 45, 73, 54, 0, 51, 0, 125, 52, 0, + 49, 55, 0, 0, 79, 0, 0, 68, 0, 0, + 0, 0, 126, 0, 24, 74, 23, 25, 76, 75, + 72, 0, 70, 69, 67, 123, 127, 130, 124, 0, + 50, 0, 59, 78, 84, 0, 80, 81, 85, 86, + 0, 82, 83, 71, 72, 128, 77, 72, 114, 38, + 0, 11, 12, 21, 22, 23, 28, 101, 96, 97, + 113, 129, 134, 0, 138, 0, 136, 131, 132, 133, + 0, 226, 226, 0, 0, 0, 350, 216, 0, 0, + 63, 243, 0, 0, 0, 5, 6, 9, 4, 10, + 8, 7, 0, 0, 0, 182, 242, 3, 0, 22, + 333, 30, 73, 155, 0, 170, 0, 72, 151, 153, + 0, 154, 159, 171, 160, 172, 0, 161, 162, 173, + 163, 174, 164, 181, 175, 176, 177, 179, 178, 180, + 277, 240, 245, 241, 246, 247, 248, 0, 189, 190, + 187, 188, 186, 0, 0, 0, 101, 92, 0, 88, + 90, 101, 0, 26, 27, 72, 0, 0, 102, 98, + 135, 140, 139, 137, 0, 0, 0, 0, 0, 37, + 0, 278, 245, 247, 291, 280, 281, 298, 284, 285, + 288, 294, 302, 305, 309, 315, 318, 320, 322, 324, + 326, 328, 330, 348, 331, 0, 227, 0, 0, 0, + 0, 213, 0, 0, 217, 0, 0, 0, 0, 0, + 234, 0, 278, 246, 248, 290, 0, 289, 92, 158, + 0, 0, 0, 252, 0, 0, 148, 152, 156, 185, + 0, 0, 283, 282, 345, 346, 338, 336, 343, 344, + 342, 341, 339, 347, 340, 337, 0, 37, 24, 0, + 72, 0, 100, 0, 87, 0, 0, 99, 265, 0, + 0, 0, 106, 107, 111, 110, 119, 115, 141, 293, + 287, 37, 278, 0, 286, 292, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 223, 225, + 228, 0, 0, 219, 221, 0, 214, 218, 0, 229, + 268, 0, 0, 269, 230, 0, 0, 232, 236, 0, + 244, 279, 0, 351, 0, 253, 254, 183, 157, 270, + 267, 0, 332, 0, 260, 262, 0, 260, 0, 252, + 0, 104, 89, 93, 143, 91, 95, 94, 266, 0, + 117, 72, 0, 72, 116, 0, 26, 27, 244, 300, + 301, 299, 304, 303, 307, 308, 306, 314, 311, 313, + 310, 312, 316, 317, 319, 321, 323, 325, 327, 0, + 0, 0, 216, 0, 0, 252, 0, 0, 252, 72, + 0, 233, 237, 0, 275, 271, 0, 252, 276, 0, + 256, 263, 261, 258, 257, 259, 0, 103, 146, 0, + 144, 109, 108, 112, 0, 243, 120, 0, 0, 0, + 296, 0, 224, 0, 0, 222, 0, 0, 0, 30, + 193, 0, 159, 166, 167, 168, 169, 0, 200, 196, + 231, 0, 0, 239, 207, 255, 0, 264, 250, 142, + 145, 252, 252, 118, 295, 297, 329, 0, 211, 213, + 0, 0, 0, 0, 273, 198, 274, 0, 272, 251, + 249, 147, 0, 0, 209, 0, 212, 220, 0, 0, + 0, 184, 194, 0, 0, 0, 201, 72, 203, 238, + 0, 0, 0, 216, 0, 0, 349, 0, 206, 197, + 202, 204, 122, 121, 210, 0, 0, 208, 205, 211, + 0, 0, 195, 0, 215 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const short int yydefgoto[] = +{ + -1, 2, 156, 157, 158, 229, 112, 113, 75, 78, + 230, 231, 19, 20, 21, 22, 3, 4, 24, 30, + 5, 31, 32, 33, 51, 52, 53, 54, 163, 164, + 65, 66, 79, 67, 80, 96, 97, 98, 208, 209, + 210, 405, 99, 100, 217, 206, 321, 322, 323, 218, + 325, 119, 101, 102, 117, 327, 413, 476, 57, 58, + 71, 72, 88, 104, 127, 128, 129, 222, 406, 469, + 470, 165, 166, 167, 168, 169, 170, 171, 491, 172, + 173, 174, 493, 175, 176, 177, 178, 494, 179, 499, + 545, 525, 546, 547, 548, 180, 495, 181, 182, 535, + 365, 496, 263, 366, 536, 367, 183, 184, 257, 185, + 186, 187, 188, 189, 376, 377, 378, 451, 190, 191, + 232, 530, 384, 385, 193, 415, 394, 395, 214, 194, + 233, 196, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 203, 306, 386, 557, 204 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -503 +static const short int yypact[] = +{ + 159, 1039, 236, -503, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, -503, -503, 186, -503, 56, -503, + -503, -503, 178, -503, 35, -503, 21, -503, 248, 1039, + 273, -503, -503, -503, -503, -503, -503, -503, 78, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, + -503, -503, 2088, -503, 32, -503, 16, 245, -503, 28, + -503, -503, 1039, 1039, -503, 80, 206, -503, 129, 129, + 1039, 221, 228, 194, -503, -503, 225, -503, -503, 234, + 164, 206, -503, -503, -503, -503, -503, -503, -503, 1039, + -503, 1039, 233, -503, -503, 739, -503, -503, -503, -503, + -49, -503, -503, -503, 1116, -503, -503, 1276, -503, 129, + 129, 40, -503, -503, -503, 122, 212, 265, -503, 215, + -503, -503, 219, 739, -503, 222, 224, -503, -503, -503, + 1820, 129, 129, 1627, 237, 238, -503, 1820, 241, 239, + 242, 283, 1820, 233, 266, -503, -503, -503, -503, -503, + -503, -503, 1820, 1820, 1820, -503, -503, -503, 129, 284, + 476, 293, 2067, -503, 349, -503, 296, 1366, -503, -503, + 264, -503, -503, -503, -503, -503, 268, -503, -503, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, -503, + 294, 305, 72, -503, 2070, 88, 2084, 121, 130, 148, + -503, -503, -503, 2111, 1039, 281, 133, 281, -25, -503, + 126, 133, 314, 315, 315, 921, 1039, 308, -503, -503, + -503, -503, 277, -503, 1820, 1820, 1820, 1820, 1820, 317, + 284, 545, -503, -503, 121, -503, -503, -503, -503, -503, + -503, -503, 73, 124, 163, 59, 196, 323, 319, 290, + 324, 18, -503, -503, -503, -30, -503, 285, 286, 242, + 342, 1941, 1820, 291, -503, 129, 1820, 1820, 129, 292, + 385, 1820, 96, -503, -503, -503, 310, -503, -503, 329, + 387, 1085, 3, 1820, 1627, 129, -503, -503, -503, -503, + 175, 1820, -503, -503, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, -503, -503, 1820, 339, 339, 311, + 921, 343, -503, 129, -503, 344, 1766, -503, -503, 346, + 1039, 313, 347, -503, -503, 353, -503, 307, -503, -503, + -503, 6, 545, 326, -503, -503, 1820, 1820, 1820, 1820, + 1820, 1820, 1820, 1820, 1039, 1820, 1820, 1820, 1820, 1820, + 1820, 1820, 1820, 1820, 1820, 1820, 1820, 1820, -503, -503, + -503, 330, 2067, -503, -503, 327, -503, 354, 334, -503, + 345, 335, 340, 348, -503, 351, 416, 232, -503, 356, + -503, -503, 376, -503, 357, 377, -503, -503, 329, -503, + 358, 390, -503, 1085, 339, -503, 154, 339, 154, 1820, + 362, -503, -503, -503, 1766, -503, -503, -503, -503, 129, + -503, 2088, 1039, 1456, -503, 363, 70, 93, 1874, -503, + -503, -503, 73, 73, 124, 124, 124, -503, 163, 163, + 163, 163, 59, 59, 196, 323, 319, 290, 324, 383, + 360, 1820, 1820, 1995, 1699, 1820, 386, 233, 1820, 2088, + 233, -503, -503, 1627, -503, -503, 1820, 1820, -503, 394, + -503, -503, 315, -503, -503, -503, 369, -503, -503, 396, + 404, 410, -503, -503, 26, 113, -503, 407, 1820, 1874, + -503, 1820, -503, 391, 374, -503, 393, 395, 397, 411, + -503, 466, 471, -503, -503, -503, -503, 399, -503, -503, + -503, 400, 401, -503, -503, -503, 402, -503, 206, -503, + 1766, 1820, 1820, -503, -503, -503, -503, 403, 1995, 1941, + 1820, 1820, 1699, 1627, -503, 34, -503, 233, -503, -503, + -503, -503, 405, 412, -503, 413, -503, 354, 406, 418, + 421, -503, -503, 1820, 429, 430, -503, 1186, -503, -503, + 419, 422, 1627, 1820, 1699, 1699, -503, 447, -503, -503, + 1555, -503, -503, -503, -503, 423, 497, -503, -503, 1995, + 1699, 432, -503, 1699, -503 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const short int yypgoto[] = +{ + -503, -503, -503, -503, -85, 2, 181, -41, -198, -45, + -87, -1, 431, 14, -503, -503, -503, -503, -503, -503, + -503, -503, -503, -503, 448, -81, -47, -503, 7, -23, + -503, 462, -503, -64, -503, -503, -503, 425, -146, 217, + 123, -391, -503, 427, -101, 424, 230, -503, -360, -503, + -503, -503, -503, -503, -503, -503, -503, -503, -503, 439, + -503, -503, -503, -503, -503, -503, -503, -503, -110, -503, + -503, -77, 138, -12, -163, -503, -250, -13, -421, -414, + -503, -503, -503, -503, -252, -503, -503, -503, -503, -503, + -503, -503, -503, -503, 5, -503, -503, -503, -503, -16, + 36, -503, -418, -503, -503, -502, -503, -503, 440, -503, + -503, -503, -503, -503, -503, -503, 179, -503, -503, -503, + -54, -503, -341, -503, -503, -149, 255, -136, 102, 652, + 101, 688, 145, 157, 201, -98, 289, 338, -384, -503, + -59, -58, -92, -57, 213, 226, 218, 223, 227, -503, + 95, 274, 350, -503, -503, 660, -503, -503 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -336 +static const short int yytable[] = +{ + 18, 82, 83, 17, 287, 61, 309, 56, 114, 364, + 110, 363, 279, 468, 34, 108, 537, 103, 324, 107, + 159, 74, 77, 120, 484, 86, 162, 68, 38, 77, + 492, 17, 34, 383, 480, 357, 114, 55, 110, 34, + 36, 313, 543, 69, 105, 35, 106, 544, 77, 62, + 77, 472, 118, 192, 275, 63, 277, 95, 466, 29, + 15, 76, 76, 35, 17, 17, 270, 537, 212, 76, + 35, 358, 17, 36, 16, 114, 314, 285, 15, 192, + 159, 123, 84, 85, 344, 15, 162, 55, 76, 502, + 76, 17, 16, 17, 115, 515, -260, 111, 265, 16, + 64, 541, 212, 63, 497, 312, 160, 501, 492, 111, + 317, 122, -37, 192, 355, 61, 506, 511, 356, 531, + 260, 161, 115, 205, 207, 111, 329, 330, 26, 334, + 335, 73, 319, 566, 567, 565, 345, 346, -192, 388, + 492, 492, 336, 347, 348, 256, 256, 161, 64, 572, + 59, 272, 574, 272, -191, 319, 492, 27, 281, 492, + -261, 115, -192, 308, 111, 337, 160, 39, 282, 111, + 532, 533, 278, -192, 159, 74, 338, 216, -191, 60, + 362, 161, 40, 479, 212, 268, 15, 283, 315, -191, + 1, 485, 320, 41, 26, 311, 42, 43, 44, 316, + 16, 92, 46, 76, 512, 47, 307, 192, 195, 48, + 292, 339, 49, 213, 473, 76, 319, 389, 17, -280, + 293, 340, 404, 272, 272, 332, 272, 272, 331, -280, + 192, 93, 15, 114, 195, 409, 23, -281, 419, 420, + 421, 375, 341, 25, 342, 460, 16, -281, 464, 343, + 28, -235, 197, 428, 429, 430, 431, 114, 461, 37, + 160, 461, 70, 111, 198, 50, 364, 364, 195, 363, + 349, 387, 350, -39, 64, 114, 39, 285, 197, 370, + 422, 423, 373, 424, 425, 426, 463, 320, 465, 87, + 198, 40, 432, 433, 89, 90, 36, 26, 161, 278, + 91, 107, 41, 215, 390, 42, 43, 44, 199, 216, + 45, 46, 197, 265, 47, 61, 219, 364, 48, 115, + 220, 49, 111, 221, 198, 223, 159, 278, 261, 262, + 266, 213, 162, 267, 199, 272, 272, 272, 272, 272, + 272, 272, 272, 115, 272, 272, 272, 272, 272, 272, + 272, 272, 272, 272, 272, 268, 280, 271, 284, 192, + 68, 115, 195, 286, 111, 288, 290, 291, 199, 289, + 500, 74, 310, 503, 50, 318, 326, 319, 328, 212, + 514, 351, 352, 354, 353, 195, 359, 360, 320, 192, + 192, 361, 369, 374, 375, 313, 200, 287, 381, 192, + 380, 393, 399, 410, 401, 403, 197, 408, 414, 396, + 398, 76, 160, 411, 17, 111, 418, 272, 198, 412, + 443, 441, 200, 278, 444, 446, 320, 161, 442, 197, + 447, 490, 159, 416, 417, 450, 445, 454, 362, 448, + 504, 198, 449, 456, 529, 201, 453, 455, 481, 457, + 549, 458, 467, 478, 498, 507, 200, 202, 489, 508, + 159, 482, 199, 509, 192, 192, 162, 161, 192, 192, + 510, 201, 315, 159, 513, 518, 522, 272, 272, 162, + 272, 517, 523, 202, 519, 199, 520, -165, 521, 524, + 526, 527, 528, 192, 558, 550, 462, 559, 192, 462, + 192, 192, 551, 552, 534, 201, 192, 553, 554, 387, + 542, 555, 568, 570, 195, 192, 192, 202, 160, 192, + 562, 111, 573, 563, 569, 427, 116, 81, 94, 124, + 402, 125, 471, -23, 211, 560, 489, 161, 281, 564, + 400, 490, 504, 126, 195, 195, 160, -23, 282, 111, + 200, 477, 561, 571, 195, 538, 452, 542, 197, 160, + 564, 161, 111, 397, 434, -278, 161, 283, 489, 489, + 198, 436, 258, 200, 161, -278, 516, 437, 435, 0, + 392, 0, 438, 0, 489, 0, 0, 489, 197, 197, + 0, 0, 0, 0, 0, 0, 0, 0, 197, 201, + 198, 198, 0, 0, 0, -333, 0, 281, 0, -333, + 198, 202, 0, 0, 199, -333, 0, 282, -333, 195, + 195, 0, 201, 195, 195, -333, 0, -333, -333, 0, + 0, 0, 0, -333, 202, 0, 283, 0, -333, 0, + -333, 0, 0, -333, 199, 199, 0, 0, 195, -333, + 0, 0, 0, 195, 199, 195, 195, 0, 0, 0, + 0, 195, 0, 197, 197, 0, 0, 197, 197, 0, + 195, 195, 0, 0, 195, 198, 198, 0, 0, 198, + 198, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 197, 0, 0, 0, 0, 197, 0, 197, + 197, 0, 200, 0, 198, 197, 0, 0, 0, 198, + 0, 198, 198, 0, 197, 197, 0, 198, 197, 199, + 199, 0, 0, 199, 199, 0, 198, 198, 0, 0, + 198, 0, 200, 200, 0, 0, 0, 0, 0, 0, + 0, 0, 200, 0, 6, 0, 7, 0, 199, 8, + 68, 201, 0, 199, 9, 199, 199, 0, 0, 10, + 0, 199, 0, 202, 0, 11, 69, 12, 0, 0, + 199, 199, 0, 0, 199, 13, 0, 0, 0, 0, + 0, 201, 201, 0, 0, 0, 109, 0, 0, 0, + 255, 201, 0, 202, 202, 0, 15, 264, 0, 0, + 0, 0, 269, 202, 273, 0, 273, 200, 200, 0, + 16, 200, 200, 276, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, + 274, 200, 274, 200, 200, 0, 0, 0, 0, 200, + 0, 0, 0, 0, 0, 0, 201, 201, 200, 200, + 201, 201, 200, 0, 0, 0, 0, 0, 202, 202, + 0, 0, 202, 202, 0, 0, 273, 273, 0, 273, + 273, 0, 0, 0, 0, 201, 333, 0, 0, 0, + 201, 0, 201, 201, 0, 0, 0, 202, 201, 0, + 0, 0, 202, 0, 202, 202, 0, 201, 201, 0, + 202, 201, 274, 274, 0, 274, 274, 0, 0, 202, + 202, 0, 368, 202, 39, 0, 371, 372, 0, 0, + 0, 379, 0, 0, 0, 0, 0, 0, 0, 40, + 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, + 41, 391, 0, 42, 43, 44, 0, 0, 45, 46, + 0, 0, 47, 0, 0, 0, 48, 0, 0, 49, + 0, 0, 0, 0, 0, 0, 407, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 273, 273, + 273, 273, 273, 273, 273, 273, 0, 273, 273, 273, + 273, 273, 273, 273, 273, 273, 273, 273, 0, 0, + 0, -105, 0, 0, 0, 0, 439, 440, 0, 0, + 0, 0, 0, 0, 274, 274, 274, 274, 274, 274, + 274, 274, 0, 274, 274, 274, 274, 274, 274, 274, + 274, 274, 274, 274, 6, 0, 7, 0, 0, 8, + 0, 0, 0, 459, 9, 0, 0, 0, 0, 10, + 0, 0, 0, 0, 407, 11, 0, 12, 0, 0, + 273, 0, 0, 0, 0, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, + 6, 0, 7, 0, 0, 8, 15, 0, 0, 0, + 9, 483, 264, 0, 0, 10, 274, 0, 0, 0, + 16, 11, 0, 12, 0, 136, 505, 0, 0, 39, + 0, 13, 0, 0, 138, 0, 0, 141, 0, 0, + 273, 273, 14, 273, 40, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 41, 318, 0, 42, 43, + 44, 0, 0, 45, 46, 0, 16, 47, 0, 0, + 224, 48, 0, 0, 49, 0, 274, 274, 0, 274, + 407, 0, 225, 0, 152, 0, 226, 0, 0, 0, + 539, 540, 227, 121, 154, 0, 0, 228, 0, 39, + 130, 6, 131, 7, 543, 0, 8, 0, 132, 544, + 133, 9, 0, 556, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 264, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -199, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 138, 139, 140, 141, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -150, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 39, + 130, 6, 131, 7, 0, 154, 8, 155, 132, 0, + 133, 9, 0, 0, 40, 0, 10, 134, 135, 0, + 0, 0, 11, 0, 12, 41, 136, 0, 42, 43, + 44, 137, 13, 45, 46, 474, 139, 140, 475, 142, + 0, 48, 143, 14, 49, 144, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 0, 0, 0, 0, 0, + 0, 0, 0, -149, 107, 0, 0, 16, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 152, 0, 153, 0, 0, + 0, 0, 0, 0, 0, 154, 0, 155, 39, 130, + 6, 131, 7, 0, 0, 8, -72, 132, 0, 133, + 9, 0, 0, 40, 0, 10, 134, 135, 0, 0, + 0, 11, 0, 12, 41, 136, 0, 42, 43, 44, + 137, 13, 45, 46, 138, 139, 140, 141, 142, 0, + 48, 143, 14, 49, 144, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 107, 0, 0, 16, 0, 0, 0, + 0, 130, 6, 131, 7, 0, 0, 8, 0, 132, + 0, 133, 9, 0, 152, 0, 153, 10, 134, 135, + 0, 0, 0, 11, 154, 12, 155, 136, 0, 0, + 0, 0, 137, 13, 0, 0, 138, 139, 259, 141, + 142, 0, 0, 143, 14, 0, 144, 145, 146, 147, + 148, 149, 150, 151, 15, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 107, 0, 0, 16, 0, + 0, 0, 0, 130, 6, 131, 7, 0, 0, 8, + 0, 132, 0, 133, 9, 0, 152, 0, 153, 10, + 486, 487, 0, 0, 0, 11, 154, 12, 155, 136, + 0, 0, 0, 0, 137, 13, 0, 0, 138, 139, + 259, 141, 142, 0, 0, 143, 14, 0, 488, 145, + 146, 147, 148, 149, 150, 151, 15, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 107, 0, 0, + 16, 6, 0, 7, 0, 0, 8, 0, 0, 0, + 0, 9, 0, 0, 0, 0, 10, 0, 152, 0, + 153, 0, 11, 0, 12, 0, 136, 0, 154, 0, + 155, 0, 13, 0, 0, 138, 0, 0, 141, 0, + 0, 0, 0, 14, 0, 0, 145, 146, 147, 148, + 149, 150, 151, 15, 0, 6, 0, 7, 0, 0, + 8, 0, 0, 0, 404, 9, 0, 16, 0, 0, + 10, 224, 0, 0, 0, 0, 11, 0, 12, 0, + 136, 0, 0, 225, 0, 152, 13, 226, 0, 138, + 0, 0, 141, 227, 0, 154, 0, 14, 228, 0, + 145, 146, 147, 148, 149, 150, 151, 15, 0, 6, + 0, 7, 0, 0, 8, 0, 0, 0, 0, 9, + 0, 16, 0, 0, 10, 224, 0, 0, 0, 0, + 11, 0, 12, 0, 136, 0, 0, 225, 0, 152, + 13, 226, 0, 138, 0, 0, 141, 227, 0, 154, + 0, 14, 228, 0, 145, 146, 147, 148, 149, 150, + 151, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 39, 16, 6, 0, 7, 224, + 0, 8, 0, 0, 0, 0, 9, 0, 0, 40, + 0, 10, 0, 0, 0, 226, 0, 11, 0, 12, + 41, 136, 0, 42, 43, 44, 228, 13, 45, 46, + 138, 0, 47, 141, 0, 0, 48, 0, 14, 49, + 0, 145, 146, 147, 148, 149, 150, 151, 15, 0, + 6, 0, 7, 0, 0, 8, 0, 0, 0, 0, + 9, 0, 16, 0, 0, 10, 0, 0, 0, 0, + 0, 11, 0, 12, 0, 136, 0, 0, 0, 0, + 152, 13, 153, 0, 138, 0, 0, 141, 0, 0, + 154, 0, 14, 0, 0, 145, 146, 147, 148, 149, + 150, 151, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, + 39, 0, 6, 0, 7, 0, 0, 8, 0, 0, + 0, 0, 9, 0, 152, 40, 153, 10, 0, 0, + 0, 39, 0, 11, 154, 12, 41, 0, 0, 42, + 43, 44, 0, 13, 45, 46, 40, 0, 47, 0, + 0, 0, 48, 0, 14, 49, 0, 41, 0, 0, + 42, 43, 44, 0, 15, 45, 46, 0, 0, 47, + -334, 0, 0, 48, -334, 0, 49, 0, 16, 0, + -334, 0, 0, -334, -335, 0, 0, 0, -335, 0, + -334, 0, -334, -334, -335, 0, 0, -335, -334, 0, + 0, 0, 0, -334, -335, -334, -335, -335, -334, 0, + 0, 294, -335, 0, -334, 295, 0, -335, 0, -335, + 0, 296, -335, 0, 297, 0, 0, 0, -335, 0, + 0, 298, 0, 299, 300, 0, 0, 0, 0, 301, + 0, 0, 0, 0, 302, 0, 303, 0, 0, 304, + 0, 0, 0, 0, 0, 305 +}; + +static const short int yycheck[] = +{ + 1, 65, 66, 1, 167, 52, 204, 30, 95, 261, + 95, 261, 158, 404, 11, 92, 518, 81, 216, 68, + 107, 62, 63, 100, 442, 70, 107, 11, 29, 70, + 444, 29, 11, 30, 418, 65, 123, 30, 123, 11, + 26, 66, 8, 27, 89, 42, 91, 13, 89, 17, + 91, 411, 101, 107, 152, 23, 154, 80, 399, 24, + 57, 62, 63, 42, 62, 63, 143, 569, 62, 70, + 42, 101, 70, 59, 71, 162, 101, 162, 57, 133, + 167, 104, 68, 69, 25, 57, 167, 80, 89, 449, + 91, 89, 71, 91, 95, 479, 90, 95, 72, 71, + 68, 522, 62, 23, 445, 206, 107, 448, 522, 107, + 211, 104, 72, 167, 96, 162, 457, 91, 100, 510, + 133, 107, 123, 109, 110, 123, 224, 225, 72, 227, + 228, 103, 62, 554, 555, 553, 77, 78, 66, 285, + 554, 555, 69, 84, 85, 131, 132, 133, 68, 570, + 72, 152, 573, 154, 66, 62, 570, 101, 62, 573, + 90, 162, 90, 204, 162, 92, 167, 3, 72, 167, + 511, 512, 158, 101, 261, 216, 103, 44, 90, 101, + 261, 167, 18, 90, 62, 72, 57, 91, 62, 101, + 31, 443, 215, 29, 72, 62, 32, 33, 34, 73, + 71, 37, 38, 204, 91, 41, 204, 261, 107, 45, + 89, 87, 48, 111, 412, 216, 62, 42, 216, 89, + 99, 97, 68, 224, 225, 226, 227, 228, 226, 99, + 284, 67, 57, 320, 133, 320, 0, 89, 336, 337, + 338, 9, 79, 57, 81, 394, 71, 99, 397, 86, + 72, 19, 107, 345, 346, 347, 348, 344, 394, 11, + 261, 397, 17, 261, 107, 101, 518, 519, 167, 519, + 74, 284, 76, 0, 68, 362, 3, 362, 133, 265, + 339, 340, 268, 341, 342, 343, 396, 310, 398, 68, + 133, 18, 349, 350, 66, 101, 282, 72, 284, 285, + 66, 68, 29, 91, 290, 32, 33, 34, 107, 44, + 37, 38, 167, 72, 41, 362, 101, 569, 45, 320, + 101, 48, 320, 101, 167, 101, 413, 313, 91, 91, + 91, 229, 413, 91, 133, 336, 337, 338, 339, 340, + 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, + 351, 352, 353, 354, 355, 72, 72, 91, 65, 413, + 11, 362, 261, 67, 362, 101, 72, 62, 167, 101, + 447, 412, 91, 450, 101, 61, 68, 62, 101, 62, + 478, 58, 63, 59, 94, 284, 101, 101, 411, 443, + 444, 49, 101, 101, 9, 66, 107, 560, 11, 453, + 90, 62, 91, 90, 61, 61, 261, 61, 101, 307, + 308, 412, 413, 66, 412, 413, 90, 418, 261, 66, + 66, 91, 133, 409, 90, 90, 449, 413, 101, 284, + 90, 444, 519, 331, 332, 19, 91, 61, 519, 91, + 453, 284, 91, 66, 508, 107, 90, 90, 65, 91, + 527, 61, 90, 90, 68, 61, 167, 107, 444, 90, + 547, 101, 261, 67, 518, 519, 547, 453, 522, 523, + 66, 133, 62, 560, 67, 101, 65, 478, 479, 560, + 481, 90, 16, 133, 91, 284, 91, 16, 91, 90, + 90, 90, 90, 547, 65, 90, 394, 67, 552, 397, + 554, 555, 90, 90, 101, 167, 560, 101, 90, 522, + 523, 90, 65, 16, 413, 569, 570, 167, 519, 573, + 101, 519, 90, 101, 101, 344, 95, 65, 80, 104, + 313, 104, 409, 57, 110, 547, 522, 523, 62, 552, + 310, 554, 555, 104, 443, 444, 547, 71, 72, 547, + 261, 413, 547, 569, 453, 519, 377, 570, 413, 560, + 573, 547, 560, 308, 351, 89, 552, 91, 554, 555, + 413, 353, 132, 284, 560, 99, 481, 354, 352, -1, + 306, -1, 355, -1, 570, -1, -1, 573, 443, 444, + -1, -1, -1, -1, -1, -1, -1, -1, 453, 261, + 443, 444, -1, -1, -1, 60, -1, 62, -1, 64, + 453, 261, -1, -1, 413, 70, -1, 72, 73, 518, + 519, -1, 284, 522, 523, 80, -1, 82, 83, -1, + -1, -1, -1, 88, 284, -1, 91, -1, 93, -1, + 95, -1, -1, 98, 443, 444, -1, -1, 547, 104, + -1, -1, -1, 552, 453, 554, 555, -1, -1, -1, + -1, 560, -1, 518, 519, -1, -1, 522, 523, -1, + 569, 570, -1, -1, 573, 518, 519, -1, -1, 522, + 523, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 547, -1, -1, -1, -1, 552, -1, 554, + 555, -1, 413, -1, 547, 560, -1, -1, -1, 552, + -1, 554, 555, -1, 569, 570, -1, 560, 573, 518, + 519, -1, -1, 522, 523, -1, 569, 570, -1, -1, + 573, -1, 443, 444, -1, -1, -1, -1, -1, -1, + -1, -1, 453, -1, 5, -1, 7, -1, 547, 10, + 11, 413, -1, 552, 15, 554, 555, -1, -1, 20, + -1, 560, -1, 413, -1, 26, 27, 28, -1, -1, + 569, 570, -1, -1, 573, 36, -1, -1, -1, -1, + -1, 443, 444, -1, -1, -1, 47, -1, -1, -1, + 130, 453, -1, 443, 444, -1, 57, 137, -1, -1, + -1, -1, 142, 453, 152, -1, 154, 518, 519, -1, + 71, 522, 523, 153, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 547, -1, -1, -1, + 152, 552, 154, 554, 555, -1, -1, -1, -1, 560, + -1, -1, -1, -1, -1, -1, 518, 519, 569, 570, + 522, 523, 573, -1, -1, -1, -1, -1, 518, 519, + -1, -1, 522, 523, -1, -1, 224, 225, -1, 227, + 228, -1, -1, -1, -1, 547, 226, -1, -1, -1, + 552, -1, 554, 555, -1, -1, -1, 547, 560, -1, + -1, -1, 552, -1, 554, 555, -1, 569, 570, -1, + 560, 573, 224, 225, -1, 227, 228, -1, -1, 569, + 570, -1, 262, 573, 3, -1, 266, 267, -1, -1, + -1, 271, -1, -1, -1, -1, -1, -1, -1, 18, + -1, 281, -1, -1, -1, -1, -1, -1, -1, -1, + 29, 291, -1, 32, 33, 34, -1, -1, 37, 38, + -1, -1, 41, -1, -1, -1, 45, -1, -1, 48, + -1, -1, -1, -1, -1, -1, 316, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 336, 337, + 338, 339, 340, 341, 342, 343, -1, 345, 346, 347, + 348, 349, 350, 351, 352, 353, 354, 355, -1, -1, + -1, 90, -1, -1, -1, -1, 356, 357, -1, -1, + -1, -1, -1, -1, 336, 337, 338, 339, 340, 341, + 342, 343, -1, 345, 346, 347, 348, 349, 350, 351, + 352, 353, 354, 355, 5, -1, 7, -1, -1, 10, + -1, -1, -1, 393, 15, -1, -1, -1, -1, 20, + -1, -1, -1, -1, 404, 26, -1, 28, -1, -1, + 418, -1, -1, -1, -1, 36, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 47, -1, -1, -1, + 5, -1, 7, -1, -1, 10, 57, -1, -1, -1, + 15, 441, 442, -1, -1, 20, 418, -1, -1, -1, + 71, 26, -1, 28, -1, 30, 456, -1, -1, 3, + -1, 36, -1, -1, 39, -1, -1, 42, -1, -1, + 478, 479, 47, 481, 18, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, 29, 61, -1, 32, 33, + 34, -1, -1, 37, 38, -1, 71, 41, -1, -1, + 75, 45, -1, -1, 48, -1, 478, 479, -1, 481, + 510, -1, 87, -1, 89, -1, 91, -1, -1, -1, + 520, 521, 97, 67, 99, -1, -1, 102, -1, 3, + 4, 5, 6, 7, 8, -1, 10, -1, 12, 13, + 14, 15, -1, 543, 18, -1, 20, 21, 22, -1, + -1, -1, 26, 553, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, 3, + 4, 5, 6, 7, -1, 99, 10, 101, 12, -1, + 14, 15, -1, -1, 18, -1, 20, 21, 22, -1, + -1, -1, 26, -1, 28, 29, 30, -1, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + -1, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 67, 68, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 89, -1, 91, -1, -1, + -1, -1, -1, -1, -1, 99, -1, 101, 3, 4, + 5, 6, 7, -1, -1, 10, 11, 12, -1, 14, + 15, -1, -1, 18, -1, 20, 21, 22, -1, -1, + -1, 26, -1, 28, 29, 30, -1, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, -1, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, -1, -1, 71, -1, -1, -1, + -1, 4, 5, 6, 7, -1, -1, 10, -1, 12, + -1, 14, 15, -1, 89, -1, 91, 20, 21, 22, + -1, -1, -1, 26, 99, 28, 101, 30, -1, -1, + -1, -1, 35, 36, -1, -1, 39, 40, 41, 42, + 43, -1, -1, 46, 47, -1, 49, 50, 51, 52, + 53, 54, 55, 56, 57, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, -1, -1, 71, -1, + -1, -1, -1, 4, 5, 6, 7, -1, -1, 10, + -1, 12, -1, 14, 15, -1, 89, -1, 91, 20, + 21, 22, -1, -1, -1, 26, 99, 28, 101, 30, + -1, -1, -1, -1, 35, 36, -1, -1, 39, 40, + 41, 42, 43, -1, -1, 46, 47, -1, 49, 50, + 51, 52, 53, 54, 55, 56, 57, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, -1, -1, + 71, 5, -1, 7, -1, -1, 10, -1, -1, -1, + -1, 15, -1, -1, -1, -1, 20, -1, 89, -1, + 91, -1, 26, -1, 28, -1, 30, -1, 99, -1, + 101, -1, 36, -1, -1, 39, -1, -1, 42, -1, + -1, -1, -1, 47, -1, -1, 50, 51, 52, 53, + 54, 55, 56, 57, -1, 5, -1, 7, -1, -1, + 10, -1, -1, -1, 68, 15, -1, 71, -1, -1, + 20, 75, -1, -1, -1, -1, 26, -1, 28, -1, + 30, -1, -1, 87, -1, 89, 36, 91, -1, 39, + -1, -1, 42, 97, -1, 99, -1, 47, 102, -1, + 50, 51, 52, 53, 54, 55, 56, 57, -1, 5, + -1, 7, -1, -1, 10, -1, -1, -1, -1, 15, + -1, 71, -1, -1, 20, 75, -1, -1, -1, -1, + 26, -1, 28, -1, 30, -1, -1, 87, -1, 89, + 36, 91, -1, 39, -1, -1, 42, 97, -1, 99, + -1, 47, 102, -1, 50, 51, 52, 53, 54, 55, + 56, 57, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 3, 71, 5, -1, 7, 75, + -1, 10, -1, -1, -1, -1, 15, -1, -1, 18, + -1, 20, -1, -1, -1, 91, -1, 26, -1, 28, + 29, 30, -1, 32, 33, 34, 102, 36, 37, 38, + 39, -1, 41, 42, -1, -1, 45, -1, 47, 48, + -1, 50, 51, 52, 53, 54, 55, 56, 57, -1, + 5, -1, 7, -1, -1, 10, -1, -1, -1, -1, + 15, -1, 71, -1, -1, 20, -1, -1, -1, -1, + -1, 26, -1, 28, -1, 30, -1, -1, -1, -1, + 89, 36, 91, -1, 39, -1, -1, 42, -1, -1, + 99, -1, 47, -1, -1, 50, 51, 52, 53, 54, + 55, 56, 57, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 71, -1, -1, -1, + 3, -1, 5, -1, 7, -1, -1, 10, -1, -1, + -1, -1, 15, -1, 89, 18, 91, 20, -1, -1, + -1, 3, -1, 26, 99, 28, 29, -1, -1, 32, + 33, 34, -1, 36, 37, 38, 18, -1, 41, -1, + -1, -1, 45, -1, 47, 48, -1, 29, -1, -1, + 32, 33, 34, -1, 57, 37, 38, -1, -1, 41, + 60, -1, -1, 45, 64, -1, 48, -1, 71, -1, + 70, -1, -1, 73, 60, -1, -1, -1, 64, -1, + 80, -1, 82, 83, 70, -1, -1, 73, 88, -1, + -1, -1, -1, 93, 80, 95, 82, 83, 98, -1, + -1, 60, 88, -1, 104, 64, -1, 93, -1, 95, + -1, 70, 98, -1, 73, -1, -1, -1, 104, -1, + -1, 80, -1, 82, 83, -1, -1, -1, -1, 88, + -1, -1, -1, -1, 93, -1, 95, -1, -1, 98, + -1, -1, -1, -1, -1, 104 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned short int yystos[] = +{ + 0, 31, 107, 122, 123, 126, 5, 7, 10, 15, + 20, 26, 28, 36, 47, 57, 71, 111, 117, 118, + 119, 120, 121, 0, 124, 57, 72, 101, 72, 24, + 125, 127, 128, 129, 11, 42, 119, 11, 117, 3, + 18, 29, 32, 33, 34, 37, 38, 41, 45, 48, + 101, 130, 131, 132, 133, 134, 135, 164, 165, 72, + 101, 132, 17, 23, 68, 136, 137, 139, 11, 27, + 17, 166, 167, 103, 113, 114, 117, 113, 115, 138, + 140, 137, 139, 139, 119, 119, 115, 68, 168, 66, + 101, 66, 37, 67, 130, 135, 141, 142, 143, 148, + 149, 158, 159, 139, 169, 115, 115, 68, 177, 47, + 110, 111, 112, 113, 116, 117, 118, 160, 101, 157, + 177, 67, 134, 135, 143, 149, 165, 170, 171, 172, + 4, 6, 12, 14, 21, 22, 30, 35, 39, 40, + 41, 42, 43, 46, 49, 50, 51, 52, 53, 54, + 55, 56, 89, 91, 99, 101, 108, 109, 110, 116, + 117, 119, 131, 134, 135, 177, 178, 179, 180, 181, + 182, 183, 185, 186, 187, 189, 190, 191, 192, 194, + 201, 203, 204, 212, 213, 215, 216, 217, 218, 219, + 224, 225, 226, 230, 235, 236, 237, 238, 239, 240, + 242, 243, 258, 259, 263, 119, 151, 119, 144, 145, + 146, 151, 62, 234, 234, 91, 44, 150, 155, 101, + 101, 101, 173, 101, 75, 87, 91, 97, 102, 111, + 116, 117, 226, 236, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 261, 119, 214, 214, 41, + 183, 91, 91, 208, 261, 72, 91, 91, 72, 261, + 177, 91, 117, 235, 237, 241, 261, 241, 119, 144, + 72, 62, 72, 91, 65, 110, 67, 180, 101, 101, + 72, 62, 89, 99, 60, 64, 70, 73, 80, 82, + 83, 88, 93, 95, 98, 104, 260, 111, 113, 114, + 91, 62, 150, 66, 101, 62, 73, 150, 61, 62, + 135, 152, 153, 154, 114, 156, 68, 161, 101, 241, + 241, 111, 117, 261, 241, 241, 69, 92, 103, 87, + 97, 79, 81, 86, 25, 77, 78, 84, 85, 74, + 76, 58, 63, 94, 59, 96, 100, 65, 101, 101, + 101, 49, 131, 182, 190, 206, 209, 211, 261, 101, + 119, 261, 261, 119, 101, 9, 220, 221, 222, 261, + 90, 11, 261, 30, 228, 229, 261, 183, 144, 42, + 119, 261, 257, 62, 232, 233, 234, 232, 234, 91, + 152, 61, 145, 61, 68, 147, 174, 261, 61, 110, + 90, 66, 66, 162, 101, 231, 234, 234, 90, 241, + 241, 241, 246, 246, 247, 247, 247, 112, 248, 248, + 248, 248, 249, 249, 250, 251, 252, 253, 254, 261, + 261, 91, 101, 66, 90, 91, 90, 90, 91, 91, + 19, 223, 222, 90, 61, 90, 66, 91, 61, 261, + 231, 233, 234, 174, 231, 174, 228, 90, 147, 175, + 176, 146, 154, 114, 39, 42, 163, 178, 90, 90, + 244, 65, 101, 261, 208, 190, 21, 22, 49, 119, + 183, 184, 185, 188, 193, 202, 207, 228, 68, 195, + 177, 228, 154, 177, 183, 261, 228, 61, 90, 67, + 66, 91, 91, 67, 241, 244, 256, 90, 101, 91, + 91, 91, 65, 16, 90, 197, 90, 90, 90, 139, + 227, 147, 228, 228, 101, 205, 210, 211, 206, 261, + 261, 184, 183, 8, 13, 196, 198, 199, 200, 177, + 90, 90, 90, 101, 90, 90, 261, 262, 65, 67, + 179, 200, 101, 101, 183, 208, 184, 184, 65, 101, + 16, 205, 184, 90, 184 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yytype, yyvaluep) + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: +#line 192 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 3: +#line 201 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 4: +#line 209 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 5: +#line 217 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 6: +#line 225 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 7: +#line 233 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 8: +#line 241 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 9: +#line 250 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 10: +#line 258 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 11: +#line 267 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 12: +#line 275 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 13: +#line 284 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 14: +#line 289 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 15: +#line 294 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 16: +#line 299 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 17: +#line 304 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 18: +#line 309 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 19: +#line 314 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 20: +#line 319 "cmDependsJavaParser.y" + { + jpElementStart(0); +} + break; + + case 21: +#line 325 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 22: +#line 333 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 23: +#line 342 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpStoreClass(yyvsp[0].str); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 24: +#line 352 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 25: +#line 361 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 26: +#line 370 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 27: +#line 378 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpStoreClass(yyvsp[-1].str); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 28: +#line 388 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = yyvsp[0].str; +} + break; + + case 29: +#line 394 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = yyvsp[0].str; +} + break; + + case 30: +#line 401 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = yyvsp[0].str; +} + break; + + case 31: +#line 408 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = yyvsp[0].str; +} + break; + + case 32: +#line 414 "cmDependsJavaParser.y" + { + jpElementStart(2); + yyval.str = yyvsp[0].str; +} + break; + + case 33: +#line 421 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->AddClassFound(yyvsp[-2].str); + yyGetParser->UpdateCombine(yyvsp[-2].str, yyvsp[0].str); + yyGetParser->DeallocateParserType(&(yyvsp[-2].str)); + yyval.str = const_cast(yyGetParser->GetCurrentCombine()); +} + break; + + case 34: +#line 430 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpStoreClass(yyvsp[-2].str); + jpCheckEmpty(3); + yyGetParser->SetCurrentCombine(""); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 35: +#line 440 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpStoreClass(yyvsp[-2].str); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 36: +#line 450 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 37: +#line 459 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 38: +#line 467 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 39: +#line 476 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 40: +#line 484 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 41: +#line 491 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 42: +#line 499 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 43: +#line 506 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 44: +#line 514 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 45: +#line 521 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 46: +#line 530 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->SetCurrentPackage(yyvsp[-1].str); + yyGetParser->DeallocateParserType(&(yyvsp[-1].str)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 47: +#line 542 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 48: +#line 550 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 49: +#line 559 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->AddPackagesImport(yyvsp[-1].str); + yyGetParser->DeallocateParserType(&(yyvsp[-1].str)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 50: +#line 571 "cmDependsJavaParser.y" + { + jpElementStart(5); + std::string str = yyvsp[-3].str; + str += ".*"; + yyGetParser->AddPackagesImport(str.c_str()); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + yyGetParser->SetCurrentCombine(""); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 51: +#line 584 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 52: +#line 592 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 53: +#line 600 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 54: +#line 609 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 55: +#line 617 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 67: +#line 632 "cmDependsJavaParser.y" + { + yyGetParser->StartClass(yyvsp[0].str); + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); +} + break; + + case 68: +#line 642 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + break; + + case 69: +#line 651 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + break; + + case 70: +#line 660 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + break; + + case 71: +#line 669 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + break; + + case 72: +#line 678 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 73: +#line 685 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 74: +#line 694 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 75: +#line 703 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 76: +#line 712 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 77: +#line 720 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 78: +#line 729 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 79: +#line 737 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 80: +#line 744 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 81: +#line 753 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 82: +#line 761 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 83: +#line 769 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 84: +#line 777 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 85: +#line 786 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 86: +#line 794 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 87: +#line 803 "cmDependsJavaParser.y" + { + jpElementStart(4); +} + break; + + case 88: +#line 809 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 89: +#line 817 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 90: +#line 826 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 91: +#line 834 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 92: +#line 843 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 93: +#line 852 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 94: +#line 861 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 95: +#line 869 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 96: +#line 878 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 97: +#line 886 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 98: +#line 894 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 99: +#line 903 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 100: +#line 912 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 101: +#line 921 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 102: +#line 929 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 103: +#line 939 "cmDependsJavaParser.y" + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 104: +#line 949 "cmDependsJavaParser.y" + { + jpElementStart(3); + +} + break; + + case 105: +#line 955 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 107: +#line 966 "cmDependsJavaParser.y" + { + jpElementStart(1); + +} + break; + + case 108: +#line 972 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 109: +#line 982 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 110: +#line 992 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 111: +#line 1002 "cmDependsJavaParser.y" + { + jpElementStart(1); + +} + break; + + case 112: +#line 1008 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 113: +#line 1018 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 114: +#line 1028 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 115: +#line 1038 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 116: +#line 1047 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 117: +#line 1057 "cmDependsJavaParser.y" + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 118: +#line 1068 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 119: +#line 1077 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 120: +#line 1085 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 121: +#line 1095 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 122: +#line 1104 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 123: +#line 1114 "cmDependsJavaParser.y" + { + yyGetParser->StartClass(yyvsp[0].str); + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); +} + break; + + case 124: +#line 1123 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + break; + + case 125: +#line 1132 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); +} + break; + + case 126: +#line 1139 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 127: +#line 1149 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 128: +#line 1158 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 129: +#line 1168 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 130: +#line 1177 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 131: +#line 1185 "cmDependsJavaParser.y" + { + jpElementStart(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 132: +#line 1194 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 133: +#line 1203 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 134: +#line 1212 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 135: +#line 1221 "cmDependsJavaParser.y" + { + jpElementStart(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 136: +#line 1229 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 137: +#line 1238 "cmDependsJavaParser.y" + { + jpElementStart(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 138: +#line 1247 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 139: +#line 1257 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 140: +#line 1267 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 141: +#line 1276 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 142: +#line 1286 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 143: +#line 1295 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 144: +#line 1303 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 145: +#line 1312 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 146: +#line 1322 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 147: +#line 1331 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 148: +#line 1341 "cmDependsJavaParser.y" + { + jpElementStart(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 149: +#line 1349 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 150: +#line 1357 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 151: +#line 1367 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 152: +#line 1376 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 153: +#line 1386 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 154: +#line 1395 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 155: +#line 1404 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 156: +#line 1414 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 157: +#line 1424 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 158: +#line 1433 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 159: +#line 1443 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 160: +#line 1452 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 161: +#line 1461 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 162: +#line 1470 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 163: +#line 1479 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 164: +#line 1488 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 165: +#line 1498 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 166: +#line 1507 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 167: +#line 1516 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 168: +#line 1525 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 169: +#line 1534 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 170: +#line 1544 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 171: +#line 1553 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 172: +#line 1562 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 173: +#line 1571 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 174: +#line 1580 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 175: +#line 1589 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 176: +#line 1598 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 177: +#line 1607 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 178: +#line 1616 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 179: +#line 1625 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 180: +#line 1634 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 181: +#line 1643 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 182: +#line 1653 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 183: +#line 1663 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[-2].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 184: +#line 1674 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 185: +#line 1684 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 186: +#line 1694 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 187: +#line 1703 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 188: +#line 1712 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 189: +#line 1721 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 190: +#line 1730 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 191: +#line 1739 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 192: +#line 1748 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 193: +#line 1758 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 194: +#line 1768 "cmDependsJavaParser.y" + { + jpElementStart(7); + jpCheckEmpty(7); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 195: +#line 1778 "cmDependsJavaParser.y" + { + jpElementStart(7); + jpCheckEmpty(7); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 196: +#line 1788 "cmDependsJavaParser.y" + { + jpElementStart(5); + +} + break; + + case 197: +#line 1795 "cmDependsJavaParser.y" + { + jpElementStart(4); + +} + break; + + case 198: +#line 1801 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 199: +#line 1809 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 200: +#line 1818 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 201: +#line 1826 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 202: +#line 1836 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 203: +#line 1846 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 204: +#line 1855 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 205: +#line 1865 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 206: +#line 1874 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 207: +#line 1884 "cmDependsJavaParser.y" + { + jpElementStart(5); + +} + break; + + case 208: +#line 1891 "cmDependsJavaParser.y" + { + jpElementStart(5); + +} + break; + + case 209: +#line 1898 "cmDependsJavaParser.y" + { + jpElementStart(7); + +} + break; + + case 210: +#line 1906 "cmDependsJavaParser.y" + { + jpElementStart(9); + +} + break; + + case 211: +#line 1912 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 212: +#line 1920 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 213: +#line 1929 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 214: +#line 1937 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 215: +#line 1948 "cmDependsJavaParser.y" + { + jpElementStart(9); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 216: +#line 1956 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 217: +#line 1964 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 218: +#line 1974 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 219: +#line 1983 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 220: +#line 1993 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 221: +#line 2003 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 222: +#line 2012 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 223: +#line 2022 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 224: +#line 2031 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 225: +#line 2041 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[-1].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 226: +#line 2051 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 227: +#line 2059 "cmDependsJavaParser.y" + { + jpElementStart(1); + +} + break; + + case 228: +#line 2066 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[-1].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 229: +#line 2077 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 230: +#line 2087 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 231: +#line 2097 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 232: +#line 2107 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 233: +#line 2116 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 234: +#line 2125 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 235: +#line 2133 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 236: +#line 2143 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 237: +#line 2152 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 238: +#line 2162 "cmDependsJavaParser.y" + { + jpElementStart(5); + +} + break; + + case 239: +#line 2169 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 240: +#line 2179 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 241: +#line 2188 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 242: +#line 2198 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 243: +#line 2207 "cmDependsJavaParser.y" + { + jpElementStart(1); + +} + break; + + case 244: +#line 2213 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 245: +#line 2222 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 246: +#line 2231 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 247: +#line 2240 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 248: +#line 2249 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 249: +#line 2259 "cmDependsJavaParser.y" + { + jpElementStart(6); + jpCheckEmpty(6); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 250: +#line 2268 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 251: +#line 2276 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 252: +#line 2285 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 253: +#line 2293 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 254: +#line 2303 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 255: +#line 2312 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 256: +#line 2322 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 257: +#line 2331 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 258: +#line 2340 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 259: +#line 2349 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 260: +#line 2358 "cmDependsJavaParser.y" + { + jpElementStart(0); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 261: +#line 2366 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 262: +#line 2376 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 263: +#line 2385 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 264: +#line 2395 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 265: +#line 2405 "cmDependsJavaParser.y" + { + jpElementStart(2); + +} + break; + + case 266: +#line 2411 "cmDependsJavaParser.y" + { + jpElementStart(3); + +} + break; + + case 267: +#line 2418 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 268: +#line 2428 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 269: +#line 2438 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 270: +#line 2448 "cmDependsJavaParser.y" + { + jpElementStart(3); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 271: +#line 2459 "cmDependsJavaParser.y" + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 272: +#line 2469 "cmDependsJavaParser.y" + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&(yyvsp[-5].str)); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(6); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 273: +#line 2480 "cmDependsJavaParser.y" + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(6); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 274: +#line 2490 "cmDependsJavaParser.y" + { + jpElementStart(6); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(6); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 275: +#line 2501 "cmDependsJavaParser.y" + { + jpElementStart(4); + yyGetParser->DeallocateParserType(&(yyvsp[-3].str)); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 276: +#line 2511 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 277: +#line 2521 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 278: +#line 2530 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 279: +#line 2539 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 280: +#line 2548 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 281: +#line 2557 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 282: +#line 2567 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 283: +#line 2577 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 284: +#line 2587 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 285: +#line 2596 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 286: +#line 2605 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 287: +#line 2614 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 288: +#line 2623 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 289: +#line 2633 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 290: +#line 2643 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 291: +#line 2653 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 292: +#line 2662 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 293: +#line 2671 "cmDependsJavaParser.y" + { + jpElementStart(2); + jpCheckEmpty(2); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 294: +#line 2680 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 295: +#line 2690 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 296: +#line 2699 "cmDependsJavaParser.y" + { + jpElementStart(4); + jpCheckEmpty(4); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 297: +#line 2708 "cmDependsJavaParser.y" + { + jpElementStart(5); + +} + break; + + case 298: +#line 2715 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 299: +#line 2724 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 300: +#line 2733 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 301: +#line 2742 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 302: +#line 2752 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 303: +#line 2761 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 304: +#line 2770 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 305: +#line 2780 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 306: +#line 2789 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 307: +#line 2798 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 308: +#line 2807 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 309: +#line 2817 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 310: +#line 2826 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 311: +#line 2835 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 312: +#line 2844 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 313: +#line 2853 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 314: +#line 2862 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 315: +#line 2872 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 316: +#line 2881 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 317: +#line 2890 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 318: +#line 2900 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 319: +#line 2909 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 320: +#line 2919 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 321: +#line 2928 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 322: +#line 2938 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 323: +#line 2947 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 324: +#line 2957 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 325: +#line 2966 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 326: +#line 2976 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 327: +#line 2985 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 328: +#line 2995 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 329: +#line 3004 "cmDependsJavaParser.y" + { + jpElementStart(5); + jpCheckEmpty(5); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 330: +#line 3014 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 331: +#line 3023 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 332: +#line 3033 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 333: +#line 3043 "cmDependsJavaParser.y" + { + jpElementStart(1); + yyGetParser->DeallocateParserType(&(yyvsp[0].str)); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 334: +#line 3053 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 335: +#line 3062 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 336: +#line 3072 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 337: +#line 3081 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 338: +#line 3090 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 339: +#line 3099 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 340: +#line 3108 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 341: +#line 3117 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 342: +#line 3126 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 343: +#line 3135 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 344: +#line 3144 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 345: +#line 3153 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 346: +#line 3162 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 347: +#line 3171 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 348: +#line 3181 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 349: +#line 3191 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 350: +#line 3201 "cmDependsJavaParser.y" + { + jpElementStart(1); + jpCheckEmpty(1); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + case 351: +#line 3210 "cmDependsJavaParser.y" + { + jpElementStart(3); + jpStoreClass(yyvsp[-2].str); + jpCheckEmpty(3); + yyval.str = 0; + yyGetParser->SetCurrentCombine(""); + +} + break; + + + } + +/* Line 1010 of yacc.c. */ +#line 5780 "cmDependsJavaParser.cxx" + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; + + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#if defined(__GNUC__) || defined(__HP_aCC) + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + +#line 3219 "cmDependsJavaParser.y" + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmDependsJavaError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} + + diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y new file mode 100644 index 000000000..bbb849b10 --- /dev/null +++ b/Source/cmDependsJavaParser.y @@ -0,0 +1,3231 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaParser.y,v $ + Language: C++ + Date: $Date: 2006-08-01 15:38:41 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmDependsJava_yy --defines=cmDependsJavaParserTokens.h -ocmDependsJavaParser.cxx cmDependsJavaParser.y + +Modify cmDependsJavaParser.cxx: + - remove TABs + - add __HP_aCC to the #if test for yyerrorlab warning suppression + +*/ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmDependsJava_yyerror(x) \ + cmDependsJavaError(yyscanner, x) +#define yyGetParser (cmDependsJava_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmDependsJavaParserHelper.h" /* Interface to parser object. */ +#include "cmDependsJavaLexer.h" /* Interface to lexer object. */ +#include "cmDependsJavaParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmDependsJavaError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +#define YYMAXDEPTH 1000000 + + +#define jpCheckEmpty(cnt) yyGetParser->CheckEmpty(__LINE__, cnt, yyvsp); +#define jpElementStart(cnt) yyGetParser->PrepareElement(&yyval) +#define jpStoreClass(str) yyGetParser->AddClassFound(str); yyGetParser->DeallocateParserType(&(str)) +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%pure_parser + +/* +%union { + char* string; +} +*/ + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token jp_ABSTRACT +%token jp_ASSERT +%token jp_BOOLEAN_TYPE +%token jp_BREAK +%token jp_BYTE_TYPE +%token jp_CASE +%token jp_CATCH +%token jp_CHAR_TYPE +%token jp_CLASS +%token jp_CONTINUE +%token jp_DEFAULT +%token jp_DO +%token jp_DOUBLE_TYPE +%token jp_ELSE +%token jp_EXTENDS +%token jp_FINAL +%token jp_FINALLY +%token jp_FLOAT_TYPE +%token jp_FOR +%token jp_IF +%token jp_IMPLEMENTS +%token jp_IMPORT +%token jp_INSTANCEOF +%token jp_INT_TYPE +%token jp_INTERFACE +%token jp_LONG_TYPE +%token jp_NATIVE +%token jp_NEW +%token jp_PACKAGE +%token jp_PRIVATE +%token jp_PROTECTED +%token jp_PUBLIC +%token jp_RETURN +%token jp_SHORT_TYPE +%token jp_STATIC +%token jp_STRICTFP +%token jp_SUPER +%token jp_SWITCH +%token jp_SYNCHRONIZED +%token jp_THIS +%token jp_THROW +%token jp_THROWS +%token jp_TRANSIENT +%token jp_TRY +%token jp_VOID +%token jp_VOLATILE +%token jp_WHILE + +%token jp_BOOLEANLITERAL +%token jp_CHARACTERLITERAL +%token jp_DECIMALINTEGERLITERAL +%token jp_FLOATINGPOINTLITERAL +%token jp_HEXINTEGERLITERAL +%token jp_NULLLITERAL +%token jp_STRINGLITERAL + +%token jp_NAME + +%token jp_AND +%token jp_ANDAND +%token jp_ANDEQUALS +%token jp_BRACKETEND +%token jp_BRACKETSTART +%token jp_CARROT +%token jp_CARROTEQUALS +%token jp_COLON +%token jp_COMMA +%token jp_CURLYEND +%token jp_CURLYSTART +%token jp_DIVIDE +%token jp_DIVIDEEQUALS +%token jp_DOLLAR +%token jp_DOT +%token jp_EQUALS +%token jp_EQUALSEQUALS +%token jp_EXCLAMATION +%token jp_EXCLAMATIONEQUALS +%token jp_GREATER +%token jp_GTEQUALS +%token jp_GTGT +%token jp_GTGTEQUALS +%token jp_GTGTGT +%token jp_GTGTGTEQUALS +%token jp_LESLESEQUALS +%token jp_LESSTHAN +%token jp_LTEQUALS +%token jp_LTLT +%token jp_MINUS +%token jp_MINUSEQUALS +%token jp_MINUSMINUS +%token jp_PAREEND +%token jp_PARESTART +%token jp_PERCENT +%token jp_PERCENTEQUALS +%token jp_PIPE +%token jp_PIPEEQUALS +%token jp_PIPEPIPE +%token jp_PLUS +%token jp_PLUSEQUALS +%token jp_PLUSPLUS +%token jp_QUESTION +%token jp_SEMICOL +%token jp_TILDE +%token jp_TIMES +%token jp_TIMESEQUALS + +%token jp_ERROR + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + +Goal: +CompilationUnit +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Literal: +IntegerLiteral +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_FLOATINGPOINTLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_BOOLEANLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_CHARACTERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_STRINGLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_NULLLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +IntegerLiteral: +jp_DECIMALINTEGERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_HEXINTEGERLITERAL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Type: +PrimitiveType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ReferenceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PrimitiveType: +jp_BYTE_TYPE +{ + jpElementStart(0); +} +| +jp_SHORT_TYPE +{ + jpElementStart(0); +} +| +jp_INT_TYPE +{ + jpElementStart(0); +} +| +jp_LONG_TYPE +{ + jpElementStart(0); +} +| +jp_CHAR_TYPE +{ + jpElementStart(0); +} +| +jp_FLOAT_TYPE +{ + jpElementStart(0); +} +| +jp_DOUBLE_TYPE +{ + jpElementStart(0); +} +| +jp_BOOLEAN_TYPE +{ + jpElementStart(0); +} + +ReferenceType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ArrayType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassOrInterfaceType: +Name +{ + jpElementStart(1); + jpStoreClass($1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +InterfaceType: +ClassOrInterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ArrayType: +PrimitiveType Dims +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Name Dims +{ + jpElementStart(2); + jpStoreClass($1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Name: +SimpleName +{ + jpElementStart(1); + $$ = $1; +} +| +QualifiedName +{ + jpElementStart(1); + $$ = $1; +} + +SimpleName: +Identifier +{ + jpElementStart(1); + $$ = $1; +} + +Identifier: +jp_NAME +{ + jpElementStart(1); + $$ = $1; +} +| +jp_DOLLAR jp_NAME +{ + jpElementStart(2); + $$ = $2; +} + +QualifiedName: +Name jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->AddClassFound($1); + yyGetParser->UpdateCombine($1, $3); + yyGetParser->DeallocateParserType(&($1)); + $$ = const_cast(yyGetParser->GetCurrentCombine()); +} +| +Name jp_DOT jp_CLASS +{ + jpElementStart(3); + jpStoreClass($1); + jpCheckEmpty(3); + yyGetParser->SetCurrentCombine(""); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Name jp_DOT jp_THIS +{ + jpElementStart(3); + jpStoreClass($1); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +SimpleType jp_DOT jp_CLASS +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +SimpleType: +PrimitiveType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_VOID +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +CompilationUnit: +PackageDeclarationopt ImportDeclarations TypeDeclarations +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PackageDeclarationopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +PackageDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ImportDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ImportDeclarations ImportDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeDeclarations TypeDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +PackageDeclaration: +jp_PACKAGE Name jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->SetCurrentPackage($2); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ImportDeclaration: +SingleTypeImportDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeImportOnDemandDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +SingleTypeImportDeclaration: +jp_IMPORT Name jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->AddPackagesImport($2); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeImportOnDemandDeclaration: +jp_IMPORT Name jp_DOT jp_TIMES jp_SEMICOL +{ + jpElementStart(5); + std::string str = $2; + str += ".*"; + yyGetParser->AddPackagesImport(str.c_str()); + yyGetParser->DeallocateParserType(&($2)); + yyGetParser->SetCurrentCombine(""); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +TypeDeclaration: +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +InterfaceDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Modifiers: +Modifier +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Modifiers Modifier +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Modifier: +jp_PUBLIC | jp_PROTECTED | jp_PRIVATE | +jp_STATIC | +jp_ABSTRACT | jp_FINAL | jp_NATIVE | jp_SYNCHRONIZED | jp_TRANSIENT | jp_VOLATILE | +jp_STRICTFP + +ClassHeader: +Modifiersopt jp_CLASS Identifier +{ + yyGetParser->StartClass($3); + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); +} + + +ClassDeclaration: +ClassHeader ClassBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Interfaces ClassBody +{ + jpElementStart(3); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Super ClassBody +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} +| +ClassHeader Super Interfaces ClassBody +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + +Modifiersopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +Modifiers +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Super: +jp_EXTENDS ClassType +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +Interfaces: +jp_IMPLEMENTS InterfaceTypeList +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +InterfaceTypeList: +InterfaceType +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +InterfaceTypeList jp_COMMA InterfaceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBody: +jp_CURLYSTART ClassBodyDeclarations jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBodyDeclarations: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ClassBodyDeclarations ClassBodyDeclaration +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassBodyDeclaration: +ClassMemberDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +StaticInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ConstructorDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +TypeDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +ClassMemberDeclaration: +FieldDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +FieldDeclaration: +Modifiersopt Type VariableDeclarators jp_SEMICOL +{ + jpElementStart(4); +} + +VariableDeclarators: +VariableDeclarator +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclarators jp_COMMA VariableDeclarator +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableDeclarator: +VariableDeclaratorId +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclaratorId jp_EQUALS VariableInitializer +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableDeclaratorId: +Identifier +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +VariableDeclaratorId jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +VariableInitializer: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ArrayInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +MethodDeclaration: +MethodHeader jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodHeader MethodBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +MethodHeader MethodBody jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} + +MethodHeader: +Modifiersopt Type MethodDeclarator Throwsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Modifiersopt jp_VOID MethodDeclarator Throwsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Throwsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Throws +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodDeclarator: +Identifier jp_PARESTART FormalParameterListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodDeclarator jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(3); + +} + +FormalParameterListopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FormalParameterList + +FormalParameterList: +FormalParameter +{ + jpElementStart(1); + +} +| +FormalParameterList jp_COMMA FormalParameter +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +FormalParameter: +Modifiersopt Type VariableDeclaratorId +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Throws: +jp_THROWS ClassTypeList +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassTypeList: +ClassType +{ + jpElementStart(1); + +} +| +ClassTypeList jp_COMMA ClassType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodBody: +Block +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StaticInitializer: +jp_STATIC Block +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorDeclaration: +Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Modifiersopt ConstructorDeclarator Throwsopt ConstructorBody jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorDeclarator: +SimpleName jp_PARESTART FormalParameterListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstructorBody: +jp_CURLYSTART ExplicitConstructorInvocationopt BlockStatementsopt jp_CURLYEND +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExplicitConstructorInvocationopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExplicitConstructorInvocationopt ExplicitConstructorInvocation +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExplicitConstructorInvocation: +jp_THIS jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_PARESTART ArgumentListopt jp_PAREEND jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceHeader: +Modifiersopt jp_INTERFACE Identifier +{ + yyGetParser->StartClass($3); + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); +} + +InterfaceDeclaration: +InterfaceHeader ExtendsInterfacesopt InterfaceBody +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + yyGetParser->EndClass(); +} + +ExtendsInterfacesopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); +} +| +ExtendsInterfaces +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExtendsInterfaces: +jp_EXTENDS InterfaceType +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExtendsInterfaces jp_COMMA InterfaceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceBody: +jp_CURLYSTART InterfaceMemberDeclarations jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceMemberDeclarations: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceMemberDeclarations InterfaceMemberDeclaration +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InterfaceMemberDeclaration: +ConstantDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AbstractMethodDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration jp_SEMICOL +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InterfaceDeclaration jp_SEMICOL +{ + jpElementStart(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstantDeclaration: +FieldDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AbstractMethodDeclaration: +MethodHeader Semicols +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Semicols: +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Semicols jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayInitializer: +jp_CURLYSTART VariableInitializersOptional jp_CURLYEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +VariableInitializersOptional: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers jp_COMMA +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +VariableInitializers: +VariableInitializer +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +VariableInitializers jp_COMMA VariableInitializer +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Block: +jp_CURLYSTART BlockStatementsopt jp_CURLYEND +{ + jpElementStart(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatementsopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BlockStatements +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatements: +BlockStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BlockStatements BlockStatement +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BlockStatement: +LocalVariableDeclarationStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Statement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LocalVariableDeclarationStatement: +LocalVariableDeclaration jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LocalVariableDeclaration: +Modifiers Type VariableDeclarators +{ + jpElementStart(1); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Type VariableDeclarators +{ + jpElementStart(1); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Statement: +StatementWithoutTrailingSubstatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LabeledStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenElseStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +WhileStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementNoShortIf: +StatementWithoutTrailingSubstatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LabeledStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +IfThenElseStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +WhileStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForStatementNoShortIf +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementWithoutTrailingSubstatement: +Block +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EmptyStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExpressionStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +DoStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +BreakStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ContinueStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ReturnStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SynchronizedStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ThrowStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +TryStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AssertStatement +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +EmptyStatement: +jp_SEMICOL +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LabeledStatement: +Identifier jp_COLON Statement +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LabeledStatementNoShortIf: +Identifier jp_COLON StatementNoShortIf +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExpressionStatement: +StatementExpression jp_SEMICOL +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementExpression: +Assignment +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodInvocation +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassInstanceCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenStatement: +jp_IF jp_PARESTART Expression jp_PAREEND Statement +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenElseStatement: +jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE Statement +{ + jpElementStart(7); + jpCheckEmpty(7); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +IfThenElseStatementNoShortIf: +jp_IF jp_PARESTART Expression jp_PAREEND StatementNoShortIf jp_ELSE StatementNoShortIf +{ + jpElementStart(7); + jpCheckEmpty(7); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchStatement: +jp_SWITCH jp_PARESTART Expression jp_PAREEND SwitchBlock +{ + jpElementStart(5); + +} + +SwitchBlock: +jp_CURLYSTART SwitchBlockStatementGroups SwitchLabelsopt jp_CURLYEND +{ + jpElementStart(4); + +} + +SwitchLabelsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchLabels +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchBlockStatementGroups: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchBlockStatementGroups SwitchBlockStatementGroup +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchBlockStatementGroup: +SwitchLabels BlockStatements +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchLabels: +SwitchLabel +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +SwitchLabels SwitchLabel +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SwitchLabel: +jp_CASE ConstantExpression jp_COLON +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_DEFAULT jp_COLON +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +WhileStatement: +jp_WHILE jp_PARESTART Expression jp_PAREEND Statement +{ + jpElementStart(5); + +} + +WhileStatementNoShortIf: +jp_WHILE jp_PARESTART Expression jp_PAREEND StatementNoShortIf +{ + jpElementStart(5); + +} + +DoStatement: +jp_DO Statement jp_WHILE jp_PARESTART Expression jp_PAREEND jp_SEMICOL +{ + jpElementStart(7); + +} + +ForStatement: +jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND +Statement +{ + jpElementStart(9); + +} + +ForUpdateopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForUpdate +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForInitopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ForInit +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForStatementNoShortIf: +jp_FOR jp_PARESTART ForInitopt jp_SEMICOL Expressionopt jp_SEMICOL ForUpdateopt jp_PAREEND +StatementNoShortIf +{ + jpElementStart(9); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Expressionopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForInit: +StatementExpressionList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +LocalVariableDeclaration +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ForUpdate: +StatementExpressionList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +StatementExpressionList: +StatementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +StatementExpressionList jp_COMMA StatementExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssertStatement: +jp_ASSERT Expression jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_ASSERT Expression jp_COLON Expression jp_SEMICOL +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +BreakStatement: +jp_BREAK Identifieropt jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($2)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Identifieropt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Identifier +{ + jpElementStart(1); + +} + +ContinueStatement: +jp_CONTINUE Identifieropt jp_SEMICOL +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($2)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ReturnStatement: +jp_RETURN Expressionopt jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ThrowStatement: +jp_THROW Expression jp_SEMICOL +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +SynchronizedStatement: +jp_SYNCHRONIZED jp_PARESTART Expression jp_PAREEND Block +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +TryStatement: +jp_TRY Block Catches +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TRY Block Catchesopt Finally +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Catchesopt: +{ + jpElementStart(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Catches +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Catches: +CatchClause +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Catches CatchClause +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +CatchClause: +jp_CATCH jp_PARESTART FormalParameter jp_PAREEND Block +{ + jpElementStart(5); + +} + +Finally: +jp_FINALLY Block +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Primary: +PrimaryNoNewArray +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PrimaryNoNewArray: +Literal +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS +{ + jpElementStart(1); + +} +| +jp_PARESTART Expression jp_PAREEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassInstanceCreationExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FieldAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MethodInvocation +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassInstanceCreationExpression: +New ClassType jp_PARESTART ArgumentListopt jp_PAREEND ClassBodyOpt +{ + jpElementStart(6); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ClassBodyOpt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ClassBody +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArgumentListopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArgumentList +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArgumentList: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArgumentList jp_COMMA Expression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayCreationExpression: +New PrimitiveType DimExprs Dimsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New ClassOrInterfaceType DimExprs Dimsopt +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New PrimitiveType Dims ArrayInitializer +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +New ClassOrInterfaceType Dims ArrayInitializer +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Dimsopt: +{ + jpElementStart(0); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Dims +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +DimExprs: +DimExpr +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +DimExprs DimExpr +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +DimExpr: +jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Dims: +jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(2); + +} +| +Dims jp_BRACKETSTART jp_BRACKETEND +{ + jpElementStart(3); + +} + +FieldAccess: +Primary jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS jp_DOT Identifier +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Primary jp_DOT jp_THIS +{ + jpElementStart(3); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +MethodInvocation: +Name jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Primary jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($1)); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_SUPER jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_THIS jp_DOT Identifier jp_PARESTART ArgumentListopt jp_PAREEND +{ + jpElementStart(6); + yyGetParser->DeallocateParserType(&($3)); + jpCheckEmpty(6); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ArrayAccess: +Name jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(4); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PrimaryNoNewArray jp_BRACKETSTART Expression jp_BRACKETEND +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostfixExpression: +Primary +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Name +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayType jp_DOT jp_CLASS +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PostDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostIncrementExpression: +PostfixExpression jp_PLUSPLUS +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PostDecrementExpression: +PostfixExpression jp_MINUSMINUS +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +UnaryExpression: +PreIncrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +PreDecrementExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PLUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_MINUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +UnaryExpressionNotPlusMinus +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PreIncrementExpression: +jp_PLUSPLUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +PreDecrementExpression: +jp_MINUSMINUS UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +UnaryExpressionNotPlusMinus: +PostfixExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TILDE UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_EXCLAMATION UnaryExpression +{ + jpElementStart(2); + jpCheckEmpty(2); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +CastExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +CastExpression: +jp_PARESTART PrimitiveType Dimsopt jp_PAREEND UnaryExpression +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PARESTART Expression jp_PAREEND UnaryExpressionNotPlusMinus +{ + jpElementStart(4); + jpCheckEmpty(4); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PARESTART Name Dims jp_PAREEND UnaryExpressionNotPlusMinus +{ + jpElementStart(5); + +} + +MultiplicativeExpression: +UnaryExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_TIMES UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_DIVIDE UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +MultiplicativeExpression jp_PERCENT UnaryExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AdditiveExpression: +MultiplicativeExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AdditiveExpression jp_PLUS MultiplicativeExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AdditiveExpression jp_MINUS MultiplicativeExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ShiftExpression: +AdditiveExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_LTLT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_GTGT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ShiftExpression jp_GTGTGT AdditiveExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +RelationalExpression: +ShiftExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_LESSTHAN ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_GREATER ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_LTEQUALS ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_GTEQUALS ShiftExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +RelationalExpression jp_INSTANCEOF ReferenceType +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +EqualityExpression: +RelationalExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EqualityExpression jp_EQUALSEQUALS RelationalExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +EqualityExpression jp_EXCLAMATIONEQUALS RelationalExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AndExpression: +EqualityExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +AndExpression jp_AND EqualityExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ExclusiveOrExpression: +AndExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ExclusiveOrExpression jp_CARROT AndExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +InclusiveOrExpression: +ExclusiveOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +InclusiveOrExpression jp_PIPE ExclusiveOrExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalAndExpression: +InclusiveOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalAndExpression jp_ANDAND InclusiveOrExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalOrExpression: +ConditionalAndExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalOrExpression jp_PIPEPIPE ConditionalAndExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConditionalExpression: +ConditionalOrExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ConditionalOrExpression jp_QUESTION Expression jp_COLON ConditionalExpression +{ + jpElementStart(5); + jpCheckEmpty(5); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssignmentExpression: +ConditionalExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Assignment +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Assignment: +LeftHandSide AssignmentOperator AssignmentExpression +{ + jpElementStart(3); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +LeftHandSide: +Name +{ + jpElementStart(1); + yyGetParser->DeallocateParserType(&($1)); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +FieldAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +ArrayAccess +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +AssignmentOperator: +jp_EQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_TIMESEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_DIVIDEEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PERCENTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PLUSEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_MINUSEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_LESLESEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_GTGTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_GTGTGTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_ANDEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_CARROTEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +jp_PIPEEQUALS +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +Expression: +AssignmentExpression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +ConstantExpression: +Expression +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +New: +jp_NEW +{ + jpElementStart(1); + jpCheckEmpty(1); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} +| +Name jp_DOT jp_NEW +{ + jpElementStart(3); + jpStoreClass($1); + jpCheckEmpty(3); + $$ = 0; + yyGetParser->SetCurrentCombine(""); + +} + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmDependsJavaError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} + diff --git a/Source/cmDependsJavaParserHelper.cxx b/Source/cmDependsJavaParserHelper.cxx new file mode 100644 index 000000000..727bb627e --- /dev/null +++ b/Source/cmDependsJavaParserHelper.cxx @@ -0,0 +1,434 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaParserHelper.cxx,v $ + Language: C++ + Date: $Date: 2006-05-10 19:01:22 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDependsJavaParserHelper.h" + +#include "cmSystemTools.h" +#include "cmDependsJavaLexer.h" + +int cmDependsJava_yyparse( yyscan_t yyscanner ); + +cmDependsJavaParserHelper::cmDependsJavaParserHelper() +{ + this->CurrentDepth = 0; + + this->UnionsAvailable = 0; + this->LastClassId = 0; + + CurrentClass tl; + tl.Name = "*"; + this->ClassStack.push_back(tl); +} + + +cmDependsJavaParserHelper::~cmDependsJavaParserHelper() +{ + this->CleanupParser(); +} + +void cmDependsJavaParserHelper::CurrentClass +::AddFileNamesForPrinting(std::vector *files, + const char* prefix, const char* sep) +{ + cmStdString rname = ""; + if ( prefix ) + { + rname += prefix; + rname += sep; + } + rname += this->Name; + files->push_back(rname); + std::vector::iterator it; + for ( it = this->NestedClasses.begin(); + it != this->NestedClasses.end(); + ++ it ) + { + it->AddFileNamesForPrinting(files, rname.c_str(), sep); + } +} + +void cmDependsJavaParserHelper::DeallocateParserType(char** pt) +{ + if (!pt) + { + return; + } + if (!*pt) + { + return; + } + *pt = 0; + this->UnionsAvailable --; +} + +void cmDependsJavaParserHelper::AddClassFound(const char* sclass) +{ + if( ! sclass ) + { + return; + } + std::vector::iterator it; + for ( it = this->ClassesFound.begin(); + it != this->ClassesFound.end(); + it ++ ) + { + if ( *it == sclass ) + { + return; + } + } + this->ClassesFound.push_back(sclass); +} + +void cmDependsJavaParserHelper::AddPackagesImport(const char* sclass) +{ + std::vector::iterator it; + for ( it = this->PackagesImport.begin(); + it != this->PackagesImport.end(); + it ++ ) + { + if ( *it == sclass ) + { + return; + } + } + this->PackagesImport.push_back(sclass); +} + +void cmDependsJavaParserHelper::SafePrintMissing(const char* str, + int line, int cnt) +{ + if ( str ) + { + std::cout << line << " String " << cnt << " exists: "; + unsigned int cc; + for ( cc = 0; cc < strlen(str); cc ++ ) + { + unsigned char ch = str[cc]; + if ( ch >= 32 && ch <= 126 ) + { + std::cout << (char)ch; + } + else + { + std::cout << "<" << (int)ch << ">"; + break; + } + } + std::cout << "- " << strlen(str) << std::endl; + } +} +void cmDependsJavaParserHelper::Print(const char* place, const char* str) +{ + if ( this->Verbose ) + { + std::cout << "[" << place << "=" << str << "]" << std::endl; + } +} + +void cmDependsJavaParserHelper::CombineUnions(char** out, + const char* in1, char** in2, + const char* sep) +{ + size_t len = 1; + if ( in1 ) + { + len += strlen(in1); + } + if ( *in2 ) + { + len += strlen(*in2); + } + if ( sep ) + { + len += strlen(sep); + } + *out = new char [ len ]; + *out[0] = 0; + if ( in1 ) + { + strcat(*out, in1); + } + if ( sep ) + { + strcat(*out, sep); + } + if ( *in2 ) + { + strcat(*out, *in2); + } + if ( *in2 ) + { + this->DeallocateParserType(in2); + } + this->UnionsAvailable ++; +} + +void cmDependsJavaParserHelper +::CheckEmpty(int line, int cnt, cmDependsJavaParserHelper::ParserType* pt) +{ + int cc; + int kk = -cnt + 1; + for ( cc = 1; cc <= cnt; cc ++) + { + cmDependsJavaParserHelper::ParserType* cpt = pt + kk; + this->SafePrintMissing(cpt->str, line, cc); + kk ++; + } +} + +void cmDependsJavaParserHelper +::PrepareElement(cmDependsJavaParserHelper::ParserType* me) +{ + // Inititalize self + me->str = 0; +} + +void cmDependsJavaParserHelper +::AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, + const char* str, int len) +{ + pt->str = 0; + if ( len == 0 ) + { + len = (int)strlen(str); + } + if ( len == 0 ) + { + return; + } + this->UnionsAvailable ++; + pt->str = new char[ len + 1 ]; + strncpy(pt->str, str, len); + pt->str[len] = 0; + this->Allocates.push_back(pt->str); +} + +void cmDependsJavaParserHelper::StartClass(const char* cls) +{ + CurrentClass cl; + cl.Name = cls; + this->ClassStack.push_back(cl); + + this->CurrentDepth ++; +} + +void cmDependsJavaParserHelper::EndClass() +{ + CurrentClass* parent = 0; + CurrentClass* current = 0; + if ( this->ClassStack.size() > 0 ) + { + current = &(*(this->ClassStack.end() - 1)); + if ( this->ClassStack.size() > 1 ) + { + parent = &(*(this->ClassStack.end() - 2)); + } + } + if ( current == 0 ) + { + std::cerr << "Error when parsing. Current class is null" << std::endl; + abort(); + } + if ( parent == 0 ) + { + std::cerr << "Error when parsing. Parent class is null" << std::endl; + abort(); + } + this->CurrentDepth --; + parent->NestedClasses.push_back(*current); + this->ClassStack.erase(this->ClassStack.end()-1, this->ClassStack.end()); +} + +void cmDependsJavaParserHelper::PrintClasses() +{ + if ( this->ClassStack.size() == 0 ) + { + std::cerr << "Error when parsing. No classes on class stack" << std::endl; + abort(); + } + std::vector files = this->GetFilesProduced(); + std::vector::iterator sit; + for ( sit = files.begin(); + sit != files.end(); + ++ sit ) + { + std::cout << " " << sit->c_str() << ".class" << std::endl; + } +} + +std::vector cmDependsJavaParserHelper::GetFilesProduced() +{ + std::vector files; + CurrentClass* toplevel = &(*(this->ClassStack.begin())); + std::vector::iterator it; + for ( it = toplevel->NestedClasses.begin(); + it != toplevel->NestedClasses.end(); + ++ it ) + { + it->AddFileNamesForPrinting(&files, 0, "$"); + } + return files; +} + +int cmDependsJavaParserHelper::ParseString(const char* str, int verb) +{ + if ( !str) + { + return 0; + } + this->Verbose = verb; + this->InputBuffer = str; + this->InputBufferPos = 0; + this->CurrentLine = 0; + + + yyscan_t yyscanner; + cmDependsJava_yylex_init(&yyscanner); + cmDependsJava_yyset_extra(this, yyscanner); + int res = cmDependsJava_yyparse(yyscanner); + cmDependsJava_yylex_destroy(yyscanner); + if ( res != 0 ) + { + std::cout << "JP_Parse returned: " << res << std::endl; + return 0; + } + + if ( verb ) + { + if ( this->CurrentPackage.size() > 0 ) + { + std::cout << "Current package is: " << + this->CurrentPackage.c_str() << std::endl; + } + std::cout << "Imports packages:"; + if ( this->PackagesImport.size() > 0 ) + { + std::vector::iterator it; + for ( it = this->PackagesImport.begin(); + it != this->PackagesImport.end(); + ++ it ) + { + std::cout << " " << it->c_str(); + } + } + std::cout << std::endl; + std::cout << "Depends on:"; + if ( this->ClassesFound.size() > 0 ) + { + std::vector::iterator it; + for ( it = this->ClassesFound.begin(); + it != this->ClassesFound.end(); + ++ it ) + { + std::cout << " " << it->c_str(); + } + } + std::cout << std::endl; + std::cout << "Generated files:" << std::endl; + this->PrintClasses(); + if ( this->UnionsAvailable != 0 ) + { + std::cout << "There are still " << + this->UnionsAvailable << " unions available" << std::endl; + } + } + this->CleanupParser(); + return 1; +} + +void cmDependsJavaParserHelper::CleanupParser() +{ + std::vector::iterator it; + for ( it = this->Allocates.begin(); + it != this->Allocates.end(); + ++ it ) + { + delete [] *it; + } + this->Allocates.erase(this->Allocates.begin(), + this->Allocates.end()); +} + +int cmDependsJavaParserHelper::LexInput(char* buf, int maxlen) +{ + if ( maxlen < 1 ) + { + return 0; + } + if ( this->InputBufferPos < this->InputBuffer.size() ) + { + buf[0] = this->InputBuffer[ this->InputBufferPos++ ]; + if ( buf[0] == '\n' ) + { + this->CurrentLine ++; + } + return(1); + } + else + { + buf[0] = '\n'; + return( 0 ); + } +} +void cmDependsJavaParserHelper::Error(const char* str) +{ + unsigned long pos = static_cast(this->InputBufferPos); + fprintf(stderr, "JPError: %s (%lu / Line: %d)\n", + str, pos, this->CurrentLine); + int cc; + std::cerr << "String: ["; + for ( cc = 0; + cc < 30 && *(this->InputBuffer.c_str() + this->InputBufferPos + cc); + cc ++ ) + { + std::cerr << *(this->InputBuffer.c_str() + this->InputBufferPos + cc); + } + std::cerr << "]" << std::endl; +} + +void cmDependsJavaParserHelper::UpdateCombine(const char* str1, + const char* str2) +{ + if ( this->CurrentCombine == "" && str1 != 0) + { + this->CurrentCombine = str1; + } + this->CurrentCombine += "."; + this->CurrentCombine += str2; +} + +int cmDependsJavaParserHelper::ParseFile(const char* file) +{ + if ( !cmSystemTools::FileExists(file)) + { + return 0; + } + std::ifstream ifs(file); + if ( !ifs ) + { + return 0; + } + + cmStdString fullfile = ""; + cmStdString line; + while ( cmSystemTools::GetLineFromStream(ifs, line) ) + { + fullfile += line + "\n"; + } + return this->ParseString(fullfile.c_str(), 0); +} + diff --git a/Source/cmDependsJavaParserHelper.h b/Source/cmDependsJavaParserHelper.h new file mode 100644 index 000000000..374cf4c4e --- /dev/null +++ b/Source/cmDependsJavaParserHelper.h @@ -0,0 +1,110 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDependsJavaParserHelper.h,v $ + Language: C++ + Date: $Date: 2006-05-10 19:01:22 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDependsJavaParserHelper_h +#define cmDependsJavaParserHelper_h + +#include "cmStandardIncludes.h" + +#define YYSTYPE cmDependsJavaParserHelper::ParserType +#define YYSTYPE_IS_DECLARED +#define YY_EXTRA_TYPE cmDependsJavaParserHelper* +#define YY_DECL int cmDependsJava_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) + +/** \class cmDependsJavaParserHelper + * \brief Helper class for parsing java source files + * + * Finds dependencies for java file and list of outputs + */ + +class cmDependsJavaParserHelper +{ +public: + typedef struct { + char* str; + } ParserType; + + cmDependsJavaParserHelper(); + ~cmDependsJavaParserHelper(); + + int ParseString(const char* str, int verb); + int ParseFile(const char* file); + + // For the lexer: + void AllocateParserType(cmDependsJavaParserHelper::ParserType* pt, + const char* str, int len = 0); + + int LexInput(char* buf, int maxlen); + void Error(const char* str); + + // For yacc + void AddClassFound(const char* sclass); + void PrepareElement(ParserType* opt); + void DeallocateParserType(char** pt); + void CheckEmpty(int line, int cnt, ParserType* pt); + void StartClass(const char* cls); + void EndClass(); + void AddPackagesImport(const char* sclass); + void SetCurrentPackage(const char* pkg) { this->CurrentPackage = pkg; } + const char* GetCurrentPackage() { return this->CurrentPackage.c_str(); } + void SetCurrentCombine(const char* cmb) { this->CurrentCombine = cmb; } + const char* GetCurrentCombine() { return this->CurrentCombine.c_str(); } + void UpdateCombine(const char* str1, const char* str2); + + std::vector& GetClassesFound() { return this->ClassesFound; } + + std::vector GetFilesProduced(); + +private: + class CurrentClass + { + public: + cmStdString Name; + std::vector NestedClasses; + CurrentClass() {} + void AddFileNamesForPrinting(std::vector *files, + const char* prefix, const char* sep); + }; + cmStdString CurrentPackage; + cmStdString::size_type InputBufferPos; + cmStdString InputBuffer; + std::vector OutputBuffer; + std::vector ClassesFound; + std::vector PackagesImport; + cmStdString CurrentCombine; + + std::vector ClassStack; + + int CurrentLine; + int UnionsAvailable; + int LastClassId; + int CurrentDepth; + int Verbose; + + std::vector Allocates; + + void PrintClasses(); + + void Print(const char* place, const char* str); + void CombineUnions(char** out, const char* in1, char** in2, + const char* sep); + void SafePrintMissing(const char* str, int line, int cnt); + + void CleanupParser(); +}; + +#endif + diff --git a/Source/cmDependsJavaParserTokens.h b/Source/cmDependsJavaParserTokens.h new file mode 100644 index 000000000..c7a414f07 --- /dev/null +++ b/Source/cmDependsJavaParserTokens.h @@ -0,0 +1,254 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + jp_ABSTRACT = 258, + jp_ASSERT = 259, + jp_BOOLEAN_TYPE = 260, + jp_BREAK = 261, + jp_BYTE_TYPE = 262, + jp_CASE = 263, + jp_CATCH = 264, + jp_CHAR_TYPE = 265, + jp_CLASS = 266, + jp_CONTINUE = 267, + jp_DEFAULT = 268, + jp_DO = 269, + jp_DOUBLE_TYPE = 270, + jp_ELSE = 271, + jp_EXTENDS = 272, + jp_FINAL = 273, + jp_FINALLY = 274, + jp_FLOAT_TYPE = 275, + jp_FOR = 276, + jp_IF = 277, + jp_IMPLEMENTS = 278, + jp_IMPORT = 279, + jp_INSTANCEOF = 280, + jp_INT_TYPE = 281, + jp_INTERFACE = 282, + jp_LONG_TYPE = 283, + jp_NATIVE = 284, + jp_NEW = 285, + jp_PACKAGE = 286, + jp_PRIVATE = 287, + jp_PROTECTED = 288, + jp_PUBLIC = 289, + jp_RETURN = 290, + jp_SHORT_TYPE = 291, + jp_STATIC = 292, + jp_STRICTFP = 293, + jp_SUPER = 294, + jp_SWITCH = 295, + jp_SYNCHRONIZED = 296, + jp_THIS = 297, + jp_THROW = 298, + jp_THROWS = 299, + jp_TRANSIENT = 300, + jp_TRY = 301, + jp_VOID = 302, + jp_VOLATILE = 303, + jp_WHILE = 304, + jp_BOOLEANLITERAL = 305, + jp_CHARACTERLITERAL = 306, + jp_DECIMALINTEGERLITERAL = 307, + jp_FLOATINGPOINTLITERAL = 308, + jp_HEXINTEGERLITERAL = 309, + jp_NULLLITERAL = 310, + jp_STRINGLITERAL = 311, + jp_NAME = 312, + jp_AND = 313, + jp_ANDAND = 314, + jp_ANDEQUALS = 315, + jp_BRACKETEND = 316, + jp_BRACKETSTART = 317, + jp_CARROT = 318, + jp_CARROTEQUALS = 319, + jp_COLON = 320, + jp_COMMA = 321, + jp_CURLYEND = 322, + jp_CURLYSTART = 323, + jp_DIVIDE = 324, + jp_DIVIDEEQUALS = 325, + jp_DOLLAR = 326, + jp_DOT = 327, + jp_EQUALS = 328, + jp_EQUALSEQUALS = 329, + jp_EXCLAMATION = 330, + jp_EXCLAMATIONEQUALS = 331, + jp_GREATER = 332, + jp_GTEQUALS = 333, + jp_GTGT = 334, + jp_GTGTEQUALS = 335, + jp_GTGTGT = 336, + jp_GTGTGTEQUALS = 337, + jp_LESLESEQUALS = 338, + jp_LESSTHAN = 339, + jp_LTEQUALS = 340, + jp_LTLT = 341, + jp_MINUS = 342, + jp_MINUSEQUALS = 343, + jp_MINUSMINUS = 344, + jp_PAREEND = 345, + jp_PARESTART = 346, + jp_PERCENT = 347, + jp_PERCENTEQUALS = 348, + jp_PIPE = 349, + jp_PIPEEQUALS = 350, + jp_PIPEPIPE = 351, + jp_PLUS = 352, + jp_PLUSEQUALS = 353, + jp_PLUSPLUS = 354, + jp_QUESTION = 355, + jp_SEMICOL = 356, + jp_TILDE = 357, + jp_TIMES = 358, + jp_TIMESEQUALS = 359, + jp_ERROR = 360 + }; +#endif +#define jp_ABSTRACT 258 +#define jp_ASSERT 259 +#define jp_BOOLEAN_TYPE 260 +#define jp_BREAK 261 +#define jp_BYTE_TYPE 262 +#define jp_CASE 263 +#define jp_CATCH 264 +#define jp_CHAR_TYPE 265 +#define jp_CLASS 266 +#define jp_CONTINUE 267 +#define jp_DEFAULT 268 +#define jp_DO 269 +#define jp_DOUBLE_TYPE 270 +#define jp_ELSE 271 +#define jp_EXTENDS 272 +#define jp_FINAL 273 +#define jp_FINALLY 274 +#define jp_FLOAT_TYPE 275 +#define jp_FOR 276 +#define jp_IF 277 +#define jp_IMPLEMENTS 278 +#define jp_IMPORT 279 +#define jp_INSTANCEOF 280 +#define jp_INT_TYPE 281 +#define jp_INTERFACE 282 +#define jp_LONG_TYPE 283 +#define jp_NATIVE 284 +#define jp_NEW 285 +#define jp_PACKAGE 286 +#define jp_PRIVATE 287 +#define jp_PROTECTED 288 +#define jp_PUBLIC 289 +#define jp_RETURN 290 +#define jp_SHORT_TYPE 291 +#define jp_STATIC 292 +#define jp_STRICTFP 293 +#define jp_SUPER 294 +#define jp_SWITCH 295 +#define jp_SYNCHRONIZED 296 +#define jp_THIS 297 +#define jp_THROW 298 +#define jp_THROWS 299 +#define jp_TRANSIENT 300 +#define jp_TRY 301 +#define jp_VOID 302 +#define jp_VOLATILE 303 +#define jp_WHILE 304 +#define jp_BOOLEANLITERAL 305 +#define jp_CHARACTERLITERAL 306 +#define jp_DECIMALINTEGERLITERAL 307 +#define jp_FLOATINGPOINTLITERAL 308 +#define jp_HEXINTEGERLITERAL 309 +#define jp_NULLLITERAL 310 +#define jp_STRINGLITERAL 311 +#define jp_NAME 312 +#define jp_AND 313 +#define jp_ANDAND 314 +#define jp_ANDEQUALS 315 +#define jp_BRACKETEND 316 +#define jp_BRACKETSTART 317 +#define jp_CARROT 318 +#define jp_CARROTEQUALS 319 +#define jp_COLON 320 +#define jp_COMMA 321 +#define jp_CURLYEND 322 +#define jp_CURLYSTART 323 +#define jp_DIVIDE 324 +#define jp_DIVIDEEQUALS 325 +#define jp_DOLLAR 326 +#define jp_DOT 327 +#define jp_EQUALS 328 +#define jp_EQUALSEQUALS 329 +#define jp_EXCLAMATION 330 +#define jp_EXCLAMATIONEQUALS 331 +#define jp_GREATER 332 +#define jp_GTEQUALS 333 +#define jp_GTGT 334 +#define jp_GTGTEQUALS 335 +#define jp_GTGTGT 336 +#define jp_GTGTGTEQUALS 337 +#define jp_LESLESEQUALS 338 +#define jp_LESSTHAN 339 +#define jp_LTEQUALS 340 +#define jp_LTLT 341 +#define jp_MINUS 342 +#define jp_MINUSEQUALS 343 +#define jp_MINUSMINUS 344 +#define jp_PAREEND 345 +#define jp_PARESTART 346 +#define jp_PERCENT 347 +#define jp_PERCENTEQUALS 348 +#define jp_PIPE 349 +#define jp_PIPEEQUALS 350 +#define jp_PIPEPIPE 351 +#define jp_PLUS 352 +#define jp_PLUSEQUALS 353 +#define jp_PLUSPLUS 354 +#define jp_QUESTION 355 +#define jp_SEMICOL 356 +#define jp_TILDE 357 +#define jp_TIMES 358 +#define jp_TIMESEQUALS 359 +#define jp_ERROR 360 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx new file mode 100755 index 000000000..a644749d4 --- /dev/null +++ b/Source/cmDocumentVariables.cxx @@ -0,0 +1,1106 @@ +#include "cmDocumentVariables.h" +#include "cmake.h" + +void cmDocumentVariables::DefineVariables(cmake* cm) +{ + // Subsection: variables defined by cmake, that give + // information about the project, and cmake + cm->DefineProperty + ("CMAKE_AR", cmProperty::VARIABLE, + "Name of archiving tool for static libraries.", + "This specifies name of the program that creates archive " + "or static libraries.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_COMMAND", cmProperty::VARIABLE, + "The full path to the cmake executable.", + "This is the full path to the CMake executable cmake which is " + "useful from custom commands that want to use the cmake -E " + "option for portable system commands. " + "(e.g. /usr/local/bin/cmake", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_BINARY_DIR", cmProperty::VARIABLE, + "The path to the top level of the build tree.", + "This is the full path to the top level of the current CMake " + "build tree. For an in-source build, this would be the same " + "as CMAKE_SOURCE_DIR. ", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SOURCE_DIR", cmProperty::VARIABLE, + "The path to the top level of the source tree.", + "This is the full path to the top level of the current CMake " + "source tree. For an in-source build, this would be the same " + "as CMAKE_BINARY_DIR. ", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_CURRENT_BINARY_DIR", cmProperty::VARIABLE, + "The path to the binary directory currently being processed.", + "This the full path to the build directory that is currently " + "being processed by cmake. Each directory added by " + "add_subdirectory will create a binary directory in the build " + "tree, and as it is being processed this variable will be set. " + "For in-source builds this is the current source directory " + "being processed.", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_CURRENT_SOURCE_DIR", cmProperty::VARIABLE, + "The path to the source directory currently being processed.", + "This the full path to the source directory that is currently " + "being processed by cmake. ", false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_CURRENT_LIST_FILE", cmProperty::VARIABLE, + "Full path to the listfile currently being processed.", + "As CMake processes the listfiles in your project this " + "variable will always be set to the one currently being " + "processed. See also CMAKE_PARENT_LIST_FILE.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_CURRENT_LIST_LINE", cmProperty::VARIABLE, + "The line number of the current file being processed.", + "This is the line number of the file currently being" + " processed by cmake.", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_BUILD_TOOL", cmProperty::VARIABLE, + "Tool used for the acutal build process.", + "This variable is set to the program that will be" + " needed to build the output of CMake. If the " + "generator selected was Visual Studio 6, the " + "CMAKE_MAKE_PROGRAM will be set to msdev, for " + "Unix makefiles it will be set to make or gmake, " + "and for Visual Studio 7 it set to devenv. For " + "Nmake Makefiles the value is nmake. This can be " + "useful for adding special flags and commands based" + " on the final build environment. ", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_CACHEFILE_DIR", cmProperty::VARIABLE, + "The directory with the CMakeCache.txt file.", + "This is the full path to the directory that has the " + "CMakeCache.txt file in it. This is the same as " + "CMAKE_BINARY_DIR.", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_CACHE_MAJOR_VERSION", cmProperty::VARIABLE, + "Major version of CMake used to create the CMakeCache.txt file", + "This is stores the major version of CMake used to " + "write a CMake cache file. It is only different when " + "a different version of CMake is run on a previously " + "created cache file.", false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_CACHE_MINOR_VERSION", cmProperty::VARIABLE, + "Minor version of CMake used to create the CMakeCache.txt file", + "This is stores the minor version of CMake used to " + "write a CMake cache file. It is only different when " + "a different version of CMake is run on a previously " + "created cache file.", false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_CACHE_RELEASE_VERSION", cmProperty::VARIABLE, + "Release version of CMake used to create the CMakeCache.txt file", + "This is stores the release version of CMake used to " + "write a CMake cache file. It is only different when " + "a different version of CMake is run on a previously " + "created cache file.", false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_CFG_INTDIR", cmProperty::VARIABLE, + "Build time configuration directory for project.", + "This is a variable that is used to provide developers" + " access to the intermediate directory used by Visual " + "Studio IDE projects. For example, if building " + "Debug all executables and libraries end up in a " + "Debug directory. On UNIX systems this variable " + "is set to \".\". However, with Visual Studio this " + "variable is set to $(IntDir). $(IntDir) is expanded " + "by the IDE only. So this variable should only be " + "used in custom commands that will be run during " + "the build process. This variable should not be " + "used directly in a CMake command. CMake has no " + "way of knowing if Debug or Release will be picked " + "by the IDE for a build type. If a program needs to " + "know the directory it was built in, it can use " + "CMAKE_INTDIR. CMAKE_INTDIR is a C/C++ preprocessor " + "macro that is defined on the command line of the " + "compiler. If it has a value, it will be the " + "intermediate directory used to build the file. " + "This way an executable or a library can find files " + "that are located in the build directory.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_CTEST_COMMAND", cmProperty::VARIABLE, + "Full path to ctest command installed with cmake.", + "This is the full path to the CTest executable ctest " + "which is useful from custom commands that want " + " to use the cmake -E option for portable system " + "commands.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_DL_LIBS", cmProperty::VARIABLE, + "Name of library containing dlopen and dlcose.", + "The name of the library that has dlopen and " + "dlclose in it, usually -ldl on most UNIX machines.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_EDIT_COMMAND", cmProperty::VARIABLE, + "Full path to CMakeSetup or ccmake.", + "This is the full path to the CMake executable " + "that can graphically edit the cache. For example," + " CMakeSetup, ccmake, or cmake -i.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_GENERATOR", cmProperty::VARIABLE, + "The generator used to build the project.", + "The name of the generator that is being used to generate the " + "build files. (e.g. \"Unix Makefiles\", " + "\"Visual Studio 6\", etc.)",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_HOME_DIRECTORY", cmProperty::VARIABLE, + "Path to top of source tree.", + "This is the path to the top level of the source tree.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_LINK_LIBRARY_SUFFIX", cmProperty::VARIABLE, + "The suffix for libraries that you link to.", + "The suffix to use for the end of a library, .lib on Windows.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_EXECUTABLE_SUFFIX", cmProperty::VARIABLE, + "The suffix for executables on this platform.", + "The suffix to use for the end of an executable if any, " + ".exe on Windows.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_MAJOR_VERSION", cmProperty::VARIABLE, + "The Major version of cmake (i.e. the 2 in 2.X.X)", + "This specifies the major version of the CMake executable" + " being run.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_MAKE_PROGRAM", cmProperty::VARIABLE, + "See CMAKE_BUILD_TOOL.", + "This variable is around for backwards compatibility, " + "see CMAKE_BUILD_TOOL.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_MINOR_VERSION", cmProperty::VARIABLE, + "The Minor version of cmake (i.e. the 4 in X.4.X).", + "This specifies the minor version of the CMake" + " executable being run.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_PARENT_LIST_FILE", cmProperty::VARIABLE, + "Full path to the parent listfile of the one currently being processed.", + "As CMake processes the listfiles in your project this " + "variable will always be set to the listfile that included " + "or somehow invoked the one currently being " + "processed. See also CMAKE_CURRENT_LIST_FILE.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_PROJECT_NAME", cmProperty::VARIABLE, + "The name of the current project.", + "This specifies name of the current project from" + " the closest inherited PROJECT command.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_RANLIB", cmProperty::VARIABLE, + "Name of randomizing tool for static libraries.", + "This specifies name of the program that randomizes " + "libraries on UNIX, not used on Windows, but may be present.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_ROOT", cmProperty::VARIABLE, + "Install directory for running cmake.", + "This is the install root for the running CMake and" + " the Modules directory can be found here. This is" + " commonly used in this format: ${CMAKE_ROOT}/Modules",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SIZEOF_VOID_P", cmProperty::VARIABLE, + "Size of a void pointer.", + "This is set to the size of a pointer on the machine, " + "and is determined by a try compile. If a 64 bit size " + "is found, then the library search path is modified to " + "look for 64 bit libraries first.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SKIP_RPATH", cmProperty::VARIABLE, + "If true, do not add run time path information.", + "If this is set to TRUE, then the rpath information " + "is not added to compiled executables. The default" + "is to add rpath information if the platform supports it." + "This allows for easy running from the build tree.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SOURCE_DIR", cmProperty::VARIABLE, + "Source directory for project.", + "This is the top level source directory for the project. " + "It corresponds to the source directory given to " + "CMakeSetup or ccmake.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_STANDARD_LIBRARIES", cmProperty::VARIABLE, + "Libraries linked into every executable and shared library.", + "This is the list of libraries that are linked " + "into all executables and libraries.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_USING_VC_FREE_TOOLS", cmProperty::VARIABLE, + "True if free visual studio tools being used.", + "This is set to true if the compiler is Visual " + "Studio free tools.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_VERBOSE_MAKEFILE", cmProperty::VARIABLE, + "Create verbose makefiles if on.", + "This variable defaults to false. You can set " + "this variable to true to make CMake produce verbose " + "makefiles that show each command line as it is used.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("PROJECT_BINARY_DIR", cmProperty::VARIABLE, + "Full path to build directory for project.", + "This is the binary directory of the most recent " + "PROJECT command.",false,"Variables that Provide Information"); + cm->DefineProperty + ("PROJECT_NAME", cmProperty::VARIABLE, + "Name of the project given to the project command.", + "This is the name given to the most " + "recent PROJECT command. ",false, + "Variables that Provide Information"); + cm->DefineProperty + ("PROJECT_SOURCE_DIR", cmProperty::VARIABLE, + "Top level source directory for the current project.", + "This is the source directory of the most recent " + "PROJECT command.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("[Project name]_BINARY_DIR", cmProperty::VARIABLE, + "Top level binary directory for the named project.", + "A variable is created with the name used in the PROJECT " + "command, and is the binary directory for the project. " + " This can be useful when SUBDIR is used to connect " + "several projects.",false, + "Variables that Provide Information"); + cm->DefineProperty + ("[Project name]_SOURCE_DIR", cmProperty::VARIABLE, + "Top level source directory for the named project.", + "A variable is created with the name used in the PROJECT " + "command, and is the source directory for the project." + " This can be useful when add_subdirectory " + "is used to connect several projects.",false, + "Variables that Provide Information"); + + cm->DefineProperty + ("CMAKE_IMPORT_LIBRARY_PREFIX", cmProperty::VARIABLE, + "The prefix for import libraries that you link to.", + "The prefix to use for the name of an import library if used " + "on this platform.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_IMPORT_LIBRARY_SUFFIX", cmProperty::VARIABLE, + "The suffix for import libraries that you link to.", + "The suffix to use for the end of an import library if used " + "onthis platform.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SHARED_LIBRARY_PREFIX", cmProperty::VARIABLE, + "The prefix for shared libraries that you link to.", + "The prefix to use for the name of a shared library, lib on UNIX.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SHARED_LIBRARY_SUFFIX", cmProperty::VARIABLE, + "The suffix for shared libraries that you link to.", + "The suffix to use for the end of a shared library, .dll on Windows.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SHARED_MODULE_PREFIX", cmProperty::VARIABLE, + "The prefix for loadable modules that you link to.", + "The prefix to use for the name of a loadable module on this platform.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_SHARED_MODULE_SUFFIX", cmProperty::VARIABLE, + "The suffix for shared libraries that you link to.", + "The suffix to use for the end of a loadable module on this platform", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_STATIC_LIBRARY_PREFIX", cmProperty::VARIABLE, + "The prefix for static libraries that you link to.", + "The prefix to use for the name of a static library, lib on UNIX.", + false, + "Variables that Provide Information"); + cm->DefineProperty + ("CMAKE_STATIC_LIBRARY_SUFFIX", cmProperty::VARIABLE, + "The suffix for static libraries that you link to.", + "The suffix to use for the end of a static library, .lib on Windows.", + false, + "Variables that Provide Information"); + + + // Variables defined by cmake, that change the behavior + // of cmake + cm->DefineProperty + ("CMAKE_FIND_LIBRARY_PREFIXES", cmProperty::VARIABLE, + "Prefixes to prepend when looking for libraries.", + "This specifies what prefixes to add to library names when " + "the find_library command looks for libraries. On UNIX " + "systems this is typically lib, meaning that when trying " + "to find the foo library it will look for libfoo.", + false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_FIND_LIBRARY_SUFFIXES", cmProperty::VARIABLE, + "Suffixes to append when looking for libraries.", + "This specifies what suffixes to add to library names when " + "the find_library command looks for libraries. On Windows " + "systems this is typically .lib and .dll, meaning that when trying " + "to find the foo library it will look for foo.dll etc.", + false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_CONFIGURATION_TYPES", cmProperty::VARIABLE, + "Specifies the available build types.", + "This specifies what build types will be available such as " + "Debug, Release, RelWithDebInfo etc. This has reasonable defaults " + "on most platforms. But can be extended to provide other " + "build types. See also CMAKE_BUILD_TYPE.", + false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_BUILD_TYPE", cmProperty::VARIABLE, + "Specifies the build type for make based generators.", + "This specifies what build type will be built in this tree. " + " Possible values are empty, Debug, Release, RelWithDebInfo" + " and MinSizeRel. This variable is only supported for " + "make based generators. If this variable is supported, " + "then CMake will also provide initial values for the " + "variables with the name " + " CMAKE_C_FLAGS_[Debug|Release|RelWithDebInfo|MinSizeRel]." + " For example, if CMAKE_BUILD_TYPE is Debug, then " + "CMAKE_C_FLAGS_DEBUG will be added to the CMAKE_C_FLAGS.",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_BACKWARDS_COMPATIBILITY", cmProperty::VARIABLE, + "Version of cmake required to build project", + "From the point of view of backwards compatibility, this " + "specifies what version of CMake should be supported. By " + "default this value is the version number of CMake that " + "you are running. You can set this to an older version of" + " CMake to support deprecated commands of CMake in projects" + " that were written to use older versions of CMake. This " + "can be set by the user or set at the beginning of a " + "CMakeLists file.",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_CROSSCOMPILING", cmProperty::VARIABLE, + "Is CMake currently cross compiling.", + "This variable will be set to true by CMake if CMake is cross " + "compiling. Specifically if the build platform is different " + "from the target platform.", false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_INSTALL_PREFIX", cmProperty::VARIABLE, + "Install directory used by install.", + "If \"make install\" is invoked or INSTALL is built" + ", this directory is pre-pended onto all install " + "directories. This variable defaults to /usr/local" + " on UNIX and c:/Program Files on Windows.",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_MODULE_PATH", cmProperty::VARIABLE, + "Path to look for cmake modules to load.", + "Specifies a path to override the default seach path for " + "CMake modules. For example include commands will look " + "in this path first for modules to include.", + false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_USER_MAKE_RULES_OVERRIDE", cmProperty::VARIABLE, + "Specify a file that can change the build rule variables.", + "If this variable is set, it should to point to a " + "CMakeLists.txt file that will be read in by CMake " + "after all the system settings have been set, but " + "before they have been used. This would allow you " + "to override any variables that need to be changed " + "for some special project. ",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("BUILD_SHARED_LIBS", cmProperty::VARIABLE, + "Global flag to cause add_library to create shared libraries if on.", + "If present and true, this will cause all libraries to be " + "built shared unless the library was explicitly added as a " + "static library. This variable is often added to projects " + "as an OPTION so that each user of a project can decide if " + "they want to build the project using shared or static " + "libraries.",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_NOT_USING_CONFIG_FLAGS", cmProperty::VARIABLE, + "Skip _BUILD_TYPE flags if true.", + "This is an internal flag used by the generators in " + "CMake to tell CMake to skip the _BUILD_TYPE flags.",false, + "Variables That Change Behavior"); + + cm->DefineProperty + ("CMAKE_MFC_FLAG", cmProperty::VARIABLE, + "Tell cmake to use MFC for an executable or dll.", + "This can be set in a CMakeLists.txt file and will " + "enable MFC in the application. It should be set " + "to 1 for static the static MFC library, and 2 for " + "the shared MFC library. This is used in visual " + "studio 6 and 7 project files. The CMakeSetup " + "dialog uses MFC and the CMakeLists.txt looks like this:\n" + "ADD_DEFINITIONS(-D_AFXDLL)\n" + "set(CMAKE_MFC_FLAG 2)\n" + "add_executable(CMakeSetup WIN32 ${SRCS})\n",false, + "Variables That Change Behavior"); + + + // Variables defined by CMake that describe the system + + cm->DefineProperty + ("CMAKE_SYSTEM", cmProperty::VARIABLE, + "Name of system cmake is compiling for.", + "This variable is the composite of CMAKE_SYSTEM_NAME" + "and CMAKE_SYSTEM_VERSION, like this " + "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_VERSION}. " + "If CMAKE_SYSTEM_VERSION is not set, then " + "CMAKE_SYSTEM is the same as CMAKE_SYSTEM_NAME.",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_SYSTEM_NAME", cmProperty::VARIABLE, + "Name of the OS CMake is building for.", + "This is the name of the operating system on " + "which CMake is targeting. On systems that " + "have the uname command, this variable is set " + "to the output of uname -s. Linux, Windows, " + " and Darwin for Mac OSX are the values found " + " on the big three operating systems." ,false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_SYSTEM_PROCESSOR", cmProperty::VARIABLE, + "The name of the CPU CMake is building for.", + "On systems that support uname, this variable is " + "set to the output of uname -p, on windows it is " + "set to the value of the environment variable " + "PROCESSOR_ARCHITECTURE",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_SYSTEM_VERSION", cmProperty::VARIABLE, + "OS version CMake is building for.", + "A numeric version string for the system, on " + "systems that support uname, this variable is " + "set to the output of uname -r. On other " + "systems this is set to major-minor version numbers.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_HOST_SYSTEM", cmProperty::VARIABLE, + "Name of system cmake is being run on.", + "The same as CMAKE_SYSTEM but for the host system instead " + "of the target system when cross compiling.",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_HOST_SYSTEM_NAME", cmProperty::VARIABLE, + "Name of the OS CMake is running on.", + "The same as CMAKE_SYSTEM_NAME but for the host system instead " + "of the target system when cross compiling.",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_HOST_SYSTEM_PROCESSOR", cmProperty::VARIABLE, + "The name of the CPU CMake is running on.", + "The same as CMAKE_SYSTEM_PROCESSOR but for the host system instead " + "of the target system when cross compiling.",false, + "Variables That Describe the System"); + cm->DefineProperty + ("CMAKE_HOST_SYSTEM_VERSION", cmProperty::VARIABLE, + "OS version CMake is running on.", + "The same as CMAKE_SYSTEM_VERSION but for the host system instead " + "of the target system when cross compiling.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("APPLE", cmProperty::VARIABLE, + "True if running on Mac OSX.", + "Set to true on Mac OSX.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("BORLAND", cmProperty::VARIABLE, + "True of the borland compiler is being used.", + "This is set to true if the Borland compiler is being used.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CYGWIN", cmProperty::VARIABLE, + "True for cygwin.", + "Set to true when using CYGWIN.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("MSVC", cmProperty::VARIABLE, + "True when using Microsoft Visual C", + "Set to true when the compiler is some version of Microsoft Visual C.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("MSVC80", cmProperty::VARIABLE, + "True when using Microsoft Visual C 8.0", + "Set to true when the compiler is version 8.0 of Microsoft Visual C.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("MSVC_IDE", cmProperty::VARIABLE, + "True when using the Microsoft Visual C IDE", + "Set to true when the target platform is the Microsoft Visual C IDE, " + "as opposed to the command line compiler.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("MSVC_VERSION", cmProperty::VARIABLE, + "The version of Microsoft Visual C/C++ being used if any.", + "The version of Microsoft Visual C/C++ being used if any. " + "For example 1300 is MSVC 6.0.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_CL_64", cmProperty::VARIABLE, + "Using the 64 bit compiler from Microsoft", + "Set to true when using the 64 bit cl compiler from Microsoft.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_COMPILER_2005", cmProperty::VARIABLE, + "Using the Visual Studio 2005 compiler from Microsoft", + "Set to true when using the Visual Studio 2005 compiler " + "from Microsoft.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("UNIX", cmProperty::VARIABLE, + "True for UNIX and UNIX like operating systems.", + "Set to true when the target system is UNIX or UNIX like " + "(i.e. APPLE and CYGWIN).",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("WIN32", cmProperty::VARIABLE, + "True on windows systems, including win64.", + "Set to true when the target system is Windows and on cygwin.",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_HOST_APPLE", cmProperty::VARIABLE, + "True for Apple OSXoperating systems.", + "Set to true when the host system is Apple OSX.", + false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_HOST_UNIX", cmProperty::VARIABLE, + "True for UNIX and UNIX like operating systems.", + "Set to true when the host system is UNIX or UNIX like " + "(i.e. APPLE and CYGWIN).",false, + "Variables That Describe the System"); + + cm->DefineProperty + ("CMAKE_HOST_WIN32", cmProperty::VARIABLE, + "True on windows systems, including win64.", + "Set to true when the host system is Windows and on cygwin.",false, + "Variables That Describe the System"); + + // Variables that affect the building of object files and + // targets. + // + cm->DefineProperty + ("CMAKE_INSTALL_RPATH", cmProperty::VARIABLE, + "The rpath to use for installed targets.", + "A semicolon-separated list specifying the rpath " + "to use in installed targets (for platforms that support it). " + "This is used to initialize the target property " + "INSTALL_RPATH for all targets.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_INSTALL_RPATH_USE_LINK_PATH", cmProperty::VARIABLE, + "Add paths to linker search and installed rpath.", + "CMAKE_INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true " + "will append directories in the linker search path and outside the " + "project to the INSTALL_RPATH. " + "This is used to initialize the target property " + "INSTALL_RPATH_USE_LINK_PATH for all targets.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_INSTALL_NAME_DIR", cmProperty::VARIABLE, + "Mac OSX directory name for installed targets.", + "CMAKE_INSTALL_NAME_DIR is used to initialize the " + "INSTALL_NAME_DIR property on all targets. See that target " + "property for more information.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_Fortran_MODULE_DIRECTORY", cmProperty::VARIABLE, + "Fortran module output directory.", + "This variable is used to initialize the " + "Fortran_MODULE_DIRECTORY property on all the targets. " + "See that target property for additional information.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_LIBRARY_OUTPUT_DIRECTORY", cmProperty::VARIABLE, + "Where to put all the LIBRARY targets when built.", + "This variable is used to initialize the " + "LIBRARY_OUTPUT_DIRECTORY property on all the targets. " + "See that target property for additional information.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_ARCHIVE_OUTPUT_DIRECTORY", cmProperty::VARIABLE, + "Where to put all the ARCHIVE targets when built.", + "This variable is used to initialize the " + "ARCHIVE_OUTPUT_DIRECTORY property on all the targets. " + "See that target property for additional information.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_RUNTIME_OUTPUT_DIRECTORY", cmProperty::VARIABLE, + "Where to put all the RUNTIME targets when built.", + "This variable is used to initialize the " + "RUNTIME_OUTPUT_DIRECTORY property on all the targets. " + "See that target property for additional information.", + false, + "Variables that Control the Build"); + + + cm->DefineProperty + ("CMAKE_DEBUG_POSTFIX", cmProperty::VARIABLE, + "A postfix to add to targets when build as debug.", + "This variable is used to initialize the DEBUG_POSTFIX " + "property on all the targets. If set the postfix will be " + "appended to any targets built when the configuration is " + "Debug.", + false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_BUILD_WITH_INSTALL_RPATH", cmProperty::VARIABLE, + "Use the install path for the RPATH", + "Normally CMake uses the build tree for the RPATH when building " + "executables etc on systems that use RPATH. When the software " + "is installed the executables etc are relinked by CMake to have " + "the install RPATH. If this variable is set to true then the software " + "is always built with the install path for the RPATH and does not " + "need to be relinked when installed.",false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_SKIP_BUILD_RPATH", cmProperty::VARIABLE, + "Do not include RPATHs in the build tree.", + "Normally CMake uses the build tree for the RPATH when building " + "executables etc on systems that use RPATH. When the software " + "is installed the executables etc are relinked by CMake to have " + "the install RPATH. If this variable is set to true then the software " + "is always built with no RPATH.",false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_EXE_LINKER_FLAGS", cmProperty::VARIABLE, + "Linker flags used to create executables.", + "Flags used by the linker when creating an executable.",false, + "Variables that Control the Build"); + + cm->DefineProperty + ("CMAKE_EXE_LINKER_FLAGS_[CMAKE_BUILD_TYPE]", cmProperty::VARIABLE, + "Flag used when linking an executable.", + "Same as CMAKE_C_FLAGS_* but used by the linker " + "when creating executables.",false, + "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_LIBRARY_PATH_FLAG", cmProperty::VARIABLE, + "The flag used to add a library search path to a compiler.", + "The flag used to specify a library directory to the compiler. " + "On most compilers this is \"-L\".",false, + "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_LINK_DEF_FILE_FLAG ", cmProperty::VARIABLE, + "Linker flag used to specify a .def file for dll creation.", + "The flag used to add a .def file when creating " + "a dll on Windows, this is only defined on Windows.",false, + "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_LINK_LIBRARY_FLAG", cmProperty::VARIABLE, + "Flag used to link a library into an executable.", + "The flag used to specify a library to link to an executable. " + "On most compilers this is \"-l\".",false, + "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_LINK_LIBRARY_FILE_FLAG", cmProperty::VARIABLE, + "Flag used to link a library specified by a path to its file.", + "The flag used before a library file path is given to the linker. " + "This is needed only on very few platforms.", false, + "Variables that Control the Build"); + cm->DefineProperty + ("CMAKE_USE_RELATIVE_PATHS", cmProperty::VARIABLE, + "Use relative paths (May not work!).", + "If this is set to TRUE, then the CMake will use " + "relative paths between the source and binary tree. " + "This option does not work for more complicated " + "projects, and relative paths are used when possible. " + "In general, it is not possible to move CMake generated" + " makefiles to a different location regardless " + "of the value of this variable.",false, + "Variables that Control the Build"); + cm->DefineProperty + ("EXECUTABLE_OUTPUT_PATH", cmProperty::VARIABLE, + "Old executable location variable.", + "This variable should no longer be used as of CMake 2.6. " + "Use the RUNTIME_OUTPUT_DIRECTORY target property instead. " + "It will override this variable if it is set.\n" + "If set, this is the directory where all executables " + "built during the build process will be placed.",false, + "Variables that Control the Build"); + cm->DefineProperty + ("LIBRARY_OUTPUT_PATH", cmProperty::VARIABLE, + "Old library location variable.", + "This variable should no longer be used as of CMake 2.6. " + "Use the ARCHIVE_OUTPUT_DIRECTORY, LIBRARY_OUTPUT_DIRECTORY, and " + "RUNTIME_OUTPUT_DIRECTORY target properties instead. " + "They will override this variable if they are set.\n" + "If set, this is the directory where all the libraries " + "built during the build process will be placed.",false, + "Variables that Control the Build"); + + +// Variables defined when the a language is enabled These variables will +// also be defined whenever CMake has loaded its support for compiling (LANG) +// programs. This support will be loaded whenever CMake is used to compile +// (LANG) files. C and CXX are examples of the most common values for (LANG). + + cm->DefineProperty + ("CMAKE_USER_MAKE_RULES_OVERRIDE_", cmProperty::VARIABLE, + "Specify a file that can change the build rule variables.", + "If this variable is set, it should to point to a " + "CMakeLists.txt file that will be read in by CMake " + "after all the system settings have been set, but " + "before they have been used. This would allow you " + "to override any variables that need to be changed " + "for some language. ",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__COMPILER", cmProperty::VARIABLE, + "The full path to the compiler for LANG.", + "This is the command that will be used as the compiler. " + "Once set, you can not change this variable.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__COMPILER_ID", cmProperty::VARIABLE, + "An internal variable subject to change.", + "This is used in determining the compiler and is subject to change.", + false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__PLATFORM_ID", cmProperty::VARIABLE, + "An internal variable subject to change.", + "This is used in determining the platform and is subject to change.", + false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__COMPILER_ABI", cmProperty::VARIABLE, + "An internal variable subject to change.", + "This is used in determining the compiler ABI and is subject to change.", + false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE_INTERNAL_PLATFORM_ABI", cmProperty::VARIABLE, + "An internal variable subject to change.", + "This is used in determining the compiler ABI and is subject to change.", + false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__SIZEOF_DATA_PTR", cmProperty::VARIABLE, + "An internal variable subject to change.", + "This is used in determining the architecture and is subject to change.", + false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE_COMPILER_IS_GNU", cmProperty::VARIABLE, + "True if the compiler is GNU.", + "If the selected compiler is the GNU " + "compiler then this is TRUE, if not it is FALSE.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__FLAGS_DEBUG", cmProperty::VARIABLE, + "Flags for Debug build type or configuration.", + " flags used when CMAKE_BUILD_TYPE is Debug.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__FLAGS_MINSIZEREL", cmProperty::VARIABLE, + "Flags for MinSizeRel build type or configuration.", + " flags used when CMAKE_BUILD_TYPE is MinSizeRel." + "Short for minimum size release.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__FLAGS_RELEASE", cmProperty::VARIABLE, + "Flags for Release build type or configuration.", + " flags used when CMAKE_BUILD_TYPE is Release",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__FLAGS_RELWITHDEBINFO", cmProperty::VARIABLE, + "Flags for RelWithDebInfo type or configuration.", + " flags used when CMAKE_BUILD_TYPE is RelWithDebInfo. " + "Short for Release With Debug Information.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__COMPILE_OBJECT", cmProperty::VARIABLE, + "Rule variable to compile a single object file.", + "This is a rule variable that tells CMake how to " + "compile a single object file for for the language .",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__CREATE_SHARED_LIBRARY", cmProperty::VARIABLE, + "Rule variable to create a shared library.", + "This is a rule variable that tells CMake how to " + "create a shared library for the language .",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__CREATE_SHARED_MODULE", cmProperty::VARIABLE, + "Rule variable to create a shared module.", + "This is a rule variable that tells CMake how to " + "create a shared library for the language .",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__CREATE_STATIC_LIBRARY", cmProperty::VARIABLE, + "Rule variable to create a static library.", + "This is a rule variable that tells CMake how " + "to create a static library for the language .",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__ARCHIVE_CREATE", cmProperty::VARIABLE, + "Rule variable to create a new static archive.", + "This is a rule variable that tells CMake how to create a static " + "archive. It is used in place of CMAKE__CREATE_STATIC_LIBRARY " + "on some platforms in order to support large object counts. " + "See also CMAKE__ARCHIVE_APPEND and CMAKE__ARCHIVE_FINISH.", + false, "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__ARCHIVE_APPEND", cmProperty::VARIABLE, + "Rule variable to append to a static archive.", + "This is a rule variable that tells CMake how to append to a static " + "archive. It is used in place of CMAKE__CREATE_STATIC_LIBRARY " + "on some platforms in order to support large object counts. " + "See also CMAKE__ARCHIVE_CREATE and CMAKE__ARCHIVE_FINISH.", + false, "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__ARCHIVE_FINISH", cmProperty::VARIABLE, + "Rule variable to finish an existing static archive.", + "This is a rule variable that tells CMake how to finish a static " + "archive. It is used in place of CMAKE__CREATE_STATIC_LIBRARY " + "on some platforms in order to support large object counts. " + "See also CMAKE__ARCHIVE_CREATE and CMAKE__ARCHIVE_APPEND.", + false, "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__IGNORE_EXTENSIONS", cmProperty::VARIABLE, + "File extensions that should be ignored by the build.", + "This is a list of file extensions that may be " + "part of a project for a given language but are not compiled. ",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__LINKER_PREFERENCE", cmProperty::VARIABLE, + "Determine if a language should be used for linking.", + "If this is \"Preferred\" then if there is a mixed " + "language shared library or executable, then this " + "languages linker command will be used.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__LINK_EXECUTABLE ", cmProperty::VARIABLE, + "Rule variable to link and executable.", + "Rule variable to link and executable for the given language.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__OUTPUT_EXTENSION", cmProperty::VARIABLE, + "Extension for the output of a compile for a single file.", + "This is the extension for an object file for " + "the given . For example .obj for C on Windows.",false, + "Variables for Languages"); + + cm->DefineProperty + ("CMAKE__SOURCE_FILE_EXTENSIONS", cmProperty::VARIABLE, + "Extensions of source files for the given language.", + "This is the list of extensions for a " + "given languages source files.",false,"Variables for Languages"); + + // variables that are used by cmake but not to be documented + cm->DefineProperty("CMAKE_MATCH_0", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_1", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_2", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_3", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_4", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_5", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_6", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_7", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_8", cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_MATCH_9", cmProperty::VARIABLE,0,0); + + cm->DefineProperty("CMAKE__COMPILER_ARG1", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__COMPILER_ENV_VAR", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__COMPILER_ID_RUN", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__COMPILER_LOADED", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__CREATE_ASSEMBLY_SOURCE", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__CREATE_PREPROCESSED_SOURCE", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS_DEBUG_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS_MINSIZEREL_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS_RELEASE_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__FLAGS_RELWITHDEBINFO_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__INFORMATION_LOADED", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__LINK_EXECUTABLE", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__LINK_FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__STANDARD_LIBRARIES", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__STANDARD_LIBRARIES_INIT", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE__USE_RESPONSE_FILE_FOR_OBJECTS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXECUTABLE_SUFFIX_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXE_LINK_DYNAMIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXE_LINK_STATIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_GENERATOR_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_IMPORT_LIBRARY_PREFIX_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_IMPORT_LIBRARY_SUFFIX_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_INCLUDE_FLAG_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_INCLUDE_FLAG_SEP_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_INCLUDE_SYSTEM_FLAG_", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_NEEDS_REQUIRES_STEP__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_CREATE__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_LINK__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_LINK_DYNAMIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_LINK_STATIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_RUNTIME__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_RUNTIME__FLAG_SEP", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_LIBRARY_RPATH_LINK__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXECUTABLE_RUNTIME__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXECUTABLE_RUNTIME__FLAG_SEP", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_EXECUTABLE_RPATH_LINK__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE_CREATE__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE_LINK_DYNAMIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE_LINK_STATIC__FLAGS", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME__FLAG", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_SHARED_MODULE_RUNTIME__FLAG_SEP", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_FILES", + cmProperty::VARIABLE,0,0); + cm->DefineProperty("CMAKE_LINK_DEPENDENT_LIBRARY_DIRS", + cmProperty::VARIABLE,0,0); +} diff --git a/Source/cmDocumentVariables.h b/Source/cmDocumentVariables.h new file mode 100755 index 000000000..98e4d5d5a --- /dev/null +++ b/Source/cmDocumentVariables.h @@ -0,0 +1,26 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentVariables.h,v $ + Language: C++ + Date: $Date: 2007-10-18 13:10:42 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmDocumentVariables_h +#define cmDocumentVariables_h +class cmake; +class cmDocumentVariables +{ +public: + static void DefineVariables(cmake* cm); +}; + +#endif diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx new file mode 100644 index 000000000..937260bd9 --- /dev/null +++ b/Source/cmDocumentation.cxx @@ -0,0 +1,1466 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentation.cxx,v $ + Language: C++ + Date: $Date: 2008-03-05 16:05:20 $ + Version: $Revision: 1.69 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDocumentation.h" + +#include "cmSystemTools.h" +#include "cmVersion.h" +#include + + +//---------------------------------------------------------------------------- +static const char *cmDocumentationStandardOptions[][3] = +{ + {"--copyright [file]", "Print the CMake copyright and exit.", + "If a file is specified, the copyright is written into it."}, + {"--help", "Print usage information and exit.", + "Usage describes the basic command line interface and its options."}, + {"--help-full [file]", "Print full help and exit.", + "Full help displays most of the documentation provided by the UNIX " + "man page. It is provided for use on non-UNIX platforms, but is " + "also convenient if the man page is not installed. If a file is " + "specified, the help is written into it."}, + {"--help-html [file]", "Print full help in HTML format.", + "This option is used by CMake authors to help produce web pages. " + "If a file is specified, the help is written into it."}, + {"--help-man [file]", "Print full help as a UNIX man page and exit.", + "This option is used by the cmake build to generate the UNIX man page. " + "If a file is specified, the help is written into it."}, + {"--version [file]", "Show program name/version banner and exit.", + "If a file is specified, the version is written into it."}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmModulesDocumentationDescription[][3] = +{ + {0, + " CMake Modules - Modules coming with CMake, the Cross-Platform Makefile " + "Generator.", 0}, +// CMAKE_DOCUMENTATION_OVERVIEW, + {0, + "This is the documentation for the modules and scripts coming with CMake. " + "Using these modules you can check the computer system for " + "installed software packages, features of the compiler and the " + "existance of headers to name just a few.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmCustomModulesDocumentationDescription[][3] = +{ + {0, + " Custom CMake Modules - Additional Modules for CMake.", 0}, +// CMAKE_DOCUMENTATION_OVERVIEW, + {0, + "This is the documentation for additional modules and scripts for CMake. " + "Using these modules you can check the computer system for " + "installed software packages, features of the compiler and the " + "existance of headers to name just a few.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmPropertiesDocumentationDescription[][3] = +{ + {0, + " CMake Properties - Properties supported by CMake, " + "the Cross-Platform Makefile Generator.", 0}, +// CMAKE_DOCUMENTATION_OVERVIEW, + {0, + "This is the documentation for the properties supported by CMake. " + "Properties can have different scopes. They can either be assigned to a " + "source file, a directory, a target or globally to CMake. By modifying the " + "values of properties the behaviour of the build system can be customized.", + 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmCompatCommandsDocumentationDescription[][3] = +{ + {0, + " CMake Compatibility Listfile Commands - " + "Obsolete commands supported by CMake for compatibility.", 0}, +// CMAKE_DOCUMENTATION_OVERVIEW, + {0, + "This is the documentation for now obsolete listfile commands from previous " + "CMake versions, which are still supported for compatibility reasons. You " + "should instead use the newer, faster and shinier new commands. ;-)", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationModulesHeader[][3] = +{ + {0, + "The following modules are provided with CMake. " + "They can be used with INCLUDE(ModuleName).", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationCustomModulesHeader[][3] = +{ + {0, + "The following modules are also available for CMake. " + "They can be used with INCLUDE(ModuleName).", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationGeneratorsHeader[][3] = +{ + {0, + "The following generators are available on this platform:", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationStandardSeeAlso[][3] = +{ + {0, + "The following resources are available to get help using CMake:", 0}, + {"Home Page", + "http://www.cmake.org", + "The primary starting point for learning about CMake."}, + {"Frequently Asked Questions", + "http://www.cmake.org/Wiki/CMake_FAQ", + "A Wiki is provided containing answers to frequently asked questions. "}, + {"Online Documentation", + "http://www.cmake.org/HTML/Documentation.html", + "Links to available documentation may be found on this web page."}, + {"Mailing List", + "http://www.cmake.org/HTML/MailingLists.html", + "For help and discussion about using cmake, a mailing list is provided at " + "cmake@cmake.org. " + "The list is member-post-only but one may sign up on the CMake web page. " + "Please first read the full documentation at " + "http://www.cmake.org before posting questions to the list."}, + {0, + "Summary of helpful links:\n" + " Home: http://www.cmake.org\n" + " Docs: http://www.cmake.org/HTML/Documentation.html\n" + " Mail: http://www.cmake.org/HTML/MailingLists.html\n" + " FAQ: http://www.cmake.org/Wiki/CMake_FAQ\n" + , 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationCopyright[][3] = +{ + {0, + "Copyright (c) 2002 Kitware, Inc., Insight Consortium. " + "All rights reserved.", 0}, + {0, + "Redistribution and use in source and binary forms, with or without " + "modification, are permitted provided that the following conditions are " + "met:", 0}, + {"", + "Redistributions of source code must retain the above copyright notice, " + "this list of conditions and the following disclaimer.", 0}, + {"", + "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.", + 0}, + {"", + "The names of Kitware, Inc., the Insight Consortium, or the names of " + "any consortium members, or of any contributors, may not be used to " + "endorse or promote products derived from this software without " + "specific prior written permission.", 0}, + {"", + "Modified source versions must be plainly marked as such, and must " + "not be misrepresented as being the original software.", 0}, + {0, + "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER 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 AUTHORS OR " + "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.", 0}, + {0, 0, 0} +}; + +//---------------------------------------------------------------------------- +cmDocumentation::cmDocumentation() +:CurrentFormatter(0) +{ + this->SetForm(TextForm); + + cmDocumentationSection *sec; + + sec = new cmDocumentationSection("Author","AUTHOR"); + sec->Append(cmDocumentationEntry + (0, + "This manual page was generated by the \"--help-man\" option.", + 0)); + this->AllSections["Author"] = sec; + + sec = new cmDocumentationSection("Copyright","COPYRIGHT"); + sec->Append(cmDocumentationCopyright); + this->AllSections["Copyright"] = sec; + + sec = new cmDocumentationSection("See Also","SEE ALSO"); + sec->Append(cmDocumentationStandardSeeAlso); + this->AllSections["Standard See Also"] = sec; + + sec = new cmDocumentationSection("Options","OPTIONS"); + sec->Append(cmDocumentationStandardOptions); + this->AllSections["Options"] = sec; + + sec = new cmDocumentationSection("Properties","PROPERTIES"); + sec->Append(cmPropertiesDocumentationDescription); + this->AllSections["Properties Description"] = sec; + + sec = new cmDocumentationSection("Generators","GENERATORS"); + sec->Append(cmDocumentationGeneratorsHeader); + this->AllSections["Generators"] = sec; + + sec = new cmDocumentationSection("Compatibility Commands", + "COMPATIBILITY COMMANDS"); + sec->Append(cmCompatCommandsDocumentationDescription); + this->AllSections["Compatibility Commands"] = sec; + + + this->PropertySections.push_back("Properties of Global Scope"); + this->PropertySections.push_back("Properties on Directories"); + this->PropertySections.push_back("Properties on Targets"); + this->PropertySections.push_back("Properties on Tests"); + this->PropertySections.push_back("Properties on Source Files"); + + this->VariableSections.push_back("Variables that Provide Information"); + this->VariableSections.push_back("Variables That Change Behavior"); + this->VariableSections.push_back("Variables That Describe the System"); + this->VariableSections.push_back("Variables that Control the Build"); + this->VariableSections.push_back("Variables for Languages"); +} + +//---------------------------------------------------------------------------- +cmDocumentation::~cmDocumentation() +{ + for(std::vector< char* >::iterator i = this->ModuleStrings.begin(); + i != this->ModuleStrings.end(); ++i) + { + delete [] *i; + } + for(std::map::iterator i = + this->AllSections.begin(); + i != this->AllSections.end(); ++i) + { + delete i->second; + } +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintCopyright(std::ostream& os) +{ + cmDocumentationSection *sec = this->AllSections["Copyright"]; + const std::vector &entries = sec->GetEntries(); + for(std::vector::const_iterator op = entries.begin(); + op != entries.end(); ++op) + { + if(op->Name.size()) + { + os << " * "; + this->TextFormatter.SetIndent(" "); + this->TextFormatter.PrintColumn(os, op->Brief.c_str()); + } + else + { + this->TextFormatter.SetIndent(""); + this->TextFormatter.PrintColumn(os, op->Brief.c_str()); + } + os << "\n"; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintVersion(std::ostream& os) +{ + os << this->GetNameString() << " version " + << cmVersion::GetCMakeVersion() << "\n"; + return true; +} + +//---------------------------------------------------------------------------- +void cmDocumentation::AddSectionToPrint(const char *section) +{ + if (this->AllSections.find(section) != this->AllSections.end()) + { + this->PrintSections.push_back(this->AllSections[section]); + } +} + +//---------------------------------------------------------------------------- +void cmDocumentation::ClearSections() +{ + this->PrintSections.erase(this->PrintSections.begin(), + this->PrintSections.end()); + this->ModulesFound.clear(); +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os) +{ + if ((this->CurrentFormatter->GetForm() != HTMLForm) + && (this->CurrentFormatter->GetForm() != DocbookForm) + && (this->CurrentFormatter->GetForm() != ManForm)) + { + this->PrintVersion(os); + } + + switch (ht) + { + case cmDocumentation::Usage: + return this->PrintDocumentationUsage(os); + case cmDocumentation::Single: + return this->PrintDocumentationSingle(os); + case cmDocumentation::SingleModule: + return this->PrintDocumentationSingleModule(os); + case cmDocumentation::SinglePolicy: + return this->PrintDocumentationSinglePolicy(os); + case cmDocumentation::SingleProperty: + return this->PrintDocumentationSingleProperty(os); + case cmDocumentation::SingleVariable: + return this->PrintDocumentationSingleVariable(os); + case cmDocumentation::List: + this->PrintDocumentationList(os,"Commands"); + this->PrintDocumentationList(os,"Compatibility Commands"); + return true; + case cmDocumentation::ModuleList: + // find the modules first, print the custom module docs only if + // any custom modules have been found actually, Alex + this->CreateCustomModulesSection(); + this->CreateModulesSection(); + if (this->AllSections.find("Custom CMake Modules") + != this->AllSections.end()) + { + this->PrintDocumentationList(os,"Custom CMake Modules"); + } + this->PrintDocumentationList(os,"Modules"); + return true; + case cmDocumentation::PropertyList: + this->PrintDocumentationList(os,"Properties Description"); + for (std::vector::iterator i = + this->PropertySections.begin(); + i != this->PropertySections.end(); ++i) + { + this->PrintDocumentationList(os,i->c_str()); + } + return true; + case cmDocumentation::VariableList: + for (std::vector::iterator i = + this->VariableSections.begin(); + i != this->VariableSections.end(); ++i) + { + this->PrintDocumentationList(os,i->c_str()); + } + return true; + case cmDocumentation::Full: + return this->PrintDocumentationFull(os); + case cmDocumentation::Modules: + return this->PrintDocumentationModules(os); + case cmDocumentation::CustomModules: + return this->PrintDocumentationCustomModules(os); + case cmDocumentation::Policies: + return this->PrintDocumentationPolicies(os); + case cmDocumentation::Properties: + return this->PrintDocumentationProperties(os); + case cmDocumentation::Variables: + return this->PrintDocumentationVariables(os); + case cmDocumentation::Commands: + return this->PrintDocumentationCurrentCommands(os); + case cmDocumentation::CompatCommands: + return this->PrintDocumentationCompatCommands(os); + + case cmDocumentation::Copyright: + return this->PrintCopyright(os); + case cmDocumentation::Version: + return true; + default: return false; + } +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::CreateModulesSection() +{ + cmDocumentationSection *sec = + new cmDocumentationSection("Standard CMake Modules", "MODULES"); + this->AllSections["Modules"] = sec; + std::string cmakeModules = this->CMakeRoot; + cmakeModules += "/Modules"; + cmsys::Directory dir; + dir.Load(cmakeModules.c_str()); + if (dir.GetNumberOfFiles() > 0) + { + sec->Append(cmDocumentationModulesHeader[0]); + sec->Append(cmModulesDocumentationDescription); + this->CreateModuleDocsForDir(dir, *this->AllSections["Modules"]); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::CreateCustomModulesSection() +{ + bool sectionHasHeader = false; + + std::vector dirs; + cmSystemTools::ExpandListArgument(this->CMakeModulePath, dirs); + + for(std::vector::const_iterator dirIt = dirs.begin(); + dirIt != dirs.end(); + ++dirIt) + { + cmsys::Directory dir; + dir.Load(dirIt->c_str()); + if (dir.GetNumberOfFiles() > 0) + { + if (!sectionHasHeader) + { + cmDocumentationSection *sec = + new cmDocumentationSection("Custom CMake Modules","CUSTOM MODULES"); + this->AllSections["Custom CMake Modules"] = sec; + sec->Append(cmDocumentationCustomModulesHeader[0]); + sec->Append(cmCustomModulesDocumentationDescription); + sectionHasHeader = true; + } + this->CreateModuleDocsForDir + (dir, *this->AllSections["Custom CMake Modules"]); + } + } + + return true; +} + +//---------------------------------------------------------------------------- +void cmDocumentation +::CreateModuleDocsForDir(cmsys::Directory& dir, + cmDocumentationSection &moduleSection) +{ + // sort the files alphabetically, so the docs for one module are easier + // to find than if they are in random order + std::vector sortedFiles; + for(unsigned int i = 0; i < dir.GetNumberOfFiles(); ++i) + { + sortedFiles.push_back(dir.GetFile(i)); + } + std::sort(sortedFiles.begin(), sortedFiles.end()); + + for(std::vector::const_iterator fname = sortedFiles.begin(); + fname!=sortedFiles.end(); ++fname) + { + if(fname->length() > 6) + { + if(fname->substr(fname->length()-6, 6) == ".cmake") + { + std::string moduleName = fname->substr(0, fname->length()-6); + // this check is to avoid creating documentation for the modules with + // the same name in multiple directories of CMAKE_MODULE_PATH + if (this->ModulesFound.find(moduleName) == this->ModulesFound.end()) + { + this->ModulesFound.insert(moduleName); + std::string path = dir.GetPath(); + path += "/"; + path += (*fname); + this->CreateSingleModule(path.c_str(), moduleName.c_str(), + moduleSection); + } + } + } + } +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::CreateSingleModule(const char* fname, + const char* moduleName, + cmDocumentationSection &moduleSection) +{ + std::ifstream fin(fname); + if(!fin) + { + std::cerr << "Internal error: can not open module." << fname << std::endl; + return false; + } + std::string line; + std::string text; + std::string brief; + brief = " "; + bool newParagraph = true; + while ( fin && cmSystemTools::GetLineFromStream(fin, line) ) + { + if(line.size() && line[0] == '#') + { + // blank line + if(line.size() <= 2) + { + text += "\n"; + newParagraph = true; + } + else if(line[2] == '-') + { + brief = line.c_str()+4; + } + else + { + // two spaces + if(line[1] == ' ' && line[2] == ' ') + { + if(!newParagraph) + { + text += "\n"; + newParagraph = true; + } + // Skip #, and leave space for preformatted + text += line.c_str()+1; + text += "\n"; + } + else if(line[1] == ' ') + { + if(!newParagraph) + { + text += " "; + } + newParagraph = false; + // skip # and space + text += line.c_str()+2; + } + else + { + if(!newParagraph) + { + text += " "; + } + newParagraph = false; + // skip # + text += line.c_str()+1; + } + } + } + else + { + if(text.length() < 2 && brief.length() == 1) + { + return false; + } + char* pname = strcpy(new char[strlen(moduleName)+1], moduleName); + char* ptext = strcpy(new char[text.length()+1], text.c_str()); + this->ModuleStrings.push_back(pname); + this->ModuleStrings.push_back(ptext); + char* pbrief = strcpy(new char[brief.length()+1], brief.c_str()); + this->ModuleStrings.push_back(pbrief); + moduleSection.Append(pname, pbrief, ptext); + return true; + } + } + return true; +} + + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os) +{ + bool result = true; + + // Loop over requested documentation types. + for(std::vector::const_iterator + i = this->RequestedHelpItems.begin(); + i != this->RequestedHelpItems.end(); + ++i) + { + this->SetForm(i->HelpForm); + this->CurrentArgument = i->Argument; + // If a file name was given, use it. Otherwise, default to the + // given stream. + std::ofstream* fout = 0; + std::ostream* s = &os; + if(i->Filename.length() > 0) + { + fout = new std::ofstream(i->Filename.c_str(), std::ios::out); + if(fout) + { + s = fout; + } + else + { + result = false; + } + } + + // Print this documentation type to the stream. + if(!this->PrintDocumentation(i->HelpType, *s) || !*s) + { + result = false; + } + + // Close the file if we wrote one. + if(fout) + { + delete fout; + } + } + return result; +} + +#define GET_OPT_ARGUMENT(target) \ + if((i+1 < argc) && !this->IsOption(argv[i+1])) \ + { \ + target = argv[i+1]; \ + i = i+1; \ + }; + + +cmDocumentation::Form cmDocumentation::GetFormFromFilename( + const std::string& filename) +{ + std::string ext = cmSystemTools::GetFilenameExtension(filename); + ext = cmSystemTools::UpperCase(ext); + if ((ext == ".HTM") || (ext == ".HTML")) + { + return cmDocumentation::HTMLForm; + } + + if (ext == ".DOCBOOK") + { + return cmDocumentation::DocbookForm; + } + + // ".1" to ".9" should be manpages + if ((ext.length()==2) && (ext[1] >='1') && (ext[1]<='9')) + { + return cmDocumentation::ManForm; + } + + return cmDocumentation::TextForm; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::CheckOptions(int argc, const char* const* argv) +{ + // Providing zero arguments gives usage information. + if(argc == 1) + { + RequestedHelpItem help; + help.HelpType = cmDocumentation::Usage; + help.HelpForm = cmDocumentation::UsageForm; + this->RequestedHelpItems.push_back(help); + return true; + } + + // Search for supported help options. + + bool result = false; + for(int i=1; i < argc; ++i) + { + RequestedHelpItem help; + // Check if this is a supported help option. + if((strcmp(argv[i], "-help") == 0) || + (strcmp(argv[i], "--help") == 0) || + (strcmp(argv[i], "/?") == 0) || + (strcmp(argv[i], "-usage") == 0) || + (strcmp(argv[i], "-h") == 0) || + (strcmp(argv[i], "-H") == 0)) + { + help.HelpType = cmDocumentation::Usage; + help.HelpForm = cmDocumentation::UsageForm; + GET_OPT_ARGUMENT(help.Argument); + help.Argument = cmSystemTools::LowerCase(help.Argument); + // special case for single command + if (!help.Argument.empty()) + { + help.HelpType = cmDocumentation::Single; + } + } + else if(strcmp(argv[i], "--help-properties") == 0) + { + help.HelpType = cmDocumentation::Properties; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-policies") == 0) + { + help.HelpType = cmDocumentation::Policies; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-variables") == 0) + { + help.HelpType = cmDocumentation::Variables; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-modules") == 0) + { + help.HelpType = cmDocumentation::Modules; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-custom-modules") == 0) + { + help.HelpType = cmDocumentation::CustomModules; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-commands") == 0) + { + help.HelpType = cmDocumentation::Commands; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-compatcommands") == 0) + { + help.HelpType = cmDocumentation::CompatCommands; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-full") == 0) + { + help.HelpType = cmDocumentation::Full; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-html") == 0) + { + help.HelpType = cmDocumentation::Full; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::HTMLForm; + } + else if(strcmp(argv[i], "--help-man") == 0) + { + help.HelpType = cmDocumentation::Full; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::ManForm; + } + else if(strcmp(argv[i], "--help-command") == 0) + { + help.HelpType = cmDocumentation::Single; + GET_OPT_ARGUMENT(help.Argument); + GET_OPT_ARGUMENT(help.Filename); + help.Argument = cmSystemTools::LowerCase(help.Argument); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-module") == 0) + { + help.HelpType = cmDocumentation::SingleModule; + GET_OPT_ARGUMENT(help.Argument); + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-property") == 0) + { + help.HelpType = cmDocumentation::SingleProperty; + GET_OPT_ARGUMENT(help.Argument); + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-policy") == 0) + { + help.HelpType = cmDocumentation::SinglePolicy; + GET_OPT_ARGUMENT(help.Argument); + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-variable") == 0) + { + help.HelpType = cmDocumentation::SingleVariable; + GET_OPT_ARGUMENT(help.Argument); + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = this->GetFormFromFilename(help.Filename); + } + else if(strcmp(argv[i], "--help-command-list") == 0) + { + help.HelpType = cmDocumentation::List; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::TextForm; + } + else if(strcmp(argv[i], "--help-module-list") == 0) + { + help.HelpType = cmDocumentation::ModuleList; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::TextForm; + } + else if(strcmp(argv[i], "--help-property-list") == 0) + { + help.HelpType = cmDocumentation::PropertyList; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::TextForm; + } + else if(strcmp(argv[i], "--help-variable-list") == 0) + { + help.HelpType = cmDocumentation::VariableList; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::TextForm; + } + else if(strcmp(argv[i], "--copyright") == 0) + { + help.HelpType = cmDocumentation::Copyright; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::UsageForm; + } + else if((strcmp(argv[i], "--version") == 0) || + (strcmp(argv[i], "-version") == 0) || + (strcmp(argv[i], "/V") == 0)) + { + help.HelpType = cmDocumentation::Version; + GET_OPT_ARGUMENT(help.Filename); + help.HelpForm = cmDocumentation::UsageForm; + } + if(help.HelpType != None) + { + // This is a help option. See if there is a file name given. + result = true; + this->RequestedHelpItems.push_back(help); + } + } + return result; +} + +//---------------------------------------------------------------------------- +void cmDocumentation::Print(Form f, std::ostream& os) +{ + this->SetForm(f); + this->Print(os); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::Print(std::ostream& os) +{ + // if the formatter supports it, print a master index for + // all sections + this->CurrentFormatter->PrintIndex(os, this->PrintSections); + for(unsigned int i=0; i < this->PrintSections.size(); ++i) + { + std::string name = this->PrintSections[i]-> + GetName((this->CurrentFormatter->GetForm())); + this->CurrentFormatter->PrintSection(os,*this->PrintSections[i], + name.c_str()); + } +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetName(const char* name) +{ + this->NameString = name?name:""; +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetSection(const char *name, + cmDocumentationSection *section) +{ + if (this->AllSections.find(name) != this->AllSections.end()) + { + delete this->AllSections[name]; + } + this->AllSections[name] = section; +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetSection(const char *name, + std::vector &docs) +{ + cmDocumentationSection *sec = + new cmDocumentationSection(name, + cmSystemTools::UpperCase(name).c_str()); + sec->Append(docs); + this->SetSection(name,sec); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetSection(const char *name, + const char *docs[][3]) +{ + cmDocumentationSection *sec = + new cmDocumentationSection(name, + cmSystemTools::UpperCase(name).c_str()); + sec->Append(docs); + this->SetSection(name,sec); +} + +//---------------------------------------------------------------------------- +void cmDocumentation +::SetSections(std::map §ions) +{ + for (std::map::const_iterator + it = sections.begin(); it != sections.end(); ++it) + { + this->SetSection(it->first.c_str(),it->second); + } +} + +//---------------------------------------------------------------------------- +void cmDocumentation::PrependSection(const char *name, + const char *docs[][3]) +{ + cmDocumentationSection *sec = 0; + if (this->AllSections.find(name) == this->AllSections.end()) + { + sec = new cmDocumentationSection + (name, cmSystemTools::UpperCase(name).c_str()); + this->SetSection(name,sec); + } + else + { + sec = this->AllSections[name]; + } + sec->Prepend(docs); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::PrependSection(const char *name, + std::vector &docs) +{ + cmDocumentationSection *sec = 0; + if (this->AllSections.find(name) == this->AllSections.end()) + { + sec = new cmDocumentationSection + (name, cmSystemTools::UpperCase(name).c_str()); + this->SetSection(name,sec); + } + else + { + sec = this->AllSections[name]; + } + sec->Prepend(docs); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::AppendSection(const char *name, + const char *docs[][3]) +{ + cmDocumentationSection *sec = 0; + if (this->AllSections.find(name) == this->AllSections.end()) + { + sec = new cmDocumentationSection + (name, cmSystemTools::UpperCase(name).c_str()); + this->SetSection(name,sec); + } + else + { + sec = this->AllSections[name]; + } + sec->Append(docs); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::AppendSection(const char *name, + std::vector &docs) +{ + cmDocumentationSection *sec = 0; + if (this->AllSections.find(name) == this->AllSections.end()) + { + sec = new cmDocumentationSection + (name, cmSystemTools::UpperCase(name).c_str()); + this->SetSection(name,sec); + } + else + { + sec = this->AllSections[name]; + } + sec->Append(docs); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::AppendSection(const char *name, + cmDocumentationEntry &docs) +{ + + std::vector docsVec; + docsVec.push_back(docs); + this->AppendSection(name,docsVec); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::PrependSection(const char *name, + cmDocumentationEntry &docs) +{ + + std::vector docsVec; + docsVec.push_back(docs); + this->PrependSection(name,docsVec); +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetSeeAlsoList(const char *data[][3]) +{ + cmDocumentationSection *sec = + new cmDocumentationSection("See Also", "SEE ALSO"); + this->AllSections["See Also"] = sec; + this->SeeAlsoString = ".B "; + int i = 0; + while(data[i][1]) + { + this->SeeAlsoString += data[i][1]; + this->SeeAlsoString += data[i+1][1]? "(1), ":"(1)"; + ++i; + } + sec->Append(0,this->SeeAlsoString.c_str(),0); + sec->Append(cmDocumentationStandardSeeAlso); +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationGeneric(std::ostream& os, + const char *section) +{ + if(this->AllSections.find(section) == this->AllSections.end()) + { + os << "Internal error: " << section << " list is empty." << std::endl; + return false; + } + if(this->CurrentArgument.length() == 0) + { + os << "Required argument missing.\n"; + return false; + } + const std::vector &entries = + this->AllSections[section]->GetEntries(); + for(std::vector::const_iterator ei = + entries.begin(); + ei != entries.end(); ++ei) + { + if(this->CurrentArgument == ei->Name) + { + this->PrintDocumentationCommand(os, *ei); + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationSingle(std::ostream& os) +{ + if (this->PrintDocumentationGeneric(os,"Commands")) + { + return true; + } + if (this->PrintDocumentationGeneric(os,"Compatibility Commands")) + { + return true; + } + + // Argument was not a command. Complain. + os << "Argument \"" << this->CurrentArgument.c_str() + << "\" to --help-command is not a CMake command. " + << "Use --help-command-list to see all commands.\n"; + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os) +{ + if(this->CurrentArgument.length() == 0) + { + os << "Argument --help-module needs a module name.\n"; + return false; + } + + std::string moduleName; + // find the module + std::vector dirs; + cmSystemTools::ExpandListArgument(this->CMakeModulePath, dirs); + for(std::vector::const_iterator dirIt = dirs.begin(); + dirIt != dirs.end(); + ++dirIt) + { + moduleName = *dirIt; + moduleName += "/"; + moduleName += this->CurrentArgument; + moduleName += ".cmake"; + if(cmSystemTools::FileExists(moduleName.c_str())) + { + break; + } + moduleName = ""; + } + + if (moduleName.empty()) + { + moduleName = this->CMakeRoot; + moduleName += "/Modules/"; + moduleName += this->CurrentArgument; + moduleName += ".cmake"; + if(!cmSystemTools::FileExists(moduleName.c_str())) + { + moduleName = ""; + } + } + + if(!moduleName.empty()) + { + cmDocumentationSection *sec = + new cmDocumentationSection("Standard CMake Modules", "MODULES"); + this->AllSections["Modules"] = sec; + if (this->CreateSingleModule(moduleName.c_str(), + this->CurrentArgument.c_str(), + *this->AllSections["Modules"])) + { + this->PrintDocumentationCommand + (os, this->AllSections["Modules"]->GetEntries()[0]); + os << "\n Defined in: "; + os << moduleName << "\n"; + return true; + } + } + + // Argument was not a module. Complain. + os << "Argument \"" << this->CurrentArgument.c_str() + << "\" to --help-module is not a CMake module.\n"; + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationSingleProperty(std::ostream& os) +{ + bool done = false; + for (std::vector::iterator i = + this->PropertySections.begin(); + !done && i != this->PropertySections.end(); ++i) + { + done = this->PrintDocumentationGeneric(os,i->c_str()); + } + + if (done) + { + return true; + } + + // Argument was not a command. Complain. + os << "Argument \"" << this->CurrentArgument.c_str() + << "\" to --help-property is not a CMake property. " + << "Use --help-property-list to see all properties.\n"; + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationSinglePolicy(std::ostream& os) +{ + if (this->PrintDocumentationGeneric(os,"Policies")) + { + return true; + } + + // Argument was not a command. Complain. + os << "Argument \"" << this->CurrentArgument.c_str() + << "\" to --help-policy is not a CMake policy.\n"; + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationSingleVariable(std::ostream& os) +{ + bool done = false; + for (std::vector::iterator i = + this->VariableSections.begin(); + !done && i != this->VariableSections.end(); ++i) + { + done = this->PrintDocumentationGeneric(os,i->c_str()); + } + + if (done) + { + return true; + } + + // Argument was not a command. Complain. + os << "Argument \"" << this->CurrentArgument.c_str() + << "\" to --help-variable is not a defined variable. " + << "Use --help-variable-list to see all defined variables.\n"; + return false; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationList(std::ostream& os, + const char *section) +{ + if(this->AllSections.find(section) == this->AllSections.end()) + { + os << "Internal error: " << section << " list is empty." << std::endl; + return false; + } + + const std::vector &entries = + this->AllSections[section]->GetEntries(); + for(std::vector::const_iterator ei = + entries.begin(); + ei != entries.end(); ++ei) + { + if(ei->Name.size()) + { + os << ei->Name << std::endl; + } + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationUsage(std::ostream& os) +{ + this->ClearSections(); + this->AddSectionToPrint("Usage"); + this->AddSectionToPrint("Options"); + this->AddSectionToPrint("Generators"); + this->Print(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationFull(std::ostream& os) +{ + this->CreateFullDocumentation(); + this->CurrentFormatter->PrintHeader(GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationModules(std::ostream& os) +{ + this->ClearSections(); + this->CreateModulesSection(); + this->AddSectionToPrint("Description"); + this->AddSectionToPrint("Modules"); + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("See Also"); + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationCustomModules(std::ostream& os) +{ + this->ClearSections(); + this->CreateCustomModulesSection(); + this->AddSectionToPrint("Description"); + this->AddSectionToPrint("Custom CMake Modules"); +// the custom modules are most probably not under Kitware's copyright, Alex +// this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("See Also"); + + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationPolicies(std::ostream& os) +{ + this->ClearSections(); + this->AddSectionToPrint("Description"); + this->AddSectionToPrint("Policies"); + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("See Also"); + + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationProperties(std::ostream& os) +{ + this->ClearSections(); + this->AddSectionToPrint("Properties Description"); + for (std::vector::iterator i = + this->PropertySections.begin(); + i != this->PropertySections.end(); ++i) + { + this->AddSectionToPrint(i->c_str()); + } + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("Standard See Also"); + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationVariables(std::ostream& os) +{ + this->ClearSections(); + for (std::vector::iterator i = + this->VariableSections.begin(); + i != this->VariableSections.end(); ++i) + { + this->AddSectionToPrint(i->c_str()); + } + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("Standard See Also"); + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationCurrentCommands(std::ostream& os) +{ + this->ClearSections(); + this->AddSectionToPrint("Commands"); + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("Standard See Also"); + this->CurrentFormatter->PrintHeader(this->GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::PrintDocumentationCompatCommands(std::ostream& os) +{ + this->ClearSections(); + this->AddSectionToPrint("Compatibility Commands Description"); + this->AddSectionToPrint("Compatibility Commands"); + this->AddSectionToPrint("Copyright"); + this->AddSectionToPrint("Standard See Also"); + this->CurrentFormatter->PrintHeader(GetNameString(), os); + this->Print(os); + this->CurrentFormatter->PrintFooter(os); + return true; +} + +//---------------------------------------------------------------------------- +void cmDocumentation +::PrintDocumentationCommand(std::ostream& os, + const cmDocumentationEntry &entry) +{ + cmDocumentationSection *sec = new cmDocumentationSection("",""); + sec->Append(entry); + this->AllSections["temp"] = sec; + this->ClearSections(); + this->AddSectionToPrint("temp"); + this->Print(os); + this->AllSections.erase("temp"); + delete sec; +} + +//---------------------------------------------------------------------------- +void cmDocumentation::CreateFullDocumentation() +{ + this->ClearSections(); + this->CreateCustomModulesSection(); + this->CreateModulesSection(); + + std::set emitted; + this->AddSectionToPrint("Name"); + emitted.insert("Name"); + this->AddSectionToPrint("Usage"); + emitted.insert("Usage"); + this->AddSectionToPrint("Description"); + emitted.insert("Description"); + this->AddSectionToPrint("Options"); + emitted.insert("Options"); + this->AddSectionToPrint("Generators"); + emitted.insert("Generators"); + this->AddSectionToPrint("Commands"); + emitted.insert("Commands"); + + + this->AddSectionToPrint("Properties Description"); + emitted.insert("Properties Description"); + for (std::vector::iterator i = + this->PropertySections.begin(); + i != this->PropertySections.end(); ++i) + { + this->AddSectionToPrint(i->c_str()); + emitted.insert(i->c_str()); + } + + emitted.insert("Copyright"); + emitted.insert("See Also"); + emitted.insert("Standard See Also"); + emitted.insert("Author"); + + // add any sections not yet written out, or to be written out + for (std::map::iterator i = + this->AllSections.begin(); + i != this->AllSections.end(); ++i) + { + if (emitted.find(i->first) == emitted.end()) + { + this->AddSectionToPrint(i->first.c_str()); + } + } + + this->AddSectionToPrint("Copyright"); + + if(this->CurrentFormatter->GetForm() == ManForm) + { + this->AddSectionToPrint("See Also"); + this->AddSectionToPrint("Author"); + } + else + { + this->AddSectionToPrint("Standard See Also"); + } +} + +//---------------------------------------------------------------------------- +void cmDocumentation::SetForm(Form f) +{ + switch(f) + { + case HTMLForm: + this->CurrentFormatter = &this->HTMLFormatter; + break; + case DocbookForm: + this->CurrentFormatter = &this->DocbookFormatter; + break; + case ManForm: + this->CurrentFormatter = &this->ManFormatter; + break; + case TextForm: + this->CurrentFormatter = &this->TextFormatter; + break; + case UsageForm: + this->CurrentFormatter = & this->UsageFormatter; + break; + } +} + + +//---------------------------------------------------------------------------- +const char* cmDocumentation::GetNameString() const +{ + if(this->NameString.length() > 0) + { + return this->NameString.c_str(); + } + else + { + return "CMake"; + } +} + +//---------------------------------------------------------------------------- +bool cmDocumentation::IsOption(const char* arg) const +{ + return ((arg[0] == '-') || (strcmp(arg, "/V") == 0) || + (strcmp(arg, "/?") == 0)); +} diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h new file mode 100644 index 000000000..f57bcf8ba --- /dev/null +++ b/Source/cmDocumentation.h @@ -0,0 +1,191 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentation.h,v $ + Language: C++ + Date: $Date: 2008-03-04 14:16:33 $ + Version: $Revision: 1.33 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentation_h +#define _cmDocumentation_h + +#include "cmStandardIncludes.h" +#include "cmProperty.h" +#include "cmDocumentationFormatter.h" +#include "cmDocumentationFormatterHTML.h" +#include "cmDocumentationFormatterDocbook.h" +#include "cmDocumentationFormatterMan.h" +#include "cmDocumentationFormatterText.h" +#include "cmDocumentationFormatterUsage.h" +#include "cmDocumentationSection.h" + +namespace cmsys +{ + class Directory; +} + +/** Class to generate documentation. */ +class cmDocumentation: public cmDocumentationEnums +{ +public: + cmDocumentation(); + + ~cmDocumentation(); + // High-level interface for standard documents: + + /** + * Check command line arguments for documentation options. Returns + * true if documentation options are found, and false otherwise. + * When true is returned, PrintRequestedDocumentation should be + * called. + */ + bool CheckOptions(int argc, const char* const* argv); + + /** + * Print help requested on the command line. Call after + * CheckOptions returns true. Returns true on success, and false + * otherwise. Failure can occur when output files specified on the + * command line cannot be written. + */ + bool PrintRequestedDocumentation(std::ostream& os); + + /** Print help of the given type. */ + bool PrintDocumentation(Type ht, std::ostream& os); + + /** Set the program name for standard document generation. */ + void SetName(const char* name); + + /** Set a section of the documentation. Typical sections include Name, + Usage, Description, Options, SeeAlso */ + void SetSection(const char *sectionName, + cmDocumentationSection *section); + void SetSection(const char *sectionName, + std::vector &docs); + void SetSection(const char *sectionName, + const char *docs[][3]); + void SetSections(std::map + §ions); + + /** Add the documentation to the beginning/end of the section */ + void PrependSection(const char *sectionName, + const char *docs[][3]); + void PrependSection(const char *sectionName, + std::vector &docs); + void PrependSection(const char *sectionName, + cmDocumentationEntry &docs); + void AppendSection(const char *sectionName, + const char *docs[][3]); + void AppendSection(const char *sectionName, + std::vector &docs); + void AppendSection(const char *sectionName, + cmDocumentationEntry &docs); + + /** + * Print documentation in the given form. All previously added + * sections will be generated. + */ + void Print(Form f, std::ostream& os); + + /** + * Print documentation in the current form. All previously added + * sections will be generated. + */ + void Print(std::ostream& os); + + /** + * Add a section of documentation. This can be used to generate custom help + * documents. + */ + void AddSectionToPrint(const char *section); + + void SetSeeAlsoList(const char *data[][3]); + + /** Clear all previously added sections of help. */ + void ClearSections(); + + /** Set cmake root so we can find installed files */ + void SetCMakeRoot(const char* root) { this->CMakeRoot = root;} + + /** Set CMAKE_MODULE_PATH so we can find additional cmake modules */ + void SetCMakeModulePath(const char* path) { this->CMakeModulePath = path;} + + static Form GetFormFromFilename(const std::string& filename); + +private: + void SetForm(Form f); + + bool CreateSingleModule(const char* fname, + const char* moduleName, + cmDocumentationSection &sec); + void CreateModuleDocsForDir(cmsys::Directory& dir, + cmDocumentationSection &moduleSection); + bool CreateModulesSection(); + bool CreateCustomModulesSection(); + void CreateFullDocumentation(); + + bool PrintCopyright(std::ostream& os); + bool PrintVersion(std::ostream& os); + bool PrintDocumentationGeneric(std::ostream& os, const char *section); + bool PrintDocumentationList(std::ostream& os, const char *section); + bool PrintDocumentationSingle(std::ostream& os); + bool PrintDocumentationSingleModule(std::ostream& os); + bool PrintDocumentationSingleProperty(std::ostream& os); + bool PrintDocumentationSinglePolicy(std::ostream& os); + bool PrintDocumentationSingleVariable(std::ostream& os); + bool PrintDocumentationUsage(std::ostream& os); + bool PrintDocumentationFull(std::ostream& os); + bool PrintDocumentationModules(std::ostream& os); + bool PrintDocumentationCustomModules(std::ostream& os); + bool PrintDocumentationPolicies(std::ostream& os); + bool PrintDocumentationProperties(std::ostream& os); + bool PrintDocumentationVariables(std::ostream& os); + bool PrintDocumentationCurrentCommands(std::ostream& os); + bool PrintDocumentationCompatCommands(std::ostream& os); + void PrintDocumentationCommand(std::ostream& os, + const cmDocumentationEntry &entry); + + + const char* GetNameString() const; + bool IsOption(const char* arg) const; + + std::string NameString; + std::map AllSections; + + std::string SeeAlsoString; + std::string CMakeRoot; + std::string CMakeModulePath; + std::set ModulesFound; + std::vector< char* > ModuleStrings; + std::vector PrintSections; + std::string CurrentArgument; + + struct RequestedHelpItem + { + RequestedHelpItem():HelpForm(TextForm), HelpType(None) {} + cmDocumentationEnums::Form HelpForm; + cmDocumentationEnums::Type HelpType; + std::string Filename; + std::string Argument; + }; + + std::vector RequestedHelpItems; + cmDocumentationFormatter* CurrentFormatter; + cmDocumentationFormatterHTML HTMLFormatter; + cmDocumentationFormatterDocbook DocbookFormatter; + cmDocumentationFormatterMan ManFormatter; + cmDocumentationFormatterText TextFormatter; + cmDocumentationFormatterUsage UsageFormatter; + + std::vector PropertySections; + std::vector VariableSections; +}; + +#endif diff --git a/Source/cmDocumentationFormatter.cxx b/Source/cmDocumentationFormatter.cxx new file mode 100644 index 000000000..06d5d26fe --- /dev/null +++ b/Source/cmDocumentationFormatter.cxx @@ -0,0 +1,156 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatter.cxx,v $ + Language: C++ + Date: $Date: 2008-05-05 17:38:19 $ + Version: $Revision: 1.1.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDocumentationFormatter.h" + +cmDocumentationFormatter::cmDocumentationFormatter() +{ +} + +cmDocumentationFormatter::~cmDocumentationFormatter() +{ +} + +void cmDocumentationFormatter::PrintFormatted(std::ostream& os, + const char* text) +{ + if(!text) + { + return; + } + const char* ptr = text; + while(*ptr) + { + // Any ptrs starting in a space are treated as preformatted text. + std::string preformatted; + while(*ptr == ' ') + { + for(char ch = *ptr; ch && ch != '\n'; ++ptr, ch = *ptr) + { + preformatted.append(1, ch); + } + if(*ptr) + { + ++ptr; + preformatted.append(1, '\n'); + } + } + if(preformatted.length()) + { + this->PrintPreformatted(os, preformatted.c_str()); + } + + // Other ptrs are treated as paragraphs. + std::string paragraph; + for(char ch = *ptr; ch && ch != '\n'; ++ptr, ch = *ptr) + { + paragraph.append(1, ch); + } + if(*ptr) + { + ++ptr; + paragraph.append(1, '\n'); + } + if(paragraph.length()) + { + this->PrintParagraph(os, paragraph.c_str()); + } + } +} + +//---------------------------------------------------------------------------- +std::string +cmDocumentationFormatter::ComputeSectionLinkPrefix(std::string const& name) +{ + // Map from section name to a prefix for links pointing within the + // section. For example, the commands section should have HTML + // links to each command with names like #command:ADD_EXECUTABLE. + if(name.find("Command") != name.npos) + { + return "command"; + } + else if(name.find("Propert") != name.npos) + { + if(name.find("Global") != name.npos) + { + return "prop_global"; + } + else if(name.find("Direct") != name.npos) + { + return "prop_dir"; + } + else if(name.find("Target") != name.npos) + { + return "prop_tgt"; + } + else if(name.find("Test") != name.npos) + { + return "prop_test"; + } + else if(name.find("Source") != name.npos) + { + return "prop_sf"; + } + return "property"; + } + else if(name.find("Variable") != name.npos) + { + return "variable"; + } + else if(name.find("Polic") != name.npos) + { + return "policy"; + } + else if(name.find("Module") != name.npos) + { + return "module"; + } + else if(name.find("Name") != name.npos) + { + return "name"; + } + else if(name.find("Usage") != name.npos) + { + return "usage"; + } + else if(name.find("Description") != name.npos) + { + return "desc"; + } + else if(name.find("Generators") != name.npos) + { + return "gen"; + } + else if(name.find("Options") != name.npos) + { + return "opt"; + } + else if(name.find("Copyright") != name.npos) + { + return "copy"; + } + else if(name.find("See Also") != name.npos) + { + return "see"; + } + else + { + std::cerr + << "WARNING: ComputeSectionLinkPrefix failed for \"" << name << "\"" + << std::endl; + return "other"; + } +} diff --git a/Source/cmDocumentationFormatter.h b/Source/cmDocumentationFormatter.h new file mode 100644 index 000000000..911c7edae --- /dev/null +++ b/Source/cmDocumentationFormatter.h @@ -0,0 +1,70 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatter.h,v $ + Language: C++ + Date: $Date: 2008-05-05 17:38:19 $ + Version: $Revision: 1.8.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatter_h +#define _cmDocumentationFormatter_h + +#include "cmStandardIncludes.h" + +/** This is just a helper class to make it build with MSVC 6.0. +Actually the enums and internal classes could directly go into +cmDocumentation, but then MSVC6 complains in RequestedHelpItem that +cmDocumentation is an undefined type and so it doesn't know the enums. +Moving the enums to a class which is then already completely parsed helps +against this. */ +class cmDocumentationEnums +{ +public: + /** Types of help provided. */ + enum Type + { None, Usage, Single, SingleModule, SingleProperty, SingleVariable, + List, ModuleList, PropertyList, VariableList, + Full, Properties, Variables, Modules, CustomModules, Commands, + CompatCommands, Copyright, Version, Policies, SinglePolicy }; + + /** Forms of documentation output. */ + enum Form { TextForm, HTMLForm, ManForm, UsageForm, DocbookForm }; +}; + +class cmDocumentationSection; + +/** Base class for printing the documentation in the various supported + formats. */ +class cmDocumentationFormatter +{ +public: + cmDocumentationFormatter(); + virtual ~cmDocumentationFormatter(); + void PrintFormatted(std::ostream& os, const char* text); + + virtual cmDocumentationEnums::Form GetForm() const = 0; + + virtual void PrintHeader(const char* /*name*/, std::ostream& /*os*/) {} + virtual void PrintFooter(std::ostream& /*os*/) {} + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name) = 0; + virtual void PrintPreformatted(std::ostream& os, const char* text) = 0; + virtual void PrintParagraph(std::ostream& os, const char* text) = 0; + virtual void PrintIndex(std::ostream& , + std::vector&) + {} + + /** Compute a prefix for links into a section (#_SOMETHING). */ + std::string ComputeSectionLinkPrefix(std::string const& name); +}; + +#endif diff --git a/Source/cmDocumentationFormatterDocbook.cxx b/Source/cmDocumentationFormatterDocbook.cxx new file mode 100644 index 000000000..85ede318a --- /dev/null +++ b/Source/cmDocumentationFormatterDocbook.cxx @@ -0,0 +1,256 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterDocbook.cxx,v $ + Language: C++ + Date: $Date: 2008-05-05 17:38:19 $ + Version: $Revision: 1.1.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDocumentationFormatterDocbook.h" +#include "cmDocumentationSection.h" +//---------------------------------------------------------------------------- + +// this function is a copy of the one in the HTML formatter +// the three functions below are slightly modified copies +static bool cmDocumentationIsHyperlinkCharDocbook(char c) +{ + // This is not a complete list but works for CMake documentation. + return ((c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9') || + c == '-' || c == '.' || c == '/' || c == '~' || c == '@' || + c == ':' || c == '_' || c == '&' || c == '?' || c == '='); +} + +//---------------------------------------------------------------------------- +static void cmDocumentationPrintDocbookChar(std::ostream& os, char c) +{ + // Use an escape sequence if necessary. + switch(c) + { + case '<': + os << "<"; + break; + case '>': + os << ">"; + break; + case '&': + os << "&"; + break; + default: + os << c; + } +} + +//---------------------------------------------------------------------------- +const char* cmDocumentationPrintDocbookLink(std::ostream& os,const char* begin) +{ + // Look for the end of the link. + const char* end = begin; + while(cmDocumentationIsHyperlinkCharDocbook(*end)) + { + ++end; + } + + // Print the hyperlink itself. + os << ""; + + return end; +} + +//---------------------------------------------------------------------------- +void cmDocumentationPrintDocbookEscapes(std::ostream& os, const char* text) +{ + // Hyperlink prefixes. + static const char* hyperlinks[] = {"http://", "ftp://", "mailto:", 0}; + + // Print each character. + for(const char* p = text; *p;) + { + // Handle hyperlinks specially to make them active. + bool found_hyperlink = false; + for(const char** h = hyperlinks; !found_hyperlink && *h; ++h) + { + if(strncmp(p, *h, strlen(*h)) == 0) + { + p = cmDocumentationPrintDocbookLink(os, p); + found_hyperlink = true; + } + } + + // Print other characters normally. + if(!found_hyperlink) + { + cmDocumentationPrintDocbookChar(os, *p++); + } + } +} + + +cmDocumentationFormatterDocbook::cmDocumentationFormatterDocbook() +:cmDocumentationFormatter() +{ +} + +void cmDocumentationFormatterDocbook +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) +{ + if(name) + { + std::string id = "section_"; + id += name; + if (this->EmittedLinkIds.find(id) == this->EmittedLinkIds.end()) + { + this->EmittedLinkIds.insert(id); + os << "\n" + "\n" << name << "\n"; + } + else + { + static unsigned int i=0; + i++; + os << "\n" + "\n" << name << "\n"; + } + } + + std::string prefix = this->ComputeSectionLinkPrefix(name); + + const std::vector &entries = + section.GetEntries(); + + os << "\n"; + for(std::vector::const_iterator op + = entries.begin(); op != entries.end(); ++ op ) + { + if(op->Name.size()) + { + os << " Name.c_str()); + os << "\">"; + cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); + os << ""; + } + } + os << "\n" ; + + for(std::vector::const_iterator op = entries.begin(); + op != entries.end();) + { + if(op->Name.size()) + { + for(;op != entries.end() && op->Name.size(); ++op) + { + if(op->Name.size()) + { + os << " Name.c_str()); + + // make sure that each id exists only once. Since it seems + // not easily possible to determine which link refers to which id, + // we have at least to make sure that the duplicated id's get a + // different name (by appending an increasing number), Alex + std::string id = prefix; + id += "_"; + id += op->Name; + if (this->EmittedLinkIds.find(id) == this->EmittedLinkIds.end()) + { + this->EmittedLinkIds.insert(id); + } + else + { + static unsigned int i=0; + i++; + os << i; + } + // continue as normal... + + os << "\">"; + cmDocumentationPrintDocbookEscapes(os, op->Name.c_str()); + os << " "; + } + cmDocumentationPrintDocbookEscapes(os, op->Brief.c_str()); + if(op->Name.size()) + { + os << "\n"; + } + + if(op->Full.size()) + { + // a line break seems to be simply a line break with docbook + os << "\n "; + this->PrintFormatted(os, op->Full.c_str()); + } + os << "\n"; + } + } + else + { + this->PrintFormatted(os, op->Brief.c_str()); + os << "\n"; + ++op; + } + } + if(name) + { + os << "\n"; + } +} + +void cmDocumentationFormatterDocbook::PrintPreformatted(std::ostream& os, + const char* text) +{ + os << ""; + cmDocumentationPrintDocbookEscapes(os, text); + os << "\n "; +} + +void cmDocumentationFormatterDocbook::PrintParagraph(std::ostream& os, + const char* text) +{ + os << ""; + cmDocumentationPrintDocbookEscapes(os, text); + os << ""; +} + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterDocbook::PrintHeader(const char* name, + std::ostream& os) +{ + // this one is used to ensure that we don't create multiple link targets + // with the same name. We can clear it here since we are at the + // start of a document here. + this->EmittedLinkIds.clear(); + + os << "\n" + "\n" + " ]>\n" + "
\n" + "\n" + "" << name << "\n" + "\n"; +} + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterDocbook::PrintFooter(std::ostream& os) +{ + os << "
\n"; +} + diff --git a/Source/cmDocumentationFormatterDocbook.h b/Source/cmDocumentationFormatterDocbook.h new file mode 100644 index 000000000..ac24fddfb --- /dev/null +++ b/Source/cmDocumentationFormatterDocbook.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterDocbook.h,v $ + Language: C++ + Date: $Date: 2008-02-19 19:33:43 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatterDocbook_h +#define _cmDocumentationFormatterDocbook_h + +#include "cmStandardIncludes.h" + +#include "cmDocumentationFormatter.h" + +/** Class to print the documentation as Docbook. + http://www.oasis-open.org/docbook/xml/4.2/ */ +class cmDocumentationFormatterDocbook : public cmDocumentationFormatter +{ +public: + cmDocumentationFormatterDocbook(); + + virtual cmDocumentationEnums::Form GetForm() const + { return cmDocumentationEnums::DocbookForm;} + + virtual void PrintHeader(const char* name, std::ostream& os); + virtual void PrintFooter(std::ostream& os); + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name); + virtual void PrintPreformatted(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); +private: + std::set EmittedLinkIds; +}; + +#endif diff --git a/Source/cmDocumentationFormatterHTML.cxx b/Source/cmDocumentationFormatterHTML.cxx new file mode 100644 index 000000000..a4b76ada7 --- /dev/null +++ b/Source/cmDocumentationFormatterHTML.cxx @@ -0,0 +1,253 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterHTML.cxx,v $ + Language: C++ + Date: $Date: 2008-05-05 17:38:19 $ + Version: $Revision: 1.11.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDocumentationFormatterHTML.h" +#include "cmDocumentationSection.h" + +//---------------------------------------------------------------------------- +static bool cmDocumentationIsHyperlinkChar(char c) +{ + // This is not a complete list but works for CMake documentation. + return ((c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9') || + c == '-' || c == '.' || c == '/' || c == '~' || c == '@' || + c == ':' || c == '_' || c == '&' || c == '?' || c == '='); +} + +//---------------------------------------------------------------------------- +static void cmDocumentationPrintHTMLChar(std::ostream& os, char c) +{ + // Use an escape sequence if necessary. + switch (c) + { + case '<': + os << "<"; + break; + case '>': + os << ">"; + break; + case '&': + os << "&"; + break; + case '\n': + os << "
"; + break; + default: + os << c; + } +} + +//---------------------------------------------------------------------------- +bool cmDocumentationHTMLIsIdChar(char c) +{ + // From the HTML specification: + // ID and NAME tokens must begin with a letter ([A-Za-z]) and may + // be followed by any number of letters, digits ([0-9]), hyphens + // ("-"), underscores ("_"), colons (":"), and periods ("."). + return ((c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9') || + c == '-' || c == '_' || c == ':' || c == '.'); +} + +//---------------------------------------------------------------------------- +void cmDocumentationPrintHTMLId(std::ostream& os, const char* begin) +{ + for(const char* c = begin; *c; ++c) + { + if(cmDocumentationHTMLIsIdChar(*c)) + { + os << *c; + } + } +} + +//---------------------------------------------------------------------------- +const char* cmDocumentationPrintHTMLLink(std::ostream& os, const char* begin) +{ + // Look for the end of the link. + const char* end = begin; + while(cmDocumentationIsHyperlinkChar(*end)) + { + ++end; + } + + // Print the hyperlink itself. + os << ""; + + // The name of the hyperlink is the text itself. + for(const char* c = begin; c != end; ++c) + { + cmDocumentationPrintHTMLChar(os, *c); + } + os << ""; + + // Return the position at which to continue scanning the input + // string. + return end; +} + + +cmDocumentationFormatterHTML::cmDocumentationFormatterHTML() +:cmDocumentationFormatter() +{ +} + +void cmDocumentationFormatterHTML +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) +{ + if(name) + { + os << "

" << name << "

\n"; + } + + std::string prefix = this->ComputeSectionLinkPrefix(name); + + const std::vector &entries = + section.GetEntries(); + + os << "\n" ; + + for(std::vector::const_iterator op = entries.begin(); + op != entries.end();) + { + if(op->Name.size()) + { + os << "\n"; + } + else + { + this->PrintFormatted(os, op->Brief.c_str()); + os << "\n"; + ++op; + } + } +} + +void cmDocumentationFormatterHTML::PrintPreformatted(std::ostream& os, + const char* text) +{ + os << "
";
+  this->PrintHTMLEscapes(os, text);
+  os << "
\n "; +} + +void cmDocumentationFormatterHTML::PrintParagraph(std::ostream& os, + const char* text) +{ + os << "

"; + this->PrintHTMLEscapes(os, text); +} + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterHTML::PrintHeader(const char* /*name*/, + std::ostream& os) +{ + os << "\n"; +} + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterHTML::PrintFooter(std::ostream& os) +{ + os << "\n"; +} + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterHTML::PrintHTMLEscapes(std::ostream& os, + const char* text) +{ + // Hyperlink prefixes. + static const char* hyperlinks[] = {"http://", "ftp://", "mailto:", 0}; + + // Print each character. + for(const char* p = text; *p;) + { + // Handle hyperlinks specially to make them active. + bool found_hyperlink = false; + for(const char** h = hyperlinks; !found_hyperlink && *h; ++h) + { + if(strncmp(p, *h, strlen(*h)) == 0) + { + p = cmDocumentationPrintHTMLLink(os, p); + found_hyperlink = true; + } + } + + // Print other characters normally. + if(!found_hyperlink) + { + cmDocumentationPrintHTMLChar(os, *p++); + } + } +} + +void cmDocumentationFormatterHTML +::PrintIndex(std::ostream& os, + std::vector& sections) +{ + os << "

Master Index

\n"; + os << "\n"; +} diff --git a/Source/cmDocumentationFormatterHTML.h b/Source/cmDocumentationFormatterHTML.h new file mode 100644 index 000000000..b2defd970 --- /dev/null +++ b/Source/cmDocumentationFormatterHTML.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterHTML.h,v $ + Language: C++ + Date: $Date: 2008-03-05 16:05:22 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatterHTML_h +#define _cmDocumentationFormatterHTML_h + +#include "cmStandardIncludes.h" + +#include "cmDocumentationFormatter.h" + +/** Class to print the documentation as HTML. */ +class cmDocumentationFormatterHTML : public cmDocumentationFormatter +{ +public: + cmDocumentationFormatterHTML(); + + virtual cmDocumentationEnums::Form GetForm() const + { return cmDocumentationEnums::HTMLForm;} + + virtual void PrintHeader(const char* name, std::ostream& os); + virtual void PrintFooter(std::ostream& os); + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name); + virtual void PrintPreformatted(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); + virtual void PrintIndex(std::ostream& , + std::vector&); +private: + void PrintHTMLEscapes(std::ostream& os, const char* text); +}; + +#endif diff --git a/Source/cmDocumentationFormatterMan.cxx b/Source/cmDocumentationFormatterMan.cxx new file mode 100644 index 000000000..4194fd2c1 --- /dev/null +++ b/Source/cmDocumentationFormatterMan.cxx @@ -0,0 +1,87 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterMan.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmDocumentationFormatterMan.h" +#include "cmDocumentationSection.h" + +#include "cmSystemTools.h" +#include "cmVersion.h" + + +cmDocumentationFormatterMan::cmDocumentationFormatterMan() +:cmDocumentationFormatter() +{ +} + +void cmDocumentationFormatterMan +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) +{ + if(name) + { + os << ".SH " << name << "\n"; + } + + const std::vector &entries = + section.GetEntries(); + for(std::vector::const_iterator op = entries.begin(); + op != entries.end(); ++op) + { + if(op->Name.size()) + { + os << ".TP\n" + << ".B " << (op->Name.size()?op->Name.c_str():"*") << "\n"; + this->PrintFormatted(os, op->Brief.c_str()); + this->PrintFormatted(os, op->Full.c_str()); + } + else + { + os << ".PP\n"; + this->PrintFormatted(os, op->Brief.c_str()); + } + } +} + +void cmDocumentationFormatterMan::PrintPreformatted(std::ostream& os, + const char* text) +{ + std::string man_text = text; + cmSystemTools::ReplaceString(man_text, "\\", "\\\\"); + os << man_text << "\n"; +} + +void cmDocumentationFormatterMan::PrintParagraph(std::ostream& os, + const char* text) +{ + std::string man_text = text; + cmSystemTools::ReplaceString(man_text, "\\", "\\\\"); + os << man_text << "\n\n"; +} + + +//---------------------------------------------------------------------------- +void cmDocumentationFormatterMan::PrintHeader(const char* name, + std::ostream& os) +{ + os << ".TH " << name << " 1 \"" + << cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str() + << "\" \"" << name + << " " << cmVersion::GetCMakeVersion() + << "\"\n"; +} + diff --git a/Source/cmDocumentationFormatterMan.h b/Source/cmDocumentationFormatterMan.h new file mode 100644 index 000000000..d53f7a52a --- /dev/null +++ b/Source/cmDocumentationFormatterMan.h @@ -0,0 +1,41 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterMan.h,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatterMan_h +#define _cmDocumentationFormatterMan_h + +#include "cmStandardIncludes.h" + +#include "cmDocumentationFormatter.h" + +/** Class to print the documentation as man page. */ +class cmDocumentationFormatterMan : public cmDocumentationFormatter +{ +public: + cmDocumentationFormatterMan(); + + virtual cmDocumentationEnums::Form GetForm() const + { return cmDocumentationEnums::ManForm;} + + virtual void PrintHeader(const char* name, std::ostream& os); + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name); + virtual void PrintPreformatted(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); +}; + +#endif diff --git a/Source/cmDocumentationFormatterText.cxx b/Source/cmDocumentationFormatterText.cxx new file mode 100644 index 000000000..ae8ef9044 --- /dev/null +++ b/Source/cmDocumentationFormatterText.cxx @@ -0,0 +1,185 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterText.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 21:01:22 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmDocumentationFormatterText.h" +#include "cmDocumentationSection.h" + +cmDocumentationFormatterText::cmDocumentationFormatterText() +:cmDocumentationFormatter() +,TextWidth(77) +,TextIndent("") +{ +} + +void cmDocumentationFormatterText +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) +{ + if(name) + { + os << + "---------------------------------------" + "---------------------------------------\n"; + os << name << "\n\n"; + } + + const std::vector &entries = + section.GetEntries(); + for(std::vector::const_iterator op = entries.begin(); + op != entries.end(); ++op) + { + if(op->Name.size()) + { + os << " " << op->Name << "\n"; + this->TextIndent = " "; + this->PrintFormatted(os, op->Brief.c_str()); + if(op->Full.size()) + { + os << "\n"; + this->PrintFormatted(os, op->Full.c_str()); + } + } + else + { + this->TextIndent = ""; + this->PrintFormatted(os, op->Brief.c_str()); + } + os << "\n"; + } +} + +void cmDocumentationFormatterText::PrintPreformatted(std::ostream& os, + const char* text) +{ + bool newline = true; + for(const char* ptr = text; *ptr; ++ptr) + { + if(newline && *ptr != '\n') + { + os << this->TextIndent; + newline = false; + } + os << *ptr; + if(*ptr == '\n') + { + newline = true; + } + } + os << "\n"; +} + +void cmDocumentationFormatterText::PrintParagraph(std::ostream& os, + const char* text) +{ + os << this->TextIndent; + this->PrintColumn(os, text); + os << "\n"; +} + +void cmDocumentationFormatterText::SetIndent(const char* indent) +{ + this->TextIndent = indent; +} + +void cmDocumentationFormatterText::PrintColumn(std::ostream& os, + const char* text) +{ + // Print text arranged in an indented column of fixed witdh. + const char* l = text; + int column = 0; + bool newSentence = false; + bool firstLine = true; + int width = this->TextWidth - static_cast(strlen(this->TextIndent)); + + // Loop until the end of the text. + while(*l) + { + // Parse the next word. + const char* r = l; + while(*r && (*r != '\n') && (*r != ' ')) { ++r; } + + // Does it fit on this line? + if(r-l < (width-column-(newSentence?1:0))) + { + // Word fits on this line. + if(r > l) + { + if(column) + { + // Not first word on line. Separate from the previous word + // by a space, or two if this is a new sentence. + if(newSentence) + { + os << " "; + column += 2; + } + else + { + os << " "; + column += 1; + } + } + else + { + // First word on line. Print indentation unless this is the + // first line. + os << (firstLine?"":this->TextIndent); + } + + // Print the word. + os.write(l, static_cast(r-l)); + newSentence = (*(r-1) == '.'); + } + + if(*r == '\n') + { + // Text provided a newline. Start a new line. + os << "\n"; + ++r; + column = 0; + firstLine = false; + } + else + { + // No provided newline. Continue this line. + column += static_cast(r-l); + } + } + else + { + // Word does not fit on this line. Start a new line. + os << "\n"; + firstLine = false; + if(r > l) + { + os << this->TextIndent; + os.write(l, static_cast(r-l)); + column = static_cast(r-l); + newSentence = (*(r-1) == '.'); + } + else + { + column = 0; + } + } + + // Move to beginning of next word. Skip over whitespace. + l = r; + while(*l && (*l == ' ')) { ++l; } + } +} diff --git a/Source/cmDocumentationFormatterText.h b/Source/cmDocumentationFormatterText.h new file mode 100644 index 000000000..210714b92 --- /dev/null +++ b/Source/cmDocumentationFormatterText.h @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterText.h,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatterText_h +#define _cmDocumentationFormatterText_h + +#include "cmStandardIncludes.h" + +#include "cmDocumentationFormatter.h" + +/** Class to print the documentation as plain text. */ +class cmDocumentationFormatterText : public cmDocumentationFormatter +{ +public: + cmDocumentationFormatterText(); + + virtual cmDocumentationEnums::Form GetForm() const + { return cmDocumentationEnums::TextForm;} + + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name); + virtual void PrintPreformatted(std::ostream& os, const char* text); + virtual void PrintParagraph(std::ostream& os, const char* text); + void PrintColumn(std::ostream& os, const char* text); + void SetIndent(const char* indent); +protected: + int TextWidth; + const char* TextIndent; +}; + +#endif diff --git a/Source/cmDocumentationFormatterUsage.cxx b/Source/cmDocumentationFormatterUsage.cxx new file mode 100644 index 000000000..7ddaf21a5 --- /dev/null +++ b/Source/cmDocumentationFormatterUsage.cxx @@ -0,0 +1,68 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterUsage.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmDocumentationFormatterUsage.h" +#include "cmDocumentationSection.h" + +cmDocumentationFormatterUsage::cmDocumentationFormatterUsage() +:cmDocumentationFormatterText() +{ +} + +void cmDocumentationFormatterUsage +::PrintSection(std::ostream& os, + const cmDocumentationSection §ion, + const char* name) +{ + if(name) + { + os << name << "\n"; + } + + const std::vector &entries = + section.GetEntries(); + for(std::vector::const_iterator op = entries.begin(); + op != entries.end(); ++op) + { + if(op->Name.size()) + { + os << " " << op->Name; + this->TextIndent = " "; + int align = static_cast(strlen(this->TextIndent))-4; + for(int i = static_cast(op->Name.size()); i < align; ++i) + { + os << " "; + } + if (op->Name.size() > strlen(this->TextIndent)-4 ) + { + os << "\n"; + os.write(this->TextIndent, strlen(this->TextIndent)-2); + } + os << "= "; + this->PrintColumn(os, op->Brief.c_str()); + os << "\n"; + } + else + { + os << "\n"; + this->TextIndent = ""; + this->PrintFormatted(os, op->Brief.c_str()); + } + } + os << "\n"; +} + diff --git a/Source/cmDocumentationFormatterUsage.h b/Source/cmDocumentationFormatterUsage.h new file mode 100644 index 000000000..01c2d1b9a --- /dev/null +++ b/Source/cmDocumentationFormatterUsage.h @@ -0,0 +1,36 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationFormatterUsage.h,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationFormatterUsage_h +#define _cmDocumentationFormatterUsage_h + +#include "cmDocumentationFormatterText.h" + +/** Class to print the documentation as usage on the command line. */ +class cmDocumentationFormatterUsage : public cmDocumentationFormatterText +{ +public: + cmDocumentationFormatterUsage(); + + virtual cmDocumentationEnums::Form GetForm() const + { return cmDocumentationEnums::UsageForm;} + + virtual void PrintSection(std::ostream& os, + const cmDocumentationSection& section, + const char* name); +}; + +#endif diff --git a/Source/cmDocumentationSection.cxx b/Source/cmDocumentationSection.cxx new file mode 100755 index 000000000..432ceff49 --- /dev/null +++ b/Source/cmDocumentationSection.cxx @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationSection.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 19:33:19 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDocumentationSection.h" + + +//---------------------------------------------------------------------------- +void cmDocumentationSection::Append(const char *data[][3]) +{ + int i = 0; + while(data[i][1]) + { + this->Entries.push_back(cmDocumentationEntry(data[i][0], + data[i][1], + data[i][2])); + data += 1; + } +} + +//---------------------------------------------------------------------------- +void cmDocumentationSection::Prepend(const char *data[][3]) +{ + std::vector tmp; + int i = 0; + while(data[i][1]) + { + tmp.push_back(cmDocumentationEntry(data[i][0], + data[i][1], + data[i][2])); + data += 1; + } + this->Entries.insert(this->Entries.begin(),tmp.begin(),tmp.end()); +} + +//---------------------------------------------------------------------------- +void cmDocumentationSection::Append(const char *n, const char *b, + const char *f) +{ + this->Entries.push_back(cmDocumentationEntry(n,b,f)); +} + +#if 0 +//---------------------------------------------------------------------------- +void cmDocumentationSection::Set(const cmDocumentationEntry* header, + const cmDocumentationEntry* section, + const cmDocumentationEntry* footer) +{ + this->Entries.erase(this->Entries.begin(), this->Entries.end()); + if(header) + { + for(const cmDocumentationEntry* op = header; op->brief; ++op) + { + this->Entries.push_back(*op); + } + } + if(section) + { + for(const cmDocumentationEntry* op = section; op->brief; ++op) + { + this->Entries.push_back(*op); + } + } + if(footer) + { + for(const cmDocumentationEntry* op = footer; op->brief; ++op) + { + this->Entries.push_back(*op); + } + } + cmDocumentationEntry empty = {0,0,0}; + this->Entries.push_back(empty); +} +#endif diff --git a/Source/cmDocumentationSection.h b/Source/cmDocumentationSection.h new file mode 100755 index 000000000..d0c3fa9be --- /dev/null +++ b/Source/cmDocumentationSection.h @@ -0,0 +1,73 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDocumentationSection.h,v $ + Language: C++ + Date: $Date: 2007-10-24 15:36:47 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef _cmDocumentationSection_h +#define _cmDocumentationSection_h + +#include "cmStandardIncludes.h" +#include "cmDocumentationFormatter.h" + +// Low-level interface for custom documents: +/** Internal class representing a section of the documentation. + * Cares e.g. for the different section titles in the different + * output formats. + */ +class cmDocumentationSection +{ +public: + /** Create a cmSection, with a special name for man-output mode. */ + cmDocumentationSection(const char* name, const char* manName) + :Name(name), ManName(manName) {} + + /** Has any content been added to this section or is it empty ? */ + bool IsEmpty() const { return this->Entries.empty(); } + + /** Clear contents. */ + void Clear() { this->Entries.clear(); } + + /** Return the name of this section for the given output form. */ + const char* GetName(cmDocumentationEnums::Form form) const + { return (form==cmDocumentationEnums::ManForm ? + this->ManName.c_str() : this->Name.c_str()); } + + /** Return a pointer to the first entry of this section. */ + const std::vector &GetEntries() const + { return this->Entries; } + + /** Append an entry to this section. */ + void Append(const cmDocumentationEntry& entry) + { this->Entries.push_back(entry); } + void Append(const std::vector &entries) + { this->Entries.insert(this->Entries.end(),entries.begin(),entries.end()); } + + /** Append an entry to this section using NULL terminated chars */ + void Append(const char *[][3]); + void Append(const char *n, const char *b, const char *f); + + /** prepend some documentation to this section */ + void Prepend(const char *[][3]); + void Prepend(const std::vector &entries) + { this->Entries.insert(this->Entries.begin(), + entries.begin(),entries.end()); } + + +private: + std::string Name; + std::string ManName; + std::vector Entries; +}; + +#endif diff --git a/Source/cmDumpDocumentation.cxx b/Source/cmDumpDocumentation.cxx new file mode 100644 index 000000000..6aa3389eb --- /dev/null +++ b/Source/cmDumpDocumentation.cxx @@ -0,0 +1,155 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDumpDocumentation.cxx,v $ + Language: C++ + Date: $Date: 2007-12-13 22:56:49 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// Program extracts documentation describing commands from +// the CMake system. +// +#include "cmake.h" + +#include "cmDocumentation.h" +#include "cmVersion.h" + +//---------------------------------------------------------------------------- +static const char *cmDocumentationName[][3] = +{ + {0, + " DumpDocumentation - Dump documentation for CMake.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationUsage[][3] = +{ + {0, + " DumpDocumentation [filename]", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationDescription[][3] = +{ + {0, + "The \"DumpDocumentation\" executable is only available in the build " + "tree. It is used for testing, coverage, and documentation.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char *cmDocumentationOptions[][3] = +{ + {"--all-for-coverage", + "Dump all documentation to stdout. For testing.", 0}, + {0,0,0} +}; + + +int DumpHTML(const char* outname) +{ + std::ofstream fout(outname); + if(!fout) + { + std::cerr << "failed to open output file: " << outname << "\n"; + cmSystemTools::ReportLastSystemError(""); + return -1; + } + + cmake cmi; + cmDocumentation doc; + std::vector commands; + cmi.GetCommandDocumentation(commands); + cmOStringStream str; + str << "Documentation for Commands of CMake " + << cmVersion::GetCMakeVersion(); + doc.SetSection(str.str().c_str(), commands); + doc.Print(cmDocumentation::HTMLForm, fout); + + return 0; +} + +int DumpForCoverageToStream(std::ostream& out) +{ + cmake cmi; + cmDocumentation doc; + std::vector commands; + std::vector generators; + cmi.GetCommandDocumentation(commands); + cmi.GetGeneratorDocumentation(generators); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.SetSection("options",cmDocumentationOptions); + doc.SetSection("Commands",commands); + doc.SetSection("Generators",generators); + doc.PrintDocumentation(cmDocumentation::Usage, out); + doc.PrintDocumentation(cmDocumentation::Full, out); + return 0; +} + +int DumpForCoverage(const char* outname) +{ + if(outname) + { + std::ofstream fout(outname); + if(!fout) + { + std::cerr << "failed to open output file: " << outname << "\n"; + cmSystemTools::ReportLastSystemError(""); + return -1; + } + return DumpForCoverageToStream(fout); + } + else + { + return DumpForCoverageToStream(std::cout); + } +} + +int main(int ac, char** av) +{ + cmSystemTools::EnableMSVCDebugHook(); + cmSystemTools::FindExecutableDirectory(av[0]); + const char* outname = "cmake.html"; + bool coverage = false; + if(ac > 1) + { + if(strcmp(av[1], "--all-for-coverage") == 0) + { + coverage = true; + if(ac > 2) + { + outname = av[2]; + } + else + { + outname = 0; + } + } + else + { + outname = av[1]; + } + } + + if(coverage) + { + return DumpForCoverage(outname); + } + else + { + return DumpHTML(outname); + } +} diff --git a/Source/cmDynamicLoader.cxx b/Source/cmDynamicLoader.cxx new file mode 100644 index 000000000..3279a0a31 --- /dev/null +++ b/Source/cmDynamicLoader.cxx @@ -0,0 +1,117 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDynamicLoader.cxx,v $ + Language: C++ + Date: $Date: 2006-03-16 22:09:08 $ + Version: $Revision: 1.29 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmDynamicLoader.h" + +class cmDynamicLoaderCache +{ +public: + ~cmDynamicLoaderCache(); + void CacheFile(const char* path, + const cmsys::DynamicLoader::LibraryHandle&); + bool GetCacheFile(const char* path, cmsys::DynamicLoader::LibraryHandle&); + bool FlushCache(const char* path); + void FlushCache(); + static cmDynamicLoaderCache* GetInstance(); + +private: + std::map CacheMap; + static cmDynamicLoaderCache* Instance; +}; + +cmDynamicLoaderCache* cmDynamicLoaderCache::Instance = 0; + +cmDynamicLoaderCache::~cmDynamicLoaderCache() +{ +} + +void cmDynamicLoaderCache::CacheFile(const char* path, + const cmsys::DynamicLoader::LibraryHandle& p) +{ + cmsys::DynamicLoader::LibraryHandle h; + if ( this->GetCacheFile(path, h) ) + { + this->FlushCache(path); + } + this->CacheMap[path] = p; +} + +bool cmDynamicLoaderCache::GetCacheFile(const char* path, + cmsys::DynamicLoader::LibraryHandle& p) +{ + std::map::iterator it + = this->CacheMap.find(path); + if ( it != this->CacheMap.end() ) + { + p = it->second; + return true; + } + return false; +} + +bool cmDynamicLoaderCache::FlushCache(const char* path) +{ + std::map::iterator it + = this->CacheMap.find(path); + bool ret = false; + if ( it != this->CacheMap.end() ) + { + cmsys::DynamicLoader::CloseLibrary(it->second); + this->CacheMap.erase(it); + ret = true; + } + return ret; +} + +void cmDynamicLoaderCache::FlushCache() +{ + for ( std::map::iterator it + = this->CacheMap.begin(); + it != this->CacheMap.end(); it++ ) + { + cmsys::DynamicLoader::CloseLibrary(it->second); + } + delete cmDynamicLoaderCache::Instance; + cmDynamicLoaderCache::Instance = 0; +} + +cmDynamicLoaderCache* cmDynamicLoaderCache::GetInstance() +{ + if ( !cmDynamicLoaderCache::Instance ) + { + cmDynamicLoaderCache::Instance = new cmDynamicLoaderCache; + } + return cmDynamicLoaderCache::Instance; +} + +cmsys::DynamicLoader::LibraryHandle cmDynamicLoader::OpenLibrary( + const char* libname ) +{ + cmsys::DynamicLoader::LibraryHandle lh; + if ( cmDynamicLoaderCache::GetInstance()->GetCacheFile(libname, lh) ) + { + return lh; + } + lh = cmsys::DynamicLoader::OpenLibrary(libname); + cmDynamicLoaderCache::GetInstance()->CacheFile(libname, lh); + return lh; +} + +void cmDynamicLoader::FlushCache() +{ + cmDynamicLoaderCache::GetInstance()->FlushCache(); +} diff --git a/Source/cmDynamicLoader.h b/Source/cmDynamicLoader.h new file mode 100644 index 000000000..26f19510c --- /dev/null +++ b/Source/cmDynamicLoader.h @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmDynamicLoader.h,v $ + Language: C++ + Date: $Date: 2006-03-16 22:09:08 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// .NAME cmDynamicLoader - class interface to system dynamic libraries +// .SECTION Description +// cmDynamicLoader provides a portable interface to loading dynamic +// libraries into a process. + + +#ifndef __cmDynamicLoader_h +#define __cmDynamicLoader_h + +#include "cmStandardIncludes.h" + +#include + +class cmDynamicLoader +{ +public: + // Description: + // Load a dynamic library into the current process. + // The returned cmsys::DynamicLoader::LibraryHandle can be used to access + // the symbols in the library. + static cmsys::DynamicLoader::LibraryHandle OpenLibrary(const char*); + + // Description: + // Flush the cache of dynamic loader. + static void FlushCache(); + +protected: + cmDynamicLoader() {}; + ~cmDynamicLoader() {}; + +private: + cmDynamicLoader(const cmDynamicLoader&); // Not implemented. + void operator=(const cmDynamicLoader&); // Not implemented. +}; + +#endif diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx new file mode 100644 index 000000000..1a06e608f --- /dev/null +++ b/Source/cmELF.cxx @@ -0,0 +1,921 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmELF.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:51 $ + Version: $Revision: 1.8.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmStandardIncludes.h" // to get CMAKE_USE_ELF_PARSER first +#include "cmELF.h" + +#include + +// Need the native byte order of the running CPU. +#include + +// Include the ELF format information system header. +#include +#if defined(__sun) +# include // For dynamic section information +#endif + +//---------------------------------------------------------------------------- +// Low-level byte swapping implementation. +template struct cmELFByteSwapSize {}; +void cmELFByteSwap(char*, cmELFByteSwapSize<1> const&) +{ +} +void cmELFByteSwap(char* data, cmELFByteSwapSize<2> const&) +{ + char one_byte; + one_byte = data[0]; data[0] = data[1]; data[1] = one_byte; +} +void cmELFByteSwap(char* data, cmELFByteSwapSize<4> const&) +{ + char one_byte; + one_byte = data[0]; data[0] = data[3]; data[3] = one_byte; + one_byte = data[1]; data[1] = data[2]; data[2] = one_byte; +} +void cmELFByteSwap(char* data, cmELFByteSwapSize<8> const&) +{ + char one_byte; + one_byte = data[0]; data[0] = data[7]; data[7] = one_byte; + one_byte = data[1]; data[1] = data[6]; data[6] = one_byte; + one_byte = data[2]; data[2] = data[5]; data[5] = one_byte; + one_byte = data[3]; data[3] = data[4]; data[4] = one_byte; +} + +// Low-level byte swapping interface. +template +void cmELFByteSwap(T& x) +{ + cmELFByteSwap(reinterpret_cast(&x), cmELFByteSwapSize()); +} + +//---------------------------------------------------------------------------- +class cmELFInternal +{ +public: + typedef cmELF::StringEntry StringEntry; + enum ByteOrderType { ByteOrderMSB, ByteOrderLSB }; + + // Construct and take ownership of the file stream object. + cmELFInternal(cmELF* external, + cmsys::auto_ptr& fin, + ByteOrderType order): + External(external), + Stream(*fin.release()), + ByteOrder(order), + ELFType(cmELF::FileTypeInvalid) + { + // In most cases the processor-specific byte order will match that + // of the target execution environment. If we choose wrong here + // it is fixed when the header is read. +#if cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_LITTLE + this->NeedSwap = (this->ByteOrder == ByteOrderMSB); +#elif cmsys_CPU_ENDIAN_ID == cmsys_CPU_ENDIAN_ID_BIG + this->NeedSwap = (this->ByteOrder == ByteOrderLSB); +#endif + + // We have not yet loaded the section info. + this->DynamicSectionIndex = -1; + } + + // Destruct and delete the file stream object. + virtual ~cmELFInternal() + { + delete &this->Stream; + } + + // Forward to the per-class implementation. + virtual unsigned int GetNumberOfSections() const = 0; + virtual unsigned int GetDynamicEntryCount() = 0; + virtual unsigned long GetDynamicEntryPosition(int j) = 0; + virtual StringEntry const* GetDynamicSectionString(int tag) = 0; + virtual void PrintInfo(std::ostream& os) const = 0; + + bool ReadBytes(unsigned long pos, unsigned long size, char* buf) + { + this->Stream.seekg(pos); + this->Stream.read(buf, size); + return this->Stream?true:false; + } + + // Lookup the SONAME in the DYNAMIC section. + StringEntry const* GetSOName() + { + return this->GetDynamicSectionString(DT_SONAME); + } + + // Lookup the RPATH in the DYNAMIC section. + StringEntry const* GetRPath() + { + return this->GetDynamicSectionString(DT_RPATH); + } + + // Lookup the RUNPATH in the DYNAMIC section. + StringEntry const* GetRunPath() + { +#if defined(DT_RUNPATH) + return this->GetDynamicSectionString(DT_RUNPATH); +#else + return 0; +#endif + } + + // Return the recorded ELF type. + cmELF::FileType GetFileType() const { return this->ELFType; } +protected: + // Data common to all ELF class implementations. + + // The external cmELF object. + cmELF* External; + + // The stream from which to read. + std::istream& Stream; + + // The byte order of the ELF file. + ByteOrderType ByteOrder; + + // The ELF file type. + cmELF::FileType ELFType; + + // Whether we need to byte-swap structures read from the stream. + bool NeedSwap; + + // The section header index of the DYNAMIC section (-1 if none). + int DynamicSectionIndex; + + // Helper methods for subclasses. + void SetErrorMessage(const char* msg) + { + this->External->ErrorMessage = msg; + this->ELFType = cmELF::FileTypeInvalid; + } + + // Store string table entry states. + std::map DynamicSectionStrings; +}; + +//---------------------------------------------------------------------------- +// Configure the implementation template for 32-bit ELF files. +struct cmELFTypes32 +{ + typedef Elf32_Ehdr ELF_Ehdr; + typedef Elf32_Shdr ELF_Shdr; + typedef Elf32_Dyn ELF_Dyn; + typedef Elf32_Half ELF_Half; + static const char* GetName() { return "32-bit"; } +}; + +// Configure the implementation template for 32-bit ELF files. +struct cmELFTypes64 +{ + typedef Elf64_Ehdr ELF_Ehdr; + typedef Elf64_Shdr ELF_Shdr; + typedef Elf64_Dyn ELF_Dyn; + typedef Elf64_Half ELF_Half; + static const char* GetName() { return "64-bit"; } +}; + +//---------------------------------------------------------------------------- +// Parser implementation template. +template +class cmELFInternalImpl: public cmELFInternal +{ +public: + // Copy the ELF file format types from our configuration parameter. + typedef typename Types::ELF_Ehdr ELF_Ehdr; + typedef typename Types::ELF_Shdr ELF_Shdr; + typedef typename Types::ELF_Dyn ELF_Dyn; + typedef typename Types::ELF_Half ELF_Half; + + // Construct with a stream and byte swap indicator. + cmELFInternalImpl(cmELF* external, + cmsys::auto_ptr& fin, + ByteOrderType order); + + // Return the number of sections as specified by the ELF header. + virtual unsigned int GetNumberOfSections() const + { + return static_cast(this->ELFHeader.e_shnum); + } + + // Get the file position and size of a dynamic section entry. + virtual unsigned int GetDynamicEntryCount(); + virtual unsigned long GetDynamicEntryPosition(int j); + + // Lookup a string from the dynamic section with the given tag. + virtual StringEntry const* GetDynamicSectionString(int tag); + + // Print information about the ELF file. + virtual void PrintInfo(std::ostream& os) const + { + os << "ELF " << Types::GetName(); + if(this->ByteOrder == ByteOrderMSB) + { + os << " MSB"; + } + else if(this->ByteOrder == ByteOrderLSB) + { + os << " LSB"; + } + switch(this->ELFType) + { + case cmELF::FileTypeInvalid: + os << " invalid file"; + break; + case cmELF::FileTypeRelocatableObject: + os << " relocatable object"; + break; + case cmELF::FileTypeExecutable: + os << " executable"; + break; + case cmELF::FileTypeSharedLibrary: + os << " shared library"; + break; + case cmELF::FileTypeCore: + os << " core file"; + break; + case cmELF::FileTypeSpecificOS: + os << " os-specific type"; + break; + case cmELF::FileTypeSpecificProc: + os << " processor-specific type"; + break; + } + os << "\n"; + } + +private: + void ByteSwap(ELF_Ehdr& elf_header) + { + cmELFByteSwap(elf_header.e_type); + cmELFByteSwap(elf_header.e_machine); + cmELFByteSwap(elf_header.e_version); + cmELFByteSwap(elf_header.e_entry); + cmELFByteSwap(elf_header.e_phoff); + cmELFByteSwap(elf_header.e_shoff); + cmELFByteSwap(elf_header.e_flags); + cmELFByteSwap(elf_header.e_ehsize); + cmELFByteSwap(elf_header.e_phentsize); + cmELFByteSwap(elf_header.e_phnum); + cmELFByteSwap(elf_header.e_shentsize); + cmELFByteSwap(elf_header.e_shnum); + cmELFByteSwap(elf_header.e_shstrndx); + } + + void ByteSwap(ELF_Shdr& sec_header) + { + cmELFByteSwap(sec_header.sh_name); + cmELFByteSwap(sec_header.sh_type); + cmELFByteSwap(sec_header.sh_flags); + cmELFByteSwap(sec_header.sh_addr); + cmELFByteSwap(sec_header.sh_offset); + cmELFByteSwap(sec_header.sh_size); + cmELFByteSwap(sec_header.sh_link); + cmELFByteSwap(sec_header.sh_info); + cmELFByteSwap(sec_header.sh_addralign); + cmELFByteSwap(sec_header.sh_entsize); + } + + void ByteSwap(ELF_Dyn& dyn) + { + cmELFByteSwap(dyn.d_tag); + switch (dyn.d_tag) + { + case DT_NULL: /* dyn.d_un ignored */ break; + case DT_NEEDED: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_PLTRELSZ: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_PLTGOT: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_HASH: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_STRTAB: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_SYMTAB: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_RELA: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_RELASZ: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_RELAENT: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_STRSZ: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_SYMENT: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_INIT: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_FINI: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_SONAME: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_RPATH: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_SYMBOLIC: /* dyn.d_un ignored */ break; + case DT_REL: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_RELSZ: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_RELENT: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_PLTREL: cmELFByteSwap(dyn.d_un.d_val); break; + case DT_DEBUG: cmELFByteSwap(dyn.d_un.d_ptr); break; + case DT_TEXTREL: /* dyn.d_un ignored */ break; + case DT_JMPREL: cmELFByteSwap(dyn.d_un.d_ptr); break; +#ifdef T_BIND_NOW + case T_BIND_NOW: /* dyn.d_un ignored */ break; +#endif +#ifdef DT_INIT_ARRAY + case DT_INIT_ARRAY: cmELFByteSwap(dyn.d_un.d_ptr); break; +#endif +#ifdef DT_FINI_ARRAY + case DT_FINI_ARRAY: cmELFByteSwap(dyn.d_un.d_ptr); break; +#endif +#ifdef DT_INIT_ARRAYSZ + case DT_INIT_ARRAYSZ: cmELFByteSwap(dyn.d_un.d_val); break; +#endif +#ifdef DT_FINI_ARRAYSZ + case DT_FINI_ARRAYSZ: cmELFByteSwap(dyn.d_un.d_val); break; +#endif +#ifdef DT_RUNPATH + case DT_RUNPATH: cmELFByteSwap(dyn.d_un.d_val); break; +#endif +#ifdef DT_FLAGS + case DT_FLAGS: cmELFByteSwap(dyn.d_un.d_val); break; +#endif +#ifdef DT_PREINIT_ARRAY + case DT_PREINIT_ARRAY: cmELFByteSwap(dyn.d_un.d_ptr); break; +#endif +#ifdef DT_PREINIT_ARRAYSZ + case DT_PREINIT_ARRAYSZ: cmELFByteSwap(dyn.d_un.d_val); break; +#endif + } + } + + bool FileTypeValid(ELF_Half et) + { + unsigned int eti = static_cast(et); + if(eti == ET_NONE || eti == ET_REL || eti == ET_EXEC || + eti == ET_DYN || eti == ET_CORE) + { + return true; + } +#if defined(ET_LOOS) && defined(ET_HIOS) + if(eti >= ET_LOOS && eti <= ET_HIOS) + { + return true; + } +#endif +#if defined(ET_LOPROC) && defined(ET_HIPROC) + if(eti >= ET_LOPROC && eti <= ET_HIPROC) + { + return true; + } +#endif + return false; + } + + bool Read(ELF_Ehdr& x) + { + // Read the header from the file. + if(!this->Stream.read(reinterpret_cast(&x), sizeof(x))) + { + return false; + } + + // The byte order of ELF header fields may not match that of the + // processor-specific data. The header fields are ordered to + // match the target execution environment, so we may need to + // memorize the order of all platforms based on the e_machine + // value. As a heuristic, if the type is invalid but its + // swapped value is okay then flip our swap mode. + ELF_Half et = x.e_type; + if(this->NeedSwap) + { + cmELFByteSwap(et); + } + if(!this->FileTypeValid(et)) + { + cmELFByteSwap(et); + if(this->FileTypeValid(et)) + { + // The previous byte order guess was wrong. Flip it. + this->NeedSwap = !this->NeedSwap; + } + } + + // Fix the byte order of the header. + if(this->NeedSwap) + { + ByteSwap(x); + } + return true; + } + bool Read(ELF_Shdr& x) + { + if(this->Stream.read(reinterpret_cast(&x), sizeof(x)) && + this->NeedSwap) + { + ByteSwap(x); + } + return this->Stream? true:false; + } + bool Read(ELF_Dyn& x) + { + if(this->Stream.read(reinterpret_cast(&x), sizeof(x)) && + this->NeedSwap) + { + ByteSwap(x); + } + return this->Stream? true:false; + } + + bool LoadSectionHeader(ELF_Half i) + { + // Read the section header from the file. + this->Stream.seekg(this->ELFHeader.e_shoff + + this->ELFHeader.e_shentsize * i); + if(!this->Read(this->SectionHeaders[i])) + { + return false; + } + + // Identify some important sections. + if(this->SectionHeaders[i].sh_type == SHT_DYNAMIC) + { + this->DynamicSectionIndex = i; + } + return true; + } + + bool LoadDynamicSection(); + + // Store the main ELF header. + ELF_Ehdr ELFHeader; + + // Store all the section headers. + std::vector SectionHeaders; + + // Store all entries of the DYNAMIC section. + std::vector DynamicSectionEntries; +}; + +//---------------------------------------------------------------------------- +template +cmELFInternalImpl +::cmELFInternalImpl(cmELF* external, + cmsys::auto_ptr& fin, + ByteOrderType order): + cmELFInternal(external, fin, order) +{ + // Read the main header. + if(!this->Read(this->ELFHeader)) + { + this->SetErrorMessage("Failed to read main ELF header."); + return; + } + + // Determine the ELF file type. + switch(this->ELFHeader.e_type) + { + case ET_NONE: + this->SetErrorMessage("ELF file type is NONE."); + return; + case ET_REL: + this->ELFType = cmELF::FileTypeRelocatableObject; + break; + case ET_EXEC: + this->ELFType = cmELF::FileTypeExecutable; + break; + case ET_DYN: + this->ELFType = cmELF::FileTypeSharedLibrary; + break; + case ET_CORE: + this->ELFType = cmELF::FileTypeCore; + break; + default: + { + unsigned int eti = static_cast(this->ELFHeader.e_type); +#if defined(ET_LOOS) && defined(ET_HIOS) + if(eti >= ET_LOOS && eti <= ET_HIOS) + { + this->ELFType = cmELF::FileTypeSpecificOS; + break; + } +#endif +#if defined(ET_LOPROC) && defined(ET_HIPROC) + if(eti >= ET_LOPROC && eti <= ET_HIPROC) + { + this->ELFType = cmELF::FileTypeSpecificProc; + break; + } +#endif + cmOStringStream e; + e << "Unknown ELF file type " << eti; + this->SetErrorMessage(e.str().c_str()); + return; + } + } + + // Load the section headers. + this->SectionHeaders.resize(this->ELFHeader.e_shnum); + for(ELF_Half i=0; i < this->ELFHeader.e_shnum; ++i) + { + if(!this->LoadSectionHeader(i)) + { + this->SetErrorMessage("Failed to load section headers."); + return; + } + } +} + +//---------------------------------------------------------------------------- +template +bool cmELFInternalImpl::LoadDynamicSection() +{ + // If there is no dynamic section we are done. + if(this->DynamicSectionIndex < 0) + { + return false; + } + + // If the section was already loaded we are done. + if(!this->DynamicSectionEntries.empty()) + { + return true; + } + + // Allocate the dynamic section entries. + ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; + int n = sec.sh_size / sec.sh_entsize; + this->DynamicSectionEntries.resize(n); + + // Read each entry. + for(int j=0; j < n; ++j) + { + // Seek to the beginning of the section entry. + this->Stream.seekg(sec.sh_offset + sec.sh_entsize*j); + ELF_Dyn& dyn = this->DynamicSectionEntries[j]; + + // Try reading the entry. + if(!this->Read(dyn)) + { + this->SetErrorMessage("Error reading entry from DYNAMIC section."); + this->DynamicSectionIndex = -1; + return false; + } + } + return true; +} + +//---------------------------------------------------------------------------- +template +unsigned int cmELFInternalImpl::GetDynamicEntryCount() +{ + if(!this->LoadDynamicSection()) + { + return 0; + } + for(unsigned int i = 0; i < this->DynamicSectionEntries.size(); ++i) + { + if(this->DynamicSectionEntries[i].d_tag == DT_NULL) + { + return i; + } + } + return this->DynamicSectionEntries.size(); +} + +//---------------------------------------------------------------------------- +template +unsigned long cmELFInternalImpl::GetDynamicEntryPosition(int j) +{ + if(!this->LoadDynamicSection()) + { + return 0; + } + if(j < 0 || j >= static_cast(this->DynamicSectionEntries.size())) + { + return 0; + } + ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; + return sec.sh_offset + sec.sh_entsize*j; +} + +//---------------------------------------------------------------------------- +template +cmELF::StringEntry const* +cmELFInternalImpl::GetDynamicSectionString(int tag) +{ + // Short-circuit if already checked. + std::map::iterator dssi = + this->DynamicSectionStrings.find(tag); + if(dssi != this->DynamicSectionStrings.end()) + { + if(dssi->second.Position > 0) + { + return &dssi->second; + } + return 0; + } + + // Create an entry for this tag. Assume it is missing until found. + StringEntry& se = this->DynamicSectionStrings[tag]; + se.Position = 0; + se.Size = 0; + se.IndexInSection = -1; + + // Try reading the dynamic section. + if(!this->LoadDynamicSection()) + { + return 0; + } + + // Get the string table referenced by the DYNAMIC section. + ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; + if(sec.sh_link >= this->SectionHeaders.size()) + { + this->SetErrorMessage("Section DYNAMIC has invalid string table index."); + return 0; + } + ELF_Shdr const& strtab = this->SectionHeaders[sec.sh_link]; + + // Look for the requested entry. + for(typename std::vector::iterator + di = this->DynamicSectionEntries.begin(); + di != this->DynamicSectionEntries.end(); ++di) + { + ELF_Dyn& dyn = *di; + if(dyn.d_tag == tag) + { + // We found the tag requested. + // Make sure the position given is within the string section. + if(dyn.d_un.d_val >= strtab.sh_size) + { + this->SetErrorMessage("Section DYNAMIC references string beyond " + "the end of its string section."); + return 0; + } + + // Seek to the position reported by the entry. + unsigned long first = static_cast(dyn.d_un.d_val); + unsigned long last = first; + unsigned long end = static_cast(strtab.sh_size); + this->Stream.seekg(strtab.sh_offset + first); + + // Read the string. It may be followed by more than one NULL + // terminator. Count the total size of the region allocated to + // the string. This assumes that the next string in the table + // is non-empty, but the "chrpath" tool makes the same + // assumption. + bool terminated = false; + char c; + while(last != end && this->Stream.get(c) && !(terminated && c)) + { + ++last; + if(c) + { + se.Value += c; + } + else + { + terminated = true; + } + } + + // Make sure the whole value was read. + if(!this->Stream) + { + this->SetErrorMessage("Dynamic section specifies unreadable RPATH."); + se.Value = ""; + return 0; + } + + // The value has been read successfully. Report it. + se.Position = static_cast(strtab.sh_offset + first); + se.Size = last - first; + se.IndexInSection = di - this->DynamicSectionEntries.begin(); + return &se; + } + } + return 0; +} + +//============================================================================ +// External class implementation. + +//---------------------------------------------------------------------------- +cmELF::cmELF(const char* fname): Internal(0) +{ + // Try to open the file. + cmsys::auto_ptr fin(new std::ifstream(fname)); + + // Quit now if the file could not be opened. + if(!fin.get() || !*fin) + { + this->ErrorMessage = "Error opening input file."; + return; + } + + // Read the ELF identification block. + char ident[EI_NIDENT]; + if(!fin->read(ident, EI_NIDENT)) + { + this->ErrorMessage = "Error reading ELF identification."; + return; + } + if(!fin->seekg(0)) + { + this->ErrorMessage = "Error seeking to beginning of file."; + return; + } + + // Verify the ELF identification. + if(!(ident[EI_MAG0] == ELFMAG0 && + ident[EI_MAG1] == ELFMAG1 && + ident[EI_MAG2] == ELFMAG2 && + ident[EI_MAG3] == ELFMAG3)) + { + this->ErrorMessage = "File does not have a valid ELF identification."; + return; + } + + // Check the byte order in which the rest of the file is encoded. + cmELFInternal::ByteOrderType order; + if(ident[EI_DATA] == ELFDATA2LSB) + { + // File is LSB. + order = cmELFInternal::ByteOrderLSB; + } + else if(ident[EI_DATA] == ELFDATA2MSB) + { + // File is MSB. + order = cmELFInternal::ByteOrderMSB; + } + else + { + this->ErrorMessage = "ELF file is not LSB or MSB encoded."; + return; + } + + // Check the class of the file and construct the corresponding + // parser implementation. + if(ident[EI_CLASS] == ELFCLASS32) + { + // 32-bit ELF + this->Internal = new cmELFInternalImpl(this, fin, order); + } + else if(ident[EI_CLASS] == ELFCLASS64) + { + // 64-bit ELF + this->Internal = new cmELFInternalImpl(this, fin, order); + } + else + { + this->ErrorMessage = "ELF file class is not 32-bit or 64-bit."; + return; + } +} + +//---------------------------------------------------------------------------- +cmELF::~cmELF() +{ + delete this->Internal; +} + +//---------------------------------------------------------------------------- +bool cmELF::Valid() const +{ + return this->Internal && this->Internal->GetFileType() != FileTypeInvalid; +} + +//---------------------------------------------------------------------------- +cmELF::FileType cmELF::GetFileType() const +{ + if(this->Valid()) + { + return this->Internal->GetFileType(); + } + else + { + return FileTypeInvalid; + } +} + +//---------------------------------------------------------------------------- +unsigned int cmELF::GetNumberOfSections() const +{ + if(this->Valid()) + { + return this->Internal->GetNumberOfSections(); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +unsigned int cmELF::GetDynamicEntryCount() const +{ + if(this->Valid()) + { + return this->Internal->GetDynamicEntryCount(); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +unsigned long cmELF::GetDynamicEntryPosition(int index) const +{ + if(this->Valid()) + { + return this->Internal->GetDynamicEntryPosition(index); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +bool cmELF::ReadBytes(unsigned long pos, unsigned long size, char* buf) const +{ + if(this->Valid()) + { + return this->Internal->ReadBytes(pos, size, buf); + } + else + { + return false; + } +} + +//---------------------------------------------------------------------------- +bool cmELF::GetSOName(std::string& soname) +{ + if(StringEntry const* se = this->GetSOName()) + { + soname = se->Value; + return true; + } + else + { + return false; + } +} + +//---------------------------------------------------------------------------- +cmELF::StringEntry const* cmELF::GetSOName() +{ + if(this->Valid() && + this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary) + { + return this->Internal->GetSOName(); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +cmELF::StringEntry const* cmELF::GetRPath() +{ + if(this->Valid() && + this->Internal->GetFileType() == cmELF::FileTypeExecutable || + this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary) + { + return this->Internal->GetRPath(); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +cmELF::StringEntry const* cmELF::GetRunPath() +{ + if(this->Valid() && + this->Internal->GetFileType() == cmELF::FileTypeExecutable || + this->Internal->GetFileType() == cmELF::FileTypeSharedLibrary) + { + return this->Internal->GetRunPath(); + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +void cmELF::PrintInfo(std::ostream& os) const +{ + if(this->Valid()) + { + this->Internal->PrintInfo(os); + } + else + { + os << "Not a valid ELF file.\n"; + } +} diff --git a/Source/cmELF.h b/Source/cmELF.h new file mode 100644 index 000000000..c16c29c94 --- /dev/null +++ b/Source/cmELF.h @@ -0,0 +1,113 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmELF.h,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:51 $ + Version: $Revision: 1.4.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmELF_h +#define cmELF_h + +#if !defined(CMAKE_USE_ELF_PARSER) +# error "This file may be included only if CMAKE_USE_ELF_PARSER is enabled." +#endif + +class cmELFInternal; + +/** \class cmELF + * \brief Executable and Link Format (ELF) parser. + */ +class cmELF +{ +public: + /** Construct with the name of the ELF input file to parse. */ + cmELF(const char* fname); + + /** Destruct. */ + ~cmELF(); + + /** Get the error message if any. */ + std::string const& GetErrorMessage() const + { + return this->ErrorMessage; + } + + /** Boolean conversion. True if the ELF file is valid. */ + operator bool() const { return this->Valid(); } + + /** Enumeration of ELF file types. */ + enum FileType + { + FileTypeInvalid, + FileTypeRelocatableObject, + FileTypeExecutable, + FileTypeSharedLibrary, + FileTypeCore, + FileTypeSpecificOS, + FileTypeSpecificProc + }; + + /** Represent string table entries. */ + struct StringEntry + { + // The string value itself. + std::string Value; + + // The position in the file at which the string appears. + unsigned long Position; + + // The size of the string table entry. This includes the space + // allocated for one or more null terminators. + unsigned long Size; + + // The index of the section entry referencing the string. + int IndexInSection; + }; + + /** Get the type of the file opened. */ + FileType GetFileType() const; + + /** Get the number of ELF sections present. */ + unsigned int GetNumberOfSections() const; + + /** Get the number of DYNAMIC section entries before the first + DT_NULL. Returns zero on error. */ + unsigned int GetDynamicEntryCount() const; + + /** Get the position of a DYNAMIC section header entry. Returns + zero on error. */ + unsigned long GetDynamicEntryPosition(int index) const; + + /** Read bytes from the file. */ + bool ReadBytes(unsigned long pos, unsigned long size, char* buf) const; + + /** Get the SONAME field if any. */ + bool GetSOName(std::string& soname); + StringEntry const* GetSOName(); + + /** Get the RPATH field if any. */ + StringEntry const* GetRPath(); + + /** Get the RUNPATH field if any. */ + StringEntry const* GetRunPath(); + + /** Print human-readable information about the ELF file. */ + void PrintInfo(std::ostream& os) const; + +private: + friend class cmELFInternal; + bool Valid() const; + cmELFInternal* Internal; + std::string ErrorMessage; +}; + +#endif diff --git a/Source/cmElseCommand.cxx b/Source/cmElseCommand.cxx new file mode 100644 index 000000000..4a757bd7f --- /dev/null +++ b/Source/cmElseCommand.cxx @@ -0,0 +1,26 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmElseCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.26 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmElseCommand.h" + +bool cmElseCommand::InitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ELSE command was found outside of a proper " + "IF ENDIF structure. Or its arguments did not match " + "the opening IF command."); + return false; +} diff --git a/Source/cmElseCommand.h b/Source/cmElseCommand.h new file mode 100644 index 000000000..3ae010ae6 --- /dev/null +++ b/Source/cmElseCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmElseCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmElseCommand_h +#define cmElseCommand_h + +#include "cmIfCommand.h" + +/** \class cmElseCommand + * \brief ends an if block + * + * cmElseCommand ends an if block + */ +class cmElseCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmElseCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "else";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Starts the else portion of an if block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " else(expression)\n" + "See the if command."; + } + + cmTypeMacro(cmElseCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmElseIfCommand.cxx b/Source/cmElseIfCommand.cxx new file mode 100755 index 000000000..b05efad4f --- /dev/null +++ b/Source/cmElseIfCommand.cxx @@ -0,0 +1,25 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmElseIfCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmElseIfCommand.h" + +bool cmElseIfCommand::InitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ELSEIF command was found outside of a proper " + "IF ENDIF structure."); + return false; +} diff --git a/Source/cmElseIfCommand.h b/Source/cmElseIfCommand.h new file mode 100755 index 000000000..173e32940 --- /dev/null +++ b/Source/cmElseIfCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmElseIfCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmElseIfCommand_h +#define cmElseIfCommand_h + +#include "cmIfCommand.h" + +/** \class cmElseIfCommand + * \brief ends an if block + * + * cmElseIfCommand ends an if block + */ +class cmElseIfCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmElseIfCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "elseif";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Starts the elseif portion of an if block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " elseif(expression)\n" + "See the if command."; + } + + cmTypeMacro(cmElseIfCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmEnableLanguageCommand.cxx b/Source/cmEnableLanguageCommand.cxx new file mode 100644 index 000000000..aba07ee18 --- /dev/null +++ b/Source/cmEnableLanguageCommand.cxx @@ -0,0 +1,48 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEnableLanguageCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEnableLanguageCommand.h" + +// cmEnableLanguageCommand +bool cmEnableLanguageCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + bool optional = false; + std::vector languages; + if(args.size() < 1 ) + { + this->SetError + ("ENABLE_LANGUAGE called with incorrect number of arguments"); + return false; + } + for (std::vector::const_iterator it = args.begin(); + it != args.end(); + ++it) + { + if ((*it) == "OPTIONAL") + { + optional = true; + } + else + { + languages.push_back(*it); + } + } + + this->Makefile->EnableLanguage(languages, optional); + return true; +} + diff --git a/Source/cmEnableLanguageCommand.h b/Source/cmEnableLanguageCommand.h new file mode 100644 index 000000000..8e3ae9136 --- /dev/null +++ b/Source/cmEnableLanguageCommand.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEnableLanguageCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEnableLanguageCommand_h +#define cmEnableLanguageCommand_h + +#include "cmCommand.h" + +/** \class cmEnableLanguageCommand + * \brief Specify the name for this build project. + * + * cmEnableLanguageCommand is used to specify a name for this build project. + * It is defined once per set of CMakeList.txt files (including + * all subdirectories). Currently it just sets the name of the workspace + * file for Microsoft Visual C++ + */ +class cmEnableLanguageCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEnableLanguageCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "enable_language";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Enable a language (CXX/C/Fortran/etc)"; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " enable_language(languageName [OPTIONAL] )\n" + "This command enables support for the named language in CMake. " + "This is the same as the project command but does not create " + "any of the extra variables that are created by the project command. " + "Example languages are CXX, C, Fortran.\n" + "If OPTIONAL is used, use the CMAKE__COMPILER_WORKS " + "variable to check whether the language has been enabled successfully."; + } + + cmTypeMacro(cmEnableLanguageCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmEnableTestingCommand.cxx b/Source/cmEnableTestingCommand.cxx new file mode 100644 index 000000000..a3ec2b5b5 --- /dev/null +++ b/Source/cmEnableTestingCommand.cxx @@ -0,0 +1,27 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEnableTestingCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEnableTestingCommand.h" +#include "cmLocalGenerator.h" + +// we do this in the final pass so that we now the subdirs have all +// been defined +bool cmEnableTestingCommand::InitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->Makefile->AddDefinition("CMAKE_TESTING_ENABLED","1"); + return true; +} diff --git a/Source/cmEnableTestingCommand.h b/Source/cmEnableTestingCommand.h new file mode 100644 index 000000000..804f8beb7 --- /dev/null +++ b/Source/cmEnableTestingCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEnableTestingCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEnableTestingCommand_h +#define cmEnableTestingCommand_h + +#include "cmCommand.h" + +/** \class cmEnableTestingCommand + * \brief Enable testing for this directory and below. + * + * Produce the output testfile. This produces a file in the build directory + * called CMakeTestfile with a syntax similar to CMakeLists.txt. It contains + * the SUBDIRS() and ADD_TEST() commands from the source CMakeLists.txt + * file with CMake variables expanded. Only the subdirs and tests + * within the valid control structures are replicated in Testfile + * (i.e. SUBDIRS() and ADD_TEST() commands within IF() commands that are + * not entered by CMake are not replicated in Testfile). + * Note that CTest expects to find this file in the build directory root; + * therefore, this command should be in the source directory root too. + */ +class cmEnableTestingCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEnableTestingCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "enable_testing";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Enable testing for current directory and below."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " enable_testing()\n" + "Enables testing for this directory and below. " + "See also the add_test command. Note that ctest expects to find " + "a test file in the build directory root. Therefore, this command " + "should be in the source directory root."; + } + + cmTypeMacro(cmEnableTestingCommand, cmCommand); + +}; + + +#endif diff --git a/Source/cmEndForEachCommand.cxx b/Source/cmEndForEachCommand.cxx new file mode 100644 index 000000000..7528420d1 --- /dev/null +++ b/Source/cmEndForEachCommand.cxx @@ -0,0 +1,28 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndForEachCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEndForEachCommand.h" + +bool cmEndForEachCommand +::InvokeInitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ENDFOREACH command was found outside of a proper " + "FOREACH ENDFOREACH structure. Or its arguments did " + "not match the opening FOREACH command."); + return false; +} + diff --git a/Source/cmEndForEachCommand.h b/Source/cmEndForEachCommand.h new file mode 100644 index 000000000..31d2584ab --- /dev/null +++ b/Source/cmEndForEachCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndForEachCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEndForEachCommand_h +#define cmEndForEachCommand_h + +#include "cmCommand.h" + +/** \class cmEndForEachCommand + * \brief ends an if block + * + * cmEndForEachCommand ends an if block + */ +class cmEndForEachCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEndForEachCommand; + } + + /** + * Override cmCommand::InvokeInitialPass to get arguments before + * expansion. + */ + virtual bool InvokeInitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) {return false;} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "endforeach";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Ends a list of commands in a FOREACH block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " endforeach(expression)\n" + "See the FOREACH command."; + } + + cmTypeMacro(cmEndForEachCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmEndFunctionCommand.cxx b/Source/cmEndFunctionCommand.cxx new file mode 100755 index 000000000..196e4589f --- /dev/null +++ b/Source/cmEndFunctionCommand.cxx @@ -0,0 +1,28 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndFunctionCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEndFunctionCommand.h" + +bool cmEndFunctionCommand +::InvokeInitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ENDFUNCTION command was found outside of a proper " + "FUNCTION ENDFUNCTION structure. Or its arguments did not " + "match the opening FUNCTION command."); + return false; +} + diff --git a/Source/cmEndFunctionCommand.h b/Source/cmEndFunctionCommand.h new file mode 100755 index 000000000..d1526b370 --- /dev/null +++ b/Source/cmEndFunctionCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndFunctionCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEndFunctionCommand_h +#define cmEndFunctionCommand_h + +#include "cmCommand.h" + +/** \class cmEndFunctionCommand + * \brief ends an if block + * + * cmEndFunctionCommand ends an if block + */ +class cmEndFunctionCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEndFunctionCommand; + } + + /** + * Override cmCommand::InvokeInitialPass to get arguments before + * expansion. + */ + virtual bool InvokeInitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) {return false;} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "endfunction";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Ends a list of commands in a function block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " endfunction(expression)\n" + "See the function command."; + } + + cmTypeMacro(cmEndFunctionCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmEndIfCommand.cxx b/Source/cmEndIfCommand.cxx new file mode 100644 index 000000000..fd77cccac --- /dev/null +++ b/Source/cmEndIfCommand.cxx @@ -0,0 +1,34 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndIfCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEndIfCommand.h" +#include // required for atof +bool cmEndIfCommand::InitialPass(std::vector const&, + cmExecutionStatus &) +{ + const char* versionValue + = this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION"); + if (!versionValue || (atof(versionValue) <= 1.4)) + { + return true; + } + + this->SetError("An ENDIF command was found outside of a proper " + "IF ENDIF structure. Or its arguments did not match " + "the opening IF command."); + return false; +} + diff --git a/Source/cmEndIfCommand.h b/Source/cmEndIfCommand.h new file mode 100644 index 000000000..ea8602bcb --- /dev/null +++ b/Source/cmEndIfCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndIfCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEndIfCommand_h +#define cmEndIfCommand_h + +#include "cmIfCommand.h" + +/** \class cmEndIfCommand + * \brief ends an if block + * + * cmEndIfCommand ends an if block + */ +class cmEndIfCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEndIfCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "endif";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Ends a list of commands in an if block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " endif(expression)\n" + "See the if command."; + } + + cmTypeMacro(cmEndIfCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmEndMacroCommand.cxx b/Source/cmEndMacroCommand.cxx new file mode 100755 index 000000000..45262c87b --- /dev/null +++ b/Source/cmEndMacroCommand.cxx @@ -0,0 +1,28 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndMacroCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEndMacroCommand.h" + +bool cmEndMacroCommand +::InvokeInitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ENDMACRO command was found outside of a proper " + "MACRO ENDMACRO structure. Or its arguments did not " + "match the opening MACRO command."); + return false; +} + diff --git a/Source/cmEndMacroCommand.h b/Source/cmEndMacroCommand.h new file mode 100755 index 000000000..6b4a12f09 --- /dev/null +++ b/Source/cmEndMacroCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndMacroCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEndMacroCommand_h +#define cmEndMacroCommand_h + +#include "cmCommand.h" + +/** \class cmEndMacroCommand + * \brief ends an if block + * + * cmEndMacroCommand ends an if block + */ +class cmEndMacroCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEndMacroCommand; + } + + /** + * Override cmCommand::InvokeInitialPass to get arguments before + * expansion. + */ + virtual bool InvokeInitialPass(std::vector const&, + cmExecutionStatus &); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) {return false;} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "endmacro";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Ends a list of commands in a macro block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " endmacro(expression)\n" + "See the macro command."; + } + + cmTypeMacro(cmEndMacroCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmEndWhileCommand.cxx b/Source/cmEndWhileCommand.cxx new file mode 100644 index 000000000..d0727b287 --- /dev/null +++ b/Source/cmEndWhileCommand.cxx @@ -0,0 +1,28 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndWhileCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmEndWhileCommand.h" + +bool cmEndWhileCommand +::InvokeInitialPass(std::vector const&, + cmExecutionStatus &) +{ + this->SetError("An ENDWHILE command was found outside of a proper " + "WHILE ENDWHILE structure. Or its arguments did not " + "match the opening WHILE command."); + return false; +} + diff --git a/Source/cmEndWhileCommand.h b/Source/cmEndWhileCommand.h new file mode 100644 index 000000000..16452dc05 --- /dev/null +++ b/Source/cmEndWhileCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmEndWhileCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmEndWhileCommand_h +#define cmEndWhileCommand_h + +#include "cmCommand.h" + +/** \class cmEndWhileCommand + * \brief ends a while loop + * + * cmEndWhileCommand ends a while loop + */ +class cmEndWhileCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmEndWhileCommand; + } + + /** + * Override cmCommand::InvokeInitialPass to get arguments before + * expansion. + */ + virtual bool InvokeInitialPass(std::vector const&, + cmExecutionStatus &status); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) {return false;} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "endwhile";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Ends a list of commands in a while block."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " endwhile(expression)\n" + "See the while command."; + } + + cmTypeMacro(cmEndWhileCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx new file mode 100644 index 000000000..93afc79d5 --- /dev/null +++ b/Source/cmExecProgramCommand.cxx @@ -0,0 +1,150 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExecProgramCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExecProgramCommand.h" +#include "cmSystemTools.h" + +// cmExecProgramCommand +bool cmExecProgramCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::string arguments; + bool doingargs = false; + int count = 0; + std::string output_variable; + bool haveoutput_variable = false; + std::string return_variable; + bool havereturn_variable = false; + for(size_t i=0; i < args.size(); ++i) + { + if(args[i] == "OUTPUT_VARIABLE") + { + count++; + doingargs = false; + havereturn_variable = false; + haveoutput_variable = true; + } + else if ( haveoutput_variable ) + { + if ( output_variable.size() > 0 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + output_variable = args[i]; + haveoutput_variable = false; + count ++; + } + else if(args[i] == "RETURN_VALUE") + { + count++; + doingargs = false; + haveoutput_variable = false; + havereturn_variable = true; + } + else if ( havereturn_variable ) + { + if ( return_variable.size() > 0 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + return_variable = args[i]; + havereturn_variable = false; + count ++; + } + else if(args[i] == "ARGS") + { + count++; + havereturn_variable = false; + haveoutput_variable = false; + doingargs = true; + } + else if(doingargs) + { + arguments += args[i]; + arguments += " "; + count++; + } + } + + std::string command; + if(arguments.size()) + { + command = cmSystemTools::ConvertToRunCommandPath(args[0].c_str()); + command += " "; + command += arguments; + } + else + { + command = args[0]; + } + bool verbose = true; + if(output_variable.size() > 0) + { + verbose = false; + } + int retVal = 0; + std::string output; + bool result = true; + if(args.size() - count == 2) + { + cmSystemTools::MakeDirectory(args[1].c_str()); + result = cmSystemTools::RunCommand(command.c_str(), output, retVal, + args[1].c_str(), verbose); + } + else + { + result = cmSystemTools::RunCommand(command.c_str(), output, + retVal, 0, verbose); + } + if(!result) + { + retVal = -1; + } + + if ( output_variable.size() > 0 ) + { + std::string::size_type first = output.find_first_not_of(" \n\t\r"); + std::string::size_type last = output.find_last_not_of(" \n\t\r"); + if(first == std::string::npos) + { + first = 0; + } + if(last == std::string::npos) + { + last = output.size()-1; + } + + std::string coutput = std::string(output, first, last-first+1); + this->Makefile->AddDefinition(output_variable.c_str(), coutput.c_str()); + } + + if ( return_variable.size() > 0 ) + { + char buffer[100]; + sprintf(buffer, "%d", retVal); + this->Makefile->AddDefinition(return_variable.c_str(), buffer); + } + + return true; +} + diff --git a/Source/cmExecProgramCommand.h b/Source/cmExecProgramCommand.h new file mode 100644 index 000000000..c0babf46c --- /dev/null +++ b/Source/cmExecProgramCommand.h @@ -0,0 +1,100 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExecProgramCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExecProgramCommand_h +#define cmExecProgramCommand_h + +#include "cmCommand.h" + +/** \class cmExecProgramCommand + * \brief Command that adds a target to the build system. + * + * cmExecProgramCommand adds an extra target to the build system. + * This is useful when you would like to add special + * targets like "install,", "clean," and so on. + */ +class cmExecProgramCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmExecProgramCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() + {return "exec_program";} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Deprecated. Use the execute_process() command instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "Run an executable program during the processing of the CMakeList.txt" + " file.\n" + " exec_program(Executable [directory in which to run]\n" + " [ARGS ]\n" + " [OUTPUT_VARIABLE ]\n" + " [RETURN_VALUE ])\n" + "The executable is run in the optionally specified directory. The " + "executable can include arguments if it is double quoted, but it is " + "better to use the optional ARGS argument to specify arguments to the " + "program. This is because cmake will then be able to escape spaces " + "in the executable path. An optional argument OUTPUT_VARIABLE " + "specifies a variable in which to store the output. " + "To capture the return value of the execution, provide a RETURN_VALUE. " + "If OUTPUT_VARIABLE is specified, then no output will go to the " + "stdout/stderr of the console running cmake.\n" + ; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmExecProgramCommand, cmCommand); +}; + +#endif diff --git a/Source/cmExecuteProcessCommand.cxx b/Source/cmExecuteProcessCommand.cxx new file mode 100644 index 000000000..5551c334e --- /dev/null +++ b/Source/cmExecuteProcessCommand.cxx @@ -0,0 +1,427 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExecuteProcessCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExecuteProcessCommand.h" +#include "cmSystemTools.h" + +#include + +#include /* isspace */ + +static bool cmExecuteProcessCommandIsWhitespace(char c) +{ + return (isspace((int)c) || c == '\n' || c == '\r'); +} + +void cmExecuteProcessCommandFixText(std::vector& output, + bool strip_trailing_whitespace); +void cmExecuteProcessCommandAppend(std::vector& output, + const char* data, int length); + +// cmExecuteProcessCommand +bool cmExecuteProcessCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::vector< std::vector > cmds; + std::string arguments; + bool doing_command = false; + size_t command_index = 0; + bool output_quiet = false; + bool error_quiet = false; + bool output_strip_trailing_whitespace = false; + bool error_strip_trailing_whitespace = false; + std::string timeout_string; + std::string input_file; + std::string output_file; + std::string error_file; + std::string output_variable; + std::string error_variable; + std::string result_variable; + std::string working_directory; + for(size_t i=0; i < args.size(); ++i) + { + if(args[i] == "COMMAND") + { + doing_command = true; + command_index = cmds.size(); + cmds.push_back(std::vector()); + } + else if(args[i] == "OUTPUT_VARIABLE") + { + doing_command = false; + if(++i < args.size()) + { + output_variable = args[i]; + } + else + { + this->SetError(" called with no value for OUTPUT_VARIABLE."); + return false; + } + } + else if(args[i] == "ERROR_VARIABLE") + { + doing_command = false; + if(++i < args.size()) + { + error_variable = args[i]; + } + else + { + this->SetError(" called with no value for ERROR_VARIABLE."); + return false; + } + } + else if(args[i] == "RESULT_VARIABLE") + { + doing_command = false; + if(++i < args.size()) + { + result_variable = args[i]; + } + else + { + this->SetError(" called with no value for RESULT_VARIABLE."); + return false; + } + } + else if(args[i] == "WORKING_DIRECTORY") + { + doing_command = false; + if(++i < args.size()) + { + working_directory = args[i]; + } + else + { + this->SetError(" called with no value for WORKING_DIRECTORY."); + return false; + } + } + else if(args[i] == "INPUT_FILE") + { + doing_command = false; + if(++i < args.size()) + { + input_file = args[i]; + } + else + { + this->SetError(" called with no value for INPUT_FILE."); + return false; + } + } + else if(args[i] == "OUTPUT_FILE") + { + doing_command = false; + if(++i < args.size()) + { + output_file = args[i]; + } + else + { + this->SetError(" called with no value for OUTPUT_FILE."); + return false; + } + } + else if(args[i] == "ERROR_FILE") + { + doing_command = false; + if(++i < args.size()) + { + error_file = args[i]; + } + else + { + this->SetError(" called with no value for ERROR_FILE."); + return false; + } + } + else if(args[i] == "TIMEOUT") + { + doing_command = false; + if(++i < args.size()) + { + timeout_string = args[i]; + } + else + { + this->SetError(" called with no value for TIMEOUT."); + return false; + } + } + else if(args[i] == "OUTPUT_QUIET") + { + doing_command = false; + output_quiet = true; + } + else if(args[i] == "ERROR_QUIET") + { + doing_command = false; + error_quiet = true; + } + else if(args[i] == "OUTPUT_STRIP_TRAILING_WHITESPACE") + { + doing_command = false; + output_strip_trailing_whitespace = true; + } + else if(args[i] == "ERROR_STRIP_TRAILING_WHITESPACE") + { + doing_command = false; + error_strip_trailing_whitespace = true; + } + else if(doing_command) + { + cmds[command_index].push_back(args[i].c_str()); + } + else + { + cmOStringStream e; + e << " given unknown argument \"" << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + if ( !this->Makefile->CanIWriteThisFile(output_file.c_str()) ) + { + std::string e = "attempted to output into a file: " + output_file + + " into a source directory."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + + // Check for commands given. + if(cmds.empty()) + { + this->SetError(" called with no COMMAND argument."); + return false; + } + for(unsigned int i=0; i < cmds.size(); ++i) + { + if(cmds[i].empty()) + { + this->SetError(" given COMMAND argument with no value."); + return false; + } + else + { + // Add the null terminating pointer to the command argument list. + cmds[i].push_back(0); + } + } + + // Parse the timeout string. + double timeout = -1; + if(!timeout_string.empty()) + { + if(sscanf(timeout_string.c_str(), "%lg", &timeout) != 1) + { + this->SetError(" called with TIMEOUT value that could not be parsed."); + return false; + } + } + + // Create a process instance. + cmsysProcess* cp = cmsysProcess_New(); + + // Set the command sequence. + for(unsigned int i=0; i < cmds.size(); ++i) + { + cmsysProcess_AddCommand(cp, &*cmds[i].begin()); + } + + // Set the process working directory. + if(!working_directory.empty()) + { + cmsysProcess_SetWorkingDirectory(cp, working_directory.c_str()); + } + + // Always hide the process window. + cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1); + + // Check the output variables. + bool merge_output = (output_variable == error_variable); + if(error_variable.empty() && !error_quiet) + { + cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDERR, 1); + } + if(!input_file.empty()) + { + cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDIN, input_file.c_str()); + } + if(!output_file.empty()) + { + cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDOUT, + output_file.c_str()); + } + if(!error_file.empty()) + { + cmsysProcess_SetPipeFile(cp, cmsysProcess_Pipe_STDERR, + error_file.c_str()); + } + + // Set the timeout if any. + if(timeout >= 0) + { + cmsysProcess_SetTimeout(cp, timeout); + } + + // Start the process. + cmsysProcess_Execute(cp); + + // Read the process output. + std::vector tempOutput; + std::vector tempError; + int length; + char* data; + int p; + while((p = cmsysProcess_WaitForData(cp, &data, &length, 0), p)) + { + // Put the output in the right place. + if(p == cmsysProcess_Pipe_STDOUT && !output_quiet || + p == cmsysProcess_Pipe_STDERR && !error_quiet && merge_output) + { + if(output_variable.empty()) + { + cmSystemTools::Stdout(data, length); + } + else + { + cmExecuteProcessCommandAppend(tempOutput, data, length); + } + } + else if(p == cmsysProcess_Pipe_STDERR && !error_quiet) + { + if(!error_variable.empty()) + { + cmExecuteProcessCommandAppend(tempError, data, length); + } + } + } + + // All output has been read. Wait for the process to exit. + cmsysProcess_WaitForExit(cp, 0); + + // Fix the text in the output strings. + cmExecuteProcessCommandFixText(tempOutput, + output_strip_trailing_whitespace); + cmExecuteProcessCommandFixText(tempError, + error_strip_trailing_whitespace); + + // Store the output obtained. + if(!output_variable.empty() && tempOutput.size()) + { + this->Makefile->AddDefinition(output_variable.c_str(), + &*tempOutput.begin()); + } + if(!merge_output && !error_variable.empty() && tempError.size()) + { + this->Makefile->AddDefinition(error_variable.c_str(), + &*tempError.begin()); + } + + // Store the result of running the process. + if(!result_variable.empty()) + { + switch(cmsysProcess_GetState(cp)) + { + case cmsysProcess_State_Exited: + { + int v = cmsysProcess_GetExitValue(cp); + char buf[100]; + sprintf(buf, "%d", v); + this->Makefile->AddDefinition(result_variable.c_str(), buf); + } + break; + case cmsysProcess_State_Exception: + this->Makefile->AddDefinition(result_variable.c_str(), + cmsysProcess_GetExceptionString(cp)); + break; + case cmsysProcess_State_Error: + this->Makefile->AddDefinition(result_variable.c_str(), + cmsysProcess_GetErrorString(cp)); + break; + case cmsysProcess_State_Expired: + this->Makefile->AddDefinition(result_variable.c_str(), + "Process terminated due to timeout"); + break; + } + } + + // Delete the process instance. + cmsysProcess_Delete(cp); + + return true; +} + +//---------------------------------------------------------------------------- +void cmExecuteProcessCommandFixText(std::vector& output, + bool strip_trailing_whitespace) +{ + // Remove \0 characters and the \r part of \r\n pairs. + unsigned int in_index = 0; + unsigned int out_index = 0; + while(in_index < output.size()) + { + char c = output[in_index++]; + if((c != '\r' || !(in_index < output.size() && output[in_index] == '\n')) + && c != '\0') + { + output[out_index++] = c; + } + } + + // Remove trailing whitespace if requested. + if(strip_trailing_whitespace) + { + while(out_index > 0 && + cmExecuteProcessCommandIsWhitespace(output[out_index-1])) + { + --out_index; + } + } + + // Shrink the vector to the size needed. + output.resize(out_index); + + // Put a terminator on the text string. + output.push_back('\0'); +} + +//---------------------------------------------------------------------------- +void cmExecuteProcessCommandAppend(std::vector& output, + const char* data, int length) +{ +#if defined(__APPLE__) + // HACK on Apple to work around bug with inserting at the + // end of an empty vector. This resulted in random failures + // that were hard to reproduce. + if(output.empty() && length > 0) + { + output.push_back(data[0]); + ++data; + --length; + } +#endif + output.insert(output.end(), data, data+length); +} diff --git a/Source/cmExecuteProcessCommand.h b/Source/cmExecuteProcessCommand.h new file mode 100644 index 000000000..94876210f --- /dev/null +++ b/Source/cmExecuteProcessCommand.h @@ -0,0 +1,118 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExecuteProcessCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExecuteProcessCommand_h +#define cmExecuteProcessCommand_h + +#include "cmCommand.h" + +/** \class cmExecuteProcessCommand + * \brief Command that adds a target to the build system. + * + * cmExecuteProcessCommand is a CMake language interface to the KWSys + * Process Execution implementation. + */ +class cmExecuteProcessCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmExecuteProcessCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() + {return "execute_process";} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Execute one or more child processes."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " execute_process(COMMAND [args1...]]\n" + " [COMMAND [args2...] [...]]\n" + " [WORKING_DIRECTORY ]\n" + " [TIMEOUT ]\n" + " [RESULT_VARIABLE ]\n" + " [OUTPUT_VARIABLE ]\n" + " [ERROR_VARIABLE ]\n" + " [INPUT_FILE ]\n" + " [OUTPUT_FILE ]\n" + " [ERROR_FILE ]\n" + " [OUTPUT_QUIET]\n" + " [ERROR_QUIET]\n" + " [OUTPUT_STRIP_TRAILING_WHITESPACE]\n" + " [ERROR_STRIP_TRAILING_WHITESPACE])\n" + "Runs the given sequence of one or more commands with the standard " + "output of each process piped to the standard input of the next. " + "A single standard error pipe is used for all processes. " + "If WORKING_DIRECTORY is given the named directory will be set as " + "the current working directory of the child processes. " + "If TIMEOUT is given the child processes will be terminated if they " + "do not finish in the specified number of seconds " + "(fractions are allowed). " + "If RESULT_VARIABLE is given the variable will be set to contain " + "the result of running the processes. This will be an integer return " + "code from the last child or a string describing an error condition. " + "If OUTPUT_VARIABLE or ERROR_VARIABLE are given the variable named " + "will be set with the contents of the standard output and standard " + "error pipes respectively. If the same variable is named for both " + "pipes their output will be merged in the order produced. " + "If INPUT_FILE, OUTPUT_FILE, or ERROR_FILE is given the file named " + "will be attached to the standard input of the first process, " + "standard output of the last process, or standard error of all " + "processes respectively. " + "If OUTPUT_QUIET or ERROR_QUIET is given then the standard output " + "or standard error results will be quietly ignored. " + "If more than one OUTPUT_* or ERROR_* option is given for the same " + "pipe the precedence is not specified. " + "If no OUTPUT_* or ERROR_* options are given the output will be shared " + "with the corresponding pipes of the CMake process itself.\n" + "The execute_process command is a newer more powerful version of " + "exec_program, but the old command has been kept for compatibility." + ; + } + + cmTypeMacro(cmExecuteProcessCommand, cmCommand); +}; + +#endif diff --git a/Source/cmExecutionStatus.h b/Source/cmExecutionStatus.h new file mode 100755 index 000000000..1044aa389 --- /dev/null +++ b/Source/cmExecutionStatus.h @@ -0,0 +1,60 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExecutionStatus.h,v $ + Language: C++ + Date: $Date: 2008-03-07 13:40:36 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExecutionStatus_h +#define cmExecutionStatus_h + +#include "cmObject.h" + +/** \class cmExecutionStatus + * \brief Superclass for all command status classes + * + * when a command is involked it may set values on a command status instance + */ +class cmExecutionStatus : public cmObject +{ +public: + cmTypeMacro(cmExecutionStatus, cmObject); + + cmExecutionStatus() { this->Clear();}; + + virtual void SetReturnInvoked(bool val) + { this->ReturnInvoked = val; } + virtual bool GetReturnInvoked() + { return this->ReturnInvoked; } + + virtual void SetBreakInvoked(bool val) + { this->BreakInvoked = val; } + virtual bool GetBreakInvoked() + { return this->BreakInvoked; } + + virtual void Clear() + { + this->ReturnInvoked = false; + this->BreakInvoked = false; + this->NestedError = false; + } + virtual void SetNestedError(bool val) { this->NestedError = val; } + virtual bool GetNestedError() { return this->NestedError; } + + +protected: + bool ReturnInvoked; + bool BreakInvoked; + bool NestedError; +}; + +#endif diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx new file mode 100644 index 000000000..beb452cad --- /dev/null +++ b/Source/cmExportBuildFileGenerator.cxx @@ -0,0 +1,161 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportBuildFileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-06 19:20:35 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExportBuildFileGenerator.h" + +#include "cmExportCommand.h" + +//---------------------------------------------------------------------------- +cmExportBuildFileGenerator::cmExportBuildFileGenerator() +{ + this->ExportCommand = 0; +} + +//---------------------------------------------------------------------------- +bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os) +{ + // Create all the imported targets. + for(std::vector::const_iterator + tei = this->Exports->begin(); + tei != this->Exports->end(); ++tei) + { + cmTarget* te = *tei; + if(this->ExportedTargets.insert(te).second) + { + this->GenerateImportTargetCode(os, te); + } + else + { + if(this->ExportCommand && this->ExportCommand->ErrorMessage.empty()) + { + cmOStringStream e; + e << "given target \"" << te->GetName() << "\" more than once."; + this->ExportCommand->ErrorMessage = e.str(); + } + return false; + } + } + + // Generate import file content for each configuration. + for(std::vector::const_iterator + ci = this->Configurations.begin(); + ci != this->Configurations.end(); ++ci) + { + this->GenerateImportConfig(os, ci->c_str()); + } + + return true; +} + +//---------------------------------------------------------------------------- +void +cmExportBuildFileGenerator +::GenerateImportTargetsConfig(std::ostream& os, + const char* config, std::string const& suffix) +{ + for(std::vector::const_iterator + tei = this->Exports->begin(); + tei != this->Exports->end(); ++tei) + { + // Collect import properties for this target. + cmTarget* target = *tei; + ImportPropertyMap properties; + this->SetImportLocationProperty(config, suffix, target, properties); + if(!properties.empty()) + { + // Get the rest of the target details. + this->SetImportDetailProperties(config, suffix, + target, properties); + + // TOOD: PUBLIC_HEADER_LOCATION + // This should wait until the build feature propagation stuff + // is done. Then this can be a propagated include directory. + // this->GenerateImportProperty(config, te->HeaderGenerator, + // properties); + + // Generate code in the export file. + this->GenerateImportPropertyCode(os, config, target, properties); + } + } +} + +//---------------------------------------------------------------------------- +void +cmExportBuildFileGenerator +::SetImportLocationProperty(const char* config, std::string const& suffix, + cmTarget* target, ImportPropertyMap& properties) +{ + // Get the makefile in which to lookup target information. + cmMakefile* mf = target->GetMakefile(); + + // Add the main target file. + { + std::string prop = "IMPORTED_LOCATION"; + prop += suffix; + std::string value; + if(target->IsFrameworkOnApple()) + { + value = target->GetFullPath(config, false); + } + else if(target->IsAppBundleOnApple()) + { + value = target->GetFullPath(config, false); + value += ".app/Contents/MacOS/"; + value += target->GetFullName(config, false); + } + else + { + value = target->GetFullPath(config, false, true); + } + properties[prop] = value; + } + + // Check whether this is a DLL platform. + bool dll_platform = + (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MINGW")); + + // Add the import library for windows DLLs. + if(dll_platform && + (target->GetType() == cmTarget::SHARED_LIBRARY || + target->IsExecutableWithExports()) && + mf->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX")) + { + std::string prop = "IMPORTED_IMPLIB"; + prop += suffix; + std::string value = target->GetFullPath(config, true); + properties[prop] = value; + } +} + +//---------------------------------------------------------------------------- +void +cmExportBuildFileGenerator +::ComplainAboutMissingTarget(cmTarget* depender, + cmTarget* dependee) +{ + if(!this->ExportCommand || !this->ExportCommand->ErrorMessage.empty()) + { + return; + } + + cmOStringStream e; + e << "called with target \"" << depender->GetName() + << "\" which requires target \"" << dependee->GetName() + << "\" that is not in the export list.\n" + << "If the required target is not easy to reference in this call, " + << "consider using the APPEND option with multiple separate calls."; + this->ExportCommand->ErrorMessage = e.str(); +} diff --git a/Source/cmExportBuildFileGenerator.h b/Source/cmExportBuildFileGenerator.h new file mode 100644 index 000000000..cacfd734b --- /dev/null +++ b/Source/cmExportBuildFileGenerator.h @@ -0,0 +1,66 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportBuildFileGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-01 13:56:00 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExportBuildFileGenerator_h +#define cmExportBuildFileGenerator_h + +#include "cmExportFileGenerator.h" + +class cmExportCommand; + +/** \class cmExportBuildFileGenerator + * \brief Generate a file exporting targets from a build tree. + * + * cmExportBuildFileGenerator generates a file exporting targets from + * a build tree. A single file exports information for all + * configurations built. + * + * This is used to implement the EXPORT() command. + */ +class cmExportBuildFileGenerator: public cmExportFileGenerator +{ +public: + cmExportBuildFileGenerator(); + + /** Set the list of targets to export. */ + void SetExports(std::vector const* exports) + { this->Exports = exports; } + + /** Set whether to append generated code to the output file. */ + void SetAppendMode(bool append) { this->AppendMode = append; } + + /** Set the command instance through which errors should be reported. */ + void SetCommand(cmExportCommand* cmd) { this->ExportCommand = cmd; } +protected: + // Implement virtual methods from the superclass. + virtual bool GenerateMainFile(std::ostream& os); + virtual void GenerateImportTargetsConfig(std::ostream& os, + const char* config, + std::string const& suffix); + virtual void ComplainAboutMissingTarget(cmTarget* depender, + cmTarget* dependee); + + /** Fill in properties indicating built file locations. */ + void SetImportLocationProperty(const char* config, + std::string const& suffix, + cmTarget* target, + ImportPropertyMap& properties); + + std::vector const* Exports; + cmExportCommand* ExportCommand; +}; + +#endif diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx new file mode 100644 index 000000000..b213ceb94 --- /dev/null +++ b/Source/cmExportCommand.cxx @@ -0,0 +1,186 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-06 19:20:35 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExportCommand.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmGeneratedFileStream.h" +#include "cmake.h" + +#include "cmExportBuildFileGenerator.h" + +cmExportCommand::cmExportCommand() +:cmCommand() +,ArgumentGroup() +,Targets(&Helper, "TARGETS") +,Append(&Helper, "APPEND", &ArgumentGroup) +,Namespace(&Helper, "NAMESPACE", &ArgumentGroup) +,Filename(&Helper, "FILE", &ArgumentGroup) +{ + // at first TARGETS + this->Targets.Follows(0); + // and after that the other options in any order + this->ArgumentGroup.Follows(&this->Targets); +} + + +// cmExportCommand +bool cmExportCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with too few arguments"); + return false; + } + + std::vector unknownArgs; + this->Helper.Parse(&args, &unknownArgs); + + if (!unknownArgs.empty()) + { + this->SetError("Unknown arguments."); + return false; + } + + if (this->Targets.WasFound() == false) + { + this->SetError("TARGETS option missing."); + return false; + } + + if(!this->Filename.WasFound()) + { + this->SetError("FILE option missing."); + return false; + } + + // Make sure the file has a .cmake extension. + if(cmSystemTools::GetFilenameLastExtension(this->Filename.GetCString()) + != ".cmake") + { + cmOStringStream e; + e << "FILE option given filename \"" << this->Filename.GetString() + << "\" which does not have an extension of \".cmake\".\n"; + this->SetError(e.str().c_str()); + return false; + } + + // Get the file to write. + std::string fname = this->Filename.GetString(); + if(cmSystemTools::FileIsFullPath(fname.c_str())) + { + if(!this->Makefile->CanIWriteThisFile(fname.c_str())) + { + cmOStringStream e; + e << "FILE option given filename \"" << fname + << "\" which is in the source tree.\n"; + this->SetError(e.str().c_str()); + return false; + } + } + else + { + // Interpret relative paths with respect to the current build dir. + fname = this->Makefile->GetCurrentOutputDirectory(); + fname += "/"; + fname += this->Filename.GetString(); + } + + // Collect the targets to be exported. + std::vector targets; + for(std::vector::const_iterator + currentTarget = this->Targets.GetVector().begin(); + currentTarget != this->Targets.GetVector().end(); + ++currentTarget) + { + if(cmTarget* target = + this->Makefile->GetLocalGenerator()-> + GetGlobalGenerator()->FindTarget(0, currentTarget->c_str())) + { + if((target->GetType() == cmTarget::EXECUTABLE) || + (target->GetType() == cmTarget::STATIC_LIBRARY) || + (target->GetType() == cmTarget::SHARED_LIBRARY) || + (target->GetType() == cmTarget::MODULE_LIBRARY)) + { + targets.push_back(target); + } + else + { + cmOStringStream e; + e << "given target \"" << *currentTarget + << "\" which is not an executable or library."; + this->SetError(e.str().c_str()); + return false; + } + } + else + { + cmOStringStream e; + e << "given target \"" << *currentTarget + << "\" which is not built by this project."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Setup export file generation. + cmExportBuildFileGenerator ebfg; + ebfg.SetExportFile(fname.c_str()); + ebfg.SetNamespace(this->Namespace.GetCString()); + ebfg.SetAppendMode(this->Append.IsEnabled()); + ebfg.SetExports(&targets); + ebfg.SetCommand(this); + + // Compute the set of configurations exported. + if(const char* types = + this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + std::vector configurationTypes; + cmSystemTools::ExpandListArgument(types, configurationTypes); + for(std::vector::const_iterator + ci = configurationTypes.begin(); + ci != configurationTypes.end(); ++ci) + { + ebfg.AddConfiguration(ci->c_str()); + } + } + else if(const char* config = + this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) + { + ebfg.AddConfiguration(config); + } + else + { + ebfg.AddConfiguration(""); + } + + // Generate the import file. + if(!ebfg.GenerateImportFile() && this->ErrorMessage.empty()) + { + this->SetError("could not write export file."); + return false; + } + + // Report generated error message if any. + if(!this->ErrorMessage.empty()) + { + this->SetError(this->ErrorMessage.c_str()); + return false; + } + + return true; +} diff --git a/Source/cmExportCommand.h b/Source/cmExportCommand.h new file mode 100644 index 000000000..4c13f75cb --- /dev/null +++ b/Source/cmExportCommand.h @@ -0,0 +1,104 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-30 22:25:52 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExportCommand_h +#define cmExportCommand_h + +#include "cmCommand.h" + +class cmExportBuildFileGenerator; + +/** \class cmExportLibraryDependenciesCommand + * \brief Add a test to the lists of tests to run. + * + * cmExportLibraryDependenciesCommand adds a test to the list of tests to run + * + */ +class cmExportCommand : public cmCommand +{ +public: + cmExportCommand(); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmExportCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "export";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Export targets from the build tree for use by outside projects."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " export(TARGETS [target1 [target2 [...]]] [NAMESPACE ]\n" + " [APPEND] FILE )\n" + "Create a file that may be included by outside projects to " + "import targets from the current project's build tree. " + "This is useful during cross-compiling to build utility executables " + "that can run on the host platform in one project and then import " + "them into another project being compiled for the target platform. " + "If the NAMESPACE option is given the string will be " + "prepended to all target names written to the file. " + "If the APPEND option is given the generated code will be appended " + "to the file instead of overwriting it. " + "If a library target is included in the export but " + "a target to which it links is not included the behavior is " + "unspecified." + "\n" + "The file created by this command is specific to the build tree and " + "should never be installed. " + "See the install(EXPORT) command to export targets from an " + "installation tree."; + } + + cmTypeMacro(cmExportCommand, cmCommand); + +private: + cmCommandArgumentGroup ArgumentGroup; + cmCAStringVector Targets; + cmCAEnabler Append; + cmCAString Namespace; + cmCAString Filename; + + friend class cmExportBuildFileGenerator; + std::string ErrorMessage; +}; + + +#endif diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx new file mode 100644 index 000000000..77d710316 --- /dev/null +++ b/Source/cmExportFileGenerator.cxx @@ -0,0 +1,405 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportFileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.11.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExportFileGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmVersion.h" + +#include + +//---------------------------------------------------------------------------- +cmExportFileGenerator::cmExportFileGenerator() +{ + this->AppendMode = false; +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::AddConfiguration(const char* config) +{ + this->Configurations.push_back(config); +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::SetExportFile(const char* mainFile) +{ + this->MainImportFile = mainFile; + this->FileDir = + cmSystemTools::GetFilenamePath(this->MainImportFile); + this->FileBase = + cmSystemTools::GetFilenameWithoutLastExtension(this->MainImportFile); + this->FileExt = + cmSystemTools::GetFilenameLastExtension(this->MainImportFile); +} + +//---------------------------------------------------------------------------- +bool cmExportFileGenerator::GenerateImportFile() +{ + // Open the output file to generate it. + cmsys::auto_ptr foutPtr; + if(this->AppendMode) + { + // Open for append. + cmsys::auto_ptr + ap(new std::ofstream(this->MainImportFile.c_str(), std::ios::app)); + foutPtr = ap; + } + else + { + // Generate atomically and with copy-if-different. + cmsys::auto_ptr + ap(new cmGeneratedFileStream(this->MainImportFile.c_str(), true)); + ap->SetCopyIfDifferent(true); + foutPtr = ap; + } + if(!foutPtr.get() || !*foutPtr) + { + std::string se = cmSystemTools::GetLastSystemError(); + cmOStringStream e; + e << "cannot write to file \"" << this->MainImportFile + << "\": " << se; + cmSystemTools::Error(e.str().c_str()); + return false; + } + std::ostream& os = *foutPtr; + + // Protect that file against use with older CMake versions. + os << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; + os << "IF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n" + << " MESSAGE(FATAL_ERROR \"CMake >= 2.6.0 required\")\n" + << "ENDIF(\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" LESS 2.5)\n"; + + // Isolate the file policy level. + // We use 2.6 here instead of the current version because newer + // versions of CMake should be able to export files imported by 2.6 + // until the import format changes. + os << "CMAKE_POLICY(PUSH)\n" + << "CMAKE_POLICY(VERSION 2.6)\n"; + + // Start with the import file header. + this->GenerateImportHeaderCode(os); + + // Create all the imported targets. + bool result = this->GenerateMainFile(os); + + // End with the import file footer. + this->GenerateImportFooterCode(os); + os << "CMAKE_POLICY(POP)\n"; + + return result; +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::GenerateImportConfig(std::ostream& os, + const char* config) +{ + // Construct the property configuration suffix. + std::string suffix = "_"; + if(config && *config) + { + suffix += cmSystemTools::UpperCase(config); + } + else + { + suffix += "NOCONFIG"; + } + + // Generate the per-config target information. + this->GenerateImportTargetsConfig(os, config, suffix); +} + +//---------------------------------------------------------------------------- +void +cmExportFileGenerator +::SetImportDetailProperties(const char* config, std::string const& suffix, + cmTarget* target, ImportPropertyMap& properties) +{ + // Get the makefile in which to lookup target information. + cmMakefile* mf = target->GetMakefile(); + + // Add the soname for unix shared libraries. + if(target->GetType() == cmTarget::SHARED_LIBRARY || + target->GetType() == cmTarget::MODULE_LIBRARY) + { + // Check whether this is a DLL platform. + bool dll_platform = + (mf->IsOn("WIN32") || mf->IsOn("CYGWIN") || mf->IsOn("MINGW")); + if(!dll_platform) + { + std::string soname = target->GetSOName(config); + std::string prop = "IMPORTED_SONAME"; + prop += suffix; + properties[prop] = soname; + } + } + + // Add the transitive link dependencies for this configuration. + if(cmTargetLinkInterface const* iface = + target->GetLinkInterface(config)) + { + // This target provides a link interface, so use it. + this->SetImportLinkProperty(suffix, target, + "IMPORTED_LINK_INTERFACE_LIBRARIES", + iface->Libraries, properties); + this->SetImportLinkProperty(suffix, target, + "IMPORTED_LINK_DEPENDENT_LIBRARIES", + iface->SharedDeps, properties); + } + else if(target->GetType() == cmTarget::STATIC_LIBRARY || + target->GetType() == cmTarget::SHARED_LIBRARY) + { + // The default link interface for static and shared libraries is + // their link implementation library list. + this->SetImportLinkProperties(config, suffix, target, properties); + } +} + +//---------------------------------------------------------------------------- +void +cmExportFileGenerator +::SetImportLinkProperties(const char* config, std::string const& suffix, + cmTarget* target, ImportPropertyMap& properties) +{ + // Compute which library configuration to link. + cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED; + if(config && cmSystemTools::UpperCase(config) == "DEBUG") + { + linkType = cmTarget::DEBUG; + } + + // Construct the list of libs linked for this configuration. + std::vector actual_libs; + cmTarget::LinkLibraryVectorType const& libs = + target->GetOriginalLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + // Skip entries that will resolve to the target itself, are empty, + // or are not meant for this configuration. + if(li->first == target->GetName() || li->first.empty() || + !(li->second == cmTarget::GENERAL || li->second == linkType)) + { + continue; + } + + // Store this entry. + actual_libs.push_back(li->first); + } + + // Store the entries in the property. + this->SetImportLinkProperty(suffix, target, + "IMPORTED_LINK_INTERFACE_LIBRARIES", + actual_libs, properties); +} + +//---------------------------------------------------------------------------- +void +cmExportFileGenerator +::SetImportLinkProperty(std::string const& suffix, + cmTarget* target, + const char* propName, + std::vector const& libs, + ImportPropertyMap& properties) +{ + // Skip the property if there are no libraries. + if(libs.empty()) + { + return; + } + + // Get the makefile in which to lookup target information. + cmMakefile* mf = target->GetMakefile(); + + // Construct the property value. + std::string link_libs; + const char* sep = ""; + for(std::vector::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + // Separate this from the previous entry. + link_libs += sep; + sep = ";"; + + // Append this entry. + if(cmTarget* tgt = mf->FindTargetToUse(li->c_str())) + { + // This is a target. + if(tgt->IsImported()) + { + // The target is imported (and therefore is not in the + // export). Append the raw name. + link_libs += *li; + } + else if(this->ExportedTargets.find(tgt) != this->ExportedTargets.end()) + { + // The target is in the export. Append it with the export + // namespace. + link_libs += this->Namespace; + link_libs += *li; + } + else + { + // The target is not in the export. + if(!this->AppendMode) + { + // We are not appending, so all exported targets should be + // known here. This is probably user-error. + this->ComplainAboutMissingTarget(target, tgt); + } + // Assume the target will be exported by another command. + // Append it with the export namespace. + link_libs += this->Namespace; + link_libs += *li; + } + } + else + { + // Append the raw name. + link_libs += *li; + } + } + + // Store the property. + std::string prop = propName; + prop += suffix; + properties[prop] = link_libs; +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::GenerateImportHeaderCode(std::ostream& os, + const char* config) +{ + os << "#----------------------------------------------------------------\n" + << "# Generated CMake target import file"; + if(config) + { + os << " for configuration \"" << config << "\".\n"; + } + else + { + os << ".\n"; + } + os << "#----------------------------------------------------------------\n" + << "\n"; + this->GenerateImportVersionCode(os); +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::GenerateImportFooterCode(std::ostream& os) +{ + os << "# Commands beyond this point should not need to know the version.\n" + << "SET(CMAKE_IMPORT_FILE_VERSION)\n"; +} + +//---------------------------------------------------------------------------- +void cmExportFileGenerator::GenerateImportVersionCode(std::ostream& os) +{ + // Store an import file format version. This will let us change the + // format later while still allowing old import files to work. + os << "# Commands may need to know the format version.\n" + << "SET(CMAKE_IMPORT_FILE_VERSION 1)\n" + << "\n"; +} + +//---------------------------------------------------------------------------- +void +cmExportFileGenerator +::GenerateImportTargetCode(std::ostream& os, cmTarget* target) +{ + // Construct the imported target name. + std::string targetName = this->Namespace; + targetName += target->GetName(); + + // Create the imported target. + os << "# Create imported target " << targetName << "\n"; + switch(target->GetType()) + { + case cmTarget::EXECUTABLE: + os << "ADD_EXECUTABLE(" << targetName << " IMPORTED)\n"; + break; + case cmTarget::STATIC_LIBRARY: + os << "ADD_LIBRARY(" << targetName << " STATIC IMPORTED)\n"; + break; + case cmTarget::SHARED_LIBRARY: + os << "ADD_LIBRARY(" << targetName << " SHARED IMPORTED)\n"; + break; + case cmTarget::MODULE_LIBRARY: + os << "ADD_LIBRARY(" << targetName << " MODULE IMPORTED)\n"; + break; + default: // should never happen + break; + } + + // Mark the imported executable if it has exports. + if(target->IsExecutableWithExports()) + { + os << "SET_PROPERTY(TARGET " << targetName + << " PROPERTY ENABLE_EXPORTS 1)\n"; + } + + // Mark the imported library if it is a framework. + if(target->IsFrameworkOnApple()) + { + os << "SET_PROPERTY(TARGET " << targetName + << " PROPERTY FRAMEWORK 1)\n"; + } + + // Mark the imported executable if it is an application bundle. + if(target->IsAppBundleOnApple()) + { + os << "SET_PROPERTY(TARGET " << targetName + << " PROPERTY MACOSX_BUNDLE 1)\n"; + } + os << "\n"; +} + +//---------------------------------------------------------------------------- +void +cmExportFileGenerator +::GenerateImportPropertyCode(std::ostream& os, const char* config, + cmTarget* target, + ImportPropertyMap const& properties) +{ + // Construct the imported target name. + std::string targetName = this->Namespace; + targetName += target->GetName(); + + // Set the import properties. + os << "# Import target \"" << targetName << "\" for configuration \"" + << config << "\"\n"; + os << "SET_PROPERTY(TARGET " << targetName + << " APPEND PROPERTY IMPORTED_CONFIGURATIONS "; + if(config && *config) + { + os << cmSystemTools::UpperCase(config); + } + else + { + os << "NOCONFIG"; + } + os << ")\n"; + os << "SET_TARGET_PROPERTIES(" << targetName << " PROPERTIES\n"; + for(ImportPropertyMap::const_iterator pi = properties.begin(); + pi != properties.end(); ++pi) + { + os << " " << pi->first << " \"" << pi->second << "\"\n"; + } + os << " )\n" + << "\n"; +} diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h new file mode 100644 index 000000000..c3fc85528 --- /dev/null +++ b/Source/cmExportFileGenerator.h @@ -0,0 +1,108 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportFileGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-01 13:56:00 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExportFileGenerator_h +#define cmExportFileGenerator_h + +#include "cmCommand.h" + +/** \class cmExportFileGenerator + * \brief Generate a file exporting targets from a build or install tree. + * + * cmExportFileGenerator is the superclass for + * cmExportBuildFileGenerator and cmExportInstallFileGenerator. It + * contains common code generation routines for the two kinds of + * export implementations. + */ +class cmExportFileGenerator +{ +public: + cmExportFileGenerator(); + virtual ~cmExportFileGenerator() {} + + /** Set the full path to the export file to generate. */ + void SetExportFile(const char* mainFile); + + /** Set the namespace in which to place exported target names. */ + void SetNamespace(const char* ns) { this->Namespace = ns; } + + /** Add a configuration to be exported. */ + void AddConfiguration(const char* config); + + /** Actually generate the export file. Returns whether there was an + error. */ + bool GenerateImportFile(); +protected: + + typedef std::map ImportPropertyMap; + + // Generate per-configuration target information to the given output + // stream. + void GenerateImportConfig(std::ostream& os, const char* config); + + // Methods to implement export file code generation. + void GenerateImportHeaderCode(std::ostream& os, const char* config = 0); + void GenerateImportFooterCode(std::ostream& os); + void GenerateImportVersionCode(std::ostream& os); + void GenerateImportTargetCode(std::ostream& os, cmTarget* target); + void GenerateImportPropertyCode(std::ostream& os, const char* config, + cmTarget* target, + ImportPropertyMap const& properties); + + // Collect properties with detailed information about targets beyond + // their location on disk. + void SetImportDetailProperties(const char* config, + std::string const& suffix, cmTarget* target, + ImportPropertyMap& properties); + void SetImportLinkProperties(const char* config, + std::string const& suffix, cmTarget* target, + ImportPropertyMap& properties); + void SetImportLinkProperty(std::string const& suffix, + cmTarget* target, const char* propName, + std::vector const& libs, + ImportPropertyMap& properties); + + /** Each subclass knows how to generate its kind of export file. */ + virtual bool GenerateMainFile(std::ostream& os) = 0; + + /** Each subclass knows where the target files are located. */ + virtual void GenerateImportTargetsConfig(std::ostream& os, + const char* config, + std::string const& suffix) = 0; + + /** Each subclass knows how to complain about a target that is + missing from an export set. */ + virtual void ComplainAboutMissingTarget(cmTarget* depender, + cmTarget* dependee) = 0; + + // The namespace in which the exports are placed in the generated file. + std::string Namespace; + + // The set of configurations to export. + std::vector Configurations; + + // The file to generate. + std::string MainImportFile; + std::string FileDir; + std::string FileBase; + std::string FileExt; + bool AppendMode; + + // The set of targets included in the export. + std::set ExportedTargets; +}; + +#endif diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx new file mode 100644 index 000000000..a6191cb1e --- /dev/null +++ b/Source/cmExportInstallFileGenerator.cxx @@ -0,0 +1,305 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportInstallFileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-06 19:20:35 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExportInstallFileGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmInstallExportGenerator.h" +#include "cmInstallTargetGenerator.h" + +//---------------------------------------------------------------------------- +cmExportInstallFileGenerator +::cmExportInstallFileGenerator(cmInstallExportGenerator* iegen): + InstallExportGenerator(iegen) +{ +} + +//---------------------------------------------------------------------------- +bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os) +{ + // Create all the imported targets. + for(std::vector::const_iterator + tei = this->ExportSet->begin(); + tei != this->ExportSet->end(); ++tei) + { + cmTargetExport* te = *tei; + if(this->ExportedTargets.insert(te->Target).second) + { + this->GenerateImportTargetCode(os, te->Target); + } + else + { + cmOStringStream e; + e << "INSTALL(EXPORT \"" << this->Name << "\" ...) " + << "includes target \"" << te->Target->GetName() + << "\" more than once in the export set."; + cmSystemTools::Error(e.str().c_str()); + return false; + } + } + + // Now load per-configuration properties for them. + os << "# Load information for each installed configuration.\n" + << "GET_FILENAME_COMPONENT(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" + << "FILE(GLOB CONFIG_FILES \"${_DIR}/" + << this->FileBase << "-*" << this->FileExt << "\")\n" + << "FOREACH(f ${CONFIG_FILES})\n" + << " INCLUDE(${f})\n" + << "ENDFOREACH(f)\n" + << "\n"; + + // Generate an import file for each configuration. + bool result = true; + for(std::vector::const_iterator + ci = this->Configurations.begin(); + ci != this->Configurations.end(); ++ci) + { + if(!this->GenerateImportFileConfig(ci->c_str())) + { + result = false; + } + } + return result; +} + +//---------------------------------------------------------------------------- +bool +cmExportInstallFileGenerator::GenerateImportFileConfig(const char* config) +{ + // Skip configurations not enabled for this export. + if(!this->InstallExportGenerator->InstallsForConfig(config)) + { + return true; + } + + // Construct the name of the file to generate. + std::string fileName = this->FileDir; + fileName += "/"; + fileName += this->FileBase; + fileName += "-"; + if(config && *config) + { + fileName += cmSystemTools::LowerCase(config); + } + else + { + fileName += "noconfig"; + } + fileName += this->FileExt; + + // Open the output file to generate it. + cmGeneratedFileStream exportFileStream(fileName.c_str(), true); + if(!exportFileStream) + { + std::string se = cmSystemTools::GetLastSystemError(); + cmOStringStream e; + e << "cannot write to file \"" << fileName.c_str() + << "\": " << se; + cmSystemTools::Error(e.str().c_str()); + return false; + } + std::ostream& os = exportFileStream; + + // Start with the import file header. + this->GenerateImportHeaderCode(os, config); + + // Generate the per-config target information. + this->GenerateImportConfig(os, config); + + // End with the import file footer. + this->GenerateImportFooterCode(os); + + // Record this per-config import file. + this->ConfigImportFiles[config] = fileName; + + return true; +} + +//---------------------------------------------------------------------------- +void +cmExportInstallFileGenerator +::GenerateImportTargetsConfig(std::ostream& os, + const char* config, std::string const& suffix) +{ + // Add code to compute the installation prefix relative to the + // import file location. + const char* installDest = this->InstallExportGenerator->GetDestination(); + if(!cmSystemTools::FileIsFullPath(installDest)) + { + std::string dest = installDest; + os << "# Compute the installation prefix relative to this file.\n" + << "GET_FILENAME_COMPONENT(_IMPORT_PREFIX " + << "\"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n"; + while(!dest.empty()) + { + os << + "GET_FILENAME_COMPONENT(_IMPORT_PREFIX \"${_IMPORT_PREFIX}\" PATH)\n"; + dest = cmSystemTools::GetFilenamePath(dest); + } + os << "\n"; + + // Import location properties may reference this variable. + this->ImportPrefix = "${_IMPORT_PREFIX}/"; + } + + // Add each target in the set to the export. + for(std::vector::const_iterator + tei = this->ExportSet->begin(); + tei != this->ExportSet->end(); ++tei) + { + // Collect import properties for this target. + cmTargetExport* te = *tei; + ImportPropertyMap properties; + this->SetImportLocationProperty(config, suffix, + te->ArchiveGenerator, properties); + this->SetImportLocationProperty(config, suffix, + te->LibraryGenerator, properties); + this->SetImportLocationProperty(config, suffix, + te->RuntimeGenerator, properties); + this->SetImportLocationProperty(config, suffix, + te->FrameworkGenerator, properties); + this->SetImportLocationProperty(config, suffix, + te->BundleGenerator, properties); + + // If any file location was set for the target add it to the + // import file. + if(!properties.empty()) + { + // Get the rest of the target details. + this->SetImportDetailProperties(config, suffix, + te->Target, properties); + + // TOOD: PUBLIC_HEADER_LOCATION + // This should wait until the build feature propagation stuff + // is done. Then this can be a propagated include directory. + // this->GenerateImportProperty(config, te->HeaderGenerator, + // properties); + + // Generate code in the export file. + this->GenerateImportPropertyCode(os, config, te->Target, properties); + } + } + + // Cleanup the import prefix variable. + if(!this->ImportPrefix.empty()) + { + os << "# Cleanup temporary variables.\n" + << "SET(_IMPORT_PREFIX)\n" + << "\n"; + } +} + +//---------------------------------------------------------------------------- +void +cmExportInstallFileGenerator +::SetImportLocationProperty(const char* config, std::string const& suffix, + cmInstallTargetGenerator* itgen, + ImportPropertyMap& properties) +{ + // Skip rules that do not match this configuration. + if(!(itgen && itgen->InstallsForConfig(config))) + { + return; + } + + // Get the target to be installed. + cmTarget* target = itgen->GetTarget(); + + // Construct the installed location of the target. + std::string dest = itgen->GetDestination(); + std::string value; + if(!cmSystemTools::FileIsFullPath(dest.c_str())) + { + // The target is installed relative to the installation prefix. + if(this->ImportPrefix.empty()) + { + this->ComplainAboutImportPrefix(itgen); + } + value = this->ImportPrefix; + } + value += dest; + value += "/"; + + if(itgen->IsImportLibrary()) + { + // Construct the property name. + std::string prop = "IMPORTED_IMPLIB"; + prop += suffix; + + // Append the installed file name. + value += itgen->GetInstallFilename(target, config, + cmInstallTargetGenerator::NameImplib); + + // Store the property. + properties[prop] = value; + } + else + { + // Construct the property name. + std::string prop = "IMPORTED_LOCATION"; + prop += suffix; + + // Append the installed file name. + if(target->IsFrameworkOnApple()) + { + value += itgen->GetInstallFilename(target, config); + value += ".framework/"; + value += itgen->GetInstallFilename(target, config); + } + else if(target->IsAppBundleOnApple()) + { + value += itgen->GetInstallFilename(target, config); + value += ".app/Contents/MacOS/"; + value += itgen->GetInstallFilename(target, config); + } + else + { + value += itgen->GetInstallFilename(target, config, + cmInstallTargetGenerator::NameReal); + } + + // Store the property. + properties[prop] = value; + } +} + +//---------------------------------------------------------------------------- +void +cmExportInstallFileGenerator +::ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen) +{ + const char* installDest = this->InstallExportGenerator->GetDestination(); + cmOStringStream e; + e << "INSTALL(EXPORT \"" << this->Name << "\") given absolute " + << "DESTINATION \"" << installDest << "\" but the export " + << "references an installation of target \"" + << itgen->GetTarget()->GetName() << "\" which has relative " + << "DESTINATION \"" << itgen->GetDestination() << "\"."; + cmSystemTools::Error(e.str().c_str()); +} + +//---------------------------------------------------------------------------- +void +cmExportInstallFileGenerator +::ComplainAboutMissingTarget(cmTarget* depender, cmTarget* dependee) +{ + cmOStringStream e; + e << "INSTALL(EXPORT \"" << this->Name << "\" ...) " + << "includes target \"" << depender->GetName() + << "\" which requires target \"" << dependee->GetName() + << "\" that is not in the export set."; + cmSystemTools::Error(e.str().c_str()); +} diff --git a/Source/cmExportInstallFileGenerator.h b/Source/cmExportInstallFileGenerator.h new file mode 100644 index 000000000..40a2fcfec --- /dev/null +++ b/Source/cmExportInstallFileGenerator.h @@ -0,0 +1,123 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportInstallFileGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-01 13:56:00 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExportInstallFileGenerator_h +#define cmExportInstallFileGenerator_h + +#include "cmExportFileGenerator.h" + +class cmInstallExportGenerator; +class cmInstallFilesGenerator; +class cmInstallTargetGenerator; +class cmTargetExport; + +/** \class cmExportInstallFileGenerator + * \brief Generate a file exporting targets from an install tree. + * + * cmExportInstallFileGenerator generates files exporting targets from + * install an installation tree. The files are placed in a temporary + * location for installation by cmInstallExportGenerator. One main + * file is generated that creates the imported targets and loads + * per-configuration files. Target locations and settings for each + * configuration are written to these per-configuration files. After + * installation the main file loads the configurations that have been + * installed. + * + * This is used to implement the INSTALL(EXPORT) command. + */ +class cmExportInstallFileGenerator: public cmExportFileGenerator +{ +public: + /** Construct with the export installer that will install the + files. */ + cmExportInstallFileGenerator(cmInstallExportGenerator* iegen); + + /** Set the name of the export associated with the files. This is + the name given to the install(EXPORT) command mode. */ + void SetName(const char* name) { this->Name = name; } + + /** Set the set of targets to be exported. These are the targets + associated with the export name. */ + void SetExportSet(std::vector const* eSet) + { this->ExportSet = eSet; } + + /** Get the per-config file generated for each configuraiton. This + maps from the configuration name to the file temporary location + for installation. */ + std::map const& GetConfigImportFiles() + { return this->ConfigImportFiles; } +protected: + + // Implement virtual methods from the superclass. + virtual bool GenerateMainFile(std::ostream& os); + virtual void GenerateImportTargetsConfig(std::ostream& os, + const char* config, + std::string const& suffix); + virtual void ComplainAboutMissingTarget(cmTarget* depender, + cmTarget* dependee); + + /** Generate a per-configuration file for the targets. */ + bool GenerateImportFileConfig(const char* config); + + /** Fill in properties indicating installed file locations. */ + void SetImportLocationProperty(const char* config, + std::string const& suffix, + cmInstallTargetGenerator* itgen, + ImportPropertyMap& properties); + + void ComplainAboutImportPrefix(cmInstallTargetGenerator* itgen); + + cmInstallExportGenerator* InstallExportGenerator; + std::string Name; + std::vector const* ExportSet; + + std::string ImportPrefix; + + // The import file generated for each configuration. + std::map ConfigImportFiles; +}; + +/* + cmTargetExport is used in cmGlobalGenerator to collect the install + generators for targets associated with an export. +*/ +class cmTargetExport +{ +public: + cmTargetExport(cmTarget* tgt, + cmInstallTargetGenerator* archive, + cmInstallTargetGenerator* runtime, + cmInstallTargetGenerator* library, + cmInstallTargetGenerator* framework, + cmInstallTargetGenerator* bundle, + cmInstallFilesGenerator* headers + ) : Target(tgt), ArchiveGenerator(archive), + RuntimeGenerator(runtime), LibraryGenerator(library), + FrameworkGenerator(framework), BundleGenerator(bundle), + HeaderGenerator(headers) {} + + cmTarget* Target; + cmInstallTargetGenerator* ArchiveGenerator; + cmInstallTargetGenerator* RuntimeGenerator; + cmInstallTargetGenerator* LibraryGenerator; + cmInstallTargetGenerator* FrameworkGenerator; + cmInstallTargetGenerator* BundleGenerator; + cmInstallFilesGenerator* HeaderGenerator; +private: + cmTargetExport(); +}; + +#endif diff --git a/Source/cmExportLibraryDependencies.cxx b/Source/cmExportLibraryDependencies.cxx new file mode 100644 index 000000000..ffd0ea110 --- /dev/null +++ b/Source/cmExportLibraryDependencies.cxx @@ -0,0 +1,209 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportLibraryDependencies.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.22.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExportLibraryDependencies.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmGeneratedFileStream.h" +#include "cmake.h" +#include "cmVersion.h" + +#include + +bool cmExportLibraryDependenciesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // store the arguments for the final pass + this->Filename = args[0]; + this->Append = false; + if(args.size() > 1) + { + if(args[1] == "APPEND") + { + this->Append = true; + } + } + return true; +} + + +void cmExportLibraryDependenciesCommand::FinalPass() +{ + // export_library_dependencies() shouldn't modify anything + // ensure this by calling a const method + this->ConstFinalPass(); +} + +void cmExportLibraryDependenciesCommand::ConstFinalPass() const +{ + // Use copy-if-different if not appending. + cmsys::auto_ptr foutPtr; + if(this->Append) + { + cmsys::auto_ptr ap( + new std::ofstream(this->Filename.c_str(), std::ios::app)); + foutPtr = ap; + } + else + { + cmsys::auto_ptr ap( + new cmGeneratedFileStream(this->Filename.c_str(), true)); + ap->SetCopyIfDifferent(true); + foutPtr = ap; + } + std::ostream& fout = *foutPtr.get(); + + if (!fout) + { + cmSystemTools::Error("Error Writing ", this->Filename.c_str()); + cmSystemTools::ReportLastSystemError(""); + return; + } + + // Collect dependency information about all library targets built in + // the project. + cmake* cm = this->Makefile->GetCMakeInstance(); + cmGlobalGenerator* global = cm->GetGlobalGenerator(); + const std::vector& locals = global->GetLocalGenerators(); + std::map libDepsOld; + std::map libDepsNew; + std::map libTypes; + for(std::vector::const_iterator i = locals.begin(); + i != locals.end(); ++i) + { + const cmLocalGenerator* gen = *i; + const cmTargets &tgts = gen->GetMakefile()->GetTargets(); + for(cmTargets::const_iterator l = tgts.begin(); + l != tgts.end(); ++l) + { + // Get the current target. + cmTarget const& target = l->second; + + // Skip non-library targets. + if(target.GetType() < cmTarget::STATIC_LIBRARY + || target.GetType() > cmTarget::MODULE_LIBRARY) + { + continue; + } + + // Construct the dependency variable name. + std::string targetEntry = target.GetName(); + targetEntry += "_LIB_DEPENDS"; + + // Construct the dependency variable value. It is safe to use + // the target GetLinkLibraries method here because this code is + // called at the end of configure but before generate so library + // dependencies have yet to be analyzed. Therefore the value + // will be the direct link dependencies. + std::string valueOld; + std::string valueNew; + cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); + li != libs.end(); ++li) + { + std::string ltVar = li->first; + ltVar += "_LINK_TYPE"; + std::string ltValue; + switch(li->second) + { + case cmTarget::GENERAL: + valueNew += "general;"; + ltValue = "general"; + break; + case cmTarget::DEBUG: + valueNew += "debug;"; + ltValue = "debug"; + break; + case cmTarget::OPTIMIZED: + valueNew += "optimized;"; + ltValue = "optimized"; + break; + } + std::string lib = li->first; + if(cmTarget* libtgt = global->FindTarget(0, lib.c_str())) + { + // Handle simple output name changes. This command is + // deprecated so we do not support full target name + // translation (which requires per-configuration info). + if(const char* outname = libtgt->GetProperty("OUTPUT_NAME")) + { + lib = outname; + } + } + valueOld += lib; + valueOld += ";"; + valueNew += lib; + valueNew += ";"; + + std::string& ltEntry = libTypes[ltVar]; + if(ltEntry.empty()) + { + ltEntry = ltValue; + } + else if(ltEntry != ltValue) + { + ltEntry = "general"; + } + } + libDepsNew[targetEntry] = valueNew; + libDepsOld[targetEntry] = valueOld; + } + } + + // Generate dependency information for both old and new style CMake + // versions. + const char* vertest = + "\"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}\" GREATER 2.4"; + fout << "# Generated by CMake " << cmVersion::GetCMakeVersion() << "\n\n"; + fout << "IF(" << vertest << ")\n"; + fout << " # Information for CMake 2.6 and above.\n"; + for(std::map::const_iterator + i = libDepsNew.begin(); + i != libDepsNew.end(); ++i) + { + if(!i->second.empty()) + { + fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + fout << "ELSE(" << vertest << ")\n"; + fout << " # Information for CMake 2.4 and lower.\n"; + for(std::map::const_iterator + i = libDepsOld.begin(); + i != libDepsOld.end(); ++i) + { + if(!i->second.empty()) + { + fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + for(std::map::const_iterator i = libTypes.begin(); + i != libTypes.end(); ++i) + { + if(i->second != "general") + { + fout << " SET(\"" << i->first << "\" \"" << i->second << "\")\n"; + } + } + fout << "ENDIF(" << vertest << ")\n"; + return; +} diff --git a/Source/cmExportLibraryDependencies.h b/Source/cmExportLibraryDependencies.h new file mode 100644 index 000000000..d3d6cf81d --- /dev/null +++ b/Source/cmExportLibraryDependencies.h @@ -0,0 +1,104 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExportLibraryDependencies.h,v $ + Language: C++ + Date: $Date: 2008-02-20 18:36:38 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExportLibraryDependenciesCommand_h +#define cmExportLibraryDependenciesCommand_h + +#include "cmCommand.h" + +/** \class cmExportLibraryDependenciesCommand + * \brief Add a test to the lists of tests to run. + * + * cmExportLibraryDependenciesCommand adds a test to the list of tests to run + * + */ +class cmExportLibraryDependenciesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmExportLibraryDependenciesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This is called at the end after all the information + * specified by the command is accumulated. + */ + virtual void FinalPass(); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "export_library_dependencies";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use INSTALL(EXPORT) or EXPORT command."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "This command generates an old-style library dependencies file. " + "Projects requiring CMake 2.6 or later should not use the command. " + "Use instead the install(EXPORT) command to help export targets " + "from an installation tree and the export() command to export targets " + "from a build tree.\n" + "The old-style library dependencies file does not take into account " + "per-configuration names of libraries or the LINK_INTERFACE_LIBRARIES " + "target property.\n" + " export_library_dependencies( [APPEND])\n" + "Create a file named that can be included into a CMake listfile " + "with the INCLUDE command. The file will contain a number of SET " + "commands that will set all the variables needed for library dependency " + "information. This should be the last command in the top level " + "CMakeLists.txt file of the project. If the APPEND option is " + "specified, the SET commands will be appended to the given file " + "instead of replacing it."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand); + +private: + std::string Filename; + bool Append; + void ConstFinalPass() const; +}; + + +#endif diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx new file mode 100644 index 000000000..7e6c9a482 --- /dev/null +++ b/Source/cmExprLexer.cxx @@ -0,0 +1,1934 @@ +#include "cmStandardIncludes.h" +#line 2 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" + +#line 4 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmExpr_yylex_init (yyscan_t* scanner); + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmExpr_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input + stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmExpr_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is + * not NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmExpr_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmExpr_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmExpr_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmExpr_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmExpr_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmExpr_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state , + yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 15 +#define YY_END_OF_BUFFER 16 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[23] = + { 0, + 0, 0, 16, 15, 6, 8, 13, 14, 4, 2, + 3, 5, 1, 15, 15, 9, 7, 10, 1, 11, + 12, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 3, 1, 4, + 5, 6, 7, 1, 8, 1, 9, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 1, 11, + 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 14, 1, 15, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[16] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int16_t yy_base[23] = + { 0, + 0, 0, 20, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 9, 7, 5, 21, 21, 21, 6, 21, + 21, 21 + } ; + +static yyconst flex_int16_t yy_def[23] = + { 0, + 22, 1, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 0 + } ; + +static yyconst flex_int16_t yy_nxt[37] = + { 0, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 21, 20, 19, 22, + 3, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22 + } ; + +static yyconst flex_int16_t yy_chk[37] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 19, 15, 14, 13, 3, + 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, + 22, 22, 22, 22, 22, 22 + } ; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +#line 2 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprLexer.cxx,v $ + Language: C++ + Date: $Date: 2007-09-24 15:16:13 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l + +Modify cmExprLexer.cxx: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmExpr_yyalloc, cmExpr_yyrealloc, cmExpr_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmExprLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmExprParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmExprParserTokens.h" + +/*--------------------------------------------------------------------------*/ +#line 518 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant + scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmExpr_yylex_destroy (yyscan_t yyscanner ); + +int cmExpr_yyget_debug (yyscan_t yyscanner ); + +void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); + +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_in (yyscan_t yyscanner ); + +void cmExpr_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_out (yyscan_t yyscanner ); + +void cmExpr_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmExpr_yyget_leng (yyscan_t yyscanner ); + +char *cmExpr_yyget_text (yyscan_t yyscanner ); + +int cmExpr_yyget_lineno (yyscan_t yyscanner ); + +void cmExpr_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); +#else +extern int cmExpr_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmExpr_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 86 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" + + +#line 736 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" + + if ( yyg->yy_init ) + { + yyg->yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmExpr_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmExpr_yy_load_buffer_state(yyscanner ); + } + + for(;;) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 21 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +YY_RULE_SETUP +#line 88 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ yylvalp->Number = atoi(yytext); return exp_NUMBER; } +case 2: +YY_RULE_SETUP +#line 90 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_PLUS; } +case 3: +YY_RULE_SETUP +#line 91 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_MINUS; } +case 4: +YY_RULE_SETUP +#line 92 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_TIMES; } +case 5: +YY_RULE_SETUP +#line 93 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_DIVIDE; } +case 6: +YY_RULE_SETUP +#line 94 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_MOD; } +case 7: +YY_RULE_SETUP +#line 95 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_OR; } +case 8: +YY_RULE_SETUP +#line 96 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_AND; } +case 9: +YY_RULE_SETUP +#line 97 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_XOR; } +case 10: +YY_RULE_SETUP +#line 98 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_NOT; } +case 11: +YY_RULE_SETUP +#line 99 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_SHIFTLEFT; } +case 12: +YY_RULE_SETUP +#line 100 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_SHIFTRIGHT; } +case 13: +YY_RULE_SETUP +#line 101 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_OPENPARENT; } +case 14: +YY_RULE_SETUP +#line 102 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +{ return exp_CLOSEPARENT; } +case 15: +YY_RULE_SETUP +#line 104 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" +ECHO; + YY_BREAK +#line 894 "/home/andy/vtk/CMake-bin/Source/cmExprLexer.cxx" +case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmExpr_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmExpr_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +return 0; /* this should not happen but it silences a warning*/ +} /* end of cmExpr_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + size_t nuto_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( nuto_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmExpr_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + nuto_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( nuto_read > YY_READ_BUF_SIZE ) + nuto_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, nuto_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmExpr_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was + reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 23 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 22); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmExpr_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmExpr_yywrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmExpr_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmExpr_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmExpr_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmExpr_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmExpr_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmExpr_yypop_buffer_state(); + * cmExpr_yypush_buffer_state(new_buffer); + */ + cmExpr_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmExpr_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmExpr_yywrap()) processing, but the only time this flag + * is looked at is after cmExpr_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmExpr_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmExpr_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmExpr_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmExpr_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmExpr_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmExpr_yyfree((void *) b ,yyscanner ); +} + +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmExpr_yyrestart() or at EOF. + */ + static void cmExpr_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmExpr_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmExpr_yy_init_buffer was _probably_ + * called from cmExpr_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmExpr_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmExpr_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmExpr_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmExpr_yy_switch_to_buffer. */ + cmExpr_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmExpr_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmExpr_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmExpr_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int nuto_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + nuto_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyalloc + (nuto_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + memset(yyg->yy_buffer_stack, 0, nuto_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = nuto_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + nuto_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmExpr_yyrealloc + (yyg->yy_buffer_stack, + nuto_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = nuto_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) cmExpr_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmExpr_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmExpr_yylex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * @param yy_str a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmExpr_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) +{ + + return cmExpr_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmExpr_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) cmExpr_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmExpr_yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmExpr_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmExpr_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmExpr_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmExpr_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmExpr_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmExpr_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmExpr_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmExpr_yyset_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmExpr_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmExpr_yy_switch_to_buffer + */ +void cmExpr_yyset_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void cmExpr_yyset_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int cmExpr_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmExpr_yyset_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + This function is called once per scanner lifetime. */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 1; + yyg->yy_start = 0; + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = (int *) 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmExpr_yylex_init() + */ + return 0; +} + +/* User-visible API */ + +/* cmExpr_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmExpr_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmExpr_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + memset(*ptr_yy_globals,0,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmExpr_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmExpr_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmExpr_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmExpr_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmExpr_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmExpr_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Destroy the main struct (reentrant only). */ + cmExpr_yyfree ( yyscanner , yyscanner ); + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmExpr_yyalloc (yy_size_t size , yyscan_t) +{ + return (void *) malloc( size ); +} + +void *cmExpr_yyrealloc (void * ptr, yy_size_t size , yyscan_t) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void cmExpr_yyfree (void * ptr , yyscan_t) +{ + free( (char *) ptr ); /* see cmExpr_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif +#line 104 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l" + + + diff --git a/Source/cmExprLexer.h b/Source/cmExprLexer.h new file mode 100644 index 000000000..fc0681dbb --- /dev/null +++ b/Source/cmExprLexer.h @@ -0,0 +1,339 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprLexer.h,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExpr_yyHEADER_H +#define cmExpr_yyHEADER_H 1 +#define cmExpr_yyIN_HEADER 1 + + + + + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmExpr_yylex_init (yyscan_t* scanner); + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +void cmExpr_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmExpr_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_create_buffer (FILE *file,int size , + yyscan_t yyscanner ); +void cmExpr_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmExpr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , + yyscan_t yyscanner ); +void cmExpr_yypop_buffer_state (yyscan_t yyscanner ); + +YY_BUFFER_STATE cmExpr_yy_scan_buffer (char *base,yy_size_t size , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_string (yyconst char *yy_str , + yyscan_t yyscanner ); +YY_BUFFER_STATE cmExpr_yy_scan_bytes (yyconst char *bytes,int len , + yyscan_t yyscanner ); + +void *cmExpr_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmExpr_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmExpr_yyfree (void * ,yyscan_t yyscanner ); + +/* Begin user sect3 */ + +#define cmExpr_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +#define yytext_ptr yytext_r + +#ifdef YY_HEADER_EXPORT_START_CONDITIONS +#define INITIAL 0 + +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmExpr_yylex_destroy (yyscan_t yyscanner ); + +int cmExpr_yyget_debug (yyscan_t yyscanner ); + +void cmExpr_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmExpr_yyget_extra (yyscan_t yyscanner ); + +void cmExpr_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_in (yyscan_t yyscanner ); + +void cmExpr_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmExpr_yyget_out (yyscan_t yyscanner ); + +void cmExpr_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmExpr_yyget_leng (yyscan_t yyscanner ); + +char *cmExpr_yyget_text (yyscan_t yyscanner ); + +int cmExpr_yyget_lineno (yyscan_t yyscanner ); + +void cmExpr_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmExpr_yywrap (yyscan_t yyscanner ); +#else +extern int cmExpr_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmExpr_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmExpr_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* yy_get_previous_state - get the state just before the EOB char was + reached */ + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif + + + + +#undef cmExpr_yyIN_HEADER +#endif /* cmExpr_yyHEADER_H */ diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l new file mode 100644 index 000000000..ff4d9d79f --- /dev/null +++ b/Source/cmExprLexer.in.l @@ -0,0 +1,78 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprLexer.in.l,v $ + Language: C++ + Date: $Date: 2006-08-08 18:00:28 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmExpr_yy --header-file=cmExprLexer.h -ocmExprLexer.cxx cmExprLexer.in.l + +Modify cmExprLexer.cxx: + - remove TABs + - remove "yyscanner" argument from these methods: + yy_fatal_error, cmExpr_yyalloc, cmExpr_yyrealloc, cmExpr_yyfree + - remove all YY_BREAK lines occurring right after return statements + - change while ( 1 ) to for(;;) + +Modify cmExprLexer.h: + - remove TABs + - remove the yy_init_globals function + - remove the block that includes unistd.h + - remove #line directives (avoids bogus warning on old Sun) + +*/ + +#include "cmStandardLexer.h" + +#include "cmExprParserHelper.h" + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = yyextra->LexInput(buf, max_size); } + +/* Include the set of tokens from the parser. */ +#include "cmExprParserTokens.h" + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option noyywrap +%pointer + +%% + +[0-9][0-9]* { yylvalp->Number = atoi(yytext); return exp_NUMBER; } + +"+" { return exp_PLUS; } +"-" { return exp_MINUS; } +"*" { return exp_TIMES; } +"/" { return exp_DIVIDE; } +"%" { return exp_MOD; } +"\|" { return exp_OR; } +"&" { return exp_AND; } +"^" { return exp_XOR; } +"~" { return exp_NOT; } +"<<" { return exp_SHIFTLEFT; } +">>" { return exp_SHIFTRIGHT; } +"(" { return exp_OPENPARENT; } +")" { return exp_CLOSEPARENT; } + +%% diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx new file mode 100644 index 000000000..86ee6319a --- /dev/null +++ b/Source/cmExprParser.cxx @@ -0,0 +1,1438 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Written by Richard Stallman by simplifying the original so called + ``semantic'' parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* turn off some warning as this is generated code */ +#if defined(_MSC_VER) +# pragma warning ( disable : 4702 ) /* unreachable code */ +#endif + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* If NAME_PREFIX is specified substitute the variables and functions + names. */ +#define yyparse cmExpr_yyparse +#define yylex cmExpr_yylex +#define yyerror cmExpr_yyerror +#define yylval cmExpr_yylval +#define yychar cmExpr_yychar +#define yydebug cmExpr_yydebug +#define yynerrs cmExpr_yynerrs + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; +#endif +#define exp_PLUS 258 +#define exp_MINUS 259 +#define exp_TIMES 260 +#define exp_DIVIDE 261 +#define exp_MOD 262 +#define exp_SHIFTLEFT 263 +#define exp_SHIFTRIGHT 264 +#define exp_OPENPARENT 265 +#define exp_CLOSEPARENT 266 +#define exp_OR 267 +#define exp_AND 268 +#define exp_XOR 269 +#define exp_NOT 270 +#define exp_NUMBER 271 + + + + +/* Copy the first part of user declarations. */ + + +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprParser.cxx,v $ + Language: C++ + Date: $Date: 2007-03-05 15:36:06 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h + -ocmExprParser.cxx cmExprParser.y + +Modify cmExprParser.cxx: + - remove TABs + - add __HP_aCC to the #if test for yyerrorlab warning suppression + +*/ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmExpr_yyerror(x) \ + cmExprError(yyscanner, x) +#define yyGetParser (cmExpr_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmExprParserHelper.h" /* Interface to parser object. */ +#include "cmExprLexer.h" /* Interface to lexer object. */ +#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +#include + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmExprError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +//#define YYMAXDEPTH 100000 +//#define YYINITDEPTH 10000 + + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but + no case. */ +#endif + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + +/* Copy the second part of user declarations. */ + + +/* Line 214 of yacc.c. */ + + +#if ! defined (yyoverflow) || YYERROR_VERBOSE + +# ifndef YYFREE +# define YYFREE free +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# endif + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# define YYSTACK_ALLOC alloca +# endif +# else +# if defined (alloca) || defined (_ALLOCA_H) +# define YYSTACK_ALLOC alloca +# else +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) +# else +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# endif +#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ + + +#if (! defined (yyoverflow) \ + && (! defined (__cplusplus) \ + || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + short int yyss; + YYSTYPE yyvs; + }; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined (__GNUC__) && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + register YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (0) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack, Stack, yysize); \ + Stack = &yyptr->Stack; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) + +#endif + +#if defined (__STDC__) || defined (__cplusplus) + typedef signed char yysigned_char; +#else + typedef short int yysigned_char; +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 12 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 25 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 17 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 9 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 20 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 34 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 271 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const unsigned char yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const unsigned char yyprhs[] = +{ + 0, 0, 3, 5, 7, 11, 13, 17, 19, 23, + 25, 29, 33, 35, 39, 43, 45, 49, 53, 57, + 59 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yysigned_char yyrhs[] = +{ + 18, 0, -1, 19, -1, 20, -1, 19, 12, 20, + -1, 21, -1, 20, 14, 21, -1, 22, -1, 21, + 13, 22, -1, 23, -1, 22, 8, 23, -1, 22, + 9, 23, -1, 24, -1, 23, 3, 24, -1, 23, + 4, 24, -1, 25, -1, 24, 5, 25, -1, 24, + 6, 25, -1, 24, 7, 25, -1, 16, -1, 10, + 19, 11, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const unsigned char yyrline[] = +{ + 0, 94, 94, 100, 103, 107, 110, 114, 117, 121, + 124, 127, 132, 135, 138, 142, 145, 148, 151, 155, + 158 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE +/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "exp_PLUS", "exp_MINUS", "exp_TIMES", + "exp_DIVIDE", "exp_MOD", "exp_SHIFTLEFT", "exp_SHIFTRIGHT", + "exp_OPENPARENT", "exp_CLOSEPARENT", "exp_OR", "exp_AND", "exp_XOR", + "exp_NOT", "exp_NUMBER", "$accept", "Start", "exp", "bitwiseor", + "bitwisexor", "bitwiseand", "shift", "term", "factor", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const unsigned short int yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const unsigned char yyr1[] = +{ + 0, 17, 18, 19, 19, 20, 20, 21, 21, 22, + 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, + 25 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const unsigned char yyr2[] = +{ + 0, 2, 1, 1, 3, 1, 3, 1, 3, 1, + 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, + 3 +}; + +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const unsigned char yydefact[] = +{ + 0, 0, 19, 0, 2, 3, 5, 7, 9, 12, + 15, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 20, 4, 6, 8, 10, 11, 13, + 14, 16, 17, 18 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yysigned_char yydefgoto[] = +{ + -1, 3, 4, 5, 6, 7, 8, 9, 10 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -14 +static const yysigned_char yypact[] = +{ + -10, -10, -14, 18, 7, 6, 8, 2, 1, -4, + -14, 3, -14, -10, -10, -10, -10, -10, -10, -10, + -10, -10, -10, -14, 6, 8, 2, 1, 1, -4, + -4, -14, -14, -14 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yysigned_char yypgoto[] = +{ + -14, -14, 21, 10, 11, 9, 0, -6, -13 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -1 +static const unsigned char yytable[] = +{ + 1, 20, 21, 22, 18, 19, 2, 31, 32, 33, + 16, 17, 29, 30, 23, 13, 27, 28, 12, 13, + 14, 15, 11, 24, 26, 25 +}; + +static const unsigned char yycheck[] = +{ + 10, 5, 6, 7, 3, 4, 16, 20, 21, 22, + 8, 9, 18, 19, 11, 12, 16, 17, 0, 12, + 14, 13, 1, 13, 15, 14 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const unsigned char yystos[] = +{ + 0, 10, 16, 18, 19, 20, 21, 22, 23, 24, + 25, 19, 0, 12, 14, 13, 8, 9, 3, 4, + 5, 6, 7, 11, 20, 21, 22, 23, 23, 24, + 24, 25, 25, 25 +}; + +#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) +# define YYSIZE_T __SIZE_TYPE__ +#endif +#if ! defined (YYSIZE_T) && defined (size_t) +# define YYSIZE_T size_t +#endif +#if ! defined (YYSIZE_T) +# if defined (__STDC__) || defined (__cplusplus) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# endif +#endif +#if ! defined (YYSIZE_T) +# define YYSIZE_T unsigned int +#endif + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ + +#define YYFAIL goto yyerrlab + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { \ + yyerror ("syntax error: cannot back up");\ + YYERROR; \ + } \ +while (0) + +#define YYTERROR 1 +#define YYERRCODE 256 + +/* YYLLOC_DEFAULT -- Compute the default location (before the actions + are run). */ + +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + ((Current).first_line = (Rhs)[1].first_line, \ + (Current).first_column = (Rhs)[1].first_column, \ + (Current).last_line = (Rhs)[N].last_line, \ + (Current).last_column = (Rhs)[N].last_column) +#endif + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (&yylval, YYLEX_PARAM) +#else +# define YYLEX yylex (&yylval) +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +# define YYDSYMPRINT(Args) \ +do { \ + if (yydebug) \ + yysymprint Args; \ +} while (0) + +# define YYDSYMPRINTF(Title, Token, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yysymprint (stderr, \ + Token, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_stack_print (short int *bottom, short int *top) +#else +static void +yy_stack_print (bottom, top) + short int *bottom; + short int *top; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (/* Nothing. */; bottom <= top; ++bottom) + YYFPRINTF (stderr, " %d", *bottom); + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yy_reduce_print (int yyrule) +#else +static void +yy_reduce_print (yyrule) + int yyrule; +#endif +{ + int yyi; + unsigned int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", + yyrule - 1, yylno); + /* Print the symbols being reduced, and their result. */ + for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) + YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); + YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (Rule); \ +} while (0) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YYDSYMPRINT(Args) +# define YYDSYMPRINTF(Title, Token, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0 +# undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined (__GLIBC__) && defined (_STRING_H) +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +static YYSIZE_T +# if defined (__STDC__) || defined (__cplusplus) +yystrlen (const char *yystr) +# else +yystrlen (yystr) + const char *yystr; +# endif +{ + register const char *yys = yystr; + + while (*yys++ != '\0') + continue; + + return yys - yystr - 1; +} +# endif +# endif + +# ifndef yystpcpy +# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +static char * +# if defined (__STDC__) || defined (__cplusplus) +yystpcpy (char *yydest, const char *yysrc) +# else +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +# endif +{ + register char *yyd = yydest; + register const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +#endif /* !YYERROR_VERBOSE */ + + + +#if YYDEBUG +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) +#else +static void +yysymprint (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + if (yytype < YYNTOKENS) + { + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); +# ifdef YYPRINT + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# endif + } + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + switch (yytype) + { + default: + break; + } + YYFPRINTF (yyoutput, ")"); +} + +#endif /* ! YYDEBUG */ +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +#if defined (__STDC__) || defined (__cplusplus) +static void +yydestruct (int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yytype, yyvaluep) + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + /* Pacify ``unused variable'' warnings. */ + (void) yyvaluep; + + switch (yytype) + { + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM); +# else +int yyparse (); +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + + + + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +# if defined (__STDC__) || defined (__cplusplus) +int yyparse (void *YYPARSE_PARAM) +# else +int yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +# endif +#else /* ! YYPARSE_PARAM */ +#if defined (__STDC__) || defined (__cplusplus) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + /* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + register int yystate; + register int yyn; + int yyresult; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + /* Lookahead token as an internal (translated) token number. */ + int yytoken = 0; + + /* Three stacks and their tools: + `yyss': related to states, + `yyvs': related to semantic values, + `yyls': related to locations. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + short int yyssa[YYINITDEPTH]; + short int *yyss = yyssa; + register short int *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs = yyvsa; + register YYSTYPE *yyvsp; + + + +#define YYPOPSTACK (yyvsp--, yyssp--) + + YYSIZE_T yystacksize = YYINITDEPTH; + + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + + + /* When reducing, the number of symbols on the RHS of the reduced + rule. */ + int yylen; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + + yyssp = yyss; + yyvsp = yyvs; + + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. so pushing a state here evens the stacks. + */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + short int *yyss1 = yyss; + + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow ("parser stack overflow", + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyoverflowlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyoverflowlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + short int *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyoverflowlab; + YYSTACK_RELOCATE (yyss); + YYSTACK_RELOCATE (yyvs); + +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + +/* Do appropriate processing given the current state. */ +/* Read a lookahead token if we need one and don't already have one. */ +/* yyresume: */ + + /* First try to decide what to do without reference to lookahead token. */ + + yyn = yypact[yystate]; + if (yyn == YYPACT_NINF) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yyn == 0 || yyn == YYTABLE_NINF) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + if (yyn == YYFINAL) + YYACCEPT; + + /* Shift the lookahead token. */ + YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); + + /* Discard the token being shifted unless it is eof. */ + if (yychar != YYEOF) + yychar = YYEMPTY; + + *++yyvsp = yylval; + + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + yystate = yyn; + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 2: + + { + yyGetParser->SetResult(yyvsp[0].Number); +} + break; + + case 3: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 4: + + {yyval.Number = yyvsp[-2].Number | yyvsp[0].Number;} + break; + + case 5: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 6: + + {yyval.Number = yyvsp[-2].Number ^ yyvsp[0].Number;} + break; + + case 7: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 8: + + {yyval.Number = yyvsp[-2].Number & yyvsp[0].Number;} + break; + + case 9: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 10: + + {yyval.Number = yyvsp[-2].Number << yyvsp[0].Number;} + break; + + case 11: + + {yyval.Number = yyvsp[-2].Number >> yyvsp[0].Number;} + break; + + case 12: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 13: + + {yyval.Number = yyvsp[-2].Number + yyvsp[0].Number;} + break; + + case 14: + + {yyval.Number = yyvsp[-2].Number - yyvsp[0].Number;} + break; + + case 15: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 16: + + {yyval.Number = yyvsp[-2].Number * yyvsp[0].Number;} + break; + + case 17: + + {yyval.Number = yyvsp[-2].Number / yyvsp[0].Number;} + break; + + case 18: + + {yyval.Number = yyvsp[-2].Number % yyvsp[0].Number;} + break; + + case 19: + + {yyval.Number = yyvsp[0].Number;} + break; + + case 20: + + {yyval.Number = yyvsp[-1].Number;} + break; + + + } + +/* Line 1010 of yacc.c. */ + + + yyvsp -= yylen; + yyssp -= yylen; + + + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (YYPACT_NINF < yyn && yyn < YYLAST) + { + YYSIZE_T yysize = 0; + int yytype = YYTRANSLATE (yychar); + const char* yyprefix; + char *yymsg; + int yyx; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 0; + + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]); + yycount += 1; + if (yycount == 5) + { + yysize = 0; + break; + } + } + yysize += (sizeof ("syntax error, unexpected ") + + yystrlen (yytname[yytype])); + yymsg = (char *) YYSTACK_ALLOC (yysize); + if (yymsg != 0) + { + char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); + yyp = yystpcpy (yyp, yytname[yytype]); + + if (yycount < 5) + { + yyprefix = ", expecting "; + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + yyp = yystpcpy (yyp, yyprefix); + yyp = yystpcpy (yyp, yytname[yyx]); + yyprefix = " or "; + } + } + yyerror (yymsg); + YYSTACK_FREE (yymsg); + } + else + yyerror ("syntax error; also virtual memory exhausted"); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror ("syntax error"); + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* If at end of input, pop the error token, + then the rest of the stack, then return failure. */ + if (yychar == YYEOF) + for (;;) + { + YYPOPSTACK; + if (yyssp == yyss) + YYABORT; + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[*yyssp], yyvsp); + } + } + else + { + YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); + yydestruct (yytoken, &yylval); + yychar = YYEMPTY; + + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + +#if defined( __GNUC__ ) || defined(__HP_aCC) + /* Pacify GCC when the user code never invokes YYERROR and the label + yyerrorlab therefore never appears in user code. */ + if (0) + goto yyerrorlab; +#endif + + yyvsp -= yylen; + yyssp -= yylen; + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); + yydestruct (yystos[yystate], yyvsp); + YYPOPSTACK; + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + if (yyn == YYFINAL) + YYACCEPT; + + YYDPRINTF ((stderr, "Shifting error token, ")); + + *++yyvsp = yylval; + + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#ifndef yyoverflow +/*----------------------------------------------. +| yyoverflowlab -- parser overflow comes here. | +`----------------------------------------------*/ +yyoverflowlab: + yyerror ("parser stack overflow"); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif + return yyresult; +} + + + + +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmExprError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} + + diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y new file mode 100644 index 000000000..864c02646 --- /dev/null +++ b/Source/cmExprParser.y @@ -0,0 +1,174 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprParser.y,v $ + Language: C++ + Date: $Date: 2006-08-01 15:38:41 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run bison like this: + + bison --yacc --name-prefix=cmExpr_yy --defines=cmExprParserTokens.h -ocmExprParser.cxx cmExprParser.y + +Modify cmExprParser.cxx: + - remove TABs + - add __HP_aCC to the #if test for yyerrorlab warning suppression + +*/ + +/* Configure the parser to use a lexer object. */ +#define YYPARSE_PARAM yyscanner +#define YYLEX_PARAM yyscanner +#define YYERROR_VERBOSE 1 +#define cmExpr_yyerror(x) \ + cmExprError(yyscanner, x) +#define yyGetParser (cmExpr_yyget_extra(yyscanner)) + +/*-------------------------------------------------------------------------*/ +#include "cmExprParserHelper.h" /* Interface to parser object. */ +#include "cmExprLexer.h" /* Interface to lexer object. */ +#include "cmExprParserTokens.h" /* Need YYSTYPE for YY_DECL. */ + +#include + +/* Forward declare the lexer entry point. */ +YY_DECL; + +/* Internal utility functions. */ +static void cmExprError(yyscan_t yyscanner, const char* message); + +#define YYDEBUG 1 +//#define YYMAXDEPTH 100000 +//#define YYINITDEPTH 10000 + + +/* Disable some warnings in the generated code. */ +#ifdef __BORLANDC__ +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8060 /* possibly incorrect assignment */ +# pragma warn -8066 /* unreachable code */ +#endif +#ifdef _MSC_VER +# pragma warning (disable: 4102) /* Unused goto label. */ +# pragma warning (disable: 4065) /* Switch statement contains default but no case. */ +#endif +%} + +/* Generate a reentrant parser object. */ +%pure_parser + +/*-------------------------------------------------------------------------*/ +/* Tokens */ +%token exp_PLUS +%token exp_MINUS +%token exp_TIMES +%token exp_DIVIDE +%token exp_MOD +%token exp_SHIFTLEFT +%token exp_SHIFTRIGHT +%token exp_OPENPARENT +%token exp_CLOSEPARENT +%token exp_OR; +%token exp_AND; +%token exp_XOR; +%token exp_NOT; +%token exp_NUMBER; + +/*-------------------------------------------------------------------------*/ +/* grammar */ +%% + + +Start: +exp +{ + yyGetParser->SetResult($1); +} + +exp: +bitwiseor +{$$ = $1;} +| +exp exp_OR bitwiseor +{$$ = $1 | $3;} + +bitwiseor: +bitwisexor +{$$ = $1;} +| +bitwiseor exp_XOR bitwisexor +{$$ = $1 ^ $3;} + +bitwisexor: +bitwiseand +{$$ = $1;} +| +bitwisexor exp_AND bitwiseand +{$$ = $1 & $3;} + +bitwiseand: +shift +{$$ = $1;} +| +bitwiseand exp_SHIFTLEFT shift +{$$ = $1 << $3;} +| +bitwiseand exp_SHIFTRIGHT shift +{$$ = $1 >> $3;} + + +shift: +term +{$$ = $1;} +| +shift exp_PLUS term +{$$ = $1 + $3;} +| +shift exp_MINUS term +{$$ = $1 - $3;} + +term: +factor +{$$ = $1;} +| +term exp_TIMES factor +{$$ = $1 * $3;} +| +term exp_DIVIDE factor +{$$ = $1 / $3;} +| +term exp_MOD factor +{$$ = $1 % $3;} + +factor: +exp_NUMBER +{$$ = $1;} +| +exp_OPENPARENT exp exp_CLOSEPARENT +{$$ = $2;} +; + + +%% +/* End of grammar */ + +/*--------------------------------------------------------------------------*/ +void cmExprError(yyscan_t yyscanner, const char* message) +{ + yyGetParser->Error(message); +} + diff --git a/Source/cmExprParserHelper.cxx b/Source/cmExprParserHelper.cxx new file mode 100644 index 000000000..1ba261383 --- /dev/null +++ b/Source/cmExprParserHelper.cxx @@ -0,0 +1,123 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprParserHelper.cxx,v $ + Language: C++ + Date: $Date: 2006-05-11 14:45:28 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmExprParserHelper.h" + +#include "cmSystemTools.h" +#include "cmExprLexer.h" + +#include "cmMakefile.h" + +int cmExpr_yyparse( yyscan_t yyscanner ); +// +cmExprParserHelper::cmExprParserHelper() +{ + this->FileLine = -1; + this->FileName = 0; +} + + +cmExprParserHelper::~cmExprParserHelper() +{ + this->CleanupParser(); +} + +void cmExprParserHelper::SetLineFile(long line, const char* file) +{ + this->FileLine = line; + this->FileName = file; +} + +int cmExprParserHelper::ParseString(const char* str, int verb) +{ + if ( !str) + { + return 0; + } + //printf("Do some parsing: %s\n", str); + + this->Verbose = verb; + this->InputBuffer = str; + this->InputBufferPos = 0; + this->CurrentLine = 0; + + this->Result = 0; + + yyscan_t yyscanner; + cmExpr_yylex_init(&yyscanner); + cmExpr_yyset_extra(this, yyscanner); + int res = cmExpr_yyparse(yyscanner); + cmExpr_yylex_destroy(yyscanner); + if ( res != 0 ) + { + //str << "CAL_Parser returned: " << res << std::endl; + //std::cerr << "When parsing: [" << str << "]" << std::endl; + return 0; + } + + this->CleanupParser(); + + if ( Verbose ) + { + std::cerr << "Expanding [" << str << "] produced: [" + << this->Result << "]" << std::endl; + } + return 1; +} + +void cmExprParserHelper::CleanupParser() +{ +} + +int cmExprParserHelper::LexInput(char* buf, int maxlen) +{ + //std::cout << "JPLexInput "; + //std::cout.write(buf, maxlen); + //std::cout << std::endl; + if ( maxlen < 1 ) + { + return 0; + } + if ( this->InputBufferPos < this->InputBuffer.size() ) + { + buf[0] = this->InputBuffer[ this->InputBufferPos++ ]; + if ( buf[0] == '\n' ) + { + this->CurrentLine ++; + } + return(1); + } + else + { + buf[0] = '\n'; + return( 0 ); + } +} + +void cmExprParserHelper::Error(const char* str) +{ + unsigned long pos = static_cast(this->InputBufferPos); + cmOStringStream ostr; + ostr << str << " (" << pos << ")"; + this->ErrorString = ostr.str(); +} + +void cmExprParserHelper::SetResult(int value) +{ + this->Result = value; +} + + diff --git a/Source/cmExprParserHelper.h b/Source/cmExprParserHelper.h new file mode 100644 index 000000000..5679e1e12 --- /dev/null +++ b/Source/cmExprParserHelper.h @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExprParserHelper.h,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:01 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExprParserHelper_h +#define cmExprParserHelper_h + +#include "cmStandardIncludes.h" + +#define YYSTYPE cmExprParserHelper::ParserType +#define YYSTYPE_IS_DECLARED +#define YY_EXTRA_TYPE cmExprParserHelper* +#define YY_DECL int cmExpr_yylex(YYSTYPE* yylvalp, yyscan_t yyscanner) + +/** \class cmExprParserHelper + * \brief Helper class for parsing java source files + * + * Finds dependencies for java file and list of outputs + */ + +class cmMakefile; + +class cmExprParserHelper +{ +public: + typedef struct { + int Number; + } ParserType; + + cmExprParserHelper(); + ~cmExprParserHelper(); + + int ParseString(const char* str, int verb); + + int LexInput(char* buf, int maxlen); + void Error(const char* str); + + void SetResult(int value); + + int GetResult() { return this->Result; } + + void SetLineFile(long line, const char* file); + + const char* GetError() { return this->ErrorString.c_str(); } + +private: + cmStdString::size_type InputBufferPos; + cmStdString InputBuffer; + std::vector OutputBuffer; + int CurrentLine; + int UnionsAvailable; + int Verbose; + + void Print(const char* place, const char* str); + + void CleanupParser(); + + int Result; + const char* FileName; + long FileLine; + std::string ErrorString; +}; + +#endif + + + diff --git a/Source/cmExprParserTokens.h b/Source/cmExprParserTokens.h new file mode 100644 index 000000000..0309c09a1 --- /dev/null +++ b/Source/cmExprParserTokens.h @@ -0,0 +1,76 @@ +/* A Bison parser, made by GNU Bison 1.875d. */ + +/* Skeleton parser for Yacc-like parsing with Bison, Copyright (C) 1984, + 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + exp_PLUS = 258, + exp_MINUS = 259, + exp_TIMES = 260, + exp_DIVIDE = 261, + exp_MOD = 262, + exp_SHIFTLEFT = 263, + exp_SHIFTRIGHT = 264, + exp_OPENPARENT = 265, + exp_CLOSEPARENT = 266, + exp_OR = 267, + exp_AND = 268, + exp_XOR = 269, + exp_NOT = 270, + exp_NUMBER = 271 + }; +#endif +#define exp_PLUS 258 +#define exp_MINUS 259 +#define exp_TIMES 260 +#define exp_DIVIDE 261 +#define exp_MOD 262 +#define exp_SHIFTLEFT 263 +#define exp_SHIFTRIGHT 264 +#define exp_OPENPARENT 265 +#define exp_CLOSEPARENT 266 +#define exp_OR 267 +#define exp_AND 268 +#define exp_XOR 269 +#define exp_NOT 270 +#define exp_NUMBER 271 + + + + +#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) +typedef int YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +# define YYSTYPE_IS_TRIVIAL 1 +#endif + + + + + diff --git a/Source/cmExternalMakefileProjectGenerator.cxx b/Source/cmExternalMakefileProjectGenerator.cxx new file mode 100644 index 000000000..6d2377c02 --- /dev/null +++ b/Source/cmExternalMakefileProjectGenerator.cxx @@ -0,0 +1,70 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExternalMakefileProjectGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-07-03 20:10:50 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include + +#include "cmExternalMakefileProjectGenerator.h" + +std::string cmExternalMakefileProjectGenerator::CreateFullGeneratorName( + const char* globalGenerator, + const char* extraGenerator) +{ + std::string fullName; + if (globalGenerator) + { + if (extraGenerator && *extraGenerator) + { + fullName = extraGenerator; + fullName += " - "; + } + fullName += globalGenerator; + } + return fullName; +} + +const char* cmExternalMakefileProjectGenerator::GetGlobalGeneratorName( + const char* fullName) +{ + // at least one global generator must be supported + assert(!this->SupportedGlobalGenerators.empty()); + + if (fullName==0) + { + return 0; + } + + std::string currentName = fullName; + // if we get only the short name, take the first global generator as default + if (currentName == this->GetName()) + { + return this->SupportedGlobalGenerators[0].c_str(); + } + + // otherwise search for the matching global generator + for (std::vector::const_iterator + it = this->SupportedGlobalGenerators.begin(); + it != this->SupportedGlobalGenerators.end(); + ++it) + { + if (this->CreateFullGeneratorName(it->c_str(), this->GetName()) + == currentName) + { + return it->c_str(); + } + } + return 0; +} diff --git a/Source/cmExternalMakefileProjectGenerator.h b/Source/cmExternalMakefileProjectGenerator.h new file mode 100644 index 000000000..2ea53bcde --- /dev/null +++ b/Source/cmExternalMakefileProjectGenerator.h @@ -0,0 +1,75 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExternalMakefileProjectGenerator.h,v $ + Language: C++ + Date: $Date: 2007-06-13 16:52:29 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2007 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExternalMakefileProjectGenerator_h +#define cmExternalMakefileProjectGenerator_h + +#include "cmStandardIncludes.h" + +#include "cmDocumentation.h" + +class cmGlobalGenerator; + +/** \class cmExternalMakefileProjectGenerator + * \brief Base class for generators for "External Makefile based IDE projects". + * + * cmExternalMakefileProjectGenerator is a base class for generators + * for "external makefile based projects", i.e. IDE projects which work + * an already existing makefiles. + * See cmGlobalKdevelopGenerator as an example. + * After the makefiles have been generated by one of the Makefile + * generators, the Generate() method is called and this generator + * can iterate over the local generators and/or projects to produce the + * project files for the IDE. + */ +class cmExternalMakefileProjectGenerator +{ +public: + + virtual ~cmExternalMakefileProjectGenerator() {} + + ///! Get the name for this generator. + virtual const char* GetName() const = 0; + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry, + const char* fullName) const = 0; + + ///! set the global generator which will generate the makefiles + virtual void SetGlobalGenerator(cmGlobalGenerator* generator) + {this->GlobalGenerator = generator;} + + ///! Return the list of global generators supported by this extra generator + const std::vector& GetSupportedGlobalGenerators() const + {return this->SupportedGlobalGenerators;} + + ///! Get the name of the global generator for the given full name + const char* GetGlobalGeneratorName(const char* fullName); + /** Create a full name from the given global generator name and the + * extra generator name + */ + static std::string CreateFullGeneratorName(const char* globalGenerator, + const char* extraGenerator); + + ///! Generate the project files, the Makefiles have already been generated + virtual void Generate() = 0; +protected: + ///! Contains the names of the global generators support by this generator. + std::vector SupportedGlobalGenerators; + ///! the global generator which creates the makefiles + const cmGlobalGenerator* GlobalGenerator; +}; + +#endif diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx new file mode 100644 index 000000000..08869d651 --- /dev/null +++ b/Source/cmExtraCodeBlocksGenerator.cxx @@ -0,0 +1,440 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExtraCodeBlocksGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-11-25 12:45:18 $ + Version: $Revision: 1.18 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf neundorf@kde.org, All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmExtraCodeBlocksGenerator.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmake.h" +#include "cmSourceFile.h" +#include "cmGeneratedFileStream.h" +#include "cmTarget.h" +#include "cmSystemTools.h" + +#include + +/* Some useful URLs: +Homepage: +http://www.codeblocks.org + +File format docs: +http://wiki.codeblocks.org/index.php?title=File_formats_description +http://wiki.codeblocks.org/index.php?title=Workspace_file +http://wiki.codeblocks.org/index.php?title=Project_file + +Discussion: +http://forums.codeblocks.org/index.php/topic,6789.0.html +*/ + +//---------------------------------------------------------------------------- +void cmExtraCodeBlocksGenerator +::GetDocumentation(cmDocumentationEntry& entry, const char*) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates CodeBlocks project files."; + entry.Full = + "Project files for CodeBlocks will be created in the top directory " + "and in every subdirectory which features a CMakeLists.txt file " + "containing a PROJECT() call. " + "Additionally a hierarchy of makefiles is generated into the " + "build tree. The appropriate make program can build the project through " + "the default make target. A \"make install\" target is also provided."; +} + +cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator() +:cmExternalMakefileProjectGenerator() +{ +#if defined(_WIN32) + this->SupportedGlobalGenerators.push_back("MinGW Makefiles"); +// disable until somebody actually tests it: +// this->SupportedGlobalGenerators.push_back("NMake Makefiles"); +// this->SupportedGlobalGenerators.push_back("MSYS Makefiles"); +#endif + this->SupportedGlobalGenerators.push_back("Unix Makefiles"); +} + + +void cmExtraCodeBlocksGenerator::SetGlobalGenerator( + cmGlobalGenerator* generator) +{ + cmExternalMakefileProjectGenerator::SetGlobalGenerator(generator); + cmGlobalUnixMakefileGenerator3* mf = (cmGlobalUnixMakefileGenerator3*) + generator; + mf->SetToolSupportsColor(false); + mf->SetForceVerboseMakefiles(true); +} + +void cmExtraCodeBlocksGenerator::Generate() +{ + // for each sub project in the project create a codeblocks project + for (std::map >::const_iterator + it = this->GlobalGenerator->GetProjectMap().begin(); + it!= this->GlobalGenerator->GetProjectMap().end(); + ++it) + { + // create a project file + this->CreateProjectFile(it->second); + } +} + + +/* create the project file, if it already exists, merge it with the +existing one, otherwise create a new one */ +void cmExtraCodeBlocksGenerator::CreateProjectFile( + const std::vector& lgs) +{ + const cmMakefile* mf=lgs[0]->GetMakefile(); + std::string outputDir=mf->GetStartOutputDirectory(); + std::string projectDir=mf->GetHomeDirectory(); + std::string projectName=mf->GetProjectName(); + + std::string filename=outputDir+"/"; + filename+=projectName+".cbp"; + std::string sessionFilename=outputDir+"/"; + sessionFilename+=projectName+".layout"; + +/* if (cmSystemTools::FileExists(filename.c_str())) + { + this->MergeProjectFiles(outputDir, projectDir, filename, + cmakeFilePattern, sessionFilename); + } + else */ + { + this->CreateNewProjectFile(lgs, filename); + } + +} + + +void cmExtraCodeBlocksGenerator + ::CreateNewProjectFile(const std::vector& lgs, + const std::string& filename) +{ + const cmMakefile* mf=lgs[0]->GetMakefile(); + cmGeneratedFileStream fout(filename.c_str()); + if(!fout) + { + return; + } + + // figure out the compiler + std::string compiler = this->GetCBCompilerId(mf); + std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + + fout<<"\n" + "\n" + " \n" + " \n" + " \n" + "\n"; +} + + +// Generate the xml code for one target. +void cmExtraCodeBlocksGenerator::AppendTarget(cmGeneratedFileStream& fout, + const char* targetName, + cmTarget* target, + const char* make, + const cmMakefile* makefile, + const char* compiler) +{ + std::string makefileName = makefile->GetStartOutputDirectory(); + makefileName += "/Makefile"; + makefileName = cmSystemTools::ConvertToOutputPath(makefileName.c_str()); + + fout<<" \n"; + if (target!=0) + { + int cbTargetType = this->GetCBTargetType(target); + fout<<" \n"; + +} + + +// Translate the cmake compiler id into the CodeBlocks compiler id +std::string cmExtraCodeBlocksGenerator::GetCBCompilerId(const cmMakefile* mf) +{ + // figure out which language to use + // for now care only for C and C++ + std::string compilerIdVar = "CMAKE_CXX_COMPILER_ID"; + if (this->GlobalGenerator->GetLanguageEnabled("CXX") == false) + { + compilerIdVar = "CMAKE_C_COMPILER_ID"; + } + + std::string hostSystemName = mf->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME"); + std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME"); + std::string compilerId = mf->GetRequiredDefinition(compilerIdVar.c_str()); + std::string compiler = "gcc"; + if (compilerId == "MSVC") + { + compiler = "msvc"; + } + else if (compilerId == "Borland") + { + compiler = "bcc"; + } + else if (compilerId == "SDCC") + { + compiler = "sdcc"; + } + else if (compilerId == "Intel") + { + compiler = "icc"; + } + else if (compilerId == "Watcom") + { + compiler = "ow"; + } + else if (compilerId == "GNU") + { + compiler = "gcc"; + } + return compiler; +} + + +// Translate the cmake target type into the CodeBlocks target type id +int cmExtraCodeBlocksGenerator::GetCBTargetType(cmTarget* target) +{ + if ( target->GetType()==cmTarget::EXECUTABLE) + { + if ((target->GetPropertyAsBool("WIN32_EXECUTABLE")) + || (target->GetPropertyAsBool("MACOSX_BUNDLE"))) + { + return 0; + } + else + { + return 1; + } + } + else if ( target->GetType()==cmTarget::STATIC_LIBRARY) + { + return 2; + } + else if ((target->GetType()==cmTarget::SHARED_LIBRARY) + || (target->GetType()==cmTarget::MODULE_LIBRARY)) + { + return 3; + } + return 4; +} + +// Create the command line for building the given target using the selected +// make +std::string cmExtraCodeBlocksGenerator::BuildMakeCommand( + const std::string& make, const char* makefile, const char* target) +{ + std::string command = make; + if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0) + { + command += " /NOLOGO /f ""; + command += makefile; + command += "" "; + command += target; + } + else + { + command += " -f ""; + command += makefile; + command += "" "; + command += target; + } + return command; +} diff --git a/Source/cmExtraCodeBlocksGenerator.h b/Source/cmExtraCodeBlocksGenerator.h new file mode 100644 index 000000000..962d08e65 --- /dev/null +++ b/Source/cmExtraCodeBlocksGenerator.h @@ -0,0 +1,68 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExtraCodeBlocksGenerator.h,v $ + Language: C++ + Date: $Date: 2007-11-25 12:45:18 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExtraCodeBlocksGenerator_h +#define cmExtraCodeBlocksGenerator_h + +#include "cmExternalMakefileProjectGenerator.h" + +class cmLocalGenerator; +class cmMakefile; +class cmTarget; +class cmGeneratedFileStream; + +/** \class cmExtraCodeBlocksGenerator + * \brief Write CodeBlocks project files for Makefile based projects + * + * This generator is in early alpha stage. + */ +class cmExtraCodeBlocksGenerator : public cmExternalMakefileProjectGenerator +{ +public: + cmExtraCodeBlocksGenerator(); + virtual void SetGlobalGenerator(cmGlobalGenerator* generator); + + virtual const char* GetName() const + { return cmExtraCodeBlocksGenerator::GetActualName();} + static const char* GetActualName() { return "CodeBlocks";} + static cmExternalMakefileProjectGenerator* New() + { return new cmExtraCodeBlocksGenerator; } + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry, + const char* fullName) const; + + virtual void Generate(); +private: + + void CreateProjectFile(const std::vector& lgs); + + void CreateNewProjectFile(const std::vector& lgs, + const std::string& filename); + std::string GetCBCompilerId(const cmMakefile* mf); + int GetCBTargetType(cmTarget* target); + std::string BuildMakeCommand(const std::string& make, const char* makefile, + const char* target); + void AppendTarget(cmGeneratedFileStream& fout, + const char* targetName, + cmTarget* target, + const char* make, + const cmMakefile* makefile, + const char* compiler); + +}; + +#endif diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx new file mode 100644 index 000000000..d43fe7c88 --- /dev/null +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -0,0 +1,883 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExtraEclipseCDT4Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:48 $ + Version: $Revision: 1.13.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf neundorf@kde.org, All rights reserved. + Copyright (c) 2007 Miguel A. Figueroa-Villanueva. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmExtraEclipseCDT4Generator.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmGeneratedFileStream.h" +#include "cmTarget.h" + +#include "cmSystemTools.h" +#include +#include + +//---------------------------------------------------------------------------- +cmExtraEclipseCDT4Generator +::cmExtraEclipseCDT4Generator() : cmExternalMakefileProjectGenerator() +{ +// TODO: Verify if __CYGWIN__ should be checked. +//#if defined(_WIN32) && !defined(__CYGWIN__) +#if defined(_WIN32) + this->SupportedGlobalGenerators.push_back("NMake Makefiles"); + this->SupportedGlobalGenerators.push_back("MinGW Makefiles"); +// this->SupportedGlobalGenerators.push_back("MSYS Makefiles"); +#endif + this->SupportedGlobalGenerators.push_back("Unix Makefiles"); +} + +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator +::GetDocumentation(cmDocumentationEntry& entry, const char*) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Eclipse CDT 4.0 project files."; + entry.Full = + "Project files for Eclipse will be created in the top directory " + "and will have a linked resource to every subdirectory which " + "features a CMakeLists.txt file containing a PROJECT() call." + "Additionally a hierarchy of makefiles is generated into the " + "build tree. The appropriate make program can build the project through " + "the default make target. A \"make install\" target is also provided."; +} + +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator +::SetGlobalGenerator(cmGlobalGenerator* generator) +{ + cmExternalMakefileProjectGenerator::SetGlobalGenerator(generator); + cmGlobalUnixMakefileGenerator3* mf + = static_cast(generator); + mf->SetToolSupportsColor(true); + mf->SetForceVerboseMakefiles(true); + mf->EnableInstallTarget(); +} + +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator::Generate() +{ + const cmMakefile* mf + = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + + // TODO: Decide if these are local or member variables + this->HomeDirectory = mf->GetHomeDirectory(); + this->HomeOutputDirectory = mf->GetHomeOutputDirectory(); + + this->IsOutOfSourceBuild = (this->HomeDirectory!=this->HomeOutputDirectory); + + this->GenerateSourceProject = (this->IsOutOfSourceBuild && + mf->IsOn("ECLIPSE_CDT4_GENERATE_SOURCE_PROJECT")); + + // NOTE: This is not good, since it pollutes the source tree. However, + // Eclipse doesn't allow CVS/SVN to work when the .project is not in + // the cvs/svn root directory. Hence, this is provided as an option. + if (this->GenerateSourceProject) + { + // create .project file in the source tree + this->CreateSourceProjectFile(); + } + + // create a .project file + this->CreateProjectFile(); + + // create a .cproject file + this->CreateCProjectFile(); +} + +void cmExtraEclipseCDT4Generator::CreateSourceProjectFile() const +{ + assert(this->HomeDirectory != this->HomeOutputDirectory); + + // set up the project name: -Source@ + const cmMakefile* mf + = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + std::string name = this->GenerateProjectName(mf->GetProjectName(), "Source", + this->GetPathBasename(this->HomeDirectory)); + + const std::string filename = this->HomeDirectory + "/.project"; + cmGeneratedFileStream fout(filename.c_str()); + if (!fout) + { + return; + } + + fout << + "\n" + "\n" + "\t" << name << "\n" + "\t\n" + "\t\n" + "\t\n" + "\t\n" + "\t\n" + "\t\n" + "\t\n" + "\n" + ; +} + +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator::CreateProjectFile() +{ + const cmMakefile* mf + = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + + const std::string filename = this->HomeOutputDirectory + "/.project"; + + cmGeneratedFileStream fout(filename.c_str()); + if (!fout) + { + return; + } + + fout << + "\n" + "\n" + "\t" << + this->GenerateProjectName(mf->GetProjectName(), + mf->GetDefinition("CMAKE_BUILD_TYPE"), + this->GetPathBasename(this->HomeOutputDirectory)) + << "\n" + "\t\n" + "\t\n" + "\t\n" + "\t\n" + "\t\t\n" + "\t\t\torg.eclipse.cdt.make.core.makeBuilder\n" + "\t\t\tclean,full,incremental,\n" + "\t\t\t\n" + ; + + // use clean target + fout << + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.cleanBuildTarget\n" + "\t\t\t\t\tclean\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.enableCleanBuild\n" + "\t\t\t\t\ttrue\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.append_environment\n" + "\t\t\t\t\ttrue\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.stopOnError\n" + "\t\t\t\t\ttrue\n" + "\t\t\t\t\n" + ; + + // set the make command + std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + fout << + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.enabledIncrementalBuild\n" + "\t\t\t\t\ttrue\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.command\n" + "\t\t\t\t\t" + this->GetEclipsePath(make) + "\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.contents\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.activeConfigSettings\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.target.inc\n" + "\t\t\t\t\tall\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.arguments\n" + "\t\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.buildLocation\n" + "\t\t\t\t\t" + << this->GetEclipsePath(this->HomeOutputDirectory) << "\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.useDefaultBuildCmd\n" + "\t\t\t\t\tfalse\n" + "\t\t\t\t\n" + ; + + // set project specific environment + fout << + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.environment\n" + "\t\t\t\t\t" + ; + // set vsvars32.bat environment available at CMake time, + // but not necessarily when eclipse is open + if (make.find("nmake") != std::string::npos) + { + if (getenv("PATH")) + { + fout << "PATH=" << getenv("PATH") << "|"; + } + if (getenv("INCLUDE")) + { + fout << "INCLUDE=" << getenv("INCLUDE") << "|"; + } + if (getenv("LIB")) + { + fout << "LIB=" << getenv("LIB") << "|"; + } + if (getenv("LIBPATH")) + { + fout << "LIBPATH=" << getenv("LIBPATH") << "|"; + } + } + fout << + "\n" + "\t\t\t\t\n" + ; + + fout << + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.enableFullBuild\n" + "\t\t\t\t\ttrue\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.target.auto\n" + "\t\t\t\t\tall\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.enableAutoBuild\n" + "\t\t\t\t\tfalse\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.target.clean\n" + "\t\t\t\t\tclean\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.fullBuildTarget\n" + "\t\t\t\t\tall\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.buildArguments\n" + "\t\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.build.location\n" + "\t\t\t\t\t" + << this->GetEclipsePath(this->HomeOutputDirectory) << "\n" + "\t\t\t\t\n" + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.make.core.autoBuildTarget\n" + "\t\t\t\t\tall\n" + "\t\t\t\t\n" + ; + + // set error parsers + fout << + "\t\t\t\t\n" + "\t\t\t\t\torg.eclipse.cdt.core.errorOutputParser\n" + "\t\t\t\t\t" + ; + if (this->GetToolChainType(*mf) == EclipseToolchainOther) + { + fout << "org.eclipse.cdt.core.VCErrorParser;"; + } + fout << + "org.eclipse.cdt.core.MakeErrorParser;" + "org.eclipse.cdt.core.GCCErrorParser;" + "org.eclipse.cdt.core.GASErrorParser;" + "org.eclipse.cdt.core.GLDErrorParser;" + "\n" + "\t\t\t\t\n" + ; + + fout << + "\t\t\t\n" + "\t\t\n" + "\t\t\n" + "\t\t\torg.eclipse.cdt.make.core.ScannerConfigBuilder\n" + "\t\t\t\n" + "\t\t\t\n" + "\t\t\n" + "\t\n" + ; + + // set natures for c/c++ projects + fout << + "\t\n" + // TODO: ccnature only if it is c++ ??? + "\t\torg.eclipse.cdt.core.ccnature\n" + "\t\torg.eclipse.cdt.make.core.makeNature\n" + "\t\torg.eclipse.cdt.make.core.ScannerConfigNature\n" + "\t\torg.eclipse.cdt.core.cnature\n" + "\t\n" + ; + + // TODO: refactor this + // create linked resources + if (this->IsOutOfSourceBuild) + { + fout << "\t\n"; + // for each sub project create a linked resource to the source dir + // - only if it is an out-of-source build + for (std::map >::const_iterator + it = this->GlobalGenerator->GetProjectMap().begin(); + it != this->GlobalGenerator->GetProjectMap().end(); + ++it) + { + std::string linkSourceDirectory = this->GetEclipsePath( + it->second[0]->GetMakefile()->GetStartDirectory()); + // .project dir can't be subdir of a linked resource dir + if (!cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(), + linkSourceDirectory.c_str())) + { + this->AppendLinkedResource(fout, it->first, + this->GetEclipsePath(linkSourceDirectory)); + this->SrcLinkedResources.push_back(it->first); + } + } + // for EXECUTABLE_OUTPUT_PATH when not in binary dir + std::string outputPath = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + if (!outputPath.empty() && !cmSystemTools::IsSubDirectory( + outputPath.c_str(), this->HomeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(outputPath); + + // make sure linked resource name is unique + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + this->AppendLinkedResource(fout, name, + this->GetEclipsePath(outputPath)); + this->OutLinkedResources.push_back(name); + } + // for LIBRARY_OUTPUT_PATH when not in binary dir + if (outputPath != mf->GetDefinition("LIBRARY_OUTPUT_PATH")) + { + outputPath = mf->GetDefinition("LIBRARY_OUTPUT_PATH"); + if (!outputPath.empty() && !cmSystemTools::IsSubDirectory( + outputPath.c_str(), this->HomeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(outputPath); + + // make sure linked resource name is unique + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + this->AppendLinkedResource(fout, name, + this->GetEclipsePath(outputPath)); + this->OutLinkedResources.push_back(name); + } + } + fout << "\t\n"; + } + + fout << "\n"; +} + +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator::CreateCProjectFile() const +{ + std::set emmited; + + const cmMakefile* mf + = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); + + const std::string filename = this->HomeOutputDirectory + "/.cproject"; + + cmGeneratedFileStream fout(filename.c_str()); + if (!fout) + { + return; + } + + // add header + fout << + "\n" + "\n\n" + "\n" + "\n" + ; + + fout << "\n"; + + // Configuration settings... + fout << + "\n" + "\n" + "\n" + ; + // TODO: refactor this out... + switch (this->GetToolChainType(*mf)) + { + case EclipseToolchainLinux : + fout << "\n" + ; + fout << "\n" + "\n" + "\n" + "\n" + ; + break; + case EclipseToolchainCygwin : + fout << "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + ; + break; + case EclipseToolchainMinGW : + fout << "\n" + ; + break; + case EclipseToolchainSolaris : + fout << "\n" + ; + break; + case EclipseToolchainMacOSX : + fout << "\n" + "\n" + "\n" + ; + break; + case EclipseToolchainOther : + fout << "\n" + ; + fout << "\n" + ; + break; + default : + // *** Should never get here *** + fout << "\n"; + } + fout << "\n" + "\n" + ; + + // ??? + fout << + "\n" + "\n" + "\n" + ; + + // ??? + fout<<"\n" + ; + + // set the path entries (includes, libs, source dirs, etc.) + fout << "\n" + ; + // for each sub project with a linked resource to the source dir: + // - make it type 'src' + // - and exclude it from type 'out' + std::string excludeFromOut; + for (std::vector::const_iterator + it = this->SrcLinkedResources.begin(); + it != this->SrcLinkedResources.end(); + ++it) + { + fout << "\n"; + + // exlude source directory from output search path + // - only if not named the same as an output directory + if (!cmSystemTools::FileIsDirectory( + std::string(this->HomeOutputDirectory + "/" + *it).c_str())) + { + excludeFromOut += *it + "/|"; + } + } + excludeFromOut += "**/CMakeFiles/"; + fout << "\n"; + // add output entry for EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH + // - if it is a subdir of homeOutputDirectory, there is no need to add it + // - if it is not then create a linked resource and add the linked name + // but check it doesn't conflict with other linked resources names + for (std::vector::const_iterator + it = this->OutLinkedResources.begin(); + it != this->OutLinkedResources.end(); + ++it) + { + fout << "\n"; + } + + // add pre-processor definitions to allow eclipse to gray out sections + emmited.clear(); + for (std::vector::const_iterator + it = this->GlobalGenerator->GetLocalGenerators().begin(); + it != this->GlobalGenerator->GetLocalGenerators().end(); + ++it) + { + + if(const char* cdefs = (*it)->GetMakefile()->GetProperty( + "COMPILE_DEFINITIONS")) + { + // Expand the list. + std::vector defs; + cmSystemTools::ExpandListArgument(cdefs, defs); + + for(std::vector::const_iterator di = defs.begin(); + di != defs.end(); ++di) + { + std::string::size_type equals = di->find('=', 0); + std::string::size_type enddef = di->length(); + + std::string def; + std::string val; + if (equals != std::string::npos && equals < enddef) + { + // we have -DFOO=BAR + def = di->substr(0, equals); + val = di->substr(equals + 1, enddef - equals + 1); + } + else + { + // we have -DFOO + def = *di; + } + + // insert the definition if not already added. + if(emmited.find(def) == emmited.end()) + { + emmited.insert(def); + fout << "\n"; + } + } + } + } + + // include dirs + emmited.clear(); + for (std::vector::const_iterator + it = this->GlobalGenerator->GetLocalGenerators().begin(); + it != this->GlobalGenerator->GetLocalGenerators().end(); + ++it) + { + const std::vector& includeDirs + = (*it)->GetMakefile()->GetIncludeDirectories(); + for(std::vector::const_iterator inc = includeDirs.begin(); + inc != includeDirs.end(); + ++inc) + { + std::string dir = cmSystemTools::CollapseFullPath(inc->c_str()); + if(emmited.find(dir) == emmited.end()) + { + emmited.insert(dir); + fout << "GetEclipsePath(dir) + << "\" kind=\"inc\" path=\"\" system=\"true\"/>\n"; + } + } + } + fout << "\n"; + + // add build targets + fout << + "\n" + "\n" + ; + emmited.clear(); + const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + cmGlobalGenerator* generator + = const_cast(this->GlobalGenerator); + if (generator->GetAllTargetName()) + { + emmited.insert(generator->GetAllTargetName()); + cmExtraEclipseCDT4Generator::AppendTarget(fout, + generator->GetAllTargetName(), + make); + } + if (generator->GetPreinstallTargetName()) + { + emmited.insert(generator->GetPreinstallTargetName()); + cmExtraEclipseCDT4Generator + ::AppendTarget(fout, generator->GetPreinstallTargetName(), make); + } + + if (generator->GetCleanTargetName()) + { + emmited.insert(generator->GetCleanTargetName()); + cmExtraEclipseCDT4Generator + ::AppendTarget(fout, generator->GetCleanTargetName(), make); + } + + // add all executable and library targets and some of the GLOBAL + // and UTILITY targets + for (std::vector::const_iterator + it = this->GlobalGenerator->GetLocalGenerators().begin(); + it != this->GlobalGenerator->GetLocalGenerators().end(); + ++it) + { + const cmTargets& targets = (*it)->GetMakefile()->GetTargets(); + for(cmTargets::const_iterator t = targets.begin(); t != targets.end(); ++t) + { + switch(t->second.GetType()) + { + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + { + // only add these global targets + if (!( (t->first=="install") + || (t->first=="install/strip") + || (t->first=="test") + || (t->first=="Experimental") + || (t->first=="Nightly") + || (t->first=="edit_cache") + || (t->first=="package") + || (t->first=="package_source") + || (t->first=="rebuild_cache") )) + { + break; + } + // add the edit_cache target only if it's not ccmake + // otherwise ccmake will be executed in the log view of Eclipse, + // which is no terminal, so curses don't work there, Alex + if (t->first=="edit_cache") + { + if (strstr(mf->GetRequiredDefinition("CMAKE_EDIT_COMMAND"), + "ccmake")!=NULL) + { + break; + } + } + } + case cmTarget::EXECUTABLE: + case cmTarget::STATIC_LIBRARY: + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + { + if(emmited.find(t->first) == emmited.end()) + { + emmited.insert(t->first); + cmExtraEclipseCDT4Generator::AppendTarget(fout, t->first, make); + } + break; + } + // ignore these: + case cmTarget::INSTALL_FILES: + case cmTarget::INSTALL_PROGRAMS: + case cmTarget::INSTALL_DIRECTORY: + default: + break; + } + } + } + fout << "\n" + "\n" + ; + + this->AppendStorageScanners(fout); + + fout << "\n" + "\n" + "\n" + "GetProjectName() << ".null.1\"" + " name=\"" << mf->GetProjectName() << "\"/>\n" + "\n" + "\n" + ; +} + +//---------------------------------------------------------------------------- +cmExtraEclipseCDT4Generator::EclipseToolchainType +cmExtraEclipseCDT4Generator::GetToolChainType(const cmMakefile& makefile) +{ + if (makefile.IsSet("UNIX")) + { + if (makefile.IsSet("CYGWIN")) + { + return EclipseToolchainCygwin; + } + if (makefile.IsSet("APPLE" )) + { + return EclipseToolchainMacOSX; + } + // *** how do I determine if it is Solaris ??? + return EclipseToolchainLinux; + } + else if (makefile.IsSet("WIN32")) + { + if (makefile.IsSet("MINGW")) + { + return EclipseToolchainMinGW; + } + if (makefile.IsSet("MSYS" )) + { + return EclipseToolchainMinGW; + } + return EclipseToolchainOther; + } + else + { + return EclipseToolchainOther; + } +} + +std::string +cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path) +{ +#if defined(__CYGWIN__) + std::string cmd = "cygpath -m " + path; + std::string out; + if (!cmSystemTools::RunCommand(cmd.c_str(), out, 0, false)) + { + return path; + } + else + { + out.erase(out.find_last_of('\n')); + return out; + } +#else + return path; +#endif +} + +std::string +cmExtraEclipseCDT4Generator::GetPathBasename(const std::string& path) +{ + std::string outputBasename = path; + while (outputBasename.size() > 0 && + (outputBasename[outputBasename.size() - 1] == '/' || + outputBasename[outputBasename.size() - 1] == '\\')) + { + outputBasename.resize(outputBasename.size() - 1); + } + std::string::size_type loc = outputBasename.find_last_of("/\\"); + if (loc != std::string::npos) + { + outputBasename = outputBasename.substr(loc + 1); + } + + return outputBasename; +} + +std::string +cmExtraEclipseCDT4Generator::GenerateProjectName(const std::string& name, + const std::string& type, + const std::string& path) +{ + return name + (type.empty() ? "" : "-") + type + "@" + path; +} + +//---------------------------------------------------------------------------- +// Helper functions +//---------------------------------------------------------------------------- +void cmExtraEclipseCDT4Generator +::AppendStorageScanners(cmGeneratedFileStream& fout) +{ + fout << + "\n" + "\n" + ; + cmExtraEclipseCDT4Generator::AppendScannerProfile(fout, + "org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile", + true, "", true, "specsFile", + "-E -P -v -dD ${plugin_state_location}/${specs_file}", + "gcc", true, true); + cmExtraEclipseCDT4Generator::AppendScannerProfile(fout, + "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile", + true, "", true, "makefileGenerator", + "-f ${project_name}_scd.mk", + "make", true, true); + + fout << "\n"; +} + +void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout, + const std::string& target, + const std::string& make) +{ + fout << + "\n" + "" + << cmExtraEclipseCDT4Generator::GetEclipsePath(make) + << "\n" + "\n" + "" << target << "\n" + "true\n" + "false\n" + "\n" + ; +} + +void cmExtraEclipseCDT4Generator +::AppendScannerProfile(cmGeneratedFileStream& fout, + const std::string& profileID, + bool openActionEnabled, + const std::string& openActionFilePath, + bool pParserEnabled, + const std::string& scannerInfoProviderID, + const std::string& runActionArguments, + const std::string& runActionCommand, + bool runActionUseDefault, + bool sipParserEnabled) +{ + fout << + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + ; +} + +void cmExtraEclipseCDT4Generator +::AppendLinkedResource (cmGeneratedFileStream& fout, + const std::string& name, + const std::string& path) +{ + fout << + "\t\t\n" + "\t\t\t" << name << "\n" + "\t\t\t2\n" + "\t\t\t" + << path + << "\n" + "\t\t\n" + ; +} diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h new file mode 100644 index 000000000..bd2143f3e --- /dev/null +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -0,0 +1,116 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmExtraEclipseCDT4Generator.h,v $ + Language: C++ + Date: $Date: 2008-02-19 21:27:03 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved. + Copyright (c) 2007 Miguel A. Figueroa-Villanueva. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmExtraEclipseCDT4Generator_h +#define cmExtraEclipseCDT4Generator_h + +#include "cmExternalMakefileProjectGenerator.h" + +class cmMakefile; +class cmGeneratedFileStream; + +/** \class cmExtraEclipseCDT4Generator + * \brief Write Eclipse project files for Makefile based projects + * + * This generator is in early alpha stage. + */ +class cmExtraEclipseCDT4Generator : public cmExternalMakefileProjectGenerator +{ +public: + cmExtraEclipseCDT4Generator(); + + static cmExternalMakefileProjectGenerator* New() { + return new cmExtraEclipseCDT4Generator; + } + + virtual const char* GetName() const { + return cmExtraEclipseCDT4Generator::GetActualName(); + } + + static const char* GetActualName() { return "Eclipse CDT4"; } + + virtual void GetDocumentation(cmDocumentationEntry& entry, + const char* fullName) const; + + virtual void SetGlobalGenerator(cmGlobalGenerator* generator); + + virtual void Generate(); + +private: + // create .project file in the source tree + void CreateSourceProjectFile() const; + + // create .project file + void CreateProjectFile(); + + // create .cproject file + void CreateCProjectFile() const; + + // Eclipse supported toolchain types + enum EclipseToolchainType + { + EclipseToolchainOther, + EclipseToolchainLinux, + EclipseToolchainCygwin, + EclipseToolchainMinGW, + EclipseToolchainSolaris, + EclipseToolchainMacOSX + }; + static EclipseToolchainType GetToolChainType(const cmMakefile& makefile); + + // If built with cygwin cmake, convert posix to windows path. + static std::string GetEclipsePath(const std::string& path); + + // Extract basename. + static std::string GetPathBasename(const std::string& path); + + // Generate the project name as: -@ + static std::string GenerateProjectName(const std::string& name, + const std::string& type, + const std::string& path); + + // Helper functions + static void AppendStorageScanners(cmGeneratedFileStream& fout); + static void AppendTarget (cmGeneratedFileStream& fout, + const std::string& target, + const std::string& make); + static void AppendScannerProfile (cmGeneratedFileStream& fout, + const std::string& profileID, + bool openActionEnabled, + const std::string& openActionFilePath, + bool pParserEnabled, + const std::string& scannerInfoProviderID, + const std::string& runActionArguments, + const std::string& runActionCommand, + bool runActionUseDefault, + bool sipParserEnabled); + + static void AppendLinkedResource (cmGeneratedFileStream& fout, + const std::string& name, + const std::string& path); + + std::vector SrcLinkedResources; + std::vector OutLinkedResources; + std::string HomeDirectory; + std::string HomeOutputDirectory; + bool IsOutOfSourceBuild; + bool GenerateSourceProject; + +}; + +#endif diff --git a/Source/cmFLTKWrapUICommand.cxx b/Source/cmFLTKWrapUICommand.cxx new file mode 100644 index 000000000..e0bd0b6b3 --- /dev/null +++ b/Source/cmFLTKWrapUICommand.cxx @@ -0,0 +1,166 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFLTKWrapUICommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.38 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFLTKWrapUICommand.h" + +#include "cmSourceFile.h" + +// cmFLTKWrapUICommand +bool cmFLTKWrapUICommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // what is the current source dir + std::string cdir = this->Makefile->GetCurrentDirectory(); + const char* fluid_exe = + this->Makefile->GetRequiredDefinition("FLTK_FLUID_EXECUTABLE"); + + // get parameter for the command + this->Target = args[0]; // Target that will use the generated files + + std::vector newArgs; + this->Makefile->ExpandSourceListArguments(args,newArgs, 1); + + // get the list of GUI files from which .cxx and .h will be generated + std::string outputDirectory = this->Makefile->GetCurrentOutputDirectory(); + + // Some of the generated files are *.h so the directory "GUI" + // where they are created have to be added to the include path + this->Makefile->AddIncludeDirectory( outputDirectory.c_str() ); + + for(std::vector::iterator i = (newArgs.begin() + 1); + i != newArgs.end(); i++) + { + cmSourceFile *curr = this->Makefile->GetSource(i->c_str()); + // if we should use the source GUI + // to generate .cxx and .h files + if (!curr || !curr->GetPropertyAsBool("WRAP_EXCLUDE")) + { + std::string outName = outputDirectory; + outName += "/"; + outName += cmSystemTools::GetFilenameWithoutExtension(*i); + std::string hname = outName; + hname += ".h"; + std::string origname = cdir + "/" + *i; + // add starting depends + std::vector depends; + depends.push_back(origname); + depends.push_back(fluid_exe); + std::string cxxres = outName; + cxxres += ".cxx"; + + cmCustomCommandLine commandLine; + commandLine.push_back(fluid_exe); + commandLine.push_back("-c"); // instructs Fluid to run in command line + commandLine.push_back("-h"); // optionally rename .h files + commandLine.push_back(hname); + commandLine.push_back("-o"); // optionally rename .cxx files + commandLine.push_back(cxxres); + commandLine.push_back(origname);// name of the GUI fluid file + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Add command for generating the .h and .cxx files + const char* no_main_dependency = 0; + const char* no_comment = 0; + const char* no_working_dir = 0; + this->Makefile->AddCustomCommandToOutput(cxxres.c_str(), + depends, no_main_dependency, + commandLines, no_comment, + no_working_dir); + this->Makefile->AddCustomCommandToOutput(hname.c_str(), + depends, no_main_dependency, + commandLines, no_comment, + no_working_dir); + + cmSourceFile *sf = this->Makefile->GetSource(cxxres.c_str()); + sf->AddDepend(hname.c_str()); + sf->AddDepend(origname.c_str()); + this->GeneratedSourcesClasses.push_back(sf); + } + } + + // create the variable with the list of sources in it + size_t lastHeadersClass = this->GeneratedSourcesClasses.size(); + std::string sourceListValue; + for(size_t classNum = 0; classNum < lastHeadersClass; classNum++) + { + if (classNum) + { + sourceListValue += ";"; + } + sourceListValue += this->GeneratedSourcesClasses[classNum]->GetFullPath(); + } + std::string varName = this->Target; + varName += "_FLTK_UI_SRCS"; + this->Makefile->AddDefinition(varName.c_str(), sourceListValue.c_str()); + + return true; +} + +void cmFLTKWrapUICommand::FinalPass() +{ + // people should add the srcs to the target themselves, but the old command + // didn't support that, so check and see if they added the files in and if + // they didn;t then print a warning and add then anyhow + std::vector const& srcs = + this->Makefile->GetTargets()[this->Target].GetSourceFiles(); + bool found = false; + for (unsigned int i = 0; i < srcs.size(); ++i) + { + if (srcs[i]->GetFullPath() == + this->GeneratedSourcesClasses[0]->GetFullPath()) + { + found = true; + break; + } + } + if (!found) + { + std::string msg = + "In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of " + "source files that should be added to your executable or library. It " + "appears that you have not added these source files to your target. " + "You should change your CMakeLists.txt file to " + "directly add the generated files to the target. " + "For example FTLK_WRAP_UI(foo src1 src2 src3) " + "will create a variable named foo_FLTK_UI_SRCS that contains the list " + "of sources to add to your target when you call ADD_LIBRARY or " + "ADD_EXECUTABLE. For now CMake will add the sources to your target " + "for you as was done in CMake 2.0 and earlier. In the future this may " + "become an error."; + msg +="The problem was found while processing the source directory: "; + msg += this->Makefile->GetStartDirectory(); + cmSystemTools::Message(msg.c_str(),"Warning"); + // first we add the rules for all the .fl to .h and .cxx files + size_t lastHeadersClass = this->GeneratedSourcesClasses.size(); + + // Generate code for all the .fl files + for(size_t classNum = 0; classNum < lastHeadersClass; classNum++) + { + this->Makefile->GetTargets()[this->Target] + .AddSourceFile(this->GeneratedSourcesClasses[classNum]); + } + } +} + + + diff --git a/Source/cmFLTKWrapUICommand.h b/Source/cmFLTKWrapUICommand.h new file mode 100644 index 000000000..9dddff093 --- /dev/null +++ b/Source/cmFLTKWrapUICommand.h @@ -0,0 +1,98 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFLTKWrapUICommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFLTKWrapUICommand_h +#define cmFLTKWrapUICommand_h + +#include "cmCommand.h" + +/** \class cmFLTKWrapUICommand + * \brief Create .h and .cxx files rules for FLTK user interfaces files + * + * cmFLTKWrapUICommand is used to create wrappers for FLTK classes into + * normal C++ + */ +class cmFLTKWrapUICommand : public cmCommand +{ +public: + cmTypeMacro(cmFLTKWrapUICommand, cmCommand); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFLTKWrapUICommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This is called at the end after all the information + * specified by the command is accumulated. Most commands do + * not implement this method. At this point, reading and + * writing to the cache can be done. + */ + virtual void FinalPass(); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "fltk_wrap_ui";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Create FLTK user interfaces Wrappers."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " fltk_wrap_ui(resultingLibraryName source1\n" + " source2 ... sourceN )\n" + "Produce .h and .cxx files for all the .fl and .fld files listed. " + "The resulting .h and .cxx files will be added to a variable named " + "resultingLibraryName_FLTK_UI_SRCS which should be added to your " + "library."; + } + +private: + /** + * List of produced files. + */ + std::vector GeneratedSourcesClasses; + + /** + * List of Fluid files that provide the source + * generating .cxx and .h files + */ + std::string Target; +}; + + + +#endif diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx new file mode 100644 index 000000000..55463598b --- /dev/null +++ b/Source/cmFileCommand.cxx @@ -0,0 +1,2277 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFileCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.103.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFileCommand.h" +#include "cmake.h" +#include "cmHexFileConverter.h" +#include "cmFileTimeComparison.h" + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cm_curl.h" +#endif + +#undef GetCurrentDirectory +#include +#include + +#include +#include +#include + +// Table of permissions flags. +#if defined(_WIN32) && !defined(__CYGWIN__) +static mode_t mode_owner_read = S_IREAD; +static mode_t mode_owner_write = S_IWRITE; +static mode_t mode_owner_execute = S_IEXEC; +static mode_t mode_group_read = 0; +static mode_t mode_group_write = 0; +static mode_t mode_group_execute = 0; +static mode_t mode_world_read = 0; +static mode_t mode_world_write = 0; +static mode_t mode_world_execute = 0; +static mode_t mode_setuid = 0; +static mode_t mode_setgid = 0; +#else +static mode_t mode_owner_read = S_IRUSR; +static mode_t mode_owner_write = S_IWUSR; +static mode_t mode_owner_execute = S_IXUSR; +static mode_t mode_group_read = S_IRGRP; +static mode_t mode_group_write = S_IWGRP; +static mode_t mode_group_execute = S_IXGRP; +static mode_t mode_world_read = S_IROTH; +static mode_t mode_world_write = S_IWOTH; +static mode_t mode_world_execute = S_IXOTH; +static mode_t mode_setuid = S_ISUID; +static mode_t mode_setgid = S_ISGID; +#endif + +// cmLibraryCommand +bool cmFileCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("must be called with at least two arguments."); + return false; + } + std::string subCommand = args[0]; + if ( subCommand == "WRITE" ) + { + return this->HandleWriteCommand(args, false); + } + else if ( subCommand == "APPEND" ) + { + return this->HandleWriteCommand(args, true); + } + else if ( subCommand == "DOWNLOAD" ) + { + return this->HandleDownloadCommand(args); + } + else if ( subCommand == "READ" ) + { + return this->HandleReadCommand(args); + } + else if ( subCommand == "STRINGS" ) + { + return this->HandleStringsCommand(args); + } + else if ( subCommand == "GLOB" ) + { + return this->HandleGlobCommand(args, false); + } + else if ( subCommand == "GLOB_RECURSE" ) + { + return this->HandleGlobCommand(args, true); + } + else if ( subCommand == "MAKE_DIRECTORY" ) + { + return this->HandleMakeDirectoryCommand(args); + } + else if ( subCommand == "REMOVE" ) + { + return this->HandleRemove(args, false); + } + else if ( subCommand == "REMOVE_RECURSE" ) + { + return this->HandleRemove(args, true); + } + else if ( subCommand == "INSTALL" ) + { + return this->HandleInstallCommand(args); + } + else if ( subCommand == "RPATH_CHANGE" || subCommand == "CHRPATH" ) + { + return this->HandleRPathChangeCommand(args); + } + else if ( subCommand == "RPATH_CHECK" ) + { + return this->HandleRPathCheckCommand(args); + } + else if ( subCommand == "RPATH_REMOVE" ) + { + return this->HandleRPathRemoveCommand(args); + } + else if ( subCommand == "RELATIVE_PATH" ) + { + return this->HandleRelativePathCommand(args); + } + else if ( subCommand == "TO_CMAKE_PATH" ) + { + return this->HandleCMakePathCommand(args, false); + } + else if ( subCommand == "TO_NATIVE_PATH" ) + { + return this->HandleCMakePathCommand(args, true); + } + + std::string e = "does not recognize sub-command "+subCommand; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleWriteCommand(std::vector const& args, + bool append) +{ + std::string message; + std::vector::const_iterator i = args.begin(); + + i++; // Get rid of subcommand + + std::string fileName = *i; + if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) + { + fileName = this->Makefile->GetCurrentDirectory(); + fileName += "/" + *i; + } + + i++; + + for(;i != args.end(); ++i) + { + message += *i; + } + if ( !this->Makefile->CanIWriteThisFile(fileName.c_str()) ) + { + std::string e + = "attempted to write a file: " + fileName + + " into a source directory."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + std::string dir = cmSystemTools::GetFilenamePath(fileName); + cmSystemTools::MakeDirectory(dir.c_str()); + + mode_t mode = +#if defined( _MSC_VER ) || defined( __MINGW32__ ) + S_IREAD | S_IWRITE +#elif defined( __BORLANDC__ ) + S_IRUSR | S_IWUSR +#else + S_IRUSR | S_IWUSR | + S_IRGRP | + S_IROTH +#endif + ; + + // Set permissions to writable + if ( cmSystemTools::GetPermissions(fileName.c_str(), mode) ) + { + cmSystemTools::SetPermissions(fileName.c_str(), +#if defined( _MSC_VER ) || defined( __MINGW32__ ) + S_IREAD | S_IWRITE +#else + S_IRUSR | S_IWUSR +#endif + ); + } + // If GetPermissions fails, pretend like it is ok. File open will fail if + // the file is not writable + std::ofstream file(fileName.c_str(), append?std::ios::app: std::ios::out); + if ( !file ) + { + std::string error = "Internal CMake error when trying to open file: "; + error += fileName.c_str(); + error += " for writing."; + this->SetError(error.c_str()); + return false; + } + file << message; + file.close(); + cmSystemTools::SetPermissions(fileName.c_str(), mode); + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleReadCommand(std::vector const& args) +{ + if ( args.size() < 3 ) + { + this->SetError("READ must be called with at least two additional " + "arguments"); + return false; + } + + cmCommandArgumentsHelper argHelper; + cmCommandArgumentGroup group; + + cmCAString readArg (&argHelper, "READ"); + cmCAString fileNameArg (&argHelper, 0); + cmCAString resultArg (&argHelper, 0); + + cmCAString offsetArg (&argHelper, "OFFSET", &group); + cmCAString limitArg (&argHelper, "LIMIT", &group); + cmCAEnabler hexOutputArg (&argHelper, "HEX", &group); + readArg.Follows(0); + fileNameArg.Follows(&readArg); + resultArg.Follows(&fileNameArg); + group.Follows(&resultArg); + argHelper.Parse(&args, 0); + + std::string fileName = fileNameArg.GetString(); + if ( !cmsys::SystemTools::FileIsFullPath(fileName.c_str()) ) + { + fileName = this->Makefile->GetCurrentDirectory(); + fileName += "/" + fileNameArg.GetString(); + } + + std::string variable = resultArg.GetString(); + + // Open the specified file. +#if defined(_WIN32) || defined(__CYGWIN__) + std::ifstream file(fileName.c_str(), std::ios::in | + (hexOutputArg.IsEnabled() ? std::ios::binary : std::ios::in)); +#else + std::ifstream file(fileName.c_str(), std::ios::in); +#endif + + if ( !file ) + { + std::string error = "Internal CMake error when trying to open file: "; + error += fileName.c_str(); + error += " for reading."; + this->SetError(error.c_str()); + return false; + } + + // is there a limit? + long sizeLimit = -1; + if (limitArg.GetString().size() > 0) + { + sizeLimit = atoi(limitArg.GetCString()); + } + + // is there an offset? + long offset = 0; + if (offsetArg.GetString().size() > 0) + { + offset = atoi(offsetArg.GetCString()); + } + + file.seekg(offset); + + std::string output; + + if (hexOutputArg.IsEnabled()) + { + // Convert part of the file into hex code + int c; + while((sizeLimit != 0) && (c = file.get(), file)) + { + char hex[4]; + sprintf(hex, "%x", c&0xff); + output += hex; + if (sizeLimit > 0) + { + sizeLimit--; + } + } + } + else + { + std::string line; + bool has_newline = false; + while (sizeLimit != 0 && + cmSystemTools::GetLineFromStream(file, line, &has_newline, + sizeLimit) ) + { + if (sizeLimit > 0) + { + sizeLimit = sizeLimit - static_cast(line.size()); + if (has_newline) + { + sizeLimit--; + } + if (sizeLimit < 0) + { + sizeLimit = 0; + } + } + output += line; + if ( has_newline ) + { + output += "\n"; + } + } + } + this->Makefile->AddDefinition(variable.c_str(), output.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleStringsCommand(std::vector const& args) +{ + if(args.size() < 3) + { + this->SetError("STRINGS requires a file name and output variable"); + return false; + } + + // Get the file to read. + std::string fileName = args[1]; + if(!cmsys::SystemTools::FileIsFullPath(fileName.c_str())) + { + fileName = this->Makefile->GetCurrentDirectory(); + fileName += "/" + args[1]; + } + + // Get the variable in which to store the results. + std::string outVar = args[2]; + + // Parse the options. + enum { arg_none, + arg_limit_input, + arg_limit_output, + arg_limit_count, + arg_length_minimum, + arg_length_maximum, + arg__maximum, + arg_regex }; + unsigned int minlen = 0; + unsigned int maxlen = 0; + int limit_input = -1; + int limit_output = -1; + unsigned int limit_count = 0; + cmsys::RegularExpression regex; + bool have_regex = false; + bool newline_consume = false; + bool hex_conversion_enabled = true; + int arg_mode = arg_none; + for(unsigned int i=3; i < args.size(); ++i) + { + if(args[i] == "LIMIT_INPUT") + { + arg_mode = arg_limit_input; + } + else if(args[i] == "LIMIT_OUTPUT") + { + arg_mode = arg_limit_output; + } + else if(args[i] == "LIMIT_COUNT") + { + arg_mode = arg_limit_count; + } + else if(args[i] == "LENGTH_MINIMUM") + { + arg_mode = arg_length_minimum; + } + else if(args[i] == "LENGTH_MAXIMUM") + { + arg_mode = arg_length_maximum; + } + else if(args[i] == "REGEX") + { + arg_mode = arg_regex; + } + else if(args[i] == "NEWLINE_CONSUME") + { + newline_consume = true; + arg_mode = arg_none; + } + else if(args[i] == "NO_HEX_CONVERSION") + { + hex_conversion_enabled = false; + arg_mode = arg_none; + } + else if(arg_mode == arg_limit_input) + { + if(sscanf(args[i].c_str(), "%d", &limit_input) != 1 || + limit_input < 0) + { + cmOStringStream e; + e << "STRINGS option LIMIT_INPUT value \"" + << args[i] << "\" is not an unsigned integer."; + this->SetError(e.str().c_str()); + return false; + } + arg_mode = arg_none; + } + else if(arg_mode == arg_limit_output) + { + if(sscanf(args[i].c_str(), "%d", &limit_output) != 1 || + limit_output < 0) + { + cmOStringStream e; + e << "STRINGS option LIMIT_OUTPUT value \"" + << args[i] << "\" is not an unsigned integer."; + this->SetError(e.str().c_str()); + return false; + } + arg_mode = arg_none; + } + else if(arg_mode == arg_limit_count) + { + int count; + if(sscanf(args[i].c_str(), "%d", &count) != 1 || count < 0) + { + cmOStringStream e; + e << "STRINGS option LIMIT_COUNT value \"" + << args[i] << "\" is not an unsigned integer."; + this->SetError(e.str().c_str()); + return false; + } + limit_count = count; + arg_mode = arg_none; + } + else if(arg_mode == arg_length_minimum) + { + int len; + if(sscanf(args[i].c_str(), "%d", &len) != 1 || len < 0) + { + cmOStringStream e; + e << "STRINGS option LENGTH_MINIMUM value \"" + << args[i] << "\" is not an unsigned integer."; + this->SetError(e.str().c_str()); + return false; + } + minlen = len; + arg_mode = arg_none; + } + else if(arg_mode == arg_length_maximum) + { + int len; + if(sscanf(args[i].c_str(), "%d", &len) != 1 || len < 0) + { + cmOStringStream e; + e << "STRINGS option LENGTH_MAXIMUM value \"" + << args[i] << "\" is not an unsigned integer."; + this->SetError(e.str().c_str()); + return false; + } + maxlen = len; + arg_mode = arg_none; + } + else if(arg_mode == arg_regex) + { + if(!regex.compile(args[i].c_str())) + { + cmOStringStream e; + e << "STRINGS option REGEX value \"" + << args[i] << "\" could not be compiled."; + this->SetError(e.str().c_str()); + return false; + } + have_regex = true; + arg_mode = arg_none; + } + else + { + cmOStringStream e; + e << "STRINGS given unknown argument \"" + << args[i] << "\""; + this->SetError(e.str().c_str()); + return false; + } + } + + if (hex_conversion_enabled) + { + // TODO: should work without temp file, but just on a memory buffer + std::string binaryFileName = this->Makefile->GetCurrentOutputDirectory(); + binaryFileName += cmake::GetCMakeFilesDirectory(); + binaryFileName += "/FileCommandStringsBinaryFile"; + if(cmHexFileConverter::TryConvert(fileName.c_str(),binaryFileName.c_str())) + { + fileName = binaryFileName; + } + } + + // Open the specified file. +#if defined(_WIN32) || defined(__CYGWIN__) + std::ifstream fin(fileName.c_str(), std::ios::in | std::ios::binary); +#else + std::ifstream fin(fileName.c_str(), std::ios::in); +#endif + if(!fin) + { + cmOStringStream e; + e << "STRINGS file \"" << fileName << "\" cannot be read."; + this->SetError(e.str().c_str()); + return false; + } + + // Parse strings out of the file. + int output_size = 0; + std::vector strings; + std::string s; + int c; + while((!limit_count || strings.size() < limit_count) && + (limit_input < 0 || static_cast(fin.tellg()) < limit_input) && + (c = fin.get(), fin)) + { + if(c == '\0') + { + // A terminating null character has been found. Check if the + // current string matches the requirements. Since it was + // terminated by a null character, we require that the length be + // at least one no matter what the user specified. + if(s.length() >= minlen && s.length() >= 1 && + (!have_regex || regex.find(s.c_str()))) + { + output_size += static_cast(s.size()) + 1; + if(limit_output >= 0 && output_size >= limit_output) + { + s = ""; + break; + } + strings.push_back(s); + } + + // Reset the string to empty. + s = ""; + } + else if(c == '\n' && !newline_consume) + { + // The current line has been terminated. Check if the current + // string matches the requirements. The length may now be as + // low as zero since blank lines are allowed. + if(s.length() >= minlen && + (!have_regex || regex.find(s.c_str()))) + { + output_size += static_cast(s.size()) + 1; + if(limit_output >= 0 && output_size >= limit_output) + { + s = ""; + break; + } + strings.push_back(s); + } + + // Reset the string to empty. + s = ""; + } + else if(c == '\r') + { + // Ignore CR character to make output always have UNIX newlines. + } + else if(c >= 0x20 && c < 0x7F || c == '\t' || + (c == '\n' && newline_consume)) + { + // This is an ASCII character that may be part of a string. + s += c; + } + else + { + // This is a non-string character. Reset the string to emtpy. + s = ""; + } + + // Terminate a string if the maximum length is reached. + if(maxlen > 0 && s.size() == maxlen) + { + if(s.length() >= minlen && + (!have_regex || regex.find(s.c_str()))) + { + output_size += static_cast(s.size()) + 1; + if(limit_output >= 0 && output_size >= limit_output) + { + s = ""; + break; + } + strings.push_back(s); + } + s = ""; + } + } + + // If there is a non-empty current string we have hit the end of the + // input file or the input size limit. Check if the current string + // matches the requirements. + if((!limit_count || strings.size() < limit_count) && + !s.empty() && s.length() >= minlen && + (!have_regex || regex.find(s.c_str()))) + { + output_size += static_cast(s.size()) + 1; + if(limit_output < 0 || output_size < limit_output) + { + strings.push_back(s); + } + } + + // Encode the result in a CMake list. + const char* sep = ""; + std::string output; + for(std::vector::const_iterator si = strings.begin(); + si != strings.end(); ++si) + { + // Separate the strings in the output to make it a list. + output += sep; + sep = ";"; + + // Store the string in the output, but escape semicolons to + // make sure it is a list. + std::string const& sr = *si; + for(unsigned int i=0; i < sr.size(); ++i) + { + if(sr[i] == ';') + { + output += '\\'; + } + output += sr[i]; + } + } + + // Save the output in a makefile variable. + this->Makefile->AddDefinition(outVar.c_str(), output.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleGlobCommand(std::vector const& args, + bool recurse) +{ + if ( args.size() < 2 ) + { + this->SetError("GLOB requires at least a variable name"); + return false; + } + + std::vector::const_iterator i = args.begin(); + + i++; // Get rid of subcommand + + std::string variable = *i; + i++; + cmsys::Glob g; + g.SetRecurse(recurse); + std::string output = ""; + bool first = true; + for ( ; i != args.end(); ++i ) + { + if ( *i == "RELATIVE" ) + { + ++i; // skip RELATIVE + if ( i == args.end() ) + { + this->SetError("GLOB requires a directory after the RELATIVE tag"); + return false; + } + g.SetRelative(i->c_str()); + ++i; + if(i == args.end()) + { + this->SetError("GLOB requires a glob expression after the directory"); + return false; + } + } + if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) + { + std::string expr = this->Makefile->GetCurrentDirectory(); + // Handle script mode + if ( expr.size() > 0 ) + { + expr += "/" + *i; + g.FindFiles(expr); + } + else + { + g.FindFiles(*i); + } + } + else + { + g.FindFiles(*i); + } + std::vector::size_type cc; + std::vector& files = g.GetFiles(); + for ( cc = 0; cc < files.size(); cc ++ ) + { + if ( !first ) + { + output += ";"; + } + output += files[cc]; + first = false; + } + } + this->Makefile->AddDefinition(variable.c_str(), output.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleMakeDirectoryCommand( + std::vector const& args) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::vector::const_iterator i = args.begin(); + + i++; // Get rid of subcommand + + std::string expr; + for ( ; i != args.end(); ++i ) + { + const std::string* cdir = &(*i); + if ( !cmsys::SystemTools::FileIsFullPath(i->c_str()) ) + { + expr = this->Makefile->GetCurrentDirectory(); + expr += "/" + *i; + cdir = &expr; + } + if ( !this->Makefile->CanIWriteThisFile(cdir->c_str()) ) + { + std::string e = "attempted to create a directory: " + *cdir + + " into a source directory."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + if ( !cmSystemTools::MakeDirectory(cdir->c_str()) ) + { + std::string error = "problem creating directory: " + *cdir; + this->SetError(error.c_str()); + return false; + } + } + return true; +} + +//---------------------------------------------------------------------------- +// File installation helper class. +struct cmFileInstaller +{ + // Methods to actually install files. + bool InstallFile(const char* fromFile, const char* toFile, bool always); + bool InstallDirectory(const char* source, const char* destination, + bool always); + + // All instances need the file command and makefile using them. + cmFileInstaller(cmFileCommand* fc, cmMakefile* mf): + FileCommand(fc), Makefile(mf), DestDirLength(0), MatchlessFiles(true) + { + // Get the current manifest. + this->Manifest = + this->Makefile->GetSafeDefinition("CMAKE_INSTALL_MANIFEST_FILES"); + } + ~cmFileInstaller() + { + // Save the updated install manifest. + this->Makefile->AddDefinition("CMAKE_INSTALL_MANIFEST_FILES", + this->Manifest.c_str()); + } + +private: + cmFileCommand* FileCommand; + cmMakefile* Makefile; + cmFileTimeComparison FileTimes; +public: + + // The length of the destdir setting. + int DestDirLength; + + // Whether to install a file not matching any expression. + bool MatchlessFiles; + + // The current file manifest (semicolon separated list). + std::string Manifest; + + // Permissions for files and directories installed by this object. + mode_t FilePermissions; + mode_t DirPermissions; + + // Properties set by pattern and regex match rules. + struct MatchProperties + { + bool Exclude; + mode_t Permissions; + MatchProperties(): Exclude(false), Permissions(0) {} + }; + struct MatchRule + { + cmsys::RegularExpression Regex; + MatchProperties Properties; + std::string RegexString; + MatchRule(std::string const& regex): + Regex(regex.c_str()), RegexString(regex) {} + }; + std::vector MatchRules; + + // Get the properties from rules matching this input file. + MatchProperties CollectMatchProperties(const char* file, + bool isDirectory) + { + // Match rules are case-insensitive on some platforms. +#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) + std::string lower = cmSystemTools::LowerCase(file); + file = lower.c_str(); +#endif + + // Collect properties from all matching rules. + bool matched = false; + MatchProperties result; + for(std::vector::iterator mr = this->MatchRules.begin(); + mr != this->MatchRules.end(); ++mr) + { + if(mr->Regex.find(file)) + { + matched = true; + result.Exclude |= mr->Properties.Exclude; + result.Permissions |= mr->Properties.Permissions; + } + } + if(!matched && !this->MatchlessFiles && !isDirectory) + { + result.Exclude = true; + } + return result; + } + + // Append a file to the installation manifest. + void ManifestAppend(std::string const& file) + { + this->Manifest += ";"; + this->Manifest += file.substr(this->DestDirLength); + } + + // Translate an argument to a permissions bit. + bool CheckPermissions(std::string const& arg, mode_t& permissions) + { + if(arg == "OWNER_READ") { permissions |= mode_owner_read; } + else if(arg == "OWNER_WRITE") { permissions |= mode_owner_write; } + else if(arg == "OWNER_EXECUTE") { permissions |= mode_owner_execute; } + else if(arg == "GROUP_READ") { permissions |= mode_group_read; } + else if(arg == "GROUP_WRITE") { permissions |= mode_group_write; } + else if(arg == "GROUP_EXECUTE") { permissions |= mode_group_execute; } + else if(arg == "WORLD_READ") { permissions |= mode_world_read; } + else if(arg == "WORLD_WRITE") { permissions |= mode_world_write; } + else if(arg == "WORLD_EXECUTE") { permissions |= mode_world_execute; } + else if(arg == "SETUID") { permissions |= mode_setuid; } + else if(arg == "SETGID") { permissions |= mode_setgid; } + else + { + cmOStringStream e; + e << "INSTALL given invalid permission \"" << arg << "\"."; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + return true; + } + +private: + bool InstallSymlink(const char* fromFile, const char* toFile, bool always); +}; + +//---------------------------------------------------------------------------- +bool cmFileInstaller::InstallSymlink(const char* fromFile, const char* toFile, + bool always) +{ + // Read the original symlink. + std::string symlinkTarget; + if(!cmSystemTools::ReadSymlink(fromFile, symlinkTarget)) + { + cmOStringStream e; + e << "INSTALL cannot read symlink \"" << fromFile + << "\" to duplicate at \"" << toFile << "\"."; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + + // Compare the symlink value to that at the destination if not + // always installing. + bool copy = true; + if(!always) + { + std::string oldSymlinkTarget; + if(cmSystemTools::ReadSymlink(toFile, oldSymlinkTarget)) + { + if(symlinkTarget == oldSymlinkTarget) + { + copy = false; + } + } + } + + // Inform the user about this file installation. + std::string message = (copy? "Installing: " : "Up-to-date: "); + message += toFile; + this->Makefile->DisplayStatus(message.c_str(), -1); + + if(copy) + { + // Remove the destination file so we can always create the symlink. + cmSystemTools::RemoveFile(toFile); + + // Create the symlink. + if(!cmSystemTools::CreateSymlink(symlinkTarget.c_str(), toFile)) + { + cmOStringStream e; + e << "INSTALL cannot duplicate symlink \"" << fromFile + << "\" at \"" << toFile << "\"."; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + } + + // Add the file to the manifest. + this->ManifestAppend(toFile); + + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileInstaller::InstallFile(const char* fromFile, const char* toFile, + bool always) +{ + // Collect any properties matching this file name. + MatchProperties match_properties = + this->CollectMatchProperties(fromFile, false); + + // Skip the file if it is excluded. + if(match_properties.Exclude) + { + return true; + } + + // Short-circuit for symbolic links. + if(cmSystemTools::FileIsSymlink(fromFile)) + { + return this->InstallSymlink(fromFile, toFile, always); + } + + // Determine whether we will copy the file. + bool copy = true; + if(!always) + { + // If both files exist with the same time do not copy. + if(!this->FileTimes.FileTimesDiffer(fromFile, toFile)) + { + copy = false; + } + } + + // Inform the user about this file installation. + std::string message = (copy? "Installing: " : "Up-to-date: "); + message += toFile; + this->Makefile->DisplayStatus(message.c_str(), -1); + + // Copy the file. + if(copy && !cmSystemTools::CopyAFile(fromFile, toFile, true)) + { + cmOStringStream e; + e << "INSTALL cannot copy file \"" << fromFile + << "\" to \"" << toFile << "\"."; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + + // Add the file to the manifest. + this->ManifestAppend(toFile); + + // Set the file modification time of the destination file. + if(copy && !always) + { + cmSystemTools::CopyFileTime(fromFile, toFile); + } + + // Set permissions of the destination file. + mode_t permissions = (match_properties.Permissions? + match_properties.Permissions : this->FilePermissions); + if(!permissions) + { + // No permissions were explicitly provided but the user requested + // that the source file permissions be used. + cmSystemTools::GetPermissions(fromFile, permissions); + } + if(permissions && !cmSystemTools::SetPermissions(toFile, permissions)) + { + cmOStringStream e; + e << "Problem setting permissions on file \"" << toFile << "\""; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileInstaller::InstallDirectory(const char* source, + const char* destination, + bool always) +{ + // Collect any properties matching this directory name. + MatchProperties match_properties = + this->CollectMatchProperties(source, true); + + // Skip the directory if it is excluded. + if(match_properties.Exclude) + { + return true; + } + + // Short-circuit for symbolic links. + if(cmSystemTools::FileIsSymlink(source)) + { + return this->InstallSymlink(source, destination, always); + } + + // Inform the user about this directory installation. + std::string message = "Installing: "; + message += destination; + this->Makefile->DisplayStatus(message.c_str(), -1); + + // Make sure the destination directory exists. + if(!cmSystemTools::MakeDirectory(destination)) + { + return false; + } + + // Compute the requested permissions for the destination directory. + mode_t permissions = (match_properties.Permissions? + match_properties.Permissions : this->DirPermissions); + if(!permissions) + { + // No permissions were explicitly provided but the user requested + // that the source directory permissions be used. + cmSystemTools::GetPermissions(source, permissions); + } + + // Compute the set of permissions required on this directory to + // recursively install files and subdirectories safely. + mode_t required_permissions = + mode_owner_read | mode_owner_write | mode_owner_execute; + + // If the required permissions are specified it is safe to set the + // final permissions now. Otherwise we must add the required + // permissions temporarily during file installation. + mode_t permissions_before = 0; + mode_t permissions_after = 0; + if(permissions & required_permissions) + { + permissions_before = permissions; + } + else + { + permissions_before = permissions | required_permissions; + permissions_after = permissions; + } + + // Set the required permissions of the destination directory. + if(permissions_before && + !cmSystemTools::SetPermissions(destination, permissions_before)) + { + cmOStringStream e; + e << "Problem setting permissions on directory \"" + << destination << "\""; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + + // Load the directory contents to traverse it recursively. + cmsys::Directory dir; + if(source && *source) + { + dir.Load(source); + } + unsigned long numFiles = static_cast(dir.GetNumberOfFiles()); + for(unsigned long fileNum = 0; fileNum < numFiles; ++fileNum) + { + if(!(strcmp(dir.GetFile(fileNum), ".") == 0 || + strcmp(dir.GetFile(fileNum), "..") == 0)) + { + cmsys_stl::string fromPath = source; + fromPath += "/"; + fromPath += dir.GetFile(fileNum); + if(cmSystemTools::FileIsDirectory(fromPath.c_str())) + { + cmsys_stl::string toDir = destination; + toDir += "/"; + toDir += dir.GetFile(fileNum); + if(!this->InstallDirectory(fromPath.c_str(), toDir.c_str(), always)) + { + return false; + } + } + else + { + // Install this file. + std::string toFile = destination; + toFile += "/"; + toFile += dir.GetFile(fileNum); + if(!this->InstallFile(fromPath.c_str(), toFile.c_str(), always)) + { + return false; + } + } + } + } + + // Set the requested permissions of the destination directory. + if(permissions_after && + !cmSystemTools::SetPermissions(destination, permissions_after)) + { + cmOStringStream e; + e << "Problem setting permissions on directory \"" << destination << "\""; + this->FileCommand->SetError(e.str().c_str()); + return false; + } + + return true; +} + +//---------------------------------------------------------------------------- +void cmFileCommand::HandleInstallPermissions(cmFileInstaller& installer, + mode_t& permissions_file, + mode_t& permissions_dir, + int itype, + bool use_given_permissions_file, + bool use_given_permissions_dir, + bool use_source_permissions) const +{ + // Choose a default for shared library permissions. + bool install_so_no_exe = this->Makefile->IsOn("CMAKE_INSTALL_SO_NO_EXE"); + // If file permissions were not specified set default permissions + // for this target type. + if(!use_given_permissions_file && !use_source_permissions) + { + switch(itype) + { + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + if(install_so_no_exe) + { + // Use read/write permissions. + permissions_file = 0; + permissions_file |= mode_owner_read; + permissions_file |= mode_owner_write; + permissions_file |= mode_group_read; + permissions_file |= mode_world_read; + break; + } + case cmTarget::EXECUTABLE: + case cmTarget::INSTALL_PROGRAMS: + // Use read/write/executable permissions. + permissions_file = 0; + permissions_file |= mode_owner_read; + permissions_file |= mode_owner_write; + permissions_file |= mode_owner_execute; + permissions_file |= mode_group_read; + permissions_file |= mode_group_execute; + permissions_file |= mode_world_read; + permissions_file |= mode_world_execute; + break; + default: + // Use read/write permissions. + permissions_file = 0; + permissions_file |= mode_owner_read; + permissions_file |= mode_owner_write; + permissions_file |= mode_group_read; + permissions_file |= mode_world_read; + break; + } + } + + // If directory permissions were not specified set default permissions. + if(!use_given_permissions_dir && !use_source_permissions) + { + // Use read/write/executable permissions. + permissions_dir = 0; + permissions_dir |= mode_owner_read; + permissions_dir |= mode_owner_write; + permissions_dir |= mode_owner_execute; + permissions_dir |= mode_group_read; + permissions_dir |= mode_group_execute; + permissions_dir |= mode_world_read; + permissions_dir |= mode_world_execute; + } + // Set the installer permissions. + installer.FilePermissions = permissions_file; + installer.DirPermissions = permissions_dir; +} + +//---------------------------------------------------------------------------- +void cmFileCommand +::GetTargetTypeFromString(const std::string& stype, int& itype) const +{ + if ( stype == "EXECUTABLE" ) + { + itype = cmTarget::EXECUTABLE; + } + else if ( stype == "PROGRAM" ) + { + itype = cmTarget::INSTALL_PROGRAMS; + } + else if ( stype == "STATIC_LIBRARY" ) + { + itype = cmTarget::STATIC_LIBRARY; + } + else if ( stype == "SHARED_LIBRARY" ) + { + itype = cmTarget::SHARED_LIBRARY; + } + else if ( stype == "MODULE" ) + { + itype = cmTarget::MODULE_LIBRARY; + } + else if ( stype == "DIRECTORY" ) + { + itype = cmTarget::INSTALL_DIRECTORY; + } +} + + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleInstallDestination(cmFileInstaller& installer, + std::string& destination) +{ + // allow for / to be a valid destination + if ( destination.size() < 2 && destination != "/" ) + { + this->SetError("called with inapropriate arguments. " + "No DESTINATION provided or ."); + return false; + } + + const char* destdir = cmSystemTools::GetEnv("DESTDIR"); + if ( destdir && *destdir ) + { + std::string sdestdir = destdir; + cmSystemTools::ConvertToUnixSlashes(sdestdir); + char ch1 = destination[0]; + char ch2 = destination[1]; + char ch3 = 0; + if ( destination.size() > 2 ) + { + ch3 = destination[2]; + } + int skip = 0; + if ( ch1 != '/' ) + { + int relative = 0; + if ( ( ch1 >= 'a' && ch1 <= 'z' || ch1 >= 'A' && ch1 <= 'Z' ) && + ch2 == ':' ) + { + // Assume windows + // let's do some destdir magic: + skip = 2; + if ( ch3 != '/' ) + { + relative = 1; + } + } + else + { + relative = 1; + } + if ( relative ) + { + // This is relative path on unix or windows. Since we are doing + // destdir, this case does not make sense. + this->SetError("called with relative DESTINATION. This " + "does not make sense when using DESTDIR. Specify " + "absolute path or remove DESTDIR environment variable."); + return false; + } + } + else + { + if ( ch2 == '/' ) + { + // looks like a network path. + std::string message = "called with network path DESTINATION. This " + "does not make sense when using DESTDIR. Specify local " + "absolute path or remove DESTDIR environment variable." + "\nDESTINATION=\n"; + message += destination; + this->SetError(message.c_str()); + return false; + } + } + destination = sdestdir + (destination.c_str() + skip); + installer.DestDirLength = int(sdestdir.size()); + } + + if ( !cmSystemTools::FileExists(destination.c_str()) ) + { + if ( !cmSystemTools::MakeDirectory(destination.c_str()) ) + { + std::string errstring = "cannot create directory: " + destination + + ". Maybe need administrative privileges."; + this->SetError(errstring.c_str()); + return false; + } + } + if ( !cmSystemTools::FileIsDirectory(destination.c_str()) ) + { + std::string errstring = "INSTALL destination: " + destination + + " is not a directory."; + this->SetError(errstring.c_str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool +cmFileCommand::HandleRPathChangeCommand(std::vector const& args) +{ + // Evaluate arguments. + const char* file = 0; + const char* oldRPath = 0; + const char* newRPath = 0; + enum Doing { DoingNone, DoingFile, DoingOld, DoingNew }; + Doing doing = DoingNone; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "OLD_RPATH") + { + doing = DoingOld; + } + else if(args[i] == "NEW_RPATH") + { + doing = DoingNew; + } + else if(args[i] == "FILE") + { + doing = DoingFile; + } + else if(doing == DoingFile) + { + file = args[i].c_str(); + doing = DoingNone; + } + else if(doing == DoingOld) + { + oldRPath = args[i].c_str(); + doing = DoingNone; + } + else if(doing == DoingNew) + { + newRPath = args[i].c_str(); + doing = DoingNone; + } + else + { + cmOStringStream e; + e << "RPATH_CHANGE given unknown argument " << args[i]; + this->SetError(e.str().c_str()); + return false; + } + } + if(!file) + { + this->SetError("RPATH_CHANGE not given FILE option."); + return false; + } + if(!oldRPath) + { + this->SetError("RPATH_CHANGE not given OLD_RPATH option."); + return false; + } + if(!newRPath) + { + this->SetError("RPATH_CHANGE not given NEW_RPATH option."); + return false; + } + if(!cmSystemTools::FileExists(file, true)) + { + cmOStringStream e; + e << "RPATH_CHANGE given FILE \"" << file << "\" that does not exist."; + this->SetError(e.str().c_str()); + return false; + } + bool success = true; + cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew(); + bool have_ft = cmSystemTools::FileTimeGet(file, ft); + std::string emsg; + if(!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg)) + { + cmOStringStream e; + e << "RPATH_CHANGE could not write new RPATH:\n" + << " " << newRPath << "\n" + << "to the file:\n" + << " " << file << "\n" + << emsg; + this->SetError(e.str().c_str()); + success = false; + } + if(success && have_ft) + { + cmSystemTools::FileTimeSet(file, ft); + } + cmSystemTools::FileTimeDelete(ft); + return success; +} + +//---------------------------------------------------------------------------- +bool +cmFileCommand::HandleRPathRemoveCommand(std::vector const& args) +{ + // Evaluate arguments. + const char* file = 0; + enum Doing { DoingNone, DoingFile }; + Doing doing = DoingNone; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "FILE") + { + doing = DoingFile; + } + else if(doing == DoingFile) + { + file = args[i].c_str(); + doing = DoingNone; + } + else + { + cmOStringStream e; + e << "RPATH_REMOVE given unknown argument " << args[i]; + this->SetError(e.str().c_str()); + return false; + } + } + if(!file) + { + this->SetError("RPATH_REMOVE not given FILE option."); + return false; + } + if(!cmSystemTools::FileExists(file, true)) + { + cmOStringStream e; + e << "RPATH_REMOVE given FILE \"" << file << "\" that does not exist."; + this->SetError(e.str().c_str()); + return false; + } + bool success = true; + cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew(); + bool have_ft = cmSystemTools::FileTimeGet(file, ft); + std::string emsg; + if(!cmSystemTools::RemoveRPath(file, &emsg)) + { + cmOStringStream e; + e << "RPATH_REMOVE could not remove RPATH from file:\n" + << " " << file << "\n" + << emsg; + this->SetError(e.str().c_str()); + success = false; + } + if(success && have_ft) + { + cmSystemTools::FileTimeSet(file, ft); + } + cmSystemTools::FileTimeDelete(ft); + return success; +} + +//---------------------------------------------------------------------------- +bool +cmFileCommand::HandleRPathCheckCommand(std::vector const& args) +{ + // Evaluate arguments. + const char* file = 0; + const char* rpath = 0; + enum Doing { DoingNone, DoingFile, DoingRPath }; + Doing doing = DoingNone; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "RPATH") + { + doing = DoingRPath; + } + else if(args[i] == "FILE") + { + doing = DoingFile; + } + else if(doing == DoingFile) + { + file = args[i].c_str(); + doing = DoingNone; + } + else if(doing == DoingRPath) + { + rpath = args[i].c_str(); + doing = DoingNone; + } + else + { + cmOStringStream e; + e << "RPATH_CHECK given unknown argument " << args[i]; + this->SetError(e.str().c_str()); + return false; + } + } + if(!file) + { + this->SetError("RPATH_CHECK not given FILE option."); + return false; + } + if(!rpath) + { + this->SetError("RPATH_CHECK not given RPATH option."); + return false; + } + + // If the file exists but does not have the desired RPath then + // delete it. This is used during installation to re-install a file + // if its RPath will change. + if(cmSystemTools::FileExists(file, true) && + !cmSystemTools::CheckRPath(file, rpath)) + { + cmSystemTools::RemoveFile(file); + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleInstallCommand(std::vector const& args) +{ + if ( args.size() < 6 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Construct a file installer object. + cmFileInstaller installer(this, this->Makefile); + + std::string rename = ""; + std::string destination = ""; + + std::vector files; + int itype = cmTarget::INSTALL_FILES; + + std::map properties; + bool optional = false; + bool result = this->ParseInstallArgs(args, installer, properties, + itype, rename, destination, files, + optional); + if (result == true) + { + result = this->DoInstall(installer, + itype, rename, destination, files, optional); + } + return result; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::ParseInstallArgs(std::vector const& args, + cmFileInstaller& installer, + std::map& properties, + int& itype, + std::string& rename, + std::string& destination, + std::vector& files, + bool& optional) +{ + std::string stype = "FILES"; + bool doing_files = false; + bool doing_properties = false; + bool doing_permissions_file = false; + bool doing_permissions_dir = false; + bool doing_permissions_match = false; + bool use_given_permissions_file = false; + bool use_given_permissions_dir = false; + bool use_source_permissions = false; + mode_t permissions_file = 0; + mode_t permissions_dir = 0; + + cmFileInstaller::MatchRule* current_match_rule = 0; + std::vector::size_type i = 0; + i++; // Get rid of subcommand + for ( ; i != args.size(); ++i ) + { + const std::string* cstr = &args[i]; + if ( *cstr == "DESTINATION" && i < args.size()-1 ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + i++; + destination = args[i]; + doing_files = false; + doing_properties = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( *cstr == "TYPE" && i < args.size()-1 ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + i++; + stype = args[i]; + if ( args[i+1] == "OPTIONAL" ) + { + i++; + optional = true; + } + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( *cstr == "RENAME" && i < args.size()-1 ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + i++; + rename = args[i]; + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( *cstr == "REGEX" && i < args.size()-1 ) + { + i++; + installer.MatchRules.push_back(cmFileInstaller::MatchRule(args[i])); + current_match_rule = &*(installer.MatchRules.end()-1); + if(!current_match_rule->Regex.is_valid()) + { + cmOStringStream e; + e << "INSTALL could not compile REGEX \"" << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( *cstr == "EXCLUDE" ) + { + // Add this property to the current match rule. + if(!current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" + << *cstr << "\" before a REGEX is given."; + this->SetError(e.str().c_str()); + return false; + } + current_match_rule->Properties.Exclude = true; + doing_permissions_match = true; + } + else if ( *cstr == "PROPERTIES" ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + doing_properties = true; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( *cstr == "PERMISSIONS" ) + { + if(current_match_rule) + { + doing_permissions_match = true; + doing_permissions_file = false; + } + else + { + doing_permissions_match = false; + doing_permissions_file = true; + use_given_permissions_file = true; + } + doing_properties = false; + doing_files = false; + doing_permissions_dir = false; + } + else if ( *cstr == "DIR_PERMISSIONS" ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + use_given_permissions_dir = true; + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = true; + } + else if ( *cstr == "USE_SOURCE_PERMISSIONS" ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + use_source_permissions = true; + } + else if ( *cstr == "FILES_MATCHING" ) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + doing_properties = false; + doing_files = false; + doing_permissions_file = false; + doing_permissions_dir = false; + installer.MatchlessFiles = false; + } + else if ( *cstr == "COMPONENTS" ) + { + cmOStringStream e; + e << "INSTALL called with old-style COMPONENTS argument. " + << "This script was generated with an older version of CMake. " + << "Re-run this cmake version on your build tree."; + this->SetError(e.str().c_str()); + return false; + } + else if ( *cstr == "CONFIGURATIONS" ) + { + cmOStringStream e; + e << "INSTALL called with old-style CONFIGURATIONS argument. " + << "This script was generated with an older version of CMake. " + << "Re-run this cmake version on your build tree."; + this->SetError(e.str().c_str()); + return false; + } + else if ( *cstr == "FILES" && !doing_files) + { + if(current_match_rule) + { + cmOStringStream e; + e << "INSTALL does not allow \"" << *cstr << "\" after REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + doing_files = true; + doing_properties = false; + doing_permissions_file = false; + doing_permissions_dir = false; + } + else if ( doing_properties && i < args.size()-1 ) + { + properties[args[i]] = args[i+1].c_str(); + i++; + } + else if ( doing_files ) + { + files.push_back(*cstr); + } + else if(doing_permissions_file) + { + if(!installer.CheckPermissions(args[i], permissions_file)) + { + return false; + } + } + else if(doing_permissions_dir) + { + if(!installer.CheckPermissions(args[i], permissions_dir)) + { + return false; + } + } + else if(doing_permissions_match) + { + if(!installer.CheckPermissions( + args[i], current_match_rule->Properties.Permissions)) + { + return false; + } + } + else + { + this->SetError("called with inappropriate arguments"); + return false; + } + } + + // now check and postprocess what has been parsed + if ( files.size() == 0 ) + { + // nothing to do, no files were listed. + // if this is handled as error, INSTALL_FILES() creates an invalid + // cmake_install.cmake script with no FILES() arguments if no files were + // given to INSTALL_FILES(). This was accepted with CMake 2.4.x. + return true; + } + + // Check rename form. + if(!rename.empty()) + { + if(itype != cmTarget::INSTALL_FILES && + itype != cmTarget::INSTALL_PROGRAMS) + { + this->SetError("INSTALL option RENAME may be used only with " + "FILES or PROGRAMS."); + return false; + } + if(files.size() > 1) + { + this->SetError("INSTALL option RENAME may be used only with " + "one file."); + return false; + } + } + + if (this->HandleInstallDestination(installer, destination) == false) + { + return false; + } + + if(properties.find("VERSION") != properties.end()) + { + cmOStringStream e; + e << "INSTALL called with old-style VERSION property. " + << "This script was generated with an older version of CMake. " + << "Re-run this cmake version on your build tree."; + this->SetError(e.str().c_str()); + return false; + } + if(properties.find("SOVERSION") != properties.end()) + { + cmOStringStream e; + e << "INSTALL called with old-style SOVERSION property. " + << "This script was generated with an older version of CMake. " + << "Re-run this cmake version on your build tree."; + this->SetError(e.str().c_str()); + return false; + } + + this->GetTargetTypeFromString(stype, itype); + + this->HandleInstallPermissions(installer, + permissions_file, + permissions_dir, + itype, + use_given_permissions_file, + use_given_permissions_dir, + use_source_permissions); + + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::DoInstall( cmFileInstaller& installer, + const int itype, + const std::string& rename, + const std::string& destination, + const std::vector& files, + const bool optional) +{ + typedef std::set::const_iterator iter_type; + + // Check whether files should be copied always or only if they have + // changed. + bool copy_always = + cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_INSTALL_ALWAYS")); + + // Handle each file listed. + for (std::vector::size_type i = 0; i < files.size(); i ++ ) + { + // Split the input file into its directory and name components. + std::vector fromPathComponents; + cmSystemTools::SplitPath(files[i].c_str(), fromPathComponents); + std::string fromName = *(fromPathComponents.end()-1); + std::string fromDir = cmSystemTools::JoinPath(fromPathComponents.begin(), + fromPathComponents.end()-1); + + // Compute the full path to the destination file. + std::string toFile = destination; + std::string const& toName = rename.empty()? fromName : rename; + if(!toName.empty()) + { + toFile += "/"; + toFile += toName; + } + + // Construct the full path to the source file. The file name may + // have been changed above. + std::string fromFile = fromDir; + if(!fromName.empty()) + { + fromFile += "/"; + fromFile += fromName; + } + + std::string message; + if(!cmSystemTools::SameFile(fromFile.c_str(), toFile.c_str())) + { + if(itype == cmTarget::INSTALL_DIRECTORY && + (fromFile.empty() || + cmSystemTools::FileIsDirectory(fromFile.c_str()))) + { + // Try installing this directory. + if(!installer.InstallDirectory(fromFile.c_str(), toFile.c_str(), + copy_always)) + { + return false; + } + } + else if(cmSystemTools::FileExists(fromFile.c_str())) + { + // Install this file. + if(!installer.InstallFile(fromFile.c_str(), toFile.c_str(), + copy_always)) + { + return false; + } + } + else if(!optional) + { + // The input file does not exist and installation is not optional. + cmOStringStream e; + e << "INSTALL cannot find file \"" << fromFile << "\" to install."; + this->SetError(e.str().c_str()); + return false; + } + } + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleRelativePathCommand( + std::vector const& args) +{ + if(args.size() != 4 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + const std::string& outVar = args[1]; + const std::string& directoryName = args[2]; + const std::string& fileName = args[3]; + + if(!cmSystemTools::FileIsFullPath(directoryName.c_str())) + { + std::string errstring = + "RelativePath must be passed a full path to the directory: " + + directoryName; + this->SetError(errstring.c_str()); + return false; + } + if(!cmSystemTools::FileIsFullPath(fileName.c_str())) + { + std::string errstring = + "RelativePath must be passed a full path to the file: " + + fileName; + this->SetError(errstring.c_str()); + return false; + } + + std::string res = cmSystemTools::RelativePath(directoryName.c_str(), + fileName.c_str()); + this->Makefile->AddDefinition(outVar.c_str(), + res.c_str()); + return true; +} + + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleRemove(std::vector const& args, + bool recurse) +{ + + std::string message; + std::vector::const_iterator i = args.begin(); + + i++; // Get rid of subcommand + for(;i != args.end(); ++i) + { + if(cmSystemTools::FileIsDirectory(i->c_str()) && recurse) + { + cmSystemTools::RemoveADirectory(i->c_str()); + } + else + { + cmSystemTools::RemoveFile(i->c_str()); + } + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmFileCommand::HandleCMakePathCommand(std::vector + const& args, + bool nativePath) +{ + std::vector::const_iterator i = args.begin(); + if(args.size() != 3) + { + this->SetError("FILE(SYSTEM_PATH ENV result) must be called with " + "only three arguments."); + return false; + } + i++; // Get rid of subcommand +#if defined(_WIN32) && !defined(__CYGWIN__) + char pathSep = ';'; +#else + char pathSep = ':'; +#endif + std::vector path = cmSystemTools::SplitString(i->c_str(), + pathSep); + i++; + const char* var = i->c_str(); + std::string value; + for(std::vector::iterator j = path.begin(); + j != path.end(); ++j) + { + if(j != path.begin()) + { + value += ";"; + } + if(!nativePath) + { + cmSystemTools::ConvertToUnixSlashes(*j); + } + else + { + *j = cmSystemTools::ConvertToOutputPath(j->c_str()); + // remove double quotes in the path + cmsys::String& s = *j; + + if(s.size() > 1 && s[0] == '\"' && s[s.size()-1] == '\"') + { + s = s.substr(1,s.size()-2); + } + } + value += *j; + } + this->Makefile->AddDefinition(var, value.c_str()); + return true; +} +#if defined(CMAKE_BUILD_WITH_CMAKE) + +// Stuff for curl download +typedef std::vector cmFileCommandVectorOfChar; +namespace{ + size_t + cmFileCommandWriteMemoryCallback(void *ptr, size_t size, size_t nmemb, + void *data) + { + register int realsize = (int)(size * nmemb); + std::ofstream* fout = static_cast(data); + const char* chPtr = static_cast(ptr); + fout->write(chPtr, realsize); + return realsize; + } + + static size_t + cmFileCommandCurlDebugCallback(CURL *, curl_infotype, char *chPtr, + size_t size, void *data) + { + cmFileCommandVectorOfChar *vec + = static_cast(data); + vec->insert(vec->end(), chPtr, chPtr + size); + + return size; + } + + +} + +#endif + +bool +cmFileCommand::HandleDownloadCommand(std::vector + const& args) +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + std::vector::const_iterator i = args.begin(); + if(args.size() < 3) + { + this->SetError("FILE(DOWNLOAD url file) must be called with " + "at least three arguments."); + return false; + } + i++; // Get rid of subcommand + std::string url = *i; + i++; + std::string file = *i; + i++; + double timeout = 0; + std::string verboseLog; + std::string statusVar; + while(i != args.end()) + { + if(*i == "TIMEOUT") + { + i++; + if(i != args.end()) + { + timeout = atof(i->c_str()); + } + else + { + this->SetError("FILE(DOWNLOAD url file TIMEOUT time) missing " + "time for TIMEOUT."); + return false; + } + } + else if(*i == "LOG") + { + i++; + if( i == args.end()) + { + this->SetError("FILE(DOWNLOAD url file LOG VAR) missing " + "VAR for LOG."); + return false; + } + verboseLog = *i; + } + else if(*i == "STATUS") + { + i++; + if( i == args.end()) + { + this->SetError("FILE(DOWNLOAD url file STATUS VAR) missing " + "VAR for STATUS."); + return false; + } + statusVar = *i; + } + i++; + } + + std::string dir = cmSystemTools::GetFilenamePath(file.c_str()); + if(!cmSystemTools::FileExists(dir.c_str()) && + !cmSystemTools::MakeDirectory(dir.c_str())) + { + std::string errstring = "FILE(DOWNLOAD ) error; cannot create directory: " + + dir + ". Maybe need administrative privileges."; + this->SetError(errstring.c_str()); + return false; + } + + std::ofstream fout(file.c_str(), std::ios::binary); + if(!fout) + { + this->SetError("FILE(DOWNLOAD url file TIMEOUT time) can not open " + "file for write."); + return false; + } + CURL *curl; + curl_global_init(CURL_GLOBAL_DEFAULT); + curl = curl_easy_init(); + if(!curl) + { + this->SetError("FILE(DOWNLOAD ) error " + "initializing curl."); + return false; + } + + curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, + cmFileCommandWriteMemoryCallback); + curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, + cmFileCommandCurlDebugCallback); + cmFileCommandVectorOfChar chunkDebug; + ::curl_easy_setopt(curl, CURLOPT_FILE, (void *)&fout); + ::curl_easy_setopt(curl, CURLOPT_DEBUGDATA, (void *)&chunkDebug); + if(verboseLog.size()) + { + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + } + if(timeout > 0) + { + curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout ); + } + CURLcode res = curl_easy_perform(curl); + /* always cleanup */ + curl_easy_cleanup(curl); + if(statusVar.size()) + { + cmOStringStream result; + result << (int)res << ";\"" << curl_easy_strerror(res) << "\""; + this->Makefile->AddDefinition(statusVar.c_str(), + result.str().c_str()); + } + curl_global_cleanup(); + if(chunkDebug.size()) + { + chunkDebug.push_back(0); + if(CURLE_OPERATION_TIMEOUTED == res) + { + std::string output = &*chunkDebug.begin(); + + if(verboseLog.size()) + { + this->Makefile->AddDefinition(verboseLog.c_str(), + &*chunkDebug.begin()); + } + } + + this->Makefile->AddDefinition(verboseLog.c_str(), + &*chunkDebug.begin()); + } + return true; +#else + this->SetError("FILE(DOWNLOAD ) " + "not supported in bootstrap cmake "); + return false; +#endif +} diff --git a/Source/cmFileCommand.h b/Source/cmFileCommand.h new file mode 100644 index 000000000..89ff7ba7a --- /dev/null +++ b/Source/cmFileCommand.h @@ -0,0 +1,206 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFileCommand.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.35.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFileCommand_h +#define cmFileCommand_h + +#include "cmCommand.h" + +struct cmFileInstaller; + +/** \class cmFileCommand + * \brief Command for manipulation of files + * + */ +class cmFileCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFileCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "file";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "File manipulation command."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " file(WRITE filename \"message to write\"... )\n" + " file(APPEND filename \"message to write\"... )\n" + " file(READ filename variable [LIMIT numBytes] [OFFSET offset] [HEX])\n" + " file(STRINGS filename variable [LIMIT_COUNT num]\n" + " [LIMIT_INPUT numBytes] [LIMIT_OUTPUT numBytes]\n" + " [LENGTH_MINIMUM numBytes] [LENGTH_MAXIMUM numBytes]\n" + " [NEWLINE_CONSUME] [REGEX regex]\n" + " [NO_HEX_CONVERSION])\n" + " file(GLOB variable [RELATIVE path] [globbing expressions]...)\n" + " file(GLOB_RECURSE variable [RELATIVE path] \n" + " [globbing expressions]...)\n" + " file(REMOVE [file1 ...])\n" + " file(REMOVE_RECURSE [file1 ...])\n" + " file(MAKE_DIRECTORY [directory1 directory2 ...])\n" + " file(RELATIVE_PATH variable directory file)\n" + " file(TO_CMAKE_PATH path result)\n" + " file(TO_NATIVE_PATH path result)\n" + " file(DOWNLOAD url file [TIMEOUT timeout] [STATUS status] [LOG log])\n" + "WRITE will write a message into a file called 'filename'. It " + "overwrites the file if it already exists, and creates the file " + "if it does not exist.\n" + "APPEND will write a message into a file same as WRITE, except " + "it will append it to the end of the file\n" + "READ will read the content of a file and store it into the " + "variable. It will start at the given offset and read up to numBytes. " + "If the argument HEX is given, the binary data will be converted to " + "hexadecimal representation and this will be stored in the variable.\n" + "STRINGS will parse a list of ASCII strings from a file and " + "store it in a variable. Binary data in the file are ignored. Carriage " + "return (CR) characters are ignored. It works also for Intel Hex and " + "Motorola S-record files, which are automatically converted to binary " + "format when reading them. Disable this using NO_HEX_CONVERSION.\n" + "LIMIT_COUNT sets the maximum number of strings to return. " + "LIMIT_INPUT sets the maximum number of bytes to read from " + "the input file. " + "LIMIT_OUTPUT sets the maximum number of bytes to store in the " + "output variable. " + "LENGTH_MINIMUM sets the minimum length of a string to return. " + "Shorter strings are ignored. " + "LENGTH_MAXIMUM sets the maximum length of a string to return. Longer " + "strings are split into strings no longer than the maximum length. " + "NEWLINE_CONSUME allows newlines to be included in strings instead " + "of terminating them.\n" + "REGEX specifies a regular expression that a string must match to be " + "returned. Typical usage \n" + " file(STRINGS myfile.txt myfile)\n" + "stores a list in the variable \"myfile\" in which each item is " + "a line from the input file.\n" + "GLOB will generate a list of all files that match the globbing " + "expressions and store it into the variable. Globbing expressions " + "are similar to regular expressions, but much simpler. If RELATIVE " + "flag is specified for an expression, the results will be returned " + "as a relative path to the given path.\n" + "Examples of globbing expressions include:\n" + " *.cxx - match all files with extension cxx\n" + " *.vt? - match all files with extension vta,...,vtz\n" + " f[3-5].txt - match files f3.txt, f4.txt, f5.txt\n" + "GLOB_RECURSE will generate similar list as the regular GLOB, except " + "it will traverse all the subdirectories of the matched directory and " + "match the files.\n" + "Examples of recursive globbing include:\n" + " /dir/*.py - match all python files in /dir and subdirectories\n" + "MAKE_DIRECTORY will create the given directories, also if their parent " + "directories don't exist yet\n" + "REMOVE will remove the given files, also in subdirectories\n" + "REMOVE_RECURSE will remove the given files and directories, also " + "non-empty directories\n" + "RELATIVE_PATH will determine relative path from directory to the given" + " file.\n" + "TO_CMAKE_PATH will convert path into a cmake style path with unix /. " + " The input can be a single path or a system path like \"$ENV{PATH}\". " + " Note the double quotes around the ENV call TO_CMAKE_PATH only takes " + " one argument.\n" + "TO_NATIVE_PATH works just like TO_CMAKE_PATH, but will convert from " + " a cmake style path into the native path style \\ for windows and / " + "for UNIX.\n" + "DOWNLOAD will download the givin URL to the given file. " + "If LOG var is specified a log of the download will be put in var. " + "If STATUS var is specified the status of the operation will" + " be put in var. The status is returned in a list of length 2. " + "The first element is the numeric return value for the operation, " + "and the second element is a string value for the error. A 0 " + "numeric error means no error in the operation. " + "If TIMEOUT time is specified, the operation will " + "timeout after time seconds, time can be specified as a float.\n"; + } + + cmTypeMacro(cmFileCommand, cmCommand); + +protected: + bool HandleRemove(std::vector const& args, bool recurse); + bool HandleWriteCommand(std::vector const& args, bool append); + bool HandleReadCommand(std::vector const& args); + bool HandleStringsCommand(std::vector const& args); + bool HandleGlobCommand(std::vector const& args, bool recurse); + bool HandleMakeDirectoryCommand(std::vector const& args); + + bool HandleRelativePathCommand(std::vector const& args); + bool HandleCMakePathCommand(std::vector const& args, + bool nativePath); + bool HandleRPathChangeCommand(std::vector const& args); + bool HandleRPathCheckCommand(std::vector const& args); + bool HandleRPathRemoveCommand(std::vector const& args); + + // file(INSTALL ...) related functions + bool HandleInstallCommand(std::vector const& args); + bool ParseInstallArgs(std::vector const& args, + cmFileInstaller& installer, + std::map& properties, + int& itype, + std::string& destination, + std::string& rename, + std::vector& files, + bool& optional + ); + bool DoInstall(cmFileInstaller& installer, + const int itype, + const std::string& rename, + const std::string& destination, + const std::vector& files, + const bool optional + ); + bool HandleDownloadCommand(std::vector const& args); + void GetTargetTypeFromString(const std::string& stype, int& itype) const; + bool HandleInstallDestination(cmFileInstaller& installer, + std::string& destination); + void HandleInstallPermissions(cmFileInstaller& installer, + mode_t& permissions_file, + mode_t& permissions_dir, + int itype, + bool use_given_permissions_file, + bool use_given_permissions_dir, + bool use_source_permissions) const; +}; + + +#endif diff --git a/Source/cmFileTimeComparison.cxx b/Source/cmFileTimeComparison.cxx new file mode 100644 index 000000000..ea81390f6 --- /dev/null +++ b/Source/cmFileTimeComparison.cxx @@ -0,0 +1,279 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFileTimeComparison.cxx,v $ + Language: C++ + Date: $Date: 2008-01-03 05:01:38 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFileTimeComparison.h" + +// Use a hash table to avoid duplicate file time checks from disk. +#if defined(CMAKE_BUILD_WITH_CMAKE) +# include +#endif + +// Use a platform-specific API to get file times efficiently. +#if !defined(_WIN32) || defined(__CYGWIN__) +# define cmFileTimeComparison_Type struct stat +# include +# include +#else +# define cmFileTimeComparison_Type FILETIME +# include +#endif + +//---------------------------------------------------------------------------- +class cmFileTimeComparisonInternal +{ +public: + // Internal comparison method. + inline bool FileTimeCompare(const char* f1, const char* f2, int* result); + + bool FileTimesDiffer(const char* f1, const char* f2); + +private: +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Use a hash table to efficiently map from file name to modification time. + class HashString + { + public: + size_t operator()(const cmStdString& s) const + { + return h(s.c_str()); + } + cmsys::hash h; + }; + typedef cmsys::hash_map FileStatsMap; + FileStatsMap Files; +#endif + + // Internal methods to lookup and compare modification times. + inline bool Stat(const char* fname, cmFileTimeComparison_Type* st); + inline int Compare(cmFileTimeComparison_Type* st1, + cmFileTimeComparison_Type* st2); + inline bool TimesDiffer(cmFileTimeComparison_Type* st1, + cmFileTimeComparison_Type* st2); +}; + +//---------------------------------------------------------------------------- +bool cmFileTimeComparisonInternal::Stat(const char* fname, + cmFileTimeComparison_Type* st) +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Use the stored time if available. + cmFileTimeComparisonInternal::FileStatsMap::iterator fit = + this->Files.find(fname); + if ( fit != this->Files.end() ) + { + *st = fit->second; + return true; + } +#endif + +#if !defined(_WIN32) || defined(__CYGWIN__) + // POSIX version. Use the stat function. + int res = ::stat(fname, st); + if ( res != 0 ) + { + return false; + } +#else + // Windows version. Get the modification time from extended file + // attributes. + WIN32_FILE_ATTRIBUTE_DATA fdata; + if(!GetFileAttributesEx(fname, GetFileExInfoStandard, &fdata)) + { + return false; + } + + // Copy the file time to the output location. + *st = fdata.ftLastWriteTime; +#endif + +#if defined(CMAKE_BUILD_WITH_CMAKE) + // Store the time for future use. + this->Files[fname] = *st; +#endif + + return true; +} + +//---------------------------------------------------------------------------- +cmFileTimeComparison::cmFileTimeComparison() +{ + this->Internals = new cmFileTimeComparisonInternal; +} + +//---------------------------------------------------------------------------- +cmFileTimeComparison::~cmFileTimeComparison() +{ + delete this->Internals; +} + +//---------------------------------------------------------------------------- +bool cmFileTimeComparison::FileTimeCompare(const char* f1, + const char* f2, int* result) +{ + return this->Internals->FileTimeCompare(f1, f2, result); +} + +//---------------------------------------------------------------------------- +bool cmFileTimeComparison::FileTimesDiffer(const char* f1, const char* f2) +{ + return this->Internals->FileTimesDiffer(f1, f2); +} + +//---------------------------------------------------------------------------- +int cmFileTimeComparisonInternal::Compare(cmFileTimeComparison_Type* s1, + cmFileTimeComparison_Type* s2) +{ +#if !defined(_WIN32) || defined(__CYGWIN__) +# if cmsys_STAT_HAS_ST_MTIM + // Compare using nanosecond resolution. + if(s1->st_mtim.tv_sec < s2->st_mtim.tv_sec) + { + return -1; + } + else if(s1->st_mtim.tv_sec > s2->st_mtim.tv_sec) + { + return 1; + } + else if(s1->st_mtim.tv_nsec < s2->st_mtim.tv_nsec) + { + return -1; + } + else if(s1->st_mtim.tv_nsec > s2->st_mtim.tv_nsec) + { + return 1; + } +# else + // Compare using 1 second resolution. + if(s1->st_mtime < s2->st_mtime) + { + return -1; + } + else if(s1->st_mtime > s2->st_mtime) + { + return 1; + } +# endif + // Files have the same time. + return 0; +#else + // Compare using system-provided function. + return (int)CompareFileTime(s1, s2); +#endif +} + +//---------------------------------------------------------------------------- +bool cmFileTimeComparisonInternal::TimesDiffer(cmFileTimeComparison_Type* s1, + cmFileTimeComparison_Type* s2) +{ +#if !defined(_WIN32) || defined(__CYGWIN__) +# if cmsys_STAT_HAS_ST_MTIM + // Times are integers in units of 1ns. + long long bil = 1000000000; + long long t1 = s1->st_mtim.tv_sec * bil + s1->st_mtim.tv_nsec; + long long t2 = s2->st_mtim.tv_sec * bil + s2->st_mtim.tv_nsec; + if(t1 < t2) + { + return (t2 - t1) >= bil; + } + else if(t2 < t1) + { + return (t1 - t2) >= bil; + } + else + { + return false; + } +# else + // Times are integers in units of 1s. + if(s1->st_mtime < s2->st_mtime) + { + return (s2->st_mtime - s1->st_mtime) >= 1; + } + else if(s1->st_mtime > s2->st_mtime) + { + return (s1->st_mtime - s2->st_mtime) >= 1; + } + else + { + return false; + } +# endif +#else + // Times are integers in units of 100ns. + LARGE_INTEGER t1; + LARGE_INTEGER t2; + t1.LowPart = s1->dwLowDateTime; + t1.HighPart = s1->dwHighDateTime; + t2.LowPart = s2->dwLowDateTime; + t2.HighPart = s2->dwHighDateTime; + if(t1.QuadPart < t2.QuadPart) + { + return (t2.QuadPart - t1.QuadPart) >= static_cast(10000000); + } + else if(t2.QuadPart < t1.QuadPart) + { + return (t1.QuadPart - t2.QuadPart) >= static_cast(10000000); + } + else + { + return false; + } +#endif +} + +//---------------------------------------------------------------------------- +bool cmFileTimeComparisonInternal::FileTimeCompare(const char* f1, + const char* f2, + int* result) +{ + // Get the modification time for each file. + cmFileTimeComparison_Type s1; + cmFileTimeComparison_Type s2; + if(this->Stat(f1, &s1) && + this->Stat(f2, &s2)) + { + // Compare the two modification times. + *result = this->Compare(&s1, &s2); + return true; + } + else + { + // No comparison available. Default to the same time. + *result = 0; + return false; + } +} + +//---------------------------------------------------------------------------- +bool cmFileTimeComparisonInternal::FileTimesDiffer(const char* f1, + const char* f2) +{ + // Get the modification time for each file. + cmFileTimeComparison_Type s1; + cmFileTimeComparison_Type s2; + if(this->Stat(f1, &s1) && + this->Stat(f2, &s2)) + { + // Compare the two modification times. + return this->TimesDiffer(&s1, &s2); + } + else + { + // No comparison available. Default to different times. + return true; + } +} diff --git a/Source/cmFileTimeComparison.h b/Source/cmFileTimeComparison.h new file mode 100644 index 000000000..644b3b8e9 --- /dev/null +++ b/Source/cmFileTimeComparison.h @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFileTimeComparison.h,v $ + Language: C++ + Date: $Date: 2008-01-03 05:01:38 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFileTimeComparison_h +#define cmFileTimeComparison_h + +#include "cmStandardIncludes.h" + +class cmFileTimeComparisonInternal; + +/** \class cmFileTimeComparison + * \brief Helper class for performing globbing searches. + * + * Finds all files that match a given globbing expression. + */ +class cmFileTimeComparison +{ +public: + cmFileTimeComparison(); + ~cmFileTimeComparison(); + + /** + * Compare file modification times. + * Return true for successful comparison and false for error. + * When true is returned, result has -1, 0, +1 for + * f1 older, same, or newer than f2. + */ + bool FileTimeCompare(const char* f1, const char* f2, int* result); + + /** + * Compare file modification times. Return true unless both files + * exist and have modification times less than 1 second apart. + */ + bool FileTimesDiffer(const char* f1, const char* f2); + +protected: + + cmFileTimeComparisonInternal* Internals; +}; + + +#endif + diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx new file mode 100755 index 000000000..868008fae --- /dev/null +++ b/Source/cmFindBase.cxx @@ -0,0 +1,591 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindBase.cxx,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:49 $ + Version: $Revision: 1.35.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindBase.h" + +cmFindBase::cmFindBase() +{ + cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder, + "FIND_ARGS_XXX", " NAMES name"); + this->AlreadyInCache = false; + this->AlreadyInCacheWithoutMetaInfo = false; + this->GenericDocumentation = + " FIND_XXX( name1 [path1 path2 ...])\n" + "This is the short-hand signature for the command that " + "is sufficient in many cases. It is the same " + "as FIND_XXX( name1 [PATHS path1 path2 ...])\n" + " FIND_XXX(\n" + " \n" + " name | NAMES name1 [name2 ...]\n" + " [PATHS path1 [path2 ... ENV var]]\n" + " [PATH_SUFFIXES suffix1 [suffix2 ...]]\n" + " [DOC \"cache documentation string\"]\n" + " [NO_DEFAULT_PATH]\n" + " [NO_CMAKE_ENVIRONMENT_PATH]\n" + " [NO_CMAKE_PATH]\n" + " [NO_SYSTEM_ENVIRONMENT_PATH]\n" + " [NO_CMAKE_SYSTEM_PATH]\n" + " [CMAKE_FIND_ROOT_PATH_BOTH |\n" + " ONLY_CMAKE_FIND_ROOT_PATH |\n" + " NO_CMAKE_FIND_ROOT_PATH]\n" + " )\n" + "" + "This command is used to find a SEARCH_XXX_DESC. " + "A cache entry named by is created to store the result " + "of this command. " + "If the SEARCH_XXX is found the result is stored in the variable " + "and the search will not be repeated unless the variable is cleared. " + "If nothing is found, the result will be " + "-NOTFOUND, and the search will be attempted again the " + "next time FIND_XXX is invoked with the same variable. " + "The name of the SEARCH_XXX that " + "is searched for is specified by the names listed " + "after the NAMES argument. Additional search locations " + "can be specified after the PATHS argument. If ENV var is " + "found in the PATHS section the environment variable var " + "will be read and converted from a system environment variable to " + "a cmake style list of paths. For example ENV PATH would be a way " + "to list the system path variable. The argument " + "after DOC will be used for the documentation string in " + "the cache. PATH_SUFFIXES can be used to give sub directories " + "that will be appended to the search paths.\n" + "If NO_DEFAULT_PATH is specified, then no additional paths are " + "added to the search. " + "If NO_DEFAULT_PATH is not specified, the search process is as follows:\n" + "1. Search cmake specific environment variables. This " + "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n" + "" + " /XXX_SUBDIR for each in CMAKE_PREFIX_PATH\n" + " CMAKE_XXX_PATH\n" + " CMAKE_XXX_MAC_PATH\n" + "2. Search cmake variables with the same names as " + "the cmake specific environment variables. These " + "are intended to be used on the command line with a " + "-DVAR=value. This can be skipped if NO_CMAKE_PATH " + "is passed.\n" + "" + " /XXX_SUBDIR for each in CMAKE_PREFIX_PATH\n" + " CMAKE_XXX_PATH\n" + " CMAKE_XXX_MAC_PATH\n" + "3. Search the standard system environment variables. " + "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.\n" + " PATH\n" + " XXX_SYSTEM\n" // replace with "", LIB, or INCLUDE + "4. Search cmake variables defined in the Platform files " + "for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH " + "is passed.\n" + " /XXX_SUBDIR for each in CMAKE_SYSTEM_PREFIX_PATH\n" + " CMAKE_SYSTEM_XXX_PATH\n" + " CMAKE_SYSTEM_XXX_MAC_PATH\n" + "5. Search the paths specified after PATHS or in the short-hand version " + "of the command.\n" + ; + this->GenericDocumentation += this->GenericDocumentationMacPolicy; + this->GenericDocumentation += this->GenericDocumentationRootPath; + this->GenericDocumentation += this->GenericDocumentationPathsOrder; +} + +bool cmFindBase::ParseArguments(std::vector const& argsIn) +{ + if(argsIn.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // CMake versions below 2.3 did not search all these extra + // locations. Preserve compatibility unless a modern argument is + // passed. + bool compatibility = this->Makefile->NeedBackwardsCompatibility(2,3); + + // copy argsIn into args so it can be modified, + // in the process extract the DOC "documentation" + size_t size = argsIn.size(); + std::vector args; + bool foundDoc = false; + for(unsigned int j = 0; j < size; ++j) + { + if(foundDoc || argsIn[j] != "DOC" ) + { + if(argsIn[j] == "ENV") + { + if(j+1 < size) + { + j++; + cmSystemTools::GetPath(args, argsIn[j].c_str()); + } + } + else + { + args.push_back(argsIn[j]); + } + } + else + { + if(j+1 < size) + { + foundDoc = true; + this->VariableDocumentation = argsIn[j+1]; + j++; + if(j >= size) + { + break; + } + } + } + } + this->VariableName = args[0]; + if(this->CheckForVariableInCache()) + { + this->AlreadyInCache = true; + return true; + } + this->AlreadyInCache = false; + + // Find the current root path mode. + this->SelectDefaultRootPathMode(); + + // Find the current bundle/framework search policy. + this->SelectDefaultMacMode(); + + std::vector userPaths; + std::string doc; + bool doingNames = true; // assume it starts with a name + bool doingPaths = false; + bool doingPathSuf = false; + bool newStyle = false; + + for (unsigned int j = 1; j < args.size(); ++j) + { + if(args[j] == "NAMES") + { + doingNames = true; + newStyle = true; + doingPathSuf = false; + doingPaths = false; + } + else if (args[j] == "PATHS") + { + doingPaths = true; + newStyle = true; + doingNames = false; + doingPathSuf = false; + } + else if (args[j] == "PATH_SUFFIXES") + { + compatibility = false; + doingPathSuf = true; + newStyle = true; + doingNames = false; + doingPaths = false; + } + else if (args[j] == "NO_SYSTEM_PATH") + { + doingPaths = false; + doingPathSuf = false; + doingNames = false; + this->NoDefaultPath = true; + } + else if (this->CheckCommonArgument(args[j])) + { + compatibility = false; + doingPaths = false; + doingPathSuf = false; + doingNames = false; + } + else + { + if(doingNames) + { + this->Names.push_back(args[j]); + } + else if(doingPaths) + { + userPaths.push_back(args[j]); + } + else if(doingPathSuf) + { + this->AddPathSuffix(args[j]); + } + } + } + + // Now that arguments have been parsed check the compatibility + // setting. If we need to be compatible with CMake 2.2 and earlier + // do not add the CMake system paths. It is safe to add the CMake + // environment paths and system environment paths because that + // existed in 2.2. It is safe to add the CMake user variable paths + // because the user or project has explicitly set them. + if(compatibility) + { + this->NoCMakeSystemPath = true; + } + + if(this->VariableDocumentation.size() == 0) + { + this->VariableDocumentation = "Where can "; + if(this->Names.size() == 0) + { + this->VariableDocumentation += "the (unknown) library be found"; + } + else if(this->Names.size() == 1) + { + this->VariableDocumentation += "the " + + this->Names[0] + " library be found"; + } + else + { + this->VariableDocumentation += "one of the " + this->Names[0]; + for (unsigned int j = 1; j < this->Names.size() - 1; ++j) + { + this->VariableDocumentation += ", " + this->Names[j]; + } + this->VariableDocumentation += " or " + + this->Names[this->Names.size() - 1] + " libraries be found"; + } + } + + // look for old style + // FIND_*(VAR name path1 path2 ...) + if(!newStyle) + { + this->Names.clear(); // clear out any values in Names + this->Names.push_back(args[1]); + for(unsigned int j = 2; j < args.size(); ++j) + { + userPaths.push_back(args[j]); + } + } + this->ExpandPaths(userPaths); + + // Handle search root stuff. + this->RerootPaths(this->SearchPaths); + return true; +} + +void cmFindBase::ExpandPaths(std::vector userPaths) +{ + // if NO Default paths was not specified add the + // standard search paths. + if(!this->NoDefaultPath) + { + if(this->SearchFrameworkFirst || this->SearchFrameworkOnly) + { + this->AddFrameWorkPaths(); + } + if(this->SearchAppBundleFirst || this->SearchAppBundleOnly) + { + this->AddAppBundlePaths(); + } + if(!this->NoCMakeEnvironmentPath && + !(this->SearchFrameworkOnly || this->SearchAppBundleOnly)) + { + // Add CMAKE_*_PATH environment variables + this->AddEnvironmentVariables(); + } + if(!this->NoCMakePath && + !(this->SearchFrameworkOnly || this->SearchAppBundleOnly)) + { + // Add CMake varibles of the same name as the previous environment + // varibles CMAKE_*_PATH to be used most of the time with -D + // command line options + this->AddCMakeVariables(); + } + if(!this->NoSystemEnvironmentPath && + !(this->SearchFrameworkOnly || this->SearchAppBundleOnly)) + { + // add System environment PATH and (LIB or INCLUDE) + this->AddSystemEnvironmentVariables(); + } + if(!this->NoCMakeSystemPath && + !(this->SearchFrameworkOnly || this->SearchAppBundleOnly)) + { + // Add CMAKE_SYSTEM_*_PATH variables which are defined in platform files + this->AddCMakeSystemVariables(); + } + if(this->SearchAppBundleLast) + { + this->AddAppBundlePaths(); + } + if(this->SearchFrameworkLast) + { + this->AddFrameWorkPaths(); + } + } + std::vector paths; + // add the paths specified in the FIND_* call + for(unsigned int i =0; i < userPaths.size(); ++i) + { + paths.push_back(userPaths[i]); + } + this->AddPaths(paths); +} + +//---------------------------------------------------------------------------- +void cmFindBase::AddEnvironmentVariables() +{ + std::vector paths; + + std::vector prefixPaths; + cmSystemTools::GetPath(prefixPaths, "CMAKE_PREFIX_PATH"); + this->AddFindPrefix(paths, prefixPaths); + + std::string var = "CMAKE_"; + var += this->CMakePathName; + var += "_PATH"; + cmSystemTools::GetPath(paths, var.c_str()); + this->AddPaths(paths); +} + +void cmFindBase::AddFindPrefix(std::vector& dest, + const std::vector& src) +{ + // default for programs + std::string subdir = "bin"; + + if (this->CMakePathName == "INCLUDE") + { + subdir = "include"; + } + else if (this->CMakePathName == "LIBRARY") + { + subdir = "lib"; + } + else if (this->CMakePathName == "FRAMEWORK") + { + subdir = ""; // ? what to do for frameworks ? + } + + for (std::vector::const_iterator it = src.begin(); + it != src.end(); + ++it) + { + std::string dir = it->c_str(); + if(!subdir.empty() && !dir.empty() && dir[dir.size()-1] != '/') + { + dir += "/"; + } + dest.push_back(dir + subdir); + if (subdir == "bin") + { + dest.push_back(dir + "sbin"); + } + if(!subdir.empty()) + { + dest.push_back(*it); + } + } +} + +void cmFindBase::AddFrameWorkPaths() +{ + std::vector paths; + this->GetFrameworkPaths(paths); + this->AddPaths(paths); +} + +void cmFindBase::AddPaths(std::vector & paths) +{ + // add suffixes and clean up paths + this->ExpandRegistryAndCleanPath(paths); + // add the paths to the search paths + this->SearchPaths.insert(this->SearchPaths.end(), + paths.begin(), + paths.end()); +} + +void cmFindBase::AddAppBundlePaths() +{ + std::vector paths; + this->GetAppBundlePaths(paths); + this->AddPaths(paths); +} + +void cmFindBase::AddCMakeVariables() +{ + std::string var = "CMAKE_"; + var += this->CMakePathName; + var += "_PATH"; + std::vector paths; + + if(const char* prefixPath = + this->Makefile->GetDefinition("CMAKE_PREFIX_PATH")) + { + std::vector prefixPaths; + cmSystemTools::ExpandListArgument(prefixPath, prefixPaths); + this->AddFindPrefix(paths, prefixPaths); + } + + if(const char* path = this->Makefile->GetDefinition(var.c_str())) + { + cmSystemTools::ExpandListArgument(path, paths); + } + this->AddPaths(paths); +} + +void cmFindBase::AddSystemEnvironmentVariables() +{ + // Add LIB or INCLUDE + std::vector paths; + if(this->EnvironmentPath.size()) + { + cmSystemTools::GetPath(paths, this->EnvironmentPath.c_str()); + } + // Add PATH + cmSystemTools::GetPath(paths); + this->AddPaths(paths); +} + +void cmFindBase::AddCMakeSystemVariables() +{ + std::string var = "CMAKE_SYSTEM_"; + var += this->CMakePathName; + var += "_PATH"; + std::vector paths; + if(const char* prefixPath = + this->Makefile->GetDefinition("CMAKE_SYSTEM_PREFIX_PATH")) + { + std::vector prefixPaths; + cmSystemTools::ExpandListArgument(prefixPath, prefixPaths); + this->AddFindPrefix(paths, prefixPaths); + } + if(const char* path = this->Makefile->GetDefinition(var.c_str())) + { + cmSystemTools::ExpandListArgument(path, paths); + } + this->AddPaths(paths); +} + +void cmFindBase::ExpandRegistryAndCleanPath(std::vector& paths) +{ + std::vector finalPath; + std::vector::iterator i; + // glob and expand registry stuff from paths and put + // into finalPath + for(i = paths.begin(); + i != paths.end(); ++i) + { + cmSystemTools::ExpandRegistryValues(*i); + cmSystemTools::GlobDirs(i->c_str(), finalPath); + } + // clear the path + paths.clear(); + // convert all paths to unix slashes and add search path suffixes + // if there are any + for(i = finalPath.begin(); + i != finalPath.end(); ++i) + { + cmSystemTools::ConvertToUnixSlashes(*i); + // copy each finalPath combined with SearchPathSuffixes + // to the SearchPaths ivar + for(std::vector::iterator j = + this->SearchPathSuffixes.begin(); + j != this->SearchPathSuffixes.end(); ++j) + { + // if *i is only / then do not add a // + // this will get incorrectly considered a network + // path on windows and cause huge delays. + std::string p = *i; + if(p.size() && p[p.size()-1] != '/') + { + p += std::string("/"); + } + p += *j; + // add to all paths because the search path may be modified + // later with lib being replaced for lib64 which may exist + paths.push_back(p); + } + } + // now put the path without the path suffixes in the SearchPaths + for(i = finalPath.begin(); + i != finalPath.end(); ++i) + { + // put all search paths in because it may later be replaced + // by lib64 stuff fixes bug 4009 + paths.push_back(*i); + } +} + +void cmFindBase::PrintFindStuff() +{ + std::cerr << "SearchFrameworkLast: " << this->SearchFrameworkLast << "\n"; + std::cerr << "SearchFrameworkOnly: " << this->SearchFrameworkOnly << "\n"; + std::cerr << "SearchFrameworkFirst: " << this->SearchFrameworkFirst << "\n"; + std::cerr << "SearchAppBundleLast: " << this->SearchAppBundleLast << "\n"; + std::cerr << "SearchAppBundleOnly: " << this->SearchAppBundleOnly << "\n"; + std::cerr << "SearchAppBundleFirst: " << this->SearchAppBundleFirst << "\n"; + std::cerr << "VariableName " << this->VariableName << "\n"; + std::cerr << "VariableDocumentation " + << this->VariableDocumentation << "\n"; + std::cerr << "NoDefaultPath " << this->NoDefaultPath << "\n"; + std::cerr << "NoCMakeEnvironmentPath " + << this->NoCMakeEnvironmentPath << "\n"; + std::cerr << "NoCMakePath " << this->NoCMakePath << "\n"; + std::cerr << "NoSystemEnvironmentPath " + << this->NoSystemEnvironmentPath << "\n"; + std::cerr << "NoCMakeSystemPath " << this->NoCMakeSystemPath << "\n"; + std::cerr << "EnvironmentPath " << this->EnvironmentPath << "\n"; + std::cerr << "CMakePathName " << this->CMakePathName << "\n"; + std::cerr << "Names "; + for(unsigned int i =0; i < this->Names.size(); ++i) + { + std::cerr << this->Names[i] << " "; + } + std::cerr << "\n"; + std::cerr << "\n"; + std::cerr << "SearchPathSuffixes "; + for(unsigned int i =0; i < this->SearchPathSuffixes.size(); ++i) + { + std::cerr << this->SearchPathSuffixes[i] << "\n"; + } + std::cerr << "\n"; + std::cerr << "SearchPaths\n"; + for(unsigned int i =0; i < this->SearchPaths.size(); ++i) + { + std::cerr << "[" << this->SearchPaths[i] << "]\n"; + } +} + +bool cmFindBase::CheckForVariableInCache() +{ + if(const char* cacheValue = + this->Makefile->GetDefinition(this->VariableName.c_str())) + { + cmCacheManager::CacheIterator it = + this->Makefile->GetCacheManager()-> + GetCacheIterator(this->VariableName.c_str()); + bool found = !cmSystemTools::IsNOTFOUND(cacheValue); + bool cached = !it.IsAtEnd(); + if(found) + { + // If the user specifies the entry on the command line without a + // type we should add the type and docstring but keep the + // original value. Tell the subclass implementations to do + // this. + if(cached && it.GetType() == cmCacheManager::UNINITIALIZED) + { + this->AlreadyInCacheWithoutMetaInfo = true; + } + return true; + } + else if(cached) + { + const char* hs = it.GetProperty("HELPSTRING"); + this->VariableDocumentation = hs?hs:"(none)"; + } + } + return false; +} diff --git a/Source/cmFindBase.h b/Source/cmFindBase.h new file mode 100755 index 000000000..52ac2070c --- /dev/null +++ b/Source/cmFindBase.h @@ -0,0 +1,78 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindBase.h,v $ + Language: C++ + Date: $Date: 2008-01-17 14:02:31 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindBase_h +#define cmFindBase_h + +#include "cmFindCommon.h" + +/** \class cmFindBase + * \brief Base class for most FIND_XXX commands. + * + * cmFindBase is a parent class for cmFindProgramCommand, cmFindPathCommand, + * and cmFindLibraryCommand, cmFindFileCommand + */ +class cmFindBase : public cmFindCommon +{ +public: + cmFindBase(); + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool ParseArguments(std::vector const& args); + cmTypeMacro(cmFindBase, cmFindCommon); + + virtual const char* GetFullDocumentation() + {return this->GenericDocumentation.c_str();} + +protected: + void PrintFindStuff(); + void ExpandPaths(std::vector userPaths); + + // add to the SearchPaths + void AddPaths(std::vector& paths); + void AddFrameWorkPaths(); + void AddAppBundlePaths(); + void AddEnvironmentVariables(); + void AddFindPrefix(std::vector& dest, + const std::vector& src); + void AddCMakeVariables(); + void AddSystemEnvironmentVariables(); + void AddCMakeSystemVariables(); + void ExpandRegistryAndCleanPath(std::vector& paths); + // see if the VariableName is already set in the cache, + // also copy the documentation from the cache to VariableDocumentation + // if it has documentation in the cache + bool CheckForVariableInCache(); + + cmStdString GenericDocumentation; + // use by command during find + cmStdString VariableDocumentation; + cmStdString VariableName; + std::vector Names; + std::vector SearchPaths; + + // CMAKE_*_PATH CMAKE_SYSTEM_*_PATH FRAMEWORK|LIBRARY|INCLUDE|PROGRAM + cmStdString EnvironmentPath; // LIB,INCLUDE + + bool AlreadyInCache; + bool AlreadyInCacheWithoutMetaInfo; +}; + + + +#endif diff --git a/Source/cmFindCommon.cxx b/Source/cmFindCommon.cxx new file mode 100644 index 000000000..b242eb385 --- /dev/null +++ b/Source/cmFindCommon.cxx @@ -0,0 +1,479 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindCommon.cxx,v $ + Language: C++ + Date: $Date: 2008-01-17 14:02:31 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindCommon.h" + +//---------------------------------------------------------------------------- +cmFindCommon::cmFindCommon() +{ + this->FindRootPathMode = RootPathModeBoth; + this->NoDefaultPath = false; + this->NoCMakePath = false; + this->NoCMakeEnvironmentPath = false; + this->NoSystemEnvironmentPath = false; + this->NoCMakeSystemPath = false; + + // OS X Bundle and Framework search policy. The default is to + // search frameworks first on apple. +#if defined(__APPLE__) + this->SearchFrameworkFirst = true; + this->SearchAppBundleFirst = true; +#else + this->SearchFrameworkFirst = false; + this->SearchAppBundleFirst = false; +#endif + this->SearchFrameworkOnly = false; + this->SearchFrameworkLast = false; + this->SearchAppBundleOnly = false; + this->SearchAppBundleLast = false; + + // Documentation components. + this->GenericDocumentationMacPolicy = + "On Darwin or systems supporting OS X Frameworks, the cmake variable" + " CMAKE_FIND_FRAMEWORK can be set to empty or one of the following:\n" + " \"FIRST\" - Try to find frameworks before standard\n" + " libraries or headers. This is the default on Darwin.\n" + " \"LAST\" - Try to find frameworks after standard\n" + " libraries or headers.\n" + " \"ONLY\" - Only try to find frameworks.\n" + " \"NEVER\". - Never try to find frameworks.\n" + "On Darwin or systems supporting OS X Application Bundles, the cmake " + "variable CMAKE_FIND_APPBUNDLE can be set to empty or one of the " + "following:\n" + " \"FIRST\" - Try to find application bundles before standard\n" + " programs. This is the default on Darwin.\n" + " \"LAST\" - Try to find application bundles after standard\n" + " programs.\n" + " \"ONLY\" - Only try to find application bundles.\n" + " \"NEVER\". - Never try to find application bundles.\n"; + this->GenericDocumentationRootPath = + "The CMake variable CMAKE_FIND_ROOT_PATH specifies one or more " + "directories to be prepended to all other search directories. " + "This effectively \"re-roots\" the entire search under given locations. " + "By default it is empty. It is especially useful when " + "cross-compiling to point to the root directory of the " + "target environment and CMake will search there too. By default at first " + "the directories listed in CMAKE_FIND_ROOT_PATH and then the non-rooted " + "directories will be searched. " + "The default behavior can be adjusted by setting " + "CMAKE_FIND_ROOT_PATH_MODE_XXX. This behavior can be manually " + "overridden on a per-call basis. " + "By using CMAKE_FIND_ROOT_PATH_BOTH the search order will " + "be as described above. If NO_CMAKE_FIND_ROOT_PATH is used " + "then CMAKE_FIND_ROOT_PATH will not be used. If ONLY_CMAKE_FIND_ROOT_PATH " + "is used then only the re-rooted directories will be searched.\n"; + this->GenericDocumentationPathsOrder = + "The reason the paths listed in the call to the command are searched " + "last is that most users of CMake would expect things to be found " + "first in the locations specified by their environment. Projects may " + "override this behavior by simply calling the command twice:\n" + " FIND_XXX(FIND_ARGS_XXX PATHS paths... NO_DEFAULT_PATH)\n" + " FIND_XXX(FIND_ARGS_XXX)\n" + "Once one of these calls succeeds the result variable will be set " + "and stored in the cache so that neither call will search again."; +} + +//---------------------------------------------------------------------------- +cmFindCommon::~cmFindCommon() +{ +} + +//---------------------------------------------------------------------------- +void cmFindCommon::SelectDefaultRootPathMode() +{ + // Use both by default. + this->FindRootPathMode = RootPathModeBoth; + + // Check the policy variable for this find command type. + std::string findRootPathVar = "CMAKE_FIND_ROOT_PATH_MODE_"; + findRootPathVar += this->CMakePathName; + std::string rootPathMode = + this->Makefile->GetSafeDefinition(findRootPathVar.c_str()); + if (rootPathMode=="NEVER") + { + this->FindRootPathMode = RootPathModeNoRootPath; + } + else if (rootPathMode=="ONLY") + { + this->FindRootPathMode = RootPathModeOnlyRootPath; + } + else if (rootPathMode=="BOTH") + { + this->FindRootPathMode = RootPathModeBoth; + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::SelectDefaultMacMode() +{ + std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK"); + if(ff == "NEVER") + { + this->SearchFrameworkLast = false; + this->SearchFrameworkFirst = false; + this->SearchFrameworkOnly = false; + } + else if(ff == "ONLY") + { + this->SearchFrameworkLast = false; + this->SearchFrameworkFirst = false; + this->SearchFrameworkOnly = true; + } + else if(ff == "FIRST") + { + this->SearchFrameworkLast = false; + this->SearchFrameworkFirst = true; + this->SearchFrameworkOnly = false; + } + else if(ff == "LAST") + { + this->SearchFrameworkLast = true; + this->SearchFrameworkFirst = false; + this->SearchFrameworkOnly = false; + } + + std::string fab = this->Makefile->GetSafeDefinition("CMAKE_FIND_APPBUNDLE"); + if(fab == "NEVER") + { + this->SearchAppBundleLast = false; + this->SearchAppBundleFirst = false; + this->SearchAppBundleOnly = false; + } + else if(fab == "ONLY") + { + this->SearchAppBundleLast = false; + this->SearchAppBundleFirst = false; + this->SearchAppBundleOnly = true; + } + else if(fab == "FIRST") + { + this->SearchAppBundleLast = false; + this->SearchAppBundleFirst = true; + this->SearchAppBundleOnly = false; + } + else if(fab == "LAST") + { + this->SearchAppBundleLast = true; + this->SearchAppBundleFirst = false; + this->SearchAppBundleOnly = false; + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::RerootPaths(std::vector& paths) +{ +#if 0 + for(std::vector::const_iterator i = paths.begin(); + i != paths.end(); ++i) + { + fprintf(stderr, "[%s]\n", i->c_str()); + } +#endif + + // Short-circuit if there is nothing to do. + if(this->FindRootPathMode == RootPathModeNoRootPath) + { + return; + } + const char* rootPath = + this->Makefile->GetDefinition("CMAKE_FIND_ROOT_PATH"); + if((rootPath == 0) || (strlen(rootPath) == 0)) + { + return; + } + + // Construct the list of path roots with no trailing slashes. + std::vector roots; + cmSystemTools::ExpandListArgument(rootPath, roots); + for(std::vector::iterator ri = roots.begin(); + ri != roots.end(); ++ri) + { + cmSystemTools::ConvertToUnixSlashes(*ri); + } + + // Copy the original set of unrooted paths. + std::vector unrootedPaths = paths; + paths.clear(); + + for(std::vector::const_iterator ri = roots.begin(); + ri != roots.end(); ++ri) + { + for(std::vector::const_iterator ui = unrootedPaths.begin(); + ui != unrootedPaths.end(); ++ui) + { + // Place the unrooted path under the current root if it is not + // already inside. Skip the unrooted path if it is relative to + // a user home directory or is empty. + std::string rootedDir; + if(cmSystemTools::IsSubDirectory(ui->c_str(), ri->c_str())) + { + rootedDir = *ui; + } + else if(!ui->empty() && (*ui)[0] != '~') + { + // Start with the new root. + rootedDir = *ri; + rootedDir += "/"; + + // Append the original path with its old root removed. + rootedDir += cmSystemTools::SplitPathRootComponent(ui->c_str()); + } + + // Store the new path. + paths.push_back(rootedDir); + } + } + + // If searching both rooted and unrooted paths add the original + // paths again. + if(this->FindRootPathMode == RootPathModeBoth) + { + paths.insert(paths.end(), unrootedPaths.begin(), unrootedPaths.end()); + } +} + +//---------------------------------------------------------------------------- +bool cmFindCommon::CheckCommonArgument(std::string const& arg) +{ + if(arg == "NO_DEFAULT_PATH") + { + this->NoDefaultPath = true; + } + else if(arg == "NO_CMAKE_ENVIRONMENT_PATH") + { + this->NoCMakeEnvironmentPath = true; + } + else if(arg == "NO_CMAKE_PATH") + { + this->NoCMakePath = true; + } + else if(arg == "NO_SYSTEM_ENVIRONMENT_PATH") + { + this->NoSystemEnvironmentPath = true; + } + else if(arg == "NO_CMAKE_SYSTEM_PATH") + { + this->NoCMakeSystemPath = true; + } + else if(arg == "NO_CMAKE_FIND_ROOT_PATH") + { + this->FindRootPathMode = RootPathModeNoRootPath; + } + else if(arg == "ONLY_CMAKE_FIND_ROOT_PATH") + { + this->FindRootPathMode = RootPathModeOnlyRootPath; + } + else if(arg == "CMAKE_FIND_ROOT_PATH_BOTH") + { + this->FindRootPathMode = RootPathModeBoth; + } + else + { + // The argument is not one of the above. + return false; + } + + // The argument is one of the above. + return true; +} + +//---------------------------------------------------------------------------- +void cmFindCommon::AddPathSuffix(std::string const& arg) +{ + std::string suffix = arg; + + // Strip leading and trailing slashes. + if(suffix.empty()) + { + return; + } + if(suffix[0] == '/') + { + suffix = suffix.substr(1, suffix.npos); + } + if(suffix.empty()) + { + return; + } + if(suffix[suffix.size()-1] == '/') + { + suffix = suffix.substr(0, suffix.size()-1); + } + if(suffix.empty()) + { + return; + } + + // Store the suffix. + this->SearchPathSuffixes.push_back(suffix); +} + +//---------------------------------------------------------------------------- +void cmFindCommon::GetAppBundlePaths(std::vector& paths) +{ + if(this->NoDefaultPath) + { + return; + } + std::vector tmp; + + // first environment variables + if(!this->NoCMakeEnvironmentPath) + { + cmSystemTools::GetPath(tmp, "CMAKE_APPBUNDLE_PATH"); + this->AddPathsInternal(paths, tmp, EnvPath); + tmp.clear(); + } + + // add cmake variables + if(!this->NoCMakePath) + { + if(const char* path = + this->Makefile->GetDefinition("CMAKE_APPBUNDLE_PATH")) + { + cmSystemTools::ExpandListArgument(path, tmp); + this->AddPathsInternal(paths, tmp, CMakePath); + tmp.clear(); + } + } + + // add cmake system variables + if(!this->NoCMakeSystemPath) + { + if(const char* path = + this->Makefile->GetDefinition("CMAKE_SYSTEM_APPBUNDLE_PATH")) + { + cmSystemTools::ExpandListArgument(path, tmp); + this->AddPathsInternal(paths, tmp, CMakePath); + tmp.clear(); + } + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::GetFrameworkPaths(std::vector& paths) +{ + if(this->NoDefaultPath) + { + return; + } + std::vector tmp; + + // first environment variables + if(!this->NoCMakeEnvironmentPath) + { + cmSystemTools::GetPath(tmp, "CMAKE_FRAMEWORK_PATH"); + this->AddPathsInternal(paths, tmp, EnvPath); + tmp.clear(); + } + + // add cmake variables + if(!this->NoCMakePath) + { + if(const char* path = + this->Makefile->GetDefinition("CMAKE_FRAMEWORK_PATH")) + { + cmSystemTools::ExpandListArgument(path, tmp); + this->AddPathsInternal(paths, tmp, CMakePath); + tmp.clear(); + } + } + + // add cmake system variables + if(!this->NoCMakeSystemPath) + { + if(const char* path = + this->Makefile->GetDefinition("CMAKE_SYSTEM_FRAMEWORK_PATH")) + { + cmSystemTools::ExpandListArgument(path, tmp); + this->AddPathsInternal(paths, tmp, CMakePath); + tmp.clear(); + } + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::AddCMakePath(std::vector& out_paths, + const char* variable, + std::set* emmitted) +{ + // Get a path from a CMake variable. + if(const char* varPath = this->Makefile->GetDefinition(variable)) + { + std::vector tmp; + cmSystemTools::ExpandListArgument(varPath, tmp); + + // Relative paths are interpreted with respect to the current + // source directory. + this->AddPathsInternal(out_paths, tmp, CMakePath, emmitted); + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::AddEnvPath(std::vector& out_paths, + const char* variable, + std::set* emmitted) +{ + // Get a path from the environment. + std::vector tmp; + cmSystemTools::GetPath(tmp, variable); + + // Relative paths are interpreted with respect to the current + // working directory. + this->AddPathsInternal(out_paths, tmp, EnvPath, emmitted); +} + +//---------------------------------------------------------------------------- +void cmFindCommon::AddPathsInternal(std::vector& out_paths, + std::vector const& in_paths, + PathType pathType, + std::set* emmitted) +{ + for(std::vector::const_iterator i = in_paths.begin(); + i != in_paths.end(); ++i) + { + this->AddPathInternal(out_paths, *i, pathType, emmitted); + } +} + +//---------------------------------------------------------------------------- +void cmFindCommon::AddPathInternal(std::vector& out_paths, + std::string const& in_path, + PathType pathType, + std::set* emmitted) +{ + if(in_path.empty()) + { + return; + } + + // Select the base path with which to interpret relative paths. + const char* relbase = 0; + if(pathType == CMakePath) + { + relbase = this->Makefile->GetCurrentDirectory(); + } + + // Convert to clean full path. + std::string fullPath = + cmSystemTools::CollapseFullPath(in_path.c_str(), relbase); + + // Insert the path if has not already been emmitted. + if(!emmitted || emmitted->insert(fullPath).second) + { + out_paths.push_back(fullPath.c_str()); + } +} diff --git a/Source/cmFindCommon.h b/Source/cmFindCommon.h new file mode 100644 index 000000000..831b068cb --- /dev/null +++ b/Source/cmFindCommon.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindCommon.h,v $ + Language: C++ + Date: $Date: 2008-01-17 14:02:31 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindCommon_h +#define cmFindCommon_h + +#include "cmCommand.h" + +/** \class cmFindCommon + * \brief Base class for FIND_XXX implementations. + * + * cmFindCommon is a parent class for cmFindBase, + * cmFindProgramCommand, cmFindPathCommand, cmFindLibraryCommand, + * cmFindFileCommand, and cmFindPackageCommand. + */ +class cmFindCommon : public cmCommand +{ +public: + cmFindCommon(); + ~cmFindCommon(); + cmTypeMacro(cmFindCommon, cmCommand); + +protected: + + enum RootPathMode { RootPathModeBoth, + RootPathModeOnlyRootPath, + RootPathModeNoRootPath }; + + enum PathType { FullPath, CMakePath, EnvPath }; + + /** Place a set of search paths under the search roots. */ + void RerootPaths(std::vector& paths); + + /** Compute the current default root path mode. */ + void SelectDefaultRootPathMode(); + + /** Compute the current default bundle/framework search policy. */ + void SelectDefaultMacMode(); + + cmStdString CMakePathName; + RootPathMode FindRootPathMode; + + bool CheckCommonArgument(std::string const& arg); + void AddPathSuffix(std::string const& arg); + void GetAppBundlePaths(std::vector& paths); + void GetFrameworkPaths(std::vector& paths); + + void AddCMakePath(std::vector& out_paths, + const char* variable, std::set* emmitted = 0); + void AddEnvPath(std::vector& out_paths, + const char* variable, std::set* emmitted = 0); + void AddPathsInternal(std::vector& out_paths, + std::vector const& in_paths, + PathType pathType, + std::set* emmitted = 0); + void AddPathInternal(std::vector& out_paths, + std::string const& in_path, + PathType pathType, + std::set* emmitted = 0); + + bool NoDefaultPath; + bool NoCMakePath; + bool NoCMakeEnvironmentPath; + bool NoSystemEnvironmentPath; + bool NoCMakeSystemPath; + + std::vector SearchPathSuffixes; + + std::string GenericDocumentationMacPolicy; + std::string GenericDocumentationRootPath; + std::string GenericDocumentationPathsOrder; + + bool SearchFrameworkFirst; + bool SearchFrameworkOnly; + bool SearchFrameworkLast; + + bool SearchAppBundleFirst; + bool SearchAppBundleOnly; + bool SearchAppBundleLast; +}; + +#endif diff --git a/Source/cmFindFileCommand.cxx b/Source/cmFindFileCommand.cxx new file mode 100644 index 000000000..2c0b44ef0 --- /dev/null +++ b/Source/cmFindFileCommand.cxx @@ -0,0 +1,30 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindFileCommand.cxx,v $ + Language: C++ + Date: $Date: 2007-10-10 15:47:43 $ + Version: $Revision: 1.30 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindFileCommand.h" +#include "cmSystemTools.h" + +cmFindFileCommand::cmFindFileCommand() +{ + this->IncludeFileInPath = true; + cmSystemTools::ReplaceString(this->GenericDocumentation, + "FIND_PATH", "find_file"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "directory containing the named file", + "full path to named file"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "file in a directory", "full path to a file"); +} diff --git a/Source/cmFindFileCommand.h b/Source/cmFindFileCommand.h new file mode 100644 index 000000000..bb5a11993 --- /dev/null +++ b/Source/cmFindFileCommand.h @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindFileCommand.h,v $ + Language: C++ + Date: $Date: 2007-10-10 15:47:43 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindFileCommand_h +#define cmFindFileCommand_h + +#include "cmFindPathCommand.h" + +/** \class cmFindFileCommand + * \brief Define a command to search for an executable program. + * + * cmFindFileCommand is used to define a CMake variable + * that specifies an executable program. The command searches + * in the current path (e.g., PATH environment variable) for + * an executable that matches one of the supplied names. + */ +class cmFindFileCommand : public cmFindPathCommand +{ +public: + cmFindFileCommand(); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFindFileCommand; + } + virtual const char* GetName() { return "find_file";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Find the full path to a file."; + } + + cmTypeMacro(cmFindFileCommand, cmFindPathCommand); +}; + + + +#endif diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx new file mode 100644 index 000000000..f5bb2d7c9 --- /dev/null +++ b/Source/cmFindLibraryCommand.cxx @@ -0,0 +1,321 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindLibraryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-11 22:00:45 $ + Version: $Revision: 1.58 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindLibraryCommand.h" +#include "cmCacheManager.h" + +cmFindLibraryCommand::cmFindLibraryCommand() +{ + cmSystemTools::ReplaceString(this->GenericDocumentation, + "FIND_XXX", "find_library"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_PATH", "CMAKE_LIBRARY_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_MAC_PATH", + "CMAKE_FRAMEWORK_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_MAC_PATH", + "CMAKE_SYSTEM_FRAMEWORK_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SYSTEM", "LIB"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_PATH", + "CMAKE_SYSTEM_LIBRARY_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX_DESC", "library"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX", "library"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SUBDIR", "lib"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_FIND_ROOT_PATH_MODE_XXX", + "CMAKE_FIND_ROOT_PATH_MODE_LIBRARY"); + + this->EnvironmentPath = "LIB"; + this->GenericDocumentation += + "\n" + "If the library found is a framework, then VAR will be set to " + "the full path to the framework /A.framework. " + "When a full path to a framework is used as a library, " + "CMake will use a -framework A, and a -F to " + "link the framework to the target. "; +} + +// cmFindLibraryCommand +bool cmFindLibraryCommand +::InitialPass(std::vector const& argsIn, cmExecutionStatus &) +{ + this->VariableDocumentation = "Path to a library."; + this->CMakePathName = "LIBRARY"; + if(!this->ParseArguments(argsIn)) + { + return false; + } + if(this->AlreadyInCache) + { + // If the user specifies the entry on the command line without a + // type we should add the type and docstring but keep the original + // value. + if(this->AlreadyInCacheWithoutMetaInfo) + { + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "", + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + } + return true; + } + + if(const char* abi_name = + this->Makefile->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) + { + std::string abi = abi_name; + if(abi.find("ELF N32") != abi.npos) + { + // Convert lib to lib32. + this->AddArchitecturePaths("32"); + } + } + + if(this->Makefile->GetCMakeInstance() + ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS")) + { + // add special 64 bit paths if this is a 64 bit compile. + this->AddLib64Paths(); + } + + std::string library; + for(std::vector::iterator i = this->Names.begin(); + i != this->Names.end() ; ++i) + { + library = this->FindLibrary(i->c_str()); + if(library != "") + { + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), + library.c_str(), + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + return true; + } + } + std::string notfound = this->VariableName + "-NOTFOUND"; + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), + notfound.c_str(), + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + return true; +} + +//---------------------------------------------------------------------------- +void cmFindLibraryCommand::AddArchitecturePaths(const char* suffix) +{ + std::vector newPaths; + bool found = false; + std::string subpath = "lib"; + subpath += suffix; + subpath += "/"; + for(std::vector::iterator i = this->SearchPaths.begin(); + i != this->SearchPaths.end(); ++i) + { + // Try replacing lib/ with lib/ + std::string s = *i; + cmSystemTools::ReplaceString(s, "lib/", subpath.c_str()); + if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str())) + { + found = true; + newPaths.push_back(s); + } + + // Now look for lib + s = *i; + s += suffix; + if(cmSystemTools::FileIsDirectory(s.c_str())) + { + found = true; + newPaths.push_back(s); + } + // now add the original unchanged path + if(cmSystemTools::FileIsDirectory(i->c_str())) + { + newPaths.push_back(*i); + } + } + + // If any new paths were found replace the original set. + if(found) + { + this->SearchPaths = newPaths; + } +} + +void cmFindLibraryCommand::AddLib64Paths() +{ + if(!this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + GetLanguageEnabled("C")) + { + return; + } + std::string voidsize = + this->Makefile->GetSafeDefinition("CMAKE_SIZEOF_VOID_P"); + int size = atoi(voidsize.c_str()); + if(size != 8) + { + return; + } + std::vector path64; + bool found64 = false; + for(std::vector::iterator i = this->SearchPaths.begin(); + i != this->SearchPaths.end(); ++i) + { + std::string s = *i; + std::string s2 = *i; + cmSystemTools::ReplaceString(s, "lib/", "lib64/"); + // try to replace lib with lib64 and see if it is there, + // then prepend it to the path + if((s != *i) && cmSystemTools::FileIsDirectory(s.c_str())) + { + path64.push_back(s); + found64 = true; + } + // now just add a 64 to the path name and if it is there, + // add it to the path + s2 += "64"; + if(cmSystemTools::FileIsDirectory(s2.c_str())) + { + found64 = true; + path64.push_back(s2); + } + // now add the original unchanged path + if(cmSystemTools::FileIsDirectory(i->c_str())) + { + path64.push_back(*i); + } + } + // now replace the SearchPaths with the 64 bit converted path + // if any 64 bit paths were discovered + if(found64) + { + this->SearchPaths = path64; + } +} + +std::string cmFindLibraryCommand::FindLibrary(const char* name) +{ + bool supportFrameworks = false; + bool onlyFrameworks = false; + std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK"); + if(ff == "FIRST" || ff == "LAST") + { + supportFrameworks = true; + } + if(ff == "ONLY") + { + onlyFrameworks = true; + supportFrameworks = true; + } + + const char* prefixes_list = + this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_PREFIXES"); + const char* suffixes_list = + this->Makefile->GetRequiredDefinition("CMAKE_FIND_LIBRARY_SUFFIXES"); + std::vector prefixes; + std::vector suffixes; + cmSystemTools::ExpandListArgument(prefixes_list, prefixes, true); + cmSystemTools::ExpandListArgument(suffixes_list, suffixes, true); + + // If the original library name provided by the user matches one of + // the suffixes, try it first. + bool tryOrig = false; + { + std::string nm = name; + for(std::vector::const_iterator si = suffixes.begin(); + !tryOrig && si != suffixes.end(); ++si) + { + std::string const& suffix = *si; + if(nm.length() > suffix.length() && + nm.substr(nm.size()-suffix.length()) == suffix) + { + tryOrig = true; + } + } + } + + // Add a trailing slash to all paths to aid the search process. + for(std::vector::iterator i = this->SearchPaths.begin(); + i != this->SearchPaths.end(); ++i) + { + std::string& p = *i; + if(p.empty() || p[p.size()-1] != '/') + { + p += "/"; + } + } + std::string tryPath; + for(std::vector::const_iterator p = this->SearchPaths.begin(); + p != this->SearchPaths.end(); ++p) + { + if(supportFrameworks) + { + tryPath = *p; + tryPath += name; + tryPath += ".framework"; + if(cmSystemTools::FileExists(tryPath.c_str()) + && cmSystemTools::FileIsDirectory(tryPath.c_str())) + { + tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str()); + cmSystemTools::ConvertToUnixSlashes(tryPath); + return tryPath; + } + } + if(!onlyFrameworks) + { + // Try the original library name as specified by the user. + if(tryOrig) + { + tryPath = *p; + tryPath += name; + if(cmSystemTools::FileExists(tryPath.c_str(), true)) + { + tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str()); + cmSystemTools::ConvertToUnixSlashes(tryPath); + return tryPath; + } + } + + // Try various library naming conventions. + for(std::vector::iterator prefix = prefixes.begin(); + prefix != prefixes.end(); ++prefix) + { + for(std::vector::iterator suffix = suffixes.begin(); + suffix != suffixes.end(); ++suffix) + { + tryPath = *p; + tryPath += *prefix; + tryPath += name; + tryPath += *suffix; + if(cmSystemTools::FileExists(tryPath.c_str()) + && !cmSystemTools::FileIsDirectory(tryPath.c_str())) + { + tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str()); + cmSystemTools::ConvertToUnixSlashes(tryPath); + return tryPath; + } + } + } + } + } + // Couldn't find the library. + return ""; +} diff --git a/Source/cmFindLibraryCommand.h b/Source/cmFindLibraryCommand.h new file mode 100644 index 000000000..5c82b84c8 --- /dev/null +++ b/Source/cmFindLibraryCommand.h @@ -0,0 +1,76 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindLibraryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-31 12:50:40 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindLibraryCommand_h +#define cmFindLibraryCommand_h + +#include "cmFindBase.h" + + +/** \class cmFindLibraryCommand + * \brief Define a command to search for a library. + * + * cmFindLibraryCommand is used to define a CMake variable + * that specifies a library. The command searches for a given + * file in a list of directories. + */ +class cmFindLibraryCommand : public cmFindBase +{ +public: + cmFindLibraryCommand(); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFindLibraryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "find_library";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Find a library."; + } + cmTypeMacro(cmFindLibraryCommand, cmFindBase); + +protected: + void AddArchitecturePaths(const char* suffix); + void AddLib64Paths(); + std::string FindLibrary(const char* name); +}; + + + +#endif diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx new file mode 100644 index 000000000..6d6d7c6e4 --- /dev/null +++ b/Source/cmFindPackageCommand.cxx @@ -0,0 +1,1838 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindPackageCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-29 14:57:39 $ + Version: $Revision: 1.36 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindPackageCommand.h" +#include + +#ifdef CMAKE_BUILD_WITH_CMAKE +#include "cmVariableWatch.h" +#endif + +void cmFindPackageNeedBackwardsCompatibility(const std::string& variable, + int access_type, void*, const char* newValue, + const cmMakefile*) +{ + (void)newValue; +#ifdef CMAKE_BUILD_WITH_CMAKE + if(access_type == cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS) + { + std::string message = "An attempt was made to access a variable: "; + message += variable; + message += + " that has not been defined. This variable is created by the " + "FIND_PACKAGE command. CMake version 1.6 always converted the " + "variable name to upper-case, but this behavior is no longer the " + "case. To fix this you might need to set the cache value of " + "CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less. If you are writing a " + "CMake listfile, you should change the variable reference to use " + "the case of the argument to FIND_PACKAGE."; + cmSystemTools::Error(message.c_str()); + } +#else + (void)variable; + (void)access_type; +#endif +} + +//---------------------------------------------------------------------------- +cmFindPackageCommand::cmFindPackageCommand() +{ + cmSystemTools::ReplaceString(this->GenericDocumentationRootPath, + "CMAKE_FIND_ROOT_PATH_MODE_XXX", + "CMAKE_FIND_ROOT_PATH_MODE_PACKAGE"); + cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder, + "FIND_ARGS_XXX", ""); + cmSystemTools::ReplaceString(this->GenericDocumentationPathsOrder, + "FIND_XXX", "find_package"); + this->CMakePathName = "PACKAGE"; + this->Quiet = false; + this->Required = false; + this->NoBuilds = false; + this->NoModule = false; + this->DebugMode = false; + this->VersionMajor = 0; + this->VersionMinor = 0; + this->VersionPatch = 0; + this->VersionCount = 0; + this->VersionExact = false; + this->VersionFoundMajor = 0; + this->VersionFoundMinor = 0; + this->VersionFoundPatch = 0; + this->VersionFoundCount = 0; + this->CommandDocumentation = + " find_package( [major[.minor[.patch]]] [EXACT] [QUIET]\n" + " [[REQUIRED|COMPONENTS] [components...]])\n" + "Finds and loads settings from an external project. " + "_FOUND will be set to indicate whether the package was found. " + "When the package is found package-specific information is provided " + "through variables documented by the package itself. " + "The QUIET option disables messages if the package cannot be found. " + "The REQUIRED option stops processing with an error message if the " + "package cannot be found. " + "A package-specific list of components may be listed after the " + "REQUIRED option or after the COMPONENTS option if no REQUIRED " + "option is given. " + "The \"[major[.minor[.patch]]]\" version argument specifies a desired " + "version with which the package found should be compatible. " + "The EXACT option requests that the version be matched exactly. " + "Version support is currently provided only on a package-by-package " + "basis (details below).\n" + "User code should generally look for packages using the above simple " + "signature. The remainder of this command documentation specifies the " + "full command signature and details of the search process. Project " + "maintainers wishing to provide a package to be found by this command " + "are encouraged to read on.\n" + "The command has two modes by which it searches for packages: " + "\"Module\" mode and \"Config\" mode. " + "Module mode is available when the command is invoked with the above " + "reduced signature. " + "CMake searches for a file called \"Find.cmake\" in " + "the CMAKE_MODULE_PATH followed by the CMake installation. " + "If the file is found, it is read and processed by CMake. " + "It is responsible for finding the package, checking the version, " + "and producing any needed messages. " + "Many find-modules provide limited or no support for versioning; " + "check the module documentation. " + "If no module is found the command proceeds to Config mode.\n" + "The complete Config mode command signature is:\n" + " find_package( [major[.minor[.patch]]] [EXACT] [QUIET]\n" + " [[REQUIRED|COMPONENTS] [components...]] [NO_MODULE]\n" + " [NAMES name1 [name2 ...]]\n" + " [CONFIGS config1 [config2 ...]]\n" + " [PATHS path1 [path2 ... ]]\n" + " [PATH_SUFFIXES suffix1 [suffix2 ...]]\n" + " [NO_DEFAULT_PATH]\n" + " [NO_CMAKE_ENVIRONMENT_PATH]\n" + " [NO_CMAKE_PATH]\n" + " [NO_SYSTEM_ENVIRONMENT_PATH]\n" + " [NO_CMAKE_BUILDS_PATH]\n" + " [NO_CMAKE_SYSTEM_PATH]\n" + " [CMAKE_FIND_ROOT_PATH_BOTH |\n" + " ONLY_CMAKE_FIND_ROOT_PATH |\n" + " NO_CMAKE_FIND_ROOT_PATH])\n" + "The NO_MODULE option may be used to skip Module mode explicitly. " + "It is also implied by use of options not specified in the reduced " + "signature. " + "\n" + "Config mode attempts to locate a configuration file provided by the " + "package to be found. A cache entry called _DIR is created to " + "hold the directory containing the file. " + "By default the command searches for a package with the name . " + "If the NAMES option is given the names following it are used instead " + "of . " + "The command searches for a file called \"Config.cmake\" or " + "\"-config.cmake\" for each name specified. " + "A replacement set of possible configuration file names may be given " + "using the CONFIGS option. " + "The search procedure is specified below. Once found, the configuration " + "file is read and processed by CMake. Since the file is provided by the " + "package it already knows the location of package contents. " + "The full path to the configuration file is stored in the cmake " + "variable _CONFIG." + "\n" + "If the package configuration file cannot be found CMake " + "will generate an error describing the problem unless the QUIET " + "argument is specified. If REQUIRED is specified and the package " + "is not found a fatal error is generated and the configure step stops " + "executing. If _DIR has been set to a directory not containing " + "a configuration file a fatal error is always generated because user " + "intervention is required." + "\n" + "When the \"[major[.minor[.patch]]]\" version argument is specified " + "Config mode will only find a version of the package that claims " + "compatibility with the requested version. " + "If the EXACT option is given only a version of the package claiming " + "an exact match of the requested version may be found. " + "CMake does not establish any convention for the meaning of version " + "numbers. " + "Package version numbers are checked by \"version\" files provided by " + "the packages themselves. " + "For a candidate package confguration file \".cmake\" the " + "corresponding version file is located next to it and named either " + "\"-version.cmake\" or \"Version.cmake\". " + "If no such version file is available then the configuration file " + "is assumed to not be compatible with any requested version. " + "When a version file is found it is loaded to check the requested " + "version number. " + "The version file is loaded in a nested scope in which the following " + "variables have been defined:\n" + " PACKAGE_FIND_NAME = the name\n" + " PACKAGE_FIND_VERSION = full requested version string\n" + " PACKAGE_FIND_VERSION_MAJOR = requested major version, if any\n" + " PACKAGE_FIND_VERSION_MINOR = requested minor version, if any\n" + " PACKAGE_FIND_VERSION_PATCH = requested patch version, if any\n" + "The version file checks whether it satisfies the requested version " + "and sets these variables:\n" + " PACKAGE_VERSION = package version (major[.minor[.patch]])\n" + " PACKAGE_VERSION_EXACT = true if version is exact match\n" + " PACKAGE_VERSION_COMPATIBLE = true if version is compatible\n" + "These variables are checked by the find_package command to determine " + "whether the configuration file provides an acceptable version. " + "They are not available after the find_package call returns. " + "If the version is acceptable the following variables are set:\n" + " _VERSION = package version (major[.minor[.patch]])\n" + " _VERSION_MAJOR = major from major[.minor[.patch]], if any\n" + " _VERSION_MINOR = minor from major[.minor[.patch]], if any\n" + " _VERSION_PATCH = patch from major[.minor[.patch]], if any\n" + "and the corresponding package configuration file is loaded. " + "When multiple package configuration files are available whose version " + "files claim compatibility with the version requested it is unspecified " + "which one is chosen. " + "No attempt is made to choose a highest or closest version number." + "\n" + "Config mode provides an elaborate interface and search procedure. " + "Much of the interface is provided for completeness and for use " + "internally by find-modules loaded by Module mode. " + "Most user code should simply call\n" + " find_package( [major[.minor]] [EXACT] [REQUIRED|QUIET])\n" + "in order to find a package. Package maintainers providing CMake " + "package configuration files are encouraged to name and install " + "them such that the procedure outlined below will find them " + "without requiring use of additional options." + "\n" + "CMake constructs a set of possible installation prefixes for the " + "package. Under each prefix several directories are searched for a " + "configuration file. The tables below show the directories searched. " + "Each entry is meant for installation trees following Windows (W), " + "UNIX (U), or Apple (A) conventions.\n" + " / (W)\n" + " /(cmake|CMake)/ (W)\n" + " /(share|lib)/*/ (U)\n" + " /(share|lib)/*/(cmake|CMake)/ (U)\n" + "On systems supporting OS X Frameworks and Application Bundles " + "the following directories are searched for frameworks or bundles " + "containing a configuration file:\n" + " /.framework/Resources/ (A)\n" + " /.framework/Resources/CMake/ (A)\n" + " /.framework/Versions/*/Resources/ (A)\n" + " /.framework/Versions/*/Resources/CMake/ (A)\n" + " /.app/Contents/Resources/ (A)\n" + " /.app/Contents/Resources/CMake/ (A)\n" + "In all cases the is treated as case-insensitive and corresponds " + "to any of the names specified ( or names given by NAMES). " + "If PATH_SUFFIXES is specified the suffixes are appended to each " + "(W) or (U) directory entry one-by-one.\n" + "This set of directories is intended to work in cooperation with " + "projects that provide configuration files in their installation trees. " + "Directories above marked with (W) are intended for installations on " + "Windows where the prefix may point at the top of an application's " + "installation directory. Those marked with (U) are intended for " + "installations on UNIX platforms where the prefix is shared by " + "multiple packages. This is merely a convention, so all (W) and (U) " + "directories are still searched on all platforms. " + "Directories marked with (A) are intended for installations on " + "Apple platforms. The cmake variables CMAKE_FIND_FRAMEWORK and " + "CMAKE_FIND_APPBUNDLE determine the order of preference " + "as specified below.\n" + "The set of installation prefixes is constructed using the following " + "steps. If NO_DEFAULT_PATH is specified steps 1-5 are skipped.\n" + "1. Search cmake specific environment variables. This " + "can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\n" + " CMAKE_PREFIX_PATH\n" + " CMAKE_FRAMEWORK_PATH\n" + " CMAKE_APPBUNDLE_PATH\n" + "2. Search cmake variables with the same names as the cmake specific " + "environment variables. These are intended to be used on the command " + "line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH " + "is passed.\n" + " CMAKE_PREFIX_PATH\n" + " CMAKE_FRAMEWORK_PATH\n" + " CMAKE_APPBUNDLE_PATH\n" + "3. Search the standard system environment variables. " + "This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is passed. " + "Path entries ending in \"/bin\" or \"/sbin\" are automatically " + "converted to their parent directories.\n" + " PATH\n" + "4. Search project build trees recently configured in a CMake GUI. " + "This can be skipped if NO_CMAKE_BUILDS_PATH is passed. " + "It is intended for the case when a user is building multiple " + "dependent projects one after another.\n" + "5. Search cmake variables defined in the Platform files " + "for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH " + "is passed.\n" + " CMAKE_SYSTEM_PREFIX_PATH\n" + " CMAKE_SYSTEM_FRAMEWORK_PATH\n" + " CMAKE_SYSTEM_APPBUNDLE_PATH\n" + "6. Search paths specified by the PATHS option.\n" + ; + this->CommandDocumentation += this->GenericDocumentationMacPolicy; + this->CommandDocumentation += this->GenericDocumentationRootPath; + this->CommandDocumentation += this->GenericDocumentationPathsOrder; +} + +//---------------------------------------------------------------------------- +const char* cmFindPackageCommand::GetFullDocumentation() +{ + return this->CommandDocumentation.c_str(); +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Check for debug mode. + this->DebugMode = this->Makefile->IsOn("CMAKE_FIND_DEBUG_MODE"); + + // Find the current root path mode. + this->SelectDefaultRootPathMode(); + + // Find the current bundle/framework search policy. + this->SelectDefaultMacMode(); + + // Record options. + this->Name = args[0]; + std::string components; + const char* components_sep = ""; + + // Check ancient compatibility. + this->Compatibility_1_6 = + this->Makefile->GetLocalGenerator() + ->NeedBackwardsCompatibility(1, 6); + + // Always search directly in a generated path. + this->SearchPathSuffixes.push_back(""); + + // Parse the arguments. + enum Doing { DoingNone, DoingComponents, DoingNames, DoingPaths, + DoingPathSuffixes, DoingConfigs }; + Doing doing = DoingNone; + cmsys::RegularExpression version("^[0-9.]+$"); + bool haveVersion = false; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "QUIET") + { + this->Quiet = true; + doing = DoingNone; + } + else if(args[i] == "EXACT") + { + this->VersionExact = true; + this->Compatibility_1_6 = false; + doing = DoingNone; + } + else if(args[i] == "NO_MODULE") + { + this->NoModule = true; + doing = DoingNone; + } + else if(args[i] == "REQUIRED") + { + this->Required = true; + doing = DoingComponents; + } + else if(args[i] == "COMPONENTS") + { + this->Compatibility_1_6 = false; + doing = DoingComponents; + } + else if(args[i] == "NAMES") + { + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingNames; + } + else if(args[i] == "PATHS") + { + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingPaths; + } + else if(args[i] == "PATH_SUFFIXES") + { + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingPathSuffixes; + } + else if(args[i] == "CONFIGS") + { + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingConfigs; + } + else if(args[i] == "NO_CMAKE_BUILDS_PATH") + { + this->NoBuilds = true; + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingNone; + } + else if(this->CheckCommonArgument(args[i])) + { + this->NoModule = true; + this->Compatibility_1_6 = false; + doing = DoingNone; + } + else if(doing == DoingComponents) + { + // Set a variable telling the find script this component + // is required. + std::string req_var = Name + "_FIND_REQUIRED_" + args[i]; + this->Makefile->AddDefinition(req_var.c_str(), "1"); + + // Append to the list of required components. + components += components_sep; + components += args[i]; + components_sep = ";"; + } + else if(doing == DoingNames) + { + this->Names.push_back(args[i]); + } + else if(doing == DoingPaths) + { + this->AddUserPath(args[i]); + } + else if(doing == DoingPathSuffixes) + { + this->AddPathSuffix(args[i]); + } + else if(doing == DoingConfigs) + { + if(args[i].find_first_of(":/\\") != args[i].npos || + cmSystemTools::GetFilenameLastExtension(args[i]) != ".cmake") + { + cmOStringStream e; + e << "given CONFIGS option followed by invalid file name \"" + << args[i] << "\". The names given must be file names without " + << "a path and with a \".cmake\" extension."; + return false; + } + this->Configs.push_back(args[i]); + } + else if(!haveVersion && version.find(args[i].c_str())) + { + haveVersion = true; + this->Version = args[i]; + } + else + { + cmOStringStream e; + e << "called with invalid argument \"" << args[i].c_str() << "\""; + this->SetError(e.str().c_str()); + return false; + } + } + + if(!this->Version.empty()) + { + // Try to parse the version number and store the results that were + // successfully parsed. + unsigned int parsed_major; + unsigned int parsed_minor; + unsigned int parsed_patch; + this->VersionCount = sscanf(this->Version.c_str(), "%u.%u.%u", + &parsed_major, &parsed_minor, &parsed_patch); + switch(this->VersionCount) + { + case 3: this->VersionPatch = parsed_patch; // no break! + case 2: this->VersionMinor = parsed_minor; // no break! + case 1: this->VersionMajor = parsed_major; // no break! + default: break; + } + } + + // Store the list of components. + std::string components_var = Name + "_FIND_COMPONENTS"; + this->Makefile->AddDefinition(components_var.c_str(), components.c_str()); + + // See if there is a Find.cmake module. + if(!this->NoModule) + { + bool foundModule = false; + if(!this->FindModule(foundModule)) + { + this->AppendSuccessInformation(); + return false; + } + if(foundModule) + { + this->AppendSuccessInformation(); + return true; + } + } + + // No find module. Assume the project has a CMake config file. Use + // a _DIR cache variable to locate it. + this->Variable = this->Name; + this->Variable += "_DIR"; + + // Add the default name. + if(this->Names.empty()) + { + this->Names.push_back(this->Name); + } + + // Add the default configs. + if(this->Configs.empty()) + { + for(std::vector::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + std::string config = *ni; + config += "Config.cmake"; + this->Configs.push_back(config); + + config = cmSystemTools::LowerCase(*ni); + config += "-config.cmake"; + this->Configs.push_back(config); + } + } + + // Find and load the package. + bool result = this->HandlePackageMode(); + this->AppendSuccessInformation(); + return result; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindModule(bool& found) +{ + std::string module = "Find"; + module += this->Name; + module += ".cmake"; + std::string mfile = this->Makefile->GetModulesFile(module.c_str()); + if ( mfile.size() ) + { + if(this->Quiet) + { + // Tell the module that is about to be read that it should find + // quietly. + std::string quietly = this->Name; + quietly += "_FIND_QUIETLY"; + this->Makefile->AddDefinition(quietly.c_str(), "1"); + } + + if(this->Required) + { + // Tell the module that is about to be read that it should report + // a fatal error if the package is not found. + std::string req = this->Name; + req += "_FIND_REQUIRED"; + this->Makefile->AddDefinition(req.c_str(), "1"); + } + + if(!this->Version.empty()) + { + // Tell the module that is about to be read what version of the + // package has been requested. + std::string ver = this->Name; + ver += "_FIND_VERSION"; + this->Makefile->AddDefinition(ver.c_str(), this->Version.c_str()); + char buf[64]; + switch(this->VersionCount) + { + case 3: + { + sprintf(buf, "%u", this->VersionPatch); + this->Makefile->AddDefinition((ver+"_PATCH").c_str(), buf); + } // no break + case 2: + { + sprintf(buf, "%u", this->VersionMinor); + this->Makefile->AddDefinition((ver+"_MINOR").c_str(), buf); + } // no break + case 1: + { + sprintf(buf, "%u", this->VersionMajor); + this->Makefile->AddDefinition((ver+"_MAJOR").c_str(), buf); + } // no break + default: break; + } + + // Tell the module whether an exact version has been requested. + std::string exact = this->Name; + exact += "_FIND_VERSION_EXACT"; + this->Makefile->AddDefinition(exact.c_str(), + this->VersionExact? "1":"0"); + } + + // Load the module we found. + found = true; + return this->ReadListFile(mfile.c_str()); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::HandlePackageMode() +{ + // Support old capitalization behavior. + std::string upperDir = cmSystemTools::UpperCase(this->Name); + std::string upperFound = cmSystemTools::UpperCase(this->Name); + upperDir += "_DIR"; + upperFound += "_FOUND"; + if(upperDir == this->Variable) + { + this->Compatibility_1_6 = false; + } + + // Try to find the config file. + const char* def = this->Makefile->GetDefinition(this->Variable.c_str()); + if(this->Compatibility_1_6 && cmSystemTools::IsOff(def)) + { + // Use the setting of the old name of the variable to provide the + // value of the new. + const char* oldDef = this->Makefile->GetDefinition(upperDir.c_str()); + if(!cmSystemTools::IsOff(oldDef)) + { + this->Makefile->AddDefinition(this->Variable.c_str(), oldDef); + def = this->Makefile->GetDefinition(this->Variable.c_str()); + } + } + + // Search for the config file if it is not already found. + if(cmSystemTools::IsOff(def)) + { + this->FindConfig(); + def = this->Makefile->GetDefinition(this->Variable.c_str()); + } + + // If the config file was found, load it. + std::string file; + bool result = true; + bool found = false; + if(!cmSystemTools::IsOff(def)) + { + // Get the directory from the variable value. + std::string dir = def; + cmSystemTools::ConvertToUnixSlashes(dir); + + // Treat relative paths with respect to the current source dir. + if(!cmSystemTools::FileIsFullPath(dir.c_str())) + { + dir = "/" + dir; + dir = this->Makefile->GetCurrentDirectory() + dir; + } + + // Find the configuration file. + if(this->FindConfigFileToLoad(dir, file)) + { + // Set the version variables before loading the config file. + // It may override them. + this->StoreVersionFound(); + + // Parse the configuration file. + if(this->ReadListFile(file.c_str())) + { + // The package has been found. + found = true; + } + else + { + // The configuration file is invalid. + result = false; + } + } + else + { + // The variable setting is wrong. + cmOStringStream e; + e << "cannot find package " << this->Name << " because " + << this->Variable << " is set to \"" << def << "\" " + << "which is not a directory containing a package configuration " + << "file (or it is not for the requested version). " + << "Please set the cache entry " << this->Variable << " " + << "to the correct directory, or delete it to ask CMake " + << "to search."; + this->SetError(e.str().c_str()); + result = false; + } + } + else if(!this->Quiet || this->Required) + { + // The variable is not set. + cmOStringStream e; + e << "could not find "; + if(!this->NoModule) + { + e << "module Find" << this->Name << ".cmake or "; + } + e << "a configuration file for package " << this->Name << ".\n"; + if(!this->NoModule) + { + e << "Adjust CMAKE_MODULE_PATH to find Find" + << this->Name << ".cmake or set "; + } + else + { + e << "Set "; + } + e << this->Variable << " to the directory containing a CMake " + << "configuration file for " << this->Name << ". "; + if(this->Configs.size() == 1) + { + e << "The file will be called " << this->Configs[0]; + } + else + { + e << "The file will have one of the following names:\n"; + for(std::vector::const_iterator ci = this->Configs.begin(); + ci != this->Configs.end(); ++ci) + { + e << " " << *ci << "\n"; + } + } + if(this->Required) + { + this->SetError(e.str().c_str()); + result = false; + } + else + { + cmSystemTools::Error("find_package ", e.str().c_str()); + } + } + + // Set a variable marking whether the package was found. + std::string foundVar = this->Name; + foundVar += "_FOUND"; + this->Makefile->AddDefinition(foundVar.c_str(), found? "1":"0"); + + // Set a variable naming the configuration file that was found. + std::string fileVar = this->Name; + fileVar += "_CONFIG"; + if(found) + { + this->Makefile->AddDefinition(fileVar.c_str(), file.c_str()); + } + else + { + this->Makefile->RemoveDefinition(fileVar.c_str()); + } + + // Handle some ancient compatibility stuff. + if(this->Compatibility_1_6) + { + // Listfiles will be looking for the capitalized version of the + // name. Provide it. + this->Makefile->AddDefinition + (upperDir.c_str(), + this->Makefile->GetDefinition(this->Variable.c_str())); + this->Makefile->AddDefinition + (upperFound.c_str(), + this->Makefile->GetDefinition(foundVar.c_str())); + } + +#ifdef CMAKE_BUILD_WITH_CMAKE + if(!(upperDir == this->Variable)) + { + if(this->Compatibility_1_6) + { + // Listfiles may use the capitalized version of the name. + // Remove any previously added watch. + this->Makefile->GetVariableWatch()->RemoveWatch( + upperDir.c_str(), + cmFindPackageNeedBackwardsCompatibility + ); + } + else + { + // Listfiles should not be using the capitalized version of the + // name. Add a watch to warn the user. + this->Makefile->GetVariableWatch()->AddWatch( + upperDir.c_str(), + cmFindPackageNeedBackwardsCompatibility + ); + } + } +#endif + + return result; +} + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::FindConfig() +{ + // Compute the set of search prefixes. + this->ComputePrefixes(); + + // Look for the project's configuration file. + bool found = false; + + // Search for frameworks. + if(!found && this->SearchFrameworkFirst || this->SearchFrameworkOnly) + { + found = this->FindFrameworkConfig(); + } + + // Search for apps. + if(!found && this->SearchAppBundleFirst || this->SearchAppBundleOnly) + { + found = this->FindAppBundleConfig(); + } + + // Search prefixes. + if(!found && !(this->SearchFrameworkOnly || this->SearchAppBundleOnly)) + { + found = this->FindPrefixedConfig(); + } + + // Search for frameworks. + if(!found && this->SearchFrameworkLast) + { + found = this->FindFrameworkConfig(); + } + + // Search for apps. + if(!found && this->SearchAppBundleLast) + { + found = this->FindAppBundleConfig(); + } + + // Store the entry in the cache so it can be set by the user. + std::string init; + if(found) + { + init = cmSystemTools::GetFilenamePath(this->FileFound); + } + else + { + init = this->Variable + "-NOTFOUND"; + } + std::string help = + "The directory containing a CMake configuration file for "; + help += this->Name; + help += "."; + this->Makefile->AddCacheDefinition(this->Variable.c_str(), + init.c_str(), help.c_str(), + cmCacheManager::PATH); +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindPrefixedConfig() +{ + for(std::vector::const_iterator pi = this->Prefixes.begin(); + pi != this->Prefixes.end(); ++pi) + { + if(this->SearchPrefix(*pi)) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindFrameworkConfig() +{ + for(std::vector::const_iterator i = this->Prefixes.begin(); + i != this->Prefixes.end(); ++i) + { + if(this->SearchFrameworkPrefix(*i)) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindAppBundleConfig() +{ + for(std::vector::const_iterator i = this->Prefixes.begin(); + i != this->Prefixes.end(); ++i) + { + if(this->SearchAppBundlePrefix(*i)) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::ReadListFile(const char* f) +{ + if(this->Makefile->ReadListFile(this->Makefile->GetCurrentListFile(),f)) + { + return true; + } + std::string e = "Error reading CMake code from \""; + e += f; + e += "\"."; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::AppendToProperty(const char* propertyName) +{ + std::string propertyValue; + const char *prop = + this->Makefile->GetCMakeInstance()->GetProperty(propertyName); + if (prop && *prop) + { + propertyValue = prop; + + std::vector contents; + cmSystemTools::ExpandListArgument(propertyValue, contents, false); + + bool alreadyInserted = false; + for(std::vector::const_iterator it = contents.begin(); + it != contents.end(); ++ it ) + { + if (*it == this->Name) + { + alreadyInserted = true; + break; + } + } + if (!alreadyInserted) + { + propertyValue += ";"; + propertyValue += this->Name; + } + } + else + { + propertyValue = this->Name; + } + this->Makefile->GetCMakeInstance()->SetProperty(propertyName, + propertyValue.c_str()); + } + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::AppendSuccessInformation() +{ + std::string found = this->Name; + found += "_FOUND"; + std::string upperFound = cmSystemTools::UpperCase(found); + + const char* upperResult = this->Makefile->GetDefinition(upperFound.c_str()); + const char* result = this->Makefile->GetDefinition(found.c_str()); + if ((cmSystemTools::IsOn(result)) || (cmSystemTools::IsOn(upperResult))) + { + this->AppendToProperty("PACKAGES_FOUND"); + if (!this->Quiet) + { + this->AppendToProperty("ENABLED_FEATURES"); + } + } + else + { + this->AppendToProperty("PACKAGES_NOT_FOUND"); + if (!this->Quiet) + { + this->AppendToProperty("DISABLED_FEATURES"); + } + } +} + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::AddUserPath(std::string const& p) +{ + std::string userPath = p; + cmSystemTools::ExpandRegistryValues(userPath); + this->UserPaths.push_back(userPath); +} + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::ComputePrefixes() +{ + std::vector& prefixes = this->Prefixes; + std::set emmitted; + + if(!this->NoCMakeEnvironmentPath && !this->NoDefaultPath) + { + // Check the environment variable with the same name as the cache + // entry. + std::string env; + if(cmSystemTools::GetEnv(this->Variable.c_str(), env) && env.length() > 0) + { + cmSystemTools::ConvertToUnixSlashes(env); + this->AddPathInternal(prefixes, env, EnvPath, &emmitted); + } + + this->AddEnvPath(prefixes, "CMAKE_PREFIX_PATH", &emmitted); + this->AddEnvPath(prefixes, "CMAKE_FRAMEWORK_PATH", &emmitted); + this->AddEnvPath(prefixes, "CMAKE_APPBUNDLE_PATH", &emmitted); + } + + if(!this->NoCMakePath && !this->NoDefaultPath) + { + this->AddCMakePath(prefixes, "CMAKE_PREFIX_PATH", &emmitted); + this->AddCMakePath(prefixes, "CMAKE_FRAMEWORK_PATH", &emmitted); + this->AddCMakePath(prefixes, "CMAKE_APPBUNDLE_PATH", &emmitted); + } + + if(!this->NoSystemEnvironmentPath && !this->NoDefaultPath) + { + // Use the system search path to generate prefixes. + // Relative paths are interpreted with respect to the current + // working directory. + std::vector tmp; + cmSystemTools::GetPath(tmp); + for(std::vector::iterator i = tmp.begin(); + i != tmp.end(); ++i) + { + std::string const& d = *i; + + // If the path is a PREFIX/bin case then add its parent instead. + if(d.size() >= 4 && strcmp(d.c_str()+d.size()-4, "/bin") == 0 || + d.size() >= 5 && strcmp(d.c_str()+d.size()-5, "/sbin") == 0) + { + this->AddPathInternal(prefixes, + cmSystemTools::GetFilenamePath(d), + EnvPath, &emmitted); + } + else + { + this->AddPathInternal(prefixes, d, EnvPath, &emmitted); + } + } + } + + if(!this->NoBuilds && !this->NoDefaultPath) + { + // It is likely that CMake will have recently built the project. + for(int i=1; i <= 10; ++i) + { + cmOStringStream r; + r << + "[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\" + "Settings\\StartPath;WhereBuild" << i << "]"; + std::string f = r.str(); + cmSystemTools::ExpandRegistryValues(f); + cmSystemTools::ConvertToUnixSlashes(f); + if(cmSystemTools::FileIsFullPath(f.c_str()) && + cmSystemTools::FileIsDirectory(f.c_str())) + { + this->AddPathInternal(prefixes, f, FullPath, &emmitted); + } + } + } + + if(!this->NoCMakeSystemPath && !this->NoDefaultPath) + { + this->AddCMakePath(prefixes, "CMAKE_SYSTEM_PREFIX_PATH", &emmitted); + this->AddCMakePath(prefixes, "CMAKE_SYSTEM_FRAMEWORK_PATH", &emmitted); + this->AddCMakePath(prefixes, "CMAKE_SYSTEM_APPBUNDLE_PATH", &emmitted); + } + + if(!this->UserPaths.empty()) + { + // Add paths specified by the caller. + this->AddPathsInternal(prefixes, this->UserPaths, CMakePath, &emmitted); + } + + // Construct the final set of prefixes. + this->RerootPaths(prefixes); + + // Add a trailing slash to all prefixes to aid the search process. + for(std::vector::iterator i = prefixes.begin(); + i != prefixes.end(); ++i) + { + std::string& prefix = *i; + if(prefix[prefix.size()-1] != '/') + { + prefix += "/"; + } + } +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::SearchDirectory(std::string const& dir) +{ + assert(!dir.empty() && dir[dir.size()-1] == '/'); + + // Check each path suffix on this directory. + for(std::vector::const_iterator + si = this->SearchPathSuffixes.begin(); + si != this->SearchPathSuffixes.end(); ++si) + { + std::string d = dir; + if(!si->empty()) + { + d += *si; + d += "/"; + } + if(this->CheckDirectory(d)) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::CheckDirectory(std::string const& dir) +{ + assert(!dir.empty() && dir[dir.size()-1] == '/'); + + // Look for the file in this directory. + std::string d = dir.substr(0, dir.size()-1); + if(this->FindConfigFile(d, this->FileFound)) + { + // Remove duplicate slashes. + cmSystemTools::ConvertToUnixSlashes(this->FileFound); + return true; + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindConfigFile(std::string const& dir, + std::string& file) +{ + for(std::vector::const_iterator ci = this->Configs.begin(); + ci != this->Configs.end(); ++ci) + { + file = dir; + file += "/"; + file += *ci; + if(this->DebugMode) + { + fprintf(stderr, "Checking file [%s]\n", file.c_str()); + } + if(cmSystemTools::FileExists(file.c_str(), true) && + this->CheckVersion(file)) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::FindConfigFileToLoad(std::string const& dir, + std::string& file) +{ + if(this->FileFound.empty()) + { + // The file location was cached. Look for the correct file. + return this->FindConfigFile(dir, file); + } + else + { + // The file location was just found during this call. + // Use the file found without searching again. + file = this->FileFound; + return true; + } +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::CheckVersion(std::string const& config_file) +{ + // Get the filename without the .cmake extension. + std::string::size_type pos = config_file.rfind('.'); + std::string version_file_base = config_file.substr(0, pos); + + // Look for foo-config-version.cmake + std::string version_file = version_file_base; + version_file += "-version.cmake"; + if(cmSystemTools::FileExists(version_file.c_str(), true)) + { + return this->CheckVersionFile(version_file); + } + + // Look for fooConfigVersion.cmake + version_file = version_file_base; + version_file += "Version.cmake"; + if(cmSystemTools::FileExists(version_file.c_str(), true)) + { + return this->CheckVersionFile(version_file); + } + + // If no version was requested a versionless package is acceptable. + if(this->Version.empty()) + { + return true; + } + + // No version file found. Assume the version is incompatible. + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::CheckVersionFile(std::string const& version_file) +{ + // The version file will be loaded in an isolated scope. + this->Makefile->PushScope(); + + // Clear the output variables. + this->Makefile->RemoveDefinition("PACKAGE_VERSION"); + this->Makefile->RemoveDefinition("PACKAGE_VERSION_COMPATIBLE"); + this->Makefile->RemoveDefinition("PACKAGE_VERSION_EXACT"); + + // Set the input variables. + this->Makefile->AddDefinition("PACKAGE_FIND_NAME", this->Name.c_str()); + this->Makefile->AddDefinition("PACKAGE_FIND_VERSION", + this->Version.c_str()); + if(this->VersionCount >= 3) + { + char buf[64]; + sprintf(buf, "%u", this->VersionPatch); + this->Makefile->AddDefinition("PACKAGE_FIND_VERSION_PATCH", buf); + } + else + { + this->Makefile->RemoveDefinition("PACKAGE_FIND_VERSION_PATCH"); + } + if(this->VersionCount >= 2) + { + char buf[64]; + sprintf(buf, "%u", this->VersionMinor); + this->Makefile->AddDefinition("PACKAGE_FIND_VERSION_MINOR", buf); + } + else + { + this->Makefile->RemoveDefinition("PACKAGE_FIND_VERSION_MINOR"); + } + if(this->VersionCount >= 1) + { + char buf[64]; + sprintf(buf, "%u", this->VersionMajor); + this->Makefile->AddDefinition("PACKAGE_FIND_VERSION_MAJOR", buf); + } + else + { + this->Makefile->RemoveDefinition("PACKAGE_FIND_VERSION_MAJOR"); + } + + // Load the version check file. + bool found = false; + if(this->ReadListFile(version_file.c_str())) + { + // Check the output variables. + found = this->Makefile->IsOn("PACKAGE_VERSION_EXACT"); + if(!found && !this->VersionExact) + { + found = this->Makefile->IsOn("PACKAGE_VERSION_COMPATIBLE"); + } + if(found || this->Version.empty()) + { + // Get the version found. + this->VersionFound = + this->Makefile->GetSafeDefinition("PACKAGE_VERSION"); + + // Try to parse the version number and store the results that were + // successfully parsed. + unsigned int parsed_major; + unsigned int parsed_minor; + unsigned int parsed_patch; + this->VersionFoundCount = + sscanf(this->VersionFound.c_str(), "%u.%u.%u", + &parsed_major, &parsed_minor, &parsed_patch); + switch(this->VersionFoundCount) + { + case 3: this->VersionFoundPatch = parsed_patch; // no break! + case 2: this->VersionFoundMinor = parsed_minor; // no break! + case 1: this->VersionFoundMajor = parsed_major; // no break! + default: break; + } + } + } + + // Restore the original scope. + this->Makefile->PopScope(); + + // Succeed if the version was found or no version was requested. + return found || this->Version.empty(); +} + +//---------------------------------------------------------------------------- +void cmFindPackageCommand::StoreVersionFound() +{ + // Store the whole version string. + std::string ver = this->Name; + ver += "_VERSION"; + if(this->VersionFound.empty()) + { + this->Makefile->RemoveDefinition(ver.c_str()); + } + else + { + this->Makefile->AddDefinition(ver.c_str(), this->VersionFound.c_str()); + } + + // Store the portions that could be parsed. + char buf[64]; + switch(this->VersionFoundCount) + { + case 3: + { + sprintf(buf, "%u", this->VersionFoundPatch); + this->Makefile->AddDefinition((ver+"_PATCH").c_str(), buf); + } // no break + case 2: + { + sprintf(buf, "%u", this->VersionFoundMinor); + this->Makefile->AddDefinition((ver+"_MINOR").c_str(), buf); + } // no break + case 1: + { + sprintf(buf, "%u", this->VersionFoundMajor); + this->Makefile->AddDefinition((ver+"_MAJOR").c_str(), buf); + } // no break + default: break; + } +} + +//---------------------------------------------------------------------------- +#include +#include +#include +#include + +class cmFileList; +class cmFileListGeneratorBase +{ +public: + virtual ~cmFileListGeneratorBase() {} +protected: + bool Consider(std::string const& fullPath, cmFileList& listing); +private: + bool Search(cmFileList&); + virtual bool Search(std::string const& parent, cmFileList&) = 0; + virtual cmsys::auto_ptr Clone() const = 0; + friend class cmFileList; + cmFileListGeneratorBase* SetNext(cmFileListGeneratorBase const& next); + cmsys::auto_ptr Next; +}; + +class cmFileList +{ +public: + cmFileList(): First(), Last(0) {} + virtual ~cmFileList() {} + cmFileList& operator/(cmFileListGeneratorBase const& rhs) + { + if(this->Last) + { + this->Last = this->Last->SetNext(rhs); + } + else + { + this->First = rhs.Clone(); + this->Last = this->First.get(); + } + return *this; + } + bool Search() + { + if(this->First.get()) + { + return this->First->Search(*this); + } + return false; + } +private: + virtual bool Visit(std::string const& fullPath) = 0; + friend class cmFileListGeneratorBase; + cmsys::auto_ptr First; + cmFileListGeneratorBase* Last; +}; + +class cmFindPackageFileList: public cmFileList +{ +public: + cmFindPackageFileList(cmFindPackageCommand* fpc, + bool use_suffixes = true): + cmFileList(), FPC(fpc), UseSuffixes(use_suffixes) {} +private: + bool Visit(std::string const& fullPath) + { + if(this->UseSuffixes) + { + return this->FPC->SearchDirectory(fullPath); + } + else + { + return this->FPC->CheckDirectory(fullPath); + } + } + cmFindPackageCommand* FPC; + bool UseSuffixes; +}; + +bool cmFileListGeneratorBase::Search(cmFileList& listing) +{ + return this->Search("", listing); +} + +cmFileListGeneratorBase* +cmFileListGeneratorBase::SetNext(cmFileListGeneratorBase const& next) +{ + this->Next = next.Clone(); + return this->Next.get(); +} + +bool cmFileListGeneratorBase::Consider(std::string const& fullPath, + cmFileList& listing) +{ + if(this->Next.get()) + { + return this->Next->Search(fullPath + "/", listing); + } + else + { + return listing.Visit(fullPath + "/"); + } +} + +class cmFileListGeneratorFixed: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorFixed(std::string const& str): + cmFileListGeneratorBase(), String(str) {} + cmFileListGeneratorFixed(cmFileListGeneratorFixed const& r): + cmFileListGeneratorBase(), String(r.String) {} +private: + std::string String; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + std::string fullPath = parent + this->String; + return this->Consider(fullPath, lister); + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorFixed(*this)); + return g; + } +}; + +class cmFileListGeneratorEnumerate: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorEnumerate(const char* p1, const char* p2): + cmFileListGeneratorBase() + { + this->Vector.push_back(p1); + this->Vector.push_back(p2); + } + cmFileListGeneratorEnumerate(cmFileListGeneratorEnumerate const& r): + cmFileListGeneratorBase(), Vector(r.Vector) {} +private: + std::vector Vector; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + for(std::vector::const_iterator i = this->Vector.begin(); + i != this->Vector.end(); ++i) + { + if(this->Consider(parent + *i, lister)) + { + return true; + } + } + return false; + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorEnumerate(*this)); + return g; + } +}; + +class cmFileListGeneratorProject: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorProject(std::vector const& names): + cmFileListGeneratorBase(), Names(names) {} + cmFileListGeneratorProject(cmFileListGeneratorProject const& r): + cmFileListGeneratorBase(), Names(r.Names) {} +private: + std::vector const& Names; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + // Construct a list of matches. + std::vector matches; + cmsys::Directory d; + d.Load(parent.c_str()); + for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i) + { + const char* fname = d.GetFile(i); + if(strcmp(fname, ".") == 0 || + strcmp(fname, "..") == 0) + { + continue; + } + for(std::vector::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + if(cmsysString_strncasecmp(fname, ni->c_str(), + ni->length()) == 0) + { + matches.push_back(fname); + } + } + } + + for(std::vector::const_iterator i = matches.begin(); + i != matches.end(); ++i) + { + if(this->Consider(parent + *i, lister)) + { + return true; + } + } + return false; + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorProject(*this)); + return g; + } +}; + +class cmFileListGeneratorMacProject: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorMacProject(std::vector const& names, + const char* ext): + cmFileListGeneratorBase(), Names(names), Extension(ext) {} + cmFileListGeneratorMacProject(cmFileListGeneratorMacProject const& r): + cmFileListGeneratorBase(), Names(r.Names), Extension(r.Extension) {} +private: + std::vector const& Names; + std::string Extension; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + // Construct a list of matches. + std::vector matches; + cmsys::Directory d; + d.Load(parent.c_str()); + for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i) + { + const char* fname = d.GetFile(i); + if(strcmp(fname, ".") == 0 || + strcmp(fname, "..") == 0) + { + continue; + } + for(std::vector::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + std::string name = *ni; + name += this->Extension; + if(cmsysString_strcasecmp(fname, name.c_str()) == 0) + { + matches.push_back(fname); + } + } + } + + for(std::vector::const_iterator i = matches.begin(); + i != matches.end(); ++i) + { + if(this->Consider(parent + *i, lister)) + { + return true; + } + } + return false; + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorMacProject(*this)); + return g; + } +}; + +class cmFileListGeneratorCaseInsensitive: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorCaseInsensitive(std::string const& str): + cmFileListGeneratorBase(), String(str) {} + cmFileListGeneratorCaseInsensitive( + cmFileListGeneratorCaseInsensitive const& r): + cmFileListGeneratorBase(), String(r.String) {} +private: + std::string String; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + // Look for matching files. + std::vector matches; + cmsys::Directory d; + d.Load(parent.c_str()); + for(unsigned long i=0; i < d.GetNumberOfFiles(); ++i) + { + const char* fname = d.GetFile(i); + if(strcmp(fname, ".") == 0 || + strcmp(fname, "..") == 0) + { + continue; + } + if(cmsysString_strcasecmp(fname, this->String.c_str()) == 0) + { + if(this->Consider(parent + fname, lister)) + { + return true; + } + } + } + return false; + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorCaseInsensitive(*this)); + return g; + } +}; + +class cmFileListGeneratorGlob: public cmFileListGeneratorBase +{ +public: + cmFileListGeneratorGlob(std::string const& str): + cmFileListGeneratorBase(), Pattern(str) {} + cmFileListGeneratorGlob(cmFileListGeneratorGlob const& r): + cmFileListGeneratorBase(), Pattern(r.Pattern) {} +private: + std::string Pattern; + virtual bool Search(std::string const& parent, cmFileList& lister) + { + // Glob the set of matching files. + std::string expr = parent; + expr += this->Pattern; + cmsys::Glob g; + if(!g.FindFiles(expr)) + { + return false; + } + std::vector const& files = g.GetFiles(); + + // Look for directories among the matches. + for(std::vector::const_iterator fi = files.begin(); + fi != files.end(); ++fi) + { + if(cmSystemTools::FileIsDirectory(fi->c_str())) + { + if(this->Consider(*fi, lister)) + { + return true; + } + } + } + return false; + } + virtual cmsys::auto_ptr Clone() const + { + cmsys::auto_ptr + g(new cmFileListGeneratorGlob(*this)); + return g; + } +}; + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) +{ + assert(!prefix_in.empty() && prefix_in[prefix_in.size()-1] == '/'); + if(this->DebugMode) + { + fprintf(stderr, "Checking prefix [%s]\n", prefix_in.c_str()); + } + + // Skip this if the prefix does not exist. + if(!cmSystemTools::FileIsDirectory(prefix_in.c_str())) + { + return false; + } + + // PREFIX/ (useful on windows or in build trees) + if(this->SearchDirectory(prefix_in)) + { + return true; + } + + // Strip the trailing slash because the path generator is about to + // add one. + std::string prefix = prefix_in.substr(0, prefix_in.size()-1); + + // PREFIX/(cmake|CMake)/ (useful on windows or in build trees) + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorCaseInsensitive("cmake"); + if(lister.Search()) + { + return true; + } + } + + // PREFIX/(share|lib)/(Foo|foo|FOO).*/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorEnumerate("lib", "share") + / cmFileListGeneratorProject(this->Names); + if(lister.Search()) + { + return true; + } + } + + // PREFIX/(share|lib)/(Foo|foo|FOO).*/(cmake|CMake)/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorEnumerate("lib", "share") + / cmFileListGeneratorProject(this->Names) + / cmFileListGeneratorCaseInsensitive("cmake"); + if(lister.Search()) + { + return true; + } + } + + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::SearchFrameworkPrefix(std::string const& prefix_in) +{ + assert(!prefix_in.empty() && prefix_in[prefix_in.size()-1] == '/'); + if(this->DebugMode) + { + fprintf(stderr, "Checking framework prefix [%s]\n", prefix_in.c_str()); + } + + // Strip the trailing slash because the path generator is about to + // add one. + std::string prefix = prefix_in.substr(0, prefix_in.size()-1); + + // /Foo.framework/Resources/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".framework") + / cmFileListGeneratorFixed("Resources"); + if(lister.Search()) + { + return true; + } + } + // /Foo.framework/Resources/CMake/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".framework") + / cmFileListGeneratorFixed("Resources") + / cmFileListGeneratorCaseInsensitive("cmake"); + if(lister.Search()) + { + return true; + } + } + + // /Foo.framework/Versions/*/Resources/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".framework") + / cmFileListGeneratorFixed("Versions") + / cmFileListGeneratorGlob("*/Resources"); + if(lister.Search()) + { + return true; + } + } + + // /Foo.framework/Versions/*/Resources/CMake/ + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".framework") + / cmFileListGeneratorFixed("Versions") + / cmFileListGeneratorGlob("*/Resources") + / cmFileListGeneratorCaseInsensitive("cmake"); + if(lister.Search()) + { + return true; + } + } + + return false; +} + +//---------------------------------------------------------------------------- +bool cmFindPackageCommand::SearchAppBundlePrefix(std::string const& prefix_in) +{ + assert(!prefix_in.empty() && prefix_in[prefix_in.size()-1] == '/'); + if(this->DebugMode) + { + fprintf(stderr, "Checking bundle prefix [%s]\n", prefix_in.c_str()); + } + + // Strip the trailing slash because the path generator is about to + // add one. + std::string prefix = prefix_in.substr(0, prefix_in.size()-1); + + // /Foo.app/Contents/Resources + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".app") + / cmFileListGeneratorFixed("Contents/Resources"); + if(lister.Search()) + { + return true; + } + } + + // /Foo.app/Contents/Resources/CMake + { + cmFindPackageFileList lister(this); + lister + / cmFileListGeneratorFixed(prefix) + / cmFileListGeneratorMacProject(this->Names, ".app") + / cmFileListGeneratorFixed("Contents/Resources") + / cmFileListGeneratorCaseInsensitive("cmake"); + if(lister.Search()) + { + return true; + } + } + + return false; +} + +// TODO: Version numbers? Perhaps have a listing component class that +// sorts by lexicographic and numerical ordering. Also try to match +// some command argument for the version. Alternatively provide an +// API that just returns a list of valid directories? Perhaps push a +// scope and try loading the target file just to get its version +// number? Could add a foo-version.cmake or FooVersion.cmake file +// in the projects that contains just version information. + +// TODO: Debug cmsys::Glob double slash problem. + +// TODO: Add registry entries after cmake system search path? +// Currently the user must specify them with the PATHS option. +// +// [HKEY_CURRENT_USER\Software\*\Foo*;InstallDir] +// [HKEY_CURRENT_USER\Software\*\*\Foo*;InstallDir] +// [HKEY_LOCAL_MACHINE\Software\*\Foo*;InstallDir] +// [HKEY_LOCAL_MACHINE\Software\*\*\Foo*;InstallDir] diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h new file mode 100644 index 000000000..8a7010fe5 --- /dev/null +++ b/Source/cmFindPackageCommand.h @@ -0,0 +1,126 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindPackageCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-29 01:38:48 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindPackageCommand_h +#define cmFindPackageCommand_h + +#include "cmFindCommon.h" + +class cmFindPackageFileList; + +/** \class cmFindPackageCommand + * \brief Load settings from an external project. + * + * cmFindPackageCommand + */ +class cmFindPackageCommand : public cmFindCommon +{ +public: + cmFindPackageCommand(); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFindPackageCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "find_package";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Load settings for an external project."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation(); + + cmTypeMacro(cmFindPackageCommand, cmFindCommon); +private: + void AppendSuccessInformation(); + void AppendToProperty(const char* propertyName); + bool FindModule(bool& found); + bool HandlePackageMode(); + void FindConfig(); + bool FindPrefixedConfig(); + bool FindFrameworkConfig(); + bool FindAppBundleConfig(); + bool ReadListFile(const char* f); + void StoreVersionFound(); + + void AddUserPath(std::string const& p); + void ComputePrefixes(); + bool SearchDirectory(std::string const& dir); + bool CheckDirectory(std::string const& dir); + bool FindConfigFile(std::string const& dir, std::string& file); + bool FindConfigFileToLoad(std::string const& dir, std::string& file); + bool CheckVersion(std::string const& config_file); + bool CheckVersionFile(std::string const& version_file); + bool SearchPrefix(std::string const& prefix); + bool SearchFrameworkPrefix(std::string const& prefix_in); + bool SearchAppBundlePrefix(std::string const& prefix_in); + + friend class cmFindPackageFileList; + + std::string CommandDocumentation; + cmStdString Name; + cmStdString Variable; + cmStdString Version; + unsigned int VersionMajor; + unsigned int VersionMinor; + unsigned int VersionPatch; + unsigned int VersionCount; + bool VersionExact; + cmStdString FileFound; + cmStdString VersionFound; + unsigned int VersionFoundMajor; + unsigned int VersionFoundMinor; + unsigned int VersionFoundPatch; + unsigned int VersionFoundCount; + bool Quiet; + bool Required; + bool Compatibility_1_6; + bool NoModule; + bool NoBuilds; + bool DebugMode; + std::vector Names; + std::vector Configs; + std::vector Prefixes; + std::vector UserPaths; +}; + +#endif diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx new file mode 100644 index 000000000..8eb93c871 --- /dev/null +++ b/Source/cmFindPathCommand.cxx @@ -0,0 +1,229 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindPathCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.41 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindPathCommand.h" +#include "cmCacheManager.h" + +#include + +cmFindPathCommand::cmFindPathCommand() +{ + this->EnvironmentPath = "INCLUDE"; + this->IncludeFileInPath = false; + cmSystemTools::ReplaceString(this->GenericDocumentation, + "FIND_XXX", "find_path"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_PATH", "CMAKE_INCLUDE_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_MAC_PATH", + "CMAKE_FRAMEWORK_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_MAC_PATH", + "CMAKE_SYSTEM_FRAMEWORK_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SYSTEM", "INCLUDE"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_PATH", + "CMAKE_SYSTEM_INCLUDE_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX_DESC", + "directory containing the named file"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX", "file in a directory"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SUBDIR", "include"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_FIND_ROOT_PATH_MODE_XXX", + "CMAKE_FIND_ROOT_PATH_MODE_INCLUDE"); + + this->ExtraDocAdded = false; +} + +const char* cmFindPathCommand::GetFullDocumentation() +{ + if(!this->ExtraDocAdded && !this->IncludeFileInPath) + { + this->GenericDocumentation += + "\n" + "When searching for frameworks, if the file is specified as " + "A/b.h, then the framework search will look for " + "A.framework/Headers/b.h. " + "If that is found the path will be set to the path to the framework. " + "CMake will convert this to the correct -F option to include the " + "file. "; + this->ExtraDocAdded = true; + } + return this->GenericDocumentation.c_str(); +} + +// cmFindPathCommand +bool cmFindPathCommand +::InitialPass(std::vector const& argsIn, cmExecutionStatus &) +{ + this->VariableDocumentation = "Path to a file."; + this->CMakePathName = "INCLUDE"; + if(!this->ParseArguments(argsIn)) + { + return false; + } + if(this->AlreadyInCache) + { + // If the user specifies the entry on the command line without a + // type we should add the type and docstring but keep the original + // value. + if(this->AlreadyInCacheWithoutMetaInfo) + { + this->Makefile->AddCacheDefinition( + this->VariableName.c_str(), "", + this->VariableDocumentation.c_str(), + (this->IncludeFileInPath ? + cmCacheManager::FILEPATH :cmCacheManager::PATH) + ); + } + return true; + } + std::string ff = this->Makefile->GetSafeDefinition("CMAKE_FIND_FRAMEWORK"); + bool supportFrameworks = true; + if( ff.size() == 0 || ff == "NEVER" ) + { + supportFrameworks = false; + } + std::string framework; + // Add a trailing slash to all paths to aid the search process. + for(std::vector::iterator i = this->SearchPaths.begin(); + i != this->SearchPaths.end(); ++i) + { + std::string& p = *i; + if(p.empty() || p[p.size()-1] != '/') + { + p += "/"; + } + } + // Use the search path to find the file. + unsigned int k; + std::string result; + for(k=0; k < this->SearchPaths.size(); k++) + { + for(unsigned int j =0; j < this->Names.size(); ++j) + { + // if frameworks are supported try to find the header in a framework + std::string tryPath; + if(supportFrameworks) + { + tryPath = this->FindHeaderInFramework(this->Names[j], + this->SearchPaths[k]); + if(tryPath.size()) + { + result = tryPath; + } + } + if(result.size() == 0) + { + tryPath = this->SearchPaths[k]; + tryPath += this->Names[j]; + if(cmSystemTools::FileExists(tryPath.c_str())) + { + if(this->IncludeFileInPath) + { + result = tryPath; + } + else + { + result = this->SearchPaths[k]; + } + } + } + if(result.size() != 0) + { + this->Makefile->AddCacheDefinition + (this->VariableName.c_str(), result.c_str(), + this->VariableDocumentation.c_str(), + (this->IncludeFileInPath) ? + cmCacheManager::FILEPATH :cmCacheManager::PATH); + return true; + } + } + } + this->Makefile->AddCacheDefinition + (this->VariableName.c_str(), + (this->VariableName + "-NOTFOUND").c_str(), + this->VariableDocumentation.c_str(), + (this->IncludeFileInPath) ? + cmCacheManager::FILEPATH :cmCacheManager::PATH); + return true; +} + +std::string cmFindPathCommand::FindHeaderInFramework(std::string& file, + std::string& dir) +{ + cmStdString fileName = file; + cmStdString frameWorkName; + cmStdString::size_type pos = fileName.find("/"); + // if there is a / in the name try to find the header as a framework + // For example bar/foo.h would look for: + // bar.framework/Headers/foo.h + if(pos != fileName.npos) + { + // remove the name from the slash; + fileName = fileName.substr(pos+1); + frameWorkName = file; + frameWorkName = + frameWorkName.substr(0, frameWorkName.size()-fileName.size()-1); + // if the framework has a path in it then just use the filename + if(frameWorkName.find("/") != frameWorkName.npos) + { + fileName = file; + frameWorkName = ""; + } + if(frameWorkName.size()) + { + std::string fpath = dir; + fpath += frameWorkName; + fpath += ".framework"; + std::string intPath = fpath; + intPath += "/Headers/"; + intPath += fileName; + if(cmSystemTools::FileExists(intPath.c_str())) + { + if(this->IncludeFileInPath) + { + return intPath; + } + return fpath; + } + } + } + // if it is not found yet or not a framework header, then do a glob search + // for all files in dir/*/Headers/ + cmStdString glob = dir; + glob += "*/Headers/"; + glob += file; + cmsys::Glob globIt; + globIt.FindFiles(glob); + std::vector files = globIt.GetFiles(); + if(files.size()) + { + cmStdString fheader = cmSystemTools::CollapseFullPath(files[0].c_str()); + if(this->IncludeFileInPath) + { + return fheader; + } + fheader = cmSystemTools::GetFilenamePath(fheader); + return fheader; + } + return ""; +} + diff --git a/Source/cmFindPathCommand.h b/Source/cmFindPathCommand.h new file mode 100644 index 000000000..cd0060f8c --- /dev/null +++ b/Source/cmFindPathCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindPathCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.18 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindPathCommand_h +#define cmFindPathCommand_h + +#include "cmFindBase.h" + + +/** \class cmFindPathCommand + * \brief Define a command to search for a library. + * + * cmFindPathCommand is used to define a CMake variable + * that specifies a library. The command searches for a given + * file in a list of directories. + */ +class cmFindPathCommand : public cmFindBase +{ +public: + cmFindPathCommand(); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFindPathCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "find_path";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Find the directory containing a file."; + } + + std::string FindHeaderInFramework( std::string& file, + std::string& dir); + virtual const char* GetFullDocumentation(); + cmTypeMacro(cmFindPathCommand, cmFindBase); + bool IncludeFileInPath; + bool ExtraDocAdded; +}; + + + +#endif diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx new file mode 100644 index 000000000..e15d9e28f --- /dev/null +++ b/Source/cmFindProgramCommand.cxx @@ -0,0 +1,189 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindProgramCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.42 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFindProgramCommand.h" +#include "cmCacheManager.h" +#include + +#if defined(__APPLE__) +#include +#endif + +cmFindProgramCommand::cmFindProgramCommand() +{ + cmSystemTools::ReplaceString(this->GenericDocumentation, + "FIND_XXX", "find_program"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_PATH", "CMAKE_PROGRAM_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_XXX_MAC_PATH", + "CMAKE_APPBUNDLE_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_MAC_PATH", + "CMAKE_SYSTEM_APPBUNDLE_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SYSTEM", ""); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_SYSTEM_XXX_PATH", + "CMAKE_SYSTEM_PROGRAM_PATH"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX_DESC", "program"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "SEARCH_XXX", "program"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "XXX_SUBDIR", "[s]bin"); + cmSystemTools::ReplaceString(this->GenericDocumentation, + "CMAKE_FIND_ROOT_PATH_MODE_XXX", + "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM"); +} + +// cmFindProgramCommand +bool cmFindProgramCommand +::InitialPass(std::vector const& argsIn, cmExecutionStatus &) +{ + this->VariableDocumentation = "Path to a program."; + this->CMakePathName = "PROGRAM"; + // call cmFindBase::ParseArguments + if(!this->ParseArguments(argsIn)) + { + return false; + } + if(this->AlreadyInCache) + { + // If the user specifies the entry on the command line without a + // type we should add the type and docstring but keep the original + // value. + if(this->AlreadyInCacheWithoutMetaInfo) + { + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), "", + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + } + return true; + } + + std::string result = FindProgram(this->Names); + if(result != "") + { + // Save the value in the cache + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), + result.c_str(), + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + + return true; + } + this->Makefile->AddCacheDefinition(this->VariableName.c_str(), + (this->VariableName + "-NOTFOUND").c_str(), + this->VariableDocumentation.c_str(), + cmCacheManager::FILEPATH); + return true; +} + +std::string cmFindProgramCommand::FindProgram(std::vector names) +{ + std::string program = ""; + + // First/last order taken care of in cmFindBase when the paths are setup. + if(this->SearchAppBundleFirst || this->SearchAppBundleLast) + { + program = FindAppBundle(names); + } + if(program.empty() && !this->SearchAppBundleOnly) + { + program = cmSystemTools::FindProgram(names, this->SearchPaths, true); + } + + return program; +} + +std::string cmFindProgramCommand +::FindAppBundle(std::vector names) +{ + for(std::vector::const_iterator name = names.begin(); + name != names.end() ; ++name) + { + + std::string appName = *name + std::string(".app"); + std::string appPath = cmSystemTools::FindDirectory(appName.c_str(), + this->SearchPaths, + true); + + if ( !appPath.empty() ) + { + std::string executable = GetBundleExecutable(appPath); + if (!executable.empty()) + { + return cmSystemTools::CollapseFullPath(executable.c_str()); + } + } + } + + // Couldn't find app bundle + return ""; +} + +std::string cmFindProgramCommand::GetBundleExecutable(std::string bundlePath) +{ + std::string executable = ""; + (void)bundlePath; +#if defined(__APPLE__) + // Started with an example on developer.apple.com about finding bundles + // and modified from that. + + // Get a CFString of the app bundle path + // XXX - Is it safe to assume everything is in UTF8? + CFStringRef bundlePathCFS = + CFStringCreateWithCString(kCFAllocatorDefault , + bundlePath.c_str(), kCFStringEncodingUTF8 ); + + // Make a CFURLRef from the CFString representation of the + // bundle’s path. + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, + bundlePathCFS, + kCFURLPOSIXPathStyle, + true ); + + // Make a bundle instance using the URLRef. + CFBundleRef appBundle = CFBundleCreate( kCFAllocatorDefault, bundleURL ); + + // returned executableURL is relative to /Contents/MacOS/ + CFURLRef executableURL = CFBundleCopyExecutableURL(appBundle); + + if (executableURL != NULL) + { + const int MAX_OSX_PATH_SIZE = 1024; + char buffer[MAX_OSX_PATH_SIZE]; + + // Convert the CFString to a C string + CFStringGetCString( CFURLGetString(executableURL), buffer, + MAX_OSX_PATH_SIZE, kCFStringEncodingUTF8 ); + + // And finally to a c++ string + executable = bundlePath + "/Contents/MacOS/" + std::string(buffer); + } + + // Any CF objects returned from functions with "create" or + // "copy" in their names must be released by us! + CFRelease( bundlePathCFS ); + CFRelease( bundleURL ); + CFRelease( appBundle ); + CFRelease( executableURL ); +#endif + + return executable; +} + diff --git a/Source/cmFindProgramCommand.h b/Source/cmFindProgramCommand.h new file mode 100644 index 000000000..ee86feecf --- /dev/null +++ b/Source/cmFindProgramCommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFindProgramCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.21 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFindProgramCommand_h +#define cmFindProgramCommand_h + +#include "cmFindBase.h" + +/** \class cmFindProgramCommand + * \brief Define a command to search for an executable program. + * + * cmFindProgramCommand is used to define a CMake variable + * that specifies an executable program. The command searches + * in the current path (e.g., PATH environment variable) for + * an executable that matches one of the supplied names. + */ +class cmFindProgramCommand : public cmFindBase +{ +public: + cmFindProgramCommand(); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFindProgramCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "find_program";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Find an executable program."; + } + + cmTypeMacro(cmFindProgramCommand, cmFindBase); + +protected: + std::string FindProgram(std::vector names); + +private: + std::string FindAppBundle(std::vector names); + std::string GetBundleExecutable(std::string bundlePath); + +}; + + + +#endif diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx new file mode 100644 index 000000000..e2786928c --- /dev/null +++ b/Source/cmForEachCommand.cxx @@ -0,0 +1,214 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmForEachCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-29 17:18:11 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmForEachCommand.h" + +bool cmForEachFunctionBlocker:: +IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, + cmExecutionStatus &inStatus) +{ + // Prevent recusion and don't let this blocker block its own + // commands. + if (this->Executing) + { + return false; + } + + if (!cmSystemTools::Strucmp(lff.Name.c_str(),"foreach")) + { + // record the number of nested foreach commands + this->Depth++; + } + else if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endforeach")) + { + // if this is the endofreach for this statement + if (!this->Depth) + { + // at end of for each execute recorded commands + // store the old value + std::string oldDef; + if (mf.GetDefinition(this->Args[0].c_str())) + { + oldDef = mf.GetDefinition(this->Args[0].c_str()); + } + this->Executing = true; + std::vector::const_iterator j = this->Args.begin(); + ++j; + + std::string tmps; + cmListFileArgument arg; + for( ; j != this->Args.end(); ++j) + { + // set the variable to the loop value + mf.AddDefinition(this->Args[0].c_str(),j->c_str()); + // Invoke all the functions that were collected in the block. + cmExecutionStatus status; + for(unsigned int c = 0; c < this->Functions.size(); ++c) + { + status.Clear(); + mf.ExecuteCommand(this->Functions[c],status); + if (status.GetReturnInvoked()) + { + inStatus.SetReturnInvoked(true); + // restore the variable to its prior value + mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.RemoveFunctionBlocker(lff); + return true; + } + if (status.GetBreakInvoked()) + { + // restore the variable to its prior value + mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.RemoveFunctionBlocker(lff); + return true; + } + } + } + // restore the variable to its prior value + mf.AddDefinition(this->Args[0].c_str(),oldDef.c_str()); + mf.RemoveFunctionBlocker(lff); + return true; + } + else + { + // close out a nested foreach + this->Depth--; + } + } + + // record the command + this->Functions.push_back(lff); + + // always return true + return true; +} + +bool cmForEachFunctionBlocker:: +ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf) +{ + if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endforeach")) + { + std::vector expandedArguments; + mf.ExpandArguments(lff.Arguments, expandedArguments); + // if the endforeach has arguments then make sure + // they match the begin foreach arguments + if ((expandedArguments.empty() || + (expandedArguments[0] == this->Args[0]))) + { + return true; + } + } + return false; +} + +void cmForEachFunctionBlocker:: +ScopeEnded(cmMakefile &mf) +{ + cmSystemTools::Error("The end of a CMakeLists file was reached with a " + "FOREACH statement that was not closed properly. " + "Within the directory: ", + mf.GetCurrentDirectory()); +} + +bool cmForEachCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // create a function blocker + cmForEachFunctionBlocker *f = new cmForEachFunctionBlocker(); + if ( args.size() > 1 ) + { + if ( args[1] == "RANGE" ) + { + int start = 0; + int stop = 0; + int step = 0; + if ( args.size() == 3 ) + { + stop = atoi(args[2].c_str()); + } + if ( args.size() == 4 ) + { + start = atoi(args[2].c_str()); + stop = atoi(args[3].c_str()); + } + if ( args.size() == 5 ) + { + start = atoi(args[2].c_str()); + stop = atoi(args[3].c_str()); + step = atoi(args[4].c_str()); + } + if ( step == 0 ) + { + if ( start > stop ) + { + step = -1; + } + else + { + step = 1; + } + } + if ( + (start > stop && step > 0) || + (start < stop && step < 0) || + step == 0 + ) + { + cmOStringStream str; + str << "called with incorrect range specification: start "; + str << start << ", stop " << stop << ", step " << step; + this->SetError(str.str().c_str()); + return false; + } + std::vector range; + char buffer[100]; + range.push_back(args[0]); + int cc; + for ( cc = start; ; cc += step ) + { + if ( (step > 0 && cc > stop) || (step < 0 && cc < stop) ) + { + break; + } + sprintf(buffer, "%d", cc); + range.push_back(buffer); + if ( cc == stop ) + { + break; + } + } + f->Args = range; + } + else + { + f->Args = args; + } + } + else + { + f->Args = args; + } + this->Makefile->AddFunctionBlocker(f); + + return true; +} + diff --git a/Source/cmForEachCommand.h b/Source/cmForEachCommand.h new file mode 100644 index 000000000..b051efc9a --- /dev/null +++ b/Source/cmForEachCommand.h @@ -0,0 +1,121 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmForEachCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmForEachCommand_h +#define cmForEachCommand_h + +#include "cmCommand.h" +#include "cmFunctionBlocker.h" +#include "cmListFileCache.h" + +/** \class cmForEachFunctionBlocker + * \brief subclass of function blocker + * + * + */ +class cmForEachFunctionBlocker : public cmFunctionBlocker +{ +public: + cmForEachFunctionBlocker() {this->Executing = false; Depth = 0;} + virtual ~cmForEachFunctionBlocker() {} + virtual bool IsFunctionBlocked(const cmListFileFunction& lff, + cmMakefile &mf, + cmExecutionStatus &); + virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); + virtual void ScopeEnded(cmMakefile &mf); + + std::vector Args; + std::vector Functions; + bool Executing; +private: + int Depth; +}; + +/** \class cmForEachCommand + * \brief starts an if block + * + * cmForEachCommand starts an if block + */ +class cmForEachCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmForEachCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "foreach";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Evaluate a group of commands for each value in a list."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " foreach(loop_var arg1 arg2 ...)\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " endforeach(loop_var)\n" + " foreach(loop_var RANGE total)\n" + " foreach(loop_var RANGE start stop [step])\n" + "All commands between foreach and the matching endforeach are recorded " + "without being invoked. Once the endforeach is evaluated, the " + "recorded list of commands is invoked once for each argument listed " + "in the original foreach command. Before each iteration of the loop " + "\"${loop_var}\" will be set as a variable with " + "the current value in the list.\n" + "Foreach can also iterate over a generated range of numbers. " + "There are three types of this iteration:\n" + "* When specifying single number, the range will have elements " + "0 to \"total\".\n" + "* When specifying two numbers, the range will have elements from " + "the first number to the second number.\n" + "* The third optional number is the increment used to iterate from " + "the first number to the second number."; + } + + cmTypeMacro(cmForEachCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h new file mode 100644 index 000000000..d16c0fe65 --- /dev/null +++ b/Source/cmFunctionBlocker.h @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFunctionBlocker.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFunctionBlocker_h +#define cmFunctionBlocker_h + +#include "cmStandardIncludes.h" +#include "cmExecutionStatus.h" +class cmMakefile; + +/** \class cmFunctionBlocker + * \brief A class that defines an interface for blocking cmake functions + * + * This is the superclass for any classes that need to block a cmake function + */ +class cmFunctionBlocker +{ +public: + /** + * should a function be blocked + */ + virtual bool IsFunctionBlocked(const cmListFileFunction& lff, + cmMakefile&mf, + cmExecutionStatus &status) = 0; + + /** + * should this function blocker be removed, useful when one function adds a + * blocker and another must remove it + */ + virtual bool ShouldRemove(const cmListFileFunction&, + cmMakefile&) {return false;} + + /** + * When the end of a CMakeList file is reached this method is called. It + * is not called on the end of an INCLUDE cmake file, just at the end of a + * regular CMakeList file + */ + virtual void ScopeEnded(cmMakefile&) {} + + virtual ~cmFunctionBlocker() {} +}; + +#endif diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx new file mode 100755 index 000000000..d18fd1a6c --- /dev/null +++ b/Source/cmFunctionCommand.cxx @@ -0,0 +1,292 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFunctionCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 13:40:36 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmFunctionCommand.h" + +#include "cmake.h" + +// define the class for function commands +class cmFunctionHelperCommand : public cmCommand +{ +public: + cmFunctionHelperCommand() {} + + ///! clean up any memory allocated by the function + ~cmFunctionHelperCommand() {}; + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmFunctionHelperCommand *newC = new cmFunctionHelperCommand; + // we must copy when we clone + newC->Args = this->Args; + newC->Functions = this->Functions; + return newC; + } + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InvokeInitialPass(const std::vector& args, + cmExecutionStatus &); + + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) { return false; }; + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return this->Args[0].c_str(); } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + std::string docs = "Function named: "; + docs += this->GetName(); + return docs.c_str(); + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return this->GetTerseDocumentation(); + } + + cmTypeMacro(cmFunctionHelperCommand, cmCommand); + + std::vector Args; + std::vector Functions; +}; + + +bool cmFunctionHelperCommand::InvokeInitialPass +(const std::vector& args, + cmExecutionStatus & inStatus) +{ + // Expand the argument list to the function. + std::vector expandedArgs; + this->Makefile->ExpandArguments(args, expandedArgs); + + // make sure the number of arguments passed is at least the number + // required by the signature + if (expandedArgs.size() < this->Args.size() - 1) + { + std::string errorMsg = + "Function invoked with incorrect arguments for function named: "; + errorMsg += this->Args[0]; + this->SetError(errorMsg.c_str()); + return false; + } + + // we push a scope on the makefile + this->Makefile->PushScope(); + + // set the value of argc + cmOStringStream strStream; + strStream << expandedArgs.size(); + this->Makefile->AddDefinition("ARGC",strStream.str().c_str()); + + // set the values for ARGV0 ARGV1 ... + for (unsigned int t = 0; t < expandedArgs.size(); ++t) + { + cmOStringStream tmpStream; + tmpStream << "ARGV" << t; + this->Makefile->AddDefinition(tmpStream.str().c_str(), + expandedArgs[t].c_str()); + } + + // define the formal arguments + for (unsigned int j = 1; j < this->Args.size(); ++j) + { + this->Makefile->AddDefinition(this->Args[j].c_str(), + expandedArgs[j-1].c_str()); + } + + // define ARGV and ARGN + std::vector::const_iterator eit; + std::string argvDef; + std::string argnDef; + unsigned int cnt = 0; + for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit ) + { + if ( argvDef.size() > 0 ) + { + argvDef += ";"; + } + argvDef += *eit; + if ( cnt >= this->Args.size()-1 ) + { + if ( argnDef.size() > 0 ) + { + argnDef += ";"; + } + argnDef += *eit; + } + cnt ++; + } + this->Makefile->AddDefinition("ARGV", argvDef.c_str()); + this->Makefile->AddDefinition("ARGN", argnDef.c_str()); + + // Invoke all the functions that were collected in the block. + // for each function + for(unsigned int c = 0; c < this->Functions.size(); ++c) + { + cmExecutionStatus status; + if (!this->Makefile->ExecuteCommand(this->Functions[c],status) || + status.GetNestedError()) + { + // The error message should have already included the call stack + // so we do not need to report an error here. + inStatus.SetNestedError(true); + return false; + } + if (status.GetReturnInvoked()) + { + this->Makefile->PopScope(); + return true; + } + } + + // pop scope on the makefile + this->Makefile->PopScope(); + return true; +} + +bool cmFunctionFunctionBlocker:: +IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, + cmExecutionStatus &) +{ + // record commands until we hit the ENDFUNCTION + // at the ENDFUNCTION call we shift gears and start looking for invocations + if(!cmSystemTools::Strucmp(lff.Name.c_str(),"function")) + { + this->Depth++; + } + else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction")) + { + // if this is the endfunction for this function then execute + if (!this->Depth) + { + std::string name = this->Args[0]; + std::vector::size_type cc; + name += "("; + for ( cc = 0; cc < this->Args.size(); cc ++ ) + { + name += " " + this->Args[cc]; + } + name += " )"; + + // create a new command and add it to cmake + cmFunctionHelperCommand *f = new cmFunctionHelperCommand(); + f->Args = this->Args; + f->Functions = this->Functions; + + // Set the FilePath on the arguments to match the function since it is + // not stored and the original values may be freed + for (unsigned int i = 0; i < f->Functions.size(); ++i) + { + for (unsigned int j = 0; j < f->Functions[i].Arguments.size(); ++j) + { + f->Functions[i].Arguments[j].FilePath = + f->Functions[i].FilePath.c_str(); + } + } + + std::string newName = "_" + this->Args[0]; + mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), + newName.c_str()); + mf.AddCommand(f); + + // remove the function blocker now that the function is defined + mf.RemoveFunctionBlocker(lff); + return true; + } + else + { + // decrement for each nested function that ends + this->Depth--; + } + } + + // if it wasn't an endfunction and we are not executing then we must be + // recording + this->Functions.push_back(lff); + return true; +} + + +bool cmFunctionFunctionBlocker:: +ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf) +{ + if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endfunction")) + { + std::vector expandedArguments; + mf.ExpandArguments(lff.Arguments, expandedArguments); + // if the endfunction has arguments then make sure + // they match the ones in the openeing function command + if ((expandedArguments.empty() || + (expandedArguments[0] == this->Args[0]))) + { + return true; + } + } + + return false; +} + +void cmFunctionFunctionBlocker:: +ScopeEnded(cmMakefile &mf) +{ + // functions should end with an EndFunction + cmSystemTools::Error( + "The end of a CMakeLists file was reached with a FUNCTION statement that " + "was not closed properly. Within the directory: ", + mf.GetCurrentDirectory(), " with function ", + this->Args[0].c_str()); +} + +bool cmFunctionCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // create a function blocker + cmFunctionFunctionBlocker *f = new cmFunctionFunctionBlocker(); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } + this->Makefile->AddFunctionBlocker(f); + return true; +} + diff --git a/Source/cmFunctionCommand.h b/Source/cmFunctionCommand.h new file mode 100755 index 000000000..022831141 --- /dev/null +++ b/Source/cmFunctionCommand.h @@ -0,0 +1,115 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmFunctionCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmFunctionCommand_h +#define cmFunctionCommand_h + +#include "cmCommand.h" +#include "cmFunctionBlocker.h" + +/** \class cmFunctionFunctionBlocker + * \brief subclass of function blocker + * + * + */ +class cmFunctionFunctionBlocker : public cmFunctionBlocker +{ +public: + cmFunctionFunctionBlocker() {this->Depth=0;} + virtual ~cmFunctionFunctionBlocker() {} + virtual bool IsFunctionBlocked(const cmListFileFunction&, + cmMakefile &mf, + cmExecutionStatus &); + virtual bool ShouldRemove(const cmListFileFunction&, cmMakefile &mf); + virtual void ScopeEnded(cmMakefile &mf); + + std::vector Args; + std::vector Functions; + int Depth; +}; + +/** \class cmFunctionCommand + * \brief starts an if block + * + * cmFunctionCommand starts an if block + */ +class cmFunctionCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmFunctionCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "function";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Start recording a function for later invocation as a command."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " function( [arg1 [arg2 [arg3 ...]]])\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " endfunction()\n" + "Define a function named that takes arguments named " + "arg1 arg2 arg3 (...). Commands listed after function, but before " + "the matching endfunction, are not invoked until the function " + "is invoked. When it is invoked, the commands recorded in the " + "function are first modified by replacing formal parameters (${arg1}) " + "with the arguments passed, and then invoked as normal commands. In " + "addition to referencing the formal parameters you can reference " + "the variable ARGC which will be set to the number of arguments " + "passed into the function as well as ARGV0 ARGV1 ARGV2 ... which " + "will have the actual values of the arguments passed in. This " + "facilitates creating functions with optional arguments. Additionally " + "ARGV holds the list of all arguments given to the function and ARGN " + "holds the list of argument pass the last expected argument."; + } + + cmTypeMacro(cmFunctionCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx new file mode 100644 index 000000000..0aceb9754 --- /dev/null +++ b/Source/cmGeneratedFileStream.cxx @@ -0,0 +1,313 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGeneratedFileStream.cxx,v $ + Language: C++ + Date: $Date: 2007-11-16 12:01:58 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGeneratedFileStream.h" + +#include "cmSystemTools.h" + +// Includes needed for implementation of RenameFile. This is not in +// system tools because it is not implemented robustly enough to move +// files across directories. +#ifdef _WIN32 +# include +# include +#endif + +#if defined(CMAKE_BUILD_WITH_CMAKE) +# include +#endif + +//---------------------------------------------------------------------------- +cmGeneratedFileStream::cmGeneratedFileStream(): + cmGeneratedFileStreamBase(), Stream() +{ +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStream::cmGeneratedFileStream(const char* name, bool quiet): + cmGeneratedFileStreamBase(name), + Stream(TempName.c_str()) +{ + // Check if the file opened. + if(!*this && !quiet) + { + cmSystemTools::Error("Cannot open file for write: ", + this->TempName.c_str()); + cmSystemTools::ReportLastSystemError(""); + } +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStream::~cmGeneratedFileStream() +{ + // This is the first destructor called. Check the status of the + // stream and give the information to the private base. Next the + // stream will be destroyed which will close the temporary file. + // Finally the base destructor will be called to replace the + // destination file. + this->Okay = (*this)?true:false; +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStream& +cmGeneratedFileStream::Open(const char* name, bool quiet, bool binaryFlag) +{ + // Store the file name and construct the temporary file name. + this->cmGeneratedFileStreamBase::Open(name); + + // Open the temporary output file. + if ( binaryFlag ) + { + this->Stream::open(this->TempName.c_str(), + std::ios::out | std::ios::binary); + } + else + { + this->Stream::open(this->TempName.c_str(), std::ios::out); + } + + // Check if the file opened. + if(!*this && !quiet) + { + cmSystemTools::Error("Cannot open file for write: ", + this->TempName.c_str()); + cmSystemTools::ReportLastSystemError(""); + } + return *this; +} + +//---------------------------------------------------------------------------- +bool +cmGeneratedFileStream::Close() +{ + // Save whether the temporary output file is valid before closing. + this->Okay = (*this)?true:false; + + // Close the temporary output file. + this->Stream::close(); + + // Remove the temporary file (possibly by renaming to the real file). + return this->cmGeneratedFileStreamBase::Close(); +} + +//---------------------------------------------------------------------------- +void cmGeneratedFileStream::SetCopyIfDifferent(bool copy_if_different) +{ + this->CopyIfDifferent = copy_if_different; +} + +//---------------------------------------------------------------------------- +void cmGeneratedFileStream::SetCompression(bool compression) +{ + this->Compress = compression; +} + +//---------------------------------------------------------------------------- +void cmGeneratedFileStream::SetCompressionExtraExtension(bool ext) +{ + this->CompressExtraExtension = ext; +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStreamBase::cmGeneratedFileStreamBase(): + Name(), + TempName(), + CopyIfDifferent(false), + Okay(false), + Compress(false), + CompressExtraExtension(true) +{ +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStreamBase::cmGeneratedFileStreamBase(const char* name): + Name(), + TempName(), + CopyIfDifferent(false), + Okay(false), + Compress(false), + CompressExtraExtension(true) +{ + this->Open(name); +} + +//---------------------------------------------------------------------------- +cmGeneratedFileStreamBase::~cmGeneratedFileStreamBase() +{ + this->Close(); +} + +//---------------------------------------------------------------------------- +void cmGeneratedFileStreamBase::Open(const char* name) +{ + // Save the original name of the file. + this->Name = name; + + // Create the name of the temporary file. + this->TempName = name; + this->TempName += ".tmp"; + + // Make sure the temporary file that will be used is not present. + cmSystemTools::RemoveFile(this->TempName.c_str()); + + std::string dir = cmSystemTools::GetFilenamePath(this->TempName); + cmSystemTools::MakeDirectory(dir.c_str()); +} + +//---------------------------------------------------------------------------- +bool cmGeneratedFileStreamBase::Close() +{ + bool replaced = false; + + std::string resname = this->Name; + if ( this->Compress && this->CompressExtraExtension ) + { + resname += ".gz"; + } + + // Only consider replacing the destination file if no error + // occurred. + if(!this->Name.empty() && + this->Okay && + (!this->CopyIfDifferent || + cmSystemTools::FilesDiffer(this->TempName.c_str(), resname.c_str()))) + { + // The destination is to be replaced. Rename the temporary to the + // destination atomically. + if ( this->Compress ) + { + std::string gzname = this->TempName + ".temp.gz"; + if ( this->CompressFile(this->TempName.c_str(), gzname.c_str()) ) + { + this->RenameFile(gzname.c_str(), resname.c_str()); + } + cmSystemTools::RemoveFile(gzname.c_str()); + } + else + { + this->RenameFile(this->TempName.c_str(), resname.c_str()); + } + + replaced = true; + } + + // Else, the destination was not replaced. + // + // Always delete the temporary file. We never want it to stay around. + cmSystemTools::RemoveFile(this->TempName.c_str()); + + return replaced; +} + +//---------------------------------------------------------------------------- +#ifdef CMAKE_BUILD_WITH_CMAKE +int cmGeneratedFileStreamBase::CompressFile(const char* oldname, + const char* newname) +{ + gzFile gf = gzopen(newname, "w"); + if ( !gf ) + { + return 0; + } + FILE* ifs = fopen(oldname, "r"); + if ( !ifs ) + { + return 0; + } + size_t res; + const size_t BUFFER_SIZE = 1024; + char buffer[BUFFER_SIZE]; + while ( (res = fread(buffer, 1, BUFFER_SIZE, ifs)) > 0 ) + { + if ( !gzwrite(gf, buffer, static_cast(res)) ) + { + fclose(ifs); + gzclose(gf); + return 0; + } + } + fclose(ifs); + gzclose(gf); + return 1; +} +#else +int cmGeneratedFileStreamBase::CompressFile(const char*, const char*) +{ + return 0; +} +#endif + +//---------------------------------------------------------------------------- +int cmGeneratedFileStreamBase::RenameFile(const char* oldname, + const char* newname) +{ +#ifdef _WIN32 + /* On Windows the move functions will not replace existing files. + Check if the destination exists. */ + struct stat newFile; + if(stat(newname, &newFile) == 0) + { + /* The destination exists. We have to replace it carefully. The + MoveFileEx function does what we need but is not available on + Win9x. */ + OSVERSIONINFO osv; + DWORD attrs; + + /* Make sure the destination is not read only. */ + attrs = GetFileAttributes(newname); + if(attrs & FILE_ATTRIBUTE_READONLY) + { + SetFileAttributes(newname, attrs & ~FILE_ATTRIBUTE_READONLY); + } + + /* Check the windows version number. */ + osv.dwOSVersionInfoSize = sizeof(osv); + GetVersionEx(&osv); + if(osv.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) + { + /* This is Win9x. There is no MoveFileEx implementation. We + cannot quite rename the file atomically. Just delete the + destination and then move the file. */ + DeleteFile(newname); + return MoveFile(oldname, newname); + } + else + { + /* This is not Win9x. Use the MoveFileEx implementation. */ + return MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING); + } + } + else + { + /* The destination does not exist. Just move the file. */ + return MoveFile(oldname, newname); + } +#else + /* On UNIX we have an OS-provided call to do this atomically. */ + return rename(oldname, newname) == 0; +#endif +} + +//---------------------------------------------------------------------------- +void cmGeneratedFileStream::SetName(const char* fname) +{ + if ( !fname ) + { + this->Name = ""; + return; + } + this->Name = fname; +} diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h new file mode 100644 index 000000000..a058c82ab --- /dev/null +++ b/Source/cmGeneratedFileStream.h @@ -0,0 +1,157 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGeneratedFileStream.h,v $ + Language: C++ + Date: $Date: 2007-11-16 12:01:58 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGeneratedFileStream_h +#define cmGeneratedFileStream_h + +#include "cmStandardIncludes.h" + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1375 /* base class destructor not virtual */ +#endif + +// This is the first base class of cmGeneratedFileStream. It will be +// created before and destroyed after the ofstream portion and can +// therefore be used to manage the temporary file. +class cmGeneratedFileStreamBase +{ +protected: + // This constructor does not prepare the temporary file. The open + // method must be used. + cmGeneratedFileStreamBase(); + + // This constructor prepares the temporary output file. + cmGeneratedFileStreamBase(const char* name); + + // The destructor renames the temporary output file to the real name. + ~cmGeneratedFileStreamBase(); + + // Internal methods to handle the temporary file. Open is always + // called before the real stream is opened. Close is always called + // after the real stream is closed and Okay is set to whether the + // real stream was still valid for writing when it was closed. + void Open(const char* name); + bool Close(); + + // Internal file replacement implementation. + int RenameFile(const char* oldname, const char* newname); + + // Internal file compression implementation. + int CompressFile(const char* oldname, const char* newname); + + // The name of the final destination file for the output. + std::string Name; + + // The name of the temporary file. + std::string TempName; + + // Whether to do a copy-if-different. + bool CopyIfDifferent; + + // Whether the real file stream was valid when it was closed. + bool Okay; + + // Whether the destionation file is compressed + bool Compress; + + // Whether the destionation file is compressed + bool CompressExtraExtension; +}; + +/** \class cmGeneratedFileStream + * \brief Output stream for generated files. + * + * File generation should be atomic so that if CMake is killed then a + * generated file is either the original version or the complete new + * version. This stream is used to make sure file generation is + * atomic. Optionally the output file is only replaced if its + * contents have changed to prevent the file modification time from + * being updated. + */ +class cmGeneratedFileStream: private cmGeneratedFileStreamBase, + public std::ofstream +{ +public: + typedef std::ofstream Stream; + + /** + * This constructor prepares a default stream. The open method must + * be used before writing to the stream. + */ + cmGeneratedFileStream(); + + /** + * This constructor takes the name of the file to be generated. It + * automatically generates a name for the temporary file. If the + * file cannot be opened an error message is produced unless the + * second argument is set to true. + */ + cmGeneratedFileStream(const char* name, bool quiet=false); + + /** + * The destructor checks the stream status to be sure the temporary + * file was successfully written before allowing the original to be + * replaced. + */ + ~cmGeneratedFileStream(); + + /** + * Open an output file by name. This should be used only with a + * non-open stream. It automatically generates a name for the + * temporary file. If the file cannot be opened an error message is + * produced unless the second argument is set to true. + */ + cmGeneratedFileStream& Open(const char* name, bool quiet=false, + bool binaryFlag=false); + + /** + * Close the output file. This should be used only with an open + * stream. The temporary file is atomically renamed to the + * destionation file if the stream is still valid when this method + * is called. + */ + bool Close(); + + /** + * Set whether copy-if-different is done. + */ + void SetCopyIfDifferent(bool copy_if_different); + + /** + * Set whether compression is done. + */ + void SetCompression(bool compression); + + /** + * Set whether compression has extra extension + */ + void SetCompressionExtraExtension(bool ext); + + /** + * Set name of the file that will hold the actual output. This method allows + * the output file to be changed during the use of cmGeneratedFileStream. + */ + void SetName(const char* fname); + +private: + cmGeneratedFileStream(cmGeneratedFileStream const&); // not implemented +}; + +#if defined(__sgi) && !defined(__GNUC__) +# pragma reset woff 1375 /* base class destructor not virtual */ +#endif + +#endif diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx new file mode 100644 index 000000000..1b79eb915 --- /dev/null +++ b/Source/cmGetCMakePropertyCommand.cxx @@ -0,0 +1,65 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetCMakePropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetCMakePropertyCommand.h" + +#include "cmake.h" + +// cmGetCMakePropertyCommand +bool cmGetCMakePropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::vector::size_type cc; + std::string variable = args[0]; + std::string output = "NOTFOUND"; + + if ( args[1] == "VARIABLES") + { + int cacheonly = 0; + std::vector vars = this->Makefile->GetDefinitions(cacheonly); + for ( cc = 0; cc < vars.size(); cc ++ ) + { + if ( cc > 0 ) + { + output += ";"; + } + output += vars[cc]; + } + } + else if ( args[1] == "MACROS" ) + { + this->Makefile->GetListOfMacros(output); + } + else + { + const char *prop = + this->Makefile->GetCMakeInstance()->GetProperty(args[1].c_str()); + if (prop) + { + output = prop; + } + } + this->Makefile->AddDefinition(variable.c_str(), output.c_str()); + + return true; +} + diff --git a/Source/cmGetCMakePropertyCommand.h b/Source/cmGetCMakePropertyCommand.h new file mode 100644 index 000000000..ff8cb3829 --- /dev/null +++ b/Source/cmGetCMakePropertyCommand.h @@ -0,0 +1,73 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetCMakePropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetCMakePropertyCommand_h +#define cmGetCMakePropertyCommand_h + +#include "cmCommand.h" + +class cmGetCMakePropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmGetCMakePropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_cmake_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property of the CMake instance."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_cmake_property(VAR property)\n" + "Get a property from the CMake instance. The value of the " + "property is stored in the variable VAR. If the property is " + "not found, CMake will report an error. Some supported properties " + "include: VARIABLES, CACHE_VARIABLES, COMMANDS, and MACROS."; + } + + cmTypeMacro(cmGetCMakePropertyCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGetDirectoryPropertyCommand.cxx b/Source/cmGetDirectoryPropertyCommand.cxx new file mode 100644 index 000000000..e7fc7a479 --- /dev/null +++ b/Source/cmGetDirectoryPropertyCommand.cxx @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetDirectoryPropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetDirectoryPropertyCommand.h" + +#include "cmake.h" + +// cmGetDirectoryPropertyCommand +bool cmGetDirectoryPropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::vector::const_iterator i = args.begin(); + std::string variable = *i; + ++i; + std::string output = ""; + + // get the directory argument if there is one + cmMakefile *dir = this->Makefile; + if (*i == "DIRECTORY") + { + ++i; + if (i == args.end()) + { + this->SetError + ("DIRECTORY argument provided without subsequent arguments"); + return false; + } + std::string sd = *i; + // make sure the start dir is a full path + if (!cmSystemTools::FileIsFullPath(sd.c_str())) + { + sd = this->Makefile->GetStartDirectory(); + sd += "/"; + sd += *i; + } + + // The local generators are associated with collapsed paths. + sd = cmSystemTools::CollapseFullPath(sd.c_str()); + + // lookup the makefile from the directory name + cmLocalGenerator *lg = + this->Makefile->GetLocalGenerator()->GetGlobalGenerator()-> + FindLocalGenerator(sd.c_str()); + if (!lg) + { + this->SetError + ("DIRECTORY argument provided but requested directory not found. " + "This could be because the directory argument was invalid or, " + "it is valid but has not been processed yet."); + return false; + } + dir = lg->GetMakefile(); + ++i; + } + + // OK, now we have the directory to process, we just get the requested + // information out of it + + if ( *i == "DEFINITION" ) + { + ++i; + if (i == args.end()) + { + this->SetError("A request for a variable definition was made without " + "providing the name of the variable to get."); + return false; + } + output = dir->GetSafeDefinition(i->c_str()); + this->Makefile->AddDefinition(variable.c_str(), output.c_str()); + return true; + } + + const char *prop = dir->GetProperty(i->c_str()); + if (prop) + { + this->Makefile->AddDefinition(variable.c_str(), prop); + return true; + } + this->Makefile->AddDefinition(variable.c_str(), ""); + return true; +} + diff --git a/Source/cmGetDirectoryPropertyCommand.h b/Source/cmGetDirectoryPropertyCommand.h new file mode 100644 index 000000000..3a859c891 --- /dev/null +++ b/Source/cmGetDirectoryPropertyCommand.h @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetDirectoryPropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetDirectoryPropertyCommand_h +#define cmGetDirectoryPropertyCommand_h + +#include "cmCommand.h" + +class cmGetDirectoryPropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmGetDirectoryPropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_directory_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property of the directory."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_directory_property(VAR [DIRECTORY dir] property)\n" + "Get a property from the Directory. The value of the property is " + "stored in the variable VAR. If the property is not found, " + "CMake will report an error. The properties include: VARIABLES, " + "CACHE_VARIABLES, COMMANDS, MACROS, INCLUDE_DIRECTORIES, " + "LINK_DIRECTORIES, DEFINITIONS, INCLUDE_REGULAR_EXPRESSION, " + "LISTFILE_STACK, PARENT_DIRECTORY, and " + "DEFINITION varname. If the DIRECTORY argument is provided then " + "the property of the provided directory will be retrieved " + "instead of the current directory. You can only get properties " + "of a directory during or after it has been traversed by cmake."; + } + + cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx new file mode 100644 index 000000000..1db13f396 --- /dev/null +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -0,0 +1,128 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetFilenameComponentCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.17 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetFilenameComponentCommand.h" +#include "cmSystemTools.h" + +// cmGetFilenameComponentCommand +bool cmGetFilenameComponentCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 3) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Check and see if the value has been stored in the cache + // already, if so use that value + if(args.size() == 4 && args[3] == "CACHE") + { + const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); + if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue)) + { + return true; + } + } + + std::string result; + std::string filename = args[1]; + cmSystemTools::ExpandRegistryValues(filename); + std::string storeArgs; + std::string programArgs; + if (args[2] == "PATH") + { + result = cmSystemTools::GetFilenamePath(filename); + } + else if (args[2] == "NAME") + { + result = cmSystemTools::GetFilenameName(filename); + } + else if (args[2] == "PROGRAM") + { + for(unsigned int i=2; i < args.size(); ++i) + { + if(args[i] == "PROGRAM_ARGS") + { + i++; + if(i < args.size()) + { + storeArgs = args[i]; + } + } + } + cmSystemTools::SplitProgramFromArgs(filename.c_str(), + result, programArgs); + } + else if (args[2] == "EXT") + { + result = cmSystemTools::GetFilenameExtension(filename); + } + else if (args[2] == "NAME_WE") + { + result = cmSystemTools::GetFilenameWithoutExtension(filename); + } + else if (args[2] == "ABSOLUTE") + { + // If the path given is relative evaluate it relative to the + // current source directory. + if(!cmSystemTools::FileIsFullPath(filename.c_str())) + { + std::string fname = this->Makefile->GetCurrentDirectory(); + if(!fname.empty()) + { + fname += "/"; + fname += filename; + filename = fname; + } + } + + // Collapse the path to its simplest form. + result = cmSystemTools::CollapseFullPath(filename.c_str()); + } + else + { + std::string err = "unknown component " + args[2]; + this->SetError(err.c_str()); + return false; + } + + if(args.size() == 4 && args[3] == "CACHE") + { + if(programArgs.size() && storeArgs.size()) + { + this->Makefile->AddCacheDefinition + (storeArgs.c_str(), programArgs.c_str(), + "", args[2] == "PATH" ? cmCacheManager::FILEPATH + : cmCacheManager::STRING); + } + this->Makefile->AddCacheDefinition + (args[0].c_str(), result.c_str(), "", + args[2] == "PATH" ? cmCacheManager::FILEPATH + : cmCacheManager::STRING); + } + else + { + if(programArgs.size() && storeArgs.size()) + { + this->Makefile->AddDefinition(storeArgs.c_str(), programArgs.c_str()); + } + this->Makefile->AddDefinition(args[0].c_str(), result.c_str()); + } + + return true; +} + diff --git a/Source/cmGetFilenameComponentCommand.h b/Source/cmGetFilenameComponentCommand.h new file mode 100644 index 000000000..b5a11437e --- /dev/null +++ b/Source/cmGetFilenameComponentCommand.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetFilenameComponentCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetFilenameComponentCommand_h +#define cmGetFilenameComponentCommand_h + +#include "cmCommand.h" + +/** \class cmGetFilenameComponentCommand + * \brief Get a specific component of a filename. + * + * cmGetFilenameComponentCommand is a utility command used to get the path, + * name, extension or name without extension of a full filename. + */ +class cmGetFilenameComponentCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmGetFilenameComponentCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_filename_component";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a specific component of a full filename."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_filename_component(VarName FileName\n" + " PATH|ABSOLUTE|NAME|EXT|NAME_WE\n" + " [CACHE])\n" + "Set VarName to be the path (PATH), file name (NAME), file " + "extension (EXT), file name without extension (NAME_WE) of FileName, " + "or the full absolute (ABSOLUTE) file name without symlinks. " + "Note that the path is converted to Unix slashes format and has no " + "trailing slashes. The longest file extension is always considered. " + "If the optional CACHE argument is specified, the result variable is " + "added to the cache.\n" + " get_filename_component(VarName FileName\n" + " PROGRAM [PROGRAM_ARGS ArgVar]\n" + " [CACHE])\n" + "The program in FileName will be found in the system search path or " + "left as a full path. If PROGRAM_ARGS is present with PROGRAM, then " + "any command-line arguments present in the FileName string are split " + "from the program name and stored in ArgVar. This is used to separate " + "a program name from its arguments in a command line string."; + } + + cmTypeMacro(cmGetFilenameComponentCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGetPropertyCommand.cxx b/Source/cmGetPropertyCommand.cxx new file mode 100755 index 000000000..172c51b20 --- /dev/null +++ b/Source/cmGetPropertyCommand.cxx @@ -0,0 +1,360 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetPropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:03 $ + Version: $Revision: 1.7.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetPropertyCommand.h" + +#include "cmake.h" +#include "cmTest.h" +#include "cmPropertyDefinition.h" + +//---------------------------------------------------------------------------- +cmGetPropertyCommand::cmGetPropertyCommand() +{ + this->InfoType = OutValue; +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 3 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // The cmake variable in which to store the result. + this->Variable = args[0]; + + // Get the scope from which to get the property. + cmProperty::ScopeType scope; + if(args[1] == "GLOBAL") + { + scope = cmProperty::GLOBAL; + } + else if(args[1] == "DIRECTORY") + { + scope = cmProperty::DIRECTORY; + } + else if(args[1] == "TARGET") + { + scope = cmProperty::TARGET; + } + else if(args[1] == "SOURCE") + { + scope = cmProperty::SOURCE_FILE; + } + else if(args[1] == "TEST") + { + scope = cmProperty::TEST; + } + else if(args[1] == "VARIABLE") + { + scope = cmProperty::VARIABLE; + } + else + { + cmOStringStream e; + e << "given invalid scope " << args[1] << ". " + << "Valid scopes are " + << "GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE."; + this->SetError(e.str().c_str()); + return false; + } + + // Parse remaining arguments. + enum Doing { DoingNone, DoingName, DoingProperty, DoingType }; + Doing doing = DoingName; + for(unsigned int i=2; i < args.size(); ++i) + { + if(args[i] == "PROPERTY") + { + doing = DoingProperty; + } + else if(args[i] == "BRIEF_DOCS") + { + doing = DoingNone; + this->InfoType = OutBriefDoc; + } + else if(args[i] == "FULL_DOCS") + { + doing = DoingNone; + this->InfoType = OutFullDoc; + } + else if(args[i] == "SET") + { + doing = DoingNone; + this->InfoType = OutSet; + } + else if(args[i] == "DEFINED") + { + doing = DoingNone; + this->InfoType = OutDefined; + } + else if(doing == DoingName) + { + doing = DoingNone; + this->Name = args[i]; + } + else if(doing == DoingProperty) + { + doing = DoingNone; + this->PropertyName = args[i]; + } + else + { + cmOStringStream e; + e << "given invalid argument \"" << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Make sure a property name was found. + if(this->PropertyName.empty()) + { + this->SetError("not given a PROPERTY argument."); + return false; + } + + // Compute requested output. + if(this->InfoType == OutBriefDoc) + { + // Lookup brief documentation. + std::string output; + if(cmPropertyDefinition* def = + this->Makefile->GetCMakeInstance()-> + GetPropertyDefinition(this->PropertyName.c_str(), scope)) + { + output = def->GetShortDescription(); + } + else + { + output = "NOTFOUND"; + } + this->Makefile->AddDefinition(this->Variable.c_str(), output.c_str()); + } + else if(this->InfoType == OutFullDoc) + { + // Lookup full documentation. + std::string output; + if(cmPropertyDefinition* def = + this->Makefile->GetCMakeInstance()-> + GetPropertyDefinition(this->PropertyName.c_str(), scope)) + { + output = def->GetFullDescription(); + } + else + { + output = "NOTFOUND"; + } + this->Makefile->AddDefinition(this->Variable.c_str(), output.c_str()); + } + else if(this->InfoType == OutDefined) + { + // Lookup if the property is defined + if(this->Makefile->GetCMakeInstance()-> + GetPropertyDefinition(this->PropertyName.c_str(), scope)) + { + this->Makefile->AddDefinition(this->Variable.c_str(), "1"); + } + else + { + this->Makefile->AddDefinition(this->Variable.c_str(), "0"); + } + } + else + { + // Dispatch property getting. + switch(scope) + { + case cmProperty::GLOBAL: return this->HandleGlobalMode(); + case cmProperty::DIRECTORY: return this->HandleDirectoryMode(); + case cmProperty::TARGET: return this->HandleTargetMode(); + case cmProperty::SOURCE_FILE: return this->HandleSourceMode(); + case cmProperty::TEST: return this->HandleTestMode(); + case cmProperty::VARIABLE: return this->HandleVariableMode(); + + case cmProperty::CACHED_VARIABLE: + break; // should never happen + } + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::StoreResult(const char* value) +{ + if(this->InfoType == OutSet) + { + this->Makefile->AddDefinition(this->Variable.c_str(), value? "1":"0"); + } + else // if(this->InfoType == OutValue) + { + this->Makefile->AddDefinition(this->Variable.c_str(), value); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleGlobalMode() +{ + if(!this->Name.empty()) + { + this->SetError("given name for GLOBAL scope."); + return false; + } + + // Get the property. + cmake* cm = this->Makefile->GetCMakeInstance(); + return this->StoreResult(cm->GetProperty(this->PropertyName.c_str())); +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleDirectoryMode() +{ + // Default to the current directory. + cmMakefile* mf = this->Makefile; + + // Lookup the directory if given. + if(!this->Name.empty()) + { + // Construct the directory name. Interpret relative paths with + // respect to the current directory. + std::string dir = this->Name; + if(!cmSystemTools::FileIsFullPath(dir.c_str())) + { + dir = this->Makefile->GetCurrentDirectory(); + dir += "/"; + dir += this->Name; + } + + // The local generators are associated with collapsed paths. + dir = cmSystemTools::CollapseFullPath(dir.c_str()); + + // Lookup the generator. + if(cmLocalGenerator* lg = + (this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->FindLocalGenerator(dir.c_str()))) + { + // Use the makefile for the directory found. + mf = lg->GetMakefile(); + } + else + { + // Could not find the directory. + this->SetError + ("DIRECTORY scope provided but requested directory was not found. " + "This could be because the directory argument was invalid or, " + "it is valid but has not been processed yet."); + return false; + } + } + + // Get the property. + return this->StoreResult(mf->GetProperty(this->PropertyName.c_str())); +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleTargetMode() +{ + if(this->Name.empty()) + { + this->SetError("not given name for TARGET scope."); + return false; + } + + if(cmTarget* target = this->Makefile->FindTargetToUse(this->Name.c_str())) + { + return this->StoreResult(target->GetProperty(this->PropertyName.c_str())); + } + else + { + cmOStringStream e; + e << "could not find TARGET " << this->Name + << ". Perhaps it has not yet been created."; + this->SetError(e.str().c_str()); + return false; + } +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleSourceMode() +{ + if(this->Name.empty()) + { + this->SetError("not given name for SOURCE scope."); + return false; + } + + // Get the source file. + if(cmSourceFile* sf = + this->Makefile->GetOrCreateSource(this->Name.c_str())) + { + return + this->StoreResult(sf->GetPropertyForUser(this->PropertyName.c_str())); + } + else + { + cmOStringStream e; + e << "given SOURCE name that could not be found or created: " + << this->Name; + this->SetError(e.str().c_str()); + return false; + } +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleTestMode() +{ + if(this->Name.empty()) + { + this->SetError("not given name for TEST scope."); + return false; + } + + // Loop over all tests looking for matching names. + std::vector const& tests = *this->Makefile->GetTests(); + for(std::vector::const_iterator ti = tests.begin(); + ti != tests.end(); ++ti) + { + cmTest* test = *ti; + if(test->GetName() == this->Name) + { + return this->StoreResult(test->GetProperty(this->PropertyName.c_str())); + } + } + + // If not found it is an error. + cmOStringStream e; + e << "given TEST name that does not exist: " << this->Name; + this->SetError(e.str().c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmGetPropertyCommand::HandleVariableMode() +{ + if(!this->Name.empty()) + { + this->SetError("given name for VARIABLE scope."); + return false; + } + + return this->StoreResult + (this->Makefile->GetDefinition(this->PropertyName.c_str())); +} diff --git a/Source/cmGetPropertyCommand.h b/Source/cmGetPropertyCommand.h new file mode 100755 index 000000000..50cd1f4bf --- /dev/null +++ b/Source/cmGetPropertyCommand.h @@ -0,0 +1,119 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetPropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:03 $ + Version: $Revision: 1.6.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetPropertyCommand_h +#define cmGetPropertyCommand_h + +#include "cmCommand.h" + +class cmGetPropertyCommand : public cmCommand +{ +public: + cmGetPropertyCommand(); + + virtual cmCommand* Clone() + { + return new cmGetPropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_property(\n" + " |\n" + " SOURCE |\n" + " TEST |\n" + " VARIABLE>\n" + " PROPERTY \n" + " [SET | DEFINED | BRIEF_DOCS | FULL_DOCS])\n" + "Get one property from one object in a scope. " + "The first argument specifies the variable in which to store the " + "result. " + "The second argument determines the scope from which to get the " + "property. It must be one of the following:\n" + "GLOBAL scope is unique and does not accept a name.\n" + "DIRECTORY scope defaults to the current directory but another " + "directory (already processed by CMake) may be named by full or " + "relative path.\n" + "TARGET scope must name one existing target.\n" + "SOURCE scope must name one source file.\n" + "TEST scope must name one existing test.\n" + "VARIABLE scope is unique and does not accept a name.\n" + "The required PROPERTY option is immediately followed by the name " + "of the property to get. " + "If the property is not set an empty value is returned. " + "If the SET option is given the variable is set to a boolean " + "value indicating whether the property has been set." + "If the DEFINED option is given the variable is set to a boolean " + "value indicating whether the property has been defined " + "such as with define_property. " + "If BRIEF_DOCS or FULL_DOCS is given then the variable is set to " + "a string containing documentation for the requested property. " + "If documentation is requested for a property that has not been " + "defined NOTFOUND is returned."; + } + + cmTypeMacro(cmGetPropertyCommand, cmCommand); +private: + enum OutType { OutValue, OutDefined, OutBriefDoc, OutFullDoc, OutSet }; + std::string Variable; + std::string Name; + std::string PropertyName; + OutType InfoType; + + // Implementation of result storage. + bool StoreResult(const char* value); + + // Implementation of each property type. + bool HandleGlobalMode(); + bool HandleDirectoryMode(); + bool HandleTargetMode(); + bool HandleSourceMode(); + bool HandleTestMode(); + bool HandleVariableMode(); +}; + +#endif diff --git a/Source/cmGetSourceFilePropertyCommand.cxx b/Source/cmGetSourceFilePropertyCommand.cxx new file mode 100644 index 000000000..5848b9ee0 --- /dev/null +++ b/Source/cmGetSourceFilePropertyCommand.cxx @@ -0,0 +1,57 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetSourceFilePropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-30 16:21:54 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetSourceFilePropertyCommand.h" + +#include "cmSourceFile.h" + +// cmSetSourceFilePropertyCommand +bool cmGetSourceFilePropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 3 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + const char* var = args[0].c_str(); + const char* file = args[1].c_str(); + cmSourceFile* sf = this->Makefile->GetSource(file); + + // for the location we must create a source file first + if (!sf && args[2] == "LOCATION") + { + sf = this->Makefile->GetOrCreateSource(file); + } + if(sf) + { + if(args[2] == "LANGUAGE") + { + this->Makefile->AddDefinition(var, sf->GetLanguage()); + return true; + } + const char *prop = sf->GetPropertyForUser(args[2].c_str()); + if (prop) + { + this->Makefile->AddDefinition(var, prop); + return true; + } + } + + this->Makefile->AddDefinition(var, "NOTFOUND"); + return true; +} + diff --git a/Source/cmGetSourceFilePropertyCommand.h b/Source/cmGetSourceFilePropertyCommand.h new file mode 100644 index 000000000..da45fe194 --- /dev/null +++ b/Source/cmGetSourceFilePropertyCommand.h @@ -0,0 +1,69 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetSourceFilePropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetSourceFilePropertyCommand_h +#define cmGetSourceFilePropertyCommand_h + +#include "cmCommand.h" + +class cmGetSourceFilePropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmGetSourceFilePropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_source_file_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property for a source file."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_source_file_property(VAR file property)\n" + "Get a property from a source file. The value of the property is " + "stored in the variable VAR. If the property is not found, VAR " + "will be set to \"NOTFOUND\". Use set_source_files_properties to set " + "property values. Source file properties usually control how the " + "file is built. One property that is always there is LOCATION"; + } + + cmTypeMacro(cmGetSourceFilePropertyCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx new file mode 100644 index 000000000..da9de816c --- /dev/null +++ b/Source/cmGetTargetPropertyCommand.cxx @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetTargetPropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetTargetPropertyCommand.h" + +// cmSetTargetPropertyCommand +bool cmGetTargetPropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 3 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::string var = args[0].c_str(); + const char* targetName = args[1].c_str(); + + if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName)) + { + cmTarget& target = *tgt; + const char *prop = target.GetProperty(args[2].c_str()); + if (prop) + { + this->Makefile->AddDefinition(var.c_str(), prop); + return true; + } + } + this->Makefile->AddDefinition(var.c_str(), (var+"-NOTFOUND").c_str()); + return true; +} + diff --git a/Source/cmGetTargetPropertyCommand.h b/Source/cmGetTargetPropertyCommand.h new file mode 100644 index 000000000..a609de439 --- /dev/null +++ b/Source/cmGetTargetPropertyCommand.h @@ -0,0 +1,85 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetTargetPropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetTargetPropertyCommand_h +#define cmGetTargetPropertyCommand_h + +#include "cmCommand.h" + +class cmGetTargetPropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmGetTargetPropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_target_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property from a target."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_target_property(VAR target property)\n" + "Get a property from a target. The value of the property is " + "stored in the variable VAR. If the property is not found, VAR " + "will be set to \"NOTFOUND\". Use set_target_properties to set " + "property values. Properties are usually used to control how " + "a target is built.\n" + "The read-only property \"_LOCATION\" provides the full " + "path to the file on disk that will be created for the target when " + "building under configuration " + "(in upper-case, such as \"DEBUG_LOCATION\"). " + "The read-only property \"LOCATION\" specifies " + "the full path to the file on disk that will be created for the " + "target. The path may contain a build-system-specific portion that " + "is replaced at build time with the configuration getting built " + "(such as \"$(ConfigurationName)\" in VS). " + "This is very useful for executable targets to get " + "the path to the executable file for use in a custom command.\n" + "The read-only property \"TYPE\" returns which type the specified " + "target has (EXECUTABLE, STATIC_LIBRARY, SHARED_LIBRARY, " + "MODULE_LIBRARY, UTILITY, INSTALL_FILES or INSTALL_PROGRAMS). " + "This command can get properties for any target so far created. " + "The targets do not need to be in the current CMakeLists.txt file."; + } + + cmTypeMacro(cmGetTargetPropertyCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGetTestPropertyCommand.cxx b/Source/cmGetTestPropertyCommand.cxx new file mode 100644 index 000000000..9382dd11f --- /dev/null +++ b/Source/cmGetTestPropertyCommand.cxx @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetTestPropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGetTestPropertyCommand.h" + +#include "cmake.h" +#include "cmTest.h" + +// cmGetTestPropertyCommand +bool cmGetTestPropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 3 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string testName = args[0]; + std::string var = args[2]; + cmTest *test = this->Makefile->GetTest(testName.c_str()); + if (test) + { + const char *prop = test->GetProperty(args[1].c_str()); + if (prop) + { + this->Makefile->AddDefinition(var.c_str(), prop); + return true; + } + } + this->Makefile->AddDefinition(var.c_str(), "NOTFOUND"); + return true; +} + diff --git a/Source/cmGetTestPropertyCommand.h b/Source/cmGetTestPropertyCommand.h new file mode 100644 index 000000000..d97c5dfe0 --- /dev/null +++ b/Source/cmGetTestPropertyCommand.h @@ -0,0 +1,68 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGetTestPropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGetTestPropertyCommand_h +#define cmGetTestPropertyCommand_h + +#include "cmCommand.h" + +class cmGetTestPropertyCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmGetTestPropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "get_test_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Get a property of the test."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " get_test_property(test VAR property)\n" + "Get a property from the Test. The value of the property is " + "stored in the variable VAR. If the property is not found, " + "CMake will report an error. For a list of standard properties " + "you can type cmake --help-property-list"; + } + + cmTypeMacro(cmGetTestPropertyCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmGlobalBorlandMakefileGenerator.cxx b/Source/cmGlobalBorlandMakefileGenerator.cxx new file mode 100644 index 000000000..278dbed71 --- /dev/null +++ b/Source/cmGlobalBorlandMakefileGenerator.cxx @@ -0,0 +1,68 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalBorlandMakefileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.28 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalBorlandMakefileGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmake.h" + +cmGlobalBorlandMakefileGenerator::cmGlobalBorlandMakefileGenerator() +{ + this->EmptyRuleHackDepends = "NUL"; + this->FindMakeProgramFile = "CMakeBorlandFindMake.cmake"; + this->ForceUnixPaths = false; + this->ToolSupportsColor = true; + this->UseLinkScript = false; +} + + +void cmGlobalBorlandMakefileGenerator +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, + bool optional) +{ + std::string outdir = this->CMakeInstance->GetStartOutputDirectory(); + mf->AddDefinition("BORLAND", "1"); + mf->AddDefinition("CMAKE_GENERATOR_CC", "bcc32"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "bcc32"); + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator() +{ + cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; + lg->SetIncludeDirective("!include"); + lg->SetWindowsShell(true); + lg->SetDefineWindowsNULL(true); + lg->SetMakefileVariableSize(32); + lg->SetPassMakeflags(true); + lg->SetGlobalGenerator(this); + lg->SetUnixCD(false); + lg->SetMakeCommandEscapeTargetTwice(true); + lg->SetBorlandMakeCurlyHack(true); + return lg; +} + + +//---------------------------------------------------------------------------- +void cmGlobalBorlandMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Borland makefiles."; + entry.Full = ""; +} diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h new file mode 100644 index 000000000..cc7b6cb8b --- /dev/null +++ b/Source/cmGlobalBorlandMakefileGenerator.h @@ -0,0 +1,53 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalBorlandMakefileGenerator.h,v $ + Language: C++ + Date: $Date: 2007-06-28 13:09:26 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalBorlandMakefileGenerator_h +#define cmGlobalBorlandMakefileGenerator_h + +#include "cmGlobalNMakeMakefileGenerator.h" + +/** \class cmGlobalBorlandMakefileGenerator + * \brief Write a Borland makefiles. + * + * cmGlobalBorlandMakefileGenerator manages nmake build process for a tree + */ +class cmGlobalBorlandMakefileGenerator : public cmGlobalNMakeMakefileGenerator +{ +public: + cmGlobalBorlandMakefileGenerator(); + static cmGlobalGenerator* New() + { return new cmGlobalBorlandMakefileGenerator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalBorlandMakefileGenerator::GetActualName();} + static const char* GetActualName() {return "Borland Makefiles";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; + +#endif diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx new file mode 100644 index 000000000..ba4e4edbd --- /dev/null +++ b/Source/cmGlobalGenerator.cxx @@ -0,0 +1,1892 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.227.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#if defined(_WIN32) && !defined(__CYGWIN__) +#include "windows.h" // this must be first to define GetCurrentDirectory +#endif + +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmExternalMakefileProjectGenerator.h" +#include "cmake.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmVersion.h" +#include "cmExportInstallFileGenerator.h" +#include "cmComputeTargetDepends.h" + +#include + +#include // required for atof + +#include + +cmGlobalGenerator::cmGlobalGenerator() +{ + // By default the .SYMBOLIC dependency is not needed on symbolic rules. + this->NeedSymbolicMark = false; + + // by default use the native paths + this->ForceUnixPaths = false; + + // By default do not try to support color. + this->ToolSupportsColor = false; + + // By default do not use link scripts. + this->UseLinkScript = false; + + // Whether an install target is needed. + this->InstallTargetEnabled = false; + + // how long to let try compiles run + this->TryCompileTimeout = 0; + + this->ExtraGenerator = 0; + this->CurrentLocalGenerator = 0; +} + +cmGlobalGenerator::~cmGlobalGenerator() +{ + // Delete any existing cmLocalGenerators + for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + { + delete this->LocalGenerators[i]; + } + this->LocalGenerators.clear(); + + if (this->ExtraGenerator) + { + delete this->ExtraGenerator; + } + + for (std::map >::iterator + setIt = this->ExportSets.begin(); + setIt != this->ExportSets.end(); + ++setIt) + { + for (unsigned int i = 0; i < setIt->second.size(); ++i) + { + delete setIt->second[i]; + } + } +} + +// Find the make program for the generator, required for try compiles +void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) +{ + if(this->FindMakeProgramFile.size() == 0) + { + cmSystemTools::Error( + "Generator implementation error, " + "all generators must specify this->FindMakeProgramFile"); + } + if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM") + || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) + { + std::string setMakeProgram = + mf->GetModulesFile(this->FindMakeProgramFile.c_str()); + if(setMakeProgram.size()) + { + mf->ReadListFile(0, setMakeProgram.c_str()); + } + } + if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM") + || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM"))) + { + cmOStringStream err; + err << "CMake was unable to find a build program corresponding to \"" + << this->GetName() << "\". CMAKE_MAKE_PROGRAM is not set. You " + << "probably need to select a different build tool."; + cmSystemTools::Error(err.str().c_str()); + cmSystemTools::SetFatalErrorOccured(); + return; + } + std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + // if there are spaces in the make program use short path + // but do not short path the actual program name, as + // this can cause trouble with VSExpress + if(makeProgram.find(' ') != makeProgram.npos) + { + std::string dir; + std::string file; + cmSystemTools::SplitProgramPath(makeProgram.c_str(), + dir, file); + std::string saveFile = file; + cmSystemTools::GetShortPath(makeProgram.c_str(), makeProgram); + cmSystemTools::SplitProgramPath(makeProgram.c_str(), + dir, file); + makeProgram = dir; + makeProgram += "/"; + makeProgram += saveFile; + mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", makeProgram.c_str(), + "make program", + cmCacheManager::FILEPATH); + } + + if(makeProgram.find("xcodebuild") != makeProgram.npos) + { + // due to the text file busy /bin/sh problem with xcodebuild + // use the cmakexbuild wrapper instead. This program + // will run xcodebuild and if it sees the error text file busy + // it will stop forwarding output, and let the build finish. + // Then it will retry the build. It will continue this + // untill no text file busy errors occur. + std::string cmakexbuild = + this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_COMMAND"); + cmakexbuild = cmakexbuild.substr(0, cmakexbuild.length()-5); + cmakexbuild += "cmakexbuild"; + + mf->AddCacheDefinition("CMAKE_MAKE_PROGRAM", + cmakexbuild.c_str(), + "make program", + cmCacheManager::FILEPATH); + } +} + +// enable the given language +// +// The following files are loaded in this order: +// +// First figure out what OS we are running on: +// +// CMakeSystem.cmake - configured file created by CMakeDetermineSystem.cmake +// CMakeDetermineSystem.cmake - figure out os info and create +// CMakeSystem.cmake IF CMAKE_SYSTEM +// not set +// CMakeSystem.cmake - configured file created by +// CMakeDetermineSystem.cmake IF CMAKE_SYSTEM_LOADED + +// Next try and enable all languages found in the languages vector +// +// FOREACH LANG in languages +// CMake(LANG)Compiler.cmake - configured file create by +// CMakeDetermine(LANG)Compiler.cmake +// CMakeDetermine(LANG)Compiler.cmake - Finds compiler for LANG and +// creates CMake(LANG)Compiler.cmake +// CMake(LANG)Compiler.cmake - configured file created by +// CMakeDetermine(LANG)Compiler.cmake +// +// CMakeSystemSpecificInformation.cmake +// - includes Platform/${CMAKE_SYSTEM_NAME}.cmake +// may use compiler stuff + +// FOREACH LANG in languages +// CMake(LANG)Information.cmake +// - loads Platform/${CMAKE_SYSTEM_NAME}-${COMPILER}.cmake +// CMakeTest(LANG)Compiler.cmake +// - Make sure the compiler works with a try compile if +// CMakeDetermine(LANG) was loaded +// +// Now load a few files that can override values set in any of the above +// (PROJECTNAME)Compatibility.cmake +// - load any backwards compatibility stuff for current project +// ${CMAKE_USER_MAKE_RULES_OVERRIDE} +// - allow users a chance to override system variables +// +// + +void +cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, + cmMakefile *mf, bool) +{ + if(languages.size() == 0) + { + cmSystemTools::Error("EnableLanguage must have a lang specified!"); + cmSystemTools::SetFatalErrorOccured(); + return; + } + mf->AddDefinition("RUN_CONFIGURE", true); + std::string rootBin = mf->GetHomeOutputDirectory(); + rootBin += cmake::GetCMakeFilesDirectory(); + + // If the configuration files path has been set, + // then we are in a try compile and need to copy the enable language + // files from the parent cmake bin dir, into the try compile bin dir + if(this->ConfiguredFilesPath.size()) + { + for(std::vector::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + if(*l == "NONE") + { + this->SetLanguageEnabled("NONE", mf); + break; + } + } + rootBin = this->ConfiguredFilesPath; + } + + // set the dir for parent files so they can be used by modules + mf->AddDefinition("CMAKE_PLATFORM_ROOT_BIN",rootBin.c_str()); + + // find and make sure CMAKE_MAKE_PROGRAM is defined + this->FindMakeProgram(mf); + + // try and load the CMakeSystem.cmake if it is there + std::string fpath = rootBin; + if(!mf->GetDefinition("CMAKE_SYSTEM_LOADED")) + { + fpath += "/CMakeSystem.cmake"; + if(cmSystemTools::FileExists(fpath.c_str())) + { + mf->ReadListFile(0,fpath.c_str()); + } + } + // Load the CMakeDetermineSystem.cmake file and find out + // what platform we are running on + if (!mf->GetDefinition("CMAKE_SYSTEM")) + { +#if defined(_WIN32) && !defined(__CYGWIN__) + /* Windows version number data. */ + OSVERSIONINFO osvi; + ZeroMemory(&osvi, sizeof(osvi)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx (&osvi); + cmOStringStream windowsVersionString; + windowsVersionString << osvi.dwMajorVersion << "." << osvi.dwMinorVersion; + windowsVersionString.str(); + mf->AddDefinition("CMAKE_HOST_SYSTEM_VERSION", + windowsVersionString.str().c_str()); +#endif + // Read the DetermineSystem file + std::string systemFile = mf->GetModulesFile("CMakeDetermineSystem.cmake"); + mf->ReadListFile(0, systemFile.c_str()); + // load the CMakeSystem.cmake from the binary directory + // this file is configured by the CMakeDetermineSystem.cmake file + fpath = rootBin; + fpath += "/CMakeSystem.cmake"; + mf->ReadListFile(0,fpath.c_str()); + } + std::map needTestLanguage; + std::map needSetLanguageEnabledMaps; + // foreach language + // load the CMakeDetermine(LANG)Compiler.cmake file to find + // the compiler + + for(std::vector::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + const char* lang = l->c_str(); + needSetLanguageEnabledMaps[lang] = false; + if(*l == "NONE") + { + this->SetLanguageEnabled("NONE", mf); + continue; + } + std::string loadedLang = "CMAKE_"; + loadedLang += lang; + loadedLang += "_COMPILER_LOADED"; + // If the existing build tree was already configured with this + // version of CMake then try to load the configured file first + // to avoid duplicate compiler tests. + unsigned int cacheMajor = mf->GetCacheMajorVersion(); + unsigned int cacheMinor = mf->GetCacheMinorVersion(); + unsigned int selfMajor = cmVersion::GetMajorVersion(); + unsigned int selfMinor = cmVersion::GetMinorVersion(); + if((this->CMakeInstance->GetIsInTryCompile() || + (selfMajor == cacheMajor && selfMinor == cacheMinor)) + && !mf->GetDefinition(loadedLang.c_str())) + { + fpath = rootBin; + fpath += "/CMake"; + fpath += lang; + fpath += "Compiler.cmake"; + if(cmSystemTools::FileExists(fpath.c_str())) + { + if(!mf->ReadListFile(0,fpath.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); + } + // if this file was found then the language was already determined + // to be working + needTestLanguage[lang] = false; + this->SetLanguageEnabledFlag(lang, mf); + needSetLanguageEnabledMaps[lang] = true; + // this can only be called after loading CMake(LANG)Compiler.cmake + } + } + + if(!this->GetLanguageEnabled(lang) ) + { + if (this->CMakeInstance->GetIsInTryCompile()) + { + cmSystemTools::Error("This should not have happen. " + "If you see this message, you are probably " + "using a broken CMakeLists.txt file or a " + "problematic release of CMake"); + } + // if the CMake(LANG)Compiler.cmake file was not found then + // load CMakeDetermine(LANG)Compiler.cmake + std::string determineCompiler = "CMakeDetermine"; + determineCompiler += lang; + determineCompiler += "Compiler.cmake"; + std::string determineFile = + mf->GetModulesFile(determineCompiler.c_str()); + if(!mf->ReadListFile(0,determineFile.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + determineFile.c_str()); + } + needTestLanguage[lang] = true; + // Some generators like visual studio should not use the env variables + // So the global generator can specify that in this variable + if(!mf->GetDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV")) + { + // put ${CMake_(LANG)_COMPILER_ENV_VAR}=${CMAKE_(LANG)_COMPILER + // into the environment, in case user scripts want to run + // configure, or sub cmakes + std::string compilerName = "CMAKE_"; + compilerName += lang; + compilerName += "_COMPILER"; + std::string compilerEnv = "CMAKE_"; + compilerEnv += lang; + compilerEnv += "_COMPILER_ENV_VAR"; + std::string envVar = mf->GetRequiredDefinition(compilerEnv.c_str()); + std::string envVarValue = + mf->GetRequiredDefinition(compilerName.c_str()); + std::string env = envVar; + env += "="; + env += envVarValue; + cmSystemTools::PutEnv(env.c_str()); + } + + // if determineLanguage was called then load the file it + // configures CMake(LANG)Compiler.cmake + fpath = rootBin; + fpath += "/CMake"; + fpath += lang; + fpath += "Compiler.cmake"; + if(!mf->ReadListFile(0,fpath.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); + } + this->SetLanguageEnabledFlag(lang, mf); + needSetLanguageEnabledMaps[lang] = true; + // this can only be called after loading CMake(LANG)Compiler.cmake + // the language must be enabled for try compile to work, but we do + // not know if it is a working compiler yet so set the test language + // flag + needTestLanguage[lang] = true; + } // end if(!this->GetLanguageEnabled(lang) ) + } // end loop over languages + + // **** Load the system specific information if not yet loaded + if (!mf->GetDefinition("CMAKE_SYSTEM_SPECIFIC_INFORMATION_LOADED")) + { + fpath = mf->GetModulesFile("CMakeSystemSpecificInformation.cmake"); + if(!mf->ReadListFile(0,fpath.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); + } + } + // loop over languages again loading CMake(LANG)Information.cmake + // + for(std::vector::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + const char* lang = l->c_str(); + if(*l == "NONE") + { + this->SetLanguageEnabled("NONE", mf); + continue; + } + std::string langLoadedVar = "CMAKE_"; + langLoadedVar += lang; + langLoadedVar += "_INFORMATION_LOADED"; + if (!mf->GetDefinition(langLoadedVar.c_str())) + { + fpath = "CMake"; + fpath += lang; + fpath += "Information.cmake"; + fpath = mf->GetModulesFile(fpath.c_str()); + if(!mf->ReadListFile(0,fpath.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + fpath.c_str()); + } + } + if (needSetLanguageEnabledMaps[lang]) + { + this->SetLanguageEnabledMaps(lang, mf); + } + + // Test the compiler for the language just setup + // At this point we should have enough info for a try compile + // which is used in the backward stuff + // If the language is untested then test it now with a try compile. + if(needTestLanguage[lang]) + { + if (!this->CMakeInstance->GetIsInTryCompile()) + { + std::string testLang = "CMakeTest"; + testLang += lang; + testLang += "Compiler.cmake"; + std::string ifpath = mf->GetModulesFile(testLang.c_str()); + if(!mf->ReadListFile(0,ifpath.c_str())) + { + cmSystemTools::Error("Could not find cmake module file:", + ifpath.c_str()); + } + std::string compilerWorks = "CMAKE_"; + compilerWorks += lang; + compilerWorks += "_COMPILER_WORKS"; + // if the compiler did not work, then remove the + // CMake(LANG)Compiler.cmake file so that it will get tested the + // next time cmake is run + if(!mf->IsOn(compilerWorks.c_str())) + { + fpath = rootBin; + fpath += "/CMake"; + fpath += lang; + fpath += "Compiler.cmake"; + cmSystemTools::RemoveFile(fpath.c_str()); + } + else + { + // load backwards compatibility stuff for C and CXX + // for old versions of CMake ListFiles C and CXX had some + // backwards compatibility files they have to load + // These files have a bunch of try compiles in them so + // should only be done + if (mf->NeedBackwardsCompatibility(1,4)) + { + if(strcmp(lang, "C") == 0) + { + ifpath = + mf->GetModulesFile("CMakeBackwardCompatibilityC.cmake"); + mf->ReadListFile(0,ifpath.c_str()); + } + if(strcmp(lang, "CXX") == 0) + { + ifpath = + mf->GetModulesFile("CMakeBackwardCompatibilityCXX.cmake"); + mf->ReadListFile(0,ifpath.c_str()); + } + } + } + } // end if in try compile + } // end need test language + } // end for each language + + // Now load files that can override any settings on the platform or for + // the project First load the project compatibility file if it is in + // cmake + std::string projectCompatibility = mf->GetDefinition("CMAKE_ROOT"); + projectCompatibility += "/Modules/"; + projectCompatibility += mf->GetSafeDefinition("PROJECT_NAME"); + projectCompatibility += "Compatibility.cmake"; + if(cmSystemTools::FileExists(projectCompatibility.c_str())) + { + mf->ReadListFile(0,projectCompatibility.c_str()); + } +} + +//---------------------------------------------------------------------------- +const char* +cmGlobalGenerator::GetLanguageOutputExtension(cmSourceFile const& source) +{ + if(const char* lang = source.GetLanguage()) + { + if(this->LanguageToOutputExtension.count(lang) > 0) + { + return this->LanguageToOutputExtension[lang].c_str(); + } + } + else + { + // if no language is found then check to see if it is already an + // ouput extension for some language. In that case it should be ignored + // and in this map, so it will not be compiled but will just be used. + std::string const& ext = source.GetExtension(); + if(!ext.empty()) + { + if(this->OutputExtensions.count(ext)) + { + return ext.c_str(); + } + } + } + return ""; +} + + +const char* cmGlobalGenerator::GetLanguageFromExtension(const char* ext) +{ + // if there is an extension and it starts with . then move past the + // . because the extensions are not stored with a . in the map + if(ext && *ext == '.') + { + ++ext; + } + if(this->ExtensionToLanguage.count(ext) > 0) + { + return this->ExtensionToLanguage[ext].c_str(); + } + return 0; +} + +/* SetLanguageEnabled() is now split in two parts: +at first the enabled-flag is set. This can then be used in EnabledLanguage() +for checking whether the language is already enabled. After setting this +flag still the values from the cmake variables have to be copied into the +internal maps, this is done in SetLanguageEnabledMaps() which is called +after the system- and compiler specific files have been loaded. +*/ +void cmGlobalGenerator::SetLanguageEnabled(const char* l, cmMakefile* mf) +{ + this->SetLanguageEnabledFlag(l, mf); + this->SetLanguageEnabledMaps(l, mf); +} + +void cmGlobalGenerator::SetLanguageEnabledFlag(const char* l, cmMakefile*) +{ + this->LanguageEnabled[l] = true; +} + +void cmGlobalGenerator::SetLanguageEnabledMaps(const char* l, cmMakefile* mf) +{ + // use LanguageToLinkerPreference to detect whether this functions has + // run before + if (this->LanguageToLinkerPreference.find(l) != + this->LanguageToLinkerPreference.end()) + { + return; + } + + std::string linkerPrefVar = std::string("CMAKE_") + + std::string(l) + std::string("_LINKER_PREFERENCE"); + const char* linkerPref = mf->GetDefinition(linkerPrefVar.c_str()); + int preference = 0; + if(linkerPref) + { + if (sscanf(linkerPref, "%d", &preference)!=1) + { + // backward compatibility: before 2.6 LINKER_PREFERENCE + // was either "None" or "Prefered", and only the first character was + // tested. So if there is a custom language out there and it is + // "Prefered", set its preference high + if (linkerPref[0]=='P') + { + preference = 100; + } + else + { + preference = 0; + } + } + } + + if (preference < 0) + { + std::string msg = linkerPrefVar; + msg += " is negative, adjusting it to 0"; + cmSystemTools::Message(msg.c_str(), "Warning"); + preference = 0; + } + + this->LanguageToLinkerPreference[l] = preference; + + std::string outputExtensionVar = std::string("CMAKE_") + + std::string(l) + std::string("_OUTPUT_EXTENSION"); + const char* outputExtension = mf->GetDefinition(outputExtensionVar.c_str()); + if(outputExtension) + { + this->LanguageToOutputExtension[l] = outputExtension; + this->OutputExtensions[outputExtension] = outputExtension; + if(outputExtension[0] == '.') + { + this->OutputExtensions[outputExtension+1] = outputExtension+1; + } + } + + std::string extensionsVar = std::string("CMAKE_") + + std::string(l) + std::string("_SOURCE_FILE_EXTENSIONS"); + std::string ignoreExtensionsVar = std::string("CMAKE_") + + std::string(l) + std::string("_IGNORE_EXTENSIONS"); + std::string ignoreExts = mf->GetSafeDefinition(ignoreExtensionsVar.c_str()); + std::string exts = mf->GetSafeDefinition(extensionsVar.c_str()); + std::vector extensionList; + cmSystemTools::ExpandListArgument(exts, extensionList); + for(std::vector::iterator i = extensionList.begin(); + i != extensionList.end(); ++i) + { + this->ExtensionToLanguage[*i] = l; + } + cmSystemTools::ExpandListArgument(ignoreExts, extensionList); + for(std::vector::iterator i = extensionList.begin(); + i != extensionList.end(); ++i) + { + this->IgnoreExtensions[*i] = true; + } + +} + +bool cmGlobalGenerator::IgnoreFile(const char* l) +{ + if(this->GetLanguageFromExtension(l)) + { + return false; + } + return (this->IgnoreExtensions.count(l) > 0); +} + +bool cmGlobalGenerator::GetLanguageEnabled(const char* l) const +{ + return (this->LanguageEnabled.find(l)!= this->LanguageEnabled.end()); +} + +void cmGlobalGenerator::ClearEnabledLanguages() +{ + this->LanguageEnabled.clear(); +} + +bool cmGlobalGenerator::IsDependedOn(const char* project, + cmTarget* targetIn) +{ + // Get all local gens for this project + std::vector* gens = &this->ProjectMap[project]; + // loop over local gens and get the targets for each one + for(unsigned int i = 0; i < gens->size(); ++i) + { + cmTargets& targets = (*gens)[i]->GetMakefile()->GetTargets(); + for (cmTargets::iterator l = targets.begin(); + l != targets.end(); l++) + { + cmTarget& target = l->second; + std::set::const_iterator pos = + target.GetUtilities().find(targetIn->GetName()); + if(pos != target.GetUtilities().end()) + { + return true; + } + } + } + return false; +} + +void cmGlobalGenerator::Configure() +{ + this->FirstTimeProgress = 0.0f; + // Delete any existing cmLocalGenerators + unsigned int i; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + delete this->LocalGenerators[i]; + } + this->LocalGenerators.clear(); + this->TargetDependencies.clear(); + this->TotalTargets.clear(); + this->LocalGeneratorToTargetMap.clear(); + this->ProjectMap.clear(); + + // start with this directory + cmLocalGenerator *lg = this->CreateLocalGenerator(); + this->LocalGenerators.push_back(lg); + + // set the Start directories + lg->GetMakefile()->SetStartDirectory + (this->CMakeInstance->GetStartDirectory()); + lg->GetMakefile()->SetStartOutputDirectory + (this->CMakeInstance->GetStartOutputDirectory()); + lg->GetMakefile()->MakeStartDirectoriesCurrent(); + + // now do it + lg->Configure(); + + // update the cache entry for the number of local generators, this is used + // for progress + char num[100]; + sprintf(num,"%d",static_cast(this->LocalGenerators.size())); + this->GetCMakeInstance()->AddCacheEntry + ("CMAKE_NUMBER_OF_LOCAL_GENERATORS", num, + "number of local generators", cmCacheManager::INTERNAL); + + // check for link libraries and include directories containing "NOTFOUND" + // and for infinite loops + this->CheckLocalGenerators(); + + // at this point this->LocalGenerators has been filled, + // so create the map from project name to vector of local generators + this->FillProjectMap(); + + if ( !this->CMakeInstance->GetScriptMode() ) + { + this->CMakeInstance->UpdateProgress("Configuring done", -1); + } +} + +bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() +{ + // If the property is not enabled then okay. + if(!this->CMakeInstance + ->GetPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS")) + { + return true; + } + + // This generator does not support duplicate custom targets. + cmOStringStream e; + e << "This project has enabled the ALLOW_DUPLICATE_CUSTOM_TARGETS " + << "global property. " + << "The \"" << this->GetName() << "\" generator does not support " + << "duplicate custom targets. " + << "Consider using a Makefiles generator or fix the project to not " + << "use duplicat target names."; + cmSystemTools::Error(e.str().c_str()); + return false; +} + +void cmGlobalGenerator::Generate() +{ + // Some generators track files replaced during the Generate. + // Start with an empty vector: + this->FilesReplacedDuringGenerate.clear(); + + // Check whether this generator is allowed to run. + if(!this->CheckALLOW_DUPLICATE_CUSTOM_TARGETS()) + { + return; + } + + // For each existing cmLocalGenerator + unsigned int i; + + // Consolidate global targets + cmTargets globalTargets; + this->CreateDefaultGlobalTargets(&globalTargets); + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmTargets* targets = + &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); + cmTargets::iterator tarIt; + for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt ) + { + if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET ) + { + globalTargets[tarIt->first] = tarIt->second; + } + } + } + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); + cmTargets* targets = &(mf->GetTargets()); + cmTargets::iterator tit; + for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit ) + { + (*targets)[tit->first] = tit->second; + (*targets)[tit->first].SetMakefile(mf); + } + } + + // Add generator specific helper commands + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + this->LocalGenerators[i]->AddHelperCommands(); + } + + // Trace the dependencies, after that no custom commands should be added + // because their dependencies might not be handled correctly + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + this->LocalGenerators[i]->TraceDependencies(); + } + + // Compute the manifest of main targets generated. + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + this->LocalGenerators[i]->GenerateTargetManifest(); + } + + // Compute the inter-target dependencies. + { + cmComputeTargetDepends ctd(this); + ctd.Compute(); + std::vector const& targets = ctd.GetTargets(); + for(std::vector::const_iterator ti = targets.begin(); + ti != targets.end(); ++ti) + { + ctd.GetTargetDirectDepends(*ti, this->TargetDependencies[*ti]); + } + } + + // Create a map from local generator to the complete set of targets + // it builds by default. + this->FillLocalGeneratorToTargetMap(); + + // Generate project files + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + this->SetCurrentLocalGenerator(this->LocalGenerators[i]); + this->LocalGenerators[i]->Generate(); + this->LocalGenerators[i]->GenerateInstallRules(); + this->LocalGenerators[i]->GenerateTestFiles(); + this->CMakeInstance->UpdateProgress("Generating", + (i+1.0f)/this->LocalGenerators.size()); + } + this->SetCurrentLocalGenerator(0); + + if (this->ExtraGenerator != 0) + { + this->ExtraGenerator->Generate(); + } + + this->CMakeInstance->UpdateProgress("Generating done", -1); +} + +void cmGlobalGenerator::CheckLocalGenerators() +{ + std::map notFoundMap; +// std::set notFoundMap; + // after it is all done do a ConfigureFinalPass + cmCacheManager* manager = 0; + for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + { + manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager(); + this->LocalGenerators[i]->ConfigureFinalPass(); + const cmTargets & targets = + this->LocalGenerators[i]->GetMakefile()->GetTargets(); + for (cmTargets::const_iterator l = targets.begin(); + l != targets.end(); l++) + { + const cmTarget::LinkLibraryVectorType& libs=l->second.GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator lib = libs.begin(); + lib != libs.end(); ++lib) + { + if(lib->first.size() > 9 && + cmSystemTools::IsNOTFOUND(lib->first.c_str())) + { + std::string varName = lib->first.substr(0, lib->first.size()-9); + cmCacheManager::CacheIterator it = + manager->GetCacheIterator(varName.c_str()); + if(it.GetPropertyAsBool("ADVANCED")) + { + varName += " (ADVANCED)"; + } + std::string text = notFoundMap[varName]; + text += "\n linked by target \""; + text += l->second.GetName(); + text += "\" in directory "; + text+=this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory(); + notFoundMap[varName] = text; + } + } + } + const std::vector& incs = + this->LocalGenerators[i]->GetMakefile()->GetIncludeDirectories(); + + for( std::vector::const_iterator incDir = incs.begin(); + incDir != incs.end(); ++incDir) + { + if(incDir->size() > 9 && + cmSystemTools::IsNOTFOUND(incDir->c_str())) + { + std::string varName = incDir->substr(0, incDir->size()-9); + cmCacheManager::CacheIterator it = + manager->GetCacheIterator(varName.c_str()); + if(it.GetPropertyAsBool("ADVANCED")) + { + varName += " (ADVANCED)"; + } + std::string text = notFoundMap[varName]; + text += "\n used as include directory in directory "; + text += this->LocalGenerators[i]->GetMakefile()->GetCurrentDirectory(); + notFoundMap[varName] = text; + } + } + this->CMakeInstance->UpdateProgress + ("Configuring", 0.9f+0.1f*(i+1.0f)/this->LocalGenerators.size()); + } + + if(notFoundMap.size()) + { + std::string notFoundVars; + for(std::map::const_iterator + ii = notFoundMap.begin(); + ii != notFoundMap.end(); + ++ii) + { + notFoundVars += ii->first; + notFoundVars += ii->second; + notFoundVars += "\n"; + } + cmSystemTools::Error("The following variables are used in this project, " + "but they are set to NOTFOUND.\n" + "Please set them or make sure they are set and " + "tested correctly in the CMake files:\n", + notFoundVars.c_str()); + } +} + +int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir, + const char *projectName, + const char *target, + std::string *output, cmMakefile *mf) +{ + // if this is not set, then this is a first time configure + // and there is a good chance that the try compile stuff will + // take the bulk of the time, so try and guess some progress + // by getting closer and closer to 100 without actually getting there. + if (!this->CMakeInstance->GetCacheManager()->GetCacheValue + ("CMAKE_NUMBER_OF_LOCAL_GENERATORS")) + { + // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set + // we are in the first time progress and we have no + // idea how long it will be. So, just move 1/10th of the way + // there each time, and don't go over 95% + this->FirstTimeProgress += ((1.0f - this->FirstTimeProgress) /30.0f); + if(this->FirstTimeProgress > 0.95f) + { + this->FirstTimeProgress = 0.95f; + } + this->CMakeInstance->UpdateProgress("Configuring", + this->FirstTimeProgress); + } + + std::string makeCommand = this->CMakeInstance-> + GetCacheManager()->GetCacheValue("CMAKE_MAKE_PROGRAM"); + if(makeCommand.size() == 0) + { + cmSystemTools::Error( + "Generator cannot find the appropriate make command."); + return 1; + } + + std::string newTarget; + if (target && strlen(target)) + { + newTarget += target; +#if 0 +#if defined(_WIN32) || defined(__CYGWIN__) + std::string tmp = target; + // if the target does not already end in . something + // then assume .exe + if(tmp.size() < 4 || tmp[tmp.size()-4] != '.') + { + newTarget += ".exe"; + } +#endif // WIN32 +#endif + } + const char* config = mf->GetDefinition("CMAKE_TRY_COMPILE_CONFIGURATION"); + return this->Build(srcdir,bindir,projectName, + newTarget.c_str(), + output,makeCommand.c_str(),config,false,true, + this->TryCompileTimeout); +} + +std::string cmGlobalGenerator +::GenerateBuildCommand(const char* makeProgram, const char *projectName, + const char* additionalOptions, const char *targetName, + const char* config, bool ignoreErrors, bool) +{ + // Project name and config are not used yet. + (void)projectName; + (void)config; + + std::string makeCommand = + cmSystemTools::ConvertToUnixOutputPath(makeProgram); + + // Since we have full control over the invocation of nmake, let us + // make it quiet. + if ( strcmp(this->GetName(), "NMake Makefiles") == 0 ) + { + makeCommand += " /NOLOGO "; + } + if ( ignoreErrors ) + { + makeCommand += " -i"; + } + if ( additionalOptions ) + { + makeCommand += " "; + makeCommand += additionalOptions; + } + if ( targetName ) + { + makeCommand += " "; + makeCommand += targetName; + } + return makeCommand; +} + +int cmGlobalGenerator::Build( + const char *, const char *bindir, + const char *projectName, const char *target, + std::string *output, + const char *makeCommandCSTR, + const char *config, + bool clean, bool fast, + double timeout) +{ + /** + * Run an executable command and put the stdout in output. + */ + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(bindir); + if(output) + { + *output += "Change Dir: "; + *output += bindir; + *output += "\n"; + } + + int retVal; + bool hideconsole = cmSystemTools::GetRunCommandHideConsole(); + cmSystemTools::SetRunCommandHideConsole(true); + std::string outputBuffer; + std::string* outputPtr = 0; + if(output) + { + outputPtr = &outputBuffer; + } + + // should we do a clean first? + if (clean) + { + std::string cleanCommand = + this->GenerateBuildCommand(makeCommandCSTR, projectName, + 0, "clean", config, false, fast); + if(output) + { + *output += "\nRun Clean Command:"; + *output += cleanCommand; + *output += "\n"; + } + + if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), outputPtr, + &retVal, 0, false, timeout)) + { + cmSystemTools::SetRunCommandHideConsole(hideconsole); + cmSystemTools::Error("Generator: execution of make clean failed."); + if (output) + { + *output += *outputPtr; + *output += "\nGenerator: execution of make clean failed.\n"; + } + + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + if (output) + { + *output += *outputPtr; + } + } + + // now build + std::string makeCommand = + this->GenerateBuildCommand(makeCommandCSTR, projectName, + 0, target, config, false, fast); + if(output) + { + *output += "\nRun Build Command:"; + *output += makeCommand; + *output += "\n"; + } + + if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), outputPtr, + &retVal, 0, false, timeout)) + { + cmSystemTools::SetRunCommandHideConsole(hideconsole); + cmSystemTools::Error + ("Generator: execution of make failed. Make command was: ", + makeCommand.c_str()); + if (output) + { + *output += *outputPtr; + *output += "\nGenerator: execution of make failed. Make command was: " + + makeCommand + "\n"; + } + + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + if (output) + { + *output += *outputPtr; + } + cmSystemTools::SetRunCommandHideConsole(hideconsole); + + // The SGI MipsPro 7.3 compiler does not return an error code when + // the source has a #error in it! This is a work-around for such + // compilers. + if((retVal == 0) && (output->find("#error") != std::string::npos)) + { + retVal = 1; + } + + cmSystemTools::ChangeDirectory(cwd.c_str()); + return retVal; +} + +void cmGlobalGenerator::AddLocalGenerator(cmLocalGenerator *lg) +{ + this->LocalGenerators.push_back(lg); + + // update progress + // estimate how many lg there will be + const char *numGenC = + this->CMakeInstance->GetCacheManager()->GetCacheValue + ("CMAKE_NUMBER_OF_LOCAL_GENERATORS"); + + if (!numGenC) + { + // If CMAKE_NUMBER_OF_LOCAL_GENERATORS is not set + // we are in the first time progress and we have no + // idea how long it will be. So, just move half way + // there each time, and don't go over 95% + this->FirstTimeProgress += ((1.0f - this->FirstTimeProgress) /30.0f); + if(this->FirstTimeProgress > 0.95f) + { + this->FirstTimeProgress = 0.95f; + } + this->CMakeInstance->UpdateProgress("Configuring", + this->FirstTimeProgress); + return; + } + + int numGen = atoi(numGenC); + float prog = 0.9f*this->LocalGenerators.size()/numGen; + if (prog > 0.9f) + { + prog = 0.9f; + } + this->CMakeInstance->UpdateProgress("Configuring", prog); +} + +void cmGlobalGenerator::AddInstallComponent(const char* component) +{ + if(component && *component) + { + this->InstallComponents.insert(component); + } +} + +void cmGlobalGenerator::AddTargetToExports(const char* exportSetName, + cmTarget* target, + cmInstallTargetGenerator* archive, + cmInstallTargetGenerator* runTime, + cmInstallTargetGenerator* library, + cmInstallTargetGenerator* framework, + cmInstallTargetGenerator* bundle, + cmInstallFilesGenerator* headers) +{ + if ((exportSetName) && (*exportSetName) && (target)) + { + cmTargetExport* te = new cmTargetExport(target, archive, runTime, library, + framework, bundle, headers); + this->ExportSets[exportSetName].push_back(te); + } +} + +const std::vector* cmGlobalGenerator::GetExportSet( + const char* name) const +{ + std::map >::const_iterator + exportSetIt = this->ExportSets.find(name); + if (exportSetIt != this->ExportSets.end()) + { + return &exportSetIt->second; + } + + return 0; +} + + +void cmGlobalGenerator::EnableInstallTarget() +{ + this->InstallTargetEnabled = true; +} + +cmLocalGenerator *cmGlobalGenerator::CreateLocalGenerator() +{ + cmLocalGenerator *lg = new cmLocalGenerator; + lg->SetGlobalGenerator(this); + return lg; +} + +void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen ) +{ + std::string cfp = gen->GetCMakeInstance()->GetHomeOutputDirectory(); + cfp += cmake::GetCMakeFilesDirectory(); + this->SetConfiguredFilesPath(cfp.c_str()); + const char* make = + gen->GetCMakeInstance()->GetCacheDefinition("CMAKE_MAKE_PROGRAM"); + this->GetCMakeInstance()->AddCacheEntry("CMAKE_MAKE_PROGRAM", make, + "make program", + cmCacheManager::FILEPATH); + // copy the enabled languages + this->LanguageEnabled = gen->LanguageEnabled; + this->ExtensionToLanguage = gen->ExtensionToLanguage; + this->IgnoreExtensions = gen->IgnoreExtensions; + this->LanguageToOutputExtension = gen->LanguageToOutputExtension; + this->LanguageToLinkerPreference = gen->LanguageToLinkerPreference; + this->OutputExtensions = gen->OutputExtensions; +} + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = ""; + entry.Full = ""; +} + +bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, + cmLocalGenerator* gen) +{ + if(!gen || gen == root) + { + // No directory excludes itself. + return false; + } + + if(gen->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + // This directory is excluded from its parent. + return true; + } + + // This directory is included in its parent. Check whether the + // parent is excluded. + return this->IsExcluded(root, gen->GetParent()); +} + +bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, + cmTarget& target) +{ + if(target.GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + // This target is excluded from its directory. + return true; + } + else + { + // This target is included in its directory. Check whether the + // directory is excluded. + return this->IsExcluded(root, target.GetMakefile()->GetLocalGenerator()); + } +} + +void cmGlobalGenerator::GetEnabledLanguages(std::vector& lang) +{ + for(std::map::iterator i = + this->LanguageEnabled.begin(); i != this->LanguageEnabled.end(); ++i) + { + lang.push_back(i->first); + } +} + +int cmGlobalGenerator::GetLinkerPreference(const char* lang) +{ + std::map::const_iterator it = + this->LanguageToLinkerPreference.find(lang); + if (it != this->LanguageToLinkerPreference.end()) + { + return it->second; + } + return 0; +} + +void cmGlobalGenerator::FillProjectMap() +{ + this->ProjectMap.clear(); // make sure we start with a clean map + unsigned int i; + for(i = 0; i < this->LocalGenerators.size(); ++i) + { + // for each local generator add all projects + cmLocalGenerator *lg = this->LocalGenerators[i]; + std::string name; + do + { + if (name != lg->GetMakefile()->GetProjectName()) + { + name = lg->GetMakefile()->GetProjectName(); + this->ProjectMap[name].push_back(this->LocalGenerators[i]); + } + lg = lg->GetParent(); + } + while (lg); + } +} + + +// Build a map that contains a the set of targets used by each local +// generator directory level. +void cmGlobalGenerator::FillLocalGeneratorToTargetMap() +{ + this->LocalGeneratorToTargetMap.clear(); + // Loop over all targets in all local generators. + for(std::vector::const_iterator + lgi = this->LocalGenerators.begin(); + lgi != this->LocalGenerators.end(); ++lgi) + { + cmLocalGenerator* lg = *lgi; + cmMakefile* mf = lg->GetMakefile(); + cmTargets& targets = mf->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + cmTarget& target = t->second; + + // Consider the directory containing the target and all its + // parents until something excludes the target. + for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, target); + clg = clg->GetParent()) + { + // This local generator includes the target. + std::set& targetSet = + this->LocalGeneratorToTargetMap[clg]; + targetSet.insert(&target); + + // Add dependencies of the included target. An excluded + // target may still be included if it is a dependency of a + // non-excluded target. + TargetDependSet & tgtdeps = this->GetTargetDirectDepends(target); + for(TargetDependSet::const_iterator ti = tgtdeps.begin(); + ti != tgtdeps.end(); ++ti) + { + targetSet.insert(*ti); + } + } + } + } +} + + +///! Find a local generator by its startdirectory +cmLocalGenerator* cmGlobalGenerator::FindLocalGenerator(const char* start_dir) +{ + std::vector* gens = &this->LocalGenerators; + for(unsigned int i = 0; i < gens->size(); ++i) + { + std::string sd = (*gens)[i]->GetMakefile()->GetStartDirectory(); + if (sd == start_dir) + { + return (*gens)[i]; + } + } + return 0; +} + + +//---------------------------------------------------------------------------- +cmTarget* +cmGlobalGenerator::FindTarget(const char* project, const char* name) +{ + // if project specific + if(project) + { + std::vector* gens = &this->ProjectMap[project]; + for(unsigned int i = 0; i < gens->size(); ++i) + { + cmTarget* ret = (*gens)[i]->GetMakefile()->FindTarget(name); + if(ret) + { + return ret; + } + } + } + // if all projects/directories + else + { + std::map::iterator i = + this->TotalTargets.find ( name ); + if ( i != this->TotalTargets.end() ) + { + return i->second; + } + } + return 0; +} + +//---------------------------------------------------------------------------- +bool cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) +{ + if(cmSystemTools::IsPathToFramework(libname.c_str())) + { + return true; + } + + if(cmTarget* tgt = this->FindTarget(0, libname.c_str())) + { + if(tgt->IsFrameworkOnApple()) + { + return true; + } + } + + return false; +} + +//---------------------------------------------------------------------------- +inline std::string removeQuotes(const std::string& s) +{ + if(s[0] == '\"' && s[s.size()-1] == '\"') + { + return s.substr(1, s.size()-2); + } + return s; +} + +void cmGlobalGenerator::SetCMakeInstance(cmake* cm) +{ + // Store a pointer to the cmake object instance. + this->CMakeInstance = cm; +} + +void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets) +{ + cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); + const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory(); + const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND"); + + // CPack + cmCustomCommandLines cpackCommandLines; + std::vector depends; + cmCustomCommandLine singleLine; + singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand()); + if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' ) + { + singleLine.push_back("-C"); + singleLine.push_back(cmakeCfgIntDir); + } + singleLine.push_back("--config"); + std::string configFile = mf->GetStartOutputDirectory();; + configFile += "/CPackConfig.cmake"; + singleLine.push_back(configFile); + cpackCommandLines.push_back(singleLine); + if ( this->GetPreinstallTargetName() ) + { + depends.push_back("preinstall"); + } + else + { + const char* noPackageAll = + mf->GetDefinition("CMAKE_SKIP_PACKAGE_ALL_DEPENDENCY"); + if(!noPackageAll || cmSystemTools::IsOff(noPackageAll)) + { + depends.push_back(this->GetAllTargetName()); + } + } + if(cmSystemTools::FileExists(configFile.c_str())) + { + (*targets)[this->GetPackageTargetName()] + = this->CreateGlobalTarget(this->GetPackageTargetName(), + "Run CPack packaging tool...", + &cpackCommandLines, depends); + } + // CPack source + const char* packageSourceTargetName = this->GetPackageSourceTargetName(); + if ( packageSourceTargetName ) + { + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + singleLine.push_back(this->GetCMakeInstance()->GetCPackCommand()); + singleLine.push_back("--config"); + configFile = mf->GetStartOutputDirectory();; + configFile += "/CPackSourceConfig.cmake"; + if(cmSystemTools::FileExists(configFile.c_str())) + { + singleLine.push_back(configFile); + cpackCommandLines.push_back(singleLine); + (*targets)[packageSourceTargetName] + = this->CreateGlobalTarget(packageSourceTargetName, + "Run CPack packaging tool for source...", + &cpackCommandLines, depends); + } + } + + // Test + if(mf->IsOn("CMAKE_TESTING_ENABLED")) + { + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + singleLine.push_back(this->GetCMakeInstance()->GetCTestCommand()); + singleLine.push_back("--force-new-ctest-process"); + if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') + { + singleLine.push_back("-C"); + singleLine.push_back(cmakeCfgIntDir); + } + else // TODO: This is a hack. Should be something to do with the generator + { + singleLine.push_back("$(ARGS)"); + } + cpackCommandLines.push_back(singleLine); + (*targets)[this->GetTestTargetName()] + = this->CreateGlobalTarget(this->GetTestTargetName(), + "Running tests...", &cpackCommandLines, depends); + } + + //Edit Cache + const char* editCacheTargetName = this->GetEditCacheTargetName(); + if ( editCacheTargetName ) + { + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + + // Use CMAKE_EDIT_COMMAND for the edit_cache rule if it is defined. + // Otherwise default to the interactive command-line interface. + if(mf->GetDefinition("CMAKE_EDIT_COMMAND")) + { + singleLine.push_back(mf->GetDefinition("CMAKE_EDIT_COMMAND")); + singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); + singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); + cpackCommandLines.push_back(singleLine); + (*targets)[editCacheTargetName] = + this->CreateGlobalTarget( + editCacheTargetName, "Running CMake cache editor...", + &cpackCommandLines, depends); + } + else + { + singleLine.push_back(cmakeCommand); + singleLine.push_back("-i"); + singleLine.push_back("."); + cpackCommandLines.push_back(singleLine); + (*targets)[editCacheTargetName] = + this->CreateGlobalTarget( + editCacheTargetName, + "Running interactive CMake command-line interface...", + &cpackCommandLines, depends); + } + } + + //Rebuild Cache + const char* rebuildCacheTargetName = this->GetRebuildCacheTargetName(); + if ( rebuildCacheTargetName ) + { + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + singleLine.push_back(cmakeCommand); + singleLine.push_back("-H$(CMAKE_SOURCE_DIR)"); + singleLine.push_back("-B$(CMAKE_BINARY_DIR)"); + cpackCommandLines.push_back(singleLine); + (*targets)[rebuildCacheTargetName] = + this->CreateGlobalTarget( + rebuildCacheTargetName, "Running CMake to regenerate build system...", + &cpackCommandLines, depends); + } + + //Install + if(this->InstallTargetEnabled) + { + if(!cmakeCfgIntDir || !*cmakeCfgIntDir || cmakeCfgIntDir[0] == '.') + { + std::set* componentsSet = &this->InstallComponents; + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + depends.erase(depends.begin(), depends.end()); + cmOStringStream ostr; + if ( componentsSet->size() > 0 ) + { + ostr << "Available install components are:"; + std::set::iterator it; + for ( + it = componentsSet->begin(); + it != componentsSet->end(); + ++ it ) + { + ostr << " \"" << it->c_str() << "\""; + } + } + else + { + ostr << "Only default component available"; + } + singleLine.push_back(ostr.str().c_str()); + (*targets)["list_install_components"] + = this->CreateGlobalTarget("list_install_components", + ostr.str().c_str(), + &cpackCommandLines, depends); + } + std::string cmd; + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + singleLine.erase(singleLine.begin(), singleLine.end()); + depends.erase(depends.begin(), depends.end()); + if ( this->GetPreinstallTargetName() ) + { + depends.push_back(this->GetPreinstallTargetName()); + } + else + { + const char* noall = + mf->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"); + if(!noall || cmSystemTools::IsOff(noall)) + { + depends.push_back(this->GetAllTargetName()); + } + } + if(mf->GetDefinition("CMake_BINARY_DIR")) + { + // We are building CMake itself. We cannot use the original + // executable to install over itself. + cmd = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + if(cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.') + { + cmd += "/"; + cmd += cmakeCfgIntDir; + } + cmd += "/cmake"; + } + else + { + cmd = cmakeCommand; + } + singleLine.push_back(cmd.c_str()); + if ( cmakeCfgIntDir && *cmakeCfgIntDir && cmakeCfgIntDir[0] != '.' ) + { + std::string cfgArg = "-DBUILD_TYPE="; + cfgArg += mf->GetDefinition("CMAKE_CFG_INTDIR"); + singleLine.push_back(cfgArg); + } + singleLine.push_back("-P"); + singleLine.push_back("cmake_install.cmake"); + cpackCommandLines.push_back(singleLine); + (*targets)[this->GetInstallTargetName()] = + this->CreateGlobalTarget( + this->GetInstallTargetName(), "Install the project...", + &cpackCommandLines, depends); + + // install_local + if(const char* install_local = this->GetInstallLocalTargetName()) + { + cmCustomCommandLine localCmdLine = singleLine; + + localCmdLine.insert(localCmdLine.begin()+1, + "-DCMAKE_INSTALL_LOCAL_ONLY=1"); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + cpackCommandLines.push_back(localCmdLine); + + (*targets)[install_local] = + this->CreateGlobalTarget( + install_local, "Installing only the local directory...", + &cpackCommandLines, depends); + } + + // install_strip + const char* install_strip = this->GetInstallStripTargetName(); + if((install_strip !=0) && (mf->IsSet("CMAKE_STRIP"))) + { + cmCustomCommandLine stripCmdLine = singleLine; + + stripCmdLine.insert(stripCmdLine.begin()+1,"-DCMAKE_INSTALL_DO_STRIP=1"); + cpackCommandLines.erase(cpackCommandLines.begin(), + cpackCommandLines.end()); + cpackCommandLines.push_back(stripCmdLine); + + (*targets)[install_strip] = + this->CreateGlobalTarget( + install_strip, "Installing the project stripped...", + &cpackCommandLines, depends); + } + } +} + +cmTarget cmGlobalGenerator::CreateGlobalTarget( + const char* name, const char* message, + const cmCustomCommandLines* commandLines, + std::vector depends, + bool depends_on_all /* = false */) +{ + // Package + cmTarget target; + target.GetProperties().SetCMakeInstance(this->CMakeInstance); + target.SetType(cmTarget::GLOBAL_TARGET, name); + target.SetProperty("EXCLUDE_FROM_ALL","TRUE"); + + std::vector no_outputs; + std::vector no_depends; + // Store the custom command in the target. + cmCustomCommand cc(no_outputs, no_depends, *commandLines, 0, 0); + target.GetPostBuildCommands().push_back(cc); + target.SetProperty("EchoString", message); + if ( depends_on_all ) + { + target.AddUtility("all"); + } + std::vector::iterator dit; + for ( dit = depends.begin(); dit != depends.end(); ++ dit ) + { + target.AddUtility(dit->c_str()); + } + return target; +} + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::AppendDirectoryForConfig(const char*, const char*, + const char*, std::string&) +{ + // Subclasses that support multiple configurations should implement + // this method to append the subdirectory for the given build + // configuration. +} + +//---------------------------------------------------------------------------- +cmGlobalGenerator::TargetDependSet & +cmGlobalGenerator::GetTargetDirectDepends(cmTarget & target) +{ + return this->TargetDependencies[&target]; +} + +void cmGlobalGenerator::AddTarget(cmTargets::value_type &v) +{ + assert(!v.second.IsImported()); + this->TotalTargets[v.first] = &v.second; +} + +void cmGlobalGenerator::SetExternalMakefileProjectGenerator( + cmExternalMakefileProjectGenerator *extraGenerator) +{ + this->ExtraGenerator = extraGenerator; + if (this->ExtraGenerator!=0) + { + this->ExtraGenerator->SetGlobalGenerator(this); + } +} + +const char* cmGlobalGenerator::GetExtraGeneratorName() const +{ + return this->ExtraGenerator==0 ? 0 : this->ExtraGenerator->GetName(); +} + +void cmGlobalGenerator::FileReplacedDuringGenerate(const std::string& filename) +{ + this->FilesReplacedDuringGenerate.push_back(filename); +} + +void +cmGlobalGenerator +::GetFilesReplacedDuringGenerate(std::vector& filenames) +{ + filenames.clear(); + std::copy( + this->FilesReplacedDuringGenerate.begin(), + this->FilesReplacedDuringGenerate.end(), + std::back_inserter(filenames)); +} + +void +cmGlobalGenerator +::GetTargetSets(cmGlobalGenerator::TargetDependSet& projectTargets, + cmGlobalGenerator::TargetDependSet& originalTargets, + cmLocalGenerator* root, + std::vector const& generators) +{ + // loop over all local generators + for(std::vector::const_iterator i = generators.begin(); + i != generators.end(); ++i) + { + // check to make sure generator is not excluded + if(this->IsExcluded(root, *i)) + { + continue; + } + cmMakefile* mf = (*i)->GetMakefile(); + // Get the targets in the makefile + cmTargets &tgts = mf->GetTargets(); + // loop over all the targets + for (cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + cmTarget* target = &l->second; + // put the target in the set of original targets + originalTargets.insert(target); + // Get the set of targets that depend on target + this->AddTargetDepends(target, + projectTargets); + } + } +} + +void +cmGlobalGenerator::AddTargetDepends(cmTarget* target, + cmGlobalGenerator::TargetDependSet& + projectTargets) +{ + // add the target itself + projectTargets.insert(target); + // get the direct depends of target + cmGlobalGenerator::TargetDependSet const& tset + = this->GetTargetDirectDepends(*target); + if(tset.size()) + { + // if there are targets that depend on target + // add them and their depends as well + for(cmGlobalGenerator::TargetDependSet::const_iterator i = + tset.begin(); i != tset.end(); ++i) + { + cmTarget* dtarget = *i; + this->AddTargetDepends(dtarget, projectTargets); + } + } +} + + +//---------------------------------------------------------------------------- +void cmGlobalGenerator::AddToManifest(const char* config, + std::string const& f) +{ + // Add to the main manifest for this configuration. + this->TargetManifest[config].insert(f); + + // Add to the content listing for the file's directory. + std::string dir = cmSystemTools::GetFilenamePath(f); + std::string file = cmSystemTools::GetFilenameName(f); + this->DirectoryContentMap[dir].insert(file); +} + +//---------------------------------------------------------------------------- +std::set const& +cmGlobalGenerator::GetDirectoryContent(std::string const& dir, bool needDisk) +{ + DirectoryContent& dc = this->DirectoryContentMap[dir]; + if(needDisk && !dc.LoadedFromDisk) + { + // Load the directory content from disk. + cmsys::Directory d; + if(d.Load(dir.c_str())) + { + unsigned long n = d.GetNumberOfFiles(); + for(unsigned long i = 0; i < n; ++i) + { + const char* f = d.GetFile(i); + if(strcmp(f, ".") != 0 && strcmp(f, "..") != 0) + { + dc.insert(f); + } + } + } + dc.LoadedFromDisk = true; + } + return dc; +} + diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h new file mode 100644 index 000000000..a0bea8dfb --- /dev/null +++ b/Source/cmGlobalGenerator.h @@ -0,0 +1,334 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-14 21:42:29 $ + Version: $Revision: 1.107 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmGlobalGenerator_h +#define cmGlobalGenerator_h + +#include "cmStandardIncludes.h" + +#include "cmTarget.h" // For cmTargets + +class cmake; +class cmMakefile; +class cmLocalGenerator; +class cmExternalMakefileProjectGenerator; +class cmTarget; +class cmTargetExport; +class cmInstallTargetGenerator; +class cmInstallFilesGenerator; + +/** \class cmGlobalGenerator + * \brief Responable for overseeing the generation process for the entire tree + * + * Subclasses of this class generate makefiles for various + * platforms. + */ +class cmGlobalGenerator +{ +public: + ///! Free any memory allocated with the GlobalGenerator + cmGlobalGenerator(); + virtual ~cmGlobalGenerator(); + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + ///! Get the name for this generator + virtual const char *GetName() const { return "Generic"; }; + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + /** + * Create LocalGenerators and process the CMakeLists files. This does not + * actually produce any makefiles, DSPs, etc. + */ + virtual void Configure(); + + /** + * Generate the all required files for building this project/tree. This + * basically creates a series of LocalGenerators for each directory and + * requests that they Generate. + */ + virtual void Generate(); + + /** + * Set/Get and Clear the enabled languages. + */ + void SetLanguageEnabled(const char*, cmMakefile* mf); + bool GetLanguageEnabled(const char*) const; + void ClearEnabledLanguages(); + void GetEnabledLanguages(std::vector& lang); + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + + /** + * Try to determine system infomation, get it from another generator + */ + virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen); + + /** + * Try running cmake and building a file. This is used for dynalically + * loaded commands, not as part of the usual build process. + */ + virtual int TryCompile(const char *srcdir, const char *bindir, + const char *projectName, const char *targetName, + std::string *output, cmMakefile* mf); + + + /** + * Build a file given the following information. This is a more direct call + * that is used by both CTest and TryCompile. If target name is NULL or + * empty then all is assumed. clean indicates if a "make clean" should be + * done first. + */ + virtual int Build(const char *srcdir, const char *bindir, + const char *projectName, const char *targetName, + std::string *output, + const char *makeProgram, const char *config, + bool clean, bool fast, + double timeout); + virtual std::string GenerateBuildCommand + (const char* makeProgram, + const char *projectName, const char* additionalOptions, + const char *targetName, + const char* config, bool ignoreErrors, bool fast); + + + ///! Set the CMake instance + void SetCMakeInstance(cmake *cm); + + ///! Get the CMake instance + cmake *GetCMakeInstance() { return this->CMakeInstance; }; + + void SetConfiguredFilesPath(const char* s){this->ConfiguredFilesPath = s;} + const std::vector& GetLocalGenerators() const { + return this->LocalGenerators;} + + cmLocalGenerator* GetCurrentLocalGenerator() + {return this->CurrentLocalGenerator;} + + void SetCurrentLocalGenerator(cmLocalGenerator* lg) + {this->CurrentLocalGenerator = lg;} + + void AddLocalGenerator(cmLocalGenerator *lg); + + ///! Set an generator for an "external makefile based project" + void SetExternalMakefileProjectGenerator( + cmExternalMakefileProjectGenerator *extraGenerator); + + const char* GetExtraGeneratorName() const; + + void AddInstallComponent(const char* component); + + ///! Add one installed target to the sets of the exports + void AddTargetToExports(const char* exportSet, cmTarget* target, + cmInstallTargetGenerator* archive, + cmInstallTargetGenerator* runTime, + cmInstallTargetGenerator* library, + cmInstallTargetGenerator* framework, + cmInstallTargetGenerator* bundle, + cmInstallFilesGenerator* publicHeaders); + ///! Get the export target set with the given name + const std::vector* GetExportSet(const char* name) const; + + /** Add a file to the manifest of generated targets for a configuration. */ + void AddToManifest(const char* config, std::string const& f); + + void EnableInstallTarget(); + + int TryCompileTimeout; + + bool GetForceUnixPaths() {return this->ForceUnixPaths;} + bool GetToolSupportsColor() { return this->ToolSupportsColor; } + void SetToolSupportsColor(bool enable) { this->ToolSupportsColor = enable; } + + ///! return the language for the given extension + const char* GetLanguageFromExtension(const char* ext); + ///! is an extension to be ignored + bool IgnoreFile(const char* ext); + ///! What is the preference for linkers and this language (None or Prefered) + int GetLinkerPreference(const char* lang); + ///! What is the object file extension for a given source file? + const char* GetLanguageOutputExtension(cmSourceFile const&); + + ///! What is the configurations directory variable called? + virtual const char* GetCMakeCFGInitDirectory() { return "."; } + + /** Get whether the generator should use a script for link commands. */ + bool GetUseLinkScript() { return this->UseLinkScript; } + + /** Get whether the generator should produce special marks on rules + producing symbolic (non-file) outputs. */ + bool GetNeedSymbolicMark() { return this->NeedSymbolicMark; } + + /* + * Determine what program to use for building the project. + */ + void FindMakeProgram(cmMakefile*); + + ///! Find a target by name by searching the local generators. + cmTarget* FindTarget(const char* project, const char* name); + + /** Determine if a name resolves to a framework on disk or a built target + that is a framework. */ + bool NameResolvesToFramework(const std::string& libname); + + /** If check to see if the target is linked to by any other + target in the project */ + bool IsDependedOn(const char* project, cmTarget* target); + ///! Find a local generator by its startdirectory + cmLocalGenerator* FindLocalGenerator(const char* start_dir); + + /** Append the subdirectory for the given configuration. If anything is + appended the given prefix and suffix will be appended around it, which + is useful for leading or trailing slashes. */ + virtual void AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir); + + /** Get the manifest of all targets that will be built for each + configuration. This is valid during generation only. */ + cmTargetManifest const& GetTargetManifest() { return this->TargetManifest; } + + /** Get the content of a directory on disk including the target + files to be generated. This may be called only during the + generation step. It is intended for use only by + cmComputeLinkInformation. */ + std::set const& GetDirectoryContent(std::string const& dir, + bool needDisk); + + void AddTarget(cmTargets::value_type &v); + + virtual const char* GetAllTargetName() { return "ALL_BUILD"; } + virtual const char* GetInstallTargetName() { return "INSTALL"; } + virtual const char* GetInstallLocalTargetName() { return 0; } + virtual const char* GetInstallStripTargetName() { return 0; } + virtual const char* GetPreinstallTargetName() { return 0; } + virtual const char* GetTestTargetName() { return "RUN_TESTS"; } + virtual const char* GetPackageTargetName() { return "PACKAGE"; } + virtual const char* GetPackageSourceTargetName(){ return 0; } + virtual const char* GetEditCacheTargetName() { return 0; } + virtual const char* GetRebuildCacheTargetName() { return 0; } + virtual const char* GetCleanTargetName() { return 0; } + + // Class to track a set of dependencies. + class TargetDependSet: public std::set {}; + + // what targets does the specified target depend on directly + // via a target_link_libraries or add_dependencies + TargetDependSet & GetTargetDirectDepends(cmTarget & target); + + const std::map >& GetProjectMap() + const {return this->ProjectMap;} + + // track files replaced during a Generate + void FileReplacedDuringGenerate(const std::string& filename); + void GetFilesReplacedDuringGenerate(std::vector& filenames); + +protected: + // for a project collect all its targets by following depend + // information, and also collect all the targets + void GetTargetSets(cmGlobalGenerator::TargetDependSet& projectTargets, + cmGlobalGenerator::TargetDependSet& originalTargets, + cmLocalGenerator* root, + std::vector const& generators); + void AddTargetDepends(cmTarget* target, + cmGlobalGenerator::TargetDependSet& + projectTargets); + void SetLanguageEnabledFlag(const char* l, cmMakefile* mf); + void SetLanguageEnabledMaps(const char* l, cmMakefile* mf); + + virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS(); + + // Fill the ProjectMap, this must be called after LocalGenerators + // has been populated. + void FillProjectMap(); + void CheckLocalGenerators(); + bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen); + bool IsExcluded(cmLocalGenerator* root, cmTarget& target); + void FillLocalGeneratorToTargetMap(); + void CreateDefaultGlobalTargets(cmTargets* targets); + cmTarget CreateGlobalTarget(const char* name, const char* message, + const cmCustomCommandLines* commandLines, + std::vector depends, bool depends_on_all = false); + + bool NeedSymbolicMark; + bool UseLinkScript; + bool ForceUnixPaths; + bool ToolSupportsColor; + cmStdString FindMakeProgramFile; + cmStdString ConfiguredFilesPath; + cmake *CMakeInstance; + std::vector LocalGenerators; + cmLocalGenerator* CurrentLocalGenerator; + // map from project name to vector of local generators in that project + std::map > ProjectMap; + std::map > + LocalGeneratorToTargetMap; + + // Set of named installation components requested by the project. + std::set InstallComponents; + bool InstallTargetEnabled; + // Sets of named target exports + std::map > ExportSets; + + // Manifest of all targets that will be built for each configuration. + // This is computed just before local generators generate. + cmTargetManifest TargetManifest; + +private: + float FirstTimeProgress; + // If you add a new map here, make sure it is copied + // in EnableLanguagesFromGenerator + std::map IgnoreExtensions; + std::map LanguageEnabled; + std::map OutputExtensions; + std::map LanguageToOutputExtension; + std::map ExtensionToLanguage; + std::map LanguageToLinkerPreference; + + // this is used to improve performance + std::map TotalTargets; + + cmExternalMakefileProjectGenerator* ExtraGenerator; + + // track files replaced during a Generate + std::vector FilesReplacedDuringGenerate; + + // Store computed inter-target dependencies. + typedef std::map TargetDependMap; + TargetDependMap TargetDependencies; + + // Cache directory content and target files to be built. + struct DirectoryContent: public std::set + { + typedef std::set derived; + bool LoadedFromDisk; + DirectoryContent(): LoadedFromDisk(false) {} + DirectoryContent(DirectoryContent const& dc): + derived(dc), LoadedFromDisk(dc.LoadedFromDisk) {} + }; + std::map DirectoryContentMap; +}; + +#endif diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx new file mode 100644 index 000000000..91343aff2 --- /dev/null +++ b/Source/cmGlobalKdevelopGenerator.cxx @@ -0,0 +1,614 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalKdevelopGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-03-30 13:09:22 $ + Version: $Revision: 1.29.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf neundorf@kde.org, All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmGlobalKdevelopGenerator.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmake.h" +#include "cmSourceFile.h" +#include "cmGeneratedFileStream.h" +#include "cmSystemTools.h" + +#include +#include + +//---------------------------------------------------------------------------- +void cmGlobalKdevelopGenerator +::GetDocumentation(cmDocumentationEntry& entry, const char*) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates KDevelop 3 project files."; + entry.Full = + "Project files for KDevelop 3 will be created in the top directory " + "and in every subdirectory which features a CMakeLists.txt file " + "containing a PROJECT() call. " + "If you change the settings using KDevelop cmake will try its best " + "to keep your changes when regenerating the project files. " + "Additionally a hierarchy of UNIX makefiles is generated into the " + "build tree. Any " + "standard UNIX-style make program can build the project through the " + "default make target. A \"make install\" target is also provided."; +} + +cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator() +:cmExternalMakefileProjectGenerator() +{ + this->SupportedGlobalGenerators.push_back("Unix Makefiles"); +} + +void cmGlobalKdevelopGenerator::Generate() +{ + // for each sub project in the project create + // a kdevelop project + for (std::map >::const_iterator + it = this->GlobalGenerator->GetProjectMap().begin(); + it!= this->GlobalGenerator->GetProjectMap().end(); + ++it) + { + cmMakefile* mf = it->second[0]->GetMakefile(); + std::string outputDir=mf->GetStartOutputDirectory(); + std::string projectDir=mf->GetHomeDirectory(); + std::string projectName=mf->GetProjectName(); + std::string cmakeFilePattern("CMakeLists.txt;*.cmake;"); + std::string fileToOpen; + const std::vector& lgs= it->second; + // create the project.kdevelop.filelist file + if(!this->CreateFilelistFile(lgs, outputDir, projectDir, + projectName, cmakeFilePattern, fileToOpen)) + { + cmSystemTools::Error("Can not create filelist file"); + return; + } + //try to find the name of an executable so we have something to + //run from kdevelop for now just pick the first executable found + std::string executable; + for (std::vector::const_iterator lg=lgs.begin(); + lg!=lgs.end(); lg++) + { + cmMakefile* makefile=(*lg)->GetMakefile(); + cmTargets& targets=makefile->GetTargets(); + for (cmTargets::iterator ti = targets.begin(); + ti != targets.end(); ti++) + { + if (ti->second.GetType()==cmTarget::EXECUTABLE) + { + executable = ti->second.GetProperty("LOCATION"); + break; + } + } + if (!executable.empty()) + { + break; + } + } + + // now create a project file + this->CreateProjectFile(outputDir, projectDir, projectName, + executable, cmakeFilePattern, fileToOpen); + } +} + +bool cmGlobalKdevelopGenerator +::CreateFilelistFile(const std::vector& lgs, + const std::string& outputDir, + const std::string& projectDirIn, + const std::string& projectname, + std::string& cmakeFilePattern, + std::string& fileToOpen) +{ + std::string projectDir = projectDirIn + "/"; + std::string filename = outputDir+ "/" + projectname +".kdevelop.filelist"; + + std::set files; + std::string tmp; + + for (std::vector::const_iterator it=lgs.begin(); + it!=lgs.end(); it++) + { + cmMakefile* makefile=(*it)->GetMakefile(); + const std::vector& listFiles=makefile->GetListFiles(); + for (std::vector::const_iterator lt=listFiles.begin(); + lt!=listFiles.end(); lt++) + { + tmp=*lt; + cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); + // make sure the file is part of this source tree + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), + cmake::GetCMakeFilesDirectoryPostSlash())==0)) + { + files.insert(tmp); + tmp=cmSystemTools::GetFilenameName(tmp); + //add all files which dont match the default + // */CMakeLists.txt;*cmake; to the file pattern + if ((tmp!="CMakeLists.txt") + && (strstr(tmp.c_str(), ".cmake")==0)) + { + cmakeFilePattern+=tmp+";"; + } + } + } + + //get all sources + cmTargets& targets=makefile->GetTargets(); + for (cmTargets::iterator ti = targets.begin(); + ti != targets.end(); ti++) + { + const std::vector& sources=ti->second.GetSourceFiles(); + for (std::vector::const_iterator si=sources.begin(); + si!=sources.end(); si++) + { + tmp=(*si)->GetFullPath(); + std::string headerBasename=cmSystemTools::GetFilenamePath(tmp); + headerBasename+="/"; + headerBasename+=cmSystemTools::GetFilenameWithoutExtension(tmp); + + cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); + + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), + cmake::GetCMakeFilesDirectoryPostSlash())==0) && + (cmSystemTools::GetFilenameExtension(tmp)!=".moc")) + { + files.insert(tmp); + + // check if there's a matching header around + for(std::vector::const_iterator + ext = makefile->GetHeaderExtensions().begin(); + ext != makefile->GetHeaderExtensions().end(); ++ext) + { + std::string hname=headerBasename; + hname += "."; + hname += *ext; + if(cmSystemTools::FileExists(hname.c_str())) + { + cmSystemTools::ReplaceString(hname, projectDir.c_str(), ""); + files.insert(hname); + break; + } + } + } + } + for (std::vector::const_iterator lt=listFiles.begin(); + lt!=listFiles.end(); lt++) + { + tmp=*lt; + cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); + if ((tmp[0]!='/') && + (strstr(tmp.c_str(), + cmake::GetCMakeFilesDirectoryPostSlash())==0)) + { + files.insert(tmp.c_str()); + } + } + } + } + + //check if the output file already exists and read it + //insert all files which exist into the set of files + std::ifstream oldFilelist(filename.c_str()); + if (oldFilelist) + { + while (cmSystemTools::GetLineFromStream(oldFilelist, tmp)) + { + if (tmp[0]=='/') + { + continue; + } + std::string completePath=projectDir+tmp; + if (cmSystemTools::FileExists(completePath.c_str())) + { + files.insert(tmp); + } + } + oldFilelist.close(); + } + + //now write the new filename + cmGeneratedFileStream fout(filename.c_str()); + if(!fout) + { + return false; + } + + fileToOpen=""; + for (std::set::const_iterator it=files.begin(); + it!=files.end(); it++) + { + // get the full path to the file + tmp=cmSystemTools::CollapseFullPath(it->c_str(), projectDir.c_str()); + // just select the first source file + if (fileToOpen.empty()) + { + std::string ext = cmSystemTools::GetFilenameExtension(tmp); + if ((ext==".c") || (ext==".cc") || (ext==".cpp") || (ext==".cxx") + || (ext==".C") || (ext==".h") || (ext==".hpp")) + { + fileToOpen=tmp; + } + } + // make it relative to the project dir + cmSystemTools::ReplaceString(tmp, projectDir.c_str(), ""); + // only put relative paths + if (tmp.size() && tmp[0] != '/') + { + fout << tmp.c_str() <<"\n"; + } + } + return true; +} + + +/* create the project file, if it already exists, merge it with the +existing one, otherwise create a new one */ +void cmGlobalKdevelopGenerator +::CreateProjectFile(const std::string& outputDir, + const std::string& projectDir, + const std::string& projectname, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen) +{ + this->Blacklist.clear(); + + std::string filename=outputDir+"/"; + filename+=projectname+".kdevelop"; + std::string sessionFilename=outputDir+"/"; + sessionFilename+=projectname+".kdevses"; + + if (cmSystemTools::FileExists(filename.c_str())) + { + this->MergeProjectFiles(outputDir, projectDir, filename, + executable, cmakeFilePattern, + fileToOpen, sessionFilename); + } + else + { + // add all subdirectories to the kdevelop blacklist + // so they are not monitored for added or removed files + // since this is basically handled by adding files to the cmake files + cmsys::Directory d; + if (d.Load(projectDir.c_str())) + { + size_t numf = d.GetNumberOfFiles(); + for (unsigned int i = 0; i < numf; i++) + { + std::string nextFile = d.GetFile(i); + if ((nextFile!=".") && (nextFile!="..")) + { + std::string tmp = projectDir; + tmp += "/"; + tmp += nextFile; + if (cmSystemTools::FileIsDirectory(tmp.c_str())) + { + this->Blacklist.push_back(nextFile); + } + } + } + } + this->CreateNewProjectFile(outputDir, projectDir, filename, + executable, cmakeFilePattern, + fileToOpen, sessionFilename); + } + +} + +void cmGlobalKdevelopGenerator +::MergeProjectFiles(const std::string& outputDir, + const std::string& projectDir, + const std::string& filename, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen, + const std::string& sessionFilename) +{ + std::ifstream oldProjectFile(filename.c_str()); + if (!oldProjectFile) + { + this->CreateNewProjectFile(outputDir, projectDir, filename, + executable, cmakeFilePattern, + fileToOpen, sessionFilename); + return; + } + + /* Read the existing project file (line by line), copy all lines + into the new project file, except the ones which can be reliably + set from contents of the CMakeLists.txt */ + std::string tmp; + std::vector lines; + while (cmSystemTools::GetLineFromStream(oldProjectFile, tmp)) + { + lines.push_back(tmp); + } + oldProjectFile.close(); + + cmGeneratedFileStream fout(filename.c_str()); + if(!fout) + { + return; + } + + for (std::vector::const_iterator it=lines.begin(); + it!=lines.end(); it++) + { + const char* line=(*it).c_str(); + // skip these tags as they are always replaced + if ((strstr(line, "")!=0) + || (strstr(line, "")!=0) + || (strstr(line, "")!=0) + || (strstr(line, "")!=0) + || (strstr(line, "")!=0) + || (strstr(line, "")!=0)) + { + continue; + } + + // output the line from the file if it is not one of the above tags + fout<<*it<<"\n"; + // if this is the tag output the stuff that goes in the + // general tag + if (strstr(line, "")) + { + fout<< " KDevCustomProject\n"; + fout<< " " <\n"; //this one is important + fout<<" true\n"; + //and this one + } + // inside kdevcustomproject the must be put + if (strstr(line, "")) + { + fout<<" "<\n"; + } + // buildtool and builddir go inside + if (strstr(line, "")) + { + fout<<" make\n"; + fout<<" "<\n"; + } + } +} + +void cmGlobalKdevelopGenerator +::CreateNewProjectFile(const std::string& outputDir, + const std::string& projectDir, + const std::string& filename, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen, + const std::string& sessionFilename) +{ + cmGeneratedFileStream fout(filename.c_str()); + if(!fout) + { + return; + } + + // check for a version control system + bool hasSvn = cmSystemTools::FileExists((projectDir + "/.svn").c_str()); + bool hasCvs = cmSystemTools::FileExists((projectDir + "/CVS").c_str()); + + bool enableCxx = (this->GlobalGenerator->GetLanguageEnabled("C") + || this->GlobalGenerator->GetLanguageEnabled("CXX")); + bool enableFortran = this->GlobalGenerator->GetLanguageEnabled("Fortran"); + std::string primaryLanguage = "C++"; + if (enableFortran && !enableCxx) + { + primaryLanguage="Fortran77"; + } + + fout<<"\n" + "\n" + " \n" + " \n" + " \n" + " $VERSION$\n" + " KDevCustomProject\n" + " " << primaryLanguage << "\n" + " \n" + " " << projectDir.c_str() << + "\n"; //this one is important + fout<<" true\n"; //and this one + + // setup additional languages + fout<<" \n"; + if (enableFortran && enableCxx) + { + fout<<" Fortran\n"; + } + if (enableCxx) + { + fout<<" C\n"; + } + fout<<" \n"; + + if (hasSvn) + { + fout << " kdevsubversion\n"; + } + else if (hasCvs) + { + fout << " kdevcvsservice\n"; + } + + fout<<" \n" + " \n" + " " << outputDir.c_str() << + "\n" + " \n" + " " << executable.c_str() << "\n" + " custom\n" + " "<\n" + " \n" + " false\n" + " true\n" + " \n" + " \n" + " \n" + " make\n"; //this one is important + fout<<" "<\n"; //and this one + fout<<" \n" + " \n" + " false\n" + " 1\n" + " false\n" + " " << this->GlobalGenerator->GetLocalGenerators()[0]-> + GetMakefile()->GetRequiredDefinition("CMAKE_BUILD_TOOL") + << " VERBOSE=1 \n" + " default\n" + " \n" + " \n" + " \n" + " \n"; + + fout<<" \n"; + for(std::vector::const_iterator dirIt=this->Blacklist.begin(); + dirIt != this->Blacklist.end(); + ++dirIt) + { + fout<<" " << dirIt->c_str() << "\n"; + } + fout<<" \n"; + + fout<<" \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " html/\n" + " html/\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; + + if (enableCxx) + { + fout<<" \n" + " \n" + " .h\n" + " .cpp\n" + " \n" + " \n" + " \n" + " \n" + " true\n" + " true\n" + " true\n" + " false\n" + " true\n" + " true\n" + " true\n" + " 250\n" + " 400\n" + " 250\n" + " \n" + " \n" + " \n"; + } + + if (enableFortran) + { + fout<<" \n" + " \n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " false\n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" + " \n"; + } + + // set up file groups. maybe this can be used with the CMake SOURCE_GROUP() + // command + fout<<" \n" + " \n" + " \n"; + + if (enableCxx) + { + fout<<" \n" + " \n" + " \n"; + } + + if (enableFortran) + { + fout<<" \n"; + } + + fout<<" \n" + " true\n" + " \n" + " \n" + " *.o,*.lo,CVS,*~,cmake*\n" + " true\n" + " \n" + " \n" + "\n"; + + if (sessionFilename.empty()) + { + return; + } + + // and a session file, so that kdevelop opens a file if it opens the + // project the first time + cmGeneratedFileStream devses(sessionFilename.c_str()); + if(!devses) + { + return; + } + devses<<"\n" + "\n" + "\n" + " \n" + " \n" + " \n" + " \n" + " \n" + "\n"; +} + diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h new file mode 100644 index 000000000..592b70fb0 --- /dev/null +++ b/Source/cmGlobalKdevelopGenerator.h @@ -0,0 +1,97 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalKdevelopGenerator.h,v $ + Language: C++ + Date: $Date: 2008-03-30 13:09:23 $ + Version: $Revision: 1.7.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalKdevelopGenerator_h +#define cmGlobalKdevelopGenerator_h + +#include "cmExternalMakefileProjectGenerator.h" + +class cmLocalGenerator; + +/** \class cmGlobalKdevelopGenerator + * \brief Write Unix Makefiles accompanied by KDevelop3 project files. + * + * cmGlobalKdevelopGenerator produces a project file for KDevelop 3 (KDevelop + * > 3.1.1). The project is based on the "Custom Makefile based C/C++" + * project of KDevelop. Such a project consists of Unix Makefiles in the + * build directory together with a .kdevelop project file, + * which contains the project settings and a .kdevelop.filelist + * file, which lists the source files relative to the kdevelop project + * directory. The kdevelop project directory is the base source directory. + */ +class cmGlobalKdevelopGenerator : public cmExternalMakefileProjectGenerator +{ +public: + cmGlobalKdevelopGenerator(); + + virtual const char* GetName() const + { return cmGlobalKdevelopGenerator::GetActualName();} + static const char* GetActualName() { return "KDevelop3";} + static cmExternalMakefileProjectGenerator* New() + { return new cmGlobalKdevelopGenerator; } + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry, + const char* fullName) const; + + virtual void Generate(); +private: + /*** Create the foo.kdevelop.filelist file, return false if it doesn't + succeed. If the file already exists the contents will be merged. + */ + bool CreateFilelistFile(const std::vector& lgs, + const std::string& outputDir, + const std::string& projectDirIn, + const std::string& projectname, + std::string& cmakeFilePattern, + std::string& fileToOpen); + + /** Create the foo.kdevelop file. This one calls MergeProjectFiles() + if it already exists, otherwise createNewProjectFile() The project + files will be created in \a outputDir (in the build tree), the + kdevelop project dir will be set to \a projectDir (in the source + tree). \a cmakeFilePattern consists of a lists of all cmake + listfiles used by this CMakeLists.txt */ + void CreateProjectFile(const std::string& outputDir, + const std::string& projectDir, + const std::string& projectname, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen); + + /*** Reads the old foo.kdevelop line by line and only replaces the + "important" lines + */ + void MergeProjectFiles(const std::string& outputDir, + const std::string& projectDir, + const std::string& filename, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen, + const std::string& sessionFilename); + ///! Creates a new foo.kdevelop and a new foo.kdevses file + void CreateNewProjectFile(const std::string& outputDir, + const std::string& projectDir, + const std::string& filename, + const std::string& executable, + const std::string& cmakeFilePattern, + const std::string& fileToOpen, + const std::string& sessionFilename); + + std::vector Blacklist; +}; + +#endif diff --git a/Source/cmGlobalMSYSMakefileGenerator.cxx b/Source/cmGlobalMSYSMakefileGenerator.cxx new file mode 100644 index 000000000..e71d1aab4 --- /dev/null +++ b/Source/cmGlobalMSYSMakefileGenerator.cxx @@ -0,0 +1,110 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalMSYSMakefileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalMSYSMakefileGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmake.h" + +cmGlobalMSYSMakefileGenerator::cmGlobalMSYSMakefileGenerator() +{ + this->FindMakeProgramFile = "CMakeMSYSFindMake.cmake"; + this->ForceUnixPaths = true; + this->ToolSupportsColor = true; + this->UseLinkScript = false; +} + +std::string +cmGlobalMSYSMakefileGenerator::FindMinGW(std::string const& makeloc) +{ + std::string fstab = makeloc; + fstab += "/../etc/fstab"; + std::ifstream fin(fstab.c_str()); + std::string path; + std::string mount; + std::string mingwBin; + while(fin) + { + fin >> path; + fin >> mount; + if(mount == "/mingw") + { + mingwBin = path; + mingwBin += "/bin"; + } + } + return mingwBin; +} + +void cmGlobalMSYSMakefileGenerator +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, + bool optional) +{ + this->FindMakeProgram(mf); + std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + std::vector locations; + std::string makeloc = cmSystemTools::GetProgramPath(makeProgram.c_str()); + locations.push_back(this->FindMinGW(makeloc)); + locations.push_back(makeloc); + locations.push_back("/mingw/bin"); + locations.push_back("c:/mingw/bin"); + std::string tgcc = cmSystemTools::FindProgram("gcc", locations); + std::string gcc = "gcc.exe"; + if(tgcc.size()) + { + gcc = tgcc; + } + std::string tgxx = cmSystemTools::FindProgram("g++", locations); + std::string gxx = "g++.exe"; + if(tgxx.size()) + { + gxx = tgxx; + } + mf->AddDefinition("MSYS", "1"); + mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str()); + mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str()); + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); + if(!mf->IsSet("CMAKE_AR") && !this->CMakeInstance->GetIsInTryCompile()) + { + cmSystemTools::Error + ("CMAKE_AR was not found, please set to archive program. ", + mf->GetDefinition("CMAKE_AR")); + } +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalMSYSMakefileGenerator::CreateLocalGenerator() +{ + cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; + lg->SetWindowsShell(false); + lg->SetMSYSShell(true); + lg->SetGlobalGenerator(this); + lg->SetIgnoreLibPrefix(true); + lg->SetPassMakeflags(false); + lg->SetUnixCD(true); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalMSYSMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates MSYS makefiles."; + entry.Full = "The makefiles use /bin/sh as the shell. " + "They require msys to be installed on the machine."; +} diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h new file mode 100644 index 000000000..4af4539c1 --- /dev/null +++ b/Source/cmGlobalMSYSMakefileGenerator.h @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalMSYSMakefileGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-09 19:57:30 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalMSYSMakefileGenerator_h +#define cmGlobalMSYSMakefileGenerator_h + +#include "cmGlobalUnixMakefileGenerator3.h" + +/** \class cmGlobalMSYSMakefileGenerator + * \brief Write a NMake makefiles. + * + * cmGlobalMSYSMakefileGenerator manages nmake build process for a tree + */ +class cmGlobalMSYSMakefileGenerator : public cmGlobalUnixMakefileGenerator3 +{ +public: + cmGlobalMSYSMakefileGenerator(); + static cmGlobalGenerator* New() { + return new cmGlobalMSYSMakefileGenerator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalMSYSMakefileGenerator::GetActualName();} + static const char* GetActualName() {return "MSYS Makefiles";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + +private: + std::string FindMinGW(std::string const& makeloc); +}; + +#endif diff --git a/Source/cmGlobalMinGWMakefileGenerator.cxx b/Source/cmGlobalMinGWMakefileGenerator.cxx new file mode 100644 index 000000000..d26348f5d --- /dev/null +++ b/Source/cmGlobalMinGWMakefileGenerator.cxx @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalMinGWMakefileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalMinGWMakefileGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" + +cmGlobalMinGWMakefileGenerator::cmGlobalMinGWMakefileGenerator() +{ + this->FindMakeProgramFile = "CMakeMinGWFindMake.cmake"; + this->ForceUnixPaths = true; + this->ToolSupportsColor = true; + this->UseLinkScript = true; +} + +void cmGlobalMinGWMakefileGenerator +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, + bool optional) +{ + this->FindMakeProgram(mf); + std::string makeProgram = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + std::vector locations; + locations.push_back(cmSystemTools::GetProgramPath(makeProgram.c_str())); + locations.push_back("/mingw/bin"); + locations.push_back("c:/mingw/bin"); + std::string tgcc = cmSystemTools::FindProgram("gcc", locations); + std::string gcc = "gcc.exe"; + if(tgcc.size()) + { + gcc = tgcc; + } + std::string tgxx = cmSystemTools::FindProgram("g++", locations); + std::string gxx = "g++.exe"; + if(tgxx.size()) + { + gxx = tgxx; + } + mf->AddDefinition("CMAKE_GENERATOR_CC", gcc.c_str()); + mf->AddDefinition("CMAKE_GENERATOR_CXX", gxx.c_str()); + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator() +{ + cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; + lg->SetWindowsShell(true); + lg->SetGlobalGenerator(this); + lg->SetIgnoreLibPrefix(true); + lg->SetPassMakeflags(false); + lg->SetUnixCD(true); + lg->SetMinGWMake(true); + + // mingw32-make has trouble running code like + // + // @echo message with spaces + // + // If quotes are added + // + // @echo "message with spaces" + // + // it runs but the quotes are displayed. Instead just use cmake to + // echo. + lg->SetNativeEchoCommand("@$(CMAKE_COMMAND) -E echo ", false); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalMinGWMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates a make file for use with mingw32-make."; + entry.Full = "The makefiles generated use cmd.exe as the shell. " + "They do not require msys or a unix shell."; +} diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h new file mode 100644 index 000000000..ffb4b4ffb --- /dev/null +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalMinGWMakefileGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-09 19:57:30 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalMinGWMakefileGenerator_h +#define cmGlobalMinGWMakefileGenerator_h + +#include "cmGlobalUnixMakefileGenerator3.h" + +/** \class cmGlobalMinGWMakefileGenerator + * \brief Write a NMake makefiles. + * + * cmGlobalMinGWMakefileGenerator manages nmake build process for a tree + */ +class cmGlobalMinGWMakefileGenerator : public cmGlobalUnixMakefileGenerator3 +{ +public: + cmGlobalMinGWMakefileGenerator(); + static cmGlobalGenerator* New() { + return new cmGlobalMinGWMakefileGenerator; } + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalMinGWMakefileGenerator::GetActualName();} + static const char* GetActualName() {return "MinGW Makefiles";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; + +#endif diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx new file mode 100644 index 000000000..73cc083c6 --- /dev/null +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -0,0 +1,62 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalNMakeMakefileGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-13 21:36:20 $ + Version: $Revision: 1.26 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalNMakeMakefileGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" + +cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator() +{ + this->FindMakeProgramFile = "CMakeNMakeFindMake.cmake"; + this->ForceUnixPaths = false; + this->ToolSupportsColor = true; + this->UseLinkScript = false; +} + +void cmGlobalNMakeMakefileGenerator +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, + bool optional) +{ + // pick a default + mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator() +{ + cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; + lg->SetDefineWindowsNULL(true); + lg->SetWindowsShell(true); + lg->SetMakeSilentFlag("/nologo"); + lg->SetGlobalGenerator(this); + lg->SetIgnoreLibPrefix(true); + lg->SetPassMakeflags(true); + lg->SetNMake(true); + lg->SetUnixCD(false); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalNMakeMakefileGenerator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates NMake makefiles."; + entry.Full = ""; +} diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h new file mode 100644 index 000000000..9853d8228 --- /dev/null +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalNMakeMakefileGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-09 19:57:30 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalNMakeMakefileGenerator_h +#define cmGlobalNMakeMakefileGenerator_h + +#include "cmGlobalUnixMakefileGenerator3.h" + +/** \class cmGlobalNMakeMakefileGenerator + * \brief Write a NMake makefiles. + * + * cmGlobalNMakeMakefileGenerator manages nmake build process for a tree + */ +class cmGlobalNMakeMakefileGenerator : public cmGlobalUnixMakefileGenerator3 +{ +public: + cmGlobalNMakeMakefileGenerator(); + static cmGlobalGenerator* New() { + return new cmGlobalNMakeMakefileGenerator; } + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalNMakeMakefileGenerator::GetActualName();} + static const char* GetActualName() {return "NMake Makefiles";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; + +#endif diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx new file mode 100644 index 000000000..c0136cc54 --- /dev/null +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -0,0 +1,993 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator3 + Module: $RCSfile: cmGlobalUnixMakefileGenerator3.cxx,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.126.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmake.h" +#include "cmGeneratedFileStream.h" +#include "cmSourceFile.h" +#include "cmTarget.h" + +cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3() +{ + // This type of makefile always requires unix style paths + this->ForceUnixPaths = true; + this->FindMakeProgramFile = "CMakeUnixFindMake.cmake"; + this->ToolSupportsColor = true; + this->ForceVerboseMakefiles = false; + +#ifdef _WIN32 + this->UseLinkScript = false; +#else + this->UseLinkScript = true; +#endif +} + +void cmGlobalUnixMakefileGenerator3 +::EnableLanguage(std::vectorconst& languages, + cmMakefile *mf, + bool optional) +{ + this->cmGlobalGenerator::EnableLanguage(languages, mf, optional); + std::string path; + for(std::vector::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + if(*l == "NONE") + { + continue; + } + const char* lang = l->c_str(); + std::string langComp = "CMAKE_"; + langComp += lang; + langComp += "_COMPILER"; + + if(!mf->GetDefinition(langComp.c_str())) + { + cmSystemTools::Error(langComp.c_str(), + " not set, after EnableLanguage"); + continue; + } + const char* name = mf->GetRequiredDefinition(langComp.c_str()); + if(!cmSystemTools::FileIsFullPath(name)) + { + path = cmSystemTools::FindProgram(name); + } + else + { + path = name; + } + if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str())) + && (optional==false)) + { + std::string message = "your "; + message += lang; + message += " compiler: \""; + message += name; + message += "\" was not found. Please set "; + message += langComp; + message += " to a valid compiler path or name."; + cmSystemTools::Error(message.c_str()); + path = name; + } + std::string doc = lang; + doc += " compiler."; + const char* cname = this->GetCMakeInstance()-> + GetCacheManager()->GetCacheValue(langComp.c_str()); + std::string changeVars; + if(cname && (path != cname)) + { + const char* cvars = + this->GetCMakeInstance()->GetProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_"); + if(cvars) + { + changeVars += cvars; + changeVars += ";"; + } + changeVars += langComp; + changeVars += ";"; + changeVars += cname; + this->GetCMakeInstance()->SetProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_", + changeVars.c_str()); + } + mf->AddCacheDefinition(langComp.c_str(), path.c_str(), + doc.c_str(), cmCacheManager::FILEPATH); + } +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalUnixMakefileGenerator3::CreateLocalGenerator() +{ + cmLocalGenerator* lg = new cmLocalUnixMakefileGenerator3; + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalUnixMakefileGenerator3 +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates standard UNIX makefiles."; + entry.Full = + "A hierarchy of UNIX makefiles is generated into the build tree. Any " + "standard UNIX-style make program can build the project through the " + "default make target. A \"make install\" target is also provided."; +} + +//---------------------------------------------------------------------------- +void cmGlobalUnixMakefileGenerator3::Generate() +{ + // first do superclass method + this->cmGlobalGenerator::Generate(); + + // initialize progress + unsigned int i; + unsigned long total = 0; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmLocalUnixMakefileGenerator3 *lg = + static_cast(this->LocalGenerators[i]); + total += lg->GetNumberOfProgressActions(); + } + + // write each target's progress.make this loop is done twice. Bascially the + // Generate pass counts all the actions, the first loop below determines + // how many actions have progress updates for each target and writes to + // corrrect variable values for everything except the all targets. The + // second loop actually writes out correct values for the all targets as + // well. This is because the all targets require more information that is + // computed in the first loop. + unsigned long current = 0; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmLocalUnixMakefileGenerator3 *lg = + static_cast(this->LocalGenerators[i]); + lg->WriteProgressVariables(total,current); + } + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmLocalUnixMakefileGenerator3 *lg = + static_cast(this->LocalGenerators[i]); + lg->WriteAllProgressVariable(); + } + + // write the main makefile + this->WriteMainMakefile2(); + this->WriteMainCMakefile(); +} + +void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2() +{ + // Open the output file. This should not be copy-if-different + // because the check-build-system step compares the makefile time to + // see if the build system must be regenerated. + std::string makefileName = + this->GetCMakeInstance()->GetHomeOutputDirectory(); + makefileName += cmake::GetCMakeFilesDirectory(); + makefileName += "/Makefile2"; + cmGeneratedFileStream makefileStream(makefileName.c_str()); + if(!makefileStream) + { + return; + } + + // get a local generator for some useful methods + cmLocalUnixMakefileGenerator3 *lg = + static_cast(this->LocalGenerators[0]); + + // Write the do not edit header. + lg->WriteDisclaimer(makefileStream); + + // Write the main entry point target. This must be the VERY first + // target so that make with no arguments will run it. + // Just depend on the all target to drive the build. + std::vector depends; + std::vector no_commands; + depends.push_back("all"); + + // Write the rule. + lg->WriteMakeRule(makefileStream, + "Default target executed when no arguments are " + "given to make.", + "default_target", + depends, + no_commands, true); + + depends.clear(); + + // The all and preinstall rules might never have any dependencies + // added to them. + if(this->EmptyRuleHackDepends != "") + { + depends.push_back(this->EmptyRuleHackDepends); + } + + // Write and empty all: + lg->WriteMakeRule(makefileStream, + "The main recursive all target", "all", + depends, no_commands, true); + + // Write an empty preinstall: + lg->WriteMakeRule(makefileStream, + "The main recursive preinstall target", "preinstall", + depends, no_commands, true); + + // Write out the "special" stuff + lg->WriteSpecialTargetsTop(makefileStream); + + // write the target convenience rules + unsigned int i; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + lg = + static_cast(this->LocalGenerators[i]); + this->WriteConvenienceRules2(makefileStream,lg); + } + + lg = static_cast(this->LocalGenerators[0]); + lg->WriteSpecialTargetsBottom(makefileStream); +} + + +//---------------------------------------------------------------------------- +void cmGlobalUnixMakefileGenerator3::WriteMainCMakefile() +{ + // Open the output file. This should not be copy-if-different + // because the check-build-system step compares the makefile time to + // see if the build system must be regenerated. + std::string cmakefileName = + this->GetCMakeInstance()->GetHomeOutputDirectory(); + cmakefileName += cmake::GetCMakeFilesDirectory(); + cmakefileName += "/Makefile.cmake"; + cmGeneratedFileStream cmakefileStream(cmakefileName.c_str()); + if(!cmakefileStream) + { + return; + } + + std::string makefileName = + this->GetCMakeInstance()->GetHomeOutputDirectory(); + makefileName += "/Makefile"; + + // get a local generator for some useful methods + cmLocalUnixMakefileGenerator3 *lg = + static_cast(this->LocalGenerators[0]); + + // Write the do not edit header. + lg->WriteDisclaimer(cmakefileStream); + + // Save the generator name + cmakefileStream + << "# The generator used is:\n" + << "SET(CMAKE_DEPENDS_GENERATOR \"" << this->GetName() << "\")\n\n"; + + // for each cmMakefile get its list of dependencies + std::vector lfiles; + for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + { + lg = + static_cast(this->LocalGenerators[i]); + + // Get the list of files contributing to this generation step. + lfiles.insert(lfiles.end(),lg->GetMakefile()->GetListFiles().begin(), + lg->GetMakefile()->GetListFiles().end()); + } + // Sort the list and remove duplicates. + std::sort(lfiles.begin(), lfiles.end(), std::less()); + std::vector::iterator new_end = + std::unique(lfiles.begin(),lfiles.end()); + lfiles.erase(new_end, lfiles.end()); + + // reset lg to the first makefile + lg = static_cast(this->LocalGenerators[0]); + + // Build the path to the cache file. + std::string cache = this->GetCMakeInstance()->GetHomeOutputDirectory(); + cache += "/CMakeCache.txt"; + + // Save the list to the cmake file. + cmakefileStream + << "# The top level Makefile was generated from the following files:\n" + << "SET(CMAKE_MAKEFILE_DEPENDS\n" + << " \"" + << lg->Convert(cache.c_str(), + cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"; + for(std::vector::const_iterator i = lfiles.begin(); + i != lfiles.end(); ++i) + { + cmakefileStream + << " \"" + << lg->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT).c_str() + << "\"\n"; + } + cmakefileStream + << " )\n\n"; + + // Build the path to the cache check file. + std::string check = this->GetCMakeInstance()->GetHomeOutputDirectory(); + check += cmake::GetCMakeFilesDirectory(); + check += "/cmake.check_cache"; + + // Set the corresponding makefile in the cmake file. + cmakefileStream + << "# The corresponding makefile is:\n" + << "SET(CMAKE_MAKEFILE_OUTPUTS\n" + << " \"" + << lg->Convert(makefileName.c_str(), + cmLocalGenerator::START_OUTPUT).c_str() << "\"\n" + << " \"" + << lg->Convert(check.c_str(), + cmLocalGenerator::START_OUTPUT).c_str() << "\"\n"; + + // add in all the directory information files + std::string tmpStr; + for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + { + lg = + static_cast(this->LocalGenerators[i]); + tmpStr = lg->GetMakefile()->GetStartOutputDirectory(); + tmpStr += cmake::GetCMakeFilesDirectory(); + tmpStr += "/CMakeDirectoryInformation.cmake"; + cmakefileStream << " \"" << + lg->Convert(tmpStr.c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() + << "\"\n"; + const std::vector& outfiles = + lg->GetMakefile()->GetOutputFiles(); + for(std::vector::const_iterator k= outfiles.begin(); + k != outfiles.end(); ++k) + { + cmakefileStream << " \"" << + lg->Convert(k->c_str(),cmLocalGenerator::HOME_OUTPUT).c_str() + << "\"\n"; + } + } + cmakefileStream << " )\n\n"; + + this->WriteMainCMakefileLanguageRules(cmakefileStream, + this->LocalGenerators); +} + +void cmGlobalUnixMakefileGenerator3 +::WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, + std::vector &lGenerators + ) +{ + cmLocalUnixMakefileGenerator3 *lg; + + // now list all the target info files + cmakefileStream + << "# Dependency information for all targets:\n"; + cmakefileStream + << "SET(CMAKE_DEPEND_INFO_FILES\n"; + for (unsigned int i = 0; i < lGenerators.size(); ++i) + { + lg = static_cast(lGenerators[i]); + // for all of out targets + for (cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin(); + l != lg->GetMakefile()->GetTargets().end(); l++) + { + if((l->second.GetType() == cmTarget::EXECUTABLE) || + (l->second.GetType() == cmTarget::STATIC_LIBRARY) || + (l->second.GetType() == cmTarget::SHARED_LIBRARY) || + (l->second.GetType() == cmTarget::MODULE_LIBRARY) || + (l->second.GetType() == cmTarget::UTILITY)) + { + std::string tname = lg->GetRelativeTargetDirectory(l->second); + tname += "/DependInfo.cmake"; + cmSystemTools::ConvertToUnixSlashes(tname); + cmakefileStream << " \"" << tname.c_str() << "\"\n"; + } + } + } + cmakefileStream << " )\n"; +} + +//---------------------------------------------------------------------------- +void +cmGlobalUnixMakefileGenerator3 +::WriteDirectoryRule2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3* lg, + const char* pass, bool check_all, + bool check_relink) +{ + // Get the relative path to the subdirectory from the top. + std::string makeTarget = lg->GetMakefile()->GetStartOutputDirectory(); + makeTarget += "/"; + makeTarget += pass; + + // The directory-level rule should depend on the target-level rules + // for all targets in the directory. + std::vector depends; + for(cmTargets::iterator l = lg->GetMakefile()->GetTargets().begin(); + l != lg->GetMakefile()->GetTargets().end(); ++l) + { + if((l->second.GetType() == cmTarget::EXECUTABLE) || + (l->second.GetType() == cmTarget::STATIC_LIBRARY) || + (l->second.GetType() == cmTarget::SHARED_LIBRARY) || + (l->second.GetType() == cmTarget::MODULE_LIBRARY) || + (l->second.GetType() == cmTarget::UTILITY)) + { + // Add this to the list of depends rules in this directory. + if((!check_all || !l->second.GetPropertyAsBool("EXCLUDE_FROM_ALL")) && + (!check_relink || l->second.NeedRelinkBeforeInstall())) + { + std::string tname = lg->GetRelativeTargetDirectory(l->second); + tname += "/"; + tname += pass; + depends.push_back(tname); + } + } + } + + // The directory-level rule should depend on the directory-level + // rules of the subdirectories. + for(std::vector::iterator sdi = + lg->GetChildren().begin(); sdi != lg->GetChildren().end(); ++sdi) + { + cmLocalUnixMakefileGenerator3* slg = + static_cast(*sdi); + std::string subdir = slg->GetMakefile()->GetStartOutputDirectory(); + subdir += "/"; + subdir += pass; + depends.push_back(subdir); + } + + // Work-around for makes that drop rules that have no dependencies + // or commands. + if(depends.empty() && this->EmptyRuleHackDepends != "") + { + depends.push_back(this->EmptyRuleHackDepends); + } + + // Write the rule. + std::string doc = "Convenience name for \""; + doc += pass; + doc += "\" pass in the directory."; + std::vector no_commands; + lg->WriteMakeRule(ruleFileStream, doc.c_str(), + makeTarget.c_str(), depends, no_commands, true); +} + +//---------------------------------------------------------------------------- +void +cmGlobalUnixMakefileGenerator3 +::WriteDirectoryRules2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3* lg) +{ + // Only subdirectories need these rules. + if(!lg->GetParent()) + { + return; + } + + // Begin the directory-level rules section. + std::string dir = lg->GetMakefile()->GetStartOutputDirectory(); + dir = lg->Convert(dir.c_str(), cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + lg->WriteDivider(ruleFileStream); + ruleFileStream + << "# Directory level rules for directory " + << dir << "\n\n"; + + // Write directory-level rules for "all". + this->WriteDirectoryRule2(ruleFileStream, lg, "all", true, false); + + // Write directory-level rules for "clean". + this->WriteDirectoryRule2(ruleFileStream, lg, "clean", false, false); + + // Write directory-level rules for "preinstall". + this->WriteDirectoryRule2(ruleFileStream, lg, "preinstall", true, true); +} + + +std::string cmGlobalUnixMakefileGenerator3 +::GenerateBuildCommand(const char* makeProgram, const char *projectName, + const char* additionalOptions, const char *targetName, + const char* config, bool ignoreErrors, bool fast) +{ + // Project name and config are not used yet. + (void)projectName; + (void)config; + + std::string makeCommand = + cmSystemTools::ConvertToUnixOutputPath(makeProgram); + + // Since we have full control over the invocation of nmake, let us + // make it quiet. + if ( strcmp(this->GetName(), "NMake Makefiles") == 0 ) + { + makeCommand += " /NOLOGO "; + } + if ( ignoreErrors ) + { + makeCommand += " -i"; + } + if ( additionalOptions ) + { + makeCommand += " "; + makeCommand += additionalOptions; + } + if ( targetName && strlen(targetName)) + { + cmLocalUnixMakefileGenerator3 *lg; + if (this->LocalGenerators.size()) + { + lg = static_cast + (this->LocalGenerators[0]); + } + else + { + lg = static_cast + (this->CreateLocalGenerator()); + // set the Start directories + lg->GetMakefile()->SetStartDirectory + (this->CMakeInstance->GetStartDirectory()); + lg->GetMakefile()->SetStartOutputDirectory + (this->CMakeInstance->GetStartOutputDirectory()); + lg->GetMakefile()->MakeStartDirectoriesCurrent(); + } + + makeCommand += " \""; + std::string tname = targetName; + if(fast) + { + tname += "/fast"; + } + tname = lg->Convert(tname.c_str(),cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE); + makeCommand += tname.c_str(); + makeCommand += "\""; + if (!this->LocalGenerators.size()) + { + delete lg; + } + } + return makeCommand; +} + +//---------------------------------------------------------------------------- +void +cmGlobalUnixMakefileGenerator3 +::WriteConvenienceRules(std::ostream& ruleFileStream, + std::set &emitted) +{ + std::vector depends; + std::vector commands; + + depends.push_back("cmake_check_build_system"); + + // write the target convenience rules + unsigned int i; + cmLocalUnixMakefileGenerator3 *lg; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + lg = static_cast + (this->LocalGenerators[i]); + // for each target Generate the rule files for each target. + cmTargets& targets = lg->GetMakefile()->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + // Don't emit the same rule twice (e.g. two targets with the same + // simple name) + if(t->second.GetName() && + strlen(t->second.GetName()) && + emitted.insert(t->second.GetName()).second && + // Handle user targets here. Global targets are handled in + // the local generator on a per-directory basis. + ((t->second.GetType() == cmTarget::EXECUTABLE) || + (t->second.GetType() == cmTarget::STATIC_LIBRARY) || + (t->second.GetType() == cmTarget::SHARED_LIBRARY) || + (t->second.GetType() == cmTarget::MODULE_LIBRARY) || + (t->second.GetType() == cmTarget::UTILITY))) + { + // Add a rule to build the target by name. + lg->WriteDivider(ruleFileStream); + ruleFileStream + << "# Target rules for targets named " + << t->second.GetName() << "\n\n"; + + // Write the rule. + commands.clear(); + std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash(); + tmp += "Makefile2"; + commands.push_back(lg->GetRecursiveMakeCall + (tmp.c_str(),t->second.GetName())); + depends.clear(); + depends.push_back("cmake_check_build_system"); + lg->WriteMakeRule(ruleFileStream, + "Build rule for target.", + t->second.GetName(), depends, commands, + true); + + // Add a fast rule to build the target + std::string localName = lg->GetRelativeTargetDirectory(t->second); + std::string makefileName; + makefileName = localName; + makefileName += "/build.make"; + depends.clear(); + commands.clear(); + std::string makeTargetName = localName; + makeTargetName += "/build"; + localName = t->second.GetName(); + localName += "/fast"; + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(), makeTargetName.c_str())); + lg->WriteMakeRule(ruleFileStream, "fast build rule for target.", + localName.c_str(), depends, commands, true); + + // Add a local name for the rule to relink the target before + // installation. + if(t->second.NeedRelinkBeforeInstall()) + { + makeTargetName = lg->GetRelativeTargetDirectory(t->second); + makeTargetName += "/preinstall"; + localName = t->second.GetName(); + localName += "/preinstall"; + depends.clear(); + commands.clear(); + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(), makeTargetName.c_str())); + lg->WriteMakeRule(ruleFileStream, + "Manual pre-install relink rule for target.", + localName.c_str(), depends, commands, true); + } + } + } + } +} + + +//---------------------------------------------------------------------------- +void +cmGlobalUnixMakefileGenerator3 +::WriteConvenienceRules2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3 *lg) +{ + std::vector depends; + std::vector commands; + std::string localName; + std::string makeTargetName; + + + // write the directory level rules for this local gen + this->WriteDirectoryRules2(ruleFileStream,lg); + + depends.push_back("cmake_check_build_system"); + + // for each target Generate the rule files for each target. + cmTargets& targets = lg->GetMakefile()->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + if (t->second.GetName() + && strlen(t->second.GetName()) + && ((t->second.GetType() == cmTarget::EXECUTABLE) + || (t->second.GetType() == cmTarget::STATIC_LIBRARY) + || (t->second.GetType() == cmTarget::SHARED_LIBRARY) + || (t->second.GetType() == cmTarget::MODULE_LIBRARY) + || (t->second.GetType() == cmTarget::UTILITY))) + { + std::string makefileName; + // Add a rule to build the target by name. + localName = lg->GetRelativeTargetDirectory(t->second); + makefileName = localName; + makefileName += "/build.make"; + + bool needRequiresStep = this->NeedRequiresStep(t->second); + + lg->WriteDivider(ruleFileStream); + ruleFileStream + << "# Target rules for target " + << localName << "\n\n"; + + commands.clear(); + makeTargetName = localName; + makeTargetName += "/depend"; + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(),makeTargetName.c_str())); + + // add requires if we need it for this generator + if (needRequiresStep) + { + makeTargetName = localName; + makeTargetName += "/requires"; + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(),makeTargetName.c_str())); + } + makeTargetName = localName; + makeTargetName += "/build"; + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(),makeTargetName.c_str())); + + // Write the rule. + localName += "/all"; + depends.clear(); + + std::string progressDir = + lg->GetMakefile()->GetHomeOutputDirectory(); + progressDir += cmake::GetCMakeFilesDirectory(); + { + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; + // all target counts + progCmd << lg->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " "; + std::vector &progFiles = lg->ProgressFiles[t->first]; + for (std::vector::iterator i = progFiles.begin(); + i != progFiles.end(); ++i) + { + progCmd << " " << *i; + } + commands.push_back(progCmd.str()); + } + progressDir = "Built target "; + progressDir += t->first; + lg->AppendEcho(commands,progressDir.c_str()); + + this->AppendGlobalTargetDepends(depends,t->second); + lg->WriteMakeRule(ruleFileStream, "All Build rule for target.", + localName.c_str(), depends, commands, true); + + // add the all/all dependency + if(!this->IsExcluded(this->LocalGenerators[0], t->second)) + { + depends.clear(); + depends.push_back(localName); + commands.clear(); + lg->WriteMakeRule(ruleFileStream, "Include target in all.", + "all", depends, commands, true); + } + + // Write the rule. + commands.clear(); + progressDir = lg->GetMakefile()->GetHomeOutputDirectory(); + progressDir += cmake::GetCMakeFilesDirectory(); + + { + // TODO: Convert the total progress count to a make variable. + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; + // # in target + progCmd << lg->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + // + std::set emitted; + progCmd << " " + << this->GetTargetTotalNumberOfActions(t->second, + emitted); + commands.push_back(progCmd.str()); + } + std::string tmp = cmake::GetCMakeFilesDirectoryPostSlash(); + tmp += "Makefile2"; + commands.push_back(lg->GetRecursiveMakeCall + (tmp.c_str(),localName.c_str())); + { + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 + progCmd << lg->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " 0"; + commands.push_back(progCmd.str()); + } + depends.clear(); + depends.push_back("cmake_check_build_system"); + localName = lg->GetRelativeTargetDirectory(t->second); + localName += "/rule"; + lg->WriteMakeRule(ruleFileStream, + "Build rule for subdir invocation for target.", + localName.c_str(), depends, commands, true); + + // Add a target with the canonical name (no prefix, suffix or path). + commands.clear(); + depends.clear(); + depends.push_back(localName); + lg->WriteMakeRule(ruleFileStream, "Convenience name for target.", + t->second.GetName(), depends, commands, true); + + // Add rules to prepare the target for installation. + if(t->second.NeedRelinkBeforeInstall()) + { + localName = lg->GetRelativeTargetDirectory(t->second); + localName += "/preinstall"; + depends.clear(); + commands.clear(); + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(), localName.c_str())); + lg->WriteMakeRule(ruleFileStream, + "Pre-install relink rule for target.", + localName.c_str(), depends, commands, true); + + if(!this->IsExcluded(this->LocalGenerators[0], t->second)) + { + depends.clear(); + depends.push_back(localName); + commands.clear(); + lg->WriteMakeRule(ruleFileStream, "Prepare target for install.", + "preinstall", depends, commands, true); + } + } + + // add the clean rule + localName = lg->GetRelativeTargetDirectory(t->second); + makeTargetName = localName; + makeTargetName += "/clean"; + depends.clear(); + commands.clear(); + commands.push_back(lg->GetRecursiveMakeCall + (makefileName.c_str(), makeTargetName.c_str())); + lg->WriteMakeRule(ruleFileStream, "clean rule for target.", + makeTargetName.c_str(), depends, commands, true); + commands.clear(); + depends.push_back(makeTargetName); + lg->WriteMakeRule(ruleFileStream, "clean rule for target.", + "clean", depends, commands, true); + } + } +} + +//---------------------------------------------------------------------------- +int cmGlobalUnixMakefileGenerator3 +::GetTargetTotalNumberOfActions(cmTarget & target, + std::set &emitted) +{ + // do not double count + int result = 0; + + if(emitted.insert(target.GetName()).second) + { + cmLocalUnixMakefileGenerator3 *lg = + static_cast + (target.GetMakefile()->GetLocalGenerator()); + result = static_cast(lg->ProgressFiles[target.GetName()].size()); + + TargetDependSet & depends = this->GetTargetDirectDepends(target); + + TargetDependSet::iterator i; + for (i = depends.begin(); i != depends.end(); ++i) + { + result += this->GetTargetTotalNumberOfActions(**i, emitted); + } + } + + return result; +} + +unsigned long cmGlobalUnixMakefileGenerator3 +::GetNumberOfProgressActionsInAll(cmLocalUnixMakefileGenerator3 *lg) +{ + unsigned long result = 0; + std::set emitted; + std::set& targets = this->LocalGeneratorToTargetMap[lg]; + for(std::set::iterator t = targets.begin(); + t != targets.end(); ++t) + { + result += this->GetTargetTotalNumberOfActions(**t,emitted); + } + return result; +} + + +//---------------------------------------------------------------------------- +void +cmGlobalUnixMakefileGenerator3 +::AppendGlobalTargetDepends(std::vector& depends, + cmTarget& target) +{ + TargetDependSet const& depends_set = this->GetTargetDirectDepends(target); + for(TargetDependSet::const_iterator i = depends_set.begin(); + i != depends_set.end(); ++i) + { + // Create the target-level dependency. + cmTarget const* dep = *i; + cmLocalUnixMakefileGenerator3* lg3 = + static_cast + (dep->GetMakefile()->GetLocalGenerator()); + std::string tgtName = lg3->GetRelativeTargetDirectory(*dep); + tgtName += "/all"; + depends.push_back(tgtName); + } +} + +//---------------------------------------------------------------------------- +void cmGlobalUnixMakefileGenerator3::WriteHelpRule +(std::ostream& ruleFileStream, cmLocalUnixMakefileGenerator3 *lg) +{ + // add the help target + std::string path; + std::vector no_depends; + std::vector commands; + lg->AppendEcho(commands,"The following are some of the valid targets " + "for this Makefile:"); + lg->AppendEcho(commands,"... all (the default if no target is provided)"); + lg->AppendEcho(commands,"... clean"); + lg->AppendEcho(commands,"... depend"); + + // Keep track of targets already listed. + std::set emittedTargets; + + // for each local generator + unsigned int i; + cmLocalUnixMakefileGenerator3 *lg2; + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + lg2 = + static_cast(this->LocalGenerators[i]); + // for the passed in makefile or if this is the top Makefile wripte out + // the targets + if (lg2 == lg || !lg->GetParent()) + { + // for each target Generate the rule files for each target. + cmTargets& targets = lg2->GetMakefile()->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + if((t->second.GetType() == cmTarget::EXECUTABLE) || + (t->second.GetType() == cmTarget::STATIC_LIBRARY) || + (t->second.GetType() == cmTarget::SHARED_LIBRARY) || + (t->second.GetType() == cmTarget::MODULE_LIBRARY) || + (t->second.GetType() == cmTarget::GLOBAL_TARGET) || + (t->second.GetType() == cmTarget::UTILITY)) + { + if(emittedTargets.insert(t->second.GetName()).second) + { + path = "... "; + path += t->second.GetName(); + lg->AppendEcho(commands,path.c_str()); + } + } + } + std::vector const& localHelp = lg->GetLocalHelp(); + for(std::vector::const_iterator o = localHelp.begin(); + o != localHelp.end(); ++o) + { + path = "... "; + path += *o; + lg->AppendEcho(commands, path.c_str()); + } + } + } + lg->WriteMakeRule(ruleFileStream, "Help Target", + "help", + no_depends, commands, true); + ruleFileStream << "\n\n"; +} + + +bool cmGlobalUnixMakefileGenerator3 +::NeedRequiresStep(cmTarget const& target) +{ + std::set languages; + target.GetLanguages(languages); + for(std::set::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + std::string var = "CMAKE_NEEDS_REQUIRES_STEP_"; + var += *l; + var += "_FLAG"; + if(target.GetMakefile()->GetDefinition(var.c_str())) + { + return true; + } + } + return false; +} diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h new file mode 100644 index 000000000..8c4fdcd6e --- /dev/null +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -0,0 +1,183 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator3 + Module: $RCSfile: cmGlobalUnixMakefileGenerator3.h,v $ + Language: C++ + Date: $Date: 2008-02-14 21:42:29 $ + Version: $Revision: 1.55 $ + + Copyright (c) 2005 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalUnixMakefileGenerator3_h +#define cmGlobalUnixMakefileGenerator3_h + +#include "cmGlobalGenerator.h" + +class cmGeneratedFileStream; +class cmLocalUnixMakefileGenerator3; + +/** \class cmGlobalUnixMakefileGenerator3 + * \brief Write a Unix makefiles. + * + * cmGlobalUnixMakefileGenerator3 manages UNIX build process for a tree + + + The basic approach of this generator is to produce Makefiles that will all + be run with the current working directory set to the Home Output + directory. The one exception to this is the subdirectory Makefiles which are + created as a convenience and just cd up to the Home Output directory and + invoke the main Makefiles. + + The make process starts with Makefile. Makefile should only contain the + targets the user is likely to invoke directly from a make command line. No + internal targets should be in this file. Makefile2 contains the internal + targets that are required to make the process work. + + Makefile2 in turn will recursively make targets in the correct order. Each + target has its own directory .dir and its own makefile build.make in + that directory. Also in that directory is a couple makefiles per source file + used by the target. Typically these are named source.obj.build.make and + source.obj.build.depend.make. The source.obj.build.make contains the rules + for building, cleaning, and computing dependencies for the given source + file. The build.depend.make contains additional dependencies that were + computed during dependency scanning. An additional file called + source.obj.depend is used as a marker to indicate when dependencies must be + rescanned. + + Rules for custom commands follow the same model as rules for source files. + + */ + +class cmGlobalUnixMakefileGenerator3 : public cmGlobalGenerator +{ +public: + cmGlobalUnixMakefileGenerator3(); + static cmGlobalGenerator* New() { + return new cmGlobalUnixMakefileGenerator3; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalUnixMakefileGenerator3::GetActualName();} + static const char* GetActualName() {return "Unix Makefiles";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator3 + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + + /** + * Generate the all required files for building this project/tree. This + * basically creates a series of LocalGenerators for each directory and + * requests that they Generate. + */ + virtual void Generate(); + + + void WriteMainCMakefileLanguageRules(cmGeneratedFileStream& cmakefileStream, + std::vector &); + + // write out the help rule listing the valid targets + void WriteHelpRule(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3 *); + + // write the top lvel target rules + void WriteConvenienceRules(std::ostream& ruleFileStream, + std::set &emitted); + + /** Get the command to use for a target that has no rule. This is + used for multiple output dependencies and for cmake_force. */ + std::string GetEmptyRuleHackCommand() { return this->EmptyRuleHackCommand; } + + /** Get the fake dependency to use when a rule has no real commands + or dependencies. */ + std::string GetEmptyRuleHackDepends() { return this->EmptyRuleHackDepends; } + + // change the build command for speed + virtual std::string GenerateBuildCommand + (const char* makeProgram, + const char *projectName, const char* additionalOptions, + const char *targetName, + const char* config, bool ignoreErrors, bool fast); + + // returns some progress informaiton + int GetTargetTotalNumberOfActions(cmTarget & target, + std::set &emitted); + unsigned long GetNumberOfProgressActionsInAll + (cmLocalUnixMakefileGenerator3 *lg); + + /** + * If true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have effect + * anymore. Set it to true when writing a generator where short output + * doesn't make sense, e.g. because the full output is parsed by an + * IDE/editor. + */ + bool GetForceVerboseMakefiles() { return this->ForceVerboseMakefiles; } + void SetForceVerboseMakefiles(bool enable) + {this->ForceVerboseMakefiles=enable;} + +protected: + void WriteMainMakefile2(); + void WriteMainCMakefile(); + + void WriteConvenienceRules2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3*); + + void WriteDirectoryRule2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3* lg, + const char* pass, bool check_all, + bool check_relink); + void WriteDirectoryRules2(std::ostream& ruleFileStream, + cmLocalUnixMakefileGenerator3* lg); + + void AppendGlobalTargetDepends(std::vector& depends, + cmTarget& target); + + // does this generator need a requires step for any of its targets + bool NeedRequiresStep(cmTarget const&); + + // Setup target names + virtual const char* GetAllTargetName() { return "all"; } + virtual const char* GetInstallTargetName() { return "install"; } + virtual const char* GetInstallLocalTargetName() { return "install/local"; } + virtual const char* GetInstallStripTargetName() { return "install/strip"; } + virtual const char* GetPreinstallTargetName() { return "preinstall"; } + virtual const char* GetTestTargetName() { return "test"; } + virtual const char* GetPackageTargetName() { return "package"; } + virtual const char* GetPackageSourceTargetName(){ return "package_source"; } + virtual const char* GetEditCacheTargetName() { return "edit_cache"; } + virtual const char* GetRebuildCacheTargetName() { return "rebuild_cache"; } + virtual const char* GetCleanTargetName() { return "clean"; } + + virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() { return true; } + + // Some make programs (Borland) do not keep a rule if there are no + // dependencies or commands. This is a problem for creating rules + // that might not do anything but might have other dependencies + // added later. If non-empty this variable holds a fake dependency + // that can be added. + std::string EmptyRuleHackDepends; + + // Some make programs (Watcom) do not like rules with no commands. + // If non-empty this variable holds a bogus command that may be put + // in the rule to satisfy the make program. + std::string EmptyRuleHackCommand; + + std::map TargetSourceFileCount; + bool ForceVerboseMakefiles; +}; + +#endif diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx new file mode 100644 index 000000000..0e6a59df5 --- /dev/null +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -0,0 +1,505 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio6Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.75 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalVisualStudio6Generator.h" +#include "cmLocalVisualStudio6Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + +cmGlobalVisualStudio6Generator::cmGlobalVisualStudio6Generator() +{ + this->FindMakeProgramFile = "CMakeVS6FindMake.cmake"; +} + +void cmGlobalVisualStudio6Generator +::EnableLanguage(std::vectorconst& lang, + cmMakefile *mf, + bool optional) +{ + mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); + mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); + mf->AddDefinition("CMAKE_GENERATOR_Fortran", "ifort"); + mf->AddDefinition("MSVC60", "1"); + this->GenerateConfigurations(mf); + this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); +} + +void cmGlobalVisualStudio6Generator::GenerateConfigurations(cmMakefile* mf) +{ + std::string fname= mf->GetRequiredDefinition("CMAKE_ROOT"); + const char* def= mf->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY"); + if(def) + { + fname = def; + } + else + { + fname += "/Templates"; + } + fname += "/CMakeVisualStudio6Configurations.cmake"; + if(!mf->ReadListFile(mf->GetCurrentListFile(), fname.c_str())) + { + cmSystemTools::Error("Cannot open ", fname.c_str(), + ". Please copy this file from the main " + "CMake/Templates directory and edit it for " + "your build configurations."); + } + else if(!mf->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::Error("CMAKE_CONFIGURATION_TYPES not set by ", + fname.c_str(), + ". Please copy this file from the main " + "CMake/Templates directory and edit it for " + "your build configurations."); + } +} + +std::string cmGlobalVisualStudio6Generator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors, + bool) +{ + // Ingoring errors is not implemented in visual studio 6 + (void) ignoreErrors; + + // now build the test + std::vector mp; + mp.push_back("[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio" + "\\6.0\\Setup;VsCommonDir]/MSDev98/Bin"); + cmSystemTools::ExpandRegistryValues(mp[0]); + std::string originalCommand = makeProgram; + std::string makeCommand = + cmSystemTools::FindProgram(makeProgram, mp); + if(makeCommand.size() == 0) + { + std::string e = "Generator cannot find Visual Studio 6 msdev program \""; + e += originalCommand; + e += "\" specified by CMAKE_MAKE_PROGRAM cache entry. "; + e += "Please fix the setting."; + cmSystemTools::Error(e.c_str()); + return ""; + } + makeCommand = cmSystemTools::ConvertToOutputPath(makeCommand.c_str()); + + // if there are spaces in the makeCommand, assume a full path + // and convert it to a path with no spaces in it as the + // RunSingleCommand does not like spaces +#if defined(_WIN32) && !defined(__CYGWIN__) + if(makeCommand.find(' ') != std::string::npos) + { + cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand); + } +#endif + makeCommand += " "; + makeCommand += projectName; + makeCommand += ".dsw /MAKE \""; + bool clean = false; + if ( targetName && strcmp(targetName, "clean") == 0 ) + { + clean = true; + targetName = "ALL_BUILD"; + } + if (targetName && strlen(targetName)) + { + makeCommand += targetName; + } + else + { + makeCommand += "ALL_BUILD"; + } + makeCommand += " - "; + if(config && strlen(config)) + { + makeCommand += config; + } + else + { + makeCommand += "Debug"; + } + if(clean) + { + makeCommand += "\" /CLEAN"; + } + else + { + makeCommand += "\" /BUILD"; + } + if ( additionalOptions ) + { + makeCommand += " "; + makeCommand += additionalOptions; + } + return makeCommand; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio6Generator::CreateLocalGenerator() +{ + cmLocalGenerator *lg = new cmLocalVisualStudio6Generator; + lg->SetGlobalGenerator(this); + return lg; +} + + +void cmGlobalVisualStudio6Generator::Generate() +{ + // first do the superclass method + this->cmGlobalVisualStudioGenerator::Generate(); + + // Now write out the DSW + this->OutputDSWFile(); +} + +// Write a DSW file to the stream +void cmGlobalVisualStudio6Generator +::WriteDSWFile(std::ostream& fout,cmLocalGenerator* root, + std::vector& generators) +{ + // Write out the header for a DSW file + this->WriteDSWHeader(fout); + + // Get the home directory with the trailing slash + std::string homedir = root->GetMakefile()->GetStartOutputDirectory(); + homedir += "/"; + + unsigned int i; + bool doneAllBuild = false; + bool doneRunTests = false; + bool doneInstall = false; + bool doneEditCache = false; + bool doneRebuildCache = false; + bool donePackage = false; + + for(i = 0; i < generators.size(); ++i) + { + if(this->IsExcluded(root, generators[i])) + { + continue; + } + cmMakefile* mf = generators[i]->GetMakefile(); + + // Get the source directory from the makefile + std::string dir = mf->GetStartOutputDirectory(); + // remove the home directory and / from the source directory + // this gives a relative path + cmSystemTools::ReplaceString(dir, homedir.c_str(), ""); + + // Get the list of create dsp files names from the LocalGenerator, more + // than one dsp could have been created per input CMakeLists.txt file + // for each target + std::vector dspnames = + static_cast(generators[i]) + ->GetCreatedProjectNames(); + cmTargets &tgts = generators[i]->GetMakefile()->GetTargets(); + std::vector::iterator si = dspnames.begin(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + // special handling for the current makefile + if(mf == generators[0]->GetMakefile()) + { + dir = "."; // no subdirectory for project generated + // if this is the special ALL_BUILD utility, then + // make it depend on every other non UTILITY project. + // This is done by adding the names to the GetUtilities + // vector on the makefile + if(l->first == "ALL_BUILD" && !doneAllBuild) + { + unsigned int j; + for(j = 0; j < generators.size(); ++j) + { + cmTargets &atgts = generators[j]->GetMakefile()->GetTargets(); + for(cmTargets::iterator al = atgts.begin(); + al != atgts.end(); ++al) + { + if (!al->second.GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + if (al->second.GetType() == cmTarget::UTILITY || + al->second.GetType() == cmTarget::GLOBAL_TARGET) + { + l->second.AddUtility(al->first.c_str()); + } + else + { + l->second.AddLinkLibrary(al->first, cmTarget::GENERAL); + } + } + } + } + } + } + // Write the project into the DSW file + if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; + const cmCustomCommandLines& cmds = cc.GetCommandLines(); + std::string project = cmds[0][0]; + std::string location = cmds[0][1]; + this->WriteExternalProject(fout, project.c_str(), + location.c_str(), cc.GetDepends()); + } + else + { + bool skip = false; + // skip ALL_BUILD and RUN_TESTS if they have already been added + if(l->first == "ALL_BUILD" ) + { + if(doneAllBuild) + { + skip = true; + } + else + { + doneAllBuild = true; + } + } + if(l->first == "INSTALL") + { + if(doneInstall) + { + skip = true; + } + else + { + doneInstall = true; + } + } + if(l->first == "RUN_TESTS") + { + if(doneRunTests) + { + skip = true; + } + else + { + doneRunTests = true; + } + } + if(l->first == "EDIT_CACHE") + { + if(doneEditCache) + { + skip = true; + } + else + { + doneEditCache = true; + } + } + if(l->first == "REBUILD_CACHE") + { + if(doneRebuildCache) + { + skip = true; + } + else + { + doneRebuildCache = true; + } + } + if(l->first == "PACKAGE") + { + if(donePackage) + { + skip = true; + } + else + { + donePackage = true; + } + } + if(!skip) + { + this->WriteProject(fout, si->c_str(), dir.c_str(),l->second); + } + ++si; + } + } + } + + // Write the footer for the DSW file + this->WriteDSWFooter(fout); +} + +void cmGlobalVisualStudio6Generator +::OutputDSWFile(cmLocalGenerator* root, + std::vector& generators) +{ + if(generators.size() == 0) + { + return; + } + std::string fname = root->GetMakefile()->GetStartOutputDirectory(); + fname += "/"; + fname += root->GetMakefile()->GetProjectName(); + fname += ".dsw"; + std::ofstream fout(fname.c_str()); + if(!fout) + { + cmSystemTools::Error("Error can not open DSW file for write: ", + fname.c_str()); + cmSystemTools::ReportLastSystemError(""); + return; + } + this->WriteDSWFile(fout, root, generators); +} + +// output the DSW file +void cmGlobalVisualStudio6Generator::OutputDSWFile() +{ + std::map >::iterator it; + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + this->OutputDSWFile(it->second[0], it->second); + } +} + +// Write a dsp file into the DSW file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout, + const char* dspname, + const char* dir, + cmTarget& target) +{ + fout << "#########################################################" + "######################\n\n"; + fout << "Project: \"" << dspname << "\"=" + << dir << "\\" << dspname << ".dsp - Package Owner=<4>\n\n"; + fout << "Package=<5>\n{{{\n}}}\n\n"; + fout << "Package=<4>\n"; + fout << "{{{\n"; + + // insert Begin Project Dependency Project_Dep_Name project stuff here + if (target.GetType() != cmTarget::STATIC_LIBRARY) + { + cmTarget::LinkLibraryVectorType::const_iterator j, jend; + j = target.GetLinkLibraries().begin(); + jend = target.GetLinkLibraries().end(); + for(;j!= jend; ++j) + { + if(j->first != dspname) + { + // is the library part of this DSW ? If so add dependency + if(this->FindTarget(0, j->first.c_str())) + { + fout << "Begin Project Dependency\n"; + fout << "Project_Dep_Name " << j->first.c_str() << "\n"; + fout << "End Project Dependency\n"; + } + } + } + } + + std::set::const_iterator i, end; + // write utility dependencies. + i = target.GetUtilities().begin(); + end = target.GetUtilities().end(); + for(;i!= end; ++i) + { + if(*i != dspname) + { + std::string depName = this->GetUtilityForTarget(target, i->c_str()); + fout << "Begin Project Dependency\n"; + fout << "Project_Dep_Name " << depName << "\n"; + fout << "End Project Dependency\n"; + } + } + fout << "}}}\n\n"; +} + + +// Write a dsp file into the DSW file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void cmGlobalVisualStudio6Generator::WriteExternalProject(std::ostream& fout, + const char* name, + const char* location, + const std::vector& dependencies) +{ + fout << "#########################################################" + "######################\n\n"; + fout << "Project: \"" << name << "\"=" + << location << " - Package Owner=<4>\n\n"; + fout << "Package=<5>\n{{{\n}}}\n\n"; + fout << "Package=<4>\n"; + fout << "{{{\n"; + + + std::vector::const_iterator i, end; + // write dependencies. + i = dependencies.begin(); + end = dependencies.end(); + for(;i!= end; ++i) + { + fout << "Begin Project Dependency\n"; + fout << "Project_Dep_Name " << *i << "\n"; + fout << "End Project Dependency\n"; + } + fout << "}}}\n\n"; +} + + + +// Standard end of dsw file +void cmGlobalVisualStudio6Generator::WriteDSWFooter(std::ostream& fout) +{ + fout << "######################################################" + "#########################\n\n"; + fout << "Global:\n\n"; + fout << "Package=<5>\n{{{\n}}}\n\n"; + fout << "Package=<3>\n{{{\n}}}\n\n"; + fout << "#####################################################" + "##########################\n\n"; +} + + +// ouput standard header for dsw file +void cmGlobalVisualStudio6Generator::WriteDSWHeader(std::ostream& fout) +{ + fout << "Microsoft Developer Studio Workspace File, Format Version 6.00\n"; + fout << "# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\n\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio6Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 6 project files."; + entry.Full = ""; +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudio6Generator +::AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir) +{ + if(config) + { + dir += prefix; + dir += config; + dir += suffix; + } +} diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h new file mode 100644 index 000000000..1dde0c2fd --- /dev/null +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -0,0 +1,103 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio6Generator.h,v $ + Language: C++ + Date: $Date: 2007-06-28 13:09:26 $ + Version: $Revision: 1.29 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio6Generator_h +#define cmGlobalVisualStudio6Generator_h + +#include "cmGlobalVisualStudioGenerator.h" + +class cmTarget; + +/** \class cmGlobalVisualStudio6Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio6Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio6Generator : public cmGlobalVisualStudioGenerator +{ +public: + cmGlobalVisualStudio6Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio6Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio6Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 6";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + + /** + * Try running cmake and building a file. This is used for dynalically + * loaded commands, not as part of the usual build process. + */ + virtual std::string GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors, + bool fast); + + /** + * Generate the all required files for building this project/tree. This + * basically creates a series of LocalGenerators for each directory and + * requests that they Generate. + */ + virtual void Generate(); + + /** + * Generate the DSW workspace file. + */ + virtual void OutputDSWFile(); + virtual void OutputDSWFile(cmLocalGenerator* root, + std::vector& generators); + virtual void WriteDSWFile(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators); + + /** Append the subdirectory for the given configuration. */ + virtual void AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir); + + ///! What is the configurations directory variable called? + virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; } +private: + void GenerateConfigurations(cmMakefile* mf); + void WriteDSWFile(std::ostream& fout); + void WriteDSWHeader(std::ostream& fout); + void WriteProject(std::ostream& fout, + const char* name, const char* path, cmTarget &t); + void WriteExternalProject(std::ostream& fout, + const char* name, const char* path, + const std::vector& dependencies); + void WriteDSWFooter(std::ostream& fout); +}; + +#endif diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx new file mode 100644 index 000000000..45c76fdde --- /dev/null +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -0,0 +1,330 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio71Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.48.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio71Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + +//---------------------------------------------------------------------------- +cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator() +{ + this->FindMakeProgramFile = "CMakeVS71FindMake.cmake"; + this->ProjectConfigurationSectionName = "ProjectConfiguration"; +} + +//---------------------------------------------------------------------------- +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion71(); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS7()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio71Generator::AddPlatformDefinitions(cmMakefile* mf) +{ + mf->AddDefinition("MSVC71", "1"); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio71Generator::GetUserMacrosDirectory() +{ + // Macros not supported on Visual Studio 7.1 and earlier because + // they do not appear to work *during* a build when called by an + // outside agent... + // + return ""; + +#if 0 + // + // The COM result from calling a Visual Studio macro with 7.1 indicates + // that the call succeeds, but the macro does not appear to execute... + // + // So, I am leaving this code here to show how to do it, but have not + // yet figured out what the issue is in terms of why the macro does not + // appear to execute... + // + std::string base; + std::string path; + + // base begins with the VisualStudioProjectsLocation reg value... + if (cmSystemTools::ReadRegistryValue( + "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\7.1;" + "VisualStudioProjectsLocation", + base)) + { + cmSystemTools::ConvertToUnixSlashes(base); + + // 7.1 macros folder: + path = base + "/VSMacros71"; + } + + // path is (correctly) still empty if we did not read the base value from + // the Registry value + return path; +#endif +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio71Generator::GetUserMacrosRegKeyBase() +{ + // Macros not supported on Visual Studio 7.1 and earlier because + // they do not appear to work *during* a build when called by an + // outside agent... + // + return ""; + +#if 0 + return "Software\\Microsoft\\VisualStudio\\7.1\\vsmacros"; +#endif +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio71Generator +::WriteSLNFile(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators) +{ + // Write out the header for a SLN file + this->WriteSLNHeader(fout); + + // collect the set of targets for this project by + // tracing depends of all targets. + // also collect the set of targets that are explicitly + // in this project. + cmGlobalGenerator::TargetDependSet projectTargets; + cmGlobalGenerator::TargetDependSet originalTargets; + this->GetTargetSets(projectTargets, + originalTargets, + root, generators); + this->WriteTargetsToSolution(fout, root, projectTargets, originalTargets); + // Write out the configurations information for the solution + fout << "Global\n"; + // Write out the configurations for the solution + this->WriteSolutionConfigurations(fout); + fout << "\tGlobalSection(" << this->ProjectConfigurationSectionName + << ") = postSolution\n"; + // Write out the configurations for all the targets in the project + this->WriteTargetConfigurations(fout, root, projectTargets); + fout << "\tEndGlobalSection\n"; + // Write the footer for the SLN file + this->WriteSLNFooter(fout); +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudio71Generator +::WriteSolutionConfigurations(std::ostream& fout) +{ + fout << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\t" << *i << " = " << *i << "\n"; + } + fout << "\tEndGlobalSection\n"; +} + +//---------------------------------------------------------------------------- +// Write a dsp file into the SLN file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void +cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout, + const char* dspname, + const char* dir, + cmTarget& t) +{ + // check to see if this is a fortran build + const char* ext = ".vcproj"; + const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; + if(this->TargetIsFortranOnly(t)) + { + ext = ".vfproj"; + project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; + } + + fout << project + << dspname << "\", \"" + << this->ConvertToSolutionPath(dir) + << "\\" << dspname << ext << "\", \"{" + << this->GetGUID(dspname) << "}\"\n"; + fout << "\tProjectSection(ProjectDependencies) = postProject\n"; + this->WriteProjectDepends(fout, dspname, dir, t); + fout << "\tEndProjectSection\n"; + + fout <<"EndProject\n"; +} + +//---------------------------------------------------------------------------- +// Write a dsp file into the SLN file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void +cmGlobalVisualStudio71Generator +::WriteProjectDepends(std::ostream& fout, + const char* dspname, + const char*, cmTarget& target) +{ +#if 0 + // Create inter-target dependencies in the solution file. For VS + // 7.1 and below we cannot let static libraries depend directly on + // targets to which they "link" because the librarian tool will copy + // the targets into the static library. See + // cmGlobalVisualStudioGenerator::FixUtilityDependsForTarget for a + // work-around. VS 8 and above do not have this problem. + if (!this->VSLinksDependencies() || + target.GetType() != cmTarget::STATIC_LIBRARY); +#else + if (target.GetType() != cmTarget::STATIC_LIBRARY) +#endif + { + cmTarget::LinkLibraryVectorType::const_iterator j, jend; + j = target.GetLinkLibraries().begin(); + jend = target.GetLinkLibraries().end(); + for(;j!= jend; ++j) + { + if(j->first != dspname) + { + // is the library part of this SLN ? If so add dependency + // find target anywhere because all depend libraries are + // brought in as well + if(this->FindTarget(0, j->first.c_str())) + { + fout << "\t\t{" << this->GetGUID(j->first.c_str()) << "} = {" + << this->GetGUID(j->first.c_str()) << "}\n"; + } + } + } + } + + std::set::const_iterator i, end; + // write utility dependencies. + i = target.GetUtilities().begin(); + end = target.GetUtilities().end(); + for(;i!= end; ++i) + { + if(*i != dspname) + { + std::string name = this->GetUtilityForTarget(target, i->c_str()); + std::string guid = this->GetGUID(name.c_str()); + if(guid.size() == 0) + { + std::string m = "Target: "; + m += target.GetName(); + m += " depends on unknown target: "; + m += name; + cmSystemTools::Error(m.c_str()); + } + + fout << "\t\t{" << guid << "} = {" << guid << "}\n"; + } + } +} + +//---------------------------------------------------------------------------- +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio71Generator +::WriteExternalProject(std::ostream& fout, + const char* name, + const char* location, + const std::vector& depends) +{ + std::cout << "WriteExternalProject vs71\n"; + fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" + << name << "\", \"" + << this->ConvertToSolutionPath(location) << "\", \"{" + << this->GetGUID(name) + << "}\"\n"; + + // write out the dependencies here VS 7.1 includes dependencies with the + // project instead of in the global section + if(!depends.empty()) + { + fout << "\tProjectSection(ProjectDependencies) = postProject\n"; + std::vector::const_iterator it; + for(it = depends.begin(); it != depends.end(); ++it) + { + if(it->size() > 0) + { + fout << "\t\t{" + << this->GetGUID(it->c_str()) + << "} = {" + << this->GetGUID(it->c_str()) + << "}\n"; + } + } + fout << "\tEndProjectSection\n"; + } + + fout << "EndProject\n"; + + +} + +//---------------------------------------------------------------------------- +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio71Generator +::WriteProjectConfigurations(std::ostream& fout, const char* name, + bool partOfDefaultBuild) +{ + std::string guid = this->GetGUID(name); + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\t{" << guid << "}." << *i + << ".ActiveCfg = " << *i << "|Win32\n"; + if(partOfDefaultBuild) + { + fout << "\t\t{" << guid << "}." << *i + << ".Build.0 = " << *i << "|Win32\n"; + } + } +} + +//---------------------------------------------------------------------------- +// Standard end of dsw file +void cmGlobalVisualStudio71Generator::WriteSLNFooter(std::ostream& fout) +{ + fout << "\tGlobalSection(ExtensibilityGlobals) = postSolution\n" + << "\tEndGlobalSection\n" + << "\tGlobalSection(ExtensibilityAddIns) = postSolution\n" + << "\tEndGlobalSection\n" + << "EndGlobal\n"; +} + +//---------------------------------------------------------------------------- +// ouput standard header for dsw file +void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 8.00\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio71Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio .NET 2003 project files."; + entry.Full = ""; +} diff --git a/Source/cmGlobalVisualStudio71Generator.h b/Source/cmGlobalVisualStudio71Generator.h new file mode 100644 index 000000000..bcb432b66 --- /dev/null +++ b/Source/cmGlobalVisualStudio71Generator.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio71Generator.h,v $ + Language: C++ + Date: $Date: 2008-02-15 16:49:58 $ + Version: $Revision: 1.18 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio71Generator_h +#define cmGlobalVisualStudio71Generator_h + +#include "cmGlobalVisualStudio7Generator.h" + + +/** \class cmGlobalVisualStudio71Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio71Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio71Generator : public cmGlobalVisualStudio7Generator +{ +public: + cmGlobalVisualStudio71Generator(); + static cmGlobalGenerator* New() + { return new cmGlobalVisualStudio71Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio71Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 7 .NET 2003";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Where does this version of Visual Studio look for macros for the + * current user? Returns the empty string if this version of Visual + * Studio does not implement support for VB macros. + */ + virtual std::string GetUserMacrosDirectory(); + + /** + * What is the reg key path to "vsmacros" for this version of Visual + * Studio? + */ + virtual std::string GetUserMacrosRegKeyBase(); + +protected: + virtual void AddPlatformDefinitions(cmMakefile* mf); + virtual void WriteSLNFile(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators); + virtual void WriteSolutionConfigurations(std::ostream& fout); + virtual void WriteProject(std::ostream& fout, + const char* name, const char* path, cmTarget &t); + virtual void WriteProjectDepends(std::ostream& fout, + const char* name, const char* path, cmTarget &t); + virtual void WriteProjectConfigurations(std::ostream& fout, + const char* name, + bool partOfDefaultBuild); + virtual void WriteExternalProject(std::ostream& fout, + const char* name, + const char* path, + const std::vector& depends); + virtual void WriteSLNFooter(std::ostream& fout); + virtual void WriteSLNHeader(std::ostream& fout); + + std::string ProjectConfigurationSectionName; +}; +#endif diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx new file mode 100644 index 000000000..27dea766d --- /dev/null +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -0,0 +1,759 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio7Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.99.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio7Generator.h" +#include "cmGeneratedFileStream.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + +cmGlobalVisualStudio7Generator::cmGlobalVisualStudio7Generator() +{ + this->FindMakeProgramFile = "CMakeVS7FindMake.cmake"; +} + + +void cmGlobalVisualStudio7Generator +::EnableLanguage(std::vectorconst & lang, + cmMakefile *mf, bool optional) +{ + mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_RC", "rc"); + mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); + mf->AddDefinition("CMAKE_GENERATOR_FC", "ifort"); + + this->AddPlatformDefinitions(mf); + + // Create list of configurations requested by user's cache, if any. + this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); + this->GenerateConfigurations(mf); + + // if this environment variable is set, then copy it to + // a static cache entry. It will be used by + // cmLocalGenerator::ConstructScript, to add an extra PATH + // to all custom commands. This is because the VS IDE + // does not use the environment it is run in, and this allows + // for running commands and using dll's that the IDE environment + // does not know about. + const char* extraPath = cmSystemTools::GetEnv("CMAKE_MSVCIDE_RUN_PATH"); + if(extraPath) + { + mf->AddCacheDefinition + ("CMAKE_MSVCIDE_RUN_PATH", extraPath, + "Saved environment variable CMAKE_MSVCIDE_RUN_PATH", + cmCacheManager::STATIC); + } + +} + +void cmGlobalVisualStudio7Generator::AddPlatformDefinitions(cmMakefile* mf) +{ + mf->AddDefinition("MSVC70", "1"); +} + +std::string cmGlobalVisualStudio7Generator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, const char *targetName, + const char* config, bool ignoreErrors, bool) +{ + // Ingoring errors is not implemented in visual studio 6 + (void) ignoreErrors; + + // now build the test + std::string makeCommand = + cmSystemTools::ConvertToOutputPath(makeProgram); + std::string lowerCaseCommand = makeCommand; + cmSystemTools::LowerCase(lowerCaseCommand); + + // if there are spaces in the makeCommand, assume a full path + // and convert it to a path with no spaces in it as the + // RunSingleCommand does not like spaces +#if defined(_WIN32) && !defined(__CYGWIN__) + if(makeCommand.find(' ') != std::string::npos) + { + cmSystemTools::GetShortPath(makeCommand.c_str(), makeCommand); + } +#endif + makeCommand += " "; + makeCommand += projectName; + makeCommand += ".sln "; + bool clean = false; + if ( targetName && strcmp(targetName, "clean") == 0 ) + { + clean = true; + targetName = "ALL_BUILD"; + } + if(clean) + { + makeCommand += "/clean "; + } + else + { + makeCommand += "/build "; + } + + if(config && strlen(config)) + { + makeCommand += config; + } + else + { + makeCommand += "Debug"; + } + makeCommand += " /project "; + + if (targetName && strlen(targetName)) + { + makeCommand += targetName; + } + else + { + makeCommand += "ALL_BUILD"; + } + if ( additionalOptions ) + { + makeCommand += " "; + makeCommand += additionalOptions; + } + return makeCommand; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetExtraFlagTable(this->GetExtraFlagTableVS7()); + lg->SetGlobalGenerator(this); + return lg; +} + +void cmGlobalVisualStudio7Generator::GenerateConfigurations(cmMakefile* mf) +{ + // process the configurations + const char* ct + = this->CMakeInstance->GetCacheDefinition("CMAKE_CONFIGURATION_TYPES"); + if ( ct ) + { + std::vector argsOut; + cmSystemTools::ExpandListArgument(ct, argsOut); + for(std::vector::iterator i = argsOut.begin(); + i != argsOut.end(); ++i) + { + if(std::find(this->Configurations.begin(), + this->Configurations.end(), + *i) == this->Configurations.end()) + { + this->Configurations.push_back(*i); + } + } + } + // default to at least Debug and Release + if(this->Configurations.size() == 0) + { + this->Configurations.push_back("Debug"); + this->Configurations.push_back("Release"); + } + + // Reset the entry to have a semi-colon separated list. + std::string configs = this->Configurations[0]; + for(unsigned int i=1; i < this->Configurations.size(); ++i) + { + configs += ";"; + configs += this->Configurations[i]; + } + + mf->AddCacheDefinition( + "CMAKE_CONFIGURATION_TYPES", + configs.c_str(), + "Semicolon separated list of supported configuration types, " + "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " + "anything else will be ignored.", + cmCacheManager::STRING); +} + +void cmGlobalVisualStudio7Generator::Generate() +{ + // first do the superclass method + this->cmGlobalVisualStudioGenerator::Generate(); + + // Now write out the DSW + this->OutputSLNFile(); + + // If any solution or project files changed during the generation, + // tell Visual Studio to reload them... + if(!cmSystemTools::GetErrorOccuredFlag()) + { + this->CallVisualStudioMacro(MacroReload); + } +} + +void cmGlobalVisualStudio7Generator +::OutputSLNFile(cmLocalGenerator* root, + std::vector& generators) +{ + if(generators.size() == 0) + { + return; + } + this->CurrentProject = root->GetMakefile()->GetProjectName(); + std::string fname = root->GetMakefile()->GetStartOutputDirectory(); + fname += "/"; + fname += root->GetMakefile()->GetProjectName(); + fname += ".sln"; + cmGeneratedFileStream fout(fname.c_str()); + fout.SetCopyIfDifferent(true); + if(!fout) + { + return; + } + this->WriteSLNFile(fout, root, generators); + if (fout.Close()) + { + this->FileReplacedDuringGenerate(fname); + } +} + +// output the SLN file +void cmGlobalVisualStudio7Generator::OutputSLNFile() +{ + std::map >::iterator it; + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + this->OutputSLNFile(it->second[0], it->second); + } +} + + +void cmGlobalVisualStudio7Generator::AddAllBuildDepends( + cmLocalGenerator* root, + cmTarget* target, + cmGlobalGenerator::TargetDependSet& originalTargets) +{ + // if this is the special ALL_BUILD utility, then + // make it depend on every other non UTILITY project. + for(cmGlobalGenerator::TargetDependSet::iterator ot = + originalTargets.begin(); ot != originalTargets.end(); ++ot) + { + cmTarget* t = const_cast(*ot); + if(!this->IsExcluded(root, *t)) + { + if (t->GetType() == cmTarget::UTILITY || + t->GetType() == cmTarget::GLOBAL_TARGET) + { + target->AddUtility(t->GetName()); + } + else + { + target->AddLinkLibrary(t->GetName(),cmTarget::GENERAL); + } + } + } +} + +void cmGlobalVisualStudio7Generator::WriteTargetConfigurations( + std::ostream& fout, + cmLocalGenerator* root, + cmGlobalGenerator::TargetDependSet& projectTargets) +{ + // loop over again and write out configurations for each target + // in the solution + for(cmGlobalGenerator::TargetDependSet::iterator tt = + projectTargets.begin(); tt != projectTargets.end(); ++tt) + { + cmTarget* target = const_cast(*tt); + if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = target->GetPostBuildCommands()[0]; + const cmCustomCommandLines& cmds = cc.GetCommandLines(); + std::string project = cmds[0][0]; + this->WriteProjectConfigurations(fout, project.c_str(), + true); + } + else + { + bool partOfDefaultBuild = this->IsPartOfDefaultBuild( + root->GetMakefile()->GetProjectName(), target); + const char *vcprojName = + target->GetProperty("GENERATOR_FILE_NAME"); + if (vcprojName) + { + this->WriteProjectConfigurations(fout, vcprojName, + partOfDefaultBuild); + } + } + } +} + + +void cmGlobalVisualStudio7Generator::WriteTargetsToSolution( + std::ostream& fout, + cmLocalGenerator* root, + cmGlobalGenerator::TargetDependSet& projectTargets, + cmGlobalGenerator::TargetDependSet& originalTargets + ) +{ + std::string rootdir = root->GetMakefile()->GetStartOutputDirectory(); + rootdir += "/"; + for(cmGlobalGenerator::TargetDependSet::iterator tt = + projectTargets.begin(); tt != projectTargets.end(); ++tt) + { + cmTarget* target = const_cast(*tt); + cmMakefile* mf = target->GetMakefile(); + // look for the all_build rule and add depends to all + // of the original targets (none that were "pulled" into this project) + if(mf == root->GetMakefile() && + strcmp(target->GetName(), "ALL_BUILD") == 0) + { + this->AddAllBuildDepends(root, target, originalTargets); + } + // handle external vc project files + if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = target->GetPostBuildCommands()[0]; + const cmCustomCommandLines& cmds = cc.GetCommandLines(); + std::string project = cmds[0][0]; + std::string location = cmds[0][1]; + this->WriteExternalProject(fout, project.c_str(), + location.c_str(), cc.GetDepends()); + } + else + { + bool skip = false; + // if it is a global target or the check build system target + // or the all_build target + // then only use the one that is for the root + if(target->GetType() == cmTarget::GLOBAL_TARGET + || !strcmp(target->GetName(), CMAKE_CHECK_BUILD_SYSTEM_TARGET) + || !strcmp(target->GetName(), this->GetAllTargetName())) + { + if(target->GetMakefile() != root->GetMakefile()) + { + skip = true; + } + } + // if not skipping the project then write it into the + // solution + if(!skip) + { + const char *vcprojName = + target->GetProperty("GENERATOR_FILE_NAME"); + if(vcprojName) + { + cmMakefile* tmf = target->GetMakefile(); + std::string dir = tmf->GetStartOutputDirectory(); + dir = root->Convert(dir.c_str(), + cmLocalGenerator::START_OUTPUT); + this->WriteProject(fout, vcprojName, dir.c_str(), + *target); + } + } + } + } +} + + +void cmGlobalVisualStudio7Generator::WriteTargetDepends( + std::ostream& fout, + cmGlobalGenerator::TargetDependSet& projectTargets + ) +{ + for(cmGlobalGenerator::TargetDependSet::iterator tt = + projectTargets.begin(); tt != projectTargets.end(); ++tt) + { + cmTarget* target = const_cast(*tt); + cmMakefile* mf = target->GetMakefile(); + if (strncmp(target->GetName(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = target->GetPostBuildCommands()[0]; + const cmCustomCommandLines& cmds = cc.GetCommandLines(); + std::string name = cmds[0][0]; + std::vector depends = cc.GetDepends(); + std::vector::iterator iter; + int depcount = 0; + for(iter = depends.begin(); iter != depends.end(); ++iter) + { + std::string guid = this->GetGUID(iter->c_str()); + if(guid.size() == 0) + { + std::string m = "Target: "; + m += target->GetName(); + m += " depends on unknown target: "; + m += iter->c_str(); + cmSystemTools::Error(m.c_str()); + } + + fout << "\t\t{" << this->GetGUID(name.c_str()) + << "}." << depcount << " = {" << guid.c_str() << "}\n"; + depcount++; + } + } + else + { + const char *vcprojName = + target->GetProperty("GENERATOR_FILE_NAME"); + if (vcprojName) + { + std::string dir = mf->GetStartDirectory(); + this->WriteProjectDepends(fout, vcprojName, + dir.c_str(), *target); + } + } + } +} +// Write a SLN file to the stream +void cmGlobalVisualStudio7Generator +::WriteSLNFile(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators) +{ + // Write out the header for a SLN file + this->WriteSLNHeader(fout); + + // collect the set of targets for this project by + // tracing depends of all targets. + // also collect the set of targets that are explicitly + // in this project. + cmGlobalGenerator::TargetDependSet projectTargets; + cmGlobalGenerator::TargetDependSet originalTargets; + this->GetTargetSets(projectTargets, + originalTargets, + root, generators); + this->WriteTargetsToSolution(fout, root, projectTargets, originalTargets); + // Write out the configurations information for the solution + fout << "Global\n" + << "\tGlobalSection(SolutionConfiguration) = preSolution\n"; + + int c = 0; + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\tConfigName." << c << " = " << *i << "\n"; + c++; + } + fout << "\tEndGlobalSection\n"; + // Write out project(target) depends + fout << "\tGlobalSection(ProjectDependencies) = postSolution\n"; + this->WriteTargetDepends(fout, projectTargets); + fout << "\tEndGlobalSection\n"; + + // Write out the configurations for all the targets in the project + fout << "\tGlobalSection(ProjectConfiguration) = postSolution\n"; + this->WriteTargetConfigurations(fout, root, projectTargets); + fout << "\tEndGlobalSection\n"; + + // Write the footer for the SLN file + this->WriteSLNFooter(fout); +} + +//---------------------------------------------------------------------------- +std::string +cmGlobalVisualStudio7Generator::ConvertToSolutionPath(const char* path) +{ + // Convert to backslashes. Do not use ConvertToOutputPath because + // we will add quoting ourselves, and we know these projects always + // use windows slashes. + std::string d = path; + std::string::size_type pos = 0; + while((pos = d.find('/', pos)) != d.npos) + { + d[pos++] = '\\'; + } + return d; +} + +// Write a dsp file into the SLN file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void cmGlobalVisualStudio7Generator::WriteProject(std::ostream& fout, + const char* dspname, + const char* dir, cmTarget& target) +{ + // check to see if this is a fortran build + const char* ext = ".vcproj"; + const char* project = "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""; + if(this->TargetIsFortranOnly(target)) + { + ext = ".vfproj"; + project = "Project(\"{6989167D-11E4-40FE-8C1A-2192A86A7E90}\") = \""; + } + + fout << project + << dspname << "\", \"" + << this->ConvertToSolutionPath(dir) + << "\\" << dspname << ext << "\", \"{" + << this->GetGUID(dspname) << "}\"\nEndProject\n"; +} + + + +// Write a dsp file into the SLN file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void +cmGlobalVisualStudio7Generator +::WriteProjectDepends(std::ostream& fout, + const char* dspname, + const char*, cmTarget& target) +{ + int depcount = 0; + // insert Begin Project Dependency Project_Dep_Name project stuff here + if (target.GetType() != cmTarget::STATIC_LIBRARY) + { + cmTarget::LinkLibraryVectorType::const_iterator j, jend; + j = target.GetLinkLibraries().begin(); + jend = target.GetLinkLibraries().end(); + for(;j!= jend; ++j) + { + if(j->first != dspname) + { + // is the library part of this SLN ? If so add dependency + if(this->FindTarget(0, j->first.c_str())) + { + std::string guid = this->GetGUID(j->first.c_str()); + if(guid.size() == 0) + { + std::string m = "Target: "; + m += dspname; + m += " depends on unknown target: "; + m += j->first.c_str(); + cmSystemTools::Error(m.c_str()); + } + fout << "\t\t{" << this->GetGUID(dspname) << "}." + << depcount << " = {" << guid << "}\n"; + depcount++; + } + } + } + } + + std::set::const_iterator i, end; + // write utility dependencies. + i = target.GetUtilities().begin(); + end = target.GetUtilities().end(); + for(;i!= end; ++i) + { + if(*i != dspname) + { + std::string name = this->GetUtilityForTarget(target, i->c_str()); + std::string guid = this->GetGUID(name.c_str()); + if(guid.size() == 0) + { + std::string m = "Target: "; + m += dspname; + m += " depends on unknown target: "; + m += name.c_str(); + cmSystemTools::Error(m.c_str()); + } + + fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {" + << guid << "}\n"; + depcount++; + } + } +} + + +// Write a dsp file into the SLN file, Note, that dependencies from +// executables to the libraries it uses are also done here +void cmGlobalVisualStudio7Generator +::WriteProjectConfigurations(std::ostream& fout, const char* name, + bool partOfDefaultBuild) +{ + std::string guid = this->GetGUID(name); + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\t{" << guid << "}." << *i + << ".ActiveCfg = " << *i << "|Win32\n"; + if(partOfDefaultBuild) + { + fout << "\t\t{" << guid << "}." << *i + << ".Build.0 = " << *i << "|Win32\n"; + } + } +} + + + +// Write a dsp file into the SLN file, +// Note, that dependencies from executables to +// the libraries it uses are also done here +void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, + const char* name, + const char* location, + const std::vector&) +{ + std::cout << "WriteExternalProject vs7\n"; + std::string d = cmSystemTools::ConvertToOutputPath(location); + fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" + << name << "\", \"" + << this->ConvertToSolutionPath(location) << "\", \"{" + << this->GetGUID(name) + << "}\"\n"; + fout << "EndProject\n"; +} + + + +// Standard end of dsw file +void cmGlobalVisualStudio7Generator::WriteSLNFooter(std::ostream& fout) +{ + fout << "\tGlobalSection(ExtensibilityGlobals) = postSolution\n" + << "\tEndGlobalSection\n" + << "\tGlobalSection(ExtensibilityAddIns) = postSolution\n" + << "\tEndGlobalSection\n" + << "EndGlobal\n"; +} + + +// ouput standard header for dsw file +void cmGlobalVisualStudio7Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 7.00\n"; +} + +std::string cmGlobalVisualStudio7Generator::GetGUID(const char* name) +{ + std::string guidStoreName = name; + guidStoreName += "_GUID_CMAKE"; + const char* storedGUID = + this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str()); + if(storedGUID) + { + return std::string(storedGUID); + } + cmSystemTools::Error("Unknown Target referenced : ", + name); + return ""; +} + + +void cmGlobalVisualStudio7Generator::CreateGUID(const char* name) +{ + std::string guidStoreName = name; + guidStoreName += "_GUID_CMAKE"; + if(this->CMakeInstance->GetCacheDefinition(guidStoreName.c_str())) + { + return; + } + std::string ret; + UUID uid; + unsigned char *uidstr; + UuidCreate(&uid); + UuidToString(&uid,&uidstr); + ret = reinterpret_cast(uidstr); + RpcStringFree(&uidstr); + ret = cmSystemTools::UpperCase(ret); + this->CMakeInstance->AddCacheEntry(guidStoreName.c_str(), + ret.c_str(), "Stored GUID", + cmCacheManager::INTERNAL); +} + +std::vector *cmGlobalVisualStudio7Generator::GetConfigurations() +{ + return &this->Configurations; +}; + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio7Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio .NET 2002 project files."; + entry.Full = ""; +} + +// make sure "special" targets have GUID's +void cmGlobalVisualStudio7Generator::Configure() +{ + cmGlobalGenerator::Configure(); + this->CreateGUID("ALL_BUILD"); + this->CreateGUID("INSTALL"); + this->CreateGUID("RUN_TESTS"); + this->CreateGUID("EDIT_CACHE"); + this->CreateGUID("REBUILD_CACHE"); + this->CreateGUID("PACKAGE"); +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudio7Generator +::AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir) +{ + if(config) + { + dir += prefix; + dir += config; + dir += suffix; + } +} + +bool cmGlobalVisualStudio7Generator::IsPartOfDefaultBuild(const char* project, + cmTarget* target) +{ + if(target->GetPropertyAsBool("EXCLUDE_FROM_DEFAULT_BUILD")) + { + return false; + } + // if it is a utilitiy target then only make it part of the + // default build if another target depends on it + int type = target->GetType(); + if (type == cmTarget::GLOBAL_TARGET) + { + return false; + } + if(type == cmTarget::UTILITY) + { + return this->IsDependedOn(project, target); + } + // default is to be part of the build + return true; +} + +//---------------------------------------------------------------------------- +static cmVS7FlagTable cmVS7ExtraFlagTable[] = +{ + // Precompiled header and related options. Note that the + // UsePrecompiledHeader entries are marked as "Continue" so that the + // corresponding PrecompiledHeaderThrough entry can be found. + {"UsePrecompiledHeader", "YX", "Automatically Generate", "2", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue}, + {"PrecompiledHeaderThrough", "YX", "Precompiled Header Name", "", + cmVS7FlagTable::UserValueRequired}, + {"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "3", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue}, + {"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "", + cmVS7FlagTable::UserValueRequired}, + + // Exception handling mode. If no entries match, it will be FALSE. + {"ExceptionHandling", "GX", "enable c++ exceptions", "TRUE", 0}, + {"ExceptionHandling", "EHsc", "enable c++ exceptions", "TRUE", 0}, + // The EHa option does not have an IDE setting. Let it go to false, + // and have EHa passed on the command line by leaving out the table + // entry. + + {0,0,0,0,0} +}; +cmVS7FlagTable const* cmGlobalVisualStudio7Generator::GetExtraFlagTableVS7() +{ + return cmVS7ExtraFlagTable; +} diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h new file mode 100644 index 000000000..5c3ff9021 --- /dev/null +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -0,0 +1,156 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio7Generator.h,v $ + Language: C++ + Date: $Date: 2008-01-31 21:38:45 $ + Version: $Revision: 1.45 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio7Generator_h +#define cmGlobalVisualStudio7Generator_h + +#include "cmGlobalVisualStudioGenerator.h" + +class cmTarget; +struct cmVS7FlagTable; + +/** \class cmGlobalVisualStudio7Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio7Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio7Generator : public cmGlobalVisualStudioGenerator +{ +public: + cmGlobalVisualStudio7Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio7Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio7Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 7";} + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + + /** + * Try running cmake and building a file. This is used for dynalically + * loaded commands, not as part of the usual build process. + */ + virtual std::string GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors, + bool fast); + + /** + * Generate the all required files for building this project/tree. This + * basically creates a series of LocalGenerators for each directory and + * requests that they Generate. + */ + virtual void Generate(); + + /** + * Generate the DSW workspace file. + */ + virtual void OutputSLNFile(); + + /** + * Get the list of configurations + */ + std::vector *GetConfigurations(); + + ///! Create a GUID or get an existing one. + void CreateGUID(const char* name); + std::string GetGUID(const char* name); + + ///! do configure step + virtual void Configure(); + + /** Append the subdirectory for the given configuration. */ + virtual void AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir); + + ///! What is the configurations directory variable called? + virtual const char* GetCMakeCFGInitDirectory() { return "$(OutDir)"; } + +protected: + static cmVS7FlagTable const* GetExtraFlagTableVS7(); + virtual void OutputSLNFile(cmLocalGenerator* root, + std::vector& generators); + virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, + std::vector& generators); + virtual void WriteProject(std::ostream& fout, + const char* name, const char* path, cmTarget &t); + virtual void WriteProjectDepends(std::ostream& fout, + const char* name, const char* path, cmTarget &t); + virtual void WriteProjectConfigurations(std::ostream& fout, + const char* name, + bool partOfDefaultBuild); + virtual void WriteSLNFooter(std::ostream& fout); + virtual void WriteSLNHeader(std::ostream& fout); + virtual void AddPlatformDefinitions(cmMakefile* mf); + + virtual void WriteTargetsToSolution( + std::ostream& fout, + cmLocalGenerator* root, + cmGlobalGenerator::TargetDependSet& projectTargets, + cmGlobalGenerator::TargetDependSet& originalTargets); + virtual void WriteTargetDepends( + std::ostream& fout, + cmGlobalGenerator::TargetDependSet& projectTargets); + virtual void WriteTargetConfigurations( + std::ostream& fout, + cmLocalGenerator* root, + cmGlobalGenerator::TargetDependSet& projectTargets); + + void AddAllBuildDepends(cmLocalGenerator* root, + cmTarget* target, + cmGlobalGenerator::TargetDependSet& targets); + + void GenerateConfigurations(cmMakefile* mf); + + virtual void WriteExternalProject(std::ostream& fout, + const char* name, + const char* path, + const std::vector& + dependencies); + + std::string ConvertToSolutionPath(const char* path); + + bool IsPartOfDefaultBuild(const char* project, + cmTarget* target); + std::vector Configurations; + std::map GUIDMap; + + // Set during OutputSLNFile with the name of the current project. + // There is one SLN file per project. + std::string CurrentProject; +}; + +#define CMAKE_CHECK_BUILD_SYSTEM_TARGET "ZERO_CHECK" + +#endif diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx new file mode 100644 index 000000000..beba8cfc1 --- /dev/null +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -0,0 +1,354 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio8Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:04 $ + Version: $Revision: 1.36.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio8Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" +#include "cmGeneratedFileStream.h" + +//---------------------------------------------------------------------------- +cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator() +{ + this->FindMakeProgramFile = "CMakeVS8FindMake.cmake"; + this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms"; + this->PlatformName = "Win32"; +} + +//---------------------------------------------------------------------------- +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion8(); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +// ouput standard header for dsw file +void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 9.00\n"; + fout << "# Visual Studio 2005\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio .NET 2005 project files."; + entry.Full = ""; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator::AddPlatformDefinitions(cmMakefile* mf) +{ + mf->AddDefinition("MSVC80", "1"); +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator::Configure() +{ + this->cmGlobalVisualStudio7Generator::Configure(); + this->CreateGUID(CMAKE_CHECK_BUILD_SYSTEM_TARGET); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio8Generator::GetUserMacrosDirectory() +{ + // Some VS8 sp0 versions cannot run macros. + // See http://support.microsoft.com/kb/928209 + const char* vc8sp1Registry = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\" + "InstalledProducts\\KB926601;"; + const char* vc8exSP1Registry = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\8.0\\" + "InstalledProducts\\KB926748;"; + std::string vc8sp1; + if (!cmSystemTools::ReadRegistryValue(vc8sp1Registry, vc8sp1) && + !cmSystemTools::ReadRegistryValue(vc8exSP1Registry, vc8sp1)) + { + return ""; + } + + std::string base; + std::string path; + + // base begins with the VisualStudioProjectsLocation reg value... + if (cmSystemTools::ReadRegistryValue( + "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\8.0;" + "VisualStudioProjectsLocation", + base)) + { + cmSystemTools::ConvertToUnixSlashes(base); + + // 8.0 macros folder: + path = base + "/VSMacros80"; + } + + // path is (correctly) still empty if we did not read the base value from + // the Registry value + return path; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio8Generator::GetUserMacrosRegKeyBase() +{ + return "Software\\Microsoft\\VisualStudio\\8.0\\vsmacros"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator::Generate() +{ + // Add a special target on which all other targets depend that + // checks the build system and optionally re-runs CMake. + const char* no_working_directory = 0; + std::vector no_depends; + std::map >::iterator it; + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + std::vector& generators = it->second; + if(!generators.empty()) + { + // Add the build-system check target to the first local + // generator of this project. + cmLocalVisualStudio7Generator* lg = + static_cast(generators[0]); + cmMakefile* mf = lg->GetMakefile(); + + // Skip the target if no regeneration is to be done. + if(mf->IsOn("CMAKE_SUPPRESS_REGENERATION")) + { + continue; + } + + std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND"); + cmCustomCommandLines noCommandLines; + mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false, + no_working_directory, no_depends, + noCommandLines); + cmTarget* tgt = mf->FindTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET); + if(!tgt) + { + cmSystemTools::Error("Error adding target " + CMAKE_CHECK_BUILD_SYSTEM_TARGET); + continue; + } + + // Create a list of all stamp files for this project. + std::vector stamps; + std::string stampList = cmake::GetCMakeFilesDirectoryPostSlash(); + stampList += "generate.stamp.list"; + { + std::string stampListFile = + generators[0]->GetMakefile()->GetCurrentOutputDirectory(); + stampListFile += "/"; + stampListFile += stampList; + std::string stampFile; + cmGeneratedFileStream fout(stampListFile.c_str()); + for(std::vector::const_iterator + gi = generators.begin(); gi != generators.end(); ++gi) + { + stampFile = (*gi)->GetMakefile()->GetCurrentOutputDirectory(); + stampFile += "/"; + stampFile += cmake::GetCMakeFilesDirectoryPostSlash(); + stampFile += "generate.stamp"; + stampFile = generators[0]->Convert(stampFile.c_str(), + cmLocalGenerator::START_OUTPUT); + fout << stampFile << "\n"; + stamps.push_back(stampFile); + } + } + + // Add a custom rule to re-run CMake if any input files changed. + { + // Collect the input files used to generate all targets in this + // project. + std::vector listFiles; + for(unsigned int j = 0; j < generators.size(); ++j) + { + cmMakefile* lmf = generators[j]->GetMakefile(); + listFiles.insert(listFiles.end(), lmf->GetListFiles().begin(), + lmf->GetListFiles().end()); + } + // Sort the list of input files and remove duplicates. + std::sort(listFiles.begin(), listFiles.end(), + std::less()); + std::vector::iterator new_end = + std::unique(listFiles.begin(), listFiles.end()); + listFiles.erase(new_end, listFiles.end()); + + // Create a rule to re-run CMake. + std::string stampName = cmake::GetCMakeFilesDirectoryPostSlash(); + stampName += "generate.stamp"; + const char* dsprule = mf->GetRequiredDefinition("CMAKE_COMMAND"); + cmCustomCommandLine commandLine; + commandLine.push_back(dsprule); + std::string argH = "-H"; + argH += lg->Convert(mf->GetHomeDirectory(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED, true); + commandLine.push_back(argH); + std::string argB = "-B"; + argB += lg->Convert(mf->GetHomeOutputDirectory(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED, true); + commandLine.push_back(argB); + commandLine.push_back("--check-stamp-list"); + commandLine.push_back(stampList.c_str()); + commandLine.push_back("--vs-solution-file"); + commandLine.push_back("\"$(SolutionPath)\""); + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Add the rule. Note that we cannot use the CMakeLists.txt + // file as the main dependency because it would get + // overwritten by the CreateVCProjBuildRule. + // (this could be avoided with per-target source files) + const char* no_main_dependency = 0; + const char* no_working_directory = 0; + mf->AddCustomCommandToOutput( + stamps, listFiles, + no_main_dependency, commandLines, "Checking Build System", + no_working_directory, true); + std::string ruleName = stamps[0]; + ruleName += ".rule"; + if(cmSourceFile* file = mf->GetSource(ruleName.c_str())) + { + tgt->AddSourceFile(file); + } + else + { + cmSystemTools::Error("Error adding rule for ", stamps[0].c_str()); + } + } + } + } + + // Now perform the main generation. + this->cmGlobalVisualStudio7Generator::Generate(); +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Generator::WriteSLNFile( + std::ostream& fout, cmLocalGenerator* root, + std::vector& generators) +{ + // Make all targets depend on their respective project's build + // system check target. + unsigned int i; + for(i = 0; i < generators.size(); ++i) + { + if(this->IsExcluded(root, generators[i])) + { + continue; + } + cmMakefile* mf = generators[i]->GetMakefile(); + cmTargets& tgts = mf->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + if(l->first == CMAKE_CHECK_BUILD_SYSTEM_TARGET) + { + for(unsigned int j = 0; j < generators.size(); ++j) + { + // Every target in all generators should depend on this target. + cmMakefile* lmf = generators[j]->GetMakefile(); + cmTargets &atgts = lmf->GetTargets(); + for(cmTargets::iterator al = atgts.begin(); al != atgts.end(); ++al) + { + al->second.AddUtility(l->first.c_str()); + } + } + } + } + } + + // Now write the solution file. + this->cmGlobalVisualStudio71Generator::WriteSLNFile(fout, root, generators); +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudio8Generator +::WriteSolutionConfigurations(std::ostream& fout) +{ + fout << "\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n"; + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\t" << *i << "|" << this->PlatformName << " = " << *i << "|" + << this->PlatformName << "\n"; + } + fout << "\tEndGlobalSection\n"; +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudio8Generator +::WriteProjectConfigurations(std::ostream& fout, const char* name, + bool partOfDefaultBuild) +{ + std::string guid = this->GetGUID(name); + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + fout << "\t\t{" << guid << "}." << *i + << "|" << this->PlatformName << ".ActiveCfg = " + << *i << "|" << this->PlatformName << "\n"; + if(partOfDefaultBuild) + { + fout << "\t\t{" << guid << "}." << *i + << "|" << this->PlatformName << ".Build.0 = " + << *i << "|" << this->PlatformName << "\n"; + } + } +} + +//---------------------------------------------------------------------------- +static cmVS7FlagTable cmVS8ExtraFlagTable[] = +{ + {"CallingConvention", "Gd", "cdecl", "0", 0 }, + {"CallingConvention", "Gr", "fastcall", "1", 0 }, + {"CallingConvention", "Gz", "stdcall", "2", 0 }, + + {"Detect64BitPortabilityProblems", "Wp64", + "Detect 64Bit Portability Problems", "true", 0 }, + {"ErrorReporting", "errorReport:prompt", "Report immediately", "1", 0 }, + {"ErrorReporting", "errorReport:queue", "Queue for next login", "2", 0 }, + // Precompiled header and related options. Note that the + // UsePrecompiledHeader entries are marked as "Continue" so that the + // corresponding PrecompiledHeaderThrough entry can be found. + {"UsePrecompiledHeader", "Yu", "Use Precompiled Header", "2", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue}, + {"PrecompiledHeaderThrough", "Yu", "Precompiled Header Name", "", + cmVS7FlagTable::UserValueRequired}, + // There is no YX option in the VS8 IDE. + + // Exception handling mode. If no entries match, it will be FALSE. + {"ExceptionHandling", "GX", "enable c++ exceptions", "1", 0}, + {"ExceptionHandling", "EHsc", "enable c++ exceptions", "1", 0}, + {"ExceptionHandling", "EHa", "enable SEH exceptions", "2", 0}, + + {0,0,0,0,0} +}; +cmVS7FlagTable const* cmGlobalVisualStudio8Generator::GetExtraFlagTableVS8() +{ + return cmVS8ExtraFlagTable; +} diff --git a/Source/cmGlobalVisualStudio8Generator.h b/Source/cmGlobalVisualStudio8Generator.h new file mode 100644 index 000000000..a183ccb87 --- /dev/null +++ b/Source/cmGlobalVisualStudio8Generator.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio8Generator.h,v $ + Language: C++ + Date: $Date: 2008-02-15 16:49:58 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio8Generator_h +#define cmGlobalVisualStudio8Generator_h + +#include "cmGlobalVisualStudio71Generator.h" + + +/** \class cmGlobalVisualStudio8Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio8Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio8Generator : public cmGlobalVisualStudio71Generator +{ +public: + cmGlobalVisualStudio8Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio8Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio8Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 8 2005";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Override Configure and Generate to add the build-system check + * target. + */ + virtual void Configure(); + virtual void Generate(); + + /** + * Where does this version of Visual Studio look for macros for the + * current user? Returns the empty string if this version of Visual + * Studio does not implement support for VB macros. + */ + virtual std::string GetUserMacrosDirectory(); + + /** + * What is the reg key path to "vsmacros" for this version of Visual + * Studio? + */ + virtual std::string GetUserMacrosRegKeyBase(); + +protected: + + virtual bool VSLinksDependencies() const { return false; } + + static cmVS7FlagTable const* GetExtraFlagTableVS8(); + virtual void AddPlatformDefinitions(cmMakefile* mf); + virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root, + std::vector& generators); + virtual void WriteSLNHeader(std::ostream& fout); + virtual void WriteSolutionConfigurations(std::ostream& fout); + virtual void WriteProjectConfigurations(std::ostream& fout, + const char* name, + bool partOfDefaultBuild); + std::string PlatformName; // Win32 or x64 +}; +#endif diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx new file mode 100644 index 000000000..e9278b61f --- /dev/null +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio8Win64Generator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio8Win64Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + + + +cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator() +{ + this->PlatformName = "x64"; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion8(); + lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio8Win64Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio .NET 2005 Win64 project files."; + entry.Full = ""; +} + +void cmGlobalVisualStudio8Win64Generator +::EnableLanguage(std::vectorconst & lang, + cmMakefile *mf, bool optional) +{ + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); +} diff --git a/Source/cmGlobalVisualStudio8Win64Generator.h b/Source/cmGlobalVisualStudio8Win64Generator.h new file mode 100644 index 000000000..643b730fb --- /dev/null +++ b/Source/cmGlobalVisualStudio8Win64Generator.h @@ -0,0 +1,54 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio8Win64Generator.h,v $ + Language: C++ + Date: $Date: 2007-06-28 13:09:26 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio8Win64Generator_h +#define cmGlobalVisualStudio8Win64Generator_h + +#include "cmGlobalVisualStudio8Generator.h" + + +/** \class cmGlobalVisualStudio8Win64Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio8Win64Generator : + public cmGlobalVisualStudio8Generator +{ +public: + cmGlobalVisualStudio8Win64Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio8Win64Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio8Win64Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 8 2005 Win64";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! create the correct local generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; +#endif diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx new file mode 100755 index 000000000..fcf1de2bb --- /dev/null +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio9Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-15 16:49:58 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "windows.h" // this must be first to define GetCurrentDirectory +#include "cmGlobalVisualStudio9Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" +#include "cmake.h" + + + +cmGlobalVisualStudio9Generator::cmGlobalVisualStudio9Generator() +{ + this->FindMakeProgramFile = "CMakeVS9FindMake.cmake"; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Generator::AddPlatformDefinitions(cmMakefile* mf) +{ + mf->AddDefinition("MSVC90", "1"); +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout) +{ + fout << "Microsoft Visual Studio Solution File, Format Version 10.00\n"; + fout << "# Visual Studio 2008\n"; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion9(); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 9 2008 project files."; + entry.Full = ""; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Generator +::EnableLanguage(std::vectorconst & lang, + cmMakefile *mf, bool optional) +{ + cmGlobalVisualStudio8Generator::EnableLanguage(lang, mf, optional); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio9Generator::GetUserMacrosDirectory() +{ + std::string base; + std::string path; + + // base begins with the VisualStudioProjectsLocation reg value... + if (cmSystemTools::ReadRegistryValue( + "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0;" + "VisualStudioProjectsLocation", + base)) + { + cmSystemTools::ConvertToUnixSlashes(base); + + // 9.0 macros folder: + path = base + "/VSMacros80"; + // *NOT* a typo; right now in Visual Studio 2008 beta the macros + // folder is VSMacros80... They may change it to 90 before final + // release of 2008 or they may not... we'll have to keep our eyes + // on it + } + + // path is (correctly) still empty if we did not read the base value from + // the Registry value + return path; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio9Generator::GetUserMacrosRegKeyBase() +{ + return "Software\\Microsoft\\VisualStudio\\9.0\\vsmacros"; +} diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h new file mode 100755 index 000000000..bc7201359 --- /dev/null +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -0,0 +1,69 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudio9Generator.h,v $ + Language: C++ + Date: $Date: 2008-02-15 16:49:58 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio9Generator_h +#define cmGlobalVisualStudio9Generator_h + +#include "cmGlobalVisualStudio8Generator.h" + + +/** \class cmGlobalVisualStudio9Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio9Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio9Generator : + public cmGlobalVisualStudio8Generator +{ +public: + cmGlobalVisualStudio9Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio9Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio9Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 9 2008";} + virtual void AddPlatformDefinitions(cmMakefile* mf); + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! create the correct local generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + virtual void WriteSLNHeader(std::ostream& fout); + + /** + * Where does this version of Visual Studio look for macros for the + * current user? Returns the empty string if this version of Visual + * Studio does not implement support for VB macros. + */ + virtual std::string GetUserMacrosDirectory(); + + /** + * What is the reg key path to "vsmacros" for this version of Visual + * Studio? + */ + virtual std::string GetUserMacrosRegKeyBase(); +}; +#endif diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx new file mode 100755 index 000000000..64053ff81 --- /dev/null +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -0,0 +1,53 @@ +/*========================================================================= + +Program: CMake - Cross-Platform Makefile Generator +Module: $RCSfile: cmGlobalVisualStudio9Win64Generator.cxx,v $ +Language: C++ +Date: $Date: 2007-12-17 19:43:11 $ +Version: $Revision: 1.1 $ + +Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalVisualStudio9Win64Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmMakefile.h" + + +cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator() +{ + this->PlatformName = "x64"; +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + lg->SetVersion9(); + lg->SetPlatformName(this->PlatformName.c_str()); + lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudio9Win64Generator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Visual Studio 9 2008 Win64 project files."; + entry.Full = ""; +} + +void cmGlobalVisualStudio9Win64Generator +::EnableLanguage(std::vectorconst & lang, + cmMakefile *mf, bool optional) +{ + mf->AddDefinition("CMAKE_FORCE_WIN64", "TRUE"); + cmGlobalVisualStudio9Generator::EnableLanguage(lang, mf, optional); +} diff --git a/Source/cmGlobalVisualStudio9Win64Generator.h b/Source/cmGlobalVisualStudio9Win64Generator.h new file mode 100755 index 000000000..cfce4e582 --- /dev/null +++ b/Source/cmGlobalVisualStudio9Win64Generator.h @@ -0,0 +1,54 @@ +/*========================================================================= + +Program: CMake - Cross-Platform Makefile Generator +Module: $RCSfile: cmGlobalVisualStudio9Win64Generator.h,v $ +Language: C++ +Date: $Date: 2007-12-17 19:43:11 $ +Version: $Revision: 1.1 $ + +Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudio9Win64Generator_h +#define cmGlobalVisualStudio9Win64Generator_h + +#include "cmGlobalVisualStudio9Generator.h" + + +/** \class cmGlobalVisualStudio8Win64Generator + * \brief Write a Unix makefiles. + * + * cmGlobalVisualStudio8Win64Generator manages UNIX build process for a tree + */ +class cmGlobalVisualStudio9Win64Generator : + public cmGlobalVisualStudio9Generator +{ +public: + cmGlobalVisualStudio9Win64Generator(); + static cmGlobalGenerator* New() { + return new cmGlobalVisualStudio9Win64Generator; } + + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalVisualStudio9Win64Generator::GetActualName();} + static const char* GetActualName() {return "Visual Studio 9 2008 Win64";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! create the correct local generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; +#endif diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx new file mode 100755 index 000000000..fa7185df3 --- /dev/null +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -0,0 +1,720 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudioGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.11.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalVisualStudioGenerator.h" + +#include "cmCallVisualStudioMacro.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmTarget.h" + +//---------------------------------------------------------------------------- +cmGlobalVisualStudioGenerator::cmGlobalVisualStudioGenerator() +{ +} + +//---------------------------------------------------------------------------- +cmGlobalVisualStudioGenerator::~cmGlobalVisualStudioGenerator() +{ +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudioGenerator::Generate() +{ + // Add a special target that depends on ALL projects for easy build + // of one configuration only. + const char* no_working_dir = 0; + std::vector no_depends; + cmCustomCommandLines no_commands; + std::map >::iterator it; + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + std::vector& gen = it->second; + // add the ALL_BUILD to the first local generator of each project + if(gen.size()) + { + // Use no actual command lines so that the target itself is not + // considered always out of date. + gen[0]->GetMakefile()-> + AddUtilityCommand("ALL_BUILD", true, no_working_dir, + no_depends, no_commands, false, + "Build all projects"); + } + } + + // Fix utility dependencies to avoid linking to libraries. + this->FixUtilityDepends(); + + // Configure CMake Visual Studio macros, for this user on this version + // of Visual Studio. + this->ConfigureCMakeVisualStudioMacros(); + + // Run all the local generators. + this->cmGlobalGenerator::Generate(); +} + +//---------------------------------------------------------------------------- +bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile, + const std::string& regKeyBase, + std::string& nextAvailableSubKeyName); + +void RegisterVisualStudioMacros(const std::string& macrosFile, + const std::string& regKeyBase); + +//---------------------------------------------------------------------------- +#define CMAKE_VSMACROS_FILENAME \ + "CMakeVSMacros2.vsmacros" + +#define CMAKE_VSMACROS_RELOAD_MACRONAME \ + "Macros.CMakeVSMacros2.Macros.ReloadProjects" + +#define CMAKE_VSMACROS_STOP_MACRONAME \ + "Macros.CMakeVSMacros2.Macros.StopBuild" + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros() +{ + cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); + std::string dir = this->GetUserMacrosDirectory(); + + if (mf != 0 && dir != "") + { + std::string src = mf->GetRequiredDefinition("CMAKE_ROOT"); + src += "/Templates/" CMAKE_VSMACROS_FILENAME; + + std::string dst = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME; + + // Copy the macros file to the user directory only if the + // destination does not exist or the source location is newer. + // This will allow the user to edit the macros for development + // purposes but newer versions distributed with CMake will replace + // older versions in user directories. + int res; + if(!cmSystemTools::FileTimeCompare(src.c_str(), dst.c_str(), &res) || + res > 0) + { + if (!cmSystemTools::CopyFileAlways(src.c_str(), dst.c_str())) + { + std::ostringstream oss; + oss << "Could not copy from: " << src << std::endl; + oss << " to: " << dst << std::endl; + cmSystemTools::Message(oss.str().c_str(), "Warning"); + } + } + + RegisterVisualStudioMacros(dst, this->GetUserMacrosRegKeyBase()); + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudioGenerator +::CallVisualStudioMacro(MacroName m, + const char* vsSolutionFile) +{ + // If any solution or project files changed during the generation, + // tell Visual Studio to reload them... + cmMakefile* mf = this->LocalGenerators[0]->GetMakefile(); + std::string dir = this->GetUserMacrosDirectory(); + + // Only really try to call the macro if: + // - mf is non-NULL + // - there is a UserMacrosDirectory + // - the CMake vsmacros file exists + // - the CMake vsmacros file is registered + // - there were .sln/.vcproj files changed during generation + // + if (mf != 0 && dir != "") + { + std::string macrosFile = dir + "/CMakeMacros/" CMAKE_VSMACROS_FILENAME; + std::string nextSubkeyName; + if (cmSystemTools::FileExists(macrosFile.c_str()) && + IsVisualStudioMacrosFileRegistered(macrosFile, + this->GetUserMacrosRegKeyBase(), nextSubkeyName) + ) + { + std::string topLevelSlnName; + if(vsSolutionFile) + { + topLevelSlnName = vsSolutionFile; + } + else + { + topLevelSlnName = mf->GetStartOutputDirectory(); + topLevelSlnName += "/"; + topLevelSlnName += mf->GetProjectName(); + topLevelSlnName += ".sln"; + } + + if(m == MacroReload) + { + std::vector filenames; + this->GetFilesReplacedDuringGenerate(filenames); + if (filenames.size() > 0) + { + // Convert vector to semi-colon delimited string of filenames: + std::string projects; + std::vector::iterator it = filenames.begin(); + if (it != filenames.end()) + { + projects = *it; + ++it; + } + for (; it != filenames.end(); ++it) + { + projects += ";"; + projects += *it; + } + cmCallVisualStudioMacro::CallMacro + (topLevelSlnName, CMAKE_VSMACROS_RELOAD_MACRONAME, projects); + } + } + else if(m == MacroStop) + { + cmCallVisualStudioMacro::CallMacro(topLevelSlnName, + CMAKE_VSMACROS_STOP_MACRONAME, ""); + } + } + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudioGenerator::GetUserMacrosDirectory() +{ + return ""; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudioGenerator::GetUserMacrosRegKeyBase() +{ + return ""; +} + +//---------------------------------------------------------------------------- +void cmGlobalVisualStudioGenerator::FixUtilityDepends() +{ + // Skip for VS versions 8 and above. + if(!this->VSLinksDependencies()) + { + return; + } + + // For VS versions before 8: + // + // When a target that links contains a project-level dependency on a + // library target that library is automatically linked. In order to + // allow utility-style project-level dependencies that do not + // actually link we need to automatically insert an intermediate + // custom target. + // + // Here we edit the utility dependencies of a target to add the + // intermediate custom target when necessary. + for(unsigned i = 0; i < this->LocalGenerators.size(); ++i) + { + cmTargets* targets = + &(this->LocalGenerators[i]->GetMakefile()->GetTargets()); + for(cmTargets::iterator tarIt = targets->begin(); + tarIt != targets->end(); ++tarIt) + { + this->FixUtilityDependsForTarget(tarIt->second); + } + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudioGenerator::FixUtilityDependsForTarget(cmTarget& target) +{ + // Only targets that link need to be fixed. + if(target.GetType() != cmTarget::STATIC_LIBRARY && + target.GetType() != cmTarget::SHARED_LIBRARY && + target.GetType() != cmTarget::MODULE_LIBRARY && + target.GetType() != cmTarget::EXECUTABLE) + { + return; + } + +#if 0 + // This feature makes a mess in SLN files for VS 7.1 and below. It + // creates an extra target for every target that is "linked" by a + // static library. Without this feature static libraries do not + // wait until their "link" dependencies are built to build. This is + // not a problem 99.9% of the time, and projects that do have the + // problem can enable this work-around by using add_dependencies. + + // Static libraries cannot depend directly on the targets to which + // they link because VS will copy those targets into the library + // (for VS < 8). To work around the problem we copy the + // dependencies to be utility dependencies so that the work-around + // below is used. + if(target.GetType() == cmTarget::STATIC_LIBRARY) + { + cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator i = libs.begin(); + i != libs.end(); ++i) + { + if(cmTarget* depTarget = this->FindTarget(0, i->first.c_str(), false)) + { + target.AddUtility(depTarget->GetName()); + } + } + } +#endif + + // Look at each utility dependency. + for(std::set::const_iterator ui = + target.GetUtilities().begin(); + ui != target.GetUtilities().end(); ++ui) + { + if(cmTarget* depTarget = this->FindTarget(0, ui->c_str())) + { + if(depTarget->GetType() == cmTarget::STATIC_LIBRARY || + depTarget->GetType() == cmTarget::SHARED_LIBRARY || + depTarget->GetType() == cmTarget::MODULE_LIBRARY) + { + // This utility dependency will cause an attempt to link. If + // the depender does not already link the dependee we need an + // intermediate target. + if(!this->CheckTargetLinks(target, ui->c_str())) + { + this->CreateUtilityDependTarget(*depTarget); + } + } + } + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalVisualStudioGenerator::CreateUtilityDependTarget(cmTarget& target) +{ + // This target is a library on which a utility dependency exists. + // We need to create an intermediate custom target to hook up the + // dependency without causing a link. + const char* altName = target.GetProperty("ALTERNATIVE_DEPENDENCY_NAME"); + if(!altName) + { + // Create the intermediate utility target. + std::string altNameStr = target.GetName(); + altNameStr += "_UTILITY"; + const std::vector no_depends; + cmCustomCommandLines no_commands; + const char* no_working_dir = 0; + const char* no_comment = 0; + target.GetMakefile()->AddUtilityCommand(altNameStr.c_str(), true, + no_working_dir, no_depends, + no_commands, false, no_comment); + target.SetProperty("ALTERNATIVE_DEPENDENCY_NAME", altNameStr.c_str()); + + // Most targets have a GUID created in ConfigureFinalPass. Since + // that has already been called, create one for this target now. + this->CreateGUID(altNameStr.c_str()); + + // The intermediate target should depend on the original target. + if(cmTarget* alt = this->FindTarget(0, altNameStr.c_str())) + { + alt->AddUtility(target.GetName()); + } + } +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudioGenerator::CheckTargetLinks(cmTarget& target, + const char* name) +{ + // Return whether the given target links to a target with the given name. + if(target.GetType() == cmTarget::STATIC_LIBRARY) + { + // Static libraries never link to anything. + return false; + } + cmTarget::LinkLibraryVectorType const& libs = target.GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator i = libs.begin(); + i != libs.end(); ++i) + { + if(i->first == name) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +const char* +cmGlobalVisualStudioGenerator::GetUtilityForTarget(cmTarget& target, + const char* name) +{ + // Handle the external MS project special case. + if(strncmp(name, "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + // Note from Ken: + // kind of weird removing the first 27 letters. my + // recommendatsions: use cmCustomCommand::GetCommand() to get the + // project name or get rid of the target name starting with + // "INCLUDE_EXTERNAL_MSPROJECT_" and use another indicator/flag + // somewhere. These external project names shouldn't conflict + // with cmake target names anyways. + return name+27; + } + + // Possibly depend on an intermediate utility target to avoid + // linking. + if(target.GetType() == cmTarget::STATIC_LIBRARY || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY || + target.GetType() == cmTarget::EXECUTABLE) + { + // The depender is a target that links. Lookup the dependee to + // see if it provides an alternative dependency name. + if(cmTarget* depTarget = this->FindTarget(0, name)) + { + // Check for an alternative name created by FixUtilityDepends. + if(const char* altName = + depTarget->GetProperty("ALTERNATIVE_DEPENDENCY_NAME")) + { + // The alternative name is needed only if the depender does + // not really link to the dependee. + if(!this->CheckTargetLinks(target, name)) + { + return altName; + } + } + } + } + + // No special case. Just use the original dependency name. + return name; +} + +//---------------------------------------------------------------------------- +#include + +//---------------------------------------------------------------------------- +bool IsVisualStudioMacrosFileRegistered(const std::string& macrosFile, + const std::string& regKeyBase, + std::string& nextAvailableSubKeyName) +{ + bool macrosRegistered = false; + + std::string s1; + std::string s2; + + // Make lowercase local copies, convert to Unix slashes, and + // see if the resulting strings are the same: + s1 = cmSystemTools::LowerCase(macrosFile); + cmSystemTools::ConvertToUnixSlashes(s1); + + std::string keyname; + HKEY hkey = NULL; + LONG result = ERROR_SUCCESS; + DWORD index = 0; + + keyname = regKeyBase + "\\OtherProjects7"; + hkey = NULL; + result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), + 0, KEY_READ, &hkey); + if (ERROR_SUCCESS == result) + { + // Iterate the subkeys and look for the values of interest in each subkey: + CHAR subkeyname[256]; + DWORD cch_subkeyname = sizeof(subkeyname)/sizeof(subkeyname[0]); + CHAR keyclass[256]; + DWORD cch_keyclass = sizeof(keyclass)/sizeof(keyclass[0]); + FILETIME lastWriteTime; + lastWriteTime.dwHighDateTime = 0; + lastWriteTime.dwLowDateTime = 0; + + while (ERROR_SUCCESS == RegEnumKeyEx(hkey, index, subkeyname, + &cch_subkeyname, + 0, keyclass, &cch_keyclass, &lastWriteTime)) + { + // Open the subkey and query the values of interest: + HKEY hsubkey = NULL; + result = RegOpenKeyEx(hkey, subkeyname, 0, KEY_READ, &hsubkey); + if (ERROR_SUCCESS == result) + { + DWORD valueType = REG_SZ; + CHAR data1[256]; + DWORD cch_data1 = sizeof(data1)/sizeof(data1[0]); + RegQueryValueEx(hsubkey, "Path", 0, &valueType, + (LPBYTE) &data1[0], &cch_data1); + + DWORD data2 = 0; + DWORD cch_data2 = sizeof(data2); + RegQueryValueEx(hsubkey, "Security", 0, &valueType, + (LPBYTE) &data2, &cch_data2); + + DWORD data3 = 0; + DWORD cch_data3 = sizeof(data3); + RegQueryValueEx(hsubkey, "StorageFormat", 0, &valueType, + (LPBYTE) &data3, &cch_data3); + + s2 = cmSystemTools::LowerCase(data1); + cmSystemTools::ConvertToUnixSlashes(s2); + if (s2 == s1) + { + macrosRegistered = true; + } + + std::string fullname(data1); + std::string filename; + std::string filepath; + std::string filepathname; + std::string filepathpath; + if (cmSystemTools::FileExists(fullname.c_str())) + { + filename = cmSystemTools::GetFilenameName(fullname); + filepath = cmSystemTools::GetFilenamePath(fullname); + filepathname = cmSystemTools::GetFilenameName(filepath); + filepathpath = cmSystemTools::GetFilenamePath(filepath); + } + + //std::cout << keyname << "\\" << subkeyname << ":" << std::endl; + //std::cout << " Path: " << data1 << std::endl; + //std::cout << " Security: " << data2 << std::endl; + //std::cout << " StorageFormat: " << data3 << std::endl; + //std::cout << " filename: " << filename << std::endl; + //std::cout << " filepath: " << filepath << std::endl; + //std::cout << " filepathname: " << filepathname << std::endl; + //std::cout << " filepathpath: " << filepathpath << std::endl; + //std::cout << std::endl; + + RegCloseKey(hsubkey); + } + else + { + std::cout << "error opening subkey: " << subkeyname << std::endl; + std::cout << std::endl; + } + + ++index; + cch_subkeyname = sizeof(subkeyname)/sizeof(subkeyname[0]); + cch_keyclass = sizeof(keyclass)/sizeof(keyclass[0]); + lastWriteTime.dwHighDateTime = 0; + lastWriteTime.dwLowDateTime = 0; + } + + RegCloseKey(hkey); + } + else + { + std::cout << "error opening key: " << keyname << std::endl; + std::cout << std::endl; + } + + + // Pass back next available sub key name, assuming sub keys always + // follow the expected naming scheme. Expected naming scheme is that + // the subkeys of OtherProjects7 is 0 to n-1, so it's ok to use "n" + // as the name of the next subkey. + std::ostringstream ossNext; + ossNext << index; + nextAvailableSubKeyName = ossNext.str(); + + + keyname = regKeyBase + "\\RecordingProject7"; + hkey = NULL; + result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), + 0, KEY_READ, &hkey); + if (ERROR_SUCCESS == result) + { + DWORD valueType = REG_SZ; + CHAR data1[256]; + DWORD cch_data1 = sizeof(data1)/sizeof(data1[0]); + RegQueryValueEx(hkey, "Path", 0, &valueType, + (LPBYTE) &data1[0], &cch_data1); + + DWORD data2 = 0; + DWORD cch_data2 = sizeof(data2); + RegQueryValueEx(hkey, "Security", 0, &valueType, + (LPBYTE) &data2, &cch_data2); + + DWORD data3 = 0; + DWORD cch_data3 = sizeof(data3); + RegQueryValueEx(hkey, "StorageFormat", 0, &valueType, + (LPBYTE) &data3, &cch_data3); + + s2 = cmSystemTools::LowerCase(data1); + cmSystemTools::ConvertToUnixSlashes(s2); + if (s2 == s1) + { + macrosRegistered = true; + } + + //std::cout << keyname << ":" << std::endl; + //std::cout << " Path: " << data1 << std::endl; + //std::cout << " Security: " << data2 << std::endl; + //std::cout << " StorageFormat: " << data3 << std::endl; + //std::cout << std::endl; + + RegCloseKey(hkey); + } + else + { + std::cout << "error opening key: " << keyname << std::endl; + std::cout << std::endl; + } + + return macrosRegistered; +} + +//---------------------------------------------------------------------------- +void WriteVSMacrosFileRegistryEntry( + const std::string& nextAvailableSubKeyName, + const std::string& macrosFile, + const std::string& regKeyBase) +{ + std::string keyname = regKeyBase + "\\OtherProjects7"; + HKEY hkey = NULL; + LONG result = RegOpenKeyEx(HKEY_CURRENT_USER, keyname.c_str(), 0, + KEY_READ|KEY_WRITE, &hkey); + if (ERROR_SUCCESS == result) + { + // Create the subkey and set the values of interest: + HKEY hsubkey = NULL; + result = RegCreateKeyEx(hkey, nextAvailableSubKeyName.c_str(), 0, "", 0, + KEY_READ|KEY_WRITE, 0, &hsubkey, 0); + if (ERROR_SUCCESS == result) + { + DWORD dw = 0; + + std::string s(macrosFile); + cmSystemTools::ReplaceString(s, "/", "\\"); + + result = RegSetValueEx(hsubkey, "Path", 0, REG_SZ, (LPBYTE) s.c_str(), + static_cast(strlen(s.c_str()) + 1)); + if (ERROR_SUCCESS != result) + { + std::cout << "error result 1: " << result << std::endl; + std::cout << std::endl; + } + + // Security value is always "1" for sample macros files (seems to be "2" + // if you put the file somewhere outside the standard VSMacros folder) + dw = 1; + result = RegSetValueEx(hsubkey, "Security", + 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD)); + if (ERROR_SUCCESS != result) + { + std::cout << "error result 2: " << result << std::endl; + std::cout << std::endl; + } + + // StorageFormat value is always "0" for sample macros files + dw = 0; + result = RegSetValueEx(hsubkey, "StorageFormat", + 0, REG_DWORD, (LPBYTE) &dw, sizeof(DWORD)); + if (ERROR_SUCCESS != result) + { + std::cout << "error result 3: " << result << std::endl; + std::cout << std::endl; + } + + RegCloseKey(hsubkey); + } + else + { + std::cout << "error creating subkey: " + << nextAvailableSubKeyName << std::endl; + std::cout << std::endl; + } + RegCloseKey(hkey); + } + else + { + std::cout << "error opening key: " << keyname << std::endl; + std::cout << std::endl; + } +} + +//---------------------------------------------------------------------------- +void RegisterVisualStudioMacros(const std::string& macrosFile, + const std::string& regKeyBase) +{ + bool macrosRegistered; + std::string nextAvailableSubKeyName; + + macrosRegistered = IsVisualStudioMacrosFileRegistered(macrosFile, + regKeyBase, nextAvailableSubKeyName); + + if (!macrosRegistered) + { + int count = cmCallVisualStudioMacro:: + GetNumberOfRunningVisualStudioInstances("ALL"); + + // Only register the macros file if there are *no* instances of Visual + // Studio running. If we register it while one is running, first, it has + // no effect on the running instance; second, and worse, Visual Studio + // removes our newly added registration entry when it quits. Instead, + // emit a warning asking the user to exit all running Visual Studio + // instances... + // + if (0 != count) + { + std::ostringstream oss; + oss << "Could not register CMake's Visual Studio macros file '" + << CMAKE_VSMACROS_FILENAME "' while Visual Studio is running." + << " Please exit all running instances of Visual Studio before" + << " continuing." << std::endl + << std::endl + << "CMake needs to register Visual Studio macros when its macros" + << " file is updated or when it detects that its current macros file" + << " is no longer registered with Visual Studio." + << std::endl; + cmSystemTools::Message(oss.str().c_str(), "Warning"); + + // Count them again now that the warning is over. In the case of a GUI + // warning, the user may have gone to close Visual Studio and then come + // back to the CMake GUI and clicked ok on the above warning. If so, + // then register the macros *now* if the count is *now* 0... + // + count = cmCallVisualStudioMacro:: + GetNumberOfRunningVisualStudioInstances("ALL"); + + // Also re-get the nextAvailableSubKeyName in case Visual Studio + // wrote out new registered macros information as it was exiting: + // + if (0 == count) + { + IsVisualStudioMacrosFileRegistered(macrosFile, regKeyBase, + nextAvailableSubKeyName); + } + } + + // Do another if check - 'count' may have changed inside the above if: + // + if (0 == count) + { + WriteVSMacrosFileRegistryEntry(nextAvailableSubKeyName, macrosFile, + regKeyBase); + } + } +} +bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(cmTarget& target) +{ + // check to see if this is a fortran build + std::set languages; + target.GetLanguages(languages); + if(languages.size() == 1) + { + if(*languages.begin() == "Fortran") + { + return true; + } + } + return false; +} diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h new file mode 100644 index 000000000..eb4b9bb74 --- /dev/null +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalVisualStudioGenerator.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.7.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalVisualStudioGenerator_h +#define cmGlobalVisualStudioGenerator_h + +#include "cmGlobalGenerator.h" + +/** \class cmGlobalVisualStudioGenerator + * \brief Base class for global Visual Studio generators. + * + * cmGlobalVisualStudioGenerator provides functionality common to all + * global Visual Studio generators. + */ +class cmGlobalVisualStudioGenerator : public cmGlobalGenerator +{ +public: + cmGlobalVisualStudioGenerator(); + virtual ~cmGlobalVisualStudioGenerator(); + + /** + * Basic generate implementation for all VS generators. + */ + virtual void Generate(); + + /** + * Configure CMake's Visual Studio macros file into the user's Visual + * Studio macros directory. + */ + virtual void ConfigureCMakeVisualStudioMacros(); + + /** + * Where does this version of Visual Studio look for macros for the + * current user? Returns the empty string if this version of Visual + * Studio does not implement support for VB macros. + */ + virtual std::string GetUserMacrosDirectory(); + + /** + * What is the reg key path to "vsmacros" for this version of Visual + * Studio? + */ + virtual std::string GetUserMacrosRegKeyBase(); + + enum MacroName {MacroReload, MacroStop}; + + /** + * Call the ReloadProjects macro if necessary based on + * GetFilesReplacedDuringGenerate results. + */ + virtual void CallVisualStudioMacro(MacroName m, + const char* vsSolutionFile = 0); + + // return true if target is fortran only + bool TargetIsFortranOnly(cmTarget& t); + +protected: + virtual void CreateGUID(const char*) {} + void FixUtilityDepends(); + const char* GetUtilityForTarget(cmTarget& target, const char*); + + // Does this VS version link targets to each other if there are + // dependencies in the SLN file? This was done for VS versions + // below 8. + virtual bool VSLinksDependencies() const { return true; } + +private: + void FixUtilityDependsForTarget(cmTarget& target); + void CreateUtilityDependTarget(cmTarget& target); + bool CheckTargetLinks(cmTarget& target, const char* name); +}; + +#endif diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx new file mode 100644 index 000000000..397e2618a --- /dev/null +++ b/Source/cmGlobalWatcomWMakeGenerator.cxx @@ -0,0 +1,71 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalWatcomWMakeGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalWatcomWMakeGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" + +cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator() +{ + this->FindMakeProgramFile = "CMakeFindWMake.cmake"; + this->ForceUnixPaths = false; + this->ToolSupportsColor = true; + this->NeedSymbolicMark = true; + this->EmptyRuleHackCommand = "@cd ."; +} + +void cmGlobalWatcomWMakeGenerator +::EnableLanguage(std::vectorconst& l, + cmMakefile *mf, + bool optional) +{ + // pick a default + mf->AddDefinition("WATCOM", "1"); + mf->AddDefinition("CMAKE_QUOTE_INCLUDE_PATHS", "1"); + mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1"); + mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&"); + mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC"); + mf->AddDefinition("CMAKE_NO_QUOTED_OBJECTS", "1"); + mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386"); + this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); +} + +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator() +{ + cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3; + lg->SetSilentNoColon(true); + lg->SetDefineWindowsNULL(true); + lg->SetWindowsShell(true); + lg->SetWatcomWMake(true); + lg->SetMakeSilentFlag("-s -h"); + lg->SetGlobalGenerator(this); + lg->SetIgnoreLibPrefix(true); + lg->SetPassMakeflags(false); + lg->SetUnixCD(false); + lg->SetIncludeDirective("!include"); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalWatcomWMakeGenerator +::GetDocumentation(cmDocumentationEntry& entry) const +{ + entry.Name = this->GetName(); + entry.Brief = "Generates Watcom WMake makefiles."; + entry.Full = ""; +} diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h new file mode 100644 index 000000000..c1bc41bca --- /dev/null +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -0,0 +1,51 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalWatcomWMakeGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-09 19:57:30 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalWatcomWMakeGenerator_h +#define cmGlobalWatcomWMakeGenerator_h + +#include "cmGlobalUnixMakefileGenerator3.h" + +/** \class cmGlobalWatcomWMakeGenerator + * \brief Write a NMake makefiles. + * + * cmGlobalWatcomWMakeGenerator manages nmake build process for a tree + */ +class cmGlobalWatcomWMakeGenerator : public cmGlobalUnixMakefileGenerator3 +{ +public: + cmGlobalWatcomWMakeGenerator(); + static cmGlobalGenerator* New() { return new cmGlobalWatcomWMakeGenerator; } + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalWatcomWMakeGenerator::GetActualName();} + static const char* GetActualName() {return "Watcom WMake";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); +}; + +#endif diff --git a/Source/cmGlobalXCode21Generator.cxx b/Source/cmGlobalXCode21Generator.cxx new file mode 100644 index 000000000..df14b41f3 --- /dev/null +++ b/Source/cmGlobalXCode21Generator.cxx @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalXCode21Generator.cxx,v $ + Language: C++ + Date: $Date: 2007-08-14 15:45:14 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalXCode21Generator.h" +#include "cmXCode21Object.h" + +//---------------------------------------------------------------------------- +cmGlobalXCode21Generator::cmGlobalXCode21Generator() +{ + this->XcodeVersion = 21; +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCode21Generator::WriteXCodePBXProj(std::ostream& fout, + cmLocalGenerator* , + std::vector& ) +{ + fout << "// !$*UTF8*$!\n"; + fout << "{\n"; + cmXCode21Object::Indent(1, fout); + fout << "archiveVersion = 1;\n"; + cmXCode21Object::Indent(1, fout); + fout << "classes = {\n"; + cmXCode21Object::Indent(1, fout); + fout << "};\n"; + cmXCode21Object::Indent(1, fout); + fout << "objectVersion = 42;\n"; + cmXCode21Object::PrintList(this->XCodeObjects, fout); + cmXCode21Object::Indent(1, fout); + fout << "rootObject = " << this->RootObject->GetId() + << " /* Project object */;\n"; + fout << "}\n"; +} diff --git a/Source/cmGlobalXCode21Generator.h b/Source/cmGlobalXCode21Generator.h new file mode 100644 index 000000000..d9b065436 --- /dev/null +++ b/Source/cmGlobalXCode21Generator.h @@ -0,0 +1,41 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalXCode21Generator.h,v $ + Language: C++ + Date: $Date: 2006-05-11 15:47:03 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalXCode21Generator_h +#define cmGlobalXCode21Generator_h + +#include "cmGlobalXCodeGenerator.h" + +/** \class cmGlobalXCode21Generator + * \brief Write Mac XCode projects + * + * cmGlobalXCode21Generator manages UNIX build process for a tree + */ +class cmGlobalXCode21Generator : public cmGlobalXCodeGenerator +{ +public: + cmGlobalXCode21Generator(); + static cmGlobalGenerator* New() { return new cmGlobalXCode21Generator; } + virtual void WriteXCodePBXProj(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators); + + ///! What is the configurations directory variable called? + virtual const char* GetCMakeCFGInitDirectory() { + return "$(CONFIGURATION)"; } +}; + +#endif diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx new file mode 100644 index 000000000..8265dd384 --- /dev/null +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -0,0 +1,2963 @@ +/*========================================================================= + +Program: CMake - Cross-Platform Makefile Generator +Module: $RCSfile: cmGlobalXCodeGenerator.cxx,v $ +Language: C++ +Date: $Date: 2008-05-01 16:35:39 $ +Version: $Revision: 1.186.2.2 $ + +Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. +See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + +This software is distributed WITHOUT ANY WARRANTY; without even +the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalXCodeGenerator.h" +#include "cmGlobalXCode21Generator.h" +#include "cmLocalXCodeGenerator.h" +#include "cmMakefile.h" +#include "cmXCodeObject.h" +#include "cmXCode21Object.h" +#include "cmake.h" +#include "cmGeneratedFileStream.h" +#include "cmComputeLinkInformation.h" +#include "cmSourceFile.h" + +//---------------------------------------------------------------------------- +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmXMLParser.h" + +// parse the xml file storing the installed version of Xcode on +// the machine +class cmXcodeVersionParser : public cmXMLParser +{ +public: + void StartElement(const char* , const char** ) + { + this->Data = ""; + } + void EndElement(const char* name) + { + if(strcmp(name, "key") == 0) + { + this->Key = this->Data; + } + else if(strcmp(name, "string") == 0) + { + if(this->Key == "CFBundleShortVersionString") + { + this->Version = (int)(10.0 * atof(this->Data.c_str())); + } + } + } + void CharacterDataHandler(const char* data, int length) + { + this->Data.append(data, length); + } + int Version; + std::string Key; + std::string Data; +}; +#endif + +//---------------------------------------------------------------------------- +cmGlobalXCodeGenerator::cmGlobalXCodeGenerator() +{ + this->FindMakeProgramFile = "CMakeFindXCode.cmake"; + this->RootObject = 0; + this->MainGroupChildren = 0; + this->SourcesGroupChildren = 0; + this->ResourcesGroupChildren = 0; + this->CurrentMakefile = 0; + this->CurrentLocalGenerator = 0; + this->XcodeVersion = 15; +} + +//---------------------------------------------------------------------------- +cmGlobalGenerator* cmGlobalXCodeGenerator::New() +{ +#if defined(CMAKE_BUILD_WITH_CMAKE) + cmXcodeVersionParser parser; + parser.ParseFile + ("/Developer/Applications/Xcode.app/Contents/version.plist"); + if(parser.Version == 15) + { + return new cmGlobalXCodeGenerator; + } + else if (parser.Version == 20) + { + cmSystemTools::Message("Xcode 2.0 not really supported by cmake, " + "using Xcode 15 generator\n"); + return new cmGlobalXCodeGenerator; + } + cmGlobalXCodeGenerator* ret = new cmGlobalXCode21Generator; + ret->SetVersion(parser.Version); + return ret; +#else + std::cerr << "CMake should be built with cmake to use XCode, " + "default to Xcode 1.5\n"; + return new cmGlobalXCodeGenerator; +#endif +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::EnableLanguage(std::vectorconst& + lang, + cmMakefile * mf, bool optional) +{ + mf->AddDefinition("XCODE","1"); + if(this->XcodeVersion == 15) + { + } + else + { + mf->AddCacheDefinition( + "CMAKE_CONFIGURATION_TYPES", + "Debug;Release;MinSizeRel;RelWithDebInfo", + "Semicolon separated list of supported configuration types, " + "only supports Debug, Release, MinSizeRel, and RelWithDebInfo, " + "anything else will be ignored.", + cmCacheManager::STRING); + } + mf->AddDefinition("CMAKE_GENERATOR_CC", "gcc"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "g++"); + mf->AddDefinition("CMAKE_GENERATOR_NO_COMPILER_ENV", "1"); + // initialize Architectures so it can be used by + // GetTargetObjectFileDirectories + this->cmGlobalGenerator::EnableLanguage(lang, mf, optional); + const char* osxArch = + mf->GetDefinition("CMAKE_OSX_ARCHITECTURES"); + const char* sysroot = + mf->GetDefinition("CMAKE_OSX_SYSROOT"); + if(osxArch && sysroot) + { + this->Architectures.clear(); + cmSystemTools::ExpandListArgument(std::string(osxArch), + this->Architectures); + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator +::GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors, + bool) +{ + // Config is not used yet + (void) ignoreErrors; + + // now build the test + if(makeProgram == 0 || !strlen(makeProgram)) + { + cmSystemTools::Error( + "Generator cannot find the appropriate make command."); + return ""; + } + std::string makeCommand = + cmSystemTools::ConvertToOutputPath(makeProgram); + std::string lowerCaseCommand = makeCommand; + cmSystemTools::LowerCase(lowerCaseCommand); + + makeCommand += " -project "; + makeCommand += projectName; + makeCommand += ".xcode"; + if(this->XcodeVersion > 20) + { + makeCommand += "proj"; + } + + bool clean = false; + if ( targetName && strcmp(targetName, "clean") == 0 ) + { + clean = true; + targetName = "ALL_BUILD"; + } + if(clean) + { + makeCommand += " clean"; + } + else + { + makeCommand += " build"; + } + makeCommand += " -target "; + // if it is a null string for config don't use it + if(config && *config == 0) + { + config = 0; + } + if (targetName && strlen(targetName)) + { + makeCommand += targetName; + } + else + { + makeCommand += "ALL_BUILD"; + } + if(this->XcodeVersion == 15) + { + makeCommand += " -buildstyle Development "; + } + else + { + makeCommand += " -configuration "; + makeCommand += config?config:"Debug"; + } + if ( additionalOptions ) + { + makeCommand += " "; + makeCommand += additionalOptions; + } + return makeCommand; +} + +//---------------------------------------------------------------------------- +///! Create a local generator appropriate to this Global Generator +cmLocalGenerator *cmGlobalXCodeGenerator::CreateLocalGenerator() +{ + cmLocalGenerator *lg = new cmLocalXCodeGenerator; + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::Generate() +{ + std::map >::iterator it; + // make sure extra targets are added before calling + // the parent generate which will call trace depends + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + cmLocalGenerator* root = it->second[0]; + this->SetGenerationRoot(root); + // add ALL_BUILD, INSTALL, etc + this->AddExtraTargets(root, it->second); + } + this->cmGlobalGenerator::Generate(); + for(it = this->ProjectMap.begin(); it!= this->ProjectMap.end(); ++it) + { + cmLocalGenerator* root = it->second[0]; + this->SetGenerationRoot(root); + // now create the project + this->OutputXCodeProject(root, it->second); + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::SetGenerationRoot(cmLocalGenerator* root) +{ + this->CurrentProject = root->GetMakefile()->GetProjectName(); + this->SetCurrentLocalGenerator(root); + std::string outDir = this->CurrentMakefile->GetHomeOutputDirectory(); + outDir =cmSystemTools::CollapseFullPath(outDir.c_str()); + cmSystemTools::SplitPath(outDir.c_str(), + this->ProjectOutputDirectoryComponents); + + this->CurrentXCodeHackMakefile = + root->GetMakefile()->GetCurrentOutputDirectory(); + this->CurrentXCodeHackMakefile += "/CMakeScripts"; + cmSystemTools::MakeDirectory(this->CurrentXCodeHackMakefile.c_str()); + this->CurrentXCodeHackMakefile += "/XCODE_DEPEND_HELPER.make"; +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, + std::vector& gens) +{ + cmMakefile* mf = root->GetMakefile(); + + // Add ALL_BUILD + const char* no_working_directory = 0; + std::vector no_depends; + mf->AddUtilityCommand("ALL_BUILD", true, no_depends, + no_working_directory, + "echo", "Build all projects"); + cmTarget* allbuild = mf->FindTarget("ALL_BUILD"); + + // Add XCODE depend helper + std::string dir = mf->GetCurrentOutputDirectory(); + cmCustomCommandLine makecommand; + makecommand.push_back("make"); + makecommand.push_back("-C"); + makecommand.push_back(dir.c_str()); + makecommand.push_back("-f"); + makecommand.push_back(this->CurrentXCodeHackMakefile.c_str()); + if(this->XcodeVersion > 20) + { + makecommand.push_back("all.$(CONFIGURATION)"); + } + cmCustomCommandLines commandLines; + commandLines.push_back(makecommand); + // Add Re-Run CMake rules + this->CreateReRunCMakeFile(root); + + // now make the allbuild depend on all the non-utility targets + // in the project + for(std::vector::iterator i = gens.begin(); + i != gens.end(); ++i) + { + cmLocalGenerator* lg = *i; + if(this->IsExcluded(root, *i)) + { + continue; + } + cmTargets& tgts = lg->GetMakefile()->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) + { + cmTarget& target = l->second; + // make all exe, shared libs and modules + // run the depend check makefile as a post build rule + // this will make sure that when the next target is built + // things are up-to-date + if((target.GetType() == cmTarget::EXECUTABLE || + target.GetType() == cmTarget::STATIC_LIBRARY || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY)) + { + lg->GetMakefile()->AddCustomCommandToTarget(target.GetName(), + no_depends, + commandLines, + cmTarget::POST_BUILD, + "Depend check for xcode", + dir.c_str()); + + } + if(!target.GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + allbuild->AddUtility(target.GetName()); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::CreateReRunCMakeFile(cmLocalGenerator* root) +{ + cmMakefile* mf = root->GetMakefile(); + std::vector lfiles = mf->GetListFiles(); + // sort the array + std::sort(lfiles.begin(), lfiles.end(), std::less()); + std::vector::iterator new_end = + std::unique(lfiles.begin(), lfiles.end()); + lfiles.erase(new_end, lfiles.end()); + std::string dir = mf->GetHomeOutputDirectory(); + this->CurrentReRunCMakeMakefile = dir; + this->CurrentReRunCMakeMakefile += "/CMakeScripts"; + cmSystemTools::MakeDirectory(this->CurrentReRunCMakeMakefile.c_str()); + this->CurrentReRunCMakeMakefile += "/ReRunCMake.make"; + cmGeneratedFileStream makefileStream + (this->CurrentReRunCMakeMakefile.c_str()); + makefileStream.SetCopyIfDifferent(true); + makefileStream << "# Generated by CMake, DO NOT EDIT\n"; + makefileStream << cmake::GetCMakeFilesDirectoryPostSlash(); + makefileStream << "cmake.check_cache: "; + for(std::vector::const_iterator i = lfiles.begin(); + i != lfiles.end(); ++i) + { + makefileStream << "\\\n" << this->ConvertToRelativeForMake(i->c_str()); + } + std::string cmake = mf->GetRequiredDefinition("CMAKE_COMMAND"); + makefileStream << "\n\t" << this->ConvertToRelativeForMake(cmake.c_str()) + << " -H" << this->ConvertToRelativeForMake( + mf->GetHomeDirectory()) + << " -B" << this->ConvertToRelativeForMake( + mf->GetHomeOutputDirectory()) << "\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::ClearXCodeObjects() +{ + this->TargetDoneSet.clear(); + for(unsigned int i = 0; i < this->XCodeObjects.size(); ++i) + { + delete this->XCodeObjects[i]; + } + this->XCodeObjects.clear(); + this->GroupMap.clear(); + this->GroupNameMap.clear(); + this->TargetGroup.clear(); + this->FileRefs.clear(); +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::PBXType ptype) +{ + cmXCodeObject* obj; + if(this->XcodeVersion == 15) + { + obj = new cmXCodeObject(ptype, cmXCodeObject::OBJECT); + } + else + { + obj = new cmXCode21Object(ptype, cmXCodeObject::OBJECT); + } + this->XCodeObjects.push_back(obj); + return obj; +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateObject(cmXCodeObject::Type type) +{ + cmXCodeObject* obj = new cmXCodeObject(cmXCodeObject::None, type); + this->XCodeObjects.push_back(obj); + return obj; +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateString(const char* s) +{ + cmXCodeObject* obj = this->CreateObject(cmXCodeObject::STRING); + obj->SetString(s); + return obj; +} + +//---------------------------------------------------------------------------- +cmXCodeObject* cmGlobalXCodeGenerator +::CreateObjectReference(cmXCodeObject* ref) +{ + cmXCodeObject* obj = this->CreateObject(cmXCodeObject::OBJECT_REF); + obj->SetObject(ref); + return obj; +} + +//---------------------------------------------------------------------------- +cmStdString GetGroupMapKey(cmTarget& cmtarget, cmSourceFile* sf) +{ + cmStdString key(cmtarget.GetName()); + key += "-"; + key += sf->GetFullPath(); + return key; +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg, + cmSourceFile* sf, + cmTarget& cmtarget) +{ + // Add flags from target and source file properties. + std::string flags; + if(cmtarget.GetProperty("COMPILE_FLAGS")) + { + lg->AppendFlags(flags, cmtarget.GetProperty("COMPILE_FLAGS")); + } + lg->AppendFlags(flags, sf->GetProperty("COMPILE_FLAGS")); + cmSystemTools::ReplaceString(flags, "\"", "\\\""); + + // Add per-source definitions. + this->AppendDefines(flags, sf->GetProperty("COMPILE_DEFINITIONS"), true); + + // Using a map and the full path guarantees that we will always get the same + // fileRef object for any given full path. + // + std::string fname = sf->GetFullPath(); + cmXCodeObject* fileRef = this->FileRefs[fname]; + if(!fileRef) + { + fileRef = this->CreateObject(cmXCodeObject::PBXFileReference); + std::string comment = fname; + comment += " in "; + //std::string gname = group->GetObject("name")->GetString(); + //comment += gname.substr(1, gname.size()-2); + fileRef->SetComment(fname.c_str()); + + this->FileRefs[fname] = fileRef; + } + + cmStdString key = GetGroupMapKey(cmtarget, sf); + cmXCodeObject* group = this->GroupMap[key]; + cmXCodeObject* children = group->GetObject("children"); + if (!children->HasObject(fileRef)) + { + children->AddObject(fileRef); + } + + cmXCodeObject* buildFile = this->CreateObject(cmXCodeObject::PBXBuildFile); + buildFile->SetComment(fileRef->GetComment()); + buildFile->AddAttribute("fileRef", this->CreateObjectReference(fileRef)); + + cmXCodeObject* settings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + settings->AddAttribute("COMPILER_FLAGS", this->CreateString(flags.c_str())); + + // Is this a resource file in this target? Add it to the resources group... + // + cmTarget::SourceFileFlags tsFlags = cmtarget.GetTargetSourceFileFlags(sf); + bool isResource = (tsFlags.Type == cmTarget::SourceFileTypeResource); + + // Is this a "private" or "public" framework header file? + // Set the ATTRIBUTES attribute appropriately... + // + if(cmtarget.IsFrameworkOnApple()) + { + if(tsFlags.Type == cmTarget::SourceFileTypePrivateHeader) + { + cmXCodeObject* attrs = this->CreateObject(cmXCodeObject::OBJECT_LIST); + attrs->AddObject(this->CreateString("Private")); + settings->AddAttribute("ATTRIBUTES", attrs); + isResource = true; + } + else if(tsFlags.Type == cmTarget::SourceFileTypePublicHeader) + { + cmXCodeObject* attrs = this->CreateObject(cmXCodeObject::OBJECT_LIST); + attrs->AddObject(this->CreateString("Public")); + settings->AddAttribute("ATTRIBUTES", attrs); + isResource = true; + } + } + + // Add the fileRef to the top level Resources group/folder if it is not + // already there. + // + if(isResource && this->ResourcesGroupChildren && + !this->ResourcesGroupChildren->HasObject(fileRef)) + { + this->ResourcesGroupChildren->AddObject(fileRef); + } + + buildFile->AddAttribute("settings", settings); + fileRef->AddAttribute("fileEncoding", this->CreateString("4")); + const char* lang = + this->CurrentLocalGenerator->GetSourceFileLanguage(*sf); + std::string sourcecode = "sourcecode"; + std::string ext = sf->GetExtension(); + ext = cmSystemTools::LowerCase(ext); + if(ext == "o") + { + sourcecode = "compiled.mach-o.objfile"; + } + else if(ext == "mm") + { + sourcecode += ".cpp.objcpp"; + } + else if(ext == "m") + { + sourcecode += ".cpp.objc"; + } + else if(ext == "plist") + { + sourcecode += ".text.plist"; + } + else if(!lang) + { + sourcecode += ext; + sourcecode += "."; + sourcecode += ext; + } + else if(strcmp(lang, "C") == 0) + { + sourcecode += ".c.c"; + } + else if(strcmp(lang, "CXX") == 0) + { + sourcecode += ".cpp.cpp"; + } + else + { + sourcecode += ext; + sourcecode += "."; + sourcecode += ext; + } + fileRef->AddAttribute("lastKnownFileType", + this->CreateString(sourcecode.c_str())); + std::string path = + this->ConvertToRelativeForXCode(sf->GetFullPath().c_str()); + std::string dir; + std::string file; + cmSystemTools::SplitProgramPath(sf->GetFullPath().c_str(), + dir, file); + + fileRef->AddAttribute("name", this->CreateString(file.c_str())); + fileRef->AddAttribute("path", this->CreateString(path.c_str())); + if(this->XcodeVersion == 15) + { + fileRef->AddAttribute("refType", this->CreateString("4")); + } + if(path.size() > 1 && path[0] == '.' && path[1] == '.') + { + fileRef->AddAttribute("sourceTree", this->CreateString("")); + } + else + { + fileRef->AddAttribute("sourceTree", this->CreateString("")); + } + return buildFile; +} + +//---------------------------------------------------------------------------- +bool cmGlobalXCodeGenerator::SpecialTargetEmitted(std::string const& tname) +{ + if(tname == "ALL_BUILD" || tname == "XCODE_DEPEND_HELPER" || + tname == "install" || tname == "package" || tname == "RUN_TESTS" ) + { + if(this->TargetDoneSet.find(tname) != this->TargetDoneSet.end()) + { + return true; + } + this->TargetDoneSet.insert(tname); + return false; + } + return false; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::SetCurrentLocalGenerator(cmLocalGenerator* gen) +{ + this->CurrentLocalGenerator = gen; + this->CurrentMakefile = gen->GetMakefile(); + std::string outdir = + cmSystemTools::CollapseFullPath(this->CurrentMakefile-> + GetCurrentOutputDirectory()); + cmSystemTools::SplitPath(outdir.c_str(), + this->CurrentOutputDirectoryComponents); + + // Select the current set of configuration types. + this->CurrentConfigurationTypes.clear(); + if(this->XcodeVersion > 20) + { + if(const char* types = + this->CurrentMakefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(types, + this->CurrentConfigurationTypes); + } + } + if(this->CurrentConfigurationTypes.empty()) + { + if(const char* buildType = + this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE")) + { + this->CurrentConfigurationTypes.push_back(buildType); + } + else + { + this->CurrentConfigurationTypes.push_back(""); + } + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen, + std::vector& + targets) +{ + this->SetCurrentLocalGenerator(gen); + cmTargets &tgts = this->CurrentMakefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) + { + cmTarget& cmtarget = l->second; + + // make sure ALL_BUILD, INSTALL, etc are only done once + if(this->SpecialTargetEmitted(l->first.c_str())) + { + continue; + } + + if(cmtarget.GetType() == cmTarget::UTILITY || + cmtarget.GetType() == cmTarget::GLOBAL_TARGET) + { + targets.push_back(this->CreateUtilityTarget(cmtarget)); + continue; + } + + // organize the sources + std::vector const &classes = cmtarget.GetSourceFiles(); + std::vector externalObjFiles; + std::vector headerFiles; + std::vector resourceFiles; + std::vector sourceFiles; + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); ++i) + { + cmXCodeObject* xsf = + this->CreateXCodeSourceFile(this->CurrentLocalGenerator, + *i, cmtarget); + cmXCodeObject* fr = xsf->GetObject("fileRef"); + cmXCodeObject* filetype = + fr->GetObject()->GetObject("lastKnownFileType"); + + cmTarget::SourceFileFlags tsFlags = + cmtarget.GetTargetSourceFileFlags(*i); + + if(strcmp(filetype->GetString(), "\"compiled.mach-o.objfile\"") == 0) + { + externalObjFiles.push_back(xsf); + } + else if((*i)->GetPropertyAsBool("HEADER_FILE_ONLY")) + { + headerFiles.push_back(xsf); + } + else if(tsFlags.Type == cmTarget::SourceFileTypeResource) + { + resourceFiles.push_back(xsf); + } + else + { + sourceFiles.push_back(xsf); + } + } + + // some build phases only apply to bundles and/or frameworks + bool isFrameworkTarget = cmtarget.IsFrameworkOnApple(); + bool isBundleTarget = cmtarget.GetPropertyAsBool("MACOSX_BUNDLE"); + + cmXCodeObject* buildFiles = 0; + + // create source build phase + cmXCodeObject* sourceBuildPhase = 0; + if (!sourceFiles.empty()) + { + sourceBuildPhase = + this->CreateObject(cmXCodeObject::PBXSourcesBuildPhase); + sourceBuildPhase->SetComment("Sources"); + sourceBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + for(std::vector::iterator i = sourceFiles.begin(); + i != sourceFiles.end(); ++i) + { + buildFiles->AddObject(*i); + } + sourceBuildPhase->AddAttribute("files", buildFiles); + sourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + } + + // create header build phase - only for framework targets + cmXCodeObject* headerBuildPhase = 0; + if (!headerFiles.empty() && isFrameworkTarget) + { + headerBuildPhase = + this->CreateObject(cmXCodeObject::PBXHeadersBuildPhase); + headerBuildPhase->SetComment("Headers"); + headerBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + for(std::vector::iterator i = headerFiles.begin(); + i != headerFiles.end(); ++i) + { + buildFiles->AddObject(*i); + } + headerBuildPhase->AddAttribute("files", buildFiles); + headerBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + } + + // create resource build phase - only for framework or bundle targets + cmXCodeObject* resourceBuildPhase = 0; + if (!resourceFiles.empty() && (isFrameworkTarget || isBundleTarget)) + { + resourceBuildPhase = + this->CreateObject(cmXCodeObject::PBXResourcesBuildPhase); + resourceBuildPhase->SetComment("Resources"); + resourceBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + for(std::vector::iterator i = resourceFiles.begin(); + i != resourceFiles.end(); ++i) + { + buildFiles->AddObject(*i); + } + resourceBuildPhase->AddAttribute("files", buildFiles); + resourceBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + } + + // create vector of "non-resource content file" build phases - only for + // framework or bundle targets + std::vector contentBuildPhases; + if (isFrameworkTarget || isBundleTarget) + { + typedef std::map > + mapOfVectorOfSourceFiles; + mapOfVectorOfSourceFiles bundleFiles; + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); ++i) + { + cmTarget::SourceFileFlags tsFlags = + cmtarget.GetTargetSourceFileFlags(*i); + if(tsFlags.Type == cmTarget::SourceFileTypeMacContent) + { + bundleFiles[tsFlags.MacFolder].push_back(*i); + } + } + mapOfVectorOfSourceFiles::iterator mit; + for ( mit = bundleFiles.begin(); mit != bundleFiles.end(); ++ mit ) + { + cmXCodeObject* copyFilesBuildPhase = + this->CreateObject(cmXCodeObject::PBXCopyFilesBuildPhase); + copyFilesBuildPhase->SetComment("Copy files"); + copyFilesBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + copyFilesBuildPhase->AddAttribute("dstSubfolderSpec", + this->CreateString("6")); + cmOStringStream ostr; + if (cmtarget.IsFrameworkOnApple()) + { + // dstPath in frameworks is relative to Versions/ + ostr << mit->first; + } + else if ( mit->first != "MacOS" ) + { + // dstPath in bundles is relative to Contents/MacOS + ostr << "../" << mit->first.c_str(); + } + copyFilesBuildPhase->AddAttribute("dstPath", + this->CreateString(ostr.str().c_str())); + copyFilesBuildPhase->AddAttribute( + "runOnlyForDeploymentPostprocessing", this->CreateString("0")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + copyFilesBuildPhase->AddAttribute("files", buildFiles); + std::vector::iterator sfIt; + for ( sfIt = mit->second.begin(); sfIt != mit->second.end(); ++ sfIt ) + { + cmXCodeObject* xsf = + this->CreateXCodeSourceFile(this->CurrentLocalGenerator, + *sfIt, cmtarget); + buildFiles->AddObject(xsf); + } + contentBuildPhases.push_back(copyFilesBuildPhase); + } + } + + // create framework build phase + cmXCodeObject* frameworkBuildPhase = 0; + if (!externalObjFiles.empty()) + { + frameworkBuildPhase = + this->CreateObject(cmXCodeObject::PBXFrameworksBuildPhase); + frameworkBuildPhase->SetComment("Frameworks"); + frameworkBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + frameworkBuildPhase->AddAttribute("files", buildFiles); + for(std::vector::iterator i = externalObjFiles.begin(); + i != externalObjFiles.end(); ++i) + { + buildFiles->AddObject(*i); + } + frameworkBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + } + + // create list of build phases and create the XCode target + cmXCodeObject* buildPhases = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + + this->CreateCustomCommands(buildPhases, sourceBuildPhase, + headerBuildPhase, resourceBuildPhase, + contentBuildPhases, + frameworkBuildPhase, cmtarget); + + targets.push_back(this->CreateXCodeTarget(cmtarget, buildPhases)); + } +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateBuildPhase(const char* name, + const char* name2, + cmTarget& cmtarget, + const std::vector& + commands) +{ + if(commands.size() == 0 && strcmp(name, "CMake ReRun") != 0) + { + return 0; + } + cmXCodeObject* buildPhase = + this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase); + buildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + buildPhase->AddAttribute("files", buildFiles); + buildPhase->AddAttribute("name", + this->CreateString(name)); + buildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + buildPhase->AddAttribute("shellPath", + this->CreateString("/bin/sh")); + this->AddCommandsToBuildPhase(buildPhase, cmtarget, commands, + name2); + return buildPhase; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::CreateCustomCommands(cmXCodeObject* buildPhases, + cmXCodeObject* + sourceBuildPhase, + cmXCodeObject* + headerBuildPhase, + cmXCodeObject* + resourceBuildPhase, + std::vector + contentBuildPhases, + cmXCodeObject* + frameworkBuildPhase, + cmTarget& cmtarget) +{ + std::vector const & prebuild + = cmtarget.GetPreBuildCommands(); + std::vector const & prelink + = cmtarget.GetPreLinkCommands(); + std::vector const & postbuild + = cmtarget.GetPostBuildCommands(); + std::vectorconst &classes = cmtarget.GetSourceFiles(); + // add all the sources + std::vector commands; + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); ++i) + { + if((*i)->GetCustomCommand()) + { + commands.push_back(*(*i)->GetCustomCommand()); + } + } + std::vector reruncom; + cmXCodeObject* cmakeReRunPhase = + this->CreateBuildPhase("CMake ReRun", "cmakeReRunPhase", + cmtarget, reruncom); + buildPhases->AddObject(cmakeReRunPhase); + // create prebuild phase + cmXCodeObject* cmakeRulesBuildPhase = + this->CreateBuildPhase("CMake Rules", + "cmakeRulesBuildPhase", + cmtarget, commands); + // create prebuild phase + cmXCodeObject* preBuildPhase = + this->CreateBuildPhase("CMake PreBuild Rules", "preBuildCommands", + cmtarget, prebuild); + // create prelink phase + cmXCodeObject* preLinkPhase = + this->CreateBuildPhase("CMake PreLink Rules", "preLinkCommands", + cmtarget, prelink); + // create postbuild phase + cmXCodeObject* postBuildPhase = + this->CreateBuildPhase("CMake PostBuild Rules", "postBuildPhase", + cmtarget, postbuild); + + // The order here is the order they will be built in. + // The order "headers, resources, sources" mimics a native project generated + // from an xcode template... + // + if(preBuildPhase) + { + buildPhases->AddObject(preBuildPhase); + } + if(cmakeRulesBuildPhase) + { + buildPhases->AddObject(cmakeRulesBuildPhase); + } + if(headerBuildPhase) + { + buildPhases->AddObject(headerBuildPhase); + } + if(resourceBuildPhase) + { + buildPhases->AddObject(resourceBuildPhase); + } + std::vector::iterator cit; + for (cit = contentBuildPhases.begin(); cit != contentBuildPhases.end(); + ++cit) + { + buildPhases->AddObject(*cit); + } + if(sourceBuildPhase) + { + buildPhases->AddObject(sourceBuildPhase); + } + if(preLinkPhase) + { + buildPhases->AddObject(preLinkPhase); + } + if(frameworkBuildPhase) + { + buildPhases->AddObject(frameworkBuildPhase); + } + if(postBuildPhase) + { + buildPhases->AddObject(postBuildPhase); + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator::ExtractFlag(const char* flag, + std::string& flags) +{ + std::string retFlag; + std::string::size_type pos = flags.find(flag); + if(pos != flags.npos) + { + while(pos < flags.size() && flags[pos] != ' ') + { + retFlag += flags[pos]; + flags[pos] = ' '; + pos++; + } + } + return retFlag; +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase, + cmTarget& target, + std::vector + const & commands, + const char* name) +{ + if(strcmp(name, "cmakeReRunPhase") == 0) + { + std::string cdir = this->CurrentMakefile->GetHomeOutputDirectory(); + cdir = this->ConvertToRelativeForMake(cdir.c_str()); + std::string makecmd = "make -C "; + makecmd += cdir; + makecmd += " -f "; + makecmd += + this->ConvertToRelativeForMake(this->CurrentReRunCMakeMakefile.c_str()); + cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ "); + buildphase->AddAttribute("shellScript", + this->CreateString(makecmd.c_str())); + return; + } + + // collect multiple outputs of custom commands into a set + // which will be used for every configuration + std::map multipleOutputPairs; + for(std::vector::const_iterator i = commands.begin(); + i != commands.end(); ++i) + { + cmCustomCommand const& cc = *i; + if(!cc.GetCommandLines().empty()) + { + const std::vector& outputs = cc.GetOutputs(); + if(!outputs.empty()) + { + // If there are more than one outputs treat the + // first as the primary output and make the rest depend on it. + std::vector::const_iterator o = outputs.begin(); + std::string primaryOutput = this->ConvertToRelativeForMake(o->c_str()); + for(++o; o != outputs.end(); ++o) + { + std::string currentOutput=this->ConvertToRelativeForMake(o->c_str()); + multipleOutputPairs[currentOutput] = primaryOutput; + } + } + } + } + + std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory(); + dir += "/CMakeScripts"; + cmSystemTools::MakeDirectory(dir.c_str()); + std::string makefile = dir; + makefile += "/"; + makefile += target.GetName(); + makefile += "_"; + makefile += name; + makefile += ".make"; + + for (std::vector::const_iterator currentConfig= + this->CurrentConfigurationTypes.begin(); + currentConfig!=this->CurrentConfigurationTypes.end(); + currentConfig++ ) + { + this->CreateCustomRulesMakefile(makefile.c_str(), + target, + commands, + currentConfig->c_str(), + multipleOutputPairs); + } + + std::string cdir = this->CurrentMakefile->GetCurrentOutputDirectory(); + cdir = this->ConvertToRelativeForXCode(cdir.c_str()); + std::string makecmd = "make -C "; + makecmd += cdir; + makecmd += " -f "; + makecmd += this->ConvertToRelativeForMake( + (makefile+"$CONFIGURATION").c_str()); + if(!multipleOutputPairs.empty()) + { + makecmd += " cmake_check_multiple_outputs"; + } + makecmd += " all"; + cmSystemTools::ReplaceString(makecmd, "\\ ", "\\\\ "); + buildphase->AddAttribute("shellScript", + this->CreateString(makecmd.c_str())); +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator +::CreateCustomRulesMakefile(const char* makefileBasename, + cmTarget& target, + std::vector + const & commands, + const char* configName, + const std::map& multipleOutputPairs + ) +{ + std::string makefileName=makefileBasename; + makefileName+=configName; + cmGeneratedFileStream makefileStream(makefileName.c_str()); + if(!makefileStream) + { + return; + } + makefileStream.SetCopyIfDifferent(true); + makefileStream << "# Generated by CMake, DO NOT EDIT\n"; + makefileStream << "# Custom rules for " << target.GetName() << "\n"; + + // have all depend on all outputs + makefileStream << "all: "; + std::map tname; + int count = 0; + for(std::vector::const_iterator i = commands.begin(); + i != commands.end(); ++i) + { + cmCustomCommand const& cc = *i; + if(!cc.GetCommandLines().empty()) + { + const std::vector& outputs = cc.GetOutputs(); + if(!outputs.empty()) + { + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + makefileStream + << "\\\n\t" << this->ConvertToRelativeForMake(o->c_str()); + } + } + else + { + cmOStringStream str; + str << "_buildpart_" << count++ ; + tname[&cc] = std::string(target.GetName()) + str.str(); + makefileStream << "\\\n\t" << tname[&cc]; + } + } + } + makefileStream << "\n\n"; + for(std::vector::const_iterator i = commands.begin(); + i != commands.end(); ++i) + { + cmCustomCommand const& cc = *i; + if(!cc.GetCommandLines().empty()) + { + bool escapeOldStyle = cc.GetEscapeOldStyle(); + bool escapeAllowMakeVars = cc.GetEscapeAllowMakeVars(); + makefileStream << "\n"; + const std::vector& outputs = cc.GetOutputs(); + if(!outputs.empty()) + { + // There is at least one output, start the rule for it + std::string primary_output = + this->ConvertToRelativeForMake(outputs.begin()->c_str()); + makefileStream << primary_output << ": "; + } + else + { + // There are no outputs. Use the generated force rule name. + makefileStream << tname[&cc] << ": "; + } + for(std::vector::const_iterator d = + cc.GetDepends().begin(); + d != cc.GetDepends().end(); ++d) + { + std::string dep = + this->CurrentLocalGenerator->GetRealDependency(d->c_str(), + configName); + makefileStream << "\\\n" << this + ->ConvertToRelativeForMake(dep.c_str()); + } + makefileStream << "\n"; + + if(const char* comment = cc.GetComment()) + { + std::string echo_cmd = "echo "; + echo_cmd += (this->CurrentLocalGenerator-> + EscapeForShell(comment, escapeAllowMakeVars)); + makefileStream << "\t" << echo_cmd.c_str() << "\n"; + } + + // Add each command line to the set of commands. + for(cmCustomCommandLines::const_iterator cl = + cc.GetCommandLines().begin(); + cl != cc.GetCommandLines().end(); ++cl) + { + // Build the command line in a single string. + const cmCustomCommandLine& commandLine = *cl; + std::string cmd2 = this->CurrentLocalGenerator + ->GetRealLocation(commandLine[0].c_str(), configName); + + cmSystemTools::ReplaceString(cmd2, "/./", "/"); + cmd2 = this->ConvertToRelativeForMake(cmd2.c_str()); + std::string cmd; + if(cc.GetWorkingDirectory()) + { + cmd += "cd "; + cmd += this->ConvertToRelativeForMake(cc.GetWorkingDirectory()); + cmd += " && "; + } + cmd += cmd2; + for(unsigned int j=1; j < commandLine.size(); ++j) + { + cmd += " "; + if(escapeOldStyle) + { + cmd += (this->CurrentLocalGenerator + ->EscapeForShellOldStyle(commandLine[j].c_str())); + } + else + { + cmd += (this->CurrentLocalGenerator-> + EscapeForShell(commandLine[j].c_str(), + escapeAllowMakeVars)); + } + } + makefileStream << "\t" << cmd.c_str() << "\n"; + } + } + } + + // Add rules to deal with multiple outputs of custom commands. + if(!multipleOutputPairs.empty()) + { + makefileStream << + "\n# Dependencies of multiple outputs to their primary outputs \n"; + + for(std::map::const_iterator o = + multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) + { + makefileStream << o->first << ": " << o->second << "\n"; + } + + makefileStream << + "\n" + "cmake_check_multiple_outputs:\n"; + for(std::map::const_iterator o = + multipleOutputPairs.begin(); o != multipleOutputPairs.end(); ++o) + { + makefileStream << "\t@if [ ! -f " + << o->first << " ]; then rm -f " + << o->second << "; fi\n"; + } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, + cmXCodeObject* buildSettings, + std::string& fileType, + std::string& productType, + std::string& productName, + const char* configName) +{ + std::string flags; + std::string defFlags; + bool shared = ((target.GetType() == cmTarget::SHARED_LIBRARY) || + (target.GetType() == cmTarget::MODULE_LIBRARY)); + + const char* lang = target.GetLinkerLanguage(this); + std::string cflags; + if(lang) + { + // for c++ projects get the c flags as well + if(strcmp(lang, "CXX") == 0) + { + this->CurrentLocalGenerator->AddLanguageFlags(cflags, "C", configName); + this->CurrentLocalGenerator->AddSharedFlags(cflags, lang, shared); + } + + // Add language-specific flags. + this->CurrentLocalGenerator->AddLanguageFlags(flags, lang, configName); + + // Add shared-library flags if needed. + this->CurrentLocalGenerator->AddSharedFlags(flags, lang, shared); + } + + // Add define flags + this->CurrentLocalGenerator-> + AppendFlags(defFlags, + this->CurrentMakefile->GetDefineFlags()); + cmSystemTools::ReplaceString(defFlags, "\"", "\\\""); + cmSystemTools::ReplaceString(flags, "\"", "\\\""); + cmSystemTools::ReplaceString(cflags, "\"", "\\\""); + + // Add preprocessor definitions for this target and configuration. + std::string ppDefs; + if(this->XcodeVersion > 15) + { + this->AppendDefines(ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)\""); + } + if(const char* exportMacro = target.GetExportMacro()) + { + // Add the export symbol definition for shared library objects. + this->AppendDefines(ppDefs, exportMacro); + } + this->AppendDefines + (ppDefs, this->CurrentMakefile->GetProperty("COMPILE_DEFINITIONS")); + this->AppendDefines(ppDefs, target.GetProperty("COMPILE_DEFINITIONS")); + if(configName) + { + std::string defVarName = "COMPILE_DEFINITIONS_"; + defVarName += cmSystemTools::UpperCase(configName); + this->AppendDefines + (ppDefs, this->CurrentMakefile->GetProperty(defVarName.c_str())); + this->AppendDefines(ppDefs, target.GetProperty(defVarName.c_str())); + } + buildSettings->AddAttribute + ("GCC_PREPROCESSOR_DEFINITIONS", this->CreateString(ppDefs.c_str())); + + std::string extraLinkOptions; + if(target.GetType() == cmTarget::EXECUTABLE) + { + extraLinkOptions = + this->CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); + } + if(target.GetType() == cmTarget::SHARED_LIBRARY) + { + extraLinkOptions = this->CurrentMakefile-> + GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + } + if(target.GetType() == cmTarget::MODULE_LIBRARY) + { + extraLinkOptions = this->CurrentMakefile-> + GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + } + + const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); + if(targetLinkFlags) + { + extraLinkOptions += " "; + extraLinkOptions += targetLinkFlags; + } + + // The product name is the full name of the target for this configuration. + productName = target.GetFullName(configName); + + // Get the product name components. + std::string pnprefix; + std::string pnbase; + std::string pnsuffix; + target.GetFullNameComponents(pnprefix, pnbase, pnsuffix, configName); + + // Store the product name for all target types. + buildSettings->AddAttribute("PRODUCT_NAME", + this->CreateString(pnbase.c_str())); + + // Set attributes to specify the proper name for the target. + if(target.GetType() == cmTarget::STATIC_LIBRARY || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY || + target.GetType() == cmTarget::EXECUTABLE) + { + std::string pndir = target.GetDirectory(); + buildSettings->AddAttribute("SYMROOT", + this->CreateString(pndir.c_str())); + buildSettings->AddAttribute("EXECUTABLE_PREFIX", + this->CreateString(pnprefix.c_str())); + buildSettings->AddAttribute("EXECUTABLE_SUFFIX", + this->CreateString(pnsuffix.c_str())); + } + + // Handle settings for each target type. + switch(target.GetType()) + { + case cmTarget::STATIC_LIBRARY: + { + fileType = "archive.ar"; + productType = "com.apple.product-type.library.static"; + + buildSettings->AddAttribute("LIBRARY_STYLE", + this->CreateString("STATIC")); + break; + } + + case cmTarget::MODULE_LIBRARY: + { + buildSettings->AddAttribute("LIBRARY_STYLE", + this->CreateString("BUNDLE")); + if(this->XcodeVersion >= 22) + { + fileType = "compiled.mach-o.executable"; + productType = "com.apple.product-type.tool"; + + buildSettings->AddAttribute("MACH_O_TYPE", + this->CreateString("mh_bundle")); + buildSettings->AddAttribute("GCC_DYNAMIC_NO_PIC", + this->CreateString("NO")); + // Add the flags to create an executable. + std::string createFlags = + this->LookupFlags("CMAKE_", lang, "_LINK_FLAGS", ""); + if(!createFlags.empty()) + { + extraLinkOptions += " "; + extraLinkOptions += createFlags; + } + } + else + { + fileType = "compiled.mach-o.dylib"; + productType = "com.apple.product-type.library.dynamic"; + + // Add the flags to create a module. + std::string createFlags = + this->LookupFlags("CMAKE_SHARED_MODULE_CREATE_", lang, "_FLAGS", + "-bundle"); + if(!createFlags.empty()) + { + extraLinkOptions += " "; + extraLinkOptions += createFlags; + } + } + break; + } + case cmTarget::SHARED_LIBRARY: + { + if(target.GetPropertyAsBool("FRAMEWORK")) + { + fileType = "wrapper.framework"; + productType = "com.apple.product-type.framework"; + + std::string version = target.GetFrameworkVersion(); + buildSettings->AddAttribute("FRAMEWORK_VERSION", + this->CreateString(version.c_str())); + } + else + { + fileType = "compiled.mach-o.dylib"; + productType = "com.apple.product-type.library.dynamic"; + + // Add the flags to create a shared library. + std::string createFlags = + this->LookupFlags("CMAKE_SHARED_LIBRARY_CREATE_", lang, "_FLAGS", + "-dynamiclib"); + if(!createFlags.empty()) + { + extraLinkOptions += " "; + extraLinkOptions += createFlags; + } + } + + buildSettings->AddAttribute("LIBRARY_STYLE", + this->CreateString("DYNAMIC")); + buildSettings->AddAttribute("DYLIB_COMPATIBILITY_VERSION", + this->CreateString("1")); + buildSettings->AddAttribute("DYLIB_CURRENT_VERSION", + this->CreateString("1")); + break; + } + case cmTarget::EXECUTABLE: + { + fileType = "compiled.mach-o.executable"; + + // Add the flags to create an executable. + std::string createFlags = + this->LookupFlags("CMAKE_", lang, "_LINK_FLAGS", ""); + if(!createFlags.empty()) + { + extraLinkOptions += " "; + extraLinkOptions += createFlags; + } + + // Handle bundles and normal executables separately. + if(target.GetPropertyAsBool("MACOSX_BUNDLE")) + { + productType = "com.apple.product-type.application"; + std::string plist = this->CurrentMakefile->GetCurrentOutputDirectory(); + plist += cmake::GetCMakeFilesDirectory(); + plist += "/"; + plist += target.GetName(); + plist += "Info.plist"; + this->CurrentLocalGenerator + ->GenerateAppleInfoPList(&target, productName.c_str(), plist.c_str()); + std::string path = + this->ConvertToRelativeForXCode(plist.c_str()); + buildSettings->AddAttribute("INFOPLIST_FILE", + this->CreateString(path.c_str())); + + } + else + { + productType = "com.apple.product-type.tool"; + } + } + break; + default: + break; + } + if(this->XcodeVersion >= 22) + { + buildSettings->AddAttribute("PREBINDING", + this->CreateString("NO")); + } + std::string dirs; + std::vector includes; + this->CurrentLocalGenerator->GetIncludeDirectories(includes); + std::string fdirs; + std::set emitted; + emitted.insert("/System/Library/Frameworks"); + for(std::vector::iterator i = includes.begin(); + i != includes.end(); ++i) + { + if(this->NameResolvesToFramework(i->c_str())) + { + std::string frameworkDir = *i; + frameworkDir += "/../"; + frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str()); + if(emitted.insert(frameworkDir).second) + { + fdirs += this->XCodeEscapePath(frameworkDir.c_str()); + fdirs += " "; + } + } + else + { + std::string incpath = + this->XCodeEscapePath(i->c_str()); + dirs += incpath + " "; + } + } + std::vector& frameworks = target.GetFrameworks(); + if(frameworks.size()) + { + for(std::vector::iterator fmIt = frameworks.begin(); + fmIt != frameworks.end(); ++fmIt) + { + if(emitted.insert(*fmIt).second) + { + fdirs += this->XCodeEscapePath(fmIt->c_str()); + fdirs += " "; + } + } + } + if(fdirs.size()) + { + buildSettings->AddAttribute("FRAMEWORK_SEARCH_PATHS", + this->CreateString(fdirs.c_str())); + } + if(dirs.size()) + { + buildSettings->AddAttribute("HEADER_SEARCH_PATHS", + this->CreateString(dirs.c_str())); + } + std::string oflagc = this->ExtractFlag("-O", cflags); + char optLevel[2]; + optLevel[0] = '0'; + optLevel[1] = 0; + if(oflagc.size() == 3) + { + optLevel[0] = oflagc[2]; + } + if(oflagc.size() == 2) + { + optLevel[0] = '1'; + } + std::string oflag = this->ExtractFlag("-O", flags); + if(oflag.size() == 3) + { + optLevel[0] = oflag[2]; + } + if(oflag.size() == 2) + { + optLevel[0] = '1'; + } + std::string gflagc = this->ExtractFlag("-g", cflags); + // put back gdwarf-2 if used since there is no way + // to represent it in the gui, but we still want debug yes + if(gflagc == "-gdwarf-2") + { + cflags += " "; + cflags += gflagc; + } + std::string gflag = this->ExtractFlag("-g", flags); + if(gflag == "-gdwarf-2") + { + flags += " "; + flags += gflag; + } + const char* debugStr = "YES"; + if(gflagc.size() ==0 && gflag.size() == 0) + { + debugStr = "NO"; + } + + // Convert "XCODE_ATTRIBUTE_*" properties directly. + { + cmPropertyMap const& props = target.GetProperties(); + for(cmPropertyMap::const_iterator i = props.begin(); + i != props.end(); ++i) + { + if(i->first.find("XCODE_ATTRIBUTE_") == 0) + { + buildSettings->AddAttribute(i->first.substr(16).c_str(), + this->CreateString(i->second.GetValue())); + } + } + } + + buildSettings->AddAttribute("GCC_GENERATE_DEBUGGING_SYMBOLS", + this->CreateString(debugStr)); + buildSettings->AddAttribute("GCC_OPTIMIZATION_LEVEL", + this->CreateString(optLevel)); + buildSettings->AddAttribute("OPTIMIZATION_CFLAGS", + this->CreateString(oflagc.c_str())); + buildSettings->AddAttribute("GCC_SYMBOLS_PRIVATE_EXTERN", + this->CreateString("NO")); + buildSettings->AddAttribute("GCC_INLINES_ARE_PRIVATE_EXTERN", + this->CreateString("NO")); + if(lang && strcmp(lang, "CXX") == 0) + { + flags += " "; + flags += defFlags; + buildSettings->AddAttribute("OTHER_CPLUSPLUSFLAGS", + this->CreateString(flags.c_str())); + cflags += " "; + cflags += defFlags; + buildSettings->AddAttribute("OTHER_CFLAGS", + this->CreateString(cflags.c_str())); + + } + else + { + flags += " "; + flags += defFlags; + buildSettings->AddAttribute("OTHER_CFLAGS", + this->CreateString(flags.c_str())); + } + + // Create the INSTALL_PATH attribute. + std::string install_name_dir; + if(target.GetType() == cmTarget::SHARED_LIBRARY) + { + // Get the install_name directory for the build tree. + install_name_dir = target.GetInstallNameDirForBuildTree(configName, true); + if(install_name_dir.empty()) + { + // Xcode will not pass the -install_name option at all if INSTALL_PATH + // is not given or is empty. We must explicitly put the flag in the + // link flags to create an install_name with just the library soname. + extraLinkOptions += " -install_name "; + extraLinkOptions += productName; + } + else + { + // Convert to a path for the native build tool. + cmSystemTools::ConvertToUnixSlashes(install_name_dir); + // do not escape spaces on this since it is only a single path + } + } + buildSettings->AddAttribute("INSTALL_PATH", + this->CreateString(install_name_dir.c_str())); + + buildSettings->AddAttribute("OTHER_LDFLAGS", + this->CreateString(extraLinkOptions.c_str())); + buildSettings->AddAttribute("OTHER_REZFLAGS", + this->CreateString("")); + buildSettings->AddAttribute("SECTORDER_FLAGS", + this->CreateString("")); + buildSettings->AddAttribute("USE_HEADERMAP", + this->CreateString("NO")); + buildSettings->AddAttribute("WARNING_CFLAGS", + this->CreateString( + "-Wmost -Wno-four-char-constants" + " -Wno-unknown-pragmas")); +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateUtilityTarget(cmTarget& cmtarget) +{ + cmXCodeObject* shellBuildPhase = + this->CreateObject(cmXCodeObject::PBXShellScriptBuildPhase); + shellBuildPhase->AddAttribute("buildActionMask", + this->CreateString("2147483647")); + cmXCodeObject* buildFiles = this->CreateObject(cmXCodeObject::OBJECT_LIST); + shellBuildPhase->AddAttribute("files", buildFiles); + cmXCodeObject* inputPaths = this->CreateObject(cmXCodeObject::OBJECT_LIST); + shellBuildPhase->AddAttribute("inputPaths", inputPaths); + cmXCodeObject* outputPaths = this->CreateObject(cmXCodeObject::OBJECT_LIST); + shellBuildPhase->AddAttribute("outputPaths", outputPaths); + shellBuildPhase->AddAttribute("runOnlyForDeploymentPostprocessing", + this->CreateString("0")); + shellBuildPhase->AddAttribute("shellPath", + this->CreateString("/bin/sh")); + shellBuildPhase->AddAttribute("shellScript", + this->CreateString( + "# shell script goes here\nexit 0")); + cmXCodeObject* target = + this->CreateObject(cmXCodeObject::PBXAggregateTarget); + target->SetComment(cmtarget.GetName()); + cmXCodeObject* buildPhases = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + std::vector emptyContentVector; + this->CreateCustomCommands(buildPhases, 0, 0, 0, emptyContentVector, 0, + cmtarget); + target->AddAttribute("buildPhases", buildPhases); + cmXCodeObject* buildSettings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + std::string fileTypeString; + std::string productTypeString; + std::string productName; + const char* globalConfig = 0; + if(this->XcodeVersion > 20) + { + this->AddConfigurations(target, cmtarget); + } + else + { + globalConfig = this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"); + } + this->CreateBuildSettings(cmtarget, + buildSettings, fileTypeString, + productTypeString, productName, globalConfig); + target->AddAttribute("buildSettings", buildSettings); + cmXCodeObject* dependencies = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + target->AddAttribute("dependencies", dependencies); + target->AddAttribute("name", this->CreateString(productName.c_str())); + target->AddAttribute("productName",this->CreateString(productName.c_str())); + target->SetTarget(&cmtarget); + return target; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::AddConfigurations(cmXCodeObject* target, + cmTarget& cmtarget) +{ + std::string configTypes = + this->CurrentMakefile->GetRequiredDefinition("CMAKE_CONFIGURATION_TYPES"); + std::vector configVectorIn; + std::vector configVector; + configVectorIn.push_back(configTypes); + cmSystemTools::ExpandList(configVectorIn, configVector); + cmXCodeObject* configlist = + this->CreateObject(cmXCodeObject::XCConfigurationList); + cmXCodeObject* buildConfigurations = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + configlist->AddAttribute("buildConfigurations", buildConfigurations); + std::string comment = "Build configuration list for "; + comment += cmXCodeObject::PBXTypeNames[target->GetIsA()]; + comment += " \""; + comment += cmtarget.GetName(); + comment += "\""; + configlist->SetComment(comment.c_str()); + target->AddAttribute("buildConfigurationList", + this->CreateObjectReference(configlist)); + for(unsigned int i = 0; i < configVector.size(); ++i) + { + cmXCodeObject* config = + this->CreateObject(cmXCodeObject::XCBuildConfiguration); + buildConfigurations->AddObject(config); + cmXCodeObject* buildSettings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + std::string fileTypeString; + std::string productTypeString; + std::string productName; + this->CreateBuildSettings(cmtarget, + buildSettings, fileTypeString, + productTypeString, productName, + configVector[i].c_str()); + config->AddAttribute("name", this->CreateString(configVector[i].c_str())); + config->SetComment(configVector[i].c_str()); + config->AddAttribute("buildSettings", buildSettings); + } + if(configVector.size()) + { + configlist->AddAttribute("defaultConfigurationName", + this->CreateString(configVector[0].c_str())); + configlist->AddAttribute("defaultConfigurationIsVisible", + this->CreateString("0")); + } +} + +//---------------------------------------------------------------------------- +cmXCodeObject* +cmGlobalXCodeGenerator::CreateXCodeTarget(cmTarget& cmtarget, + cmXCodeObject* buildPhases) +{ + cmXCodeObject* target = + this->CreateObject(cmXCodeObject::PBXNativeTarget); + target->AddAttribute("buildPhases", buildPhases); + cmXCodeObject* buildRules = this->CreateObject(cmXCodeObject::OBJECT_LIST); + target->AddAttribute("buildRules", buildRules); + cmXCodeObject* buildSettings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + std::string fileTypeString; + std::string productTypeString; + std::string productName; + const char* globalConfig = 0; + if(this->XcodeVersion > 20) + { + this->AddConfigurations(target, cmtarget); + } + else + { + globalConfig = this->CurrentMakefile->GetDefinition("CMAKE_BUILD_TYPE"); + } + this->CreateBuildSettings(cmtarget, + buildSettings, fileTypeString, + productTypeString, productName, globalConfig); + target->AddAttribute("buildSettings", buildSettings); + cmXCodeObject* dependencies = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + target->AddAttribute("dependencies", dependencies); + target->AddAttribute("name", this->CreateString(productName.c_str())); + target->AddAttribute("productName",this->CreateString(productName.c_str())); + + cmXCodeObject* fileRef = + this->CreateObject(cmXCodeObject::PBXFileReference); + fileRef->AddAttribute("explicitFileType", + this->CreateString(fileTypeString.c_str())); + fileRef->AddAttribute("path", this->CreateString(productName.c_str())); + fileRef->AddAttribute("refType", this->CreateString("0")); + fileRef->AddAttribute("sourceTree", + this->CreateString("BUILT_PRODUCTS_DIR")); + fileRef->SetComment(cmtarget.GetName()); + target->AddAttribute("productReference", + this->CreateObjectReference(fileRef)); + target->AddAttribute("productType", + this->CreateString(productTypeString.c_str())); + target->SetTarget(&cmtarget); + return target; +} + +//---------------------------------------------------------------------------- +cmXCodeObject* cmGlobalXCodeGenerator::FindXCodeTarget(cmTarget* t) +{ + if(!t) + { + return 0; + } + for(std::vector::iterator i = this->XCodeObjects.begin(); + i != this->XCodeObjects.end(); ++i) + { + cmXCodeObject* o = *i; + if(o->GetTarget() == t) + { + return o; + } + } + return 0; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::AddDependTarget(cmXCodeObject* target, + cmXCodeObject* dependTarget) +{ + // make sure a target does not depend on itself + if(target == dependTarget) + { + return; + } + // now avoid circular references if dependTarget already + // depends on target then skip it. Circular references crashes + // xcode + cmXCodeObject* dependTargetDepends = + dependTarget->GetObject("dependencies"); + if(dependTargetDepends) + { + if(dependTargetDepends->HasObject(target->GetPBXTargetDependency())) + { + return; + } + } + + cmXCodeObject* targetdep = dependTarget->GetPBXTargetDependency(); + if(!targetdep) + { + cmXCodeObject* container = + this->CreateObject(cmXCodeObject::PBXContainerItemProxy); + container->SetComment("PBXContainerItemProxy"); + container->AddAttribute("containerPortal", + this->CreateObjectReference(this->RootObject)); + container->AddAttribute("proxyType", this->CreateString("1")); + container->AddAttribute("remoteGlobalIDString", + this->CreateObjectReference(dependTarget)); + container->AddAttribute("remoteInfo", + this->CreateString( + dependTarget->GetTarget()->GetName())); + targetdep = + this->CreateObject(cmXCodeObject::PBXTargetDependency); + targetdep->SetComment("PBXTargetDependency"); + targetdep->AddAttribute("target", + this->CreateObjectReference(dependTarget)); + targetdep->AddAttribute("targetProxy", + this->CreateObjectReference(container)); + dependTarget->SetPBXTargetDependency(targetdep); + } + + cmXCodeObject* depends = target->GetObject("dependencies"); + if(!depends) + { + cmSystemTools:: + Error("target does not have dependencies attribute error.."); + + } + else + { + depends->AddUniqueObject(targetdep); + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::AppendOrAddBuildSetting(cmXCodeObject* settings, + const char* attribute, + const char* value) +{ + if(settings) + { + cmXCodeObject* attr = settings->GetObject(attribute); + if(!attr) + { + settings->AddAttribute(attribute, this->CreateString(value)); + } + else + { + std::string oldValue = attr->GetString(); + + // unescape escaped quotes internal to the string: + cmSystemTools::ReplaceString(oldValue, "\\\"", "\""); + + // remove surrounding quotes, if any: + std::string::size_type len = oldValue.length(); + if(oldValue[0] == '\"' && oldValue[len-1] == '\"') + { + oldValue = oldValue.substr(1, len-2); + } + + oldValue += " "; + oldValue += value; + + // SetString automatically escapes internal quotes and then surrounds + // the result with quotes if necessary... + attr->SetString(oldValue.c_str()); + } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator +::AppendBuildSettingAttribute(cmXCodeObject* target, + const char* attribute, + const char* value, + const char* configName) +{ + if(this->XcodeVersion < 21) + { + // There is only one configuration. Add the setting to the buildSettings + // of the target. + this->AppendOrAddBuildSetting(target->GetObject("buildSettings"), + attribute, value); + } + else + { + // There are multiple configurations. Add the setting to the + // buildSettings of the configuration name given. + cmXCodeObject* configurationList = + target->GetObject("buildConfigurationList")->GetObject(); + cmXCodeObject* buildConfigs = + configurationList->GetObject("buildConfigurations"); + std::vector list = buildConfigs->GetObjectList(); + // each configuration and the target itself has a buildSettings in it + //list.push_back(target); + for(std::vector::iterator i = list.begin(); + i != list.end(); ++i) + { + if(configName) + { + if(strcmp((*i)->GetObject("name")->GetString(), configName) == 0) + { + cmXCodeObject* settings = (*i)->GetObject("buildSettings"); + this->AppendOrAddBuildSetting(settings, attribute, value); + } + } + else + { + cmXCodeObject* settings = (*i)->GetObject("buildSettings"); + this->AppendOrAddBuildSetting(settings, attribute, value); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator +::AddDependAndLinkInformation(cmXCodeObject* target) +{ + cmTarget* cmtarget = target->GetTarget(); + if(!cmtarget) + { + cmSystemTools::Error("Error no target on xobject\n"); + return; + } + + // Add dependencies on other CMake targets. + { + // Keep track of dependencies already listed. + std::set emitted; + + // A target should not depend on itself. + emitted.insert(cmtarget->GetName()); + + // Loop over all library dependencies. + const cmTarget::LinkLibraryVectorType& tlibs = + cmtarget->GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); + lib != tlibs.end(); ++lib) + { + // Don't emit the same library twice for this target. + if(emitted.insert(lib->first).second) + { + // Add this dependency. + cmTarget* t = this->FindTarget(this->CurrentProject.c_str(), + lib->first.c_str()); + cmXCodeObject* dptarget = this->FindXCodeTarget(t); + if(dptarget) + { + this->AddDependTarget(target, dptarget); + } + } + } + } + + // write utility dependencies. + for(std::set::const_iterator i + = cmtarget->GetUtilities().begin(); + i != cmtarget->GetUtilities().end(); ++i) + { + cmTarget* t = this->FindTarget(this->CurrentProject.c_str(), + i->c_str()); + // if the target is in this project then make target depend + // on it. It may not be in this project if this is a sub + // project from the top. + if(t) + { + cmXCodeObject* dptarget = this->FindXCodeTarget(t); + if(dptarget) + { + this->AddDependTarget(target, dptarget); + } + else + { + std::string m = "Error Utility: "; + m += i->c_str(); + m += "\n"; + m += "cmtarget "; + if(t) + { + m += t->GetName(); + } + m += "\n"; + m += "Is on the target "; + m += cmtarget->GetName(); + m += "\n"; + m += "But it has no xcode target created yet??\n"; + m += "Current project is "; + m += this->CurrentProject.c_str(); + cmSystemTools::Error(m.c_str()); + } + } + } + + // Skip link information for static libraries. + if(cmtarget->GetType() == cmTarget::STATIC_LIBRARY) + { + return; + } + + // Loop over configuration types and set per-configuration info. + for(std::vector::iterator i = + this->CurrentConfigurationTypes.begin(); + i != this->CurrentConfigurationTypes.end(); ++i) + { + // Get the current configuration name. + const char* configName = i->c_str(); + if(!*configName) + { + configName = 0; + } + + // Compute the link library and directory information. + cmComputeLinkInformation* pcli = cmtarget->GetLinkInformation(configName); + if(!pcli) + { + continue; + } + cmComputeLinkInformation& cli = *pcli; + + // Add dependencies directly on library files. + { + std::vector const& libDeps = cli.GetDepends(); + for(std::vector::const_iterator j = libDeps.begin(); + j != libDeps.end(); ++j) + { + target->AddDependLibrary(configName, j->c_str()); + } + } + + // add the library search paths + { + std::vector const& libDirs = cli.GetDirectories(); + std::string linkDirs; + for(std::vector::const_iterator libDir = libDirs.begin(); + libDir != libDirs.end(); ++libDir) + { + if(libDir->size() && *libDir != "/usr/lib") + { + if(this->XcodeVersion > 15) + { + // now add the same one but append $(CONFIGURATION) to it: + linkDirs += " "; + linkDirs += this->XCodeEscapePath( + (*libDir + "/$(CONFIGURATION)").c_str()); + } + linkDirs += " "; + linkDirs += this->XCodeEscapePath(libDir->c_str()); + } + } + this->AppendBuildSettingAttribute(target, "LIBRARY_SEARCH_PATHS", + linkDirs.c_str(), configName); + } + + // add the framework search paths + { + const char* sep = ""; + std::string fdirs; + std::vector const& fwDirs = cli.GetFrameworkPaths(); + for(std::vector::const_iterator fdi = fwDirs.begin(); + fdi != fwDirs.end(); ++fdi) + { + fdirs += sep; + sep = " "; + fdirs += this->XCodeEscapePath(fdi->c_str()); + } + if(!fdirs.empty()) + { + this->AppendBuildSettingAttribute(target, "FRAMEWORK_SEARCH_PATHS", + fdirs.c_str(), configName); + } + } + + // now add the link libraries + { + std::string linkLibs; + const char* sep = ""; + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& libNames = cli.GetItems(); + for(ItemVector::const_iterator li = libNames.begin(); + li != libNames.end(); ++li) + { + linkLibs += sep; + sep = " "; + if(li->IsPath) + { + linkLibs += this->XCodeEscapePath(li->Value.c_str()); + } + else + { + linkLibs += li->Value; + } + } + this->AppendBuildSettingAttribute(target, "OTHER_LDFLAGS", + linkLibs.c_str(), configName); + } + } +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root, + std::vector& + generators) +{ + for(std::vector::iterator i = generators.begin(); + i != generators.end(); ++i) + { + if(this->IsExcluded(root, *i)) + { + continue; + } + cmMakefile* mf = (*i)->GetMakefile(); + std::vector sourceGroups = mf->GetSourceGroups(); + cmTargets &tgts = mf->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) + { + cmTarget& cmtarget = l->second; + + // Same skipping logic here as in CreateXCodeTargets so that we do not + // end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source + // groups: + // + if(cmtarget.GetType() == cmTarget::UTILITY || + cmtarget.GetType() == cmTarget::GLOBAL_TARGET) + { + continue; + } + + // add the soon to be generated Info.plist file as a source for a + // MACOSX_BUNDLE file + if(cmtarget.GetPropertyAsBool("MACOSX_BUNDLE")) + { + std::string plistFile = + this->CurrentMakefile->GetCurrentOutputDirectory(); + plistFile += "/Info.plist"; + cmSourceFile* sf = + this->CurrentMakefile->GetOrCreateSource(plistFile.c_str(), true); + cmtarget.AddSourceFile(sf); + } + + std::vector classes = cmtarget.GetSourceFiles(); + + for(std::vector::const_iterator s = classes.begin(); + s != classes.end(); s++) + { + cmSourceFile* sf = *s; + // Add the file to the list of sources. + std::string const& source = sf->GetFullPath(); + cmSourceGroup& sourceGroup = + mf->FindSourceGroup(source.c_str(), sourceGroups); + cmXCodeObject* pbxgroup = + this->CreateOrGetPBXGroup(cmtarget, &sourceGroup); + cmStdString key = GetGroupMapKey(cmtarget, sf); + this->GroupMap[key] = pbxgroup; + } + } + } +} + +//---------------------------------------------------------------------------- +cmXCodeObject* cmGlobalXCodeGenerator +::CreateOrGetPBXGroup(cmTarget& cmtarget, cmSourceGroup* sg) +{ + cmStdString s = cmtarget.GetName(); + s += "/"; + s += sg->GetName(); + std::map::iterator i = + this->GroupNameMap.find(s); + if(i != this->GroupNameMap.end()) + { + return i->second; + } + i = this->TargetGroup.find(cmtarget.GetName()); + cmXCodeObject* tgroup = 0; + if(i != this->TargetGroup.end()) + { + tgroup = i->second; + } + else + { + tgroup = this->CreateObject(cmXCodeObject::PBXGroup); + this->TargetGroup[cmtarget.GetName()] = tgroup; + cmXCodeObject* tgroupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + tgroup->AddAttribute("name", this->CreateString(cmtarget.GetName())); + tgroup->AddAttribute("children", tgroupChildren); + if(this->XcodeVersion == 15) + { + tgroup->AddAttribute("refType", this->CreateString("4")); + } + tgroup->AddAttribute("sourceTree", this->CreateString("")); + this->SourcesGroupChildren->AddObject(tgroup); + } + + // If it's the default source group (empty name) then put the source file + // directly in the tgroup... + // + if (cmStdString(sg->GetName()) == "") + { + this->GroupNameMap[s] = tgroup; + return tgroup; + } + + cmXCodeObject* tgroupChildren = tgroup->GetObject("children"); + cmXCodeObject* group = this->CreateObject(cmXCodeObject::PBXGroup); + cmXCodeObject* groupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + group->AddAttribute("name", this->CreateString(sg->GetName())); + group->AddAttribute("children", groupChildren); + if(this->XcodeVersion == 15) + { + group->AddAttribute("refType", this->CreateString("4")); + } + group->AddAttribute("sourceTree", this->CreateString("")); + tgroupChildren->AddObject(group); + this->GroupNameMap[s] = group; + return group; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator +::CreateXCodeObjects(cmLocalGenerator* root, + std::vector& + generators) +{ + this->ClearXCodeObjects(); + this->RootObject = 0; + this->SourcesGroupChildren = 0; + this->ResourcesGroupChildren = 0; + this->MainGroupChildren = 0; + cmXCodeObject* group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO")); + cmXCodeObject* developBuildStyle = + this->CreateObject(cmXCodeObject::PBXBuildStyle); + cmXCodeObject* listObjs = this->CreateObject(cmXCodeObject::OBJECT_LIST); + if(this->XcodeVersion == 15) + { + developBuildStyle->AddAttribute("name", + this->CreateString("Development")); + developBuildStyle->AddAttribute("buildSettings", group); + listObjs->AddObject(developBuildStyle); + group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + group->AddAttribute("COPY_PHASE_STRIP", this->CreateString("YES")); + cmXCodeObject* deployBuildStyle = + this->CreateObject(cmXCodeObject::PBXBuildStyle); + deployBuildStyle->AddAttribute("name", this->CreateString("Deployment")); + deployBuildStyle->AddAttribute("buildSettings", group); + listObjs->AddObject(deployBuildStyle); + } + else + { + for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) + { + cmXCodeObject* buildStyle = + this->CreateObject(cmXCodeObject::PBXBuildStyle); + const char* name = this->CurrentConfigurationTypes[i].c_str(); + buildStyle->AddAttribute("name", this->CreateString(name)); + buildStyle->SetComment(name); + cmXCodeObject* sgroup = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + sgroup->AddAttribute("COPY_PHASE_STRIP", this->CreateString("NO")); + buildStyle->AddAttribute("buildSettings", sgroup); + listObjs->AddObject(buildStyle); + } + } + + cmXCodeObject* mainGroup = this->CreateObject(cmXCodeObject::PBXGroup); + this->MainGroupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + mainGroup->AddAttribute("children", this->MainGroupChildren); + if(this->XcodeVersion == 15) + { + mainGroup->AddAttribute("refType", this->CreateString("4")); + } + mainGroup->AddAttribute("sourceTree", this->CreateString("")); + + cmXCodeObject* sourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup); + this->SourcesGroupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + sourcesGroup->AddAttribute("name", this->CreateString("Sources")); + sourcesGroup->AddAttribute("children", this->SourcesGroupChildren); + if(this->XcodeVersion == 15) + { + sourcesGroup->AddAttribute("refType", this->CreateString("4")); + } + sourcesGroup->AddAttribute("sourceTree", this->CreateString("")); + this->MainGroupChildren->AddObject(sourcesGroup); + + cmXCodeObject* resourcesGroup = this->CreateObject(cmXCodeObject::PBXGroup); + this->ResourcesGroupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + resourcesGroup->AddAttribute("name", this->CreateString("Resources")); + resourcesGroup->AddAttribute("children", this->ResourcesGroupChildren); + if(this->XcodeVersion == 15) + { + resourcesGroup->AddAttribute("refType", this->CreateString("4")); + } + resourcesGroup->AddAttribute("sourceTree", this->CreateString("")); + this->MainGroupChildren->AddObject(resourcesGroup); + + // now create the cmake groups + this->CreateGroups(root, generators); + + cmXCodeObject* productGroup = this->CreateObject(cmXCodeObject::PBXGroup); + productGroup->AddAttribute("name", this->CreateString("Products")); + if(this->XcodeVersion == 15) + { + productGroup->AddAttribute("refType", this->CreateString("4")); + } + productGroup->AddAttribute("sourceTree", this->CreateString("")); + cmXCodeObject* productGroupChildren = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + productGroup->AddAttribute("children", productGroupChildren); + this->MainGroupChildren->AddObject(productGroup); + + + this->RootObject = this->CreateObject(cmXCodeObject::PBXProject); + this->RootObject->SetComment("Project object"); + group = this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + this->RootObject->AddAttribute("mainGroup", + this->CreateObjectReference(mainGroup)); + this->RootObject->AddAttribute("buildSettings", group); + this->RootObject->AddAttribute("buildStyles", listObjs); + this->RootObject->AddAttribute("hasScannedForEncodings", + this->CreateString("0")); + cmXCodeObject* configlist = + this->CreateObject(cmXCodeObject::XCConfigurationList); + cmXCodeObject* buildConfigurations = + this->CreateObject(cmXCodeObject::OBJECT_LIST); + std::vector configs; + if(this->XcodeVersion == 15) + { + cmXCodeObject* configDebug = + this->CreateObject(cmXCodeObject::XCBuildConfiguration); + configDebug->AddAttribute("name", this->CreateString("Debug")); + configs.push_back(configDebug); + cmXCodeObject* configRelease = + this->CreateObject(cmXCodeObject::XCBuildConfiguration); + configRelease->AddAttribute("name", this->CreateString("Release")); + configs.push_back(configRelease); + } + else + { + for(unsigned int i = 0; i < this->CurrentConfigurationTypes.size(); ++i) + { + const char* name = this->CurrentConfigurationTypes[i].c_str(); + cmXCodeObject* config = + this->CreateObject(cmXCodeObject::XCBuildConfiguration); + config->AddAttribute("name", this->CreateString(name)); + configs.push_back(config); + } + } + for(std::vector::iterator c = configs.begin(); + c != configs.end(); ++c) + { + buildConfigurations->AddObject(*c); + } + configlist->AddAttribute("buildConfigurations", buildConfigurations); + + std::string comment = "Build configuration list for PBXProject "; + comment += " \""; + comment += this->CurrentProject; + comment += "\""; + configlist->SetComment(comment.c_str()); + configlist->AddAttribute("defaultConfigurationIsVisible", + this->CreateString("0")); + configlist->AddAttribute("defaultConfigurationName", + this->CreateString("Debug")); + cmXCodeObject* buildSettings = + this->CreateObject(cmXCodeObject::ATTRIBUTE_GROUP); + const char* osxArch = + this->CurrentMakefile->GetDefinition("CMAKE_OSX_ARCHITECTURES"); + const char* sysroot = + this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT"); + const char* sysrootDefault = + this->CurrentMakefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT"); + if(osxArch && sysroot) + { + bool flagsUsed = false; + // recompute this as it may have been changed since enable language + this->Architectures.clear(); + cmSystemTools::ExpandListArgument(std::string(osxArch), + this->Architectures); + bool addArchFlag = true; + if(this->Architectures.size() == 1) + { + const char* archOrig = + this-> + CurrentMakefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT"); + if(this->Architectures[0] == archOrig) + { + addArchFlag = false; + } + } + if(addArchFlag) + { + flagsUsed = true; + buildSettings->AddAttribute("SDKROOT", + this->CreateString(sysroot)); + std::string archString; + for( std::vector::iterator i = + this->Architectures.begin(); + i != this->Architectures.end(); ++i) + { + archString += *i; + archString += " "; + } + buildSettings->AddAttribute("ARCHS", + this->CreateString(archString.c_str())); + } + if(!flagsUsed && sysrootDefault && + strcmp(sysroot, sysrootDefault) != 0) + { + buildSettings->AddAttribute("SDKROOT", + this->CreateString(sysroot)); + } + } + for( std::vector::iterator i = configs.begin(); + i != configs.end(); ++i) + { + (*i)->AddAttribute("buildSettings", buildSettings); + } + this->RootObject->AddAttribute("buildConfigurationList", + this->CreateObjectReference(configlist)); + + std::vector targets; + for(std::vector::iterator i = generators.begin(); + i != generators.end(); ++i) + { + if(!this->IsExcluded(root, *i)) + { + this->CreateXCodeTargets(*i, targets); + } + } + // loop over all targets and add link and depend info + for(std::vector::iterator i = targets.begin(); + i != targets.end(); ++i) + { + cmXCodeObject* t = *i; + this->AddDependAndLinkInformation(t); + } + // now create xcode depend hack makefile + this->CreateXCodeDependHackTarget(targets); + // now add all targets to the root object + cmXCodeObject* allTargets = this->CreateObject(cmXCodeObject::OBJECT_LIST); + for(std::vector::iterator i = targets.begin(); + i != targets.end(); ++i) + { + cmXCodeObject* t = *i; + allTargets->AddObject(t); + cmXCodeObject* productRef = t->GetObject("productReference"); + if(productRef) + { + productGroupChildren->AddObject(productRef->GetObject()); + } + } + this->RootObject->AddAttribute("targets", allTargets); +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::CreateXCodeDependHackTarget( + std::vector& targets) +{ + cmGeneratedFileStream + makefileStream(this->CurrentXCodeHackMakefile.c_str()); + if(!makefileStream) + { + cmSystemTools::Error("Could not create", + this->CurrentXCodeHackMakefile.c_str()); + return; + } + makefileStream.SetCopyIfDifferent(true); + // one more pass for external depend information not handled + // correctly by xcode + makefileStream << "# DO NOT EDIT\n"; + makefileStream << "# This makefile makes sure all linkable targets are\n"; + makefileStream << "# up-to-date with anything they link to, avoiding a " + "bug in XCode 1.5\n"; + for(std::vector::const_iterator + ct = this->CurrentConfigurationTypes.begin(); + ct != this->CurrentConfigurationTypes.end(); ++ct) + { + if(this->XcodeVersion < 21 || ct->empty()) + { + makefileStream << "all: "; + } + else + { + makefileStream << "all." << *ct << ": "; + } + const char* configName = 0; + if(!ct->empty()) + { + configName = ct->c_str(); + } + for(std::vector::iterator i = targets.begin(); + i != targets.end(); ++i) + { + cmXCodeObject* target = *i; + cmTarget* t =target->GetTarget(); + if(t->GetType() == cmTarget::EXECUTABLE || + t->GetType() == cmTarget::SHARED_LIBRARY || + t->GetType() == cmTarget::MODULE_LIBRARY) + { + makefileStream << "\\\n\t" << + this->ConvertToRelativeForMake( + t->GetFullPath(configName).c_str()); + } + } + makefileStream << "\n\n"; + } + makefileStream + << "# For each target create a dummy rule " + "so the target does not have to exist\n"; + std::set emitted; + for(std::vector::iterator i = targets.begin(); + i != targets.end(); ++i) + { + cmXCodeObject* target = *i; + std::map const& deplibs = + target->GetDependLibraries(); + for(std::map::const_iterator ci + = deplibs.begin(); ci != deplibs.end(); ++ci) + { + for(cmXCodeObject::StringVec::const_iterator d = ci->second.begin(); + d != ci->second.end(); ++d) + { + if(emitted.insert(*d).second) + { + makefileStream << + this->ConvertToRelativeForMake(d->c_str()) << ":\n"; + } + } + } + } + makefileStream << "\n\n"; + + // Write rules to help Xcode relink things at the right time. + makefileStream << + "# Rules to remove targets that are older than anything to which they\n" + "# link. This forces Xcode to relink the targets from scratch. It\n" + "# does not seem to check these dependencies itself.\n"; + for(std::vector::const_iterator + ct = this->CurrentConfigurationTypes.begin(); + ct != this->CurrentConfigurationTypes.end(); ++ct) + { + const char* configName = 0; + if(!ct->empty()) + { + configName = ct->c_str(); + } + for(std::vector::iterator i = targets.begin(); + i != targets.end(); ++i) + { + cmXCodeObject* target = *i; + cmTarget* t =target->GetTarget(); + if(t->GetType() == cmTarget::EXECUTABLE || + t->GetType() == cmTarget::SHARED_LIBRARY || + t->GetType() == cmTarget::MODULE_LIBRARY) + { + // Create a rule for this target. + std::string tfull = t->GetFullPath(configName); + makefileStream << this->ConvertToRelativeForMake(tfull.c_str()) + << ":"; + + // List dependencies if any exist. + std::map::const_iterator + x = target->GetDependLibraries().find(*ct); + if(x != target->GetDependLibraries().end()) + { + std::vector const& deplibs = x->second; + for(std::vector::const_iterator d = deplibs.begin(); + d != deplibs.end(); ++d) + { + makefileStream << "\\\n\t" << + this->ConvertToRelativeForMake(d->c_str()); + } + } + // Write the action to remove the target if it is out of date. + makefileStream << "\n"; + makefileStream << "\t/bin/rm -f " + << this->ConvertToRelativeForMake(tfull.c_str()) + << "\n"; + // if building for more than one architecture + // then remove those exectuables as well + if(this->Architectures.size() > 1) + { + std::string universal = t->GetDirectory(); + universal += "/"; + universal += this->CurrentMakefile->GetProjectName(); + universal += ".build/"; + universal += configName; + universal += "/"; + universal += t->GetName(); + universal += ".build/Objects-normal/"; + for( std::vector::iterator arch = + this->Architectures.begin(); + arch != this->Architectures.end(); ++arch) + { + std::string universalFile = universal; + universalFile += *arch; + universalFile += "/"; + universalFile += t->GetName(); + makefileStream << "\t/bin/rm -f " + << + this->ConvertToRelativeForMake(universalFile.c_str()) + << "\n"; + } + } + makefileStream << "\n\n"; + } + } + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::OutputXCodeProject(cmLocalGenerator* root, + std::vector& + generators) +{ + if(generators.size() == 0) + { + return; + } + // Skip local generators that are excluded from this project. + for(std::vector::iterator g = generators.begin(); + g != generators.end(); ++g) + { + if(this->IsExcluded(root, *g)) + { + continue; + } + } + + this->CreateXCodeObjects(root, + generators); + std::string xcodeDir = root->GetMakefile()->GetStartOutputDirectory(); + xcodeDir += "/"; + xcodeDir += root->GetMakefile()->GetProjectName(); + xcodeDir += ".xcode"; + if(this->XcodeVersion > 20) + { + xcodeDir += "proj"; + } + cmSystemTools::MakeDirectory(xcodeDir.c_str()); + std::string xcodeProjFile = xcodeDir + "/project.pbxproj"; + cmGeneratedFileStream fout(xcodeProjFile.c_str()); + fout.SetCopyIfDifferent(true); + if(!fout) + { + return; + } + this->WriteXCodePBXProj(fout, root, generators); + this->ClearXCodeObjects(); +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout, + cmLocalGenerator* , + std::vector& ) +{ + fout << "// !$*UTF8*$!\n"; + fout << "{\n"; + cmXCodeObject::Indent(1, fout); + fout << "archiveVersion = 1;\n"; + cmXCodeObject::Indent(1, fout); + fout << "classes = {\n"; + cmXCodeObject::Indent(1, fout); + fout << "};\n"; + cmXCodeObject::Indent(1, fout); + fout << "objectVersion = 39;\n"; + cmXCodeObject::PrintList(this->XCodeObjects, fout); + cmXCodeObject::Indent(1, fout); + fout << "rootObject = " << this->RootObject->GetId() << ";\n"; + fout << "}\n"; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry) + const +{ + entry.Name = this->GetName(); + entry.Brief = "Generate XCode project files."; + entry.Full = ""; +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p) +{ + if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") ) + { + return cmSystemTools::ConvertToOutputPath(p); + } + else + { + std::string ret = + this->CurrentLocalGenerator-> + ConvertToRelativePath(this->CurrentOutputDirectoryComponents, p); + return cmSystemTools::ConvertToOutputPath(ret.c_str()); + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p) +{ + if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") ) + { + return cmSystemTools::ConvertToOutputPath(p); + } + else + { + std::string ret = + this->CurrentLocalGenerator-> + ConvertToRelativePath(this->ProjectOutputDirectoryComponents, p); + return cmSystemTools::ConvertToOutputPath(ret.c_str()); + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator::XCodeEscapePath(const char* p) +{ + std::string ret = p; + if(ret.find(' ') != ret.npos) + { + std::string t = ret; + ret = "\""; + ret += t; + ret += "\""; + } + return ret; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator:: +GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs) +{ + std::string dir = this->CurrentMakefile->GetCurrentOutputDirectory(); + dir += "/"; + dir += this->CurrentMakefile->GetProjectName(); + dir += ".build/"; + dir += this->GetCMakeCFGInitDirectory(); + dir += "/"; + if(target->GetType() != cmTarget::EXECUTABLE) + { + dir += "lib"; + } + dir += target->GetName(); + if(target->GetType() == cmTarget::STATIC_LIBRARY) + { + dir += ".a"; + } + if(target->GetType() == cmTarget::SHARED_LIBRARY) + { + dir += ".dylib"; + } + if(target->GetType() == cmTarget::MODULE_LIBRARY) + { + dir += ".so"; + } + dir += ".build/Objects-normal/"; + std::string dirsave = dir; + if(this->Architectures.size()) + { + for(std::vector::iterator i = this->Architectures.begin(); + i != this->Architectures.end(); ++i) + { + dir += *i; + dirs.push_back(dir); + dir = dirsave; + } + } + else + { + dirs.push_back(dir); + } +} + +//---------------------------------------------------------------------------- +void +cmGlobalXCodeGenerator +::AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir) +{ + if(this->XcodeVersion > 20) + { + if(config) + { + dir += prefix; + dir += config; + dir += suffix; + } + } +} + +//---------------------------------------------------------------------------- +std::string cmGlobalXCodeGenerator::LookupFlags(const char* varNamePrefix, + const char* varNameLang, + const char* varNameSuffix, + const char* default_flags) +{ + if(varNameLang) + { + std::string varName = varNamePrefix; + varName += varNameLang; + varName += varNameSuffix; + if(const char* varValue = + this->CurrentMakefile->GetDefinition(varName.c_str())) + { + if(*varValue) + { + return varValue; + } + } + } + return default_flags; +} + +//---------------------------------------------------------------------------- +void cmGlobalXCodeGenerator::AppendDefines(std::string& defs, + const char* defines_list, + bool dflag) +{ + // Skip this if there are no definitions. + if(!defines_list) + { + return; + } + + // Expand the list of definitions. + std::vector defines; + cmSystemTools::ExpandListArgument(defines_list, defines); + + // GCC_PREPROCESSOR_DEFINITIONS is a space-separated list of definitions. + // We escape everything as follows: + // - Place each definition in single quotes '' + // - Escape a single quote as \\' + // - Escape a backslash as \\\\ since it itself is an escape + // Note that in the code below we need one more level of escapes for + // C string syntax in this source file. + const char* sep = defs.empty()? "" : " "; + for(std::vector::const_iterator di = defines.begin(); + di != defines.end(); ++di) + { + // Separate from previous definition. + defs += sep; + sep = " "; + + // Open single quote. + defs += "'"; + + // Add -D flag if requested. + if(dflag) + { + defs += "-D"; + } + + // Escaped definition string. + for(const char* c = di->c_str(); *c; ++c) + { + if(*c == '\'') + { + defs += "\\\\'"; + } + else if(*c == '\\') + { + defs += "\\\\\\\\"; + } + else + { + defs += *c; + } + } + + // Close single quote. + defs += "'"; + } +} diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h new file mode 100644 index 000000000..a9eadf2b7 --- /dev/null +++ b/Source/cmGlobalXCodeGenerator.h @@ -0,0 +1,206 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGlobalXCodeGenerator.h,v $ + Language: C++ + Date: $Date: 2008-01-14 14:20:57 $ + Version: $Revision: 1.52 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGlobalXCodeGenerator_h +#define cmGlobalXCodeGenerator_h + +#include "cmGlobalGenerator.h" +#include "cmXCodeObject.h" +#include "cmCustomCommand.h" +class cmTarget; +class cmSourceFile; +class cmSourceGroup; + + +/** \class cmGlobalXCodeGenerator + * \brief Write a Unix makefiles. + * + * cmGlobalXCodeGenerator manages UNIX build process for a tree + */ +class cmGlobalXCodeGenerator : public cmGlobalGenerator +{ +public: + cmGlobalXCodeGenerator(); + static cmGlobalGenerator* New(); + + void SetVersion(int v) { this->XcodeVersion = v;} + ///! Get the name for the generator. + virtual const char* GetName() const { + return cmGlobalXCodeGenerator::GetActualName();} + static const char* GetActualName() {return "Xcode";} + + /** Get the documentation entry for this generator. */ + virtual void GetDocumentation(cmDocumentationEntry& entry) const; + + ///! Create a local generator appropriate to this Global Generator + virtual cmLocalGenerator *CreateLocalGenerator(); + + /** + * Try to determine system infomation such as shared library + * extension, pthreads, byte order etc. + */ + virtual void EnableLanguage(std::vectorconst& languages, + cmMakefile *, bool optional); + /** + * Try running cmake and building a file. This is used for dynalically + * loaded commands, not as part of the usual build process. + */ + virtual std::string GenerateBuildCommand(const char* makeProgram, + const char *projectName, + const char* additionalOptions, + const char *targetName, + const char* config, + bool ignoreErrors, + bool fast); + + /** + * Generate the all required files for building this project/tree. This + * basically creates a series of LocalGenerators for each directory and + * requests that they Generate. + */ + virtual void Generate(); + + /** Append the subdirectory for the given configuration. */ + virtual void AppendDirectoryForConfig(const char* prefix, + const char* config, + const char* suffix, + std::string& dir); + + ///! What is the configurations directory variable called? + virtual const char* GetCMakeCFGInitDirectory() { return "."; } + + void GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs); + void SetCurrentLocalGenerator(cmLocalGenerator*); +private: + cmXCodeObject* CreateOrGetPBXGroup(cmTarget& cmtarget, + cmSourceGroup* sg); + void CreateGroups(cmLocalGenerator* root, + std::vector& + generators); + std::string XCodeEscapePath(const char* p); + std::string ConvertToRelativeForXCode(const char* p); + std::string ConvertToRelativeForMake(const char* p); + void CreateCustomCommands(cmXCodeObject* buildPhases, + cmXCodeObject* sourceBuildPhase, + cmXCodeObject* headerBuildPhase, + cmXCodeObject* resourceBuildPhase, + std::vector contentBuildPhases, + cmXCodeObject* frameworkBuildPhase, + cmTarget& cmtarget); + + void AddCommandsToBuildPhase(cmXCodeObject* buildphase, + cmTarget& target, + std::vector + const & commands, + const char* commandFileName); + + void CreateCustomRulesMakefile(const char* makefileBasename, + cmTarget& target, + std::vector const & commands, + const char* configName, + const std::map& + multipleOutputPairs + ); + + cmXCodeObject* FindXCodeTarget(cmTarget*); + // create cmXCodeObject from these functions so that memory can be managed + // correctly. All objects created are stored in this->XCodeObjects. + cmXCodeObject* CreateObject(cmXCodeObject::PBXType ptype); + cmXCodeObject* CreateObject(cmXCodeObject::Type type); + cmXCodeObject* CreateString(const char* s); + cmXCodeObject* CreateObjectReference(cmXCodeObject*); + cmXCodeObject* CreateXCodeTarget(cmTarget& target, + cmXCodeObject* buildPhases); + void AddConfigurations(cmXCodeObject* target, + cmTarget& cmtarget); + void AppendOrAddBuildSetting(cmXCodeObject* settings, const char* attr, + const char* value); + void AppendBuildSettingAttribute(cmXCodeObject* target, const char* attr, + const char* value, const char* configName); + cmXCodeObject* CreateUtilityTarget(cmTarget& target); + void AddDependAndLinkInformation(cmXCodeObject* target); + void CreateBuildSettings(cmTarget& target, + cmXCodeObject* buildSettings, + std::string& fileType, + std::string& productType, + std::string& projectName, + const char* buildType); + std::string ExtractFlag(const char* flag, std::string& flags); + // delete all objects in the this->XCodeObjects vector. + void ClearXCodeObjects(); + void CreateXCodeObjects(cmLocalGenerator* root, + std::vector& generators); + void OutputXCodeProject(cmLocalGenerator* root, + std::vector& generators); + virtual void WriteXCodePBXProj(std::ostream& fout, + cmLocalGenerator* root, + std::vector& generators); + cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, + cmSourceFile* sf, + cmTarget& cmtarget); + void CreateXCodeTargets(cmLocalGenerator* gen, + std::vector&); + void AddDependTarget(cmXCodeObject* target, + cmXCodeObject* dependTarget); + void CreateXCodeDependHackTarget(std::vector& targets); + bool SpecialTargetEmitted(std::string const& tname); + void SetGenerationRoot(cmLocalGenerator* root); + void AddExtraTargets(cmLocalGenerator* root, + std::vector& gens); + cmXCodeObject* CreateBuildPhase(const char* name, + const char* name2, + cmTarget& cmtarget, + const std::vector&); + void CreateReRunCMakeFile(cmLocalGenerator* root); + + std::string LookupFlags(const char* varNamePrefix, + const char* varNameLang, + const char* varNameSuffix, + const char* default_flags); + + void AppendDefines(std::string& defs, const char* defines_list, + bool dflag = false); + +protected: + virtual const char* GetInstallTargetName() { return "install"; } + virtual const char* GetPackageTargetName() { return "package"; } + + int XcodeVersion; + std::vector XCodeObjects; + cmXCodeObject* RootObject; +private: + cmXCodeObject* MainGroupChildren; + cmXCodeObject* SourcesGroupChildren; + cmXCodeObject* ResourcesGroupChildren; + cmMakefile* CurrentMakefile; + cmLocalGenerator* CurrentLocalGenerator; + std::vector CurrentConfigurationTypes; + std::string CurrentReRunCMakeMakefile; + std::string CurrentXCodeHackMakefile; + std::string CurrentProject; + std::set TargetDoneSet; + std::vector CurrentOutputDirectoryComponents; + std::vector ProjectOutputDirectoryComponents; + std::map GroupMap; + std::map GroupNameMap; + std::map TargetGroup; + std::map FileRefs; + std::vector Architectures; +}; + +#endif diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h new file mode 100644 index 000000000..2234b924f --- /dev/null +++ b/Source/cmGraphAdjacencyList.h @@ -0,0 +1,25 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmGraphAdjacencyList.h,v $ + Language: C++ + Date: $Date: 2008-02-07 21:14:05 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmGraphAdjacencyList_h +#define cmGraphAdjacencyList_h + +#include "cmStandardIncludes.h" + +struct cmGraphNodeList: public std::vector {}; +struct cmGraphAdjacencyList: public std::vector {}; + +#endif diff --git a/Source/cmHexFileConverter.cxx b/Source/cmHexFileConverter.cxx new file mode 100644 index 000000000..d124238be --- /dev/null +++ b/Source/cmHexFileConverter.cxx @@ -0,0 +1,267 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmHexFileConverter.cxx,v $ + Language: C++ + Date: $Date: 2007-07-20 12:36:16 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmHexFileConverter.h" + +#include +#include + +#define INTEL_HEX_MIN_LINE_LENGTH (1+8 +2) +#define INTEL_HEX_MAX_LINE_LENGTH (1+8+(256*2)+2) +#define MOTOROLA_SREC_MIN_LINE_LENGTH (2+2+4 +2) +#define MOTOROLA_SREC_MAX_LINE_LENGTH (2+2+8+(256*2)+2) + +// might go to SystemTools ? +static bool cm_IsHexChar(char c) +{ + return (((c >= '0') && (c <= '9')) + || ((c >= 'a') && (c <= 'f')) + || ((c >= 'A') && (c <= 'F'))); +} + +static unsigned int ChompStrlen(const char* line) +{ + if (line == 0) + { + return 0; + } + unsigned int length = static_cast(strlen(line)); + if ((line[length-1] == '\n') || (line[length-1] == '\r')) + { + length--; + } + if ((line[length-1] == '\n') || (line[length-1] == '\r')) + { + length--; + } + return length; +} + +static bool OutputBin(FILE* file, const char * buf, + unsigned int startIndex, unsigned int stopIndex) +{ + bool success = true; + char hexNumber[3]; + hexNumber[2] = '\0'; + char outBuf[256]; + unsigned int outBufCount = 0; + for (unsigned int i = startIndex; i < stopIndex; i += 2) + { + hexNumber[0] = buf[i]; + hexNumber[1] = buf[i+1]; + unsigned int convertedByte = 0; + if (sscanf(hexNumber, "%x", &convertedByte) != 1) + { + success = false; + break; + } + outBuf[outBufCount] = convertedByte & 0xff; + outBufCount++; + } + if (success) + { + success = (fwrite(outBuf, 1, outBufCount, file)==outBufCount); + } + return success; +} + +// see http://www.die.net/doc/linux/man/man5/srec.5.html +static bool ConvertMotorolaSrecLine(const char* buf, FILE* outFile) +{ + unsigned int slen = ChompStrlen(buf); + if ((slen < MOTOROLA_SREC_MIN_LINE_LENGTH) + || (slen > MOTOROLA_SREC_MAX_LINE_LENGTH)) + { + return false; + } + + // line length must be even + if (slen % 2 == 1) + { + return false; + } + + if (buf[0] != 'S') + { + return false; + } + + unsigned int dataStart = 0; + // ignore extra address records + if ((buf[1] == '5') || (buf[1] == '7') || (buf[1] == '8') || (buf[1] == '9')) + { + return true; + } + else if (buf[1] == '1') + { + dataStart = 8; + } + else if (buf[1] == '2') + { + dataStart = 10; + } + else if (buf[1] == '3') + { + dataStart = 12; + } + else // unknown record type + { + return false; + } + + // ignore the last two bytes (checksum) + return OutputBin(outFile, buf, dataStart, slen - 2); +} + +// see http://en.wikipedia.org/wiki/Intel_hex +static bool ConvertIntelHexLine(const char* buf, FILE* outFile) +{ + unsigned int slen = ChompStrlen(buf); + if ((slen < INTEL_HEX_MIN_LINE_LENGTH) + || (slen > INTEL_HEX_MAX_LINE_LENGTH)) + { + return false; + } + + // line length must be odd + if (slen % 2 == 0) + { + return false; + } + + if ((buf[0] != ':') || (buf[7] != '0')) + { + return false; + } + + unsigned int dataStart = 0; + if ((buf[8] == '0') || (buf[8] == '1')) + { + dataStart = 9; + } + // ignore extra address records + else if ((buf[8] == '2') || (buf[8] == '3') || (buf[8] == '4') + || (buf[8] == '5')) + { + return true; + } + else // unknown record type + { + return false; + } + +// ignore the last two bytes (checksum) + return OutputBin(outFile, buf, dataStart, slen - 2); +} + +cmHexFileConverter::FileType cmHexFileConverter::DetermineFileType( + const char* inFileName) +{ + char buf[1024]; + FILE* inFile = fopen(inFileName, "rb"); + if (inFile == 0) + { + return Binary; + } + + fgets(buf, 1024, inFile); + fclose(inFile); + FileType type = Binary; + unsigned int minLineLength = 0; + unsigned int maxLineLength = 0; + if (buf[0] == ':') // might be an intel hex file + { + type = IntelHex; + minLineLength = INTEL_HEX_MIN_LINE_LENGTH; + maxLineLength = INTEL_HEX_MAX_LINE_LENGTH; + } + else if (buf[0] == 'S') // might be a motorola srec file + { + type = MotorolaSrec; + minLineLength = MOTOROLA_SREC_MIN_LINE_LENGTH; + maxLineLength = MOTOROLA_SREC_MAX_LINE_LENGTH; + } + else + { + return Binary; + } + + unsigned int slen = ChompStrlen(buf); + if ((slen < minLineLength) || (slen > maxLineLength)) + { + return Binary; + } + + for (unsigned int i = 1; i < slen; i++) + { + if (!cm_IsHexChar(buf[i])) + { + return Binary; + } + } + return type; +} + +bool cmHexFileConverter::TryConvert(const char* inFileName, + const char* outFileName) +{ + FileType type = DetermineFileType(inFileName); + if (type == Binary) + { + return false; + } + + // try to open the file + FILE* inFile = fopen(inFileName, "rb"); + FILE* outFile = fopen(outFileName, "wb"); + if ((inFile == 0) || (outFile == 0)) + { + if (inFile != 0) + { + fclose(inFile); + } + if (outFile != 0) + { + fclose(outFile); + } + return false; + } + + // convert them line by line + bool success = false; + char buf[1024]; + while (fgets(buf, 1024, inFile) != 0) + { + if (type == MotorolaSrec) + { + success = ConvertMotorolaSrecLine(buf, outFile); + } + else if (type == IntelHex) + { + success = ConvertIntelHexLine(buf, outFile); + } + if (success == false) + { + break; + } + } + + // close them again + fclose(inFile); + fclose(outFile); + return success; +} + diff --git a/Source/cmHexFileConverter.h b/Source/cmHexFileConverter.h new file mode 100644 index 000000000..102b343a0 --- /dev/null +++ b/Source/cmHexFileConverter.h @@ -0,0 +1,33 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmHexFileConverter.h,v $ + Language: C++ + Date: $Date: 2007-05-25 19:22:22 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmHexFileConverter_h +#define cmHexFileConverter_h + +/** \class cmHexFileConverter + * \brief Can detects Intel Hex and Motorola S-record files and convert them + * to binary files. + * + */ +class cmHexFileConverter +{ +public: + enum FileType {Binary, IntelHex, MotorolaSrec}; + static FileType DetermineFileType(const char* inFileName); + static bool TryConvert(const char* inFileName, const char* outFileName); +}; + +#endif diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx new file mode 100644 index 000000000..09281d41e --- /dev/null +++ b/Source/cmIfCommand.cxx @@ -0,0 +1,713 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIfCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.84.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmIfCommand.h" +#include "cmStringCommand.h" + +#include // required for atof +#include +#include + +bool cmIfFunctionBlocker:: +IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, + cmExecutionStatus &inStatus) +{ + // Prevent recusion and don't let this blocker block its own + // commands. + if (this->Executing) + { + return false; + } + + // we start by recording all the functions + if (!cmSystemTools::Strucmp(lff.Name.c_str(),"if")) + { + this->ScopeDepth++; + } + if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) + { + this->ScopeDepth--; + // if this is the endif for this if statement, then start executing + if (!this->ScopeDepth) + { + // execute the functions for the true parts of the if statement + this->Executing = true; + cmExecutionStatus status; + int scopeDepth = 0; + for(unsigned int c = 0; c < this->Functions.size(); ++c) + { + // keep track of scope depth + if (!cmSystemTools::Strucmp(this->Functions[c].Name.c_str(),"if")) + { + scopeDepth++; + } + if (!cmSystemTools::Strucmp(this->Functions[c].Name.c_str(),"endif")) + { + scopeDepth--; + } + // watch for our state change + if (scopeDepth == 0 && + !cmSystemTools::Strucmp(this->Functions[c].Name.c_str(),"else")) + { + this->IsBlocking = this->HasRun; + this->HasRun = true; + } + else if (scopeDepth == 0 && !cmSystemTools::Strucmp + (this->Functions[c].Name.c_str(),"elseif")) + { + if (this->HasRun) + { + this->IsBlocking = true; + } + else + { + char* errorString = 0; + + std::vector expandedArguments; + mf.ExpandArguments(this->Functions[c].Arguments, + expandedArguments); + bool isTrue = + cmIfCommand::IsTrue(expandedArguments,&errorString,&mf); + + if (errorString) + { + std::string err = "had incorrect arguments: "; + unsigned int i; + for(i =0; i < this->Functions[c].Arguments.size(); ++i) + { + err += (this->Functions[c].Arguments[i].Quoted?"\"":""); + err += this->Functions[c].Arguments[i].Value; + err += (this->Functions[c].Arguments[i].Quoted?"\"":""); + err += " "; + } + err += "("; + err += errorString; + err += ")."; + cmSystemTools::Error(err.c_str()); + delete [] errorString; + return false; + } + + if (isTrue) + { + this->IsBlocking = false; + this->HasRun = true; + } + } + } + + // should we execute? + else if (!this->IsBlocking) + { + status.Clear(); + mf.ExecuteCommand(this->Functions[c],status); + if (status.GetReturnInvoked()) + { + inStatus.SetReturnInvoked(true); + mf.RemoveFunctionBlocker(lff); + return true; + } + if (status.GetBreakInvoked()) + { + inStatus.SetBreakInvoked(true); + mf.RemoveFunctionBlocker(lff); + return true; + } + } + } + mf.RemoveFunctionBlocker(lff); + return true; + } + } + + // record the command + this->Functions.push_back(lff); + + // always return true + return true; +} + +bool cmIfFunctionBlocker::ShouldRemove(const cmListFileFunction& lff, + cmMakefile&) +{ + if (!cmSystemTools::Strucmp(lff.Name.c_str(),"endif")) + { + // if the endif has arguments, then make sure + // they match the arguments of the matching if + if (lff.Arguments.size() == 0 || + lff.Arguments == this->Args) + { + return true; + } + } + + return false; +} + +void cmIfFunctionBlocker:: +ScopeEnded(cmMakefile &mf) +{ + std::string errmsg = "The end of a CMakeLists file was reached with an " + "IF statement that was not closed properly.\nWithin the directory: "; + errmsg += mf.GetCurrentDirectory(); + errmsg += "\nThe arguments are: "; + for(std::vector::const_iterator j = this->Args.begin(); + j != this->Args.end(); ++j) + { + errmsg += (j->Quoted?"\"":""); + errmsg += j->Value; + errmsg += (j->Quoted?"\"":""); + errmsg += " "; + } + cmSystemTools::Message(errmsg.c_str(), "Warning"); +} + +bool cmIfCommand +::InvokeInitialPass(const std::vector& args, + cmExecutionStatus &) +{ + char* errorString = 0; + + std::vector expandedArguments; + this->Makefile->ExpandArguments(args, expandedArguments); + bool isTrue = + cmIfCommand::IsTrue(expandedArguments,&errorString,this->Makefile); + + if (errorString) + { + std::string err = "had incorrect arguments: "; + unsigned int i; + for(i =0; i < args.size(); ++i) + { + err += (args[i].Quoted?"\"":""); + err += args[i].Value; + err += (args[i].Quoted?"\"":""); + err += " "; + } + err += "("; + err += errorString; + err += ")."; + this->SetError(err.c_str()); + delete [] errorString; + return false; + } + + cmIfFunctionBlocker *f = new cmIfFunctionBlocker(); + // if is isn't true block the commands + f->ScopeDepth = 1; + f->IsBlocking = !isTrue; + if (isTrue) + { + f->HasRun = true; + } + f->Args = args; + this->Makefile->AddFunctionBlocker(f); + + return true; +} + +namespace +{ + void IncrementArguments(std::list &newArgs, + std::list::iterator &argP1, + std::list::iterator &argP2) + { + if (argP1 != newArgs.end()) + { + argP1++; + argP2 = argP1; + if (argP1 != newArgs.end()) + { + argP2++; + } + } + } +} + + +// order of operations, +// IS_DIRECTORY EXISTS COMMAND DEFINED +// MATCHES LESS GREATER EQUAL STRLESS STRGREATER STREQUAL +// AND OR +// +// There is an issue on whether the arguments should be values of references, +// for example IF (FOO AND BAR) should that compare the strings FOO and BAR +// or should it really do IF (${FOO} AND ${BAR}) Currently IS_DIRECTORY +// EXISTS COMMAND and DEFINED all take values. EQUAL, LESS and GREATER can +// take numeric values or variable names. STRLESS and STRGREATER take +// variable names but if the variable name is not found it will use the name +// directly. AND OR take variables or the values 0 or 1. + + +bool cmIfCommand::IsTrue(const std::vector &args, + char **errorString, cmMakefile *makefile) +{ + // check for the different signatures + const char *def; + const char *def2; + const char* msg = "Unknown arguments specified"; + *errorString = new char[strlen(msg) + 1]; + strcpy(*errorString, msg); + + // handle empty invocation + if (args.size() < 1) + { + delete [] *errorString; + *errorString = 0; + return false; + } + + // store the reduced args in this vector + std::list newArgs; + int reducible; + unsigned int i; + + // copy to the list structure + for(i = 0; i < args.size(); ++i) + { + newArgs.push_back(args[i]); + } + std::list::iterator argP1; + std::list::iterator argP2; + + // now loop through the arguments and see if we can reduce any of them + // we do this multiple times. Once for each level of precedence + do + { + reducible = 0; + std::list::iterator arg = newArgs.begin(); + while (arg != newArgs.end()) + { + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + // does a file exist + if (*arg == "EXISTS" && argP1 != newArgs.end()) + { + if(cmSystemTools::FileExists((argP1)->c_str())) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + // does a directory with this name exist + if (*arg == "IS_DIRECTORY" && argP1 != newArgs.end()) + { + if(cmSystemTools::FileIsDirectory((argP1)->c_str())) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + // is the given path an absolute path ? + if (*arg == "IS_ABSOLUTE" && argP1 != newArgs.end()) + { + if(cmSystemTools::FileIsFullPath((argP1)->c_str())) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + // does a command exist + if (*arg == "COMMAND" && argP1 != newArgs.end()) + { + if(makefile->CommandExists((argP1)->c_str())) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + // does a policy exist + if (*arg == "POLICY" && argP1 != newArgs.end()) + { + cmPolicies::PolicyID pid; + if(makefile->GetPolicies()->GetPolicyID((argP1)->c_str(), pid)) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + // is a variable defined + if (*arg == "DEFINED" && argP1 != newArgs.end()) + { + size_t argP1len = argP1->size(); + bool bdef = false; + if(argP1len > 4 && argP1->substr(0, 4) == "ENV{" && + argP1->operator[](argP1len-1) == '}') + { + std::string env = argP1->substr(4, argP1len-5); + bdef = cmSystemTools::GetEnv(env.c_str())?true:false; + } + else + { + bdef = makefile->IsDefinitionSet((argP1)->c_str()); + } + if(bdef) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + ++arg; + } + } + while (reducible); + + + // now loop through the arguments and see if we can reduce any of them + // we do this multiple times. Once for each level of precedence + do + { + reducible = 0; + std::list::iterator arg = newArgs.begin(); + + while (arg != newArgs.end()) + { + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + if (argP1 != newArgs.end() && argP2 != newArgs.end() && + *(argP1) == "MATCHES") + { + def = cmIfCommand::GetVariableOrString(arg->c_str(), makefile); + const char* rex = (argP2)->c_str(); + cmStringCommand::ClearMatches(makefile); + cmsys::RegularExpression regEntry; + if ( !regEntry.compile(rex) ) + { + cmOStringStream error; + error << "Regular expression \"" << rex << "\" cannot compile"; + delete [] *errorString; + *errorString = new char[error.str().size() + 1]; + strcpy(*errorString, error.str().c_str()); + return false; + } + if (regEntry.find(def)) + { + cmStringCommand::StoreMatches(makefile, regEntry); + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + if (argP1 != newArgs.end() && *arg == "MATCHES") + { + *arg = "0"; + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + if (argP1 != newArgs.end() && argP2 != newArgs.end() && + (*(argP1) == "LESS" || *(argP1) == "GREATER" || + *(argP1) == "EQUAL")) + { + def = cmIfCommand::GetVariableOrString(arg->c_str(), makefile); + def2 = cmIfCommand::GetVariableOrString((argP2)->c_str(), makefile); + double lhs; + double rhs; + if(sscanf(def, "%lg", &lhs) != 1 || + sscanf(def2, "%lg", &rhs) != 1) + { + *arg = "0"; + } + else if (*(argP1) == "LESS") + { + if(lhs < rhs) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + } + else if (*(argP1) == "GREATER") + { + if(lhs > rhs) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + } + else + { + if(lhs == rhs) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + if (argP1 != newArgs.end() && argP2 != newArgs.end() && + (*(argP1) == "STRLESS" || + *(argP1) == "STREQUAL" || + *(argP1) == "STRGREATER")) + { + def = cmIfCommand::GetVariableOrString(arg->c_str(), makefile); + def2 = cmIfCommand::GetVariableOrString((argP2)->c_str(), makefile); + int val = strcmp(def,def2); + int result; + if (*(argP1) == "STRLESS") + { + result = (val < 0); + } + else if (*(argP1) == "STRGREATER") + { + result = (val > 0); + } + else // strequal + { + result = (val == 0); + } + if(result) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + // is file A newer than file B + if (argP1 != newArgs.end() && argP2 != newArgs.end() && + *(argP1) == "IS_NEWER_THAN") + { + int fileIsNewer=0; + bool success=cmSystemTools::FileTimeCompare(arg->c_str(), + (argP2)->c_str(), + &fileIsNewer); + if(success==false || fileIsNewer==1 || fileIsNewer==0) + { + *arg = "1"; + } + else + { + *arg = "0"; + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + ++arg; + } + } + while (reducible); + + + // now loop through the arguments and see if we can reduce any of them + // we do this multiple times. Once for each level of precedence + do + { + reducible = 0; + std::list::iterator arg = newArgs.begin(); + while (arg != newArgs.end()) + { + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + if (argP1 != newArgs.end() && *arg == "NOT") + { + def = cmIfCommand::GetVariableOrNumber((argP1)->c_str(), makefile); + if(!cmSystemTools::IsOff(def)) + { + *arg = "0"; + } + else + { + *arg = "1"; + } + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + ++arg; + } + } + while (reducible); + + // now loop through the arguments and see if we can reduce any of them + // we do this multiple times. Once for each level of precedence + do + { + reducible = 0; + std::list::iterator arg = newArgs.begin(); + while (arg != newArgs.end()) + { + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + if (argP1 != newArgs.end() && *(argP1) == "AND" && + argP2 != newArgs.end()) + { + def = cmIfCommand::GetVariableOrNumber(arg->c_str(), makefile); + def2 = cmIfCommand::GetVariableOrNumber((argP2)->c_str(), makefile); + if(cmSystemTools::IsOff(def) || cmSystemTools::IsOff(def2)) + { + *arg = "0"; + } + else + { + *arg = "1"; + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + if (argP1 != newArgs.end() && *(argP1) == "OR" && + argP2 != newArgs.end()) + { + def = cmIfCommand::GetVariableOrNumber(arg->c_str(), makefile); + def2 = cmIfCommand::GetVariableOrNumber((argP2)->c_str(), makefile); + if(cmSystemTools::IsOff(def) && cmSystemTools::IsOff(def2)) + { + *arg = "0"; + } + else + { + *arg = "1"; + } + newArgs.erase(argP2); + newArgs.erase(argP1); + argP1 = arg; + IncrementArguments(newArgs,argP1,argP2); + reducible = 1; + } + + ++arg; + } + } + while (reducible); + + // now at the end there should only be one argument left + if (newArgs.size() == 1) + { + delete [] *errorString; + *errorString = 0; + if (*newArgs.begin() == "0") + { + return false; + } + if (*newArgs.begin() == "1") + { + return true; + } + def = makefile->GetDefinition(args[0].c_str()); + if(cmSystemTools::IsOff(def)) + { + return false; + } + } + + return true; +} + +const char* cmIfCommand::GetVariableOrString(const char* str, + const cmMakefile* mf) +{ + const char* def = mf->GetDefinition(str); + if(!def) + { + def = str; + } + return def; +} + +const char* cmIfCommand::GetVariableOrNumber(const char* str, + const cmMakefile* mf) +{ + const char* def = mf->GetDefinition(str); + if(!def) + { + if (atoi(str)) + { + def = str; + } + } + return def; +} diff --git a/Source/cmIfCommand.h b/Source/cmIfCommand.h new file mode 100644 index 000000000..9201d62f6 --- /dev/null +++ b/Source/cmIfCommand.h @@ -0,0 +1,201 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIfCommand.h,v $ + Language: C++ + Date: $Date: 2008-03-24 22:23:26 $ + Version: $Revision: 1.46.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmIfCommand_h +#define cmIfCommand_h + +#include "cmCommand.h" +#include "cmFunctionBlocker.h" + +/** \class cmIfFunctionBlocker + * \brief subclass of function blocker + * + * + */ +class cmIfFunctionBlocker : public cmFunctionBlocker +{ +public: + cmIfFunctionBlocker() { + this->HasRun = false; this->ScopeDepth = 0; this->Executing = false;} + virtual ~cmIfFunctionBlocker() {} + virtual bool IsFunctionBlocked(const cmListFileFunction& lff, + cmMakefile &mf, + cmExecutionStatus &); + virtual bool ShouldRemove(const cmListFileFunction& lff, + cmMakefile &mf); + virtual void ScopeEnded(cmMakefile &mf); + + std::vector Args; + std::vector Functions; + bool IsBlocking; + bool HasRun; + unsigned int ScopeDepth; + bool Executing; +}; + +/** \class cmIfCommand + * \brief starts an if block + * + * cmIfCommand starts an if block + */ +class cmIfCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmIfCommand; + } + + /** + * This overrides the default InvokeInitialPass implementation. + * It records the arguments before expansion. + */ + virtual bool InvokeInitialPass(const std::vector& args, + cmExecutionStatus &); + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) { return false;}; + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "if";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Conditionally execute a group of commands."; + } + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " if(expression)\n" + " # then section.\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " elseif(expression2)\n" + " # elseif section.\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " else(expression)\n" + " # else section.\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " endif(expression)\n" + "Evaluates the given expression. If the result is true, the commands " + "in the THEN section are invoked. Otherwise, the commands in the " + "else section are invoked. The elseif and else sections are " + "optional. You may have multiple elseif clauses. Note that " + "the same expression must be given to if, and endif. Long " + "expressions can be used and the order or precedence is that the " + "EXISTS, COMMAND, and DEFINED operators will be evaluated first. " + "Then any EQUAL, LESS, GREATER, STRLESS, STRGREATER, STREQUAL, MATCHES " + "will be evaluated. Then NOT operators and finally AND, OR operators " + "will be evaluated. Possible expressions are:\n" + " if(variable)\n" + "True if the variable's value is not empty, 0, N, NO, OFF, FALSE, " + "NOTFOUND, or -NOTFOUND.\n" + " if(NOT variable)\n" + "True if the variable's value is empty, 0, N, NO, OFF, FALSE, " + "NOTFOUND, or -NOTFOUND.\n" + " if(variable1 AND variable2)\n" + "True if both variables would be considered true individually.\n" + " if(variable1 OR variable2)\n" + "True if either variable would be considered true individually.\n" + " if(COMMAND command-name)\n" + "True if the given name is a command, macro or function that can be " + "invoked.\n" + " if(POLICY policy-id)\n" + "True if the given name is an existing policy " + "(of the form CMP).\n" + " if(EXISTS file-name)\n" + " if(EXISTS directory-name)\n" + "True if the named file or directory exists. " + "Behavior is well-defined only for full paths.\n" + " if(file1 IS_NEWER_THAN file2)\n" + "True if file1 is newer than file2 or if one of the two files " + "doesn't exist. " + "Behavior is well-defined only for full paths.\n" + " if(IS_DIRECTORY directory-name)\n" + "True if the given name is a directory. " + "Behavior is well-defined only for full paths.\n" + " if(IS_ABSOLUTE path)\n" + "True if the given path is an absolute path.\n " + " if(variable MATCHES regex)\n" + " if(string MATCHES regex)\n" + "True if the given string or variable's value matches the given " + "regular expression.\n" + " if(variable LESS number)\n" + " if(string LESS number)\n" + " if(variable GREATER number)\n" + " if(string GREATER number)\n" + " if(variable EQUAL number)\n" + " if(string EQUAL number)\n" + "True if the given string or variable's value is a valid number and " + "the inequality or equality is true.\n" + " if(variable STRLESS string)\n" + " if(string STRLESS string)\n" + " if(variable STRGREATER string)\n" + " if(string STRGREATER string)\n" + " if(variable STREQUAL string)\n" + " if(string STREQUAL string)\n" + "True if the given string or variable's value is lexicographically " + "less (or greater, or equal) than the string on the right.\n" + " if(DEFINED variable)\n" + "True if the given variable is defined. It does not matter if the " + "variable is true or false just if it has been set."; + } + + // this is a shared function for both If and Else to determine if the + // arguments were valid, and if so, was the response true. If there is + // an error, the errorString will be set. + static bool IsTrue(const std::vector &args, + char** errorString, cmMakefile *mf); + + // Get a definition from the makefile. If it doesn't exist, + // return the original string. + static const char* GetVariableOrString(const char* str, + const cmMakefile* mf); + static const char* GetVariableOrNumber(const char* str, + const cmMakefile* mf); + + + cmTypeMacro(cmIfCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmIncludeCommand.cxx b/Source/cmIncludeCommand.cxx new file mode 100644 index 000000000..3e7b24395 --- /dev/null +++ b/Source/cmIncludeCommand.cxx @@ -0,0 +1,108 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-08 14:27:44 $ + Version: $Revision: 1.21 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmIncludeCommand.h" + + +// cmIncludeCommand +bool cmIncludeCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size()< 1 || args.size() > 4) + { + this->SetError("called with wrong number of arguments. " + "Include only takes one file."); + return false; + } + bool optional = false; + std::string fname = args[0]; + std::string resultVarName; + + for (unsigned int i=1; iSetError("called with invalid arguments: OPTIONAL used twice"); + return false; + } + optional = true; + } + else if(args[i] == "RESULT_VARIABLE") + { + if (resultVarName.size() > 0) + { + this->SetError("called with invalid arguments: " + "only one result variable allowed"); + return false; + } + if(++i < args.size()) + { + resultVarName = args[i]; + } + else + { + this->SetError("called with no value for RESULT_VARIABLE."); + return false; + } + } + else if(i > 1) // compat.: in previous cmake versions the second + // parameter was ignore if it wasn't "OPTIONAL" + { + std::string errorText = "called with invalid argument: "; + errorText += args[i]; + this->SetError(errorText.c_str()); + return false; + } + } + + if(!cmSystemTools::FileIsFullPath(fname.c_str())) + { + // Not a path. Maybe module. + std::string module = fname; + module += ".cmake"; + std::string mfile = this->Makefile->GetModulesFile(module.c_str()); + if ( mfile.size() ) + { + fname = mfile.c_str(); + } + } + std::string fullFilePath; + bool readit = + this->Makefile->ReadListFile( this->Makefile->GetCurrentListFile(), + fname.c_str(), &fullFilePath ); + + // add the location of the included file if a result variable was given + if (resultVarName.size()) + { + this->Makefile->AddDefinition(resultVarName.c_str(), + readit?fullFilePath.c_str():"NOTFOUND"); + } + + if(!optional && !readit && !cmSystemTools::GetFatalErrorOccured()) + { + std::string m = + "could not find load file:\n" + " "; + m += fname; + this->SetError(m.c_str()); + return false; + } + return true; +} + + diff --git a/Source/cmIncludeCommand.h b/Source/cmIncludeCommand.h new file mode 100644 index 000000000..06b67b754 --- /dev/null +++ b/Source/cmIncludeCommand.h @@ -0,0 +1,89 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.17 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmIncludeCommand_h +#define cmIncludeCommand_h + +#include "cmCommand.h" + +/** \class cmIncludeCommand + * \brief + * + * cmIncludeCommand defines a list of distant + * files that can be "included" in the current list file. + * In almost every sense, this is identical to a C/C++ + * #include command. Arguments are first expended as usual. + */ +class cmIncludeCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmIncludeCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "include";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Read CMake listfile code from the given file."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " include(file1 [OPTIONAL] [RESULT_VARIABLE ])\n" + " include(module [OPTIONAL] [RESULT_VARIABLE ])\n" + "Reads CMake listfile code from the given file. Commands in the file " + "are processed immediately as if they were written in place of the " + "include command. If OPTIONAL is present, then no error " + "is raised if the file does not exist. If RESULT_VARIABLE is given " + "the variable will be set to the full filename which " + "has been included or NOTFOUND if it failed.\n" + "If a module is specified instead of a file, the file with name " + ".cmake is searched in the CMAKE_MODULE_PATH."; + } + + cmTypeMacro(cmIncludeCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmIncludeDirectoryCommand.cxx b/Source/cmIncludeDirectoryCommand.cxx new file mode 100644 index 000000000..d0c66d0c3 --- /dev/null +++ b/Source/cmIncludeDirectoryCommand.cxx @@ -0,0 +1,130 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeDirectoryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-08 14:50:56 $ + Version: $Revision: 1.30 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmIncludeDirectoryCommand.h" + +// cmIncludeDirectoryCommand +bool cmIncludeDirectoryCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + return true; + } + + std::vector::const_iterator i = args.begin(); + + bool before = this->Makefile->IsOn("CMAKE_INCLUDE_DIRECTORIES_BEFORE"); + bool system = false; + + if ((*i) == "BEFORE") + { + before = true; + ++i; + } + else if ((*i) == "AFTER") + { + before = false; + ++i; + } + + for(; i != args.end(); ++i) + { + if(*i == "SYSTEM") + { + system = true; + continue; + } + if(i->size() == 0) + { + this->SetError("given empty-string as include directory."); + return false; + } + + this->AddDirectory(i->c_str(),before,system); + + } + return true; +} + +// do a lot of cleanup on the arguments because this is one place where folks +// sometimes take the output of a program and pass it directly into this +// command not thinking that a single argument could be filled with spaces +// and newlines etc liek below: +// +// " /foo/bar +// /boo/hoo /dingle/berry " +// +// ideally that should be three seperate arguments but when sucking the +// output from a program and passing it into a command the cleanup doesn't +// always happen +// +void cmIncludeDirectoryCommand::AddDirectory(const char *i, + bool before, + bool system) +{ + // break apart any line feed arguments + std::string ret = i; + std::string::size_type pos = 0; + if((pos = ret.find('\n', pos)) != std::string::npos) + { + if (pos) + { + this->AddDirectory(ret.substr(0,pos).c_str(), before, system); + } + if (ret.size()-pos-1) + { + this->AddDirectory(ret.substr(pos+1,ret.size()-pos-1).c_str(), + before, system); + } + return; + } + + // remove any leading or trailing spaces and \r + pos = ret.size()-1; + while(ret[pos] == ' ' || ret[pos] == '\r') + { + ret.erase(pos); + pos--; + } + pos = 0; + while(ret.size() && ret[pos] == ' ' || ret[pos] == '\r') + { + ret.erase(pos,1); + } + if (!ret.size()) + { + return; + } + + if (!cmSystemTools::IsOff(ret.c_str())) + { + cmSystemTools::ConvertToUnixSlashes(ret); + if(!cmSystemTools::FileIsFullPath(ret.c_str())) + { + std::string tmp = this->Makefile->GetStartDirectory(); + tmp += "/"; + tmp += ret; + ret = tmp; + } + } + this->Makefile->AddIncludeDirectory(ret.c_str(), before); + if(system) + { + this->Makefile->AddSystemIncludeDirectory(ret.c_str()); + } +} + diff --git a/Source/cmIncludeDirectoryCommand.h b/Source/cmIncludeDirectoryCommand.h new file mode 100644 index 000000000..1a0d9ad14 --- /dev/null +++ b/Source/cmIncludeDirectoryCommand.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeDirectoryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmIncludeDirectoryCommand_h +#define cmIncludeDirectoryCommand_h + +#include "cmCommand.h" + +/** \class cmIncludeDirectoryCommand + * \brief Add include directories to the build. + * + * cmIncludeDirectoryCommand is used to specify directory locations + * to search for included files. + */ +class cmIncludeDirectoryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmIncludeDirectoryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "include_directories";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Add include directories to the build."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " include_directories([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)\n" + "Add the given directories to those searched by the compiler for " + "include files. By default the directories are appended onto " + "the current list of directories. This default behavior can be " + "changed by setting CMAKE_include_directories_BEFORE to ON. " + "By using BEFORE or AFTER you can select between appending and " + "prepending, independent from the default. " + "If the SYSTEM option is given the compiler will be told that the " + "directories are meant as system include directories on some " + "platforms."; + } + + cmTypeMacro(cmIncludeDirectoryCommand, cmCommand); + +protected: + // used internally + void AddDirectory(const char *arg, bool before, bool system); +}; + + + +#endif diff --git a/Source/cmIncludeExternalMSProjectCommand.cxx b/Source/cmIncludeExternalMSProjectCommand.cxx new file mode 100644 index 000000000..dfbc45ee0 --- /dev/null +++ b/Source/cmIncludeExternalMSProjectCommand.cxx @@ -0,0 +1,67 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeExternalMSProjectCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmIncludeExternalMSProjectCommand.h" + +// cmIncludeExternalMSProjectCommand +bool cmIncludeExternalMSProjectCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2) + { + this->SetError("INCLUDE_EXTERNAL_MSPROJECT called with incorrect " + "number of arguments"); + return false; + } +// only compile this for win32 to avoid coverage errors +#ifdef _WIN32 + if(this->Makefile->GetDefinition("WIN32")) + { + std::string location = args[1]; + + std::vector depends; + if (args.size() > 2) + { + for (unsigned int i=2; iMakefile->AddNewTarget(cmTarget::UTILITY, + utility_name.c_str()); + target->SetProperty("EXCLUDE_FROM_ALL","FALSE"); + std::vector no_outputs; + cmCustomCommandLines commandLines; + cmCustomCommandLine commandLine; + commandLine.push_back(args[0]); + commandLine.push_back(path); + commandLines.push_back(commandLine); + cmCustomCommand cc(no_outputs, depends, commandLines, 0, 0); + target->GetPostBuildCommands().push_back(cc); + } +#endif + return true; +} diff --git a/Source/cmIncludeExternalMSProjectCommand.h b/Source/cmIncludeExternalMSProjectCommand.h new file mode 100644 index 000000000..3d98d84fb --- /dev/null +++ b/Source/cmIncludeExternalMSProjectCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeExternalMSProjectCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmIncludeExternalMSProjectCommand_h +#define cmIncludeExternalMSProjectCommand_h + +#include "cmCommand.h" + +/** \class cmIncludeExternalMSProjectCommand + * \brief Specify an external MS project file for inclusion in the workspace. + * + * cmIncludeExternalMSProjectCommand is used to specify an externally + * generated Microsoft project file for inclusion in the default workspace + * generated by CMake. + */ +class cmIncludeExternalMSProjectCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmIncludeExternalMSProjectCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "include_external_msproject";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Include an external Microsoft project file in a workspace."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " include_external_msproject(projectname location\n" + " dep1 dep2 ...)\n" + "Includes an external Microsoft project in the generated workspace " + "file. Currently does nothing on UNIX."; + } + + cmTypeMacro(cmIncludeExternalMSProjectCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmIncludeRegularExpressionCommand.cxx b/Source/cmIncludeRegularExpressionCommand.cxx new file mode 100644 index 000000000..fce2b8e3f --- /dev/null +++ b/Source/cmIncludeRegularExpressionCommand.cxx @@ -0,0 +1,37 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeRegularExpressionCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmIncludeRegularExpressionCommand.h" + +// cmIncludeRegularExpressionCommand +bool cmIncludeRegularExpressionCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if((args.size() < 1) || (args.size() > 2)) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + this->Makefile->SetIncludeRegularExpression(args[0].c_str()); + + if(args.size() > 1) + { + this->Makefile->SetComplainRegularExpression(args[1].c_str()); + } + + return true; +} + diff --git a/Source/cmIncludeRegularExpressionCommand.h b/Source/cmIncludeRegularExpressionCommand.h new file mode 100644 index 000000000..c09159a21 --- /dev/null +++ b/Source/cmIncludeRegularExpressionCommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmIncludeRegularExpressionCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmIncludeRegularExpressionCommand_h +#define cmIncludeRegularExpressionCommand_h + +#include "cmCommand.h" + +/** \class cmIncludeRegularExpressionCommand + * \brief Set the regular expression for following #includes. + * + * cmIncludeRegularExpressionCommand is used to specify the regular expression + * that determines whether to follow a #include file in dependency checking. + */ +class cmIncludeRegularExpressionCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmIncludeRegularExpressionCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "include_regular_expression";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set the regular expression used for dependency checking."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " include_regular_expression(regex_match [regex_complain])\n" + "Set the regular expressions used in dependency checking. Only files " + "matching regex_match will be traced as dependencies. Only files " + "matching regex_complain will generate warnings if they cannot be " + "found " + "(standard header paths are not searched). The defaults are:\n" + " regex_match = \"^.*$\" (match everything)\n" + " regex_complain = \"^$\" (match empty string only)"; + } + + cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx new file mode 100644 index 000000000..01be56c27 --- /dev/null +++ b/Source/cmInstallCommand.cxx @@ -0,0 +1,1332 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-04-23 16:14:33 $ + Version: $Revision: 1.45.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallCommand.h" + +#include "cmInstallDirectoryGenerator.h" +#include "cmInstallFilesGenerator.h" +#include "cmInstallScriptGenerator.h" +#include "cmInstallTargetGenerator.h" +#include "cmInstallExportGenerator.h" +#include "cmInstallCommandArguments.h" + +#include + +static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target, + const cmInstallCommandArguments& args, bool impLib, bool forceOpt = false) +{ + return new cmInstallTargetGenerator(target, args.GetDestination().c_str(), + impLib, args.GetPermissions().c_str(), + args.GetConfigurations(), args.GetComponent().c_str(), + args.GetOptional() || forceOpt); +} + +static cmInstallFilesGenerator* CreateInstallFilesGenerator( + const std::vector& absFiles, + const cmInstallCommandArguments& args, bool programs) +{ + return new cmInstallFilesGenerator(absFiles, args.GetDestination().c_str(), + programs, args.GetPermissions().c_str(), + args.GetConfigurations(), args.GetComponent().c_str(), + args.GetRename().c_str(), args.GetOptional()); +} + + +// cmInstallCommand +bool cmInstallCommand::InitialPass(std::vector const& args, + cmExecutionStatus &) +{ + // Allow calling with no arguments so that arguments may be built up + // using a variable that may be left empty. + if(args.empty()) + { + return true; + } + + // Enable the install target. + this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->EnableInstallTarget(); + + // Switch among the command modes. + if(args[0] == "SCRIPT") + { + return this->HandleScriptMode(args); + } + else if(args[0] == "CODE") + { + return this->HandleScriptMode(args); + } + else if(args[0] == "TARGETS") + { + return this->HandleTargetsMode(args); + } + else if(args[0] == "FILES") + { + return this->HandleFilesMode(args); + } + else if(args[0] == "PROGRAMS") + { + return this->HandleFilesMode(args); + } + else if(args[0] == "DIRECTORY") + { + return this->HandleDirectoryMode(args); + } + else if(args[0] == "EXPORT") + { + return this->HandleExportMode(args); + } + + // Unknown mode. + cmStdString e = "called with unknown mode "; + e += args[0]; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmInstallCommand::HandleScriptMode(std::vector const& args) +{ + std::string component("Unspecified"); + int componentCount = 0; + bool doing_script = false; + bool doing_code = false; + + // Scan the args once for COMPONENT. Only allow one. + // + for(size_t i=0; i < args.size(); ++i) + { + if(args[i] == "COMPONENT" && i+1 < args.size()) + { + ++componentCount; + ++i; + component = args[i]; + } + } + + if(componentCount>1) + { + this->SetError("given more than one COMPONENT for the SCRIPT or CODE " + "signature of the INSTALL command. " + "Use multiple INSTALL commands with one COMPONENT each."); + return false; + } + + // Scan the args again, this time adding install generators each time we + // encounter a SCRIPT or CODE arg: + // + for(size_t i=0; i < args.size(); ++i) + { + if(args[i] == "SCRIPT") + { + doing_script = true; + doing_code = false; + } + else if(args[i] == "CODE") + { + doing_script = false; + doing_code = true; + } + else if(args[i] == "COMPONENT") + { + doing_script = false; + doing_code = false; + } + else if(doing_script) + { + doing_script = false; + std::string script = args[i]; + if(!cmSystemTools::FileIsFullPath(script.c_str())) + { + script = this->Makefile->GetCurrentDirectory(); + script += "/"; + script += args[i]; + } + if(cmSystemTools::FileIsDirectory(script.c_str())) + { + this->SetError("given a directory as value of SCRIPT argument."); + return false; + } + this->Makefile->AddInstallGenerator( + new cmInstallScriptGenerator(script.c_str(), false, + component.c_str())); + } + else if(doing_code) + { + doing_code = false; + std::string code = args[i]; + this->Makefile->AddInstallGenerator( + new cmInstallScriptGenerator(code.c_str(), true, + component.c_str())); + } + } + + if(doing_script) + { + this->SetError("given no value for SCRIPT argument."); + return false; + } + if(doing_code) + { + this->SetError("given no value for CODE argument."); + return false; + } + + //Tell the global generator about any installation component names specified. + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(component.c_str()); + + return true; +} + + +/*struct InstallPart +{ + InstallPart(cmCommandArgumentsHelper* helper, const char* key, + cmCommandArgumentGroup* group); + cmCAStringVector argVector; + cmInstallCommandArguments args; +};*/ + +//---------------------------------------------------------------------------- +bool cmInstallCommand::HandleTargetsMode(std::vector const& args) +{ + // This is the TARGETS mode. + std::vector targets; + + cmCommandArgumentsHelper argHelper; + cmCommandArgumentGroup group; + cmCAStringVector genericArgVector (&argHelper,0); + cmCAStringVector archiveArgVector (&argHelper,"ARCHIVE",&group); + cmCAStringVector libraryArgVector (&argHelper,"LIBRARY",&group); + cmCAStringVector runtimeArgVector (&argHelper,"RUNTIME",&group); + cmCAStringVector frameworkArgVector (&argHelper,"FRAMEWORK",&group); + cmCAStringVector bundleArgVector (&argHelper,"BUNDLE",&group); + cmCAStringVector privateHeaderArgVector(&argHelper,"PRIVATE_HEADER",&group); + cmCAStringVector publicHeaderArgVector (&argHelper,"PUBLIC_HEADER",&group); + cmCAStringVector resourceArgVector (&argHelper,"RESOURCE",&group); + genericArgVector.Follows(0); + group.Follows(&genericArgVector); + + argHelper.Parse(&args, 0); + + // now parse the generic args (i.e. the ones not specialized on LIBRARY/ + // ARCHIVE, RUNTIME etc. (see above) + // These generic args also contain the targets and the export stuff + std::vector unknownArgs; + cmInstallCommandArguments genericArgs; + cmCAStringVector targetList(&genericArgs.Parser, "TARGETS"); + cmCAString exports(&genericArgs.Parser,"EXPORT", &genericArgs.ArgumentGroup); + targetList.Follows(0); + genericArgs.ArgumentGroup.Follows(&targetList); + genericArgs.Parse(&genericArgVector.GetVector(), &unknownArgs); + bool success = genericArgs.Finalize(); + + cmInstallCommandArguments archiveArgs; + cmInstallCommandArguments libraryArgs; + cmInstallCommandArguments runtimeArgs; + cmInstallCommandArguments frameworkArgs; + cmInstallCommandArguments bundleArgs; + cmInstallCommandArguments privateHeaderArgs; + cmInstallCommandArguments publicHeaderArgs; + cmInstallCommandArguments resourceArgs; + + // now parse the args for specific parts of the target (e.g. LIBRARY, + // RUNTIME, ARCHIVE etc. + archiveArgs.Parse (&archiveArgVector.GetVector(), &unknownArgs); + libraryArgs.Parse (&libraryArgVector.GetVector(), &unknownArgs); + runtimeArgs.Parse (&runtimeArgVector.GetVector(), &unknownArgs); + frameworkArgs.Parse (&frameworkArgVector.GetVector(), &unknownArgs); + bundleArgs.Parse (&bundleArgVector.GetVector(), &unknownArgs); + privateHeaderArgs.Parse(&privateHeaderArgVector.GetVector(), &unknownArgs); + publicHeaderArgs.Parse (&publicHeaderArgVector.GetVector(), &unknownArgs); + resourceArgs.Parse (&resourceArgVector.GetVector(), &unknownArgs); + + if(!unknownArgs.empty()) + { + // Unknown argument. + cmOStringStream e; + e << "TARGETS given unknown argument \"" << unknownArgs[0] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + + // apply generic args + archiveArgs.SetGenericArguments(&genericArgs); + libraryArgs.SetGenericArguments(&genericArgs); + runtimeArgs.SetGenericArguments(&genericArgs); + frameworkArgs.SetGenericArguments(&genericArgs); + bundleArgs.SetGenericArguments(&genericArgs); + privateHeaderArgs.SetGenericArguments(&genericArgs); + publicHeaderArgs.SetGenericArguments(&genericArgs); + resourceArgs.SetGenericArguments(&genericArgs); + + success = success && archiveArgs.Finalize(); + success = success && libraryArgs.Finalize(); + success = success && runtimeArgs.Finalize(); + success = success && frameworkArgs.Finalize(); + success = success && bundleArgs.Finalize(); + success = success && privateHeaderArgs.Finalize(); + success = success && publicHeaderArgs.Finalize(); + success = success && resourceArgs.Finalize(); + + if(!success) + { + return false; + } + + // Enforce argument rules too complex to specify for the + // general-purpose parser. + if(archiveArgs.GetNamelinkOnly() || + runtimeArgs.GetNamelinkOnly() || + frameworkArgs.GetNamelinkOnly() || + bundleArgs.GetNamelinkOnly() || + privateHeaderArgs.GetNamelinkOnly() || + publicHeaderArgs.GetNamelinkOnly() || + resourceArgs.GetNamelinkOnly()) + { + this->SetError( + "TARGETS given NAMELINK_ONLY option not in LIBRARY group. " + "The NAMELINK_ONLY option may be specified only following LIBRARY." + ); + return false; + } + if(archiveArgs.GetNamelinkSkip() || + runtimeArgs.GetNamelinkSkip() || + frameworkArgs.GetNamelinkSkip() || + bundleArgs.GetNamelinkSkip() || + privateHeaderArgs.GetNamelinkSkip() || + publicHeaderArgs.GetNamelinkSkip() || + resourceArgs.GetNamelinkSkip()) + { + this->SetError( + "TARGETS given NAMELINK_SKIP option not in LIBRARY group. " + "The NAMELINK_SKIP option may be specified only following LIBRARY." + ); + return false; + } + if(libraryArgs.GetNamelinkOnly() && libraryArgs.GetNamelinkSkip()) + { + this->SetError( + "TARGETS given NAMELINK_ONLY and NAMELINK_SKIP. " + "At most one of these two options may be specified." + ); + return false; + } + + // Select the mode for installing symlinks to versioned shared libraries. + cmInstallTargetGenerator::NamelinkModeType + namelinkMode = cmInstallTargetGenerator::NamelinkModeNone; + if(libraryArgs.GetNamelinkOnly()) + { + namelinkMode = cmInstallTargetGenerator::NamelinkModeOnly; + } + else if(libraryArgs.GetNamelinkSkip()) + { + namelinkMode = cmInstallTargetGenerator::NamelinkModeSkip; + } + + // Check if there is something to do. + if(targetList.GetVector().empty()) + { + return true; + } + + // Check whether this is a DLL platform. + bool dll_platform = (this->Makefile->IsOn("WIN32") || + this->Makefile->IsOn("CYGWIN") || + this->Makefile->IsOn("MINGW")); + + for(std::vector::const_iterator + targetIt=targetList.GetVector().begin(); + targetIt!=targetList.GetVector().end(); + ++targetIt) + { + // Lookup this target in the current directory. + if(cmTarget* target=this->Makefile->FindTarget(targetIt->c_str())) + { + // Found the target. Check its type. + if(target->GetType() != cmTarget::EXECUTABLE && + target->GetType() != cmTarget::STATIC_LIBRARY && + target->GetType() != cmTarget::SHARED_LIBRARY && + target->GetType() != cmTarget::MODULE_LIBRARY) + { + cmOStringStream e; + e << "TARGETS given target \"" << (*targetIt) + << "\" which is not an executable, library, or module."; + this->SetError(e.str().c_str()); + return false; + } + // Store the target in the list to be installed. + targets.push_back(target); + } + else + { + // Did not find the target. + cmOStringStream e; + e << "TARGETS given target \"" << (*targetIt) + << "\" which does not exist in this directory."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Generate install script code to install the given targets. + for(std::vector::iterator ti = targets.begin(); + ti != targets.end(); ++ti) + { + // Handle each target type. + cmTarget& target = *(*ti); + cmInstallTargetGenerator* archiveGenerator = 0; + cmInstallTargetGenerator* libraryGenerator = 0; + cmInstallTargetGenerator* runtimeGenerator = 0; + cmInstallTargetGenerator* frameworkGenerator = 0; + cmInstallTargetGenerator* bundleGenerator = 0; + cmInstallFilesGenerator* privateHeaderGenerator = 0; + cmInstallFilesGenerator* publicHeaderGenerator = 0; + cmInstallFilesGenerator* resourceGenerator = 0; + + // Track whether this is a namelink-only rule. + bool namelinkOnly = false; + + switch(target.GetType()) + { + case cmTarget::SHARED_LIBRARY: + { + // Shared libraries are handled differently on DLL and non-DLL + // platforms. All windows platforms are DLL platforms including + // cygwin. Currently no other platform is a DLL platform. + if(dll_platform) + { + // When in namelink only mode skip all libraries on Windows. + if(namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) + { + continue; + } + + // This is a DLL platform. + if(!archiveArgs.GetDestination().empty()) + { + // The import library uses the ARCHIVE properties. + archiveGenerator = CreateInstallTargetGenerator(target, + archiveArgs, true); + } + if(!runtimeArgs.GetDestination().empty()) + { + // The DLL uses the RUNTIME properties. + runtimeGenerator = CreateInstallTargetGenerator(target, + runtimeArgs, false); + } + if ((archiveGenerator==0) && (runtimeGenerator==0)) + { + this->SetError("Library TARGETS given no DESTINATION!"); + return false; + } + } + else + { + // This is a non-DLL platform. + // If it is marked with FRAMEWORK property use the FRAMEWORK set of + // INSTALL properties. Otherwise, use the LIBRARY properties. + if(target.IsFrameworkOnApple()) + { + // When in namelink only mode skip frameworks. + if(namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly) + { + continue; + } + + // Use the FRAMEWORK properties. + if (!frameworkArgs.GetDestination().empty()) + { + frameworkGenerator = CreateInstallTargetGenerator(target, + frameworkArgs, false); + } + else + { + cmOStringStream e; + e << "TARGETS given no FRAMEWORK DESTINATION for shared library " + "FRAMEWORK target \"" << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + else + { + // The shared library uses the LIBRARY properties. + if (!libraryArgs.GetDestination().empty()) + { + libraryGenerator = CreateInstallTargetGenerator(target, + libraryArgs, false); + libraryGenerator->SetNamelinkMode(namelinkMode); + namelinkOnly = + (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly); + } + else + { + cmOStringStream e; + e << "TARGETS given no LIBRARY DESTINATION for shared library " + "target \"" << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + } + } + break; + case cmTarget::STATIC_LIBRARY: + { + // Static libraries use ARCHIVE properties. + if (!archiveArgs.GetDestination().empty()) + { + archiveGenerator = CreateInstallTargetGenerator(target, archiveArgs, + false); + } + else + { + cmOStringStream e; + e << "TARGETS given no ARCHIVE DESTINATION for static library " + "target \"" << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + break; + case cmTarget::MODULE_LIBRARY: + { + // Modules use LIBRARY properties. + if (!libraryArgs.GetDestination().empty()) + { + libraryGenerator = CreateInstallTargetGenerator(target, libraryArgs, + false); + libraryGenerator->SetNamelinkMode(namelinkMode); + namelinkOnly = + (namelinkMode == cmInstallTargetGenerator::NamelinkModeOnly); + } + else + { + cmOStringStream e; + e << "TARGETS given no LIBRARY DESTINATION for module target \"" + << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + break; + case cmTarget::EXECUTABLE: + { + if(target.IsAppBundleOnApple()) + { + // Application bundles use the BUNDLE properties. + if (!bundleArgs.GetDestination().empty()) + { + bundleGenerator = CreateInstallTargetGenerator(target, bundleArgs, + false); + } + else if(!runtimeArgs.GetDestination().empty()) + { + bool failure = false; + if(this->CheckCMP0006(failure)) + { + // For CMake 2.4 compatibility fallback to the RUNTIME + // properties. + bundleGenerator = + CreateInstallTargetGenerator(target, runtimeArgs, false); + } + else if(failure) + { + return false; + } + } + if(!bundleGenerator) + { + cmOStringStream e; + e << "TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE " + "executable target \"" << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + else + { + // Executables use the RUNTIME properties. + if (!runtimeArgs.GetDestination().empty()) + { + runtimeGenerator = CreateInstallTargetGenerator(target, + runtimeArgs, false); + } + else + { + cmOStringStream e; + e << "TARGETS given no RUNTIME DESTINATION for executable " + "target \"" << target.GetName() << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + // On DLL platforms an executable may also have an import + // library. Install it to the archive destination if it + // exists. + if(dll_platform && !archiveArgs.GetDestination().empty() && + target.IsExecutableWithExports()) + { + // The import library uses the ARCHIVE properties. + archiveGenerator = CreateInstallTargetGenerator(target, + archiveArgs, true, true); + } + } + break; + default: + // This should never happen due to the above type check. + // Ignore the case. + break; + } + +// if(target.GetProperty("ASSOCIATED_FILES"); + + // These well-known sets of files are installed *automatically* for FRAMEWORK + // SHARED library targets on the Mac as part of installing the FRAMEWORK. + // For other target types or on other platforms, they are not installed + // automatically and so we need to create install files generators for them. + // + bool createInstallGeneratorsForTargetFileSets = true; + + if(target.IsFrameworkOnApple()) + { + createInstallGeneratorsForTargetFileSets = false; + } + + if(createInstallGeneratorsForTargetFileSets && !namelinkOnly) + { + const char* files = target.GetProperty("PRIVATE_HEADER"); + if ((files) && (*files)) + { + std::vector relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector absFiles; + if (!this->MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles)) + { + return false; + } + + // Create the files install generator. + if (!privateHeaderArgs.GetDestination().empty()) + { + privateHeaderGenerator = CreateInstallFilesGenerator(absFiles, + privateHeaderArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } + } + + files = target.GetProperty("PUBLIC_HEADER"); + if ((files) && (*files)) + { + std::vector relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector absFiles; + if (!this->MakeFilesFullPath("PUBLIC_HEADER", relFiles, absFiles)) + { + return false; + } + + // Create the files install generator. + if (!publicHeaderArgs.GetDestination().empty()) + { + publicHeaderGenerator = CreateInstallFilesGenerator(absFiles, + publicHeaderArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } + } + + files = target.GetProperty("RESOURCE"); + if ((files) && (*files)) + { + std::vector relFiles; + cmSystemTools::ExpandListArgument(files, relFiles); + std::vector absFiles; + if (!this->MakeFilesFullPath("RESOURCE", relFiles, absFiles)) + { + return false; + } + + // Create the files install generator. + if (!resourceArgs.GetDestination().empty()) + { + resourceGenerator = CreateInstallFilesGenerator(absFiles, + resourceArgs, false); + } + else + { + cmOStringStream e; + e << "INSTALL TARGETS - target " << target.GetName() << " has " + << "RESOURCE files but no RESOURCE DESTINATION."; + cmSystemTools::Message(e.str().c_str(), "Warning"); + } + } + } + + this->Makefile->AddInstallGenerator(archiveGenerator); + this->Makefile->AddInstallGenerator(libraryGenerator); + this->Makefile->AddInstallGenerator(runtimeGenerator); + this->Makefile->AddInstallGenerator(frameworkGenerator); + this->Makefile->AddInstallGenerator(bundleGenerator); + this->Makefile->AddInstallGenerator(privateHeaderGenerator); + this->Makefile->AddInstallGenerator(publicHeaderGenerator); + this->Makefile->AddInstallGenerator(resourceGenerator); + + // Add this install rule to an export if one was specified and + // this is not a namelink-only rule. + if(!exports.GetString().empty() && !namelinkOnly) + { + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddTargetToExports(exports.GetCString(), &target, + archiveGenerator, runtimeGenerator, + libraryGenerator, frameworkGenerator, + bundleGenerator, publicHeaderGenerator); + } + } + + // Tell the global generator about any installation component names specified + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(archiveArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(libraryArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(runtimeArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(frameworkArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(bundleArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(privateHeaderArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(publicHeaderArgs.GetComponent().c_str()); + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(resourceArgs.GetComponent().c_str()); + + return true; +} + +//---------------------------------------------------------------------------- +bool cmInstallCommand::HandleFilesMode(std::vector const& args) +{ + // This is the FILES mode. + bool programs = (args[0] == "PROGRAMS"); + cmInstallCommandArguments ica; + cmCAStringVector files(&ica.Parser, programs ? "PROGRAMS" : "FILES"); + files.Follows(0); + ica.ArgumentGroup.Follows(&files); + std::vector unknownArgs; + ica.Parse(&args, &unknownArgs); + + if(!unknownArgs.empty()) + { + // Unknown argument. + cmOStringStream e; + e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + + // Check if there is something to do. + if(files.GetVector().empty()) + { + return true; + } + + if(!ica.GetRename().empty() && files.GetVector().size() > 1) + { + // The rename option works only with one file. + cmOStringStream e; + e << args[0] << " given RENAME option with more than one file."; + this->SetError(e.str().c_str()); + return false; + } + + std::vector absFiles; + if (!this->MakeFilesFullPath(args[0].c_str(), files.GetVector(), absFiles)) + { + return false; + } + + if (!ica.Finalize()) + { + return false; + } + + if(ica.GetDestination().empty()) + { + // A destination is required. + cmOStringStream e; + e << args[0] << " given no DESTINATION!"; + this->SetError(e.str().c_str()); + return false; + } + + // Create the files install generator. + this->Makefile->AddInstallGenerator( + CreateInstallFilesGenerator(absFiles, ica, programs)); + + //Tell the global generator about any installation component names specified. + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(ica.GetComponent().c_str()); + + return true; +} + +//---------------------------------------------------------------------------- +bool +cmInstallCommand::HandleDirectoryMode(std::vector const& args) +{ + bool doing_dirs = true; + bool doing_destination = false; + bool doing_pattern = false; + bool doing_regex = false; + bool doing_permissions_file = false; + bool doing_permissions_dir = false; + bool doing_permissions_match = false; + bool doing_configurations = false; + bool doing_component = false; + bool in_match_mode = false; + std::vector dirs; + const char* destination = 0; + std::string permissions_file; + std::string permissions_dir; + std::vector configurations; + std::string component = "Unspecified"; + std::string literal_args; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "DESTINATION") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the destination property. + doing_dirs = false; + doing_destination = true; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_configurations = false; + doing_component = false; + } + else if(args[i] == "PATTERN") + { + // Switch to a new pattern match rule. + doing_dirs = false; + doing_destination = false; + doing_pattern = true; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_permissions_match = false; + doing_configurations = false; + doing_component = false; + in_match_mode = true; + } + else if(args[i] == "REGEX") + { + // Switch to a new regex match rule. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = true; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_permissions_match = false; + doing_configurations = false; + doing_component = false; + in_match_mode = true; + } + else if(args[i] == "EXCLUDE") + { + // Add this property to the current match rule. + if(!in_match_mode || doing_pattern || doing_regex) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" before a PATTERN or REGEX is given."; + this->SetError(e.str().c_str()); + return false; + } + literal_args += " EXCLUDE"; + doing_permissions_match = false; + } + else if(args[i] == "PERMISSIONS") + { + if(!in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" before a PATTERN or REGEX is given."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the current match permissions property. + literal_args += " PERMISSIONS"; + doing_permissions_match = true; + } + else if(args[i] == "FILE_PERMISSIONS") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the file permissions property. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = true; + doing_permissions_dir = false; + doing_configurations = false; + doing_component = false; + } + else if(args[i] == "DIRECTORY_PERMISSIONS") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the directory permissions property. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = true; + doing_configurations = false; + doing_component = false; + } + else if(args[i] == "USE_SOURCE_PERMISSIONS") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Add this option literally. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_configurations = false; + doing_component = false; + literal_args += " USE_SOURCE_PERMISSIONS"; + } + else if(args[i] == "FILES_MATCHING") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Add this option literally. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_permissions_match = false; + doing_configurations = false; + doing_component = false; + literal_args += " FILES_MATCHING"; + } + else if(args[i] == "CONFIGURATIONS") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the configurations property. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_configurations = true; + doing_component = false; + } + else if(args[i] == "COMPONENT") + { + if(in_match_mode) + { + cmOStringStream e; + e << args[0] << " does not allow \"" + << args[i] << "\" after PATTERN or REGEX."; + this->SetError(e.str().c_str()); + return false; + } + + // Switch to setting the component property. + doing_dirs = false; + doing_destination = false; + doing_pattern = false; + doing_regex = false; + doing_permissions_file = false; + doing_permissions_dir = false; + doing_configurations = false; + doing_component = true; + } + else if(doing_dirs) + { + // Convert this directory to a full path. + std::string dir = args[i]; + if(!cmSystemTools::FileIsFullPath(dir.c_str())) + { + dir = this->Makefile->GetCurrentDirectory(); + dir += "/"; + dir += args[i]; + } + + // Make sure the name is a directory. + if(cmSystemTools::FileExists(dir.c_str()) && + !cmSystemTools::FileIsDirectory(dir.c_str())) + { + cmOStringStream e; + e << args[0] << " given non-directory \"" + << args[i] << "\" to install."; + this->SetError(e.str().c_str()); + return false; + } + + // Store the directory for installation. + dirs.push_back(dir); + } + else if(doing_configurations) + { + configurations.push_back(args[i]); + } + else if(doing_destination) + { + destination = args[i].c_str(); + doing_destination = false; + } + else if(doing_pattern) + { + // Convert the pattern to a regular expression. Require a + // leading slash and trailing end-of-string in the matched + // string to make sure the pattern matches only whole file + // names. + literal_args += " REGEX \"/"; + std::string regex = cmsys::Glob::PatternToRegex(args[i], false); + cmSystemTools::ReplaceString(regex, "\\", "\\\\"); + literal_args += regex; + literal_args += "$\""; + doing_pattern = false; + } + else if(doing_regex) + { + literal_args += " REGEX \""; + // Match rules are case-insensitive on some platforms. +#if defined(_WIN32) || defined(__APPLE__) || defined(__CYGWIN__) + std::string regex = cmSystemTools::LowerCase(args[i]); +#else + std::string regex = args[i]; +#endif + cmSystemTools::ReplaceString(regex, "\\", "\\\\"); + literal_args += regex; + literal_args += "\""; + doing_regex = false; + } + else if(doing_component) + { + component = args[i]; + doing_component = false; + } + else if(doing_permissions_file) + { + // Check the requested permission. + if(!cmInstallCommandArguments::CheckPermissions(args[i],permissions_file)) + { + cmOStringStream e; + e << args[0] << " given invalid file permission \"" + << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + else if(doing_permissions_dir) + { + // Check the requested permission. + if(!cmInstallCommandArguments::CheckPermissions(args[i],permissions_dir)) + { + cmOStringStream e; + e << args[0] << " given invalid directory permission \"" + << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + else if(doing_permissions_match) + { + // Check the requested permission. + if(!cmInstallCommandArguments::CheckPermissions(args[i], literal_args)) + { + cmOStringStream e; + e << args[0] << " given invalid permission \"" + << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + else + { + // Unknown argument. + cmOStringStream e; + e << args[0] << " given unknown argument \"" << args[i] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Support installing an empty directory. + if(dirs.empty() && destination) + { + dirs.push_back(""); + } + + // Check if there is something to do. + if(dirs.empty()) + { + return true; + } + if(!destination) + { + // A destination is required. + cmOStringStream e; + e << args[0] << " given no DESTINATION!"; + this->SetError(e.str().c_str()); + return false; + } + + // Create the directory install generator. + this->Makefile->AddInstallGenerator( + new cmInstallDirectoryGenerator(dirs, destination, + permissions_file.c_str(), + permissions_dir.c_str(), + configurations, + component.c_str(), + literal_args.c_str())); + + // Tell the global generator about any installation component names + // specified. + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->AddInstallComponent(component.c_str()); + + return true; +} + +//---------------------------------------------------------------------------- +bool cmInstallCommand::HandleExportMode(std::vector const& args) +{ + // This is the EXPORT mode. + cmInstallCommandArguments ica; + cmCAString exp(&ica.Parser, "EXPORT"); + cmCAString name_space(&ica.Parser, "NAMESPACE", &ica.ArgumentGroup); + cmCAString filename(&ica.Parser, "FILE", &ica.ArgumentGroup); + exp.Follows(0); + + ica.ArgumentGroup.Follows(&exp); + std::vector unknownArgs; + ica.Parse(&args, &unknownArgs); + + if (!unknownArgs.empty()) + { + // Unknown argument. + cmOStringStream e; + e << args[0] << " given unknown argument \"" << unknownArgs[0] << "\"."; + this->SetError(e.str().c_str()); + return false; + } + + if (!ica.Finalize()) + { + return false; + } + + // Make sure there is a destination. + if(ica.GetDestination().empty()) + { + // A destination is required. + cmOStringStream e; + e << args[0] << " given no DESTINATION!"; + this->SetError(e.str().c_str()); + return false; + } + + // Check the file name. + std::string fname = filename.GetString(); + if(fname.find_first_of(":/\\") != fname.npos) + { + cmOStringStream e; + e << args[0] << " given invalid export file name \"" << fname << "\". " + << "The FILE argument may not contain a path. " + << "Specify the path in the DESTINATION argument."; + this->SetError(e.str().c_str()); + return false; + } + + // Check the file extension. + if(!fname.empty() && + cmSystemTools::GetFilenameLastExtension(fname) != ".cmake") + { + cmOStringStream e; + e << args[0] << " given invalid export file name \"" << fname << "\". " + << "The FILE argument must specify a name ending in \".cmake\"."; + this->SetError(e.str().c_str()); + return false; + } + + // Construct the file name. + if(fname.empty()) + { + fname = exp.GetString(); + fname += ".cmake"; + + if(fname.find_first_of(":/\\") != fname.npos) + { + cmOStringStream e; + e << args[0] << " given export name \"" << exp.GetString() << "\". " + << "This name cannot be safely converted to a file name. " + << "Specify a different export name or use the FILE option to set " + << "a file name explicitly."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Create the export install generator. + cmInstallExportGenerator* exportGenerator = + new cmInstallExportGenerator( + exp.GetCString(), ica.GetDestination().c_str(), + ica.GetPermissions().c_str(), ica.GetConfigurations(), + ica.GetComponent().c_str(), fname.c_str(), + name_space.GetCString(), this->Makefile); + this->Makefile->AddInstallGenerator(exportGenerator); + + return true; +} + +bool cmInstallCommand::MakeFilesFullPath(const char* modeName, + const std::vector& relFiles, + std::vector& absFiles) +{ + for(std::vector::const_iterator fileIt = relFiles.begin(); + fileIt != relFiles.end(); + ++fileIt) + { + std::string file = (*fileIt); + if(!cmSystemTools::FileIsFullPath(file.c_str())) + { + file = this->Makefile->GetCurrentDirectory(); + file += "/"; + file += *fileIt; + } + + // Make sure the file is not a directory. + if(cmSystemTools::FileIsDirectory(file.c_str())) + { + cmOStringStream e; + e << modeName << " given directory \"" << (*fileIt) << "\" to install."; + this->SetError(e.str().c_str()); + return false; + } + // Store the file for installation. + absFiles.push_back(file); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmInstallCommand::CheckCMP0006(bool& failure) +{ + switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0006)) + { + case cmPolicies::WARN: + { + this->Makefile->IssueMessage( + cmake::AUTHOR_WARNING, + this->Makefile->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0006) + ); + } + case cmPolicies::OLD: + // OLD behavior is to allow compatibility + return true; + case cmPolicies::NEW: + // NEW behavior is to disallow compatibility + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + failure = true; + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + this->Makefile->GetPolicies() + ->GetRequiredPolicyError(cmPolicies::CMP0006) + ); + break; + } + return false; +} diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h new file mode 100644 index 000000000..cee1cad55 --- /dev/null +++ b/Source/cmInstallCommand.h @@ -0,0 +1,353 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallCommand.h,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:51 $ + Version: $Revision: 1.29.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallCommand_h +#define cmInstallCommand_h + +#include "cmCommand.h" + +/** \class cmInstallCommand + * \brief Specifies where to install some files + * + * cmInstallCommand is a general-purpose interface command for + * specifying install rules. + */ +class cmInstallCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmInstallCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "install";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Specify rules to run at install time."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "This command generates installation rules for a project. " + "Rules specified by calls to this command within a source directory " + "are executed in order during installation. " + "The order across directories is not defined." + "\n" + "There are multiple signatures for this command. Some of them define " + "installation properties for files and targets. Properties common to " + "multiple signatures are covered here but they are valid only for " + "signatures that specify them.\n" + "DESTINATION arguments specify " + "the directory on disk to which a file will be installed. " + "If a full path (with a leading slash or drive letter) is given it " + "is used directly. If a relative path is given it is interpreted " + "relative to the value of CMAKE_INSTALL_PREFIX.\n" + "PERMISSIONS arguments specify permissions for installed files. " + "Valid permissions are " + "OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, " + "GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, " + "WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, " + "SETUID, and SETGID. " + "Permissions that do not make sense on certain platforms are ignored " + "on those platforms.\n" + "The CONFIGURATIONS argument specifies a list of build configurations " + "for which the install rule applies (Debug, Release, etc.).\n" + "The COMPONENT argument specifies an installation component name " + "with which the install rule is associated, such as \"runtime\" or " + "\"development\". During component-specific installation only " + "install rules associated with the given component name will be " + "executed. During a full installation all components are installed.\n" + "The RENAME argument specifies a name for an installed file that " + "may be different from the original file. Renaming is allowed only " + "when a single file is installed by the command.\n" + "The OPTIONAL argument specifies that it is not an error if the " + "file to be installed does not exist. " + "\n" + "The TARGETS signature:\n" + " install(TARGETS targets... [EXPORT ]\n" + " [[ARCHIVE|LIBRARY|RUNTIME|FRAMEWORK|BUNDLE|\n" + " PRIVATE_HEADER|PUBLIC_HEADER|RESOURCE]\n" + " [DESTINATION ]\n" + " [PERMISSIONS permissions...]\n" + " [CONFIGURATIONS [Debug|Release|...]]\n" + " [COMPONENT ]\n" + " [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]\n" + " ] [...])\n" + "The TARGETS form specifies rules for installing targets from a " + "project. There are five kinds of target files that may be " + "installed: ARCHIVE, LIBRARY, RUNTIME, FRAMEWORK, and BUNDLE. " + + "Executables are treated as RUNTIME targets, except that those " + "marked with the MACOSX_BUNDLE property are treated as BUNDLE " + "targets on OS X. " + "Static libraries are always treated as ARCHIVE targets. " + "Module libraries are always treated as LIBRARY targets. " + "For non-DLL platforms shared libraries are treated as LIBRARY " + "targets, except that those marked with the FRAMEWORK property " + "are treated as FRAMEWORK targets on OS X. " + "For DLL platforms the DLL part of a shared library is treated as " + "a RUNTIME target and the corresponding import library is treated as " + "an ARCHIVE target. " + "All Windows-based systems including Cygwin are DLL platforms. " + "The ARCHIVE, LIBRARY, RUNTIME, and FRAMEWORK " + "arguments change the type of target to which the subsequent " + "properties " + "apply. If none is given the installation properties apply to " + "all target types. If only one is given then only targets of that " + "type will be installed (which can be used to install just a DLL or " + "just an import library)." + "\n" + "The PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE arguments cause " + "subsequent properties to be applied to installing a FRAMEWORK " + "shared library target's associated files on non-Apple platforms. " + "Rules defined by these arguments are ignored on Apple platforms " + "because the associated files are installed into the appropriate " + "locations inside the framework folder. " + "See documentation of the PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE " + "target properties for details." + "\n" + "Either NAMELINK_ONLY or NAMELINK_SKIP may be specified as a LIBRARY " + "option. " + "On some platforms a versioned shared library has a symbolic link " + "such as\n" + " lib.so -> lib.so.1\n" + "where \"lib.so.1\" is the soname of the library and " + "\"lib.so\" is a \"namelink\" allowing linkers to find the " + "library when given \"-l\". " + "The NAMELINK_ONLY option causes installation of only the namelink " + "when a library target is installed. " + "The NAMELINK_SKIP option causes installation of library files other " + "than the namelink when a library target is installed. " + "When neither option is given both portions are installed. " + "On platforms where versioned shared libraries do not have namelinks " + "or when a library is not versioned the NAMELINK_SKIP option installs " + "the library and the NAMELINK_ONLY option installs nothing. " + "See the VERSION and SOVERSION target properties for details on " + "creating versioned shared libraries." + "\n" + "One or more groups of properties may be specified in a single call " + "to the TARGETS form of this command. A target may be installed more " + "than once to different locations. Consider hypothetical " + "targets \"myExe\", \"mySharedLib\", and \"myStaticLib\". The code\n" + " install(TARGETS myExe mySharedLib myStaticLib\n" + " RUNTIME DESTINATION bin\n" + " LIBRARY DESTINATION lib\n" + " ARCHIVE DESTINATION lib/static)\n" + " install(TARGETS mySharedLib DESTINATION /some/full/path)\n" + "will install myExe to /bin and myStaticLib to " + "/lib/static. " + "On non-DLL platforms mySharedLib will be installed to /lib " + "and /some/full/path. On DLL platforms the mySharedLib DLL will be " + "installed to /bin and /some/full/path and its import library " + "will be installed to /lib/static and /some/full/path. " + "On non-DLL platforms mySharedLib will be installed to /lib " + "and /some/full/path." + "\n" + "The EXPORT option associates the installed target files with an " + "export called . " + "It must appear before any RUNTIME, LIBRARY, or ARCHIVE options. " + "See documentation of the install(EXPORT ...) signature below for " + "details." + "\n" + "Installing a target with EXCLUDE_FROM_ALL set to true has " + "undefined behavior." + "\n" + "The FILES signature:\n" + " install(FILES files... DESTINATION \n" + " [PERMISSIONS permissions...]\n" + " [CONFIGURATIONS [Debug|Release|...]]\n" + " [COMPONENT ]\n" + " [RENAME ] [OPTIONAL])\n" + "The FILES form specifies rules for installing files for a " + "project. File names given as relative paths are interpreted with " + "respect to the current source directory. Files installed by this " + "form are by default given permissions OWNER_WRITE, OWNER_READ, " + "GROUP_READ, and WORLD_READ if no PERMISSIONS argument is given." + "\n" + "The PROGRAMS signature:\n" + " install(PROGRAMS files... DESTINATION \n" + " [PERMISSIONS permissions...]\n" + " [CONFIGURATIONS [Debug|Release|...]]\n" + " [COMPONENT ]\n" + " [RENAME ] [OPTIONAL])\n" + "The PROGRAMS form is identical to the FILES form except that the " + "default permissions for the installed file also include " + "OWNER_EXECUTE, GROUP_EXECUTE, and WORLD_EXECUTE. " + "This form is intended to install programs that are not targets, " + "such as shell scripts. Use the TARGETS form to install targets " + "built within the project." + "\n" + "The DIRECTORY signature:\n" + " install(DIRECTORY dirs... DESTINATION \n" + " [FILE_PERMISSIONS permissions...]\n" + " [DIRECTORY_PERMISSIONS permissions...]\n" + " [USE_SOURCE_PERMISSIONS]\n" + " [CONFIGURATIONS [Debug|Release|...]]\n" + " [COMPONENT ] [FILES_MATCHING]\n" + " [[PATTERN | REGEX ]\n" + " [EXCLUDE] [PERMISSIONS permissions...]] [...])\n" + "The DIRECTORY form installs contents of one or more directories " + "to a given destination. " + "The directory structure is copied verbatim to the destination. " + "The last component of each directory name is appended to the " + "destination directory but a trailing slash may be used to " + "avoid this because it leaves the last component empty. " + "Directory names given as relative paths are interpreted with " + "respect to the current source directory. " + "If no input directory names are given the destination directory " + "will be created but nothing will be installed into it. " + "The FILE_PERMISSIONS and DIRECTORY_PERMISSIONS options specify " + "permissions given to files and directories in the destination. " + "If USE_SOURCE_PERMISSIONS is specified and FILE_PERMISSIONS is not, " + "file permissions will be copied from the source directory structure. " + "If no permissions are specified files will be given the default " + "permissions specified in the FILES form of the command, and the " + "directories will be given the default permissions specified in the " + "PROGRAMS form of the command.\n" + + "Installation of directories may be controlled with fine granularity " + "using the PATTERN or REGEX options. These \"match\" options specify a " + "globbing pattern or regular expression to match directories or files " + "encountered within input directories. They may be used to apply " + "certain options (see below) to a subset of the files and directories " + "encountered. " + "The full path to each input file or directory " + "(with forward slashes) is matched against the expression. " + "A PATTERN will match only complete file names: the portion of the " + "full path matching the pattern must occur at the end of the file name " + "and be preceded by a slash. " + "A REGEX will match any portion of the full path but it may use " + "'/' and '$' to simulate the PATTERN behavior. " + "By default all files and directories are installed whether " + "or not they are matched. " + "The FILES_MATCHING option may be given before the first match option " + "to disable installation of files (but not directories) not matched by " + "any expression. For example, the code\n" + " install(DIRECTORY src/ DESTINATION include/myproj\n" + " FILES_MATCHING PATTERN \"*.h\")\n" + "will extract and install header files from a source tree.\n" + "Some options may follow a PATTERN or REGEX expression and are " + "applied only to files or directories matching them. " + "The EXCLUDE option will skip the matched file or directory. " + "The PERMISSIONS option overrides the permissions setting for the " + "matched file or directory. " + "For example the code\n" + " install(DIRECTORY icons scripts/ DESTINATION share/myproj\n" + " PATTERN \"CVS\" EXCLUDE\n" + " PATTERN \"scripts/*\"\n" + " PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ\n" + " GROUP_EXECUTE GROUP_READ)\n" + "will install the icons directory to share/myproj/icons and the " + "scripts directory to share/myproj. The icons will get default file " + "permissions, the scripts will be given specific permissions, and " + "any CVS directories will be excluded." + "\n" + "The SCRIPT and CODE signature:\n" + " install([[SCRIPT ] [CODE ]] [...])\n" + "The SCRIPT form will invoke the given CMake script files during " + "installation. If the script file name is a relative path " + "it will be interpreted with respect to the current source directory. " + "The CODE form will invoke the given CMake code during installation. " + "Code is specified as a single argument inside a double-quoted string. " + "For example, the code\n" + " install(CODE \"MESSAGE(\\\"Sample install message.\\\")\")\n" + "will print a message during installation.\n" + "" + "The EXPORT signature:\n" + " install(EXPORT DESTINATION \n" + " [NAMESPACE ] [FILE .cmake]\n" + " [PERMISSIONS permissions...]\n" + " [CONFIGURATIONS [Debug|Release|...]]\n" + " [COMPONENT ])\n" + "The EXPORT form generates and installs a CMake file containing code " + "to import targets from the installation tree into another project. " + "Target installations are associated with the export " + "using the EXPORT option of the install(TARGETS ...) signature " + "documented above. The NAMESPACE option will prepend to " + "the target names as they are written to the import file. " + "By default the generated file will be called .cmake but " + "the FILE option may be used to specify a different name. The value " + "given to the FILE option must be a file name with the \".cmake\" " + "extension. " + "If a CONFIGURATIONS option is given then the file will only be " + "installed when one of the named configurations is installed. " + "Additionally, the generated import file will reference only the " + "matching target configurations. " + "If a COMPONENT option is specified that does not match that given " + "to the targets associated with the behavior is " + "undefined. " + "If a library target is included in the export but " + "a target to which it links is not included the behavior is " + "unspecified." + "\n" + "The EXPORT form is useful to help outside projects use targets built " + "and installed by the current project. For example, the code\n" + " install(TARGETS myexe EXPORT myproj DESTINATION bin)\n" + " install(EXPORT myproj NAMESPACE mp_ DESTINATION lib/myproj)\n" + "will install the executable myexe to /bin and code to import " + "it in the file \"/lib/myproj/myproj.cmake\". " + "An outside project may load this file with the include command " + "and reference the myexe executable from the installation tree using " + "the imported target name mp_myexe as if the target were built " + "in its own tree." + "\n" + "NOTE: This command supercedes the INSTALL_TARGETS command and the " + "target properties PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT. " + "It also replaces the FILES forms of the INSTALL_FILES and " + "INSTALL_PROGRAMS commands. " + "The processing order of these install rules relative to those " + "generated by INSTALL_TARGETS, INSTALL_FILES, and INSTALL_PROGRAMS " + "commands is not defined.\n" + ; + } + + cmTypeMacro(cmInstallCommand, cmCommand); + +private: + bool HandleScriptMode(std::vector const& args); + bool HandleTargetsMode(std::vector const& args); + bool HandleFilesMode(std::vector const& args); + bool HandleDirectoryMode(std::vector const& args); + bool HandleExportMode(std::vector const& args); + bool MakeFilesFullPath(const char* modeName, + const std::vector& relFiles, + std::vector& absFiles); + bool CheckCMP0006(bool& failure); +}; + + +#endif diff --git a/Source/cmInstallCommandArguments.cxx b/Source/cmInstallCommandArguments.cxx new file mode 100644 index 000000000..ae821cc21 --- /dev/null +++ b/Source/cmInstallCommandArguments.cxx @@ -0,0 +1,204 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallCommandArguments.cxx,v $ + Language: C++ + Date: $Date: 2008-03-27 15:16:30 $ + Version: $Revision: 1.4.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallCommandArguments.h" +#include "cmSystemTools.h" + +// Table of valid permissions. +const char* cmInstallCommandArguments::PermissionsTable[] = +{ + "OWNER_READ", "OWNER_WRITE", "OWNER_EXECUTE", + "GROUP_READ", "GROUP_WRITE", "GROUP_EXECUTE", + "WORLD_READ", "WORLD_WRITE", "WORLD_EXECUTE", + "SETUID", "SETGID", 0 +}; + +const std::string cmInstallCommandArguments::EmptyString; + +cmInstallCommandArguments::cmInstallCommandArguments() +:Parser() +,ArgumentGroup() +,Destination (&Parser, "DESTINATION" , &ArgumentGroup) +,Component (&Parser, "COMPONENT" , &ArgumentGroup) +,Rename (&Parser, "RENAME" , &ArgumentGroup) +,Permissions (&Parser, "PERMISSIONS" , &ArgumentGroup) +,Configurations(&Parser, "CONFIGURATIONS", &ArgumentGroup) +,Optional (&Parser, "OPTIONAL" , &ArgumentGroup) +,NamelinkOnly (&Parser, "NAMELINK_ONLY" , &ArgumentGroup) +,NamelinkSkip (&Parser, "NAMELINK_SKIP" , &ArgumentGroup) +,GenericArguments(0) +{} + +const std::string& cmInstallCommandArguments::GetDestination() const +{ + if (!this->DestinationString.empty()) + { + return this->DestinationString; + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetDestination(); + } + return this->EmptyString; +} + +const std::string& cmInstallCommandArguments::GetComponent() const +{ + if (!this->Component.GetString().empty()) + { + return this->Component.GetString(); + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetComponent(); + } + + static std::string unspecifiedComponent = "Unspecified"; + return unspecifiedComponent; +} + +const std::string& cmInstallCommandArguments::GetRename() const +{ + if (!this->Rename.GetString().empty()) + { + return this->Rename.GetString(); + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetRename(); + } + return this->EmptyString; +} + +const std::string& cmInstallCommandArguments::GetPermissions() const +{ + if (!this->PermissionsString.empty()) + { + return this->PermissionsString; + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetPermissions(); + } + return this->EmptyString; +} + +bool cmInstallCommandArguments::GetOptional() const +{ + if (this->Optional.IsEnabled()) + { + return true; + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetOptional(); + } + return false; +} + +bool cmInstallCommandArguments::GetNamelinkOnly() const +{ + if (this->NamelinkOnly.IsEnabled()) + { + return true; + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetNamelinkOnly(); + } + return false; +} + +bool cmInstallCommandArguments::GetNamelinkSkip() const +{ + if (this->NamelinkSkip.IsEnabled()) + { + return true; + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetNamelinkSkip(); + } + return false; +} + +const std::vector& + cmInstallCommandArguments::GetConfigurations() const +{ + if (!this->Configurations.GetVector().empty()) + { + return this->Configurations.GetVector(); + } + if (this->GenericArguments!=0) + { + return this->GenericArguments->GetConfigurations(); + } + return this->Configurations.GetVector(); +} + + +bool cmInstallCommandArguments::Finalize() +{ + if (!this->CheckPermissions()) + { + return false; + } + this->DestinationString = this->Destination.GetString(); + cmSystemTools::ConvertToUnixSlashes(this->DestinationString); + return true; +} + +void cmInstallCommandArguments::Parse(const std::vector* args, + std::vector* unconsumedArgs) +{ + this->Parser.Parse(args, unconsumedArgs); +} + + +bool cmInstallCommandArguments::CheckPermissions() +{ + this->PermissionsString = ""; + for(std::vector::const_iterator + permIt = this->Permissions.GetVector().begin(); + permIt != this->Permissions.GetVector().end(); + ++permIt) + { + if (!this->CheckPermissions(*permIt, this->PermissionsString)) + { + return false; + } + } + return true; +} + +bool cmInstallCommandArguments::CheckPermissions( + const std::string& onePermission, std::string& permissions) +{ + // Check the permission against the table. + for(const char** valid = cmInstallCommandArguments::PermissionsTable; + *valid; ++valid) + { + if(onePermission == *valid) + { + // This is a valid permission. + permissions += " "; + permissions += onePermission; + return true; + } + } + // This is not a valid permission. + return false; +} diff --git a/Source/cmInstallCommandArguments.h b/Source/cmInstallCommandArguments.h new file mode 100644 index 000000000..b965db308 --- /dev/null +++ b/Source/cmInstallCommandArguments.h @@ -0,0 +1,71 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallCommandArguments.h,v $ + Language: C++ + Date: $Date: 2008-02-04 22:03:48 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + +#ifndef cmInstallCommandArguments_h +#define cmInstallCommandArguments_h + +#include "cmStandardIncludes.h" +#include "cmCommandArgumentsHelper.h" + +class cmInstallCommandArguments +{ + public: + cmInstallCommandArguments(); + void SetGenericArguments(cmInstallCommandArguments* args) + {this->GenericArguments = args;} + void Parse(const std::vector* args, + std::vector* unconsumedArgs); + + // Compute destination path.and check permissions + bool Finalize(); + + const std::string& GetDestination() const; + const std::string& GetComponent() const; + const std::string& GetRename() const; + const std::string& GetPermissions() const; + const std::vector& GetConfigurations() const; + bool GetOptional() const; + bool GetNamelinkOnly() const; + bool GetNamelinkSkip() const; + + // once HandleDirectoryMode() is also switched to using + // cmInstallCommandArguments then these two functions can become non-static + // private member functions without arguments + static bool CheckPermissions(const std::string& onePerm, + std::string& perm); + cmCommandArgumentsHelper Parser; + cmCommandArgumentGroup ArgumentGroup; + private: + cmCAString Destination; + cmCAString Component; + cmCAString Rename; + cmCAStringVector Permissions; + cmCAStringVector Configurations; + cmCAEnabler Optional; + cmCAEnabler NamelinkOnly; + cmCAEnabler NamelinkSkip; + + std::string DestinationString; + std::string PermissionsString; + + cmInstallCommandArguments* GenericArguments; + static const char* PermissionsTable[]; + static const std::string EmptyString; + bool CheckPermissions(); +}; + +#endif diff --git a/Source/cmInstallDirectoryGenerator.cxx b/Source/cmInstallDirectoryGenerator.cxx new file mode 100644 index 000000000..592ff2311 --- /dev/null +++ b/Source/cmInstallDirectoryGenerator.cxx @@ -0,0 +1,58 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallDirectoryGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallDirectoryGenerator.h" + +#include "cmTarget.h" + +//---------------------------------------------------------------------------- +cmInstallDirectoryGenerator +::cmInstallDirectoryGenerator(std::vector const& dirs, + const char* dest, + const char* file_permissions, + const char* dir_permissions, + std::vector const& configurations, + const char* component, + const char* literal_args): + cmInstallGenerator(dest, configurations, component), Directories(dirs), + FilePermissions(file_permissions), DirPermissions(dir_permissions), + LiteralArguments(literal_args) +{ +} + +//---------------------------------------------------------------------------- +cmInstallDirectoryGenerator +::~cmInstallDirectoryGenerator() +{ +} + +//---------------------------------------------------------------------------- +void +cmInstallDirectoryGenerator::GenerateScriptActions(std::ostream& os, + Indent const& indent) +{ + // Write code to install the directories. + bool not_optional = false; + const char* no_properties = 0; + const char* no_rename = 0; + this->AddInstallRule(os, cmTarget::INSTALL_DIRECTORY, + this->Directories, + not_optional, no_properties, + this->FilePermissions.c_str(), + this->DirPermissions.c_str(), + no_rename, this->LiteralArguments.c_str(), + indent); +} diff --git a/Source/cmInstallDirectoryGenerator.h b/Source/cmInstallDirectoryGenerator.h new file mode 100644 index 000000000..cc0150bb4 --- /dev/null +++ b/Source/cmInstallDirectoryGenerator.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallDirectoryGenerator.h,v $ + Language: C++ + Date: $Date: 2007-07-02 18:56:57 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallDirectoryGenerator_h +#define cmInstallDirectoryGenerator_h + +#include "cmInstallGenerator.h" + +/** \class cmInstallDirectoryGenerator + * \brief Generate directory installation rules. + */ +class cmInstallDirectoryGenerator: public cmInstallGenerator +{ +public: + cmInstallDirectoryGenerator(std::vector const& dirs, + const char* dest, + const char* file_permissions, + const char* dir_permissions, + std::vector const& configurations, + const char* component, + const char* literal_args); + virtual ~cmInstallDirectoryGenerator(); + +protected: + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + std::vector Directories; + std::string FilePermissions; + std::string DirPermissions; + std::string LiteralArguments; +}; + +#endif diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx new file mode 100644 index 000000000..8b1e8e7c1 --- /dev/null +++ b/Source/cmInstallExportGenerator.cxx @@ -0,0 +1,211 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallExportGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallExportGenerator.h" + +#include + +#include "cmake.h" +#include "cmInstallTargetGenerator.h" +#include "cmGeneratedFileStream.h" +#include "cmTarget.h" +#include "cmMakefile.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + +#include "cmInstallFilesGenerator.h" + +#include "cmExportInstallFileGenerator.h" + +//---------------------------------------------------------------------------- +cmInstallExportGenerator::cmInstallExportGenerator( + const char* name, + const char* destination, + const char* file_permissions, + std::vector const& configurations, + const char* component, + const char* filename, const char* name_space, + cmMakefile* mf) + :cmInstallGenerator(destination, configurations, component) + ,Name(name) + ,FilePermissions(file_permissions) + ,FileName(filename) + ,Namespace(name_space) + ,Makefile(mf) +{ + this->EFGen = new cmExportInstallFileGenerator(this); +} + +//---------------------------------------------------------------------------- +cmInstallExportGenerator::~cmInstallExportGenerator() +{ + delete this->EFGen; +} + +//---------------------------------------------------------------------------- +void cmInstallExportGenerator::ComputeTempDir() +{ + // Choose a temporary directory in which to generate the import + // files to be installed. + this->TempDir = this->Makefile->GetCurrentOutputDirectory(); + this->TempDir += cmake::GetCMakeFilesDirectory(); + this->TempDir += "/Export"; + if(this->Destination.empty()) + { + return; + } + else + { + this->TempDir += "/"; + } + + // Enforce a maximum length. + bool useMD5 = false; +#if defined(_WIN32) || defined(__CYGWIN__) + std::string::size_type const max_total_len = 250; +#else + std::string::size_type const max_total_len = 1000; +#endif + if(this->TempDir.size() < max_total_len) + { + // Keep the total path length below the limit. + std::string::size_type max_len = max_total_len - this->TempDir.size(); + if(this->Destination.size() > max_len) + { + useMD5 = true; + } + } + else + { + useMD5 = true; + } + if(useMD5) + { + // Replace the destination path with a hash to keep it short. + this->TempDir += + cmSystemTools::ComputeStringMD5(this->Destination.c_str()); + } + else + { + std::string dest = this->Destination; + // Avoid unix full paths. + if(dest[0] == '/') + { + dest[0] = '_'; + } + // Avoid windows full paths by removing colons. + cmSystemTools::ReplaceString(dest, ":", "_"); + // Avoid relative paths that go up the tree. + cmSystemTools::ReplaceString(dest, "../", "__/"); + // Avoid spaces. + cmSystemTools::ReplaceString(dest, " ", "_"); + this->TempDir += dest; + } +} + +//---------------------------------------------------------------------------- +void cmInstallExportGenerator::GenerateScript(std::ostream& os) +{ + // Get the export set requested. + ExportSet const* exportSet = + this->Makefile->GetLocalGenerator()->GetGlobalGenerator() + ->GetExportSet(this->Name.c_str()); + + // Skip empty sets. + if(!exportSet) + { + cmOStringStream e; + e << "INSTALL(EXPORT) given unknown export \"" << this->Name << "\""; + cmSystemTools::Error(e.str().c_str()); + return; + } + + // Create the temporary directory in which to store the files. + this->ComputeTempDir(); + cmSystemTools::MakeDirectory(this->TempDir.c_str()); + + // Construct a temporary location for the file. + this->MainImportFile = this->TempDir; + this->MainImportFile += "/"; + this->MainImportFile += this->FileName; + + // Generate the import file for this export set. + this->EFGen->SetName(this->Name.c_str()); + this->EFGen->SetExportSet(exportSet); + this->EFGen->SetExportFile(this->MainImportFile.c_str()); + this->EFGen->SetNamespace(this->Namespace.c_str()); + if(this->ConfigurationTypes->empty()) + { + if(this->ConfigurationName && *this->ConfigurationName) + { + this->EFGen->AddConfiguration(this->ConfigurationName); + } + else + { + this->EFGen->AddConfiguration(""); + } + } + else + { + for(std::vector::const_iterator + ci = this->ConfigurationTypes->begin(); + ci != this->ConfigurationTypes->end(); ++ci) + { + this->EFGen->AddConfiguration(ci->c_str()); + } + } + this->EFGen->GenerateImportFile(); + + // Perform the main install script generation. + this->cmInstallGenerator::GenerateScript(os); +} + +//---------------------------------------------------------------------------- +void +cmInstallExportGenerator::GenerateScriptConfigs(std::ostream& os, + Indent const& indent) +{ + // Create the main install rules first. + this->cmInstallGenerator::GenerateScriptConfigs(os, indent); + + // Now create a configuration-specific install rule for the import + // file of each configuration. + std::vector files; + for(std::map::const_iterator + i = this->EFGen->GetConfigImportFiles().begin(); + i != this->EFGen->GetConfigImportFiles().end(); ++i) + { + files.push_back(i->second); + std::string config_test = this->CreateConfigTest(i->first.c_str()); + os << indent << "IF(" << config_test << ")\n"; + this->AddInstallRule(os, cmTarget::INSTALL_FILES, files, false, 0, + this->FilePermissions.c_str(), 0, 0, 0, + indent.Next()); + os << indent << "ENDIF(" << config_test << ")\n"; + files.clear(); + } +} + +//---------------------------------------------------------------------------- +void cmInstallExportGenerator::GenerateScriptActions(std::ostream& os, + Indent const& indent) +{ + // Install the main export file. + std::vector files; + files.push_back(this->MainImportFile); + this->AddInstallRule(os, cmTarget::INSTALL_FILES, files, false, 0, + this->FilePermissions.c_str(), 0, 0, 0, indent); +} diff --git a/Source/cmInstallExportGenerator.h b/Source/cmInstallExportGenerator.h new file mode 100644 index 000000000..f97cf4c1d --- /dev/null +++ b/Source/cmInstallExportGenerator.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallExportGenerator.h,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallExportGenerator_h +#define cmInstallExportGenerator_h + +#include "cmInstallGenerator.h" + +class cmExportInstallFileGenerator; +class cmInstallFilesGenerator; +class cmInstallTargetGenerator; +class cmTarget; +class cmTargetExport; +class cmMakefile; + +/** \class cmInstallExportGenerator + * \brief Generate rules for creating an export files. + */ +class cmInstallExportGenerator: public cmInstallGenerator +{ +public: + cmInstallExportGenerator(const char* name, + const char* dest, const char* file_permissions, + const std::vector& configurations, + const char* component, + const char* filename, const char* name_space, + cmMakefile* mf); + ~cmInstallExportGenerator(); +protected: + typedef std::vector ExportSet; + + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScript(std::ostream& os); + virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent); + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + void GenerateImportFile(ExportSet const* exportSet); + void GenerateImportFile(const char* config, ExportSet const* exportSet); + void ComputeTempDir(); + + std::string Name; + std::string FilePermissions; + std::string FileName; + std::string Namespace; + cmMakefile* Makefile; + + std::string TempDir; + std::string MainImportFile; + cmExportInstallFileGenerator* EFGen; +}; + +#endif diff --git a/Source/cmInstallFilesCommand.cxx b/Source/cmInstallFilesCommand.cxx new file mode 100644 index 000000000..4d9f77749 --- /dev/null +++ b/Source/cmInstallFilesCommand.cxx @@ -0,0 +1,177 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallFilesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.29 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallFilesCommand.h" + +#include "cmInstallFilesGenerator.h" + +// cmExecutableCommand +bool cmInstallFilesCommand +::InitialPass(std::vector const& argsIn, cmExecutionStatus &) +{ + if(argsIn.size() < 2) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Enable the install target. + this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->EnableInstallTarget(); + + std::vector args; + this->Makefile->ExpandSourceListArguments(argsIn, args, 2); + + this->Destination = args[0]; + + if((args.size() > 1) && (args[1] == "FILES")) + { + this->IsFilesForm = true; + for(std::vector::const_iterator s = args.begin()+2; + s != args.end(); ++s) + { + // Find the source location for each file listed. + std::string f = this->FindInstallSource(s->c_str()); + this->Files.push_back(f); + } + this->CreateInstallGenerator(); + } + else + { + this->IsFilesForm = false; + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } + } + + return true; +} + +void cmInstallFilesCommand::FinalPass() +{ + // No final pass for "FILES" form of arguments. + if(this->IsFilesForm) + { + return; + } + + std::string testf; + std::string ext = this->FinalArgs[0]; + + // two different options + if (this->FinalArgs.size() > 1) + { + // now put the files into the list + std::vector::iterator s = this->FinalArgs.begin(); + ++s; + // for each argument, get the files + for (;s != this->FinalArgs.end(); ++s) + { + // replace any variables + std::string temps = *s; + if (cmSystemTools::GetFilenamePath(temps).size() > 0) + { + testf = cmSystemTools::GetFilenamePath(temps) + "/" + + cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext; + } + else + { + testf = cmSystemTools::GetFilenameWithoutLastExtension(temps) + ext; + } + + // add to the result + this->Files.push_back(this->FindInstallSource(testf.c_str())); + } + } + else // reg exp list + { + std::vector files; + std::string regex = this->FinalArgs[0].c_str(); + cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(), + regex.c_str(), files); + + std::vector::iterator s = files.begin(); + // for each argument, get the files + for (;s != files.end(); ++s) + { + this->Files.push_back(this->FindInstallSource(s->c_str())); + } + } + + this->CreateInstallGenerator(); +} + +void cmInstallFilesCommand::CreateInstallGenerator() const +{ + // Construct the destination. This command always installs under + // the prefix. We skip the leading slash given by the user. + std::string destination = this->Destination.substr(1); + cmSystemTools::ConvertToUnixSlashes(destination); + + // Use a file install generator. + const char* no_permissions = ""; + const char* no_rename = ""; + const char* no_component = ""; + std::vector no_configurations; + this->Makefile->AddInstallGenerator( + new cmInstallFilesGenerator(this->Files, + destination.c_str(), false, + no_permissions, no_configurations, + no_component, no_rename)); +} + + +/** + * Find a file in the build or source tree for installation given a + * relative path from the CMakeLists.txt file. This will favor files + * present in the build tree. If a full path is given, it is just + * returned. + */ +std::string cmInstallFilesCommand::FindInstallSource(const char* name) const +{ + if(cmSystemTools::FileIsFullPath(name)) + { + // This is a full path. + return name; + } + + // This is a relative path. + std::string tb = this->Makefile->GetCurrentOutputDirectory(); + tb += "/"; + tb += name; + std::string ts = this->Makefile->GetCurrentDirectory(); + ts += "/"; + ts += name; + + if(cmSystemTools::FileExists(tb.c_str())) + { + // The file exists in the binary tree. Use it. + return tb; + } + else if(cmSystemTools::FileExists(ts.c_str())) + { + // The file exists in the source tree. Use it. + return ts; + } + else + { + // The file doesn't exist. Assume it will be present in the + // binary tree when the install occurs. + return tb; + } +} diff --git a/Source/cmInstallFilesCommand.h b/Source/cmInstallFilesCommand.h new file mode 100644 index 000000000..e07133eb7 --- /dev/null +++ b/Source/cmInstallFilesCommand.h @@ -0,0 +1,118 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallFilesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallFilesCommand_h +#define cmInstallFilesCommand_h + +#include "cmCommand.h" + +/** \class cmInstallFilesCommand + * \brief Specifies where to install some files + * + * cmInstallFilesCommand specifies the relative path where a list of + * files should be installed. + */ +class cmInstallFilesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmInstallFilesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "install_files";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the install(FILES ) command instead."; + } + + /** + * This is called at the end after all the information + * specified by the command is accumulated. Most commands do + * not implement this method. At this point, reading and + * writing to the cache can be done. + */ + virtual void FinalPass(); + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "This command has been superceded by the install command. It " + "is provided for compatibility with older CMake code. " + "The FILES form is directly replaced by the FILES form of the " + "install command. The regexp form can be expressed " + "more clearly using the GLOB form of the file command.\n" + " install_files( extension file file ...)\n" + "Create rules to install the listed files with the given extension " + "into the given directory. " + "Only files existing in the current source tree or its corresponding " + "location in the binary tree may be listed. " + "If a file specified already has an extension, that extension will be " + "removed first. This is useful for providing lists of source files " + "such as foo.cxx when you want the corresponding foo.h to be " + "installed. A typical extension is '.h'.\n" + " install_files( regexp)\n" + "Any files in the current source directory that match the regular " + "expression will be installed.\n" + " install_files( FILES file file ...)\n" + "Any files listed after the FILES keyword will be " + "installed explicitly from the names given. Full paths are allowed in " + "this form.\n" + "The directory is relative to the installation prefix, which " + "is stored in the variable CMAKE_INSTALL_PREFIX."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmInstallFilesCommand, cmCommand); + +protected: + void CreateInstallGenerator() const; + std::string FindInstallSource(const char* name) const; + + private: + std::vector FinalArgs; + bool IsFilesForm; + std::string Destination; + std::vector Files; +}; + + +#endif diff --git a/Source/cmInstallFilesGenerator.cxx b/Source/cmInstallFilesGenerator.cxx new file mode 100644 index 000000000..0b4f8216e --- /dev/null +++ b/Source/cmInstallFilesGenerator.cxx @@ -0,0 +1,58 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallFilesGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallFilesGenerator.h" + +#include "cmTarget.h" + +//---------------------------------------------------------------------------- +cmInstallFilesGenerator +::cmInstallFilesGenerator(std::vector const& files, + const char* dest, bool programs, + const char* file_permissions, + std::vector const& configurations, + const char* component, + const char* rename, + bool optional): + cmInstallGenerator(dest, configurations, component), + Files(files), Programs(programs), + FilePermissions(file_permissions), + Rename(rename), Optional(optional) +{ +} + +//---------------------------------------------------------------------------- +cmInstallFilesGenerator +::~cmInstallFilesGenerator() +{ +} + +//---------------------------------------------------------------------------- +void cmInstallFilesGenerator::GenerateScriptActions(std::ostream& os, + Indent const& indent) +{ + // Write code to install the files. + const char* no_properties = 0; + const char* no_dir_permissions = 0; + this->AddInstallRule(os, + (this->Programs + ? cmTarget::INSTALL_PROGRAMS + : cmTarget::INSTALL_FILES), + this->Files, + this->Optional, no_properties, + this->FilePermissions.c_str(), no_dir_permissions, + this->Rename.c_str(), 0, indent); +} diff --git a/Source/cmInstallFilesGenerator.h b/Source/cmInstallFilesGenerator.h new file mode 100644 index 000000000..a3e7f27f9 --- /dev/null +++ b/Source/cmInstallFilesGenerator.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallFilesGenerator.h,v $ + Language: C++ + Date: $Date: 2007-07-02 18:56:57 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallFilesGenerator_h +#define cmInstallFilesGenerator_h + +#include "cmInstallGenerator.h" + +/** \class cmInstallFilesGenerator + * \brief Generate file installation rules. + */ +class cmInstallFilesGenerator: public cmInstallGenerator +{ +public: + cmInstallFilesGenerator(std::vector const& files, + const char* dest, bool programs, + const char* file_permissions, + std::vector const& configurations, + const char* component, + const char* rename, + bool optional = false); + virtual ~cmInstallFilesGenerator(); + +protected: + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + std::vector Files; + bool Programs; + std::string FilePermissions; + std::string Rename; + bool Optional; +}; + +#endif diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx new file mode 100644 index 000000000..53c98cf30 --- /dev/null +++ b/Source/cmInstallGenerator.cxx @@ -0,0 +1,277 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallGenerator.h" + +#include "cmSystemTools.h" +#include "cmTarget.h" + +//---------------------------------------------------------------------------- +cmInstallGenerator +::cmInstallGenerator(const char* destination, + std::vector const& configurations, + const char* component): + Destination(destination? destination:""), + Configurations(configurations), + Component(component? component:""), + ConfigurationName(0), + ConfigurationTypes(0) +{ +} + +//---------------------------------------------------------------------------- +cmInstallGenerator +::~cmInstallGenerator() +{ +} + +//---------------------------------------------------------------------------- +void +cmInstallGenerator +::Generate(std::ostream& os, const char* config, + std::vector const& configurationTypes) +{ + this->ConfigurationName = config; + this->ConfigurationTypes = &configurationTypes; + this->GenerateScript(os); + this->ConfigurationName = 0; + this->ConfigurationTypes = 0; +} + +//---------------------------------------------------------------------------- +void cmInstallGenerator +::AddInstallRule( + std::ostream& os, + int type, + std::vector const& files, + bool optional /* = false */, + const char* properties /* = 0 */, + const char* permissions_file /* = 0 */, + const char* permissions_dir /* = 0 */, + const char* rename /* = 0 */, + const char* literal_args /* = 0 */, + cmInstallGeneratorIndent const& indent + ) +{ + // Use the FILE command to install the file. + std::string stype; + switch(type) + { + case cmTarget::INSTALL_DIRECTORY:stype = "DIRECTORY"; break; + case cmTarget::INSTALL_PROGRAMS: stype = "PROGRAM"; break; + case cmTarget::EXECUTABLE: stype = "EXECUTABLE"; break; + case cmTarget::STATIC_LIBRARY: stype = "STATIC_LIBRARY"; break; + case cmTarget::SHARED_LIBRARY: stype = "SHARED_LIBRARY"; break; + case cmTarget::MODULE_LIBRARY: stype = "MODULE"; break; + case cmTarget::INSTALL_FILES: + default: stype = "FILE"; break; + } + os << indent; + std::string dest = this->GetInstallDestination(); + os << "FILE(INSTALL DESTINATION \"" << dest << "\" TYPE " << stype.c_str(); + if(optional) + { + os << " OPTIONAL"; + } + if(properties && *properties) + { + os << " PROPERTIES" << properties; + } + if(permissions_file && *permissions_file) + { + os << " PERMISSIONS" << permissions_file; + } + if(permissions_dir && *permissions_dir) + { + os << " DIR_PERMISSIONS" << permissions_dir; + } + if(rename && *rename) + { + os << " RENAME \"" << rename << "\""; + } + os << " FILES"; + if(files.size() == 1) + { + os << " \"" << files[0] << "\""; + } + else + { + for(std::vector::const_iterator fi = files.begin(); + fi != files.end(); ++fi) + { + os << "\n" << indent << " \"" << *fi << "\""; + } + os << "\n" << indent << " "; + if(!(literal_args && *literal_args)) + { + os << " "; + } + } + if(literal_args && *literal_args) + { + os << literal_args; + } + os << ")\n"; +} + +//---------------------------------------------------------------------------- +static void cmInstallGeneratorEncodeConfig(const char* config, + std::string& result) +{ + for(const char* c = config; *c; ++c) + { + if(*c >= 'a' && *c <= 'z') + { + result += "["; + result += *c + ('A' - 'a'); + result += *c; + result += "]"; + } + else if(*c >= 'A' && *c <= 'Z') + { + result += "["; + result += *c; + result += *c + ('a' - 'A'); + result += "]"; + } + else + { + result += *c; + } + } +} + +//---------------------------------------------------------------------------- +std::string +cmInstallGenerator::CreateConfigTest(const char* config) +{ + std::string result = "\"${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^("; + if(config && *config) + { + cmInstallGeneratorEncodeConfig(config, result); + } + result += ")$\""; + return result; +} + +//---------------------------------------------------------------------------- +std::string +cmInstallGenerator::CreateConfigTest(std::vector const& configs) +{ + std::string result = "\"${CMAKE_INSTALL_CONFIG_NAME}\" MATCHES \"^("; + const char* sep = ""; + for(std::vector::const_iterator ci = configs.begin(); + ci != configs.end(); ++ci) + { + result += sep; + sep = "|"; + cmInstallGeneratorEncodeConfig(ci->c_str(), result); + } + result += ")$\""; + return result; +} + +//---------------------------------------------------------------------------- +std::string +cmInstallGenerator::CreateComponentTest(const char* component) +{ + std::string result = "NOT CMAKE_INSTALL_COMPONENT OR " + "\"${CMAKE_INSTALL_COMPONENT}\" MATCHES \"^("; + result += component; + result += ")$\""; + return result; +} + +//---------------------------------------------------------------------------- +void cmInstallGenerator::GenerateScript(std::ostream& os) +{ + // Track indentation. + Indent indent; + + // Begin this block of installation. + std::string component_test = + this->CreateComponentTest(this->Component.c_str()); + os << indent << "IF(" << component_test << ")\n"; + + // Generate the script possibly with per-configuration code. + this->GenerateScriptConfigs(os, indent.Next()); + + // End this block of installation. + os << indent << "ENDIF(" << component_test << ")\n\n"; +} + +//---------------------------------------------------------------------------- +void +cmInstallGenerator::GenerateScriptConfigs(std::ostream& os, + Indent const& indent) +{ + if(this->Configurations.empty()) + { + // This rule is for all configurations. + this->GenerateScriptActions(os, indent); + } + else + { + // Generate a per-configuration block. + std::string config_test = this->CreateConfigTest(this->Configurations); + os << indent << "IF(" << config_test << ")\n"; + this->GenerateScriptActions(os, indent.Next()); + os << indent << "ENDIF(" << config_test << ")\n"; + } +} + +//---------------------------------------------------------------------------- +void cmInstallGenerator::GenerateScriptActions(std::ostream&, Indent const&) +{ + // No actions for this generator. +} + +//---------------------------------------------------------------------------- +bool cmInstallGenerator::InstallsForConfig(const char* config) +{ + // If this is not a configuration-specific rule then we install. + if(this->Configurations.empty()) + { + return true; + } + + // This is a configuration-specific rule. Check if the config + // matches this rule. + std::string config_upper = cmSystemTools::UpperCase(config?config:""); + for(std::vector::const_iterator i = + this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + if(cmSystemTools::UpperCase(*i) == config_upper) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +std::string cmInstallGenerator::GetInstallDestination() const +{ + std::string result; + if(!this->Destination.empty() && + !cmSystemTools::FileIsFullPath(this->Destination.c_str())) + { + result = "${CMAKE_INSTALL_PREFIX}/"; + } + result += this->Destination; + return result; +} diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h new file mode 100644 index 000000000..119e99f97 --- /dev/null +++ b/Source/cmInstallGenerator.h @@ -0,0 +1,109 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallGenerator.h,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:35 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallGenerator_h +#define cmInstallGenerator_h + +#include "cmStandardIncludes.h" + +class cmLocalGenerator; + +class cmInstallGeneratorIndent +{ +public: + cmInstallGeneratorIndent(): Level(0) {} + cmInstallGeneratorIndent(int level): Level(level) {} + void Write(std::ostream& os) const + { + for(int i=0; i < this->Level; ++i) + { + os << " "; + } + } + cmInstallGeneratorIndent Next(int step = 2) const + { + return cmInstallGeneratorIndent(this->Level + step); + } +private: + int Level; +}; +inline std::ostream& operator<<(std::ostream& os, + cmInstallGeneratorIndent const& indent) +{ + indent.Write(os); + return os; +} + +/** \class cmInstallGenerator + * \brief Support class for generating install scripts. + * + */ +class cmInstallGenerator +{ +public: + cmInstallGenerator(const char* destination, + std::vector const& configurations, + const char* component); + virtual ~cmInstallGenerator(); + + void Generate(std::ostream& os, const char* config, + std::vector const& configurationTypes); + + void AddInstallRule( + std::ostream& os, int type, + std::vector const& files, + bool optional = false, + const char* properties = 0, + const char* permissions_file = 0, + const char* permissions_dir = 0, + const char* rename = 0, + const char* literal_args = 0, + cmInstallGeneratorIndent const& indent = cmInstallGeneratorIndent() + ); + + const char* GetDestination() const + { return this->Destination.c_str(); } + const std::vector& GetConfigurations() const + { return this->Configurations; } + + /** Get the install destination as it should appear in the + installation script. */ + std::string GetInstallDestination() const; + + /** Test if this generator installs something for a given configuration. */ + bool InstallsForConfig(const char*); + +protected: + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScript(std::ostream& os); + virtual void GenerateScriptConfigs(std::ostream& os, Indent const& indent); + virtual void GenerateScriptActions(std::ostream& os, Indent const& indent); + + std::string CreateConfigTest(const char* config); + std::string CreateConfigTest(std::vector const& configs); + std::string CreateComponentTest(const char* component); + + // Information shared by most generator types. + std::string Destination; + std::vector const Configurations; + std::string Component; + + // Information used during generation. + const char* ConfigurationName; + std::vector const* ConfigurationTypes; +}; + +#endif diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx new file mode 100644 index 000000000..9b46c23d9 --- /dev/null +++ b/Source/cmInstallProgramsCommand.cxx @@ -0,0 +1,138 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallProgramsCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-16 18:05:03 $ + Version: $Revision: 1.22 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallProgramsCommand.h" +#include "cmInstallFilesGenerator.h" +// cmExecutableCommand +bool cmInstallProgramsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Enable the install target. + this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->EnableInstallTarget(); + + this->Destination = args[0]; + + std::vector::const_iterator s = args.begin(); + for (++s;s != args.end(); ++s) + { + this->FinalArgs.push_back(*s); + } + + return true; +} + +void cmInstallProgramsCommand::FinalPass() +{ + bool files_mode = false; + if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES") + { + files_mode = true; + } + + // two different options + if (this->FinalArgs.size() > 1 || files_mode) + { + // for each argument, get the programs + std::vector::iterator s = this->FinalArgs.begin(); + if(files_mode) + { + // Skip the FILES argument in files mode. + ++s; + } + for(;s != this->FinalArgs.end(); ++s) + { + // add to the result + this->Files.push_back(this->FindInstallSource(s->c_str())); + } + } + else // reg exp list + { + std::vector programs; + cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(), + this->FinalArgs[0].c_str(), programs); + + std::vector::iterator s = programs.begin(); + // for each argument, get the programs + for (;s != programs.end(); ++s) + { + this->Files.push_back(this->FindInstallSource(s->c_str())); + } + } + + // Construct the destination. This command always installs under + // the prefix. We skip the leading slash given by the user. + std::string destination = this->Destination.substr(1); + cmSystemTools::ConvertToUnixSlashes(destination); + + // Use a file install generator. + const char* no_permissions = ""; + const char* no_rename = ""; + const char* no_component = ""; + std::vector no_configurations; + this->Makefile->AddInstallGenerator( + new cmInstallFilesGenerator(this->Files, + destination.c_str(), true, + no_permissions, no_configurations, + no_component, no_rename)); +} + +/** + * Find a file in the build or source tree for installation given a + * relative path from the CMakeLists.txt file. This will favor files + * present in the build tree. If a full path is given, it is just + * returned. + */ +std::string cmInstallProgramsCommand +::FindInstallSource(const char* name) const +{ + if(cmSystemTools::FileIsFullPath(name)) + { + // This is a full path. + return name; + } + + // This is a relative path. + std::string tb = this->Makefile->GetCurrentOutputDirectory(); + tb += "/"; + tb += name; + std::string ts = this->Makefile->GetCurrentDirectory(); + ts += "/"; + ts += name; + + if(cmSystemTools::FileExists(tb.c_str())) + { + // The file exists in the binary tree. Use it. + return tb; + } + else if(cmSystemTools::FileExists(ts.c_str())) + { + // The file exists in the source tree. Use it. + return ts; + } + else + { + // The file doesn't exist. Assume it will be present in the + // binary tree when the install occurs. + return tb; + } +} diff --git a/Source/cmInstallProgramsCommand.h b/Source/cmInstallProgramsCommand.h new file mode 100644 index 000000000..d3b744fac --- /dev/null +++ b/Source/cmInstallProgramsCommand.h @@ -0,0 +1,111 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallProgramsCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallProgramsCommand_h +#define cmInstallProgramsCommand_h + +#include "cmCommand.h" + +/** \class cmInstallProgramsCommand + * \brief Specifies where to install some programs + * + * cmInstallProgramsCommand specifies the relative path where a list of + * programs should be installed. + */ +class cmInstallProgramsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmInstallProgramsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "install_programs";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the install(PROGRAMS ) command instead."; + } + + /** + * This is called at the end after all the information + * specified by the command is accumulated. Most commands do + * not implement this method. At this point, reading and + * writing to the cache can be done. + */ + virtual void FinalPass(); + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "This command has been superceded by the install command. It " + "is provided for compatibility with older CMake code. " + "The FILES form is directly replaced by the PROGRAMS form of the " + "INSTALL command. The regexp form can be expressed more clearly " + "using the GLOB form of the FILE command.\n" + " install_programs( file1 file2 [file3 ...])\n" + " install_programs( FILES file1 [file2 ...])\n" + "Create rules to install the listed programs into the given directory. " + "Use the FILES argument to guarantee that the file list version of " + "the command will be used even when there is only one argument.\n" + " install_programs( regexp)\n" + "In the second form any program in the current source directory that " + "matches the regular expression will be installed.\n" + "This command is intended to install programs that are not built " + "by cmake, such as shell scripts. See the TARGETS form of " + "the INSTALL command to " + "create installation rules for targets built by cmake.\n" + "The directory is relative to the installation prefix, which " + "is stored in the variable CMAKE_INSTALL_PREFIX."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmInstallProgramsCommand, cmCommand); + +protected: + std::string FindInstallSource(const char* name) const; +private: + std::vector FinalArgs; + std::string Destination; + std::vector Files; +}; + + +#endif diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx new file mode 100644 index 000000000..35d1284fe --- /dev/null +++ b/Source/cmInstallScriptGenerator.cxx @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallScriptGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-10-15 11:08:10 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallScriptGenerator.h" + +//---------------------------------------------------------------------------- +cmInstallScriptGenerator +::cmInstallScriptGenerator(const char* script, bool code, + const char* component) : + cmInstallGenerator(0, std::vector(), component), + Script(script), Code(code) +{ +} + +//---------------------------------------------------------------------------- +cmInstallScriptGenerator +::~cmInstallScriptGenerator() +{ +} + +//---------------------------------------------------------------------------- +void cmInstallScriptGenerator::GenerateScript(std::ostream& os) +{ + Indent indent; + std::string component_test = + this->CreateComponentTest(this->Component.c_str()); + os << indent << "IF(" << component_test << ")\n"; + + if(this->Code) + { + os << indent.Next() << this->Script << "\n"; + } + else + { + os << indent.Next() << "INCLUDE(\"" << this->Script << "\")\n"; + } + + os << indent << "ENDIF(" << component_test << ")\n\n"; +} diff --git a/Source/cmInstallScriptGenerator.h b/Source/cmInstallScriptGenerator.h new file mode 100644 index 000000000..02260749e --- /dev/null +++ b/Source/cmInstallScriptGenerator.h @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallScriptGenerator.h,v $ + Language: C++ + Date: $Date: 2007-10-15 11:08:10 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallScriptGenerator_h +#define cmInstallScriptGenerator_h + +#include "cmInstallGenerator.h" + +/** \class cmInstallScriptGenerator + * \brief Generate target installation rules. + */ +class cmInstallScriptGenerator: public cmInstallGenerator +{ +public: + cmInstallScriptGenerator(const char* script, bool code, + const char* component); + virtual ~cmInstallScriptGenerator(); + +protected: + virtual void GenerateScript(std::ostream& os); + std::string Script; + bool Code; +}; + +#endif diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx new file mode 100644 index 000000000..a349c8bde --- /dev/null +++ b/Source/cmInstallTargetGenerator.cxx @@ -0,0 +1,716 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallTargetGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:51 $ + Version: $Revision: 1.62.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallTargetGenerator.h" + +#include "cmComputeLinkInformation.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmake.h" + +#include + +//---------------------------------------------------------------------------- +cmInstallTargetGenerator +::cmInstallTargetGenerator(cmTarget& t, const char* dest, bool implib, + const char* file_permissions, + std::vector const& configurations, + const char* component, bool optional): + cmInstallGenerator(dest, configurations, component), Target(&t), + ImportLibrary(implib), FilePermissions(file_permissions), Optional(optional) +{ + this->NamelinkMode = NamelinkModeNone; + this->Target->SetHaveInstallRule(true); +} + +//---------------------------------------------------------------------------- +cmInstallTargetGenerator +::~cmInstallTargetGenerator() +{ +} + +//---------------------------------------------------------------------------- +void cmInstallTargetGenerator::GenerateScript(std::ostream& os) +{ + // Warn if installing an exclude-from-all target. + if(this->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + cmOStringStream msg; + msg << "WARNING: Target \"" << this->Target->GetName() + << "\" has EXCLUDE_FROM_ALL set and will not be built by default " + << "but an install rule has been provided for it. CMake does " + << "not define behavior for this case."; + cmSystemTools::Message(msg.str().c_str(), "Warning"); + } + + // Track indentation. + Indent indent; + + // Begin this block of installation. + std::string component_test = + this->CreateComponentTest(this->Component.c_str()); + os << indent << "IF(" << component_test << ")\n"; + + // Compute the build tree directory from which to copy the target. + std::string fromDir; + if(this->Target->NeedRelinkBeforeInstall()) + { + fromDir = this->Target->GetMakefile()->GetStartOutputDirectory(); + fromDir += cmake::GetCMakeFilesDirectory(); + fromDir += "/CMakeRelink.dir/"; + } + else + { + fromDir = this->Target->GetDirectory(0, this->ImportLibrary); + fromDir += "/"; + } + + // Generate a portion of the script for each configuration. + if(this->ConfigurationTypes->empty()) + { + this->GenerateScriptForConfig(os, fromDir.c_str(), + this->ConfigurationName, + indent.Next()); + } + else + { + for(std::vector::const_iterator i = + this->ConfigurationTypes->begin(); + i != this->ConfigurationTypes->end(); ++i) + { + this->GenerateScriptForConfig(os, fromDir.c_str(), i->c_str(), + indent.Next()); + } + } + + // End this block of installation. + os << indent << "ENDIF(" << component_test << ")\n\n"; +} + +//---------------------------------------------------------------------------- +void cmInstallTargetGenerator::GenerateScriptForConfig(std::ostream& os, + const char* fromDir, + const char* config, + Indent const& indent) +{ + // Compute the per-configuration directory containing the files. + std::string fromDirConfig = fromDir; + this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator() + ->AppendDirectoryForConfig("", config, "/", fromDirConfig); + + if(config && *config) + { + // Skip this configuration for config-specific installation that + // does not match it. + if(!this->InstallsForConfig(config)) + { + return; + } + + // Generate a per-configuration block. + std::string config_test = this->CreateConfigTest(config); + os << indent << "IF(" << config_test << ")\n"; + this->GenerateScriptForConfigDir(os, fromDirConfig.c_str(), config, + indent.Next()); + os << indent << "ENDIF(" << config_test << ")\n"; + } + else + { + this->GenerateScriptForConfigDir(os, fromDirConfig.c_str(), config, + indent); + } +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator +::GenerateScriptForConfigDir(std::ostream& os, + const char* fromDirConfig, + const char* config, + Indent const& indent) +{ + // Compute the full path to the main installed file for this target. + NameType nameType = this->ImportLibrary? NameImplib : NameNormal; + std::string toInstallPath = this->GetInstallDestination(); + toInstallPath += "/"; + toInstallPath += this->GetInstallFilename(this->Target, config, nameType); + + // Track whether post-install operations should be added to the + // script. + bool tweakInstalledFile = true; + + // Compute the list of files to install for this target. + std::vector files; + std::string literal_args; + cmTarget::TargetType type = this->Target->GetType(); + if(type == cmTarget::EXECUTABLE) + { + // There is a bug in cmInstallCommand if this fails. + assert(this->NamelinkMode == NamelinkModeNone); + + std::string targetName; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + this->Target->GetExecutableNames(targetName, targetNameReal, + targetNameImport, targetNamePDB, + config); + if(this->ImportLibrary) + { + std::string from1 = fromDirConfig; + from1 += targetNameImport; + files.push_back(from1); + + // An import library looks like a static library. + type = cmTarget::STATIC_LIBRARY; + } + else + { + std::string from1 = fromDirConfig; + from1 += targetName; + + // Handle OSX Bundles. + if(this->Target->IsAppBundleOnApple()) + { + // Compute the source locations of the bundle executable and + // Info.plist file. + from1 += ".app"; + files.push_back(from1); + type = cmTarget::INSTALL_DIRECTORY; + // Need to apply install_name_tool and stripping to binary + // inside bundle. + toInstallPath += ".app/Contents/MacOS/"; + toInstallPath += + this->GetInstallFilename(this->Target, config, nameType); + literal_args += " USE_SOURCE_PERMISSIONS"; + } + else + { + files.push_back(from1); + if(targetNameReal != targetName) + { + std::string from2 = fromDirConfig; + from2 += targetNameReal; + files.push_back(from2); + } + } + } + } + else + { + std::string targetName; + std::string targetNameSO; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + this->Target->GetLibraryNames(targetName, targetNameSO, targetNameReal, + targetNameImport, targetNamePDB, + config); + if(this->ImportLibrary) + { + // There is a bug in cmInstallCommand if this fails. + assert(this->NamelinkMode == NamelinkModeNone); + + std::string from1 = fromDirConfig; + from1 += targetNameImport; + files.push_back(from1); + + // An import library looks like a static library. + type = cmTarget::STATIC_LIBRARY; + } + else if(this->Target->IsFrameworkOnApple()) + { + // There is a bug in cmInstallCommand if this fails. + assert(this->NamelinkMode == NamelinkModeNone); + + // Compute the build tree location of the framework directory + std::string from1 = fromDirConfig; + from1 += targetName; + from1 += ".framework"; + files.push_back(from1); + + type = cmTarget::INSTALL_DIRECTORY; + + // Need to apply install_name_tool and stripping to binary + // inside framework. + toInstallPath += ".framework/Versions/"; + toInstallPath += this->Target->GetFrameworkVersion(); + toInstallPath += "/"; + toInstallPath += this->GetInstallFilename(this->Target, config, + NameNormal); + + literal_args += " USE_SOURCE_PERMISSIONS"; + } + else + { + // Operations done at install time on the installed file should + // be done on the real file and not any of the symlinks. + toInstallPath = this->GetInstallDestination(); + toInstallPath += "/"; + toInstallPath += targetNameReal; + + // Construct the list of file names to install for this library. + bool haveNamelink = false; + std::string fromName; + std::string fromSOName; + std::string fromRealName; + fromName = fromDirConfig; + fromName += targetName; + if(targetNameSO != targetName) + { + haveNamelink = true; + fromSOName = fromDirConfig; + fromSOName += targetNameSO; + } + if(targetNameReal != targetName && + targetNameReal != targetNameSO) + { + haveNamelink = true; + fromRealName = fromDirConfig; + fromRealName += targetNameReal; + } + + // Add the names based on the current namelink mode. + if(haveNamelink) + { + // With a namelink we need to check the mode. + if(this->NamelinkMode == NamelinkModeOnly) + { + // Install the namelink only. + files.push_back(fromName); + tweakInstalledFile = false; + } + else + { + // Install the real file if it has its own name. + if(!fromRealName.empty()) + { + files.push_back(fromRealName); + } + + // Install the soname link if it has its own name. + if(!fromSOName.empty()) + { + files.push_back(fromSOName); + } + + // Install the namelink if it is not to be skipped. + if(this->NamelinkMode != NamelinkModeSkip) + { + files.push_back(fromName); + } + } + } + else + { + // Without a namelink there will be only one file. Install it + // if this is not a namelink-only rule. + if(this->NamelinkMode != NamelinkModeOnly) + { + files.push_back(fromName); + } + } + } + } + + // Skip this rule if no files are to be installed for the target. + if(files.empty()) + { + return; + } + + // Construct the path of the file on disk after installation on + // which tweaks may be performed. + std::string toDestDirPath = "$ENV{DESTDIR}"; + if(toInstallPath[0] != '/' && toInstallPath[0] != '$') + { + toDestDirPath += "/"; + } + toDestDirPath += toInstallPath; + + // Add pre-installation tweaks. + if(tweakInstalledFile) + { + // Collect tweaking rules. + cmOStringStream tw; + this->AddRPathCheckRule(tw, indent.Next(), config, toDestDirPath); + std::string tws = tw.str(); + + // Add the rules, if any. + if(!tws.empty()) + { + os << indent << "IF(EXISTS \"" << toDestDirPath << "\")\n"; + os << tws; + os << indent << "ENDIF(EXISTS \"" << toDestDirPath << "\")\n"; + } + } + + // Write code to install the target file. + const char* no_dir_permissions = 0; + const char* no_rename = 0; + const char* no_properties = 0; + bool optional = this->Optional || this->ImportLibrary; + this->AddInstallRule(os, type, files, + optional, no_properties, + this->FilePermissions.c_str(), no_dir_permissions, + no_rename, literal_args.c_str(), + indent); + + // Add post-installation tweaks. + if(tweakInstalledFile) + { + // Collect tweaking rules. + cmOStringStream tw; + this->AddInstallNamePatchRule(tw, indent.Next(), config, toDestDirPath); + this->AddChrpathPatchRule(tw, indent.Next(), config, toDestDirPath); + this->AddRanlibRule(tw, indent.Next(), type, toDestDirPath); + this->AddStripRule(tw, indent.Next(), type, toDestDirPath); + std::string tws = tw.str(); + + // Add the rules, if any. + if(!tws.empty()) + { + os << indent << "IF(EXISTS \"" << toDestDirPath << "\")\n"; + os << tws; + os << indent << "ENDIF(EXISTS \"" << toDestDirPath << "\")\n"; + } + } +} + +//---------------------------------------------------------------------------- +std::string +cmInstallTargetGenerator::GetInstallFilename(const char* config) const +{ + NameType nameType = this->ImportLibrary? NameImplib : NameNormal; + return + cmInstallTargetGenerator::GetInstallFilename(this->Target, config, + nameType); +} + +//---------------------------------------------------------------------------- +std::string cmInstallTargetGenerator::GetInstallFilename(cmTarget* target, + const char* config, + NameType nameType) +{ + std::string fname; + // Compute the name of the library. + if(target->GetType() == cmTarget::EXECUTABLE) + { + std::string targetName; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + target->GetExecutableNames(targetName, targetNameReal, + targetNameImport, targetNamePDB, + config); + if(nameType == NameImplib) + { + // Use the import library name. + fname = targetNameImport; + } + else if(nameType == NameReal) + { + // Use the canonical name. + fname = targetNameReal; + } + else + { + // Use the canonical name. + fname = targetName; + } + } + else + { + std::string targetName; + std::string targetNameSO; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + target->GetLibraryNames(targetName, targetNameSO, targetNameReal, + targetNameImport, targetNamePDB, config); + if(nameType == NameImplib) + { + // Use the import library name. + fname = targetNameImport; + } + else if(nameType == NameSO) + { + // Use the soname. + fname = targetNameSO; + } + else if(nameType == NameReal) + { + // Use the real name. + fname = targetNameReal; + } + else + { + // Use the canonical name. + fname = targetName; + } + } + + return fname; +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator +::AddInstallNamePatchRule(std::ostream& os, Indent const& indent, + const char* config, std::string const& toDestDirPath) +{ + if(this->ImportLibrary || + !(this->Target->GetType() == cmTarget::SHARED_LIBRARY || + this->Target->GetType() == cmTarget::MODULE_LIBRARY || + this->Target->GetType() == cmTarget::EXECUTABLE)) + { + return; + } + + // Fix the install_name settings in installed binaries. + std::string installNameTool = + this->Target->GetMakefile()->GetSafeDefinition("CMAKE_INSTALL_NAME_TOOL"); + + if(!installNameTool.size()) + { + return; + } + + // Build a map of build-tree install_name to install-tree install_name for + // shared libraries linked to this target. + std::map install_name_remap; + if(cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config)) + { + std::set const& sharedLibs = cli->GetSharedLibrariesLinked(); + for(std::set::const_iterator j = sharedLibs.begin(); + j != sharedLibs.end(); ++j) + { + // If the build tree and install tree use different path + // components of the install_name field then we need to create a + // mapping to be applied after installation. + cmTarget* tgt = *j; + std::string for_build = tgt->GetInstallNameDirForBuildTree(config); + std::string for_install = tgt->GetInstallNameDirForInstallTree(config); + if(for_build != for_install) + { + // The directory portions differ. Append the filename to + // create the mapping. + std::string fname = + this->GetInstallFilename(tgt, config, NameSO); + + // Map from the build-tree install_name. + for_build += fname; + + // Map to the install-tree install_name. + for_install += fname; + + // Store the mapping entry. + install_name_remap[for_build] = for_install; + } + } + } + + // Edit the install_name of the target itself if necessary. + std::string new_id; + if(this->Target->GetType() == cmTarget::SHARED_LIBRARY) + { + std::string for_build = + this->Target->GetInstallNameDirForBuildTree(config); + std::string for_install = + this->Target->GetInstallNameDirForInstallTree(config); + + if(this->Target->IsFrameworkOnApple() && for_install.empty()) + { + // Frameworks seem to have an id corresponding to their own full + // path. + // ... + // for_install = fullDestPath_without_DESTDIR_or_name; + } + + // If the install name will change on installation set the new id + // on the installed file. + if(for_build != for_install) + { + // Prepare to refer to the install-tree install_name. + new_id = for_install; + new_id += this->GetInstallFilename(this->Target, config, NameSO); + } + } + + // Write a rule to run install_name_tool to set the install-tree + // install_name value and references. + if(!new_id.empty() || !install_name_remap.empty()) + { + os << indent << "EXECUTE_PROCESS(COMMAND \"" << installNameTool; + os << "\""; + if(!new_id.empty()) + { + os << "\n" << indent << " -id \"" << new_id << "\""; + } + for(std::map::const_iterator + i = install_name_remap.begin(); + i != install_name_remap.end(); ++i) + { + os << "\n" << indent << " -change \"" + << i->first << "\" \"" << i->second << "\""; + } + os << "\n" << indent << " \"" << toDestDirPath << "\")\n"; + } +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator +::AddRPathCheckRule(std::ostream& os, Indent const& indent, + const char* config, std::string const& toDestDirPath) +{ + // Skip the chrpath if the target does not need it. + if(this->ImportLibrary || !this->Target->IsChrpathUsed()) + { + return; + } + + // Get the link information for this target. + // It can provide the RPATH. + cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config); + if(!cli) + { + return; + } + + // Get the install RPATH from the link information. + std::string newRpath = cli->GetChrpathString(); + + // Write a rule to remove the installed file if its rpath is not the + // new rpath. This is needed for existing build/install trees when + // the installed rpath changes but the file is not rebuilt. + os << indent << "FILE(RPATH_CHECK\n" + << indent << " FILE \"" << toDestDirPath << "\"\n" + << indent << " RPATH \"" << newRpath << "\")\n"; +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator +::AddChrpathPatchRule(std::ostream& os, Indent const& indent, + const char* config, std::string const& toDestDirPath) +{ + // Skip the chrpath if the target does not need it. + if(this->ImportLibrary || !this->Target->IsChrpathUsed()) + { + return; + } + + // Get the link information for this target. + // It can provide the RPATH. + cmComputeLinkInformation* cli = this->Target->GetLinkInformation(config); + if(!cli) + { + return; + } + + // Construct the original rpath string to be replaced. + std::string oldRpath = cli->GetRPathString(false); + + // Get the install RPATH from the link information. + std::string newRpath = cli->GetChrpathString(); + + // Skip the rule if the paths are identical + if(oldRpath == newRpath) + { + return; + } + + // Write a rule to run chrpath to set the install-tree RPATH + if(newRpath.empty()) + { + os << indent << "FILE(RPATH_REMOVE\n" + << indent << " FILE \"" << toDestDirPath << "\")\n"; + } + else + { + os << indent << "FILE(RPATH_CHANGE\n" + << indent << " FILE \"" << toDestDirPath << "\"\n" + << indent << " OLD_RPATH \"" << oldRpath << "\"\n" + << indent << " NEW_RPATH \"" << newRpath << "\")\n"; + } +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator::AddStripRule(std::ostream& os, + Indent const& indent, + cmTarget::TargetType type, + const std::string& toDestDirPath) +{ + + // don't strip static libraries, because it removes the only symbol table + // they have so you can't link to them anymore + if(type == cmTarget::STATIC_LIBRARY) + { + return; + } + + // Don't handle OSX Bundles. + if(this->Target->GetMakefile()->IsOn("APPLE") && + this->Target->GetPropertyAsBool("MACOSX_BUNDLE")) + { + return; + } + + if(! this->Target->GetMakefile()->IsSet("CMAKE_STRIP")) + { + return; + } + + os << indent << "IF(CMAKE_INSTALL_DO_STRIP)\n"; + os << indent << " EXECUTE_PROCESS(COMMAND \"" + << this->Target->GetMakefile()->GetDefinition("CMAKE_STRIP") + << "\" \"" << toDestDirPath << "\")\n"; + os << indent << "ENDIF(CMAKE_INSTALL_DO_STRIP)\n"; +} + +//---------------------------------------------------------------------------- +void +cmInstallTargetGenerator::AddRanlibRule(std::ostream& os, + Indent const& indent, + cmTarget::TargetType type, + const std::string& toDestDirPath) +{ + // Static libraries need ranlib on this platform. + if(type != cmTarget::STATIC_LIBRARY) + { + return; + } + + // Perform post-installation processing on the file depending + // on its type. + if(!this->Target->GetMakefile()->IsOn("APPLE")) + { + return; + } + + std::string ranlib = + this->Target->GetMakefile()->GetRequiredDefinition("CMAKE_RANLIB"); + if(ranlib.empty()) + { + return; + } + + os << indent << "EXECUTE_PROCESS(COMMAND \"" + << ranlib << "\" \"" << toDestDirPath << "\")\n"; +} diff --git a/Source/cmInstallTargetGenerator.h b/Source/cmInstallTargetGenerator.h new file mode 100644 index 000000000..a6e89b277 --- /dev/null +++ b/Source/cmInstallTargetGenerator.h @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallTargetGenerator.h,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:52 $ + Version: $Revision: 1.24.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallTargetGenerator_h +#define cmInstallTargetGenerator_h + +#include "cmInstallGenerator.h" +#include "cmTarget.h" + +/** \class cmInstallTargetGenerator + * \brief Generate target installation rules. + */ +class cmInstallTargetGenerator: public cmInstallGenerator +{ +public: + cmInstallTargetGenerator( + cmTarget& t, const char* dest, bool implib, + const char* file_permissions = "", + std::vector const& configurations + = std::vector(), + const char* component = "", + bool optional = false + ); + virtual ~cmInstallTargetGenerator(); + + /** Select the policy for installing shared library linkable name + symlinks. */ + enum NamelinkModeType + { + NamelinkModeNone, + NamelinkModeOnly, + NamelinkModeSkip + }; + void SetNamelinkMode(NamelinkModeType mode) { this->NamelinkMode = mode; } + NamelinkModeType GetNamelinkMode() const { return this->NamelinkMode; } + + std::string GetInstallFilename(const char* config) const; + + enum NameType + { + NameNormal, + NameImplib, + NameSO, + NameReal + }; + + static std::string GetInstallFilename(cmTarget*target, const char* config, + NameType nameType = NameNormal); + + cmTarget* GetTarget() const { return this->Target; } + bool IsImportLibrary() const { return this->ImportLibrary; } + +protected: + typedef cmInstallGeneratorIndent Indent; + virtual void GenerateScript(std::ostream& os); + void GenerateScriptForConfig(std::ostream& os, + const char* fromDir, + const char* config, + Indent const& indent); + void GenerateScriptForConfigDir(std::ostream& os, + const char* fromDirConfig, + const char* config, + Indent const& indent); + void AddInstallNamePatchRule(std::ostream& os, Indent const& indent, + const char* config, + const std::string& toDestDirPath); + void AddChrpathPatchRule(std::ostream& os, Indent const& indent, + const char* config, + std::string const& toDestDirPath); + void AddRPathCheckRule(std::ostream& os, Indent const& indent, + const char* config, + std::string const& toDestDirPath); + + void AddStripRule(std::ostream& os, Indent const& indent, + cmTarget::TargetType type, + const std::string& toDestDirPath); + void AddRanlibRule(std::ostream& os, Indent const& indent, + cmTarget::TargetType type, + const std::string& toDestDirPath); + + cmTarget* Target; + bool ImportLibrary; + std::string FilePermissions; + bool Optional; + NamelinkModeType NamelinkMode; +}; + +#endif diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx new file mode 100644 index 000000000..911fe11c7 --- /dev/null +++ b/Source/cmInstallTargetsCommand.cxx @@ -0,0 +1,67 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallTargetsCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmInstallTargetsCommand.h" + +// cmExecutableCommand +bool cmInstallTargetsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Enable the install target. + this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->EnableInstallTarget(); + + cmTargets &tgts = this->Makefile->GetTargets(); + std::vector::const_iterator s = args.begin(); + ++s; + std::string runtime_dir = "/bin"; + for (;s != args.end(); ++s) + { + if (*s == "RUNTIME_DIRECTORY") + { + ++s; + if ( s == args.end() ) + { + this->SetError("called with RUNTIME_DIRECTORY but no actual " + "directory"); + return false; + } + + runtime_dir = *s; + } + else if (tgts.find(*s) != tgts.end()) + { + tgts[*s].SetInstallPath(args[0].c_str()); + tgts[*s].SetRuntimeInstallPath(runtime_dir.c_str()); + tgts[*s].SetHaveInstallRule(true); + } + else + { + std::string str = "Cannot find target: \"" + *s + "\" to install."; + this->SetError(str.c_str()); + return false; + } + } + + return true; +} + diff --git a/Source/cmInstallTargetsCommand.h b/Source/cmInstallTargetsCommand.h new file mode 100644 index 000000000..3242b8cbe --- /dev/null +++ b/Source/cmInstallTargetsCommand.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmInstallTargetsCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmInstallTargetsCommand_h +#define cmInstallTargetsCommand_h + +#include "cmCommand.h" + +/** \class cmInstallTargetsCommand + * \brief Specifies where to install some targets + * + * cmInstallTargetsCommand specifies the relative path where a list of + * targets should be installed. The targets can be executables or + * libraries. + */ +class cmInstallTargetsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmInstallTargetsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "install_targets";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the install(TARGETS ) command instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "This command has been superceded by the install command. It " + "is provided for compatibility with older CMake code.\n" + " install_targets( [RUNTIME_DIRECTORY dir] target target)\n" + "Create rules to install the listed targets into the given directory. " + "The directory is relative to the installation prefix, which " + "is stored in the variable CMAKE_INSTALL_PREFIX. If RUNTIME_DIRECTORY " + "is specified, then on systems with special runtime files " + "(Windows DLL), the files will be copied to that directory."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmInstallTargetsCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmLinkDirectoriesCommand.cxx b/Source/cmLinkDirectoriesCommand.cxx new file mode 100644 index 000000000..a00b00f97 --- /dev/null +++ b/Source/cmLinkDirectoriesCommand.cxx @@ -0,0 +1,37 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLinkDirectoriesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLinkDirectoriesCommand.h" + +// cmLinkDirectoriesCommand +bool cmLinkDirectoriesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + return true; + } + + for(std::vector::const_iterator i = args.begin(); + i != args.end(); ++i) + { + std::string unixPath = *i; + cmSystemTools::ConvertToUnixSlashes(unixPath); + this->Makefile->AddLinkDirectory(unixPath.c_str()); + } + return true; +} + diff --git a/Source/cmLinkDirectoriesCommand.h b/Source/cmLinkDirectoriesCommand.h new file mode 100644 index 000000000..d95882b00 --- /dev/null +++ b/Source/cmLinkDirectoriesCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLinkDirectoriesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLinkDirectoriesCommand_h +#define cmLinkDirectoriesCommand_h + +#include "cmCommand.h" + +/** \class cmLinkDirectoriesCommand + * \brief Define a list of directories containing files to link. + * + * cmLinkDirectoriesCommand is used to specify a list + * of directories containing files to link into executable(s). + * Note that the command supports the use of CMake built-in variables + * such as CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR. + */ +class cmLinkDirectoriesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmLinkDirectoriesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "link_directories";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Specify directories in which the linker will look for libraries."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " link_directories(directory1 directory2 ...)\n" + "Specify the paths in which the linker should search for libraries. " + "The command will apply only to targets created after it is called."; + } + + cmTypeMacro(cmLinkDirectoriesCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmLinkLibrariesCommand.cxx b/Source/cmLinkLibrariesCommand.cxx new file mode 100644 index 000000000..f12541950 --- /dev/null +++ b/Source/cmLinkLibrariesCommand.cxx @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLinkLibrariesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLinkLibrariesCommand.h" + +// cmLinkLibrariesCommand +bool cmLinkLibrariesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + return true; + } + // add libraries, nothe that there is an optional prefix + // of debug and optimized than can be used + for(std::vector::const_iterator i = args.begin(); + i != args.end(); ++i) + { + if (*i == "debug") + { + ++i; + if(i == args.end()) + { + this->SetError("The \"debug\" argument must be followed by " + "a library"); + return false; + } + this->Makefile->AddLinkLibrary(i->c_str(), + cmTarget::DEBUG); + } + else if (*i == "optimized") + { + ++i; + if(i == args.end()) + { + this->SetError("The \"optimized\" argument must be followed by " + "a library"); + return false; + } + this->Makefile->AddLinkLibrary(i->c_str(), + cmTarget::OPTIMIZED); + } + else + { + this->Makefile->AddLinkLibrary(i->c_str()); + } + } + + return true; +} + diff --git a/Source/cmLinkLibrariesCommand.h b/Source/cmLinkLibrariesCommand.h new file mode 100644 index 000000000..3641b7995 --- /dev/null +++ b/Source/cmLinkLibrariesCommand.h @@ -0,0 +1,88 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLinkLibrariesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLinkLibrariesCommand_h +#define cmLinkLibrariesCommand_h + +#include "cmCommand.h" + +/** \class cmLinkLibrariesCommand + * \brief Specify a list of libraries to link into executables. + * + * cmLinkLibrariesCommand is used to specify a list of libraries to link + * into executable(s) or shared objects. The names of the libraries + * should be those defined by the LIBRARY(library) command(s). + */ +class cmLinkLibrariesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmLinkLibrariesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "link_libraries";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the target_link_libraries() command instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + "Link libraries to all targets added later.\n" + " link_libraries(library1 library2 ...)\n" + "Specify a list of libraries to be linked into " + "any following targets (typically added with the add_executable " + "or add_library calls). This command is passed " + "down to all subdirectories. " + "The debug and optimized strings may be used to indicate that " + "the next library listed is to be used only for that specific " + "type of build."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmLinkLibrariesCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx new file mode 100644 index 000000000..988cd358d --- /dev/null +++ b/Source/cmListCommand.cxx @@ -0,0 +1,626 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-04-23 16:14:33 $ + Version: $Revision: 1.18.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmListCommand.h" +#include +#include + +#include // required for atoi +#include +//---------------------------------------------------------------------------- +bool cmListCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("must be called with at least one argument."); + return false; + } + + const std::string &subCommand = args[0]; + if(subCommand == "LENGTH") + { + return this->HandleLengthCommand(args); + } + if(subCommand == "GET") + { + return this->HandleGetCommand(args); + } + if(subCommand == "APPEND") + { + return this->HandleAppendCommand(args); + } + if(subCommand == "FIND") + { + return this->HandleFindCommand(args); + } + if(subCommand == "INSERT") + { + return this->HandleInsertCommand(args); + } + if(subCommand == "REMOVE_AT") + { + return this->HandleRemoveAtCommand(args); + } + if(subCommand == "REMOVE_ITEM") + { + return this->HandleRemoveItemCommand(args); + } + if(subCommand == "REMOVE_DUPLICATES") + { + return this->HandleRemoveDuplicatesCommand(args); + } + if(subCommand == "SORT") + { + return this->HandleSortCommand(args); + } + if(subCommand == "REVERSE") + { + return this->HandleReverseCommand(args); + } + + std::string e = "does not recognize sub-command "+subCommand; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::GetListString(std::string& listString, const char* var) +{ + if ( !var ) + { + return false; + } + // get the old value + const char* cacheValue + = this->Makefile->GetDefinition(var); + if(!cacheValue) + { + return false; + } + listString = cacheValue; + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::GetList(std::vector& list, const char* var) +{ + std::string listString; + if ( !this->GetListString(listString, var) ) + { + return false; + } + // if the size of the list + if(listString.size() == 0) + { + return true; + } + // expand the variable into a list + cmSystemTools::ExpandListArgument(listString, list, true); + // check the list for empty values + bool hasEmpty = false; + for(std::vector::iterator i = list.begin(); + i != list.end(); ++i) + { + if(i->size() == 0) + { + hasEmpty = true; + break; + } + } + // if no empty elements then just return + if(!hasEmpty) + { + return true; + } + // if we have empty elements we need to check policy CMP0007 + switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0007)) + { + case cmPolicies::WARN: + { + // Default is to warn and use old behavior + // OLD behavior is to allow compatibility, so recall + // ExpandListArgument without the true which will remove + // empty values + list.clear(); + cmSystemTools::ExpandListArgument(listString, list); + std::string warn = this->Makefile->GetPolicies()-> + GetPolicyWarning(cmPolicies::CMP0007); + warn += " List has value = ["; + warn += listString; + warn += "]."; + this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, + warn); + return true; + } + case cmPolicies::OLD: + // OLD behavior is to allow compatibility, so recall + // ExpandListArgument without the true which will remove + // empty values + list.clear(); + cmSystemTools::ExpandListArgument(listString, list); + return true; + case cmPolicies::NEW: + return true; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + this->Makefile->IssueMessage( + cmake::FATAL_ERROR, + this->Makefile->GetPolicies() + ->GetRequiredPolicyError(cmPolicies::CMP0007) + ); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleLengthCommand(std::vector const& args) +{ + if(args.size() != 3) + { + this->SetError("sub-command LENGTH requires two arguments."); + return false; + } + + const std::string& listName = args[1]; + const std::string& variableName = args[args.size() - 1]; + std::vector varArgsExpanded; + // do not check the return value here + // if the list var is not found varArgsExpanded will have size 0 + // and we will return 0 + this->GetList(varArgsExpanded, listName.c_str()); + size_t length = varArgsExpanded.size(); + char buffer[1024]; + sprintf(buffer, "%d", static_cast(length)); + + this->Makefile->AddDefinition(variableName.c_str(), buffer); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleGetCommand(std::vector const& args) +{ + if(args.size() < 4) + { + this->SetError("sub-command GET requires at least three arguments."); + return false; + } + + const std::string& listName = args[1]; + const std::string& variableName = args[args.size() - 1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->Makefile->AddDefinition(variableName.c_str(), "NOTFOUND"); + return true; + } + + std::string value; + size_t cc; + for ( cc = 2; cc < args.size()-1; cc ++ ) + { + int item = atoi(args[cc].c_str()); + if (value.size()) + { + value += ";"; + } + size_t nitem = varArgsExpanded.size(); + if ( item < 0 ) + { + item = (int)nitem + item; + } + if ( item < 0 || nitem <= (size_t)item ) + { + cmOStringStream str; + str << "index: " << item << " out of range (-" + << varArgsExpanded.size() << ", " + << varArgsExpanded.size()-1 << ")"; + this->SetError(str.str().c_str()); + return false; + } + value += varArgsExpanded[item]; + } + + this->Makefile->AddDefinition(variableName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleAppendCommand(std::vector const& args) +{ + if(args.size() < 2) + { + this->SetError("sub-command APPEND requires at least one argument."); + return false; + } + + // Skip if nothing to append. + if(args.size() < 3) + { + return true; + } + + const std::string& listName = args[1]; + // expand the variable + std::string listString; + this->GetListString(listString, listName.c_str()); + size_t cc; + for ( cc = 2; cc < args.size(); ++ cc ) + { + if ( listString.size() ) + { + listString += ";"; + } + listString += args[cc]; + } + + this->Makefile->AddDefinition(listName.c_str(), listString.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleFindCommand(std::vector const& args) +{ + if(args.size() != 4) + { + this->SetError("sub-command FIND requires three arguments."); + return false; + } + + const std::string& listName = args[1]; + const std::string& variableName = args[args.size() - 1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->Makefile->AddDefinition(variableName.c_str(), "-1"); + return true; + } + + std::vector::iterator it; + unsigned int index = 0; + for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it ) + { + if ( *it == args[2] ) + { + char indexString[32]; + sprintf(indexString, "%d", index); + this->Makefile->AddDefinition(variableName.c_str(), indexString); + return true; + } + index++; + } + + this->Makefile->AddDefinition(variableName.c_str(), "-1"); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleInsertCommand(std::vector const& args) +{ + if(args.size() < 4) + { + this->SetError("sub-command INSERT requires at least three arguments."); + return false; + } + + const std::string& listName = args[1]; + + // expand the variable + int item = atoi(args[2].c_str()); + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) && item != 0) + { + cmOStringStream str; + str << "index: " << item << " out of range (0, 0)"; + this->SetError(str.str().c_str()); + return false; + } + + if ( varArgsExpanded.size() != 0 ) + { + size_t nitem = varArgsExpanded.size(); + if ( item < 0 ) + { + item = (int)nitem + item; + } + if ( item < 0 || nitem <= (size_t)item ) + { + cmOStringStream str; + str << "index: " << item << " out of range (-" + << varArgsExpanded.size() << ", " + << (varArgsExpanded.size() == 0?0:(varArgsExpanded.size()-1)) << ")"; + this->SetError(str.str().c_str()); + return false; + } + } + size_t cc; + size_t cnt = 0; + for ( cc = 3; cc < args.size(); ++ cc ) + { + varArgsExpanded.insert(varArgsExpanded.begin()+item+cnt, args[cc]); + cnt ++; + } + + std::string value; + for ( cc = 0; cc < varArgsExpanded.size(); cc ++ ) + { + if (value.size()) + { + value += ";"; + } + value += varArgsExpanded[cc]; + } + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand +::HandleRemoveItemCommand(std::vector const& args) +{ + if(args.size() < 3) + { + this->SetError("sub-command REMOVE_ITEM requires two or more arguments."); + return false; + } + + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->SetError("sub-command REMOVE_ITEM requires list to be present."); + return false; + } + + size_t cc; + for ( cc = 2; cc < args.size(); ++ cc ) + { + size_t kk = 0; + while ( kk < varArgsExpanded.size() ) + { + if ( varArgsExpanded[kk] == args[cc] ) + { + varArgsExpanded.erase(varArgsExpanded.begin()+kk); + } + else + { + kk ++; + } + } + } + + std::string value; + for ( cc = 0; cc < varArgsExpanded.size(); cc ++ ) + { + if (value.size()) + { + value += ";"; + } + value += varArgsExpanded[cc]; + } + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand +::HandleReverseCommand(std::vector const& args) +{ + if(args.size() < 2) + { + this->SetError("sub-command REVERSE requires a list as an argument."); + return false; + } + + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->SetError("sub-command REVERSE requires list to be present."); + return false; + } + + std::string value; + std::vector::reverse_iterator it; + for ( it = varArgsExpanded.rbegin(); it != varArgsExpanded.rend(); ++ it ) + { + if (value.size()) + { + value += ";"; + } + value += it->c_str(); + } + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand +::HandleRemoveDuplicatesCommand(std::vector const& args) +{ + if(args.size() < 2) + { + this->SetError( + "sub-command REMOVE_DUPLICATES requires a list as an argument."); + return false; + } + + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->SetError( + "sub-command REMOVE_DUPLICATES requires list to be present."); + return false; + } + + std::string value; + +#if 0 + // Fast version, but does not keep the ordering + + std::set unique(varArgsExpanded.begin(), varArgsExpanded.end()); + std::set::iterator it; + for ( it = unique.begin(); it != unique.end(); ++ it ) + { + if (value.size()) + { + value += ";"; + } + value += it->c_str(); + } + +#else + + // Slower version, keep the ordering + + std::set unique; + std::vector::iterator it; + for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it ) + { + if (unique.find(*it) != unique.end()) + { + continue; + } + unique.insert(*it); + + if (value.size()) + { + value += ";"; + } + value += it->c_str(); + } +#endif + + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand +::HandleSortCommand(std::vector const& args) +{ + if(args.size() < 2) + { + this->SetError("sub-command SORT requires a list as an argument."); + return false; + } + + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->SetError("sub-command SORT requires list to be present."); + return false; + } + + std::sort(varArgsExpanded.begin(), varArgsExpanded.end()); + + std::string value; + std::vector::iterator it; + for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it ) + { + if (value.size()) + { + value += ";"; + } + value += it->c_str(); + } + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmListCommand::HandleRemoveAtCommand( + std::vector const& args) +{ + if(args.size() < 3) + { + this->SetError("sub-command REMOVE_AT requires at least " + "two arguments."); + return false; + } + + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if ( !this->GetList(varArgsExpanded, listName.c_str()) ) + { + this->SetError("sub-command REMOVE_AT requires list to be present."); + return false; + } + + size_t cc; + std::vector removed; + for ( cc = 2; cc < args.size(); ++ cc ) + { + int item = atoi(args[cc].c_str()); + size_t nitem = varArgsExpanded.size(); + if ( item < 0 ) + { + item = (int)nitem + item; + } + if ( item < 0 || nitem <= (size_t)item ) + { + cmOStringStream str; + str << "index: " << item << " out of range (-" + << varArgsExpanded.size() << ", " + << varArgsExpanded.size()-1 << ")"; + this->SetError(str.str().c_str()); + return false; + } + removed.push_back(static_cast(item)); + } + + std::string value; + for ( cc = 0; cc < varArgsExpanded.size(); ++ cc ) + { + size_t kk; + bool found = false; + for ( kk = 0; kk < removed.size(); ++ kk ) + { + if ( cc == removed[kk] ) + { + found = true; + } + } + + if ( !found ) + { + if (value.size()) + { + value += ";"; + } + value += varArgsExpanded[cc]; + } + } + + this->Makefile->AddDefinition(listName.c_str(), value.c_str()); + return true; +} + diff --git a/Source/cmListCommand.h b/Source/cmListCommand.h new file mode 100644 index 000000000..dd37f77cd --- /dev/null +++ b/Source/cmListCommand.h @@ -0,0 +1,125 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListCommand.h,v $ + Language: C++ + Date: $Date: 2008-03-12 21:02:10 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmListCommand_h +#define cmListCommand_h + +#include "cmCommand.h" + +/** \class cmListCommand + * \brief Common list operations + * + */ +class cmListCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmListCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "list";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "List operations."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " list(LENGTH )\n" + " list(GET [ ...] " + ")\n" + " list(APPEND [ ...])\n" + " list(FIND )\n" + " list(INSERT [ ...])\n" + " list(REMOVE_ITEM [ ...])\n" + " list(REMOVE_AT [ ...])\n" + " list(REMOVE_DUPLICATES )\n" + " list(REVERSE )\n" + " list(SORT )\n" + "LENGTH will return a given list's length.\n" + "GET will return list of elements specified by indices from the list.\n" + "APPEND will append elements to the list.\n" + "FIND will return the index of the element specified in the list or -1 " + "if it wasn't found.\n" + "INSERT will insert elements to the list to the specified location.\n" + "REMOVE_AT and REMOVE_ITEM will remove items from the list. The " + "difference is that REMOVE_ITEM will remove the given items, while " + "REMOVE_AT will remove the items at the given indices.\n" + "REMOVE_DUPLICATES will remove duplicated items in the list.\n" + "REVERSE reverses the contents of the list in-place.\n" + "SORT sorts the list in-place alphabetically.\n" + "NOTES: A list in cmake is a ; separated group of strings. " + "To create a list the set command can be used. For example, " + "set(var a b c d e) creates a list with a;b;c;d;e, and " + "set(var \"a b c d e\") creates a string or a list with one " + "item in it.\n" + "When specifying index values, if is 0 or" + " greater, it is indexed from the " + "beginning of the list, with 0 representing the first list element. " + "If is -1 or lesser, it is indexed from the end of " + "the list, with -1 representing the last list element. Be careful " + "when counting with negative indices: they do not start from 0. " + "-0 is equivalent to 0, the first list element.\n" + ; + } + + cmTypeMacro(cmListCommand, cmCommand); +protected: + bool HandleLengthCommand(std::vector const& args); + bool HandleGetCommand(std::vector const& args); + bool HandleAppendCommand(std::vector const& args); + bool HandleFindCommand(std::vector const& args); + bool HandleInsertCommand(std::vector const& args); + bool HandleRemoveAtCommand(std::vector const& args); + bool HandleRemoveItemCommand(std::vector const& args); + bool HandleRemoveDuplicatesCommand(std::vector const& args); + bool HandleSortCommand(std::vector const& args); + bool HandleReverseCommand(std::vector const& args); + + + bool GetList(std::vector& list, const char* var); + bool GetListString(std::string& listString, const char* var); +}; + + +#endif diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx new file mode 100644 index 000000000..675dfd65b --- /dev/null +++ b/Source/cmListFileCache.cxx @@ -0,0 +1,304 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListFileCache.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.41.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmListFileCache.h" + +#include "cmListFileLexer.h" +#include "cmSystemTools.h" +#include "cmMakefile.h" +#include "cmVersion.h" + +#include + +#ifdef __BORLANDC__ +# pragma warn -8060 /* possibly incorrect assignment */ +#endif + +bool cmListFileCacheParseFunction(cmListFileLexer* lexer, + cmListFileFunction& function, + const char* filename); + +bool cmListFile::ParseFile(const char* filename, + bool topLevel, + cmMakefile *mf) +{ + if(!cmSystemTools::FileExists(filename)) + { + return false; + } + + // Create the scanner. + cmListFileLexer* lexer = cmListFileLexer_New(); + if(!lexer) + { + cmSystemTools::Error("cmListFileCache: error allocating lexer "); + return false; + } + + // Open the file. + if(!cmListFileLexer_SetFileName(lexer, filename)) + { + cmListFileLexer_Delete(lexer); + cmSystemTools::Error("cmListFileCache: error can not open file ", + filename); + return false; + } + + // Use a simple recursive-descent parser to process the token + // stream. + this->ModifiedTime = cmSystemTools::ModifiedTime(filename); + bool parseError = false; + bool haveNewline = true; + cmListFileLexer_Token* token; + while(!parseError && (token = cmListFileLexer_Scan(lexer))) + { + if(token->type == cmListFileLexer_Token_Newline) + { + haveNewline = true; + } + else if(token->type == cmListFileLexer_Token_Identifier) + { + if(haveNewline) + { + haveNewline = false; + cmListFileFunction inFunction; + inFunction.Name = token->text; + inFunction.FilePath = filename; + inFunction.Line = token->line; + if(cmListFileCacheParseFunction(lexer, inFunction, filename)) + { + this->Functions.push_back(inFunction); + } + else + { + parseError = true; + } + } + else + { + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << token->line << ":\n" + << "Parse error. Expected a newline, got " + << cmListFileLexer_GetTypeAsString(lexer, token->type) + << " with text \"" << token->text << "\"."; + cmSystemTools::Error(error.str().c_str()); + parseError = true; + } + } + else + { + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << token->line << ":\n" + << "Parse error. Expected a command name, got " + << cmListFileLexer_GetTypeAsString(lexer, token->type) + << " with text \"" + << token->text << "\"."; + cmSystemTools::Error(error.str().c_str()); + parseError = true; + } + } + if (parseError) + { + this->ModifiedTime = 0; + } + + cmListFileLexer_Delete(lexer); + + // do we need a cmake_policy(VERSION call? + if(topLevel) + { + bool hasVersion = false; + // search for the right policy command + for(std::vector::iterator i + = this->Functions.begin(); + i != this->Functions.end(); ++i) + { + if (cmSystemTools::LowerCase(i->Name) == "cmake_minimum_required") + { + hasVersion = true; + break; + } + } + // if no policy command is found this is an error if they use any + // non advanced functions or a lot of functions + if(!hasVersion) + { + bool isProblem = true; + if (this->Functions.size() < 30) + { + // the list of simple commands DO NOT ADD TO THIS LIST!!!!! + // these commands must have backwards compatibility forever and + // and that is a lot longer than your tiny mind can comprehend mortal + std::set allowedCommands; + allowedCommands.insert("project"); + allowedCommands.insert("set"); + allowedCommands.insert("if"); + allowedCommands.insert("endif"); + allowedCommands.insert("else"); + allowedCommands.insert("elseif"); + allowedCommands.insert("add_executable"); + allowedCommands.insert("add_library"); + allowedCommands.insert("target_link_libraries"); + allowedCommands.insert("option"); + allowedCommands.insert("message"); + isProblem = false; + for(std::vector::iterator i + = this->Functions.begin(); + i != this->Functions.end(); ++i) + { + std::string name = cmSystemTools::LowerCase(i->Name); + if (allowedCommands.find(name) == allowedCommands.end()) + { + isProblem = true; + break; + } + } + } + + if (isProblem) + { + // Tell the top level cmMakefile to diagnose + // this violation of CMP0000. + mf->SetCheckCMP0000(true); + + // Implicitly set the version for the user. + mf->SetPolicyVersion("2.4"); + } + } + } + + if(topLevel) + { + bool hasProject = false; + // search for a project command + for(std::vector::iterator i + = this->Functions.begin(); + i != this->Functions.end(); ++i) + { + if(cmSystemTools::LowerCase(i->Name) == "project") + { + hasProject = true; + break; + } + } + // if no project command is found, add one + if(!hasProject) + { + cmListFileFunction project; + project.Name = "PROJECT"; + cmListFileArgument prj("Project", false, filename, 0); + project.Arguments.push_back(prj); + this->Functions.insert(this->Functions.begin(),project); + } + } + if(parseError) + { + return false; + } + return true; +} + +bool cmListFileCacheParseFunction(cmListFileLexer* lexer, + cmListFileFunction& function, + const char* filename) +{ + // Command name has already been parsed. Read the left paren. + cmListFileLexer_Token* token; + if(!(token = cmListFileLexer_Scan(lexer))) + { + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n" + << "Parse error. Function missing opening \"(\"."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + if(token->type != cmListFileLexer_Token_ParenLeft) + { + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) << ":\n" + << "Parse error. Expected \"(\", got " + << cmListFileLexer_GetTypeAsString(lexer, token->type) + << " with text \"" << token->text << "\"."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + + // Arguments. + unsigned long lastLine = cmListFileLexer_GetCurrentLine(lexer); + while((token = cmListFileLexer_Scan(lexer))) + { + if(token->type == cmListFileLexer_Token_ParenRight) + { + return true; + } + else if(token->type == cmListFileLexer_Token_Identifier || + token->type == cmListFileLexer_Token_ArgumentUnquoted) + { + cmListFileArgument a(token->text, + false, filename, token->line); + function.Arguments.push_back(a); + } + else if(token->type == cmListFileLexer_Token_ArgumentQuoted) + { + cmListFileArgument a(token->text, + true, filename, token->line); + function.Arguments.push_back(a); + } + else if(token->type != cmListFileLexer_Token_Newline) + { + // Error. + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << cmListFileLexer_GetCurrentLine(lexer) + << ":\n" + << "Parse error. Function missing ending \")\". " + << "Instead found " + << cmListFileLexer_GetTypeAsString(lexer, token->type) + << " with text \"" << token->text << "\"."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + lastLine = cmListFileLexer_GetCurrentLine(lexer); + } + + cmOStringStream error; + error << "Error in cmake code at\n" + << filename << ":" << lastLine << ":\n" + << "Parse error. Function missing ending \")\". " + << "End of file reached."; + cmSystemTools::Error(error.str().c_str()); + + return false; +} + +//---------------------------------------------------------------------------- +std::ostream& operator<<(std::ostream& os, cmListFileContext const& lfc) +{ + os << lfc.FilePath; + if(lfc.Line) + { + os << ":" << lfc.Line; + if(!lfc.Name.empty()) + { + os << " (" << lfc.Name << ")"; + } + } + return os; +} diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h new file mode 100644 index 000000000..0472eb081 --- /dev/null +++ b/Source/cmListFileCache.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListFileCache.h,v $ + Language: C++ + Date: $Date: 2008-03-13 17:48:57 $ + Version: $Revision: 1.21 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmListFileCache_h +#define cmListFileCache_h + +#include "cmStandardIncludes.h" + +/** \class cmListFileCache + * \brief A class to cache list file contents. + * + * cmListFileCache is a class used to cache the contents of parsed + * cmake list files. + */ + +class cmMakefile; + +struct cmListFileArgument +{ + cmListFileArgument(): Value(), Quoted(false), FilePath(0), Line(0) {} + cmListFileArgument(const cmListFileArgument& r): + Value(r.Value), Quoted(r.Quoted), FilePath(r.FilePath), Line(r.Line) {} + cmListFileArgument(const std::string& v, bool q, const char* file, + long line): Value(v), Quoted(q), + FilePath(file), Line(line) {} + bool operator == (const cmListFileArgument& r) const + { + return (this->Value == r.Value) && (this->Quoted == r.Quoted); + } + bool operator != (const cmListFileArgument& r) const + { + return !(*this == r); + } + std::string Value; + bool Quoted; + const char* FilePath; + long Line; +}; + +struct cmListFileContext +{ + std::string Name; + std::string FilePath; + long Line; +}; + +std::ostream& operator<<(std::ostream&, cmListFileContext const&); + +struct cmListFileFunction: public cmListFileContext +{ + std::vector Arguments; +}; + +class cmListFileBacktrace: public std::vector {}; + +struct cmListFile +{ + cmListFile() + :ModifiedTime(0) + { + } + bool ParseFile(const char* path, + bool topLevel, + cmMakefile *mf); + + long int ModifiedTime; + std::vector Functions; +}; + +#endif diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c new file mode 100644 index 000000000..6f1091ec8 --- /dev/null +++ b/Source/cmListFileLexer.c @@ -0,0 +1,2321 @@ +#line 2 "cmListFileLexer.c" + +#line 4 "cmListFileLexer.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 31 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* An opaque pointer. */ +#ifndef YY_TYPEDEF_YY_SCANNER_T +#define YY_TYPEDEF_YY_SCANNER_T +typedef void* yyscan_t; +#endif + +/* For convenience, these vars (plus the bison vars far below) + are macros in the reentrant scanner. */ +#define yyin yyg->yyin_r +#define yyout yyg->yyout_r +#define yyextra yyg->yyextra_r +#define yyleng yyg->yyleng_r +#define yytext yyg->yytext_r +#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) +#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) +#define yy_flex_debug yyg->yy_flex_debug_r + +int cmListFileLexer_yylex_init (yyscan_t* scanner); + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yyg->yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yyg->yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE cmListFileLexer_yyrestart(yyin ,yyscanner ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires + * access to the local variable yy_act. Since yyless() is a macro, it would break + * existing scanners that call yyless() from OUTSIDE cmListFileLexer_yylex. + * One obvious solution it to make yy_act a global. I tried that, and saw + * a 5% performance hit in a non-yylineno scanner, because yy_act is + * normally declared as a register variable-- so it is not worth it. + */ + #define YY_LESS_LINENO(n) \ + do { \ + int yyl;\ + for ( yyl = n; yyl < yyleng; ++yyl )\ + if ( yytext[yyl] == '\n' )\ + --yylineno;\ + }while(0) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = yyg->yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } \ + while ( 0 ) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef unsigned int yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via cmListFileLexer_yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ + ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] + +void cmListFileLexer_yyrestart (FILE *input_file ,yyscan_t yyscanner ); +void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE *file,int size ,yyscan_t yyscanner ); +void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); +void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); +void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner ); + +static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner ); +static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner ); +static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); + +#define YY_FLUSH_BUFFER cmListFileLexer_yy_flush_buffer(YY_CURRENT_BUFFER ,yyscanner) + +YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); +YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); + +void *cmListFileLexer_yyalloc (yy_size_t ,yyscan_t yyscanner ); +void *cmListFileLexer_yyrealloc (void *,yy_size_t ,yyscan_t yyscanner ); +void cmListFileLexer_yyfree (void * ,yyscan_t yyscanner ); + +#define yy_new_buffer cmListFileLexer_yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + cmListFileLexer_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + cmListFileLexer_yyensure_buffer_stack (yyscanner); \ + YY_CURRENT_BUFFER_LVALUE = \ + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define cmListFileLexer_yywrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +typedef int yy_state_type; + +#define yytext_ptr yytext_r + +static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); +static int yy_get_next_buffer (yyscan_t yyscanner ); +static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yyg->yytext_ptr = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + yyg->yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yyg->yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 14 +#define YY_END_OF_BUFFER 15 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[39] = + { 0, + 0, 0, 0, 0, 15, 6, 12, 1, 7, 2, + 6, 3, 4, 6, 13, 8, 9, 10, 11, 6, + 0, 6, 0, 2, 0, 5, 6, 8, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 1, 5, 6, 7, 1, 1, 1, 8, + 9, 1, 1, 1, 1, 1, 1, 10, 10, 10, + 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, + 1, 1, 1, 1, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 1, 12, 1, 1, 11, 1, 11, 11, 11, 11, + + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, + 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +static yyconst flex_int32_t yy_meta[13] = + { 0, + 1, 1, 2, 1, 3, 1, 1, 1, 4, 4, + 4, 1 + } ; + +static yyconst flex_int16_t yy_base[48] = + { 0, + 0, 0, 10, 20, 34, 32, 89, 89, 89, 0, + 23, 89, 89, 35, 0, 18, 89, 89, 44, 0, + 49, 21, 0, 0, 19, 0, 0, 15, 59, 0, + 18, 0, 15, 12, 11, 10, 9, 89, 64, 68, + 72, 76, 80, 13, 84, 12, 10 + } ; + +static yyconst flex_int16_t yy_def[48] = + { 0, + 38, 1, 39, 39, 38, 38, 38, 38, 38, 40, + 6, 38, 38, 6, 41, 42, 38, 38, 42, 6, + 38, 6, 43, 40, 44, 14, 6, 42, 42, 21, + 21, 45, 46, 44, 47, 46, 47, 0, 38, 38, + 38, 38, 38, 38, 38, 38, 38 + } ; + +static yyconst flex_int16_t yy_nxt[102] = + { 0, + 6, 7, 8, 7, 9, 10, 11, 12, 13, 6, + 14, 15, 17, 37, 18, 36, 34, 30, 20, 30, + 27, 19, 17, 20, 18, 35, 29, 27, 33, 29, + 25, 19, 20, 38, 38, 38, 21, 38, 22, 38, + 38, 20, 20, 23, 26, 26, 28, 38, 28, 30, + 30, 38, 38, 20, 38, 31, 38, 38, 30, 30, + 32, 28, 38, 28, 16, 16, 16, 16, 24, 38, + 24, 24, 27, 38, 27, 27, 28, 38, 38, 28, + 20, 38, 20, 20, 30, 38, 30, 30, 5, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + + 38 + } ; + +static yyconst flex_int16_t yy_chk[102] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 3, 47, 3, 46, 44, 37, 36, 35, + 34, 3, 4, 33, 4, 31, 28, 25, 22, 16, + 11, 4, 6, 5, 0, 0, 6, 0, 6, 0, + 0, 6, 6, 6, 14, 14, 19, 0, 19, 21, + 21, 0, 0, 21, 0, 21, 0, 0, 21, 21, + 21, 29, 0, 29, 39, 39, 39, 39, 40, 0, + 40, 40, 41, 0, 41, 41, 42, 0, 0, 42, + 43, 0, 43, 43, 45, 0, 45, 45, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + + 38 + } ; + +/* Table of booleans, true if rule could match eol. */ +static yyconst flex_int32_t yy_rule_can_match_eol[15] = + { 0, +1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, }; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +#line 1 "cmListFileLexer.in.l" +#line 2 "cmListFileLexer.in.l" +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListFileLexer.c,v $ + Language: C++ + Date: $Date: 2006-08-09 13:45:04 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l + +Modify cmListFileLexer.c: + - remove TABs + - remove the yyunput function + - add a statement "(void)yyscanner;" to the top of these methods: + yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree + - remove all YY_BREAK lines occurring right after return statements + - remove the isatty forward declaration + +*/ + +#include "cmStandardLexer.h" + +/* Setup the proper cmListFileLexer_yylex declaration. */ +#define YY_EXTRA_TYPE cmListFileLexer* +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) + +#include "cmListFileLexer.h" + +/*--------------------------------------------------------------------------*/ +struct cmListFileLexer_s +{ + cmListFileLexer_Token token; + int line; + int column; + int size; + FILE* file; + char* string_buffer; + char* string_position; + int string_left; + yyscan_t scanner; +}; + +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length); +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length); +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize); +static void cmListFileLexerInit(cmListFileLexer* lexer); +static void cmListFileLexerDestroy(cmListFileLexer* lexer); + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } + +/*--------------------------------------------------------------------------*/ + +#line 568 "cmListFileLexer.c" + +#define INITIAL 0 +#define STRING 1 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +/* Holds the entire state of the reentrant scanner. */ +struct yyguts_t + { + + /* User-defined. Not touched by flex. */ + YY_EXTRA_TYPE yyextra_r; + + /* The rest are the same as the globals declared in the non-reentrant scanner. */ + FILE *yyin_r, *yyout_r; + size_t yy_buffer_stack_top; /**< index of top of stack. */ + size_t yy_buffer_stack_max; /**< capacity of stack. */ + YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ + char yy_hold_char; + int yy_n_chars; + int yyleng_r; + char *yy_c_buf_p; + int yy_init; + int yy_start; + int yy_did_buffer_switch_on_eof; + int yy_start_stack_ptr; + int yy_start_stack_depth; + int *yy_start_stack; + yy_state_type yy_last_accepting_state; + char* yy_last_accepting_cpos; + + int yylineno_r; + int yy_flex_debug_r; + + char *yytext_r; + int yy_more_flag; + int yy_more_len; + + }; /* end struct yyguts_t */ + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int cmListFileLexer_yylex_destroy (yyscan_t yyscanner ); + +int cmListFileLexer_yyget_debug (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_debug (int debug_flag ,yyscan_t yyscanner ); + +YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); + +FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_in (FILE * in_str ,yyscan_t yyscanner ); + +FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_out (FILE * out_str ,yyscan_t yyscanner ); + +int cmListFileLexer_yyget_leng (yyscan_t yyscanner ); + +char *cmListFileLexer_yyget_text (yyscan_t yyscanner ); + +int cmListFileLexer_yyget_lineno (yyscan_t yyscanner ); + +void cmListFileLexer_yyset_lineno (int line_number ,yyscan_t yyscanner ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int cmListFileLexer_yywrap (yyscan_t yyscanner ); +#else +extern int cmListFileLexer_yywrap (yyscan_t yyscanner ); +#endif +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (yyscan_t yyscanner ); +#else +static int input (yyscan_t yyscanner ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ + { \ + int c = '*'; \ + size_t n; \ + for ( n = 0; n < max_size && \ + (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( yyin ) ) \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ + } \ + else \ + { \ + errno=0; \ + while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(yyin); \ + } \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int cmListFileLexer_yylex (yyscan_t yyscanner); + +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + +#line 100 "cmListFileLexer.in.l" + + +#line 787 "cmListFileLexer.c" + + if ( yyg->yy_init ) + { + yyg->yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! yyg->yy_start ) + yyg->yy_start = 1; /* first start state */ + + if ( ! yyin ) + yyin = stdin; + + if ( ! yyout ) + yyout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + cmListFileLexer_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmListFileLexer_yy_load_buffer_state(yyscanner ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = yyg->yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yyg->yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yyg->yy_start; +yy_match: + do + { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 39 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + ++yy_cp; + } + while ( yy_base[yy_current_state] != 89 ); + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + if ( yy_act == 0 ) + { /* have to back up */ + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) + { + int yyl; + for ( yyl = 0; yyl < yyleng; ++yyl ) + if ( yytext[yyl] == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; + } + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yyg->yy_hold_char; + yy_cp = yyg->yy_last_accepting_cpos; + yy_current_state = yyg->yy_last_accepting_state; + goto yy_find_action; + +case 1: +/* rule 1 can match eol */ +YY_RULE_SETUP +#line 102 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_Newline; + cmListFileLexerSetToken(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + return 1; +} +case 2: +YY_RULE_SETUP +#line 110 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; +} + YY_BREAK +case 3: +YY_RULE_SETUP +#line 114 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ParenLeft; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} +case 4: +YY_RULE_SETUP +#line 121 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ParenRight; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} +case 5: +YY_RULE_SETUP +#line 128 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_Identifier; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} +case 6: +YY_RULE_SETUP +#line 135 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} +case 7: +YY_RULE_SETUP +#line 142 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; + cmListFileLexerSetToken(lexer, "", 0); + lexer->column += yyleng; + BEGIN(STRING); +} + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 149 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + YY_BREAK +case 9: +/* rule 9 can match eol */ +YY_RULE_SETUP +#line 154 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 160 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; + BEGIN(INITIAL); + return 1; +} +case 11: +YY_RULE_SETUP +#line 166 "cmListFileLexer.in.l" +{ + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + YY_BREAK +case YY_STATE_EOF(STRING): +#line 171 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_BadString; + BEGIN(INITIAL); + return 1; +} +case 12: +YY_RULE_SETUP +#line 177 "cmListFileLexer.in.l" +{ + lexer->column += yyleng; +} + YY_BREAK +case 13: +YY_RULE_SETUP +#line 181 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_BadCharacter; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} +case YY_STATE_EOF(INITIAL): +#line 188 "cmListFileLexer.in.l" +{ + lexer->token.type = cmListFileLexer_Token_None; + cmListFileLexerSetToken(lexer, 0, 0); + return 0; +} +case 14: +YY_RULE_SETUP +#line 194 "cmListFileLexer.in.l" +ECHO; + YY_BREAK +#line 1025 "cmListFileLexer.c" + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yyg->yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * cmListFileLexer_yylex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); + + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++yyg->yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = yyg->yy_c_buf_p; + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_END_OF_FILE: + { + yyg->yy_did_buffer_switch_on_eof = 0; + + if ( cmListFileLexer_yywrap(yyscanner ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = + yyg->yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yyg->yy_c_buf_p = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; + + yy_current_state = yy_get_previous_state( yyscanner ); + + yy_cp = yyg->yy_c_buf_p; + yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of cmListFileLexer_yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = yyg->yytext_ptr; + register int number_to_move, i; + int ret_val; + + if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; + + else + { + size_t num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) (yyg->yy_c_buf_p - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + cmListFileLexer_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + yyg->yy_n_chars, num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + if ( yyg->yy_n_chars == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + cmListFileLexer_yyrestart(yyin ,yyscanner); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yyg->yy_n_chars += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (yyscan_t yyscanner) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + yy_current_state = yyg->yy_start; + + for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) + { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 39 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) +{ + register int yy_is_jam; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + register char *yy_cp = yyg->yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if ( yy_accept[yy_current_state] ) + { + yyg->yy_last_accepting_state = yy_current_state; + yyg->yy_last_accepting_cpos = yy_cp; + } + while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) + { + yy_current_state = (int) yy_def[yy_current_state]; + if ( yy_current_state >= 39 ) + yy_c = yy_meta[(unsigned int) yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_is_jam = (yy_current_state == 38); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (yyscan_t yyscanner) +#else + static int input (yyscan_t yyscanner) +#endif + +{ + int c; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + *yyg->yy_c_buf_p = yyg->yy_hold_char; + + if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) + /* This was really a NUL. */ + *yyg->yy_c_buf_p = '\0'; + + else + { /* need more input */ + int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; + ++yyg->yy_c_buf_p; + + switch ( yy_get_next_buffer( yyscanner ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + cmListFileLexer_yyrestart(yyin ,yyscanner); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( cmListFileLexer_yywrap(yyscanner ) ) + return EOF; + + if ( ! yyg->yy_did_buffer_switch_on_eof ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(yyscanner); +#else + return input(yyscanner); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yyg->yy_c_buf_p = yyg->yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ + *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ + yyg->yy_hold_char = *++yyg->yy_c_buf_p; + + if ( c == '\n' ) + + do{ yylineno++; + yycolumn=0; + }while(0) +; + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * @param yyscanner The scanner object. + * @note This function does not reset the start condition to @c INITIAL . + */ + void cmListFileLexer_yyrestart (FILE * input_file , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! YY_CURRENT_BUFFER ){ + cmListFileLexer_yyensure_buffer_stack (yyscanner); + YY_CURRENT_BUFFER_LVALUE = + cmListFileLexer_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner); + } + + cmListFileLexer_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); + cmListFileLexer_yy_load_buffer_state(yyscanner ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* TODO. We should be able to replace this entire function body + * with + * cmListFileLexer_yypop_buffer_state(); + * cmListFileLexer_yypush_buffer_state(new_buffer); + */ + cmListFileLexer_yyensure_buffer_stack (yyscanner); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + cmListFileLexer_yy_load_buffer_state(yyscanner ); + + /* We don't actually know whether we did this switch during + * EOF (cmListFileLexer_yywrap()) processing, but the only time this flag + * is looked at is after cmListFileLexer_yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yyg->yy_did_buffer_switch_on_eof = 1; +} + +static void cmListFileLexer_yy_load_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + yyg->yy_hold_char = *yyg->yy_c_buf_p; +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * @param yyscanner The scanner object. + * @return the allocated buffer state. + */ + YY_BUFFER_STATE cmListFileLexer_yy_create_buffer (FILE * file, int size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) cmListFileLexer_yyalloc(b->yy_buf_size + 2 ,yyscanner ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + cmListFileLexer_yy_init_buffer(b,file ,yyscanner); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with cmListFileLexer_yy_create_buffer() + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + cmListFileLexer_yyfree((void *) b->yy_ch_buf ,yyscanner ); + + cmListFileLexer_yyfree((void *) b ,yyscanner ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a cmListFileLexer_yyrestart() or at EOF. + */ + static void cmListFileLexer_yy_init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) + +{ + int oerrno = errno; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + cmListFileLexer_yy_flush_buffer(b ,yyscanner); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then cmListFileLexer_yy_init_buffer was _probably_ + * called from cmListFileLexer_yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * @param yyscanner The scanner object. + */ + void cmListFileLexer_yy_flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + cmListFileLexer_yy_load_buffer_state(yyscanner ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (new_buffer == NULL) + return; + + cmListFileLexer_yyensure_buffer_stack(yyscanner); + + /* This block is copied from cmListFileLexer_yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *yyg->yy_c_buf_p = yyg->yy_hold_char; + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + yyg->yy_buffer_stack_top++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from cmListFileLexer_yy_switch_to_buffer. */ + cmListFileLexer_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yypop_buffer_state (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + if (!YY_CURRENT_BUFFER) + return; + + cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner); + YY_CURRENT_BUFFER_LVALUE = NULL; + if (yyg->yy_buffer_stack_top > 0) + --yyg->yy_buffer_stack_top; + + if (YY_CURRENT_BUFFER) { + cmListFileLexer_yy_load_buffer_state(yyscanner ); + yyg->yy_did_buffer_switch_on_eof = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void cmListFileLexer_yyensure_buffer_stack (yyscan_t yyscanner) +{ + int num_to_alloc; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (!yyg->yy_buffer_stack) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + yyg->yy_buffer_stack_max = num_to_alloc; + yyg->yy_buffer_stack_top = 0; + return; + } + + if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = yyg->yy_buffer_stack_max + grow_size; + yyg->yy_buffer_stack = (struct yy_buffer_state**)cmListFileLexer_yyrealloc + (yyg->yy_buffer_stack, + num_to_alloc * sizeof(struct yy_buffer_state*) + , yyscanner); + + /* zero only the new slots.*/ + memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); + yyg->yy_buffer_stack_max = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) cmListFileLexer_yyalloc(sizeof( struct yy_buffer_state ) ,yyscanner ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + cmListFileLexer_yy_switch_to_buffer(b ,yyscanner ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to cmListFileLexer_yylex() will + * scan from a @e copy of @a str. + * @param str a NUL-terminated string to scan + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * cmListFileLexer_yy_scan_bytes() instead. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) +{ + + return cmListFileLexer_yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); +} + +/** Setup the input buffer state to scan the given bytes. The next call to cmListFileLexer_yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yyscanner The scanner object. + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE cmListFileLexer_yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) cmListFileLexer_yyalloc(n ,yyscanner ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in cmListFileLexer_yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + + b = cmListFileLexer_yy_scan_buffer(buf,n ,yyscanner); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in cmListFileLexer_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) +{ + (void)yyscanner; + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = yyg->yy_hold_char; \ + yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ + yyg->yy_hold_char = *yyg->yy_c_buf_p; \ + *yyg->yy_c_buf_p = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the user-defined data for this scanner. + * @param yyscanner The scanner object. + */ +YY_EXTRA_TYPE cmListFileLexer_yyget_extra (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyextra; +} + +/** Get the current line number. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_lineno (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yylineno; +} + +/** Get the current column number. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_column (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + if (! YY_CURRENT_BUFFER) + return 0; + + return yycolumn; +} + +/** Get the input stream. + * @param yyscanner The scanner object. + */ +FILE *cmListFileLexer_yyget_in (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyin; +} + +/** Get the output stream. + * @param yyscanner The scanner object. + */ +FILE *cmListFileLexer_yyget_out (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyout; +} + +/** Get the length of the current token. + * @param yyscanner The scanner object. + */ +int cmListFileLexer_yyget_leng (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yyleng; +} + +/** Get the current token. + * @param yyscanner The scanner object. + */ + +char *cmListFileLexer_yyget_text (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yytext; +} + +/** Set the user-defined data. This data is never touched by the scanner. + * @param user_defined The data to be associated with this scanner. + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyextra = user_defined ; +} + +/** Set the current line number. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_lineno (int line_number , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* lineno is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmListFileLexer_yyset_lineno called with no buffer" , yyscanner); + + yylineno = line_number; +} + +/** Set the current column. + * @param line_number + * @param yyscanner The scanner object. + */ +void cmListFileLexer_yyset_column (int column_no , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* column is only valid if an input buffer exists. */ + if (! YY_CURRENT_BUFFER ) + yy_fatal_error( "cmListFileLexer_yyset_column called with no buffer" , yyscanner); + + yycolumn = column_no; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * @param yyscanner The scanner object. + * @see cmListFileLexer_yy_switch_to_buffer + */ +void cmListFileLexer_yyset_in (FILE * in_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyin = in_str ; +} + +void cmListFileLexer_yyset_out (FILE * out_str , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yyout = out_str ; +} + +int cmListFileLexer_yyget_debug (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + return yy_flex_debug; +} + +void cmListFileLexer_yyset_debug (int bdebug , yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + yy_flex_debug = bdebug ; +} + +/* Accessor methods for yylval and yylloc */ + +static int yy_init_globals (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + /* Initialization is the same as for the non-reentrant scanner. + This function is called once per scanner lifetime. */ + + yyg->yy_buffer_stack = 0; + yyg->yy_buffer_stack_top = 0; + yyg->yy_buffer_stack_max = 0; + yyg->yy_c_buf_p = (char *) 0; + yyg->yy_init = 1; + yyg->yy_start = 0; + yyg->yy_start_stack_ptr = 0; + yyg->yy_start_stack_depth = 0; + yyg->yy_start_stack = (int *) 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * cmListFileLexer_yylex_init() + */ + return 0; +} + +/* User-visible API */ + +/* cmListFileLexer_yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int cmListFileLexer_yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + memset(*ptr_yy_globals,0,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + +/* cmListFileLexer_yylex_destroy is for both reentrant and non-reentrant scanners. */ +int cmListFileLexer_yylex_destroy (yyscan_t yyscanner) +{ + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + cmListFileLexer_yy_delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); + YY_CURRENT_BUFFER_LVALUE = NULL; + cmListFileLexer_yypop_buffer_state(yyscanner); + } + + /* Destroy the stack itself. */ + cmListFileLexer_yyfree(yyg->yy_buffer_stack ,yyscanner); + yyg->yy_buffer_stack = NULL; + + /* Destroy the start condition stack. */ + cmListFileLexer_yyfree(yyg->yy_start_stack ,yyscanner ); + yyg->yy_start_stack = NULL; + + /* Destroy the main struct (reentrant only). */ + cmListFileLexer_yyfree ( yyscanner , yyscanner ); + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) +{ + register int i; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) +{ + register int n; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *cmListFileLexer_yyalloc (yy_size_t size , yyscan_t yyscanner) +{ + (void)yyscanner; + return (void *) malloc( size ); +} + +void *cmListFileLexer_yyrealloc (void * ptr, yy_size_t size , yyscan_t yyscanner) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + (void)yyscanner; + return (void *) realloc( (char *) ptr, size ); +} + +void cmListFileLexer_yyfree (void * ptr , yyscan_t yyscanner) +{ + (void)yyscanner; + free( (char *) ptr ); /* see cmListFileLexer_yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#undef YY_NEW_FILE +#undef YY_FLUSH_BUFFER +#undef yy_set_bol +#undef yy_new_buffer +#undef yy_set_interactive +#undef yytext_ptr +#undef YY_DO_BEFORE_ACTION + +#ifdef YY_DECL_IS_OURS +#undef YY_DECL_IS_OURS +#undef YY_DECL +#endif +#line 194 "cmListFileLexer.in.l" + + + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length) +{ + /* Set the token line and column number. */ + lexer->token.line = lexer->line; + lexer->token.column = lexer->column; + + /* Use the same buffer if possible. */ + if(lexer->token.text) + { + if(text && length < lexer->size) + { + strcpy(lexer->token.text, text); + lexer->token.length = length; + return; + } + free(lexer->token.text); + lexer->token.text = 0; + lexer->size = 0; + } + + /* Need to extend the buffer. */ + if(text) + { + lexer->token.text = strdup(text); + lexer->token.length = length; + lexer->size = length+1; + } + else + { + lexer->token.length = 0; + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length) +{ + char* temp; + int newSize; + + /* If the appended text will fit in the buffer, do not reallocate. */ + newSize = lexer->token.length + length + 1; + if(lexer->token.text && newSize <= lexer->size) + { + strcpy(lexer->token.text+lexer->token.length, text); + lexer->token.length += length; + return; + } + + /* We need to extend the buffer. */ + temp = malloc(newSize); + if(lexer->token.text) + { + memcpy(temp, lexer->token.text, lexer->token.length); + free(lexer->token.text); + } + memcpy(temp+lexer->token.length, text, length); + temp[lexer->token.length+length] = 0; + lexer->token.text = temp; + lexer->token.length += length; + lexer->size = newSize; +} + +/*--------------------------------------------------------------------------*/ +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize) +{ + if(lexer) + { + if(lexer->file) + { + return (int)fread(buffer, 1, bufferSize, lexer->file); + } + else if(lexer->string_left) + { + int length = lexer->string_left; + if((int)bufferSize < length) { length = (int)bufferSize; } + memcpy(buffer, lexer->string_position, length); + lexer->string_position += length; + lexer->string_left -= length; + return length; + } + } + return 0; +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerInit(cmListFileLexer* lexer) +{ + if(lexer->file || lexer->string_buffer) + { + cmListFileLexer_yylex_init(&lexer->scanner); + cmListFileLexer_yyset_extra(lexer, lexer->scanner); + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerDestroy(cmListFileLexer* lexer) +{ + if(lexer->file || lexer->string_buffer) + { + cmListFileLexer_yylex_destroy(lexer->scanner); + if(lexer->file) + { + fclose(lexer->file); + lexer->file = 0; + } + if(lexer->string_buffer) + { + free(lexer->string_buffer); + lexer->string_buffer = 0; + lexer->string_left = 0; + lexer->string_position = 0; + } + } +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer* cmListFileLexer_New() +{ + cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); + if(!lexer) + { + return 0; + } + memset(lexer, 0, sizeof(*lexer)); + lexer->line = 1; + lexer->column = 1; + return lexer; +} + +/*--------------------------------------------------------------------------*/ +void cmListFileLexer_Delete(cmListFileLexer* lexer) +{ + cmListFileLexer_SetFileName(lexer, 0); + free(lexer); +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if(name) + { + lexer->file = fopen(name, "r"); + if(!lexer->file) + { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if(text) + { + int length = (int)strlen(text); + lexer->string_buffer = (char*)malloc(length+1); + if(lexer->string_buffer) + { + strcpy(lexer->string_buffer, text); + lexer->string_position = lexer->string_buffer; + lexer->string_left = length; + } + else + { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) +{ + if(!lexer->file) + { + return 0; + } + if(cmListFileLexer_yylex(lexer->scanner, lexer)) + { + return &lexer->token; + } + else + { + cmListFileLexer_SetFileName(lexer, 0); + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) +{ + if(lexer->file) + { + return lexer->line; + } + else + { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) +{ + if(lexer->file) + { + return lexer->column; + } + else + { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, + cmListFileLexer_Type type) +{ + (void)lexer; + switch(type) + { + case cmListFileLexer_Token_None: return "nothing"; + case cmListFileLexer_Token_Newline: return "newline"; + case cmListFileLexer_Token_Identifier: return "identifier"; + case cmListFileLexer_Token_ParenLeft: return "left paren"; + case cmListFileLexer_Token_ParenRight: return "right paren"; + case cmListFileLexer_Token_ArgumentUnquoted: return "unquoted argument"; + case cmListFileLexer_Token_ArgumentQuoted: return "quoted argument"; + case cmListFileLexer_Token_BadCharacter: return "bad character"; + case cmListFileLexer_Token_BadString: return "unterminated string"; + } + return "unknown token"; +} diff --git a/Source/cmListFileLexer.h b/Source/cmListFileLexer.h new file mode 100644 index 000000000..0ce82d3f1 --- /dev/null +++ b/Source/cmListFileLexer.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListFileLexer.h,v $ + Language: C++ + Date: $Date: 2004-08-31 22:39:42 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmListFileLexer_h +#define cmListFileLexer_h + +typedef enum cmListFileLexer_Type_e +{ + cmListFileLexer_Token_None, + cmListFileLexer_Token_Newline, + cmListFileLexer_Token_Identifier, + cmListFileLexer_Token_ParenLeft, + cmListFileLexer_Token_ParenRight, + cmListFileLexer_Token_ArgumentUnquoted, + cmListFileLexer_Token_ArgumentQuoted, + cmListFileLexer_Token_BadCharacter, + cmListFileLexer_Token_BadString +} cmListFileLexer_Type; + +typedef struct cmListFileLexer_Token_s cmListFileLexer_Token; +struct cmListFileLexer_Token_s +{ + cmListFileLexer_Type type; + char* text; + int length; + int line; + int column; +}; + +typedef struct cmListFileLexer_s cmListFileLexer; + +#ifdef __cplusplus +extern "C" +{ +#endif + +cmListFileLexer* cmListFileLexer_New(); +int cmListFileLexer_SetFileName(cmListFileLexer*, const char*); +int cmListFileLexer_SetString(cmListFileLexer*, const char*); +cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer*); +long cmListFileLexer_GetCurrentLine(cmListFileLexer*); +long cmListFileLexer_GetCurrentColumn(cmListFileLexer*); +const char* cmListFileLexer_GetTypeAsString(cmListFileLexer*, + cmListFileLexer_Type); +void cmListFileLexer_Delete(cmListFileLexer*); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l new file mode 100644 index 000000000..938cd5f50 --- /dev/null +++ b/Source/cmListFileLexer.in.l @@ -0,0 +1,422 @@ +%{ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmListFileLexer.in.l,v $ + Language: C++ + Date: $Date: 2006-08-09 13:45:04 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/* + +This file must be translated to C and modified to build everywhere. + +Run flex like this: + + flex --prefix=cmListFileLexer_yy -ocmListFileLexer.c cmListFileLexer.in.l + +Modify cmListFileLexer.c: + - remove TABs + - remove the yyunput function + - add a statement "(void)yyscanner;" to the top of these methods: + yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree + - remove all YY_BREAK lines occurring right after return statements + - remove the isatty forward declaration + +*/ + +#include "cmStandardLexer.h" + +/* Setup the proper cmListFileLexer_yylex declaration. */ +#define YY_EXTRA_TYPE cmListFileLexer* +#define YY_DECL int cmListFileLexer_yylex (yyscan_t yyscanner, cmListFileLexer* lexer) + +#include "cmListFileLexer.h" + +/*--------------------------------------------------------------------------*/ +struct cmListFileLexer_s +{ + cmListFileLexer_Token token; + int line; + int column; + int size; + FILE* file; + char* string_buffer; + char* string_position; + int string_left; + yyscan_t scanner; +}; + +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length); +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length); +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize); +static void cmListFileLexerInit(cmListFileLexer* lexer); +static void cmListFileLexerDestroy(cmListFileLexer* lexer); + +/* Replace the lexer input function. */ +#undef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + { result = cmListFileLexerInput(cmListFileLexer_yyget_extra(yyscanner), buf, max_size); } + +/*--------------------------------------------------------------------------*/ +%} + +%option reentrant +%option yylineno +%option noyywrap +%pointer +%x STRING + +MAKEVAR \$\([A-Za-z0-9_]*\) + +%% + +\n { + lexer->token.type = cmListFileLexer_Token_Newline; + cmListFileLexerSetToken(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; + return 1; +} + +#.* { + lexer->column += yyleng; +} + +\( { + lexer->token.type = cmListFileLexer_Token_ParenLeft; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\) { + lexer->token.type = cmListFileLexer_Token_ParenRight; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +[A-Za-z_][A-Za-z0-9_]+ { + lexer->token.type = cmListFileLexer_Token_Identifier; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +({MAKEVAR}|[^ \t\r\n\(\)#\\\"]|\\.)({MAKEVAR}|[^ \t\r\n\(\)#\\\"]|\\.|\"({MAKEVAR}|[^\r\n\(\)#\\\"]|\\.)*\")* { + lexer->token.type = cmListFileLexer_Token_ArgumentUnquoted; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +\" { + lexer->token.type = cmListFileLexer_Token_ArgumentQuoted; + cmListFileLexerSetToken(lexer, "", 0); + lexer->column += yyleng; + BEGIN(STRING); +} + +([^\\\n\"]|\\(.|\n))+ { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + +\n { + cmListFileLexerAppend(lexer, yytext, yyleng); + ++lexer->line; + lexer->column = 1; +} + +\" { + lexer->column += yyleng; + BEGIN(INITIAL); + return 1; +} + +. { + cmListFileLexerAppend(lexer, yytext, yyleng); + lexer->column += yyleng; +} + +<> { + lexer->token.type = cmListFileLexer_Token_BadString; + BEGIN(INITIAL); + return 1; +} + +[ \t\r] { + lexer->column += yyleng; +} + +. { + lexer->token.type = cmListFileLexer_Token_BadCharacter; + cmListFileLexerSetToken(lexer, yytext, yyleng); + lexer->column += yyleng; + return 1; +} + +<> { + lexer->token.type = cmListFileLexer_Token_None; + cmListFileLexerSetToken(lexer, 0, 0); + return 0; +} + +%% + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerSetToken(cmListFileLexer* lexer, const char* text, + int length) +{ + /* Set the token line and column number. */ + lexer->token.line = lexer->line; + lexer->token.column = lexer->column; + + /* Use the same buffer if possible. */ + if(lexer->token.text) + { + if(text && length < lexer->size) + { + strcpy(lexer->token.text, text); + lexer->token.length = length; + return; + } + free(lexer->token.text); + lexer->token.text = 0; + lexer->size = 0; + } + + /* Need to extend the buffer. */ + if(text) + { + lexer->token.text = strdup(text); + lexer->token.length = length; + lexer->size = length+1; + } + else + { + lexer->token.length = 0; + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerAppend(cmListFileLexer* lexer, const char* text, + int length) +{ + char* temp; + int newSize; + + /* If the appended text will fit in the buffer, do not reallocate. */ + newSize = lexer->token.length + length + 1; + if(lexer->token.text && newSize <= lexer->size) + { + strcpy(lexer->token.text+lexer->token.length, text); + lexer->token.length += length; + return; + } + + /* We need to extend the buffer. */ + temp = malloc(newSize); + if(lexer->token.text) + { + memcpy(temp, lexer->token.text, lexer->token.length); + free(lexer->token.text); + } + memcpy(temp+lexer->token.length, text, length); + temp[lexer->token.length+length] = 0; + lexer->token.text = temp; + lexer->token.length += length; + lexer->size = newSize; +} + +/*--------------------------------------------------------------------------*/ +static int cmListFileLexerInput(cmListFileLexer* lexer, char* buffer, + size_t bufferSize) +{ + if(lexer) + { + if(lexer->file) + { + return (int)fread(buffer, 1, bufferSize, lexer->file); + } + else if(lexer->string_left) + { + int length = lexer->string_left; + if((int)bufferSize < length) { length = (int)bufferSize; } + memcpy(buffer, lexer->string_position, length); + lexer->string_position += length; + lexer->string_left -= length; + return length; + } + } + return 0; +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerInit(cmListFileLexer* lexer) +{ + if(lexer->file || lexer->string_buffer) + { + cmListFileLexer_yylex_init(&lexer->scanner); + cmListFileLexer_yyset_extra(lexer, lexer->scanner); + } +} + +/*--------------------------------------------------------------------------*/ +static void cmListFileLexerDestroy(cmListFileLexer* lexer) +{ + if(lexer->file || lexer->string_buffer) + { + cmListFileLexer_yylex_destroy(lexer->scanner); + if(lexer->file) + { + fclose(lexer->file); + lexer->file = 0; + } + if(lexer->string_buffer) + { + free(lexer->string_buffer); + lexer->string_buffer = 0; + lexer->string_left = 0; + lexer->string_position = 0; + } + } +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer* cmListFileLexer_New() +{ + cmListFileLexer* lexer = (cmListFileLexer*)malloc(sizeof(cmListFileLexer)); + if(!lexer) + { + return 0; + } + memset(lexer, 0, sizeof(*lexer)); + lexer->line = 1; + lexer->column = 1; + return lexer; +} + +/*--------------------------------------------------------------------------*/ +void cmListFileLexer_Delete(cmListFileLexer* lexer) +{ + cmListFileLexer_SetFileName(lexer, 0); + free(lexer); +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetFileName(cmListFileLexer* lexer, const char* name) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if(name) + { + lexer->file = fopen(name, "r"); + if(!lexer->file) + { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +int cmListFileLexer_SetString(cmListFileLexer* lexer, const char* text) +{ + int result = 1; + cmListFileLexerDestroy(lexer); + if(text) + { + int length = (int)strlen(text); + lexer->string_buffer = (char*)malloc(length+1); + if(lexer->string_buffer) + { + strcpy(lexer->string_buffer, text); + lexer->string_position = lexer->string_buffer; + lexer->string_left = length; + } + else + { + result = 0; + } + } + cmListFileLexerInit(lexer); + return result; +} + +/*--------------------------------------------------------------------------*/ +cmListFileLexer_Token* cmListFileLexer_Scan(cmListFileLexer* lexer) +{ + if(!lexer->file) + { + return 0; + } + if(cmListFileLexer_yylex(lexer->scanner, lexer)) + { + return &lexer->token; + } + else + { + cmListFileLexer_SetFileName(lexer, 0); + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentLine(cmListFileLexer* lexer) +{ + if(lexer->file) + { + return lexer->line; + } + else + { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +long cmListFileLexer_GetCurrentColumn(cmListFileLexer* lexer) +{ + if(lexer->file) + { + return lexer->column; + } + else + { + return 0; + } +} + +/*--------------------------------------------------------------------------*/ +const char* cmListFileLexer_GetTypeAsString(cmListFileLexer* lexer, + cmListFileLexer_Type type) +{ + (void)lexer; + switch(type) + { + case cmListFileLexer_Token_None: return "nothing"; + case cmListFileLexer_Token_Newline: return "newline"; + case cmListFileLexer_Token_Identifier: return "identifier"; + case cmListFileLexer_Token_ParenLeft: return "left paren"; + case cmListFileLexer_Token_ParenRight: return "right paren"; + case cmListFileLexer_Token_ArgumentUnquoted: return "unquoted argument"; + case cmListFileLexer_Token_ArgumentQuoted: return "quoted argument"; + case cmListFileLexer_Token_BadCharacter: return "bad character"; + case cmListFileLexer_Token_BadString: return "unterminated string"; + } + return "unknown token"; +} diff --git a/Source/cmLoadCacheCommand.cxx b/Source/cmLoadCacheCommand.cxx new file mode 100644 index 000000000..47b676f3f --- /dev/null +++ b/Source/cmLoadCacheCommand.cxx @@ -0,0 +1,235 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLoadCacheCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLoadCacheCommand.h" + +#include + +// cmLoadCacheCommand +bool cmLoadCacheCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if (args.size()< 1) + { + this->SetError("called with wrong number of arguments."); + } + + if(args.size() >= 2 && args[1] == "READ_WITH_PREFIX") + { + return this->ReadWithPrefix(args); + } + + // Cache entries to be excluded from the import list. + // If this set is empty, all cache entries are brought in + // and they can not be overridden. + bool excludeFiles=false; + unsigned int i; + std::set excludes; + + for(i=0; i includes; + + for(i=0; iMakefile->GetCacheManager()->LoadCache(args[i].c_str(), false, + excludes, includes); + } + + + return true; +} + +//---------------------------------------------------------------------------- +bool cmLoadCacheCommand::ReadWithPrefix(std::vector const& args) +{ + // Make sure we have a prefix. + if(args.size() < 3) + { + this->SetError("READ_WITH_PREFIX form must specify a prefix."); + return false; + } + + // Make sure the cache file exists. + std::string cacheFile = args[0]+"/CMakeCache.txt"; + if(!cmSystemTools::FileExists(cacheFile.c_str())) + { + std::string e = "Cannot load cache file from " + cacheFile; + this->SetError(e.c_str()); + return false; + } + + // Prepare the table of variables to read. + this->Prefix = args[2]; + for(unsigned int i=3; i < args.size(); ++i) + { + this->VariablesToRead.insert(args[i]); + } + + // Read the cache file. + std::ifstream fin(cacheFile.c_str()); + + // This is a big hack read loop to overcome a buggy ifstream + // implementation on HP-UX. This should work on all platforms even + // for small buffer sizes. + const int bufferSize = 4096; + char buffer[bufferSize]; + std::string line; + while(fin) + { + // Read a block of the file. + fin.read(buffer, bufferSize); + if(fin.gcount()) + { + // Parse for newlines directly. + const char* i = buffer; + const char* end = buffer+fin.gcount(); + while(i != end) + { + const char* begin = i; + while(i != end && *i != '\n') { ++i; } + if(i == begin || *(i-1) != '\r') + { + // Include this portion of the line. + line += std::string(begin, i-begin); + } + else + { + // Include this portion of the line. + // Don't include the \r in a \r\n pair. + line += std::string(begin, i-1-begin); + } + if(i != end) + { + // Completed a line. + this->CheckLine(line.c_str()); + line = ""; + + // Skip the newline character. + ++i; + } + } + } + } + if(line.length()) + { + // Partial last line. + this->CheckLine(line.c_str()); + } + + return true; +} + +//---------------------------------------------------------------------------- +void cmLoadCacheCommand::CheckLine(const char* line) +{ + // Check one line of the cache file. + std::string var; + std::string value; + if(this->ParseEntry(line, var, value)) + { + // Found a real entry. See if this one was requested. + if(this->VariablesToRead.find(var) != this->VariablesToRead.end()) + { + // This was requested. Set this variable locally with the given + // prefix. + var = this->Prefix + var; + if(value.length()) + { + this->Makefile->AddDefinition(var.c_str(), value.c_str()); + } + else + { + this->Makefile->RemoveDefinition(var.c_str()); + } + } + } +} + +//---------------------------------------------------------------------------- +bool cmLoadCacheCommand::ParseEntry(const char* entry, std::string& var, + std::string& value) +{ + // input line is: key:type=value + cmsys::RegularExpression reg("^([^:]*):([^=]*)=(.*[^\t ]|[\t ]*)[\t ]*$"); + // input line is: "key":type=value + cmsys::RegularExpression + regQuoted("^\"([^\"]*)\":([^=]*)=(.*[^\t ]|[\t ]*)[\t ]*$"); + bool flag = false; + if(regQuoted.find(entry)) + { + var = regQuoted.match(1); + value = regQuoted.match(3); + flag = true; + } + else if (reg.find(entry)) + { + var = reg.match(1); + value = reg.match(3); + flag = true; + } + + // if value is enclosed in single quotes ('foo') then remove them + // it is used to enclose trailing space or tab + if (flag && + value.size() >= 2 && + value[0] == '\'' && + value[value.size() - 1] == '\'') + { + value = value.substr(1, value.size() - 2); + } + return flag; +} diff --git a/Source/cmLoadCacheCommand.h b/Source/cmLoadCacheCommand.h new file mode 100644 index 000000000..9ca7c9d8c --- /dev/null +++ b/Source/cmLoadCacheCommand.h @@ -0,0 +1,95 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLoadCacheCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLoadCacheCommand_h +#define cmLoadCacheCommand_h + +#include "cmCommand.h" + +/** \class cmLoadCacheCommand + * \brief load a cache file + * + * cmLoadCacheCommand loads the non internal values of a cache file + */ +class cmLoadCacheCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmLoadCacheCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "load_cache";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Load in the values from another project's CMake cache."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " load_cache(pathToCacheFile READ_WITH_PREFIX\n" + " prefix entry1...)\n" + "Read the cache and store the requested entries in variables with " + "their name prefixed with the given prefix. " + "This only reads the values, and does not create entries in the local " + "project's cache.\n" + " load_cache(pathToCacheFile [EXCLUDE entry1...]\n" + " [INCLUDE_INTERNALS entry1...])\n" + "Load in the values from another cache and store them in the local " + "project's cache as internal entries. This is useful for a project " + "that depends on another project built in a different tree. " + "EXCLUDE option can be used to provide a list of entries to be " + "excluded. " + "INCLUDE_INTERNALS can be used to provide a list of internal entries " + "to be included. Normally, no internal entries are brought in. Use " + "of this form of the command is strongly discouraged, but it is " + "provided for backward compatibility."; + } + + cmTypeMacro(cmLoadCacheCommand, cmCommand); +protected: + + std::set VariablesToRead; + std::string Prefix; + + bool ReadWithPrefix(std::vector const& args); + void CheckLine(const char* line); + bool ParseEntry(const char* entry, std::string& var, std::string& value); +}; + + +#endif diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx new file mode 100644 index 000000000..246e60cd6 --- /dev/null +++ b/Source/cmLoadCommandCommand.cxx @@ -0,0 +1,318 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLoadCommandCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.29 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLoadCommandCommand.h" +#include "cmCPluginAPI.h" +#include "cmCPluginAPI.cxx" +#include "cmDynamicLoader.h" + +#include + +#include + +#ifdef __QNX__ +# include /* for malloc/free on QNX */ +#endif + +#include +extern "C" void TrapsForSignalsCFunction(int sig); + + +// a class for loadabple commands +class cmLoadedCommand : public cmCommand +{ +public: + cmLoadedCommand() { + memset(&this->info,0,sizeof(this->info)); + this->info.CAPI = &cmStaticCAPI; + } + + ///! clean up any memory allocated by the plugin + ~cmLoadedCommand(); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmLoadedCommand *newC = new cmLoadedCommand; + // we must copy when we clone + memcpy(&newC->info,&this->info,sizeof(info)); + return newC; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &); + + /** + * This is called at the end after all the information + * specified by the command is accumulated. Most commands do + * not implement this method. At this point, reading and + * writing to the cache can be done. + */ + virtual void FinalPass(); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return info.Name; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + if (this->info.GetTerseDocumentation) + { + cmLoadedCommand::InstallSignalHandlers(info.Name); + const char* ret = info.GetTerseDocumentation(); + cmLoadedCommand::InstallSignalHandlers(info.Name, 1); + return ret; + } + else + { + return "LoadedCommand without any additional documentation"; + } + } + static const char* LastName; + static void TrapsForSignals(int sig) + { + fprintf(stderr, "CMake loaded command %s crashed with signal: %d.\n", + cmLoadedCommand::LastName, sig); + } + static void InstallSignalHandlers(const char* name, int remove = 0) + { + cmLoadedCommand::LastName = name; + if(!name) + { + cmLoadedCommand::LastName = "????"; + } + + if(!remove) + { + signal(SIGSEGV, TrapsForSignalsCFunction); +#ifdef SIGBUS + signal(SIGBUS, TrapsForSignalsCFunction); +#endif + signal(SIGILL, TrapsForSignalsCFunction); + } + else + { + signal(SIGSEGV, 0); +#ifdef SIGBUS + signal(SIGBUS, 0); +#endif + signal(SIGILL, 0); + } + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + if (this->info.GetFullDocumentation) + { + cmLoadedCommand::InstallSignalHandlers(info.Name); + const char* ret = info.GetFullDocumentation(); + cmLoadedCommand::InstallSignalHandlers(info.Name, 1); + return ret; + } + else + { + return "LoadedCommand without any additional documentation"; + } + } + + cmTypeMacro(cmLoadedCommand, cmCommand); + + cmLoadedCommandInfo info; +}; + +extern "C" void TrapsForSignalsCFunction(int sig) +{ + cmLoadedCommand::TrapsForSignals(sig); +} + + +const char* cmLoadedCommand::LastName = 0; + +bool cmLoadedCommand::InitialPass(std::vector const& args, + cmExecutionStatus &) +{ + if (!info.InitialPass) + { + return true; + } + + // clear the error string + if (this->info.Error) + { + free(this->info.Error); + } + + // create argc and argv and then invoke the command + int argc = static_cast (args.size()); + char **argv = 0; + if (argc) + { + argv = (char **)malloc(argc*sizeof(char *)); + } + int i; + for (i = 0; i < argc; ++i) + { + argv[i] = strdup(args[i].c_str()); + } + cmLoadedCommand::InstallSignalHandlers(info.Name); + int result = info.InitialPass((void *)&info, + (void *)this->Makefile,argc,argv); + cmLoadedCommand::InstallSignalHandlers(info.Name, 1); + cmFreeArguments(argc,argv); + + if (result) + { + return true; + } + + /* Initial Pass must have failed so set the error string */ + if (this->info.Error) + { + this->SetError(this->info.Error); + } + return false; +} + +void cmLoadedCommand::FinalPass() +{ + if (this->info.FinalPass) + { + cmLoadedCommand::InstallSignalHandlers(info.Name); + this->info.FinalPass((void *)&this->info,(void *)this->Makefile); + cmLoadedCommand::InstallSignalHandlers(info.Name, 1); + } +} + +cmLoadedCommand::~cmLoadedCommand() +{ + if (this->info.Destructor) + { + cmLoadedCommand::InstallSignalHandlers(info.Name); + this->info.Destructor((void *)&this->info); + cmLoadedCommand::InstallSignalHandlers(info.Name, 1); + } + if (this->info.Error) + { + free(this->info.Error); + } +} + +// cmLoadCommandCommand +bool cmLoadCommandCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + return true; + } + + // Construct a variable to report what file was loaded, if any. + // Start by removing the definition in case of failure. + std::string reportVar = "CMAKE_LOADED_COMMAND_"; + reportVar += args[0]; + this->Makefile->RemoveDefinition(reportVar.c_str()); + + // the file must exist + std::string moduleName = + this->Makefile->GetRequiredDefinition("CMAKE_SHARED_MODULE_PREFIX"); + moduleName += "cm" + args[0]; + moduleName += + this->Makefile->GetRequiredDefinition("CMAKE_SHARED_MODULE_SUFFIX"); + + // search for the file + std::vector path; + for (unsigned int j = 1; j < args.size(); j++) + { + // expand variables + std::string exp = args[j]; + cmSystemTools::ExpandRegistryValues(exp); + + // Glob the entry in case of wildcards. + cmSystemTools::GlobDirs(exp.c_str(), path); + } + + // Try to find the program. + std::string fullPath = cmSystemTools::FindFile(moduleName.c_str(), path); + if (fullPath == "") + { + cmOStringStream e; + e << "Attempt to load command failed from file \"" + << moduleName << "\""; + this->SetError(e.str().c_str()); + return false; + } + + // try loading the shared library / dll + cmsys::DynamicLoader::LibraryHandle lib + = cmDynamicLoader::OpenLibrary(fullPath.c_str()); + if(!lib) + { + std::string err = "Attempt to load the library "; + err += fullPath + " failed."; + const char* error = cmsys::DynamicLoader::LastError(); + if ( error ) + { + err += " Additional error info is:\n"; + err += error; + } + this->SetError(err.c_str()); + return false; + } + + // Report what file was loaded for this command. + this->Makefile->AddDefinition(reportVar.c_str(), fullPath.c_str()); + + // find the init function + std::string initFuncName = args[0] + "Init"; + CM_INIT_FUNCTION initFunction + = (CM_INIT_FUNCTION) + cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str()); + if ( !initFunction ) + { + initFuncName = "_"; + initFuncName += args[0]; + initFuncName += "Init"; + initFunction = (CM_INIT_FUNCTION)( + cmsys::DynamicLoader::GetSymbolAddress(lib, initFuncName.c_str())); + } + // if the symbol is found call it to set the name on the + // function blocker + if(initFunction) + { + // create a function blocker and set it up + cmLoadedCommand *f = new cmLoadedCommand(); + (*initFunction)(&f->info); + this->Makefile->AddCommand(f); + return true; + } + this->SetError("Attempt to load command failed. " + "No init function found."); + return false; +} + diff --git a/Source/cmLoadCommandCommand.h b/Source/cmLoadCommandCommand.h new file mode 100644 index 000000000..7add9a445 --- /dev/null +++ b/Source/cmLoadCommandCommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLoadCommandCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLoadCommandCommand_h +#define cmLoadCommandCommand_h + +#include "cmCommand.h" + +/** \class cmLoadCommandCommand + * \brief Load in a Command plugin + * + * cmLoadCommandCommand loads a command into CMake + */ +class cmLoadCommandCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmLoadCommandCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "load_command";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Load a command into a running CMake."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " load_command(COMMAND_NAME [loc2 ...])\n" + "The given locations are searched for a library whose name is " + "cmCOMMAND_NAME. If found, it is loaded as a module and the command " + "is added to the set of available CMake commands. Usually, " + "TRY_COMPILE is used before this command to compile the module. " + "If the command is successfully loaded a variable named\n" + " CMAKE_LOADED_COMMAND_\n" + "will be set to the full path of the module that was loaded. " + "Otherwise the variable will not be set."; + } + + cmTypeMacro(cmLoadCommandCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx new file mode 100644 index 000000000..1428951d6 --- /dev/null +++ b/Source/cmLocalGenerator.cxx @@ -0,0 +1,2859 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.269.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLocalGenerator.h" + +#include "cmComputeLinkInformation.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmInstallGenerator.h" +#include "cmInstallFilesGenerator.h" +#include "cmInstallScriptGenerator.h" +#include "cmInstallTargetGenerator.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmTest.h" +#include "cmake.h" + +#if defined(CMAKE_BUILD_WITH_CMAKE) +# define CM_LG_ENCODE_OBJECT_NAMES +# include +#endif + +#include + +#include // for isalpha + +#include + +cmLocalGenerator::cmLocalGenerator() +{ + this->Makefile = new cmMakefile; + this->Makefile->SetLocalGenerator(this); + this->Parent = 0; + this->WindowsShell = false; + this->WindowsVSIDE = false; + this->WatcomWMake = false; + this->MinGWMake = false; + this->NMake = false; + this->MSYSShell = false; + this->LinkScriptShell = false; + this->IgnoreLibPrefix = false; + this->UseRelativePaths = false; + this->Configured = false; + this->EmitUniversalBinaryFlags = true; + this->IsMakefileGenerator = false; + this->RelativePathsConfigured = false; + this->PathConversionsSetup = false; + this->BackwardsCompatibility = 0; + this->BackwardsCompatibilityFinal = false; +} + +cmLocalGenerator::~cmLocalGenerator() +{ + delete this->Makefile; +} + +void cmLocalGenerator::Configure() +{ + cmLocalGenerator* previousLg = + this->GetGlobalGenerator()->GetCurrentLocalGenerator(); + this->GetGlobalGenerator()->SetCurrentLocalGenerator(this); + + // make sure the CMakeFiles dir is there + std::string filesDir = this->Makefile->GetStartOutputDirectory(); + filesDir += cmake::GetCMakeFilesDirectory(); + cmSystemTools::MakeDirectory(filesDir.c_str()); + + // find & read the list file + std::string currentStart = this->Makefile->GetStartDirectory(); + currentStart += "/CMakeLists.txt"; + this->Makefile->ReadListFile(currentStart.c_str()); + + // at the end of the ReadListFile handle any old style subdirs + // first get all the subdirectories + std::vector subdirs = this->GetChildren(); + + // for each subdir recurse + std::vector::iterator sdi = subdirs.begin(); + for (; sdi != subdirs.end(); ++sdi) + { + if (!(*sdi)->Configured) + { + this->Makefile->ConfigureSubDirectory(*sdi); + } + } + + // Check whether relative paths should be used for optionally + // relative paths. + this->UseRelativePaths = this->Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS"); + + this->Configured = true; + + this->GetGlobalGenerator()->SetCurrentLocalGenerator(previousLg); +} + +void cmLocalGenerator::SetupPathConversions() +{ + // Setup the current output directory components for use by + // Convert + std::string outdir; + outdir = + cmSystemTools::CollapseFullPath(this->Makefile->GetHomeDirectory()); + cmSystemTools::SplitPath(outdir.c_str(), this->HomeDirectoryComponents); + outdir = + cmSystemTools::CollapseFullPath(this->Makefile->GetStartDirectory()); + cmSystemTools::SplitPath(outdir.c_str(), this->StartDirectoryComponents); + + outdir = cmSystemTools::CollapseFullPath + (this->Makefile->GetHomeOutputDirectory()); + cmSystemTools::SplitPath(outdir.c_str(), + this->HomeOutputDirectoryComponents); + + outdir = cmSystemTools::CollapseFullPath + (this->Makefile->GetStartOutputDirectory()); + cmSystemTools::SplitPath(outdir.c_str(), + this->StartOutputDirectoryComponents); +} + + +void cmLocalGenerator::SetGlobalGenerator(cmGlobalGenerator *gg) +{ + this->GlobalGenerator = gg; + + // setup the home directories + this->Makefile->GetProperties().SetCMakeInstance(gg->GetCMakeInstance()); + this->Makefile->SetHomeDirectory( + gg->GetCMakeInstance()->GetHomeDirectory()); + this->Makefile->SetHomeOutputDirectory( + gg->GetCMakeInstance()->GetHomeOutputDirectory()); +} + +void cmLocalGenerator::ConfigureFinalPass() +{ + this->Makefile->ConfigureFinalPass(); +} + +void cmLocalGenerator::TraceDependencies() +{ + // Generate the rule files for each target. + cmTargets& targets = this->Makefile->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace + // so don't build a projectfile for it + if (strncmp(t->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) + { + const char* projectFilename = 0; + if (this->IsMakefileGenerator == false) // only use of this variable + { + projectFilename = t->second.GetName(); + } + t->second.TraceDependencies(projectFilename); + } + } +} + +void cmLocalGenerator::GenerateTestFiles() +{ + if ( !this->Makefile->IsOn("CMAKE_TESTING_ENABLED") ) + { + return; + } + std::string file = this->Makefile->GetStartOutputDirectory(); + file += "/"; + file += "CTestTestfile.cmake"; + + cmGeneratedFileStream fout(file.c_str()); + fout.SetCopyIfDifferent(true); + + fout << "# CMake generated Testfile for " << std::endl + << "# Source directory: " + << this->Makefile->GetStartDirectory() << std::endl + << "# Build directory: " + << this->Makefile->GetStartOutputDirectory() << std::endl + << "# " << std::endl + << "# This file replicates the SUBDIRS() and ADD_TEST() commands " + << "from the source" << std::endl + << "# tree CMakeLists.txt file, skipping any SUBDIRS() or " + << "ADD_TEST() commands" << std::endl + << "# that are excluded by CMake control structures, i.e. IF() " + << "commands." << std::endl; + + const char* testIncludeFile = + this->Makefile->GetProperty("TEST_INCLUDE_FILE"); + if ( testIncludeFile ) + { + fout << "INCLUDE(\"" << testIncludeFile << "\")" << std::endl; + } + + const std::vector *tests = this->Makefile->GetTests(); + std::vector::const_iterator it; + for ( it = tests->begin(); it != tests->end(); ++ it ) + { + cmTest* test = *it; + fout << "ADD_TEST("; + fout << test->GetName() << " \"" << test->GetCommand() << "\""; + + std::vector::const_iterator argit; + for (argit = test->GetArguments().begin(); + argit != test->GetArguments().end(); ++argit) + { + // Just double-quote all arguments so they are re-parsed + // correctly by the test system. + fout << " \""; + for(std::string::const_iterator c = argit->begin(); + c != argit->end(); ++c) + { + // Escape quotes within arguments. We should escape + // backslashes too but we cannot because it makes the result + // inconsistent with previous behavior of this command. + if((*c == '"')) + { + fout << '\\'; + } + fout << *c; + } + fout << "\""; + } + fout << ")" << std::endl; + cmPropertyMap::const_iterator pit; + cmPropertyMap* mpit = &test->GetProperties(); + if ( mpit->size() ) + { + fout << "SET_TESTS_PROPERTIES(" << test->GetName() << " PROPERTIES "; + for ( pit = mpit->begin(); pit != mpit->end(); ++ pit ) + { + fout << " " << pit->first.c_str() << " \""; + const char* value = pit->second.GetValue(); + for ( ; *value; ++ value ) + { + switch ( *value ) + { + case '\\': + case '"': + case ' ': + case '#': + case '(': + case ')': + case '$': + case '^': + fout << "\\" << *value; + break; + case '\t': + fout << "\\t"; + break; + case '\n': + fout << "\\n"; + break; + case '\r': + fout << "\\r"; + break; + default: + fout << *value; + } + } + fout << "\""; + } + fout << ")" << std::endl; + } + } + if ( this->Children.size()) + { + size_t i; + for(i = 0; i < this->Children.size(); ++i) + { + fout << "SUBDIRS("; + std::string outP = + this->Children[i]->GetMakefile()->GetStartOutputDirectory(); + fout << this->Convert(outP.c_str(),START_OUTPUT); + fout << ")" << std::endl; + } + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::GenerateInstallRules() +{ + // Compute the install prefix. + const char* prefix = this->Makefile->GetDefinition("CMAKE_INSTALL_PREFIX"); +#if defined(_WIN32) && !defined(__CYGWIN__) + std::string prefix_win32; + if(!prefix) + { + if(!cmSystemTools::GetEnv("SystemDrive", prefix_win32)) + { + prefix_win32 = "C:"; + } + const char* project_name = this->Makefile->GetDefinition("PROJECT_NAME"); + if(project_name && project_name[0]) + { + prefix_win32 += "/Program Files/"; + prefix_win32 += project_name; + } + else + { + prefix_win32 += "/InstalledCMakeProject"; + } + prefix = prefix_win32.c_str(); + } +#else + if (!prefix) + { + prefix = "/usr/local"; + } +#endif + + // Compute the set of configurations. + std::vector configurationTypes; + if(const char* types = + this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(types, configurationTypes); + } + const char* config = 0; + if(configurationTypes.empty()) + { + config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); + } + + // Choose a default install configuration. + const char* default_config = config; + const char* default_order[] = {"RELEASE", "MINSIZEREL", + "RELWITHDEBINFO", "DEBUG", 0}; + for(const char** c = default_order; *c && !default_config; ++c) + { + for(std::vector::iterator i = configurationTypes.begin(); + i != configurationTypes.end(); ++i) + { + if(cmSystemTools::UpperCase(*i) == *c) + { + default_config = i->c_str(); + } + } + } + if(!default_config && !configurationTypes.empty()) + { + default_config = configurationTypes[0].c_str(); + } + if(!default_config) + { + default_config = "Release"; + } + + // Create the install script file. + std::string file = this->Makefile->GetStartOutputDirectory(); + std::string homedir = this->Makefile->GetHomeOutputDirectory(); + std::string currdir = this->Makefile->GetCurrentOutputDirectory(); + cmSystemTools::ConvertToUnixSlashes(file); + cmSystemTools::ConvertToUnixSlashes(homedir); + cmSystemTools::ConvertToUnixSlashes(currdir); + int toplevel_install = 0; + if ( currdir == homedir ) + { + toplevel_install = 1; + } + file += "/cmake_install.cmake"; + cmGeneratedFileStream fout(file.c_str()); + fout.SetCopyIfDifferent(true); + + // Write the header. + fout << "# Install script for directory: " + << this->Makefile->GetCurrentDirectory() << std::endl << std::endl; + fout << "# Set the install prefix" << std::endl + << "IF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl + << " SET(CMAKE_INSTALL_PREFIX \"" << prefix << "\")" << std::endl + << "ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)" << std::endl + << "STRING(REGEX REPLACE \"/$\" \"\" CMAKE_INSTALL_PREFIX " + << "\"${CMAKE_INSTALL_PREFIX}\")" << std::endl + << std::endl; + + // Write support code for generating per-configuration install rules. + fout << + "# Set the install configuration name.\n" + "IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)\n" + " IF(BUILD_TYPE)\n" + " STRING(REGEX REPLACE \"^[^A-Za-z0-9_]+\" \"\"\n" + " CMAKE_INSTALL_CONFIG_NAME \"${BUILD_TYPE}\")\n" + " ELSE(BUILD_TYPE)\n" + " SET(CMAKE_INSTALL_CONFIG_NAME \"" << default_config << "\")\n" + " ENDIF(BUILD_TYPE)\n" + " MESSAGE(STATUS \"Install configuration: " + "\\\"${CMAKE_INSTALL_CONFIG_NAME}\\\"\")\n" + "ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)\n" + "\n"; + + // Write support code for dealing with component-specific installs. + fout << + "# Set the component getting installed.\n" + "IF(NOT CMAKE_INSTALL_COMPONENT)\n" + " IF(COMPONENT)\n" + " MESSAGE(STATUS \"Install component: \\\"${COMPONENT}\\\"\")\n" + " SET(CMAKE_INSTALL_COMPONENT \"${COMPONENT}\")\n" + " ELSE(COMPONENT)\n" + " SET(CMAKE_INSTALL_COMPONENT)\n" + " ENDIF(COMPONENT)\n" + "ENDIF(NOT CMAKE_INSTALL_COMPONENT)\n" + "\n"; + + // Copy user-specified install options to the install code. + if(const char* so_no_exe = + this->Makefile->GetDefinition("CMAKE_INSTALL_SO_NO_EXE")) + { + fout << + "# Install shared libraries without execute permission?\n" + "IF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)\n" + " SET(CMAKE_INSTALL_SO_NO_EXE \"" << so_no_exe << "\")\n" + "ENDIF(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)\n" + "\n"; + } + + // Ask each install generator to write its code. + std::vector const& installers = + this->Makefile->GetInstallGenerators(); + for(std::vector::const_iterator + gi = installers.begin(); + gi != installers.end(); ++gi) + { + (*gi)->Generate(fout, config, configurationTypes); + } + + // Write rules from old-style specification stored in targets. + this->GenerateTargetInstallRules(fout, config, configurationTypes); + + // Include install scripts from subdirectories. + if(!this->Children.empty()) + { + fout << "IF(NOT CMAKE_INSTALL_LOCAL_ONLY)\n"; + fout << " # Include the install script for each subdirectory.\n"; + for(std::vector::const_iterator + ci = this->Children.begin(); ci != this->Children.end(); ++ci) + { + if(!(*ci)->GetMakefile()->GetPropertyAsBool("EXCLUDE_FROM_ALL")) + { + std::string odir = (*ci)->GetMakefile()->GetStartOutputDirectory(); + cmSystemTools::ConvertToUnixSlashes(odir); + fout << " INCLUDE(\"" << odir.c_str() + << "/cmake_install.cmake\")" << std::endl; + } + } + fout << "\n"; + fout << "ENDIF(NOT CMAKE_INSTALL_LOCAL_ONLY)\n\n"; + } + + // Record the install manifest. + if ( toplevel_install ) + { + fout << + "IF(CMAKE_INSTALL_COMPONENT)\n" + " SET(CMAKE_INSTALL_MANIFEST \"install_manifest_" + "${CMAKE_INSTALL_COMPONENT}.txt\")\n" + "ELSE(CMAKE_INSTALL_COMPONENT)\n" + " SET(CMAKE_INSTALL_MANIFEST \"install_manifest.txt\")\n" + "ENDIF(CMAKE_INSTALL_COMPONENT)\n\n"; + fout + << "FILE(WRITE \"" + << homedir.c_str() << "/${CMAKE_INSTALL_MANIFEST}\" " + << "\"\")" << std::endl; + fout + << "FOREACH(file ${CMAKE_INSTALL_MANIFEST_FILES})" << std::endl + << " FILE(APPEND \"" + << homedir.c_str() << "/${CMAKE_INSTALL_MANIFEST}\" " + << "\"${file}\\n\")" << std::endl + << "ENDFOREACH(file)" << std::endl; + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::GenerateTargetManifest() +{ + // Collect the set of configuration types. + std::vector configNames; + if(const char* configurationTypes = + this->Makefile->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(configurationTypes, configNames); + } + else if(const char* buildType = + this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) + { + if(*buildType) + { + configNames.push_back(buildType); + } + } + + // Add our targets to the manifest for each configuration. + cmTargets& targets = this->Makefile->GetTargets(); + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + cmTarget& target = t->second; + if(configNames.empty()) + { + target.GenerateTargetManifest(0); + } + else + { + for(std::vector::iterator ci = configNames.begin(); + ci != configNames.end(); ++ci) + { + const char* config = ci->c_str(); + target.GenerateTargetManifest(config); + } + } + } +} + +void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, + const char* lang, + cmSourceFile& source, + cmTarget& ) +{ + std::string objectDir = cmSystemTools::GetFilenamePath(std::string(ofname)); + objectDir = this->Convert(objectDir.c_str(),START_OUTPUT,SHELL); + std::string objectFile = this->Convert(ofname,START_OUTPUT,SHELL); + std::string sourceFile = + this->Convert(source.GetFullPath().c_str(),START_OUTPUT,SHELL,true); + std::string varString = "CMAKE_"; + varString += lang; + varString += "_COMPILE_OBJECT"; + std::vector rules; + rules.push_back(this->Makefile->GetRequiredDefinition(varString.c_str())); + varString = "CMAKE_"; + varString += lang; + varString += "_FLAGS"; + std::string flags; + flags += this->Makefile->GetSafeDefinition(varString.c_str()); + flags += " "; + flags += this->GetIncludeFlags(lang); + + // Construct the command lines. + cmCustomCommandLines commandLines; + std::vector commands; + cmSystemTools::ExpandList(rules, commands); + cmLocalGenerator::RuleVariables vars; + vars.Language = lang; + vars.Source = sourceFile.c_str(); + vars.Object = objectFile.c_str(); + vars.ObjectDir = objectDir.c_str(); + vars.Flags = flags.c_str(); + for(std::vector::iterator i = commands.begin(); + i != commands.end(); ++i) + { + // Expand the full command line string. + this->ExpandRuleVariables(*i, vars); + + // Parse the string to get the custom command line. + cmCustomCommandLine commandLine; + std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } + + // Store this command line. + commandLines.push_back(commandLine); + } + + // Check for extra object-file dependencies. + std::vector depends; + const char* additionalDeps = source.GetProperty("OBJECT_DEPENDS"); + if(additionalDeps) + { + cmSystemTools::ExpandListArgument(additionalDeps, depends); + } + + // Generate a meaningful comment for the command. + std::string comment = "Building "; + comment += lang; + comment += " object "; + comment += this->Convert(ofname, START_OUTPUT); + + // Add the custom command to build the object file. + this->Makefile->AddCustomCommandToOutput( + ofname, + depends, + source.GetFullPath().c_str(), + commandLines, + comment.c_str(), + this->Makefile->GetStartOutputDirectory() + ); +} + +void cmLocalGenerator::AddBuildTargetRule(const char* llang, cmTarget& target) +{ + cmStdString objs; + std::vector objVector; + // Add all the sources outputs to the depends of the target + std::vector const& classes = target.GetSourceFiles(); + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); ++i) + { + cmSourceFile* sf = *i; + if(!sf->GetCustomCommand() && + !sf->GetPropertyAsBool("HEADER_FILE_ONLY") && + !sf->GetPropertyAsBool("EXTERNAL_OBJECT")) + { + std::string::size_type dir_len = 0; + dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); + dir_len += 1; + std::string obj = this->GetObjectFileNameWithoutTarget(*sf, dir_len); + if(!obj.empty()) + { + std::string ofname = this->Makefile->GetCurrentOutputDirectory(); + ofname += "/"; + ofname += obj; + objVector.push_back(ofname); + this->AddCustomCommandToCreateObject(ofname.c_str(), + llang, *(*i), target); + objs += this->Convert(ofname.c_str(),START_OUTPUT,MAKEFILE); + objs += " "; + } + } + } + std::string createRule = "CMAKE_"; + createRule += llang; + createRule += target.GetCreateRuleVariable(); + std::string targetName = target.GetFullName(); + // Executable : + // Shared Library: + // Static Library: + // Shared Module: + std::string linkLibs; // should be set + std::string flags; // should be set + std::string linkFlags; // should be set + this->GetTargetFlags(linkLibs, flags, linkFlags, target); + cmLocalGenerator::RuleVariables vars; + vars.Language = llang; + vars.Objects = objs.c_str(); + vars.ObjectDir = "."; + vars.Target = targetName.c_str(); + vars.LinkLibraries = linkLibs.c_str(); + vars.Flags = flags.c_str(); + vars.LinkFlags = linkFlags.c_str(); + + std::string langFlags; + this->AddLanguageFlags(langFlags, llang, 0); + vars.LanguageCompileFlags = langFlags.c_str(); + + cmCustomCommandLines commandLines; + std::vector rules; + rules.push_back(this->Makefile->GetRequiredDefinition(createRule.c_str())); + std::vector commands; + cmSystemTools::ExpandList(rules, commands); + for(std::vector::iterator i = commands.begin(); + i != commands.end(); ++i) + { + // Expand the full command line string. + this->ExpandRuleVariables(*i, vars); + // Parse the string to get the custom command line. + cmCustomCommandLine commandLine; + std::vector cmd = cmSystemTools::ParseArguments(i->c_str()); + for(std::vector::iterator a = cmd.begin(); + a != cmd.end(); ++a) + { + commandLine.push_back(*a); + } + + // Store this command line. + commandLines.push_back(commandLine); + } + std::string targetFullPath = target.GetFullPath(); + // Generate a meaningful comment for the command. + std::string comment = "Linking "; + comment += llang; + comment += " target "; + comment += this->Convert(targetFullPath.c_str(), START_OUTPUT); + this->Makefile->AddCustomCommandToOutput( + targetFullPath.c_str(), + objVector, + 0, + commandLines, + comment.c_str(), + this->Makefile->GetStartOutputDirectory() + ); + target.AddSourceFile + (this->Makefile->GetSource(targetFullPath.c_str())); +} + + +void cmLocalGenerator +::CreateCustomTargetsAndCommands(std::set const& lang) +{ + cmTargets &tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + cmTarget& target = l->second; + switch(target.GetType()) + { + case cmTarget::STATIC_LIBRARY: + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + case cmTarget::EXECUTABLE: + { + const char* llang = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!llang) + { + cmSystemTools::Error + ("CMake can not determine linker language for target:", + target.GetName()); + return; + } + // if the language is not in the set lang then create custom + // commands to build the target + if(lang.count(llang) == 0) + { + this->AddBuildTargetRule(llang, target); + } + } + break; + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + case cmTarget::INSTALL_FILES: + case cmTarget::INSTALL_PROGRAMS: + case cmTarget::INSTALL_DIRECTORY: + break; + } + } +} + +// List of variables that are replaced when +// rules are expanced. These variables are +// replaced in the form with GetSafeDefinition(var). +// ${LANG} is replaced in the variable first with all enabled +// languages. +static const char* ruleReplaceVars[] = +{ + "CMAKE_${LANG}_COMPILER", + "CMAKE_SHARED_LIBRARY_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_CREATE_${LANG}_FLAGS", + "CMAKE_SHARED_MODULE_${LANG}_FLAGS", + "CMAKE_SHARED_LIBRARY_${LANG}_FLAGS", + "CMAKE_${LANG}_LINK_FLAGS", + "CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG", + "CMAKE_${LANG}_ARCHIVE", + "CMAKE_AR", + "CMAKE_CURRENT_SOURCE_DIR", + "CMAKE_CURRENT_BINARY_DIR", + "CMAKE_RANLIB", + "CMAKE_LINKER", + 0 +}; + +std::string +cmLocalGenerator::ExpandRuleVariable(std::string const& variable, + const RuleVariables& replaceValues) +{ + if(replaceValues.LinkFlags) + { + if(variable == "LINK_FLAGS") + { + return replaceValues.LinkFlags; + } + } + if(replaceValues.Flags) + { + if(variable == "FLAGS") + { + return replaceValues.Flags; + } + } + + if(replaceValues.Source) + { + if(variable == "SOURCE") + { + return replaceValues.Source; + } + } + if(replaceValues.PreprocessedSource) + { + if(variable == "PREPROCESSED_SOURCE") + { + return replaceValues.PreprocessedSource; + } + } + if(replaceValues.AssemblySource) + { + if(variable == "ASSEMBLY_SOURCE") + { + return replaceValues.AssemblySource; + } + } + if(replaceValues.Object) + { + if(variable == "OBJECT") + { + return replaceValues.Object; + } + } + if(replaceValues.ObjectDir) + { + if(variable == "OBJECT_DIR") + { + return replaceValues.ObjectDir; + } + } + if(replaceValues.Objects) + { + if(variable == "OBJECTS") + { + return replaceValues.Objects; + } + } + if(replaceValues.ObjectsQuoted) + { + if(variable == "OBJECTS_QUOTED") + { + return replaceValues.ObjectsQuoted; + } + } + if(replaceValues.Defines && variable == "DEFINES") + { + return replaceValues.Defines; + } + if(replaceValues.TargetPDB ) + { + if(variable == "TARGET_PDB") + { + return replaceValues.TargetPDB; + } + } + + if(replaceValues.Target) + { + if(variable == "TARGET_QUOTED") + { + std::string targetQuoted = replaceValues.Target; + if(targetQuoted.size() && targetQuoted[0] != '\"') + { + targetQuoted = '\"'; + targetQuoted += replaceValues.Target; + targetQuoted += '\"'; + } + return targetQuoted; + } + if(replaceValues.LanguageCompileFlags) + { + if(variable == "LANGUAGE_COMPILE_FLAGS") + { + return replaceValues.LanguageCompileFlags; + } + } + if(replaceValues.Target) + { + if(variable == "TARGET") + { + return replaceValues.Target; + } + } + if(variable == "TARGET_IMPLIB") + { + return this->TargetImplib; + } + if(variable == "TARGET_VERSION_MAJOR") + { + if(replaceValues.TargetVersionMajor) + { + return replaceValues.TargetVersionMajor; + } + else + { + return "0"; + } + } + if(variable == "TARGET_VERSION_MINOR") + { + if(replaceValues.TargetVersionMinor) + { + return replaceValues.TargetVersionMinor; + } + else + { + return "0"; + } + } + if(replaceValues.Target) + { + if(variable == "TARGET_BASE") + { + // Strip the last extension off the target name. + std::string targetBase = replaceValues.Target; + std::string::size_type pos = targetBase.rfind("."); + if(pos != targetBase.npos) + { + return targetBase.substr(0, pos); + } + else + { + return targetBase; + } + } + } + } + if(replaceValues.TargetSOName) + { + if(variable == "TARGET_SONAME") + { + if(replaceValues.Language) + { + std::string name = "CMAKE_SHARED_LIBRARY_SONAME_"; + name += replaceValues.Language; + name += "_FLAG"; + if(this->Makefile->GetDefinition(name.c_str())) + { + return replaceValues.TargetSOName; + } + } + return ""; + } + } + if(replaceValues.TargetInstallNameDir) + { + if(variable == "TARGET_INSTALLNAME_DIR") + { + return replaceValues.TargetInstallNameDir; + } + } + if(replaceValues.LinkLibraries) + { + if(variable == "LINK_LIBRARIES") + { + return replaceValues.LinkLibraries; + } + } + if(variable == "CMAKE_COMMAND") + { + const char* cmcommand = + this->GetMakefile()->GetDefinition("CMAKE_COMMAND"); + return this->Convert(cmcommand, FULL, SHELL); + } + std::vector enabledLanguages; + this->GlobalGenerator->GetEnabledLanguages(enabledLanguages); + // loop over language specific replace variables + int pos = 0; + while(ruleReplaceVars[pos]) + { + for(std::vector::iterator i = enabledLanguages.begin(); + i != enabledLanguages.end(); ++i) + { + const char* lang = i->c_str(); + std::string actualReplace = ruleReplaceVars[pos]; + // If this is the compiler then look for the extra variable + // _COMPILER_ARG1 which must be the first argument to the compiler + const char* compilerArg1 = 0; + if(actualReplace == "CMAKE_${LANG}_COMPILER") + { + std::string arg1 = actualReplace + "_ARG1"; + cmSystemTools::ReplaceString(arg1, "${LANG}", lang); + compilerArg1 = this->Makefile->GetDefinition(arg1.c_str()); + } + if(actualReplace.find("${LANG}") != actualReplace.npos) + { + cmSystemTools::ReplaceString(actualReplace, "${LANG}", lang); + } + if(actualReplace == variable) + { + std::string replace = + this->Makefile->GetSafeDefinition(variable.c_str()); + // if the variable is not a FLAG then treat it like a path + if(variable.find("_FLAG") == variable.npos) + { + std::string ret = this->ConvertToOutputForExisting(replace.c_str()); + // if there is a required first argument to the compiler add it + // to the compiler string + if(compilerArg1) + { + ret += " "; + ret += compilerArg1; + } + return ret; + } + return replace; + } + } + pos++; + } + return variable; +} + + +void +cmLocalGenerator::ExpandRuleVariables(std::string& s, + const RuleVariables& replaceValues) +{ + std::vector enabledLanguages; + this->GlobalGenerator->GetEnabledLanguages(enabledLanguages); + std::string::size_type start = s.find('<'); + // no variables to expand + if(start == s.npos) + { + return; + } + std::string::size_type pos = 0; + std::string expandedInput; + while(start != s.npos && start < s.size()-2) + { + std::string::size_type end = s.find('>', start); + // if we find a < with no > we are done + if(end == s.npos) + { + return; + } + char c = s[start+1]; + // if the next char after the < is not A-Za-z then + // skip it and try to find the next < in the string + if(!isalpha(c)) + { + start = s.find('<', start+1); + } + else + { + // extract the var + std::string var = s.substr(start+1, end - start-1); + std::string replace = this->ExpandRuleVariable(var, + replaceValues); + expandedInput += s.substr(pos, start-pos); + expandedInput += replace; + // move to next one + start = s.find('<', start+var.size()+2); + pos = end+1; + } + } + // add the rest of the input + expandedInput += s.substr(pos, s.size()-pos); + s = expandedInput; +} + + +std::string +cmLocalGenerator::ConvertToOutputForExisting(const char* p) +{ + std::string ret = p; + if(this->WindowsShell && ret.find(' ') != ret.npos + && cmSystemTools::FileExists(p)) + { + if(cmSystemTools::GetShortPath(p, ret)) + { + return this->Convert(ret.c_str(), NONE, SHELL, true); + } + } + return this->Convert(p, START_OUTPUT, SHELL, true); +} + +const char* cmLocalGenerator::GetIncludeFlags(const char* lang) +{ + if(!lang) + { + return ""; + } + if(this->LanguageToIncludeFlags.count(lang)) + { + return this->LanguageToIncludeFlags[lang].c_str(); + } + cmOStringStream includeFlags; + std::vector includes; + this->GetIncludeDirectories(includes); + std::vector::iterator i; + + std::string flagVar = "CMAKE_INCLUDE_FLAG_"; + flagVar += lang; + const char* includeFlag = + this->Makefile->GetSafeDefinition(flagVar.c_str()); + flagVar = "CMAKE_INCLUDE_FLAG_SEP_"; + flagVar += lang; + const char* sep = this->Makefile->GetDefinition(flagVar.c_str()); + bool quotePaths = false; + if(this->Makefile->GetDefinition("CMAKE_QUOTE_INCLUDE_PATHS")) + { + quotePaths = true; + } + bool repeatFlag = true; + // should the include flag be repeated like ie. -IA -IB + if(!sep) + { + sep = " "; + } + else + { + // if there is a separator then the flag is not repeated but is only + // given once i.e. -classpath a:b:c + repeatFlag = false; + } + + // Support special system include flag if it is available and the + // normal flag is repeated for each directory. + std::string sysFlagVar = "CMAKE_INCLUDE_SYSTEM_FLAG_"; + sysFlagVar += lang; + const char* sysIncludeFlag = 0; + if(repeatFlag) + { + sysIncludeFlag = this->Makefile->GetDefinition(sysFlagVar.c_str()); + } + + bool flagUsed = false; + std::set emitted; +#ifdef __APPLE__ + emitted.insert("/System/Library/Frameworks"); +#endif + for(i = includes.begin(); i != includes.end(); ++i) + { +#ifdef __APPLE__ + if(cmSystemTools::IsPathToFramework(i->c_str())) + { + std::string frameworkDir = *i; + frameworkDir += "/../"; + frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str()); + if(emitted.insert(frameworkDir).second) + { + includeFlags + << "-F" + << this->ConvertToOutputForExisting(frameworkDir.c_str()) << " "; + } + continue; + } +#endif + std::string include = *i; + if(!flagUsed || repeatFlag) + { + if(sysIncludeFlag && + this->Makefile->IsSystemIncludeDirectory(i->c_str())) + { + includeFlags << sysIncludeFlag; + } + else + { + includeFlags << includeFlag; + } + flagUsed = true; + } + std::string includePath = this->ConvertToOutputForExisting(i->c_str()); + if(quotePaths && includePath.size() && includePath[0] != '\"') + { + includeFlags << "\""; + } + includeFlags << includePath; + if(quotePaths && includePath.size() && includePath[0] != '\"') + { + includeFlags << "\""; + } + includeFlags << sep; + } + std::string flags = includeFlags.str(); + // remove trailing separators + if((sep[0] != ' ') && flags[flags.size()-1] == sep[0]) + { + flags[flags.size()-1] = ' '; + } + std::string defineFlags = this->Makefile->GetDefineFlags(); + flags += defineFlags; + this->LanguageToIncludeFlags[lang] = flags; + + // Use this temorary variable for the return value to work-around a + // bogus GCC 2.95 warning. + const char* ret = this->LanguageToIncludeFlags[lang].c_str(); + return ret; +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::GetIncludeDirectories(std::vector& dirs, + bool filter_system_dirs) +{ + // Need to decide whether to automatically include the source and + // binary directories at the beginning of the include path. + bool includeSourceDir = false; + bool includeBinaryDir = false; + + // When automatic include directories are requested for a build then + // include the source and binary directories at the beginning of the + // include path to approximate include file behavior for an + // in-source build. This does not account for the case of a source + // file in a subdirectory of the current source directory but we + // cannot fix this because not all native build tools support + // per-source-file include paths. + if(this->Makefile->IsOn("CMAKE_INCLUDE_CURRENT_DIR")) + { + includeSourceDir = true; + includeBinaryDir = true; + } + + // CMake versions below 2.0 would add the source tree to the -I path + // automatically. Preserve compatibility. + if(this->NeedBackwardsCompatibility(1,9)) + { + includeSourceDir = true; + } + + // Hack for VTK 4.0 - 4.4 which depend on the old behavior but do + // not set the backwards compatibility level automatically. + const char* vtkSourceDir = + this->Makefile->GetDefinition("VTK_SOURCE_DIR"); + if(vtkSourceDir) + { + const char* vtk_major = + this->Makefile->GetDefinition("VTK_MAJOR_VERSION"); + const char* vtk_minor = + this->Makefile->GetDefinition("VTK_MINOR_VERSION"); + vtk_major = vtk_major? vtk_major : "4"; + vtk_minor = vtk_minor? vtk_minor : "4"; + int vmajor = 0; + int vminor = 0; + if(sscanf(vtk_major, "%d", &vmajor) && + sscanf(vtk_minor, "%d", &vminor) && vmajor == 4 && vminor <= 4) + { + includeSourceDir = true; + } + } + + // Do not repeat an include path. + std::set emitted; + + // Store the automatic include paths. + if(includeBinaryDir) + { + dirs.push_back(this->Makefile->GetStartOutputDirectory()); + emitted.insert(this->Makefile->GetStartOutputDirectory()); + } + if(includeSourceDir) + { + if(emitted.find(this->Makefile->GetStartDirectory()) == emitted.end()) + { + dirs.push_back(this->Makefile->GetStartDirectory()); + emitted.insert(this->Makefile->GetStartDirectory()); + } + } + + if(filter_system_dirs) + { + // Do not explicitly add the standard include path "/usr/include". + // This can cause problems with certain standard library + // implementations because the wrong headers may be found first. + emitted.insert("/usr/include"); + if(const char* implicitIncludes = this->Makefile->GetDefinition + ("CMAKE_PLATFORM_IMPLICIT_INCLUDE_DIRECTORIES")) + { + std::vector implicitIncludeVec; + cmSystemTools::ExpandListArgument(implicitIncludes, implicitIncludeVec); + for(unsigned int k = 0; k < implicitIncludeVec.size(); ++k) + { + emitted.insert(implicitIncludeVec[k]); + } + } + } + + // Get the project-specified include directories. + std::vector& includes = + this->Makefile->GetIncludeDirectories(); + + // Support putting all the in-project include directories first if + // it is requested by the project. + if(this->Makefile->IsOn("CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE")) + { + const char* topSourceDir = this->Makefile->GetHomeDirectory(); + const char* topBinaryDir = this->Makefile->GetHomeOutputDirectory(); + for(std::vector::iterator i = includes.begin(); + i != includes.end(); ++i) + { + // Emit this directory only if it is a subdirectory of the + // top-level source or binary tree. + if(cmSystemTools::ComparePath(i->c_str(), topSourceDir) || + cmSystemTools::ComparePath(i->c_str(), topBinaryDir) || + cmSystemTools::IsSubDirectory(i->c_str(), topSourceDir) || + cmSystemTools::IsSubDirectory(i->c_str(), topBinaryDir)) + { + if(emitted.insert(*i).second) + { + dirs.push_back(*i); + } + } + } + } + + // Construct the final ordered include directory list. + for(std::vector::iterator i = includes.begin(); + i != includes.end(); ++i) + { + if(emitted.insert(*i).second) + { + dirs.push_back(*i); + } + } +} + +void cmLocalGenerator::GetTargetFlags(std::string& linkLibs, + std::string& flags, + std::string& linkFlags, + cmTarget& target) +{ + std::string buildType = + this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + buildType = cmSystemTools::UpperCase(buildType); + const char* libraryLinkVariable = + "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library + + switch(target.GetType()) + { + case cmTarget::STATIC_LIBRARY: + { + const char* targetLinkFlags = + target.GetProperty("STATIC_LIBRARY_FLAGS"); + if(targetLinkFlags) + { + linkFlags += targetLinkFlags; + linkFlags += " "; + } + } + break; + case cmTarget::MODULE_LIBRARY: + libraryLinkVariable = "CMAKE_MODULE_LINKER_FLAGS"; + case cmTarget::SHARED_LIBRARY: + { + linkFlags = this->Makefile->GetSafeDefinition(libraryLinkVariable); + linkFlags += " "; + if(buildType.size()) + { + std::string build = libraryLinkVariable; + build += "_"; + build += buildType; + linkFlags += this->Makefile->GetSafeDefinition(build.c_str()); + linkFlags += " "; + } + if(this->Makefile->IsOn("WIN32") && + !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) + { + const std::vector& sources = target.GetSourceFiles(); + for(std::vector::const_iterator i = sources.begin(); + i != sources.end(); ++i) + { + cmSourceFile* sf = *i; + if(sf->GetExtension() == "def") + { + linkFlags += + this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); + linkFlags += this->Convert(sf->GetFullPath().c_str(), + START_OUTPUT, SHELL); + linkFlags += " "; + } + } + } + const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); + if(targetLinkFlags) + { + linkFlags += targetLinkFlags; + linkFlags += " "; + std::string configLinkFlags = targetLinkFlags; + configLinkFlags += buildType; + targetLinkFlags = target.GetProperty(configLinkFlags.c_str()); + if(targetLinkFlags) + { + linkFlags += targetLinkFlags; + linkFlags += " "; + } + } + cmOStringStream linklibsStr; + this->OutputLinkLibraries(linklibsStr, target, false); + linkLibs = linklibsStr.str(); + } + break; + case cmTarget::EXECUTABLE: + { + linkFlags += + this->Makefile->GetSafeDefinition("CMAKE_EXE_LINKER_FLAGS"); + linkFlags += " "; + if(buildType.size()) + { + std::string build = "CMAKE_EXE_LINKER_FLAGS_"; + build += buildType; + linkFlags += this->Makefile->GetSafeDefinition(build.c_str()); + linkFlags += " "; + } + const char* linkLanguage = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error + ("CMake can not determine linker language for target:", + target.GetName()); + return; + } + std::string langVar = "CMAKE_"; + langVar += linkLanguage; + std::string flagsVar = langVar + "_FLAGS"; + std::string sharedFlagsVar = "CMAKE_SHARED_LIBRARY_"; + sharedFlagsVar += linkLanguage; + sharedFlagsVar += "_FLAGS"; + flags += this->Makefile->GetSafeDefinition(flagsVar.c_str()); + flags += " "; + flags += this->Makefile->GetSafeDefinition(sharedFlagsVar.c_str()); + flags += " "; + cmOStringStream linklibs; + this->OutputLinkLibraries(linklibs, target, false); + linkLibs = linklibs.str(); + if(cmSystemTools::IsOn + (this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) + { + std::string sFlagVar = std::string("CMAKE_SHARED_BUILD_") + + linkLanguage + std::string("_FLAGS"); + linkFlags += this->Makefile->GetSafeDefinition(sFlagVar.c_str()); + linkFlags += " "; + } + if ( target.GetPropertyAsBool("WIN32_EXECUTABLE") ) + { + linkFlags += + this->Makefile->GetSafeDefinition("CMAKE_CREATE_WIN32_EXE"); + linkFlags += " "; + } + else + { + linkFlags += + this->Makefile->GetSafeDefinition("CMAKE_CREATE_CONSOLE_EXE"); + linkFlags += " "; + } + const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); + if(targetLinkFlags) + { + linkFlags += targetLinkFlags; + linkFlags += " "; + std::string configLinkFlags = targetLinkFlags; + configLinkFlags += buildType; + targetLinkFlags = target.GetProperty(configLinkFlags.c_str()); + if(targetLinkFlags) + { + linkFlags += targetLinkFlags; + linkFlags += " "; + } + } + } + break; + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + case cmTarget::INSTALL_FILES: + case cmTarget::INSTALL_PROGRAMS: + case cmTarget::INSTALL_DIRECTORY: + break; + } +} + +std::string cmLocalGenerator::ConvertToLinkReference(std::string const& lib) +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // Work-ardound command line parsing limitations in MSVC 6.0 and + // Watcom. + if(this->Makefile->IsOn("MSVC60") || this->Makefile->IsOn("WATCOM")) + { + // Search for the last space. + std::string::size_type pos = lib.rfind(' '); + if(pos != lib.npos) + { + // Find the slash after the last space, if any. + pos = lib.find('/', pos); + + // Convert the portion of the path with a space to a short path. + std::string sp; + if(cmSystemTools::GetShortPath(lib.substr(0, pos).c_str(), sp)) + { + // Append the rest of the path with no space. + sp += lib.substr(pos); + + // Convert to an output path. + return this->Convert(sp.c_str(), NONE, SHELL); + } + } + } +#endif + + // Normal behavior. + return this->Convert(lib.c_str(), START_OUTPUT, SHELL); +} + +/** + * Output the linking rules on a command line. For executables, + * targetLibrary should be a NULL pointer. For libraries, it should point + * to the name of the library. This will not link a library against itself. + */ +void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, + cmTarget& tgt, + bool relink) +{ + const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE"); + cmComputeLinkInformation* pcli = tgt.GetLinkInformation(config); + if(!pcli) + { + return; + } + cmComputeLinkInformation& cli = *pcli; + + // Collect library linking flags command line options. + std::string linkLibs; + + const char* linkLanguage = cli.GetLinkLanguage(); + + std::string libPathFlag = + this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); + std::string libPathTerminator = + this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); + + // Flags to link an executable to shared libraries. + std::string linkFlagsVar = "CMAKE_SHARED_LIBRARY_LINK_"; + linkFlagsVar += linkLanguage; + linkFlagsVar += "_FLAGS"; + if( tgt.GetType() == cmTarget::EXECUTABLE ) + { + linkLibs = this->Makefile->GetSafeDefinition(linkFlagsVar.c_str()); + linkLibs += " "; + } + + // Append the framework search path flags. + std::vector const& fwDirs = cli.GetFrameworkPaths(); + for(std::vector::const_iterator fdi = fwDirs.begin(); + fdi != fwDirs.end(); ++fdi) + { + linkLibs += "-F"; + linkLibs += this->Convert(fdi->c_str(), NONE, SHELL, false); + linkLibs += " "; + } + + // Append the library search path flags. + std::vector const& libDirs = cli.GetDirectories(); + for(std::vector::const_iterator libDir = libDirs.begin(); + libDir != libDirs.end(); ++libDir) + { + std::string libpath = this->ConvertToOutputForExisting(libDir->c_str()); + linkLibs += libPathFlag; + linkLibs += libpath; + linkLibs += libPathTerminator; + linkLibs += " "; + } + + // Append the link items. + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& items = cli.GetItems(); + for(ItemVector::const_iterator li = items.begin(); li != items.end(); ++li) + { + if(li->IsPath) + { + linkLibs += this->ConvertToLinkReference(li->Value); + } + else + { + linkLibs += li->Value; + } + linkLibs += " "; + } + + // Write the library flags to the build rule. + fout << linkLibs; + + // Get the RPATH entries. + std::vector runtimeDirs; + cli.GetRPath(runtimeDirs, relink); + + // Check what kind of rpath flags to use. + if(cli.GetRuntimeSep().empty()) + { + // Each rpath entry gets its own option ("-R a -R b -R c") + std::string rpath; + for(std::vector::iterator ri = runtimeDirs.begin(); + ri != runtimeDirs.end(); ++ri) + { + rpath += cli.GetRuntimeFlag(); + rpath += this->Convert(ri->c_str(), FULL, SHELL, false); + rpath += " "; + } + fout << rpath; + } + else + { + // All rpath entries are combined ("-Wl,-rpath,a:b:c"). + std::string rpath = cli.GetRPathString(relink); + + // Store the rpath option in the stream. + if(!rpath.empty()) + { + fout << cli.GetRuntimeFlag(); + fout << this->EscapeForShell(rpath.c_str(), true); + fout << " "; + } + } + + // Add the linker runtime search path if any. + std::string rpath_link = cli.GetRPathLinkString(); + if(!cli.GetRPathLinkFlag().empty() && !rpath_link.empty()) + { + fout << cli.GetRPathLinkFlag(); + fout << this->EscapeForShell(rpath_link.c_str(), true); + fout << " "; + } + + // Add standard libraries for this language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += cli.GetLinkLanguage(); + standardLibsVar += "_STANDARD_LIBRARIES"; + if(const char* stdLibs = + this->Makefile->GetDefinition(standardLibsVar.c_str())) + { + fout << stdLibs << " "; + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::AddLanguageFlags(std::string& flags, + const char* lang, + const char* config) +{ + // Add language-specific flags. + std::string flagsVar = "CMAKE_"; + flagsVar += lang; + flagsVar += "_FLAGS"; + if(this->EmitUniversalBinaryFlags) + { + const char* osxArch = + this->Makefile->GetDefinition("CMAKE_OSX_ARCHITECTURES"); + const char* sysroot = + this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT"); + const char* sysrootDefault = + this->Makefile->GetDefinition("CMAKE_OSX_SYSROOT_DEFAULT"); + bool flagsUsed = false; + if(osxArch && sysroot && lang && lang[0] =='C') + { + std::vector archs; + cmSystemTools::ExpandListArgument(std::string(osxArch), + archs); + bool addArchFlag = true; + if(archs.size() == 1) + { + const char* archOrig = + this->Makefile->GetSafeDefinition("CMAKE_OSX_ARCHITECTURES_DEFAULT"); + if(archs[0] == archOrig) + { + addArchFlag = false; + } + } + // if there is more than one arch add the -arch and + // -isysroot flags, or if there is one arch flag, but + // it is not the default -arch flag for the system, then + // add it. Otherwize do not add -arch and -isysroot + if(addArchFlag) + { + for( std::vector::iterator i = archs.begin(); + i != archs.end(); ++i) + { + flags += " -arch "; + flags += *i; + } + flags += " -isysroot "; + flags += sysroot; + flagsUsed = true; + } + } + if(!flagsUsed && sysroot && sysrootDefault && + strcmp(sysroot, sysrootDefault) != 0) + { + flags += " -isysroot "; + flags += sysroot; + } + } + this->AddConfigVariableFlags(flags, flagsVar.c_str(), config); +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::GetRealDependency(const char* inName, + const char* config) +{ + // Older CMake code may specify the dependency using the target + // output file rather than the target name. Such code would have + // been written before there was support for target properties that + // modify the name so stripping down to just the file name should + // produce the target name in this case. + std::string name = cmSystemTools::GetFilenameName(inName); + if(cmSystemTools::GetFilenameLastExtension(name) == ".exe") + { + name = cmSystemTools::GetFilenameWithoutLastExtension(name); + } + + // Look for a CMake target with the given name. + if(cmTarget* target = this->Makefile->FindTargetToUse(name.c_str())) + { + // make sure it is not just a coincidence that the target name + // found is part of the inName + if(cmSystemTools::FileIsFullPath(inName)) + { + std::string tLocation = target->GetLocation(config); + tLocation = cmSystemTools::GetFilenamePath(tLocation); + std::string depLocation = cmSystemTools::GetFilenamePath( + std::string(inName)); + depLocation = cmSystemTools::CollapseFullPath(depLocation.c_str()); + tLocation = cmSystemTools::CollapseFullPath(tLocation.c_str()); + if(depLocation != tLocation) + { + // it is a full path to a depend that has the same name + // as a target but is in a different location so do not use + // the target as the depend + return inName; + } + } + switch (target->GetType()) + { + case cmTarget::EXECUTABLE: + case cmTarget::STATIC_LIBRARY: + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + { + // Get the location of the target's output file and depend on it. + if(const char* location = target->GetLocation(config)) + { + return location; + } + } + break; + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + // Depending on a utility target may not work but just trust + // the user to have given a valid name. + return inName; + case cmTarget::INSTALL_FILES: + case cmTarget::INSTALL_PROGRAMS: + case cmTarget::INSTALL_DIRECTORY: + break; + } + } + + // The name was not that of a CMake target. It must name a file. + if(cmSystemTools::FileIsFullPath(inName)) + { + // This is a full path. Return it as given. + return inName; + } + // Treat the name as relative to the source directory in which it + // was given. + name = this->Makefile->GetCurrentDirectory(); + name += "/"; + name += inName; + return name; +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::GetRealLocation(const char* inName, + const char* config) +{ + std::string outName=inName; + // Look for a CMake target with the given name, which is an executable + // and which can be run + cmTarget* target = this->Makefile->FindTargetToUse(inName); + if ((target != 0) + && (target->GetType() == cmTarget::EXECUTABLE) + && ((this->Makefile->IsOn("CMAKE_CROSSCOMPILING") == false) + || (target->IsImported() == true))) + { + outName = target->GetLocation( config ); + } + return outName; +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::AddSharedFlags(std::string& flags, + const char* lang, + bool shared) +{ + std::string flagsVar; + + // Add flags for dealing with shared libraries for this language. + if(shared) + { + flagsVar = "CMAKE_SHARED_LIBRARY_"; + flagsVar += lang; + flagsVar += "_FLAGS"; + this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); + } + + // Add flags specific to shared builds. + if(cmSystemTools::IsOn(this->Makefile->GetDefinition("BUILD_SHARED_LIBS"))) + { + flagsVar = "CMAKE_SHARED_BUILD_"; + flagsVar += lang; + flagsVar += "_FLAGS"; + this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::AddConfigVariableFlags(std::string& flags, + const char* var, + const char* config) +{ + // Add the flags from the variable itself. + std::string flagsVar = var; + this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); + // Add the flags from the build-type specific variable. + if(config && *config) + { + flagsVar += "_"; + flagsVar += cmSystemTools::UpperCase(config); + this->AppendFlags(flags, this->Makefile->GetDefinition(flagsVar.c_str())); + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::AppendFlags(std::string& flags, + const char* newFlags) +{ + if(newFlags && *newFlags) + { + std::string newf = newFlags; + if(flags.size()) + { + flags += " "; + } + flags += newFlags; + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::AppendDefines(std::string& defines, + const char* defines_list, + const char* lang) +{ + // Short-circuit if there are no definitions. + if(!defines_list) + { + return; + } + + // Expand the list of definitions. + std::vector defines_vec; + cmSystemTools::ExpandListArgument(defines_list, defines_vec); + + // Short-circuit if there are no definitions. + if(defines_vec.empty()) + { + return; + } + + // Lookup the define flag for the current language. + std::string dflag = "-D"; + if(lang) + { + std::string defineFlagVar = "CMAKE_"; + defineFlagVar += lang; + defineFlagVar += "_DEFINE_FLAG"; + const char* df = this->Makefile->GetDefinition(defineFlagVar.c_str()); + if(df && *df) + { + dflag = df; + } + } + + // Add each definition to the command line with appropriate escapes. + const char* dsep = defines.empty()? "" : " "; + for(std::vector::const_iterator di = defines_vec.begin(); + di != defines_vec.end(); ++di) + { + // Skip unsupported definitions. + if(!this->CheckDefinition(*di)) + { + continue; + } + + // Separate from previous definitions. + defines += dsep; + dsep = " "; + + // Append the definition with proper escaping. + defines += dflag; + if(this->WatcomWMake) + { + // The Watcom compiler does its own command line parsing instead + // of using the windows shell rules. Definitions are one of + // -DNAME + // -DNAME= + // -DNAME="c-string with spaces and other characters(?@#$)" + // + // Watcom will properly parse each of these cases from the + // command line without any escapes. However we still have to + // get the '$' and '#' characters through WMake as '$$' and + // '$#'. + for(const char* c = di->c_str(); *c; ++c) + { + if(*c == '$' || *c == '#') + { + defines += '$'; + } + defines += *c; + } + } + else + { + // Make the definition appear properly on the command line. + defines += this->EscapeForShell(di->c_str(), true); + } + } +} + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator::ConstructComment(const cmCustomCommand& cc, + const char* default_comment) +{ + // Check for a comment provided with the command. + if(cc.GetComment()) + { + return cc.GetComment(); + } + + // Construct a reasonable default comment if possible. + if(!cc.GetOutputs().empty()) + { + std::string comment; + comment = "Generating "; + const char* sep = ""; + for(std::vector::const_iterator o = cc.GetOutputs().begin(); + o != cc.GetOutputs().end(); ++o) + { + comment += sep; + comment += this->Convert(o->c_str(), cmLocalGenerator::START_OUTPUT); + sep = ", "; + } + return comment; + } + + // Otherwise use the provided default. + return default_comment; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator::ConvertToOptionallyRelativeOutputPath(const char* remote) +{ + return this->Convert(remote, START_OUTPUT, SHELL, true); +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::Convert(const char* source, + RelativeRoot relative, + OutputFormat output, + bool optional) +{ + // Make sure the relative path conversion components are set. + if(!this->PathConversionsSetup) + { + this->SetupPathConversions(); + this->PathConversionsSetup = true; + } + + // Convert the path to a relative path. + std::string result = source; + + if (!optional || this->UseRelativePaths) + { + switch (relative) + { + case HOME: + //result = cmSystemTools::CollapseFullPath(result.c_str()); + result = this->ConvertToRelativePath(this->HomeDirectoryComponents, + result.c_str()); + break; + case START: + //result = cmSystemTools::CollapseFullPath(result.c_str()); + result = this->ConvertToRelativePath(this->StartDirectoryComponents, + result.c_str()); + break; + case HOME_OUTPUT: + //result = cmSystemTools::CollapseFullPath(result.c_str()); + result = + this->ConvertToRelativePath(this->HomeOutputDirectoryComponents, + result.c_str()); + break; + case START_OUTPUT: + //result = cmSystemTools::CollapseFullPath(result.c_str()); + result = + this->ConvertToRelativePath(this->StartOutputDirectoryComponents, + result.c_str()); + break; + case FULL: + result = cmSystemTools::CollapseFullPath(result.c_str()); + break; + case NONE: + break; + } + } + // Now convert it to an output path. + if (output == MAKEFILE) + { + result = cmSystemTools::ConvertToOutputPath(result.c_str()); + } + else if( output == SHELL) + { + // For the MSYS shell convert drive letters to posix paths, so + // that c:/some/path becomes /c/some/path. This is needed to + // avoid problems with the shell path translation. + if(this->MSYSShell && !this->LinkScriptShell) + { + if(result.size() > 2 && result[1] == ':') + { + result[1] = result[0]; + result[0] = '/'; + } + } + if(this->WindowsShell) + { + std::string::size_type pos = 0; + while((pos = result.find('/', pos)) != std::string::npos) + { + result[pos] = '\\'; + pos++; + } + } + result = this->EscapeForShell(result.c_str(), true, false); + } + return result; +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::FindRelativePathTopSource() +{ + // Relative path conversion within a single tree managed by CMake is + // safe. We can use our parent relative path top if and only if + // this is a subdirectory of that top. + if(cmLocalGenerator* parent = this->GetParent()) + { + std::string parentTop = parent->FindRelativePathTopSource(); + if(cmSystemTools::IsSubDirectory( + this->Makefile->GetStartDirectory(), parentTop.c_str())) + { + return parentTop; + } + } + + // Otherwise this directory itself is the new top. + return this->Makefile->GetStartDirectory(); +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::FindRelativePathTopBinary() +{ + // Relative path conversion within a single tree managed by CMake is + // safe. We can use our parent relative path top if and only if + // this is a subdirectory of that top. + if(cmLocalGenerator* parent = this->GetParent()) + { + std::string parentTop = parent->FindRelativePathTopBinary(); + if(cmSystemTools::IsSubDirectory( + this->Makefile->GetStartOutputDirectory(), parentTop.c_str())) + { + return parentTop; + } + } + + // Otherwise this directory itself is the new top. + return this->Makefile->GetStartOutputDirectory(); +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::ConfigureRelativePaths() +{ + // Relative path conversion inside the source tree is not used to + // construct relative paths passed to build tools so it is safe to + // even when the source is a network path. + std::string source = this->FindRelativePathTopSource(); + this->RelativePathTopSource = source; + + // The current working directory on Windows cannot be a network + // path. Therefore relative paths cannot work when the binary tree + // is a network path. + std::string binary = this->FindRelativePathTopBinary(); + if(binary.size() < 2 || binary.substr(0, 2) != "//") + { + this->RelativePathTopBinary = binary; + } + else + { + this->RelativePathTopBinary = ""; + } +} + +//---------------------------------------------------------------------------- +static bool cmLocalGeneratorNotAbove(const char* a, const char* b) +{ + return (cmSystemTools::ComparePath(a, b) || + cmSystemTools::IsSubDirectory(a, b)); +} + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator::ConvertToRelativePath(const std::vector& local, + const char* in_remote) +{ + // The path should never be quoted. + assert(in_remote[0] != '\"'); + + // The local path should never have a trailing slash. + assert(local.size() > 0 && !(local[local.size()-1] == "")); + + // If the path is already relative then just return the path. + if(!cmSystemTools::FileIsFullPath(in_remote)) + { + return in_remote; + } + + // Make sure relative path conversion is configured. + if(!this->RelativePathsConfigured) + { + this->ConfigureRelativePaths(); + this->RelativePathsConfigured = true; + } + + // Skip conversion if the path and local are not both in the source + // or both in the binary tree. + std::string local_path = cmSystemTools::JoinPath(local); + if(!((cmLocalGeneratorNotAbove(local_path.c_str(), + this->RelativePathTopBinary.c_str()) && + cmLocalGeneratorNotAbove(in_remote, + this->RelativePathTopBinary.c_str())) || + (cmLocalGeneratorNotAbove(local_path.c_str(), + this->RelativePathTopSource.c_str()) && + cmLocalGeneratorNotAbove(in_remote, + this->RelativePathTopSource.c_str())))) + { + return in_remote; + } + + // Identify the longest shared path component between the remote + // path and the local path. + std::vector remote; + cmSystemTools::SplitPath(in_remote, remote); + unsigned int common=0; + while(common < remote.size() && + common < local.size() && + cmSystemTools::ComparePath(remote[common].c_str(), + local[common].c_str())) + { + ++common; + } + + // If no part of the path is in common then return the full path. + if(common == 0) + { + return in_remote; + } + + // If the entire path is in common then just return a ".". + if(common == remote.size() && + common == local.size()) + { + return "."; + } + + // If the entire path is in common except for a trailing slash then + // just return a "./". + if(common+1 == remote.size() && + remote[common].size() == 0 && + common == local.size()) + { + return "./"; + } + + // Construct the relative path. + std::string relative; + + // First add enough ../ to get up to the level of the shared portion + // of the path. Leave off the trailing slash. Note that the last + // component of local will never be empty because local should never + // have a trailing slash. + for(unsigned int i=common; i < local.size(); ++i) + { + relative += ".."; + if(i < local.size()-1) + { + relative += "/"; + } + } + + // Now add the portion of the destination path that is not included + // in the shared portion of the path. Add a slash the first time + // only if there was already something in the path. If there was a + // trailing slash in the input then the last iteration of the loop + // will add a slash followed by an empty string which will preserve + // the trailing slash in the output. + for(unsigned int i=common; i < remote.size(); ++i) + { + if(relative.size() > 0) + { + relative += "/"; + } + relative += remote[i]; + } + + // Finally return the path. + return relative; +} + +//---------------------------------------------------------------------------- +void +cmLocalGenerator +::GenerateTargetInstallRules( + std::ostream& os, const char* config, + std::vector const& configurationTypes) +{ + // Convert the old-style install specification from each target to + // an install generator and run it. + cmTargets& tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + // Include the user-specified pre-install script for this target. + if(const char* preinstall = l->second.GetProperty("PRE_INSTALL_SCRIPT")) + { + cmInstallScriptGenerator g(preinstall, false, 0); + g.Generate(os, config, configurationTypes); + } + + // Install this target if a destination is given. + if(l->second.GetInstallPath() != "") + { + // Compute the full install destination. Note that converting + // to unix slashes also removes any trailing slash. + // We also skip over the leading slash given by the user. + std::string destination = l->second.GetInstallPath().substr(1); + cmSystemTools::ConvertToUnixSlashes(destination); + + // Generate the proper install generator for this target type. + switch(l->second.GetType()) + { + case cmTarget::EXECUTABLE: + case cmTarget::STATIC_LIBRARY: + case cmTarget::MODULE_LIBRARY: + { + // Use a target install generator. + cmInstallTargetGenerator g(l->second, destination.c_str(), false); + g.Generate(os, config, configurationTypes); + } + break; + case cmTarget::SHARED_LIBRARY: + { +#if defined(_WIN32) || defined(__CYGWIN__) + // Special code to handle DLL. Install the import library + // to the normal destination and the DLL to the runtime + // destination. + cmInstallTargetGenerator g1(l->second, destination.c_str(), true); + g1.Generate(os, config, configurationTypes); + // We also skip over the leading slash given by the user. + destination = l->second.GetRuntimeInstallPath().substr(1); + cmSystemTools::ConvertToUnixSlashes(destination); + cmInstallTargetGenerator g2(l->second, destination.c_str(), false); + g2.Generate(os, config, configurationTypes); +#else + // Use a target install generator. + cmInstallTargetGenerator g(l->second, destination.c_str(), false); + g.Generate(os, config, configurationTypes); +#endif + } + break; + default: + break; + } + } + + // Include the user-specified post-install script for this target. + if(const char* postinstall = l->second.GetProperty("POST_INSTALL_SCRIPT")) + { + cmInstallScriptGenerator g(postinstall, false, 0); + g.Generate(os, config, configurationTypes); + } + } +} + +#if defined(CM_LG_ENCODE_OBJECT_NAMES) +static std::string cmLocalGeneratorMD5(const char* input) +{ + char md5out[32]; + cmsysMD5* md5 = cmsysMD5_New(); + cmsysMD5_Initialize(md5); + cmsysMD5_Append(md5, reinterpret_cast(input), -1); + cmsysMD5_FinalizeHex(md5, md5out); + cmsysMD5_Delete(md5); + return std::string(md5out, 32); +} + +static bool +cmLocalGeneratorShortenObjectName(std::string& objName, + std::string::size_type max_len) +{ + // Replace the beginning of the path portion of the object name with + // its own md5 sum. + std::string::size_type pos = objName.find('/', objName.size()-max_len+32); + if(pos != objName.npos) + { + std::string md5name = cmLocalGeneratorMD5(objName.substr(0, pos).c_str()); + md5name += objName.substr(pos); + objName = md5name; + + // The object name is now short enough. + return true; + } + else + { + // The object name could not be shortened enough. + return false; + } +} + +static bool cmLocalGeneratorCheckObjectName(std::string& objName, + std::string::size_type dir_len) +{ + // Choose a maximum file name length. +#if defined(_WIN32) || defined(__CYGWIN__) + std::string::size_type const max_total_len = 250; +#else + std::string::size_type const max_total_len = 1000; +#endif + + // Enforce the maximum file name length if possible. + std::string::size_type max_obj_len = max_total_len; + if(dir_len < max_total_len) + { + max_obj_len = max_total_len - dir_len; + if(objName.size() > max_obj_len) + { + // The current object file name is too long. Try to shorten it. + return cmLocalGeneratorShortenObjectName(objName, max_obj_len); + } + else + { + // The object file name is short enough. + return true; + } + } + else + { + // The build directory in which the object will be stored is + // already too deep. + return false; + } +} +#endif + +//---------------------------------------------------------------------------- +std::string& +cmLocalGenerator +::CreateSafeUniqueObjectFileName(const char* sin, + std::string::size_type dir_len) +{ + // Look for an existing mapped name for this object file. + std::map::iterator it = + this->UniqueObjectNamesMap.find(sin); + + // If no entry exists create one. + if(it == this->UniqueObjectNamesMap.end()) + { + // Start with the original name. + std::string ssin = sin; + + // Avoid full paths by removing leading slashes. + std::string::size_type pos = 0; + for(;pos < ssin.size() && ssin[pos] == '/'; ++pos); + ssin = ssin.substr(pos); + + // Avoid full paths by removing colons. + cmSystemTools::ReplaceString(ssin, ":", "_"); + + // Avoid relative paths that go up the tree. + cmSystemTools::ReplaceString(ssin, "../", "__/"); + + // Avoid spaces. + cmSystemTools::ReplaceString(ssin, " ", "_"); + + // Mangle the name if necessary. + if(this->Makefile->IsOn("CMAKE_MANGLE_OBJECT_FILE_NAMES")) + { + bool done; + int cc = 0; + char rpstr[100]; + sprintf(rpstr, "_p_"); + cmSystemTools::ReplaceString(ssin, "+", rpstr); + std::string sssin = sin; + do + { + done = true; + for ( it = this->UniqueObjectNamesMap.begin(); + it != this->UniqueObjectNamesMap.end(); + ++ it ) + { + if ( it->second == ssin ) + { + done = false; + } + } + if ( done ) + { + break; + } + sssin = ssin; + cmSystemTools::ReplaceString(ssin, "_p_", rpstr); + sprintf(rpstr, "_p%d_", cc++); + } + while ( !done ); + } + +#if defined(CM_LG_ENCODE_OBJECT_NAMES) + cmLocalGeneratorCheckObjectName(ssin, dir_len); +#else + (void)dir_len; +#endif + + // Insert the newly mapped object file name. + std::map::value_type e(sin, ssin); + it = this->UniqueObjectNamesMap.insert(e).first; + } + + // Return the map entry. + return it->second; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator +::GetObjectFileNameWithoutTarget(const cmSourceFile& source, + std::string::size_type dir_len, + bool* hasSourceExtension) +{ + // Construct the object file name using the full path to the source + // file which is its only unique identification. + const char* fullPath = source.GetFullPath().c_str(); + + // Try referencing the source relative to the source tree. + std::string relFromSource = this->Convert(fullPath, START); + assert(!relFromSource.empty()); + bool relSource = !cmSystemTools::FileIsFullPath(relFromSource.c_str()); + bool subSource = relSource && relFromSource[0] != '.'; + + // Try referencing the source relative to the binary tree. + std::string relFromBinary = this->Convert(fullPath, START_OUTPUT); + assert(!relFromBinary.empty()); + bool relBinary = !cmSystemTools::FileIsFullPath(relFromBinary.c_str()); + bool subBinary = relBinary && relFromBinary[0] != '.'; + + // Select a nice-looking reference to the source file to construct + // the object file name. + std::string objectName; + if((relSource && !relBinary) || (subSource && !subBinary)) + { + objectName = relFromSource; + } + else if((relBinary && !relSource) || (subBinary && !subSource)) + { + objectName = relFromBinary; + } + else if(relFromBinary.length() < relFromSource.length()) + { + objectName = relFromBinary; + } + else + { + objectName = relFromSource; + } + + // if it is still a full path check for the try compile case + // try compile never have in source sources, and should not + // have conflicting source file names in the same target + if(cmSystemTools::FileIsFullPath(objectName.c_str())) + { + if(this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile()) + { + objectName = cmSystemTools::GetFilenameName(source.GetFullPath()); + } + } + + // Replace the original source file extension with the object file + // extension. + bool keptSourceExtension = true; + if(!source.GetPropertyAsBool("KEEP_EXTENSION")) + { + // Decide whether this language wants to replace the source + // extension with the object extension. For CMake 2.4 + // compatibility do this by default. + bool replaceExt = this->NeedBackwardsCompatibility(2, 4); + if(!replaceExt) + { + std::string repVar = "CMAKE_"; + repVar += source.GetLanguage(); + repVar += "_OUTPUT_EXTENSION_REPLACE"; + replaceExt = this->Makefile->IsOn(repVar.c_str()); + } + + // Remove the source extension if it is to be replaced. + if(replaceExt) + { + keptSourceExtension = false; + std::string::size_type dot_pos = objectName.rfind("."); + if(dot_pos != std::string::npos) + { + objectName = objectName.substr(0, dot_pos); + } + } + + // Store the new extension. + objectName += + this->GlobalGenerator->GetLanguageOutputExtension(source); + } + if(hasSourceExtension) + { + *hasSourceExtension = keptSourceExtension; + } + + // Convert to a safe name. + return this->CreateSafeUniqueObjectFileName(objectName.c_str(), dir_len); +} + +//---------------------------------------------------------------------------- +const char* +cmLocalGenerator +::GetSourceFileLanguage(const cmSourceFile& source) +{ + return source.GetLanguage(); +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::EscapeForShellOldStyle(const char* str) +{ + std::string result; + bool forceOn = cmSystemTools::GetForceUnixPaths(); + if(forceOn && this->WindowsShell) + { + cmSystemTools::SetForceUnixPaths(false); + } + result = cmSystemTools::EscapeSpaces(str); + if(forceOn && this->WindowsShell) + { + cmSystemTools::SetForceUnixPaths(true); + } + return result; +} + +//---------------------------------------------------------------------------- +static bool cmLocalGeneratorIsShellOperator(const char* str) +{ + if(strcmp(str, "<") == 0 || + strcmp(str, ">") == 0 || + strcmp(str, "<<") == 0 || + strcmp(str, ">>") == 0 || + strcmp(str, "|") == 0 || + strcmp(str, "&>") == 0 || + strcmp(str, "2>&1") == 0 || + strcmp(str, "1>&2") == 0) + { + return true; + } + return false; +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::EscapeForShell(const char* str, bool makeVars, + bool forEcho) +{ + // Do not escape shell operators. + if(cmLocalGeneratorIsShellOperator(str)) + { + return str; + } + + // Compute the flags for the target shell environment. + int flags = 0; + if(this->WindowsVSIDE) + { + flags |= cmsysSystem_Shell_Flag_VSIDE; + } + else + { + flags |= cmsysSystem_Shell_Flag_Make; + } + if(makeVars) + { + flags |= cmsysSystem_Shell_Flag_AllowMakeVariables; + } + if(forEcho) + { + flags |= cmsysSystem_Shell_Flag_EchoWindows; + } + if(this->WatcomWMake) + { + flags |= cmsysSystem_Shell_Flag_WatcomWMake; + } + if(this->MinGWMake) + { + flags |= cmsysSystem_Shell_Flag_MinGWMake; + } + if(this->NMake) + { + flags |= cmsysSystem_Shell_Flag_NMake; + } + + // Compute the buffer size needed. + int size = (this->WindowsShell ? + cmsysSystem_Shell_GetArgumentSizeForWindows(str, flags) : + cmsysSystem_Shell_GetArgumentSizeForUnix(str, flags)); + + // Compute the shell argument itself. + std::vector arg(size); + if(this->WindowsShell) + { + cmsysSystem_Shell_GetArgumentForWindows(str, &arg[0], flags); + } + else + { + cmsysSystem_Shell_GetArgumentForUnix(str, &arg[0], flags); + } + return std::string(&arg[0]); +} + +//---------------------------------------------------------------------------- +std::string cmLocalGenerator::EscapeForCMake(const char* str) +{ + // Always double-quote the argument to take care of most escapes. + std::string result = "\""; + for(const char* c = str; *c; ++c) + { + if(*c == '"') + { + // Escape the double quote to avoid ending the argument. + result += "\\\""; + } + else if(*c == '$') + { + // Escape the dollar to avoid expanding variables. + result += "\\$"; + } + else if(*c == '\\') + { + // Escape the backslash to avoid other escapes. + result += "\\\\"; + } + else + { + // Other characters will be parsed correctly. + result += *c; + } + } + result += "\""; + return result; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalGenerator::GetTargetDirectory(cmTarget const&) const +{ + cmSystemTools::Error("GetTargetDirectory" + " called on cmLocalGenerator"); + return ""; +} + + +//---------------------------------------------------------------------------- +void +cmLocalGenerator::GetTargetObjectFileDirectories(cmTarget* , + std::vector& + ) +{ + cmSystemTools::Error("GetTargetObjectFileDirectories" + " called on cmLocalGenerator"); +} + +//---------------------------------------------------------------------------- +unsigned int cmLocalGenerator::GetBackwardsCompatibility() +{ + // The computed version may change until the project is fully + // configured. + if(!this->BackwardsCompatibilityFinal) + { + unsigned int major = 0; + unsigned int minor = 0; + unsigned int patch = 0; + if(const char* value + = this->Makefile->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY")) + { + switch(sscanf(value, "%u.%u.%u", &major, &minor, &patch)) + { + case 2: patch = 0; break; + case 1: minor = 0; patch = 0; break; + default: break; + } + } + this->BackwardsCompatibility = CMake_VERSION_ENCODE(major, minor, patch); + this->BackwardsCompatibilityFinal = this->Configured; + } + + return this->BackwardsCompatibility; +} + +//---------------------------------------------------------------------------- +bool cmLocalGenerator::NeedBackwardsCompatibility(unsigned int major, + unsigned int minor, + unsigned int patch) +{ + // Check the policy to decide whether to pay attention to this + // variable. + switch(this->Makefile->GetPolicyStatus(cmPolicies::CMP0001)) + { + case cmPolicies::WARN: + // WARN is just OLD without warning because user code does not + // always affect whether this check is done. + case cmPolicies::OLD: + // Old behavior is to check the variable. + break; + case cmPolicies::NEW: + // New behavior is to ignore the variable. + return false; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + // This will never be the case because the only way to require + // the setting is to require the user to specify version policy + // 2.6 or higher. Once we add that requirement then this whole + // method can be removed anyway. + return false; + } + + // Compatibility is needed if CMAKE_BACKWARDS_COMPATIBILITY is set + // equal to or lower than the given version. + unsigned int actual_compat = this->GetBackwardsCompatibility(); + return (actual_compat && + actual_compat <= CMake_VERSION_ENCODE(major, minor, patch)); +} + +//---------------------------------------------------------------------------- +bool cmLocalGenerator::CheckDefinition(std::string const& define) const +{ + // Many compilers do not support -DNAME(arg)=sdf so we disable it. + bool function_style = false; + for(const char* c = define.c_str(); *c && *c != '='; ++c) + { + if(*c == '(') + { + function_style = true; + break; + } + } + if(function_style) + { + cmOStringStream e; + e << "WARNING: Function-style preprocessor definitions may not be " + << "passed on the compiler command line because many compilers " + << "do not support it.\n" + << "CMake is dropping a preprocessor definition: " << define << "\n" + << "Consider defining the macro in a (configured) header file.\n"; + cmSystemTools::Message(e.str().c_str()); + return false; + } + + // Many compilers do not support # in the value so we disable it. + if(define.find_first_of("#") != define.npos) + { + cmOStringStream e; + e << "WARNING: Peprocessor definitions containing '#' may not be " + << "passed on the compiler command line because many compilers " + << "do not support it.\n" + << "CMake is dropping a preprocessor definition: " << define << "\n" + << "Consider defining the macro in a (configured) header file.\n"; + cmSystemTools::Message(e.str().c_str()); + return false; + } + + // Assume it is supported. + return true; +} + +//---------------------------------------------------------------------------- +static std::string cmLGInfoProp(cmTarget* target, const char* prop) +{ + if(const char* val = target->GetProperty(prop)) + { + return val; + } + else + { + // For compatibility check for a variable. + return target->GetMakefile()->GetSafeDefinition(prop); + } +} + +//---------------------------------------------------------------------------- +void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target, + const char* targetName, + const char* fname) +{ + std::string info_EXECUTABLE_NAME = targetName; + + // Lookup the properties. + std::string info_INFO_STRING = + cmLGInfoProp(target, "MACOSX_BUNDLE_INFO_STRING"); + std::string info_ICON_FILE = + cmLGInfoProp(target, "MACOSX_BUNDLE_ICON_FILE"); + std::string info_GUI_IDENTIFIER = + cmLGInfoProp(target, "MACOSX_BUNDLE_GUI_IDENTIFIER"); + std::string info_LONG_VERSION_STRING = + cmLGInfoProp(target, "MACOSX_BUNDLE_LONG_VERSION_STRING"); + std::string info_BUNDLE_NAME = + cmLGInfoProp(target, "MACOSX_BUNDLE_BUNDLE_NAME"); + std::string info_SHORT_VERSION_STRING = + cmLGInfoProp(target, "MACOSX_BUNDLE_SHORT_VERSION_STRING"); + std::string info_BUNDLE_VERSION = + cmLGInfoProp(target, "MACOSX_BUNDLE_BUNDLE_VERSION"); + std::string info_COPYRIGHT = + cmLGInfoProp(target, "MACOSX_BUNDLE_COPYRIGHT"); + + // Generate the file. + cmGeneratedFileStream fout(fname); + fout.SetCopyIfDifferent(true); + fout << + "\n" + "\n" + "\n" + "\n" + "\tCFBundleDevelopmentRegion\n" + "\tEnglish\n" + "\tCFBundleExecutable\n" + "\t" << info_EXECUTABLE_NAME << "\n" + "\tCFBundleGetInfoString\n" + "\t" << info_INFO_STRING << "\n" + "\tCFBundleIconFile\n" + "\t" << info_ICON_FILE << "\n" + "\tCFBundleIdentifier\n" + "\t" << info_GUI_IDENTIFIER << "\n" + "\tCFBundleInfoDictionaryVersion\n" + "\t6.0\n" + "\tCFBundleLongVersionString\n" + "\t" << info_LONG_VERSION_STRING << "\n" + "\tCFBundleName\n" + "\t" << info_BUNDLE_NAME << "\n" + "\tCFBundlePackageType\n" + "\tAPPL\n" + "\tCFBundleShortVersionString\n" + "\t" << info_SHORT_VERSION_STRING << "\n" + "\tCFBundleSignature\n" + "\t????" /* break string to avoid trigraph */ "\n" + "\tCFBundleVersion\n" + "\t" << info_BUNDLE_VERSION << "\n" + "\tCSResourcesFileMapped\n" + "\t\n" + "\tLSRequiresCarbon\n" + "\t\n" + "\tNSHumanReadableCopyright\n" + "\t" << info_COPYRIGHT << "\n" + "\n" + "\n" + ; +} diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h new file mode 100644 index 000000000..9f29d7249 --- /dev/null +++ b/Source/cmLocalGenerator.h @@ -0,0 +1,383 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-14 20:31:08 $ + Version: $Revision: 1.103 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalGenerator_h +#define cmLocalGenerator_h + +#include "cmStandardIncludes.h" + +class cmMakefile; +class cmGlobalGenerator; +class cmTarget; +class cmTargetManifest; +class cmSourceFile; +class cmCustomCommand; + +/** \class cmLocalGenerator + * \brief Create required build files for a directory. + * + * Subclasses of this abstract class generate makefiles, DSP, etc for various + * platforms. This class should never be constructued directly. A + * GlobalGenerator will create it and invoke the appropriate commands on it. + */ +class cmLocalGenerator +{ +public: + cmLocalGenerator(); + virtual ~cmLocalGenerator(); + + /** + * Generate the makefile for this directory. + */ + virtual void Generate() {} + + /** + * Process the CMakeLists files for this directory to fill in the + * Makefile ivar + */ + virtual void Configure(); + + /** + * Calls TraceVSDependencies() on all targets of this generator. + */ + virtual void TraceDependencies(); + + virtual void AddHelperCommands() {} + + /** + * Perform any final calculations prior to generation + */ + virtual void ConfigureFinalPass(); + + /** + * Generate the install rules files in this directory. + */ + virtual void GenerateInstallRules(); + + /** + * Generate the test files for tests. + */ + virtual void GenerateTestFiles(); + + /** + * Generate a manifest of target files that will be built. + */ + virtual void GenerateTargetManifest(); + + ///! Get the makefile for this generator + cmMakefile *GetMakefile() { + return this->Makefile; }; + + ///! Get the makefile for this generator, const version + const cmMakefile *GetMakefile() const { + return this->Makefile; }; + + ///! Get the GlobalGenerator this is associated with + cmGlobalGenerator *GetGlobalGenerator() { + return this->GlobalGenerator; }; + + ///! Set the Global Generator, done on creation by the GlobalGenerator + void SetGlobalGenerator(cmGlobalGenerator *gg); + + /** + * Convert something to something else. This is a centralized coversion + * routine used by the generators to handle relative paths and the like. + * The flags determine what is actually done. + * + * relative: treat the argument as a directory and convert it to make it + * relative or full or unchanged. If relative (HOME, START etc) then that + * specifies what it should be relative to. + * + * output: make the result suitable for output to a... + * + * optional: should any relative path operation be controlled by the rel + * path setting + */ + enum RelativeRoot { NONE, FULL, HOME, START, HOME_OUTPUT, START_OUTPUT }; + enum OutputFormat { UNCHANGED, MAKEFILE, SHELL }; + std::string Convert(const char* source, + RelativeRoot relative, + OutputFormat output = UNCHANGED, + bool optional = false); + + /** + * Convert the given path to an output path that is optionally + * relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The + * remote path must use forward slashes and not already be escaped + * or quoted. + */ + std::string ConvertToOptionallyRelativeOutputPath(const char* remote); + + ///! set/get the parent generator + cmLocalGenerator* GetParent(){return this->Parent;} + void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); } + + ///! set/get the children + void AddChild(cmLocalGenerator* g) { this->Children.push_back(g); } + std::vector& GetChildren() { return this->Children; }; + + + void AddLanguageFlags(std::string& flags, const char* lang, + const char* config); + void AddSharedFlags(std::string& flags, const char* lang, bool shared); + void AddConfigVariableFlags(std::string& flags, const char* var, + const char* config); + virtual void AppendFlags(std::string& flags, const char* newFlags); + ///! Get the include flags for the current makefile and language + const char* GetIncludeFlags(const char* lang); + + /** + * Encode a list of preprocessor definitions for the compiler + * command line. + */ + void AppendDefines(std::string& defines, const char* defines_list, + const char* lang); + + /** Translate a dependency as given in CMake code to the name to + appear in a generated build file. If the given name is that of + a CMake target it will be transformed to the real output + location of that target for the given configuration. If the + given name is the full path to a file it will be returned. + Otherwise the name is treated as a relative path with respect to + the source directory of this generator. This should only be + used for dependencies of custom commands. */ + std::string GetRealDependency(const char* name, const char* config); + + /** Translate a command as given in CMake code to the location of the + executable if the command is the name of a CMake executable target. + If that's not the case, just return the original name. */ + std::string GetRealLocation(const char* inName, const char* config); + + ///! for existing files convert to output path and short path if spaces + std::string ConvertToOutputForExisting(const char* p); + + /** Called from command-line hook to clear dependencies. */ + virtual void ClearDependencies(cmMakefile* /* mf */, + bool /* verbose */) {} + + /** Called from command-line hook to update dependencies. */ + virtual bool UpdateDependencies(const char* /* tgtInfo */, + bool /*verbose*/, + bool /*color*/) + { return true; } + + /** Get the include flags for the current makefile and language. */ + void GetIncludeDirectories(std::vector& dirs, + bool filter_system_dirs = true); + + /** Compute the language used to compile the given source file. */ + const char* GetSourceFileLanguage(const cmSourceFile& source); + + // Create a struct to hold the varibles passed into + // ExpandRuleVariables + struct RuleVariables + { + RuleVariables() + { + memset(this, 0, sizeof(*this)); + } + const char* TargetPDB; + const char* TargetVersionMajor; + const char* TargetVersionMinor; + const char* Language; + const char* Objects; + const char* Target; + const char* LinkLibraries; + const char* Source; + const char* AssemblySource; + const char* PreprocessedSource; + const char* Object; + const char* ObjectDir; + const char* Flags; + const char* ObjectsQuoted; + const char* TargetSOName; + const char* TargetInstallNameDir; + const char* LinkFlags; + const char* LanguageCompileFlags; + const char* Defines; + }; + + /** Set whether to treat conversions to SHELL as a link script shell. */ + void SetLinkScriptShell(bool b) { this->LinkScriptShell = b; } + + /** Escape the given string to be used as a command line argument in + the native build system shell. Optionally allow the build + system to replace make variable references. Optionally adjust + escapes for the special case of passing to the native echo + command. */ + std::string EscapeForShell(const char* str, bool makeVars = false, + bool forEcho = false); + + /** Backwards-compatibility version of EscapeForShell. */ + std::string EscapeForShellOldStyle(const char* str); + + /** Escape the given string as an argument in a CMake script. */ + std::string EscapeForCMake(const char* str); + + /** Return the directories into which object files will be put. + * There maybe more than one for fat binary systems like OSX. + */ + virtual void + GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs); + + /** + * Convert the given remote path to a relative path with respect to + * the given local path. The local path must be given in component + * form (see SystemTools::SplitPath) without a trailing slash. The + * remote path must use forward slashes and not already be escaped + * or quoted. + */ + std::string ConvertToRelativePath(const std::vector& local, + const char* remote); + + /** + * Get the relative path from the generator output directory to a + * per-target support directory. + */ + virtual std::string GetTargetDirectory(cmTarget const& target) const; + + /** + * Get the level of backwards compatibility requested by the project + * in this directory. This is the value of the CMake variable + * CMAKE_BACKWARDS_COMPATIBILITY whose format is + * "major.minor[.patch]". The returned integer is encoded as + * + * CMake_VERSION_ENCODE(major, minor, patch) + * + * and is monotonically increasing with the CMake version. + */ + unsigned int GetBackwardsCompatibility(); + + /** + * Test whether compatibility is set to a given version or lower. + */ + bool NeedBackwardsCompatibility(unsigned int major, + unsigned int minor, + unsigned int patch = 0xFFu); + + /** + * Generate a Mac OS X application bundle Info.plist file. + */ + void GenerateAppleInfoPList(cmTarget* target, const char* targetName, + const char* fname); +protected: + /** Construct a comment for a custom command. */ + std::string ConstructComment(const cmCustomCommand& cc, + const char* default_comment = ""); + + /** Fill out these strings for the given target. Libraries to link, + * flags, and linkflags. */ + void GetTargetFlags(std::string& linkLibs, + std::string& flags, + std::string& linkFlags, + cmTarget&target); + + ///! put all the libraries for a target on into the given stream + virtual void OutputLinkLibraries(std::ostream&, cmTarget&, bool relink); + + // Expand rule variables in CMake of the type found in language rules + void ExpandRuleVariables(std::string& string, + const RuleVariables& replaceValues); + // Expand rule variables in a single string + std::string ExpandRuleVariable(std::string const& variable, + const RuleVariables& replaceValues); + + /** Convert a target to a utility target for unsupported + * languages of a generator */ + void AddBuildTargetRule(const char* llang, cmTarget& target); + ///! add a custom command to build a .o file that is part of a target + void AddCustomCommandToCreateObject(const char* ofname, + const char* lang, + cmSourceFile& source, + cmTarget& target); + // Create Custom Targets and commands for unsupported languages + // The set passed in should contain the languages supported by the + // generator directly. Any targets containing files that are not + // of the types listed will be compiled as custom commands and added + // to a custom target. + void CreateCustomTargetsAndCommands(std::set const&); + + // Handle old-style install rules stored in the targets. + void GenerateTargetInstallRules( + std::ostream& os, const char* config, + std::vector const& configurationTypes); + + // Compute object file names. + std::string GetObjectFileNameWithoutTarget(const cmSourceFile& source, + std::string::size_type dir_len, + bool* hasSourceExtension = 0); + std::string& CreateSafeUniqueObjectFileName(const char* sin, + std::string::size_type dir_len); + + void ConfigureRelativePaths(); + std::string FindRelativePathTopSource(); + std::string FindRelativePathTopBinary(); + void SetupPathConversions(); + + std::string ConvertToLinkReference(std::string const& lib); + + /** Check whether the native build system supports the given + definition. Issues a warning. */ + virtual bool CheckDefinition(std::string const& define) const; + + cmMakefile *Makefile; + cmGlobalGenerator *GlobalGenerator; + // members used for relative path function ConvertToMakefilePath + std::string RelativePathToSourceDir; + std::string RelativePathToBinaryDir; + std::vector HomeDirectoryComponents; + std::vector StartDirectoryComponents; + std::vector HomeOutputDirectoryComponents; + std::vector StartOutputDirectoryComponents; + cmLocalGenerator* Parent; + std::vector Children; + std::map LanguageToIncludeFlags; + std::map UniqueObjectNamesMap; + bool WindowsShell; + bool WindowsVSIDE; + bool WatcomWMake; + bool MinGWMake; + bool NMake; + bool ForceUnixPath; + bool MSYSShell; + bool LinkScriptShell; + bool UseRelativePaths; + bool IgnoreLibPrefix; + bool Configured; + bool EmitUniversalBinaryFlags; + // A type flag is not nice. It's used only in TraceDependencies(). + bool IsMakefileGenerator; + // Hack for ExpandRuleVariable until object-oriented version is + // committed. + std::string TargetImplib; + + // The top-most directories for relative path conversion. Both the + // source and destination location of a relative path conversion + // must be underneath one of these directories (both under source or + // both under binary) in order for the relative path to be evaluated + // safely by the build tools. + std::string RelativePathTopSource; + std::string RelativePathTopBinary; + bool RelativePathsConfigured; + bool PathConversionsSetup; + + unsigned int BackwardsCompatibility; + bool BackwardsCompatibilityFinal; +}; + +#endif diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx new file mode 100644 index 000000000..d0a9df1ce --- /dev/null +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -0,0 +1,2207 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalUnixMakefileGenerator3.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.240.2.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLocalUnixMakefileGenerator3.h" + +#include "cmDepends.h" +#include "cmGeneratedFileStream.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmMakefileTargetGenerator.h" +#include "cmSourceFile.h" +#include "cmake.h" +#include "cmVersion.h" +#include "cmFileTimeComparison.h" + +// Include dependency scanners for supported languages. Only the +// C/C++ scanner is needed for bootstrapping CMake. +#include "cmDependsC.h" +#ifdef CMAKE_BUILD_WITH_CMAKE +# include "cmDependsFortran.h" +# include "cmDependsJava.h" +# include +#endif + +#include // auto_ptr +#include + +//---------------------------------------------------------------------------- +// Helper function used below. +static std::string cmSplitExtension(std::string const& in, std::string& base) +{ + std::string ext; + std::string::size_type dot_pos = in.rfind("."); + if(dot_pos != std::string::npos) + { + // Remove the extension first in case &base == &in. + ext = in.substr(dot_pos, std::string::npos); + base = in.substr(0, dot_pos); + } + else + { + base = in; + } + return ext; +} + +//---------------------------------------------------------------------------- +cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3() +{ + this->SilentNoColon = false; + this->WindowsShell = false; + this->IncludeDirective = "include"; + this->MakefileVariableSize = 0; + this->IgnoreLibPrefix = false; + this->PassMakeflags = false; + this->DefineWindowsNULL = false; + this->UnixCD = true; + this->ColorMakefile = false; + this->SkipPreprocessedSourceRules = false; + this->SkipAssemblySourceRules = false; + this->NativeEchoCommand = "@echo "; + this->NativeEchoWindows = true; + this->MakeCommandEscapeTargetTwice = false; + this->IsMakefileGenerator = true; + this->BorlandMakeCurlyHack = false; +} + +//---------------------------------------------------------------------------- +cmLocalUnixMakefileGenerator3::~cmLocalUnixMakefileGenerator3() +{ +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::Configure() +{ + // Compute the path to use when referencing the current output + // directory from the top output directory. + this->HomeRelativeOutputPath = + this->Convert(this->Makefile->GetStartOutputDirectory(), HOME_OUTPUT); + if(this->HomeRelativeOutputPath == ".") + { + this->HomeRelativeOutputPath = ""; + } + if(!this->HomeRelativeOutputPath.empty()) + { + this->HomeRelativeOutputPath += "/"; + } + this->cmLocalGenerator::Configure(); +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::Generate() +{ + // Store the configuration name that will be generated. + if(const char* config = this->Makefile->GetDefinition("CMAKE_BUILD_TYPE")) + { + // Use the build type given by the user. + this->ConfigurationName = config; + } + else + { + // No configuration type given. + this->ConfigurationName = ""; + } + + // Record whether some options are enabled to avoid checking many + // times later. + this->ColorMakefile = this->Makefile->IsOn("CMAKE_COLOR_MAKEFILE"); + this->SkipPreprocessedSourceRules = + this->Makefile->IsOn("CMAKE_SKIP_PREPROCESSED_SOURCE_RULES"); + this->SkipAssemblySourceRules = + this->Makefile->IsOn("CMAKE_SKIP_ASSEMBLY_SOURCE_RULES"); + + // Generate the rule files for each target. + cmTargets& targets = this->Makefile->GetTargets(); + std::string empty; + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + cmMakefileTargetGenerator *tg = + cmMakefileTargetGenerator::New(&(t->second)); + if (tg) + { + this->TargetGenerators.push_back(tg); + tg->WriteRuleFiles(); + } + } + + // write the local Makefile + this->WriteLocalMakefile(); + + // Write the cmake file with information for this directory. + this->WriteDirectoryInformationFile(); +} + +//---------------------------------------------------------------------------- +// return info about progress actions +unsigned long cmLocalUnixMakefileGenerator3::GetNumberOfProgressActions() +{ + unsigned long result = 0; + + for (std::vector::iterator mtgIter = + this->TargetGenerators.begin(); + mtgIter != this->TargetGenerators.end(); ++mtgIter) + { + result += (*mtgIter)->GetNumberOfProgressActions(); + } + return result; +} + +//---------------------------------------------------------------------------- +// return info about progress actions +unsigned long cmLocalUnixMakefileGenerator3 +::GetNumberOfProgressActionsForTarget(const char *name) +{ + for (std::vector::iterator mtgIter = + this->TargetGenerators.begin(); + mtgIter != this->TargetGenerators.end(); ++mtgIter) + { + if (!strcmp(name,(*mtgIter)->GetTarget()->GetName())) + { + return (*mtgIter)->GetNumberOfProgressActions(); + } + } + return 0; +} + + +//---------------------------------------------------------------------------- +// writes the progreess variables and also closes out the targets +void cmLocalUnixMakefileGenerator3 +::WriteProgressVariables(unsigned long total, + unsigned long ¤t) +{ + // delete the makefile target generator objects + for (std::vector::iterator mtgIter = + this->TargetGenerators.begin(); + mtgIter != this->TargetGenerators.end(); ++mtgIter) + { + (*mtgIter)->WriteProgressVariables(total,current); + delete *mtgIter; + } + this->TargetGenerators.clear(); +} + +void cmLocalUnixMakefileGenerator3::WriteAllProgressVariable() +{ + // write the top level progress for the all target + std::string progressFile = cmake::GetCMakeFilesDirectory(); + progressFile += "/progress.make"; + std::string progressFileNameFull = + this->ConvertToFullPath(progressFile.c_str()); + cmGeneratedFileStream ruleFileStream(progressFileNameFull.c_str()); + if(!ruleFileStream) + { + return; + } + + cmGlobalUnixMakefileGenerator3 *gg = + static_cast(this->GlobalGenerator); + + ruleFileStream << gg->GetNumberOfProgressActionsInAll(this) << "\n"; +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::WriteLocalMakefile() +{ + // generate the includes + std::string ruleFileName = "Makefile"; + + // Open the rule file. This should be copy-if-different because the + // rules may depend on this file itself. + std::string ruleFileNameFull = this->ConvertToFullPath(ruleFileName); + cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + if(!ruleFileStream) + { + return; + } + // always write the top makefile + if (this->Parent) + { + ruleFileStream.SetCopyIfDifferent(true); + } + + // write the all rules + this->WriteLocalAllRules(ruleFileStream); + + // only write local targets unless at the top Keep track of targets already + // listed. + std::set emittedTargets; + if (this->Parent) + { + // write our targets, and while doing it collect up the object + // file rules + this->WriteLocalMakefileTargets(ruleFileStream,emittedTargets); + } + else + { + cmGlobalUnixMakefileGenerator3 *gg = + static_cast(this->GlobalGenerator); + gg->WriteConvenienceRules(ruleFileStream,emittedTargets); + } + + bool do_preprocess_rules = + this->GetCreatePreprocessedSourceRules(); + bool do_assembly_rules = + this->GetCreateAssemblySourceRules(); + + // now write out the object rules + // for each object file name + for (std::map::iterator lo = + this->LocalObjectFiles.begin(); + lo != this->LocalObjectFiles.end(); ++lo) + { + // Add a convenience rule for building the object file. + this->WriteObjectConvenienceRule(ruleFileStream, + "target to build an object file", + lo->first.c_str(), lo->second); + + // Check whether preprocessing and assembly rules make sense. + // They make sense only for C and C++ sources. + bool lang_is_c_or_cxx = false; + for(std::vector::const_iterator ei = + lo->second.begin(); ei != lo->second.end(); ++ei) + { + if(ei->Language == "C" || ei->Language == "CXX") + { + lang_is_c_or_cxx = true; + } + } + + // Add convenience rules for preprocessed and assembly files. + if(lang_is_c_or_cxx && (do_preprocess_rules || do_assembly_rules)) + { + std::string::size_type dot_pos = lo->first.rfind("."); + std::string base = lo->first.substr(0, dot_pos); + if(do_preprocess_rules) + { + this->WriteObjectConvenienceRule( + ruleFileStream, "target to preprocess a source file", + (base + ".i").c_str(), lo->second); + } + if(do_assembly_rules) + { + this->WriteObjectConvenienceRule( + ruleFileStream, "target to generate assembly for a file", + (base + ".s").c_str(), lo->second); + } + } + } + + // add a help target as long as there isn;t a real target named help + if(emittedTargets.insert("help").second) + { + cmGlobalUnixMakefileGenerator3 *gg = + static_cast(this->GlobalGenerator); + gg->WriteHelpRule(ruleFileStream,this); + } + + this->WriteSpecialTargetsBottom(ruleFileStream); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteObjectConvenienceRule(std::ostream& ruleFileStream, + const char* comment, const char* output, + LocalObjectInfo const& info) +{ + // If the rule includes the source file extension then create a + // version that has the extension removed. The help should include + // only the version without source extension. + bool inHelp = true; + if(info.HasSourceExtension) + { + // Remove the last extension. This should be kept. + std::string outBase1 = output; + std::string outExt1 = cmSplitExtension(outBase1, outBase1); + + // Now remove the source extension and put back the last + // extension. + std::string outNoExt; + cmSplitExtension(outBase1, outNoExt); + outNoExt += outExt1; + + // Add a rule to drive the rule below. + std::vector depends; + depends.push_back(output); + std::vector no_commands; + this->WriteMakeRule(ruleFileStream, 0, + outNoExt.c_str(), depends, no_commands, true, true); + inHelp = false; + } + + // Recursively make the rule for each target using the object file. + std::vector commands; + for(std::vector::const_iterator t = info.begin(); + t != info.end(); ++t) + { + std::string tgtMakefileName = + this->GetRelativeTargetDirectory(*(t->Target)); + std::string targetName = tgtMakefileName; + tgtMakefileName += "/build.make"; + targetName += "/"; + targetName += output; + commands.push_back( + this->GetRecursiveMakeCall(tgtMakefileName.c_str(), targetName.c_str()) + ); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + } + + // Write the rule to the makefile. + std::vector no_depends; + this->WriteMakeRule(ruleFileStream, comment, + output, no_depends, commands, true, inHelp); +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3 +::WriteLocalMakefileTargets(std::ostream& ruleFileStream, + std::set &emitted) +{ + std::vector depends; + std::vector commands; + + // for each target we just provide a rule to cd up to the top and do a make + // on the target + cmTargets& targets = this->Makefile->GetTargets(); + std::string localName; + for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t) + { + if((t->second.GetType() == cmTarget::EXECUTABLE) || + (t->second.GetType() == cmTarget::STATIC_LIBRARY) || + (t->second.GetType() == cmTarget::SHARED_LIBRARY) || + (t->second.GetType() == cmTarget::MODULE_LIBRARY) || + (t->second.GetType() == cmTarget::UTILITY)) + { + emitted.insert(t->second.GetName()); + + // for subdirs add a rule to build this specific target by name. + localName = this->GetRelativeTargetDirectory(t->second); + localName += "/rule"; + commands.clear(); + depends.clear(); + + // Build the target for this pass. + std::string makefile2 = cmake::GetCMakeFilesDirectoryPostSlash(); + makefile2 += "Makefile2"; + commands.push_back(this->GetRecursiveMakeCall + (makefile2.c_str(),localName.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, "Convenience name for target.", + localName.c_str(), depends, commands, true); + + // Add a target with the canonical name (no prefix, suffix or path). + if(localName != t->second.GetName()) + { + commands.clear(); + depends.push_back(localName); + this->WriteMakeRule(ruleFileStream, "Convenience name for target.", + t->second.GetName(), depends, commands, true); + } + + // Add a fast rule to build the target + std::string makefileName = this->GetRelativeTargetDirectory(t->second); + makefileName += "/build.make"; + // make sure the makefile name is suitable for a makefile + std::string makeTargetName = + this->GetRelativeTargetDirectory(t->second); + makeTargetName += "/build"; + localName = t->second.GetName(); + localName += "/fast"; + depends.clear(); + commands.clear(); + commands.push_back(this->GetRecursiveMakeCall + (makefileName.c_str(), makeTargetName.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, "fast build rule for target.", + localName.c_str(), depends, commands, true); + + // Add a local name for the rule to relink the target before + // installation. + if(t->second.NeedRelinkBeforeInstall()) + { + makeTargetName = this->GetRelativeTargetDirectory(t->second); + makeTargetName += "/preinstall"; + localName = t->second.GetName(); + localName += "/preinstall"; + depends.clear(); + commands.clear(); + commands.push_back(this->GetRecursiveMakeCall + (makefile2.c_str(), makeTargetName.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, + "Manual pre-install relink rule for target.", + localName.c_str(), depends, commands, true); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() +{ + std::string infoFileName = this->Makefile->GetStartOutputDirectory(); + infoFileName += cmake::GetCMakeFilesDirectory(); + infoFileName += "/CMakeDirectoryInformation.cmake"; + + // Open the output file. + cmGeneratedFileStream infoFileStream(infoFileName.c_str()); + if(!infoFileStream) + { + return; + } + + // Write the do not edit header. + this->WriteDisclaimer(infoFileStream); + + // Setup relative path conversion tops. + infoFileStream + << "# Relative path conversion top directories.\n" + << "SET(CMAKE_RELATIVE_PATH_TOP_SOURCE \"" << this->RelativePathTopSource + << "\")\n" + << "SET(CMAKE_RELATIVE_PATH_TOP_BINARY \"" << this->RelativePathTopBinary + << "\")\n" + << "\n"; + + // Tell the dependency scanner to use unix paths if necessary. + if(cmSystemTools::GetForceUnixPaths()) + { + infoFileStream + << "# Force unix paths in dependencies.\n" + << "SET(CMAKE_FORCE_UNIX_PATHS 1)\n" + << "\n"; + } + + // Store the include search path for this directory. + infoFileStream + << "# The C and CXX include file search paths:\n"; + infoFileStream + << "SET(CMAKE_C_INCLUDE_PATH\n"; + std::vector includeDirs; + this->GetIncludeDirectories(includeDirs, false); + for(std::vector::iterator i = includeDirs.begin(); + i != includeDirs.end(); ++i) + { + infoFileStream + << " \"" << this->Convert(i->c_str(),HOME_OUTPUT).c_str() << "\"\n"; + } + infoFileStream + << " )\n"; + infoFileStream + << "SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n"; + infoFileStream + << "SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n"; + + // Store the include regular expressions for this directory. + infoFileStream + << "\n" + << "# The C and CXX include file regular expressions for " + << "this directory.\n"; + infoFileStream + << "SET(CMAKE_C_INCLUDE_REGEX_SCAN "; + this->WriteCMakeArgument(infoFileStream, + this->Makefile->GetIncludeRegularExpression()); + infoFileStream + << ")\n"; + infoFileStream + << "SET(CMAKE_C_INCLUDE_REGEX_COMPLAIN "; + this->WriteCMakeArgument(infoFileStream, + this->Makefile->GetComplainRegularExpression()); + infoFileStream + << ")\n"; + infoFileStream + << "SET(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})\n"; + infoFileStream + << "SET(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN " + "${CMAKE_C_INCLUDE_REGEX_COMPLAIN})\n"; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::ConvertToFullPath(const std::string& localPath) +{ + std::string dir = this->Makefile->GetStartOutputDirectory(); + dir += "/"; + dir += localPath; + return dir; +} + + +const std::string &cmLocalUnixMakefileGenerator3::GetHomeRelativeOutputPath() +{ + return this->HomeRelativeOutputPath; +} + + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteMakeRule(std::ostream& os, + const char* comment, + const char* target, + const std::vector& depends, + const std::vector& commands, + bool symbolic, + bool in_help) +{ + // Make sure there is a target. + if(!target || !*target) + { + cmSystemTools::Error("No target for WriteMakeRule! called with comment: ", + comment); + return; + } + + std::string replace; + + // Write the comment describing the rule in the makefile. + if(comment) + { + replace = comment; + std::string::size_type lpos = 0; + std::string::size_type rpos; + while((rpos = replace.find('\n', lpos)) != std::string::npos) + { + os << "# " << replace.substr(lpos, rpos-lpos) << "\n"; + lpos = rpos+1; + } + os << "# " << replace.substr(lpos) << "\n"; + } + + // Construct the left hand side of the rule. + replace = target; + std::string tgt = this->Convert(replace.c_str(),HOME_OUTPUT,MAKEFILE); + const char* space = ""; + if(tgt.size() == 1) + { + // Add a space before the ":" to avoid drive letter confusion on + // Windows. + space = " "; + } + + // Mark the rule as symbolic if requested. + if(symbolic) + { + if(const char* sym = + this->Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE")) + { + os << tgt.c_str() << space << ": " << sym << "\n"; + } + } + + // Write the rule. + if(depends.empty()) + { + // No dependencies. The commands will always run. + os << tgt.c_str() << space << ":\n"; + } + else + { + // Split dependencies into multiple rule lines. This allows for + // very long dependency lists even on older make implementations. + for(std::vector::const_iterator dep = depends.begin(); + dep != depends.end(); ++dep) + { + replace = *dep; + replace = this->Convert(replace.c_str(),HOME_OUTPUT,MAKEFILE); + os << tgt.c_str() << space << ": " << replace.c_str() << "\n"; + } + } + + // Write the list of commands. + for(std::vector::const_iterator i = commands.begin(); + i != commands.end(); ++i) + { + replace = *i; + os << "\t" << replace.c_str() << "\n"; + } + if(symbolic && !this->WatcomWMake) + { + os << ".PHONY : " << tgt.c_str() << "\n"; + } + os << "\n"; + // Add the output to the local help if requested. + if(in_help) + { + this->LocalHelp.push_back(target); + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteMakeVariables(std::ostream& makefileStream) +{ + this->WriteDivider(makefileStream); + makefileStream + << "# Set environment variables for the build.\n" + << "\n"; + if(this->DefineWindowsNULL) + { + makefileStream + << "!IF \"$(OS)\" == \"Windows_NT\"\n" + << "NULL=\n" + << "!ELSE\n" + << "NULL=nul\n" + << "!ENDIF\n"; + } + if(this->WindowsShell) + { + makefileStream + << "SHELL = cmd.exe\n" + << "\n"; + } + else + { + makefileStream + << "# The shell in which to execute make rules.\n" + << "SHELL = /bin/sh\n" + << "\n"; + } + + std::string cmakecommand = + this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); + makefileStream + << "# The CMake executable.\n" + << "CMAKE_COMMAND = " + << this->Convert(cmakecommand.c_str(), FULL, SHELL).c_str() + << "\n" + << "\n"; + makefileStream + << "# The command to remove a file.\n" + << "RM = " + << this->Convert(cmakecommand.c_str(),FULL,SHELL).c_str() + << " -E remove -f\n" + << "\n"; + + if(this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND")) + { + makefileStream + << "# The program to use to edit the cache.\n" + << "CMAKE_EDIT_COMMAND = " + << (this->ConvertToOutputForExisting( + this->Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))) << "\n" + << "\n"; + } + + makefileStream + << "# The top-level source directory on which CMake was run.\n" + << "CMAKE_SOURCE_DIR = " + << this->Convert(this->Makefile->GetHomeDirectory(), FULL, SHELL) + << "\n" + << "\n"; + makefileStream + << "# The top-level build directory on which CMake was run.\n" + << "CMAKE_BINARY_DIR = " + << this->Convert(this->Makefile->GetHomeOutputDirectory(), FULL, SHELL) + << "\n" + << "\n"; +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteSpecialTargetsTop(std::ostream& makefileStream) +{ + this->WriteDivider(makefileStream); + makefileStream + << "# Special targets provided by cmake.\n" + << "\n"; + + std::vector no_commands; + std::vector no_depends; + + // Special target to cleanup operation of make tool. + // This should be the first target except for the default_target in + // the interface Makefile. + this->WriteMakeRule( + makefileStream, "Disable implicit rules so canoncical targets will work.", + ".SUFFIXES", no_depends, no_commands, false); + + if(!this->NMake && !this->WatcomWMake && !this->BorlandMakeCurlyHack) + { + // turn off RCS and SCCS automatic stuff from gmake + makefileStream + << "# Remove some rules from gmake that .SUFFIXES does not remove.\n" + << "SUFFIXES =\n\n"; + } + // Add a fake suffix to keep HP happy. Must be max 32 chars for SGI make. + std::vector depends; + depends.push_back(".hpux_make_needs_suffix_list"); + this->WriteMakeRule(makefileStream, 0, + ".SUFFIXES", depends, no_commands, false); + + cmGlobalUnixMakefileGenerator3* gg = + static_cast(this->GlobalGenerator); + // Write special target to silence make output. This must be after + // the default target in case VERBOSE is set (which changes the + // name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a + // "VERBOSE=1" to be added as a make variable which will change the + // name of this special target. This gives a make-time choice to + // the user. + if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) + || (gg->GetForceVerboseMakefiles())) + { + makefileStream + << "# Produce verbose output by default.\n" + << "VERBOSE = 1\n" + << "\n"; + } + if(this->SilentNoColon) + { + makefileStream << "$(VERBOSE).SILENT\n"; + } + else + { + this->WriteMakeRule(makefileStream, + "Suppress display of executed commands.", + "$(VERBOSE).SILENT", + no_depends, + no_commands, false); + } + + // Work-around for makes that drop rules that have no dependencies + // or commands. + std::string hack = gg->GetEmptyRuleHackDepends(); + if(!hack.empty()) + { + no_depends.push_back(hack); + } + std::string hack_cmd = gg->GetEmptyRuleHackCommand(); + if(!hack_cmd.empty()) + { + no_commands.push_back(hack_cmd); + } + + // Special symbolic target that never exists to force dependers to + // run their rules. + this->WriteMakeRule + (makefileStream, + "A target that is always out of date.", + "cmake_force", no_depends, no_commands, true); + + // Variables for reference by other rules. + this->WriteMakeVariables(makefileStream); +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3 +::WriteSpecialTargetsBottom(std::ostream& makefileStream) +{ + this->WriteDivider(makefileStream); + makefileStream + << "# Special targets to cleanup operation of make.\n" + << "\n"; + + // Write special "cmake_check_build_system" target to run cmake with + // the --check-build-system flag. + { + // Build command to run CMake to check if anything needs regenerating. + std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash(); + cmakefileName += "Makefile.cmake"; + std::string runRule = + "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; + runRule += " --check-build-system "; + runRule += this->Convert(cmakefileName.c_str(),NONE,SHELL); + runRule += " 0"; + + std::vector no_depends; + std::vector commands; + commands.push_back(runRule); + if(this->Parent) + { + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + } + this->WriteMakeRule(makefileStream, + "Special rule to run CMake to check the build system " + "integrity.\n" + "No rule that depends on this can have " + "commands that come from listfiles\n" + "because they might be regenerated.", + "cmake_check_build_system", + no_depends, + commands, true); + } +} + + + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteConvenienceRule(std::ostream& ruleFileStream, + const char* realTarget, + const char* helpTarget) +{ + // A rule is only needed if the names are different. + if(strcmp(realTarget, helpTarget) != 0) + { + // The helper target depends on the real target. + std::vector depends; + depends.push_back(realTarget); + + // There are no commands. + std::vector no_commands; + + // Write the rule. + this->WriteMakeRule(ruleFileStream, "Convenience name for target.", + helpTarget, depends, no_commands, true); + } +} + + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::GetRelativeTargetDirectory(cmTarget const& target) +{ + std::string dir = this->HomeRelativeOutputPath; + dir += this->GetTargetDirectory(target); + return this->Convert(dir.c_str(),NONE,UNCHANGED); +} + + + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::AppendFlags(std::string& flags, + const char* newFlags) +{ + if(this->WatcomWMake && newFlags && *newFlags) + { + std::string newf = newFlags; + if(newf.find("\\\"") != newf.npos) + { + cmSystemTools::ReplaceString(newf, "\\\"", "\""); + this->cmLocalGenerator::AppendFlags(flags, newf.c_str()); + return; + } + } + this->cmLocalGenerator::AppendFlags(flags, newFlags); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendRuleDepend(std::vector& depends, + const char* ruleFileName) +{ + // Add a dependency on the rule file itself unless an option to skip + // it is specifically enabled by the user or project. + const char* nodep = + this->Makefile->GetDefinition("CMAKE_SKIP_RULE_DEPENDENCY"); + if(!nodep || cmSystemTools::IsOff(nodep)) + { + depends.push_back(ruleFileName); + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendCustomDepends(std::vector& depends, + const std::vector& ccs) +{ + for(std::vector::const_iterator i = ccs.begin(); + i != ccs.end(); ++i) + { + this->AppendCustomDepend(depends, *i); + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendCustomDepend(std::vector& depends, + const cmCustomCommand& cc) +{ + for(std::vector::const_iterator d = cc.GetDepends().begin(); + d != cc.GetDepends().end(); ++d) + { + // Lookup the real name of the dependency in case it is a CMake target. + std::string dep = this->GetRealDependency + (d->c_str(), this->ConfigurationName.c_str()); + depends.push_back(dep); + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendCustomCommands(std::vector& commands, + const std::vector& ccs) +{ + for(std::vector::const_iterator i = ccs.begin(); + i != ccs.end(); ++i) + { + this->AppendCustomCommand(commands, *i, true); + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendCustomCommand(std::vector& commands, + const cmCustomCommand& cc, bool echo_comment) +{ + // Optionally create a command to display the custom command's + // comment text. This is used for pre-build, pre-link, and + // post-build command comments. Custom build step commands have + // their comments generated elsewhere. + if(echo_comment) + { + const char* comment = cc.GetComment(); + if(comment && *comment) + { + this->AppendEcho(commands, comment, + cmLocalUnixMakefileGenerator3::EchoGenerate); + } + } + + // if the command specified a working directory use it. + const char* dir = this->Makefile->GetStartOutputDirectory(); + const char* workingDir = cc.GetWorkingDirectory(); + if(workingDir) + { + dir = workingDir; + } + bool escapeOldStyle = cc.GetEscapeOldStyle(); + bool escapeAllowMakeVars = cc.GetEscapeAllowMakeVars(); + + // Add each command line to the set of commands. + std::vector commands1; + for(cmCustomCommandLines::const_iterator cl = cc.GetCommandLines().begin(); + cl != cc.GetCommandLines().end(); ++cl) + { + // Build the command line in a single string. + const cmCustomCommandLine& commandLine = *cl; + std::string cmd = GetRealLocation(commandLine[0].c_str(), + this->ConfigurationName.c_str()); + if (cmd.size()) + { + cmSystemTools::ReplaceString(cmd, "/./", "/"); + // Convert the command to a relative path only if the current + // working directory will be the start-output directory. + bool had_slash = cmd.find("/") != cmd.npos; + if(!workingDir) + { + cmd = this->Convert(cmd.c_str(),START_OUTPUT); + } + bool has_slash = cmd.find("/") != cmd.npos; + if(had_slash && !has_slash) + { + // This command was specified as a path to a file in the + // current directory. Add a leading "./" so it can run + // without the current directory being in the search path. + cmd = "./" + cmd; + } + if(this->WatcomWMake && + cmSystemTools::FileIsFullPath(cmd.c_str()) && + cmd.find(" ") != cmd.npos) + { + // On Watcom WMake use the windows short path for the command + // name. This is needed to avoid funny quoting problems on + // lines with shell redirection operators. + std::string scmd; + if(cmSystemTools::GetShortPath(cmd.c_str(), scmd)) + { + cmd = scmd; + } + } + cmd = this->Convert(cmd.c_str(),NONE,SHELL); + for(unsigned int j=1; j < commandLine.size(); ++j) + { + cmd += " "; + if(escapeOldStyle) + { + cmd += this->EscapeForShellOldStyle(commandLine[j].c_str()); + } + else + { + cmd += this->EscapeForShell(commandLine[j].c_str(), + escapeAllowMakeVars); + } + } + if(this->BorlandMakeCurlyHack) + { + // Borland Make has a very strange bug. If the first curly + // brace anywhere in the command string is a left curly, it + // must be written {{} instead of just {. Otherwise some + // curly braces are removed. The hack can be skipped if the + // first curly brace is the last character. + std::string::size_type lcurly = cmd.find("{"); + if(lcurly != cmd.npos && lcurly < (cmd.size()-1)) + { + std::string::size_type rcurly = cmd.find("}"); + if(rcurly == cmd.npos || rcurly > lcurly) + { + // The first curly is a left curly. Use the hack. + std::string hack_cmd = cmd.substr(0, lcurly); + hack_cmd += "{{}"; + hack_cmd += cmd.substr(lcurly+1); + cmd = hack_cmd; + } + } + } + commands1.push_back(cmd); + } + } + + // Setup the proper working directory for the commands. + this->CreateCDCommand(commands1, dir, + this->Makefile->GetHomeOutputDirectory()); + + // push back the custom commands + commands.insert(commands.end(), commands1.begin(), commands1.end()); +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::AppendCleanCommand(std::vector& commands, + const std::vector& files, + cmTarget& target, const char* filename) +{ + if(!files.empty()) + { + std::string cleanfile = this->Makefile->GetCurrentOutputDirectory(); + cleanfile += "/"; + cleanfile += this->GetTargetDirectory(target); + cleanfile += "/cmake_clean"; + if(filename) + { + cleanfile += "_"; + cleanfile += filename; + } + cleanfile += ".cmake"; + std::string cleanfilePath = this->Convert(cleanfile.c_str(), FULL); + std::ofstream fout(cleanfilePath.c_str()); + if(!fout) + { + cmSystemTools::Error("Could not create ", cleanfilePath.c_str()); + } + fout << "FILE(REMOVE_RECURSE\n"; + std::string remove = "$(CMAKE_COMMAND) -P "; + remove += this->Convert(cleanfile.c_str(), START_OUTPUT, SHELL); + for(std::vector::const_iterator f = files.begin(); + f != files.end(); ++f) + { + fout << "\"" << this->Convert(f->c_str(),START_OUTPUT,UNCHANGED) + << "\"\n"; + } + fout << ")\n"; + commands.push_back(remove); + + // For the main clean rule add per-language cleaning. + if(!filename) + { + // Get the set of source languages in the target. + std::set languages; + target.GetLanguages(languages); + fout << "\n" + << "# Per-language clean rules from dependency scanning.\n" + << "FOREACH(lang"; + for(std::set::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + fout << " " << *l; + } + fout << ")\n" + << " INCLUDE(" << this->GetTargetDirectory(target) + << "/cmake_clean_${lang}.cmake OPTIONAL)\n" + << "ENDFOREACH(lang)\n"; + } + } +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3::AppendEcho(std::vector& commands, + const char* text, + EchoColor color) +{ + // Choose the color for the text. + std::string color_name; +#ifdef CMAKE_BUILD_WITH_CMAKE + if(this->GlobalGenerator->GetToolSupportsColor() && this->ColorMakefile) + { + // See cmake::ExecuteEchoColor in cmake.cxx for these options. + // This color set is readable on both black and white backgrounds. + switch(color) + { + case EchoNormal: + break; + case EchoDepend: + color_name = "--magenta --bold "; + break; + case EchoBuild: + color_name = "--green "; + break; + case EchoLink: + color_name = "--red --bold "; + break; + case EchoGenerate: + color_name = "--blue --bold "; + break; + case EchoGlobal: + color_name = "--cyan "; + break; + } + } +#else + (void)color; +#endif + + // Echo one line at a time. + std::string line; + line.reserve(200); + for(const char* c = text;; ++c) + { + if(*c == '\n' || *c == '\0') + { + // Avoid writing a blank last line on end-of-string. + if(*c != '\0' || !line.empty()) + { + // Add a command to echo this line. + std::string cmd; + if(color_name.empty()) + { + // Use the native echo command. + cmd = this->NativeEchoCommand; + cmd += this->EscapeForShell(line.c_str(), false, + this->NativeEchoWindows); + } + else + { + // Use cmake to echo the text in color. + cmd = "@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) "; + cmd += color_name; + cmd += this->EscapeForShell(line.c_str()); + } + commands.push_back(cmd); + } + + // Reset the line to emtpy. + line = ""; + + // Terminate on end-of-string. + if(*c == '\0') + { + return; + } + } + else if(*c != '\r') + { + // Append this character to the current line. + line += *c; + } + } +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::CreateMakeVariable(const char* sin, const char* s2in) +{ + std::string s = sin; + std::string s2 = s2in; + std::string unmodified = s; + unmodified += s2; + // if there is no restriction on the length of make variables + // and there are no "." charactors in the string, then return the + // unmodified combination. + if((!this->MakefileVariableSize && unmodified.find('.') == s.npos) + && (!this->MakefileVariableSize && unmodified.find('-') == s.npos)) + { + return unmodified; + } + + // see if the variable has been defined before and return + // the modified version of the variable + std::map::iterator i = + this->MakeVariableMap.find(unmodified); + if(i != this->MakeVariableMap.end()) + { + return i->second; + } + // start with the unmodified variable + std::string ret = unmodified; + // if this there is no value for this->MakefileVariableSize then + // the string must have bad characters in it + if(!this->MakefileVariableSize) + { + cmSystemTools::ReplaceString(ret, ".", "_"); + cmSystemTools::ReplaceString(ret, "-", "__"); + int ni = 0; + char buffer[5]; + // make sure the _ version is not already used, if + // it is used then add number to the end of the variable + while(this->ShortMakeVariableMap.count(ret) && ni < 1000) + { + ++ni; + sprintf(buffer, "%04d", ni); + ret = unmodified + buffer; + } + this->ShortMakeVariableMap[ret] = "1"; + this->MakeVariableMap[unmodified] = ret; + return ret; + } + + // if the string is greater the 32 chars it is an invalid vairable name + // for borland make + if(static_cast(ret.size()) > this->MakefileVariableSize) + { + int keep = this->MakefileVariableSize - 8; + int size = keep + 3; + std::string str1 = s; + std::string str2 = s2; + // we must shorten the combined string by 4 charactors + // keep no more than 24 charactors from the second string + if(static_cast(str2.size()) > keep) + { + str2 = str2.substr(0, keep); + } + if(static_cast(str1.size()) + static_cast(str2.size()) > size) + { + str1 = str1.substr(0, size - str2.size()); + } + char buffer[5]; + int ni = 0; + sprintf(buffer, "%04d", ni); + ret = str1 + str2 + buffer; + while(this->ShortMakeVariableMap.count(ret) && ni < 1000) + { + ++ni; + sprintf(buffer, "%04d", ni); + ret = str1 + str2 + buffer; + } + if(ni == 1000) + { + cmSystemTools::Error("Borland makefile variable length too long"); + return unmodified; + } + // once an unused variable is found + this->ShortMakeVariableMap[ret] = "1"; + } + // always make an entry into the unmodified to variable map + this->MakeVariableMap[unmodified] = ret; + return ret; +} + +//---------------------------------------------------------------------------- +bool cmLocalUnixMakefileGenerator3::UpdateDependencies(const char* tgtInfo, + bool verbose, + bool color) +{ + // read in the target info file + if(!this->Makefile->ReadListFile(0, tgtInfo) || + cmSystemTools::GetErrorOccuredFlag()) + { + cmSystemTools::Error("Target DependInfo.cmake file not found"); + } + + // Check if any multiple output pairs have a missing file. + this->CheckMultipleOutputs(verbose); + + std::string dir = cmSystemTools::GetFilenamePath(tgtInfo); + std::string internalDependFile = dir + "/depend.internal"; + std::string dependFile = dir + "/depend.make"; + + // If the target DependInfo.cmake file has changed since the last + // time dependencies were scanned then force rescanning. This may + // happen when a new source file is added and CMake regenerates the + // project but no other sources were touched. + bool needRescan = false; + cmFileTimeComparison* ftc = + this->GlobalGenerator->GetCMakeInstance()->GetFileComparison(); + { + int result; + if(!ftc->FileTimeCompare(internalDependFile.c_str(), tgtInfo, &result) || + result < 0) + { + if(verbose) + { + cmOStringStream msg; + msg << "Dependee \"" << tgtInfo + << "\" is newer than depender \"" + << internalDependFile << "\"." << std::endl; + cmSystemTools::Stdout(msg.str().c_str()); + } + needRescan = true; + } + } + + // Check the implicit dependencies to see if they are up to date. + // The build.make file may have explicit dependencies for the object + // files but these will not affect the scanning process so they need + // not be considered. + cmDependsC checker; + checker.SetVerbose(verbose); + checker.SetFileComparison(ftc); + if(needRescan || + !checker.Check(dependFile.c_str(), internalDependFile.c_str())) + { + // The dependencies must be regenerated. + std::string targetName = cmSystemTools::GetFilenameName(dir); + targetName = targetName.substr(0, targetName.length()-4); + std::string message = "Scanning dependencies of target "; + message += targetName; +#ifdef CMAKE_BUILD_WITH_CMAKE + cmSystemTools::MakefileColorEcho( + cmsysTerminal_Color_ForegroundMagenta | + cmsysTerminal_Color_ForegroundBold, + message.c_str(), true, color); +#else + fprintf(stdout, "%s\n", message.c_str()); +#endif + + return this->ScanDependencies(dir.c_str()); + } + else + { + // The dependencies are already up-to-date. + return true; + } +} + +//---------------------------------------------------------------------------- +bool +cmLocalUnixMakefileGenerator3 +::ScanDependencies(const char* targetDir) +{ + // Read the directory information file. + cmMakefile* mf = this->Makefile; + bool haveDirectoryInfo = false; + std::string dirInfoFile = this->Makefile->GetStartOutputDirectory(); + dirInfoFile += cmake::GetCMakeFilesDirectory(); + dirInfoFile += "/CMakeDirectoryInformation.cmake"; + if(mf->ReadListFile(0, dirInfoFile.c_str()) && + !cmSystemTools::GetErrorOccuredFlag()) + { + haveDirectoryInfo = true; + } + + // Lookup useful directory information. + if(haveDirectoryInfo) + { + // Test whether we need to force Unix paths. + if(const char* force = mf->GetDefinition("CMAKE_FORCE_UNIX_PATHS")) + { + if(!cmSystemTools::IsOff(force)) + { + cmSystemTools::SetForceUnixPaths(true); + } + } + + // Setup relative path top directories. + this->RelativePathsConfigured = true; + if(const char* relativePathTopSource = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_SOURCE")) + { + this->RelativePathTopSource = relativePathTopSource; + } + if(const char* relativePathTopBinary = + mf->GetDefinition("CMAKE_RELATIVE_PATH_TOP_BINARY")) + { + this->RelativePathTopBinary = relativePathTopBinary; + } + } + else + { + cmSystemTools::Error("Directory Information file not found"); + } + + // create the file stream for the depends file + std::string dir = targetDir; + + // Open the rule file. This should be copy-if-different because the + // rules may depend on this file itself. + std::string ruleFileNameFull = dir; + ruleFileNameFull += "/depend.make"; + cmGeneratedFileStream ruleFileStream(ruleFileNameFull.c_str()); + ruleFileStream.SetCopyIfDifferent(true); + if(!ruleFileStream) + { + return false; + } + std::string internalRuleFileNameFull = dir; + internalRuleFileNameFull += "/depend.internal"; + cmGeneratedFileStream + internalRuleFileStream(internalRuleFileNameFull.c_str()); + internalRuleFileStream.SetCopyIfDifferent(true); + if(!internalRuleFileStream) + { + return false; + } + + this->WriteDisclaimer(ruleFileStream); + this->WriteDisclaimer(internalRuleFileStream); + + // for each language we need to scan, scan it + const char *langStr = mf->GetSafeDefinition("CMAKE_DEPENDS_LANGUAGES"); + std::vector langs; + cmSystemTools::ExpandListArgument(langStr, langs); + for (std::vector::iterator li = + langs.begin(); li != langs.end(); ++li) + { + // construct the checker + std::string lang = li->c_str(); + + // Get the set of include directories. + std::vector includes; + if(haveDirectoryInfo) + { + std::string includePathVar = "CMAKE_"; + includePathVar += lang; + includePathVar += "_INCLUDE_PATH"; + if(const char* includePath = mf->GetDefinition(includePathVar.c_str())) + { + cmSystemTools::ExpandListArgument(includePath, includes); + } + } + + // Get the include file regular expression. + std::string includeRegexScan = "^.*$"; + std::string includeRegexComplain = "^$"; + if(haveDirectoryInfo) + { + std::string scanRegexVar = "CMAKE_"; + scanRegexVar += lang; + scanRegexVar += "_INCLUDE_REGEX_SCAN"; + if(const char* scanRegex = mf->GetDefinition(scanRegexVar.c_str())) + { + includeRegexScan = scanRegex; + } + std::string complainRegexVar = "CMAKE_"; + complainRegexVar += lang; + complainRegexVar += "_INCLUDE_REGEX_COMPLAIN"; + if(const char* complainRegex = + mf->GetDefinition(complainRegexVar.c_str())) + { + includeRegexComplain = complainRegex; + } + } + + // Create the scanner for this language + cmDepends *scanner = 0; + if(lang == "C" || lang == "CXX" || lang == "RC") + { + std::string includeCacheFileName = dir; + includeCacheFileName += "/"; + includeCacheFileName += lang; + includeCacheFileName += ".includecache"; + + // TODO: Handle RC (resource files) dependencies correctly. + scanner = new cmDependsC(includes, + includeRegexScan.c_str(), + includeRegexComplain.c_str(), + includeCacheFileName); + } +#ifdef CMAKE_BUILD_WITH_CMAKE + else if(lang == "Fortran") + { + std::vector defines; + if(const char* c_defines = + mf->GetDefinition("CMAKE_TARGET_DEFINITIONS")) + { + cmSystemTools::ExpandListArgument(c_defines, defines); + } + + scanner = new cmDependsFortran(includes, defines); + } + else if(lang == "Java") + { + scanner = new cmDependsJava(); + } +#endif + + if (scanner) + { + scanner->SetLocalGenerator(this); + scanner->SetFileComparison + (this->GlobalGenerator->GetCMakeInstance()->GetFileComparison()); + scanner->SetLanguage(lang.c_str()); + scanner->SetTargetDirectory(dir.c_str()); + scanner->Write(ruleFileStream, internalRuleFileStream); + + // free the scanner for this language + delete scanner; + } + } + + return true; +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose) +{ + cmMakefile* mf = this->Makefile; + + // Get the string listing the multiple output pairs. + const char* pairs_string = mf->GetDefinition("CMAKE_MULTIPLE_OUTPUT_PAIRS"); + if(!pairs_string) + { + return; + } + + // Convert the string to a list and preserve empty entries. + std::vector pairs; + cmSystemTools::ExpandListArgument(pairs_string, pairs, true); + for(std::vector::const_iterator i = pairs.begin(); + i != pairs.end(); ++i) + { + const std::string& depender = *i; + if(++i != pairs.end()) + { + const std::string& dependee = *i; + + // If the depender is missing then delete the dependee to make + // sure both will be regenerated. + if(cmSystemTools::FileExists(dependee.c_str()) && + !cmSystemTools::FileExists(depender.c_str())) + { + if(verbose) + { + cmOStringStream msg; + msg << "Deleting primary custom command output \"" << dependee + << "\" because another output \"" + << depender << "\" does not exist." << std::endl; + cmSystemTools::Stdout(msg.str().c_str()); + } + cmSystemTools::RemoveFile(dependee.c_str()); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3 +::WriteLocalAllRules(std::ostream& ruleFileStream) +{ + this->WriteDisclaimer(ruleFileStream); + + // Write the main entry point target. This must be the VERY first + // target so that make with no arguments will run it. + { + // Just depend on the all target to drive the build. + std::vector depends; + std::vector no_commands; + depends.push_back("all"); + + // Write the rule. + this->WriteMakeRule(ruleFileStream, + "Default target executed when no arguments are " + "given to make.", + "default_target", + depends, + no_commands, true); + } + + this->WriteSpecialTargetsTop(ruleFileStream); + + // Include the progress variables for the target. + // Write all global targets + this->WriteDivider(ruleFileStream); + ruleFileStream + << "# Targets provided globally by CMake.\n" + << "\n"; + cmTargets* targets = &(this->Makefile->GetTargets()); + cmTargets::iterator glIt; + for ( glIt = targets->begin(); glIt != targets->end(); ++ glIt ) + { + if ( glIt->second.GetType() == cmTarget::GLOBAL_TARGET ) + { + std::string targetString = "Special rule for the target " + glIt->first; + std::vector commands; + std::vector depends; + + const char* text = glIt->second.GetProperty("EchoString"); + if ( !text ) + { + text = "Running external command ..."; + } + std::set::const_iterator dit; + for ( dit = glIt->second.GetUtilities().begin(); + dit != glIt->second.GetUtilities().end(); + ++ dit ) + { + depends.push_back(dit->c_str()); + } + this->AppendEcho(commands, text, + cmLocalUnixMakefileGenerator3::EchoGlobal); + + // Global targets store their rules in pre- and post-build commands. + this->AppendCustomDepends(depends, + glIt->second.GetPreBuildCommands()); + this->AppendCustomDepends(depends, + glIt->second.GetPostBuildCommands()); + this->AppendCustomCommands(commands, + glIt->second.GetPreBuildCommands()); + this->AppendCustomCommands(commands, + glIt->second.GetPostBuildCommands()); + std::string targetName = glIt->second.GetName(); + this->WriteMakeRule(ruleFileStream, targetString.c_str(), + targetName.c_str(), depends, commands, true); + + // Provide a "/fast" version of the target. + depends.clear(); + if((targetName == "install") + || (targetName == "install_local") + || (targetName == "install_strip")) + { + // Provide a fast install target that does not depend on all + // but has the same command. + depends.push_back("preinstall/fast"); + } + else + { + // Just forward to the real target so at least it will work. + depends.push_back(targetName); + commands.clear(); + } + targetName += "/fast"; + this->WriteMakeRule(ruleFileStream, targetString.c_str(), + targetName.c_str(), depends, commands, true); + } + } + + std::vector depends; + std::vector commands; + + // Write the all rule. + std::string dir; + std::string recursiveTarget = this->Makefile->GetStartOutputDirectory(); + recursiveTarget += "/all"; + + depends.push_back("cmake_check_build_system"); + + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += cmake::GetCMakeFilesDirectory(); + { + cmOStringStream progCmd; + progCmd << + "$(CMAKE_COMMAND) -E cmake_progress_start "; + progCmd << this->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + + std::string progressFile = cmake::GetCMakeFilesDirectory(); + progressFile += "/progress.make"; + std::string progressFileNameFull = + this->ConvertToFullPath(progressFile.c_str()); + progCmd << " " << this->Convert(progressFileNameFull.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + commands.push_back(progCmd.str()); + } + std::string mf2Dir = cmake::GetCMakeFilesDirectoryPostSlash(); + mf2Dir += "Makefile2"; + commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(), + recursiveTarget.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + { + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_start "; // # 0 + progCmd << this->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + progCmd << " 0"; + commands.push_back(progCmd.str()); + } + this->WriteMakeRule(ruleFileStream, "The main all target", "all", + depends, commands, true); + + // Write the clean rule. + recursiveTarget = this->Makefile->GetStartOutputDirectory(); + recursiveTarget += "/clean"; + commands.clear(); + depends.clear(); + commands.push_back(this->GetRecursiveMakeCall(mf2Dir.c_str(), + recursiveTarget.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", + depends, commands, true); + commands.clear(); + depends.clear(); + depends.push_back("clean"); + this->WriteMakeRule(ruleFileStream, "The main clean target", "clean/fast", + depends, commands, true); + + // Write the preinstall rule. + recursiveTarget = this->Makefile->GetStartOutputDirectory(); + recursiveTarget += "/preinstall"; + commands.clear(); + depends.clear(); + const char* noall = + this->Makefile->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY"); + if(!noall || cmSystemTools::IsOff(noall)) + { + // Drive the build before installing. + depends.push_back("all"); + } + else + { + // At least make sure the build system is up to date. + depends.push_back("cmake_check_build_system"); + } + commands.push_back + (this->GetRecursiveMakeCall(mf2Dir.c_str(), recursiveTarget.c_str())); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.", + "preinstall", depends, commands, true); + depends.clear(); + this->WriteMakeRule(ruleFileStream, "Prepare targets for installation.", + "preinstall/fast", depends, commands, true); + + // write the depend rule, really a recompute depends rule + depends.clear(); + commands.clear(); + std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash(); + cmakefileName += "Makefile.cmake"; + std::string runRule = + "$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)"; + runRule += " --check-build-system "; + runRule += this->Convert(cmakefileName.c_str(),cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + runRule += " 1"; + commands.push_back(runRule); + this->CreateCDCommand(commands, + this->Makefile->GetHomeOutputDirectory(), + this->Makefile->GetStartOutputDirectory()); + this->WriteMakeRule(ruleFileStream, "clear depends", + "depend", + depends, commands, true); +} + + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::ClearDependencies(cmMakefile* mf, + bool verbose) +{ + // Get the list of target files to check + const char* infoDef = mf->GetDefinition("CMAKE_DEPEND_INFO_FILES"); + if(!infoDef) + { + return; + } + std::vector files; + cmSystemTools::ExpandListArgument(infoDef, files); + + // Each depend information file corresponds to a target. Clear the + // dependencies for that target. + cmDepends clearer; + clearer.SetVerbose(verbose); + for(std::vector::iterator l = files.begin(); + l != files.end(); ++l) + { + std::string dir = cmSystemTools::GetFilenamePath(l->c_str()); + + // Clear the implicit dependency makefile. + std::string dependFile = dir + "/depend.make"; + clearer.Clear(dependFile.c_str()); + + // Remove the internal dependency check file to force + // regeneration. + std::string internalDependFile = dir + "/depend.internal"; + cmSystemTools::RemoveFile(internalDependFile.c_str()); + } +} + + +void cmLocalUnixMakefileGenerator3 +::WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &target) +{ + ImplicitDependLanguageMap const& implicitLangs = + this->GetImplicitDepends(target); + + // list the languages + cmakefileStream + << "# The set of languages for which implicit dependencies are needed:\n"; + cmakefileStream + << "SET(CMAKE_DEPENDS_LANGUAGES\n"; + for(ImplicitDependLanguageMap::const_iterator + l = implicitLangs.begin(); l != implicitLangs.end(); ++l) + { + cmakefileStream << " \"" << l->first.c_str() << "\"\n"; + } + cmakefileStream << " )\n"; + + // now list the files for each language + cmakefileStream + << "# The set of files for implicit dependencies of each language:\n"; + for(ImplicitDependLanguageMap::const_iterator + l = implicitLangs.begin(); l != implicitLangs.end(); ++l) + { + cmakefileStream + << "SET(CMAKE_DEPENDS_CHECK_" << l->first.c_str() << "\n"; + ImplicitDependFileMap const& implicitPairs = l->second; + + // for each file pair + for(ImplicitDependFileMap::const_iterator pi = implicitPairs.begin(); + pi != implicitPairs.end(); ++pi) + { + cmakefileStream << " \"" << pi->second << "\" "; + cmakefileStream << "\"" << pi->first << "\"\n"; + } + cmakefileStream << " )\n"; + + // Tell the dependency scanner what compiler is used. + std::string cidVar = "CMAKE_"; + cidVar += l->first; + cidVar += "_COMPILER_ID"; + const char* cid = this->Makefile->GetDefinition(cidVar.c_str()); + if(cid && *cid) + { + cmakefileStream + << "SET(CMAKE_" << l->first.c_str() << "_COMPILER_ID \"" + << cid << "\")\n"; + } + } + + // Build a list of preprocessor definitions for the target. + std::vector defines; + { + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += cmSystemTools::UpperCase(this->ConfigurationName); + if(const char* ddefs = this->Makefile->GetProperty("COMPILE_DEFINITIONS")) + { + cmSystemTools::ExpandListArgument(ddefs, defines); + } + if(const char* cdefs = target.GetProperty("COMPILE_DEFINITIONS")) + { + cmSystemTools::ExpandListArgument(cdefs, defines); + } + if(const char* dcdefs = this->Makefile->GetProperty(defPropName.c_str())) + { + cmSystemTools::ExpandListArgument(dcdefs, defines); + } + if(const char* ccdefs = target.GetProperty(defPropName.c_str())) + { + cmSystemTools::ExpandListArgument(ccdefs, defines); + } + } + if(!defines.empty()) + { + cmakefileStream + << "\n" + << "# Preprocessor definitions for this target.\n" + << "SET(CMAKE_TARGET_DEFINITIONS\n"; + for(std::vector::const_iterator di = defines.begin(); + di != defines.end(); ++di) + { + cmakefileStream + << " " << this->EscapeForCMake(di->c_str()) << "\n"; + } + cmakefileStream + << " )\n"; + } +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::GetObjectFileName(cmTarget& target, + const cmSourceFile& source, + std::string* nameWithoutTargetDir, + bool* hasSourceExtension) +{ + // Make sure we never hit this old case. + if(source.GetProperty("MACOSX_PACKAGE_LOCATION")) + { + std::string msg = "MACOSX_PACKAGE_LOCATION set on source file: "; + msg += source.GetFullPath(); + this->GetMakefile()->IssueMessage(cmake::INTERNAL_ERROR, + msg.c_str()); + } + + // Start with the target directory. + std::string obj = this->GetTargetDirectory(target); + obj += "/"; + + // Get the object file name without the target directory. + std::string::size_type dir_len = 0; + dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); + dir_len += 1; + dir_len += obj.size(); + std::string objectName = + this->GetObjectFileNameWithoutTarget(source, dir_len, + hasSourceExtension); + if(nameWithoutTargetDir) + { + *nameWithoutTargetDir = objectName; + } + + // Append the object name to the target directory. + obj += objectName; + return obj; +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::WriteDisclaimer(std::ostream& os) +{ + os + << "# CMAKE generated file: DO NOT EDIT!\n" + << "# Generated by \"" << this->GlobalGenerator->GetName() << "\"" + << " Generator, CMake Version " + << cmVersion::GetMajorVersion() << "." + << cmVersion::GetMinorVersion() << "\n\n"; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::GetRecursiveMakeCall(const char *makefile, const char* tgt) +{ + // Call make on the given file. + std::string cmd; + cmd += "$(MAKE) -f "; + cmd += this->Convert(makefile,NONE,SHELL); + cmd += " "; + + // Passg down verbosity level. + if(this->GetMakeSilentFlag().size()) + { + cmd += this->GetMakeSilentFlag(); + cmd += " "; + } + + // Most unix makes will pass the command line flags to make down to + // sub-invoked makes via an environment variable. However, some + // makes do not support that, so you have to pass the flags + // explicitly. + if(this->GetPassMakeflags()) + { + cmd += "-$(MAKEFLAGS) "; + } + + // Add the target. + if (tgt && tgt[0] != '\0') + { + // The make target is always relative to the top of the build tree. + std::string tgt2 = this->Convert(tgt, HOME_OUTPUT); + + // The target may have been written with windows paths. + cmSystemTools::ConvertToOutputSlashes(tgt2); + + // Escape one extra time if the make tool requires it. + if(this->MakeCommandEscapeTargetTwice) + { + tgt2 = this->EscapeForShell(tgt2.c_str(), true, false); + } + + // The target name is now a string that should be passed verbatim + // on the command line. + cmd += this->EscapeForShell(tgt2.c_str(), true, false); + } + return cmd; +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3::WriteDivider(std::ostream& os) +{ + os + << "#======================================" + << "=======================================\n"; +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3 +::WriteCMakeArgument(std::ostream& os, const char* s) +{ + // Write the given string to the stream with escaping to get it back + // into CMake through the lexical scanner. + os << "\""; + for(const char* c = s; *c; ++c) + { + if(*c == '\\') + { + os << "\\\\"; + } + else if(*c == '"') + { + os << "\\\""; + } + else + { + os << *c; + } + } + os << "\""; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p) +{ + + // Split the path into its components. + std::vector components; + cmSystemTools::SplitPath(p, components); + + // Return an empty path if there are no components. + if(components.empty()) + { + return "\"\""; + } + + // Choose a slash direction and fix root component. + const char* slash = "/"; +#if defined(_WIN32) && !defined(__CYGWIN__) + if(!cmSystemTools::GetForceUnixPaths()) + { + slash = "\\"; + for(std::string::iterator i = components[0].begin(); + i != components[0].end(); ++i) + { + if(*i == '/') + { + *i = '\\'; + } + } + } +#endif + + // Begin the quoted result with the root component. + std::string result = "\""; + result += components[0]; + + // Now add the rest of the components separated by the proper slash + // direction for this platform. + bool first = true; + for(unsigned int i=1; i < components.size(); ++i) + { + // Only the last component can be empty to avoid double slashes. + if(components[i].length() > 0 || (i == (components.size()-1))) + { + if(!first) + { + result += slash; + } + result += components[i]; + first = false; + } + } + + // Close the quoted result. + result += "\""; + + return result; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalUnixMakefileGenerator3 +::GetTargetDirectory(cmTarget const& target) const +{ + std::string dir = cmake::GetCMakeFilesDirectoryPostSlash(); + dir += target.GetName(); + dir += ".dir"; + return dir; +} + +//---------------------------------------------------------------------------- +cmLocalUnixMakefileGenerator3::ImplicitDependLanguageMap const& +cmLocalUnixMakefileGenerator3::GetImplicitDepends(cmTarget const& tgt) +{ + return this->ImplicitDepends[tgt.GetName()]; +} + +//---------------------------------------------------------------------------- +void +cmLocalUnixMakefileGenerator3::AddImplicitDepends(cmTarget const& tgt, + const char* lang, + const char* obj, + const char* src) +{ + this->ImplicitDepends[tgt.GetName()][lang][obj] = src; +} + +//---------------------------------------------------------------------------- +void cmLocalUnixMakefileGenerator3 +::CreateCDCommand(std::vector& commands, const char *tgtDir, + const char *retDir) +{ + // do we need to cd? + if (!strcmp(tgtDir,retDir)) + { + return; + } + + if(!this->UnixCD) + { + // On Windows we must perform each step separately and then change + // back because the shell keeps the working directory between + // commands. + std::string cmd = "cd "; + cmd += this->ConvertToOutputForExisting(tgtDir); + commands.insert(commands.begin(),cmd); + + // Change back to the starting directory. Any trailing slash must be + // removed to avoid problems with Borland Make. + std::string back = retDir; + if(back.size() && back[back.size()-1] == '/') + { + back = back.substr(0, back.size()-1); + } + cmd = "cd "; + cmd += this->ConvertToOutputForExisting(back.c_str()); + commands.push_back(cmd); + } + else + { + // On UNIX we must construct a single shell command to change + // directory and build because make resets the directory between + // each command. + std::vector::iterator i = commands.begin(); + for (; i != commands.end(); ++i) + { + std::string cmd = "cd "; + cmd += this->ConvertToOutputForExisting(tgtDir); + cmd += " && "; + cmd += *i; + *i = cmd; + } + } +} + + +void cmLocalUnixMakefileGenerator3 +::GetTargetObjectFileDirectories(cmTarget* target, + std::vector& dirs) +{ + std::string dir = this->Makefile->GetCurrentOutputDirectory(); + dir += "/"; + dir += this->GetTargetDirectory(*target); + dirs.push_back(dir); +} diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h new file mode 100644 index 000000000..ec619929d --- /dev/null +++ b/Source/cmLocalUnixMakefileGenerator3.h @@ -0,0 +1,384 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalUnixMakefileGenerator3.h,v $ + Language: C++ + Date: $Date: 2008-01-13 21:36:20 $ + Version: $Revision: 1.82 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalUnixMakefileGenerator3_h +#define cmLocalUnixMakefileGenerator3_h + +#include "cmLocalGenerator.h" + +class cmCustomCommand; +class cmDependInformation; +class cmDepends; +class cmMakefileTargetGenerator; +class cmTarget; +class cmSourceFile; + +/** \class cmLocalUnixMakefileGenerator3 + * \brief Write a LocalUnix makefiles. + * + * cmLocalUnixMakefileGenerator3 produces a LocalUnix makefile from its + * member Makefile. + */ +class cmLocalUnixMakefileGenerator3 : public cmLocalGenerator +{ +public: + cmLocalUnixMakefileGenerator3(); + virtual ~cmLocalUnixMakefileGenerator3(); + + /** + * Process the CMakeLists files for this directory to fill in the + * Makefile ivar + */ + virtual void Configure(); + + /** + * Generate the makefile for this directory. + */ + virtual void Generate(); + + + // this returns the relative path between the HomeOutputDirectory and this + // local generators StartOutputDirectory + const std::string &GetHomeRelativeOutputPath(); + + // Write out a make rule + void WriteMakeRule(std::ostream& os, + const char* comment, + const char* target, + const std::vector& depends, + const std::vector& commands, + bool symbolic, + bool in_help = false); + + // write the main variables used by the makefiles + void WriteMakeVariables(std::ostream& makefileStream); + + // write the progress variables used by the makefiles + void WriteProgressVariables(unsigned long total, unsigned long ¤t); + void WriteAllProgressVariable(); + + /** + * If true, then explicitly pass MAKEFLAGS on the make all target for makes + * that do not use environment variables. + * + */ + void SetPassMakeflags(bool s){this->PassMakeflags = s;} + bool GetPassMakeflags() { return this->PassMakeflags; } + + /** + * Set the flag used to keep the make program silent. + */ + void SetMakeSilentFlag(const char* s) { this->MakeSilentFlag = s; } + std::string &GetMakeSilentFlag() { return this->MakeSilentFlag; } + + /** + * Set to true if the shell being used is the windows shell. + * This controls if statements in the makefile and the SHELL variable. + * The default is false. + */ + void SetWindowsShell(bool v) {this->WindowsShell = v;} + + /** + * Set to true if the make tool being used is Watcom WMake. + */ + void SetWatcomWMake(bool v) {this->WatcomWMake = v;} + + /** + * Set to true if the make tool being used is MinGW Make. + */ + void SetMinGWMake(bool v) {this->MinGWMake = v;} + + /** + * Set to true if the make tool being used is NMake. + */ + void SetNMake(bool v) {this->NMake = v;} + + /** + * Set to true if the shell being used is the MSYS shell. + * This controls if statements in the makefile and the SHELL variable. + * The default is false. + */ + void SetMSYSShell(bool v) {this->MSYSShell = v;} + + /** + * If set to true, then NULL is set to nil for non Windows_NT. + * This uses make syntax used by nmake and borland. + * The default is false. + */ + void SetDefineWindowsNULL(bool v) {this->DefineWindowsNULL = v;} + + /** + * If set to true, cd dir && command is used to + * run commands in a different directory. + */ + void SetUnixCD(bool v) {this->UnixCD = v;} + + /** + * Set Support Verbose Variable. If true, then .SILENT will + * be not end with : i.e. .SILENT: or .SILENT + */ + void SetSilentNoColon(bool v) {this->SilentNoColon = v;} + + /** + * Set the command to use for native make shell echo. The value + * should include all parts of the command up to the beginning of + * the message (including a whitespace separator). + */ + void SetNativeEchoCommand(const char* cmd, bool isWindows) + { this->NativeEchoCommand = cmd; this->NativeEchoWindows = isWindows; } + + /** + * Set the string used to include one makefile into another default + * is include. + */ + void SetIncludeDirective(const char* s) { this->IncludeDirective = s; } + const char *GetIncludeDirective() { return this->IncludeDirective.c_str(); } + + /** + * Set max makefile variable size, default is 0 which means unlimited. + */ + void SetMakefileVariableSize(int s) { this->MakefileVariableSize = s; } + + /** + * If ignore lib prefix is true, then do not strip lib from the name + * of a library. + */ + void SetIgnoreLibPrefix(bool s) { this->IgnoreLibPrefix = s; } + + /** + * Set whether passing a make target on a command line requires an + * extra level of escapes. + */ + void SetMakeCommandEscapeTargetTwice(bool b) + { this->MakeCommandEscapeTargetTwice = b; } + + /** + * Set whether the Borland curly brace command line hack should be + * applied. + */ + void SetBorlandMakeCurlyHack(bool b) + { this->BorlandMakeCurlyHack = b; } + + // used in writing out Cmake files such as WriteDirectoryInformation + static void WriteCMakeArgument(std::ostream& os, const char* s); + + /** creates the common disclainer text at the top of each makefile */ + void WriteDisclaimer(std::ostream& os); + + // write a comment line #====... in the stream + void WriteDivider(std::ostream& os); + + /** used to create a recursive make call */ + std::string GetRecursiveMakeCall(const char *makefile, const char* tgt); + + // append flags to a string + virtual void AppendFlags(std::string& flags, const char* newFlags); + + // append an echo command + enum EchoColor { EchoNormal, EchoDepend, EchoBuild, EchoLink, + EchoGenerate, EchoGlobal }; + void AppendEcho(std::vector& commands, const char* text, + EchoColor color = EchoNormal); + + virtual std::string GetTargetDirectory(cmTarget const& target) const; + + // create a command that cds to the start dir then runs the commands + void CreateCDCommand(std::vector& commands, + const char *targetDir, const char *returnDir); + + static std::string ConvertToQuotedOutputPath(const char* p); + + std::string CreateMakeVariable(const char* sin, const char* s2in); + + /** Called from command-line hook to bring dependencies up to date + for a target. */ + virtual bool UpdateDependencies(const char* tgtInfo, + bool verbose, bool color); + + /** Called from command-line hook to clear dependencies. */ + virtual void ClearDependencies(cmMakefile* mf, bool verbose); + + /** write some extra rules such as make test etc */ + void WriteSpecialTargetsTop(std::ostream& makefileStream); + void WriteSpecialTargetsBottom(std::ostream& makefileStream); + + std::string GetRelativeTargetDirectory(cmTarget const& target); + + // File pairs for implicit dependency scanning. The key of the map + // is the depender and the value is the explicit dependee. + struct ImplicitDependFileMap: public std::map {}; + struct ImplicitDependLanguageMap: + public std::map {}; + struct ImplicitDependTargetMap: + public std::map {}; + ImplicitDependLanguageMap const& GetImplicitDepends(cmTarget const& tgt); + + void AddImplicitDepends(cmTarget const& tgt, const char* lang, + const char* obj, const char* src); + + void AppendGlobalTargetDepends(std::vector& depends, + cmTarget& target); + + // write the target rules for the local Makefile into the stream + void WriteLocalAllRules(std::ostream& ruleFileStream); + + struct LocalObjectEntry + { + cmTarget* Target; + std::string Language; + LocalObjectEntry(): Target(0), Language() {} + LocalObjectEntry(cmTarget* t, const char* lang): + Target(t), Language(lang) {} + }; + struct LocalObjectInfo: public std::vector + { + bool HasSourceExtension; + }; + std::map const& GetLocalObjectFiles() + { return this->LocalObjectFiles;} + + std::vector const& GetLocalHelp() { return this->LocalHelp; } + + // return info about progress actions + unsigned long GetNumberOfProgressActions(); + unsigned long GetNumberOfProgressActionsForTarget(const char *); + + /** Get whether to create rules to generate preprocessed and + assembly sources. This could be converted to a variable lookup + later. */ + bool GetCreatePreprocessedSourceRules() + { + return !this->SkipPreprocessedSourceRules; + } + bool GetCreateAssemblySourceRules() + { + return !this->SkipAssemblySourceRules; + } + // Get the directories into which the .o files will go for this target + void GetTargetObjectFileDirectories(cmTarget* target, + std::vector& dirs); +protected: + void WriteLocalMakefile(); + + + // write the target rules for the local Makefile into the stream + void WriteLocalMakefileTargets(std::ostream& ruleFileStream, + std::set &emitted); + + // this method Writes the Directory informaiton files + void WriteDirectoryInformationFile(); + + + // write the depend info + void WriteDependLanguageInfo(std::ostream& cmakefileStream, cmTarget &tgt); + + // write the local help rule + void WriteHelpRule(std::ostream& ruleFileStream); + + // this converts a file name that is relative to the StartOuputDirectory + // into a full path + std::string ConvertToFullPath(const std::string& localPath); + + + void WriteConvenienceRule(std::ostream& ruleFileStream, + const char* realTarget, + const char* helpTarget); + + void WriteTargetDependRule(std::ostream& ruleFileStream, + cmTarget& target); + void WriteTargetCleanRule(std::ostream& ruleFileStream, + cmTarget& target, + const std::vector& files); + void WriteTargetRequiresRule(std::ostream& ruleFileStream, + cmTarget& target, + const std::vector& objects); + void WriteObjectConvenienceRule(std::ostream& ruleFileStream, + const char* comment, const char* output, + LocalObjectInfo const& info); + + std::string GetObjectFileName(cmTarget& target, + const cmSourceFile& source, + std::string* nameWithoutTargetDir = 0, + bool* hasSourceExtension = 0); + + void AppendRuleDepend(std::vector& depends, + const char* ruleFileName); + void AppendCustomDepends(std::vector& depends, + const std::vector& ccs); + void AppendCustomDepend(std::vector& depends, + const cmCustomCommand& cc); + void AppendCustomCommands(std::vector& commands, + const std::vector& ccs); + void AppendCustomCommand(std::vector& commands, + const cmCustomCommand& cc, + bool echo_comment=false); + void AppendCleanCommand(std::vector& commands, + const std::vector& files, + cmTarget& target, const char* filename =0); + + std::map > ProgressFiles; + + // Helper methods for dependeny updates. + bool ScanDependencies(const char* targetDir); + void CheckMultipleOutputs(bool verbose); + +private: + friend class cmMakefileTargetGenerator; + friend class cmMakefileExecutableTargetGenerator; + friend class cmMakefileLibraryTargetGenerator; + friend class cmMakefileUtilityTargetGenerator; + friend class cmGlobalUnixMakefileGenerator3; + + ImplicitDependTargetMap ImplicitDepends; + + //========================================================================== + // Configuration settings. + int MakefileVariableSize; + std::string IncludeDirective; + std::string MakeSilentFlag; + std::string ConfigurationName; + std::string NativeEchoCommand; + bool NativeEchoWindows; + bool DefineWindowsNULL; + bool UnixCD; + bool PassMakeflags; + bool SilentNoColon; + bool MakeCommandEscapeTargetTwice; + bool BorlandMakeCurlyHack; + //========================================================================== + + std::string HomeRelativeOutputPath; + + /* Copy the setting of CMAKE_COLOR_MAKEFILE from the makefile at the + beginning of generation to avoid many duplicate lookups. */ + bool ColorMakefile; + + /* Copy the setting of CMAKE_SKIP_PREPROCESSED_SOURCE_RULES and + CMAKE_SKIP_ASSEMBLY_SOURCE_RULES at the beginning of generation to + avoid many duplicate lookups. */ + bool SkipPreprocessedSourceRules; + bool SkipAssemblySourceRules; + + std::map LocalObjectFiles; + std::vector LocalHelp; + + /* does the work for each target */ + std::vector TargetGenerators; + std::map MakeVariableMap; + std::map ShortMakeVariableMap; +}; + +#endif diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx new file mode 100644 index 000000000..f8ca676f9 --- /dev/null +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -0,0 +1,1683 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudio6Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-23 02:05:39 $ + Version: $Revision: 1.141.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalGenerator.h" +#include "cmLocalVisualStudio6Generator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmSourceFile.h" +#include "cmCacheManager.h" +#include "cmake.h" + +#include "cmComputeLinkInformation.h" + +#include + +cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator() +{ +} + +cmLocalVisualStudio6Generator::~cmLocalVisualStudio6Generator() +{ +} + +void cmLocalVisualStudio6Generator::AddHelperCommands() +{ + std::set lang; + lang.insert("C"); + lang.insert("CXX"); + this->CreateCustomTargetsAndCommands(lang); +} + +void cmLocalVisualStudio6Generator::Generate() +{ + this->OutputDSPFile(); +} + +void cmLocalVisualStudio6Generator::OutputDSPFile() +{ + // If not an in source build, then create the output directory + if(strcmp(this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeDirectory()) != 0) + { + if(!cmSystemTools::MakeDirectory + (this->Makefile->GetStartOutputDirectory())) + { + cmSystemTools::Error("Error creating directory ", + this->Makefile->GetStartOutputDirectory()); + } + } + + // Setup /I and /LIBPATH options for the resulting DSP file. VS 6 + // truncates long include paths so make it as short as possible if + // the length threatents this problem. + unsigned int maxIncludeLength = 3000; + bool useShortPath = false; + for(int j=0; j < 2; ++j) + { + std::vector includes; + this->GetIncludeDirectories(includes); + std::vector::iterator i; + for(i = includes.begin(); i != includes.end(); ++i) + { + std::string tmp = + this->ConvertToOptionallyRelativeOutputPath(i->c_str()); + if(useShortPath) + { + cmSystemTools::GetShortPath(tmp.c_str(), tmp); + } + this->IncludeOptions += " /I "; + + // quote if not already quoted + if (tmp[0] != '"') + { + this->IncludeOptions += "\""; + this->IncludeOptions += tmp; + this->IncludeOptions += "\""; + } + else + { + this->IncludeOptions += tmp; + } + } + if(j == 0 && this->IncludeOptions.size() > maxIncludeLength) + { + this->IncludeOptions = ""; + useShortPath = true; + } + else + { + break; + } + } + + // Create the DSP or set of DSP's for libraries and executables + + // clear project names + this->CreatedProjectNames.clear(); + cmTargets &tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + // Add a rule to regenerate the build system when the target + // specification source changes. + const char* suppRegenRule = + this->Makefile->GetDefinition("CMAKE_SUPPRESS_REGENERATION"); + if (!cmSystemTools::IsOn(suppRegenRule)) + { + this->AddDSPBuildRule(l->second); + } + } + + // build any targets + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + switch(l->second.GetType()) + { + case cmTarget::STATIC_LIBRARY: + this->SetBuildType(STATIC_LIBRARY, l->first.c_str(), l->second); + break; + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + this->SetBuildType(DLL, l->first.c_str(), l->second); + break; + case cmTarget::EXECUTABLE: + this->SetBuildType(EXECUTABLE,l->first.c_str(), l->second); + break; + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + this->SetBuildType(UTILITY, l->first.c_str(), l->second); + break; + default: + cmSystemTools::Error("Bad target type", l->first.c_str()); + break; + } + // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace + // so don't build a projectfile for it + if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) + { + // check to see if the dsp is going into a sub-directory + std::string::size_type pos = l->first.rfind('/'); + if(pos != std::string::npos) + { + std::string dir = this->Makefile->GetStartOutputDirectory(); + dir += "/"; + dir += l->first.substr(0, pos); + if(!cmSystemTools::MakeDirectory(dir.c_str())) + { + cmSystemTools::Error("Error creating directory ", dir.c_str()); + } + } + this->CreateSingleDSP(l->first.c_str(),l->second); + } + } +} + +void cmLocalVisualStudio6Generator::CreateSingleDSP(const char *lname, + cmTarget &target) +{ + // add to the list of projects + std::string pname = lname; + this->CreatedProjectNames.push_back(pname); + // create the dsp.cmake file + std::string fname; + fname = this->Makefile->GetStartOutputDirectory(); + fname += "/"; + fname += lname; + fname += ".dsp"; + // save the name of the real dsp file + std::string realDSP = fname; + fname += ".cmake"; + std::ofstream fout(fname.c_str()); + if(!fout) + { + cmSystemTools::Error("Error Writing ", fname.c_str()); + cmSystemTools::ReportLastSystemError(""); + } + this->WriteDSPFile(fout,lname,target); + fout.close(); + // if the dsp file has changed, then write it. + cmSystemTools::CopyFileIfDifferent(fname.c_str(), realDSP.c_str()); +} + + +void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) +{ + std::string dspname = tgt.GetName(); + dspname += ".dsp.cmake"; + const char* dsprule = + this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); + cmCustomCommandLine commandLine; + commandLine.push_back(dsprule); + std::string makefileIn = this->Makefile->GetStartDirectory(); + makefileIn += "/"; + makefileIn += "CMakeLists.txt"; + std::string comment = "Building Custom Rule "; + comment += makefileIn; + std::string args; + args = "-H"; + args += this->Convert(this->Makefile->GetHomeDirectory(), + START_OUTPUT, UNCHANGED, true); + commandLine.push_back(args); + args = "-B"; + args += + this->Convert(this->Makefile->GetHomeOutputDirectory(), + START_OUTPUT, UNCHANGED, true); + commandLine.push_back(args); + + std::vector const& listFiles = this->Makefile->GetListFiles(); + + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + const char* no_working_directory = 0; + this->Makefile->AddCustomCommandToOutput(dspname.c_str(), listFiles, + makefileIn.c_str(), commandLines, + comment.c_str(), + no_working_directory, true); + if(cmSourceFile* file = this->Makefile->GetSource(makefileIn.c_str())) + { + tgt.AddSourceFile(file); + } + else + { + cmSystemTools::Error("Error adding rule for ", makefileIn.c_str()); + } +} + + +void cmLocalVisualStudio6Generator::WriteDSPFile(std::ostream& fout, + const char *libName, + cmTarget &target) +{ + // For utility targets need custom command since pre- and post- + // build does not do anything in Visual Studio 6. In order for the + // rules to run in the correct order as custom commands, we need + // special care for dependencies. The first rule must depend on all + // the dependencies of all the rules. The later rules must each + // depend only on the previous rule. + if ((target.GetType() == cmTarget::UTILITY || + target.GetType() == cmTarget::GLOBAL_TARGET) && + (!target.GetPreBuildCommands().empty() || + !target.GetPostBuildCommands().empty())) + { + // Accumulate the dependencies of all the commands. + std::vector depends; + for (std::vector::const_iterator cr = + target.GetPreBuildCommands().begin(); + cr != target.GetPreBuildCommands().end(); ++cr) + { + depends.insert(depends.end(), + cr->GetDepends().begin(), cr->GetDepends().end()); + } + for (std::vector::const_iterator cr = + target.GetPostBuildCommands().begin(); + cr != target.GetPostBuildCommands().end(); ++cr) + { + depends.insert(depends.end(), + cr->GetDepends().begin(), cr->GetDepends().end()); + } + + // Add the pre- and post-build commands in order. + int count = 1; + for (std::vector::const_iterator cr = + target.GetPreBuildCommands().begin(); + cr != target.GetPreBuildCommands().end(); ++cr) + { + this->AddUtilityCommandHack(target, count++, depends, *cr); + } + for (std::vector::const_iterator cr = + target.GetPostBuildCommands().begin(); + cr != target.GetPostBuildCommands().end(); ++cr) + { + this->AddUtilityCommandHack(target, count++, depends, *cr); + } + } + + // trace the visual studio dependencies + std::string name = libName; + name += ".dsp.cmake"; + + // We may be modifying the source groups temporarily, so make a copy. + std::vector sourceGroups = this->Makefile->GetSourceGroups(); + + // get the classes from the source lists then add them to the groups + std::vector const & classes = target.GetSourceFiles(); + + // now all of the source files have been properly assigned to the target + // now stick them into source groups using the reg expressions + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + // Add the file to the list of sources. + std::string source = (*i)->GetFullPath(); + cmSourceGroup& sourceGroup = + this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); + sourceGroup.AssignSource(*i); + // while we are at it, if it is a .rule file then for visual studio 6 we + // must generate it + if ((*i)->GetExtension() == "rule") + { + if(!cmSystemTools::FileExists(source.c_str())) + { + cmSystemTools::ReplaceString(source, "$(IntDir)/", ""); +#if defined(_WIN32) || defined(__CYGWIN__) + std::ofstream fout(source.c_str(), + std::ios::binary | std::ios::out + | std::ios::trunc); +#else + std::ofstream fout(source.c_str(), + std::ios::out | std::ios::trunc); +#endif + if(fout) + { + fout.write("# generated from CMake",22); + fout.flush(); + fout.close(); + } + } + } + } + + // Compute which sources need unique object computation. + this->ComputeObjectNameRequirements(sourceGroups); + + // Write the DSP file's header. + this->WriteDSPHeader(fout, libName, target, sourceGroups); + + + // Loop through every source group. + for(std::vector::const_iterator sg = sourceGroups.begin(); + sg != sourceGroups.end(); ++sg) + { + this->WriteGroup(&(*sg), target, fout, libName); + } + + // Write the DSP file's footer. + this->WriteDSPFooter(fout); +} + +void cmLocalVisualStudio6Generator +::WriteGroup(const cmSourceGroup *sg, cmTarget& target, + std::ostream &fout, const char *libName) +{ + const std::vector &sourceFiles = + sg->GetSourceFiles(); + // If the group is empty, don't write it at all. + + if(sourceFiles.empty() && sg->GetGroupChildren().empty()) + { + return; + } + + // If the group has a name, write the header. + std::string name = sg->GetName(); + if(name != "") + { + this->WriteDSPBeginGroup(fout, name.c_str(), ""); + } + + // Compute the maximum length of a configuration name. + std::string::size_type config_len_max = 0; + for(std::vector::iterator i = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + // Strip the subdirectory name out of the configuration name. + std::string config = this->GetConfigName(*i); + if(config.size() > config_len_max) + { + config_len_max = config.size(); + } + } + + // Compute the maximum length of the full path to the intermediate + // files directory for any configuration. This is used to construct + // object file names that do not produce paths that are too long. + std::string::size_type dir_len = 0; + dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); + dir_len += 1; + dir_len += config_len_max; + dir_len += 1; + + // Loop through each source in the source group. + for(std::vector::const_iterator sf = + sourceFiles.begin(); sf != sourceFiles.end(); ++sf) + { + std::string source = (*sf)->GetFullPath(); + const cmCustomCommand *command = + (*sf)->GetCustomCommand(); + std::string compileFlags; + std::vector depends; + std::string objectNameDir; + if(this->NeedObjectName.find(*sf) != this->NeedObjectName.end()) + { + objectNameDir = + cmSystemTools::GetFilenamePath( + this->GetObjectFileNameWithoutTarget(*(*sf), dir_len)); + } + + // Add per-source file flags. + if(const char* cflags = (*sf)->GetProperty("COMPILE_FLAGS")) + { + compileFlags += cflags; + } + + const char* lang = this->GetSourceFileLanguage(*(*sf)); + if(lang) + { + if(strcmp(lang, "CXX") == 0) + { + // force a C++ file type + compileFlags += " /TP "; + } + else if(strcmp(lang, "C") == 0) + { + // force to c file type + compileFlags += " /TC "; + } + } + + // Add per-source and per-configuration preprocessor definitions. + std::map cdmap; + this->AppendDefines(compileFlags, + (*sf)->GetProperty("COMPILE_DEFINITIONS"), lang); + if(const char* cdefs = (*sf)->GetProperty("COMPILE_DEFINITIONS_DEBUG")) + { + this->AppendDefines(cdmap["DEBUG"], cdefs, lang); + } + if(const char* cdefs = (*sf)->GetProperty("COMPILE_DEFINITIONS_RELEASE")) + { + this->AppendDefines(cdmap["RELEASE"], cdefs, lang); + } + if(const char* cdefs = + (*sf)->GetProperty("COMPILE_DEFINITIONS_MINSIZEREL")) + { + this->AppendDefines(cdmap["MINSIZEREL"], cdefs, lang); + } + if(const char* cdefs = + (*sf)->GetProperty("COMPILE_DEFINITIONS_RELWITHDEBINFO")) + { + this->AppendDefines(cdmap["RELWITHDEBINFO"], cdefs, lang); + } + + bool excludedFromBuild = + (lang && (*sf)->GetPropertyAsBool("HEADER_FILE_ONLY")); + + // Check for extra object-file dependencies. + const char* dependsValue = (*sf)->GetProperty("OBJECT_DEPENDS"); + if(dependsValue) + { + cmSystemTools::ExpandListArgument(dependsValue, depends); + } + if (source != libName || target.GetType() == cmTarget::UTILITY || + target.GetType() == cmTarget::GLOBAL_TARGET) + { + fout << "# Begin Source File\n\n"; + + // Tell MS-Dev what the source is. If the compiler knows how to + // build it, then it will. + fout << "SOURCE=" << + this->ConvertToOptionallyRelativeOutputPath(source.c_str()) << "\n\n"; + if(!depends.empty()) + { + // Write out the dependencies for the rule. + fout << "USERDEP__HACK="; + for(std::vector::const_iterator d = depends.begin(); + d != depends.end(); ++d) + { + fout << "\\\n\t" << + this->ConvertToOptionallyRelativeOutputPath(d->c_str()); + } + fout << "\n"; + } + if (command) + { + const char* flags = compileFlags.size() ? compileFlags.c_str(): 0; + this->WriteCustomRule(fout, source.c_str(), *command, flags); + } + else if(!compileFlags.empty() || !objectNameDir.empty() || + excludedFromBuild || !cdmap.empty()) + { + for(std::vector::iterator i + = this->Configurations.begin(); + i != this->Configurations.end(); ++i) + { + // Strip the subdirectory name out of the configuration name. + std::string config = this->GetConfigName(*i); + if (i == this->Configurations.begin()) + { + fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; + } + else + { + fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; + } + if(excludedFromBuild) + { + fout << "# PROP Exclude_From_Build 1\n"; + } + if(!compileFlags.empty()) + { + fout << "\n# ADD CPP " << compileFlags << "\n\n"; + } + std::map::iterator cdi = + cdmap.find(cmSystemTools::UpperCase(config)); + if(cdi != cdmap.end() && !cdi->second.empty()) + { + fout << "\n# ADD CPP " << cdi->second << "\n\n"; + } + if(!objectNameDir.empty()) + { + // Setup an alternate object file directory. + fout << "\n# PROP Intermediate_Dir \"" + << config << "/" << objectNameDir << "\"\n\n"; + } + } + fout << "!ENDIF\n\n"; + } + fout << "# End Source File\n"; + } + } + + std::vector children = sg->GetGroupChildren(); + + for(unsigned int i=0;iWriteGroup(&children[i], target, fout, libName); + } + + + + + // If the group has a name, write the footer. + if(name != "") + { + this->WriteDSPEndGroup(fout); + } + +} + + +void +cmLocalVisualStudio6Generator +::AddUtilityCommandHack(cmTarget& target, int count, + std::vector& depends, + const cmCustomCommand& origCommand) +{ + // Create a fake output that forces the rule to run. + char* output = new char[(strlen(this->Makefile->GetStartOutputDirectory()) + + strlen(target.GetName()) + 30)]; + sprintf(output,"%s/%s_force_%i", this->Makefile->GetStartOutputDirectory(), + target.GetName(), count); + std::string comment = this->ConstructComment(origCommand, ""); + + // Add the rule with the given dependencies and commands. + const char* no_main_dependency = 0; + this->Makefile->AddCustomCommandToOutput(output, + depends, + no_main_dependency, + origCommand.GetCommandLines(), + comment.c_str(), + origCommand.GetWorkingDirectory()); + + // Replace the dependencies with the output of this rule so that the + // next rule added will run after this one. + depends.clear(); + depends.push_back(output); + + // Add a source file representing this output to the project. + cmSourceFile* outsf = this->Makefile->GetSourceFileWithOutput(output); + target.AddSourceFile(outsf); + + // Free the fake output name. + delete [] output; +} + +void +cmLocalVisualStudio6Generator +::WriteCustomRule(std::ostream& fout, + const char* source, + const cmCustomCommand& command, + const char* flags) +{ + std::string comment = + this->ConstructComment(command, "Building Custom Rule $(InputPath)"); + if(comment == "") + { + comment = ""; + } + + // Write the rule for each configuration. + std::vector::iterator i; + for(i = this->Configurations.begin(); i != this->Configurations.end(); ++i) + { + std::string config = this->GetConfigName(*i); + std::string script = + this->ConstructScript(command.GetCommandLines(), + command.GetWorkingDirectory(), + config.c_str(), + command.GetEscapeOldStyle(), + command.GetEscapeAllowMakeVars(), + "\\\n\t"); + + if (i == this->Configurations.begin()) + { + fout << "!IF \"$(CFG)\" == " << i->c_str() << std::endl; + } + else + { + fout << "!ELSEIF \"$(CFG)\" == " << i->c_str() << std::endl; + } + if(flags) + { + fout << "\n# ADD CPP " << flags << "\n\n"; + } + // Write out the dependencies for the rule. + fout << "USERDEP__HACK="; + for(std::vector::const_iterator d = + command.GetDepends().begin(); + d != command.GetDepends().end(); + ++d) + { + // Lookup the real name of the dependency in case it is a CMake target. + std::string dep = this->GetRealDependency(d->c_str(), + config.c_str()); + fout << "\\\n\t" << + this->ConvertToOptionallyRelativeOutputPath(dep.c_str()); + } + fout << "\n"; + + fout << "# PROP Ignore_Default_Tool 1\n"; + fout << "# Begin Custom Build -"; + if(!comment.empty()) + { + fout << " " << comment.c_str(); + } + fout << "\n\n"; + if(command.GetOutputs().empty()) + { + fout << source + << "_force : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; + fout << script.c_str() << "\n\n"; + } + else + { + for(std::vector::const_iterator o = + command.GetOutputs().begin(); + o != command.GetOutputs().end(); + ++o) + { + // Write a rule for every output generated by this command. + fout << this->ConvertToOptionallyRelativeOutputPath(o->c_str()) + << " : \"$(SOURCE)\" \"$(INTDIR)\" \"$(OUTDIR)\"\n\t"; + fout << script.c_str() << "\n\n"; + } + } + fout << "# End Custom Build\n\n"; + } + + fout << "!ENDIF\n\n"; +} + + +void cmLocalVisualStudio6Generator::WriteDSPBeginGroup(std::ostream& fout, + const char* group, + const char* filter) +{ + fout << "# Begin Group \"" << group << "\"\n" + "# PROP Default_Filter \"" << filter << "\"\n"; +} + + +void cmLocalVisualStudio6Generator::WriteDSPEndGroup(std::ostream& fout) +{ + fout << "# End Group\n"; +} + + + + +void cmLocalVisualStudio6Generator::SetBuildType(BuildType b, + const char* libName, + cmTarget& target) +{ + std::string root= this->Makefile->GetRequiredDefinition("CMAKE_ROOT"); + const char *def= + this->Makefile->GetDefinition( "MSPROJECT_TEMPLATE_DIRECTORY"); + + if( def) + { + root = def; + } + else + { + root += "/Templates"; + } + + switch(b) + { + case STATIC_LIBRARY: + this->DSPHeaderTemplate = root; + this->DSPHeaderTemplate += "/staticLibHeader.dsptemplate"; + this->DSPFooterTemplate = root; + this->DSPFooterTemplate += "/staticLibFooter.dsptemplate"; + break; + case DLL: + this->DSPHeaderTemplate = root; + this->DSPHeaderTemplate += "/DLLHeader.dsptemplate"; + this->DSPFooterTemplate = root; + this->DSPFooterTemplate += "/DLLFooter.dsptemplate"; + break; + case EXECUTABLE: + if ( target.GetPropertyAsBool("WIN32_EXECUTABLE") ) + { + this->DSPHeaderTemplate = root; + this->DSPHeaderTemplate += "/EXEWinHeader.dsptemplate"; + this->DSPFooterTemplate = root; + this->DSPFooterTemplate += "/EXEFooter.dsptemplate"; + } + else + { + this->DSPHeaderTemplate = root; + this->DSPHeaderTemplate += "/EXEHeader.dsptemplate"; + this->DSPFooterTemplate = root; + this->DSPFooterTemplate += "/EXEFooter.dsptemplate"; + } + break; + case UTILITY: + this->DSPHeaderTemplate = root; + this->DSPHeaderTemplate += "/UtilityHeader.dsptemplate"; + this->DSPFooterTemplate = root; + this->DSPFooterTemplate += "/UtilityFooter.dsptemplate"; + break; + } + + // once the build type is set, determine what configurations are + // possible + std::ifstream fin(this->DSPHeaderTemplate.c_str()); + + cmsys::RegularExpression reg("# Name "); + if(!fin) + { + cmSystemTools::Error("Error Reading ", this->DSPHeaderTemplate.c_str()); + } + + // reset this->Configurations + this->Configurations.erase(this->Configurations.begin(), + this->Configurations.end()); + // now add all the configurations possible + std::string line; + while(cmSystemTools::GetLineFromStream(fin, line)) + { + cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName); + if (reg.find(line)) + { + this->Configurations.push_back(line.substr(reg.end())); + } + } +} + +// look for custom rules on a target and collect them together +std::string +cmLocalVisualStudio6Generator::CreateTargetRules(cmTarget &target, + const char* configName, + const char * /* libName */) +{ + std::string customRuleCode = ""; + + if (target.GetType() >= cmTarget::UTILITY ) + { + return customRuleCode; + } + + // are there any rules? + if (target.GetPreBuildCommands().size() + + target.GetPreLinkCommands().size() + + target.GetPostBuildCommands().size() == 0) + { + return customRuleCode; + } + + customRuleCode = "# Begin Special Build Tool\n"; + + // Write the pre-build and pre-link together (VS6 does not support + // both). Make sure no continuation character is put on the last + // line. + int prelink_total = (static_cast(target.GetPreBuildCommands().size())+ + static_cast(target.GetPreLinkCommands().size())); + int prelink_count = 0; + if(prelink_total > 0) + { + // header stuff + customRuleCode += "PreLink_Cmds="; + } + for (std::vector::const_iterator cr = + target.GetPreBuildCommands().begin(); + cr != target.GetPreBuildCommands().end(); ++cr) + { + if(prelink_count++ > 0) + { + customRuleCode += "\\\n\t"; + } + customRuleCode += this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars(), + "\\\n\t"); + } + for (std::vector::const_iterator cr = + target.GetPreLinkCommands().begin(); + cr != target.GetPreLinkCommands().end(); ++cr) + { + if(prelink_count++ > 0) + { + customRuleCode += "\\\n\t"; + } + customRuleCode += this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars(), + "\\\n\t"); + } + if(prelink_total > 0) + { + customRuleCode += "\n"; + } + + // Write the post-build rules. Make sure no continuation character + // is put on the last line. + int postbuild_total = + static_cast(target.GetPostBuildCommands().size()); + int postbuild_count = 0; + if(postbuild_total > 0) + { + customRuleCode += "PostBuild_Cmds="; + } + for (std::vector::const_iterator cr = + target.GetPostBuildCommands().begin(); + cr != target.GetPostBuildCommands().end(); ++cr) + { + if(postbuild_count++ > 0) + { + customRuleCode += "\\\n\t"; + } + customRuleCode += this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars(), + "\\\n\t"); + } + if(postbuild_total > 0) + { + customRuleCode += "\n"; + } + + customRuleCode += "# End Special Build Tool\n"; + return customRuleCode; +} + + +inline std::string removeQuotes(const std::string& s) +{ + if(s[0] == '\"' && s[s.size()-1] == '\"') + { + return s.substr(1, s.size()-2); + } + return s; +} + +// Code in blocks surrounded by a test for this definition is needed +// only for compatibility with user project's replacement DSP +// templates. The CMake templates no longer use them. +#define CM_USE_OLD_VS6 + +void cmLocalVisualStudio6Generator +::WriteDSPHeader(std::ostream& fout, + const char *libName, cmTarget &target, + std::vector &) +{ + // Lookup the output directory for the target. + std::string outPath = target.GetDirectory(); + +#ifdef CM_USE_OLD_VS6 + // Lookup the library and executable output directories. + std::string libPath; + if(this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH")) + { + libPath = this->Makefile->GetDefinition("LIBRARY_OUTPUT_PATH"); + } + std::string exePath; + if(this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH")) + { + exePath = this->Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + } + + // Make sure there are trailing slashes. + if(!libPath.empty()) + { + if(libPath[libPath.size()-1] != '/') + { + libPath += "/"; + } + } + if(!exePath.empty()) + { + if(exePath[exePath.size()-1] != '/') + { + exePath += "/"; + } + } + + std::set pathEmitted; + + // determine the link directories + std::string libOptions; + std::string libDebugOptions; + std::string libOptimizedOptions; + + std::string libMultiLineOptions; + std::string libMultiLineOptionsForDebug; + std::string libMultiLineDebugOptions; + std::string libMultiLineOptimizedOptions; + + if(libPath.size()) + { + std::string lpath = + this->ConvertToOptionallyRelativeOutputPath(libPath.c_str()); + if(lpath.size() == 0) + { + lpath = "."; + } + std::string lpathIntDir = libPath + "$(INTDIR)"; + lpathIntDir = + this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + if(pathEmitted.insert(lpath).second) + { + libOptions += " /LIBPATH:"; + libOptions += lpathIntDir; + libOptions += " "; + libOptions += " /LIBPATH:"; + libOptions += lpath; + libOptions += " "; + libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptions += lpathIntDir; + libMultiLineOptions += " "; + libMultiLineOptions += " /LIBPATH:"; + libMultiLineOptions += lpath; + libMultiLineOptions += " \n"; + libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptionsForDebug += lpathIntDir; + libMultiLineOptionsForDebug += " "; + libMultiLineOptionsForDebug += " /LIBPATH:"; + libMultiLineOptionsForDebug += lpath; + libMultiLineOptionsForDebug += " \n"; + } + } + if(exePath.size()) + { + std::string lpath = + this->ConvertToOptionallyRelativeOutputPath(exePath.c_str()); + if(lpath.size() == 0) + { + lpath = "."; + } + std::string lpathIntDir = exePath + "$(INTDIR)"; + lpathIntDir = + this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + + if(pathEmitted.insert(lpath).second) + { + libOptions += " /LIBPATH:"; + libOptions += lpathIntDir; + libOptions += " "; + libOptions += " /LIBPATH:"; + libOptions += lpath; + libOptions += " "; + libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptions += lpathIntDir; + libMultiLineOptions += " "; + libMultiLineOptions += " /LIBPATH:"; + libMultiLineOptions += lpath; + libMultiLineOptions += " \n"; + libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptionsForDebug += lpathIntDir; + libMultiLineOptionsForDebug += " "; + libMultiLineOptionsForDebug += " /LIBPATH:"; + libMultiLineOptionsForDebug += lpath; + libMultiLineOptionsForDebug += " \n"; + } + } + std::vector::const_iterator i; + const std::vector& libdirs = target.GetLinkDirectories(); + for(i = libdirs.begin(); i != libdirs.end(); ++i) + { + std::string path = *i; + if(path[path.size()-1] != '/') + { + path += "/"; + } + std::string lpath = + this->ConvertToOptionallyRelativeOutputPath(path.c_str()); + if(lpath.size() == 0) + { + lpath = "."; + } + std::string lpathIntDir = path + "$(INTDIR)"; + lpathIntDir = + this->ConvertToOptionallyRelativeOutputPath(lpathIntDir.c_str()); + if(pathEmitted.insert(lpath).second) + { + libOptions += " /LIBPATH:"; + libOptions += lpathIntDir; + libOptions += " "; + libOptions += " /LIBPATH:"; + libOptions += lpath; + libOptions += " "; + + libMultiLineOptions += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptions += lpathIntDir; + libMultiLineOptions += " "; + libMultiLineOptions += " /LIBPATH:"; + libMultiLineOptions += lpath; + libMultiLineOptions += " \n"; + libMultiLineOptionsForDebug += "# ADD LINK32 /LIBPATH:"; + libMultiLineOptionsForDebug += lpathIntDir; + libMultiLineOptionsForDebug += " "; + libMultiLineOptionsForDebug += " /LIBPATH:"; + libMultiLineOptionsForDebug += lpath; + libMultiLineOptionsForDebug += " \n"; + } + } + // find link libraries + const cmTarget::LinkLibraryVectorType& libs = target.GetLinkLibraries(); + cmTarget::LinkLibraryVectorType::const_iterator j; + for(j = libs.begin(); j != libs.end(); ++j) + { + // add libraries to executables and dlls (but never include + // a library in a library, bad recursion) + // NEVER LINK STATIC LIBRARIES TO OTHER STATIC LIBRARIES + if ((target.GetType() != cmTarget::SHARED_LIBRARY + && target.GetType() != cmTarget::STATIC_LIBRARY + && target.GetType() != cmTarget::MODULE_LIBRARY) || + (target.GetType()==cmTarget::SHARED_LIBRARY && libName != j->first) || + (target.GetType()==cmTarget::MODULE_LIBRARY && libName != j->first)) + { + // Compute the proper name to use to link this library. + std::string lib; + std::string libDebug; + cmTarget* tgt = this->GlobalGenerator->FindTarget(0, j->first.c_str()); + if(tgt) + { + lib = cmSystemTools::GetFilenameWithoutExtension + (tgt->GetFullName().c_str()); + libDebug = cmSystemTools::GetFilenameWithoutExtension + (tgt->GetFullName("Debug").c_str()); + lib += ".lib"; + libDebug += ".lib"; + } + else + { + lib = j->first.c_str(); + libDebug = j->first.c_str(); + if(j->first.find(".lib") == std::string::npos) + { + lib += ".lib"; + libDebug += ".lib"; + } + } + lib = this->ConvertToOptionallyRelativeOutputPath(lib.c_str()); + libDebug = + this->ConvertToOptionallyRelativeOutputPath(libDebug.c_str()); + + if (j->second == cmTarget::GENERAL) + { + libOptions += " "; + libOptions += lib; + libMultiLineOptions += "# ADD LINK32 "; + libMultiLineOptions += lib; + libMultiLineOptions += "\n"; + libMultiLineOptionsForDebug += "# ADD LINK32 "; + libMultiLineOptionsForDebug += libDebug; + libMultiLineOptionsForDebug += "\n"; + } + if (j->second == cmTarget::DEBUG) + { + libDebugOptions += " "; + libDebugOptions += lib; + + libMultiLineDebugOptions += "# ADD LINK32 "; + libMultiLineDebugOptions += libDebug; + libMultiLineDebugOptions += "\n"; + } + if (j->second == cmTarget::OPTIMIZED) + { + libOptimizedOptions += " "; + libOptimizedOptions += lib; + + libMultiLineOptimizedOptions += "# ADD LINK32 "; + libMultiLineOptimizedOptions += lib; + libMultiLineOptimizedOptions += "\n"; + } + } + } +#endif + + // Get extra linker options for this target type. + std::string extraLinkOptions; + if(target.GetType() == cmTarget::EXECUTABLE) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS"); + } + if(target.GetType() == cmTarget::SHARED_LIBRARY) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS"); + } + if(target.GetType() == cmTarget::MODULE_LIBRARY) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS"); + } + + // Get extra linker options for this target. + if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS")) + { + extraLinkOptions += " "; + extraLinkOptions += targetLinkFlags; + } + + // Get standard libraries for this language. + if(target.GetType() >= cmTarget::EXECUTABLE && + target.GetType() <= cmTarget::MODULE_LIBRARY) + { + // Get the language to use for linking. + const char* linkLanguage = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error + ("CMake can not determine linker language for target:", + target.GetName()); + return; + } + + // Compute the variable name to lookup standard libraries for this + // language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += linkLanguage; + standardLibsVar += "_STANDARD_LIBRARIES"; + + // Add standard libraries. + if(const char* stdLibs = + this->Makefile->GetDefinition(standardLibsVar.c_str())) + { + extraLinkOptions += " "; + extraLinkOptions += stdLibs; + } + } + + // Compute version number information. + std::string targetVersionFlag; + if(target.GetType() == cmTarget::EXECUTABLE || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY) + { + int major; + int minor; + target.GetTargetVersion(major, minor); + cmOStringStream targetVersionStream; + targetVersionStream << "/version:" << major << "." << minor; + targetVersionFlag = targetVersionStream.str(); + } + + // Compute the real name of the target. + std::string outputName = + "(OUTPUT_NAME is for libraries and executables only)"; + std::string outputNameDebug = outputName; + std::string outputNameRelease = outputName; + std::string outputNameMinSizeRel = outputName; + std::string outputNameRelWithDebInfo = outputName; + if(target.GetType() == cmTarget::EXECUTABLE || + target.GetType() == cmTarget::STATIC_LIBRARY || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY) + { + outputName = target.GetFullName(); + outputNameDebug = target.GetFullName("Debug"); + outputNameRelease = target.GetFullName("Release"); + outputNameMinSizeRel = target.GetFullName("MinSizeRel"); + outputNameRelWithDebInfo = target.GetFullName("RelWithDebInfo"); + } + + // Compute the proper link information for the target. + std::string optionsDebug; + std::string optionsRelease; + std::string optionsMinSizeRel; + std::string optionsRelWithDebInfo; + if(target.GetType() == cmTarget::EXECUTABLE || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY) + { + this->ComputeLinkOptions(target, "Debug", extraLinkOptions, + optionsDebug); + this->ComputeLinkOptions(target, "Release", extraLinkOptions, + optionsRelease); + this->ComputeLinkOptions(target, "MinSizeRel", extraLinkOptions, + optionsMinSizeRel); + this->ComputeLinkOptions(target, "RelWithDebInfo", extraLinkOptions, + optionsRelWithDebInfo); + } + + // Compute the path of the import library. + std::string targetImplibFlagDebug; + std::string targetImplibFlagRelease; + std::string targetImplibFlagMinSizeRel; + std::string targetImplibFlagRelWithDebInfo; + if(target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY || + target.GetType() == cmTarget::EXECUTABLE) + { + std::string fullPathImpDebug = target.GetDirectory("Debug", true); + std::string fullPathImpRelease = target.GetDirectory("Release", true); + std::string fullPathImpMinSizeRel = + target.GetDirectory("MinSizeRel", true); + std::string fullPathImpRelWithDebInfo = + target.GetDirectory("RelWithDebInfo", true); + fullPathImpDebug += "/"; + fullPathImpRelease += "/"; + fullPathImpMinSizeRel += "/"; + fullPathImpRelWithDebInfo += "/"; + fullPathImpDebug += target.GetFullName("Debug", true); + fullPathImpRelease += target.GetFullName("Release", true); + fullPathImpMinSizeRel += target.GetFullName("MinSizeRel", true); + fullPathImpRelWithDebInfo += target.GetFullName("RelWithDebInfo", true); + + targetImplibFlagDebug = "/implib:"; + targetImplibFlagRelease = "/implib:"; + targetImplibFlagMinSizeRel = "/implib:"; + targetImplibFlagRelWithDebInfo = "/implib:"; + targetImplibFlagDebug += + this->ConvertToOptionallyRelativeOutputPath(fullPathImpDebug.c_str()); + targetImplibFlagRelease += + this->ConvertToOptionallyRelativeOutputPath(fullPathImpRelease.c_str()); + targetImplibFlagMinSizeRel += + this->ConvertToOptionallyRelativeOutputPath( + fullPathImpMinSizeRel.c_str()); + targetImplibFlagRelWithDebInfo += + this->ConvertToOptionallyRelativeOutputPath( + fullPathImpRelWithDebInfo.c_str()); + } + +#ifdef CM_USE_OLD_VS6 + // Compute link information for the target. + if(extraLinkOptions.size()) + { + libOptions += " "; + libOptions += extraLinkOptions; + libOptions += " "; + libMultiLineOptions += "# ADD LINK32 "; + libMultiLineOptions += extraLinkOptions; + libMultiLineOptions += " \n"; + libMultiLineOptionsForDebug += "# ADD LINK32 "; + libMultiLineOptionsForDebug += extraLinkOptions; + libMultiLineOptionsForDebug += " \n"; + } +#endif + + // are there any custom rules on the target itself + // only if the target is a lib or exe + std::string customRuleCodeRelease + = this->CreateTargetRules(target, "RELEASE", libName); + std::string customRuleCodeDebug + = this->CreateTargetRules(target, "DEBUG", libName); + std::string customRuleCodeMinSizeRel + = this->CreateTargetRules(target, "MINSIZEREL", libName); + std::string customRuleCodeRelWithDebInfo + = this->CreateTargetRules(target, "RELWITHDEBINFO", libName); + + std::ifstream fin(this->DSPHeaderTemplate.c_str()); + if(!fin) + { + cmSystemTools::Error("Error Reading ", this->DSPHeaderTemplate.c_str()); + } + std::string staticLibOptions; + if(target.GetType() == cmTarget::STATIC_LIBRARY ) + { + if(const char* libflags = target.GetProperty("STATIC_LIBRARY_FLAGS")) + { + staticLibOptions = libflags; + } + } + + // Add the export symbol definition for shared library objects. + std::string exportSymbol; + if(const char* exportMacro = target.GetExportMacro()) + { + exportSymbol = exportMacro; + } + + std::string line; + while(cmSystemTools::GetLineFromStream(fin, line)) + { + const char* mfcFlag = this->Makefile->GetDefinition("CMAKE_MFC_FLAG"); + if(!mfcFlag) + { + mfcFlag = "0"; + } + cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME_EXPORTS", + exportSymbol.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_MFC_FLAG", + mfcFlag); + if(target.GetType() == cmTarget::STATIC_LIBRARY ) + { + cmSystemTools::ReplaceString(line, "CM_STATIC_LIB_ARGS", + staticLibOptions.c_str()); + } + if(this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")) + { + cmSystemTools::ReplaceString(line, "/nologo", ""); + } + +#ifdef CM_USE_OLD_VS6 + cmSystemTools::ReplaceString(line, "CM_LIBRARIES", + libOptions.c_str()); + cmSystemTools::ReplaceString(line, "CM_DEBUG_LIBRARIES", + libDebugOptions.c_str()); + cmSystemTools::ReplaceString(line, "CM_OPTIMIZED_LIBRARIES", + libOptimizedOptions.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES_FOR_DEBUG", + libMultiLineOptionsForDebug.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_LIBRARIES", + libMultiLineOptions.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_DEBUG_LIBRARIES", + libMultiLineDebugOptions.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIMIZED_LIBRARIES", + libMultiLineOptimizedOptions.c_str()); +#endif + + // Substitute the rules for custom command. When specifying just the + // target name for the command the command can be different for + // different configs + cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELEASE", + customRuleCodeRelease.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_DEBUG", + customRuleCodeDebug.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_MINSIZEREL", + customRuleCodeMinSizeRel.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CUSTOM_RULE_CODE_RELWITHDEBINFO", + customRuleCodeRelWithDebInfo.c_str()); + + // Substitute the real output name into the template. + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_DEBUG", + outputNameDebug.c_str()); + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELEASE", + outputNameRelease.c_str()); + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_MINSIZEREL", + outputNameMinSizeRel.c_str()); + cmSystemTools::ReplaceString(line, "OUTPUT_NAME_RELWITHDEBINFO", + outputNameRelWithDebInfo.c_str()); + cmSystemTools::ReplaceString(line, "OUTPUT_NAME", outputName.c_str()); + + // Substitute the proper link information into the template. + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_DEBUG", + optionsDebug.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELEASE", + optionsRelease.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_MINSIZEREL", + optionsMinSizeRel.c_str()); + cmSystemTools::ReplaceString(line, "CM_MULTILINE_OPTIONS_RELWITHDEBINFO", + optionsRelWithDebInfo.c_str()); + + cmSystemTools::ReplaceString(line, "BUILD_INCLUDES", + this->IncludeOptions.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_VERSION_FLAG", + targetVersionFlag.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_DEBUG", + targetImplibFlagDebug.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_RELEASE", + targetImplibFlagRelease.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_MINSIZEREL", + targetImplibFlagMinSizeRel.c_str()); + cmSystemTools::ReplaceString(line, "TARGET_IMPLIB_FLAG_RELWITHDEBINFO", + targetImplibFlagRelWithDebInfo.c_str()); + cmSystemTools::ReplaceString(line, "OUTPUT_LIBNAME",libName); +#ifdef CM_USE_OLD_VS6 + // because LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH + // are already quoted in the template file, + // we need to remove the quotes here, we still need + // to convert to output path for unix to win32 conversion + cmSystemTools::ReplaceString + (line, "LIBRARY_OUTPUT_PATH", + removeQuotes(this->ConvertToOptionallyRelativeOutputPath + (libPath.c_str())).c_str()); + cmSystemTools::ReplaceString + (line, "EXECUTABLE_OUTPUT_PATH", + removeQuotes(this->ConvertToOptionallyRelativeOutputPath + (exePath.c_str())).c_str()); +#endif + cmSystemTools::ReplaceString + (line, "OUTPUT_DIRECTORY", + removeQuotes(this->ConvertToOptionallyRelativeOutputPath + (outPath.c_str())).c_str()); + + cmSystemTools::ReplaceString(line, + "EXTRA_DEFINES", + this->Makefile->GetDefineFlags()); + const char* debugPostfix + = this->Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); + cmSystemTools::ReplaceString(line, "DEBUG_POSTFIX", + debugPostfix?debugPostfix:""); + // store flags for each configuration + std::string flags = " "; + std::string flagsRelease = " "; + std::string flagsMinSize = " "; + std::string flagsDebug = " "; + std::string flagsDebugRel = " "; + if(target.GetType() >= cmTarget::EXECUTABLE && + target.GetType() <= cmTarget::MODULE_LIBRARY) + { + const char* linkLanguage = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error + ("CMake can not determine linker language for target:", + target.GetName()); + return; + } + // if CXX is on and the target contains cxx code then add the cxx flags + std::string baseFlagVar = "CMAKE_"; + baseFlagVar += linkLanguage; + baseFlagVar += "_FLAGS"; + flags = this->Makefile->GetSafeDefinition(baseFlagVar.c_str()); + + std::string flagVar = baseFlagVar + "_RELEASE"; + flagsRelease = this->Makefile->GetSafeDefinition(flagVar.c_str()); + flagsRelease += " -DCMAKE_INTDIR=\\\"Release\\\" "; + if(const char* targetLinkFlags = + target.GetProperty("LINK_FLAGS_RELEASE")) + { + flagsRelease += targetLinkFlags; + flagsRelease += " "; + } + flagVar = baseFlagVar + "_MINSIZEREL"; + flagsMinSize = this->Makefile->GetSafeDefinition(flagVar.c_str()); + flagsMinSize += " -DCMAKE_INTDIR=\\\"MinSizeRel\\\" "; + if(const char* targetLinkFlags = + target.GetProperty("LINK_FLAGS_MINSIZEREL")) + { + flagsMinSize += targetLinkFlags; + flagsMinSize += " "; + } + + flagVar = baseFlagVar + "_DEBUG"; + flagsDebug = this->Makefile->GetSafeDefinition(flagVar.c_str()); + flagsDebug += " -DCMAKE_INTDIR=\\\"Debug\\\" "; + if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_DEBUG")) + { + flagsDebug += targetLinkFlags; + flagsDebug += " "; + } + + flagVar = baseFlagVar + "_RELWITHDEBINFO"; + flagsDebugRel = this->Makefile->GetSafeDefinition(flagVar.c_str()); + flagsDebugRel += " -DCMAKE_INTDIR=\\\"RelWithDebInfo\\\" "; + if(const char* targetLinkFlags = + target.GetProperty("LINK_FLAGS_RELWITHDEBINFO")) + { + flagsDebugRel += targetLinkFlags; + flagsDebugRel += " "; + } + + } + + // if unicode is not found, then add -D_MBCS + std::string defs = this->Makefile->GetDefineFlags(); + if(flags.find("D_UNICODE") == flags.npos && + defs.find("D_UNICODE") == flags.npos) + { + flags += " /D \"_MBCS\""; + } + + // Add per-target flags. + if(const char* targetFlags = target.GetProperty("COMPILE_FLAGS")) + { + flags += " "; + flags += targetFlags; + } + + // Add per-target and per-configuration preprocessor definitions. + this->AppendDefines + (flags, this->Makefile->GetProperty("COMPILE_DEFINITIONS"), 0); + this->AppendDefines(flags, target.GetProperty("COMPILE_DEFINITIONS"), 0); + this->AppendDefines + (flagsDebug, + this->Makefile->GetProperty("COMPILE_DEFINITIONS_DEBUG"), 0); + this->AppendDefines(flagsDebug, + target.GetProperty("COMPILE_DEFINITIONS_DEBUG"), 0); + this->AppendDefines + (flagsRelease, + this->Makefile->GetProperty("COMPILE_DEFINITIONS_RELEASE"), 0); + this->AppendDefines(flagsRelease, + target.GetProperty("COMPILE_DEFINITIONS_RELEASE"), 0); + this->AppendDefines + (flagsMinSize, + this->Makefile->GetProperty("COMPILE_DEFINITIONS_MINSIZEREL"), 0); + this->AppendDefines + (flagsMinSize, + target.GetProperty("COMPILE_DEFINITIONS_MINSIZEREL"), 0); + this->AppendDefines + (flagsDebugRel, + this->Makefile->GetProperty("COMPILE_DEFINITIONS_RELWITHDEBINFO"), 0); + this->AppendDefines + (flagsDebugRel, + target.GetProperty("COMPILE_DEFINITIONS_RELWITHDEBINFO"), 0); + + // The template files have CXX FLAGS in them, that need to be replaced. + // There are not separate CXX and C template files, so we use the same + // variable names. The previous code sets up flags* variables to contain + // the correct C or CXX flags + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_MINSIZEREL", + flagsMinSize.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_DEBUG", + flagsDebug.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELWITHDEBINFO", + flagsDebugRel.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS_RELEASE", + flagsRelease.c_str()); + cmSystemTools::ReplaceString(line, "CMAKE_CXX_FLAGS", flags.c_str()); + fout << line.c_str() << std::endl; + } +} + +void cmLocalVisualStudio6Generator::WriteDSPFooter(std::ostream& fout) +{ + std::ifstream fin(this->DSPFooterTemplate.c_str()); + if(!fin) + { + cmSystemTools::Error("Error Reading ", + this->DSPFooterTemplate.c_str()); + } + std::string line; + while(cmSystemTools::GetLineFromStream(fin, line)) + { + fout << line << std::endl; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio6Generator +::ComputeLinkOptions(cmTarget& target, + const char* configName, + const std::string extraOptions, + std::string& options) +{ + // Compute the link information for this configuration. + cmComputeLinkInformation* pcli = target.GetLinkInformation(configName); + if(!pcli) + { + return; + } + cmComputeLinkInformation& cli = *pcli; + typedef cmComputeLinkInformation::ItemVector ItemVector; + ItemVector const& linkLibs = cli.GetItems(); + std::vector const& linkDirs = cli.GetDirectories(); + + // Build the link options code. + for(std::vector::const_iterator d = linkDirs.begin(); + d != linkDirs.end(); ++d) + { + std::string dir = *d; + if(!dir.empty()) + { + if(dir[dir.size()-1] != '/') + { + dir += "/"; + } + dir += "$(IntDir)"; + options += "# ADD LINK32 /LIBPATH:"; + options += this->ConvertToOptionallyRelativeOutputPath(dir.c_str()); + options += " /LIBPATH:"; + options += this->ConvertToOptionallyRelativeOutputPath(d->c_str()); + options += "\n"; + } + } + for(ItemVector::const_iterator l = linkLibs.begin(); + l != linkLibs.end(); ++l) + { + options += "# ADD LINK32 "; + if(l->IsPath) + { + options += + this->ConvertToOptionallyRelativeOutputPath(l->Value.c_str()); + } + else + { + options += l->Value; + } + options += "\n"; + } + + // Add extra options if any. + if(!extraOptions.empty()) + { + options += "# ADD LINK32 "; + options += extraOptions; + options += "\n"; + } +} + +std::string +cmLocalVisualStudio6Generator +::GetTargetDirectory(cmTarget const&) const +{ + // No per-target directory for this generator (yet). + return ""; +} + +void cmLocalVisualStudio6Generator +::GetTargetObjectFileDirectories(cmTarget* , + std::vector& + dirs) +{ + std::string dir = this->Makefile->GetCurrentOutputDirectory(); + dir += "/"; + dir += this->GetGlobalGenerator()->GetCMakeCFGInitDirectory(); + dirs.push_back(dir); +} + +std::string +cmLocalVisualStudio6Generator +::GetConfigName(std::string const& configuration) const +{ + // Strip the subdirectory name out of the configuration name. + std::string config = configuration; + std::string::size_type pos = config.find_last_of(" "); + config = config.substr(pos+1, std::string::npos); + config = config.substr(0, config.size()-1); + return config; +} + +//---------------------------------------------------------------------------- +bool +cmLocalVisualStudio6Generator +::CheckDefinition(std::string const& define) const +{ + // Perform the standard check first. + if(!this->cmLocalGenerator::CheckDefinition(define)) + { + return false; + } + + // Now do the VS6-specific check. + if(define.find_first_of("=") != define.npos) + { + cmOStringStream e; + e << "WARNING: The VS6 IDE does not support preprocessor definitions " + << "with values.\n" + << "CMake is dropping a preprocessor definition: " << define << "\n" + << "Consider defining the macro in a (configured) header file.\n"; + cmSystemTools::Message(e.str().c_str()); + return false; + } + + // Assume it is supported. + return true; +} diff --git a/Source/cmLocalVisualStudio6Generator.h b/Source/cmLocalVisualStudio6Generator.h new file mode 100644 index 000000000..f3b3e3fea --- /dev/null +++ b/Source/cmLocalVisualStudio6Generator.h @@ -0,0 +1,112 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudio6Generator.h,v $ + Language: C++ + Date: $Date: 2008-01-29 22:30:34 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalVisualStudio6Generator_h +#define cmLocalVisualStudio6Generator_h + +#include "cmLocalVisualStudioGenerator.h" + +class cmTarget; +class cmSourceFile; +class cmSourceGroup; +class cmCustomCommand; + +/** \class cmLocalVisualStudio6Generator + * \brief Write a LocalUnix makefiles. + * + * cmLocalVisualStudio6Generator produces a LocalUnix makefile from its + * member this->Makefile. + */ +class cmLocalVisualStudio6Generator : public cmLocalVisualStudioGenerator +{ +public: + ///! Set cache only and recurse to false by default. + cmLocalVisualStudio6Generator(); + + virtual ~cmLocalVisualStudio6Generator(); + + virtual void AddHelperCommands(); + + /** + * Generate the makefile for this directory. + */ + virtual void Generate(); + + void OutputDSPFile(); + + enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY}; + + /** + * Specify the type of the build: static, dll, or executable. + */ + void SetBuildType(BuildType, const char* libName, cmTarget&); + + /** + * Return array of created DSP names in a STL vector. + * Each executable must have its own dsp. + */ + std::vector GetCreatedProjectNames() + { + return this->CreatedProjectNames; + } + virtual std::string GetTargetDirectory(cmTarget const& target) const; + void GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs); +private: + std::string DSPHeaderTemplate; + std::string DSPFooterTemplate; + std::vector CreatedProjectNames; + + void CreateSingleDSP(const char *lname, cmTarget &tgt); + void WriteDSPFile(std::ostream& fout, const char *libName, + cmTarget &tgt); + void WriteDSPBeginGroup(std::ostream& fout, + const char* group, + const char* filter); + void WriteDSPEndGroup(std::ostream& fout); + + void WriteDSPHeader(std::ostream& fout, const char *libName, + cmTarget &tgt, std::vector &sgs); + + void WriteDSPFooter(std::ostream& fout); + void AddDSPBuildRule(cmTarget& tgt); + void WriteCustomRule(std::ostream& fout, + const char* source, + const cmCustomCommand& command, + const char* flags); + void AddUtilityCommandHack(cmTarget& target, int count, + std::vector& depends, + const cmCustomCommand& origCommand); + void WriteGroup(const cmSourceGroup *sg, cmTarget& target, + std::ostream &fout, const char *libName); + std::string CreateTargetRules(cmTarget &target, + const char* configName, + const char *libName); + void ComputeLinkOptions(cmTarget& target, const char* configName, + const std::string extraOptions, + std::string& options); + std::string IncludeOptions; + std::vector Configurations; + + std::string GetConfigName(std::string const& configuration) const; + + // Special definition check for VS6. + virtual bool CheckDefinition(std::string const& define) const; +}; + +#endif + diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx new file mode 100644 index 000000000..f4633402a --- /dev/null +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -0,0 +1,2338 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudio7Generator.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.217.2.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmGlobalVisualStudio7Generator.h" +#include "cmLocalVisualStudio7Generator.h" +#include "cmXMLParser.h" +#include +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmSourceFile.h" +#include "cmCacheManager.h" +#include "cmake.h" + +#include "cmComputeLinkInformation.h" +#include "cmGeneratedFileStream.h" + +#include + +#include // for isspace + +static bool cmLVS6G_IsFAT(const char* dir); + +class cmLocalVisualStudio7GeneratorInternals +{ +public: + cmLocalVisualStudio7GeneratorInternals(cmLocalVisualStudio7Generator* e): + LocalGenerator(e) {} + typedef cmComputeLinkInformation::ItemVector ItemVector; + void OutputLibraries(std::ostream& fout, ItemVector const& libs); +private: + cmLocalVisualStudio7Generator* LocalGenerator; +}; + +extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[]; + +//---------------------------------------------------------------------------- +cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator() +{ + this->Version = 7; + this->PlatformName = "Win32"; + this->ExtraFlagTable = 0; + this->Internal = new cmLocalVisualStudio7GeneratorInternals(this); +} + +cmLocalVisualStudio7Generator::~cmLocalVisualStudio7Generator() +{ + delete this->Internal; +} + +void cmLocalVisualStudio7Generator::AddHelperCommands() +{ + std::set lang; + lang.insert("C"); + lang.insert("CXX"); + lang.insert("RC"); + lang.insert("IDL"); + lang.insert("DEF"); + lang.insert("Fortran"); + this->CreateCustomTargetsAndCommands(lang); + this->FixGlobalTargets(); +} + +void cmLocalVisualStudio7Generator::Generate() +{ + this->WriteProjectFiles(); + this->WriteStampFiles(); +} + +void cmLocalVisualStudio7Generator::FixGlobalTargets() +{ + // Visual Studio .NET 2003 Service Pack 1 will not run post-build + // commands for targets in which no sources are built. Add dummy + // rules to force these targets to build. + cmTargets &tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + cmTarget& tgt = l->second; + if(tgt.GetType() == cmTarget::GLOBAL_TARGET) + { + std::vector no_depends; + cmCustomCommandLine force_command; + force_command.push_back("cd"); + force_command.push_back("."); + cmCustomCommandLines force_commands; + force_commands.push_back(force_command); + const char* no_main_dependency = 0; + std::string force = this->Makefile->GetStartOutputDirectory(); + force += cmake::GetCMakeFilesDirectory(); + force += "/"; + force += tgt.GetName(); + force += "_force"; + this->Makefile->AddCustomCommandToOutput(force.c_str(), no_depends, + no_main_dependency, + force_commands, " ", 0, true); + if(cmSourceFile* file = + this->Makefile->GetSourceFileWithOutput(force.c_str())) + { + tgt.AddSourceFile(file); + } + } + } +} + +// TODO +// for CommandLine= need to repleace quotes with " +// write out configurations +void cmLocalVisualStudio7Generator::WriteProjectFiles() +{ + // If not an in source build, then create the output directory + if(strcmp(this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeDirectory()) != 0) + { + if(!cmSystemTools::MakeDirectory + (this->Makefile->GetStartOutputDirectory())) + { + cmSystemTools::Error("Error creating directory ", + this->Makefile->GetStartOutputDirectory()); + } + } + + // Get the set of targets in this directory. + cmTargets &tgts = this->Makefile->GetTargets(); + + // Create the regeneration custom rule. + if(!this->Makefile->IsOn("CMAKE_SUPPRESS_REGENERATION")) + { + // Create a rule to regenerate the build system when the target + // specification source changes. + if(cmSourceFile* sf = this->CreateVCProjBuildRule()) + { + // Add the rule to targets that need it. + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) + { + if(l->first != CMAKE_CHECK_BUILD_SYSTEM_TARGET) + { + l->second.AddSourceFile(sf); + } + } + } + } + + // Create the project file for each target. + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + // INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace + // so don't build a projectfile for it + if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) + { + this->CreateSingleVCProj(l->first.c_str(),l->second); + } + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7Generator::WriteStampFiles() +{ + // Touch a timestamp file used to determine when the project file is + // out of date. + std::string stampName = this->Makefile->GetStartOutputDirectory(); + stampName += cmake::GetCMakeFilesDirectory(); + cmSystemTools::MakeDirectory(stampName.c_str()); + stampName += "/"; + stampName += "generate.stamp"; + std::ofstream stamp(stampName.c_str()); + stamp << "# CMake generation timestamp file this directory.\n"; + + // Create a helper file so CMake can determine when it is run + // through the rule created by CreateVCProjBuildRule whether it + // really needs to regenerate the project. This file lists its own + // dependencies. If any file listed in it is newer than itself then + // CMake must rerun. Otherwise the project files are up to date and + // the stamp file can just be touched. + std::string depName = stampName; + depName += ".depend"; + std::ofstream depFile(depName.c_str()); + depFile << "# CMake generation dependency list for this directory.\n"; + std::vector const& listFiles = this->Makefile->GetListFiles(); + for(std::vector::const_iterator lf = listFiles.begin(); + lf != listFiles.end(); ++lf) + { + depFile << *lf << std::endl; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7Generator +::CreateSingleVCProj(const char *lname, cmTarget &target) +{ + this->FortranProject = + static_cast(this->GlobalGenerator) + ->TargetIsFortranOnly(target); + // add to the list of projects + std::string pname = lname; + target.SetProperty("GENERATOR_FILE_NAME",lname); + // create the dsp.cmake file + std::string fname; + fname = this->Makefile->GetStartOutputDirectory(); + fname += "/"; + fname += lname; + if(this->FortranProject) + { + fname += ".vfproj"; + } + else + { + fname += ".vcproj"; + } + + // Generate the project file and replace it atomically with + // copy-if-different. We use a separate timestamp so that the IDE + // does not reload project files unnecessarily. + cmGeneratedFileStream fout(fname.c_str()); + fout.SetCopyIfDifferent(true); + this->WriteVCProjFile(fout,lname,target); + if (fout.Close()) + { + this->GlobalGenerator->FileReplacedDuringGenerate(fname); + } +} + +//---------------------------------------------------------------------------- +cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() +{ + std::string stampName = cmake::GetCMakeFilesDirectoryPostSlash(); + stampName += "generate.stamp"; + const char* dsprule = + this->Makefile->GetRequiredDefinition("CMAKE_COMMAND"); + cmCustomCommandLine commandLine; + commandLine.push_back(dsprule); + std::string makefileIn = this->Makefile->GetStartDirectory(); + makefileIn += "/"; + makefileIn += "CMakeLists.txt"; + makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str()); + std::string comment = "Building Custom Rule "; + comment += makefileIn; + std::string args; + args = "-H"; + args += this->Convert(this->Makefile->GetHomeDirectory(), + START_OUTPUT, UNCHANGED, true); + commandLine.push_back(args); + args = "-B"; + args += + this->Convert(this->Makefile->GetHomeOutputDirectory(), + START_OUTPUT, UNCHANGED, true); + commandLine.push_back(args); + commandLine.push_back("--check-stamp-file"); + commandLine.push_back(stampName.c_str()); + + std::vector const& listFiles = this->Makefile->GetListFiles(); + + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + const char* no_working_directory = 0; + this->Makefile->AddCustomCommandToOutput(stampName.c_str(), listFiles, + makefileIn.c_str(), commandLines, + comment.c_str(), + no_working_directory, true); + if(cmSourceFile* file = this->Makefile->GetSource(makefileIn.c_str())) + { + return file; + } + else + { + cmSystemTools::Error("Error adding rule for ", makefileIn.c_str()); + return 0; + } +} + +void cmLocalVisualStudio7Generator::WriteConfigurations(std::ostream& fout, + const char *libName, + cmTarget &target) +{ + std::vector *configs = + static_cast + (this->GlobalGenerator)->GetConfigurations(); + + fout << "\t\n"; + for( std::vector::iterator i = configs->begin(); + i != configs->end(); ++i) + { + this->WriteConfiguration(fout, i->c_str(), libName, target); + } + fout << "\t\n"; +} +cmVS7FlagTable cmLocalVisualStudio7GeneratorFortranFlagTable[] = +{ + {"Preprocess", "fpp", "Run Preprocessor on files", "preprocessYes", 0}, + {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "true", 0}, + {"DebugInformationFormat", "Zi", "full debug", "debugEnabled", 0}, + {"DebugInformationFormat", "debug:full", "full debug", "debugEnabled", 0}, + {"DebugInformationFormat", "Z7", "c7 compat", "debugOldStyleInfo", 0}, + {"DebugInformationFormat", "Zd", "line numbers", "debugLineInfoOnly", 0}, + {"Optimization", "Od", "disable optimization", "optimizeDisabled", 0}, + {"Optimization", "O1", "min space", "optimizeMinSpace", 0}, + {"Optimization", "O3", "full optimize", "optimizeFull", 0}, + {"GlobalOptimizations", "Og", "global optimize", "true", 0}, + {"InlineFunctionExpansion", "Ob0", "", "expandDisable", 0}, + {"InlineFunctionExpansion", "Ob1", "", "expandOnlyInline", 0}, + {"FavorSizeOrSpeed", "Os", "", "favorSize", 0}, + {"OmitFramePointers", "Oy-", "", "false", 0}, + {"OptimizeForProcessor", "GB", "", "procOptimizeBlended", 0}, + {"OptimizeForProcessor", "G5", "", "procOptimizePentium", 0}, + {"OptimizeForProcessor", "G6", "", "procOptimizePentiumProThruIII", 0}, + {"UseProcessorExtensions", "QzxK", "", "codeForStreamingSIMD", 0}, + {"OptimizeForProcessor", "QaxN", "", "codeForPentium4", 0}, + {"OptimizeForProcessor", "QaxB", "", "codeForPentiumM", 0}, + {"OptimizeForProcessor", "QaxP", "", "codeForCodeNamedPrescott", 0}, + {"OptimizeForProcessor", "QaxT", "", "codeForCore2Duo", 0}, + {"OptimizeForProcessor", "QxK", "", "codeExclusivelyStreamingSIMD", 0}, + {"OptimizeForProcessor", "QxN", "", "codeExclusivelyPentium4", 0}, + {"OptimizeForProcessor", "QxB", "", "codeExclusivelyPentiumM", 0}, + {"OptimizeForProcessor", "QxP", "", "codeExclusivelyCodeNamedPrescott", 0}, + {"OptimizeForProcessor", "QxT", "", "codeExclusivelyCore2Duo", 0}, + {"OptimizeForProcessor", "QxO", "", "codeExclusivelyCore2StreamingSIMD", 0}, + {"OptimizeForProcessor", "QxS", "", "codeExclusivelyCore2StreamingSIMD4", 0}, + + {"ModulePath", "module:", "", "", + cmVS7FlagTable::UserValueRequired}, + {"LoopUnrolling", "Qunroll:", "", "", + cmVS7FlagTable::UserValueRequired}, + {"AutoParallelThreshold", "Qpar-threshold:", "", "", + cmVS7FlagTable::UserValueRequired}, + {"HeapArrays", "heap-arrays:", "", "", + cmVS7FlagTable::UserValueRequired}, + {"ObjectText", "bintext:", "", "", + cmVS7FlagTable::UserValueRequired}, + {"Parallelization", "Qparallel", "", "true", 0}, + {"PrefetchInsertion", "Qprefetch-", "", "false", 0}, + {"BufferedIO", "assume:buffered_io", "", "true", 0}, + {"CallingConvention", "iface:stdcall", "", "callConventionStdCall", 0}, + {"CallingConvention", "iface:cref", "", "callConventionCRef", 0}, + {"CallingConvention", "iface:stdref", "", "callConventionStdRef", 0}, + {"CallingConvention", "iface:stdcall", "", "callConventionStdCall", 0}, + {"CallingConvention", "iface:cvf", "", "callConventionCVF", 0}, + {"EnableRecursion", "recursive", "", "true", 0}, + {"ReentrantCode", "reentrancy", "", "true", 0}, + // done up to Language + {0,0,0,0,0} +}; +// fill the table here currently the comment field is not used for +// anything other than documentation NOTE: Make sure the longer +// commandFlag comes FIRST! +cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[] = +{ + // option flags (some flags map to the same option) + {"BasicRuntimeChecks", "GZ", "Stack frame checks", "1", 0}, + {"BasicRuntimeChecks", "RTCsu", + "Both stack and uninitialized checks", "3", 0}, + {"BasicRuntimeChecks", "RTCs", "Stack frame checks", "1", 0}, + {"BasicRuntimeChecks", "RTCu", "Uninitialized Variables ", "2", 0}, + {"BasicRuntimeChecks", "RTC1", + "Both stack and uninitialized checks", "3", 0}, + {"DebugInformationFormat", "Z7", "debug format", "1", 0}, + {"DebugInformationFormat", "Zd", "debug format", "2", 0}, + {"DebugInformationFormat", "Zi", "debug format", "3", 0}, + {"DebugInformationFormat", "ZI", "debug format", "4", 0}, + {"EnableEnhancedInstructionSet", "arch:SSE2", + "Use sse2 instructions", "2", 0}, + {"EnableEnhancedInstructionSet", "arch:SSE", + "Use sse instructions", "1", 0}, + {"FavorSizeOrSpeed", "Ot", "Favor fast code", "1", 0}, + {"FavorSizeOrSpeed", "Os", "Favor small code", "2", 0}, + {"CompileAs", "TC", "Compile as c code", "1", 0}, + {"CompileAs", "TP", "Compile as c++ code", "2", 0}, + {"Optimization", "Od", "Non Debug", "0", 0}, + {"Optimization", "O1", "Min Size", "1", 0}, + {"Optimization", "O2", "Max Speed", "2", 0}, + {"Optimization", "Ox", "Max Optimization", "3", 0}, + {"OptimizeForProcessor", "GB", "Blended processor mode", "0", 0}, + {"OptimizeForProcessor", "G5", "Pentium", "1", 0}, + {"OptimizeForProcessor", "G6", "PPro PII PIII", "2", 0}, + {"OptimizeForProcessor", "G7", "Pentium 4 or Athlon", "3", 0}, + {"InlineFunctionExpansion", "Ob0", "no inlines", "0", 0}, + {"InlineFunctionExpansion", "Ob1", "when inline keyword", "1", 0}, + {"InlineFunctionExpansion", "Ob2", "any time you can inline", "2", 0}, + {"RuntimeLibrary", "MTd", "Multithreded debug", "1", 0}, + {"RuntimeLibrary", "MT", "Multithreded", "0", 0}, + {"RuntimeLibrary", "MDd", "Multithreded dll debug", "3", 0}, + {"RuntimeLibrary", "MD", "Multithreded dll", "2", 0}, + {"RuntimeLibrary", "MLd", "Sinble Thread debug", "5", 0}, + {"RuntimeLibrary", "ML", "Sinble Thread", "4", 0}, + {"StructMemberAlignment", "Zp16", "struct align 16 byte ", "5", 0}, + {"StructMemberAlignment", "Zp1", "struct align 1 byte ", "1", 0}, + {"StructMemberAlignment", "Zp2", "struct align 2 byte ", "2", 0}, + {"StructMemberAlignment", "Zp4", "struct align 4 byte ", "3", 0}, + {"StructMemberAlignment", "Zp8", "struct align 8 byte ", "4", 0}, + {"WarningLevel", "W1", "Warning level", "1", 0}, + {"WarningLevel", "W2", "Warning level", "2", 0}, + {"WarningLevel", "W3", "Warning level", "3", 0}, + {"WarningLevel", "W4", "Warning level", "4", 0}, + + // Precompiled header and related options. Note that the + // UsePrecompiledHeader entries are marked as "Continue" so that the + // corresponding PrecompiledHeaderThrough entry can be found. + {"UsePrecompiledHeader", "Yc", "Create Precompiled Header", "1", + cmVS7FlagTable::UserValueIgnored | cmVS7FlagTable::Continue}, + {"PrecompiledHeaderThrough", "Yc", "Precompiled Header Name", "", + cmVS7FlagTable::UserValueRequired}, + {"PrecompiledHeaderFile", "Fp", "Generated Precompiled Header", "", + cmVS7FlagTable::UserValue}, + // The YX and Yu options are in a per-global-generator table because + // their values differ based on the VS IDE version. + {"ForcedIncludeFiles", "FI", "Forced include files", "", + cmVS7FlagTable::UserValueRequired}, + + // boolean flags + {"BufferSecurityCheck", "GS", "Buffer security check", "TRUE", 0}, + {"BufferSecurityCheck", "GS-", "Turn off Buffer security check", "FALSE", 0}, + {"Detect64BitPortabilityProblems", "Wp64", + "Detect 64-bit Portability Problems", "TRUE", 0}, + {"EnableFiberSafeOptimization", "GT", "Enable Fiber-safe Optimizations", + "TRUE", 0}, + {"EnableFunctionLevelLinking", "Gy", + "EnableFunctionLevelLinking", "TRUE", 0}, + {"EnableIntrinsicFunctions", "Oi", "EnableIntrinsicFunctions", "TRUE", 0}, + {"GlobalOptimizations", "Og", "Global Optimize", "TRUE", 0}, + {"ImproveFloatingPointConsistency", "Op", + "ImproveFloatingPointConsistency", "TRUE", 0}, + {"MinimalRebuild", "Gm", "minimal rebuild", "TRUE", 0}, + {"OmitFramePointers", "Oy", "OmitFramePointers", "TRUE", 0}, + {"OptimizeForWindowsApplication", "GA", "Optimize for windows", "TRUE", 0}, + {"RuntimeTypeInfo", "GR", + "Turn on Run time type information for c++", "TRUE", 0}, + {"RuntimeTypeInfo", "GR-", + "Turn off Run time type information for c++", "FALSE", 0}, + {"SmallerTypeCheck", "RTCc", "smaller type check", "TRUE", 0}, + {"SuppressStartupBanner", "nologo", "SuppressStartupBanner", "TRUE", 0}, + {"WarnAsError", "WX", "Treat warnings as errors", "TRUE", 0}, + {0,0,0,0,0} +}; + + + +cmVS7FlagTable cmLocalVisualStudio7GeneratorLinkFlagTable[] = +{ + // option flags (some flags map to the same option) + {"GenerateManifest", "MANIFEST:NO", + "disable manifest generation", "FALSE", 0}, + {"GenerateManifest", "MANIFEST", "enable manifest generation", "TRUE", 0}, + {"LinkIncremental", "INCREMENTAL:NO", "link incremental", "1", 0}, + {"LinkIncremental", "INCREMENTAL:YES", "link incremental", "2", 0}, + {"IgnoreDefaultLibraryNames", "NODEFAULTLIB:", "default libs to ignore", "", + cmVS7FlagTable::UserValue | cmVS7FlagTable::SemicolonAppendable}, + {"IgnoreAllDefaultLibraries", "NODEFAULTLIB", "ignore all default libs", + "TRUE", 0}, + {"ModuleDefinitionFile", "DEF:", "add an export def file", "", + cmVS7FlagTable::UserValue}, + {0,0,0,0,0} +}; + +//---------------------------------------------------------------------------- +class cmLocalVisualStudio7GeneratorOptions +{ +public: + // Construct an options table for a given tool. + enum Tool + { + Compiler, + Linker, + FortranCompiler + }; + cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg, + int version, + Tool tool, + cmVS7FlagTable const* extraTable = 0); + + // Store options from command line flags. + void Parse(const char* flags); + + // Fix the ExceptionHandling option to default to off. + void FixExceptionHandlingDefault(); + + // Store options for verbose builds. + void SetVerboseMakefile(bool verbose); + + // Store definitions and flags. + void AddDefine(const std::string& define); + void AddDefines(const char* defines); + void AddFlag(const char* flag, const char* value); + + // Check for specific options. + bool UsingUnicode(); + + bool IsDebug(); + // Write options to output. + void OutputPreprocessorDefinitions(std::ostream& fout, + const char* prefix, + const char* suffix); + void OutputFlagMap(std::ostream& fout, const char* indent); + void OutputAdditionalOptions(std::ostream& fout, + const char* prefix, + const char* suffix); + +private: + cmLocalVisualStudio7Generator* LocalGenerator; + int Version; + + // create a map of xml tags to the values they should have in the output + // for example, "BufferSecurityCheck" = "TRUE" + // first fill this table with the values for the configuration + // Debug, Release, etc, + // Then parse the command line flags specified in CMAKE_CXX_FLAGS + // and CMAKE_C_FLAGS + // and overwrite or add new values to this map + std::map FlagMap; + + // Preprocessor definitions. + std::vector Defines; + + // Unrecognized flags that get no special handling. + cmStdString FlagString; + + Tool CurrentTool; + bool DoingDefine; + cmVS7FlagTable const* FlagTable; + cmVS7FlagTable const* ExtraFlagTable; + void HandleFlag(const char* flag); + bool CheckFlagTable(cmVS7FlagTable const* table, const char* flag, + bool& flag_handled); +}; + +void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, + const char* configName, + const char *libName, + cmTarget &target) +{ + const char* mfcFlag = this->Makefile->GetDefinition("CMAKE_MFC_FLAG"); + if(!mfcFlag) + { + mfcFlag = "0"; + } + fout << "\t\tPlatformName << "\"\n" + << "\t\t\tOutputDirectory=\"" << configName << "\"\n"; + // This is an internal type to Visual Studio, it seems that: + // 4 == static library + // 2 == dll + // 1 == executable + // 10 == utility + const char* configType = "10"; + const char* projectType = 0; + switch(target.GetType()) + { + case cmTarget::STATIC_LIBRARY: + projectType = "typeStaticLibrary"; + configType = "4"; + break; + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + projectType = "typeDynamicLibrary"; + configType = "2"; + break; + case cmTarget::EXECUTABLE: + configType = "1"; + break; + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + configType = "10"; + default: + break; + } + if(this->FortranProject && projectType) + { + configType = projectType; + } + std::string flags; + if(strcmp(configType, "10") != 0) + { + const char* linkLanguage = + target.GetLinkerLanguage(this->GetGlobalGenerator()); + if(!linkLanguage) + { + cmSystemTools::Error + ("CMake can not determine linker language for target:", + target.GetName()); + return; + } + if(strcmp(linkLanguage, "C") == 0 || strcmp(linkLanguage, "CXX") == 0 + || strcmp(linkLanguage, "Fortran") == 0) + { + std::string baseFlagVar = "CMAKE_"; + baseFlagVar += linkLanguage; + baseFlagVar += "_FLAGS"; + flags = this->Makefile->GetRequiredDefinition(baseFlagVar.c_str()); + std::string flagVar = baseFlagVar + std::string("_") + + cmSystemTools::UpperCase(configName); + flags += " "; + flags += this->Makefile->GetRequiredDefinition(flagVar.c_str()); + } + // set the correct language + if(strcmp(linkLanguage, "C") == 0) + { + flags += " /TC "; + } + if(strcmp(linkLanguage, "CXX") == 0) + { + flags += " /TP "; + } + } + + // Add the target-specific flags. + if(const char* targetFlags = target.GetProperty("COMPILE_FLAGS")) + { + flags += " "; + flags += targetFlags; + } + + std::string configUpper = cmSystemTools::UpperCase(configName); + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += configUpper; + + // Get preprocessor definitions for this directory. + std::string defineFlags = this->Makefile->GetDefineFlags(); + Options::Tool t = Options::Compiler; + if(this->FortranProject) + { + t = Options::FortranCompiler; + } + Options targetOptions(this, this->Version, t, this->ExtraFlagTable); + targetOptions.FixExceptionHandlingDefault(); + targetOptions.Parse(flags.c_str()); + targetOptions.Parse(defineFlags.c_str()); + targetOptions.AddDefines + (this->Makefile->GetProperty("COMPILE_DEFINITIONS")); + targetOptions.AddDefines(target.GetProperty("COMPILE_DEFINITIONS")); + targetOptions.AddDefines(this->Makefile->GetProperty(defPropName.c_str())); + targetOptions.AddDefines(target.GetProperty(defPropName.c_str())); + targetOptions.SetVerboseMakefile( + this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE")); + + // Add a definition for the configuration name. + std::string configDefine = "CMAKE_INTDIR=\""; + configDefine += configName; + configDefine += "\""; + targetOptions.AddDefine(configDefine); + + // Add the export symbol definition for shared library objects. + if(const char* exportMacro = target.GetExportMacro()) + { + targetOptions.AddDefine(exportMacro); + } + + // The intermediate directory name consists of a directory for the + // target and a subdirectory for the configuration name. + std::string intermediateDir = this->GetTargetDirectory(target); + intermediateDir += "/"; + intermediateDir += configName; + fout << "\t\t\tIntermediateDirectory=\"" + << this->ConvertToXMLOutputPath(intermediateDir.c_str()) + << "\"\n" + << "\t\t\tConfigurationType=\"" << configType << "\"\n" + << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n" + << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"FALSE\"\n"; + + // If unicode is enabled change the character set to unicode, if not + // then default to MBCS. + if(targetOptions.UsingUnicode()) + { + fout << "\t\t\tCharacterSet=\"1\">\n"; + } + else + { + fout << "\t\t\tCharacterSet=\"2\">\n"; + } + const char* tool = "VCCLCompilerTool"; + if(this->FortranProject) + { + tool = "VFFortranCompilerTool"; + } + fout << "\t\t\tFortranProject) + { + const char* target_mod_dir = + target.GetProperty("Fortran_MODULE_DIRECTORY"); + std::string modDir; + if(target_mod_dir) + { + modDir = this->Convert(target_mod_dir, + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED); + } + else + { + modDir = "."; + } + fout << "\t\t\t\tModulePath=\"" + << this->ConvertToXMLOutputPath(modDir.c_str()) << "\\$(ConfigurationName)\"\n"; + } + targetOptions.OutputAdditionalOptions(fout, "\t\t\t\t", "\n"); + fout << "\t\t\t\tAdditionalIncludeDirectories=\""; + std::vector includes; + this->GetIncludeDirectories(includes); + std::vector::iterator i = includes.begin(); + for(;i != includes.end(); ++i) + { + // output the include path + std::string ipath = this->ConvertToXMLOutputPath(i->c_str()); + fout << ipath << ";"; + // if this is fortran then output the include with + // a ConfigurationName on the end of it. + if(this->FortranProject) + { + ipath = i->c_str(); + ipath += "/$(ConfigurationName)"; + ipath = this->ConvertToXMLOutputPath(ipath.c_str()); + fout << ipath << ";"; + } + } + fout << "\"\n"; + targetOptions.OutputFlagMap(fout, "\t\t\t\t"); + targetOptions.OutputPreprocessorDefinitions(fout, "\t\t\t\t", "\n"); + fout << "\t\t\t\tAssemblerListingLocation=\"" << configName << "\"\n"; + fout << "\t\t\t\tObjectFile=\"$(IntDir)\\\"\n"; + if(target.GetType() == cmTarget::EXECUTABLE || + target.GetType() == cmTarget::STATIC_LIBRARY || + target.GetType() == cmTarget::SHARED_LIBRARY || + target.GetType() == cmTarget::MODULE_LIBRARY) + { + // We need to specify a program database file name even for + // non-debug configurations because VS still creates .idb files. + fout << "\t\t\t\tProgramDataBaseFileName=\"" + << target.GetDirectory(configName) << "/" + << target.GetPDBName(configName) << "\"\n"; + } + fout << "/>\n"; // end of FortranProject) + { + tool = "VFCustomBuildTool"; + } + fout << "\t\t\t\n"; + tool = "VCResourceCompilerTool"; + if(this->FortranProject) + { + tool = "VFResourceCompilerTool"; + } + fout << "\t\t\tConvertToXMLOutputPath(i->c_str()); + fout << ipath << ";"; + } + // add the -D flags to the RC tool + fout << "\""; + targetOptions.OutputPreprocessorDefinitions(fout, "\n\t\t\t\t", ""); + fout << "/>\n"; + tool = "VCMIDLTool"; + if(this->FortranProject) + { + tool = "VFMIDLTool"; + } + fout << "\t\t\tPlatformName == "x64" ) + { + fout << "\t\t\t\tTargetEnvironment=\"3\"\n"; + } + else if( this->PlatformName == "ia64" ) + { + fout << "\t\t\t\tTargetEnvironment=\"2\"\n"; + } + else + { + fout << "\t\t\t\tTargetEnvironment=\"1\"\n"; + } + fout << "\t\t\t\tGenerateStublessProxies=\"TRUE\"\n"; + fout << "\t\t\t\tTypeLibraryName=\"$(InputName).tlb\"\n"; + fout << "\t\t\t\tOutputDirectory=\"$(IntDir)\"\n"; + fout << "\t\t\t\tHeaderFileName=\"$(InputName).h\"\n"; + fout << "\t\t\t\tDLLDataFileName=\"\"\n"; + fout << "\t\t\t\tInterfaceIdentifierFileName=\"$(InputName)_i.c\"\n"; + fout << "\t\t\t\tProxyFileName=\"$(InputName)_p.c\"/>\n"; + // end of Version >= 8 ) + { + // Check the filesystem type where the target will be written. + if(cmLVS6G_IsFAT(target.GetDirectory(configName).c_str())) + { + // Add a flag telling the manifest tool to use a workaround + // for FAT32 file systems, which can cause an empty manifest + // to be embedded into the resulting executable. See CMake + // bug #2617. + const char* tool = "VCManifestTool"; + if(this->FortranProject) + { + tool = "VFManifestTool"; + } + fout << "\t\t\t\n"; + } + } + + this->OutputTargetRules(fout, configName, target, libName); + this->OutputBuildTool(fout, configName, target, targetOptions.IsDebug()); + fout << "\t\t\n"; +} + +//---------------------------------------------------------------------------- +std::string +cmLocalVisualStudio7Generator +::GetBuildTypeLinkerFlags(std::string rootLinkerFlags, const char* configName) +{ + std::string configTypeUpper = cmSystemTools::UpperCase(configName); + std::string extraLinkOptionsBuildTypeDef = + rootLinkerFlags + "_" + configTypeUpper; + + std::string extraLinkOptionsBuildType = + this->Makefile->GetRequiredDefinition + (extraLinkOptionsBuildTypeDef.c_str()); + + return extraLinkOptionsBuildType; +} + +void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, + const char* configName, + cmTarget &target, + bool isDebug) +{ + std::string temp; + std::string extraLinkOptions; + if(target.GetType() == cmTarget::EXECUTABLE) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS") + + std::string(" ") + + GetBuildTypeLinkerFlags("CMAKE_EXE_LINKER_FLAGS", configName); + } + if(target.GetType() == cmTarget::SHARED_LIBRARY) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS") + + std::string(" ") + + GetBuildTypeLinkerFlags("CMAKE_SHARED_LINKER_FLAGS", configName); + } + if(target.GetType() == cmTarget::MODULE_LIBRARY) + { + extraLinkOptions = + this->Makefile->GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS") + + std::string(" ") + + GetBuildTypeLinkerFlags("CMAKE_MODULE_LINKER_FLAGS", configName); + } + + const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); + if(targetLinkFlags) + { + extraLinkOptions += " "; + extraLinkOptions += targetLinkFlags; + } + std::string configTypeUpper = cmSystemTools::UpperCase(configName); + std::string linkFlagsConfig = "LINK_FLAGS_"; + linkFlagsConfig += configTypeUpper; + targetLinkFlags = target.GetProperty(linkFlagsConfig.c_str()); + if(targetLinkFlags) + { + extraLinkOptions += " "; + extraLinkOptions += targetLinkFlags; + } + Options linkOptions(this, this->Version, Options::Linker); + linkOptions.Parse(extraLinkOptions.c_str()); + switch(target.GetType()) + { + case cmTarget::STATIC_LIBRARY: + { + std::string targetNameFull = target.GetFullName(configName); + std::string libpath = target.GetDirectory(configName); + libpath += "/"; + libpath += targetNameFull; + const char* tool = "VCLibrarianTool"; + if(this->FortranProject) + { + tool = "VFLibrarianTool"; + } + fout << "\t\t\tConvertToXMLOutputPathSingle(libpath.c_str()) << "\"/>\n"; + break; + } + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + { + std::string targetName; + std::string targetNameSO; + std::string targetNameFull; + std::string targetNameImport; + std::string targetNamePDB; + target.GetLibraryNames(targetName, targetNameSO, targetNameFull, + targetNameImport, targetNamePDB, configName); + + // Compute the link library and directory information. + cmComputeLinkInformation* pcli = target.GetLinkInformation(configName); + if(!pcli) + { + return; + } + cmComputeLinkInformation& cli = *pcli; + const char* linkLanguage = cli.GetLinkLanguage(); + + // Compute the variable name to lookup standard libraries for this + // language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += linkLanguage; + standardLibsVar += "_STANDARD_LIBRARIES"; + const char* tool = "VCLinkerTool"; + if(this->FortranProject) + { + tool = "VFLinkerTool"; + } + fout << "\t\t\tMakefile->GetSafeDefinition(standardLibsVar.c_str()) + << " "; + this->Internal->OutputLibraries(fout, cli.GetItems()); + fout << "\"\n"; + temp = target.GetDirectory(configName); + temp += "/"; + temp += targetNameFull; + fout << "\t\t\t\tOutputFile=\"" + << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; + this->WriteTargetVersionAttribute(fout, target); + linkOptions.OutputFlagMap(fout, "\t\t\t\t"); + fout << "\t\t\t\tAdditionalLibraryDirectories=\""; + this->OutputLibraryDirectories(fout, cli.GetDirectories()); + fout << "\"\n"; + this->OutputModuleDefinitionFile(fout, target); + temp = target.GetDirectory(configName); + temp += "/"; + temp += targetNamePDB; + fout << "\t\t\t\tProgramDataBaseFile=\"" << + this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; + if(isDebug) + { + fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; + } + std::string stackVar = "CMAKE_"; + stackVar += linkLanguage; + stackVar += "_STACK_SIZE"; + const char* stackVal = this->Makefile->GetDefinition(stackVar.c_str()); + if(stackVal) + { + fout << "\t\t\t\tStackReserveSize=\"" << stackVal << "\"\n"; + } + temp = target.GetDirectory(configName, true); + temp += "/"; + temp += targetNameImport; + fout << "\t\t\t\tImportLibrary=\"" + << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n"; + } + break; + case cmTarget::EXECUTABLE: + { + std::string targetName; + std::string targetNameFull; + std::string targetNameImport; + std::string targetNamePDB; + target.GetExecutableNames(targetName, targetNameFull, + targetNameImport, targetNamePDB, configName); + + // Compute the link library and directory information. + cmComputeLinkInformation* pcli = target.GetLinkInformation(configName); + if(!pcli) + { + return; + } + cmComputeLinkInformation& cli = *pcli; + const char* linkLanguage = cli.GetLinkLanguage(); + + // Compute the variable name to lookup standard libraries for this + // language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += linkLanguage; + standardLibsVar += "_STANDARD_LIBRARIES"; + const char* tool = "VCLinkerTool"; + if(this->FortranProject) + { + tool = "VFLinkerTool"; + } + fout << "\t\t\tMakefile->GetSafeDefinition(standardLibsVar.c_str()) + << " "; + this->Internal->OutputLibraries(fout, cli.GetItems()); + fout << "\"\n"; + temp = target.GetDirectory(configName); + temp += "/"; + temp += targetNameFull; + fout << "\t\t\t\tOutputFile=\"" + << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"\n"; + this->WriteTargetVersionAttribute(fout, target); + linkOptions.OutputFlagMap(fout, "\t\t\t\t"); + fout << "\t\t\t\tAdditionalLibraryDirectories=\""; + this->OutputLibraryDirectories(fout, cli.GetDirectories()); + fout << "\"\n"; + fout << "\t\t\t\tProgramDataBaseFile=\"" + << target.GetDirectory(configName) << "/" << targetNamePDB + << "\"\n"; + if(isDebug) + { + fout << "\t\t\t\tGenerateDebugInformation=\"TRUE\"\n"; + } + if ( target.GetPropertyAsBool("WIN32_EXECUTABLE") ) + { + fout << "\t\t\t\tSubSystem=\"2\"\n"; + } + else + { + fout << "\t\t\t\tSubSystem=\"1\"\n"; + } + std::string stackVar = "CMAKE_"; + stackVar += linkLanguage; + stackVar += "_STACK_SIZE"; + const char* stackVal = this->Makefile->GetDefinition(stackVar.c_str()); + if(stackVal) + { + fout << "\t\t\t\tStackReserveSize=\"" << stackVal << "\""; + } + temp = target.GetDirectory(configName, true); + temp += "/"; + temp += targetNameImport; + fout << "\t\t\t\tImportLibrary=\"" + << this->ConvertToXMLOutputPathSingle(temp.c_str()) << "\"/>\n"; + break; + } + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + break; + } +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7Generator +::WriteTargetVersionAttribute(std::ostream& fout, cmTarget& target) +{ + int major; + int minor; + target.GetTargetVersion(major, minor); + fout << "\t\t\t\tVersion=\"" << major << "." << minor << "\"\n"; +} + +void cmLocalVisualStudio7Generator +::OutputModuleDefinitionFile(std::ostream& fout, + cmTarget &target) +{ + std::vector const& classes = target.GetSourceFiles(); + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + cmSourceFile* sf = *i; + if(cmSystemTools::UpperCase(sf->GetExtension()) == "DEF") + { + fout << "\t\t\t\tModuleDefinitionFile=\"" + << this->ConvertToXMLOutputPath(sf->GetFullPath().c_str()) + << "\"\n"; + return; + } + } + +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7GeneratorInternals +::OutputLibraries(std::ostream& fout, ItemVector const& libs) +{ + cmLocalVisualStudio7Generator* lg = this->LocalGenerator; + for(ItemVector::const_iterator l = libs.begin(); l != libs.end(); ++l) + { + if(l->IsPath) + { + std::string rel = lg->Convert(l->Value.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED); + fout << lg->ConvertToXMLOutputPath(rel.c_str()) << " "; + } + else + { + fout << l->Value << " "; + } + } +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7Generator +::OutputLibraryDirectories(std::ostream& fout, + std::vector const& dirs) +{ + const char* comma = ""; + for(std::vector::const_iterator d = dirs.begin(); + d != dirs.end(); ++d) + { + // Remove any trailing slash and skip empty paths. + std::string dir = *d; + if(dir[dir.size()-1] == '/') + { + dir = dir.substr(0, dir.size()-1); + } + if(dir.empty()) + { + continue; + } + + // Switch to a relative path specification if it is shorter. + if(cmSystemTools::FileIsFullPath(dir.c_str())) + { + std::string rel = this->Convert(dir.c_str(), START_OUTPUT, UNCHANGED); + if(rel.size() < dir.size()) + { + dir = rel; + } + } + + // First search a configuration-specific subdirectory and then the + // original directory. + fout << comma << this->ConvertToXMLOutputPath((dir+"/$(OutDir)").c_str()) + << "," << this->ConvertToXMLOutputPath(dir.c_str()); + comma = ","; + } +} + +void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, + const char *libName, + cmTarget &target) +{ + // get the configurations + std::vector *configs = + static_cast + (this->GlobalGenerator)->GetConfigurations(); + + // We may be modifying the source groups temporarily, so make a copy. + std::vector sourceGroups = this->Makefile->GetSourceGroups(); + + // get the classes from the source lists then add them to the groups + std::vectorconst & classes = target.GetSourceFiles(); + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); i++) + { + // Add the file to the list of sources. + std::string source = (*i)->GetFullPath(); + if(cmSystemTools::UpperCase((*i)->GetExtension()) == "DEF") + { + this->ModuleDefinitionFile = (*i)->GetFullPath(); + } + cmSourceGroup& sourceGroup = + this->Makefile->FindSourceGroup(source.c_str(), sourceGroups); + sourceGroup.AssignSource(*i); + } + + // Compute which sources need unique object computation. + this->ComputeObjectNameRequirements(sourceGroups); + + // open the project + this->WriteProjectStart(fout, libName, target, sourceGroups); + // write the configuration information + this->WriteConfigurations(fout, libName, target); + + fout << "\t\n"; + + + // Loop through every source group. + for(unsigned int i = 0; i < sourceGroups.size(); ++i) + { + cmSourceGroup sg = sourceGroups[i]; + this->WriteGroup(&sg, target, fout, libName, configs); + } + + //} + + fout << "\t\n"; + + // Write the VCProj file's footer. + this->WriteVCProjFooter(fout); +} + +struct cmLVS7GFileConfig +{ + std::string ObjectName; + std::string CompileFlags; + std::string CompileDefs; + std::string CompileDefsConfig; + std::string AdditionalDeps; + bool ExcludedFromBuild; +}; + +class cmLocalVisualStudio7GeneratorFCInfo +{ +public: + cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg, + cmTarget& target, + cmSourceFile const& sf, + std::vector* configs, + std::string::size_type dir_len); + std::map FileConfigMap; +}; + +cmLocalVisualStudio7GeneratorFCInfo +::cmLocalVisualStudio7GeneratorFCInfo(cmLocalVisualStudio7Generator* lg, + cmTarget& target, + cmSourceFile const& sf, + std::vector* configs, + std::string::size_type dir_len) +{ + std::string objectName; + if(lg->NeedObjectName.find(&sf) != lg->NeedObjectName.end()) + { + objectName = lg->GetObjectFileNameWithoutTarget(sf, dir_len); + } + + // Compute per-source, per-config information. + for(std::vector::iterator i = configs->begin(); + i != configs->end(); ++i) + { + std::string configUpper = cmSystemTools::UpperCase(*i); + cmLVS7GFileConfig fc; + bool needfc = false; + if(!objectName.empty()) + { + fc.ObjectName = objectName; + needfc = true; + } + if(const char* cflags = sf.GetProperty("COMPILE_FLAGS")) + { + fc.CompileFlags = cflags; + needfc = true; + } + if(const char* cdefs = sf.GetProperty("COMPILE_DEFINITIONS")) + { + fc.CompileDefs = cdefs; + needfc = true; + } + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += configUpper; + if(const char* ccdefs = sf.GetProperty(defPropName.c_str())) + { + fc.CompileDefsConfig = ccdefs; + needfc = true; + } + + // Check for extra object-file dependencies. + if(const char* deps = sf.GetProperty("OBJECT_DEPENDS")) + { + std::vector depends; + cmSystemTools::ExpandListArgument(deps, depends); + const char* sep = ""; + for(std::vector::iterator j = depends.begin(); + j != depends.end(); ++j) + { + fc.AdditionalDeps += sep; + fc.AdditionalDeps += lg->ConvertToXMLOutputPath(j->c_str()); + sep = ";"; + needfc = true; + } + } + + const char* lang = + lg->GlobalGenerator->GetLanguageFromExtension + (sf.GetExtension().c_str()); + const char* sourceLang = lg->GetSourceFileLanguage(sf); + const char* linkLanguage = target.GetLinkerLanguage + (lg->GetGlobalGenerator()); + bool needForceLang = false; + // source file does not match its extension language + if(lang && sourceLang && strcmp(lang, sourceLang) != 0) + { + needForceLang = true; + lang = sourceLang; + } + // If lang is set, the compiler will generate code automatically. + // If HEADER_FILE_ONLY is set, we must suppress this generation in + // the project file + fc.ExcludedFromBuild = + (lang && sf.GetPropertyAsBool("HEADER_FILE_ONLY")); + if(fc.ExcludedFromBuild) + { + needfc = true; + } + + // if the source file does not match the linker language + // then force c or c++ + if(needForceLang || (linkLanguage && lang + && strcmp(lang, linkLanguage) != 0)) + { + if(strcmp(lang, "CXX") == 0) + { + // force a C++ file type + fc.CompileFlags += " /TP "; + needfc = true; + } + else if(strcmp(lang, "C") == 0) + { + // force to c + fc.CompileFlags += " /TC "; + needfc = true; + } + } + + if(needfc) + { + this->FileConfigMap[*i] = fc; + } + } +} + +void cmLocalVisualStudio7Generator +::WriteGroup(const cmSourceGroup *sg, cmTarget& target, + std::ostream &fout, const char *libName, + std::vector *configs) +{ + const std::vector &sourceFiles = + sg->GetSourceFiles(); + // If the group is empty, don't write it at all. + if(sourceFiles.empty() && sg->GetGroupChildren().empty()) + { + return; + } + + // If the group has a name, write the header. + std::string name = sg->GetName(); + if(name != "") + { + this->WriteVCProjBeginGroup(fout, name.c_str(), ""); + } + + // Compute the maximum length of a configuration name. + std::string::size_type config_len_max = 0; + for(std::vector::iterator i = configs->begin(); + i != configs->end(); ++i) + { + if(i->size() > config_len_max) + { + config_len_max = i->size(); + } + } + + // Compute the maximum length of the full path to the intermediate + // files directory for any configuration. This is used to construct + // object file names that do not produce paths that are too long. + std::string::size_type dir_len = 0; + dir_len += strlen(this->Makefile->GetCurrentOutputDirectory()); + dir_len += 1; + dir_len += this->GetTargetDirectory(target).size(); + dir_len += 1; + dir_len += config_len_max; + dir_len += 1; + + // Loop through each source in the source group. + std::string objectName; + for(std::vector::const_iterator sf = + sourceFiles.begin(); sf != sourceFiles.end(); ++sf) + { + std::string source = (*sf)->GetFullPath(); + FCInfo fcinfo(this, target, *(*sf), configs, dir_len); + + if (source != libName || target.GetType() == cmTarget::UTILITY || + target.GetType() == cmTarget::GLOBAL_TARGET ) + { + fout << "\t\t\tConvertToXMLOutputPathSingle(source.c_str()); + // Tell MS-Dev what the source is. If the compiler knows how to + // build it, then it will. + fout << "\t\t\t\tRelativePath=\"" << d << "\">\n"; + if(cmCustomCommand const* command = (*sf)->GetCustomCommand()) + { + this->WriteCustomRule(fout, source.c_str(), *command, fcinfo); + } + else if(!fcinfo.FileConfigMap.empty()) + { + const char* aCompilerTool = "VCCLCompilerTool"; + std::string ext = (*sf)->GetExtension(); + ext = cmSystemTools::LowerCase(ext); + if(ext == "idl") + { + aCompilerTool = "VCMIDLTool"; + if(this->FortranProject) + { + aCompilerTool = "VFMIDLTool"; + } + } + if(ext == "rc") + { + aCompilerTool = "VCResourceCompilerTool"; + if(this->FortranProject) + { + aCompilerTool = "VFResourceCompilerTool"; + } + } + if(ext == "def") + { + aCompilerTool = "VCCustomBuildTool"; + if(this->FortranProject) + { + aCompilerTool = "VFCustomBuildTool"; + } + } + for(std::map::const_iterator + fci = fcinfo.FileConfigMap.begin(); + fci != fcinfo.FileConfigMap.end(); ++fci) + { + cmLVS7GFileConfig const& fc = fci->second; + fout << "\t\t\t\tfirst + << "|" << this->PlatformName << "\""; + if(fc.ExcludedFromBuild) + { + fout << " ExcludedFromBuild=\"true\""; + } + fout << ">\n"; + fout << "\t\t\t\t\tVersion, Options::Compiler, + this->ExtraFlagTable); + fileOptions.Parse(fc.CompileFlags.c_str()); + fileOptions.AddDefines(fc.CompileDefs.c_str()); + fileOptions.AddDefines(fc.CompileDefsConfig.c_str()); + fileOptions.OutputAdditionalOptions(fout, "\t\t\t\t\t", "\n"); + fileOptions.OutputFlagMap(fout, "\t\t\t\t\t"); + fileOptions.OutputPreprocessorDefinitions(fout, + "\t\t\t\t\t", "\n"); + } + if(!fc.AdditionalDeps.empty()) + { + fout << "\t\t\t\t\tAdditionalDependencies=\"" + << fc.AdditionalDeps.c_str() << "\"\n"; + } + if(!fc.ObjectName.empty()) + { + fout << "\t\t\t\t\tObjectFile=\"$(IntDir)/" + << fc.ObjectName.c_str() << "\"\n"; + } + fout << "\t\t\t\t\t/>\n" + << "\t\t\t\t\n"; + } + } + fout << "\t\t\t\n"; + } + } + + std::vector children = sg->GetGroupChildren(); + + for(unsigned int i=0;iWriteGroup(&children[i], target, fout, libName, configs); + } + + // If the group has a name, write the footer. + if(name != "") + { + this->WriteVCProjEndGroup(fout); + } +} + +void cmLocalVisualStudio7Generator:: +WriteCustomRule(std::ostream& fout, + const char* source, + const cmCustomCommand& command, + FCInfo& fcinfo) +{ + std::string comment = this->ConstructComment(command); + + // Write the rule for each configuration. + std::vector::iterator i; + std::vector *configs = + static_cast + (this->GlobalGenerator)->GetConfigurations(); + const char* compileTool = "VCCLCompilerTool"; + if(this->FortranProject) + { + compileTool = "VFCLCompilerTool"; + } + const char* customTool = "VCCustomBuildTool"; + if(this->FortranProject) + { + customTool = "VFCustomBuildTool"; + } + for(i = configs->begin(); i != configs->end(); ++i) + { + cmLVS7GFileConfig const& fc = fcinfo.FileConfigMap[*i]; + fout << "\t\t\t\tPlatformName << "\">\n"; + if(!fc.CompileFlags.empty()) + { + fout << "\t\t\t\t\tEscapeForXML(fc.CompileFlags.c_str()) << "\"/>\n"; + } + + std::string script = + this->ConstructScript(command.GetCommandLines(), + command.GetWorkingDirectory(), + i->c_str(), + command.GetEscapeOldStyle(), + command.GetEscapeAllowMakeVars()); + fout << "\t\t\t\t\tEscapeForXML(comment.c_str()) << "\"\n" + << "\t\t\t\t\tCommandLine=\"" + << this->EscapeForXML(script.c_str()) << "\"\n" + << "\t\t\t\t\tAdditionalDependencies=\""; + if(command.GetDepends().empty()) + { + // There are no real dependencies. Produce an artificial one to + // make sure the rule runs reliably. + if(!cmSystemTools::FileExists(source)) + { + std::ofstream depout(source); + depout << "Artificial dependency for a custom command.\n"; + } + fout << this->ConvertToXMLOutputPath(source); + } + else + { + // Write out the dependencies for the rule. + for(std::vector::const_iterator d = + command.GetDepends().begin(); + d != command.GetDepends().end(); + ++d) + { + // Get the real name of the dependency in case it is a CMake target. + std::string dep = this->GetRealDependency(d->c_str(), i->c_str()); + fout << this->ConvertToXMLOutputPath(dep.c_str()) + << ";"; + } + } + fout << "\"\n"; + fout << "\t\t\t\t\tOutputs=\""; + if(command.GetOutputs().empty()) + { + fout << source << "_force"; + } + else + { + // Write a rule for the output generated by this command. + const char* sep = ""; + for(std::vector::const_iterator o = + command.GetOutputs().begin(); + o != command.GetOutputs().end(); + ++o) + { + fout << sep << this->ConvertToXMLOutputPathSingle(o->c_str()); + sep = ";"; + } + } + fout << "\"/>\n"; + fout << "\t\t\t\t\n"; + } +} + + +void cmLocalVisualStudio7Generator::WriteVCProjBeginGroup(std::ostream& fout, + const char* group, + const char* ) +{ + fout << "\t\t\n"; +} + + +void cmLocalVisualStudio7Generator::WriteVCProjEndGroup(std::ostream& fout) +{ + fout << "\t\t\n"; +} + + +// look for custom rules on a target and collect them together +void cmLocalVisualStudio7Generator +::OutputTargetRules(std::ostream& fout, + const char* configName, + cmTarget &target, + const char * /*libName*/) +{ + if (target.GetType() > cmTarget::GLOBAL_TARGET) + { + return; + } + const char* tool = "VCPreBuildEventTool"; + if(this->FortranProject) + { + tool = "VFPreBuildEventTool"; + } + // add the pre build rules + fout << "\t\t\t::const_iterator cr = + target.GetPreBuildCommands().begin(); + cr != target.GetPreBuildCommands().end(); ++cr) + { + if(!init) + { + const char* comment = cr->GetComment(); + if(comment && *comment) + { + fout << "\nDescription=\"" + << this->EscapeForXML(comment) << "\""; + } + fout << "\nCommandLine=\""; + init = true; + } + else + { + fout << this->EscapeForXML("\n"); + } + std::string script = + this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars()); + fout << this->EscapeForXML(script.c_str()).c_str(); + } + if (init) + { + fout << "\""; + } + fout << "/>\n"; + + // add the pre Link rules + tool = "VCPreLinkEventTool"; + if(this->FortranProject) + { + tool = "VFPreLinkEventTool"; + } + fout << "\t\t\t::const_iterator cr = + target.GetPreLinkCommands().begin(); + cr != target.GetPreLinkCommands().end(); ++cr) + { + if(!init) + { + const char* comment = cr->GetComment(); + if(comment && *comment) + { + fout << "\nDescription=\"" + << this->EscapeForXML(comment) << "\""; + } + fout << "\nCommandLine=\""; + init = true; + } + else + { + fout << this->EscapeForXML("\n"); + } + std::string script = + this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars()); + fout << this->EscapeForXML(script.c_str()).c_str(); + } + if (init) + { + fout << "\""; + } + fout << "/>\n"; + + // add the PostBuild rules + tool = "VCPostBuildEventTool"; + if(this->FortranProject) + { + tool = "VFPostBuildEventTool"; + } + fout << "\t\t\t::const_iterator cr = + target.GetPostBuildCommands().begin(); + cr != target.GetPostBuildCommands().end(); ++cr) + { + if(!init) + { + const char* comment = cr->GetComment(); + if(comment && *comment) + { + fout << "\nDescription=\"" + << this->EscapeForXML(comment) << "\""; + } + fout << "\nCommandLine=\""; + init = true; + } + else + { + fout << this->EscapeForXML("\n"); + } + std::string script = + this->ConstructScript(cr->GetCommandLines(), + cr->GetWorkingDirectory(), + configName, + cr->GetEscapeOldStyle(), + cr->GetEscapeAllowMakeVars()); + fout << this->EscapeForXML(script.c_str()).c_str(); + } + if (init) + { + fout << "\""; + } + fout << "/>\n"; +} + +void +cmLocalVisualStudio7Generator +::WriteProjectStartFortran(std::ostream& fout, + const char *libName, + cmTarget & target) +{ + + cmGlobalVisualStudio7Generator* gg = + static_cast(this->GlobalGenerator); + fout << "\n" + << "\n"; + } + fout<< "\tKeyword=\"" << keyword << "\">\n" + << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\">\n" + << "\t\n" + << "\t\tPlatformName << "\"/>\n" + << "\t\n"; +} + + +void +cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, + const char *libName, + cmTarget & target, + std::vector &) +{ + if(this->FortranProject) + { + this->WriteProjectStartFortran(fout, libName, target); + return; + } + fout << "\n" + << "Version == 71) + { + fout << "\tVersion=\"7.10\"\n"; + } + else + { + fout << "\tVersion=\"" << this->Version << ".00\"\n"; + } + const char* projLabel = target.GetProperty("PROJECT_LABEL"); + if(!projLabel) + { + projLabel = libName; + } + const char* keyword = target.GetProperty("VS_KEYWORD"); + if(!keyword) + { + keyword = "Win32Proj"; + } + cmGlobalVisualStudio7Generator* gg = + static_cast(this->GlobalGenerator); + fout << "\tName=\"" << projLabel << "\"\n"; + if(this->Version >= 8) + { + fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n"; + } + fout << "\tSccProjectName=\"\"\n" + << "\tSccLocalPath=\"\"\n" + << "\tKeyword=\"" << keyword << "\">\n" + << "\t\n" + << "\t\tPlatformName << "\"/>\n" + << "\t\n"; +} + + +void cmLocalVisualStudio7Generator::WriteVCProjFooter(std::ostream& fout) +{ + fout << "\t\n" + << "\t\n" + << "\n"; +} + +std::string cmLocalVisualStudio7GeneratorEscapeForXML(const char* s) +{ + std::string ret = s; + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "\"", """); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); + cmSystemTools::ReplaceString(ret, "\n", " "); + return ret; +} + +std::string cmLocalVisualStudio7Generator::EscapeForXML(const char* s) +{ + return cmLocalVisualStudio7GeneratorEscapeForXML(s); +} + +std::string cmLocalVisualStudio7Generator +::ConvertToXMLOutputPath(const char* path) +{ + std::string ret = this->ConvertToOptionallyRelativeOutputPath(path); + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "\"", """); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); + return ret; +} + +std::string cmLocalVisualStudio7Generator +::ConvertToXMLOutputPathSingle(const char* path) +{ + std::string ret = this->ConvertToOptionallyRelativeOutputPath(path); + cmSystemTools::ReplaceString(ret, "\"", ""); + cmSystemTools::ReplaceString(ret, "&", "&"); + cmSystemTools::ReplaceString(ret, "<", "<"); + cmSystemTools::ReplaceString(ret, ">", ">"); + return ret; +} + + +// This class is used to parse an existing vs 7 project +// and extract the GUID +class cmVS7XMLParser : public cmXMLParser +{ +public: + virtual void EndElement(const char* /* name */) + { + } + virtual void StartElement(const char* name, const char** atts) + { + // once the GUID is found do nothing + if(this->GUID.size()) + { + return; + } + int i =0; + if(strcmp("VisualStudioProject", name) == 0) + { + while(atts[i]) + { + if(strcmp(atts[i], "ProjectGUID") == 0) + { + if(atts[i+1]) + { + this->GUID = atts[i+1]; + this->GUID = this->GUID.substr(1, this->GUID.size()-2); + } + else + { + this->GUID = ""; + } + return; + } + ++i; + } + } + } + int InitializeParser() + { + int ret = cmXMLParser::InitializeParser(); + if(ret == 0) + { + return ret; + } + // visual studio projects have a strange encoding, but it is + // really utf-8 + XML_SetEncoding(static_cast(this->Parser), "utf-8"); + return 1; + } + std::string GUID; +}; + +void cmLocalVisualStudio7Generator::ReadAndStoreExternalGUID( + const char* name, + const char* path) +{ + cmVS7XMLParser parser; + parser.ParseFile(path); + // if we can not find a GUID then create one + if(parser.GUID.size() == 0) + { + cmGlobalVisualStudio7Generator* gg = + static_cast(this->GlobalGenerator); + gg->CreateGUID(name); + return; + } + std::string guidStoreName = name; + guidStoreName += "_GUID_CMAKE"; + // save the GUID in the cache + this->GlobalGenerator->GetCMakeInstance()-> + AddCacheEntry(guidStoreName.c_str(), + parser.GUID.c_str(), + "Stored GUID", + cmCacheManager::INTERNAL); +} + + +void cmLocalVisualStudio7Generator::ConfigureFinalPass() +{ + cmLocalGenerator::ConfigureFinalPass(); + cmTargets &tgts = this->Makefile->GetTargets(); + + cmGlobalVisualStudio7Generator* gg = + static_cast(this->GlobalGenerator); + for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); l++) + { + if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; + const cmCustomCommandLines& cmds = cc.GetCommandLines(); + std::string project_name = cmds[0][0]; + this->ReadAndStoreExternalGUID(project_name.c_str(), + cmds[0][1].c_str()); + } + else + { + gg->CreateGUID(l->first.c_str()); + } + } + +} + +//---------------------------------------------------------------------------- +std::string cmLocalVisualStudio7Generator +::GetTargetDirectory(cmTarget const& target) const +{ + std::string dir; + dir += target.GetName(); + dir += ".dir"; + return dir; +} + +//---------------------------------------------------------------------------- +cmLocalVisualStudio7GeneratorOptions +::cmLocalVisualStudio7GeneratorOptions(cmLocalVisualStudio7Generator* lg, + int version, + Tool tool, + cmVS7FlagTable const* extraTable): + LocalGenerator(lg), Version(version), CurrentTool(tool), + DoingDefine(false), FlagTable(0), ExtraFlagTable(extraTable) +{ + // Choose the flag table for the requested tool. + switch(tool) + { + case Compiler: + this->FlagTable = cmLocalVisualStudio7GeneratorFlagTable; break; + case Linker: + this->FlagTable = cmLocalVisualStudio7GeneratorLinkFlagTable; break; + case FortranCompiler: + this->FlagTable = cmLocalVisualStudio7GeneratorFortranFlagTable; + default: break; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::FixExceptionHandlingDefault() +{ + // Exception handling is on by default because the platform file has + // "/EHsc" in the flags. Normally, that will override this + // initialization to off, but the user has the option of removing + // the flag to disable exception handling. When the user does + // remove the flag we need to override the IDE default of on. + switch (this->Version) + { + case 7: + case 71: + this->FlagMap["ExceptionHandling"] = "FALSE"; + break; + + default: + this->FlagMap["ExceptionHandling"] = "0"; + break; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::SetVerboseMakefile(bool verbose) +{ + // If verbose makefiles have been requested and the /nologo option + // was not given explicitly in the flags we want to add an attribute + // to the generated project to disable logo suppression. Otherwise + // the GUI default is to enable suppression. + if(verbose && + this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) + { + this->FlagMap["SuppressStartupBanner"] = "FALSE"; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::AddDefine(const std::string& def) +{ + this->Defines.push_back(def); +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::AddDefines(const char* defines) +{ + if(defines) + { + // Expand the list of definitions. + cmSystemTools::ExpandListArgument(defines, this->Defines); + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::AddFlag(const char* flag, + const char* value) +{ + this->FlagMap[flag] = value; +} + + +bool cmLocalVisualStudio7GeneratorOptions::IsDebug() +{ + return this->FlagMap.find("DebugInformationFormat") != this->FlagMap.end(); +} + +//---------------------------------------------------------------------------- +bool cmLocalVisualStudio7GeneratorOptions::UsingUnicode() +{ + // Look for the a _UNICODE definition. + for(std::vector::const_iterator di = this->Defines.begin(); + di != this->Defines.end(); ++di) + { + if(*di == "_UNICODE") + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::Parse(const char* flags) +{ + // Parse the input string as a windows command line since the string + // is intended for writing directly into the build files. + std::vector args; + cmSystemTools::ParseWindowsCommandLine(flags, args); + + // Process flags that need to be represented specially in the IDE + // project file. + for(std::vector::iterator ai = args.begin(); + ai != args.end(); ++ai) + { + this->HandleFlag(ai->c_str()); + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudio7GeneratorOptions::HandleFlag(const char* flag) +{ + // If the last option was -D then this option is the definition. + if(this->DoingDefine) + { + this->DoingDefine = false; + this->Defines.push_back(flag); + return; + } + + // Look for known arguments. + if(flag[0] == '-' || flag[0] == '/') + { + // Look for preprocessor definitions. + if(this->CurrentTool == Compiler && flag[1] == 'D') + { + if(flag[2] == '\0') + { + // The next argument will have the definition. + this->DoingDefine = true; + } + else + { + // Store this definition. + this->Defines.push_back(flag+2); + } + return; + } + + // Look through the available flag tables. + bool flag_handled = false; + if(this->FlagTable && + this->CheckFlagTable(this->FlagTable, flag, flag_handled)) + { + return; + } + if(this->ExtraFlagTable && + this->CheckFlagTable(this->ExtraFlagTable, flag, flag_handled)) + { + return; + } + + // If any map entry handled the flag we are done. + if(flag_handled) + { + return; + } + } + // This option is not known. Store it in the output flags. + this->FlagString += " "; + this->FlagString += + cmSystemTools::EscapeWindowsShellArgument(flag, + cmsysSystem_Shell_Flag_VSIDE); +} + +//---------------------------------------------------------------------------- +bool +cmLocalVisualStudio7GeneratorOptions +::CheckFlagTable(cmVS7FlagTable const* table, const char* flag, + bool& flag_handled) +{ + // Look for an entry in the flag table matching this flag. + for(cmVS7FlagTable const* entry = table; entry->IDEName; ++entry) + { + bool entry_found = false; + if(entry->special & cmVS7FlagTable::UserValue) + { + // This flag table entry accepts a user-specified value. If + // the entry specifies UserRequired we must match only if a + // non-empty value is given. + int n = static_cast(strlen(entry->commandFlag)); + if(strncmp(flag+1, entry->commandFlag, n) == 0 && + (!(entry->special & cmVS7FlagTable::UserRequired) || + static_cast(strlen(flag+1)) > n)) + { + if(entry->special & cmVS7FlagTable::UserIgnored) + { + // Ignore the user-specified value. + this->FlagMap[entry->IDEName] = entry->value; + } + else if(entry->special & cmVS7FlagTable::SemicolonAppendable) + { + const char *new_value = flag+1+n; + + std::map::iterator itr; + itr = this->FlagMap.find(entry->IDEName); + if(itr != this->FlagMap.end()) + { + // Append to old value (if present) with semicolons; + itr->second += ";"; + itr->second += new_value; + } + else + { + this->FlagMap[entry->IDEName] = new_value; + } + } + else + { + // Use the user-specified value. + this->FlagMap[entry->IDEName] = flag+1+n; + } + entry_found = true; + } + } + else if(strcmp(flag+1, entry->commandFlag) == 0) + { + // This flag table entry provides a fixed value. + this->FlagMap[entry->IDEName] = entry->value; + entry_found = true; + } + + // If the flag has been handled by an entry not requesting a + // search continuation we are done. + if(entry_found && !(entry->special & cmVS7FlagTable::Continue)) + { + return true; + } + + // If the entry was found the flag has been handled. + flag_handled = flag_handled || entry_found; + } + + return false; +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7GeneratorOptions +::OutputPreprocessorDefinitions(std::ostream& fout, + const char* prefix, + const char* suffix) +{ + if(this->Defines.empty()) + { + return; + } + + fout << prefix << "PreprocessorDefinitions=\""; + const char* comma = ""; + for(std::vector::const_iterator di = this->Defines.begin(); + di != this->Defines.end(); ++di) + { + // Escape the definition for the compiler. + std::string define = + this->LocalGenerator->EscapeForShell(di->c_str(), true); + + // Escape this flag for the IDE. + define = cmLocalVisualStudio7GeneratorEscapeForXML(define.c_str()); + + // Store the flag in the project file. + fout << comma << define; + comma = ","; + } + fout << "\"" << suffix; +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7GeneratorOptions +::OutputFlagMap(std::ostream& fout, const char* indent) +{ + for(std::map::iterator m = this->FlagMap.begin(); + m != this->FlagMap.end(); ++m) + { + fout << indent << m->first << "=\"" << m->second << "\"\n"; + } +} + +//---------------------------------------------------------------------------- +void +cmLocalVisualStudio7GeneratorOptions +::OutputAdditionalOptions(std::ostream& fout, + const char* prefix, + const char* suffix) +{ + if(!this->FlagString.empty()) + { + fout << prefix << "AdditionalOptions=\""; + fout << + cmLocalVisualStudio7GeneratorEscapeForXML(this->FlagString.c_str()); + fout << "\"" << suffix; + } +} +void cmLocalVisualStudio7Generator:: +GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs) +{ + std::string dir = this->Makefile->GetCurrentOutputDirectory(); + dir += "/"; + dir += this->GetTargetDirectory(*target); + dir += "/"; + dir += this->GetGlobalGenerator()->GetCMakeCFGInitDirectory(); + dirs.push_back(dir); +} + +//---------------------------------------------------------------------------- +#include +static bool cmLVS6G_IsFAT(const char* dir) +{ + if(dir[0] && dir[1] == ':') + { + char volRoot[4] = "_:/"; + volRoot[0] = dir[0]; + char fsName[16]; + if(GetVolumeInformation(volRoot, 0, 0, 0, 0, 0, fsName, 16) && + strstr(fsName, "FAT") != 0) + { + return true; + } + } + return false; +} diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h new file mode 100644 index 000000000..f213c639f --- /dev/null +++ b/Source/cmLocalVisualStudio7Generator.h @@ -0,0 +1,160 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudio7Generator.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.50.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalVisualStudio7Generator_h +#define cmLocalVisualStudio7Generator_h + +#include "cmLocalVisualStudioGenerator.h" + +class cmTarget; +class cmSourceFile; +class cmCustomCommand; +class cmSourceGroup; +struct cmVS7FlagTable; + +class cmLocalVisualStudio7GeneratorOptions; +class cmLocalVisualStudio7GeneratorFCInfo; +class cmLocalVisualStudio7GeneratorInternals; + +/** \class cmLocalVisualStudio7Generator + * \brief Write Visual Studio .NET project files. + * + * cmLocalVisualStudio7Generator produces a Visual Studio .NET project + * file for each target in its directory. + */ +class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator +{ +public: + ///! Set cache only and recurse to false by default. + cmLocalVisualStudio7Generator(); + + virtual ~cmLocalVisualStudio7Generator(); + + virtual void AddHelperCommands(); + + /** + * Generate the makefile for this directory. + */ + virtual void Generate(); + + enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY}; + + /** + * Specify the type of the build: static, dll, or executable. + */ + void SetBuildType(BuildType,const char *name); + + void SetVersion71() {this->Version = 71;} + void SetVersion8() {this->Version = 8;} + void SetVersion9() {this->Version = 9;} + void SetPlatformName(const char* n) { this->PlatformName = n;} + virtual void ConfigureFinalPass(); + void GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs); + + void SetExtraFlagTable(cmVS7FlagTable const* table) + { this->ExtraFlagTable = table; } +private: + typedef cmLocalVisualStudio7GeneratorOptions Options; + typedef cmLocalVisualStudio7GeneratorFCInfo FCInfo; + void ReadAndStoreExternalGUID(const char* name, + const char* path); + std::string GetBuildTypeLinkerFlags(std::string rootLinkerFlags, + const char* configName); + void FixGlobalTargets(); + void WriteProjectFiles(); + void WriteStampFiles(); + void WriteVCProjHeader(std::ostream& fout, const char *libName, + cmTarget &tgt, std::vector &sgs); + void WriteVCProjFooter(std::ostream& fout); + void CreateSingleVCProj(const char *lname, cmTarget &tgt); + void WriteVCProjFile(std::ostream& fout, const char *libName, + cmTarget &tgt); + cmSourceFile* CreateVCProjBuildRule(); + void WriteConfigurations(std::ostream& fout, + const char *libName, cmTarget &tgt); + void WriteConfiguration(std::ostream& fout, + const char* configName, + const char* libName, cmTarget &tgt); + std::string EscapeForXML(const char* s); + std::string ConvertToXMLOutputPath(const char* path); + std::string ConvertToXMLOutputPathSingle(const char* path); + void OutputTargetRules(std::ostream& fout, const char* configName, + cmTarget &target, const char *libName); + void OutputBuildTool(std::ostream& fout, const char* configName, + cmTarget& t, bool debug); + void OutputLibraryDirectories(std::ostream& fout, + std::vector const& dirs); + void OutputModuleDefinitionFile(std::ostream& fout, cmTarget &target); + void WriteProjectStart(std::ostream& fout, const char *libName, + cmTarget &tgt, std::vector &sgs); + void WriteProjectStartFortran(std::ostream& fout, const char *libName, + cmTarget &tgt); + void WriteVCProjBeginGroup(std::ostream& fout, + const char* group, + const char* filter); + void WriteVCProjEndGroup(std::ostream& fout); + + void WriteCustomRule(std::ostream& fout, + const char* source, + const cmCustomCommand& command, + FCInfo& fcinfo); + void WriteTargetVersionAttribute(std::ostream& fout, cmTarget& target); + + void WriteGroup(const cmSourceGroup *sg, + cmTarget& target, std::ostream &fout, + const char *libName, std::vector *configs); + virtual std::string GetTargetDirectory(cmTarget const&) const; + + friend class cmLocalVisualStudio7GeneratorFCInfo; + friend class cmLocalVisualStudio7GeneratorInternals; + + cmVS7FlagTable const* ExtraFlagTable; + std::string ModuleDefinitionFile; + int Version; + bool FortranProject; + std::string PlatformName; // Win32 or x64 + cmLocalVisualStudio7GeneratorInternals* Internal; +}; + +// This is a table mapping XML tag IDE names to command line options +struct cmVS7FlagTable +{ + const char* IDEName; // name used in the IDE xml file + const char* commandFlag; // command line flag + const char* comment; // comment + const char* value; // string value + unsigned int special; // flags for special handling requests + enum + { + UserValue = (1<<0), // flag contains a user-specified value + UserIgnored = (1<<1), // ignore any user value + UserRequired = (1<<2), // match only when user value is non-empty + Continue = (1<<3), // continue looking for matching entries + SemicolonAppendable = (1<<4), // a flag that if specified multiple times + // should have its value appended to the + // old value with semicolons (e.g. + // /NODEFAULTLIB: => + // IgnoreDefaultLibraryNames) + + UserValueIgnored = UserValue | UserIgnored, + UserValueRequired = UserValue | UserRequired + }; +}; + +#endif + diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx new file mode 100755 index 000000000..3191a1fec --- /dev/null +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -0,0 +1,211 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudioGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-01-15 19:00:52 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLocalVisualStudioGenerator.h" +#include "cmGlobalGenerator.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmSystemTools.h" +#include "windows.h" + +//---------------------------------------------------------------------------- +cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator() +{ + this->WindowsShell = true; + this->WindowsVSIDE = true; +} + +//---------------------------------------------------------------------------- +cmLocalVisualStudioGenerator::~cmLocalVisualStudioGenerator() +{ +} + +//---------------------------------------------------------------------------- +bool cmLocalVisualStudioGenerator::SourceFileCompiles(const cmSourceFile* sf) +{ + // Identify the language of the source file. + if(const char* lang = this->GetSourceFileLanguage(*sf)) + { + // Check whether this source will actually be compiled. + return (!sf->GetCustomCommand() && + !sf->GetPropertyAsBool("HEADER_FILE_ONLY") && + !sf->GetPropertyAsBool("EXTERNAL_OBJECT")); + } + else + { + // Unknown source file language. Assume it will not be compiled. + return false; + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudioGenerator::CountObjectNames( + const std::vector& groups, + std::map& counts) +{ + for(unsigned int i = 0; i < groups.size(); ++i) + { + cmSourceGroup sg = groups[i]; + std::vector const& srcs = sg.GetSourceFiles(); + for(std::vector::const_iterator s = srcs.begin(); + s != srcs.end(); ++s) + { + const cmSourceFile* sf = *s; + if(this->SourceFileCompiles(sf)) + { + std::string objectName = cmSystemTools::LowerCase( + cmSystemTools::GetFilenameWithoutLastExtension( + sf->GetFullPath())); + objectName += ".obj"; + counts[objectName] += 1; + } + } + this->CountObjectNames(sg.GetGroupChildren(), counts); + } +} + +//---------------------------------------------------------------------------- +void cmLocalVisualStudioGenerator::InsertNeedObjectNames( + const std::vector& groups, + std::map& count) +{ + for(unsigned int i = 0; i < groups.size(); ++i) + { + cmSourceGroup sg = groups[i]; + std::vector const& srcs = sg.GetSourceFiles(); + for(std::vector::const_iterator s = srcs.begin(); + s != srcs.end(); ++s) + { + const cmSourceFile* sf = *s; + if(this->SourceFileCompiles(sf)) + { + std::string objectName = cmSystemTools::LowerCase( + cmSystemTools::GetFilenameWithoutLastExtension(sf->GetFullPath())); + objectName += ".obj"; + if(count[objectName] > 1) + { + this->NeedObjectName.insert(sf); + } + } + } + this->InsertNeedObjectNames(sg.GetGroupChildren(), count); + } +} + + +//---------------------------------------------------------------------------- +void cmLocalVisualStudioGenerator::ComputeObjectNameRequirements +(std::vector const& sourceGroups) +{ + // Clear the current set of requirements. + this->NeedObjectName.clear(); + + // Count the number of object files with each name. Note that + // windows file names are not case sensitive. + std::map objectNameCounts; + this->CountObjectNames(sourceGroups, objectNameCounts); + + // For all source files producing duplicate names we need unique + // object name computation. + this->InsertNeedObjectNames(sourceGroups, objectNameCounts); +} + +//---------------------------------------------------------------------------- +std::string +cmLocalVisualStudioGenerator +::ConstructScript(const cmCustomCommandLines& commandLines, + const char* workingDirectory, + const char* configName, + bool escapeOldStyle, + bool escapeAllowMakeVars, + const char* newline_text) +{ + // Avoid leading or trailing newlines. + const char* newline = ""; + + // Store the script in a string. + std::string script; + if(workingDirectory) + { + // Change the working directory. + script += newline; + newline = newline_text; + script += "cd "; + script += this->Convert(workingDirectory, START_OUTPUT, SHELL); + + // Change the working drive. + if(workingDirectory[0] && workingDirectory[1] == ':') + { + script += newline; + newline = newline_text; + script += workingDirectory[0]; + script += workingDirectory[1]; + } + } + // for visual studio IDE add extra stuff to the PATH + // if CMAKE_MSVCIDE_RUN_PATH is set. + if(this->Makefile->GetDefinition("MSVC_IDE")) + { + const char* extraPath = + this->Makefile->GetDefinition("CMAKE_MSVCIDE_RUN_PATH"); + if(extraPath) + { + script += newline; + newline = newline_text; + script += "set PATH="; + script += extraPath; + script += ";%PATH%"; + } + } + // Write each command on a single line. + for(cmCustomCommandLines::const_iterator cl = commandLines.begin(); + cl != commandLines.end(); ++cl) + { + // Start a new line. + script += newline; + newline = newline_text; + + // Start with the command name. + const cmCustomCommandLine& commandLine = *cl; + std::string commandName = this->GetRealLocation(commandLine[0].c_str(), + configName); + if(!workingDirectory) + { + script += this->Convert(commandName.c_str(),START_OUTPUT,SHELL); + } + else + { + script += this->Convert(commandName.c_str(),NONE,SHELL); + } + + // Add the arguments. + for(unsigned int j=1;j < commandLine.size(); ++j) + { + script += " "; + if(escapeOldStyle) + { + script += this->EscapeForShellOldStyle(commandLine[j].c_str()); + } + else + { + script += this->EscapeForShell(commandLine[j].c_str(), + escapeAllowMakeVars); + } + } + } + return script; +} + diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h new file mode 100644 index 000000000..4c7c60cff --- /dev/null +++ b/Source/cmLocalVisualStudioGenerator.h @@ -0,0 +1,57 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalVisualStudioGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-27 21:05:43 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalVisualStudioGenerator_h +#define cmLocalVisualStudioGenerator_h + +#include "cmLocalGenerator.h" + +class cmSourceFile; +class cmSourceGroup; + +/** \class cmLocalVisualStudioGenerator + * \brief Base class for Visual Studio generators. + * + * cmLocalVisualStudioGenerator provides functionality common to all + * Visual Studio generators. + */ +class cmLocalVisualStudioGenerator : public cmLocalGenerator +{ +public: + cmLocalVisualStudioGenerator(); + virtual ~cmLocalVisualStudioGenerator(); +protected: + + /** Construct a script from the given list of command lines. */ + std::string ConstructScript(const cmCustomCommandLines& commandLines, + const char* workingDirectory, + const char* configName, + bool escapeOldStyle, + bool escapeAllowMakeVars, + const char* newline = "\n"); + + // Safe object file name generation. + void ComputeObjectNameRequirements(std::vector const&); + bool SourceFileCompiles(const cmSourceFile* sf); + void CountObjectNames(const std::vector& groups, + std::map& count); + void InsertNeedObjectNames(const std::vector& groups, + std::map& count); + + std::set NeedObjectName; +}; + +#endif diff --git a/Source/cmLocalXCodeGenerator.cxx b/Source/cmLocalXCodeGenerator.cxx new file mode 100644 index 000000000..d1d22ec61 --- /dev/null +++ b/Source/cmLocalXCodeGenerator.cxx @@ -0,0 +1,53 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalXCodeGenerator.cxx,v $ + Language: C++ + Date: $Date: 2007-08-14 15:45:14 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmLocalXCodeGenerator.h" +#include "cmGlobalXCodeGenerator.h" +#include "cmSourceFile.h" + +//---------------------------------------------------------------------------- +cmLocalXCodeGenerator::cmLocalXCodeGenerator() +{ + // the global generator does this, so do not + // put these flags into the language flags + this->EmitUniversalBinaryFlags = false; +} + +//---------------------------------------------------------------------------- +cmLocalXCodeGenerator::~cmLocalXCodeGenerator() +{ +} + +//---------------------------------------------------------------------------- +std::string +cmLocalXCodeGenerator::GetTargetDirectory(cmTarget const&) const +{ + // No per-target directory for this generator (yet). + return ""; +} + +//---------------------------------------------------------------------------- +void cmLocalXCodeGenerator:: +GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs) +{ + cmGlobalXCodeGenerator* g = + (cmGlobalXCodeGenerator*)this->GetGlobalGenerator(); + g->SetCurrentLocalGenerator(this); + g->GetTargetObjectFileDirectories(target, + dirs); +} diff --git a/Source/cmLocalXCodeGenerator.h b/Source/cmLocalXCodeGenerator.h new file mode 100644 index 000000000..5d3d4f21b --- /dev/null +++ b/Source/cmLocalXCodeGenerator.h @@ -0,0 +1,44 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmLocalXCodeGenerator.h,v $ + Language: C++ + Date: $Date: 2007-08-01 19:25:40 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmLocalXCodeGenerator_h +#define cmLocalXCodeGenerator_h + +#include "cmLocalGenerator.h" + +/** \class cmLocalXCodeGenerator + * \brief Write a local Xcode project + * + * cmLocalXCodeGenerator produces a LocalUnix makefile from its + * member Makefile. + */ +class cmLocalXCodeGenerator : public cmLocalGenerator +{ +public: + ///! Set cache only and recurse to false by default. + cmLocalXCodeGenerator(); + + virtual ~cmLocalXCodeGenerator(); + void GetTargetObjectFileDirectories(cmTarget* target, + std::vector& + dirs); + virtual std::string GetTargetDirectory(cmTarget const& target) const; +private: + +}; + +#endif + diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx new file mode 100644 index 000000000..7e4627e5d --- /dev/null +++ b/Source/cmMacroCommand.cxx @@ -0,0 +1,362 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMacroCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-07 13:40:36 $ + Version: $Revision: 1.36 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMacroCommand.h" + +#include "cmake.h" + +// define the class for macro commands +class cmMacroHelperCommand : public cmCommand +{ +public: + cmMacroHelperCommand() {} + + ///! clean up any memory allocated by the macro + ~cmMacroHelperCommand() {}; + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + cmMacroHelperCommand *newC = new cmMacroHelperCommand; + // we must copy when we clone + newC->Args = this->Args; + newC->Functions = this->Functions; + return newC; + } + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InvokeInitialPass(const std::vector& args, + cmExecutionStatus &); + + virtual bool InitialPass(std::vector const&, + cmExecutionStatus &) { return false; }; + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return this->Args[0].c_str(); } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + std::string docs = "Macro named: "; + docs += this->GetName(); + return docs.c_str(); + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return this->GetTerseDocumentation(); + } + + cmTypeMacro(cmMacroHelperCommand, cmCommand); + + std::vector Args; + std::vector Functions; +}; + + +bool cmMacroHelperCommand::InvokeInitialPass +(const std::vector& args, + cmExecutionStatus &inStatus) +{ + // Expand the argument list to the macro. + std::vector expandedArgs; + this->Makefile->ExpandArguments(args, expandedArgs); + + std::string tmps; + cmListFileArgument arg; + std::string variable; + + // make sure the number of arguments passed is at least the number + // required by the signature + if (expandedArgs.size() < this->Args.size() - 1) + { + std::string errorMsg = + "Macro invoked with incorrect arguments for macro named: "; + errorMsg += this->Args[0]; + this->SetError(errorMsg.c_str()); + return false; + } + + // set the value of argc + cmOStringStream argcDefStream; + argcDefStream << expandedArgs.size(); + std::string argcDef = argcDefStream.str(); + + // declare varuiables for ARGV ARGN but do not compute until needed + std::string argvDef; + std::string argnDef; + bool argnDefInitialized = false; + bool argvDefInitialized = false; + + // Invoke all the functions that were collected in the block. + cmListFileFunction newLFF; + // for each function + for(unsigned int c = 0; c < this->Functions.size(); ++c) + { + // Replace the formal arguments and then invoke the command. + newLFF.Arguments.clear(); + newLFF.Arguments.reserve(this->Functions[c].Arguments.size()); + newLFF.Name = this->Functions[c].Name; + newLFF.FilePath = this->Functions[c].FilePath; + newLFF.Line = this->Functions[c].Line; + const char* def = this->Makefile->GetDefinition + ("CMAKE_MACRO_REPORT_DEFINITION_LOCATION"); + bool macroReportLocation = false; + if(def && !cmSystemTools::IsOff(def)) + { + macroReportLocation = true; + } + + // for each argument of the current function + for (std::vector::const_iterator k = + this->Functions[c].Arguments.begin(); + k != this->Functions[c].Arguments.end(); ++k) + { + tmps = k->Value; + // replace formal arguments + for (unsigned int j = 1; j < this->Args.size(); ++j) + { + variable = "${"; + variable += this->Args[j]; + variable += "}"; + cmSystemTools::ReplaceString(tmps, variable.c_str(), + expandedArgs[j-1].c_str()); + } + // replace argc + cmSystemTools::ReplaceString(tmps, "${ARGC}",argcDef.c_str()); + + // repleace ARGN + if (tmps.find("${ARGN}") != std::string::npos) + { + if (!argnDefInitialized) + { + std::vector::const_iterator eit; + std::vector::size_type cnt = 0; + for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit ) + { + if ( cnt >= this->Args.size()-1 ) + { + if ( argnDef.size() > 0 ) + { + argnDef += ";"; + } + argnDef += *eit; + } + cnt ++; + } + argnDefInitialized = true; + } + cmSystemTools::ReplaceString(tmps, "${ARGN}", argnDef.c_str()); + } + + // if the current argument of the current function has ${ARGV in it + // then try replacing ARGV values + if (tmps.find("${ARGV") != std::string::npos) + { + char argvName[60]; + + // repleace ARGV, compute it only once + if (!argvDefInitialized) + { + std::vector::const_iterator eit; + for ( eit = expandedArgs.begin(); eit != expandedArgs.end(); ++eit ) + { + if ( argvDef.size() > 0 ) + { + argvDef += ";"; + } + argvDef += *eit; + } + argvDefInitialized = true; + } + cmSystemTools::ReplaceString(tmps, "${ARGV}", argvDef.c_str()); + + // also replace the ARGV1 ARGV2 ... etc + for (unsigned int t = 0; t < expandedArgs.size(); ++t) + { + sprintf(argvName,"${ARGV%i}",t); + cmSystemTools::ReplaceString(tmps, argvName, + expandedArgs[t].c_str()); + } + } + + arg.Value = tmps; + arg.Quoted = k->Quoted; + if(macroReportLocation) + { + // Report the location of the argument where the macro was + // defined. + arg.FilePath = k->FilePath; + arg.Line = k->Line; + } + else + { + // Report the location of the argument where the macro was + // invoked. + if (args.size()) + { + arg.FilePath = args[0].FilePath; + arg.Line = args[0].Line; + } + else + { + arg.FilePath = "Unknown"; + arg.Line = 0; + } + } + newLFF.Arguments.push_back(arg); + } + cmExecutionStatus status; + if(!this->Makefile->ExecuteCommand(newLFF, status) || + status.GetNestedError()) + { + // The error message should have already included the call stack + // so we do not need to report an error here. + inStatus.SetNestedError(true); + return false; + } + if (status.GetReturnInvoked()) + { + inStatus.SetReturnInvoked(true); + return true; + } + if (status.GetBreakInvoked()) + { + inStatus.SetBreakInvoked(true); + return true; + } + } + return true; +} + +bool cmMacroFunctionBlocker:: +IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, + cmExecutionStatus &) +{ + // record commands until we hit the ENDMACRO + // at the ENDMACRO call we shift gears and start looking for invocations + if(!cmSystemTools::Strucmp(lff.Name.c_str(),"macro")) + { + this->Depth++; + } + else if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro")) + { + // if this is the endmacro for this macro then execute + if (!this->Depth) + { + std::string name = this->Args[0]; + std::vector::size_type cc; + name += "("; + for ( cc = 0; cc < this->Args.size(); cc ++ ) + { + name += " " + this->Args[cc]; + } + name += " )"; + mf.AddMacro(this->Args[0].c_str(), name.c_str()); + // create a new command and add it to cmake + cmMacroHelperCommand *f = new cmMacroHelperCommand(); + f->Args = this->Args; + f->Functions = this->Functions; + std::string newName = "_" + this->Args[0]; + mf.GetCMakeInstance()->RenameCommand(this->Args[0].c_str(), + newName.c_str()); + mf.AddCommand(f); + + // remove the function blocker now that the macro is defined + mf.RemoveFunctionBlocker(lff); + return true; + } + else + { + // decrement for each nested macro that ends + this->Depth--; + } + } + + // if it wasn't an endmacro and we are not executing then we must be + // recording + this->Functions.push_back(lff); + return true; +} + + +bool cmMacroFunctionBlocker:: +ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf) +{ + if(!cmSystemTools::Strucmp(lff.Name.c_str(),"endmacro")) + { + std::vector expandedArguments; + mf.ExpandArguments(lff.Arguments, expandedArguments); + // if the endmacro has arguments make sure they + // match the arguments of the macro + if ((expandedArguments.empty() || + (expandedArguments[0] == this->Args[0]))) + { + return true; + } + } + + return false; +} + +void cmMacroFunctionBlocker:: +ScopeEnded(cmMakefile &mf) +{ + // macros should end with an EndMacro + cmSystemTools::Error( + "The end of a CMakeLists file was reached with a MACRO statement that " + "was not closed properly. Within the directory: ", + mf.GetCurrentDirectory(), " with macro ", + this->Args[0].c_str()); +} + +bool cmMacroCommand::InitialPass(std::vector const& args, + cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // create a function blocker + cmMacroFunctionBlocker *f = new cmMacroFunctionBlocker(); + for(std::vector::const_iterator j = args.begin(); + j != args.end(); ++j) + { + f->Args.push_back(*j); + } + this->Makefile->AddFunctionBlocker(f); + return true; +} + diff --git a/Source/cmMacroCommand.h b/Source/cmMacroCommand.h new file mode 100644 index 000000000..eac10e07d --- /dev/null +++ b/Source/cmMacroCommand.h @@ -0,0 +1,122 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMacroCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMacroCommand_h +#define cmMacroCommand_h + +#include "cmCommand.h" +#include "cmFunctionBlocker.h" + +/** \class cmMacroFunctionBlocker + * \brief subclass of function blocker + * + * + */ +class cmMacroFunctionBlocker : public cmFunctionBlocker +{ +public: + cmMacroFunctionBlocker() {this->Depth=0;} + virtual ~cmMacroFunctionBlocker() {} + virtual bool IsFunctionBlocked(const cmListFileFunction&, + cmMakefile &mf, + cmExecutionStatus &); + virtual bool ShouldRemove(const cmListFileFunction&, cmMakefile &mf); + virtual void ScopeEnded(cmMakefile &mf); + + std::vector Args; + std::vector Functions; + int Depth; +}; + +/** \class cmMacroCommand + * \brief starts an if block + * + * cmMacroCommand starts an if block + */ +class cmMacroCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmMacroCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "macro";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Start recording a macro for later invocation as a command."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " macro( [arg1 [arg2 [arg3 ...]]])\n" + " COMMAND1(ARGS ...)\n" + " COMMAND2(ARGS ...)\n" + " ...\n" + " endmacro()\n" + "Define a macro named that takes arguments named " + "arg1 arg2 arg3 (...). Commands listed after macro, " + "but before the matching endmacro, are not invoked until the macro " + "is invoked. When it is invoked, the commands recorded in the " + "macro are first modified by replacing formal parameters (${arg1}) " + "with the arguments passed, and then invoked as normal commands. In " + "addition to referencing the formal parameters you can reference " + "the values ${ARGC} which will be set to the number of arguments " + "passed into the function as well as ${ARGV0} ${ARGV1} ${ARGV2} " + "... which " + "will have the actual values of the arguments passed in. This " + "facilitates creating macros with optional arguments. Additionally " + "${ARGV} holds the list of all arguments given to the macro and " + "${ARGN} " + "holds the list of argument pass the last expected argument. " + "Note that the parameters to a macro and values such as ARGN " + "are not variables in the usual CMake sense. They are string " + "replacements much like the c preprocessor would do with a " + "macro. If you want true CMake variables you should look at " + "the function command."; + } + + cmTypeMacro(cmMacroCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmMakeDepend.cxx b/Source/cmMakeDepend.cxx new file mode 100644 index 000000000..edf3cf07c --- /dev/null +++ b/Source/cmMakeDepend.cxx @@ -0,0 +1,398 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakeDepend.cxx,v $ + Language: C++ + Date: $Date: 2007-12-15 01:31:27 $ + Version: $Revision: 1.46 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakeDepend.h" +#include "cmSystemTools.h" + +#include + +void cmDependInformation::AddDependencies(cmDependInformation* info) +{ + if(this != info) + { + this->DependencySet.insert(info); + } +} + +cmMakeDepend::cmMakeDepend() +{ + this->Verbose = false; + this->IncludeFileRegularExpression.compile("^.*$"); + this->ComplainFileRegularExpression.compile("^$"); +} + + +cmMakeDepend::~cmMakeDepend() +{ + for(DependInformationMapType::iterator i = + this->DependInformationMap.begin(); + i != this->DependInformationMap.end(); ++i) + { + delete i->second; + } +} + + +// Set the makefile that depends will be made from. +// The pointer is kept so the cmSourceFile array can +// be updated with the depend information in the cmMakefile. + +void cmMakeDepend::SetMakefile(cmMakefile* makefile) +{ + this->Makefile = makefile; + + // Now extract the include file regular expression from the makefile. + this->IncludeFileRegularExpression.compile( + this->Makefile->IncludeFileRegularExpression.c_str()); + this->ComplainFileRegularExpression.compile( + this->Makefile->ComplainFileRegularExpression.c_str()); + + // Now extract any include paths from the makefile flags + const std::vector& includes = + this->Makefile->GetIncludeDirectories(); + for(std::vector::const_iterator j = includes.begin(); + j != includes.end(); ++j) + { + std::string path = *j; + this->Makefile->ExpandVariablesInString(path); + this->AddSearchPath(path.c_str()); + } +} + + +const cmDependInformation* cmMakeDepend::FindDependencies(const char* file) +{ + cmDependInformation* info = this->GetDependInformation(file,0); + this->GenerateDependInformation(info); + return info; +} + +void cmMakeDepend::GenerateDependInformation(cmDependInformation* info) +{ + // If dependencies are already done, stop now. + if(info->DependDone) + { + return; + } + else + { + // Make sure we don't visit the same file more than once. + info->DependDone = true; + } + const char* path = info->FullPath.c_str(); + if(!path) + { + cmSystemTools::Error( + "Attempt to find dependencies for file without path!"); + return; + } + + bool found = false; + + // If the file exists, use it to find dependency information. + if(cmSystemTools::FileExists(path, true)) + { + // Use the real file to find its dependencies. + this->DependWalk(info); + found = true; + } + + + // See if the cmSourceFile for it has any files specified as + // dependency hints. + if(info->SourceFile != 0) + { + + // Get the cmSourceFile corresponding to this. + const cmSourceFile& cFile = *(info->SourceFile); + // See if there are any hints for finding dependencies for the missing + // file. + if(!cFile.GetDepends().empty()) + { + // Dependency hints have been given. Use them to begin the + // recursion. + for(std::vector::const_iterator file = + cFile.GetDepends().begin(); file != cFile.GetDepends().end(); + ++file) + { + this->AddDependency(info, file->c_str()); + } + + // Found dependency information. We are done. + found = true; + } + } + + if(!found) + { + // Try to find the file amongst the sources + cmSourceFile *srcFile = this->Makefile->GetSource + (cmSystemTools::GetFilenameWithoutExtension(path).c_str()); + if (srcFile) + { + if (srcFile->GetFullPath() == path) + { + found=true; + } + else + { + //try to guess which include path to use + for(std::vector::iterator t = + this->IncludeDirectories.begin(); + t != this->IncludeDirectories.end(); ++t) + { + std::string incpath = *t; + if (incpath.size() && incpath[incpath.size() - 1] != '/') + { + incpath = incpath + "/"; + } + incpath = incpath + path; + if (srcFile->GetFullPath() == incpath) + { + // set the path to the guessed path + info->FullPath = incpath; + found=true; + } + } + } + } + } + + if(!found) + { + // Couldn't find any dependency information. + if(this->ComplainFileRegularExpression.find(info->IncludeName.c_str())) + { + cmSystemTools::Error("error cannot find dependencies for ", path); + } + else + { + // Destroy the name of the file so that it won't be output as a + // dependency. + info->FullPath = ""; + } + } +} + +// This function actually reads the file specified and scans it for +// #include directives +void cmMakeDepend::DependWalk(cmDependInformation* info) +{ + cmsys::RegularExpression includeLine + ("^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]+)[\">]"); + std::ifstream fin(info->FullPath.c_str()); + if(!fin) + { + cmSystemTools::Error("Cannot open ", info->FullPath.c_str()); + return; + } + + // TODO: Write real read loop (see cmSystemTools::CopyFile). + std::string line; + while( cmSystemTools::GetLineFromStream(fin, line) ) + { + if(includeLine.find(line.c_str())) + { + // extract the file being included + std::string includeFile = includeLine.match(1); + // see if the include matches the regular expression + if(!this->IncludeFileRegularExpression.find(includeFile)) + { + if(this->Verbose) + { + std::string message = "Skipping "; + message += includeFile; + message += " for file "; + message += info->FullPath.c_str(); + cmSystemTools::Error(message.c_str(), 0); + } + continue; + } + + // Add this file and all its dependencies. + this->AddDependency(info, includeFile.c_str()); + } + } +} + + +void cmMakeDepend::AddDependency(cmDependInformation* info, const char* file) +{ + cmDependInformation* dependInfo = + this->GetDependInformation(file, info->PathOnly.c_str()); + this->GenerateDependInformation(dependInfo); + info->AddDependencies(dependInfo); +} + +cmDependInformation* cmMakeDepend::GetDependInformation(const char* file, + const char *extraPath) +{ + // Get the full path for the file so that lookup is unambiguous. + std::string fullPath = this->FullPath(file, extraPath); + + // Try to find the file's instance of cmDependInformation. + DependInformationMapType::const_iterator result = + this->DependInformationMap.find(fullPath); + if(result != this->DependInformationMap.end()) + { + // Found an instance, return it. + return result->second; + } + else + { + // Didn't find an instance. Create a new one and save it. + cmDependInformation* info = new cmDependInformation; + info->FullPath = fullPath; + info->PathOnly = cmSystemTools::GetFilenamePath(fullPath.c_str()); + info->IncludeName = file; + this->DependInformationMap[fullPath] = info; + return info; + } +} + + +void cmMakeDepend::GenerateMakefileDependencies() +{ + // Now create cmDependInformation objects for files in the directory + cmTargets &tgts = this->Makefile->GetTargets(); + for(cmTargets::iterator l = tgts.begin(); + l != tgts.end(); l++) + { + const std::vector &classes = l->second.GetSourceFiles(); + for(std::vector::const_iterator i = classes.begin(); + i != classes.end(); ++i) + { + if(!(*i)->GetPropertyAsBool("HEADER_FILE_ONLY")) + { + cmDependInformation* info = + this->GetDependInformation((*i)->GetFullPath().c_str(),0); + this->AddFileToSearchPath(info->FullPath.c_str()); + info->SourceFile = *i; + this->GenerateDependInformation(info); + } + } + } +} + + +// find the full path to fname by searching the this->IncludeDirectories array +std::string cmMakeDepend::FullPath(const char* fname, const char *extraPath) +{ + DirectoryToFileToPathMapType::iterator m; + if(extraPath) + { + m = this->DirectoryToFileToPathMap.find(extraPath); + } + else + { + m = this->DirectoryToFileToPathMap.find(""); + } + + if(m != this->DirectoryToFileToPathMap.end()) + { + FileToPathMapType& map = m->second; + FileToPathMapType::iterator p = map.find(fname); + if(p != map.end()) + { + return p->second; + } + } + + if(cmSystemTools::FileExists(fname, true)) + { + std::string fp = cmSystemTools::CollapseFullPath(fname); + this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp; + return fp; + } + + for(std::vector::iterator i = this->IncludeDirectories.begin(); + i != this->IncludeDirectories.end(); ++i) + { + std::string path = *i; + if (path.size() && path[path.size() - 1] != '/') + { + path = path + "/"; + } + path = path + fname; + if(cmSystemTools::FileExists(path.c_str(), true) + && !cmSystemTools::FileIsDirectory(path.c_str())) + { + std::string fp = cmSystemTools::CollapseFullPath(path.c_str()); + this->DirectoryToFileToPathMap[extraPath? extraPath: ""][fname] = fp; + return fp; + } + } + + if (extraPath) + { + std::string path = extraPath; + if (path.size() && path[path.size() - 1] != '/') + { + path = path + "/"; + } + path = path + fname; + if(cmSystemTools::FileExists(path.c_str(), true) + && !cmSystemTools::FileIsDirectory(path.c_str())) + { + std::string fp = cmSystemTools::CollapseFullPath(path.c_str()); + this->DirectoryToFileToPathMap[extraPath][fname] = fp; + return fp; + } + } + + // Couldn't find the file. + return std::string(fname); +} + +// Add a directory to the search path +void cmMakeDepend::AddSearchPath(const char* path) +{ + this->IncludeDirectories.push_back(path); +} + +// Add a directory to the search path +void cmMakeDepend::AddFileToSearchPath(const char* file) +{ + std::string filepath = file; + std::string::size_type pos = filepath.rfind('/'); + if(pos != std::string::npos) + { + std::string path = filepath.substr(0, pos); + if(std::find(this->IncludeDirectories.begin(), + this->IncludeDirectories.end(), path) + == this->IncludeDirectories.end()) + { + this->IncludeDirectories.push_back(path); + return; + } + } +} + +const cmDependInformation* +cmMakeDepend::GetDependInformationForSourceFile(const cmSourceFile &sf) const +{ + for(DependInformationMapType::const_iterator i = + this->DependInformationMap.begin(); + i != this->DependInformationMap.end(); ++i) + { + const cmDependInformation* info = i->second; + if(info->SourceFile == &sf) + { + return info; + } + } + return 0; +} diff --git a/Source/cmMakeDepend.h b/Source/cmMakeDepend.h new file mode 100644 index 000000000..146a2da86 --- /dev/null +++ b/Source/cmMakeDepend.h @@ -0,0 +1,172 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakeDepend.h,v $ + Language: C++ + Date: $Date: 2006-05-12 16:29:09 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakeDepend_h +#define cmMakeDepend_h + +#include "cmMakefile.h" +#include "cmSourceFile.h" + +#include + +/** \class cmDependInformation + * \brief Store dependency information for a single source file. + * + * This structure stores the depend information for a single source file. + */ +class cmDependInformation +{ +public: + /** + * Construct with dependency generation marked not done; instance + * not placed in cmMakefile's list. + */ + cmDependInformation(): DependDone(false), SourceFile(0) {} + + /** + * The set of files on which this one depends. + */ + typedef std::set DependencySetType; + DependencySetType DependencySet; + + /** + * This flag indicates whether dependency checking has been + * performed for this file. + */ + bool DependDone; + + /** + * If this object corresponds to a cmSourceFile instance, this points + * to it. + */ + const cmSourceFile *SourceFile; + + /** + * Full path to this file. + */ + std::string FullPath; + + /** + * Full path not including file name. + */ + std::string PathOnly; + + /** + * Name used to #include this file. + */ + std::string IncludeName; + + /** + * This method adds the dependencies of another file to this one. + */ + void AddDependencies(cmDependInformation*); +}; + + +// cmMakeDepend is used to generate dependancy information for +// the classes in a makefile +class cmMakeDepend +{ +public: + /** + * Construct the object with verbose turned off. + */ + cmMakeDepend(); + + /** + * Destructor. + */ + virtual ~cmMakeDepend(); + + /** + * Set the makefile that is used as a source of classes. + */ + virtual void SetMakefile(cmMakefile* makefile); + + /** + * Get the depend info struct for a source file + */ + const cmDependInformation + *GetDependInformationForSourceFile(const cmSourceFile &sf) const; + + /** + * Add a directory to the search path for include files. + */ + virtual void AddSearchPath(const char*); + + /** + * Generate dependencies for all the sources of all the targets + * in the makefile. + */ + void GenerateMakefileDependencies(); + + /** + * Generate dependencies for the file given. Returns a pointer to + * the cmDependInformation object for the file. + */ + const cmDependInformation* FindDependencies(const char* file); + +protected: + /** + * Add a source file to the search path. + */ + void AddFileToSearchPath(const char* filepath); + + /** + * Compute the depend information for this class. + */ + virtual void DependWalk(cmDependInformation* info); + + /** + * Add a dependency. Possibly walk it for more dependencies. + */ + virtual void AddDependency(cmDependInformation* info, const char* file); + + /** + * Fill in the given object with dependency information. If the + * information is already complete, nothing is done. + */ + void GenerateDependInformation(cmDependInformation* info); + + /** + * Get an instance of cmDependInformation corresponding to the given file + * name. + */ + cmDependInformation* GetDependInformation(const char* file, + const char *extraPath); + + /** + * Find the full path name for the given file name. + * This uses the include directories. + * TODO: Cache path conversions to reduce FileExists calls. + */ + std::string FullPath(const char *filename, const char *extraPath); + + cmMakefile* Makefile; + bool Verbose; + cmsys::RegularExpression IncludeFileRegularExpression; + cmsys::RegularExpression ComplainFileRegularExpression; + std::vector IncludeDirectories; + typedef std::map FileToPathMapType; + typedef std::map + DirectoryToFileToPathMapType; + typedef std::map + DependInformationMapType; + DependInformationMapType DependInformationMap; + DirectoryToFileToPathMapType DirectoryToFileToPathMap; +}; + +#endif diff --git a/Source/cmMakeDirectoryCommand.cxx b/Source/cmMakeDirectoryCommand.cxx new file mode 100644 index 000000000..45bf420e6 --- /dev/null +++ b/Source/cmMakeDirectoryCommand.cxx @@ -0,0 +1,39 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakeDirectoryCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.10 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakeDirectoryCommand.h" + +// cmMakeDirectoryCommand +bool cmMakeDirectoryCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + if ( !this->Makefile->CanIWriteThisFile(args[0].c_str()) ) + { + std::string e = "attempted to create a directory: " + args[0] + + " into a source directory."; + this->SetError(e.c_str()); + cmSystemTools::SetFatalErrorOccured(); + return false; + } + cmSystemTools::MakeDirectory(args[0].c_str()); + return true; +} + diff --git a/Source/cmMakeDirectoryCommand.h b/Source/cmMakeDirectoryCommand.h new file mode 100644 index 000000000..26ce7db9d --- /dev/null +++ b/Source/cmMakeDirectoryCommand.h @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakeDirectoryCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.13 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakeDirectoryCommand_h +#define cmMakeDirectoryCommand_h + +#include "cmCommand.h" + +/** \class cmMakeDirectoryCommand + * \brief Specify auxiliary source code directories. + * + * cmMakeDirectoryCommand specifies source code directories + * that must be built as part of this build process. This directories + * are not recursively processed like the SUBDIR command (cmSubdirCommand). + * A side effect of this command is to create a subdirectory in the build + * directory structure. + */ +class cmMakeDirectoryCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmMakeDirectoryCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "make_directory";} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the file(MAKE_DIRECTORY ) command instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " make_directory(directory)\n" + "Creates the specified directory. Full paths should be given. Any " + "parent directories that do not exist will also be created. Use with " + "care."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmMakeDirectoryCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx new file mode 100644 index 000000000..c5048183c --- /dev/null +++ b/Source/cmMakefile.cxx @@ -0,0 +1,3467 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefile.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:39 $ + Version: $Revision: 1.463.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakefile.h" +#include "cmVersion.h" +#include "cmCommand.h" +#include "cmSourceFile.h" +#include "cmSourceFileLocation.h" +#include "cmSystemTools.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmCommands.h" +#include "cmCacheManager.h" +#include "cmFunctionBlocker.h" +#include "cmListFileCache.h" +#include "cmCommandArgumentParserHelper.h" +#include "cmTest.h" +#ifdef CMAKE_BUILD_WITH_CMAKE +# include "cmVariableWatch.h" +#endif +#include "cmInstallGenerator.h" +#include "cmake.h" +#include // required for atoi + +#include + +#include + +#include // for isspace + +// default is not to be building executables +cmMakefile::cmMakefile() +{ + this->DefinitionStack.push_back(DefinitionMap()); + + // Setup the default include file regular expression (match everything). + this->IncludeFileRegularExpression = "^.*$"; + // Setup the default include complaint regular expression (match nothing). + this->ComplainFileRegularExpression = "^$"; + // Source and header file extensions that we can handle + + // Set up a list of source and header extensions + // these are used to find files when the extension + // is not given + // The "c" extension MUST precede the "C" extension. + this->SourceFileExtensions.push_back( "c" ); + this->SourceFileExtensions.push_back( "C" ); + + this->SourceFileExtensions.push_back( "c++" ); + this->SourceFileExtensions.push_back( "cc" ); + this->SourceFileExtensions.push_back( "cpp" ); + this->SourceFileExtensions.push_back( "cxx" ); + this->SourceFileExtensions.push_back( "m" ); + this->SourceFileExtensions.push_back( "M" ); + this->SourceFileExtensions.push_back( "mm" ); + + this->HeaderFileExtensions.push_back( "h" ); + this->HeaderFileExtensions.push_back( "hh" ); + this->HeaderFileExtensions.push_back( "h++" ); + this->HeaderFileExtensions.push_back( "hm" ); + this->HeaderFileExtensions.push_back( "hpp" ); + this->HeaderFileExtensions.push_back( "hxx" ); + this->HeaderFileExtensions.push_back( "in" ); + this->HeaderFileExtensions.push_back( "txx" ); + + this->DefineFlags = " "; + this->LocalGenerator = 0; + +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->AddSourceGroup("", "^.*$"); + this->AddSourceGroup + ("Source Files", + "\\.(C|M|c|c\\+\\+|cc|cpp|cxx|f|f90|for|fpp|ftn|m|mm|rc|def|r|odl|idl|hpj|bat)$"); + this->AddSourceGroup("Header Files", + "\\.(h|hh|h\\+\\+|hm|hpp|hxx|in|txx|inl)$"); + this->AddSourceGroup("CMake Rules", "\\.rule$"); + this->AddSourceGroup("Resources", "\\.plist$"); +#endif + this->AddDefaultDefinitions(); + this->Initialize(); + this->PreOrder = false; +} + +cmMakefile::cmMakefile(const cmMakefile& mf) +{ + this->Prefix = mf.Prefix; + this->AuxSourceDirectories = mf.AuxSourceDirectories; + this->cmStartDirectory = mf.cmStartDirectory; + this->StartOutputDirectory = mf.StartOutputDirectory; + this->cmHomeDirectory = mf.cmHomeDirectory; + this->HomeOutputDirectory = mf.HomeOutputDirectory; + this->cmCurrentListFile = mf.cmCurrentListFile; + this->ProjectName = mf.ProjectName; + this->Targets = mf.Targets; + this->SourceFiles = mf.SourceFiles; + this->Tests = mf.Tests; + this->IncludeDirectories = mf.IncludeDirectories; + this->LinkDirectories = mf.LinkDirectories; + this->SystemIncludeDirectories = mf.SystemIncludeDirectories; + this->ListFiles = mf.ListFiles; + this->OutputFiles = mf.OutputFiles; + this->LinkLibraries = mf.LinkLibraries; + this->InstallGenerators = mf.InstallGenerators; + this->IncludeFileRegularExpression = mf.IncludeFileRegularExpression; + this->ComplainFileRegularExpression = mf.ComplainFileRegularExpression; + this->SourceFileExtensions = mf.SourceFileExtensions; + this->HeaderFileExtensions = mf.HeaderFileExtensions; + this->DefineFlags = mf.DefineFlags; + +#if defined(CMAKE_BUILD_WITH_CMAKE) + this->SourceGroups = mf.SourceGroups; +#endif + + this->DefinitionStack.push_back(mf.DefinitionStack.back()); + this->LocalGenerator = mf.LocalGenerator; + this->FunctionBlockers = mf.FunctionBlockers; + this->DataMap = mf.DataMap; + this->MacrosMap = mf.MacrosMap; + this->SubDirectoryOrder = mf.SubDirectoryOrder; + this->TemporaryDefinitionKey = mf.TemporaryDefinitionKey; + this->Properties = mf.Properties; + this->PreOrder = mf.PreOrder; + this->ListFileStack = mf.ListFileStack; + this->Initialize(); +} + +//---------------------------------------------------------------------------- +void cmMakefile::Initialize() +{ + this->cmDefineRegex.compile("#cmakedefine[ \t]+([A-Za-z_0-9]*)"); + this->cmDefine01Regex.compile("#cmakedefine01[ \t]+([A-Za-z_0-9]*)"); + this->cmAtVarRegex.compile("(@[A-Za-z_0-9/.+-]+@)"); + + // Enter a policy level for this directory. + this->PushPolicy(); + + // By default the check is not done. It is enabled by + // cmListFileCache in the top level if necessary. + this->CheckCMP0000 = false; +} + +unsigned int cmMakefile::GetCacheMajorVersion() +{ + return this->GetCacheManager()->GetCacheMajorVersion(); +} + +unsigned int cmMakefile::GetCacheMinorVersion() +{ + return this->GetCacheManager()->GetCacheMinorVersion(); +} + +bool cmMakefile::NeedCacheCompatibility(int major, int minor) +{ + return this->GetCacheManager()->NeedCacheCompatibility(major, minor); +} + +cmMakefile::~cmMakefile() +{ + for(std::vector::iterator + i = this->InstallGenerators.begin(); + i != this->InstallGenerators.end(); ++i) + { + delete *i; + } + for(std::vector::iterator i = this->SourceFiles.begin(); + i != this->SourceFiles.end(); ++i) + { + delete *i; + } + for(std::vector::iterator i = this->Tests.begin(); + i != this->Tests.end(); ++i) + { + delete *i; + } + for(std::vector::iterator + i = this->ImportedTargetsOwned.begin(); + i != this->ImportedTargetsOwned.end(); ++i) + { + delete *i; + } + for(unsigned int i=0; i < this->UsedCommands.size(); i++) + { + delete this->UsedCommands[i]; + } + for(DataMapType::const_iterator d = this->DataMap.begin(); + d != this->DataMap.end(); ++d) + { + if(d->second) + { + delete d->second; + } + } + std::list::iterator pos; + for (pos = this->FunctionBlockers.begin(); + pos != this->FunctionBlockers.end(); ++pos) + { + cmFunctionBlocker* b = *pos; + delete b; + } + this->FunctionBlockers.clear(); + if (this->PolicyStack.size() != 1) + { + cmSystemTools::Error("Internal CMake Error, Policy Stack has not been" + " popped properly"); + } +} + +void cmMakefile::PrintStringVector(const char* s, + const std::vector& v) const +{ + std::cout << s << ": ( \n"; + for(std::vector::const_iterator i = v.begin(); + i != v.end(); ++i) + { + std::cout << (*i).c_str() << " "; + } + std::cout << " )\n"; +} + +void cmMakefile +::PrintStringVector(const char* s, + const std::vector >& v) const +{ + std::cout << s << ": ( \n"; + for(std::vector >::const_iterator i + = v.begin(); i != v.end(); ++i) + { + std::cout << i->first.c_str() << " " << i->second; + } + std::cout << " )\n"; +} + + +// call print on all the classes in the makefile +void cmMakefile::Print() +{ + // print the class lists + std::cout << "classes:\n"; + + std::cout << " this->Targets: "; + for (cmTargets::iterator l = this->Targets.begin(); + l != this->Targets.end(); l++) + { + std::cout << l->first << std::endl; + } + + std::cout << " this->StartOutputDirectory; " << + this->StartOutputDirectory.c_str() << std::endl; + std::cout << " this->HomeOutputDirectory; " << + this->HomeOutputDirectory.c_str() << std::endl; + std::cout << " this->cmStartDirectory; " << + this->cmStartDirectory.c_str() << std::endl; + std::cout << " this->cmHomeDirectory; " << + this->cmHomeDirectory.c_str() << std::endl; + std::cout << " this->ProjectName; " + << this->ProjectName.c_str() << std::endl; + this->PrintStringVector("this->IncludeDirectories;", + this->IncludeDirectories); + this->PrintStringVector("this->LinkDirectories", this->LinkDirectories); +#if defined(CMAKE_BUILD_WITH_CMAKE) + for( std::vector::const_iterator i = + this->SourceGroups.begin(); i != this->SourceGroups.end(); ++i) + { + std::cout << "Source Group: " << i->GetName() << std::endl; + } +#endif +} + +bool cmMakefile::CommandExists(const char* name) const +{ + return this->GetCMakeInstance()->CommandExists(name); +} + + +//---------------------------------------------------------------------------- +void cmMakefile::IssueMessage(cmake::MessageType t, + std::string const& text) const +{ + // Collect context information. + cmListFileBacktrace backtrace; + if(!this->CallStack.empty()) + { + if((t == cmake::FATAL_ERROR) || (t == cmake::INTERNAL_ERROR)) + { + this->CallStack.back().Status->SetNestedError(true); + } + this->GetBacktrace(backtrace); + } + else + { + cmListFileContext lfc; + if(this->ListFileStack.empty()) + { + // We are not processing the project. Add the directory-level context. + lfc.FilePath = this->GetCurrentDirectory(); + lfc.FilePath += "/CMakeLists.txt"; + } + else + { + // We are processing the project but are not currently executing a + // command. Add whatever context information we have. + lfc.FilePath = this->ListFileStack.back(); + } + lfc.Line = 0; + if(!this->GetCMakeInstance()->GetIsInTryCompile()) + { + lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath.c_str(), + cmLocalGenerator::HOME); + } + backtrace.push_back(lfc); + } + + // Issue the message. + this->GetCMakeInstance()->IssueMessage(t, text, backtrace); +} + +//---------------------------------------------------------------------------- +bool cmMakefile::GetBacktrace(cmListFileBacktrace& backtrace) const +{ + if(this->CallStack.empty()) + { + return false; + } + for(CallStackType::const_reverse_iterator i = this->CallStack.rbegin(); + i != this->CallStack.rend(); ++i) + { + cmListFileContext lfc = *(*i).Context; + lfc.FilePath = this->LocalGenerator->Convert(lfc.FilePath.c_str(), + cmLocalGenerator::HOME); + backtrace.push_back(lfc); + } + return true; +} + +//---------------------------------------------------------------------------- +// Helper class to make sure the call stack is valid. +class cmMakefileCall +{ +public: + cmMakefileCall(cmMakefile* mf, + cmListFileContext const& lfc, + cmExecutionStatus& status): Makefile(mf) + { + cmMakefile::CallStackEntry entry = {&lfc, &status}; + this->Makefile->CallStack.push_back(entry); + } + ~cmMakefileCall() + { + this->Makefile->CallStack.pop_back(); + } +private: + cmMakefile* Makefile; +}; + +//---------------------------------------------------------------------------- +bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff, + cmExecutionStatus &status) +{ + bool result = true; + + // quick return if blocked + if(this->IsFunctionBlocked(lff,status)) + { + // No error. + return result; + } + + std::string name = lff.Name; + + // Place this call on the call stack. + cmMakefileCall stack_manager(this, lff, status); + static_cast(stack_manager); + + // Lookup the command prototype. + if(cmCommand* proto = this->GetCMakeInstance()->GetCommand(name.c_str())) + { + // Clone the prototype. + cmsys::auto_ptr pcmd(proto->Clone()); + pcmd->SetMakefile(this); + + // Decide whether to invoke the command. + if(pcmd->GetEnabled() && !cmSystemTools::GetFatalErrorOccured() && + (!this->GetCMakeInstance()->GetScriptMode() || pcmd->IsScriptable())) + { + // Try invoking the command. + if(!pcmd->InvokeInitialPass(lff.Arguments,status) || + status.GetNestedError()) + { + if(!status.GetNestedError()) + { + // The command invocation requested that we report an error. + this->IssueMessage(cmake::FATAL_ERROR, pcmd->GetError()); + } + result = false; + if ( this->GetCMakeInstance()->GetScriptMode() ) + { + cmSystemTools::SetFatalErrorOccured(); + } + } + else + { + // use the command + this->UsedCommands.push_back(pcmd.release()); + } + } + else if ( this->GetCMakeInstance()->GetScriptMode() + && !pcmd->IsScriptable() ) + { + std::string error = "Command "; + error += pcmd->GetName(); + error += "() is not scriptable"; + this->IssueMessage(cmake::FATAL_ERROR, error); + result = false; + cmSystemTools::SetFatalErrorOccured(); + } + } + else + { + if(!cmSystemTools::GetFatalErrorOccured()) + { + std::string error = "Unknown CMake command \""; + error += lff.Name; + error += "\"."; + this->IssueMessage(cmake::FATAL_ERROR, error); + result = false; + cmSystemTools::SetFatalErrorOccured(); + } + } + + return result; +} + +// Parse the given CMakeLists.txt file executing all commands +// +bool cmMakefile::ReadListFile(const char* filename_in, + const char *external_in, + std::string* fullPath) +{ + std::string currentParentFile + = this->GetSafeDefinition("CMAKE_PARENT_LIST_FILE"); + std::string currentFile + = this->GetSafeDefinition("CMAKE_CURRENT_LIST_FILE"); + this->AddDefinition("CMAKE_PARENT_LIST_FILE", filename_in); + + // used to watch for blockers going out of scope + // e.g. mismatched IF statement + std::set originalBlockers; + + const char* external = 0; + std::string external_abs; + + const char* filename = filename_in; + std::string filename_abs; + + if (external_in) + { + external_abs = + cmSystemTools::CollapseFullPath(external_in, + this->cmStartDirectory.c_str()); + external = external_abs.c_str(); + if (filename_in) + { + filename_abs = + cmSystemTools::CollapseFullPath(filename_in, + this->cmStartDirectory.c_str()); + filename = filename_abs.c_str(); + } + } + + // keep track of the current file being read + if (filename) + { + if(this->cmCurrentListFile != filename) + { + this->cmCurrentListFile = filename; + } + // loop over current function blockers and record them + std::list::iterator pos; + for (pos = this->FunctionBlockers.begin(); + pos != this->FunctionBlockers.end(); ++pos) + { + originalBlockers.insert(*pos); + } + } + + // Now read the input file + const char *filenametoread= filename; + + if( external) + { + filenametoread= external; + } + + this->AddDefinition("CMAKE_CURRENT_LIST_FILE", filenametoread); + + // try to see if the list file is the top most + // list file for a project, and if it is, then it + // must have a project command. If there is not + // one, then cmake will provide one via the + // cmListFileCache class. + bool requireProjectCommand = false; + if(!external && this->cmStartDirectory == this->cmHomeDirectory) + { + if(cmSystemTools::LowerCase( + cmSystemTools::GetFilenameName(filename)) == "cmakelists.txt") + { + requireProjectCommand = true; + } + } + + // push the listfile onto the stack + this->ListFileStack.push_back(filenametoread); + if(fullPath!=0) + { + *fullPath=filenametoread; + } + cmListFile cacheFile; + if( !cacheFile.ParseFile(filenametoread, requireProjectCommand, this) ) + { + // pop the listfile off the stack + this->ListFileStack.pop_back(); + if(fullPath!=0) + { + *fullPath = ""; + } + this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str()); + this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str()); + return false; + } + // add this list file to the list of dependencies + this->ListFiles.push_back( filenametoread); + bool endScopeNicely = filename? true: false; + const size_t numberFunctions = cacheFile.Functions.size(); + for(size_t i =0; i < numberFunctions; ++i) + { + cmExecutionStatus status; + this->ExecuteCommand(cacheFile.Functions[i],status); + if (status.GetReturnInvoked() || + cmSystemTools::GetFatalErrorOccured() ) + { + // Exit early from processing this file. + endScopeNicely = false; + break; + } + } + + // send scope ended to and function blockers + if (endScopeNicely) + { + // loop over all function blockers to see if any block this command + std::list::iterator pos; + for (pos = this->FunctionBlockers.begin(); + pos != this->FunctionBlockers.end(); ++pos) + { + // if this blocker was not in the original then send a + // scope ended message + if (originalBlockers.find(*pos) == originalBlockers.end()) + { + (*pos)->ScopeEnded(*this); + } + } + } + + // If this is the directory-level CMakeLists.txt file then perform + // some extra checks. + if(this->ListFileStack.size() == 1) + { + this->EnforceDirectoryLevelRules(endScopeNicely); + } + + this->AddDefinition("CMAKE_PARENT_LIST_FILE", currentParentFile.c_str()); + this->AddDefinition("CMAKE_CURRENT_LIST_FILE", currentFile.c_str()); + + // pop the listfile off the stack + this->ListFileStack.pop_back(); + + return true; +} + +//---------------------------------------------------------------------------- +void cmMakefile::EnforceDirectoryLevelRules(bool endScopeNicely) +{ + // Enforce policy stack depth. + while(this->PolicyStack.size() > 1) + { + if(endScopeNicely) + { + this->IssueMessage(cmake::FATAL_ERROR, + "cmake_policy PUSH without matching POP"); + } + this->PopPolicy(false); + } + + // Diagnose a violation of CMP0000 if necessary. + if(this->CheckCMP0000) + { + cmOStringStream msg; + msg << "No cmake_minimum_required command is present. " + << "A line of code such as\n" + << " cmake_minimum_required(VERSION " + << cmVersion::GetMajorVersion() << "." + << cmVersion::GetMinorVersion() + << ")\n" + << "should be added at the top of the file. " + << "The version specified may be lower if you wish to " + << "support older CMake versions for this project. " + << "For more information run " + << "\"cmake --help-policy CMP0000\"."; + switch (this->GetPolicyStatus(cmPolicies::CMP0000)) + { + case cmPolicies::WARN: + // Warn because the user did not provide a mimimum required + // version. + this->IssueMessage(cmake::AUTHOR_WARNING, msg.str().c_str()); + case cmPolicies::OLD: + // OLD behavior is to use policy version 2.4 set in + // cmListFileCache. + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + // NEW behavior is to issue an error. + this->IssueMessage(cmake::FATAL_ERROR, msg.str().c_str()); + cmSystemTools::SetFatalErrorOccured(); + return; + } + } +} + +void cmMakefile::AddCommand(cmCommand* wg) +{ + this->GetCMakeInstance()->AddCommand(wg); +} + +// Set the make file +void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg) +{ + this->LocalGenerator = lg; +} + +bool cmMakefile::NeedBackwardsCompatibility(unsigned int major, + unsigned int minor, + unsigned int patch) +{ + if(this->LocalGenerator) + { + return + this->LocalGenerator->NeedBackwardsCompatibility(major, minor, patch); + } + else + { + return false; + } +} + +void cmMakefile::FinalPass() +{ + // do all the variable expansions here + this->ExpandVariables(); + + // give all the commands a chance to do something + // after the file has been parsed before generation + for(std::vector::iterator i = this->UsedCommands.begin(); + i != this->UsedCommands.end(); ++i) + { + (*i)->FinalPass(); + } + +} + +// Generate the output file +void cmMakefile::ConfigureFinalPass() +{ + this->FinalPass(); + const char* oldValue + = this->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY"); + if (oldValue && atof(oldValue) <= 1.2) + { + cmSystemTools::Error("You have requested backwards compatibility " + "with CMake version 1.2 or earlier. This version " + "of CMake only supports backwards compatibility " + "with CMake 1.4 or later. For compatibility with " + "1.2 or earlier please use CMake 2.0"); + } + for (cmTargets::iterator l = this->Targets.begin(); + l != this->Targets.end(); l++) + { + l->second.AnalyzeLibDependencies(*this); + } +} + +//---------------------------------------------------------------------------- +void +cmMakefile::AddCustomCommandToTarget(const char* target, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + cmTarget::CustomCommandType type, + const char* comment, + const char* workingDir, + bool escapeOldStyle) +{ + // Find the target to which to add the custom command. + cmTargets::iterator ti = this->Targets.find(target); + if(ti != this->Targets.end()) + { + // Add the command to the appropriate build step for the target. + std::vector no_output; + cmCustomCommand cc(no_output, depends, commandLines, comment, workingDir); + cc.SetEscapeOldStyle(escapeOldStyle); + switch(type) + { + case cmTarget::PRE_BUILD: + ti->second.GetPreBuildCommands().push_back(cc); + break; + case cmTarget::PRE_LINK: + ti->second.GetPreLinkCommands().push_back(cc); + break; + case cmTarget::POST_BUILD: + ti->second.GetPostBuildCommands().push_back(cc); + break; + } + } +} + +//---------------------------------------------------------------------------- +void +cmMakefile::AddCustomCommandToOutput(const std::vector& outputs, + const std::vector& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, + const char* workingDir, + bool replace, + bool escapeOldStyle) +{ + // Make sure there is at least one output. + if(outputs.empty()) + { + cmSystemTools::Error("Attempt to add a custom rule with no output!"); + return; + } + + // Choose a source file on which to store the custom command. + cmSourceFile* file = 0; + if(main_dependency && main_dependency[0]) + { + // The main dependency was specified. Use it unless a different + // custom command already used it. + file = this->GetSource(main_dependency); + if(file && file->GetCustomCommand() && !replace) + { + // The main dependency already has a custom command. + if(commandLines == file->GetCustomCommand()->GetCommandLines()) + { + // The existing custom command is identical. Silently ignore + // the duplicate. + return; + } + else + { + // The existing custom command is different. We need to + // generate a rule file for this new command. + file = 0; + } + } + else + { + // The main dependency does not have a custom command or we are + // allowed to replace it. Use it to store the command. + file = this->GetOrCreateSource(main_dependency); + } + } + + // Generate a rule file if the main dependency is not available. + if(!file) + { + // Construct a rule file associated with the first output produced. + std::string outName = outputs[0]; + outName += ".rule"; + + // Check if the rule file already exists. + file = this->GetSource(outName.c_str()); + if(file && file->GetCustomCommand() && !replace) + { + // The rule file already exists. + if(commandLines != file->GetCustomCommand()->GetCommandLines()) + { + cmSystemTools::Error("Attempt to add a custom rule to output \"", + outName.c_str(), + "\" which already has a custom rule."); + } + return; + } + + // Create a cmSourceFile for the rule file. + file = this->GetOrCreateSource(outName.c_str(), true); + } + + // Always create the output sources and mark them generated. + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + if(cmSourceFile* out = this->GetOrCreateSource(o->c_str(), true)) + { + out->SetProperty("GENERATED", "1"); + } + } + + // Construct a complete list of dependencies. + std::vector depends2(depends); + if(main_dependency && main_dependency[0]) + { + depends2.push_back(main_dependency); + } + + // Attach the custom command to the file. + if(file) + { + cmCustomCommand* cc = + new cmCustomCommand(outputs, depends2, commandLines, + comment, workingDir); + cc->SetEscapeOldStyle(escapeOldStyle); + file->SetCustomCommand(cc); + } +} + +//---------------------------------------------------------------------------- +void +cmMakefile::AddCustomCommandToOutput(const char* output, + const std::vector& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, + const char* workingDir, + bool replace, + bool escapeOldStyle) +{ + std::vector outputs; + outputs.push_back(output); + this->AddCustomCommandToOutput(outputs, depends, main_dependency, + commandLines, comment, workingDir, + replace, escapeOldStyle); +} + +//---------------------------------------------------------------------------- +void +cmMakefile::AddCustomCommandOldStyle(const char* target, + const std::vector& outputs, + const std::vector& depends, + const char* source, + const cmCustomCommandLines& commandLines, + const char* comment) +{ + // Translate the old-style signature to one of the new-style + // signatures. + if(strcmp(source, target) == 0) + { + // In the old-style signature if the source and target were the + // same then it added a post-build rule to the target. Preserve + // this behavior. + this->AddCustomCommandToTarget(target, depends, commandLines, + cmTarget::POST_BUILD, comment, 0); + return; + } + + // Each output must get its own copy of this rule. + cmsys::RegularExpression sourceFiles("\\.(C|M|c|c\\+\\+|cc|cpp|cxx|m|mm|" + "rc|def|r|odl|idl|hpj|bat|h|h\\+\\+|" + "hm|hpp|hxx|in|txx|inl)$"); + for(std::vector::const_iterator oi = outputs.begin(); + oi != outputs.end(); ++oi) + { + // Get the name of this output. + const char* output = oi->c_str(); + + // Choose whether to use a main dependency. + if(sourceFiles.find(source)) + { + // The source looks like a real file. Use it as the main dependency. + this->AddCustomCommandToOutput(output, depends, source, + commandLines, comment, 0); + } + else + { + // The source may not be a real file. Do not use a main dependency. + const char* no_main_dependency = 0; + std::vector depends2 = depends; + depends2.push_back(source); + this->AddCustomCommandToOutput(output, depends2, no_main_dependency, + commandLines, comment, 0); + } + + // If the rule was added to the source (and not a .rule file), + // then add the source to the target to make sure the rule is + // included. + std::string sname = output; + sname += ".rule"; + if(!this->GetSource(sname.c_str())) + { + if (this->Targets.find(target) != this->Targets.end()) + { + this->Targets[target].AddSource(source); + } + else + { + cmSystemTools::Error("Attempt to add a custom rule to a target " + "that does not exist yet for target ", target); + return; + } + } + } +} + +//---------------------------------------------------------------------------- +void cmMakefile::AddUtilityCommand(const char* utilityName, + bool excludeFromAll, + const std::vector& depends, + const char* workingDirectory, + const char* command, + const char* arg1, + const char* arg2, + const char* arg3, + const char* arg4) +{ + // Construct the command line for the custom command. + cmCustomCommandLine commandLine; + commandLine.push_back(command); + if(arg1) + { + commandLine.push_back(arg1); + } + if(arg2) + { + commandLine.push_back(arg2); + } + if(arg3) + { + commandLine.push_back(arg3); + } + if(arg4) + { + commandLine.push_back(arg4); + } + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + // Call the real signature of this method. + this->AddUtilityCommand(utilityName, excludeFromAll, workingDirectory, + depends, commandLines); +} + +//---------------------------------------------------------------------------- +void cmMakefile::AddUtilityCommand(const char* utilityName, + bool excludeFromAll, + const char* workingDirectory, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + bool escapeOldStyle, const char* comment) +{ + // Create a target instance for this utility. + cmTarget* target = this->AddNewTarget(cmTarget::UTILITY, utilityName); + if (excludeFromAll) + { + target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } + if(!comment) + { + // Use an empty comment to avoid generation of default comment. + comment = ""; + } + + // Store the custom command in the target. + std::string force = this->GetStartOutputDirectory(); + force += cmake::GetCMakeFilesDirectory(); + force += "/"; + force += utilityName; + const char* no_main_dependency = 0; + bool no_replace = false; + this->AddCustomCommandToOutput(force.c_str(), depends, + no_main_dependency, + commandLines, comment, + workingDirectory, no_replace, + escapeOldStyle); + cmSourceFile* sf = target->AddSource(force.c_str()); + + // The output is not actually created so mark it symbolic. + if(sf) + { + sf->SetProperty("SYMBOLIC", "1"); + } + else + { + cmSystemTools::Error("Could not get source file entry for ", + force.c_str()); + } +} + +void cmMakefile::AddDefineFlag(const char* flag) +{ + if (!flag) + { + return; + } + + // If this is really a definition, update COMPILE_DEFINITIONS. + if(this->ParseDefineFlag(flag, false)) + { + return; + } + + // remove any \n\r + std::string ret = flag; + std::string::size_type pos = 0; + while((pos = ret.find('\n', pos)) != std::string::npos) + { + ret[pos] = ' '; + pos++; + } + pos = 0; + while((pos = ret.find('\r', pos)) != std::string::npos) + { + ret[pos] = ' '; + pos++; + } + + this->DefineFlags += " "; + this->DefineFlags += ret; +} + + +void cmMakefile::RemoveDefineFlag(const char* flag) +{ + // Check the length of the flag to remove. + std::string::size_type len = strlen(flag); + if(len < 1) + { + return; + } + + // If this is really a definition, update COMPILE_DEFINITIONS. + if(this->ParseDefineFlag(flag, true)) + { + return; + } + + // Remove all instances of the flag that are surrounded by + // whitespace or the beginning/end of the string. + for(std::string::size_type lpos = this->DefineFlags.find(flag, 0); + lpos != std::string::npos; lpos = this->DefineFlags.find(flag, lpos)) + { + std::string::size_type rpos = lpos + len; + if((lpos <= 0 || isspace(this->DefineFlags[lpos-1])) && + (rpos >= this->DefineFlags.size() || isspace(this->DefineFlags[rpos]))) + { + this->DefineFlags.erase(lpos, len); + } + else + { + ++lpos; + } + } +} + +bool cmMakefile::ParseDefineFlag(std::string const& def, bool remove) +{ + // Create a regular expression to match valid definitions. + static cmsys::RegularExpression + valid("^[-/]D[A-Za-z_][A-Za-z0-9_]*(=.*)?$"); + + // Make sure the definition matches. + if(!valid.find(def.c_str())) + { + return false; + } + + // VS6 IDE does not support definitions with values. + if((strcmp(this->LocalGenerator->GetGlobalGenerator()->GetName(), + "Visual Studio 6") == 0) && + (def.find("=") != def.npos)) + { + return false; + } + + // Definitions with non-trivial values require a policy check. + static cmsys::RegularExpression + trivial("^[-/]D[A-Za-z_][A-Za-z0-9_]*(=[A-Za-z0-9_.]+)?$"); + if(!trivial.find(def.c_str())) + { + // This definition has a non-trivial value. + switch(this->GetPolicyStatus(cmPolicies::CMP0005)) + { + case cmPolicies::WARN: + this->IssueMessage( + cmake::AUTHOR_WARNING, + this->GetPolicies()->GetPolicyWarning(cmPolicies::CMP0005) + ); + case cmPolicies::OLD: + // OLD behavior is to not escape the value. We should not + // convert the definition to use the property. + return false; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + this->IssueMessage( + cmake::FATAL_ERROR, + this->GetPolicies()->GetRequiredPolicyError(cmPolicies::CMP0005) + ); + return false; + case cmPolicies::NEW: + // NEW behavior is to escape the value. Proceed to convert it + // to an entry in the property. + break; + } + } + + // Get the definition part after the flag. + const char* define = def.c_str() + 2; + + if(remove) + { + if(const char* cdefs = this->GetProperty("COMPILE_DEFINITIONS")) + { + // Expand the list. + std::vector defs; + cmSystemTools::ExpandListArgument(cdefs, defs); + + // Recompose the list without the definition. + std::string ndefs; + const char* sep = ""; + for(std::vector::const_iterator di = defs.begin(); + di != defs.end(); ++di) + { + if(*di != define) + { + ndefs += sep; + sep = ";"; + ndefs += *di; + } + } + + // Store the new list. + this->SetProperty("COMPILE_DEFINITIONS", ndefs.c_str()); + } + } + else + { + // Append the definition to the directory property. + this->AppendProperty("COMPILE_DEFINITIONS", define); + } + + return true; +} + +void cmMakefile::AddLinkLibrary(const char* lib, + cmTarget::LinkLibraryType llt) +{ + cmTarget::LibraryID tmp; + tmp.first = lib; + tmp.second = llt; + this->LinkLibraries.push_back(tmp); +} + +void cmMakefile::AddLinkLibraryForTarget(const char *target, + const char* lib, + cmTarget::LinkLibraryType llt) +{ + cmTargets::iterator i = this->Targets.find(target); + if ( i != this->Targets.end()) + { + cmTarget* tgt = + this->GetCMakeInstance()->GetGlobalGenerator()->FindTarget(0,lib); + if(tgt) + { + // CMake versions below 2.4 allowed linking to modules. + bool allowModules = this->NeedBackwardsCompatibility(2,3); + // if it is not a static or shared library then you can not link to it + if(!((tgt->GetType() == cmTarget::STATIC_LIBRARY) || + (tgt->GetType() == cmTarget::SHARED_LIBRARY) || + tgt->IsExecutableWithExports())) + { + cmOStringStream e; + e << "Attempt to add link target " << lib << " of type: " + << cmTarget::TargetTypeNames[static_cast(tgt->GetType())] + << "\nto target " << target + << ". One can only link to STATIC or SHARED libraries, or " + << "to executables with the ENABLE_EXPORTS property set."; + // in older versions of cmake linking to modules was allowed + if( tgt->GetType() == cmTarget::MODULE_LIBRARY ) + { + e << + "\nTo allow linking of modules set " + "CMAKE_BACKWARDS_COMPATIBILITY to 2.2 or lower\n"; + } + // if no modules are allowed then this is always an error + if(!allowModules || + // if we allow modules but the type is not a module then it is + // still an error + (allowModules && tgt->GetType() != cmTarget::MODULE_LIBRARY)) + { + cmSystemTools::Error(e.str().c_str()); + } + } + } + i->second.AddLinkLibrary( *this, target, lib, llt ); + } + else + { + cmOStringStream e; + e << "Attempt to add link library \"" + << lib << "\" to target \"" + << target << "\" which is not built by this project."; + cmSystemTools::Error(e.str().c_str()); + } +} + +void cmMakefile::AddLinkDirectoryForTarget(const char *target, + const char* d) +{ + cmTargets::iterator i = this->Targets.find(target); + if ( i != this->Targets.end()) + { + i->second.AddLinkDirectory( d ); + } + else + { + cmSystemTools::Error + ("Attempt to add link directories to non-existant target: ", + target, " for directory ", d); + } +} + +void cmMakefile::AddLinkLibrary(const char* lib) +{ + this->AddLinkLibrary(lib,cmTarget::GENERAL); +} + +void cmMakefile::AddLinkDirectory(const char* dir) +{ + // Don't add a link directory that is already present. Yes, this + // linear search results in n^2 behavior, but n won't be getting + // much bigger than 20. We cannot use a set because of order + // dependency of the link search path. + + if(!dir) + { + return; + } + // remove trailing slashes + if(dir[strlen(dir)-1] == '/') + { + std::string newdir = dir; + newdir = newdir.substr(0, newdir.size()-1); + if(std::find(this->LinkDirectories.begin(), + this->LinkDirectories.end(), + newdir.c_str()) == this->LinkDirectories.end()) + { + this->LinkDirectories.push_back(newdir); + } + } + else + { + if(std::find(this->LinkDirectories.begin(), + this->LinkDirectories.end(), dir) + == this->LinkDirectories.end()) + { + this->LinkDirectories.push_back(dir); + } + } +} + +void cmMakefile::InitializeFromParent() +{ + cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile(); + + // copy the definitions + this->DefinitionStack.front() = parent->DefinitionStack.back(); + + // copy include paths + this->IncludeDirectories = parent->IncludeDirectories; + this->SystemIncludeDirectories = parent->SystemIncludeDirectories; + + // define flags + this->DefineFlags = parent->DefineFlags; + + // compile definitions property and per-config versions + { + this->SetProperty("COMPILE_DEFINITIONS", + parent->GetProperty("COMPILE_DEFINITIONS")); + std::vector configs; + if(const char* configTypes = + this->GetDefinition("CMAKE_CONFIGURATION_TYPES")) + { + cmSystemTools::ExpandListArgument(configTypes, configs); + } + else if(const char* buildType = + this->GetDefinition("CMAKE_BUILD_TYPE")) + { + configs.push_back(buildType); + } + for(std::vector::const_iterator ci = configs.begin(); + ci != configs.end(); ++ci) + { + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += cmSystemTools::UpperCase(*ci); + this->SetProperty(defPropName.c_str(), + parent->GetProperty(defPropName.c_str())); + } + } + + // link libraries + this->LinkLibraries = parent->LinkLibraries; + + // link directories + this->LinkDirectories = parent->LinkDirectories; + + // the initial project name + this->ProjectName = parent->ProjectName; + + // Copy include regular expressions. + this->IncludeFileRegularExpression = parent->IncludeFileRegularExpression; + this->ComplainFileRegularExpression = parent->ComplainFileRegularExpression; + + // Imported targets. + this->ImportedTargets = parent->ImportedTargets; +} + +void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2) +{ + // copy our variables from the child makefile + lg2->GetMakefile()->InitializeFromParent(); + lg2->GetMakefile()->MakeStartDirectoriesCurrent(); + if (this->GetCMakeInstance()->GetDebugOutput()) + { + std::string msg=" Entering "; + msg += lg2->GetMakefile()->GetCurrentDirectory(); + cmSystemTools::Message(msg.c_str()); + } + // finally configure the subdir + lg2->Configure(); + if (this->GetCMakeInstance()->GetDebugOutput()) + { + std::string msg=" Returning to "; + msg += this->GetCurrentDirectory(); + cmSystemTools::Message(msg.c_str()); + } +} + +void cmMakefile::AddSubDirectory(const char* sub, + bool excludeFromAll, bool preorder) +{ + // the source path must be made full if it isn't already + std::string srcPath = sub; + if (!cmSystemTools::FileIsFullPath(srcPath.c_str())) + { + srcPath = this->GetCurrentDirectory(); + srcPath += "/"; + srcPath += sub; + } + + // binary path must be made full if it isn't already + std::string binPath = sub; + if (!cmSystemTools::FileIsFullPath(binPath.c_str())) + { + binPath = this->GetCurrentOutputDirectory(); + binPath += "/"; + binPath += sub; + } + + + this->AddSubDirectory(srcPath.c_str(), binPath.c_str(), + excludeFromAll, preorder, false); +} + + +void cmMakefile::AddSubDirectory(const char* srcPath, const char *binPath, + bool excludeFromAll, bool preorder, + bool immediate) +{ + std::vector& children = + this->LocalGenerator->GetChildren(); + // has this directory already been added? If so error + unsigned int i; + for (i = 0; i < children.size(); ++i) + { + if (srcPath == children[i]->GetMakefile()->GetStartDirectory()) + { + cmSystemTools::Error + ("Attempt to add subdirectory multiple times for directory.\n", + srcPath); + return; + } + } + + // create a new local generator and set its parent + cmLocalGenerator *lg2 = + this->LocalGenerator->GetGlobalGenerator()->CreateLocalGenerator(); + lg2->SetParent(this->LocalGenerator); + this->LocalGenerator->GetGlobalGenerator()->AddLocalGenerator(lg2); + + // set the subdirs start dirs + lg2->GetMakefile()->SetStartDirectory(srcPath); + lg2->GetMakefile()->SetStartOutputDirectory(binPath); + if(excludeFromAll) + { + lg2->GetMakefile()->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } + lg2->GetMakefile()->SetPreOrder(preorder); + + if (immediate) + { + this->ConfigureSubDirectory(lg2); + } +} + +void cmMakefile::AddIncludeDirectory(const char* inc, bool before) +{ + // if there is a newline then break it into multiple arguments + if (!inc) + { + return; + } + + // Don't add an include directory that is already present. Yes, + // this linear search results in n^2 behavior, but n won't be + // getting much bigger than 20. We cannot use a set because of + // order dependency of the include path. + std::vector::iterator i = + std::find(this->IncludeDirectories.begin(), + this->IncludeDirectories.end(), inc); + if(i == this->IncludeDirectories.end()) + { + if (before) + { + // WARNING: this *is* expensive (linear time) since it's a vector + this->IncludeDirectories.insert(this->IncludeDirectories.begin(), inc); + } + else + { + this->IncludeDirectories.push_back(inc); + } + } + else + { + if(before) + { + // if this before and already in the path then remove it + this->IncludeDirectories.erase(i); + // WARNING: this *is* expensive (linear time) since it's a vector + this->IncludeDirectories.insert(this->IncludeDirectories.begin(), inc); + } + } +} + +//---------------------------------------------------------------------------- +void cmMakefile::AddSystemIncludeDirectory(const char* dir) +{ + this->SystemIncludeDirectories.insert(dir); +} + +//---------------------------------------------------------------------------- +bool cmMakefile::IsSystemIncludeDirectory(const char* dir) +{ + return (this->SystemIncludeDirectories.find(dir) != + this->SystemIncludeDirectories.end()); +} + +void cmMakefile::AddDefinition(const char* name, const char* value) +{ + if (!value ) + { + return; + } + +#ifdef CMAKE_STRICT + if (this->GetCMakeInstance()) + { + this->GetCMakeInstance()-> + RecordPropertyAccess(name,cmProperty::VARIABLE); + } +#endif + + this->TemporaryDefinitionKey = name; + this->DefinitionStack.back()[this->TemporaryDefinitionKey] = value; + +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* vv = this->GetVariableWatch(); + if ( vv ) + { + vv->VariableAccessed(this->TemporaryDefinitionKey, + cmVariableWatch::VARIABLE_MODIFIED_ACCESS, + value, + this); + } +#endif +} + + +void cmMakefile::AddCacheDefinition(const char* name, const char* value, + const char* doc, + cmCacheManager::CacheEntryType type) +{ + const char* val = value; + cmCacheManager::CacheIterator it = + this->GetCacheManager()->GetCacheIterator(name); + if(!it.IsAtEnd() && (it.GetType() == cmCacheManager::UNINITIALIZED) && + it.Initialized()) + { + val = it.GetValue(); + if ( type == cmCacheManager::PATH || type == cmCacheManager::FILEPATH ) + { + std::vector::size_type cc; + std::vector files; + std::string nvalue = ""; + cmSystemTools::ExpandListArgument(val, files); + for ( cc = 0; cc < files.size(); cc ++ ) + { + files[cc] = cmSystemTools::CollapseFullPath(files[cc].c_str()); + if ( cc > 0 ) + { + nvalue += ";"; + } + nvalue += files[cc]; + } + + this->GetCacheManager()->AddCacheEntry(name, nvalue.c_str(), doc, type); + val = it.GetValue(); + } + + } + this->GetCacheManager()->AddCacheEntry(name, val, doc, type); + // if there was a definition then remove it + this->DefinitionStack.back().erase( DefinitionMap::key_type(name)); +} + + +void cmMakefile::AddDefinition(const char* name, bool value) +{ + if(value) + { + this->DefinitionStack.back() + .erase( DefinitionMap::key_type(name)); + this->DefinitionStack.back() + .insert(DefinitionMap::value_type(name, "ON")); + } + else + { + this->DefinitionStack.back() + .erase( DefinitionMap::key_type(name)); + this->DefinitionStack.back() + .insert(DefinitionMap::value_type(name, "OFF")); + } +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* vv = this->GetVariableWatch(); + if ( vv ) + { + vv->VariableAccessed(name, cmVariableWatch::VARIABLE_MODIFIED_ACCESS, + value?"ON":"OFF", this); + } +#endif +} + + +void cmMakefile::AddCacheDefinition(const char* name, + bool value, + const char* doc) +{ + bool val = value; + cmCacheManager::CacheIterator it = + this->GetCacheManager()->GetCacheIterator(name); + if(!it.IsAtEnd() && (it.GetType() == cmCacheManager::UNINITIALIZED) && + it.Initialized()) + { + val = it.GetValueAsBool(); + } + this->GetCacheManager()->AddCacheEntry(name, val, doc); + this->AddDefinition(name, val); +} + +void cmMakefile::RemoveDefinition(const char* name) +{ + this->DefinitionStack.back().erase(DefinitionMap::key_type(name)); +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* vv = this->GetVariableWatch(); + if ( vv ) + { + vv->VariableAccessed(name, cmVariableWatch::VARIABLE_REMOVED_ACCESS, + 0, this); + } +#endif +} + +void cmMakefile::SetProjectName(const char* p) +{ + this->ProjectName = p; +} + + +void cmMakefile::AddGlobalLinkInformation(const char* name, cmTarget& target) +{ + // for these targets do not add anything + switch(target.GetType()) + { + case cmTarget::UTILITY: + case cmTarget::GLOBAL_TARGET: + return; + default:; + } + std::vector::iterator j; + for(j = this->LinkDirectories.begin(); + j != this->LinkDirectories.end(); ++j) + { + target.AddLinkDirectory(j->c_str()); + } + target.MergeLinkLibraries( *this, name, this->LinkLibraries ); +} + + +void cmMakefile::AddLibrary(const char* lname, cmTarget::TargetType type, + const std::vector &srcs, + bool excludeFromAll) +{ + // wrong type ? default to STATIC + if ( (type != cmTarget::STATIC_LIBRARY) + && (type != cmTarget::SHARED_LIBRARY) + && (type != cmTarget::MODULE_LIBRARY)) + { + type = cmTarget::STATIC_LIBRARY; + } + + cmTarget* target = this->AddNewTarget(type, lname); + // Clear its dependencies. Otherwise, dependencies might persist + // over changes in CMakeLists.txt, making the information stale and + // hence useless. + target->ClearDependencyInformation( *this, lname ); + if(excludeFromAll) + { + target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } + target->AddSources(srcs); + this->AddGlobalLinkInformation(lname, *target); +} + +cmTarget* cmMakefile::AddExecutable(const char *exeName, + const std::vector &srcs, + bool excludeFromAll) +{ + cmTarget* target = this->AddNewTarget(cmTarget::EXECUTABLE, exeName); + if(excludeFromAll) + { + target->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } + target->AddSources(srcs); + this->AddGlobalLinkInformation(exeName, *target); + return target; +} + +//---------------------------------------------------------------------------- +cmTarget* +cmMakefile::AddNewTarget(cmTarget::TargetType type, const char* name) +{ + cmTargets::iterator it = + this->Targets.insert(cmTargets::value_type(name, cmTarget())).first; + cmTarget& target = it->second; + target.SetType(type, name); + target.SetMakefile(this); + this->LocalGenerator->GetGlobalGenerator()->AddTarget(*it); + return &it->second; +} + +cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) +{ + std::string name = cname; + std::string out; + + // look through all the source files that have custom commands + // and see if the custom command has the passed source file as an output + // keep in mind the possible .rule extension that may be tacked on + for(std::vector::const_iterator i = + this->SourceFiles.begin(); i != this->SourceFiles.end(); ++i) + { + // does this source file have a custom command? + if ((*i)->GetCustomCommand()) + { + // is the output of the custom command match the source files name + const std::vector& outputs = + (*i)->GetCustomCommand()->GetOutputs(); + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + out = *o; + std::string::size_type pos = out.rfind(name); + // If the output matches exactly + if (pos != out.npos && + pos == out.size() - name.size() && + (pos ==0 || out[pos-1] == '/')) + { + return *i; + } + } + } + } + + // otherwise return NULL + return 0; +} + +#if defined(CMAKE_BUILD_WITH_CMAKE) +cmSourceGroup* cmMakefile::GetSourceGroup(const std::vector&name) +{ + cmSourceGroup* sg = 0; + + // first look for source group starting with the same as the one we wants + for (std::vector::iterator sgIt = this->SourceGroups.begin(); + sgIt != this->SourceGroups.end(); ++sgIt) + + { + std::string sgName = sgIt->GetName(); + if(sgName == name[0]) + { + sg = &(*sgIt); + break; + } + } + + if(sg != 0) + { + // iterate through its children to find match source group + for(unsigned int i=1; ilookupChild(name[i].c_str()); + if(sg == 0) + { + break; + } + } + } + return sg; +} + + void cmMakefile::AddSourceGroup(const char* name, + const char* regex) +{ + if (name) + { + std::vector nameVector; + nameVector.push_back(name); + AddSourceGroup(nameVector, regex); + } +} + +void cmMakefile::AddSourceGroup(const std::vector& name, + const char* regex) +{ + cmSourceGroup* sg = 0; + std::vector currentName; + int i = 0; + const int lastElement = static_cast(name.size()-1); + for(i=lastElement; i>=0; --i) + { + currentName.assign(name.begin(), name.begin()+i+1); + sg = this->GetSourceGroup(currentName); + if(sg != 0) + { + break; + } + } + + // i now contains the index of the last found component + if(i==lastElement) + { + // group already exists, replace its regular expression + if ( regex ) + { + // We only want to set the regular expression. If there are already + // source files in the group, we don't want to remove them. + sg->SetGroupRegex(regex); + } + return; + } + else if(i==-1) + { + // group does not exists nor belong to any existing group + // add its first component + this->SourceGroups.push_back(cmSourceGroup(name[0].c_str(), regex)); + sg = this->GetSourceGroup(currentName); + i = 0; // last component found + } + + // build the whole source group path + for(++i; i<=lastElement; ++i) + { + sg->AddChild(cmSourceGroup(name[i].c_str(), 0)); + sg = sg->lookupChild(name[i].c_str()); + } + + sg->SetGroupRegex(regex); +} + +#endif + +void cmMakefile::AddExtraDirectory(const char* dir) +{ + this->AuxSourceDirectories.push_back(dir); +} + + +// expance CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR in the +// include and library directories. + +void cmMakefile::ExpandVariables() +{ + // Now expand variables in the include and link strings + for(std::vector::iterator d = this->IncludeDirectories.begin(); + d != this->IncludeDirectories.end(); ++d) + { + this->ExpandVariablesInString(*d, true, true); + } + for(std::vector::iterator d = this->LinkDirectories.begin(); + d != this->LinkDirectories.end(); ++d) + { + this->ExpandVariablesInString(*d, true, true); + } + for(cmTarget::LinkLibraryVectorType::iterator l = + this->LinkLibraries.begin(); + l != this->LinkLibraries.end(); ++l) + { + this->ExpandVariablesInString(l->first, true, true); + } +} + +bool cmMakefile::IsOn(const char* name) const +{ + const char* value = this->GetDefinition(name); + return cmSystemTools::IsOn(value); +} + +bool cmMakefile::IsSet(const char* name) const +{ + const char* value = this->GetDefinition(name); + if ( !value ) + { + return false; + } + + if ( ! *value ) + { + return false; + } + + if ( cmSystemTools::IsNOTFOUND(value) ) + { + return false; + } + + return true; +} + +bool cmMakefile::CanIWriteThisFile(const char* fileName) +{ + if ( !this->IsOn("CMAKE_DISABLE_SOURCE_CHANGES") ) + { + return true; + } + // If we are doing an in-source build, than the test will always fail + if ( cmSystemTools::SameFile(this->GetHomeDirectory(), + this->GetHomeOutputDirectory()) ) + { + if ( this->IsOn("CMAKE_DISABLE_IN_SOURCE_BUILD") ) + { + return false; + } + return true; + } + + // Check if this is subdirectory of the source tree but not a + // subdirectory of a build tree + if ( cmSystemTools::IsSubDirectory(fileName, + this->GetHomeDirectory()) && + !cmSystemTools::IsSubDirectory(fileName, + this->GetHomeOutputDirectory()) ) + { + return false; + } + return true; +} + +const char* cmMakefile::GetRequiredDefinition(const char* name) const +{ + const char* ret = this->GetDefinition(name); + if(!ret) + { + cmSystemTools::Error("Error required internal CMake variable not " + "set, cmake may be not be built correctly.\n", + "Missing variable is:\n", + name); + return ""; + } + return ret; +} + +bool cmMakefile::IsDefinitionSet(const char* name) const +{ + const char* def = 0; + DefinitionMap::const_iterator pos = + this->DefinitionStack.back().find(name); + if(pos != this->DefinitionStack.back().end()) + { + def = (*pos).second.c_str(); + } + else + { + def = this->GetCacheManager()->GetCacheValue(name); + } +#ifdef CMAKE_BUILD_WITH_CMAKE + if(cmVariableWatch* vv = this->GetVariableWatch()) + { + if(!def) + { + vv->VariableAccessed + (name, cmVariableWatch::UNKNOWN_VARIABLE_DEFINED_ACCESS, + def, this); + } + } +#endif + return def?true:false; +} + +const char* cmMakefile::GetDefinition(const char* name) const +{ +#ifdef CMAKE_STRICT + if (this->GetCMakeInstance()) + { + this->GetCMakeInstance()-> + RecordPropertyAccess(name,cmProperty::VARIABLE); + } +#endif + const char* def = 0; + DefinitionMap::const_iterator pos = + this->DefinitionStack.back().find(name); + if(pos != this->DefinitionStack.back().end()) + { + def = (*pos).second.c_str(); + } + else + { + def = this->GetCacheManager()->GetCacheValue(name); + } +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* vv = this->GetVariableWatch(); + if ( vv ) + { + if ( def ) + { + vv->VariableAccessed(name, cmVariableWatch::VARIABLE_READ_ACCESS, + def, this); + } + else + { + // are unknown access allowed + DefinitionMap::const_iterator pos2 = + this->DefinitionStack.back() + .find("CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS"); + if (pos2 != this->DefinitionStack.back().end() && + cmSystemTools::IsOn((*pos2).second.c_str())) + { + vv->VariableAccessed(name, + cmVariableWatch::ALLOWED_UNKNOWN_VARIABLE_READ_ACCESS, def, this); + } + else + { + vv->VariableAccessed(name, + cmVariableWatch::UNKNOWN_VARIABLE_READ_ACCESS, def, this); + } + } + } +#endif + return def; +} + +const char* cmMakefile::GetSafeDefinition(const char* def) const +{ + const char* ret = this->GetDefinition(def); + if(!ret) + { + return ""; + } + return ret; +} + +std::vector cmMakefile +::GetDefinitions(int cacheonly /* = 0 */) const +{ + std::map definitions; + if ( !cacheonly ) + { + DefinitionMap::const_iterator it; + for ( it = this->DefinitionStack.back().begin(); + it != this->DefinitionStack.back().end(); it ++ ) + { + definitions[it->first] = 1; + } + } + cmCacheManager::CacheIterator cit = + this->GetCacheManager()->GetCacheIterator(); + for ( cit.Begin(); !cit.IsAtEnd(); cit.Next() ) + { + definitions[cit.GetName()] = 1; + } + + std::vector res; + + std::map::iterator fit; + for ( fit = definitions.begin(); fit != definitions.end(); fit ++ ) + { + res.push_back(fit->first); + } + return res; +} + + +const char *cmMakefile::ExpandVariablesInString(std::string& source) +{ + return this->ExpandVariablesInString(source, false, false); +} + +const char *cmMakefile::ExpandVariablesInString(std::string& source, + bool escapeQuotes, + bool noEscapes, + bool atOnly, + const char* filename, + long line, + bool removeEmpty, + bool replaceAt) +{ + if ( source.empty() || source.find_first_of("$@\\") == source.npos) + { + return source.c_str(); + } + + // Special-case the @ONLY mode. + if(atOnly) + { + if(!noEscapes || !removeEmpty || !replaceAt) + { + // This case should never be called. At-only is for + // configure-file/string which always does no escapes. + this->IssueMessage(cmake::INTERNAL_ERROR, + "ExpandVariablesInString @ONLY called " + "on something with escapes."); + } + + // Store an original copy of the input. + std::string input = source; + + // Start with empty output. + source = ""; + + // Look for one @VAR@ at a time. + const char* in = input.c_str(); + while(this->cmAtVarRegex.find(in)) + { + // Get the range of the string to replace. + const char* first = in + this->cmAtVarRegex.start(); + const char* last = in + this->cmAtVarRegex.end(); + + // Store the unchanged part of the string now. + source.append(in, first-in); + + // Lookup the definition of VAR. + std::string var(first+1, last-first-2); + if(const char* val = this->GetDefinition(var.c_str())) + { + // Store the value in the output escaping as requested. + if(escapeQuotes) + { + source.append(cmSystemTools::EscapeQuotes(val)); + } + else + { + source.append(val); + } + } + + // Continue looking for @VAR@ further along the string. + in = last; + } + + // Append the rest of the unchanged part of the string. + source.append(in); + + return source.c_str(); + } + + // This method replaces ${VAR} and @VAR@ where VAR is looked up + // with GetDefinition(), if not found in the map, nothing is expanded. + // It also supports the $ENV{VAR} syntax where VAR is looked up in + // the current environment variables. + + cmCommandArgumentParserHelper parser; + parser.SetMakefile(this); + parser.SetLineFile(line, filename); + parser.SetEscapeQuotes(escapeQuotes); + parser.SetNoEscapeMode(noEscapes); + parser.SetReplaceAtSyntax(replaceAt); + parser.SetRemoveEmpty(removeEmpty); + int res = parser.ParseString(source.c_str(), 0); + if ( res ) + { + source = parser.GetResult(); + } + else + { + cmOStringStream error; + error << "Syntax error in cmake code at\n" + << (filename?filename:"(no filename given)") + << ":" << line << ":\n" + << parser.GetError() << ", when parsing string \"" + << source.c_str() << "\""; + if(this->NeedBackwardsCompatibility(2,0)) + { + cmSystemTools::Error(error.str().c_str()); + cmSystemTools::SetFatalErrorOccured(); + return source.c_str(); + } + else + { + cmSystemTools::Message(error.str().c_str()); + } + } + return source.c_str(); +} + +void cmMakefile::RemoveVariablesInString(std::string& source, + bool atOnly) const +{ + if(!atOnly) + { + cmsys::RegularExpression var("(\\${[A-Za-z_0-9]*})"); + while (var.find(source)) + { + source.erase(var.start(),var.end() - var.start()); + } + } + + if(!atOnly) + { + cmsys::RegularExpression varb("(\\$ENV{[A-Za-z_0-9]*})"); + while (varb.find(source)) + { + source.erase(varb.start(),varb.end() - varb.start()); + } + } + cmsys::RegularExpression var2("(@[A-Za-z_0-9]*@)"); + while (var2.find(source)) + { + source.erase(var2.start(),var2.end() - var2.start()); + } +} + +/** + * Add the default definitions to the makefile. These values must not + * be dependent on anything that isn't known when this cmMakefile instance + * is constructed. + */ +void cmMakefile::AddDefaultDefinitions() +{ +/* Up to CMake 2.4 here only WIN32, UNIX and APPLE were set. + With CMake must separate between target and host platform. In most cases + the tests for WIN32, UNIX and APPLE will be for the target system, so an + additional set of variables for the host system is required -> + CMAKE_HOST_WIN32, CMAKE_HOST_UNIX, CMAKE_HOST_APPLE. + WIN32, UNIX and APPLE are now set in the platform files in + Modules/Platforms/. + To keep cmake scripts (-P) and custom language and compiler modules + working, these variables are still also set here in this place, but they + will be reset in CMakeSystemSpecificInformation.cmake before the platform + files are executed. */ +#if defined(_WIN32) || defined(__CYGWIN__) + this->AddDefinition("WIN32", "1"); + this->AddDefinition("CMAKE_HOST_WIN32", "1"); +#else + this->AddDefinition("UNIX", "1"); + this->AddDefinition("CMAKE_HOST_UNIX", "1"); +#endif + // Cygwin is more like unix so enable the unix commands +#if defined(__CYGWIN__) + this->AddDefinition("UNIX", "1"); + this->AddDefinition("CMAKE_HOST_UNIX", "1"); +#endif +#if defined(__APPLE__) + this->AddDefinition("APPLE", "1"); + this->AddDefinition("CMAKE_HOST_APPLE", "1"); +#endif + + char temp[1024]; + sprintf(temp, "%d", cmVersion::GetMinorVersion()); + this->AddDefinition("CMAKE_MINOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetMajorVersion()); + this->AddDefinition("CMAKE_MAJOR_VERSION", temp); + sprintf(temp, "%d", cmVersion::GetPatchVersion()); + this->AddDefinition("CMAKE_PATCH_VERSION", temp); + + this->AddDefinition("CMAKE_FILES_DIRECTORY", + cmake::GetCMakeFilesDirectory()); +} + +#if defined(CMAKE_BUILD_WITH_CMAKE) +/** + * Find a source group whose regular expression matches the filename + * part of the given source name. Search backward through the list of + * source groups, and take the first matching group found. This way + * non-inherited SOURCE_GROUP commands will have precedence over + * inherited ones. + */ +cmSourceGroup& +cmMakefile::FindSourceGroup(const char* source, + std::vector &groups) +{ + // First search for a group that lists the file explicitly. + for(std::vector::reverse_iterator sg = groups.rbegin(); + sg != groups.rend(); ++sg) + { + cmSourceGroup *result = sg->MatchChildrenFiles(source); + if(result) + { + return *result; + } + } + + // Now search for a group whose regex matches the file. + for(std::vector::reverse_iterator sg = groups.rbegin(); + sg != groups.rend(); ++sg) + { + cmSourceGroup *result = sg->MatchChildrenRegex(source); + if(result) + { + return *result; + } + } + + + // Shouldn't get here, but just in case, return the default group. + return groups.front(); +} +#endif + +bool cmMakefile::IsFunctionBlocked(const cmListFileFunction& lff, + cmExecutionStatus &status) +{ + // if there are no blockers get out of here + if (this->FunctionBlockers.begin() == this->FunctionBlockers.end()) + { + return false; + } + + // loop over all function blockers to see if any block this command + // evaluate in reverse, this is critical for balanced IF statements etc + std::list::reverse_iterator pos; + for (pos = this->FunctionBlockers.rbegin(); + pos != this->FunctionBlockers.rend(); ++pos) + { + if((*pos)->IsFunctionBlocked(lff, *this, status)) + { + return true; + } + } + + return false; +} + +void cmMakefile::ExpandArguments( + std::vector const& inArgs, + std::vector& outArgs) +{ + std::vector::const_iterator i; + std::string value; + outArgs.reserve(inArgs.size()); + for(i = inArgs.begin(); i != inArgs.end(); ++i) + { + // Expand the variables in the argument. + value = i->Value; + this->ExpandVariablesInString(value, false, false, false, + i->FilePath, i->Line, + false, true); + + // If the argument is quoted, it should be one argument. + // Otherwise, it may be a list of arguments. + if(i->Quoted) + { + outArgs.push_back(value); + } + else + { + cmSystemTools::ExpandListArgument(value, outArgs); + } + } +} + +void cmMakefile::RemoveFunctionBlocker(const cmListFileFunction& lff) +{ + // loop over all function blockers to see if any block this command + std::list::reverse_iterator pos; + for (pos = this->FunctionBlockers.rbegin(); + pos != this->FunctionBlockers.rend(); ++pos) + { + if ((*pos)->ShouldRemove(lff, *this)) + { + cmFunctionBlocker* b = *pos; + this->FunctionBlockers.remove(b); + delete b; + break; + } + } + + return; +} + +void cmMakefile::SetHomeDirectory(const char* dir) +{ + this->cmHomeDirectory = dir; + cmSystemTools::ConvertToUnixSlashes(this->cmHomeDirectory); + this->AddDefinition("CMAKE_SOURCE_DIR", this->GetHomeDirectory()); + if ( !this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR") ) + { + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->GetHomeDirectory()); + } +} + +void cmMakefile::SetHomeOutputDirectory(const char* lib) +{ + this->HomeOutputDirectory = lib; + cmSystemTools::ConvertToUnixSlashes(this->HomeOutputDirectory); + this->AddDefinition("CMAKE_BINARY_DIR", this->GetHomeOutputDirectory()); + if ( !this->GetDefinition("CMAKE_CURRENT_BINARY_DIR") ) + { + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->GetHomeOutputDirectory()); + } +} + + +/** + * Register the given cmData instance with its own name. + */ +void cmMakefile::RegisterData(cmData* data) +{ + std::string name = data->GetName(); + DataMapType::const_iterator d = this->DataMap.find(name); + if((d != this->DataMap.end()) && (d->second != 0) && (d->second != data)) + { + delete d->second; + } + this->DataMap[name] = data; +} + + +/** + * Register the given cmData instance with the given name. This can be used + * to register a NULL pointer. + */ +void cmMakefile::RegisterData(const char* name, cmData* data) +{ + DataMapType::const_iterator d = this->DataMap.find(name); + if((d != this->DataMap.end()) && (d->second != 0) && (d->second != data)) + { + delete d->second; + } + this->DataMap[name] = data; +} + + +/** + * Lookup a cmData instance previously registered with the given name. If + * the instance cannot be found, return NULL. + */ +cmData* cmMakefile::LookupData(const char* name) const +{ + DataMapType::const_iterator d = this->DataMap.find(name); + if(d != this->DataMap.end()) + { + return d->second; + } + else + { + return 0; + } +} + +//---------------------------------------------------------------------------- +cmSourceFile* cmMakefile::GetSource(const char* sourceName) +{ + cmSourceFileLocation sfl(this, sourceName); + for(std::vector::const_iterator + sfi = this->SourceFiles.begin(); + sfi != this->SourceFiles.end(); ++sfi) + { + cmSourceFile* sf = *sfi; + if(sf->Matches(sfl)) + { + return sf; + } + } + return 0; +} + +//---------------------------------------------------------------------------- +cmSourceFile* cmMakefile::GetOrCreateSource(const char* sourceName, + bool generated) +{ + if(cmSourceFile* esf = this->GetSource(sourceName)) + { + return esf; + } + else + { + cmSourceFile* sf = new cmSourceFile(this, sourceName); + if(generated) + { + sf->SetProperty("GENERATED", "1"); + } + this->SourceFiles.push_back(sf); + return sf; + } +} + +void cmMakefile::EnableLanguage(std::vector const & lang, + bool optional) +{ + this->AddDefinition("CMAKE_CFG_INTDIR", + this->LocalGenerator->GetGlobalGenerator()->GetCMakeCFGInitDirectory()); + this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this, + optional); +} + +void cmMakefile::ExpandSourceListArguments( + std::vector const& arguments, + std::vector& newargs, unsigned int /* start */) +{ + // now expand the args + unsigned int i; + for(i = 0; i < arguments.size(); ++i) + { + // List expansion will have been done already. + newargs.push_back(arguments[i]); + } +} + +int cmMakefile::TryCompile(const char *srcdir, const char *bindir, + const char *projectName, const char *targetName, + const std::vector *cmakeArgs, + std::string *output) +{ + // does the binary directory exist ? If not create it... + if (!cmSystemTools::FileIsDirectory(bindir)) + { + cmSystemTools::MakeDirectory(bindir); + } + + // change to the tests directory and run cmake + // use the cmake object instead of calling cmake + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + cmSystemTools::ChangeDirectory(bindir); + + // make sure the same generator is used + // use this program as the cmake to be run, it should not + // be run that way but the cmake object requires a vailid path + std::string cmakeCommand = this->GetDefinition("CMAKE_COMMAND"); + cmake cm; + cm.SetIsInTryCompile(true); + cmGlobalGenerator *gg = cm.CreateGlobalGenerator + (this->LocalGenerator->GetGlobalGenerator()->GetName()); + if (!gg) + { + cmSystemTools::Error( + "Internal CMake error, TryCompile bad GlobalGenerator"); + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + cm.SetGlobalGenerator(gg); + + // do a configure + cm.SetHomeDirectory(srcdir); + cm.SetHomeOutputDirectory(bindir); + cm.SetStartDirectory(srcdir); + cm.SetStartOutputDirectory(bindir); + cm.SetCMakeCommand(cmakeCommand.c_str()); + cm.LoadCache(); + // if cmake args were provided then pass them in + if (cmakeArgs) + { + cm.SetCacheArgs(*cmakeArgs); + } + // to save time we pass the EnableLanguage info directly + gg->EnableLanguagesFromGenerator + (this->LocalGenerator->GetGlobalGenerator()); + if(this->IsOn("CMAKE_SUPPRESS_DEVELOPER_WARNINGS")) + { + cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", + "TRUE", "", cmCacheManager::INTERNAL); + } + else + { + cm.AddCacheEntry("CMAKE_SUPPRESS_DEVELOPER_WARNINGS", + "FALSE", "", cmCacheManager::INTERNAL); + } + if (cm.Configure() != 0) + { + cmSystemTools::Error( + "Internal CMake error, TryCompile configure of cmake failed"); + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + + if (cm.Generate() != 0) + { + cmSystemTools::Error( + "Internal CMake error, TryCompile generation of cmake failed"); + // return to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + return 1; + } + + // finally call the generator to actually build the resulting project + int ret = + this->LocalGenerator->GetGlobalGenerator()->TryCompile(srcdir,bindir, + projectName, + targetName, + output, + this); + + cmSystemTools::ChangeDirectory(cwd.c_str()); + return ret; +} + +cmake *cmMakefile::GetCMakeInstance() const +{ + if ( this->LocalGenerator && this->LocalGenerator->GetGlobalGenerator() ) + { + return this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance(); + } + return 0; +} + +#ifdef CMAKE_BUILD_WITH_CMAKE +cmVariableWatch *cmMakefile::GetVariableWatch() const +{ + if ( this->GetCMakeInstance() && + this->GetCMakeInstance()->GetVariableWatch() ) + { + return this->GetCMakeInstance()->GetVariableWatch(); + } + return 0; +} +#endif + +void cmMakefile::AddMacro(const char* name, const char* signature) +{ + if ( !name || !signature ) + { + return; + } + this->MacrosMap[name] = signature; +} + +void cmMakefile::GetListOfMacros(std::string& macros) +{ + StringStringMap::iterator it; + macros = ""; + int cc = 0; + for ( it = this->MacrosMap.begin(); it != this->MacrosMap.end(); ++it ) + { + if ( cc > 0 ) + { + macros += ";"; + } + macros += it->first; + cc ++; + } +} + +cmCacheManager *cmMakefile::GetCacheManager() const +{ + return this->GetCMakeInstance()->GetCacheManager(); +} + +void cmMakefile::DisplayStatus(const char* message, float s) +{ + this->GetLocalGenerator()->GetGlobalGenerator() + ->GetCMakeInstance()->UpdateProgress(message, s); +} + +std::string cmMakefile::GetModulesFile(const char* filename) +{ + std::vector modulePath; + const char* def = this->GetDefinition("CMAKE_MODULE_PATH"); + if(def) + { + cmSystemTools::ExpandListArgument(def, modulePath); + } + + // Also search in the standard modules location. + def = this->GetDefinition("CMAKE_ROOT"); + if(def) + { + std::string rootModules = def; + rootModules += "/Modules"; + modulePath.push_back(rootModules); + } + //std::string Look through the possible module directories. + for(std::vector::iterator i = modulePath.begin(); + i != modulePath.end(); ++i) + { + std::string itempl = *i; + cmSystemTools::ConvertToUnixSlashes(itempl); + itempl += "/"; + itempl += filename; + if(cmSystemTools::FileExists(itempl.c_str())) + { + return itempl; + } + } + return ""; +} + +void cmMakefile::ConfigureString(const std::string& input, + std::string& output, bool atOnly, + bool escapeQuotes) +{ + // Split input to handle one line at a time. + std::string::const_iterator lineStart = input.begin(); + while(lineStart != input.end()) + { + // Find the end of this line. + std::string::const_iterator lineEnd = lineStart; + while(lineEnd != input.end() && *lineEnd != '\n') + { + ++lineEnd; + } + + // Copy the line. + std::string line(lineStart, lineEnd); + + // Skip the newline character. + bool haveNewline = (lineEnd != input.end()); + if(haveNewline) + { + ++lineEnd; + } + + // Replace #cmakedefine instances. + if(this->cmDefineRegex.find(line)) + { + const char* def = + this->GetDefinition(this->cmDefineRegex.match(1).c_str()); + if(!cmSystemTools::IsOff(def)) + { + cmSystemTools::ReplaceString(line, "#cmakedefine", "#define"); + output += line; + } + else + { + output += "/* #undef "; + output += this->cmDefineRegex.match(1); + output += " */"; + } + } + else if(this->cmDefine01Regex.find(line)) + { + const char* def = + this->GetDefinition(this->cmDefine01Regex.match(1).c_str()); + cmSystemTools::ReplaceString(line, "#cmakedefine01", "#define"); + output += line; + if(!cmSystemTools::IsOff(def)) + { + output += " 1"; + } + else + { + output += " 0"; + } + } + else + { + output += line; + } + + if(haveNewline) + { + output += "\n"; + } + + // Move to the next line. + lineStart = lineEnd; + } + + // Perform variable replacements. + this->ExpandVariablesInString(output, escapeQuotes, true, + atOnly, 0, -1, true); +} + +int cmMakefile::ConfigureFile(const char* infile, const char* outfile, + bool copyonly, bool atOnly, bool escapeQuotes) +{ + int res = 1; + if ( !this->CanIWriteThisFile(outfile) ) + { + cmSystemTools::Error("Attempt to write file: ", + outfile, " into a source directory."); + return 0; + } + if ( !cmSystemTools::FileExists(infile) ) + { + cmSystemTools::Error("File ", infile, " does not exist."); + return 0; + } + std::string soutfile = outfile; + std::string sinfile = infile; + this->AddCMakeDependFile(infile); + cmSystemTools::ConvertToUnixSlashes(soutfile); + mode_t perm = 0; + cmSystemTools::GetPermissions(sinfile.c_str(), perm); + std::string::size_type pos = soutfile.rfind('/'); + if(pos != std::string::npos) + { + std::string path = soutfile.substr(0, pos); + cmSystemTools::MakeDirectory(path.c_str()); + } + + if(copyonly) + { + if ( !cmSystemTools::CopyFileIfDifferent(sinfile.c_str(), + soutfile.c_str())) + { + return 0; + } + } + else + { + std::string tempOutputFile = soutfile; + tempOutputFile += ".tmp"; + std::ofstream fout(tempOutputFile.c_str()); + if(!fout) + { + cmSystemTools::Error( + "Could not open file for write in copy operation ", + tempOutputFile.c_str()); + cmSystemTools::ReportLastSystemError(""); + return 0; + } + std::ifstream fin(sinfile.c_str()); + if(!fin) + { + cmSystemTools::Error("Could not open file for read in copy operation ", + sinfile.c_str()); + return 0; + } + + // now copy input to output and expand variables in the + // input file at the same time + std::string inLine; + std::string outLine; + while( cmSystemTools::GetLineFromStream(fin, inLine) ) + { + outLine = ""; + this->ConfigureString(inLine, outLine, atOnly, escapeQuotes); + fout << outLine.c_str() << "\n"; + } + // close the files before attempting to copy + fin.close(); + fout.close(); + if ( !cmSystemTools::CopyFileIfDifferent(tempOutputFile.c_str(), + soutfile.c_str()) ) + { + res = 0; + } + else + { + cmSystemTools::SetPermissions(soutfile.c_str(), perm); + } + cmSystemTools::RemoveFile(tempOutputFile.c_str()); + } + return res; +} + +void cmMakefile::SetProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + + // handle special props + std::string propname = prop; + if ( propname == "INCLUDE_DIRECTORIES" ) + { + std::vector varArgsExpanded; + cmSystemTools::ExpandListArgument(value, varArgsExpanded); + this->SetIncludeDirectories(varArgsExpanded); + return; + } + + if ( propname == "LINK_DIRECTORIES" ) + { + std::vector varArgsExpanded; + cmSystemTools::ExpandListArgument(value, varArgsExpanded); + this->SetLinkDirectories(varArgsExpanded); + return; + } + + if ( propname == "INCLUDE_REGULAR_EXPRESSION" ) + { + this->SetIncludeRegularExpression(value); + return; + } + + if ( propname == "ADDITIONAL_MAKE_CLEAN_FILES" ) + { + // This property is not inherrited + if ( strcmp(this->GetCurrentDirectory(), + this->GetStartDirectory()) != 0 ) + { + return; + } + } + + this->Properties.SetProperty(prop,value,cmProperty::DIRECTORY); +} + +void cmMakefile::AppendProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + + // handle special props + std::string propname = prop; + if ( propname == "INCLUDE_DIRECTORIES" ) + { + std::vector varArgsExpanded; + cmSystemTools::ExpandListArgument(value, varArgsExpanded); + for(std::vector::const_iterator vi = varArgsExpanded.begin(); + vi != varArgsExpanded.end(); ++vi) + { + this->AddIncludeDirectory(vi->c_str()); + } + return; + } + + if ( propname == "LINK_DIRECTORIES" ) + { + std::vector varArgsExpanded; + cmSystemTools::ExpandListArgument(value, varArgsExpanded); + for(std::vector::const_iterator vi = varArgsExpanded.begin(); + vi != varArgsExpanded.end(); ++vi) + { + this->AddLinkDirectory(vi->c_str()); + } + return; + } + + this->Properties.AppendProperty(prop,value,cmProperty::DIRECTORY); +} + +const char *cmMakefile::GetPropertyOrDefinition(const char* prop) +{ + const char *ret = this->GetProperty(prop, cmProperty::DIRECTORY); + if (!ret) + { + ret = this->GetDefinition(prop); + } + return ret; +} + +const char *cmMakefile::GetProperty(const char* prop) +{ + return this->GetProperty(prop, cmProperty::DIRECTORY); +} + +const char *cmMakefile::GetProperty(const char* prop, + cmProperty::ScopeType scope) +{ + // watch for specific properties + static std::string output; + output = ""; + if (!strcmp("PARENT_DIRECTORY",prop)) + { + output = this->LocalGenerator->GetParent() + ->GetMakefile()->GetStartDirectory(); + return output.c_str(); + } + else if (!strcmp("INCLUDE_REGULAR_EXPRESSION",prop) ) + { + output = this->GetIncludeRegularExpression(); + return output.c_str(); + } + else if (!strcmp("LISTFILE_STACK",prop)) + { + for (std::deque::iterator i = this->ListFileStack.begin(); + i != this->ListFileStack.end(); ++i) + { + if (i != this->ListFileStack.begin()) + { + output += ";"; + } + output += *i; + } + return output.c_str(); + } + else if (!strcmp("VARIABLES",prop) || !strcmp("CACHE_VARIABLES",prop)) + { + int cacheonly = 0; + if ( !strcmp("CACHE_VARIABLES",prop) ) + { + cacheonly = 1; + } + std::vector vars = this->GetDefinitions(cacheonly); + for (unsigned int cc = 0; cc < vars.size(); cc ++ ) + { + if ( cc > 0 ) + { + output += ";"; + } + output += vars[cc]; + } + return output.c_str(); + } + else if (!strcmp("MACROS",prop)) + { + this->GetListOfMacros(output); + return output.c_str(); + } + else if (!strcmp("DEFINITIONS",prop)) + { + output = this->GetDefineFlags(); + return output.c_str(); + } + else if (!strcmp("INCLUDE_DIRECTORIES",prop) ) + { + cmOStringStream str; + for (std::vector::const_iterator + it = this->GetIncludeDirectories().begin(); + it != this->GetIncludeDirectories().end(); + ++ it ) + { + if ( it != this->GetIncludeDirectories().begin()) + { + str << ";"; + } + str << it->c_str(); + } + output = str.str(); + return output.c_str(); + } + else if (!strcmp("LINK_DIRECTORIES",prop)) + { + cmOStringStream str; + for (std::vector::const_iterator + it = this->GetLinkDirectories().begin(); + it != this->GetLinkDirectories().end(); + ++ it ) + { + if ( it != this->GetLinkDirectories().begin()) + { + str << ";"; + } + str << it->c_str(); + } + output = str.str(); + return output.c_str(); + } + + bool chain = false; + const char *retVal = + this->Properties.GetPropertyValue(prop, scope, chain); + if (chain) + { + if(this->LocalGenerator->GetParent()) + { + return this->LocalGenerator->GetParent()->GetMakefile()-> + GetProperty(prop, scope); + } + return this->GetCMakeInstance()->GetProperty(prop,scope); + } + + return retVal; +} + +bool cmMakefile::GetPropertyAsBool(const char* prop) +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + + +cmTarget* cmMakefile::FindTarget(const char* name) +{ + cmTargets& tgts = this->GetTargets(); + + cmTargets::iterator i = tgts.find ( name ); + if ( i != tgts.end() ) + { + return &i->second; + } + + return 0; +} + +cmTest* cmMakefile::CreateTest(const char* testName) +{ + if ( !testName ) + { + return 0; + } + cmTest* test = this->GetTest(testName); + if ( test ) + { + return test; + } + test = new cmTest; + test->SetName(testName); + test->SetMakefile(this); + this->Tests.push_back(test); + return test; +} + +cmTest* cmMakefile::GetTest(const char* testName) const +{ + if ( !testName ) + { + return 0; + } + std::vector::const_iterator it; + for ( it = this->Tests.begin(); it != this->Tests.end(); ++ it ) + { + if ( strcmp((*it)->GetName(), testName) == 0 ) + { + return *it; + } + } + return 0; +} + +const std::vector *cmMakefile::GetTests() const +{ + return &this->Tests; +} + +std::vector *cmMakefile::GetTests() +{ + return &this->Tests; +} + +std::string cmMakefile::GetListFileStack() +{ + cmOStringStream tmp; + size_t depth = this->ListFileStack.size(); + if (depth > 0) + { + std::deque::iterator it = this->ListFileStack.end(); + do + { + if (depth != this->ListFileStack.size()) + { + tmp << "\n "; + } + --it; + tmp << "["; + tmp << depth; + tmp << "]\t"; + tmp << *it; + depth--; + } + while (it != this->ListFileStack.begin()); + } + return tmp.str(); +} + + +void cmMakefile::PushScope() +{ + // Get the index of the next stack entry. + std::vector::size_type index = this->DefinitionStack.size(); + + // Allocate a new stack entry. + this->DefinitionStack.push_back(DefinitionMap()); + + // Copy the previous top to the new top. + this->DefinitionStack[index] = this->DefinitionStack[index-1]; +} + +void cmMakefile::PopScope() +{ + this->DefinitionStack.pop_back(); +} + +void cmMakefile::RaiseScope(const char *var, const char *varDef) +{ + if (!var || !strlen(var)) + { + return; + } + + // multiple scopes in this directory? + if (this->DefinitionStack.size() > 1) + { + if(varDef) + { + this->DefinitionStack[this->DefinitionStack.size()-2][var] = varDef; + } + else + { + this->DefinitionStack[this->DefinitionStack.size()-2].erase(var); + } + } + // otherwise do the parent (if one exists) + else if (this->LocalGenerator->GetParent()) + { + cmMakefile *parent = this->LocalGenerator->GetParent()->GetMakefile(); + if (parent) + { + if(varDef) + { + parent->AddDefinition(var,varDef); + } + else + { + parent->RemoveDefinition(var); + } + } + } +} + + +// define properties +void cmMakefile::DefineProperties(cmake *cm) +{ + cm->DefineProperty + ("ADDITIONAL_MAKE_CLEAN_FILES", cmProperty::DIRECTORY, + "Additional files to clean during the make clean stage.", + "A list of files that will be cleaned as a part of the " + "\"make clean\" stage. "); + + cm->DefineProperty + ("CLEAN_NO_CUSTOM", cmProperty::DIRECTORY, + "Should the output of custom commands be left.", + "If this is true then the outputs of custom commands for this " + "directory will not be removed during the \"make clean\" stage. "); + + cm->DefineProperty + ("LISTFILE_STACK", cmProperty::DIRECTORY, + "The current stack of listfiles being processed.", + "This property is mainly useful when trying to debug errors " + "in your CMake scripts. It returns a list of what list files " + "are currently being processed, in order. So if one listfile " + "does an INCLUDE command then that is effectively pushing " + "the included listfile onto the stack."); + + cm->DefineProperty + ("TEST_INCLUDE_FILE", cmProperty::DIRECTORY, + "A cmake file that will be included when ctest is run.", + "If you specify TEST_INCLUDE_FILE, that file will be " + "included and processed when ctest is run on the directory."); + + cm->DefineProperty + ("COMPILE_DEFINITIONS", cmProperty::DIRECTORY, + "Preprocessor definitions for compiling a directory's sources.", + "The COMPILE_DEFINITIONS property may be set to a list of preprocessor " + "definitions using the syntax VAR or VAR=value. Function-style " + "definitions are not supported. CMake will automatically escape " + "the value correctly for the native build system (note that CMake " + "language syntax may require escapes to specify some values). " + "This property may be set on a per-configuration basis using the name " + "COMPILE_DEFINITIONS_ where is an upper-case name " + "(ex. \"COMPILE_DEFINITIONS_DEBUG\"). " + "This property will be initialized in each directory by its value " + "in the directory's parent.\n" + "CMake will automatically drop some definitions that " + "are not supported by the native build tool. " + "The VS6 IDE does not support definitions with values " + "(but NMake does).\n" + "Dislaimer: Most native build tools have poor support for escaping " + "certain values. CMake has work-arounds for many cases but some " + "values may just not be possible to pass correctly. If a value " + "does not seem to be escaped correctly, do not attempt to " + "work-around the problem by adding escape sequences to the value. " + "Your work-around may break in a future version of CMake that " + "has improved escape support. Instead consider defining the macro " + "in a (configured) header file. Then report the limitation."); + + cm->DefineProperty + ("COMPILE_DEFINITIONS_", cmProperty::DIRECTORY, + "Per-configuration preprocessor definitions in a directory.", + "This is the configuration-specific version of COMPILE_DEFINITIONS. " + "This property will be initialized in each directory by its value " + "in the directory's parent.\n"); + + cm->DefineProperty + ("EXCLUDE_FROM_ALL", cmProperty::DIRECTORY, + "Exclude the directory from the all target of its parent.", + "A property on a directory that indicates if its targets are excluded " + "from the default build target. If it is not, then with a Makefile " + "for example typing make will cause the targets to be built. " + "The same concept applies to the default build of other generators.", + false); +} + +//---------------------------------------------------------------------------- +cmTarget* +cmMakefile::AddImportedTarget(const char* name, cmTarget::TargetType type) +{ + // Create the target. + cmsys::auto_ptr target(new cmTarget); + target->SetType(type, name); + target->SetMakefile(this); + target->MarkAsImported(); + + // Add to the set of available imported targets. + this->ImportedTargets[name] = target.get(); + + // Transfer ownership to this cmMakefile object. + this->ImportedTargetsOwned.push_back(target.get()); + return target.release(); +} + +//---------------------------------------------------------------------------- +cmTarget* cmMakefile::FindTargetToUse(const char* name) +{ + // Look for an imported target. These take priority because they + // are more local in scope and do not have to be globally unique. + std::map::const_iterator + imported = this->ImportedTargets.find(name); + if(imported != this->ImportedTargets.end()) + { + return imported->second; + } + + // Look for a target built in this project. + return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name); +} + +//---------------------------------------------------------------------------- +bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg, + bool isCustom) +{ + if(cmTarget* existing = this->FindTargetToUse(name.c_str())) + { + // The name given conflicts with an existing target. Produce an + // error in a compatible way. + if(existing->IsImported()) + { + // Imported targets were not supported in previous versions. + // This is new code, so we can make it an error. + cmOStringStream e; + e << "cannot create target \"" << name + << "\" because an imported target with the same name already exists."; + msg = e.str(); + return false; + } + else + { + // target names must be globally unique + switch (this->GetPolicyStatus(cmPolicies::CMP0002)) + { + case cmPolicies::WARN: + this->IssueMessage(cmake::AUTHOR_WARNING, this->GetPolicies()-> + GetPolicyWarning(cmPolicies::CMP0002)); + case cmPolicies::OLD: + return true; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + this->IssueMessage(cmake::FATAL_ERROR, + this->GetPolicies()->GetRequiredPolicyError(cmPolicies::CMP0002) + ); + return true; + case cmPolicies::NEW: + break; + } + + // The conflict is with a non-imported target. + // Allow this if the user has requested support. + cmake* cm = + this->LocalGenerator->GetGlobalGenerator()->GetCMakeInstance(); + if(isCustom && existing->GetType() == cmTarget::UTILITY && + this != existing->GetMakefile() && + cm->GetPropertyAsBool("ALLOW_DUPLICATE_CUSTOM_TARGETS")) + { + return true; + } + + // Produce an error that tells the user how to work around the + // problem. + cmOStringStream e; + e << "cannot create target \"" << name + << "\" because another target with the same name already exists. " + << "The existing target is "; + switch(existing->GetType()) + { + case cmTarget::EXECUTABLE: + e << "an executable "; + break; + case cmTarget::STATIC_LIBRARY: + e << "a static library "; + break; + case cmTarget::SHARED_LIBRARY: + e << "a shared library "; + break; + case cmTarget::MODULE_LIBRARY: + e << "a module library "; + break; + case cmTarget::UTILITY: + e << "a custom target "; + break; + default: break; + } + e << "created in source directory \"" + << existing->GetMakefile()->GetCurrentDirectory() << "\". " + << "See documentation for policy CMP0002 for more details."; + msg = e.str(); + return false; + } + } + return true; +} + +cmPolicies::PolicyStatus cmMakefile +::GetPolicyStatus(cmPolicies::PolicyID id) +{ + cmPolicies::PolicyStatus status = cmPolicies::REQUIRED_IF_USED; + PolicyMap::iterator mappos; + int vecpos; + bool done = false; + + // check our policy stack first + for (vecpos = static_cast(this->PolicyStack.size()) - 1; + vecpos >= 0 && !done; vecpos--) + { + mappos = this->PolicyStack[vecpos].find(id); + if (mappos != this->PolicyStack[vecpos].end()) + { + status = mappos->second; + done = true; + } + } + + // if not found then + if (!done) + { + // pass the buck to our parent if we have one + if (this->LocalGenerator->GetParent()) + { + cmMakefile *parent = + this->LocalGenerator->GetParent()->GetMakefile(); + return parent->GetPolicyStatus(id); + } + // otherwise use the default + else + { + status = this->GetPolicies()->GetPolicyStatus(id); + } + } + + // warn if we see a REQUIRED_IF_USED above a OLD or WARN + if (!this->GetPolicies()->IsValidUsedPolicyStatus(id,status)) + { + return cmPolicies::REQUIRED_IF_USED; + } + + return status; +} + +bool cmMakefile::SetPolicy(const char *id, + cmPolicies::PolicyStatus status) +{ + cmPolicies::PolicyID pid; + if (!this->GetPolicies()->GetPolicyID(id, /* out */ pid)) + { + cmOStringStream e; + e << "Policy \"" << id << "\" is not known to this version of CMake."; + this->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + return this->SetPolicy(pid,status); +} + +bool cmMakefile::SetPolicy(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // setting a REQUIRED_ALWAYS policy to WARN or OLD is an insta error + if (this->GetPolicies()-> + IsValidPolicyStatus(id,status)) + { + this->PolicyStack.back()[id] = status; + + // Special hook for presenting compatibility variable as soon as + // the user requests it. + if(id == cmPolicies::CMP0001 && + (status == cmPolicies::WARN || status == cmPolicies::OLD)) + { + if(!(this->GetCacheManager() + ->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY"))) + { + // Set it to 2.4 because that is the last version where the + // variable had meaning. + this->AddCacheDefinition + ("CMAKE_BACKWARDS_COMPATIBILITY", "2.4", + "For backwards compatibility, what version of CMake " + "commands and " + "syntax should this version of CMake try to support.", + cmCacheManager::STRING); + } + } + + return true; + } + return false; +} + +bool cmMakefile::PushPolicy() +{ + // Allocate a new stack entry. + this->PolicyStack.push_back(PolicyMap()); + return true; +} + +bool cmMakefile::PopPolicy(bool reportError) +{ + if(this->PolicyStack.size() == 1) + { + if(reportError) + { + cmSystemTools::Error("Attempt to pop the policy stack past " + "it's beginning."); + } + return false; + } + this->PolicyStack.pop_back(); + return true; +} + +bool cmMakefile::SetPolicyVersion(const char *version) +{ + return this->GetCMakeInstance()->GetPolicies()-> + ApplyPolicyVersion(this,version); +} + +cmPolicies *cmMakefile::GetPolicies() +{ + if (!this->GetCMakeInstance()) + { + return 0; + } + return this->GetCMakeInstance()->GetPolicies(); +} diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h new file mode 100644 index 000000000..cd835b309 --- /dev/null +++ b/Source/cmMakefile.h @@ -0,0 +1,906 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefile.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:40 $ + Version: $Revision: 1.230.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakefile_h +#define cmMakefile_h + +#include "cmCacheManager.h" +#include "cmData.h" +#include "cmExecutionStatus.h" +#include "cmListFileCache.h" +#include "cmPolicies.h" +#include "cmPropertyMap.h" +#include "cmSystemTools.h" +#include "cmTarget.h" +#include "cmake.h" + +#if defined(CMAKE_BUILD_WITH_CMAKE) +#include "cmSourceGroup.h" +#endif + +#include + +class cmFunctionBlocker; +class cmCommand; +class cmInstallGenerator; +class cmLocalGenerator; +class cmMakeDepend; +class cmSourceFile; +class cmTest; +class cmVariableWatch; +class cmake; +class cmMakefileCall; + +/** \class cmMakefile + * \brief Process the input CMakeLists.txt file. + * + * Process and store into memory the input CMakeLists.txt file. + * Each CMakeLists.txt file is parsed and the commands found there + * are added into the build process. + */ +class cmMakefile +{ +public: + /** + * Return the major and minor version of the cmake that + * was used to write the currently loaded cache, note + * this method will not work before the cache is loaded. + */ + unsigned int GetCacheMajorVersion(); + unsigned int GetCacheMinorVersion(); + + /** Return whether compatibility features needed for a version of + the cache or lower should be enabled. */ + bool NeedCacheCompatibility(int major, int minor); + + /** + * Construct an empty makefile. + */ + cmMakefile(); + cmMakefile(const cmMakefile& mf); + + /** + * Destructor. + */ + ~cmMakefile(); + + /** + * Read and parse a CMakeLists.txt file. + */ + bool ReadListFile(const char* listfile, + const char* external= 0, + std::string* fullPath= 0); + + /** + * Add a function blocker to this makefile + */ + void AddFunctionBlocker(cmFunctionBlocker *fb) + { this->FunctionBlockers.push_back(fb);} + void RemoveFunctionBlocker(cmFunctionBlocker *fb) + { this->FunctionBlockers.remove(fb);} + void RemoveFunctionBlocker(const cmListFileFunction& lff); + + /** + * Try running cmake and building a file. This is used for dynalically + * loaded commands, not as part of the usual build process. + */ + int TryCompile(const char *srcdir, const char *bindir, + const char *projectName, const char *targetName, + const std::vector *cmakeArgs, + std::string *output); + + /** + * Specify the makefile generator. This is platform/compiler + * dependent, although the interface is through a generic + * superclass. + */ + void SetLocalGenerator(cmLocalGenerator*); + + ///! Get the current makefile generator. + cmLocalGenerator* GetLocalGenerator() + { return this->LocalGenerator;} + + /** + * Test whether compatibility is set to a given version or lower. + */ + bool NeedBackwardsCompatibility(unsigned int major, + unsigned int minor, + unsigned int patch = 0xFFu); + + /** + * Help enforce global target name uniqueness. + */ + bool EnforceUniqueName(std::string const& name, std::string& msg, + bool isCustom = false); + + /** + * Perform FinalPass, Library dependency analysis etc before output of the + * makefile. + */ + void ConfigureFinalPass(); + + /** + * run the final pass on all commands. + */ + void FinalPass(); + + /** + * Print the object state to std::cout. + */ + void Print(); + + /** Add a custom command to the build. */ + void AddCustomCommandToTarget(const char* target, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + cmTarget::CustomCommandType type, + const char* comment, const char* workingDir, + bool escapeOldStyle = true); + void AddCustomCommandToOutput(const std::vector& outputs, + const std::vector& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, const char* workingDir, + bool replace = false, + bool escapeOldStyle = true); + void AddCustomCommandToOutput(const char* output, + const std::vector& depends, + const char* main_dependency, + const cmCustomCommandLines& commandLines, + const char* comment, const char* workingDir, + bool replace = false, + bool escapeOldStyle = true); + void AddCustomCommandOldStyle(const char* target, + const std::vector& outputs, + const std::vector& depends, + const char* source, + const cmCustomCommandLines& commandLines, + const char* comment); + + /** + * Add a define flag to the build. + */ + void AddDefineFlag(const char* definition); + void RemoveDefineFlag(const char* definition); + + /** Create a new imported target with the name and type given. */ + cmTarget* AddImportedTarget(const char* name, cmTarget::TargetType type); + + cmTarget* AddNewTarget(cmTarget::TargetType type, const char* name); + + /** + * Add an executable to the build. + */ + cmTarget* AddExecutable(const char *exename, + const std::vector &srcs, + bool excludeFromAll = false); + + /** + * Add a utility to the build. A utiltity target is a command that + * is run every time the target is built. + */ + void AddUtilityCommand(const char* utilityName, bool excludeFromAll, + const std::vector& depends, + const char* workingDirectory, + const char* command, + const char* arg1=0, + const char* arg2=0, + const char* arg3=0, + const char* arg4=0); + void AddUtilityCommand(const char* utilityName, bool excludeFromAll, + const char* workingDirectory, + const std::vector& depends, + const cmCustomCommandLines& commandLines, + bool escapeOldStyle = true, + const char* comment = 0); + + /** + * Add a link library to the build. + */ + void AddLinkLibrary(const char*); + void AddLinkLibrary(const char*, cmTarget::LinkLibraryType type); + void AddLinkLibraryForTarget(const char *tgt, const char*, + cmTarget::LinkLibraryType type); + void AddLinkDirectoryForTarget(const char *tgt, const char* d); + + /** + * Add a link directory to the build. + */ + void AddLinkDirectory(const char*); + + /** + * Get the list of link directories + */ + std::vector& GetLinkDirectories() + { + return this->LinkDirectories; + } + const std::vector& GetLinkDirectories() const + { + return this->LinkDirectories; + } + void SetLinkDirectories(const std::vector& vec) + { + this->LinkDirectories = vec; + } + + /** + * Add a subdirectory to the build. + */ + void AddSubDirectory(const char*, bool excludeFromAll=false, + bool preorder = false); + void AddSubDirectory(const char* fullSrcDir,const char *fullBinDir, + bool excludeFromAll, bool preorder, + bool immediate); + + /** + * Configure a subdirectory + */ + void ConfigureSubDirectory(cmLocalGenerator *); + + /** + * Add an include directory to the build. + */ + void AddIncludeDirectory(const char*, bool before = false); + + /** + * Add a variable definition to the build. This variable + * can be used in CMake to refer to lists, directories, etc. + */ + void AddDefinition(const char* name, const char* value); + ///! Add a definition to this makefile and the global cmake cache. + void AddCacheDefinition(const char* name, const char* value, + const char* doc, + cmCacheManager::CacheEntryType type); + + /** + * Add bool variable definition to the build. + */ + void AddDefinition(const char* name, bool); + ///! Add a definition to this makefile and the global cmake cache. + void AddCacheDefinition(const char* name, bool, const char* doc); + + /** + * Remove a variable definition from the build. This is not valid + * for cache entries, and will only affect the current makefile. + */ + void RemoveDefinition(const char* name); + + /** + * Specify the name of the project for this build. + */ + void SetProjectName(const char*); + + /** + * Get the name of the project for this build. + */ + const char* GetProjectName() const + { + return this->ProjectName.c_str(); + } + + /** + * Set the name of the library. + */ + void AddLibrary(const char *libname, cmTarget::TargetType type, + const std::vector &srcs, + bool excludeFromAll = false); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + /** + * Add a root source group for consideration when adding a new source. + */ + void AddSourceGroup(const char* name, const char* regex=0); + + /** + * Add a source group for consideration when adding a new source. + * name is tokenized. + */ + void AddSourceGroup(const std::vector& name, + const char* regex=0); + +#endif + + //@{ + /** + * Set, Push, Pop policy values for CMake. + */ + bool SetPolicy(cmPolicies::PolicyID id, cmPolicies::PolicyStatus status); + bool SetPolicy(const char *id, cmPolicies::PolicyStatus status); + cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id); + bool PushPolicy(); + bool PopPolicy(bool reportError = true); + bool SetPolicyVersion(const char *version); + //@} + + /** + * Get the Policies Instance + */ + cmPolicies *GetPolicies(); + + /** + * Add an auxiliary directory to the build. + */ + void AddExtraDirectory(const char* dir); + + + /** + * Add an auxiliary directory to the build. + */ + void MakeStartDirectoriesCurrent() + { + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->cmStartDirectory.c_str()); + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->StartOutputDirectory.c_str()); + } + + //@{ + /** + * Set/Get the home directory (or output directory) in the project. The + * home directory is the top directory of the project. It is where + * CMakeSetup or configure was run. Remember that CMake processes + * CMakeLists files by recursing up the tree starting at the StartDirectory + * and going up until it reaches the HomeDirectory. + */ + void SetHomeDirectory(const char* dir); + const char* GetHomeDirectory() const + { + return this->cmHomeDirectory.c_str(); + } + void SetHomeOutputDirectory(const char* lib); + const char* GetHomeOutputDirectory() const + { + return this->HomeOutputDirectory.c_str(); + } + //@} + + //@{ + /** + * Set/Get the start directory (or output directory). The start directory + * is the directory of the CMakeLists.txt file that started the current + * round of processing. Remember that CMake processes CMakeLists files by + * recursing up the tree starting at the StartDirectory and going up until + * it reaches the HomeDirectory. + */ + void SetStartDirectory(const char* dir) + { + this->cmStartDirectory = dir; + cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); + this->cmStartDirectory = + cmSystemTools::CollapseFullPath(this->cmStartDirectory.c_str()); + this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", + this->cmStartDirectory.c_str()); + } + const char* GetStartDirectory() const + { + return this->cmStartDirectory.c_str(); + } + void SetStartOutputDirectory(const char* lib) + { + this->StartOutputDirectory = lib; + cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); + this->StartOutputDirectory = + cmSystemTools::CollapseFullPath(this->StartOutputDirectory.c_str()); + cmSystemTools::MakeDirectory(this->StartOutputDirectory.c_str()); + this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", + this->StartOutputDirectory.c_str()); + } + const char* GetStartOutputDirectory() const + { + return this->StartOutputDirectory.c_str(); + } + //@} + + const char* GetCurrentDirectory() const + { + return this->cmStartDirectory.c_str(); + } + const char* GetCurrentOutputDirectory() const + { + return this->StartOutputDirectory.c_str(); + } + + /* Get the current CMakeLists.txt file that is being processed. This + * is just used in order to be able to 'branch' from one file to a second + * transparently */ + const char* GetCurrentListFile() const + { + return this->cmCurrentListFile.c_str(); + } + + //@} + + /** + * Set a regular expression that include files must match + * in order to be considered as part of the depend information. + */ + void SetIncludeRegularExpression(const char* regex) + { + this->IncludeFileRegularExpression = regex; + } + const char* GetIncludeRegularExpression() + { + return this->IncludeFileRegularExpression.c_str(); + } + + /** + * Set a regular expression that include files that are not found + * must match in order to be considered a problem. + */ + void SetComplainRegularExpression(const char* regex) + { + this->ComplainFileRegularExpression = regex; + } + const char* GetComplainRegularExpression() + { + return this->ComplainFileRegularExpression.c_str(); + } + + /** + * Get the list of targets + */ + cmTargets &GetTargets() { return this->Targets; } + /** + * Get the list of targets, const version + */ + const cmTargets &GetTargets() const { return this->Targets; } + + cmTarget* FindTarget(const char* name); + + /** Find a target to use in place of the given name. The target + returned may be imported or built within the project. */ + cmTarget* FindTargetToUse(const char* name); + + /** + * Get a list of include directories in the build. + */ + std::vector& GetIncludeDirectories() + { + return this->IncludeDirectories; + } + const std::vector& GetIncludeDirectories() const + { + return this->IncludeDirectories; + } + void SetIncludeDirectories(const std::vector& vec) + { + this->IncludeDirectories = vec; + } + + /** + * Mark include directories as system directories. + */ + void AddSystemIncludeDirectory(const char* dir); + bool IsSystemIncludeDirectory(const char* dir); + + /** Expand out any arguements in the vector that have ; separated + * strings into multiple arguements. A new vector is created + * containing the expanded versions of all arguments in argsIn. + * This method differes from the one in cmSystemTools in that if + * the CmakeLists file is version 1.2 or earlier it will check for + * source lists being used without ${} around them + */ + void ExpandSourceListArguments(std::vector const& argsIn, + std::vector& argsOut, + unsigned int startArgumentIndex); + + /** Get a cmSourceFile pointer for a given source name, if the name is + * not found, then a null pointer is returned. + */ + cmSourceFile* GetSource(const char* sourceName); + + /** Get a cmSourceFile pointer for a given source name, if the name is + * not found, then create the source file and return it. generated + * indicates if it is a generated file, this is used in determining + * how to create the source file instance e.g. name + */ + cmSourceFile* GetOrCreateSource(const char* sourceName, + bool generated = false); + + /** + * Obtain a list of auxiliary source directories. + */ + std::vector& GetAuxSourceDirectories() + {return this->AuxSourceDirectories;} + + //@{ + /** + * Return a list of extensions associated with source and header + * files + */ + const std::vector& GetSourceExtensions() const + {return this->SourceFileExtensions;} + const std::vector& GetHeaderExtensions() const + {return this->HeaderFileExtensions;} + //@} + + /** + * Given a variable name, return its value (as a string). + * If the variable is not found in this makefile instance, the + * cache is then queried. + */ + const char* GetDefinition(const char*) const; + const char* GetSafeDefinition(const char*) const; + const char* GetRequiredDefinition(const char* name) const; + bool IsDefinitionSet(const char*) const; + /** + * Get the list of all variables in the current space. If argument + * cacheonly is specified and is greater than 0, then only cache + * variables will be listed. + */ + std::vector GetDefinitions(int cacheonly=0) const; + + /** Test a boolean cache entry to see if it is true or false, + * returns false if no entry defined. + */ + bool IsOn(const char* name) const; + bool IsSet(const char* name) const; + + /** + * Get a list of preprocessor define flags. + */ + const char* GetDefineFlags() + {return this->DefineFlags.c_str();} + + /** + * Make sure CMake can write this file + */ + bool CanIWriteThisFile(const char* fileName); + + /** + * Get the vector of used command instances. + */ + const std::vector& GetUsedCommands() const + {return this->UsedCommands;} + +#if defined(CMAKE_BUILD_WITH_CMAKE) + /** + * Get the vector source groups. + */ + const std::vector& GetSourceGroups() const + { return this->SourceGroups; } + + /** + * Get the source group + */ + cmSourceGroup* GetSourceGroup(const std::vector&name); +#endif + + /** + * Get the vector of list files on which this makefile depends + */ + const std::vector& GetListFiles() const + { return this->ListFiles; } + ///! When the file changes cmake will be re-run from the build system. + void AddCMakeDependFile(const char* file) + { this->ListFiles.push_back(file);} + + /** + * Get the list file stack as a string + */ + std::string GetListFileStack(); + + /** + * Get the current context backtrace. + */ + bool GetBacktrace(cmListFileBacktrace& backtrace) const; + + /** + * Get the vector of files created by this makefile + */ + const std::vector& GetOutputFiles() const + { return this->OutputFiles; } + void AddCMakeOutputFile(const char* file) + { this->OutputFiles.push_back(file);} + + /** + * Expand all defined variables in the string. + * Defined variables come from the this->Definitions map. + * They are expanded with ${var} where var is the + * entry in the this->Definitions map. Also @var@ is + * expanded to match autoconf style expansions. + */ + const char *ExpandVariablesInString(std::string& source); + const char *ExpandVariablesInString(std::string& source, bool escapeQuotes, + bool noEscapes, + bool atOnly = false, + const char* filename = 0, + long line = -1, + bool removeEmpty = false, + bool replaceAt = true); + + /** + * Remove any remaining variables in the string. Anything with ${var} or + * @var@ will be removed. + */ + void RemoveVariablesInString(std::string& source, + bool atOnly = false) const; + + /** + * Expand variables in the makefiles ivars such as link directories etc + */ + void ExpandVariables(); + + /** + * Replace variables and #cmakedefine lines in the given string. + * See cmConfigureFileCommand for details. + */ + void ConfigureString(const std::string& input, std::string& output, + bool atOnly, bool escapeQuotes); + + /** + * Copy file but change lines acording to ConfigureString + */ + int ConfigureFile(const char* infile, const char* outfile, + bool copyonly, bool atOnly, bool escapeQuotes); + +#if defined(CMAKE_BUILD_WITH_CMAKE) + /** + * find what source group this source is in + */ + cmSourceGroup& FindSourceGroup(const char* source, + std::vector &groups); +#endif + + void RegisterData(cmData*); + void RegisterData(const char*, cmData*); + cmData* LookupData(const char*) const; + + /** + * Execute a single CMake command. Returns true if the command + * succeeded or false if it failed. + */ + bool ExecuteCommand(const cmListFileFunction& lff, + cmExecutionStatus &status); + + /** Check if a command exists. */ + bool CommandExists(const char* name) const; + + /** + * Add a command to this cmake instance + */ + void AddCommand(cmCommand* ); + + ///! Enable support for named language, if nil then all languages are + ///enabled. + void EnableLanguage(std::vectorconst& languages, bool optional); + + /** + * Set/Get the name of the parent directories CMakeLists file + * given a current CMakeLists file name + */ + cmCacheManager *GetCacheManager() const; + + /** + * Get the variable watch. This is used to determine when certain variables + * are accessed. + */ +#ifdef CMAKE_BUILD_WITH_CMAKE + cmVariableWatch* GetVariableWatch() const; +#endif + + ///! Display progress or status message. + void DisplayStatus(const char*, float); + + /** + * Expand the given list file arguments into the full set after + * variable replacement and list expansion. + */ + void ExpandArguments(std::vector const& inArgs, + std::vector& outArgs); + /** + * Get the instance + */ + cmake *GetCMakeInstance() const; + + /** + * Get all the source files this makefile knows about + */ + const std::vector &GetSourceFiles() const + {return this->SourceFiles;} + std::vector &GetSourceFiles() {return this->SourceFiles;} + + /** + * Is there a source file that has the provided source file as an output? + * if so then return it + */ + cmSourceFile *GetSourceFileWithOutput(const char *outName); + + /** + * Add a macro to the list of macros. The arguments should be name of the + * macro and a documentation signature of it + */ + void AddMacro(const char* name, const char* signature); + + ///! Add a new cmTest to the list of tests for this makefile. + cmTest* CreateTest(const char* testName); + + /** Get a cmTest pointer for a given test name, if the name is + * not found, then a null pointer is returned. + */ + cmTest* GetTest(const char* testName) const; + const std::vector *GetTests() const; + std::vector *GetTests(); + + /** + * Get a list of macros as a ; separated string + */ + void GetListOfMacros(std::string& macros); + + /** + * Return a location of a file in cmake or custom modules directory + */ + std::string GetModulesFile(const char* name); + + ///! Set/Get a property of this directory + void SetProperty(const char *prop, const char *value); + void AppendProperty(const char *prop, const char *value); + const char *GetProperty(const char *prop); + const char *GetPropertyOrDefinition(const char *prop); + const char *GetProperty(const char *prop, cmProperty::ScopeType scope); + bool GetPropertyAsBool(const char *prop); + + // Get the properties + cmPropertyMap &GetProperties() { return this->Properties; }; + + typedef std::map DefinitionMap; + ///! Initialize a makefile from its parent + void InitializeFromParent(); + + ///! Set/Get the preorder flag + void SetPreOrder(bool p) { this->PreOrder = p; } + bool GetPreOrder() const { return this->PreOrder; } + + void AddInstallGenerator(cmInstallGenerator* g) + { if(g) this->InstallGenerators.push_back(g); } + std::vector& GetInstallGenerators() + { return this->InstallGenerators; } + + // Define the properties + static void DefineProperties(cmake *cm); + + // push and pop variable scopes + void PushScope(); + void PopScope(); + void RaiseScope(const char *var, const char *value); + + void IssueMessage(cmake::MessageType t, + std::string const& text) const; + + /** Set whether or not to report a CMP0000 violation. */ + void SetCheckCMP0000(bool b) { this->CheckCMP0000 = b; } + +protected: + // add link libraries and directories to the target + void AddGlobalLinkInformation(const char* name, cmTarget& target); + + std::string Prefix; + std::vector AuxSourceDirectories; // + + std::string cmStartDirectory; + std::string StartOutputDirectory; + std::string cmHomeDirectory; + std::string HomeOutputDirectory; + std::string cmCurrentListFile; + + std::string ProjectName; // project name + + // libraries, classes, and executables + cmTargets Targets; + std::vector SourceFiles; + + // Tests + std::vector Tests; + + // The include and link-library paths. These may have order + // dependency, so they must be vectors (not set). + std::vector IncludeDirectories; + std::vector LinkDirectories; + + // The set of include directories that are marked as system include + // directories. + std::set SystemIncludeDirectories; + + std::vector ListFiles; // list of command files loaded + std::vector OutputFiles; // list of command files loaded + + + cmTarget::LinkLibraryVectorType LinkLibraries; + + std::vector InstallGenerators; + + std::string IncludeFileRegularExpression; + std::string ComplainFileRegularExpression; + std::vector SourceFileExtensions; + std::vector HeaderFileExtensions; + std::string DefineFlags; + +#if defined(CMAKE_BUILD_WITH_CMAKE) + std::vector SourceGroups; +#endif + + std::vector DefinitionStack; + std::vector UsedCommands; + cmLocalGenerator* LocalGenerator; + bool IsFunctionBlocked(const cmListFileFunction& lff, + cmExecutionStatus &status); + +private: + void Initialize(); + + bool ParseDefineFlag(std::string const& definition, bool remove); + + void ReadSources(std::ifstream& fin, bool t); + friend class cmMakeDepend; // make depend needs direct access + // to the Sources array + void PrintStringVector(const char* s, const + std::vector >& v) const; + void PrintStringVector(const char* s, + const std::vector& v) const; + + void AddDefaultDefinitions(); + std::list FunctionBlockers; + + typedef std::map DataMapType; + DataMapType DataMap; + + typedef std::map StringStringMap; + StringStringMap MacrosMap; + + std::map SubDirectoryOrder; + // used in AddDefinition for performance improvement + DefinitionMap::key_type TemporaryDefinitionKey; + + cmsys::RegularExpression cmDefineRegex; + cmsys::RegularExpression cmDefine01Regex; + cmsys::RegularExpression cmAtVarRegex; + + cmPropertyMap Properties; + + // should this makefile be processed before or after processing the parent + bool PreOrder; + + // stack of list files being read + std::deque ListFileStack; + + // stack of commands being invoked. + struct CallStackEntry + { + cmListFileContext const* Context; + cmExecutionStatus* Status; + }; + typedef std::deque CallStackType; + CallStackType CallStack; + friend class cmMakefileCall; + + cmTarget* FindBasicTarget(const char* name); + std::vector ImportedTargetsOwned; + std::map ImportedTargets; + + // stack of policy settings + typedef std::map PolicyMap; + std::vector PolicyStack; + + bool CheckCMP0000; + + // Enforce rules about CMakeLists.txt files. + void EnforceDirectoryLevelRules(bool endScopeNicely); +}; + + +#endif diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx new file mode 100644 index 000000000..7934d564f --- /dev/null +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -0,0 +1,514 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileExecutableTargetGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:50 $ + Version: $Revision: 1.46.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakefileExecutableTargetGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmTarget.h" +#include "cmake.h" + +//---------------------------------------------------------------------------- +cmMakefileExecutableTargetGenerator +::cmMakefileExecutableTargetGenerator(cmTarget* target): + cmMakefileTargetGenerator(target) +{ + this->CustomCommandDriver = OnDepends; + this->Target->GetExecutableNames( + this->TargetNameOut, this->TargetNameReal, this->TargetNameImport, + this->TargetNamePDB, this->LocalGenerator->ConfigurationName.c_str()); + + if(this->Target->IsAppBundleOnApple()) + { + this->MacContentDirectory = this->Target->GetDirectory(); + this->MacContentDirectory += "/"; + this->MacContentDirectory += this->TargetNameOut; + this->MacContentDirectory += ".app/Contents/"; + } +} + +//---------------------------------------------------------------------------- +void cmMakefileExecutableTargetGenerator::WriteRuleFiles() +{ + // create the build.make file and directory, put in the common blocks + this->CreateRuleFile(); + + // write rules used to help build object files + this->WriteCommonCodeRules(); + + // write in rules for object files and custom commands + this->WriteTargetBuildRules(); + + // write the per-target per-language flags + this->WriteTargetLanguageFlags(); + + // write the link rules + this->WriteExecutableRule(false); + if(this->Target->NeedRelinkBeforeInstall()) + { + // Write rules to link an installable version of the target. + this->WriteExecutableRule(true); + } + + // Write the requires target. + this->WriteTargetRequiresRules(); + + // Write clean target + this->WriteTargetCleanRules(); + + // Write the dependency generation rule. This must be done last so + // that multiple output pair information is available. + this->WriteTargetDependRules(); + + // close the streams + this->CloseFileStreams(); +} + + + +//---------------------------------------------------------------------------- +void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) +{ + std::vector commands; + + std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath(); + std::string objTarget; + + // Build list of dependencies. + std::vector depends; + for(std::vector::const_iterator obj = this->Objects.begin(); + obj != this->Objects.end(); ++obj) + { + objTarget = relPath; + objTarget += *obj; + depends.push_back(objTarget); + } + + // Add dependencies on targets that must be built first. + this->AppendTargetDepends(depends); + + // Add a dependency on the rule file itself. + this->LocalGenerator->AppendRuleDepend(depends, + this->BuildFileNameFull.c_str()); + + for(std::vector::const_iterator obj = + this->ExternalObjects.begin(); + obj != this->ExternalObjects.end(); ++obj) + { + depends.push_back(*obj); + } + + // from here up is the same for exe or lib + + // Get the name of the executable to generate. + std::string targetName; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + this->Target->GetExecutableNames + (targetName, targetNameReal, targetNameImport, targetNamePDB, + this->LocalGenerator->ConfigurationName.c_str()); + + // Construct the full path version of the names. + std::string outpath = this->Target->GetDirectory(); + outpath += "/"; + if(this->Target->IsAppBundleOnApple()) + { + this->CreateAppBundle(targetName, outpath); + } + std::string outpathImp; + if(relink) + { + outpath = this->Makefile->GetStartOutputDirectory(); + outpath += cmake::GetCMakeFilesDirectory(); + outpath += "/CMakeRelink.dir"; + cmSystemTools::MakeDirectory(outpath.c_str()); + outpath += "/"; + if(!targetNameImport.empty()) + { + outpathImp = outpath; + } + } + else + { + cmSystemTools::MakeDirectory(outpath.c_str()); + if(!targetNameImport.empty()) + { + outpathImp = this->Target->GetDirectory(0, true); + cmSystemTools::MakeDirectory(outpathImp.c_str()); + outpathImp += "/"; + } + } + std::string targetFullPath = outpath + targetName; + std::string targetFullPathReal = outpath + targetNameReal; + std::string targetFullPathPDB = outpath + targetNamePDB; + std::string targetFullPathImport = outpathImp + targetNameImport; + std::string targetOutPathPDB = + this->Convert(targetFullPathPDB.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + // Convert to the output path to use in constructing commands. + std::string targetOutPath = + this->Convert(targetFullPath.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + std::string targetOutPathReal = + this->Convert(targetFullPathReal.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + std::string targetOutPathImport = + this->Convert(targetFullPathImport.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + + // Get the language to use for linking this executable. + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + + // Make sure we have a link language. + if(!linkLanguage) + { + cmSystemTools::Error("Cannot determine link language for target \"", + this->Target->GetName(), "\"."); + return; + } + + // Add the link message. + std::string buildEcho = "Linking "; + buildEcho += linkLanguage; + buildEcho += " executable "; + buildEcho += targetOutPath; + this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoLink); + + // Build a list of compiler flags and linker flags. + std::string flags; + std::string linkFlags; + + // Add flags to deal with shared libraries. Any library being + // linked in might be shared, so always use shared flags for an + // executable. + this->LocalGenerator->AddSharedFlags(linkFlags, linkLanguage, true); + + // Add flags to create an executable. + this->LocalGenerator-> + AddConfigVariableFlags(linkFlags, "CMAKE_EXE_LINKER_FLAGS", + this->LocalGenerator->ConfigurationName.c_str()); + + + if(this->Target->GetPropertyAsBool("WIN32_EXECUTABLE")) + { + this->LocalGenerator->AppendFlags + (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_WIN32_EXE")); + } + else + { + this->LocalGenerator->AppendFlags + (linkFlags, this->Makefile->GetDefinition("CMAKE_CREATE_CONSOLE_EXE")); + } + + // Add symbol export flags if necessary. + if(this->Target->IsExecutableWithExports()) + { + std::string export_flag_var = "CMAKE_EXE_EXPORTS_"; + export_flag_var += linkLanguage; + export_flag_var += "_FLAG"; + this->LocalGenerator->AppendFlags + (linkFlags, this->Makefile->GetDefinition(export_flag_var.c_str())); + } + + // Add language-specific flags. + this->LocalGenerator + ->AddLanguageFlags(flags, linkLanguage, + this->LocalGenerator->ConfigurationName.c_str()); + + // Add target-specific linker flags. + this->LocalGenerator->AppendFlags + (linkFlags, this->Target->GetProperty("LINK_FLAGS")); + std::string linkFlagsConfig = "LINK_FLAGS_"; + linkFlagsConfig += + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str()); + this->LocalGenerator->AppendFlags + (linkFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + + // Construct a list of files associated with this executable that + // may need to be cleaned. + std::vector exeCleanFiles; + { + std::string cleanName; + std::string cleanRealName; + std::string cleanImportName; + std::string cleanPDBName; + this->Target->GetExecutableCleanNames + (cleanName, cleanRealName, cleanImportName, cleanPDBName, + this->LocalGenerator->ConfigurationName.c_str()); + + std::string cleanFullName = outpath + cleanName; + std::string cleanFullRealName = outpath + cleanRealName; + std::string cleanFullPDBName = outpath + cleanPDBName; + std::string cleanFullImportName = outpathImp + cleanImportName; + exeCleanFiles.push_back(this->Convert(cleanFullName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); +#ifdef _WIN32 + // There may be a manifest file for this target. Add it to the + // clean set just in case. + exeCleanFiles.push_back(this->Convert((cleanFullName+".manifest").c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); +#endif + if(cleanRealName != cleanName) + { + exeCleanFiles.push_back(this->Convert(cleanFullRealName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(!cleanImportName.empty()) + { + exeCleanFiles.push_back(this->Convert(cleanFullImportName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + + // List the PDB for cleaning only when the whole target is + // cleaned. We do not want to delete the .pdb file just before + // linking the target. + this->CleanFiles.push_back + (this->Convert(cleanFullPDBName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + + // Add the pre-build and pre-link rules building but not when relinking. + if(!relink) + { + this->LocalGenerator + ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands()); + this->LocalGenerator + ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands()); + } + + // Determine whether a link script will be used. + bool useLinkScript = this->GlobalGenerator->GetUseLinkScript(); + + // Construct the main link rule. + std::vector real_link_commands; + std::string linkRuleVar = "CMAKE_"; + linkRuleVar += linkLanguage; + linkRuleVar += "_LINK_EXECUTABLE"; + std::string linkRule = + this->Makefile->GetRequiredDefinition(linkRuleVar.c_str()); + std::vector commands1; + cmSystemTools::ExpandListArgument(linkRule, real_link_commands); + if(this->Target->IsExecutableWithExports()) + { + // If a separate rule for creating an import library is specified + // add it now. + std::string implibRuleVar = "CMAKE_"; + implibRuleVar += linkLanguage; + implibRuleVar += "_CREATE_IMPORT_LIBRARY"; + if(const char* rule = + this->Makefile->GetDefinition(implibRuleVar.c_str())) + { + cmSystemTools::ExpandListArgument(rule, real_link_commands); + } + } + + // Select whether to use a response file for objects. + bool useResponseFile = false; + { + std::string responseVar = "CMAKE_"; + responseVar += linkLanguage; + responseVar += "_USE_RESPONSE_FILE_FOR_OBJECTS"; + if(this->Makefile->IsOn(responseVar.c_str())) + { + useResponseFile = true; + } + } + + // Expand the rule variables. + { + // Set path conversion for link script shells. + this->LocalGenerator->SetLinkScriptShell(useLinkScript); + + // Collect up flags to link in needed libraries. + cmOStringStream linklibs; + this->LocalGenerator->OutputLinkLibraries(linklibs, *this->Target, relink); + + // Construct object file lists that may be needed to expand the + // rule. + std::string variableName; + std::string variableNameExternal; + this->WriteObjectsVariable(variableName, variableNameExternal); + std::string buildObjs; + if(useResponseFile) + { + std::string objects; + this->WriteObjectsString(objects); + std::string objects_rsp = + this->CreateResponseFile("objects.rsp", objects, depends); + buildObjs = "@"; + buildObjs += this->Convert(objects_rsp.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + } + else if(useLinkScript) + { + this->WriteObjectsString(buildObjs); + } + else + { + buildObjs = "$("; + buildObjs += variableName; + buildObjs += ") $("; + buildObjs += variableNameExternal; + buildObjs += ")"; + } + std::string cleanObjs = "$("; + cleanObjs += variableName; + cleanObjs += ")"; + + cmLocalGenerator::RuleVariables vars; + vars.Language = linkLanguage; + vars.Objects = buildObjs.c_str(); + vars.Target = targetOutPathReal.c_str(); + vars.TargetPDB = targetOutPathPDB.c_str(); + + // Setup the target version. + std::string targetVersionMajor; + std::string targetVersionMinor; + { + cmOStringStream majorStream; + cmOStringStream minorStream; + int major; + int minor; + this->Target->GetTargetVersion(major, minor); + majorStream << major; + minorStream << minor; + targetVersionMajor = majorStream.str(); + targetVersionMinor = minorStream.str(); + } + vars.TargetVersionMajor = targetVersionMajor.c_str(); + vars.TargetVersionMinor = targetVersionMinor.c_str(); + + std::string linkString = linklibs.str(); + vars.LinkLibraries = linkString.c_str(); + vars.Flags = flags.c_str(); + vars.LinkFlags = linkFlags.c_str(); + // Expand placeholders in the commands. + this->LocalGenerator->TargetImplib = targetOutPathImport; + for(std::vector::iterator i = real_link_commands.begin(); + i != real_link_commands.end(); ++i) + { + this->LocalGenerator->ExpandRuleVariables(*i, vars); + } + this->LocalGenerator->TargetImplib = ""; + + // Restore path conversion to normal shells. + this->LocalGenerator->SetLinkScriptShell(false); + } + + // Optionally convert the build rule to use a script to avoid long + // command lines in the make shell. + if(useLinkScript) + { + // Use a link script. + const char* name = (relink? "relink.txt" : "link.txt"); + this->CreateLinkScript(name, real_link_commands, commands1, depends); + } + else + { + // No link script. Just use the link rule directly. + commands1 = real_link_commands; + } + this->LocalGenerator->CreateCDCommand + (commands1, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), commands1.begin(), commands1.end()); + commands1.clear(); + + // Add a rule to create necessary symlinks for the library. + if(targetOutPath != targetOutPathReal) + { + std::string symlink = "$(CMAKE_COMMAND) -E cmake_symlink_executable "; + symlink += targetOutPathReal; + symlink += " "; + symlink += targetOutPath; + commands1.push_back(symlink); + this->LocalGenerator->CreateCDCommand(commands1, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), commands1.begin(), commands1.end()); + commands1.clear(); + } + + // Add the post-build rules when building but not when relinking. + if(!relink) + { + this->LocalGenerator-> + AppendCustomCommands(commands, this->Target->GetPostBuildCommands()); + } + + // Write the build rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, + 0, + targetFullPathReal.c_str(), + depends, commands, false); + + // The symlink name for the target should depend on the real target + // so if the target version changes it rebuilds and recreates the + // symlink. + if(targetFullPath != targetFullPathReal) + { + depends.clear(); + commands.clear(); + depends.push_back(targetFullPathReal.c_str()); + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + targetFullPath.c_str(), + depends, commands, false); + } + + // Write the main driver rule to build everything in this target. + this->WriteTargetDriverRule(targetFullPath.c_str(), relink); + + // Clean all the possible executable names and symlinks. + this->CleanFiles.insert(this->CleanFiles.end(), + exeCleanFiles.begin(), + exeCleanFiles.end()); +} + +//---------------------------------------------------------------------------- +void +cmMakefileExecutableTargetGenerator::CreateAppBundle(std::string& targetName, + std::string& outpath) +{ + // Compute bundle directory names. + outpath = this->MacContentDirectory; + outpath += "MacOS"; + cmSystemTools::MakeDirectory(outpath.c_str()); + outpath += "/"; + + // Configure the Info.plist file. Note that it needs the executable name + // to be set. + std::string plist = this->MacContentDirectory + "Info.plist"; + this->LocalGenerator->GenerateAppleInfoPList(this->Target, + targetName.c_str(), + plist.c_str()); +} diff --git a/Source/cmMakefileExecutableTargetGenerator.h b/Source/cmMakefileExecutableTargetGenerator.h new file mode 100644 index 000000000..1ab8a24b2 --- /dev/null +++ b/Source/cmMakefileExecutableTargetGenerator.h @@ -0,0 +1,36 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileExecutableTargetGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-18 21:38:34 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakefileExecutableTargetGenerator_h +#define cmMakefileExecutableTargetGenerator_h + +#include "cmMakefileTargetGenerator.h" + +class cmMakefileExecutableTargetGenerator: public cmMakefileTargetGenerator +{ +public: + cmMakefileExecutableTargetGenerator(cmTarget* target); + + /* the main entry point for this class. Writes the Makefiles associated + with this target */ + virtual void WriteRuleFiles(); + +protected: + virtual void WriteExecutableRule(bool relink); + void CreateAppBundle(std::string& targetName, std::string& outpath); +}; + +#endif diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx new file mode 100644 index 000000000..5552293e4 --- /dev/null +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -0,0 +1,907 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileLibraryTargetGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:52 $ + Version: $Revision: 1.58.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakefileLibraryTargetGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmTarget.h" +#include "cmake.h" + +#include // auto_ptr + +//---------------------------------------------------------------------------- +cmMakefileLibraryTargetGenerator +::cmMakefileLibraryTargetGenerator(cmTarget* target): + cmMakefileTargetGenerator(target) +{ + this->CustomCommandDriver = OnDepends; + this->Target->GetLibraryNames( + this->TargetNameOut, this->TargetNameSO, this->TargetNameReal, + this->TargetNameImport, this->TargetNamePDB, + this->LocalGenerator->ConfigurationName.c_str()); + + if(this->Target->IsFrameworkOnApple()) + { + this->FrameworkVersion = this->Target->GetFrameworkVersion(); + this->MacContentDirectory = this->Target->GetDirectory(); + this->MacContentDirectory += "/"; + this->MacContentDirectory += this->TargetNameOut; + this->MacContentDirectory += ".framework/Versions/"; + this->MacContentDirectory += this->FrameworkVersion; + this->MacContentDirectory += "/"; + } +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteRuleFiles() +{ + // create the build.make file and directory, put in the common blocks + this->CreateRuleFile(); + + // write rules used to help build object files + this->WriteCommonCodeRules(); + + // write in rules for object files and custom commands + this->WriteTargetBuildRules(); + + // write the per-target per-language flags + this->WriteTargetLanguageFlags(); + + // write the link rules + // Write the rule for this target type. + switch(this->Target->GetType()) + { + case cmTarget::STATIC_LIBRARY: + this->WriteStaticLibraryRules(); + break; + case cmTarget::SHARED_LIBRARY: + this->WriteSharedLibraryRules(false); + if(this->Target->NeedRelinkBeforeInstall()) + { + // Write rules to link an installable version of the target. + this->WriteSharedLibraryRules(true); + } + break; + case cmTarget::MODULE_LIBRARY: + this->WriteModuleLibraryRules(false); + if(this->Target->NeedRelinkBeforeInstall()) + { + // Write rules to link an installable version of the target. + this->WriteModuleLibraryRules(true); + } + break; + default: + // If language is not known, this is an error. + cmSystemTools::Error("Unknown Library Type"); + break; + } + + // Write the requires target. + this->WriteTargetRequiresRules(); + + // Write clean target + this->WriteTargetCleanRules(); + + // Write the dependency generation rule. This must be done last so + // that multiple output pair information is available. + this->WriteTargetDependRules(); + + // close the streams + this->CloseFileStreams(); +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules() +{ + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + std::string linkRuleVar = "CMAKE_"; + if (linkLanguage) + { + linkRuleVar += linkLanguage; + } + linkRuleVar += "_CREATE_STATIC_LIBRARY"; + + std::string extraFlags; + this->LocalGenerator->AppendFlags + (extraFlags,this->Target->GetProperty("STATIC_LIBRARY_FLAGS")); + this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), false); +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) +{ + if(this->Target->IsFrameworkOnApple()) + { + this->WriteFrameworkRules(relink); + return; + } + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + std::string linkRuleVar = "CMAKE_"; + if (linkLanguage) + { + linkRuleVar += linkLanguage; + } + linkRuleVar += "_CREATE_SHARED_LIBRARY"; + + std::string extraFlags; + this->LocalGenerator->AppendFlags + (extraFlags, this->Target->GetProperty("LINK_FLAGS")); + std::string linkFlagsConfig = "LINK_FLAGS_"; + linkFlagsConfig += + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str()); + this->LocalGenerator->AppendFlags + (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + + this->LocalGenerator->AddConfigVariableFlags + (extraFlags, "CMAKE_SHARED_LINKER_FLAGS", + this->LocalGenerator->ConfigurationName.c_str()); + if(this->Makefile->IsOn("WIN32") && !(this->Makefile->IsOn("CYGWIN") + || this->Makefile->IsOn("MINGW"))) + { + const std::vector& sources = + this->Target->GetSourceFiles(); + for(std::vector::const_iterator i = sources.begin(); + i != sources.end(); ++i) + { + cmSourceFile* sf = *i; + if(sf->GetExtension() == "def") + { + extraFlags += " "; + extraFlags += + this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG"); + extraFlags += + this->Convert(sf->GetFullPath().c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + } + } + } + this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) +{ + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + std::string linkRuleVar = "CMAKE_"; + if (linkLanguage) + { + linkRuleVar += linkLanguage; + } + linkRuleVar += "_CREATE_SHARED_MODULE"; + + std::string extraFlags; + this->LocalGenerator->AppendFlags(extraFlags, + this->Target->GetProperty("LINK_FLAGS")); + std::string linkFlagsConfig = "LINK_FLAGS_"; + linkFlagsConfig += + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str()); + this->LocalGenerator->AppendFlags + (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + this->LocalGenerator->AddConfigVariableFlags + (extraFlags, "CMAKE_MODULE_LINKER_FLAGS", + this->LocalGenerator->ConfigurationName.c_str()); + + // TODO: .def files should be supported here also. + this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink) +{ + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + std::string linkRuleVar = "CMAKE_"; + if (linkLanguage) + { + linkRuleVar += linkLanguage; + } + linkRuleVar += "_CREATE_MACOSX_FRAMEWORK"; + + std::string extraFlags; + this->LocalGenerator->AppendFlags(extraFlags, + this->Target->GetProperty("LINK_FLAGS")); + std::string linkFlagsConfig = "LINK_FLAGS_"; + linkFlagsConfig += + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName.c_str()); + this->LocalGenerator->AppendFlags + (extraFlags, this->Target->GetProperty(linkFlagsConfig.c_str())); + this->LocalGenerator->AddConfigVariableFlags + (extraFlags, "CMAKE_MACOSX_FRAMEWORK_LINKER_FLAGS", + this->LocalGenerator->ConfigurationName.c_str()); + + // TODO: .def files should be supported here also. + this->WriteLibraryRules(linkRuleVar.c_str(), extraFlags.c_str(), relink); +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::CreateFramework() +{ + // TODO: Use the cmMakefileTargetGenerator::ExtraFiles vector to + // drive rules to create these files at build time. + std::string oldName; + std::string newName; + + // Compute the location of the top-level foo.framework directory. + std::string top = this->Target->GetDirectory(); + top += "/"; + top += this->TargetNameOut; + top += ".framework/"; + + // Make foo.framework/Versions + std::string versions = top; + versions += "Versions"; + cmSystemTools::MakeDirectory(versions.c_str()); + + // Make foo.framework/Versions/version + std::string version = versions; + version += "/"; + version += this->FrameworkVersion; + cmSystemTools::MakeDirectory(version.c_str()); + + // Current -> version + oldName = this->FrameworkVersion; + newName = versions; + newName += "/Current"; + cmSystemTools::RemoveFile(newName.c_str()); + cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); + this->Makefile->AddCMakeOutputFile(newName.c_str()); + + // foo -> Versions/Current/foo + oldName = "Versions/Current/"; + oldName += this->TargetNameOut; + newName = top; + newName += this->TargetNameOut; + cmSystemTools::RemoveFile(newName.c_str()); + cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); + this->Makefile->AddCMakeOutputFile(newName.c_str()); + + // Resources -> Versions/Current/Resources + if(this->MacContentFolders.find("Resources") != + this->MacContentFolders.end()) + { + oldName = "Versions/Current/Resources"; + newName = top; + newName += "Resources"; + cmSystemTools::RemoveFile(newName.c_str()); + cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); + this->Makefile->AddCMakeOutputFile(newName.c_str()); + } + + // Headers -> Versions/Current/Headers + if(this->MacContentFolders.find("Headers") != + this->MacContentFolders.end()) + { + oldName = "Versions/Current/Headers"; + newName = top; + newName += "Headers"; + cmSystemTools::RemoveFile(newName.c_str()); + cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); + this->Makefile->AddCMakeOutputFile(newName.c_str()); + } + + // PrivateHeaders -> Versions/Current/PrivateHeaders + if(this->MacContentFolders.find("PrivateHeaders") != + this->MacContentFolders.end()) + { + oldName = "Versions/Current/PrivateHeaders"; + newName = top; + newName += "PrivateHeaders"; + cmSystemTools::RemoveFile(newName.c_str()); + cmSystemTools::CreateSymlink(oldName.c_str(), newName.c_str()); + this->Makefile->AddCMakeOutputFile(newName.c_str()); + } +} + +//---------------------------------------------------------------------------- +void cmMakefileLibraryTargetGenerator::WriteLibraryRules +(const char* linkRuleVar, const char* extraFlags, bool relink) +{ + // TODO: Merge the methods that call this method to avoid + // code duplication. + std::vector commands; + + std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath(); + std::string objTarget; + + // Build list of dependencies. + std::vector depends; + for(std::vector::const_iterator obj = this->Objects.begin(); + obj != this->Objects.end(); ++obj) + { + objTarget = relPath; + objTarget += *obj; + depends.push_back(objTarget); + } + + // Add dependencies on targets that must be built first. + this->AppendTargetDepends(depends); + + // Add a dependency on the rule file itself. + this->LocalGenerator->AppendRuleDepend(depends, + this->BuildFileNameFull.c_str()); + + for(std::vector::const_iterator obj + = this->ExternalObjects.begin(); + obj != this->ExternalObjects.end(); ++obj) + { + depends.push_back(*obj); + } + + // Get the language to use for linking this library. + const char* linkLanguage = + this->Target->GetLinkerLanguage(this->GlobalGenerator); + + // Make sure we have a link language. + if(!linkLanguage) + { + cmSystemTools::Error("Cannot determine link language for target \"", + this->Target->GetName(), "\"."); + return; + } + + // Create set of linking flags. + std::string linkFlags; + this->LocalGenerator->AppendFlags(linkFlags, extraFlags); + + // Construct the name of the library. + std::string targetName; + std::string targetNameSO; + std::string targetNameReal; + std::string targetNameImport; + std::string targetNamePDB; + this->Target->GetLibraryNames( + targetName, targetNameSO, targetNameReal, targetNameImport, targetNamePDB, + this->LocalGenerator->ConfigurationName.c_str()); + + // Construct the full path version of the names. + std::string outpath; + std::string outpathImp; + if(this->Target->IsFrameworkOnApple()) + { + outpath = this->MacContentDirectory; + this->CreateFramework(); + } + else if(relink) + { + outpath = this->Makefile->GetStartOutputDirectory(); + outpath += cmake::GetCMakeFilesDirectory(); + outpath += "/CMakeRelink.dir"; + cmSystemTools::MakeDirectory(outpath.c_str()); + outpath += "/"; + if(!targetNameImport.empty()) + { + outpathImp = outpath; + } + } + else + { + outpath = this->Target->GetDirectory(); + cmSystemTools::MakeDirectory(outpath.c_str()); + outpath += "/"; + if(!targetNameImport.empty()) + { + outpathImp = this->Target->GetDirectory(0, true); + cmSystemTools::MakeDirectory(outpathImp.c_str()); + outpathImp += "/"; + } + } + + std::string targetFullPath = outpath + targetName; + std::string targetFullPathPDB = outpath + targetNamePDB; + std::string targetFullPathSO = outpath + targetNameSO; + std::string targetFullPathReal = outpath + targetNameReal; + std::string targetFullPathImport = outpathImp + targetNameImport; + + // Construct the output path version of the names for use in command + // arguments. + std::string targetOutPathPDB = + this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + std::string targetOutPath = + this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + std::string targetOutPathSO = + this->Convert(targetFullPathSO.c_str(),cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + std::string targetOutPathReal = + this->Convert(targetFullPathReal.c_str(),cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + std::string targetOutPathImport = + this->Convert(targetFullPathImport.c_str(),cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + + // Add the link message. + std::string buildEcho = "Linking "; + buildEcho += linkLanguage; + const char* forbiddenFlagVar = 0; + switch(this->Target->GetType()) + { + case cmTarget::STATIC_LIBRARY: + buildEcho += " static library "; + break; + case cmTarget::SHARED_LIBRARY: + forbiddenFlagVar = "_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS"; + buildEcho += " shared library "; + break; + case cmTarget::MODULE_LIBRARY: + forbiddenFlagVar = "_CREATE_SHARED_MODULE_FORBIDDEN_FLAGS"; + buildEcho += " shared module "; + break; + default: + buildEcho += " library "; + break; + } + buildEcho += targetOutPath.c_str(); + this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoLink); + + // Construct a list of files associated with this library that may + // need to be cleaned. + std::vector libCleanFiles; + if(this->Target->GetPropertyAsBool("CLEAN_DIRECT_OUTPUT")) + { + // The user has requested that only the files directly built + // by this target be cleaned instead of all possible names. + libCleanFiles.push_back(this->Convert(targetFullPath.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + if(targetNameReal != targetName) + { + libCleanFiles.push_back(this->Convert(targetFullPathReal.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(targetNameSO != targetName && + targetNameSO != targetNameReal) + { + libCleanFiles.push_back(this->Convert(targetFullPathSO.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(!targetNameImport.empty()) + { + libCleanFiles.push_back(this->Convert(targetFullPathImport.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + } + else + { + // This target may switch between static and shared based + // on a user option or the BUILD_SHARED_LIBS switch. Clean + // all possible names. + std::string cleanStaticName; + std::string cleanSharedName; + std::string cleanSharedSOName; + std::string cleanSharedRealName; + std::string cleanImportName; + std::string cleanPDBName; + this->Target->GetLibraryCleanNames( + cleanStaticName, + cleanSharedName, + cleanSharedSOName, + cleanSharedRealName, + cleanImportName, + cleanPDBName, + this->LocalGenerator->ConfigurationName.c_str()); + std::string cleanFullStaticName = outpath + cleanStaticName; + std::string cleanFullSharedName = outpath + cleanSharedName; + std::string cleanFullSharedSOName = outpath + cleanSharedSOName; + std::string cleanFullSharedRealName = outpath + cleanSharedRealName; + std::string cleanFullImportName = outpathImp + cleanImportName; + std::string cleanFullPDBName = outpath + cleanPDBName; + libCleanFiles.push_back + (this->Convert(cleanFullStaticName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + if(cleanSharedRealName != cleanStaticName) + { + libCleanFiles.push_back(this->Convert(cleanFullSharedRealName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(cleanSharedSOName != cleanStaticName && + cleanSharedSOName != cleanSharedRealName) + { + libCleanFiles.push_back(this->Convert(cleanFullSharedSOName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(cleanSharedName != cleanStaticName && + cleanSharedName != cleanSharedSOName && + cleanSharedName != cleanSharedRealName) + { + libCleanFiles.push_back(this->Convert(cleanFullSharedName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + if(!cleanImportName.empty()) + { + libCleanFiles.push_back(this->Convert(cleanFullImportName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + + // List the PDB for cleaning only when the whole target is + // cleaned. We do not want to delete the .pdb file just before + // linking the target. + this->CleanFiles.push_back + (this->Convert(cleanFullPDBName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + +#ifdef _WIN32 + // There may be a manifest file for this target. Add it to the + // clean set just in case. + if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) + { + libCleanFiles.push_back( + this->Convert((targetFullPath+".manifest").c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } +#endif + + std::vector commands1; + // Add a command to remove any existing files for this library. + // for static libs only + if(this->Target->GetType() == cmTarget::STATIC_LIBRARY) + { + this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles, + *this->Target, "target"); + this->LocalGenerator->CreateCDCommand + (commands1, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), commands1.begin(), commands1.end()); + commands1.clear(); + } + + // Add the pre-build and pre-link rules building but not when relinking. + if(!relink) + { + this->LocalGenerator + ->AppendCustomCommands(commands, this->Target->GetPreBuildCommands()); + this->LocalGenerator + ->AppendCustomCommands(commands, this->Target->GetPreLinkCommands()); + } + + // Determine whether a link script will be used. + bool useLinkScript = this->GlobalGenerator->GetUseLinkScript(); + + // Select whether to use a response file for objects. + bool useResponseFile = false; + { + std::string responseVar = "CMAKE_"; + responseVar += linkLanguage; + responseVar += "_USE_RESPONSE_FILE_FOR_OBJECTS"; + if(this->Makefile->IsOn(responseVar.c_str())) + { + useResponseFile = true; + } + } + + // For static libraries there might be archiving rules. + std::vector archiveCreateCommands; + std::vector archiveAppendCommands; + std::vector archiveFinishCommands; + std::string::size_type archiveCommandLimit = std::string::npos; + if(this->Target->GetType() == cmTarget::STATIC_LIBRARY) + { + std::string arCreateVar = "CMAKE_"; + arCreateVar += linkLanguage; + arCreateVar += "_ARCHIVE_CREATE"; + if(const char* rule = this->Makefile->GetDefinition(arCreateVar.c_str())) + { + cmSystemTools::ExpandListArgument(rule, archiveCreateCommands); + } + std::string arAppendVar = "CMAKE_"; + arAppendVar += linkLanguage; + arAppendVar += "_ARCHIVE_APPEND"; + if(const char* rule = this->Makefile->GetDefinition(arAppendVar.c_str())) + { + cmSystemTools::ExpandListArgument(rule, archiveAppendCommands); + } + std::string arFinishVar = "CMAKE_"; + arFinishVar += linkLanguage; + arFinishVar += "_ARCHIVE_FINISH"; + if(const char* rule = this->Makefile->GetDefinition(arFinishVar.c_str())) + { + cmSystemTools::ExpandListArgument(rule, archiveFinishCommands); + } + } + + // Decide whether to use archiving rules. + bool useArchiveRules = + !archiveCreateCommands.empty() && !archiveAppendCommands.empty(); + if(useArchiveRules) + { + // Archiving rules are always run with a link script. + useLinkScript = true; + + // Archiving rules never use a response file. + useResponseFile = false; + + // Limit the length of individual object lists to less than the + // 32K command line length limit on Windows. We could make this a + // platform file variable but this should work everywhere. + archiveCommandLimit = 30000; + } + + // Expand the rule variables. + std::vector real_link_commands; + { + // Set path conversion for link script shells. + this->LocalGenerator->SetLinkScriptShell(useLinkScript); + + // Collect up flags to link in needed libraries. + cmOStringStream linklibs; + if(this->Target->GetType() != cmTarget::STATIC_LIBRARY) + { + this->LocalGenerator + ->OutputLinkLibraries(linklibs, *this->Target, relink); + } + + // Construct object file lists that may be needed to expand the + // rule. + std::string variableName; + std::string variableNameExternal; + this->WriteObjectsVariable(variableName, variableNameExternal); + std::string buildObjs; + if(useResponseFile) + { + std::string objects; + this->WriteObjectsString(objects); + std::string objects_rsp = + this->CreateResponseFile("objects.rsp", objects, depends); + buildObjs = "@"; + buildObjs += this->Convert(objects_rsp.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + } + else if(useLinkScript) + { + if(!useArchiveRules) + { + this->WriteObjectsString(buildObjs); + } + } + else + { + buildObjs = "$("; + buildObjs += variableName; + buildObjs += ") $("; + buildObjs += variableNameExternal; + buildObjs += ")"; + } + std::string cleanObjs = "$("; + cleanObjs += variableName; + cleanObjs += ")"; + cmLocalGenerator::RuleVariables vars; + vars.TargetPDB = targetOutPathPDB.c_str(); + + // Setup the target version. + std::string targetVersionMajor; + std::string targetVersionMinor; + { + cmOStringStream majorStream; + cmOStringStream minorStream; + int major; + int minor; + this->Target->GetTargetVersion(major, minor); + majorStream << major; + minorStream << minor; + targetVersionMajor = majorStream.str(); + targetVersionMinor = minorStream.str(); + } + vars.TargetVersionMajor = targetVersionMajor.c_str(); + vars.TargetVersionMinor = targetVersionMinor.c_str(); + + vars.Language = linkLanguage; + vars.Objects = buildObjs.c_str(); + std::string objdir = cmake::GetCMakeFilesDirectoryPostSlash(); + objdir += this->Target->GetName(); + objdir += ".dir"; + objdir = this->Convert(objdir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars.ObjectDir = objdir.c_str(); + vars.Target = targetOutPathReal.c_str(); + std::string linkString = linklibs.str(); + vars.LinkLibraries = linkString.c_str(); + vars.ObjectsQuoted = buildObjs.c_str(); + vars.TargetSOName= targetNameSO.c_str(); + vars.LinkFlags = linkFlags.c_str(); + + // Compute the directory portion of the install_name setting. + std::string install_name_dir; + if(this->Target->GetType() == cmTarget::SHARED_LIBRARY) + { + // Get the install_name directory for the build tree. + const char* config = this->LocalGenerator->ConfigurationName.c_str(); + install_name_dir = this->Target->GetInstallNameDirForBuildTree(config); + + // Set the rule variable replacement value. + if(install_name_dir.empty()) + { + vars.TargetInstallNameDir = ""; + } + else + { + // Convert to a path for the native build tool. + install_name_dir = + this->LocalGenerator->Convert(install_name_dir.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL, false); + vars.TargetInstallNameDir = install_name_dir.c_str(); + } + } + std::string langFlags; + this->LocalGenerator + ->AddLanguageFlags(langFlags, linkLanguage, + this->LocalGenerator->ConfigurationName.c_str()); + // remove any language flags that might not work with the + // particular os + if(forbiddenFlagVar) + { + this->RemoveForbiddenFlags(forbiddenFlagVar, + linkLanguage, langFlags); + } + vars.LanguageCompileFlags = langFlags.c_str(); + + // Construct the main link rule and expand placeholders. + this->LocalGenerator->TargetImplib = targetOutPathImport; + if(useArchiveRules) + { + // Construct the individual object list strings. + std::vector object_strings; + this->WriteObjectsStrings(object_strings, archiveCommandLimit); + + // Create the archive with the first set of objects. + std::vector::iterator osi = object_strings.begin(); + { + vars.Objects = osi->c_str(); + for(std::vector::const_iterator + i = archiveCreateCommands.begin(); + i != archiveCreateCommands.end(); ++i) + { + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); + real_link_commands.push_back(cmd); + } + } + // Append to the archive with the other object sets. + for(++osi; osi != object_strings.end(); ++osi) + { + vars.Objects = osi->c_str(); + for(std::vector::const_iterator + i = archiveAppendCommands.begin(); + i != archiveAppendCommands.end(); ++i) + { + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); + real_link_commands.push_back(cmd); + } + } + // Finish the archive. + vars.Objects = ""; + for(std::vector::const_iterator + i = archiveFinishCommands.begin(); + i != archiveFinishCommands.end(); ++i) + { + std::string cmd = *i; + this->LocalGenerator->ExpandRuleVariables(cmd, vars); + real_link_commands.push_back(cmd); + } + } + else + { + // Get the set of commands. + std::string linkRule = this->Makefile->GetRequiredDefinition(linkRuleVar); + cmSystemTools::ExpandListArgument(linkRule, real_link_commands); + + // Expand placeholders. + for(std::vector::iterator i = real_link_commands.begin(); + i != real_link_commands.end(); ++i) + { + this->LocalGenerator->ExpandRuleVariables(*i, vars); + } + } + this->LocalGenerator->TargetImplib = ""; + + // Restore path conversion to normal shells. + this->LocalGenerator->SetLinkScriptShell(false); + } + + // Optionally convert the build rule to use a script to avoid long + // command lines in the make shell. + if(useLinkScript) + { + // Use a link script. + const char* name = (relink? "relink.txt" : "link.txt"); + this->CreateLinkScript(name, real_link_commands, commands1, depends); + } + else + { + // No link script. Just use the link rule directly. + commands1 = real_link_commands; + } + this->LocalGenerator->CreateCDCommand + (commands1, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), commands1.begin(), commands1.end()); + commands1.clear(); + + // Add a rule to create necessary symlinks for the library. + if(targetOutPath != targetOutPathReal) + { + std::string symlink = "$(CMAKE_COMMAND) -E cmake_symlink_library "; + symlink += targetOutPathReal; + symlink += " "; + symlink += targetOutPathSO; + symlink += " "; + symlink += targetOutPath; + commands1.push_back(symlink); + this->LocalGenerator->CreateCDCommand(commands1, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), commands1.begin(), commands1.end()); + commands1.clear(); + } + // Add the post-build rules when building but not when relinking. + if(!relink) + { + this->LocalGenerator-> + AppendCustomCommands(commands, this->Target->GetPostBuildCommands()); + } + + // Write the build rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + targetFullPathReal.c_str(), + depends, commands, false); + + // Some targets have more than one output file. Create rules to + // drive the build if any extra outputs are missing. + std::vector extraOutputs; + if(targetNameSO != targetNameReal) + { + this->GenerateExtraOutput(targetFullPathSO.c_str(), + targetFullPathReal.c_str()); + } + if(targetName != targetNameSO && + targetName != targetNameReal) + { + this->GenerateExtraOutput(targetFullPath.c_str(), + targetFullPathReal.c_str()); + } + + // Write the main driver rule to build everything in this target. + this->WriteTargetDriverRule(targetFullPath.c_str(), relink); + + // Clean all the possible library names and symlinks. + this->CleanFiles.insert(this->CleanFiles.end(), + libCleanFiles.begin(),libCleanFiles.end()); +} diff --git a/Source/cmMakefileLibraryTargetGenerator.h b/Source/cmMakefileLibraryTargetGenerator.h new file mode 100644 index 000000000..0f3e57d1c --- /dev/null +++ b/Source/cmMakefileLibraryTargetGenerator.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileLibraryTargetGenerator.h,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:50 $ + Version: $Revision: 1.6.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakefileLibraryTargetGenerator_h +#define cmMakefileLibraryTargetGenerator_h + +#include "cmMakefileTargetGenerator.h" + +class cmMakefileLibraryTargetGenerator: + public cmMakefileTargetGenerator +{ +public: + cmMakefileLibraryTargetGenerator(cmTarget* target); + + /* the main entry point for this class. Writes the Makefiles associated + with this target */ + virtual void WriteRuleFiles(); + +protected: + void WriteStaticLibraryRules(); + void WriteSharedLibraryRules(bool relink); + void WriteModuleLibraryRules(bool relink); + void WriteLibraryRules(const char *linkRule, const char *extraFlags, + bool relink); + // MacOSX Framework support methods + void WriteFrameworkRules(bool relink); + void CreateFramework(); + + // Store the computd framework version for OS X Frameworks. + std::string FrameworkVersion; +}; + +#endif diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx new file mode 100644 index 000000000..bda3d087f --- /dev/null +++ b/Source/cmMakefileTargetGenerator.cxx @@ -0,0 +1,1721 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileTargetGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-04-23 02:05:40 $ + Version: $Revision: 1.93.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakefileTargetGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmGlobalGenerator.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmTarget.h" +#include "cmake.h" + +#include "cmMakefileExecutableTargetGenerator.h" +#include "cmMakefileLibraryTargetGenerator.h" +#include "cmMakefileUtilityTargetGenerator.h" + + +cmMakefileTargetGenerator::cmMakefileTargetGenerator(cmTarget* target) +{ + this->BuildFileStream = 0; + this->InfoFileStream = 0; + this->FlagFileStream = 0; + this->CustomCommandDriver = OnBuild; + this->FortranModuleDirectoryComputed = false; + this->Target = target; + this->Makefile = this->Target->GetMakefile(); + this->LocalGenerator = + static_cast( + this->Makefile->GetLocalGenerator()); + this->GlobalGenerator = + static_cast( + this->LocalGenerator->GetGlobalGenerator()); +} + +cmMakefileTargetGenerator * +cmMakefileTargetGenerator::New(cmTarget *tgt) +{ + cmMakefileTargetGenerator *result = 0; + + switch (tgt->GetType()) + { + case cmTarget::EXECUTABLE: + result = new cmMakefileExecutableTargetGenerator(tgt); + break; + case cmTarget::STATIC_LIBRARY: + case cmTarget::SHARED_LIBRARY: + case cmTarget::MODULE_LIBRARY: + result = new cmMakefileLibraryTargetGenerator(tgt); + break; + case cmTarget::UTILITY: + result = new cmMakefileUtilityTargetGenerator(tgt); + break; + default: + return result; + // break; /* unreachable */ + } + return result; +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::CreateRuleFile() +{ + // Create a directory for this target. + this->TargetBuildDirectory = + this->LocalGenerator->GetTargetDirectory(*this->Target); + this->TargetBuildDirectoryFull = + this->LocalGenerator->ConvertToFullPath(this->TargetBuildDirectory); + cmSystemTools::MakeDirectory(this->TargetBuildDirectoryFull.c_str()); + + // Construct the rule file name. + this->BuildFileName = this->TargetBuildDirectory; + this->BuildFileName += "/build.make"; + this->BuildFileNameFull = this->TargetBuildDirectoryFull; + this->BuildFileNameFull += "/build.make"; + + // Construct the rule file name. + this->ProgressFileName = this->TargetBuildDirectory; + this->ProgressFileName += "/progress.make"; + this->ProgressFileNameFull = this->TargetBuildDirectoryFull; + this->ProgressFileNameFull += "/progress.make"; + + // reset the progress count + this->NumberOfProgressActions = 0; + + // Open the rule file. This should be copy-if-different because the + // rules may depend on this file itself. + this->BuildFileStream = + new cmGeneratedFileStream(this->BuildFileNameFull.c_str()); + this->BuildFileStream->SetCopyIfDifferent(true); + if(!this->BuildFileStream) + { + return; + } + this->LocalGenerator->WriteDisclaimer(*this->BuildFileStream); + this->LocalGenerator->WriteSpecialTargetsTop(*this->BuildFileStream); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetBuildRules() +{ + // write the custom commands for this target + // Look for files registered for cleaning in this directory. + if(const char* additional_clean_files = + this->Makefile->GetProperty + ("ADDITIONAL_MAKE_CLEAN_FILES")) + { + cmSystemTools::ExpandListArgument(additional_clean_files, + this->CleanFiles); + } + + // add custom commands to the clean rules? + const char* clean_no_custom = + this->Makefile->GetProperty("CLEAN_NO_CUSTOM"); + bool clean = cmSystemTools::IsOff(clean_no_custom); + + // First generate the object rule files. Save a list of all object + // files for this target. + const std::vector& sources = this->Target->GetSourceFiles(); + for(std::vector::const_iterator source = sources.begin(); + source != sources.end(); ++source) + { + cmTarget::SourceFileFlags tsFlags = + this->Target->GetTargetSourceFileFlags(*source); + if(cmCustomCommand* cc = (*source)->GetCustomCommand()) + { + this->GenerateCustomRuleFile(*cc); + if (clean) + { + const std::vector& outputs = cc->GetOutputs(); + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + this->CleanFiles.push_back + (this->Convert(o->c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::UNCHANGED)); + } + } + } + else if(tsFlags.Type != cmTarget::SourceFileTypeNormal) + { + this->WriteMacOSXContentRules(*(*source), tsFlags.MacFolder); + } + else if(!(*source)->GetPropertyAsBool("HEADER_FILE_ONLY")) + { + if(!this->GlobalGenerator->IgnoreFile + ((*source)->GetExtension().c_str())) + { + // Generate this object file's rule file. + this->WriteObjectRuleFiles(*(*source)); + } + else if((*source)->GetPropertyAsBool("EXTERNAL_OBJECT")) + { + // This is an external object file. Just add it. + this->ExternalObjects.push_back((*source)->GetFullPath()); + } + else + { + // We only get here if a source file is not an external object + // and has an extension that is listed as an ignored file type + // for this language. No message or diagnosis should be + // given. + } + } + } +} + + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteCommonCodeRules() +{ + // Include the dependencies for the target. + std::string dependFileNameFull = this->TargetBuildDirectoryFull; + dependFileNameFull += "/depend.make"; + *this->BuildFileStream + << "# Include any dependencies generated for this target.\n" + << this->LocalGenerator->IncludeDirective << " " + << this->Convert(dependFileNameFull.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE) + << "\n\n"; + + // Include the progress variables for the target. + *this->BuildFileStream + << "# Include the progress variables for this target.\n" + << this->LocalGenerator->IncludeDirective << " " + << this->Convert(this->ProgressFileNameFull.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE) + << "\n\n"; + + // make sure the depend file exists + if (!cmSystemTools::FileExists(dependFileNameFull.c_str())) + { + // Write an empty dependency file. + cmGeneratedFileStream depFileStream(dependFileNameFull.c_str()); + depFileStream + << "# Empty dependencies file for " << this->Target->GetName() << ".\n" + << "# This may be replaced when dependencies are built." << std::endl; + } + + // Open the flags file. This should be copy-if-different because the + // rules may depend on this file itself. + this->FlagFileNameFull = this->TargetBuildDirectoryFull; + this->FlagFileNameFull += "/flags.make"; + this->FlagFileStream = + new cmGeneratedFileStream(this->FlagFileNameFull.c_str()); + this->FlagFileStream->SetCopyIfDifferent(true); + if(!this->FlagFileStream) + { + return; + } + this->LocalGenerator->WriteDisclaimer(*this->FlagFileStream); + + // Include the flags for the target. + *this->BuildFileStream + << "# Include the compile flags for this target's objects.\n" + << this->LocalGenerator->IncludeDirective << " " + << this->Convert(this->FlagFileNameFull.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::MAKEFILE) + << "\n\n"; +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetLanguageFlags() +{ + // write language flags for target + std::set languages; + this->Target->GetLanguages(languages); + // put the compiler in the rules.make file so that if it changes + // things rebuild + for(std::set::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + cmStdString compiler = "CMAKE_"; + compiler += *l; + compiler += "_COMPILER"; + *this->FlagFileStream << "# compile " << l->c_str() << " with " << + this->Makefile->GetSafeDefinition(compiler.c_str()) << "\n"; + } + + for(std::set::const_iterator l = languages.begin(); + l != languages.end(); ++l) + { + const char *lang = l->c_str(); + std::string flags; + std::string defines; + bool shared = ((this->Target->GetType() == cmTarget::SHARED_LIBRARY) || + (this->Target->GetType() == cmTarget::MODULE_LIBRARY)); + + // Add the export symbol definition for shared library objects. + if(const char* exportMacro = this->Target->GetExportMacro()) + { + flags += "-D"; + flags += exportMacro; + } + + // Add preprocessor definitions for this target and configuration. + this->LocalGenerator->AppendDefines + (defines, this->Makefile->GetProperty("COMPILE_DEFINITIONS"), lang); + this->LocalGenerator->AppendDefines + (defines, this->Target->GetProperty("COMPILE_DEFINITIONS"), lang); + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName); + this->LocalGenerator->AppendDefines + (defines, this->Makefile->GetProperty(defPropName.c_str()), lang); + this->LocalGenerator->AppendDefines + (defines, this->Target->GetProperty(defPropName.c_str()), lang); + + // Add language-specific flags. + this->LocalGenerator + ->AddLanguageFlags(flags, lang, + this->LocalGenerator->ConfigurationName.c_str()); + + // Fortran-specific flags computed for this target. + if(*l == "Fortran") + { + this->AddFortranFlags(flags); + } + + // Add shared-library flags if needed. + this->LocalGenerator->AddSharedFlags(flags, lang, shared); + + // Add include directory flags. + this->LocalGenerator-> + AppendFlags(flags, this->LocalGenerator->GetIncludeFlags(lang)); + // Add include directory flags. + this->LocalGenerator-> + AppendFlags(flags,this->GetFrameworkFlags().c_str()); + + *this->FlagFileStream << lang << "_FLAGS = " << flags << "\n\n"; + *this->FlagFileStream << lang << "_DEFINES = " << defines << "\n\n"; + } + + // Add target-specific flags. + if(this->Target->GetProperty("COMPILE_FLAGS")) + { + std::string flags; + this->LocalGenerator->AppendFlags + (flags, this->Target->GetProperty("COMPILE_FLAGS")); + *this->FlagFileStream << "# TARGET_FLAGS = " << flags << "\n\n"; + } +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteMacOSXContentRules(cmSourceFile& source, + const char* pkgloc) +{ + // Skip OS X content when not building a Framework or Bundle. + if(this->MacContentDirectory.empty()) + { + return; + } + + // Construct the full path to the content subdirectory. + std::string macdir = this->MacContentDirectory; + macdir += pkgloc; + cmSystemTools::MakeDirectory(macdir.c_str()); + + // Record use of this content location. Only the first level + // directory is needed. + { + std::string loc = pkgloc; + loc = loc.substr(0, loc.find('/')); + this->MacContentFolders.insert(loc); + } + + // Get the input file location. + std::string input = source.GetFullPath(); + + // Get the output file location. + std::string output = macdir; + output += "/"; + output += cmSystemTools::GetFilenameName(input); + this->CleanFiles.push_back(this->Convert(output.c_str(), + cmLocalGenerator::START_OUTPUT)); + output = this->Convert(output.c_str(), cmLocalGenerator::HOME_OUTPUT); + + // Create a rule to copy the content into the bundle. + std::vector depends; + std::vector commands; + depends.push_back(input); + std::string copyEcho = "Copying OS X content "; + copyEcho += output; + this->LocalGenerator->AppendEcho(commands, copyEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoBuild); + std::string copyCommand = "$(CMAKE_COMMAND) -E copy "; + copyCommand += this->Convert(input.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + copyCommand += " "; + copyCommand += this->Convert(output.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + commands.push_back(copyCommand); + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + output.c_str(), + depends, commands, false); + this->ExtraFiles.insert(output); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteObjectRuleFiles(cmSourceFile& source) +{ + // Identify the language of the source file. + const char* lang = this->LocalGenerator->GetSourceFileLanguage(source); + if(!lang) + { + // don't know anything about this file so skip it + return; + } + + // Get the full path name of the object file. + bool hasSourceExtension; + std::string objNoTargetDir; + std::string obj = + this->LocalGenerator->GetObjectFileName(*this->Target, source, + &objNoTargetDir, + &hasSourceExtension); + + // Avoid generating duplicate rules. + if(this->ObjectFiles.find(obj) == this->ObjectFiles.end()) + { + this->ObjectFiles.insert(obj); + } + else + { + cmOStringStream err; + err << "Warning: Source file \"" + << source.GetFullPath() + << "\" is listed multiple times for target \"" + << this->Target->GetName() + << "\"."; + cmSystemTools::Message(err.str().c_str(), "Warning"); + return; + } + + // Create the directory containing the object file. This may be a + // subdirectory under the target's directory. + std::string dir = cmSystemTools::GetFilenamePath(obj.c_str()); + cmSystemTools::MakeDirectory + (this->LocalGenerator->ConvertToFullPath(dir).c_str()); + + // Save this in the target's list of object files. + this->Objects.push_back(obj); + this->CleanFiles.push_back(obj); + + // TODO: Remove + //std::string relativeObj + //= this->LocalGenerator->GetHomeRelativeOutputPath(); + //relativeObj += obj; + + // we compute some depends when writing the depend.make that we will also + // use in the build.make, same with depMakeFile + std::vector depends; + std::string depMakeFile; + + // generate the build rule file + this->WriteObjectBuildFile(obj, lang, source, depends); + + // The object file should be checked for dependency integrity. + std::string objFullPath = this->Makefile->GetCurrentOutputDirectory(); + objFullPath += "/"; + objFullPath += obj; + objFullPath = + this->Convert(objFullPath.c_str(), cmLocalGenerator::FULL); + std::string srcFullPath = + this->Convert(source.GetFullPath().c_str(), cmLocalGenerator::FULL); + this->LocalGenerator-> + AddImplicitDepends(*this->Target, lang, + objFullPath.c_str(), + srcFullPath.c_str()); + + // add this to the list of objects for this local generator + if(cmSystemTools::FileIsFullPath(objNoTargetDir.c_str())) + { + objNoTargetDir = cmSystemTools::GetFilenameName(objNoTargetDir); + } + cmLocalUnixMakefileGenerator3::LocalObjectInfo& info = + this->LocalGenerator->LocalObjectFiles[objNoTargetDir]; + info.HasSourceExtension = hasSourceExtension; + info.push_back( + cmLocalUnixMakefileGenerator3::LocalObjectEntry(this->Target, lang) + ); +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::WriteObjectBuildFile(std::string &obj, + const char *lang, + cmSourceFile& source, + std::vector& depends) +{ + this->LocalGenerator->AppendRuleDepend(depends, + this->FlagFileNameFull.c_str()); + + // generate the depend scanning rule + this->WriteObjectDependRules(source, depends); + + std::string relativeObj = this->LocalGenerator->GetHomeRelativeOutputPath(); + relativeObj += obj; + // Write the build rule. + + // Build the set of compiler flags. + std::string flags; + + // Add language-specific flags. + std::string langFlags = "$("; + langFlags += lang; + langFlags += "_FLAGS)"; + this->LocalGenerator->AppendFlags(flags, langFlags.c_str()); + + // Add target-specific flags. + if(this->Target->GetProperty("COMPILE_FLAGS")) + { + std::string langIncludeExpr = "CMAKE_"; + langIncludeExpr += lang; + langIncludeExpr += "_FLAG_REGEX"; + const char* regex = this->Makefile-> + GetDefinition(langIncludeExpr.c_str()); + if(regex) + { + cmsys::RegularExpression r(regex); + std::vector args; + cmSystemTools::ParseWindowsCommandLine( + this->Target->GetProperty("COMPILE_FLAGS"), + args); + for(std::vector::iterator i = args.begin(); + i != args.end(); ++i) + { + if(r.find(i->c_str())) + { + this->LocalGenerator->AppendFlags + (flags, i->c_str()); + } + } + } + else + { + this->LocalGenerator->AppendFlags + (flags, this->Target->GetProperty("COMPILE_FLAGS")); + } + } + + // Add flags from source file properties. + if (source.GetProperty("COMPILE_FLAGS")) + { + this->LocalGenerator->AppendFlags + (flags, source.GetProperty("COMPILE_FLAGS")); + *this->FlagFileStream << "# Custom flags: " + << relativeObj << "_FLAGS = " + << source.GetProperty("COMPILE_FLAGS") + << "\n" + << "\n"; + } + + // Add language-specific defines. + std::string defines = "$("; + defines += lang; + defines += "_DEFINES)"; + + // Add source-sepcific preprocessor definitions. + if(const char* compile_defs = source.GetProperty("COMPILE_DEFINITIONS")) + { + this->LocalGenerator->AppendDefines(defines, compile_defs, lang); + *this->FlagFileStream << "# Custom defines: " + << relativeObj << "_DEFINES = " + << compile_defs << "\n" + << "\n"; + } + std::string configUpper = + cmSystemTools::UpperCase(this->LocalGenerator->ConfigurationName); + std::string defPropName = "COMPILE_DEFINITIONS_"; + defPropName += configUpper; + if(const char* config_compile_defs = + source.GetProperty(defPropName.c_str())) + { + this->LocalGenerator->AppendDefines(defines, config_compile_defs, lang); + *this->FlagFileStream + << "# Custom defines: " + << relativeObj << "_DEFINES_" << configUpper + << " = " << config_compile_defs << "\n" + << "\n"; + } + + // Get the output paths for source and object files. + std::string sourceFile = source.GetFullPath(); + if(this->LocalGenerator->UseRelativePaths) + { + sourceFile = this->Convert(sourceFile.c_str(), + cmLocalGenerator::HOME_OUTPUT); + } + sourceFile = this->Convert(sourceFile.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + std::string objectFile = this->Convert(obj.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + + // Construct the build message. + std::vector no_commands; + std::vector commands; + + // add in a progress call if needed + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += cmake::GetCMakeFilesDirectory(); + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; + progCmd << this->LocalGenerator->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + this->NumberOfProgressActions++; + progCmd << " $(CMAKE_PROGRESS_" + << this->NumberOfProgressActions + << ")"; + commands.push_back(progCmd.str()); + + std::string buildEcho = "Building "; + buildEcho += lang; + buildEcho += " object "; + buildEcho += relativeObj; + this->LocalGenerator->AppendEcho(commands, buildEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoBuild); + + // Construct the compile rules. + std::string compileRuleVar = "CMAKE_"; + compileRuleVar += lang; + compileRuleVar += "_COMPILE_OBJECT"; + std::string compileRule = + this->Makefile->GetRequiredDefinition(compileRuleVar.c_str()); + std::vector compileCommands; + cmSystemTools::ExpandListArgument(compileRule, compileCommands); + + // Change the command working directory to the local build tree. + this->LocalGenerator->CreateCDCommand + (compileCommands, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), + compileCommands.begin(), compileCommands.end()); + + std::string targetOutPathPDB; + { + std::string targetFullPathPDB; + const char* configName = this->LocalGenerator->ConfigurationName.c_str(); + if(this->Target->GetType() == cmTarget::EXECUTABLE || + this->Target->GetType() == cmTarget::STATIC_LIBRARY || + this->Target->GetType() == cmTarget::SHARED_LIBRARY || + this->Target->GetType() == cmTarget::MODULE_LIBRARY) + { + targetFullPathPDB = this->Target->GetDirectory(); + targetFullPathPDB += "/"; + targetFullPathPDB += this->Target->GetPDBName(configName); + } + targetOutPathPDB = + this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + } + cmLocalGenerator::RuleVariables vars; + vars.Language = lang; + vars.TargetPDB = targetOutPathPDB.c_str(); + vars.Source = sourceFile.c_str(); + std::string shellObj = + this->Convert(obj.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL).c_str(); + vars.Object = shellObj.c_str(); + std::string objectDir = cmSystemTools::GetFilenamePath(obj); + objectDir = this->Convert(objectDir.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + vars.ObjectDir = objectDir.c_str(); + vars.Flags = flags.c_str(); + vars.Defines = defines.c_str(); + + // Expand placeholders in the commands. + for(std::vector::iterator i = commands.begin(); + i != commands.end(); ++i) + { + this->LocalGenerator->ExpandRuleVariables(*i, vars); + } + + + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + relativeObj.c_str(), + depends, commands, false); + + // Check for extra outputs created by the compilation. + if(const char* extra_outputs_str = + source.GetProperty("OBJECT_OUTPUTS")) + { + std::vector extra_outputs; + cmSystemTools::ExpandListArgument(extra_outputs_str, extra_outputs); + for(std::vector::const_iterator eoi = extra_outputs.begin(); + eoi != extra_outputs.end(); ++eoi) + { + // Register this as an extra output for the object file rule. + // This will cause the object file to be rebuilt if the extra + // output is missing. + this->GenerateExtraOutput(eoi->c_str(), relativeObj.c_str(), false); + + // Register this as an extra file to clean. + this->CleanFiles.push_back(eoi->c_str()); + } + } + + bool lang_is_c_or_cxx = ((strcmp(lang, "C") == 0) || + (strcmp(lang, "CXX") == 0)); + bool do_preprocess_rules = lang_is_c_or_cxx && + this->LocalGenerator->GetCreatePreprocessedSourceRules(); + bool do_assembly_rules = lang_is_c_or_cxx && + this->LocalGenerator->GetCreateAssemblySourceRules(); + if(do_preprocess_rules || do_assembly_rules) + { + std::vector force_depends; + force_depends.push_back("cmake_force"); + std::string::size_type dot_pos = relativeObj.rfind("."); + std::string relativeObjBase = relativeObj.substr(0, dot_pos); + dot_pos = obj.rfind("."); + std::string objBase = obj.substr(0, dot_pos); + + if(do_preprocess_rules) + { + commands.clear(); + std::string relativeObjI = relativeObjBase + ".i"; + std::string objI = objBase + ".i"; + + std::string preprocessEcho = "Preprocessing "; + preprocessEcho += lang; + preprocessEcho += " source to "; + preprocessEcho += objI; + this->LocalGenerator->AppendEcho( + commands, preprocessEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoBuild + ); + + std::string preprocessRuleVar = "CMAKE_"; + preprocessRuleVar += lang; + preprocessRuleVar += "_CREATE_PREPROCESSED_SOURCE"; + if(const char* preprocessRule = + this->Makefile->GetDefinition(preprocessRuleVar.c_str())) + { + std::vector preprocessCommands; + cmSystemTools::ExpandListArgument(preprocessRule, preprocessCommands); + this->LocalGenerator->CreateCDCommand + (preprocessCommands, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), + preprocessCommands.begin(), + preprocessCommands.end()); + + std::string shellObjI = + this->Convert(objI.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL).c_str(); + vars.PreprocessedSource = shellObjI.c_str(); + + // Expand placeholders in the commands. + for(std::vector::iterator i = commands.begin(); + i != commands.end(); ++i) + { + this->LocalGenerator->ExpandRuleVariables(*i, vars); + } + } + else + { + std::string cmd = "$(CMAKE_COMMAND) -E cmake_unimplemented_variable "; + cmd += preprocessRuleVar; + commands.push_back(cmd); + } + + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + relativeObjI.c_str(), + force_depends, commands, false); + } + + if(do_assembly_rules) + { + commands.clear(); + std::string relativeObjS = relativeObjBase + ".s"; + std::string objS = objBase + ".s"; + + std::string assemblyEcho = "Compiling "; + assemblyEcho += lang; + assemblyEcho += " source to assembly "; + assemblyEcho += objS; + this->LocalGenerator->AppendEcho( + commands, assemblyEcho.c_str(), + cmLocalUnixMakefileGenerator3::EchoBuild + ); + + std::string assemblyRuleVar = "CMAKE_"; + assemblyRuleVar += lang; + assemblyRuleVar += "_CREATE_ASSEMBLY_SOURCE"; + if(const char* assemblyRule = + this->Makefile->GetDefinition(assemblyRuleVar.c_str())) + { + std::vector assemblyCommands; + cmSystemTools::ExpandListArgument(assemblyRule, assemblyCommands); + this->LocalGenerator->CreateCDCommand + (assemblyCommands, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + commands.insert(commands.end(), + assemblyCommands.begin(), + assemblyCommands.end()); + + std::string shellObjS = + this->Convert(objS.c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL).c_str(); + vars.AssemblySource = shellObjS.c_str(); + + // Expand placeholders in the commands. + for(std::vector::iterator i = commands.begin(); + i != commands.end(); ++i) + { + this->LocalGenerator->ExpandRuleVariables(*i, vars); + } + } + else + { + std::string cmd = "$(CMAKE_COMMAND) -E cmake_unimplemented_variable "; + cmd += assemblyRuleVar; + commands.push_back(cmd); + } + + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + relativeObjS.c_str(), + force_depends, commands, false); + } + } + + // If the language needs provides-requires mode, create the + // corresponding targets. + std::string objectRequires = relativeObj; + objectRequires += ".requires"; + std::vector p_depends; + // always provide an empty requires target + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + objectRequires.c_str(), p_depends, + no_commands, true); + + // write a build rule to recursively build what this obj provides + std::string objectProvides = relativeObj; + objectProvides += ".provides"; + std::string temp = relativeObj; + temp += ".provides.build"; + std::vector r_commands; + std::string tgtMakefileName = + this->LocalGenerator->GetRelativeTargetDirectory(*this->Target); + tgtMakefileName += "/build.make"; + r_commands.push_back + (this->LocalGenerator->GetRecursiveMakeCall(tgtMakefileName.c_str(), + temp.c_str())); + + p_depends.clear(); + p_depends.push_back(objectRequires); + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + objectProvides.c_str(), p_depends, + r_commands, true); + + // write the provides.build rule dependency on the obj file + p_depends.clear(); + p_depends.push_back(relativeObj); + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + temp.c_str(), p_depends, no_commands, + true); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetRequiresRules() +{ + std::vector depends; + std::vector no_commands; + + // Construct the name of the dependency generation target. + std::string depTarget = + this->LocalGenerator->GetRelativeTargetDirectory(*this->Target); + depTarget += "/requires"; + + // This target drives dependency generation for all object files. + std::string relPath = this->LocalGenerator->GetHomeRelativeOutputPath(); + std::string objTarget; + for(std::vector::const_iterator obj = this->Objects.begin(); + obj != this->Objects.end(); ++obj) + { + objTarget = relPath; + objTarget += *obj; + objTarget += ".requires"; + depends.push_back(objTarget); + } + + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + depTarget.c_str(), + depends, no_commands, true); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetCleanRules() +{ + std::vector depends; + std::vector commands; + + // Construct the clean target name. + std::string cleanTarget = + this->LocalGenerator->GetRelativeTargetDirectory(*this->Target); + cleanTarget += "/clean"; + + // Construct the clean command. + this->LocalGenerator->AppendCleanCommand(commands, this->CleanFiles, + *this->Target); + this->LocalGenerator->CreateCDCommand + (commands, + this->Makefile->GetStartOutputDirectory(), + this->Makefile->GetHomeOutputDirectory()); + + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + cleanTarget.c_str(), + depends, commands, true); +} + + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetDependRules() +{ + // must write the targets depend info file + std::string dir = this->LocalGenerator->GetTargetDirectory(*this->Target); + this->InfoFileNameFull = dir; + this->InfoFileNameFull += "/DependInfo.cmake"; + this->InfoFileNameFull = + this->LocalGenerator->ConvertToFullPath(this->InfoFileNameFull); + this->InfoFileStream = + new cmGeneratedFileStream(this->InfoFileNameFull.c_str()); + this->InfoFileStream->SetCopyIfDifferent(true); + if(!*this->InfoFileStream) + { + return; + } + this->LocalGenerator-> + WriteDependLanguageInfo(*this->InfoFileStream,*this->Target); + + // Store multiple output pairs in the depend info file. + if(!this->MultipleOutputPairs.empty()) + { + *this->InfoFileStream + << "\n" + << "# Pairs of files generated by the same build rule.\n" + << "SET(CMAKE_MULTIPLE_OUTPUT_PAIRS\n"; + for(MultipleOutputPairsType::const_iterator pi = + this->MultipleOutputPairs.begin(); + pi != this->MultipleOutputPairs.end(); ++pi) + { + *this->InfoFileStream << " \"" << pi->first << "\" \"" + << pi->second << "\"\n"; + } + *this->InfoFileStream << " )\n\n"; + } + + // Store list of targets linked directly or transitively. + { + *this->InfoFileStream + << "\n" + << "# Targets to which this target links.\n" + << "SET(CMAKE_TARGET_LINKED_INFO_FILES\n"; + cmGlobalGenerator* gg = this->GlobalGenerator; + std::set emitted; + cmTarget::LinkLibraryVectorType const& libs = + this->Target->GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator j = libs.begin(); + j != libs.end(); ++j) + { + if(cmTarget const* linkee = gg->FindTarget(0, j->first.c_str())) + { + if(emitted.insert(linkee).second) + { + cmMakefile* mf = linkee->GetMakefile(); + cmLocalGenerator* lg = mf->GetLocalGenerator(); + std::string di = mf->GetStartOutputDirectory(); + di += "/"; + di += lg->GetTargetDirectory(*linkee); + di += "/DependInfo.cmake"; + *this->InfoFileStream << " \"" << di << "\"\n"; + } + } + } + *this->InfoFileStream + << " )\n"; + } + + // Check for a target-specific module output directory. + if(const char* mdir = this->GetFortranModuleDirectory()) + { + *this->InfoFileStream + << "\n" + << "# Fortran module output directory.\n" + << "SET(CMAKE_Fortran_TARGET_MODULE_DIR \"" << mdir << "\")\n"; + } + + // and now write the rule to use it + std::vector depends; + std::vector commands; + + // Construct the name of the dependency generation target. + std::string depTarget = + this->LocalGenerator->GetRelativeTargetDirectory(*this->Target); + depTarget += "/depend"; + + // Add a command to call CMake to scan dependencies. CMake will + // touch the corresponding depends file after scanning dependencies. + cmOStringStream depCmd; + // TODO: Account for source file properties and directory-level + // definitions when scanning for dependencies. +#if !defined(_WIN32) || defined(__CYGWIN__) + // This platform supports symlinks, so cmSystemTools will translate + // paths. Make sure PWD is set to the original name of the home + // output directory to help cmSystemTools to create the same + // translation table for the dependency scanning process. + depCmd << "cd " + << (this->LocalGenerator->Convert( + this->Makefile->GetHomeOutputDirectory(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL)) + << " && "; +#endif + // Generate a call this signature: + // + // cmake -E cmake_depends + // + // + // --color=$(COLOR) + // + // This gives the dependency scanner enough information to recreate + // the state of our local generator sufficiently for its needs. + depCmd << "$(CMAKE_COMMAND) -E cmake_depends \"" + << this->GlobalGenerator->GetName() << "\" " + << this->Convert(this->Makefile->GetHomeDirectory(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + << " " + << this->Convert(this->Makefile->GetStartDirectory(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + << " " + << this->Convert(this->Makefile->GetHomeOutputDirectory(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + << " " + << this->Convert(this->Makefile->GetStartOutputDirectory(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + << " " + << this->Convert(this->InfoFileNameFull.c_str(), + cmLocalGenerator::FULL, cmLocalGenerator::SHELL) + << " --color=$(COLOR)"; + commands.push_back(depCmd.str()); + + // Make sure all custom command outputs in this target are built. + if(this->CustomCommandDriver == OnDepends) + { + this->DriveCustomCommands(depends); + } + + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + depTarget.c_str(), + depends, commands, true); +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::DriveCustomCommands(std::vector& depends) +{ + // Depend on all custom command outputs. + const std::vector& sources = + this->Target->GetSourceFiles(); + for(std::vector::const_iterator source = sources.begin(); + source != sources.end(); ++source) + { + if(cmCustomCommand* cc = (*source)->GetCustomCommand()) + { + const std::vector& outputs = cc->GetOutputs(); + for(std::vector::const_iterator o = outputs.begin(); + o != outputs.end(); ++o) + { + depends.push_back(*o); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator +::WriteObjectDependRules(cmSourceFile& source, + std::vector& depends) +{ + // Create the list of dependencies known at cmake time. These are + // shared between the object file and dependency scanning rule. + depends.push_back(source.GetFullPath()); + if(const char* objectDeps = source.GetProperty("OBJECT_DEPENDS")) + { + std::vector deps; + cmSystemTools::ExpandListArgument(objectDeps, deps); + for(std::vector::iterator i = deps.begin(); + i != deps.end(); ++i) + { + depends.push_back(i->c_str()); + } + } +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator +::GenerateCustomRuleFile(const cmCustomCommand& cc) +{ + // Collect the commands. + std::vector commands; + std::string comment = this->LocalGenerator->ConstructComment(cc); + if(!comment.empty()) + { + // add in a progress call if needed + std::string progressDir = this->Makefile->GetHomeOutputDirectory(); + progressDir += cmake::GetCMakeFilesDirectory(); + cmOStringStream progCmd; + progCmd << "$(CMAKE_COMMAND) -E cmake_progress_report "; + progCmd << this->LocalGenerator->Convert(progressDir.c_str(), + cmLocalGenerator::FULL, + cmLocalGenerator::SHELL); + this->NumberOfProgressActions++; + progCmd << " $(CMAKE_PROGRESS_" + << this->NumberOfProgressActions + << ")"; + commands.push_back(progCmd.str()); + this->LocalGenerator + ->AppendEcho(commands, comment.c_str(), + cmLocalUnixMakefileGenerator3::EchoGenerate); + } + this->LocalGenerator->AppendCustomCommand(commands, cc); + + // Collect the dependencies. + std::vector depends; + this->LocalGenerator->AppendCustomDepend(depends, cc); + + // Add a dependency on the rule file itself. + this->LocalGenerator->AppendRuleDepend(depends, + this->BuildFileNameFull.c_str()); + + // Check whether we need to bother checking for a symbolic output. + bool need_symbolic = this->GlobalGenerator->GetNeedSymbolicMark(); + + // Write the rule. + const std::vector& outputs = cc.GetOutputs(); + std::vector::const_iterator o = outputs.begin(); + { + bool symbolic = false; + if(need_symbolic) + { + if(cmSourceFile* sf = this->Makefile->GetSource(o->c_str())) + { + symbolic = sf->GetPropertyAsBool("SYMBOLIC"); + } + } + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + o->c_str(), depends, commands, + symbolic); + } + + // Write rules to drive building any outputs beyond the first. + const char* in = o->c_str(); + for(++o; o != outputs.end(); ++o) + { + bool symbolic = false; + if(need_symbolic) + { + if(cmSourceFile* sf = this->Makefile->GetSource(o->c_str())) + { + symbolic = sf->GetPropertyAsBool("SYMBOLIC"); + } + } + this->GenerateExtraOutput(o->c_str(), in, symbolic); + } + + // Setup implicit dependency scanning. + for(cmCustomCommand::ImplicitDependsList::const_iterator + idi = cc.GetImplicitDepends().begin(); + idi != cc.GetImplicitDepends().end(); ++idi) + { + std::string objFullPath = + this->Convert(outputs[0].c_str(), cmLocalGenerator::FULL); + std::string srcFullPath = + this->Convert(idi->second.c_str(), cmLocalGenerator::FULL); + this->LocalGenerator-> + AddImplicitDepends(*this->Target, idi->first.c_str(), + objFullPath.c_str(), + srcFullPath.c_str()); + } +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::GenerateExtraOutput(const char* out, const char* in, bool symbolic) +{ + // Add a rule to build the primary output if the extra output needs + // to be created. + std::vector commands; + std::vector depends; + std::string emptyCommand = this->GlobalGenerator->GetEmptyRuleHackCommand(); + if(!emptyCommand.empty()) + { + commands.push_back(emptyCommand); + } + depends.push_back(in); + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + out, depends, commands, + symbolic); + + // Register the extra output as paired with the first output so that + // the check-build-system step will remove the primary output if any + // extra outputs are missing. This forces the rule to regenerate + // all outputs. + this->AddMultipleOutputPair(out, in); +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::WriteObjectsVariable(std::string& variableName, + std::string& variableNameExternal) +{ + // Write a make variable assignment that lists all objects for the + // target. + variableName = + this->LocalGenerator->CreateMakeVariable(this->Target->GetName(), + "_OBJECTS"); + *this->BuildFileStream + << "# Object files for target " << this->Target->GetName() << "\n" + << variableName.c_str() << " ="; + std::string object; + const char* objName = + this->Makefile->GetDefinition("CMAKE_NO_QUOTED_OBJECTS"); + const char* lineContinue = + this->Makefile->GetDefinition("CMAKE_MAKE_LINE_CONTINUE"); + if(!lineContinue) + { + lineContinue = "\\"; + } + for(std::vector::const_iterator i = this->Objects.begin(); + i != this->Objects.end(); ++i) + { + *this->BuildFileStream << " " << lineContinue << "\n"; + if(objName) + { + *this->BuildFileStream << + this->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::MAKEFILE); + } + else + { + *this->BuildFileStream << + this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str()); + } + } + *this->BuildFileStream << "\n"; + + // Write a make variable assignment that lists all external objects + // for the target. + variableNameExternal = + this->LocalGenerator->CreateMakeVariable(this->Target->GetName(), + "_EXTERNAL_OBJECTS"); + *this->BuildFileStream + << "\n" + << "# External object files for target " + << this->Target->GetName() << "\n" + << variableNameExternal.c_str() << " ="; + for(std::vector::const_iterator i = + this->ExternalObjects.begin(); + i != this->ExternalObjects.end(); ++i) + { + object = this->Convert(i->c_str(),cmLocalGenerator::START_OUTPUT); + *this->BuildFileStream + << " " << lineContinue << "\n" + << this->Makefile->GetSafeDefinition("CMAKE_OBJECT_NAME"); + if(objName) + { + *this->BuildFileStream << + this->Convert(i->c_str(), cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::MAKEFILE); + } + else + { + *this->BuildFileStream << + this->LocalGenerator->ConvertToQuotedOutputPath(i->c_str()); + } + } + *this->BuildFileStream << "\n" << "\n"; +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::WriteObjectsString(std::string& buildObjs) +{ + std::vector objStrings; + this->WriteObjectsStrings(objStrings); + buildObjs = objStrings[0]; +} + +//---------------------------------------------------------------------------- +class cmMakefileTargetGeneratorObjectStrings +{ +public: + cmMakefileTargetGeneratorObjectStrings(std::vector& strings, + cmMakefile* mf, + cmLocalUnixMakefileGenerator3* lg, + std::string::size_type limit): + Strings(strings), Makefile(mf), LocalGenerator(lg), LengthLimit(limit) + { + this->Space = ""; + } + void Feed(std::string const& obj) + { + // Construct the name of the next object. + this->NextObject = + this->LocalGenerator->Convert(obj.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + + // Roll over to next string if the limit will be exceeded. + if(this->LengthLimit != std::string::npos && + (this->CurrentString.length() + 1 + this->NextObject.length() + > this->LengthLimit)) + { + this->Strings.push_back(this->CurrentString); + this->CurrentString = ""; + this->Space = ""; + } + + // Separate from previous object. + this->CurrentString += this->Space; + this->Space = " "; + + // Append this object. + this->CurrentString += this->NextObject; + } + void Done() + { + this->Strings.push_back(this->CurrentString); + } +private: + std::vector& Strings; + cmMakefile* Makefile; + cmLocalUnixMakefileGenerator3* LocalGenerator; + std::string::size_type LengthLimit; + std::string CurrentString; + std::string NextObject; + const char* Space; +}; + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::WriteObjectsStrings(std::vector& objStrings, + std::string::size_type limit) +{ + cmMakefileTargetGeneratorObjectStrings + helper(objStrings, this->Makefile, this->LocalGenerator, limit); + for(std::vector::const_iterator i = this->Objects.begin(); + i != this->Objects.end(); ++i) + { + helper.Feed(*i); + } + for(std::vector::const_iterator i = + this->ExternalObjects.begin(); + i != this->ExternalObjects.end(); ++i) + { + helper.Feed(*i); + } + helper.Done(); +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::WriteTargetDriverRule(const char* main_output, + bool relink) +{ + // Compute the name of the driver target. + std::string dir = + this->LocalGenerator->GetRelativeTargetDirectory(*this->Target); + std::string buildTargetRuleName = dir; + buildTargetRuleName += relink?"/preinstall":"/build"; + buildTargetRuleName = this->Convert(buildTargetRuleName.c_str(), + cmLocalGenerator::HOME_OUTPUT, + cmLocalGenerator::UNCHANGED); + + // Build the list of target outputs to drive. + std::vector depends; + if(main_output) + { + depends.push_back(main_output); + } + + const char* comment = 0; + if(relink) + { + // Setup the comment for the preinstall driver. + comment = "Rule to relink during preinstall."; + } + else + { + // Setup the comment for the main build driver. + comment = "Rule to build all files generated by this target."; + + // Make sure all custom command outputs in this target are built. + if(this->CustomCommandDriver == OnBuild) + { + this->DriveCustomCommands(depends); + } + + // Make sure the extra files are built. + for(std::set::const_iterator i = this->ExtraFiles.begin(); + i != this->ExtraFiles.end(); ++i) + { + depends.push_back(*i); + } + } + + // Write the driver rule. + std::vector no_commands; + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, comment, + buildTargetRuleName.c_str(), + depends, no_commands, true); +} + +//---------------------------------------------------------------------------- +std::string cmMakefileTargetGenerator::GetFrameworkFlags() +{ +#ifndef __APPLE__ + return std::string(); +#else + std::set emitted; + emitted.insert("/System/Library/Frameworks"); + std::vector includes; + this->LocalGenerator->GetIncludeDirectories(includes); + std::vector::iterator i; + // check all include directories for frameworks as this + // will already have added a -F for the framework + for(i = includes.begin(); i != includes.end(); ++i) + { + if(this->Target->NameResolvesToFramework(i->c_str())) + { + std::string frameworkDir = *i; + frameworkDir += "/../"; + frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir.c_str()); + emitted.insert(frameworkDir); + } + } + + std::string flags; + std::vector& frameworks = this->Target->GetFrameworks(); + for(i = frameworks.begin(); + i != frameworks.end(); ++i) + { + if(emitted.insert(*i).second) + { + flags += "-F"; + flags += this->LocalGenerator->ConvertToOutputForExisting(i->c_str()); + flags += " "; + } + } + return flags; +#endif +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator +::AppendTargetDepends(std::vector& depends) +{ + // Static libraries never depend on anything for linking. + if(this->Target->GetType() == cmTarget::STATIC_LIBRARY) + { + return; + } + // Compute which library configuration to link. + cmTarget::LinkLibraryType linkType = cmTarget::OPTIMIZED; + if(cmSystemTools::UpperCase( + this->LocalGenerator->ConfigurationName.c_str()) == "DEBUG") + { + linkType = cmTarget::DEBUG; + } + // Keep track of dependencies already listed. + std::set emitted; + + // A target should not depend on itself. + emitted.insert(this->Target->GetName()); + + // Loop over all library dependencies. + const cmTarget::LinkLibraryVectorType& tlibs = + this->Target->GetLinkLibraries(); + for(cmTarget::LinkLibraryVectorType::const_iterator lib = tlibs.begin(); + lib != tlibs.end(); ++lib) + { + // skip the library if it is not general and the link type + // does not match the current target + if(lib->second != cmTarget::GENERAL && + lib->second != linkType) + { + continue; + } + + // Don't emit the same library twice for this target. + if(emitted.insert(lib->first).second) + { + // Depend on other CMake targets. + if(cmTarget* tgt = + this->GlobalGenerator->FindTarget(0, lib->first.c_str())) + { + const char* config = this->LocalGenerator->ConfigurationName.c_str(); + depends.push_back(tgt->GetFullPath(config, false)); + } + // depend on full path libs as well + else if(cmSystemTools::FileIsFullPath(lib->first.c_str())) + { + depends.push_back(lib->first.c_str()); + } + } + } +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator +::CloseFileStreams() +{ + delete this->BuildFileStream; + delete this->InfoFileStream; + delete this->FlagFileStream; +} + +void cmMakefileTargetGenerator::RemoveForbiddenFlags(const char* flagVar, + const char* linkLang, + std::string& linkFlags) +{ + // check for language flags that are not allowed at link time, and + // remove them, -w on darwin for gcc -w -dynamiclib sends -w to libtool + // which fails, there may be more] + + std::string removeFlags = "CMAKE_"; + removeFlags += linkLang; + removeFlags += flagVar; + std::string removeflags = + this->Makefile->GetSafeDefinition(removeFlags.c_str()); + std::vector removeList; + cmSystemTools::ExpandListArgument(removeflags, removeList); + for(std::vector::iterator i = removeList.begin(); + i != removeList.end(); ++i) + { + cmSystemTools::ReplaceString(linkFlags, i->c_str(), ""); + } +} + +void cmMakefileTargetGenerator::WriteProgressVariables(unsigned long total, + unsigned long ¤t) +{ + cmGeneratedFileStream *progressFileStream = + new cmGeneratedFileStream(this->ProgressFileNameFull.c_str()); + if(!progressFileStream) + { + return; + } + + unsigned long num; + unsigned long i; + for (i = 1; i <= this->NumberOfProgressActions; ++i) + { + *progressFileStream + << "CMAKE_PROGRESS_" << i << " = "; + if (total <= 100) + { + num = i + current; + *progressFileStream << num; + this->LocalGenerator->ProgressFiles[this->Target->GetName()] + .push_back(num); + } + else if (((i+current)*100)/total > ((i-1+current)*100)/total) + { + num = ((i+current)*100)/total; + *progressFileStream << num; + this->LocalGenerator->ProgressFiles[this->Target->GetName()] + .push_back(num); + } + *progressFileStream << "\n"; + } + *progressFileStream << "\n"; + current += this->NumberOfProgressActions; + delete progressFileStream; +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::AddMultipleOutputPair(const char* depender, const char* dependee) +{ + MultipleOutputPairsType::value_type p(depender, dependee); + this->MultipleOutputPairs.insert(p); +} + +//---------------------------------------------------------------------------- +void +cmMakefileTargetGenerator +::CreateLinkScript(const char* name, + std::vector const& link_commands, + std::vector& makefile_commands, + std::vector& makefile_depends) +{ + // Create the link script file. + std::string linkScriptName = this->TargetBuildDirectoryFull; + linkScriptName += "/"; + linkScriptName += name; + cmGeneratedFileStream linkScriptStream(linkScriptName.c_str()); + linkScriptStream.SetCopyIfDifferent(true); + for(std::vector::const_iterator cmd = link_commands.begin(); + cmd != link_commands.end(); ++cmd) + { + // Do not write out empty commands or commands beginning in the + // shell no-op ":". + if(!cmd->empty() && (*cmd)[0] != ':') + { + linkScriptStream << *cmd << "\n"; + } + } + + // Create the makefile command to invoke the link script. + std::string link_command = "$(CMAKE_COMMAND) -E cmake_link_script "; + link_command += this->Convert(linkScriptName.c_str(), + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + link_command += " --verbose=$(VERBOSE)"; + makefile_commands.push_back(link_command); + makefile_depends.push_back(linkScriptName); +} + +//---------------------------------------------------------------------------- +std::string +cmMakefileTargetGenerator +::CreateResponseFile(const char* name, std::string const& options, + std::vector& makefile_depends) +{ + // Create the response file. + std::string responseFileNameFull = this->TargetBuildDirectoryFull; + responseFileNameFull += "/"; + responseFileNameFull += name; + cmGeneratedFileStream responseStream(responseFileNameFull.c_str()); + responseStream.SetCopyIfDifferent(true); + responseStream << options << "\n"; + + // Add a dependency so the target will rebuild when the set of + // objects changes. + makefile_depends.push_back(responseFileNameFull); + + // Construct the name to be used on the command line. + std::string responseFileName = this->TargetBuildDirectory; + responseFileName += "/"; + responseFileName += name; + return responseFileName; +} + +//---------------------------------------------------------------------------- +const char* cmMakefileTargetGenerator::GetFortranModuleDirectory() +{ + // Compute the module directory. + if(!this->FortranModuleDirectoryComputed) + { + const char* target_mod_dir = + this->Target->GetProperty("Fortran_MODULE_DIRECTORY"); + const char* moddir_flag = + this->Makefile->GetDefinition("CMAKE_Fortran_MODDIR_FLAG"); + if(target_mod_dir && moddir_flag) + { + // Compute the full path to the module directory. + if(cmSystemTools::FileIsFullPath(target_mod_dir)) + { + // Already a full path. + this->FortranModuleDirectory = target_mod_dir; + } + else + { + // Interpret relative to the current output directory. + this->FortranModuleDirectory = + this->Makefile->GetCurrentOutputDirectory(); + this->FortranModuleDirectory += "/"; + this->FortranModuleDirectory += target_mod_dir; + } + + // Make sure the module output directory exists. + cmSystemTools::MakeDirectory(this->FortranModuleDirectory.c_str()); + } + this->FortranModuleDirectoryComputed = true; + } + + // Return the computed directory. + if(this->FortranModuleDirectory.empty()) + { + return 0; + } + else + { + return this->FortranModuleDirectory.c_str(); + } +} + +//---------------------------------------------------------------------------- +void cmMakefileTargetGenerator::AddFortranFlags(std::string& flags) +{ + // Add a module output directory flag if necessary. + if(const char* mod_dir = this->GetFortranModuleDirectory()) + { + const char* moddir_flag = + this->Makefile->GetRequiredDefinition("CMAKE_Fortran_MODDIR_FLAG"); + std::string modflag = moddir_flag; + modflag += this->Convert(mod_dir, + cmLocalGenerator::START_OUTPUT, + cmLocalGenerator::SHELL); + this->LocalGenerator->AppendFlags(flags, modflag.c_str()); + } + + // If there is a separate module path flag then duplicate the + // include path with it. This compiler does not search the include + // path for modules. + if(const char* modpath_flag = + this->Makefile->GetDefinition("CMAKE_Fortran_MODPATH_FLAG")) + { + std::vector includes; + this->LocalGenerator->GetIncludeDirectories(includes); + for(std::vector::const_iterator idi = includes.begin(); + idi != includes.end(); ++idi) + { + std::string flg = modpath_flag; + flg += this->Convert(idi->c_str(), + cmLocalGenerator::NONE, + cmLocalGenerator::SHELL); + this->LocalGenerator->AppendFlags(flags, flg.c_str()); + } + } +} diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h new file mode 100644 index 000000000..adf19b510 --- /dev/null +++ b/Source/cmMakefileTargetGenerator.h @@ -0,0 +1,231 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileTargetGenerator.h,v $ + Language: C++ + Date: $Date: 2008-04-08 16:22:50 $ + Version: $Revision: 1.24.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakefileTargetGenerator_h +#define cmMakefileTargetGenerator_h + +#include "cmLocalUnixMakefileGenerator3.h" + +class cmCustomCommand; +class cmDependInformation; +class cmDepends; +class cmGeneratedFileStream; +class cmGlobalUnixMakefileGenerator3; +class cmLocalUnixMakefileGenerator3; +class cmMakefile; +class cmTarget; +class cmSourceFile; + +/** \class cmMakefileTargetGenerator + * \brief Support Routines for writing makefiles + * + */ +class cmMakefileTargetGenerator +{ +public: + // constructor to set the ivars + cmMakefileTargetGenerator(cmTarget* target); + virtual ~cmMakefileTargetGenerator() {}; + + // construct using this factory call + static cmMakefileTargetGenerator *New(cmTarget *tgt); + + /* the main entry point for this class. Writes the Makefiles associated + with this target */ + virtual void WriteRuleFiles() = 0; + + /* the main entry point for this class. Writes the Makefiles associated + with this target */ + virtual void WriteProgressVariables(unsigned long total, + unsigned long ¤t); + + /* return the number of actions that have progress reporting on them */ + virtual unsigned long GetNumberOfProgressActions() { + return this->NumberOfProgressActions;} + + cmTarget* GetTarget() { return this->Target;} +protected: + + // create the file and directory etc + void CreateRuleFile(); + + // outputs the rules for object files and custom commands used by + // this target + void WriteTargetBuildRules(); + + // write some common code at the top of build.make + void WriteCommonCodeRules(); + void WriteTargetLanguageFlags(); + + // write the provide require rules for this target + void WriteTargetRequiresRules(); + + // write the clean rules for this target + void WriteTargetCleanRules(); + + // write the depend rules for this target + void WriteTargetDependRules(); + + // write rules for Mac OS X Application Bundle content. + void WriteMacOSXContentRules(cmSourceFile& source, const char* pkgloc); + + // write the rules for an object + void WriteObjectRuleFiles(cmSourceFile& source); + + // write the build rule for an object + void WriteObjectBuildFile(std::string &obj, + const char *lang, + cmSourceFile& source, + std::vector& depends); + + // write the depend.make file for an object + void WriteObjectDependRules(cmSourceFile& source, + std::vector& depends); + + // write the build rule for a custom command + void GenerateCustomRuleFile(const cmCustomCommand& cc); + + // write a rule to drive building of more than one output from + // another rule + void GenerateExtraOutput(const char* out, const char* in, + bool symbolic = false); + + // write out the variable that lists the objects for this target + void WriteObjectsVariable(std::string& variableName, + std::string& variableNameExternal); + void WriteObjectsString(std::string& buildObjs); + void WriteObjectsStrings(std::vector& objStrings, + std::string::size_type limit = std::string::npos); + + // write the driver rule to build target outputs + void WriteTargetDriverRule(const char* main_output, bool relink); + + void DriveCustomCommands(std::vector& depends); + + // Return the a string with -F flags on apple + std::string GetFrameworkFlags(); + + // append intertarget dependencies + void AppendTargetDepends(std::vector& depends); + + /** In order to support parallel builds for custom commands with + multiple outputs the outputs are given a serial order, and only + the first output actually has the build rule. Other outputs + just depend on the first one. The check-build-system step must + remove a dependee if the depender is missing to make sure both + are regenerated properly. This method is used by the local + makefile generators to register such pairs. */ + void AddMultipleOutputPair(const char* depender, const char* dependee); + + /** Create a script to hold link rules and a command to invoke the + script at build time. */ + void CreateLinkScript(const char* name, + std::vector const& link_commands, + std::vector& makefile_commands, + std::vector& makefile_depends); + + /** Create a response file with the given set of options. Returns + the relative path from the target build working directory to the + response file name. */ + std::string CreateResponseFile(const char* name, + std::string const& options, + std::vector& makefile_depends); + + virtual void CloseFileStreams(); + void RemoveForbiddenFlags(const char* flagVar, const char* linkLang, + std::string& linkFlags); + cmTarget *Target; + cmLocalUnixMakefileGenerator3 *LocalGenerator; + cmGlobalUnixMakefileGenerator3 *GlobalGenerator; + cmMakefile *Makefile; + + enum CustomCommandDriveType { OnBuild, OnDepends, OnUtility }; + CustomCommandDriveType CustomCommandDriver; + + // the full path to the build file + std::string BuildFileName; + std::string BuildFileNameFull; + + // the full path to the progress file + std::string ProgressFileName; + std::string ProgressFileNameFull; + unsigned long NumberOfProgressActions; + + // the path to the directory the build file is in + std::string TargetBuildDirectory; + std::string TargetBuildDirectoryFull; + + // the stream for the build file + cmGeneratedFileStream *BuildFileStream; + + // the stream for the flag file + std::string FlagFileNameFull; + cmGeneratedFileStream *FlagFileStream; + + // the stream for the info file + std::string InfoFileNameFull; + cmGeneratedFileStream *InfoFileStream; + + // files to clean + std::vector CleanFiles; + + // objects used by this target + std::vector Objects; + std::vector ExternalObjects; + + // Set of object file names that will be built in this directory. + std::set ObjectFiles; + + // Set of extra output files to be driven by the build. + std::set ExtraFiles; + + typedef std::map MultipleOutputPairsType; + MultipleOutputPairsType MultipleOutputPairs; + + // Target name info. + std::string TargetNameOut; + std::string TargetNameSO; + std::string TargetNameReal; + std::string TargetNameImport; + std::string TargetNamePDB; + + // Mac OS X content info. + std::string MacContentDirectory; + std::set MacContentFolders; + + // Target-wide Fortran module output directory. + bool FortranModuleDirectoryComputed; + std::string FortranModuleDirectory; + const char* GetFortranModuleDirectory(); + + // Compute target-specific Fortran language flags. + void AddFortranFlags(std::string& flags); + + //================================================================== + // Convenience routines that do nothing more than forward to + // implementaitons + std::string Convert(const char* source, + cmLocalGenerator::RelativeRoot relative, + cmLocalGenerator::OutputFormat output = + cmLocalGenerator::UNCHANGED, + bool optional = false) + { + return this->LocalGenerator->Convert(source, relative, output, optional); + } + +}; + +#endif diff --git a/Source/cmMakefileUtilityTargetGenerator.cxx b/Source/cmMakefileUtilityTargetGenerator.cxx new file mode 100644 index 000000000..e48859f22 --- /dev/null +++ b/Source/cmMakefileUtilityTargetGenerator.cxx @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileUtilityTargetGenerator.cxx,v $ + Language: C++ + Date: $Date: 2008-02-18 21:38:34 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMakefileUtilityTargetGenerator.h" + +#include "cmGeneratedFileStream.h" +#include "cmGlobalUnixMakefileGenerator3.h" +#include "cmLocalUnixMakefileGenerator3.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmTarget.h" + +//---------------------------------------------------------------------------- +cmMakefileUtilityTargetGenerator +::cmMakefileUtilityTargetGenerator(cmTarget* target): + cmMakefileTargetGenerator(target) +{ + this->CustomCommandDriver = OnUtility; +} + +//---------------------------------------------------------------------------- +void cmMakefileUtilityTargetGenerator::WriteRuleFiles() +{ + this->CreateRuleFile(); + + *this->BuildFileStream + << "# Utility rule file for " << this->Target->GetName() << ".\n\n"; + + // write the custom commands for this target + this->WriteTargetBuildRules(); + + // Collect the commands and dependencies. + std::vector commands; + std::vector depends; + + // Utility targets store their rules in pre- and post-build commands. + this->LocalGenerator->AppendCustomDepends + (depends, this->Target->GetPreBuildCommands()); + + this->LocalGenerator->AppendCustomDepends + (depends, this->Target->GetPostBuildCommands()); + + this->LocalGenerator->AppendCustomCommands + (commands, this->Target->GetPreBuildCommands()); + + // Depend on all custom command outputs for sources + this->DriveCustomCommands(depends); + + this->LocalGenerator->AppendCustomCommands + (commands, this->Target->GetPostBuildCommands()); + + // Add dependencies on targets that must be built first. + this->AppendTargetDepends(depends); + + // Add a dependency on the rule file itself. + this->LocalGenerator->AppendRuleDepend(depends, + this->BuildFileNameFull.c_str()); + + // If the rule is empty add the special empty rule dependency needed + // by some make tools. + if(depends.empty() && commands.empty()) + { + std::string hack = this->GlobalGenerator->GetEmptyRuleHackDepends(); + if(!hack.empty()) + { + depends.push_back(hack); + } + } + + // Write the rule. + this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0, + this->Target->GetName(), + depends, commands, true); + + // Write the main driver rule to build everything in this target. + this->WriteTargetDriverRule(this->Target->GetName(), false); + + // Write clean target + this->WriteTargetCleanRules(); + + // Write the dependency generation rule. This must be done last so + // that multiple output pair information is available. + this->WriteTargetDependRules(); + + // close the streams + this->CloseFileStreams(); +} + diff --git a/Source/cmMakefileUtilityTargetGenerator.h b/Source/cmMakefileUtilityTargetGenerator.h new file mode 100644 index 000000000..efaf84ef9 --- /dev/null +++ b/Source/cmMakefileUtilityTargetGenerator.h @@ -0,0 +1,36 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMakefileUtilityTargetGenerator.h,v $ + Language: C++ + Date: $Date: 2008-02-18 21:38:34 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMakefileUtilityTargetGenerator_h +#define cmMakefileUtilityTargetGenerator_h + +#include "cmMakefileTargetGenerator.h" + +class cmMakefileUtilityTargetGenerator: + public cmMakefileTargetGenerator +{ +public: + cmMakefileUtilityTargetGenerator(cmTarget* target); + + /* the main entry point for this class. Writes the Makefiles associated + with this target */ + virtual void WriteRuleFiles(); + +protected: + +}; + +#endif diff --git a/Source/cmMarkAsAdvancedCommand.cxx b/Source/cmMarkAsAdvancedCommand.cxx new file mode 100644 index 000000000..f5692ade1 --- /dev/null +++ b/Source/cmMarkAsAdvancedCommand.cxx @@ -0,0 +1,67 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMarkAsAdvancedCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMarkAsAdvancedCommand.h" + +// cmMarkAsAdvancedCommand +bool cmMarkAsAdvancedCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + unsigned int i =0; + const char* value = "1"; + bool overwrite = false; + if(args[0] == "CLEAR" || args[0] == "FORCE") + { + overwrite = true; + if(args[0] == "CLEAR") + { + value = "0"; + } + i = 1; + } + for(; i < args.size(); ++i) + { + std::string variable = args[i]; + cmCacheManager* manager = this->Makefile->GetCacheManager(); + cmCacheManager::CacheIterator it = + manager->GetCacheIterator(variable.c_str()); + if ( it.IsAtEnd() ) + { + this->Makefile->GetCacheManager() + ->AddCacheEntry(variable.c_str(), 0, 0, + cmCacheManager::UNINITIALIZED); + overwrite = true; + } + it.Find(variable.c_str()); + if ( it.IsAtEnd() ) + { + cmSystemTools::Error("This should never happen..."); + return false; + } + if ( !it.PropertyExists("ADVANCED") || overwrite ) + { + it.SetProperty("ADVANCED", value); + } + } + return true; +} + diff --git a/Source/cmMarkAsAdvancedCommand.h b/Source/cmMarkAsAdvancedCommand.h new file mode 100644 index 000000000..1090e702e --- /dev/null +++ b/Source/cmMarkAsAdvancedCommand.h @@ -0,0 +1,90 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMarkAsAdvancedCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMarkAsAdvancedCommand_h +#define cmMarkAsAdvancedCommand_h + +#include "cmCommand.h" + +/** \class cmMarkAsAdvancedCommand + * \brief MarkAsAdvanced a CMAKE variable + * + * cmMarkAsAdvancedCommand sets a variable to a value with expansion. + */ +class cmMarkAsAdvancedCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmMarkAsAdvancedCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "mark_as_advanced";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Mark cmake cached variables as advanced."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)\n" + "Mark the named cached variables as advanced. An advanced variable " + "will not be displayed in any of the cmake GUIs unless the show " + "advanced option is on. " + "If CLEAR is the first argument advanced variables are changed back " + "to unadvanced. " + "If FORCE is the first argument, then the variable is made advanced. " + "If neither FORCE nor CLEAR is specified, new values will be marked as " + "advanced, but if the variable already has an advanced/non-advanced " + "state, it will not be changed.\n" + "It does nothing in script mode."; + } + + /** + * This determines if the command is invoked when in script mode. + * mark_as_advanced() will have no effect in script mode, but this will + * make many of the modules usable in cmake/ctest scripts, (among them + * FindUnixMake.cmake used by the CTEST_BUILD command. + */ + virtual bool IsScriptable() { return true; } + + cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmMathCommand.cxx b/Source/cmMathCommand.cxx new file mode 100644 index 000000000..3c867b87a --- /dev/null +++ b/Source/cmMathCommand.cxx @@ -0,0 +1,66 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMathCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMathCommand.h" + +#include "cmExprParserHelper.h" + +//---------------------------------------------------------------------------- +bool cmMathCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if ( args.size() < 1 ) + { + this->SetError("must be called with at least one argument."); + return false; + } + const std::string &subCommand = args[0]; + if(subCommand == "EXPR") + { + return this->HandleExprCommand(args); + } + std::string e = "does not recognize sub-command "+subCommand; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmMathCommand::HandleExprCommand(std::vector const& args) +{ + if ( args.size() != 3 ) + { + this->SetError("EXPR called with incorrect arguments."); + return false; + } + + const std::string& outputVariable = args[1]; + const std::string& expression = args[2]; + + cmExprParserHelper helper; + if ( !helper.ParseString(expression.c_str(), 0) ) + { + std::string e = "cannot parse the expression: \""+expression+"\": "; + e += helper.GetError(); + this->SetError(e.c_str()); + return false; + } + + char buffer[1024]; + sprintf(buffer, "%d", helper.GetResult()); + + this->Makefile->AddDefinition(outputVariable.c_str(), buffer); + return true; +} diff --git a/Source/cmMathCommand.h b/Source/cmMathCommand.h new file mode 100644 index 000000000..5afab4516 --- /dev/null +++ b/Source/cmMathCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMathCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMathCommand_h +#define cmMathCommand_h + +#include "cmCommand.h" + +/** \class cmMathCommand + * \brief Common string operations + * + */ +class cmMathCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmMathCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "math";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Mathematical expressions."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " math(EXPR )\n" + "EXPR evaluates mathematical expression and return result in the " + "output variable. Example mathematical expression is " + "'5 * ( 10 + 13 )'. Supported operators are " + "+ - * / % | & ^ ~ << >> * / %. They have the same meaning " + " as they do in c code."; + } + + cmTypeMacro(cmMathCommand, cmCommand); +protected: + + bool HandleExprCommand(std::vector const& args); +}; + + +#endif + diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx new file mode 100644 index 000000000..b178f77fa --- /dev/null +++ b/Source/cmMessageCommand.cxx @@ -0,0 +1,82 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMessageCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-04-21 00:44:52 $ + Version: $Revision: 1.22.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmMessageCommand.h" + +// cmLibraryCommand +bool cmMessageCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::string message; + std::vector::const_iterator i = args.begin(); + + bool send_error = false; + bool fatal_error = false; + bool status = false; + if (*i == "SEND_ERROR") + { + send_error = true; + ++i; + } + else + { + if (*i == "STATUS") + { + status = true; + ++i; + } + else + { + if (*i == "FATAL_ERROR") + { + fatal_error = true; + ++i; + } + } + } + + for(;i != args.end(); ++i) + { + message += *i; + } + + if (send_error || fatal_error) + { + this->Makefile->IssueMessage(cmake::FATAL_ERROR, message.c_str()); + } + else + { + if (status) + { + this->Makefile->DisplayStatus(message.c_str(), -1); + } + else + { + cmSystemTools::Message(message.c_str()); + } + } + if(fatal_error ) + { + cmSystemTools::SetFatalErrorOccured(); + } + return true; +} + diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h new file mode 100644 index 000000000..79d1d1f85 --- /dev/null +++ b/Source/cmMessageCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmMessageCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmMessageCommand_h +#define cmMessageCommand_h + +#include "cmCommand.h" + +/** \class cmMessageCommand + * \brief Displays a message to the user + * + */ +class cmMessageCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmMessageCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "message";} + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Display a message to the user."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " message([SEND_ERROR | STATUS | FATAL_ERROR]\n" + " \"message to display\" ...)\n" + "By default the message is displayed in a pop up window (CMakeSetup), " + "or in the stdout of cmake, or the error section of ccmake. " + "If the first argument is " + "SEND_ERROR then an error is raised, and the generate phase will " + "be skipped. If the first argument is FATAL_ERROR, all processing " + "is halted. If the first argument is STATUS then the message is " + "displayed in the progress line for the GUI, or with a -- in the " + "command line cmake."; + } + + cmTypeMacro(cmMessageCommand, cmCommand); +}; + + +#endif diff --git a/Source/cmObject.h b/Source/cmObject.h new file mode 100644 index 000000000..45ad76bd1 --- /dev/null +++ b/Source/cmObject.h @@ -0,0 +1,56 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmObject.h,v $ + Language: C++ + Date: $Date: 2006-05-12 17:39:34 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmObject_h +#define cmObject_h + +#include "cmStandardIncludes.h" + +/** \class cmObject + * \brief Superclass for all commands and other classes in CMake. + * + * cmObject is the base class for all classes in CMake. It defines some + * methods such as GetNameOfClass, IsA, SafeDownCast. + */ +class cmObject +{ +public: + /** + * Need virtual destructor to destroy real command type. + */ + virtual ~cmObject() {} + + /** + * The class name of the command. + */ + virtual const char* GetNameOfClass() = 0; + + /** + * Returns true if this class is the given class, or a subclass of it. + */ + static bool IsTypeOf(const char *type) + { return !strcmp("cmObject", type); } + + /** + * Returns true if this object is an instance of the given class or + * a subclass of it. + */ + virtual bool IsA(const char *type) + { return cmObject::IsTypeOf(type); } +}; + +#endif + diff --git a/Source/cmOptionCommand.cxx b/Source/cmOptionCommand.cxx new file mode 100644 index 000000000..0b1c4d775 --- /dev/null +++ b/Source/cmOptionCommand.cxx @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOptionCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmOptionCommand.h" + +// cmOptionCommand +bool cmOptionCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + bool argError = false; + if(args.size() < 2) + { + argError = true; + } + // for VTK 4.0 we have to support the option command with more than 3 + // arguments if CMAKE_MINIMUM_REQUIRED_VERSION is not defined, if + // CMAKE_MINIMUM_REQUIRED_VERSION is defined, then we can have stricter + // checking. + if(this->Makefile->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION")) + { + if(args.size() > 3) + { + argError = true; + } + } + if(argError) + { + std::string m = "called with incorrect number of arguments: "; + for(size_t i =0; i < args.size(); ++i) + { + m += args[i]; + m += " "; + } + this->SetError(m.c_str()); + return false; + } + + std::string initialValue = "Off"; + // Now check and see if the value has been stored in the cache + // already, if so use that value and don't look for the program + cmCacheManager::CacheIterator it = + this->Makefile->GetCacheManager()->GetCacheIterator(args[0].c_str()); + if(!it.IsAtEnd()) + { + if ( it.GetType() != cmCacheManager::UNINITIALIZED ) + { + it.SetProperty("HELPSTRING", args[1].c_str()); + return true; + } + if ( it.GetValue() ) + { + initialValue = it.GetValue(); + } + } + if(args.size() == 3) + { + initialValue = args[2]; + } + this->Makefile->AddCacheDefinition(args[0].c_str(), + cmSystemTools::IsOn(initialValue.c_str()), + args[1].c_str()); + + return true; +} diff --git a/Source/cmOptionCommand.h b/Source/cmOptionCommand.h new file mode 100644 index 000000000..588568dc3 --- /dev/null +++ b/Source/cmOptionCommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOptionCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmOptionCommand_h +#define cmOptionCommand_h + +#include "cmCommand.h" + +/** \class cmOptionCommand + * \brief Provide an option to the user + * + * cmOptionCommand provides an option for the user to select + */ +class cmOptionCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmOptionCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "option";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Provides an option that the user can optionally select."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " option( \"help string describing option\"\n" + " [initial value])\n" + "Provide an option for the user to select as ON or OFF. If no " + "initial value is provided, OFF is used."; + } + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + cmTypeMacro(cmOptionCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx new file mode 100644 index 000000000..35d3e883d --- /dev/null +++ b/Source/cmOrderDirectories.cxx @@ -0,0 +1,531 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOrderDirectories.cxx,v $ + Language: C++ + Date: $Date: 2008-02-22 14:44:11 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmOrderDirectories.h" + +#include "cmGlobalGenerator.h" +#include "cmSystemTools.h" + +#include + +#include + +/* +Directory ordering computation. + - Useful to compute a safe runtime library path order + - Need runtime path for supporting INSTALL_RPATH_USE_LINK_PATH + - Need runtime path at link time to pickup transitive link dependencies + for shared libraries. +*/ + +//---------------------------------------------------------------------------- +class cmOrderDirectoriesConstraint +{ +public: + cmOrderDirectoriesConstraint(cmOrderDirectories* od, + std::string const& file): + OD(od), GlobalGenerator(od->GlobalGenerator) + { + this->FullPath = file; + this->Directory = cmSystemTools::GetFilenamePath(file); + this->FileName = cmSystemTools::GetFilenameName(file); + } + virtual ~cmOrderDirectoriesConstraint() {} + + void AddDirectory() + { + this->DirectoryIndex = this->OD->AddOriginalDirectory(this->Directory); + } + + virtual void Report(std::ostream& e) = 0; + + void FindConflicts(unsigned int index) + { + for(unsigned int i=0; i < this->OD->OriginalDirectories.size(); ++i) + { + // Check if this directory conflicts with they entry. + std::string const& dir = this->OD->OriginalDirectories[i]; + if(dir != this->Directory && this->FindConflict(dir)) + { + // The library will be found in this directory but this is not + // the directory named for it. Add an entry to make sure the + // desired directory comes before this one. + cmOrderDirectories::ConflictPair p(this->DirectoryIndex, index); + this->OD->ConflictGraph[i].push_back(p); + } + } + } +protected: + virtual bool FindConflict(std::string const& dir) = 0; + + bool FileMayConflict(std::string const& dir, std::string const& name); + + cmOrderDirectories* OD; + cmGlobalGenerator* GlobalGenerator; + + // The location in which the item is supposed to be found. + std::string FullPath; + std::string Directory; + std::string FileName; + + // The index assigned to the directory. + int DirectoryIndex; +}; + +//---------------------------------------------------------------------------- +bool cmOrderDirectoriesConstraint::FileMayConflict(std::string const& dir, + std::string const& name) +{ + // Check if the file will be built by cmake. + std::set const& files = + (this->GlobalGenerator->GetDirectoryContent(dir, false)); + if(std::set::const_iterator(files.find(name)) != files.end()) + { + return true; + } + + // Check if the file exists on disk and is not a symlink back to the + // original file. + std::string file = dir; + file += "/"; + file += name; + if(cmSystemTools::FileExists(file.c_str(), true) && + !cmSystemTools::SameFile(this->FullPath.c_str(), file.c_str())) + { + return true; + } + return false; +} + +//---------------------------------------------------------------------------- +class cmOrderDirectoriesConstraintSOName: public cmOrderDirectoriesConstraint +{ +public: + cmOrderDirectoriesConstraintSOName(cmOrderDirectories* od, + std::string const& file, + const char* soname): + cmOrderDirectoriesConstraint(od, file), SOName(soname? soname : "") + { + if(this->SOName.empty()) + { + // Try to guess the soname. + std::string soguess; + if(cmSystemTools::GuessLibrarySOName(file, soguess)) + { + this->SOName = soguess; + } + } + } + + virtual void Report(std::ostream& e) + { + e << "runtime library ["; + if(this->SOName.empty()) + { + e << this->FileName; + } + else + { + e << this->SOName; + } + e << "]"; + } + + virtual bool FindConflict(std::string const& dir); +private: + // The soname of the shared library if it is known. + std::string SOName; +}; + +//---------------------------------------------------------------------------- +bool cmOrderDirectoriesConstraintSOName::FindConflict(std::string const& dir) +{ + // Determine which type of check to do. + if(!this->SOName.empty()) + { + // We have the library soname. Check if it will be found. + if(this->FileMayConflict(dir, this->SOName)) + { + return true; + } + } + else + { + // We do not have the soname. Look for files in the directory + // that may conflict. + std::set const& files = + (this->GlobalGenerator + ->GetDirectoryContent(dir, true)); + + // Get the set of files that might conflict. Since we do not + // know the soname just look at all files that start with the + // file name. Usually the soname starts with the library name. + std::string base = this->FileName; + std::set::const_iterator first = files.lower_bound(base); + ++base[base.size()-1]; + std::set::const_iterator last = files.upper_bound(base); + if(first != last) + { + return true; + } + } + return false; +} + +//---------------------------------------------------------------------------- +class cmOrderDirectoriesConstraintLibrary: public cmOrderDirectoriesConstraint +{ +public: + cmOrderDirectoriesConstraintLibrary(cmOrderDirectories* od, + std::string const& file): + cmOrderDirectoriesConstraint(od, file) + { + } + + virtual void Report(std::ostream& e) + { + e << "link library [" << this->FileName << "]"; + } + + virtual bool FindConflict(std::string const& dir); +}; + +//---------------------------------------------------------------------------- +bool cmOrderDirectoriesConstraintLibrary::FindConflict(std::string const& dir) +{ + // We have the library file name. Check if it will be found. + if(this->FileMayConflict(dir, this->FileName)) + { + return true; + } + + // Now check if the file exists with other extensions the linker + // might consider. + if(!this->OD->LinkExtensions.empty() && + this->OD->RemoveLibraryExtension.find(this->FileName)) + { + cmStdString lib = this->OD->RemoveLibraryExtension.match(1); + cmStdString ext = this->OD->RemoveLibraryExtension.match(2); + for(std::vector::iterator + i = this->OD->LinkExtensions.begin(); + i != this->OD->LinkExtensions.end(); ++i) + { + if(*i != ext) + { + std::string fname = lib; + fname += *i; + if(this->FileMayConflict(dir, fname.c_str())) + { + return true; + } + } + } + } + return false; +} + +//---------------------------------------------------------------------------- +cmOrderDirectories::cmOrderDirectories(cmGlobalGenerator* gg, + const char* name, + const char* purpose) +{ + this->GlobalGenerator = gg; + this->Name = name; + this->Purpose = purpose; + this->Computed = false; +} + +//---------------------------------------------------------------------------- +cmOrderDirectories::~cmOrderDirectories() +{ + for(std::vector::iterator + i = this->ConstraintEntries.begin(); + i != this->ConstraintEntries.end(); ++i) + { + delete *i; + } +} + +//---------------------------------------------------------------------------- +std::vector const& cmOrderDirectories::GetOrderedDirectories() +{ + if(!this->Computed) + { + this->Computed = true; + this->CollectOriginalDirectories(); + this->FindConflicts(); + this->OrderDirectories(); + } + return this->OrderedDirectories; +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::AddRuntimeLibrary(std::string const& fullPath, + const char* soname) +{ + // Add the runtime library at most once. + if(this->EmmittedConstraintSOName.insert(fullPath).second) + { + // Avoid dealing with implicit directories. + if(!this->ImplicitDirectories.empty()) + { + std::string dir = cmSystemTools::GetFilenamePath(fullPath); + if(this->ImplicitDirectories.find(dir) != + this->ImplicitDirectories.end()) + { + return; + } + } + + // Construct the runtime information entry for this library. + this->ConstraintEntries.push_back( + new cmOrderDirectoriesConstraintSOName(this, fullPath, soname)); + } + else + { + // This can happen if the same library is linked multiple times. + // In that case the runtime information check need be done only + // once anyway. For shared libs we could add a check in AddItem + // to not repeat them. + } +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::AddLinkLibrary(std::string const& fullPath) +{ + // Link extension info is required for library constraints. + assert(!this->LinkExtensions.empty()); + + // Add the link library at most once. + if(this->EmmittedConstraintLibrary.insert(fullPath).second) + { + // Avoid dealing with implicit directories. + if(!this->ImplicitDirectories.empty()) + { + std::string dir = cmSystemTools::GetFilenamePath(fullPath); + if(this->ImplicitDirectories.find(dir) != + this->ImplicitDirectories.end()) + { + return; + } + } + + // Construct the link library entry. + this->ConstraintEntries.push_back( + new cmOrderDirectoriesConstraintLibrary(this, fullPath)); + } +} + +//---------------------------------------------------------------------------- +void +cmOrderDirectories +::AddUserDirectories(std::vector const& extra) +{ + this->UserDirectories.insert(this->UserDirectories.end(), + extra.begin(), extra.end()); +} + +//---------------------------------------------------------------------------- +void +cmOrderDirectories +::SetImplicitDirectories(std::set const& implicitDirs) +{ + this->ImplicitDirectories = implicitDirs; +} + +//---------------------------------------------------------------------------- +void +cmOrderDirectories +::SetLinkExtensionInfo(std::vector const& linkExtensions, + std::string const& removeExtRegex) +{ + this->LinkExtensions = linkExtensions; + this->RemoveLibraryExtension.compile(removeExtRegex.c_str()); +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::CollectOriginalDirectories() +{ + // Add user directories specified for inclusion. These should be + // indexed first so their original order is preserved as much as + // possible subject to the constraints. + for(std::vector::const_iterator + di = this->UserDirectories.begin(); + di != this->UserDirectories.end(); ++di) + { + // Avoid dealing with implicit directories. + if(this->ImplicitDirectories.find(*di) != + this->ImplicitDirectories.end()) + { + continue; + } + + // Skip the empty string. + if(di->empty()) + { + continue; + } + + // Add this directory. + this->AddOriginalDirectory(*di); + } + + // Add directories containing constraints. + for(unsigned int i=0; i < this->ConstraintEntries.size(); ++i) + { + this->ConstraintEntries[i]->AddDirectory(); + } +} + +//---------------------------------------------------------------------------- +int cmOrderDirectories::AddOriginalDirectory(std::string const& dir) +{ + // Add the runtime directory with a unique index. + std::map::iterator i = + this->DirectoryIndex.find(dir); + if(i == this->DirectoryIndex.end()) + { + std::map::value_type + entry(dir, static_cast(this->OriginalDirectories.size())); + i = this->DirectoryIndex.insert(entry).first; + this->OriginalDirectories.push_back(dir); + } + + return i->second; +} + +//---------------------------------------------------------------------------- +struct cmOrderDirectoriesCompare +{ + typedef std::pair ConflictPair; + + // The conflict pair is unique based on just the directory + // (first). The second element is only used for displaying + // information about why the entry is present. + bool operator()(ConflictPair const& l, + ConflictPair const& r) + { + return l.first == r.first; + } +}; + +//---------------------------------------------------------------------------- +void cmOrderDirectories::FindConflicts() +{ + // Allocate the conflict graph. + this->ConflictGraph.resize(this->OriginalDirectories.size()); + this->DirectoryVisited.resize(this->OriginalDirectories.size(), 0); + + // Find directories conflicting with each entry. + for(unsigned int i=0; i < this->ConstraintEntries.size(); ++i) + { + this->ConstraintEntries[i]->FindConflicts(i); + } + + // Clean up the conflict graph representation. + for(std::vector::iterator + i = this->ConflictGraph.begin(); + i != this->ConflictGraph.end(); ++i) + { + // Sort the outgoing edges for each graph node so that the + // original order will be preserved as much as possible. + std::sort(i->begin(), i->end()); + + // Make the edge list unique so cycle detection will be reliable. + ConflictList::iterator last = + std::unique(i->begin(), i->end(), cmOrderDirectoriesCompare()); + i->erase(last, i->end()); + } +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::OrderDirectories() +{ + // Allow a cycle to be diagnosed once. + this->CycleDiagnosed = false; + this->WalkId = 0; + + // Iterate through the directories in the original order. + for(unsigned int i=0; i < this->OriginalDirectories.size(); ++i) + { + // Start a new DFS from this node. + ++this->WalkId; + this->VisitDirectory(i); + } +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::VisitDirectory(unsigned int i) +{ + // Skip nodes already visited. + if(this->DirectoryVisited[i]) + { + if(this->DirectoryVisited[i] == this->WalkId) + { + // We have reached a node previously visited on this DFS. + // There is a cycle. + this->DiagnoseCycle(); + } + return; + } + + // We are now visiting this node so mark it. + this->DirectoryVisited[i] = this->WalkId; + + // Visit the neighbors of the node first. + ConflictList const& clist = this->ConflictGraph[i]; + for(ConflictList::const_iterator j = clist.begin(); + j != clist.end(); ++j) + { + this->VisitDirectory(j->first); + } + + // Now that all directories required to come before this one have + // been emmitted, emit this directory. + this->OrderedDirectories.push_back(this->OriginalDirectories[i]); +} + +//---------------------------------------------------------------------------- +void cmOrderDirectories::DiagnoseCycle() +{ + // Report the cycle at most once. + if(this->CycleDiagnosed) + { + return; + } + this->CycleDiagnosed = true; + + // Construct the message. + cmOStringStream e; + e << "WARNING: Cannot generate a safe " << this->Purpose + << " for target " << this->Name + << " because there is a cycle in the constraint graph:\n"; + + // Display the conflict graph. + for(unsigned int i=0; i < this->ConflictGraph.size(); ++i) + { + ConflictList const& clist = this->ConflictGraph[i]; + e << "dir " << i << " is [" << this->OriginalDirectories[i] << "]\n"; + for(ConflictList::const_iterator j = clist.begin(); + j != clist.end(); ++j) + { + e << " dir " << j->first << " must precede it due to "; + this->ConstraintEntries[j->second]->Report(e); + e << "\n"; + } + } + cmSystemTools::Message(e.str().c_str()); +} diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h new file mode 100644 index 000000000..03c82672b --- /dev/null +++ b/Source/cmOrderDirectories.h @@ -0,0 +1,88 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOrderDirectories.h,v $ + Language: C++ + Date: $Date: 2008-02-21 16:41:11 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmOrderDirectories_h +#define cmOrderDirectories_h + +#include "cmStandardIncludes.h" + +#include + +class cmGlobalGenerator; +class cmOrderDirectoriesConstraint; +class cmOrderDirectoriesConstraintLibrary; + +/** \class cmOrderDirectories + * \brief Compute a safe runtime path order for a set of shared libraries. + */ +class cmOrderDirectories +{ +public: + cmOrderDirectories(cmGlobalGenerator* gg, const char* name, + const char* purpose); + ~cmOrderDirectories(); + void AddRuntimeLibrary(std::string const& fullPath, const char* soname = 0); + void AddLinkLibrary(std::string const& fullPath); + void AddUserDirectories(std::vector const& extra); + void SetImplicitDirectories(std::set const& implicitDirs); + void SetLinkExtensionInfo(std::vector const& linkExtensions, + std::string const& removeExtRegex); + + std::vector const& GetOrderedDirectories(); +private: + cmGlobalGenerator* GlobalGenerator; + std::string Name; + std::string Purpose; + + bool Computed; + + std::vector OrderedDirectories; + + bool OrderedDirectoriesComputed; + std::vector ConstraintEntries; + std::vector UserDirectories; + cmsys::RegularExpression RemoveLibraryExtension; + std::vector LinkExtensions; + std::set ImplicitDirectories; + std::set EmmittedConstraintSOName; + std::set EmmittedConstraintLibrary; + std::vector OriginalDirectories; + std::map DirectoryIndex; + std::vector DirectoryVisited; + void CollectOriginalDirectories(); + int AddOriginalDirectory(std::string const& dir); + void FindConflicts(); + void OrderDirectories(); + void VisitDirectory(unsigned int i); + void DiagnoseCycle(); + bool CycleDiagnosed; + int WalkId; + + // Adjacency-list representation of runtime path ordering graph. + // This maps from directory to those that must come *before* it. + // Each entry that must come before is a pair. The first element is + // the index of the directory that must come first. The second + // element is the index of the runtime library that added the + // constraint. + typedef std::pair ConflictPair; + struct ConflictList: public std::vector {}; + std::vector ConflictGraph; + + friend class cmOrderDirectoriesConstraint; + friend class cmOrderDirectoriesConstraintLibrary; +}; + +#endif diff --git a/Source/cmOutputRequiredFilesCommand.cxx b/Source/cmOutputRequiredFilesCommand.cxx new file mode 100644 index 000000000..230de107e --- /dev/null +++ b/Source/cmOutputRequiredFilesCommand.cxx @@ -0,0 +1,238 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOutputRequiredFilesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmOutputRequiredFilesCommand.h" +#include "cmMakeDepend.h" + +class cmLBDepend : public cmMakeDepend +{ + /** + * Compute the depend information for this class. + */ + virtual void DependWalk(cmDependInformation* info); +}; + +void cmLBDepend::DependWalk(cmDependInformation* info) +{ + std::ifstream fin(info->FullPath.c_str()); + if(!fin) + { + cmSystemTools::Error("error can not open ", info->FullPath.c_str()); + return; + } + + std::string line; + while(cmSystemTools::GetLineFromStream(fin, line)) + { + if(!strncmp(line.c_str(), "#include", 8)) + { + // if it is an include line then create a string class + std::string currentline = line; + size_t qstart = currentline.find('\"', 8); + size_t qend; + // if a quote is not found look for a < + if(qstart == std::string::npos) + { + qstart = currentline.find('<', 8); + // if a < is not found then move on + if(qstart == std::string::npos) + { + cmSystemTools::Error("unknown include directive ", + currentline.c_str() ); + continue; + } + else + { + qend = currentline.find('>', qstart+1); + } + } + else + { + qend = currentline.find('\"', qstart+1); + } + // extract the file being included + std::string includeFile = currentline.substr(qstart+1, qend - qstart-1); + // see if the include matches the regular expression + if(!this->IncludeFileRegularExpression.find(includeFile)) + { + if(this->Verbose) + { + std::string message = "Skipping "; + message += includeFile; + message += " for file "; + message += info->FullPath.c_str(); + cmSystemTools::Error(message.c_str(), 0); + } + continue; + } + + // Add this file and all its dependencies. + this->AddDependency(info, includeFile.c_str()); + /// add the cxx file if it exists + std::string cxxFile = includeFile; + std::string::size_type pos = cxxFile.rfind('.'); + if(pos != std::string::npos) + { + std::string root = cxxFile.substr(0, pos); + cxxFile = root + ".cxx"; + bool found = false; + // try jumping to .cxx .cpp and .c in order + if(cmSystemTools::FileExists(cxxFile.c_str())) + { + found = true; + } + for(std::vector::iterator i = + this->IncludeDirectories.begin(); + i != this->IncludeDirectories.end(); ++i) + { + std::string path = *i; + path = path + "/"; + path = path + cxxFile; + if(cmSystemTools::FileExists(path.c_str())) + { + found = true; + } + } + if (!found) + { + cxxFile = root + ".cpp"; + if(cmSystemTools::FileExists(cxxFile.c_str())) + { + found = true; + } + for(std::vector::iterator i = + this->IncludeDirectories.begin(); + i != this->IncludeDirectories.end(); ++i) + { + std::string path = *i; + path = path + "/"; + path = path + cxxFile; + if(cmSystemTools::FileExists(path.c_str())) + { + found = true; + } + } + } + if (!found) + { + cxxFile = root + ".c"; + if(cmSystemTools::FileExists(cxxFile.c_str())) + { + found = true; + } + for(std::vector::iterator i = + this->IncludeDirectories.begin(); + i != this->IncludeDirectories.end(); ++i) + { + std::string path = *i; + path = path + "/"; + path = path + cxxFile; + if(cmSystemTools::FileExists(path.c_str())) + { + found = true; + } + } + } + if (!found) + { + cxxFile = root + ".txx"; + if(cmSystemTools::FileExists(cxxFile.c_str())) + { + found = true; + } + for(std::vector::iterator i = + this->IncludeDirectories.begin(); + i != this->IncludeDirectories.end(); ++i) + { + std::string path = *i; + path = path + "/"; + path = path + cxxFile; + if(cmSystemTools::FileExists(path.c_str())) + { + found = true; + } + } + } + if (found) + { + this->AddDependency(info, cxxFile.c_str()); + } + } + } + } +} + +// cmOutputRequiredFilesCommand +bool cmOutputRequiredFilesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // store the arg for final pass + this->File = args[0]; + this->OutputFile = args[1]; + + // compute the list of files + cmLBDepend md; + md.SetMakefile(this->Makefile); + md.AddSearchPath(this->Makefile->GetStartDirectory()); + // find the depends for a file + const cmDependInformation *info = md.FindDependencies(this->File.c_str()); + if (info) + { + // write them out + FILE *fout = fopen(this->OutputFile.c_str(),"w"); + std::set visited; + this->ListDependencies(info,fout, &visited); + fclose(fout); + } + + return true; +} + +void cmOutputRequiredFilesCommand:: +ListDependencies(cmDependInformation const *info, + FILE *fout, + std::set *visited) +{ + // add info to the visited set + visited->insert(info); + // now recurse with info's dependencies + for(cmDependInformation::DependencySetType::const_iterator d = + info->DependencySet.begin(); + d != info->DependencySet.end(); ++d) + { + if (visited->find(*d) == visited->end()) + { + if(info->FullPath != "") + { + std::string tmp = (*d)->FullPath; + std::string::size_type pos = tmp.rfind('.'); + if(pos != std::string::npos && (tmp.substr(pos) != ".h")) + { + tmp = tmp.substr(0, pos); + fprintf(fout,"%s\n",(*d)->FullPath.c_str()); + } + } + this->ListDependencies(*d,fout,visited); + } + } +} + diff --git a/Source/cmOutputRequiredFilesCommand.h b/Source/cmOutputRequiredFilesCommand.h new file mode 100644 index 000000000..e7df04978 --- /dev/null +++ b/Source/cmOutputRequiredFilesCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmOutputRequiredFilesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.12 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmOutputRequiredFilesCommand_h +#define cmOutputRequiredFilesCommand_h + +#include "cmCommand.h" +#include "cmMakeDepend.h" + +/** \class cmOutputRequiredFilesCommand + * \brief Output a list of required files for a source file + * + */ +class cmOutputRequiredFilesCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmOutputRequiredFilesCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "output_required_files";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Output a list of required source files for a specified source file."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " output_required_files(srcfile outputfile)\n" + "Outputs a list of all the source files that are required by the " + "specified srcfile. This list is written into outputfile. This is " + "similar to writing out the dependencies for srcfile except that it " + "jumps from .h files into .cxx, .c and .cpp files if possible."; + } + + cmTypeMacro(cmOutputRequiredFilesCommand, cmCommand); + void ListDependencies(cmDependInformation const *info, + FILE *fout, + std::set *visited); + +private: + std::string File; + std::string OutputFile; +}; + + + +#endif diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx new file mode 100755 index 000000000..64caf25f8 --- /dev/null +++ b/Source/cmPolicies.cxx @@ -0,0 +1,647 @@ +#include "cmPolicies.h" +#include "cmake.h" +#include "cmMakefile.h" +#include "cmSourceFile.h" +#include "cmVersion.h" +#include +#include +#include +#include + +const char* cmPolicies::PolicyStatusNames[] = { + "OLD", "WARN", "NEW", "REQUIRED_IF_USED", "REQUIRED_ALWAYS" +}; + +class cmPolicy +{ +public: + cmPolicy(cmPolicies::PolicyID iD, + const char *idString, + const char *shortDescription, + const char *longDescription, + unsigned int majorVersionIntroduced, + unsigned int minorVersionIntroduced, + unsigned int patchVersionIntroduced, + cmPolicies::PolicyStatus status) + { + if (!idString || !shortDescription || ! longDescription) + { + cmSystemTools::Error("Attempt to define a policy without " + "all parameters being specified!"); + return; + } + this->ID = iD; + this->IDString = idString; + this->ShortDescription = shortDescription; + this->LongDescription = longDescription; + this->MajorVersionIntroduced = majorVersionIntroduced; + this->MinorVersionIntroduced = minorVersionIntroduced; + this->PatchVersionIntroduced = patchVersionIntroduced; + this->Status = status; + } + + std::string GetVersionString() + { + cmOStringStream error; + error << this->MajorVersionIntroduced << "." << + this->MinorVersionIntroduced << "." << + this->PatchVersionIntroduced; + return error.str(); + } + + bool IsPolicyNewerThan(unsigned int majorV, + unsigned int minorV, + unsigned int patchV) + { + if (majorV < this->MajorVersionIntroduced) + { + return true; + } + if (majorV > this->MajorVersionIntroduced) + { + return false; + } + if (minorV < this->MinorVersionIntroduced) + { + return true; + } + if (minorV > this->MinorVersionIntroduced) + { + return false; + } + return (patchV < this->PatchVersionIntroduced); + } + + cmPolicies::PolicyID ID; + std::string IDString; + std::string ShortDescription; + std::string LongDescription; + unsigned int MajorVersionIntroduced; + unsigned int MinorVersionIntroduced; + unsigned int PatchVersionIntroduced; + cmPolicies::PolicyStatus Status; +}; + +cmPolicies::cmPolicies() +{ + // define all the policies + this->DefinePolicy( + CMP0000, "CMP0000", + "A minimum required CMake version must be specified.", + "CMake requires that projects specify the version of CMake to which " + "they have been written. " + "This policy has been put in place so users trying to build the project " + "may be told when they need to update their CMake. " + "Specifying a version also helps the project build with CMake versions " + "newer than that specified. " + "Use the cmake_minimum_required command at the top of your main " + " CMakeLists.txt file:\n" + " cmake_minimum_required(VERSION .)\n" + "where \".\" is the version of CMake you want to support " + "(such as \"2.6\"). " + "The command will ensure that at least the given version of CMake is " + "running and help newer versions be compatible with the project. " + "See documentation of cmake_minimum_required for details.\n" + "Note that the command invocation must appear in the CMakeLists.txt " + "file itself; a call in an included file is not sufficient. " + "However, the cmake_policy command may be called to set policy " + "CMP0000 to OLD or NEW behavior explicitly. " + "The OLD behavior is to silently ignore the missing invocation. " + "The NEW behavior is to issue an error instead of a warning. " + "An included file may set CMP0000 explicitly to affect how this " + "policy is enforced for the main CMakeLists.txt file.", + 2,6,0, cmPolicies::WARN + ); + + this->DefinePolicy( + CMP0001, "CMP0001", + "CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.", + "The OLD behavior is to check CMAKE_BACKWARDS_COMPATIBILITY and present " + "it to the user. " + "The NEW behavior is to ignore CMAKE_BACKWARDS_COMPATIBILITY " + "completely.\n" + "In CMake 2.4 and below the variable CMAKE_BACKWARDS_COMPATIBILITY was " + "used to request compatibility with earlier versions of CMake. " + "In CMake 2.6 and above all compatibility issues are handled by policies " + "and the cmake_policy command. " + "However, CMake must still check CMAKE_BACKWARDS_COMPATIBILITY for " + "projects written for CMake 2.4 and below.", + 2,6,0, cmPolicies::WARN + ); + + this->DefinePolicy( + CMP0002, "CMP0002", + "Logical target names must be globally unique.", + "Targets names created with " + "add_executable, add_library, or add_custom_target " + "are logical build target names. " + "Logical target names must be globally unique because:\n" + " - Unique names may be referenced unambiguously both in CMake\n" + " code and on make tool command lines.\n" + " - Logical names are used by Xcode and VS IDE generators\n" + " to produce meaningful project names for the targets.\n" + "The logical name of executable and library targets does not " + "have to correspond to the physical file names built. " + "Consider using the OUTPUT_NAME target property to create two " + "targets with the same physical name while keeping logical " + "names distinct. " + "Custom targets must simply have globally unique names (unless one " + "uses the global property ALLOW_DUPLICATE_CUSTOM_TARGETS with a " + "Makefiles generator).", + 2,6,0, cmPolicies::WARN + ); + + this->DefinePolicy( + CMP0003, "CMP0003", + "Libraries linked via full path no longer produce linker search paths.", + "This policy affects how libraries whose full paths are NOT known " + "are found at link time, but was created due to a change in how CMake " + "deals with libraries whose full paths are known. " + "Consider the code\n" + " target_link_libraries(myexe /path/to/libA.so)\n" + "CMake 2.4 and below implemented linking to libraries whose full paths " + "are known by splitting them on the link line into separate components " + "consisting of the linker search path and the library name. " + "The example code might have produced something like\n" + " ... -L/path/to -lA ...\n" + "in order to link to library A. " + "An analysis was performed to order multiple link directories such that " + "the linker would find library A in the desired location, but there " + "are cases in which this does not work. " + "CMake versions 2.6 and above use the more reliable approach of passing " + "the full path to libraries directly to the linker in most cases. " + "The example code now produces something like\n" + " ... /path/to/libA.so ....\n" + "Unfortunately this change can break code like\n" + " target_link_libraries(myexe /path/to/libA.so B)\n" + "where \"B\" is meant to find \"/path/to/libB.so\". " + "This code is wrong because the user is asking the linker to find " + "library B but has not provided a linker search path (which may be " + "added with the link_directories command). " + "However, with the old linking implementation the code would work " + "accidentally because the linker search path added for library A " + "allowed library B to be found." + "\n" + "In order to support projects depending on linker search paths " + "added by linking to libraries with known full paths, the OLD " + "behavior for this policy will add the linker search paths even " + "though they are not needed for their own libraries. " + "When this policy is set to OLD, CMake will produce a link line such as\n" + " ... -L/path/to /path/to/libA.so -lB ...\n" + "which will allow library B to be found as it was previously. " + "When this policy is set to NEW, CMake will produce a link line such as\n" + " ... /path/to/libA.so -lB ...\n" + "which more accurately matches what the project specified." + "\n" + "The setting for this policy used when generating the link line is that " + "in effect when the target is created by an add_executable or " + "add_library command. For the example described above, the code\n" + " cmake_policy(SET CMP0003 OLD) # or cmake_policy(VERSION 2.4)\n" + " add_executable(myexe myexe.c)\n" + " target_link_libraries(myexe /path/to/libA.so B)\n" + "will work and suppress the warning for this policy. " + "It may also be updated to work with the corrected linking approach:\n" + " cmake_policy(SET CMP0003 NEW) # or cmake_policy(VERSION 2.6)\n" + " link_directories(/path/to) # needed to find library B\n" + " add_executable(myexe myexe.c)\n" + " target_link_libraries(myexe /path/to/libA.so B)\n" + "Even better, library B may be specified with a full path:\n" + " add_executable(myexe myexe.c)\n" + " target_link_libraries(myexe /path/to/libA.so /path/to/libB.so)\n" + "When all items on the link line have known paths CMake does not check " + "this policy so it has no effect.\n" + "Note that the warning for this policy will be issued for at most " + "one target. This avoids flooding users with messages for every " + "target when setting the policy once will probably fix all targets.", + 2,6,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0004, "CMP0004", + "Libraries linked may not have leading or trailing whitespace.", + "CMake versions 2.4 and below silently removed leading and trailing " + "whitespace from libraries linked with code like\n" + " target_link_libraries(myexe \" A \")\n" + "This could lead to subtle errors in user projects.\n" + "The OLD behavior for this policy is to silently remove leading and " + "trailing whitespace. " + "The NEW behavior for this policy is to diagnose the existence of " + "such whitespace as an error. " + "The setting for this policy used when checking the library names is " + "that in effect when the target is created by an add_executable or " + "add_library command.", + 2,6,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0005, "CMP0005", + "Preprocessor definition values are now escaped automatically.", + "This policy determines whether or not CMake should generate escaped " + "preprocessor definition values added via add_definitions. " + "CMake versions 2.4 and below assumed that only trivial values would " + "be given for macros in add_definitions calls. " + "It did not attempt to escape non-trivial values such as string " + "literals in generated build rules. " + "CMake versions 2.6 and above support escaping of most values, but " + "cannot assume the user has not added escapes already in an attempt to " + "work around limitations in earlier versions.\n" + "The OLD behavior for this policy is to place definition values given " + "to add_definitions directly in the generated build rules without " + "attempting to escape anything. " + "The NEW behavior for this policy is to generate correct escapes " + "for all native build tools automatically. " + "See documentation of the COMPILE_DEFINITIONS target property for " + "limitations of the escaping implementation.", + 2,6,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0006, "CMP0006", + "Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION.", + "This policy determines whether the install(TARGETS) command must be " + "given a BUNDLE DESTINATION when asked to install a target with the " + "MACOSX_BUNDLE property set. " + "CMake 2.4 and below did not distinguish application bundles from " + "normal executables when installing targets. " + "CMake 2.6 provides a BUNDLE option to the install(TARGETS) command " + "that specifies rules specific to application bundles on the Mac. " + "Projects should use this option when installing a target with the " + "MACOSX_BUNDLE property set.\n" + "The OLD behavior for this policy is to fall back to the RUNTIME " + "DESTINATION if a BUNDLE DESTINATION is not given. " + "The NEW behavior for this policy is to produce an error if a bundle " + "target is installed without a BUNDLE DESTINATION.", + 2,6,0, cmPolicies::WARN); + + this->DefinePolicy( + CMP0007, "CMP0007", + "list command no longer ignores empty elements.", + "This policy determines whether the list command will " + "ignore empty elements in the list. " + "CMake 2.4 and below list commands ignored all empty elements" + " in the list. For example, a;b;;c would have length 3 and not 4. " + "The OLD behavior for this policy is to ignore empty list elements. " + "The NEW behavior for this policy is to correctly count empty " + "elements in a list. ", + 2,6,0, cmPolicies::WARN); +} + +cmPolicies::~cmPolicies() +{ + // free the policies + std::map::iterator i + = this->Policies.begin(); + for (;i != this->Policies.end(); ++i) + { + delete i->second; + } +} + +void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD, + const char *idString, + const char *shortDescription, + const char *longDescription, + unsigned int majorVersionIntroduced, + unsigned int minorVersionIntroduced, + unsigned int patchVersionIntroduced, + cmPolicies::PolicyStatus status) +{ + // a policy must be unique and can only be defined once + if (this->Policies.find(iD) != this->Policies.end()) + { + cmSystemTools::Error("Attempt to redefine a CMake policy for policy " + "ID ", this->GetPolicyIDString(iD).c_str()); + return; + } + + this->Policies[iD] = new cmPolicy(iD, idString, + shortDescription, + longDescription, + majorVersionIntroduced, + minorVersionIntroduced, + patchVersionIntroduced, + status); + this->PolicyStringMap[idString] = iD; +} + +bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf, + const char *version) +{ + std::string ver = "2.4.0"; + + if (version && strlen(version) > 0) + { + ver = version; + } + + unsigned int majorVer = 2; + unsigned int minorVer = 0; + unsigned int patchVer = 0; + + // parse the string + if(sscanf(ver.c_str(), "%u.%u.%u", + &majorVer, &minorVer, &patchVer) < 2) + { + cmOStringStream e; + e << "Invalid policy version value \"" << ver << "\". " + << "A numeric major.minor[.patch] must be given."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + + // it is an error if the policy version is less than 2.4 + if (majorVer < 2 || majorVer == 2 && minorVer < 4) + { + mf->IssueMessage(cmake::FATAL_ERROR, + "An attempt was made to set the policy version of CMake to something " + "earlier than \"2.4\". " + "In CMake 2.4 and below backwards compatibility was handled with the " + "CMAKE_BACKWARDS_COMPATIBILITY variable. " + "In order to get compatibility features supporting versions earlier " + "than 2.4 set policy CMP0001 to OLD to tell CMake to check the " + "CMAKE_BACKWARDS_COMPATIBILITY variable. " + "One way to so this is to set the policy version to 2.4 exactly." + ); + return false; + } + + // It is an error if the policy version is greater than the running + // CMake. + if (majorVer > cmVersion::GetMajorVersion() || + (majorVer == cmVersion::GetMajorVersion() && + minorVer > cmVersion::GetMinorVersion()) || + (majorVer == cmVersion::GetMajorVersion() && + minorVer == cmVersion::GetMinorVersion() && + patchVer > cmVersion::GetPatchVersion())) + { + cmOStringStream e; + e << "An attempt was made to set the policy version of CMake to \"" + << version << "\" which is greater than this version of CMake. " + << "This is not allowed because the greater version may have new " + << "policies not known to this CMake. " + << "You may need a newer CMake version to build this project."; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + + // now loop over all the policies and set them as appropriate + std::map::iterator i + = this->Policies.begin(); + for (;i != this->Policies.end(); ++i) + { + if (i->second->IsPolicyNewerThan(majorVer,minorVer,patchVer)) + { + if (!mf->SetPolicy(i->second->ID, cmPolicies::WARN)) + { + return false; + } + } + else + { + if (!mf->SetPolicy(i->second->ID, cmPolicies::NEW)) + { + return false; + } + } + } + return true; +} + +// is this a valid status the listfile can set this policy to? +bool cmPolicies::IsValidPolicyStatus(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // if they are setting a feature to anything other than OLD or WARN and the + // feature is not known about then that is an error + if (this->Policies.find(id) == this->Policies.end()) + { + if (status == cmPolicies::WARN || + status == cmPolicies::OLD) + { + return true; + } + cmOStringStream error; + error << + "Error: an attempt was made to enable the new behavior for " << + "a new feature that is in a later version of CMake than " + "what you are runing, please upgrade to a newer version " + "of CMake."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + + // now we know the feature is defined, so the only issue is if someone is + // setting it to WARN or OLD when the feature is REQUIRED_ALWAYS + if ((status == cmPolicies::WARN || + status == cmPolicies::OLD) && + this->Policies[id]->Status == cmPolicies::REQUIRED_ALWAYS) + { + cmOStringStream error; + error << + "Error: an attempt was made to enable the old behavior for " << + "a feature that is no longer supported. The feature in " << + "question is feature " << + id << + " which had new behavior introduced in CMake version " << + this->Policies[id]->GetVersionString() << + " please either update your CMakeLists files to conform to " << + "the new behavior " << + "or use an older version of CMake that still supports " << + "the old behavior. Run cmake --help-policies " << + id << " for more information."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + + return true; +} + +// is this a valid status the listfile can set this policy to? +bool cmPolicies::IsValidUsedPolicyStatus(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status) +{ + // if they are setting a feature to anything other than OLD or WARN and the + // feature is not known about then that is an error + if (this->Policies.find(id) == this->Policies.end()) + { + if (status == cmPolicies::WARN || + status == cmPolicies::OLD) + { + return true; + } + cmOStringStream error; + error << + "Error: an attempt was made to enable the new behavior for " << + "a new feature that is in a later version of CMake than " + "what you are runing, please upgrade to a newer version " + "of CMake."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + + // now we know the feature is defined, so the only issue is if someone is + // setting it to WARN or OLD when the feature is REQUIRED_ALWAYS + if ((status == cmPolicies::WARN || + status == cmPolicies::OLD) && + (this->Policies[id]->Status == cmPolicies::REQUIRED_ALWAYS || + this->Policies[id]->Status == cmPolicies::REQUIRED_IF_USED)) + { + cmOStringStream error; + error << + "Error: an attempt was made to enable the old behavior for " << + "a feature that is no longer supported. The feature in " << + "question is feature " << + id << + " which had new behavior introduced in CMake version " << + this->Policies[id]->GetVersionString() << + " please either update your CMakeLists files to conform to " << + "the new behavior " << + "or use an older version of CMake that still supports " << + "the old behavior. Run cmake --help-policies " << + id << " for more information."; + cmSystemTools::Error(error.str().c_str()); + return false; + } + + return true; +} + +bool cmPolicies::GetPolicyID(const char *id, cmPolicies::PolicyID &pid) +{ + if (!id || strlen(id) < 1) + { + return false; + } + std::map::iterator pos = + this->PolicyStringMap.find(id); + if (pos == this->PolicyStringMap.end()) + { + return false; + } + pid = pos->second; + return true; +} + +std::string cmPolicies::GetPolicyIDString(cmPolicies::PolicyID pid) +{ + std::map::iterator pos = + this->Policies.find(pid); + if (pos == this->Policies.end()) + { + return ""; + } + return pos->second->IDString; +} + + +///! return a warning string for a given policy +std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id) +{ + std::map::iterator pos = + this->Policies.find(id); + if (pos == this->Policies.end()) + { + cmSystemTools::Error( + "Request for warning text for undefined policy!"); + return "Request for warning text for undefined policy!"; + } + + cmOStringStream msg; + msg << + "Policy " << pos->second->IDString << " is not set: " + "" << pos->second->ShortDescription << " " + "Run \"cmake --help-policy " << pos->second->IDString << "\" for " + "policy details. " + "Use the cmake_policy command to set the policy " + "and suppress this warning."; + return msg.str(); +} + + +///! return an error string for when a required policy is unspecified +std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id) +{ + std::map::iterator pos = + this->Policies.find(id); + if (pos == this->Policies.end()) + { + cmSystemTools::Error( + "Request for error text for undefined policy!"); + return "Request for warning text for undefined policy!"; + } + + cmOStringStream error; + error << + "Policy " << pos->second->IDString << " is not set to NEW: " + "" << pos->second->ShortDescription << " " + "Run \"cmake --help-policy " << pos->second->IDString << "\" for " + "policy details. " + "CMake now requires this policy to be set to NEW by the project. " + "The policy may be set explicitly using the code\n" + " cmake_policy(SET " << pos->second->IDString << " NEW)\n" + "or by upgrading all policies with the code\n" + " cmake_policy(VERSION " << pos->second->GetVersionString() << + ") # or later\n" + "Run \"cmake --help-command cmake_policy\" for more information."; + return error.str(); +} + +///! Get the default status for a policy +cmPolicies::PolicyStatus +cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id) +{ + // if the policy is not know then what? + std::map::iterator pos = + this->Policies.find(id); + if (pos == this->Policies.end()) + { + // TODO is this right? + return cmPolicies::WARN; + } + + return pos->second->Status; +} + +void cmPolicies::GetDocumentation(std::vector& v) +{ + // now loop over all the policies and set them as appropriate + std::map::iterator i + = this->Policies.begin(); + for (;i != this->Policies.end(); ++i) + { + cmOStringStream full; + full << i->second->LongDescription; + full << "\nThis policy was introduced in CMake version "; + full << i->second->GetVersionString() << "."; + if(i->first != cmPolicies::CMP0000) + { + full << " " + << "CMake version " << cmVersion::GetMajorVersion() + << "." << cmVersion::GetMinorVersion() << " "; + // add in some more text here based on status + switch (i->second->Status) + { + case cmPolicies::WARN: + full << "warns when the policy is not set and uses OLD behavior. " + << "Use the cmake_policy command to set it to OLD or NEW " + << "explicitly."; + break; + case cmPolicies::OLD: + full << "defaults to the OLD behavior for this policy."; + break; + case cmPolicies::NEW: + full << "defaults to the NEW behavior for this policy."; + break; + case cmPolicies::REQUIRED_IF_USED: + full << "requires the policy to be set to NEW if you use it. " + << "Use the cmake_policy command to set it to NEW."; + break; + case cmPolicies::REQUIRED_ALWAYS: + full << "requires the policy to be set to NEW. " + << "Use the cmake_policy command to set it to NEW."; + break; + } + } + cmDocumentationEntry e(i->second->IDString.c_str(), + i->second->ShortDescription.c_str(), + full.str().c_str()); + v.push_back(e); + } +} diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h new file mode 100755 index 000000000..2b141d1ad --- /dev/null +++ b/Source/cmPolicies.h @@ -0,0 +1,101 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPolicies.h,v $ + Language: C++ + Date: $Date: 2008-04-23 02:05:40 $ + Version: $Revision: 1.10.2.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmPolicies_h +#define cmPolicies_h + +#include "cmCustomCommand.h" + +class cmake; +class cmMakefile; +class cmPolicy; + +/** \class cmPolicies + * \brief Handles changes in CMake behavior and policies + * + * See the cmake wiki section on policies for an overview of this class's + * purpose + */ +class cmPolicies +{ +public: + cmPolicies(); + ~cmPolicies(); + + enum PolicyStatus { OLD, WARN, NEW, REQUIRED_IF_USED, REQUIRED_ALWAYS }; + static const char* PolicyStatusNames[]; + + enum PolicyID + { + CMP0000, // Policy version specification + CMP0001, // Ignore old compatibility variable + CMP0002, // Target names must be unique + CMP0003, // Linking does not include extra -L paths + CMP0004, // Libraries linked may not have leading or trailing whitespace + CMP0005, // Definition value escaping + CMP0006, // BUNDLE install rules needed for MACOSX_BUNDLE targets + CMP0007, // list command handling of empty elements + + // Always the last entry. Useful mostly to avoid adding a comma + // the last policy when adding a new one. + CMPCOUNT + }; + + ///! convert a string policy ID into a number + bool GetPolicyID(const char *id, /* out */ cmPolicies::PolicyID &pid); + std::string GetPolicyIDString(cmPolicies::PolicyID pid); + + ///! Get the default status for a policy + cmPolicies::PolicyStatus GetPolicyStatus(cmPolicies::PolicyID id); + + ///! Define a Policy for CMake + void DefinePolicy(cmPolicies::PolicyID id, + const char *stringID, + const char *shortDescription, + const char *longDescription, + unsigned int majorVersionIntroduced, + unsigned int minorVersionIntroduced, + unsigned int patchVersionIntroduced, + cmPolicies::PolicyStatus status); + + ///! Set a policy level for this listfile + bool ApplyPolicyVersion(cmMakefile *mf, const char *version); + + ///! test to see if setting a policy to a specific value is valid + bool IsValidPolicyStatus(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status); + + ///! test to see if setting a policy to a specific value is valid, when used + bool IsValidUsedPolicyStatus(cmPolicies::PolicyID id, + cmPolicies::PolicyStatus status); + + ///! return a warning string for a given policy + std::string GetPolicyWarning(cmPolicies::PolicyID id); + + ///! return an error string for when a required policy is unspecified + std::string GetRequiredPolicyError(cmPolicies::PolicyID id); + + ///! Get docs for policies + void GetDocumentation(std::vector& v); + + private: + // might have to make these internal for VS6 not sure yet + std::map Policies; + std::map PolicyStringMap; + +}; + +#endif diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx new file mode 100644 index 000000000..79c18ad5c --- /dev/null +++ b/Source/cmProjectCommand.cxx @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmProjectCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.25 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmProjectCommand.h" + +// cmProjectCommand +bool cmProjectCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("PROJECT called with incorrect number of arguments"); + return false; + } + this->Makefile->SetProjectName(args[0].c_str()); + + std::string bindir = args[0]; + bindir += "_BINARY_DIR"; + std::string srcdir = args[0]; + srcdir += "_SOURCE_DIR"; + + this->Makefile->AddCacheDefinition + (bindir.c_str(), + this->Makefile->GetCurrentOutputDirectory(), + "Value Computed by CMake", cmCacheManager::STATIC); + this->Makefile->AddCacheDefinition + (srcdir.c_str(), + this->Makefile->GetCurrentDirectory(), + "Value Computed by CMake", cmCacheManager::STATIC); + + bindir = "PROJECT_BINARY_DIR"; + srcdir = "PROJECT_SOURCE_DIR"; + + this->Makefile->AddDefinition(bindir.c_str(), + this->Makefile->GetCurrentOutputDirectory()); + this->Makefile->AddDefinition(srcdir.c_str(), + this->Makefile->GetCurrentDirectory()); + + this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str()); + + // Set the CMAKE_PROJECT_NAME variable to be the highest-level + // project name in the tree. This is always the first PROJECT + // command encountered. + if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME")) + { + this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str()); + } + + std::vector languages; + if(args.size() > 1) + { + for(size_t i =1; i < args.size(); ++i) + { + languages.push_back(args[i]); + } + } + else + { + // if no language is specified do c and c++ + languages.push_back("C"); + languages.push_back("CXX"); + } + this->Makefile->EnableLanguage(languages, false); + return true; +} + diff --git a/Source/cmProjectCommand.h b/Source/cmProjectCommand.h new file mode 100644 index 000000000..bfb870287 --- /dev/null +++ b/Source/cmProjectCommand.h @@ -0,0 +1,82 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmProjectCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmProjectCommand_h +#define cmProjectCommand_h + +#include "cmCommand.h" + +/** \class cmProjectCommand + * \brief Specify the name for this build project. + * + * cmProjectCommand is used to specify a name for this build project. + * It is defined once per set of CMakeList.txt files (including + * all subdirectories). Currently it just sets the name of the workspace + * file for Microsoft Visual C++ + */ +class cmProjectCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmProjectCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "project";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set a name for the entire project."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " project(projectname [CXX] [C] [Java])\n" + "Sets the name of the project. " + "This creates the variables projectname_BINARY_DIR and " + "projectname_SOURCE_DIR. " + "Optionally you can specify which languages your project supports. " + "By default all languages are supported. If you do not have a " + "C++ compiler, but want" + " to build a c program with cmake, then use this option."; + } + + cmTypeMacro(cmProjectCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmProperty.cxx b/Source/cmProperty.cxx new file mode 100755 index 000000000..319d34599 --- /dev/null +++ b/Source/cmProperty.cxx @@ -0,0 +1,45 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmProperty.cxx,v $ + Language: C++ + Date: $Date: 2008-01-17 23:13:55 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmProperty.h" +#include "cmSystemTools.h" + +void cmProperty::Set(const char *name, const char *value) +{ + this->Name = name; + this->Value = value; + this->ValueHasBeenSet = true; +} + +void cmProperty::Append(const char *name, const char *value) +{ + this->Name = name; + if(!this->Value.empty() && *value) + { + this->Value += ";"; + } + this->Value += value; + this->ValueHasBeenSet = true; +} + +const char *cmProperty::GetValue() const +{ + if (this->ValueHasBeenSet) + { + return this->Value.c_str(); + } + return 0; +} diff --git a/Source/cmProperty.h b/Source/cmProperty.h new file mode 100755 index 000000000..a717bd549 --- /dev/null +++ b/Source/cmProperty.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmProperty.h,v $ + Language: C++ + Date: $Date: 2008-01-17 23:13:55 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmProperty_h +#define cmProperty_h + +#include "cmStandardIncludes.h" + +class cmProperty +{ +public: + enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, + TEST, VARIABLE, CACHED_VARIABLE }; + + // set this property + void Set(const char *name, const char *value); + + // append to this property + void Append(const char *name, const char *value); + + // get the value + const char *GetValue() const; + + // construct with the value not set + cmProperty() { this->ValueHasBeenSet = false; }; + +protected: + std::string Name; + std::string Value; + bool ValueHasBeenSet; +}; + +#endif diff --git a/Source/cmPropertyDefinition.cxx b/Source/cmPropertyDefinition.cxx new file mode 100755 index 000000000..7a3e3425f --- /dev/null +++ b/Source/cmPropertyDefinition.cxx @@ -0,0 +1,52 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyDefinition.cxx,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmPropertyDefinition.h" +#include "cmSystemTools.h" + +cmDocumentationEntry cmPropertyDefinition::GetDocumentation() const +{ + cmDocumentationEntry e; + e.Name = this->Name; + e.Brief = this->ShortDescription; + e.Full = this->FullDescription; + return e; +} + +void cmPropertyDefinition +::DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *shortDescription, + const char *fullDescription, + const char *sec, + bool chain) +{ + this->Name = name; + this->Scope = scope; + this->Chained = chain; + if (shortDescription) + { + this->ShortDescription = shortDescription; + } + if (fullDescription) + { + this->FullDescription = fullDescription; + } + if (sec) + { + this->DocumentationSection = sec; + } +} + diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h new file mode 100755 index 000000000..3a2eec831 --- /dev/null +++ b/Source/cmPropertyDefinition.h @@ -0,0 +1,64 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyDefinition.h,v $ + Language: C++ + Date: $Date: 2007-10-24 18:43:10 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmPropertyDefinition_h +#define cmPropertyDefinition_h + +#include "cmProperty.h" + +class cmPropertyDefinition +{ +public: + // Define this property + void DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + const char *DocumentationSection, + bool chained); + + // get the documentation string + cmDocumentationEntry GetDocumentation() const; + + // basic constructor + cmPropertyDefinition() { this->Chained = false; }; + + // is it chained? + bool IsChained() {return this->Chained; }; + + // Get the section if any + const std::string &GetDocumentationSection() const { + return this->DocumentationSection; }; + + // get the scope + cmProperty::ScopeType GetScope() const { + return this->Scope; }; + + // get the docs + const std::string &GetShortDescription() const { + return this->ShortDescription; }; + const std::string &GetFullDescription() const { + return this->FullDescription; }; + +protected: + std::string Name; + std::string ShortDescription; + std::string FullDescription; + std::string DocumentationSection; + cmProperty::ScopeType Scope; + bool Chained; +}; + +#endif diff --git a/Source/cmPropertyDefinitionMap.cxx b/Source/cmPropertyDefinitionMap.cxx new file mode 100755 index 000000000..83bcaffc5 --- /dev/null +++ b/Source/cmPropertyDefinitionMap.cxx @@ -0,0 +1,127 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyDefinitionMap.cxx,v $ + Language: C++ + Date: $Date: 2007-10-23 14:40:49 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmPropertyDefinitionMap.h" +#include "cmSystemTools.h" +#include "cmDocumentationSection.h" + +void cmPropertyDefinitionMap +::DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + const char *DocumentationSection, + bool chain) +{ + if (!name) + { + return; + } + + cmPropertyDefinitionMap::iterator it = this->find(name); + cmPropertyDefinition *prop; + if (it == this->end()) + { + prop = &(*this)[name]; + prop->DefineProperty(name,scope,ShortDescription, FullDescription, + DocumentationSection, chain); + } +} + +void cmPropertyDefinitionMap +::GetPropertiesDocumentation(std::map& v) const +{ + for(cmPropertyDefinitionMap::const_iterator j = this->begin(); + j != this->end(); ++j) + { + // add a section if needed + std::string secName = j->second.GetDocumentationSection(); + // if a section was not specified then use the scope + if (!secName.size()) + { + switch (j->second.GetScope()) + { + case cmProperty::GLOBAL: + secName = "Properties of Global Scope"; + break; + case cmProperty::TARGET: + secName = "Properties on Targets"; + break; + case cmProperty::SOURCE_FILE: + secName = "Properties on Source Files"; + break; + case cmProperty::DIRECTORY: + secName = "Properties on Directories"; + break; + case cmProperty::TEST: + secName = "Properties on Tests"; + break; + case cmProperty::VARIABLE: + secName = "Variables"; + break; + case cmProperty::CACHED_VARIABLE: + secName = "Cached Variables"; + break; + default: + secName = "Properties of Unknown Scope"; + break; + } + } + if (!v[secName]) + { + v[secName] = new + cmDocumentationSection(secName.c_str(), + cmSystemTools::UpperCase(secName).c_str()); + } + cmDocumentationEntry e = j->second.GetDocumentation(); + if (e.Brief.size() || e.Full.size()) + { + v[secName]->Append(e); + } + } +} + +bool cmPropertyDefinitionMap::IsPropertyDefined(const char *name) +{ + if (!name) + { + return false; + } + + cmPropertyDefinitionMap::iterator it = this->find(name); + if (it == this->end()) + { + return false; + } + + return true; +} + +bool cmPropertyDefinitionMap::IsPropertyChained(const char *name) +{ + if (!name) + { + return false; + } + + cmPropertyDefinitionMap::iterator it = this->find(name); + if (it == this->end()) + { + return false; + } + + return it->second.IsChained(); +} diff --git a/Source/cmPropertyDefinitionMap.h b/Source/cmPropertyDefinitionMap.h new file mode 100755 index 000000000..6ab8d1ba7 --- /dev/null +++ b/Source/cmPropertyDefinitionMap.h @@ -0,0 +1,46 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyDefinitionMap.h,v $ + Language: C++ + Date: $Date: 2007-10-22 16:48:39 $ + Version: $Revision: 1.3 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmPropertyDefinitionMap_h +#define cmPropertyDefinitionMap_h + +#include "cmPropertyDefinition.h" + +class cmDocumentationSection; + +class cmPropertyDefinitionMap : +public std::map +{ +public: + // define the property + void DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + const char *DocumentaitonSection, + bool chain); + + // has a named property been defined + bool IsPropertyDefined(const char *name); + + // is a named property set to chain + bool IsPropertyChained(const char *name); + + void GetPropertiesDocumentation(std::map&) const; +}; + +#endif + diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx new file mode 100755 index 000000000..a76e6bdf6 --- /dev/null +++ b/Source/cmPropertyMap.cxx @@ -0,0 +1,128 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyMap.cxx,v $ + Language: C++ + Date: $Date: 2008-01-17 23:13:55 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmPropertyMap.h" +#include "cmSystemTools.h" +#include "cmake.h" + +cmProperty *cmPropertyMap::GetOrCreateProperty(const char *name) +{ + cmPropertyMap::iterator it = this->find(name); + cmProperty *prop; + if (it == this->end()) + { + prop = &(*this)[name]; + } + else + { + prop = &(it->second); + } + return prop; +} + +void cmPropertyMap::SetProperty(const char *name, const char *value, + cmProperty::ScopeType scope) +{ + if (!name) + { + return; + } + if(!value) + { + this->erase(name); + return; + } +#ifdef CMAKE_STRICT + if (!this->CMakeInstance) + { + cmSystemTools::Error("CMakeInstance not set on a property map!"); + abort(); + } + else + { + this->CMakeInstance->RecordPropertyAccess(name,scope); + } +#else + (void)scope; +#endif + + cmProperty *prop = this->GetOrCreateProperty(name); + prop->Set(name,value); +} + +void cmPropertyMap::AppendProperty(const char* name, const char* value, + cmProperty::ScopeType scope) +{ + // Skip if nothing to append. + if(!name || !value || !*value) + { + return; + } +#ifdef CMAKE_STRICT + if (!this->CMakeInstance) + { + cmSystemTools::Error("CMakeInstance not set on a property map!"); + abort(); + } + else + { + this->CMakeInstance->RecordPropertyAccess(name,scope); + } +#else + (void)scope; +#endif + + cmProperty *prop = this->GetOrCreateProperty(name); + prop->Append(name,value); +} + +const char *cmPropertyMap +::GetPropertyValue(const char *name, + cmProperty::ScopeType scope, + bool &chain) const +{ + chain = false; + if (!name) + { + return 0; + } + + // has the property been defined? +#ifdef CMAKE_STRICT + if (!this->CMakeInstance) + { + cmSystemTools::Error("CMakeInstance not set on a property map!"); + abort(); + } + else + { + this->CMakeInstance->RecordPropertyAccess(name,scope); + } +#endif + + cmPropertyMap::const_iterator it = this->find(name); + if (it == this->end()) + { + // should we chain up? + if (this->CMakeInstance) + { + chain = this->CMakeInstance->IsPropertyChained(name,scope); + } + return 0; + } + return it->second.GetValue(); +} + diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h new file mode 100755 index 000000000..cfbbc1166 --- /dev/null +++ b/Source/cmPropertyMap.h @@ -0,0 +1,48 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmPropertyMap.h,v $ + Language: C++ + Date: $Date: 2008-01-17 23:13:55 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmPropertyMap_h +#define cmPropertyMap_h + +#include "cmProperty.h" + +class cmake; + +class cmPropertyMap : public std::map +{ +public: + cmProperty *GetOrCreateProperty(const char *name); + + void SetProperty(const char *name, const char *value, + cmProperty::ScopeType scope); + + void AppendProperty(const char* name, const char* value, + cmProperty::ScopeType scope); + + const char *GetPropertyValue(const char *name, + cmProperty::ScopeType scope, + bool &chain) const; + + void SetCMakeInstance(cmake *cm) { this->CMakeInstance = cm; }; + + cmPropertyMap() { this->CMakeInstance = 0;}; + +private: + cmake *CMakeInstance; +}; + +#endif + diff --git a/Source/cmQTWrapCPPCommand.cxx b/Source/cmQTWrapCPPCommand.cxx new file mode 100644 index 000000000..f34e360ce --- /dev/null +++ b/Source/cmQTWrapCPPCommand.cxx @@ -0,0 +1,120 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmQTWrapCPPCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmQTWrapCPPCommand.h" + +// cmQTWrapCPPCommand +bool cmQTWrapCPPCommand::InitialPass(std::vector const& argsIn, + cmExecutionStatus &) +{ + if(argsIn.size() < 3 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // This command supports source list inputs for compatibility. + std::vector args; + this->Makefile->ExpandSourceListArguments(argsIn, args, 2); + + // Get the moc executable to run in the custom command. + const char* moc_exe = + this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE"); + + // Get the variable holding the list of sources. + std::string const& sourceList = args[1]; + std::string sourceListValue = + this->Makefile->GetSafeDefinition(sourceList.c_str()); + + // Create a rule for all sources listed. + for(std::vector::iterator j = (args.begin() + 2); + j != args.end(); ++j) + { + cmSourceFile *curr = this->Makefile->GetSource(j->c_str()); + // if we should wrap the class + if(!(curr && curr->GetPropertyAsBool("WRAP_EXCLUDE"))) + { + // Compute the name of the file to generate. + std::string srcName = + cmSystemTools::GetFilenameWithoutLastExtension(*j); + std::string newName = this->Makefile->GetCurrentOutputDirectory(); + newName += "/moc_"; + newName += srcName; + newName += ".cxx"; + cmSourceFile* sf = + this->Makefile->GetOrCreateSource(newName.c_str(), true); + if (curr) + { + sf->SetProperty("ABSTRACT", curr->GetProperty("ABSTRACT")); + } + + // Compute the name of the header from which to generate the file. + std::string hname; + if(cmSystemTools::FileIsFullPath(j->c_str())) + { + hname = *j; + } + else + { + if(curr && curr->GetPropertyAsBool("GENERATED")) + { + hname = this->Makefile->GetCurrentOutputDirectory(); + } + else + { + hname = this->Makefile->GetCurrentDirectory(); + } + hname += "/"; + hname += *j; + } + + // Append the generated source file to the list. + if(!sourceListValue.empty()) + { + sourceListValue += ";"; + } + sourceListValue += newName; + + // Create the custom command to generate the file. + cmCustomCommandLine commandLine; + commandLine.push_back(moc_exe); + commandLine.push_back("-o"); + commandLine.push_back(newName); + commandLine.push_back(hname); + + cmCustomCommandLines commandLines; + commandLines.push_back(commandLine); + + std::vector depends; + depends.push_back(moc_exe); + depends.push_back(hname); + + const char* no_main_dependency = 0; + const char* no_working_dir = 0; + this->Makefile->AddCustomCommandToOutput(newName.c_str(), + depends, + no_main_dependency, + commandLines, + "Qt Wrapped File", + no_working_dir); + } + } + + // Store the final list of source files. + this->Makefile->AddDefinition(sourceList.c_str(), + sourceListValue.c_str()); + return true; +} diff --git a/Source/cmQTWrapCPPCommand.h b/Source/cmQTWrapCPPCommand.h new file mode 100644 index 000000000..6a886e4c0 --- /dev/null +++ b/Source/cmQTWrapCPPCommand.h @@ -0,0 +1,79 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmQTWrapCPPCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.15 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmQTWrapCPPCommand_h +#define cmQTWrapCPPCommand_h + +#include "cmCommand.h" + +#include "cmSourceFile.h" + +/** \class cmQTWrapCPPCommand + * \brief Create moc file rules for QT classes + * + * cmQTWrapCPPCommand is used to create wrappers for QT classes into + * normal C++ + */ +class cmQTWrapCPPCommand : public cmCommand +{ +public: + cmTypeMacro(cmQTWrapCPPCommand, cmCommand); + + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmQTWrapCPPCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "qt_wrap_cpp";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Create Qt Wrappers."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " qt_wrap_cpp(resultingLibraryName DestName\n" + " SourceLists ...)\n" + "Produce moc files for all the .h files listed in the SourceLists. " + "The moc files will be added to the library using the DestName " + "source list."; + } +}; + + + +#endif diff --git a/Source/cmQTWrapUICommand.cxx b/Source/cmQTWrapUICommand.cxx new file mode 100644 index 000000000..2d0ef9a1d --- /dev/null +++ b/Source/cmQTWrapUICommand.cxx @@ -0,0 +1,171 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmQTWrapUICommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.26 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmQTWrapUICommand.h" + +// cmQTWrapUICommand +bool cmQTWrapUICommand::InitialPass(std::vector const& argsIn, + cmExecutionStatus &) +{ + if(argsIn.size() < 4 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // This command supports source list inputs for compatibility. + std::vector args; + this->Makefile->ExpandSourceListArguments(argsIn, args, 3); + + // Get the uic and moc executables to run in the custom commands. + const char* uic_exe = + this->Makefile->GetRequiredDefinition("QT_UIC_EXECUTABLE"); + const char* moc_exe = + this->Makefile->GetRequiredDefinition("QT_MOC_EXECUTABLE"); + + // Get the variable holding the list of sources. + std::string const& headerList = args[1]; + std::string const& sourceList = args[2]; + std::string headerListValue = + this->Makefile->GetSafeDefinition(headerList.c_str()); + std::string sourceListValue = + this->Makefile->GetSafeDefinition(sourceList.c_str()); + + // Create rules for all sources listed. + for(std::vector::iterator j = (args.begin() + 3); + j != args.end(); ++j) + { + cmSourceFile *curr = this->Makefile->GetSource(j->c_str()); + // if we should wrap the class + if(!(curr && curr->GetPropertyAsBool("WRAP_EXCLUDE"))) + { + // Compute the name of the files to generate. + std::string srcName = + cmSystemTools::GetFilenameWithoutLastExtension(*j); + std::string hName = this->Makefile->GetCurrentOutputDirectory(); + hName += "/"; + hName += srcName; + hName += ".h"; + std::string cxxName = this->Makefile->GetCurrentOutputDirectory(); + cxxName += "/"; + cxxName += srcName; + cxxName += ".cxx"; + std::string mocName = this->Makefile->GetCurrentOutputDirectory(); + mocName += "/moc_"; + mocName += srcName; + mocName += ".cxx"; + + // Compute the name of the ui file from which to generate others. + std::string uiName; + if(cmSystemTools::FileIsFullPath(j->c_str())) + { + uiName = *j; + } + else + { + if(curr && curr->GetPropertyAsBool("GENERATED")) + { + uiName = this->Makefile->GetCurrentOutputDirectory(); + } + else + { + uiName = this->Makefile->GetCurrentDirectory(); + } + uiName += "/"; + uiName += *j; + } + + // create the list of headers + if(!headerListValue.empty()) + { + headerListValue += ";"; + } + headerListValue += hName; + + // create the list of sources + if(!sourceListValue.empty()) + { + sourceListValue += ";"; + } + sourceListValue += cxxName; + sourceListValue += ";"; + sourceListValue += mocName; + + // set up .ui to .h and .cxx command + cmCustomCommandLine hCommand; + hCommand.push_back(uic_exe); + hCommand.push_back("-o"); + hCommand.push_back(hName); + hCommand.push_back(uiName); + cmCustomCommandLines hCommandLines; + hCommandLines.push_back(hCommand); + + cmCustomCommandLine cxxCommand; + cxxCommand.push_back(uic_exe); + cxxCommand.push_back("-impl"); + cxxCommand.push_back(hName); + cxxCommand.push_back("-o"); + cxxCommand.push_back(cxxName); + cxxCommand.push_back(uiName); + cmCustomCommandLines cxxCommandLines; + cxxCommandLines.push_back(cxxCommand); + + cmCustomCommandLine mocCommand; + mocCommand.push_back(moc_exe); + mocCommand.push_back("-o"); + mocCommand.push_back(mocName); + mocCommand.push_back(hName); + cmCustomCommandLines mocCommandLines; + mocCommandLines.push_back(mocCommand); + + std::vector depends; + depends.push_back(uiName); + const char* no_main_dependency = 0; + const char* no_comment = 0; + const char* no_working_dir = 0; + this->Makefile->AddCustomCommandToOutput(hName.c_str(), + depends, + no_main_dependency, + hCommandLines, + no_comment, + no_working_dir); + + depends.push_back(hName); + this->Makefile->AddCustomCommandToOutput(cxxName.c_str(), + depends, + no_main_dependency, + cxxCommandLines, + no_comment, + no_working_dir); + + depends.clear(); + depends.push_back(hName); + this->Makefile->AddCustomCommandToOutput(mocName.c_str(), + depends, + no_main_dependency, + mocCommandLines, + no_comment, + no_working_dir); + } + } + + // Store the final list of source files and headers. + this->Makefile->AddDefinition(sourceList.c_str(), + sourceListValue.c_str()); + this->Makefile->AddDefinition(headerList.c_str(), + headerListValue.c_str()); + return true; +} diff --git a/Source/cmQTWrapUICommand.h b/Source/cmQTWrapUICommand.h new file mode 100644 index 000000000..02589e700 --- /dev/null +++ b/Source/cmQTWrapUICommand.h @@ -0,0 +1,80 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmQTWrapUICommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmQTWrapUICommand_h +#define cmQTWrapUICommand_h + +#include "cmCommand.h" + +#include "cmSourceFile.h" + +/** \class cmQTWrapUICommand + * \brief Create .h and .cxx files rules for QT user interfaces files + * + * cmQTWrapUICommand is used to create wrappers for QT classes into normal C++ + */ +class cmQTWrapUICommand : public cmCommand +{ +public: + cmTypeMacro(cmQTWrapUICommand, cmCommand); + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmQTWrapUICommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "qt_wrap_ui";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Create Qt user interfaces Wrappers."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " qt_wrap_ui(resultingLibraryName HeadersDestName\n" + " SourcesDestName SourceLists ...)\n" + "Produce .h and .cxx files for all the .ui files listed " + "in the SourceLists. " + "The .h files will be added to the library using the HeadersDestName" + "source list. " + "The .cxx files will be added to the library using the SourcesDestName" + "source list."; + } +}; + + + +#endif diff --git a/Source/cmRemoveCommand.cxx b/Source/cmRemoveCommand.cxx new file mode 100644 index 000000000..0d5d09f66 --- /dev/null +++ b/Source/cmRemoveCommand.cxx @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmRemoveCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmRemoveCommand.h" + +// cmRemoveCommand +bool cmRemoveCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + return true; + } + + const char* variable = args[0].c_str(); // VAR is always first + // get the old value + const char* cacheValue + = this->Makefile->GetDefinition(variable); + + // if there is no old value then return + if (!cacheValue) + { + return true; + } + + // expand the variable + std::vector varArgsExpanded; + cmSystemTools::ExpandListArgument(cacheValue, varArgsExpanded); + + // expand the args + // check for REMOVE(VAR v1 v2 ... vn) + std::vector argsExpanded; + std::vector temp; + for(unsigned int j = 1; j < args.size(); ++j) + { + temp.push_back(args[j]); + } + cmSystemTools::ExpandList(temp, argsExpanded); + + // now create the new value + std::string value; + for(unsigned int j = 0; j < varArgsExpanded.size(); ++j) + { + int found = 0; + for(unsigned int k = 0; k < argsExpanded.size(); ++k) + { + if (varArgsExpanded[j] == argsExpanded[k]) + { + found = 1; + break; + } + } + if (!found) + { + if (value.size()) + { + value += ";"; + } + value += varArgsExpanded[j]; + } + } + + // add the definition + this->Makefile->AddDefinition(variable, value.c_str()); + + return true; +} + diff --git a/Source/cmRemoveCommand.h b/Source/cmRemoveCommand.h new file mode 100644 index 000000000..e5972d96e --- /dev/null +++ b/Source/cmRemoveCommand.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmRemoveCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmRemoveCommand_h +#define cmRemoveCommand_h + +#include "cmCommand.h" + +/** \class cmRemoveCommand + * \brief Set a CMAKE variable + * + * cmRemoveCommand sets a variable to a value with expansion. + */ +class cmRemoveCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmRemoveCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "remove";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Deprecated. Use the list(REMOVE_ITEM ) command instead."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " remove(VAR VALUE VALUE ...)\n" + "Removes VALUE from the variable VAR. " + "This is typically used to remove entries from a vector " + "(e.g. semicolon separated list). VALUE is expanded."; + } + + /** This command is kept for compatibility with older CMake versions. */ + virtual bool IsDiscouraged() + { + return true; + } + + cmTypeMacro(cmRemoveCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmRemoveDefinitionsCommand.cxx b/Source/cmRemoveDefinitionsCommand.cxx new file mode 100644 index 000000000..4bb73b158 --- /dev/null +++ b/Source/cmRemoveDefinitionsCommand.cxx @@ -0,0 +1,36 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmRemoveDefinitionsCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmRemoveDefinitionsCommand.h" + +// cmRemoveDefinitionsCommand +bool cmRemoveDefinitionsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + // it is OK to have no arguments + if(args.size() < 1 ) + { + return true; + } + + for(std::vector::const_iterator i = args.begin(); + i != args.end(); ++i) + { + this->Makefile->RemoveDefineFlag(i->c_str()); + } + return true; +} + diff --git a/Source/cmRemoveDefinitionsCommand.h b/Source/cmRemoveDefinitionsCommand.h new file mode 100644 index 000000000..98ae1ab6d --- /dev/null +++ b/Source/cmRemoveDefinitionsCommand.h @@ -0,0 +1,76 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmRemoveDefinitionsCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmRemoveDefinitionsCommand_h +#define cmRemoveDefinitionsCommand_h + +#include "cmCommand.h" + +/** \class cmRemoveDefinitionsCommand + * \brief Specify a list of compiler defines + * + * cmRemoveDefinitionsCommand specifies a list of compiler defines. + * These defines will + * be removed from the compile command. + */ +class cmRemoveDefinitionsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmRemoveDefinitionsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "remove_definitions";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Removes -D define flags added by add_definitions."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " remove_definitions(-DFOO -DBAR ...)\n" + "Removes flags (added by add_definitions) from the compiler command " + "line for sources in the current directory and below."; + } + + cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmReturnCommand.cxx b/Source/cmReturnCommand.cxx new file mode 100755 index 000000000..70ba349fa --- /dev/null +++ b/Source/cmReturnCommand.cxx @@ -0,0 +1,26 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmReturnCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:28:26 $ + Version: $Revision: 1.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmReturnCommand.h" + +// cmReturnCommand +bool cmReturnCommand::InitialPass(std::vector const&, + cmExecutionStatus &status) +{ + status.SetReturnInvoked(true); + return true; +} + diff --git a/Source/cmReturnCommand.h b/Source/cmReturnCommand.h new file mode 100755 index 000000000..adb2701c0 --- /dev/null +++ b/Source/cmReturnCommand.h @@ -0,0 +1,82 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmReturnCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 23:34:19 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmReturnCommand_h +#define cmReturnCommand_h + +#include "cmCommand.h" + +/** \class cmReturnCommand + * \brief Return from a directory or function + * + * cmReturnCommand returns from a directory or function + */ +class cmReturnCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmReturnCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "return";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Return from a directory or function."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " return()\n" + "Returns from a directory or function. When this command is " + "encountered, it caused process of the current function or " + "directory to stop and control is return to the caller of the " + "function, or the parent directory if any. Note that a macro " + "is not a function and does not handle return like a function does."; + } + + cmTypeMacro(cmReturnCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx new file mode 100644 index 000000000..ecf98ed17 --- /dev/null +++ b/Source/cmSeparateArgumentsCommand.cxx @@ -0,0 +1,38 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSeparateArgumentsCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.6 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSeparateArgumentsCommand.h" + +// cmSeparateArgumentsCommand +bool cmSeparateArgumentsCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + const char* cacheValue = this->Makefile->GetDefinition(args[0].c_str()); + if(!cacheValue) + { + return true; + } + std::string value = cacheValue; + cmSystemTools::ReplaceString(value," ", ";"); + this->Makefile->AddDefinition(args[0].c_str(), value.c_str()); + return true; +} + diff --git a/Source/cmSeparateArgumentsCommand.h b/Source/cmSeparateArgumentsCommand.h new file mode 100644 index 000000000..a067b6ebb --- /dev/null +++ b/Source/cmSeparateArgumentsCommand.h @@ -0,0 +1,81 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSeparateArgumentsCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSeparateArgumentsCommand_h +#define cmSeparateArgumentsCommand_h + +#include "cmCommand.h" + +/** \class cmSeparateArgumentsCommand + * \brief SeparateArguments a CMAKE variable + * + * cmSeparateArgumentsCommand sets a variable to a value with expansion. + */ +class cmSeparateArgumentsCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmSeparateArgumentsCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "separate_arguments";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return + "Split space separated arguments into a semi-colon separated list."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " separate_arguments(VARIABLE)\n" + "Convert the value of VARIABLE to a semi-colon separated list. " + "All spaces are replaced with ';'. This helps with generating " + "command lines."; + } + + cmTypeMacro(cmSeparateArgumentsCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSetCommand.cxx b/Source/cmSetCommand.cxx new file mode 100644 index 000000000..033ea3418 --- /dev/null +++ b/Source/cmSetCommand.cxx @@ -0,0 +1,183 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-03-13 17:52:49 $ + Version: $Revision: 1.33 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetCommand.h" + +// cmSetCommand +bool cmSetCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // watch for ENV signatures + const char* variable = args[0].c_str(); // VAR is always first + if (!strncmp(variable,"ENV{",4) && strlen(variable) > 5) + { + // what is the variable name + char *varName = new char [strlen(variable)]; + strncpy(varName,variable+4,strlen(variable)-5); + varName[strlen(variable)-5] = '\0'; + std::string putEnvArg = varName; + putEnvArg += "="; + + // what is the current value if any + const char *currValue = getenv(varName); + delete [] varName; + + // will it be set to something, then set it + if (args.size() > 1 && args[1].size()) + { + // but only if it is different from current value + if (!currValue || strcmp(currValue,args[1].c_str())) + { + putEnvArg += args[1]; + cmSystemTools::PutEnv(putEnvArg.c_str()); + } + return true; + } + + // if it will be cleared, then clear it if it isn;t already clear + if (currValue) + { + cmSystemTools::PutEnv(putEnvArg.c_str()); + } + return true; + } + + // SET (VAR) // Removes the definition of VAR. + if (args.size() == 1) + { + this->Makefile->RemoveDefinition(args[0].c_str()); + return true; + } + + // here are the remaining options + // SET (VAR value ) + // SET (VAR CACHE TYPE "doc String" [FORCE]) + // SET (VAR value CACHE TYPE "doc string" [FORCE]) + std::string value; // optional + bool cache = false; // optional + bool force = false; // optional + bool parentScope = false; + cmCacheManager::CacheEntryType type + = cmCacheManager::STRING; // required if cache + const char* docstring = 0; // required if cache + std::string::size_type cacheStart = 0; + + unsigned int ignoreLastArgs = 0; + // look for PARENT_SCOPE argument + if (args.size() > 1 && args[args.size()-1] == "PARENT_SCOPE") + { + parentScope = true; + ignoreLastArgs++; + } + else + { + // look for FORCE argument + if (args.size() > 4 && args[args.size()-1] == "FORCE") + { + force = true; + ignoreLastArgs++; + } + + // check for cache signature + if (args.size() > 3 && args[args.size() - 3 - (force ? 1 : 0)] == "CACHE") + { + cache = true; + ignoreLastArgs+=3; + } + } + + // collect any values into a single semi-colon seperated value list + if(static_cast(args.size()) > + static_cast(1 + ignoreLastArgs)) + { + value = args[1]; + size_t endPos = args.size() - ignoreLastArgs; + for(size_t i = 2; i < endPos; ++i) + { + value += ";"; + value += args[i]; + } + } + + if (parentScope) + { + if (value.empty()) + { + this->Makefile->RaiseScope(variable, 0); + } + else + { + this->Makefile->RaiseScope(variable, value.c_str()); + } + return true; + } + + + // we should be nice and try to catch some simple screwups if the last or + // next to last args are CACHE then they screwed up. If they used FORCE + // without CACHE they screwed up + if (args[args.size() - 1] == "CACHE" || + args.size() > 1 && args[args.size() - 2] == "CACHE" || + force && !cache) + { + this->SetError("given invalid arguments for CACHE mode."); + return false; + } + + if(cache) + { + cacheStart = args.size() - 3 - (force ? 1 : 0); + type = cmCacheManager::StringToType(args[cacheStart+1].c_str()); + docstring = args[cacheStart+2].c_str(); + } + + // see if this is already in the cache + cmCacheManager::CacheIterator it = + this->Makefile->GetCacheManager()->GetCacheIterator(variable); + if(!it.IsAtEnd() && (it.GetType() != cmCacheManager::UNINITIALIZED)) + { + // if the set is trying to CACHE the value but the value + // is already in the cache and the type is not internal + // then leave now without setting any definitions in the cache + // or the makefile + if(cache && type != cmCacheManager::INTERNAL && !force) + { + return true; + } + } + + // if it is meant to be in the cache then define it in the cache + if(cache) + { + this->Makefile->AddCacheDefinition(variable, + value.c_str(), + docstring, + type); + } + else + { + // add the definition + this->Makefile->AddDefinition(variable, value.c_str()); + } + return true; +} + diff --git a/Source/cmSetCommand.h b/Source/cmSetCommand.h new file mode 100644 index 000000000..7aabb987d --- /dev/null +++ b/Source/cmSetCommand.h @@ -0,0 +1,105 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetCommand_h +#define cmSetCommand_h + +#include "cmCommand.h" + +/** \class cmSetCommand + * \brief Set a CMAKE variable + * + * cmSetCommand sets a variable to a value with expansion. + */ +class cmSetCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmSetCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "set";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set a CMAKE variable to a given value."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set( [[CACHE [FORCE]] | " + "PARENT_SCOPE])\n" + "Within CMake sets to the value . is expanded" + " before is set to it. If CACHE is present, then the " + " is put in the cache. and are then " + "required. is used by the CMake GUI to choose a widget with " + "which the user sets a value. The value for may be one of\n" + " FILEPATH = File chooser dialog.\n" + " PATH = Directory chooser dialog.\n" + " STRING = Arbitrary string.\n" + " BOOL = Boolean ON/OFF checkbox.\n" + " INTERNAL = No GUI entry (used for persistent variables).\n" + "If is INTERNAL, then the is always written into the " + "cache, replacing any values existing in the cache. If it is not a " + "cache variable, then this always writes into the current makefile. The " + "FORCE option will overwrite the cache value removing any changes by " + "the user.\n" + "If PARENT_SCOPE is present, the variable will be set in the scope " + "above the current scope. Each new directory or function creates a new " + "scope. This command will set the value of a variable into the parent " + "directory or calling function (whichever is applicable to the case at " + "hand) If VALUE is not specified then the variable is removed from the " + "parent scope.\n" + " set( ... )\n" + "In this case is set to a semicolon separated list of " + "values.\n" + " can be an environment variable such as:\n" + " set( ENV{PATH} /home/martink )\n" + "in which case the environment variable will be set."; + } + + cmTypeMacro(cmSetCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSetDirectoryPropertiesCommand.cxx b/Source/cmSetDirectoryPropertiesCommand.cxx new file mode 100644 index 000000000..29fa262b5 --- /dev/null +++ b/Source/cmSetDirectoryPropertiesCommand.cxx @@ -0,0 +1,75 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetDirectoryPropertiesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetDirectoryPropertiesCommand.h" + +#include "cmake.h" + +// cmSetDirectoryPropertiesCommand +bool cmSetDirectoryPropertiesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string errors; + bool ret = + cmSetDirectoryPropertiesCommand::RunCommand(this->Makefile, + args.begin() + 1, + args.end(), errors); + if (!ret) + { + this->SetError(errors.c_str()); + } + return ret; +} + +bool cmSetDirectoryPropertiesCommand +::RunCommand(cmMakefile *mf, + std::vector::const_iterator ait, + std::vector::const_iterator aitend, + std::string &errors) +{ + for (; ait != aitend; ait += 2 ) + { + if ( ait +1 == aitend) + { + errors = "Wrong number of arguments"; + return false; + } + const std::string& prop = *ait; + const std::string& value = *(ait+1); + if ( prop == "VARIABLES" ) + { + errors = + "Variables and cache variables should be set using SET command"; + return false; + } + else if ( prop == "MACROS" ) + { + errors = + "Commands and macros cannot be set using SET_CMAKE_PROPERTIES"; + return false; + } + mf->SetProperty(prop.c_str(), value.c_str()); + } + + return true; +} + diff --git a/Source/cmSetDirectoryPropertiesCommand.h b/Source/cmSetDirectoryPropertiesCommand.h new file mode 100644 index 000000000..b21c75e9b --- /dev/null +++ b/Source/cmSetDirectoryPropertiesCommand.h @@ -0,0 +1,83 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetDirectoryPropertiesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetDirectoryPropertiesCommand_h +#define cmSetDirectoryPropertiesCommand_h + +#include "cmCommand.h" + +class cmSetDirectoryPropertiesCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmSetDirectoryPropertiesCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "set_directory_properties";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set a property of the directory."; + } + + /** + * Static entry point for use by other commands + */ + static bool RunCommand(cmMakefile *mf, + std::vector::const_iterator ait, + std::vector::const_iterator aitend, + std::string &errors); + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set_directory_properties(PROPERTIES prop1 value1 prop2 value2)\n" + "Set a property for the current directory and subdirectories. If the " + "property is not found, CMake will report an error. The properties " + "include: INCLUDE_DIRECTORIES, LINK_DIRECTORIES, " + "INCLUDE_REGULAR_EXPRESSION, and ADDITIONAL_MAKE_CLEAN_FILES.\n" + "ADDITIONAL_MAKE_CLEAN_FILES is a list of files that will be cleaned " + "as a part of \"make clean\" stage."; + } + + cmTypeMacro(cmSetDirectoryPropertiesCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSetPropertyCommand.cxx b/Source/cmSetPropertyCommand.cxx new file mode 100644 index 000000000..f9504ed5c --- /dev/null +++ b/Source/cmSetPropertyCommand.cxx @@ -0,0 +1,384 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetPropertyCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:05 $ + Version: $Revision: 1.6.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetPropertyCommand.h" +#include "cmSetTargetPropertiesCommand.h" +#include "cmSetTestsPropertiesCommand.h" +#include "cmSetSourceFilesPropertiesCommand.h" + +//---------------------------------------------------------------------------- +cmSetPropertyCommand::cmSetPropertyCommand() +{ + this->AppendMode = false; + this->Remove = true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // Get the scope on which to set the property. + std::vector::const_iterator arg = args.begin(); + cmProperty::ScopeType scope; + if(*arg == "GLOBAL") + { + scope = cmProperty::GLOBAL; + } + else if(*arg == "DIRECTORY") + { + scope = cmProperty::DIRECTORY; + } + else if(*arg == "TARGET") + { + scope = cmProperty::TARGET; + } + else if(*arg == "SOURCE") + { + scope = cmProperty::SOURCE_FILE; + } + else if(*arg == "TEST") + { + scope = cmProperty::TEST; + } + else + { + cmOStringStream e; + e << "given invalid scope " << *arg << ". " + << "Valid scopes are GLOBAL, DIRECTORY, TARGET, SOURCE, TEST."; + this->SetError(e.str().c_str()); + return false; + } + + // Parse the rest of the arguments up to the values. + enum Doing { DoingNone, DoingNames, DoingProperty, DoingValues }; + Doing doing = DoingNames; + const char* sep = ""; + for(++arg; arg != args.end(); ++arg) + { + if(*arg == "PROPERTY") + { + doing = DoingProperty; + } + else if(*arg == "APPEND") + { + doing = DoingNone; + this->AppendMode = true; + } + else if(doing == DoingNames) + { + this->Names.insert(*arg); + } + else if(doing == DoingProperty) + { + this->PropertyName = *arg; + doing = DoingValues; + } + else if(doing == DoingValues) + { + this->PropertyValue += sep; + sep = ";"; + this->PropertyValue += *arg; + this->Remove = false; + } + else + { + cmOStringStream e; + e << "given invalid argument \"" << *arg << "\"."; + this->SetError(e.str().c_str()); + return false; + } + } + + // Make sure a property name was found. + if(this->PropertyName.empty()) + { + this->SetError("not given a PROPERTY argument."); + return false; + } + + // Dispatch property setting. + switch(scope) + { + case cmProperty::GLOBAL: return this->HandleGlobalMode(); + case cmProperty::DIRECTORY: return this->HandleDirectoryMode(); + case cmProperty::TARGET: return this->HandleTargetMode(); + case cmProperty::SOURCE_FILE: return this->HandleSourceMode(); + case cmProperty::TEST: return this->HandleTestMode(); + + case cmProperty::VARIABLE: + case cmProperty::CACHED_VARIABLE: + break; // should never happen + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleGlobalMode() +{ + if(!this->Names.empty()) + { + this->SetError("given names for GLOBAL scope."); + return false; + } + + // Set or append the property. + cmake* cm = this->Makefile->GetCMakeInstance(); + const char* name = this->PropertyName.c_str(); + const char *value = this->PropertyValue.c_str(); + if (this->Remove) + { + value = 0; + } + if(this->AppendMode) + { + cm->AppendProperty(name, value); + } + else + { + cm->SetProperty(name, value); + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleDirectoryMode() +{ + if(this->Names.size() > 1) + { + this->SetError("allows at most one name for DIRECTORY scope."); + return false; + } + + // Default to the current directory. + cmMakefile* mf = this->Makefile; + + // Lookup the directory if given. + if(!this->Names.empty()) + { + // Construct the directory name. Interpret relative paths with + // respect to the current directory. + std::string dir = *this->Names.begin(); + if(!cmSystemTools::FileIsFullPath(dir.c_str())) + { + dir = this->Makefile->GetCurrentDirectory(); + dir += "/"; + dir += *this->Names.begin(); + } + + // The local generators are associated with collapsed paths. + dir = cmSystemTools::CollapseFullPath(dir.c_str()); + + // Lookup the generator. + if(cmLocalGenerator* lg = + (this->Makefile->GetLocalGenerator() + ->GetGlobalGenerator()->FindLocalGenerator(dir.c_str()))) + { + // Use the makefile for the directory found. + mf = lg->GetMakefile(); + } + else + { + // Could not find the directory. + this->SetError + ("DIRECTORY scope provided but requested directory was not found. " + "This could be because the directory argument was invalid or, " + "it is valid but has not been processed yet."); + return false; + } + } + + // Set or append the property. + const char* name = this->PropertyName.c_str(); + const char *value = this->PropertyValue.c_str(); + if (this->Remove) + { + value = 0; + } + if(this->AppendMode) + { + mf->AppendProperty(name, value); + } + else + { + mf->SetProperty(name, value); + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleTargetMode() +{ + for(std::set::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + if(cmTarget* target = this->Makefile->FindTargetToUse(ni->c_str())) + { + // Handle the current target. + if(!this->HandleTarget(target)) + { + return false; + } + } + else + { + cmOStringStream e; + e << "could not find TARGET " << *ni + << ". Perhaps it has not yet been created."; + this->SetError(e.str().c_str()); + return false; + } + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleTarget(cmTarget* target) +{ + // Set or append the property. + const char* name = this->PropertyName.c_str(); + const char *value = this->PropertyValue.c_str(); + if (this->Remove) + { + value = 0; + } + if(this->AppendMode) + { + target->AppendProperty(name, value); + } + else + { + target->SetProperty(name, value); + } + + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleSourceMode() +{ + for(std::set::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + // Get the source file. + if(cmSourceFile* sf = this->Makefile->GetOrCreateSource(ni->c_str())) + { + if(!this->HandleSource(sf)) + { + return false; + } + } + else + { + cmOStringStream e; + e << "given SOURCE name that could not be found or created: " << *ni; + this->SetError(e.str().c_str()); + return false; + } + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleSource(cmSourceFile* sf) +{ + // Set or append the property. + const char* name = this->PropertyName.c_str(); + const char *value = this->PropertyValue.c_str(); + if (this->Remove) + { + value = 0; + } + + if(this->AppendMode) + { + sf->AppendProperty(name, value); + } + else + { + sf->SetProperty(name, value); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleTestMode() +{ + // Loop over all tests looking for matching names. + std::vector const& tests = *this->Makefile->GetTests(); + for(std::vector::const_iterator ti = tests.begin(); + ti != tests.end(); ++ti) + { + cmTest* test = *ti; + std::set::iterator ni = + this->Names.find(test->GetName()); + if(ni != this->Names.end()) + { + if(this->HandleTest(test)) + { + this->Names.erase(ni); + } + else + { + return false; + } + } + } + + // Names that are still left were not found. + if(!this->Names.empty()) + { + cmOStringStream e; + e << "given TEST names that do not exist:\n"; + for(std::set::const_iterator ni = this->Names.begin(); + ni != this->Names.end(); ++ni) + { + e << " " << *ni << "\n"; + } + this->SetError(e.str().c_str()); + return false; + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmSetPropertyCommand::HandleTest(cmTest* test) +{ + // Set or append the property. + const char* name = this->PropertyName.c_str(); + const char *value = this->PropertyValue.c_str(); + if (this->Remove) + { + value = 0; + } + if(this->AppendMode) + { + test->AppendProperty(name, value); + } + else + { + test->SetProperty(name, value); + } + + return true; +} diff --git a/Source/cmSetPropertyCommand.h b/Source/cmSetPropertyCommand.h new file mode 100644 index 000000000..a1811bcaa --- /dev/null +++ b/Source/cmSetPropertyCommand.h @@ -0,0 +1,111 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetPropertyCommand.h,v $ + Language: C++ + Date: $Date: 2008-04-02 13:16:06 $ + Version: $Revision: 1.3.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetsPropertiesCommand_h +#define cmSetsPropertiesCommand_h + +#include "cmCommand.h" + +class cmSetPropertyCommand : public cmCommand +{ +public: + cmSetPropertyCommand(); + + virtual cmCommand* Clone() + { + return new cmSetPropertyCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "set_property";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set a named property in a given scope."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set_property(\n" + " [APPEND]\n" + " PROPERTY [value1 [value2 ...]])\n" + "Set one property on zero or more objects of a scope. " + "The first argument determines the scope in which the property " + "is set. It must be one of the following:\n" + "GLOBAL scope is unique and does not accept a name.\n" + "DIRECTORY scope defaults to the current directory but another " + "directory (already processed by CMake) may be named by full or " + "relative path.\n" + "TARGET scope may name zero or more existing targets.\n" + "SOURCE scope may name zero or more source files.\n" + "TEST scope may name zero or more existing tests.\n" + "The required PROPERTY option is immediately followed by the name " + "of the property to set. Remaining arguments are used to " + "compose the property value in the form of a semicolon-separated " + "list. " + "If the APPEND option is given the list is appended to any " + "existing property value." + ; + } + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + cmTypeMacro(cmSetPropertyCommand, cmCommand); + +private: + std::set Names; + std::string PropertyName; + std::string PropertyValue; + bool Remove; + bool AppendMode; + + // Implementation of each property type. + bool HandleGlobalMode(); + bool HandleDirectoryMode(); + bool HandleTargetMode(); + bool HandleTarget(cmTarget* target); + bool HandleSourceMode(); + bool HandleSource(cmSourceFile* sf); + bool HandleTestMode(); + bool HandleTest(cmTest* test); +}; + + + +#endif diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx new file mode 100644 index 000000000..09bf0de14 --- /dev/null +++ b/Source/cmSetSourceFilesPropertiesCommand.cxx @@ -0,0 +1,174 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetSourceFilesPropertiesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-02-15 16:22:23 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetSourceFilesPropertiesCommand.h" + +#include "cmSourceFile.h" + +// cmSetSourceFilesPropertiesCommand +bool cmSetSourceFilesPropertiesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // break the arguments into source file names and properties + int numFiles = 0; + std::vector::const_iterator j; + j = args.begin(); + // old style allows for specifier before PROPERTIES keyword + while (*j != "ABSTRACT" && + *j != "WRAP_EXCLUDE" && + *j != "GENERATED" && + *j != "COMPILE_FLAGS" && + *j != "OBJECT_DEPENDS" && + *j != "PROPERTIES") + { + numFiles++; + ++j; + } + + // now call the worker function + std::string errors; + bool ret = + cmSetSourceFilesPropertiesCommand + ::RunCommand(this->Makefile, + args.begin(), + args.begin() + numFiles, + args.begin() + numFiles, + args.end(), errors); + if (!ret) + { + this->SetError(errors.c_str()); + } + return ret; +} + +bool cmSetSourceFilesPropertiesCommand +::RunCommand(cmMakefile *mf, + std::vector::const_iterator filebeg, + std::vector::const_iterator fileend, + std::vector::const_iterator propbeg, + std::vector::const_iterator propend, + std::string &errors) +{ + std::vector propertyPairs; + bool generated = false; + std::vector::const_iterator j; + // build the property pairs + for(j= propbeg; j != propend;++j) + { + // old style allows for specifier before PROPERTIES keyword + if(*j == "ABSTRACT") + { + propertyPairs.push_back("ABSTRACT"); + propertyPairs.push_back("1"); + } + else if(*j == "WRAP_EXCLUDE") + { + propertyPairs.push_back("WRAP_EXCLUDE"); + propertyPairs.push_back("1"); + } + else if(*j == "GENERATED") + { + generated = true; + propertyPairs.push_back("GENERATED"); + propertyPairs.push_back("1"); + } + else if(*j == "COMPILE_FLAGS") + { + propertyPairs.push_back("COMPILE_FLAGS"); + ++j; + if(j == propend) + { + errors = "called with incorrect number of arguments " + "COMPILE_FLAGS with no flags"; + return false; + } + propertyPairs.push_back(*j); + } + else if(*j == "OBJECT_DEPENDS") + { + propertyPairs.push_back("OBJECT_DEPENDS"); + ++j; + if(j == propend) + { + errors = "called with incorrect number of arguments " + "OBJECT_DEPENDS with no dependencies"; + return false; + } + propertyPairs.push_back(*j); + } + else if(*j == "PROPERTIES") + { + // now loop through the rest of the arguments, new style + ++j; + while (j != propend) + { + propertyPairs.push_back(*j); + if(*j == "GENERATED") + { + ++j; + if(j != propend && cmSystemTools::IsOn(j->c_str())) + { + generated = true; + } + } + else + { + ++j; + } + if(j == propend) + { + errors = "called with incorrect number of arguments."; + return false; + } + propertyPairs.push_back(*j); + ++j; + } + // break out of the loop because j is already == end + break; + } + else + { + errors = "called with illegal arguments, maybe missing a " + "PROPERTIES specifier?"; + return false; + } + } + + // now loop over all the files + for(j= filebeg; j != fileend;++j) + { + // get the source file + cmSourceFile* sf = + mf->GetOrCreateSource(j->c_str(), generated); + if(sf) + { + // now loop through all the props and set them + unsigned int k; + for (k = 0; k < propertyPairs.size(); k = k + 2) + { + sf->SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str()); + } + } + } + return true; +} + diff --git a/Source/cmSetSourceFilesPropertiesCommand.h b/Source/cmSetSourceFilesPropertiesCommand.h new file mode 100644 index 000000000..5e9658501 --- /dev/null +++ b/Source/cmSetSourceFilesPropertiesCommand.h @@ -0,0 +1,99 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetSourceFilesPropertiesCommand.h,v $ + Language: C++ + Date: $Date: 2008-03-01 02:33:04 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetSourceFilesPropertiesCommand_h +#define cmSetSourceFilesPropertiesCommand_h + +#include "cmCommand.h" + +class cmSetSourceFilesPropertiesCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmSetSourceFilesPropertiesCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "set_source_files_properties";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Source files can have properties that affect how they are built."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set_source_files_properties(file1 file2 ...\n" + " PROPERTIES prop1 value1\n" + " prop2 value2 ...)\n" + "Set properties on a file. The syntax for the command is to list all " + "the files you want " + "to change, and then provide the values you want to set next. You " + "can make up your own properties as well. " + "The following are used by CMake. " + "The ABSTRACT flag (boolean) is used by some class wrapping " + "commands. " + "If WRAP_EXCLUDE (boolean) is true then many wrapping commands " + "will ignore this file. If GENERATED (boolean) is true then it " + "is not an error if this source file does not exist when it is " + "added to a target. Obviously, " + "it must be created (presumably by a custom command) before the " + "target is built. " + "If the HEADER_FILE_ONLY (boolean) property is true then the " + "file is not compiled. This is useful if you want to add extra " + "non build files to an IDE. " + "OBJECT_DEPENDS (string) adds dependencies to the object file. " + "COMPILE_FLAGS (string) is passed to the compiler as additional " + "command line arguments when the source file is compiled. " + "LANGUAGE (string) CXX|C will change the default compiler used " + "to compile the source file. The languages used need to be enabled " + "in the PROJECT command. " + "If SYMBOLIC (boolean) is set to true the build system will be " + "informed that the source file is not actually created on disk but " + "instead used as a symbolic name for a build rule."; + + } + + cmTypeMacro(cmSetSourceFilesPropertiesCommand, cmCommand); + + static bool RunCommand(cmMakefile *mf, + std::vector::const_iterator filebeg, + std::vector::const_iterator fileend, + std::vector::const_iterator propbeg, + std::vector::const_iterator propend, + std::string &errors); +}; + + + +#endif diff --git a/Source/cmSetTargetPropertiesCommand.cxx b/Source/cmSetTargetPropertiesCommand.cxx new file mode 100644 index 000000000..8fbcce016 --- /dev/null +++ b/Source/cmSetTargetPropertiesCommand.cxx @@ -0,0 +1,114 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetTargetPropertiesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-28 13:38:36 $ + Version: $Revision: 1.9 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetTargetPropertiesCommand.h" +#include "cmLocalGenerator.h" +#include "cmGlobalGenerator.h" + +// cmSetTargetPropertiesCommand +bool cmSetTargetPropertiesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 2 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // first collect up the list of files + std::vector propertyPairs; + bool doingFiles = true; + int numFiles = 0; + std::vector::const_iterator j; + for(j= args.begin(); j != args.end();++j) + { + if(*j == "PROPERTIES") + { + doingFiles = false; + // now loop through the rest of the arguments, new style + ++j; + while (j != args.end()) + { + propertyPairs.push_back(*j); + ++j; + if(j == args.end()) + { + this->SetError("called with incorrect number of arguments."); + return false; + } + propertyPairs.push_back(*j); + ++j; + } + // break out of the loop because j is already == end + break; + } + else if (doingFiles) + { + numFiles++; + } + else + { + this->SetError("called with illegal arguments, maybe missing " + "a PROPERTIES specifier?"); + return false; + } + } + if(propertyPairs.size() == 0) + { + this->SetError("called with illegal arguments, maybe missing " + "a PROPERTIES specifier?"); + return false; + } + + // now loop over all the targets + int i; + for(i = 0; i < numFiles; ++i) + { + bool ret = cmSetTargetPropertiesCommand::SetOneTarget + (args[i].c_str(),propertyPairs,this->Makefile); + if (!ret) + { + std::string message = "Can not find target to add properties to: "; + message += args[i]; + this->SetError(message.c_str()); + return false; + } + } + return true; +} + +bool cmSetTargetPropertiesCommand +::SetOneTarget(const char *tname, + std::vector &propertyPairs, + cmMakefile *mf) +{ + if(cmTarget* target = mf->FindTargetToUse(tname)) + { + // now loop through all the props and set them + unsigned int k; + for (k = 0; k < propertyPairs.size(); k = k + 2) + { + target->SetProperty(propertyPairs[k].c_str(), + propertyPairs[k+1].c_str()); + } + } + // if file is not already in the makefile, then add it + else + { + return false; + } + return true; +} diff --git a/Source/cmSetTargetPropertiesCommand.h b/Source/cmSetTargetPropertiesCommand.h new file mode 100644 index 000000000..2b610de98 --- /dev/null +++ b/Source/cmSetTargetPropertiesCommand.h @@ -0,0 +1,172 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetTargetPropertiesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.31 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetTargetsPropertiesCommand_h +#define cmSetTargetsPropertiesCommand_h + +#include "cmCommand.h" + +class cmSetTargetPropertiesCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmSetTargetPropertiesCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "set_target_properties";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Targets can have properties that affect how they are built."; + } + + /** + * Used by this command and cmSetPropertiesCommand + */ + static bool SetOneTarget(const char *tname, + std::vector &propertyPairs, + cmMakefile *mf); + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set_target_properties(target1 target2 ...\n" + " PROPERTIES prop1 value1\n" + " prop2 value2 ...)\n" + "Set properties on a target. The syntax for the command is to " + "list all the files you want " + "to change, and then provide the values you want to set next. " + "You can use any prop value pair you want and " + "extract it later with the GET_TARGET_PROPERTY command.\n" + "Properties that affect the name of a target's output file are " + "as follows. " + "The PREFIX and SUFFIX properties override the default target name " + "prefix (such as \"lib\") and suffix (such as \".so\"). " + "IMPORT_PREFIX and IMPORT_SUFFIX are the equivalent properties for " + "the import library corresponding to a DLL " + "(for SHARED library targets). " + "OUTPUT_NAME sets the real name of a target when it is built and " + "can be used to help create two targets of the same name even though " + "CMake requires unique logical target names. There is also a " + "_OUTPUT_NAME that can set the output name on a " + "per-configuration basis. " + "_POSTFIX sets a postfix for the real name of the target " + "when it is built under the configuration named by " + "(in upper-case, such as \"DEBUG_POSTFIX\"). The value of " + "this property is initialized when the target is created to the " + "value of the variable CMAKE__POSTFIX (except for executable " + "targets because earlier CMake versions which did not use this " + "variable for executables)." + "\n" + "The LINK_FLAGS property can be used to add extra flags to the " + "link step of a target. LINK_FLAGS_ will add to the " + "configuration , " + "for example, DEBUG, RELEASE, MINSIZEREL, RELWITHDEBINFO. " + "DEFINE_SYMBOL sets the name of the preprocessor symbol defined when " + "compiling sources in a shared library. " + "If not set here then it is set to target_EXPORTS by default " + "(with some substitutions if the target is not a valid C " + "identifier). This is useful for headers to know whether they are " + "being included from inside their library our outside to properly " + "setup dllexport/dllimport decorations. " + "The COMPILE_FLAGS property sets additional compiler flags used " + "to build sources within the target. It may also be used to pass " + "additional preprocessor definitions." + "\n" + "The LINKER_LANGUAGE property is used to change the tool " + "used to link an executable or shared library. The default is " + "set the language to match the files in the library. CXX and C " + "are common values for this property." + "\n" + "For shared libraries VERSION and SOVERSION can be used to specify " + "the build version and api version respectively. When building or " + "installing appropriate symlinks are created if the platform " + "supports symlinks and the linker supports so-names. " + "If only one of both is specified the missing is assumed to have " + "the same version number. " + "For executables VERSION can be used to specify the build version. " + "When building or installing appropriate symlinks are created if " + "the platform supports symlinks. " + "For shared libraries and executables on Windows the VERSION " + "attribute is parsed to extract a \"major.minor\" version number. " + "These numbers are used as the image version of the binary. " + "\n" + "There are a few properties used to specify RPATH rules. " + "INSTALL_RPATH is a semicolon-separated list specifying the rpath " + "to use in installed targets (for platforms that support it). " + "INSTALL_RPATH_USE_LINK_PATH is a boolean that if set to true will " + "append directories in the linker search path and outside the " + "project to the INSTALL_RPATH. " + "SKIP_BUILD_RPATH is a boolean specifying whether to skip automatic " + "generation of an rpath allowing the target to run from the " + "build tree. " + "BUILD_WITH_INSTALL_RPATH is a boolean specifying whether to link " + "the target in the build tree with the INSTALL_RPATH. This takes " + "precedence over SKIP_BUILD_RPATH and avoids the need for relinking " + "before installation. INSTALL_NAME_DIR is a string specifying the " + "directory portion of the \"install_name\" field of shared libraries " + "on Mac OSX to use in the installed targets. " + "When the target is created the values of " + "the variables CMAKE_INSTALL_RPATH, " + "CMAKE_INSTALL_RPATH_USE_LINK_PATH, CMAKE_SKIP_BUILD_RPATH, " + "CMAKE_BUILD_WITH_INSTALL_RPATH, and CMAKE_INSTALL_NAME_DIR " + "are used to initialize these properties.\n" + "PROJECT_LABEL can be used to change the name of " + "the target in an IDE like visual studio. VS_KEYWORD can be set " + "to change the visual studio keyword, for example QT integration " + "works better if this is set to Qt4VSv1.0.\n" + "When a library is built CMake by default generates code to remove " + "any existing library using all possible names. This is needed " + "to support libraries that switch between STATIC and SHARED by " + "a user option. However when using OUTPUT_NAME to build a static " + "and shared library of the same name using different logical target " + "names the two targets will remove each other's files. This can be " + "prevented by setting the CLEAN_DIRECT_OUTPUT property to 1.\n" + "The PRE_INSTALL_SCRIPT and POST_INSTALL_SCRIPT properties are the " + "old way to specify CMake scripts to run before and after " + "installing a target. They are used only when the old " + "INSTALL_TARGETS command is used to install the target. Use the " + "INSTALL command instead." + "\n" + "The EXCLUDE_FROM_DEFAULT_BUILD property is used by the visual " + "studio generators. If it is set to 1 the target will not be " + "part of the default build when you select \"Build Solution\"." + ; + } + + cmTypeMacro(cmSetTargetPropertiesCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSetTestsPropertiesCommand.cxx b/Source/cmSetTestsPropertiesCommand.cxx new file mode 100644 index 000000000..a646410bd --- /dev/null +++ b/Source/cmSetTestsPropertiesCommand.cxx @@ -0,0 +1,135 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetTestsPropertiesCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSetTestsPropertiesCommand.h" + +#include "cmake.h" +#include "cmTest.h" + +// cmSetTestsPropertiesCommand +bool cmSetTestsPropertiesCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + // first collect up the list of files + std::vector propertyPairs; + bool doingFiles = true; + int numFiles = 0; + std::vector::const_iterator j; + for(j= args.begin(); j != args.end();++j) + { + if(*j == "PROPERTIES") + { + doingFiles = false; + // now loop through the rest of the arguments, new style + ++j; + while (j != args.end()) + { + propertyPairs.push_back(*j); + ++j; + if(j == args.end()) + { + this->SetError("called with incorrect number of arguments."); + return false; + } + propertyPairs.push_back(*j); + ++j; + } + // break out of the loop because j is already == end + break; + } + else if (doingFiles) + { + numFiles++; + } + else + { + this->SetError("called with illegal arguments, maybe " + "missing a PROPERTIES specifier?"); + return false; + } + } + if(propertyPairs.size() == 0) + { + this->SetError("called with illegal arguments, maybe " + "missing a PROPERTIES specifier?"); + return false; + } + + + // now loop over all the targets + int i; + for(i = 0; i < numFiles; ++i) + { + std::string errors; + bool ret = + cmSetTestsPropertiesCommand::SetOneTest(args[i].c_str(), + propertyPairs, + this->Makefile, errors); + if (!ret) + { + this->SetError(errors.c_str()); + return ret; + } + } + + return true; +} + + +bool cmSetTestsPropertiesCommand +::SetOneTest(const char *tname, + std::vector &propertyPairs, + cmMakefile *mf, std::string &errors) +{ + std::vector &tests = *mf->GetTests(); + // now loop over all the targets + unsigned int k; + bool found = false; + // if the file is already in the makefile just set properites on it + std::vector::iterator it; + for ( it = tests.begin(); it != tests.end(); ++ it ) + { + cmTest* test = *it; + if ( !strcmp(test->GetName(),tname )) + { + // now loop through all the props and set them + for (k = 0; k < propertyPairs.size(); k = k + 2) + { + test->SetProperty(propertyPairs[k].c_str(), + propertyPairs[k+1].c_str()); + } + found = true; + break; + } + } + + // if file is not already in the makefile, then add it + if ( ! found ) + { + errors = "Can not find test to add properties to: "; + errors += tname; + return false; + } + + return true; +} + diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h new file mode 100644 index 000000000..595c05fac --- /dev/null +++ b/Source/cmSetTestsPropertiesCommand.h @@ -0,0 +1,84 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSetTestsPropertiesCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.8 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSetTestsPropertiesCommand_h +#define cmSetTestsPropertiesCommand_h + +#include "cmCommand.h" + +class cmSetTestsPropertiesCommand : public cmCommand +{ +public: + virtual cmCommand* Clone() + { + return new cmSetTestsPropertiesCommand; + } + + /** + * This is called when the command is first encountered in + * the input file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() { return "set_tests_properties";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set a property of the tests."; + } + + /** + * Longer documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " set_tests_properties(test1 [test2...] PROPERTIES prop1 value1 prop2" + " value2)\n" + "Set a property for the tests. If the property is not found, CMake " + "will report an error. The properties include:\n" + "WILL_FAIL: If set to true, this will invert the pass/fail flag of the" + " test.\n" + "PASS_REGULAR_EXPRESSION: If set, the test output will be checked " + "against the specified regular expressions and at least one of the" + " regular " + "expressions has to match, otherwise the test will fail.\n" + " Example: PASS_REGULAR_EXPRESSION \"TestPassed;All ok\"\n" + "FAIL_REGULAR_EXPRESSION: If set, if the output will match to one of " + "specified regular expressions, the test will fail.\n" + " Example: PASS_REGULAR_EXPRESSION \"[^a-z]Error;ERROR;Failed\"\n" + "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a " + "list of regular expressions.\n"; + } + + cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand); + + static bool SetOneTest(const char *tname, + std::vector &propertyPairs, + cmMakefile *mf, + std::string &errors); +}; + + + +#endif diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx new file mode 100644 index 000000000..27e67487b --- /dev/null +++ b/Source/cmSiteNameCommand.cxx @@ -0,0 +1,100 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSiteNameCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.24 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSiteNameCommand.h" + +#include + +// cmSiteNameCommand +bool cmSiteNameCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() != 1 ) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + std::vector paths; + paths.push_back("/usr/bsd"); + paths.push_back("/usr/sbin"); + paths.push_back("/usr/bin"); + paths.push_back("/bin"); + paths.push_back("/sbin"); + paths.push_back("/usr/local/bin"); + + const char* cacheValue + = this->Makefile->GetDefinition(args[0].c_str()); + if(cacheValue) + { + return true; + } + + const char *temp = this->Makefile->GetDefinition("HOSTNAME"); + std::string hostname_cmd; + if(temp) + { + hostname_cmd = temp; + } + else + { + hostname_cmd = cmSystemTools::FindProgram("hostname", paths); + } + + std::string siteName = "unknown"; +#if defined(_WIN32) && !defined(__CYGWIN__) + std::string host; + if(cmSystemTools::ReadRegistryValue + ("HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\" + "Control\\ComputerName\\ComputerName;ComputerName", host)) + { + siteName = host; + } +#else + // try to find the hostname for this computer + if (!cmSystemTools::IsOff(hostname_cmd.c_str())) + { + std::string host; + cmSystemTools::RunSingleCommand(hostname_cmd.c_str(), + &host, 0, 0, false); + + // got the hostname + if (host.length()) + { + // remove any white space from the host name + std::string hostRegExp = "[ \t\n\r]*([^\t\n\r ]*)[ \t\n\r]*"; + cmsys::RegularExpression hostReg (hostRegExp.c_str()); + if (hostReg.find(host.c_str())) + { + // strip whitespace + host = hostReg.match(1); + } + + if(host.length()) + { + siteName = host; + } + } + } +#endif + this->Makefile-> + AddCacheDefinition(args[0].c_str(), + siteName.c_str(), + "Name of the computer/site where compile is being run", + cmCacheManager::STRING); + + return true; +} + diff --git a/Source/cmSiteNameCommand.h b/Source/cmSiteNameCommand.h new file mode 100644 index 000000000..4d18386b3 --- /dev/null +++ b/Source/cmSiteNameCommand.h @@ -0,0 +1,77 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSiteNameCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.11 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSiteNameCommand_h +#define cmSiteNameCommand_h + +#include "cmCommand.h" + +/** \class cmSiteNameCommand + * \brief SiteName a CMAKE variable + * + * cmSiteNameCommand sets a variable to a value with expansion. + */ +class cmSiteNameCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmSiteNameCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * This determines if the command is invoked when in script mode. + */ + virtual bool IsScriptable() { return true; } + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "site_name";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Set the given variable to the name of the computer."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " site_name(variable)\n"; + } + + cmTypeMacro(cmSiteNameCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmSourceFile.cxx b/Source/cmSourceFile.cxx new file mode 100644 index 000000000..d2e57150d --- /dev/null +++ b/Source/cmSourceFile.cxx @@ -0,0 +1,543 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceFile.cxx,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:40 $ + Version: $Revision: 1.47.2.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSourceFile.h" + +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" +#include "cmSystemTools.h" +#include "cmake.h" + +//---------------------------------------------------------------------------- +cmSourceFile::cmSourceFile(cmMakefile* mf, const char* name): + Location(mf, name) +{ + this->CustomCommand = 0; + this->Properties.SetCMakeInstance(mf->GetCMakeInstance()); + this->FindFullPathFailed = false; +} + +//---------------------------------------------------------------------------- +cmSourceFile::~cmSourceFile() +{ + this->SetCustomCommand(0); +} + +//---------------------------------------------------------------------------- +std::string const& cmSourceFile::GetExtension() const +{ + return this->Extension; +} + +//---------------------------------------------------------------------------- +const char* cmSourceFile::GetLanguage() +{ + // If the language was set explicitly by the user then use it. + if(const char* lang = this->GetProperty("LANGUAGE")) + { + return lang; + } + + // Perform computation needed to get the language if necessary. + if(this->FullPath.empty() && this->Language.empty()) + { + if(this->Location.ExtensionIsAmbiguous()) + { + // Finalize the file location to get the extension and set the + // language. + this->GetFullPath(); + } + else + { + // Use the known extension to get the language if possible. + std::string ext = + cmSystemTools::GetFilenameLastExtension(this->Location.GetName()); + this->CheckLanguage(ext); + } + } + + // Now try to determine the language. + return static_cast(this)->GetLanguage(); +} + +//---------------------------------------------------------------------------- +const char* cmSourceFile::GetLanguage() const +{ + // If the language was set explicitly by the user then use it. + if(const char* lang = this->GetProperty("LANGUAGE")) + { + return lang; + } + + // If the language was determined from the source file extension use it. + if(!this->Language.empty()) + { + return this->Language.c_str(); + } + + // The language is not known. + return 0; +} + +//---------------------------------------------------------------------------- +cmSourceFileLocation const& cmSourceFile::GetLocation() const +{ + return this->Location; +} + +//---------------------------------------------------------------------------- +std::string const& cmSourceFile::GetFullPath() +{ + if(this->FullPath.empty()) + { + if(this->FindFullPath()) + { + this->CheckExtension(); + } + } + return this->FullPath; +} + +//---------------------------------------------------------------------------- +std::string const& cmSourceFile::GetFullPath() const +{ + return this->FullPath; +} + +//---------------------------------------------------------------------------- +bool cmSourceFile::FindFullPath() +{ + // If thie method has already failed once do not try again. + if(this->FindFullPathFailed) + { + return false; + } + + // If the file is generated compute the location without checking on + // disk. + if(this->GetPropertyAsBool("GENERATED")) + { + // The file is either already a full path or is relative to the + // build directory for the target. + this->Location.DirectoryUseBinary(); + this->FullPath = this->Location.GetDirectory(); + this->FullPath += "/"; + this->FullPath += this->Location.GetName(); + return true; + } + + // The file is not generated. It must exist on disk. + cmMakefile* mf = this->Location.GetMakefile(); + const char* tryDirs[3] = {0, 0, 0}; + if(this->Location.DirectoryIsAmbiguous()) + { + tryDirs[0] = mf->GetCurrentDirectory(); + tryDirs[1] = mf->GetCurrentOutputDirectory(); + } + else + { + tryDirs[0] = ""; + } + const std::vector& srcExts = mf->GetSourceExtensions(); + const std::vector& hdrExts = mf->GetHeaderExtensions(); + for(const char* const* di = tryDirs; *di; ++di) + { + std::string tryPath = this->Location.GetDirectory(); + if(!tryPath.empty()) + { + tryPath += "/"; + } + tryPath += this->Location.GetName(); + tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str(), *di); + if(this->TryFullPath(tryPath.c_str(), 0)) + { + return true; + } + for(std::vector::const_iterator ei = srcExts.begin(); + ei != srcExts.end(); ++ei) + { + if(this->TryFullPath(tryPath.c_str(), ei->c_str())) + { + return true; + } + } + for(std::vector::const_iterator ei = hdrExts.begin(); + ei != hdrExts.end(); ++ei) + { + if(this->TryFullPath(tryPath.c_str(), ei->c_str())) + { + return true; + } + } + } + + // If the user provided a full path, trust it. If the file is not + // there the native tool will complain at build time. + if(!this->Location.DirectoryIsAmbiguous()) + { + this->FullPath = this->Location.GetDirectory(); + this->FullPath += "/"; + this->FullPath += this->Location.GetName(); + return true; + } + + cmOStringStream e; + e << "Cannot find source file \"" << this->Location.GetName() << "\""; + e << ". Tried extensions"; + for(std::vector::const_iterator ext = srcExts.begin(); + ext != srcExts.end(); ++ext) + { + e << " ." << *ext; + } + for(std::vector::const_iterator ext = hdrExts.begin(); + ext != hdrExts.end(); ++ext) + { + e << " ." << *ext; + } + this->Location.GetMakefile()->IssueMessage(cmake::FATAL_ERROR, e.str()); + this->FindFullPathFailed = true; + return false; +} + +//---------------------------------------------------------------------------- +bool cmSourceFile::TryFullPath(const char* tp, const char* ext) +{ + std::string tryPath = tp; + if(ext && *ext) + { + tryPath += "."; + tryPath += ext; + } + if(cmSystemTools::FileExists(tryPath.c_str())) + { + this->FullPath = tryPath; + return true; + } + return false; +} + +//---------------------------------------------------------------------------- +void cmSourceFile::CheckExtension() +{ + // Compute the extension. + std::string realExt = + cmSystemTools::GetFilenameLastExtension(this->FullPath); + if(!realExt.empty()) + { + // Store the extension without the leading '.'. + this->Extension = realExt.substr(1); + } + + // Look for object files. + if(this->Extension == "obj" || + this->Extension == "o" || + this->Extension == "lo") + { + this->SetProperty("EXTERNAL_OBJECT", "1"); + } + + // Look for header files. + cmMakefile* mf = this->Location.GetMakefile(); + const std::vector& hdrExts = mf->GetHeaderExtensions(); + if(std::find(hdrExts.begin(), hdrExts.end(), this->Extension) == + hdrExts.end()) + { + // This is not a known header file extension. Mark it as not a + // header unless the user has already explicitly set the property. + if(!this->GetProperty("HEADER_FILE_ONLY")) + { + this->SetProperty("HEADER_FILE_ONLY", "0"); + } + } + else + { + // This is a known header file extension. The source cannot be compiled. + this->SetProperty("HEADER_FILE_ONLY", "1"); + } + + // Try to identify the source file language from the extension. + if(this->Language.empty()) + { + this->CheckLanguage(this->Extension); + } +} + +//---------------------------------------------------------------------------- +void cmSourceFile::CheckLanguage(std::string const& ext) +{ + // Try to identify the source file language from the extension. + cmMakefile* mf = this->Location.GetMakefile(); + cmGlobalGenerator* gg = mf->GetLocalGenerator()->GetGlobalGenerator(); + if(const char* l = gg->GetLanguageFromExtension(ext.c_str())) + { + this->Language = l; + } +} + +//---------------------------------------------------------------------------- +bool cmSourceFile::Matches(cmSourceFileLocation const& loc) +{ + return this->Location.Matches(loc); +} + +//---------------------------------------------------------------------------- +void cmSourceFile::SetProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + + this->Properties.SetProperty(prop, value, cmProperty::SOURCE_FILE); +} + +//---------------------------------------------------------------------------- +void cmSourceFile::AppendProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + this->Properties.AppendProperty(prop, value, cmProperty::SOURCE_FILE); +} + +//---------------------------------------------------------------------------- +const char* cmSourceFile::GetPropertyForUser(const char *prop) +{ + // This method is a consequence of design history and backwards + // compatibility. GetProperty is (and should be) a const method. + // Computed properties should not be stored back in the property map + // but instead reference information already known. If they need to + // cache information in a mutable ivar to provide the return string + // safely then so be it. + // + // The LOCATION property is particularly problematic. The CMake + // language has very loose restrictions on the names that will match + // a given source file (for historical reasons). Implementing + // lookups correctly with such loose naming requires the + // cmSourceFileLocation class to commit to a particular full path to + // the source file as late as possible. If the users requests the + // LOCATION property we must commit now. + if(strcmp(prop, "LOCATION") == 0) + { + // Commit to a location. + this->GetFullPath(); + } + + // Perform the normal property lookup. + return this->GetProperty(prop); +} + +//---------------------------------------------------------------------------- +const char* cmSourceFile::GetProperty(const char* prop) const +{ + // Check for computed properties. + if(strcmp(prop, "LOCATION") == 0) + { + if(this->FullPath.empty()) + { + return 0; + } + else + { + return this->FullPath.c_str(); + } + } + + bool chain = false; + const char *retVal = + this->Properties.GetPropertyValue(prop, cmProperty::SOURCE_FILE, chain); + if (chain) + { + cmMakefile* mf = this->Location.GetMakefile(); + return mf->GetProperty(prop,cmProperty::SOURCE_FILE); + } + + return retVal; +} + +//---------------------------------------------------------------------------- +bool cmSourceFile::GetPropertyAsBool(const char* prop) const +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + +//---------------------------------------------------------------------------- +cmCustomCommand* cmSourceFile::GetCustomCommand() +{ + return this->CustomCommand; +} + +//---------------------------------------------------------------------------- +cmCustomCommand const* cmSourceFile::GetCustomCommand() const +{ + return this->CustomCommand; +} + +//---------------------------------------------------------------------------- +void cmSourceFile::SetCustomCommand(cmCustomCommand* cc) +{ + cmCustomCommand* old = this->CustomCommand; + this->CustomCommand = cc; + delete old; +} + +//---------------------------------------------------------------------------- +void cmSourceFile::DefineProperties(cmake *cm) +{ + // define properties + cm->DefineProperty + ("ABSTRACT", cmProperty::SOURCE_FILE, + "Is this source file an abstract class.", + "A property on a source file that indicates if the source file " + "represents a class that is abstract. This only makes sense for " + "languages that have a notion of an abstract class and it is " + "only used by some tools that wrap classes into other languages."); + + cm->DefineProperty + ("COMPILE_FLAGS", cmProperty::SOURCE_FILE, + "Additional flags to be added when compiling this source file.", + "These flags will be added to the list of compile flags when " + "this source file builds. Use COMPILE_DEFINITIONS to pass additional " + "preprocessor definitions."); + + cm->DefineProperty + ("COMPILE_DEFINITIONS", cmProperty::SOURCE_FILE, + "Preprocessor definitions for compiling a source file.", + "The COMPILE_DEFINITIONS property may be set to a list of preprocessor " + "definitions using the syntax VAR or VAR=value. Function-style " + "definitions are not supported. CMake will automatically escape " + "the value correctly for the native build system (note that CMake " + "language syntax may require escapes to specify some values). " + "This property may be set on a per-configuration basis using the name " + "COMPILE_DEFINITIONS_ where is an upper-case name " + "(ex. \"COMPILE_DEFINITIONS_DEBUG\").\n" + "CMake will automatically drop some definitions that " + "are not supported by the native build tool. " + "The VS6 IDE does not support definitions with values " + "(but NMake does). Xcode does not support per-configuration " + "definitions on source files.\n" + "Dislaimer: Most native build tools have poor support for escaping " + "certain values. CMake has work-arounds for many cases but some " + "values may just not be possible to pass correctly. If a value " + "does not seem to be escaped correctly, do not attempt to " + "work-around the problem by adding escape sequences to the value. " + "Your work-around may break in a future version of CMake that " + "has improved escape support. Instead consider defining the macro " + "in a (configured) header file. Then report the limitation."); + + + cm->DefineProperty + ("COMPILE_DEFINITIONS_", cmProperty::SOURCE_FILE, + "Per-configuration preprocessor definitions on a source file.", + "This is the configuration-specific version of " + "COMPILE_DEFINITIONS. Note that Xcode does not support " + "per-configuration source file flags so this property will " + "be ignored by the Xcode generator."); + + cm->DefineProperty + ("EXTERNAL_OBJECT", cmProperty::SOURCE_FILE, + "If set to true then this is an object file.", + "If this property is set to true then the source file " + "is really an object file and should not be compiled. " + "It will still be linked into the target though."); + + cm->DefineProperty + ("GENERATED", cmProperty::SOURCE_FILE, + "Is this source file generated as part of the build process.", + "If a source file is generated by the build process CMake will " + "handle it differently in temrs of dependency checking etc. " + "Otherwise having a non-existent source file could create problems."); + + cm->DefineProperty + ("HEADER_FILE_ONLY", cmProperty::SOURCE_FILE, + "Is this source file only a header file.", + "A property on a source file that indicates if the source file " + "is a header file with no associated implementation. This is " + "set automatically based on the file extension and is used by " + "CMake to determine is certain dependency information should be " + "computed."); + + cm->DefineProperty + ("KEEP_EXTENSION", cmProperty::SOURCE_FILE, + "Make the output file have the same extension as the source file.", + "If this property is set then the file extension of the output " + "file will be the same as that of the source file. Normally " + "the output file extension is computed based on the language " + "of the source file, for example .cxx will go to a .o extension."); + + cm->DefineProperty + ("LANGUAGE", cmProperty::SOURCE_FILE, + "What programming language is the file.", + "A property that can be set to indicate what programming language " + "the source file is. If it is not set the language is determined " + "based on the file extension. Typical values are CXX C etc."); + + cm->DefineProperty + ("LOCATION", cmProperty::SOURCE_FILE, + "The full path to a source file.", + "A read only property on a SOURCE FILE that contains the full path " + "to the source file."); + + cm->DefineProperty + ("MACOSX_PACKAGE_LOCATION", cmProperty::SOURCE_FILE, + "Place a source file inside a Mac OS X bundle or framework.", + "Executable targets with the MACOSX_BUNDLE property set are built " + "as Mac OS X application bundles on Apple platforms. " + "Shared library targets with the FRAMEWORK property set are built " + "as Mac OS X frameworks on Apple platforms. " + "Source files listed in the target with this property set will " + "be copied to a directory inside the bundle or framework content " + "folder specified by the property value. " + "For bundles the content folder is \".app/Contents\". " + "For frameworks the content folder is " + "\".framework/Versions/\". " + "See the PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE target " + "properties for specifying files meant for Headers, PrivateHeadres, " + "or Resources directories."); + + cm->DefineProperty + ("OBJECT_DEPENDS", cmProperty::SOURCE_FILE, + "Additional dependencies.", + "Additional dependencies that should be checked as part of " + "building this source file."); + + cm->DefineProperty + ("OBJECT_OUTPUTS", cmProperty::SOURCE_FILE, + "Additional outputs for a Makefile rule.", + "Additional outputs created by compilation of this source file. " + "If any of these outputs is missing the object will be recompiled. " + "This is supported only on Makefile generators and will be ignored " + "on other generators."); + + cm->DefineProperty + ("SYMBOLIC", cmProperty::SOURCE_FILE, + "Is this just a name for a rule.", + "If SYMBOLIC (boolean) is set to true the build system will be " + "informed that the source file is not actually created on disk but " + "instead used as a symbolic name for a build rule."); + + cm->DefineProperty + ("WRAP_EXCLUDE", cmProperty::SOURCE_FILE, + "Exclude this source file from any code wrapping techniques.", + "Some packages can wrap source files into alternate languages " + "to provide additional functionality. For example, C++ code " + "can be wrapped into Java or Python etc using SWIG etc. " + "If WRAP_EXCLUDE is set to true (1 etc) that indicates then " + "this source file should not be wrapped."); +} + diff --git a/Source/cmSourceFile.h b/Source/cmSourceFile.h new file mode 100644 index 000000000..880d5e0f8 --- /dev/null +++ b/Source/cmSourceFile.h @@ -0,0 +1,124 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceFile.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:40 $ + Version: $Revision: 1.25.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSourceFile_h +#define cmSourceFile_h + +#include "cmSourceFileLocation.h" +#include "cmCustomCommand.h" +#include "cmPropertyMap.h" + +class cmake; + +/** \class cmSourceFile + * \brief Represent a class loaded from a makefile. + * + * cmSourceFile is represents a class loaded from + * a makefile. + */ +class cmSourceFile +{ +public: + /** + * Construct with the makefile storing the source and the initial + * name referencing it. + */ + cmSourceFile(cmMakefile* mf, const char* name); + + ~cmSourceFile(); + + /** + * Get the list of the custom commands for this source file + */ + cmCustomCommand* GetCustomCommand(); + cmCustomCommand const* GetCustomCommand() const; + void SetCustomCommand(cmCustomCommand *cc); + + ///! Set/Get a property of this source file + void SetProperty(const char *prop, const char *value); + void AppendProperty(const char* prop, const char* value); + const char *GetProperty(const char *prop) const; + bool GetPropertyAsBool(const char *prop) const; + + /** Implement getting a property when called from a CMake language + command like get_property or get_source_file_property. */ + const char* GetPropertyForUser(const char *prop); + + /** + * The full path to the file. The non-const version of this method + * may attempt to locate the file on disk and finalize its location. + * The const version of this method may return an empty string if + * the non-const version has not yet been called (yes this is a + * horrible interface, but is necessary for backwards + * compatibility). + */ + std::string const& GetFullPath(); + std::string const& GetFullPath() const; + + /** + * Get the information currently known about the source file + * location without attempting to locate the file as GetFullPath + * would. See cmSourceFileLocation documentation. + */ + cmSourceFileLocation const& GetLocation() const; + + /** + * Get the file extension of this source file. + */ + std::string const& GetExtension() const; + + /** + * Get the language of the compiler to use for this source file. + */ + const char* GetLanguage(); + const char* GetLanguage() const; + + /** + * Return the vector that holds the list of dependencies + */ + const std::vector &GetDepends() const {return this->Depends;} + void AddDepend(const char* d) { this->Depends.push_back(d); } + + // Get the properties + cmPropertyMap &GetProperties() { return this->Properties; }; + + // Define the properties + static void DefineProperties(cmake *cm); + + /** + * Check whether the given source file location could refer to this + * source. + */ + bool Matches(cmSourceFileLocation const&); + +private: + cmSourceFileLocation Location; + cmPropertyMap Properties; + cmCustomCommand* CustomCommand; + std::string Extension; + std::string Language; + std::string FullPath; + bool FindFullPathFailed; + + bool FindFullPath(); + bool TryFullPath(const char* tryPath, const char* ext); + void CheckExtension(); + void CheckLanguage(std::string const& ext); + + std::vector Depends; +}; + +#endif diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx new file mode 100644 index 000000000..1f3b9e440 --- /dev/null +++ b/Source/cmSourceFileLocation.cxx @@ -0,0 +1,218 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceFileLocation.cxx,v $ + Language: C++ + Date: $Date: 2008-03-18 14:23:54 $ + Version: $Revision: 1.3.2.1 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSourceFileLocation.h" + +#include "cmMakefile.h" +#include "cmSystemTools.h" + +//---------------------------------------------------------------------------- +cmSourceFileLocation +::cmSourceFileLocation(cmMakefile* mf, const char* name): Makefile(mf) +{ + this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name); + this->AmbiguousExtension = true; + this->Directory = cmSystemTools::GetFilenamePath(name); + this->Name = cmSystemTools::GetFilenameName(name); + this->UpdateExtension(name); +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::Update(const char* name) +{ + if(this->AmbiguousDirectory) + { + this->UpdateDirectory(name); + } + if(this->AmbiguousExtension) + { + this->UpdateExtension(name); + } +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::Update(cmSourceFileLocation const& loc) +{ + if(this->AmbiguousDirectory && !loc.AmbiguousDirectory) + { + this->Directory = loc.Directory; + this->AmbiguousDirectory = false; + } + if(this->AmbiguousExtension && !loc.AmbiguousExtension) + { + this->Name = loc.Name; + this->AmbiguousExtension = false; + } +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::DirectoryUseSource() +{ + if(this->AmbiguousDirectory) + { + this->Directory = + cmSystemTools::CollapseFullPath( + this->Directory.c_str(), this->Makefile->GetCurrentDirectory()); + this->AmbiguousDirectory = false; + } +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::DirectoryUseBinary() +{ + if(this->AmbiguousDirectory) + { + this->Directory = + cmSystemTools::CollapseFullPath( + this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory()); + this->AmbiguousDirectory = false; + } +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::UpdateExtension(const char* name) +{ + // Check the extension. + std::string ext = cmSystemTools::GetFilenameLastExtension(name); + if(!ext.empty()) { ext = ext.substr(1); } + + // TODO: Let enable-language specify extensions for each language. + cmMakefile const* mf = this->Makefile; + const std::vector& srcExts = mf->GetSourceExtensions(); + const std::vector& hdrExts = mf->GetHeaderExtensions(); + if(std::find(srcExts.begin(), srcExts.end(), ext) != srcExts.end() || + std::find(hdrExts.begin(), hdrExts.end(), ext) != hdrExts.end()) + { + // This is a known extension. Use the given filename with extension. + this->Name = cmSystemTools::GetFilenameName(name); + this->AmbiguousExtension = false; + } +} + +//---------------------------------------------------------------------------- +void cmSourceFileLocation::UpdateDirectory(const char* name) +{ + // If a full path was given we know the directory. + if(cmSystemTools::FileIsFullPath(name)) + { + this->Directory = cmSystemTools::GetFilenamePath(name); + this->AmbiguousDirectory = false; + } +} + +//---------------------------------------------------------------------------- +bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) +{ + if(this->AmbiguousExtension || loc.AmbiguousExtension) + { + // Need to compare without the file extension. + std::string thisName; + if(this->AmbiguousExtension) + { + thisName = this->Name; + } + else + { + thisName = cmSystemTools::GetFilenameWithoutLastExtension(this->Name); + } + std::string locName; + if(loc.AmbiguousExtension) + { + locName = loc.Name; + } + else + { + locName = cmSystemTools::GetFilenameWithoutLastExtension(loc.Name); + } + if(thisName != locName) + { + return false; + } + } + else + { + // Compare with extension. + if(this->Name != loc.Name) + { + return false; + } + } + + if(!this->AmbiguousDirectory && !loc.AmbiguousDirectory) + { + // Both sides have absolute directories. + if(this->Directory != loc.Directory) + { + return false; + } + } + else if(this->AmbiguousDirectory && loc.AmbiguousDirectory && + this->Makefile == loc.Makefile) + { + // Both sides have directories relative to the same location. + if(this->Directory != loc.Directory) + { + return false; + } + } + else if(this->AmbiguousDirectory && loc.AmbiguousDirectory) + { + // Each side has a directory relative to a different location. + // This can occur when referencing a source file from a different + // directory. This is not yet allowed. + this->Makefile->IssueMessage( + cmake::INTERNAL_ERROR, + "Matches error: Each side has a directory relative to a different " + "location. This can occur when referencing a source file from a " + "different directory. This is not yet allowed." + ); + return false; + } + else if(this->AmbiguousDirectory) + { + // Compare possible directory combinations. + std::string srcDir = + cmSystemTools::CollapseFullPath( + this->Directory.c_str(), this->Makefile->GetCurrentDirectory()); + std::string binDir = + cmSystemTools::CollapseFullPath( + this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory()); + if(srcDir != loc.Directory && + binDir != loc.Directory) + { + return false; + } + } + else if(loc.AmbiguousDirectory) + { + // Compare possible directory combinations. + std::string srcDir = + cmSystemTools::CollapseFullPath( + loc.Directory.c_str(), loc.Makefile->GetCurrentDirectory()); + std::string binDir = + cmSystemTools::CollapseFullPath( + loc.Directory.c_str(), loc.Makefile->GetCurrentOutputDirectory()); + if(srcDir != this->Directory && + binDir != this->Directory) + { + return false; + } + } + + // File locations match. + this->Update(loc); + return true; +} diff --git a/Source/cmSourceFileLocation.h b/Source/cmSourceFileLocation.h new file mode 100644 index 000000000..3e030230e --- /dev/null +++ b/Source/cmSourceFileLocation.h @@ -0,0 +1,104 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceFileLocation.h,v $ + Language: C++ + Date: $Date: 2007-06-18 15:59:23 $ + Version: $Revision: 1.2 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSourceFileLocation_h +#define cmSourceFileLocation_h + +#include "cmStandardIncludes.h" + +class cmMakefile; + +/** \class cmSourceFileLocation + * \brief cmSourceFileLocation tracks knowledge about a source file location + * + * Source files can be referenced by a variety of names. The + * directory and/or extension may be omitted leading to a certain + * level of ambiguity about the source file location. This class is + * used by cmSourceFile to keep track of what is known about the + * source file location. Each reference may add some information + * about the directory or extension of the file. + */ +class cmSourceFileLocation +{ +public: + /** + * Construct for a source file created in a given cmMakefile + * instance with an initial name. + */ + cmSourceFileLocation(cmMakefile* mf, const char* name); + + /** + * Return whether the givne source file location could refers to the + * same source file as this location given the level of ambiguity in + * each location. + */ + bool Matches(cmSourceFileLocation const& loc); + + /** + * Explicity state that the source file is located in the source tree. + */ + void DirectoryUseSource(); + + /** + * Explicity state that the source file is located in the build tree. + */ + void DirectoryUseBinary(); + + /** + * Return whether the directory containing the source is ambiguous. + */ + bool DirectoryIsAmbiguous() const { return this->AmbiguousDirectory; } + + /** + * Return whether the extension of the source name is ambiguous. + */ + bool ExtensionIsAmbiguous() const { return this->AmbiguousExtension; } + + /** + * Get the directory containing the file as best is currently known. + * If DirectoryIsAmbiguous() returns false this will be a full path. + * Otherwise it will be a relative path (possibly empty) that is + * either with respect to the source or build tree. + */ + const char* GetDirectory() const { return this->Directory.c_str(); } + + /** + * Get the file name as best is currently known. If + * ExtensionIsAmbiguous() returns true this name may not be the + * final name (but could be). Otherwise the returned name is the + * final name. + */ + const char* GetName() const { return this->Name.c_str(); } + + /** + * Get the cmMakefile instance for which the source file was created. + */ + cmMakefile* GetMakefile() const { return this->Makefile; } +private: + cmMakefile* Makefile; + bool AmbiguousDirectory; + bool AmbiguousExtension; + std::string Directory; + std::string Name; + + // Update the location with additional knowledge. + void Update(cmSourceFileLocation const& loc); + void Update(const char* name); + void UpdateExtension(const char* name); + void UpdateDirectory(const char* name); +}; + +#endif diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx new file mode 100644 index 000000000..187a87e02 --- /dev/null +++ b/Source/cmSourceGroup.cxx @@ -0,0 +1,160 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceGroup.cxx,v $ + Language: C++ + Date: $Date: 2007-08-24 18:21:49 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSourceGroup.h" + +//---------------------------------------------------------------------------- +cmSourceGroup::cmSourceGroup(const char* name, const char* regex): Name(name) +{ + this->SetGroupRegex(regex); +} + +//---------------------------------------------------------------------------- +void cmSourceGroup::SetGroupRegex(const char* regex) +{ + if(regex) + { + this->GroupRegex.compile(regex); + } + else + { + this->GroupRegex.compile("^$"); + } +} + +//---------------------------------------------------------------------------- +void cmSourceGroup::AddGroupFile(const char* name) +{ + this->GroupFiles.insert(name); +} + +//---------------------------------------------------------------------------- +const char* cmSourceGroup::GetName() const +{ + return this->Name.c_str(); +} + +//---------------------------------------------------------------------------- +bool cmSourceGroup::MatchesRegex(const char* name) +{ + return this->GroupRegex.find(name); +} + +//---------------------------------------------------------------------------- +bool cmSourceGroup::MatchesFiles(const char* name) +{ + std::set::const_iterator i = this->GroupFiles.find(name); + if(i != this->GroupFiles.end()) + { + return true; + } + return false; +} + +//---------------------------------------------------------------------------- +void cmSourceGroup::AssignSource(const cmSourceFile* sf) +{ + this->SourceFiles.push_back(sf); +} + +//---------------------------------------------------------------------------- +const std::vector& cmSourceGroup::GetSourceFiles() const +{ + return this->SourceFiles; +} + +//---------------------------------------------------------------------------- +std::vector& cmSourceGroup::GetSourceFiles() +{ + return this->SourceFiles; +} + +//---------------------------------------------------------------------------- +void cmSourceGroup::AddChild(cmSourceGroup child) +{ + this->GroupChildren.push_back(child); +} + +//---------------------------------------------------------------------------- +cmSourceGroup *cmSourceGroup::lookupChild(const char* name) +{ + // initializing iterators + std::vector::iterator iter = this->GroupChildren.begin(); + std::vector::iterator end = this->GroupChildren.end(); + + // st + for(;iter!=end; ++iter) + { + std::string sgName = iter->GetName(); + + // look if descenened is the one were looking for + if(sgName == name) + { + return &(*iter); // if it so return it + } + } + + // if no child with this name was found return NULL + return NULL; +} + +cmSourceGroup *cmSourceGroup::MatchChildrenFiles(const char *name) +{ + // initializing iterators + std::vector::iterator iter = this->GroupChildren.begin(); + std::vector::iterator end = this->GroupChildren.end(); + + if(this->MatchesFiles(name)) + { + return this; + } + for(;iter!=end;++iter) + { + cmSourceGroup *result = iter->MatchChildrenFiles(name); + if(result) + { + return result; + } + } + return 0; +} + + +cmSourceGroup *cmSourceGroup::MatchChildrenRegex(const char *name) +{ + // initializing iterators + std::vector::iterator iter = this->GroupChildren.begin(); + std::vector::iterator end = this->GroupChildren.end(); + + if(this->MatchesRegex(name)) + { + return this; + } + for(;iter!=end; ++iter) + { + cmSourceGroup *result = iter->MatchChildrenRegex(name); + if(result) + { + return result; + } + } + return 0; +} + +std::vector cmSourceGroup::GetGroupChildren() const +{ + return this->GroupChildren; +} diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h new file mode 100644 index 000000000..65959d7c4 --- /dev/null +++ b/Source/cmSourceGroup.h @@ -0,0 +1,126 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceGroup.h,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:07 $ + Version: $Revision: 1.19 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSourceGroup_h +#define cmSourceGroup_h + +#include "cmStandardIncludes.h" +#include + +class cmSourceFile; + +/** \class cmSourceGroup + * \brief Hold a group of sources as specified by a SOURCE_GROUP command. + * + * cmSourceGroup holds a regular expression and a list of files. When + * local generators are about to generate the rules for a target's + * files, the set of source groups is consulted to group files + * together. A file is placed into the last source group that lists + * the file by name. If no group lists the file, it is placed into + * the last group whose regex matches it. + */ +class cmSourceGroup +{ +public: + cmSourceGroup(const char* name, const char* regex); + ~cmSourceGroup() {} + + /** + * Set the regular expression for this group. + */ + void SetGroupRegex(const char* regex); + + /** + * Add a file name to the explicit list of files for this group. + */ + void AddGroupFile(const char* name); + + /** + * Add child to this sourcegroup + */ + void AddChild(cmSourceGroup child); + + /** + * Looks up child and returns it + */ + cmSourceGroup *lookupChild(const char *name); + + /** + * Get the name of this group. + */ + const char* GetName() const; + + /** + * Check if the given name matches this group's regex. + */ + bool MatchesRegex(const char* name); + + /** + * Check if the given name matches this group's explicit file list. + */ + bool MatchesFiles(const char* name); + + /** + * Check if the given name matches this group's explicit file list + * in children. + */ + cmSourceGroup *MatchChildrenFiles(const char *name); + + /** + * Check if the given name matches this group's regex in children. + */ + cmSourceGroup *MatchChildrenRegex(const char *name); + + /** + * Assign the given source file to this group. Used only by + * generators. + */ + void AssignSource(const cmSourceFile* sf); + + /** + * Get the list of the source files that have been assigned to this + * source group. + */ + const std::vector& GetSourceFiles() const; + std::vector& GetSourceFiles(); + + std::vector GetGroupChildren() const; +private: + /** + * The name of the source group. + */ + std::string Name; + + /** + * The regular expression matching the files in the group. + */ + cmsys::RegularExpression GroupRegex; + + /** + * Set of file names explicitly added to this group. + */ + std::set GroupFiles; + + /** + * Vector of all source files that have been assigned to + * this group. + */ + std::vector SourceFiles; + + std::vector GroupChildren; +}; + +#endif diff --git a/Source/cmSourceGroupCommand.cxx b/Source/cmSourceGroupCommand.cxx new file mode 100644 index 000000000..031637017 --- /dev/null +++ b/Source/cmSourceGroupCommand.cxx @@ -0,0 +1,137 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceGroupCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.20 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSourceGroupCommand.h" + +inline std::vector tokenize(const std::string& str, + const std::string& sep) +{ + std::vector tokens; + std::string::size_type tokend = 0; + + do + { + std::string::size_type tokstart=str.find_first_not_of(sep, tokend); + if (tokstart==std::string::npos) + { + break; // no more tokens + } + tokend=str.find_first_of(sep,tokstart); + if (tokend==std::string::npos) + { + tokens.push_back(str.substr(tokstart)); + } + else + { + tokens.push_back(str.substr(tokstart,tokend-tokstart)); + } + } while (tokend!=std::string::npos); + + if (tokens.empty()) + { + tokens.push_back(""); + } + return tokens; +} + +// cmSourceGroupCommand +bool cmSourceGroupCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("called with incorrect number of arguments"); + return false; + } + + std::string delimiter = "\\"; + if(this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER")) + { + delimiter = this->Makefile->GetDefinition("SOURCE_GROUP_DELIMITER"); + } + + std::vector folders = tokenize(args[0], delimiter); + + cmSourceGroup* sg = 0; + sg = this->Makefile->GetSourceGroup(folders); + if(!sg) + { + this->Makefile->AddSourceGroup(folders); + sg = this->Makefile->GetSourceGroup(folders); + } + + if(!sg) + { + this->SetError("Could not create or find source group"); + return false; + } + // If only two arguments are given, the pre-1.8 version of the + // command is being invoked. + if(args.size() == 2 && args[1] != "FILES") + { + sg->SetGroupRegex(args[1].c_str()); + return true; + } + + // Process arguments. + bool doingFiles = false; + for(unsigned int i=1; i < args.size(); ++i) + { + if(args[i] == "REGULAR_EXPRESSION") + { + // Next argument must specify the regex. + if(i+1 < args.size()) + { + ++i; + sg->SetGroupRegex(args[i].c_str()); + } + else + { + this->SetError("REGULAR_EXPRESSION argument given without a regex."); + return false; + } + doingFiles = false; + } + else if(args[i] == "FILES") + { + // Next arguments will specify files. + doingFiles = true; + } + else if(doingFiles) + { + // Convert name to full path and add to the group's list. + std::string src = args[i].c_str(); + if(!cmSystemTools::FileIsFullPath(src.c_str())) + { + src = this->Makefile->GetCurrentDirectory(); + src += "/"; + src += args[i]; + } + src = cmSystemTools::CollapseFullPath(src.c_str()); + sg->AddGroupFile(src.c_str()); + } + else + { + cmOStringStream err; + err << "Unknown argument \"" << args[i].c_str() << "\". " + << "Perhaps the FILES keyword is missing.\n"; + this->SetError(err.str().c_str()); + return false; + } + } + + return true; +} diff --git a/Source/cmSourceGroupCommand.h b/Source/cmSourceGroupCommand.h new file mode 100644 index 000000000..1eb662b82 --- /dev/null +++ b/Source/cmSourceGroupCommand.h @@ -0,0 +1,86 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmSourceGroupCommand.h,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.16 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmSourceGroupCommand_h +#define cmSourceGroupCommand_h + +#include "cmCommand.h" + +/** \class cmSourceGroupCommand + * \brief Adds a cmSourceGroup to the cmMakefile. + * + * cmSourceGroupCommand is used to define cmSourceGroups which split up + * source files in to named, organized groups in the generated makefiles. + */ +class cmSourceGroupCommand : public cmCommand +{ +public: + /** + * This is a virtual constructor for the command. + */ + virtual cmCommand* Clone() + { + return new cmSourceGroupCommand; + } + + /** + * This is called when the command is first encountered in + * the CMakeLists.txt file. + */ + virtual bool InitialPass(std::vector const& args, + cmExecutionStatus &status); + + /** + * The name of the command as specified in CMakeList.txt. + */ + virtual const char* GetName() {return "source_group";} + + /** + * Succinct documentation. + */ + virtual const char* GetTerseDocumentation() + { + return "Define a grouping for sources in the makefile."; + } + + /** + * More documentation. + */ + virtual const char* GetFullDocumentation() + { + return + " source_group(name [REGULAR_EXPRESSION regex] " + "[FILES src1 src2 ...])\n" + "Defines a group into which sources will be placed in project files. " + "This is mainly used to setup file tabs in Visual Studio. " + "Any file whose name is listed or matches the regular expression will " + "be placed in this group. If a file matches multiple groups, the LAST " + "group that explicitly lists the file will be favored, if any. If no " + "group explicitly lists the file, the LAST group whose regular " + "expression matches the file will be favored.\n" + "The name of the group may contain backslashes to specify subgroups:\n" + " source_group(outer\\\\inner ...)\n" + "For backwards compatibility, this command is also supports the " + "format:\n" + " source_group(name regex)"; + } + + cmTypeMacro(cmSourceGroupCommand, cmCommand); +}; + + + +#endif diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h new file mode 100644 index 000000000..99001bec8 --- /dev/null +++ b/Source/cmStandardIncludes.h @@ -0,0 +1,385 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmStandardIncludes.h,v $ + Language: C++ + Date: $Date: 2008-02-24 19:05:11 $ + Version: $Revision: 1.72 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +/** + * Include header files as a function of the build process, compiler, + * and operating system. + */ +#ifndef cmStandardIncludes_h +#define cmStandardIncludes_h + +#define CMAKE_TO_STRING(x) CMAKE_TO_STRING0(x) +#define CMAKE_TO_STRING0(x) #x + +// include configure generated header to define CMAKE_NO_ANSI_STREAM_HEADERS, +// CMAKE_NO_STD_NAMESPACE, and other macros. +#include "cmConfigure.h" +#include + +#define CMake_VERSION \ + CMAKE_TO_STRING(CMake_VERSION_MAJOR) "." \ + CMAKE_TO_STRING(CMake_VERSION_MINOR) + +#define CMake_VERSION_FULL \ + CMAKE_TO_STRING(CMake_VERSION_MAJOR) "." \ + CMAKE_TO_STRING(CMake_VERSION_MINOR) "." \ + CMAKE_TO_STRING(CMake_VERSION_PATCH) + +#define CMake_VERSION_ENCODE(major, minor, patch) \ + ((major)*0x10000u + (minor)*0x100u + (patch)) + +#ifdef _MSC_VER +#pragma warning ( disable : 4786 ) +#pragma warning ( disable : 4503 ) +#pragma warning ( disable : 4512 ) /* operator=() could not be generated */ +#define CMAKE_NO_ANSI_FOR_SCOPE +#endif + +#ifdef __BORLANDC__ +#pragma warn -8030 /* Temporary used for parameter */ +#endif + +#ifdef __ICL +#pragma warning ( disable : 985 ) +#endif + +#include // Work-around for SGI MIPSpro 7.4.2m header bug + +// This is a hack to prevent warnings about these functions being +// declared but not referenced. +#if defined(__sgi) && !defined(__GNUC__) +# include +class cmStandardIncludesHack +{ +public: + enum + { + Ref1 = sizeof(cfgetospeed(0)), + Ref2 = sizeof(cfgetispeed(0)), + Ref3 = sizeof(tcgetattr(0, 0)), + Ref4 = sizeof(tcsetattr(0, 0, 0)), + Ref5 = sizeof(cfsetospeed(0,0)), + Ref6 = sizeof(cfsetispeed(0,0)) + }; +}; +#endif + +// Include stream compatibility layer from KWSys. +// This is needed to work with large file support +// on some platforms whose stream operators do not +// support the large integer types. +#if defined(CMAKE_BUILD_WITH_CMAKE) +# include +# undef GetCurrentDirectory // Borland includes windows.h +#endif + +// Avoid warnings in system headers. +#if defined(_MSC_VER) +# pragma warning (push,1) +#endif + +#ifndef CMAKE_NO_ANSI_STREAM_HEADERS +# include +# include +# include +#else +# include +# include +# include +#endif + +#if !defined(CMAKE_NO_ANSI_STRING_STREAM) +# include +#elif !defined(CMAKE_NO_ANSI_STREAM_HEADERS) +# include +#else +# include +#endif + +// we must have stl with the standard include style +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(_MSC_VER) +# pragma warning(pop) +#endif + +// include the "c" string header +#include +#include +#include + +// Borland C++ defines several of the stdlib.h and string.h symbols in +// sub-headers search.h and mem.h. These sub-headers have using +// declarations to pull functions from the std namespace to the global +// namespace, but they are defined only if the header was not included +// through the C++-style cstdlib or cstring header. These outer +// headers are included by the streams library in C++-style and +// include blockers are put in place that prevent including the +// C-style versions from ever including the sub-headers. Therefore we +// have to include the sub-headers here to get the using declarations. +#if defined(__BORLANDC__) +# include /* mem... functions from string.h */ +# include /* search functions from stdlib.h */ +#endif + + +#if !defined(_WIN32) && defined(__COMO__) +// Hack for como strict mode to avoid defining _SVID_SOURCE or _BSD_SOURCE. +extern "C" +{ +extern FILE *popen (__const char *__command, __const char *__modes) __THROW; +extern int pclose (FILE *__stream) __THROW; +extern char *realpath (__const char *__restrict __name, + char *__restrict __resolved) __THROW; +extern char *strdup (__const char *__s) __THROW; +extern int putenv (char *__string) __THROW; +} +#endif + +// if std:: is not supported, then just #define it away +#ifdef CMAKE_NO_STD_NAMESPACE +#define std +#endif + +// if the compiler does not support ansi for scoping of vars use a +// #define hack +#ifdef CMAKE_NO_ANSI_FOR_SCOPE +#define for if(false) {} else for +#endif + +// check for the 720 compiler on the SGI +// which has some strange properties that I don't think are worth +// checking for in a general way in configure +#if defined(__sgi) && !defined(__GNUC__) +# if (_COMPILER_VERSION >= 730) +# define CM_SGI_CC_730 +# elif (_COMPILER_VERSION >= 720) +# define CM_HAS_STD_BUT_NOT_FOR_IOSTREAM +# endif +#endif + +#ifdef __DECCXX_VER +# if __DECCXX_VER <= 60390008 +# define CM_HAS_STD_BUT_NOT_FOR_IOSTREAM +# endif +#endif + +#if defined( _MSC_VER ) +typedef unsigned short mode_t; +#endif + + +#ifdef CM_HAS_STD_BUT_NOT_FOR_IOSTREAM +// some compilers have std:: but not for the stream library, +// so we have to bring it into the std namespace by hand. +namespace std { +using ::ostream; +using ::istream; +using ::ios; +using ::cout; +using ::cerr; +using ::cin; +using ::ifstream; +using ::ofstream; + +#if !defined(CMAKE_NO_ANSI_STRING_STREAM) + using ::ostringstream; + using ::istringstream; +#else + using ::ostrstream; + using ::istrstream; +#endif + +using ::endl; +using ::ends; +using ::flush; +using ::dec; +using ::hex; +using ::setw; +using ::setiosflags; +using ::setfill; +using ::setprecision; +} +// The string class is missing these operators so add them +#if !defined(cmsys_STL_STRING_NEQ_CHAR_DEFINED) +# define cmsys_STL_STRING_NO_NEQ_CHAR +inline bool operator!=(std::string const& a, const char* b) +{ return !(a==std::string(b)); } +#endif + +inline bool operator==(std::string const& a, const char* b) +{ return (a==std::string(b)); } +# endif // end CM_SGI_CC_720 + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1375 /* base class destructor not virtual */ +#endif + +// use this class to shrink the size of symbols in .o files +// std::string is really basic_string<....lots of stuff....> +// when combined with a map or set, the symbols can be > 2000 chars! +#include +typedef cmsys::String cmStdString; + +// Define cmOStringStream and cmIStringStream wrappers to hide +// differences between std::stringstream and the old strstream. +#if !defined(CMAKE_NO_ANSI_STRING_STREAM) +class cmOStringStream: public std::ostringstream +{ +public: + cmOStringStream() {} +private: + cmOStringStream(const cmOStringStream&); + void operator=(const cmOStringStream&); +}; +class cmIStringStream: public std::istringstream +{ +public: + typedef std::istringstream Superclass; + cmIStringStream() {} + cmIStringStream(const std::string& s): Superclass(s) {} +private: + cmIStringStream(const cmIStringStream&); + void operator=(const cmIStringStream&); +}; +#else +class cmOStrStreamCleanup +{ +public: + cmOStrStreamCleanup(std::ostrstream& ostr): OStrStream(ostr) {} + ~cmOStrStreamCleanup() { this->OStrStream.rdbuf()->freeze(0); } + static void IgnoreUnusedVariable(const cmOStrStreamCleanup&) {} +protected: + std::ostrstream& OStrStream; +}; + +class cmOStringStream: public std::ostrstream +{ +public: + typedef std::ostrstream Superclass; + cmOStringStream() {} + std::string str() + { + cmOStrStreamCleanup cleanup(*this); + cmOStrStreamCleanup::IgnoreUnusedVariable(cleanup); + int pcount = this->pcount(); + const char* ptr = this->Superclass::str(); + return std::string(ptr?ptr:"", pcount); + } +private: + cmOStringStream(const cmOStringStream&); + void operator=(const cmOStringStream&); +}; + +class cmIStringStream: private std::string, public std::istrstream +{ +public: + typedef std::string StdString; + typedef std::istrstream IStrStream; + cmIStringStream(): StdString(), IStrStream(StdString::c_str()) {} + cmIStringStream(const std::string& s): + StdString(s), IStrStream(StdString::c_str()) {} + std::string str() const { return *this; } + void str(const std::string& s) + { + // Very dangerous. If this throws, the object is hosed. When the + // destructor is later called, the program is hosed too. + this->~cmIStringStream(); + new (this) cmIStringStream(s); + } +private: + cmIStringStream(const cmIStringStream&); + void operator=(const cmIStringStream&); +}; +#endif + +/* Poison this operator to avoid common mistakes. */ +extern void operator << (std::ostream&, const cmOStringStream&); + +/** Standard documentation entry for cmDocumentation's formatting. */ +struct cmDocumentationEntry +{ + std::string Name; + std::string Brief; + std::string Full; + cmDocumentationEntry(){}; + cmDocumentationEntry(const char *doc[3]) + { if (doc[0]) this->Name = doc[0]; + if (doc[1]) this->Brief = doc[1]; + if (doc[2]) this->Full = doc[2]; }; + cmDocumentationEntry(const char *n, const char *b, const char *f) + { if (n) this->Name = n; if (b) this->Brief = b; if (f) this->Full = f; }; +}; + +/** Data structure to represent a single command line. */ +class cmCustomCommandLine: public std::vector +{ +public: + typedef std::vector Superclass; + typedef Superclass::iterator iterator; + typedef Superclass::const_iterator const_iterator; +}; + +/** Data structure to represent a list of command lines. */ +class cmCustomCommandLines: public std::vector +{ +public: + typedef std::vector Superclass; + typedef Superclass::iterator iterator; + typedef Superclass::const_iterator const_iterator; +}; + +#if defined(__sgi) && !defined(__GNUC__) +# pragma reset woff 1375 /* base class destructor not virtual */ +#endif + +// All subclasses of cmCommand or cmCTestGenericHandler should +// invoke this macro. +#define cmTypeMacro(thisClass,superclass) \ +virtual const char* GetNameOfClass() { return #thisClass; } \ +typedef superclass Superclass; \ +static bool IsTypeOf(const char *type) \ +{ \ + if ( !strcmp(#thisClass,type) ) \ + { \ + return true; \ + } \ + return Superclass::IsTypeOf(type); \ +} \ +virtual bool IsA(const char *type) \ +{ \ + return thisClass::IsTypeOf(type); \ +} \ +static thisClass* SafeDownCast(cmObject *c) \ +{ \ + if ( c && c->IsA(#thisClass) ) \ + { \ + return static_cast(c); \ + } \ + return 0;\ +} + + + +#endif diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h new file mode 100644 index 000000000..e2ab086c3 --- /dev/null +++ b/Source/cmStandardLexer.h @@ -0,0 +1,78 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmStandardLexer.h,v $ + Language: C++ + Date: $Date: 2006-08-24 13:34:53 $ + Version: $Revision: 1.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef cmStandardLexer_h +#define cmStandardLexer_h + +/* Disable some warnings. */ +#if defined(_MSC_VER) +# pragma warning ( disable : 4127 ) +# pragma warning ( disable : 4131 ) +# pragma warning ( disable : 4244 ) +# pragma warning ( disable : 4251 ) +# pragma warning ( disable : 4267 ) +# pragma warning ( disable : 4305 ) +# pragma warning ( disable : 4309 ) +# pragma warning ( disable : 4706 ) +# pragma warning ( disable : 4786 ) +#endif + +#if defined(__BORLANDC__) +# pragma warn -8008 /* condition always returns true */ +# pragma warn -8066 /* unreachable code */ +#endif + +/* Borland system header defines these macros without first undef-ing them. */ +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x580 +# undef INT8_MIN +# undef INT16_MIN +# undef INT32_MIN +# undef INT8_MAX +# undef INT16_MAX +# undef INT32_MAX +# undef UINT8_MAX +# undef UINT16_MAX +# undef UINT32_MAX +# include +#endif + +/* Make sure SGI termios does not define ECHO differently. */ +#if defined(__sgi) && !defined(__GNUC__) +# include +# undef ECHO +#endif + +/* Define isatty on windows. */ +#if defined(_WIN32) && !defined(__CYGWIN__) +# include +# if defined( _MSC_VER ) +# define isatty _isatty +# endif +# define YY_NO_UNISTD_H 1 +#endif + +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + +/* Disable features we do not need. */ +#define YY_NEVER_INTERACTIVE 1 +#define YY_NO_INPUT 1 +#define YY_NO_UNPUT 1 +#define ECHO + +#endif diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx new file mode 100644 index 000000000..33a72ab7f --- /dev/null +++ b/Source/cmStringCommand.cxx @@ -0,0 +1,764 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmStringCommand.cxx,v $ + Language: C++ + Date: $Date: 2008-01-23 15:27:59 $ + Version: $Revision: 1.27 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmStringCommand.h" +#include +#include + +#include // required for atoi +#include +#include + +//---------------------------------------------------------------------------- +bool cmStringCommand +::InitialPass(std::vector const& args, cmExecutionStatus &) +{ + if(args.size() < 1) + { + this->SetError("must be called with at least one argument."); + return false; + } + + const std::string &subCommand = args[0]; + if(subCommand == "REGEX") + { + return this->HandleRegexCommand(args); + } + else if(subCommand == "REPLACE") + { + return this->HandleReplaceCommand(args); + } + else if(subCommand == "TOLOWER") + { + return this->HandleToUpperLowerCommand(args, false); + } + else if(subCommand == "TOUPPER") + { + return this->HandleToUpperLowerCommand(args, true); + } + else if(subCommand == "COMPARE") + { + return this->HandleCompareCommand(args); + } + else if(subCommand == "ASCII") + { + return this->HandleAsciiCommand(args); + } + else if(subCommand == "CONFIGURE") + { + return this->HandleConfigureCommand(args); + } + else if(subCommand == "LENGTH") + { + return this->HandleLengthCommand(args); + } + else if(subCommand == "SUBSTRING") + { + return this->HandleSubstringCommand(args); + } + else if(subCommand == "STRIP") + { + return this->HandleStripCommand(args); + } + else if(subCommand == "RANDOM") + { + return this->HandleRandomCommand(args); + } + + std::string e = "does not recognize sub-command "+subCommand; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmStringCommand::HandleToUpperLowerCommand( + std::vector const& args, bool toUpper) +{ + if ( args.size() < 3 ) + { + this->SetError("no output variable specified"); + return false; + } + + std::string outvar = args[2]; + std::string output; + + if (toUpper) + { + output = cmSystemTools::UpperCase(args[1]); + } + else + { + output = cmSystemTools::LowerCase(args[1]); + } + + // Store the output in the provided variable. + this->Makefile->AddDefinition(outvar.c_str(), output.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmStringCommand::HandleAsciiCommand(std::vector const& args) +{ + if ( args.size() < 3 ) + { + this->SetError("No output variable specified"); + return false; + } + std::string::size_type cc; + std::string outvar = args[args.size()-1]; + std::string output = ""; + for ( cc = 1; cc < args.size()-1; cc ++ ) + { + int ch = atoi(args[cc].c_str()); + if ( ch > 0 && ch < 256 ) + { + output += static_cast(ch); + } + else + { + std::string error = "Character with code "; + error += ch; + error += " does not exist."; + this->SetError(error.c_str()); + return false; + } + } + // Store the output in the provided variable. + this->Makefile->AddDefinition(outvar.c_str(), output.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool cmStringCommand::HandleConfigureCommand( + std::vector const& args) +{ + if ( args.size() < 2 ) + { + this->SetError("No input string specified."); + return false; + } + else if ( args.size() < 3 ) + { + this->SetError("No output variable specified."); + return false; + } + + // Parse options. + bool escapeQuotes = false; + bool atOnly = false; + for(unsigned int i = 3; i < args.size(); ++i) + { + if(args[i] == "@ONLY") + { + atOnly = true; + } + else if(args[i] == "ESCAPE_QUOTES") + { + escapeQuotes = true; + } + else + { + cmOStringStream err; + err << "Unrecognized argument \"" << args[i] << "\""; + this->SetError(err.str().c_str()); + return false; + } + } + + // Configure the string. + std::string output; + this->Makefile->ConfigureString(args[1], output, atOnly, escapeQuotes); + + // Store the output in the provided variable. + this->Makefile->AddDefinition(args[2].c_str(), output.c_str()); + + return true; +} + +//---------------------------------------------------------------------------- +bool cmStringCommand::HandleRegexCommand(std::vector const& args) +{ + if(args.size() < 2) + { + this->SetError("sub-command REGEX requires a mode to be specified."); + return false; + } + std::string mode = args[1]; + if(mode == "MATCH") + { + if(args.size() < 5) + { + this->SetError("sub-command REGEX, mode MATCH needs " + "at least 5 arguments total to command."); + return false; + } + return this->RegexMatch(args); + } + else if(mode == "MATCHALL") + { + if(args.size() < 5) + { + this->SetError("sub-command REGEX, mode MATCHALL needs " + "at least 5 arguments total to command."); + return false; + } + return this->RegexMatchAll(args); + } + else if(mode == "REPLACE") + { + if(args.size() < 6) + { + this->SetError("sub-command REGEX, mode MATCH needs " + "at least 6 arguments total to command."); + return false; + } + return this->RegexReplace(args); + } + + std::string e = "sub-command REGEX does not recognize mode "+mode; + this->SetError(e.c_str()); + return false; +} + +//---------------------------------------------------------------------------- +bool cmStringCommand::RegexMatch(std::vector const& args) +{ + //"STRING(REGEX MATCH + //

Documentation for commands of CMake " << tmp << "

\n"; + f << "
    \n"; + for(RegisteredCommandsMap::iterator j = this->Commands.begin(); + j != this->Commands.end(); ++j) + { + name = (*j).second->GetName(); + terse = (*j).second->GetTerseDocumentation(); + full = (*j).second->GetFullDocumentation(); + f << "
  • " << name << " - " << terse << std::endl + << "
    Usage: " << full << "
  • " << std::endl << std::endl; + } + f << "
\n"; +#else + (void)f; +#endif + return 1; +} + +void cmake::AddDefaultCommands() +{ + std::list commands; + GetBootstrapCommands(commands); + GetPredefinedCommands(commands); + for(std::list::iterator i = commands.begin(); + i != commands.end(); ++i) + { + this->AddCommand(*i); + } +} + +void cmake::AddDefaultGenerators() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) +# if !defined(CMAKE_BOOT_MINGW) + this->Generators[cmGlobalVisualStudio6Generator::GetActualName()] = + &cmGlobalVisualStudio6Generator::New; + this->Generators[cmGlobalVisualStudio7Generator::GetActualName()] = + &cmGlobalVisualStudio7Generator::New; + this->Generators[cmGlobalVisualStudio71Generator::GetActualName()] = + &cmGlobalVisualStudio71Generator::New; + this->Generators[cmGlobalVisualStudio8Generator::GetActualName()] = + &cmGlobalVisualStudio8Generator::New; + this->Generators[cmGlobalVisualStudio9Generator::GetActualName()] = + &cmGlobalVisualStudio9Generator::New; + this->Generators[cmGlobalVisualStudio9Win64Generator::GetActualName()] = + &cmGlobalVisualStudio9Win64Generator::New; + this->Generators[cmGlobalVisualStudio8Win64Generator::GetActualName()] = + &cmGlobalVisualStudio8Win64Generator::New; + this->Generators[cmGlobalBorlandMakefileGenerator::GetActualName()] = + &cmGlobalBorlandMakefileGenerator::New; + this->Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] = + &cmGlobalNMakeMakefileGenerator::New; + this->Generators[cmGlobalWatcomWMakeGenerator::GetActualName()] = + &cmGlobalWatcomWMakeGenerator::New; +# endif + this->Generators[cmGlobalMSYSMakefileGenerator::GetActualName()] = + &cmGlobalMSYSMakefileGenerator::New; + this->Generators[cmGlobalMinGWMakefileGenerator::GetActualName()] = + &cmGlobalMinGWMakefileGenerator::New; +#endif + this->Generators[cmGlobalUnixMakefileGenerator3::GetActualName()] = + &cmGlobalUnixMakefileGenerator3::New; +#ifdef CMAKE_USE_XCODE + this->Generators[cmGlobalXCodeGenerator::GetActualName()] = + &cmGlobalXCodeGenerator::New; +#endif +} + +int cmake::LoadCache() +{ + // could we not read the cache + if (!this->CacheManager->LoadCache(this->GetHomeOutputDirectory())) + { + // if it does exist, but isn;t readable then warn the user + std::string cacheFile = this->GetHomeOutputDirectory(); + cacheFile += "/CMakeCache.txt"; + if(cmSystemTools::FileExists(cacheFile.c_str())) + { + cmSystemTools::Error( + "There is a CMakeCache.txt file for the current binary tree but " + "cmake does not have permission to read it. Please check the " + "permissions of the directory you are trying to run CMake on."); + return -1; + } + } + + if (this->CMakeCommand.size() < 2) + { + cmSystemTools::Error( + "cmake command was not specified prior to loading the cache in " + "cmake.cxx"); + return -1; + } + + // setup CMAKE_ROOT and CMAKE_COMMAND + if(!this->AddCMakePaths()) + { + return -3; + } + return 0; +} + +void cmake::SetProgressCallback(ProgressCallbackType f, void *cd) +{ + this->ProgressCallback = f; + this->ProgressCallbackClientData = cd; +} + +void cmake::UpdateProgress(const char *msg, float prog) +{ + if(this->ProgressCallback && !this->InTryCompile) + { + (*this->ProgressCallback)(msg, prog, this->ProgressCallbackClientData); + return; + } +} + +void cmake::GetCommandDocumentation(std::vector& v, + bool withCurrentCommands, + bool withCompatCommands) const +{ + for(RegisteredCommandsMap::const_iterator j = this->Commands.begin(); + j != this->Commands.end(); ++j) + { + if ((( withCompatCommands == false) && ( (*j).second->IsDiscouraged())) + || ((withCurrentCommands == false) && (!(*j).second->IsDiscouraged()))) + { + continue; + } + + cmDocumentationEntry e((*j).second->GetName(), + (*j).second->GetTerseDocumentation(), + (*j).second->GetFullDocumentation()); + v.push_back(e); + } +} + +void cmake::GetPolicyDocumentation(std::vector& v) +{ + this->Policies->GetDocumentation(v); +} + +void cmake::GetPropertiesDocumentation(std::map& v) +{ + // loop over the properties and put them into the doc structure + std::map::iterator i; + i = this->PropertyDefinitions.begin(); + for (;i != this->PropertyDefinitions.end(); ++i) + { + i->second.GetPropertiesDocumentation(v); + } +} + +void cmake::GetGeneratorDocumentation(std::vector& v) +{ + for(RegisteredGeneratorsMap::const_iterator i = this->Generators.begin(); + i != this->Generators.end(); ++i) + { + cmDocumentationEntry e; + cmGlobalGenerator* generator = (i->second)(); + generator->GetDocumentation(e); + delete generator; + v.push_back(e); + } + for(RegisteredExtraGeneratorsMap::const_iterator + i = this->ExtraGenerators.begin(); i != this->ExtraGenerators.end(); ++i) + { + cmDocumentationEntry e; + cmExternalMakefileProjectGenerator* generator = (i->second)(); + generator->GetDocumentation(e, i->first.c_str()); + e.Name = i->first; + delete generator; + v.push_back(e); + } +} + +void cmake::UpdateConversionPathTable() +{ + // Update the path conversion table with any specified file: + const char* tablepath = + this->CacheManager->GetCacheValue("CMAKE_PATH_TRANSLATION_FILE"); + + if(tablepath) + { + std::ifstream table( tablepath ); + if(!table) + { + cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ", tablepath, + ". CMake can not open file."); + cmSystemTools::ReportLastSystemError("CMake can not open file."); + } + else + { + std::string a, b; + while(!table.eof()) + { + // two entries per line + table >> a; table >> b; + cmSystemTools::AddTranslationPath( a.c_str(), b.c_str()); + } + } + } +} + +//---------------------------------------------------------------------------- +int cmake::CheckBuildSystem() +{ + // We do not need to rerun CMake. Check dependency integrity. Use + // the make system's VERBOSE environment variable to enable verbose + // output. + bool verbose = cmSystemTools::GetEnv("VERBOSE") != 0; + + // This method will check the integrity of the build system if the + // option was given on the command line. It reads the given file to + // determine whether CMake should rerun. + + // If no file is provided for the check, we have to rerun. + if(this->CheckBuildSystemArgument.size() == 0) + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake no build system arguments\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + + // If the file provided does not exist, we have to rerun. + if(!cmSystemTools::FileExists(this->CheckBuildSystemArgument.c_str())) + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake missing file: " + << this->CheckBuildSystemArgument.c_str() << "\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + + // Read the rerun check file and use it to decide whether to do the + // global generate. + cmake cm; + cmGlobalGenerator gg; + gg.SetCMakeInstance(&cm); + std::auto_ptr lg(gg.CreateLocalGenerator()); + lg->SetGlobalGenerator(&gg); + cmMakefile* mf = lg->GetMakefile(); + if(!mf->ReadListFile(0, this->CheckBuildSystemArgument.c_str()) || + cmSystemTools::GetErrorOccuredFlag()) + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake error reading : " + << this->CheckBuildSystemArgument.c_str() << "\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + // There was an error reading the file. Just rerun. + return 1; + } + + if(this->ClearBuildSystem) + { + // Get the generator used for this build system. + const char* genName = mf->GetDefinition("CMAKE_DEPENDS_GENERATOR"); + if(!genName || genName[0] == '\0') + { + genName = "Unix Makefiles"; + } + + // Create the generator and use it to clear the dependencies. + std::auto_ptr + ggd(this->CreateGlobalGenerator(genName)); + if(ggd.get()) + { + std::auto_ptr lgd(ggd->CreateLocalGenerator()); + lgd->SetGlobalGenerator(ggd.get()); + lgd->ClearDependencies(mf, verbose); + } + } + + // Get the set of dependencies and outputs. + std::vector depends; + std::vector outputs; + const char* dependsStr = mf->GetDefinition("CMAKE_MAKEFILE_DEPENDS"); + const char* outputsStr = mf->GetDefinition("CMAKE_MAKEFILE_OUTPUTS"); + if(dependsStr && outputsStr) + { + cmSystemTools::ExpandListArgument(dependsStr, depends); + cmSystemTools::ExpandListArgument(outputsStr, outputs); + } + if(depends.empty() || outputs.empty()) + { + // Not enough information was provided to do the test. Just rerun. + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake no CMAKE_MAKEFILE_DEPENDS " + "or CMAKE_MAKEFILE_OUTPUTS :\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + + // Find find the newest dependency. + std::vector::iterator dep = depends.begin(); + std::string dep_newest = *dep++; + for(;dep != depends.end(); ++dep) + { + int result = 0; + if(this->FileComparison->FileTimeCompare(dep_newest.c_str(), + dep->c_str(), &result)) + { + if(result < 0) + { + dep_newest = *dep; + } + } + else + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake: build system dependency is missing\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + } + + // Find find the oldest output. + std::vector::iterator out = outputs.begin(); + std::string out_oldest = *out++; + for(;out != outputs.end(); ++out) + { + int result = 0; + if(this->FileComparison->FileTimeCompare(out_oldest.c_str(), + out->c_str(), &result)) + { + if(result > 0) + { + out_oldest = *out; + } + } + else + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake: build system output is missing\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + } + + // If any output is older than any dependency then rerun. + { + int result = 0; + if(!this->FileComparison->FileTimeCompare(out_oldest.c_str(), + dep_newest.c_str(), + &result) || + result < 0) + { + if(verbose) + { + cmOStringStream msg; + msg << "Re-run cmake file: " << out_oldest.c_str() + << " older than: " << dep_newest.c_str() << "\n"; + cmSystemTools::Stdout(msg.str().c_str()); + } + return 1; + } + } + + // No need to rerun. + return 0; +} + +//---------------------------------------------------------------------------- +void cmake::TruncateOutputLog(const char* fname) +{ + std::string fullPath = this->GetHomeOutputDirectory(); + fullPath += "/"; + fullPath += fname; + struct stat st; + if ( ::stat(fullPath.c_str(), &st) ) + { + return; + } + if ( !this->CacheManager->GetCacheValue("CMAKE_CACHEFILE_DIR") ) + { + cmSystemTools::RemoveFile(fullPath.c_str()); + return; + } + off_t fsize = st.st_size; + const off_t maxFileSize = 50 * 1024; + if ( fsize < maxFileSize ) + { + //TODO: truncate file + return; + } +} + +inline std::string removeQuotes(const std::string& s) +{ + if(s[0] == '\"' && s[s.size()-1] == '\"') + { + return s.substr(1, s.size()-2); + } + return s; +} + +std::string cmake::FindCMakeProgram(const char* name) const +{ + std::string path; + if ((name) && (*name)) + { + const cmMakefile* mf + = this->GetGlobalGenerator()->GetLocalGenerators()[0]->GetMakefile(); +#ifdef CMAKE_BUILD_WITH_CMAKE + path = mf->GetRequiredDefinition("CMAKE_COMMAND"); + path = removeQuotes(path); + path = cmSystemTools::GetFilenamePath(path.c_str()); + path += "/"; + path += name; + path += cmSystemTools::GetExecutableExtension(); + if(!cmSystemTools::FileExists(path.c_str())) + { + path = mf->GetRequiredDefinition("CMAKE_COMMAND"); + path = cmSystemTools::GetFilenamePath(path.c_str()); + path += "/Debug/"; + path += name; + path += cmSystemTools::GetExecutableExtension(); + } + if(!cmSystemTools::FileExists(path.c_str())) + { + path = mf->GetRequiredDefinition("CMAKE_COMMAND"); + path = cmSystemTools::GetFilenamePath(path.c_str()); + path += "/Release/"; + path += name; + path += cmSystemTools::GetExecutableExtension(); + } +#else + // Only for bootstrap + path += mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"); + path += "/"; + path += name; + path += cmSystemTools::GetExecutableExtension(); +#endif + } + return path; +} + +const char* cmake::GetCTestCommand() +{ + if ( this->CTestCommand.empty() ) + { + this->CTestCommand = this->FindCMakeProgram("ctest"); + } + if ( this->CTestCommand.empty() ) + { + cmSystemTools::Error("Cannot find the CTest executable"); + this->CTestCommand = "CTEST-COMMAND-NOT-FOUND"; + } + return this->CTestCommand.c_str(); +} + +const char* cmake::GetCPackCommand() +{ + if ( this->CPackCommand.empty() ) + { + this->CPackCommand = this->FindCMakeProgram("cpack"); + } + if ( this->CPackCommand.empty() ) + { + cmSystemTools::Error("Cannot find the CPack executable"); + this->CPackCommand = "CPACK-COMMAND-NOT-FOUND"; + } + return this->CPackCommand.c_str(); +} + +void cmake::GenerateGraphViz(const char* fileName) const +{ + cmGeneratedFileStream str(fileName); + if ( !str ) + { + return; + } + cmake cm; + cmGlobalGenerator ggi; + ggi.SetCMakeInstance(&cm); + std::auto_ptr lg(ggi.CreateLocalGenerator()); + lg->SetGlobalGenerator(&ggi); + cmMakefile *mf = lg->GetMakefile(); + + std::string infile = this->GetHomeOutputDirectory(); + infile += "/CMakeGraphVizOptions.cmake"; + if ( !cmSystemTools::FileExists(infile.c_str()) ) + { + infile = this->GetHomeDirectory(); + infile += "/CMakeGraphVizOptions.cmake"; + if ( !cmSystemTools::FileExists(infile.c_str()) ) + { + infile = ""; + } + } + + if ( !infile.empty() ) + { + if ( !mf->ReadListFile(0, infile.c_str()) ) + { + cmSystemTools::Error("Problem opening GraphViz options file: ", + infile.c_str()); + return; + } + std::cout << "Read GraphViz options file: " << infile.c_str() + << std::endl; + } + +#define __set_if_not_set(var, value, cmakeDefinition) \ + const char* var = mf->GetDefinition(cmakeDefinition); \ + if ( !var ) \ + { \ + var = value; \ + } + __set_if_not_set(graphType, "digraph", "GRAPHVIZ_GRAPH_TYPE"); + __set_if_not_set(graphName, "GG", "GRAPHVIZ_GRAPH_NAME"); + __set_if_not_set(graphHeader, "node [\n fontsize = \"12\"\n];", + "GRAPHVIZ_GRAPH_HEADER"); + __set_if_not_set(graphNodePrefix, "node", "GRAPHVIZ_NODE_PREFIX"); + const char* ignoreTargets = mf->GetDefinition("GRAPHVIZ_IGNORE_TARGETS"); + std::set ignoreTargetsSet; + if ( ignoreTargets ) + { + std::vector ignoreTargetsVector; + cmSystemTools::ExpandListArgument(ignoreTargets,ignoreTargetsVector); + std::vector::iterator itvIt; + for ( itvIt = ignoreTargetsVector.begin(); + itvIt != ignoreTargetsVector.end(); + ++ itvIt ) + { + ignoreTargetsSet.insert(itvIt->c_str()); + } + } + + str << graphType << " " << graphName << " {" << std::endl; + str << graphHeader << std::endl; + + const cmGlobalGenerator* gg = this->GetGlobalGenerator(); + const std::vector& localGenerators = + gg->GetLocalGenerators(); + std::vector::const_iterator lit; + // for target deps + // 1 - cmake target + // 2 - external target + // 0 - no deps + std::map targetDeps; + std::map targetPtrs; + std::map targetNamesNodes; + int cnt = 0; + // First pass get the list of all cmake targets + for ( lit = localGenerators.begin(); lit != localGenerators.end(); ++ lit ) + { + const cmTargets* targets = &((*lit)->GetMakefile()->GetTargets()); + cmTargets::const_iterator tit; + for ( tit = targets->begin(); tit != targets->end(); ++ tit ) + { + const char* realTargetName = tit->first.c_str(); + if ( ignoreTargetsSet.find(realTargetName) != ignoreTargetsSet.end() ) + { + // Skip ignored targets + continue; + } + //std::cout << "Found target: " << tit->first.c_str() << std::endl; + cmOStringStream ostr; + ostr << graphNodePrefix << cnt++; + targetNamesNodes[realTargetName] = ostr.str(); + targetPtrs[realTargetName] = &tit->second; + } + } + // Ok, now find all the stuff we link to that is not in cmake + for ( lit = localGenerators.begin(); lit != localGenerators.end(); ++ lit ) + { + const cmTargets* targets = &((*lit)->GetMakefile()->GetTargets()); + cmTargets::const_iterator tit; + for ( tit = targets->begin(); tit != targets->end(); ++ tit ) + { + const cmTarget::LinkLibraryVectorType* ll + = &(tit->second.GetOriginalLinkLibraries()); + cmTarget::LinkLibraryVectorType::const_iterator llit; + const char* realTargetName = tit->first.c_str(); + if ( ignoreTargetsSet.find(realTargetName) != ignoreTargetsSet.end() ) + { + // Skip ignored targets + continue; + } + if ( ll->size() > 0 ) + { + targetDeps[realTargetName] = 1; + } + for ( llit = ll->begin(); llit != ll->end(); ++ llit ) + { + const char* libName = llit->first.c_str(); + std::map::const_iterator tarIt + = targetNamesNodes.find(libName); + if ( ignoreTargetsSet.find(libName) != ignoreTargetsSet.end() ) + { + // Skip ignored targets + continue; + } + if ( tarIt == targetNamesNodes.end() ) + { + cmOStringStream ostr; + ostr << graphNodePrefix << cnt++; + targetDeps[libName] = 2; + targetNamesNodes[libName] = ostr.str(); + //str << " \"" << ostr.c_str() << "\" [ label=\"" << libName + //<< "\" shape=\"ellipse\"];" << std::endl; + } + else + { + std::map::const_iterator depIt + = targetDeps.find(libName); + if ( depIt == targetDeps.end() ) + { + targetDeps[libName] = 1; + } + } + } + } + } + + // Write out nodes + std::map::const_iterator depIt; + for ( depIt = targetDeps.begin(); depIt != targetDeps.end(); ++ depIt ) + { + const char* newTargetName = depIt->first.c_str(); + std::map::const_iterator tarIt + = targetNamesNodes.find(newTargetName); + if ( tarIt == targetNamesNodes.end() ) + { + // We should not be here. + std::cout << __LINE__ << " Cannot find library: " << newTargetName + << " even though it was added in the previous pass" << std::endl; + abort(); + } + + str << " \"" << tarIt->second.c_str() << "\" [ label=\"" + << newTargetName << "\" shape=\""; + if ( depIt->second == 1 ) + { + std::map::const_iterator tarTypeIt = + targetPtrs.find(newTargetName); + if ( tarTypeIt == targetPtrs.end() ) + { + // We should not be here. + std::cout << __LINE__ << " Cannot find library: " << newTargetName + << " even though it was added in the previous pass" << std::endl; + abort(); + } + const cmTarget* tg = tarTypeIt->second; + switch ( tg->GetType() ) + { + case cmTarget::EXECUTABLE: + str << "house"; + break; + case cmTarget::STATIC_LIBRARY: + str << "diamond"; + break; + case cmTarget::SHARED_LIBRARY: + str << "polygon"; + break; + case cmTarget::MODULE_LIBRARY: + str << "octagon"; + break; + default: + str << "box"; + } + } + else + { + str << "ellipse"; + } + str << "\"];" << std::endl; + } + + // Now generate the connectivity + for ( lit = localGenerators.begin(); lit != localGenerators.end(); ++ lit ) + { + const cmTargets* targets = &((*lit)->GetMakefile()->GetTargets()); + cmTargets::const_iterator tit; + for ( tit = targets->begin(); tit != targets->end(); ++ tit ) + { + std::map::iterator dependIt + = targetDeps.find(tit->first.c_str()); + if ( dependIt == targetDeps.end() ) + { + continue; + } + std::map::iterator cmakeTarIt + = targetNamesNodes.find(tit->first.c_str()); + const cmTarget::LinkLibraryVectorType* ll + = &(tit->second.GetOriginalLinkLibraries()); + cmTarget::LinkLibraryVectorType::const_iterator llit; + for ( llit = ll->begin(); llit != ll->end(); ++ llit ) + { + const char* libName = llit->first.c_str(); + std::map::const_iterator tarIt + = targetNamesNodes.find(libName); + if ( tarIt == targetNamesNodes.end() ) + { + // We should not be here. + std::cout << __LINE__ << " Cannot find library: " << libName + << " even though it was added in the previous pass" << std::endl; + abort(); + } + str << " \"" << cmakeTarIt->second.c_str() << "\" -> \"" + << tarIt->second.c_str() << "\"" << std::endl; + } + } + } + + // TODO: Use dotted or something for external libraries + //str << " \"node0\":f4 -> \"node12\"[color=\"#0000ff\" style=dotted]" + //<< std::endl; + // + str << "}" << std::endl; +} + +//---------------------------------------------------------------------------- +#ifdef CMAKE_BUILD_WITH_CMAKE +int cmake::ExecuteEchoColor(std::vector& args) +{ + // The arguments are + // argv[0] == + // argv[1] == cmake_echo_color + + bool enabled = true; + int color = cmsysTerminal_Color_Normal; + bool newline = true; + for(unsigned int i=2; i < args.size(); ++i) + { + if(args[i].find("--switch=") == 0) + { + // Enable or disable color based on the switch value. + std::string value = args[i].substr(9); + if(!value.empty()) + { + if(cmSystemTools::IsOn(value.c_str())) + { + enabled = true; + } + else + { + enabled = false; + } + } + } + else if(args[i] == "--normal") + { + color = cmsysTerminal_Color_Normal; + } + else if(args[i] == "--black") + { + color = cmsysTerminal_Color_ForegroundBlack; + } + else if(args[i] == "--red") + { + color = cmsysTerminal_Color_ForegroundRed; + } + else if(args[i] == "--green") + { + color = cmsysTerminal_Color_ForegroundGreen; + } + else if(args[i] == "--yellow") + { + color = cmsysTerminal_Color_ForegroundYellow; + } + else if(args[i] == "--blue") + { + color = cmsysTerminal_Color_ForegroundBlue; + } + else if(args[i] == "--magenta") + { + color = cmsysTerminal_Color_ForegroundMagenta; + } + else if(args[i] == "--cyan") + { + color = cmsysTerminal_Color_ForegroundCyan; + } + else if(args[i] == "--white") + { + color = cmsysTerminal_Color_ForegroundWhite; + } + else if(args[i] == "--bold") + { + color |= cmsysTerminal_Color_ForegroundBold; + } + else if(args[i] == "--no-newline") + { + newline = false; + } + else if(args[i] == "--newline") + { + newline = true; + } + else + { + // Color is enabled. Print with the current color. + cmSystemTools::MakefileColorEcho(color, args[i].c_str(), + newline, enabled); + } + } + + return 0; +} +#else +int cmake::ExecuteEchoColor(std::vector&) +{ + return 1; +} +#endif + +//---------------------------------------------------------------------------- +int cmake::ExecuteLinkScript(std::vector& args) +{ + // The arguments are + // argv[0] == + // argv[1] == cmake_link_script + // argv[2] == + // argv[3] == --verbose=? + bool verbose = false; + if(args.size() >= 4) + { + if(args[3].find("--verbose=") == 0) + { + if(!cmSystemTools::IsOff(args[3].substr(10).c_str())) + { + verbose = true; + } + } + } + + // Allocate a process instance. + cmsysProcess* cp = cmsysProcess_New(); + if(!cp) + { + std::cerr << "Error allocating process instance in link script." + << std::endl; + return 1; + } + + // Children should share stdout and stderr with this process. + cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDOUT, 1); + cmsysProcess_SetPipeShared(cp, cmsysProcess_Pipe_STDERR, 1); + + // Run the command lines verbatim. + cmsysProcess_SetOption(cp, cmsysProcess_Option_Verbatim, 1); + + // Read command lines from the script. + std::ifstream fin(args[2].c_str()); + if(!fin) + { + std::cerr << "Error opening link script \"" + << args[2] << "\"" << std::endl; + return 1; + } + + // Run one command at a time. + std::string command; + int result = 0; + while(result == 0 && cmSystemTools::GetLineFromStream(fin, command)) + { + // Setup this command line. + const char* cmd[2] = {command.c_str(), 0}; + cmsysProcess_SetCommand(cp, cmd); + + // Report the command if verbose output is enabled. + if(verbose) + { + std::cout << command << std::endl; + } + + // Run the command and wait for it to exit. + cmsysProcess_Execute(cp); + cmsysProcess_WaitForExit(cp, 0); + + // Report failure if any. + switch(cmsysProcess_GetState(cp)) + { + case cmsysProcess_State_Exited: + { + int value = cmsysProcess_GetExitValue(cp); + if(value != 0) + { + result = value; + } + } + break; + case cmsysProcess_State_Exception: + std::cerr << "Error running link command: " + << cmsysProcess_GetExceptionString(cp) << std::endl; + result = 1; + break; + case cmsysProcess_State_Error: + std::cerr << "Error running link command: " + << cmsysProcess_GetErrorString(cp) << std::endl; + result = 2; + break; + default: + break; + }; + } + + // Free the process instance. + cmsysProcess_Delete(cp); + + // Return the final resulting return value. + return result; +} + +void cmake::DefineProperties(cmake *cm) +{ + cm->DefineProperty + ("REPORT_UNDEFINED_PROPERTIES", cmProperty::GLOBAL, + "If set, report any undefined properties to this file.", + "If this property is set to a filename then when CMake runs " + "it will report any properties or variables that were accessed " + "but not defined into the filename specified in this property." + ); + + cm->DefineProperty + ("TARGET_SUPPORTS_SHARED_LIBS", cmProperty::GLOBAL, + "Does the target platform support shared libraries.", + "TARGET_SUPPORTS_SHARED_LIBS is a boolean specifying whether the target " + "platform supports shared libraries. Basically all current general " + "general purpose OS do so, the exception are usually embedded systems " + "with no or special OSs."); + + cm->DefineProperty + ("TARGET_ARCHIVES_MAY_BE_SHARED_LIBS", cmProperty::GLOBAL, + "Set if shared libraries may be named like archives.", + "On AIX shared libraries may be named \"lib.a\". " + "This property is set to true on such platforms."); + + cm->DefineProperty + ("FIND_LIBRARY_USE_LIB64_PATHS", cmProperty::GLOBAL, + "Whether FIND_LIBRARY should automatically search lib64 directories.", + "FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the " + "FIND_LIBRARY command should automatically search the lib64 variant of " + "directories called lib in the search path when building 64-bit " + "binaries."); + cm->DefineProperty + ("ENABLED_FEATURES", cmProperty::GLOBAL, + "List of features which are enabled during the CMake run.", + "List of features which are enabled during the CMake run. Be default " + "it contains the names of all packages which were found. This is " + "determined using the _FOUND variables. Packages which are " + "searched QUIET are not listed. A project can add its own features to " + "this list.This property is used by the macros in FeatureSummary.cmake."); + cm->DefineProperty + ("DISABLED_FEATURES", cmProperty::GLOBAL, + "List of features which are disabled during the CMake run.", + "List of features which are disabled during the CMake run. Be default " + "it contains the names of all packages which were not found. This is " + "determined using the _FOUND variables. Packages which are " + "searched QUIET are not listed. A project can add its own features to " + "this list.This property is used by the macros in FeatureSummary.cmake."); + cm->DefineProperty + ("PACKAGES_FOUND", cmProperty::GLOBAL, + "List of packages which were found during the CMake run.", + "List of packages which were found during the CMake run. Whether a " + "package has been found is determined using the _FOUND variables."); + cm->DefineProperty + ("PACKAGES_NOT_FOUND", cmProperty::GLOBAL, + "List of packages which were not found during the CMake run.", + "List of packages which were not found during the CMake run. Whether a " + "package has been found is determined using the _FOUND variables."); + + cm->DefineProperty + ("PACKAGES_NOT_FOUND", cmProperty::GLOBAL, + "List of packages which were not found during the CMake run.", + "List of packages which were not found during the CMake run. Whether a " + "package has been found is determined using the _FOUND variables."); + cm->DefineProperty( + "__CMAKE_DELETE_CACHE_CHANGE_VARS_", cmProperty::GLOBAL, + "Internal property", + "Used to detect compiler changes, Do not set."); + + cm->DefineProperty( + "GLOBAL_DEPENDS_DEBUG_MODE", cmProperty::GLOBAL, + "Enable global target dependency graph debug mode.", + "CMake automatically analyzes the global inter-target dependency graph " + "at the beginning of native build system generation. " + "This property causes it to display details of its analysis to stderr."); + + cm->DefineProperty( + "ALLOW_DUPLICATE_CUSTOM_TARGETS", cmProperty::GLOBAL, + "Allow duplicate custom targets to be created.", + "Normally CMake requires that all targets built in a project have " + "globally unique logical names (see policy CMP0002). " + "This is necessary to generate meaningful project file names in " + "Xcode and VS IDE generators. " + "It also allows the target names to be referenced unambiguously.\n" + "Makefile generators are capable of supporting duplicate custom target " + "names. " + "For projects that care only about Makefile generators and do " + "not wish to support Xcode or VS IDE generators, one may set this " + "property to true to allow duplicate custom targets. " + "The property allows multiple add_custom_target command calls in " + "different directories to specify the same target name. " + "However, setting this property will cause non-Makefile generators " + "to produce an error and refuse to generate the project." + ); + + cm->DefineProperty + ("IN_TRY_COMPILE", cmProperty::GLOBAL, + "Read-only property that is true during a try-compile configuration.", + "True when building a project inside a TRY_COMPILE or TRY_RUN command."); + + // ================================================================ + // define variables as well + // ================================================================ + cmDocumentVariables::DefineVariables(cm); +} + + +void cmake::DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + bool chained, const char *docSection) +{ + this->PropertyDefinitions[scope].DefineProperty(name,scope,ShortDescription, + FullDescription, + docSection, + chained); +} + +cmPropertyDefinition *cmake +::GetPropertyDefinition(const char *name, + cmProperty::ScopeType scope) +{ + if (this->IsPropertyDefined(name,scope)) + { + return &(this->PropertyDefinitions[scope][name]); + } + return 0; +} + +void cmake::RecordPropertyAccess(const char *name, + cmProperty::ScopeType scope) +{ + this->AccessedProperties.insert + (std::pair(name,scope)); +} + +void cmake::ReportUndefinedPropertyAccesses(const char *filename) +{ + FILE *progFile = fopen(filename,"w"); + if (!progFile || !this->GlobalGenerator) + { + return; + } + + // what are the enabled languages? + std::vector enLangs; + this->GlobalGenerator->GetEnabledLanguages(enLangs); + + // Common configuration names. + // TODO: Compute current configuration(s). + std::vector enConfigs; + enConfigs.push_back(""); + enConfigs.push_back("DEBUG"); + enConfigs.push_back("RELEASE"); + enConfigs.push_back("MINSIZEREL"); + enConfigs.push_back("RELWITHDEBINFO"); + + // take all the defined properties and add definitions for all the enabled + // languages + std::set > aliasedProperties; + std::map::iterator i; + i = this->PropertyDefinitions.begin(); + for (;i != this->PropertyDefinitions.end(); ++i) + { + cmPropertyDefinitionMap::iterator j; + for (j = i->second.begin(); j != i->second.end(); ++j) + { + // TODO: What if both and appear? + if (j->first.find("") != std::string::npos) + { + std::vector::const_iterator k; + for (k = enConfigs.begin(); k != enConfigs.end(); ++k) + { + std::string tmp = j->first; + cmSystemTools::ReplaceString(tmp, "", k->c_str()); + // add alias + aliasedProperties.insert + (std::pair(tmp,i->first)); + } + } + if (j->first.find("") != std::string::npos) + { + std::vector::const_iterator k; + for (k = enLangs.begin(); k != enLangs.end(); ++k) + { + std::string tmp = j->first; + cmSystemTools::ReplaceString(tmp, "", k->c_str()); + // add alias + aliasedProperties.insert + (std::pair(tmp,i->first)); + } + } + } + } + + std::set >::const_iterator ap; + ap = this->AccessedProperties.begin(); + for (;ap != this->AccessedProperties.end(); ++ap) + { + if (!this->IsPropertyDefined(ap->first.c_str(),ap->second) && + aliasedProperties.find(std::pair + (ap->first,ap->second)) == + aliasedProperties.end()) + { + const char *scopeStr = ""; + switch (ap->second) + { + case cmProperty::TARGET: + scopeStr = "TARGET"; + break; + case cmProperty::SOURCE_FILE: + scopeStr = "SOURCE_FILE"; + break; + case cmProperty::DIRECTORY: + scopeStr = "DIRECTORY"; + break; + case cmProperty::TEST: + scopeStr = "TEST"; + break; + case cmProperty::VARIABLE: + scopeStr = "VARIABLE"; + break; + case cmProperty::CACHED_VARIABLE: + scopeStr = "CACHED_VARIABLE"; + break; + default: + scopeStr = "unknown"; + break; + } + fprintf(progFile,"%s with scope %s\n",ap->first.c_str(),scopeStr); + } + } + fclose(progFile); +} + +bool cmake::IsPropertyDefined(const char *name, cmProperty::ScopeType scope) +{ + return this->PropertyDefinitions[scope].IsPropertyDefined(name); +} + +bool cmake::IsPropertyChained(const char *name, cmProperty::ScopeType scope) +{ + return this->PropertyDefinitions[scope].IsPropertyChained(name); +} + +void cmake::SetProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + if (!value) + { + value = "NOTFOUND"; + } + + this->Properties.SetProperty(prop, value, cmProperty::GLOBAL); +} + +void cmake::AppendProperty(const char* prop, const char* value) +{ + if (!prop) + { + return; + } + this->Properties.AppendProperty(prop, value, cmProperty::GLOBAL); +} + +const char *cmake::GetProperty(const char* prop) +{ + return this->GetProperty(prop, cmProperty::GLOBAL); +} + +const char *cmake::GetProperty(const char* prop, cmProperty::ScopeType scope) +{ + bool chain = false; + + // watch for special properties + std::string propname = prop; + std::string output = ""; + if ( propname == "CACHE_VARIABLES" ) + { + cmCacheManager::CacheIterator cit = + this->GetCacheManager()->GetCacheIterator(); + for ( cit.Begin(); !cit.IsAtEnd(); cit.Next() ) + { + if ( output.size() ) + { + output += ";"; + } + output += cit.GetName(); + } + this->SetProperty("CACHE_VARIABLES", output.c_str()); + } + else if ( propname == "COMMANDS" ) + { + cmake::RegisteredCommandsMap::iterator cmds + = this->GetCommands()->begin(); + for (unsigned int cc=0 ; cmds != this->GetCommands()->end(); ++ cmds ) + { + if ( cc > 0 ) + { + output += ";"; + } + output += cmds->first.c_str(); + cc++; + } + this->SetProperty("COMMANDS",output.c_str()); + } + else if ( propname == "IN_TRY_COMPILE" ) + { + this->SetProperty("IN_TRY_COMPILE", + this->GetIsInTryCompile()? "1":"0"); + } + return this->Properties.GetPropertyValue(prop, scope, chain); +} + +bool cmake::GetPropertyAsBool(const char* prop) +{ + return cmSystemTools::IsOn(this->GetProperty(prop)); +} + +int cmake::GetSystemInformation(std::vector& args) +{ + // so create the directory + std::string resultFile; + std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); + std::string destPath = cwd + "/__cmake_systeminformation"; + cmSystemTools::RemoveADirectory(destPath.c_str()); + if (!cmSystemTools::MakeDirectory(destPath.c_str())) + { + std::cerr << "Error: --system-information must be run from a " + "writable directory!\n"; + return 1; + } + + // process the arguments + bool writeToStdout = true; + for(unsigned int i=1; i < args.size(); ++i) + { + std::string arg = args[i]; + if(arg.find("-V",0) == 0) + { + this->Verbose = true; + } + else if(arg.find("-G",0) == 0) + { + std::string value = arg.substr(2); + if(value.size() == 0) + { + ++i; + if(i >= args.size()) + { + cmSystemTools::Error("No generator specified for -G"); + return -1; + } + value = args[i]; + } + cmGlobalGenerator* gen = + this->CreateGlobalGenerator(value.c_str()); + if(!gen) + { + cmSystemTools::Error("Could not create named generator ", + value.c_str()); + } + else + { + this->SetGlobalGenerator(gen); + } + } + // no option assume it is the output file + else + { + if (!cmSystemTools::FileIsFullPath(arg.c_str())) + { + resultFile = cwd; + resultFile += "/"; + } + resultFile += arg; + writeToStdout = false; + } + } + + + // we have to find the module directory, so we can copy the files + this->AddCMakePaths(); + std::string modulesPath = + this->CacheManager->GetCacheValue("CMAKE_ROOT"); + modulesPath += "/Modules"; + std::string inFile = modulesPath; + inFile += "/SystemInformation.cmake"; + std::string outFile = destPath; + outFile += "/CMakeLists.txt"; + + // Copy file + if(!cmSystemTools::cmCopyFile(inFile.c_str(), outFile.c_str())) + { + std::cerr << "Error copying file \"" << inFile.c_str() + << "\" to \"" << outFile.c_str() << "\".\n"; + return 1; + } + + // do we write to a file or to stdout? + if (resultFile.size() == 0) + { + resultFile = cwd; + resultFile += "/__cmake_systeminformation/results.txt"; + } + + // now run cmake on the CMakeLists file + cmSystemTools::ChangeDirectory(destPath.c_str()); + std::vector args2; + args2.push_back(args[0]); + args2.push_back(destPath); + std::string resultArg = "-DRESULT_FILE="; + resultArg += resultFile; + args2.push_back(resultArg); + int res = this->Run(args2, false); + + if (res != 0) + { + std::cerr << "Error: --system-information failed on internal CMake!\n"; + return res; + } + + // change back to the original directory + cmSystemTools::ChangeDirectory(cwd.c_str()); + + // echo results to stdout if needed + if (writeToStdout) + { + FILE* fin = fopen(resultFile.c_str(), "r"); + if(fin) + { + const int bufferSize = 4096; + char buffer[bufferSize]; + size_t n; + while((n = fread(buffer, 1, bufferSize, fin)) > 0) + { + for(char* c = buffer; c < buffer+n; ++c) + { + putc(*c, stdout); + } + fflush(stdout); + } + fclose(fin); + } + } + + // clean up the directory + cmSystemTools::RemoveADirectory(destPath.c_str()); + return 0; +} + +//---------------------------------------------------------------------------- +static bool cmakeCheckStampFile(const char* stampName) +{ + // If the stamp file still exists then it must really be out of + // date. + if(cmSystemTools::FileExists(stampName)) + { + // Notify the user why CMake is re-running. It is safe to + // just print to stdout here because this code is only reachable + // through an undocumented flag used by the VS generator. + std::cout << "CMake is re-running due to explicit user request.\n"; + return false; + } + + // The stamp file does not exist. Use the stamp dependencies to + // determine whether it is really out of date. This works in + // conjunction with cmLocalVisualStudio7Generator to avoid + // repeatedly re-running CMake when the user rebuilds the entire + // solution. + std::string stampDepends = stampName; + stampDepends += ".depend"; +#if defined(_WIN32) || defined(__CYGWIN__) + std::ifstream fin(stampDepends.c_str(), std::ios::in | std::ios::binary); +#else + std::ifstream fin(stampDepends.c_str(), std::ios::in); +#endif + if(!fin) + { + // The stamp dependencies file cannot be read. Just assume the + // build system is really out of date. + return false; + } + + // Compare the stamp dependencies against the dependency file itself. + cmFileTimeComparison ftc; + std::string dep; + while(cmSystemTools::GetLineFromStream(fin, dep)) + { + int result; + if(dep.length() >= 1 && dep[0] != '#' && + (!ftc.FileTimeCompare(stampDepends.c_str(), dep.c_str(), &result) + || result < 0)) + { + // The stamp depends file is older than this dependency. The + // build system is really out of date. + return false; + } + } + + // The build system is up to date. The stamp file has been removed + // by the VS IDE due to a "rebuild" request. Just restore it. + std::ofstream stamp(stampName); + stamp << "# CMake generation timestamp file this directory.\n"; + if(stamp) + { + // Notify the user why CMake is not re-running. It is safe to + // just print to stdout here because this code is only reachable + // through an undocumented flag used by the VS generator. + std::cout << "CMake does not need to re-run because " + << stampName << " is up-to-date.\n"; + return true; + } + else + { + cmSystemTools::Error("Cannot restore timestamp ", stampName); + return false; + } +} + +//---------------------------------------------------------------------------- +static bool cmakeCheckStampList(const char* stampList) +{ + // If the stamp list does not exist CMake must rerun to generate it. + if(!cmSystemTools::FileExists(stampList)) + { + std::cout << "CMake is re-running because generate.stamp.list " + << "is missing.\n"; + return false; + } + std::ifstream fin(stampList); + if(!fin) + { + std::cout << "CMake is re-running because generate.stamp.list " + << "could not be read.\n"; + return false; + } + + // Check each stamp. + std::string stampName; + while(cmSystemTools::GetLineFromStream(fin, stampName)) + { + if(!cmakeCheckStampFile(stampName.c_str())) + { + return false; + } + } + return true; +} + +// For visual studio 2005 and newer manifest files need to be embeded into +// exe and dll's. This code does that in such a way that incremental linking +// still works. +int cmake::VisualStudioLink(std::vector& args, int type) +{ + if(args.size() < 2) + { + return -1; + } + bool verbose = false; + if(cmSystemTools::GetEnv("VERBOSE")) + { + verbose = true; + } + std::vector expandedArgs; + for(std::vector::iterator i = args.begin(); + i != args.end(); ++i) + { + // check for nmake temporary files + if((*i)[0] == '@') + { + std::ifstream fin(i->substr(1).c_str()); + std::string line; + while(cmSystemTools::GetLineFromStream(fin, + line)) + { + cmSystemTools::ParseWindowsCommandLine(line.c_str(), expandedArgs); + } + } + else + { + expandedArgs.push_back(*i); + } + } + // figure out if this is an incremental link or not and run the correct + // link function. + for(std::vector::iterator i = expandedArgs.begin(); + i != expandedArgs.end(); ++i) + { + if(cmSystemTools::Strucmp(i->c_str(), "/INCREMENTAL:YES") == 0) + { + if(verbose) + { + std::cout << "Visual Studio Incremental Link\n"; + } + return cmake::VisualStudioLinkIncremental(expandedArgs, type, verbose); + } + } + if(verbose) + { + std::cout << "Visual Studio Non-Incremental Link\n"; + } + return cmake::VisualStudioLinkNonIncremental(expandedArgs, type, verbose); +} + +int cmake::ParseVisualStudioLinkCommand(std::vector& args, + std::vector& command, + std::string& targetName) +{ + std::vector::iterator i = args.begin(); + i++; // skip -E + i++; // skip vs_link_dll or vs_link_exe + command.push_back(*i); + i++; // move past link command + for(; i != args.end(); ++i) + { + command.push_back(*i); + if(i->find("/Fe") == 0) + { + targetName = i->substr(3); + } + if(i->find("/out:") == 0) + { + targetName = i->substr(5); + } + } + if(targetName.size() == 0 || command.size() == 0) + { + return -1; + } + return 0; +} + +bool cmake::RunCommand(const char* comment, + std::vector& command, + bool verbose, + int* retCodeOut) +{ + if(verbose) + { + std::cout << comment << ":\n"; + for(std::vector::iterator i = command.begin(); + i != command.end(); ++i) + { + std::cout << i->c_str() << " "; + } + std::cout << "\n"; + } + std::string output; + int retCode =0; + // use rc command to create .res file + cmSystemTools::RunSingleCommand(command, + &output, + &retCode, 0, false); + // always print the output of the command, unless + // it is the dumb rc command banner, but if the command + // returned an error code then print the output anyway as + // the banner may be mixed with some other important information. + if(output.find("Resource Compiler Version") == output.npos + || retCode !=0) + { + std::cout << output; + } + // if retCodeOut is requested then always return true + // and set the retCodeOut to retCode + if(retCodeOut) + { + *retCodeOut = retCode; + return true; + } + if(retCode != 0) + { + std::cout << comment << " failed. with " << retCode << "\n"; + } + return retCode == 0; +} + +int cmake::VisualStudioLinkIncremental(std::vector& args, + int type, bool verbose) +{ + // This follows the steps listed here: + // http://blogs.msdn.com/zakramer/archive/2006/05/22/603558.aspx + + // 1. Compiler compiles the application and generates the *.obj files. + // 2. An empty manifest file is generated if this is a clean build and if + // not the previous one is reused. + // 3. The resource compiler (rc.exe) compiles the *.manifest file to a + // *.res file. + // 4. Linker generates the binary (EXE or DLL) with the /incremental + // switch and embeds the dummy manifest file. The linker also generates + // the real manifest file based on the binaries that your binary depends + // on. + // 5. The manifest tool (mt.exe) is then used to generate the final + // manifest. + + // If the final manifest is changed, then 6 and 7 are run, if not + // they are skipped, and it is done. + + // 6. The resource compiler is invoked one more time. + // 7. Finally, the Linker does another incremental link, but since the + // only thing that has changed is the *.res file that contains the + // manifest it is a short link. + std::vector linkCommand; + std::string targetName; + if(cmake::ParseVisualStudioLinkCommand(args, linkCommand, targetName) == -1) + { + return -1; + } + std::string manifestArg = "/MANIFESTFILE:"; + std::vector rcCommand; + rcCommand.push_back(cmSystemTools::FindProgram("rc.exe")); + std::vector mtCommand; + mtCommand.push_back(cmSystemTools::FindProgram("mt.exe")); + std::string tempManifest; + tempManifest = targetName; + tempManifest += ".intermediate.manifest"; + std::string resourceInputFile = targetName; + resourceInputFile += ".resource.txt"; + if(verbose) + { + std::cout << "Create " << resourceInputFile.c_str() << "\n"; + } + // Create input file for rc command + std::ofstream fout(resourceInputFile.c_str()); + if(!fout) + { + return -1; + } + std::string manifestFile = targetName; + manifestFile += ".embed.manifest"; + std::string fullPath= cmSystemTools::CollapseFullPath(manifestFile.c_str()); + fout << type << " /* CREATEPROCESS_MANIFEST_RESOURCE_ID " + "*/ 24 /* RT_MANIFEST */ " << "\"" << fullPath.c_str() << "\""; + fout.close(); + manifestArg += tempManifest; + // add the manifest arg to the linkCommand + linkCommand.push_back(manifestArg); + // if manifestFile is not yet created, create an + // empty one + if(!cmSystemTools::FileExists(manifestFile.c_str())) + { + if(verbose) + { + std::cout << "Create empty: " << manifestFile.c_str() << "\n"; + } + std::ofstream foutTmp(manifestFile.c_str()); + } + std::string resourceFile = manifestFile; + resourceFile += ".res"; + // add the resource file to the end of the link command + linkCommand.push_back(resourceFile); + std::string outputOpt = "/fo"; + outputOpt += resourceFile; + rcCommand.push_back(outputOpt); + rcCommand.push_back(resourceInputFile); + // Run rc command to create resource + if(!cmake::RunCommand("RC Pass 1", rcCommand, verbose)) + { + return -1; + } + // Now run the link command to link and create manifest + if(!cmake::RunCommand("LINK Pass 1", linkCommand, verbose)) + { + return -1; + } + // create mt command + std::string outArg("/out:"); + outArg+= manifestFile; + mtCommand.push_back("/nologo"); + mtCommand.push_back(outArg); + mtCommand.push_back("/notify_update"); + mtCommand.push_back("/manifest"); + mtCommand.push_back(tempManifest); + // now run mt.exe to create the final manifest file + int mtRet =0; + cmake::RunCommand("MT", mtCommand, verbose, &mtRet); + // if mt returns 0, then the manifest was not changed and + // we do not need to do another link step + if(mtRet == 0) + { + return 0; + } + // check for magic mt return value if mt returns the magic number + // 1090650113 then it means that it updated the manifest file and we need + // to do the final link. If mt has any value other than 0 or 1090650113 + // then there was some problem with the command itself and there was an + // error so return the error code back out of cmake so make can report it. + if(mtRet != 1090650113) + { + return mtRet; + } + // update the resource file with the new manifest from the mt command. + if(!cmake::RunCommand("RC Pass 2", rcCommand, verbose)) + { + return -1; + } + // Run the final incremental link that will put the new manifest resource + // into the file incrementally. + if(!cmake::RunCommand("FINAL LINK", linkCommand, verbose)) + { + return -1; + } + return 0; +} + +int cmake::VisualStudioLinkNonIncremental(std::vector& args, + int type, + bool verbose) +{ + std::vector linkCommand; + std::string targetName; + if(cmake::ParseVisualStudioLinkCommand(args, linkCommand, targetName) == -1) + { + return -1; + } + // Run the link command as given + if(!cmake::RunCommand("LINK", linkCommand, verbose)) + { + return -1; + } + std::vector mtCommand; + mtCommand.push_back(cmSystemTools::FindProgram("mt.exe")); + mtCommand.push_back("/nologo"); + mtCommand.push_back("/manifest"); + std::string manifestFile = targetName; + manifestFile += ".manifest"; + mtCommand.push_back(manifestFile); + std::string outresource = "/outputresource:"; + outresource += targetName; + outresource += ";#"; + if(type == 1) + { + outresource += "1"; + } + else if(type == 2) + { + outresource += "2"; + } + mtCommand.push_back(outresource); + // Now use the mt tool to embed the manifest into the exe or dll + if(!cmake::RunCommand("MT", mtCommand, verbose)) + { + return -1; + } + return 0; +} + +//---------------------------------------------------------------------------- +void cmake::IssueMessage(cmake::MessageType t, std::string const& text, + cmListFileBacktrace const& backtrace) +{ + cmOStringStream msg; + bool isError = false; + // Construct the message header. + if(t == cmake::FATAL_ERROR) + { + isError = true; + msg << "CMake Error"; + } + else if(t == cmake::INTERNAL_ERROR) + { + isError = true; + msg << "CMake Internal Error (please report a bug)"; + } + else + { + msg << "CMake Warning"; + if(t == cmake::AUTHOR_WARNING) + { + // Allow suppression of these warnings. + cmCacheManager::CacheIterator it = this->CacheManager + ->GetCacheIterator("CMAKE_SUPPRESS_DEVELOPER_WARNINGS"); + if(!it.IsAtEnd() && it.GetValueAsBool()) + { + return; + } + msg << " (dev)"; + } + } + + // Add the immediate context. + cmListFileBacktrace::const_iterator i = backtrace.begin(); + if(i != backtrace.end()) + { + cmListFileContext const& lfc = *i; + msg << (lfc.Line? " at ": " in ") << lfc; + ++i; + } + + // Add the message text. + { + msg << ":\n"; + cmDocumentationFormatterText formatter; + formatter.SetIndent(" "); + formatter.PrintFormatted(msg, text.c_str()); + } + + // Add the rest of the context. + if(i != backtrace.end()) + { + msg << "Call Stack (most recent call first):\n"; + while(i != backtrace.end()) + { + cmListFileContext const& lfc = *i; + msg << " " << lfc << "\n"; + ++i; + } + } + + // Add a note about warning suppression. + if(t == cmake::AUTHOR_WARNING) + { + msg << + "This warning is for project developers. Use -Wno-dev to suppress it."; + } + + // Add a terminating blank line. + msg << "\n"; + + // Output the message. + if(isError) + { + cmSystemTools::SetErrorOccured(); + cmSystemTools::Message(msg.str().c_str(), "Error"); + } + else + { + cmSystemTools::Message(msg.str().c_str(), "Warning"); + } +} diff --git a/Source/cmake.h b/Source/cmake.h new file mode 100644 index 000000000..767fac1d8 --- /dev/null +++ b/Source/cmake.h @@ -0,0 +1,498 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmake.h,v $ + Language: C++ + Date: $Date: 2008-05-01 16:35:40 $ + Version: $Revision: 1.109.2.4 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// This class represents a cmake invocation. It is the top level class when +// running cmake. Most cmake based GUIS should primarily create an instance +// of this class and communicate with it. +// +// The basic process for a GUI is as follows: +// +// 1) Create a cmake instance +// 2) Set the Home & Start directories, generator, and cmake command. this +// can be done using the Set methods or by using SetArgs and passing in +// command line arguments. +// 3) Load the cache by calling LoadCache (duh) +// 4) if you are using command line arguments with -D or -C flags then +// call SetCacheArgs (or if for some other reason you want to modify the +// cache, do it now. +// 5) Finally call Configure +// 6) Let the user change values and go back to step 5 +// 7) call Generate +// +// If your GUI allows the user to change the start & home directories then +// you must at a minimum redo steps 2 through 7. +// + + +#ifndef cmake_h +#define cmake_h + +#include "cmSystemTools.h" +#include "cmPropertyDefinitionMap.h" +#include "cmPropertyMap.h" + +class cmGlobalGenerator; +class cmLocalGenerator; +class cmCacheManager; +class cmMakefile; +class cmCommand; +class cmVariableWatch; +class cmFileTimeComparison; +class cmExternalMakefileProjectGenerator; +class cmDocumentationSection; +class cmPolicies; +class cmListFileBacktrace; + +class cmake +{ + public: + enum MessageType + { AUTHOR_WARNING, + FATAL_ERROR, + INTERNAL_ERROR, + MESSAGE, + WARNING, + LOG + }; + typedef std::map RegisteredCommandsMap; + + ///! construct an instance of cmake + cmake(); + ///! destruct an instance of cmake + ~cmake(); + + ///! construct an instance of cmake + static const char *GetCMakeFilesDirectory() {return "/CMakeFiles";}; + static const char *GetCMakeFilesDirectoryPostSlash() { + return "CMakeFiles/";}; + + //@{ + /** + * Set/Get the home directory (or output directory) in the project. The + * home directory is the top directory of the project. It is where + * cmake was run. Remember that CMake processes + * CMakeLists files by recursing up the tree starting at the StartDirectory + * and going up until it reaches the HomeDirectory. + */ + void SetHomeDirectory(const char* dir); + const char* GetHomeDirectory() const + { + return this->cmHomeDirectory.c_str(); + } + void SetHomeOutputDirectory(const char* lib); + const char* GetHomeOutputDirectory() const + { + return this->HomeOutputDirectory.c_str(); + } + //@} + + //@{ + /** + * Set/Get the start directory (or output directory). The start directory + * is the directory of the CMakeLists.txt file that started the current + * round of processing. Remember that CMake processes CMakeLists files by + * recursing up the tree starting at the StartDirectory and going up until + * it reaches the HomeDirectory. + */ + void SetStartDirectory(const char* dir) + { + this->cmStartDirectory = dir; + cmSystemTools::ConvertToUnixSlashes(this->cmStartDirectory); + } + const char* GetStartDirectory() const + { + return this->cmStartDirectory.c_str(); + } + void SetStartOutputDirectory(const char* lib) + { + this->StartOutputDirectory = lib; + cmSystemTools::ConvertToUnixSlashes(this->StartOutputDirectory); + } + const char* GetStartOutputDirectory() const + { + return this->StartOutputDirectory.c_str(); + } + //@} + + /** + * Dump documentation to a file. If 0 is returned, the + * operation failed. + */ + int DumpDocumentationToFile(std::ostream&); + + /** + * Handle a command line invocation of cmake. + */ + int Run(const std::vector&args) + { return this->Run(args, false); } + int Run(const std::vector&args, bool noconfigure); + + /** + * Run the global generator Generate step. + */ + int Generate(); + + /** + * Configure the cmMakefiles. This routine will create a GlobalGenerator if + * one has not already been set. It will then Call Configure on the + * GlobalGenerator. This in turn will read in an process all the CMakeList + * files for the tree. It will not produce any actual Makefiles, or + * workspaces. Generate does that. */ + int Configure(); + int ActualConfigure(); + + /** + * Configure the cmMakefiles. This routine will create a GlobalGenerator if + * one has not already been set. It will then Call Configure on the + * GlobalGenerator. This in turn will read in an process all the CMakeList + * files for the tree. It will not produce any actual Makefiles, or + * workspaces. Generate does that. */ + int LoadCache(); + void PreLoadCMakeFiles(); + + ///! Create a GlobalGenerator + cmGlobalGenerator* CreateGlobalGenerator(const char* name); + + ///! Return the global generator assigned to this instance of cmake + cmGlobalGenerator* GetGlobalGenerator() { return this->GlobalGenerator; } + ///! Return the global generator assigned to this instance of cmake, const + const cmGlobalGenerator* GetGlobalGenerator() const + { return this->GlobalGenerator; } + + ///! Return the global generator assigned to this instance of cmake + void SetGlobalGenerator(cmGlobalGenerator *); + + ///! Get the names of the current registered generators + void GetRegisteredGenerators(std::vector& names); + + ///! get the cmCachemManager used by this invocation of cmake + cmCacheManager *GetCacheManager() { return this->CacheManager; } + + ///! set the cmake command this instance of cmake should use + void SetCMakeCommand(const char* cmd) { this->CMakeCommand = cmd; } + + /** + * Given a variable name, return its value (as a string). + */ + const char* GetCacheDefinition(const char*) const; + ///! Add an entry into the cache + void AddCacheEntry(const char* key, const char* value, + const char* helpString, + int type); + /** + * Execute commands during the build process. Supports options such + * as echo, remove file etc. + */ + static int ExecuteCMakeCommand(std::vector&); + + /** + * Get the system information and write it to the file specified + */ + int GetSystemInformation(std::vector&); + + /** + * Add a command to this cmake instance + */ + void AddCommand(cmCommand* ); + void RenameCommand(const char* oldName, const char* newName); + void RemoveCommand(const char* name); + void RemoveUnscriptableCommands(); + + /** + * Get a command by its name + */ + cmCommand *GetCommand(const char *name); + + /** Get list of all commands */ + RegisteredCommandsMap* GetCommands() { return &this->Commands; } + + /** Check if a command exists. */ + bool CommandExists(const char* name) const; + + ///! Parse command line arguments + void SetArgs(const std::vector&); + + ///! Is this cmake running as a result of a TRY_COMPILE command + bool GetIsInTryCompile() { return this->InTryCompile; } + + ///! Is this cmake running as a result of a TRY_COMPILE command + void SetIsInTryCompile(bool i) { this->InTryCompile = i; } + + ///! Parse command line arguments that might set cache values + bool SetCacheArgs(const std::vector&); + + typedef void (*ProgressCallbackType) + (const char*msg, float progress, void *); + /** + * Set the function used by GUI's to receive progress updates + * Function gets passed: message as a const char*, a progress + * amount ranging from 0 to 1.0 and client data. The progress + * number provided may be negative in cases where a message is + * to be displayed without any progress percentage. + */ + void SetProgressCallback(ProgressCallbackType f, void* clientData=0); + + ///! this is called by generators to update the progress + void UpdateProgress(const char *msg, float prog); + + ///! get the cmake policies instance + cmPolicies *GetPolicies() {return this->Policies;} ; + + ///! Get the variable watch object + cmVariableWatch* GetVariableWatch() { return this->VariableWatch; } + + /** Get the documentation entries for the supported commands. + * If withCurrentCommands is true, the documentation for the + * recommended set of commands is included. + * If withCompatCommands is true, the documentation for discouraged + * (compatibility) commands is included. + * You probably don't want to set both to false. + */ + void GetCommandDocumentation(std::vector& entries, + bool withCurrentCommands = true, + bool withCompatCommands = true) const; + void GetPropertiesDocumentation(std::map&); + void GetGeneratorDocumentation(std::vector&); + void GetPolicyDocumentation(std::vector& entries); + + ///! Set/Get a property of this target file + void SetProperty(const char *prop, const char *value); + void AppendProperty(const char *prop, const char *value); + const char *GetProperty(const char *prop); + const char *GetProperty(const char *prop, cmProperty::ScopeType scope); + bool GetPropertyAsBool(const char *prop); + + // Get the properties + cmPropertyMap &GetProperties() { return this->Properties; }; + + ///! Do all the checks before running configure + int DoPreConfigureChecks(); + + /** + * Set and get the script mode option. In script mode there is no + * generator and no cache. Also, language are not enabled, so + * add_executable and things do not do anything. + */ + void SetScriptMode(bool mode) { this->ScriptMode = mode; } + bool GetScriptMode() { return this->ScriptMode; } + + ///! Debug the try compile stuff by not delelting the files + bool GetDebugTryCompile(){return this->DebugTryCompile;} + void DebugTryCompileOn(){this->DebugTryCompile = true;} + + /** + * Generate CMAKE_ROOT and CMAKE_COMMAND cache entries + */ + int AddCMakePaths(); + + /** + * Get the file comparison class + */ + cmFileTimeComparison* GetFileComparison() { return this->FileComparison; } + + /** + * Get the path to ctest + */ + const char* GetCTestCommand(); + const char* GetCPackCommand(); + + // Do we want debug output during the cmake run. + bool GetDebugOutput() { return this->DebugOutput; } + void SetDebugOutputOn(bool b) { this->DebugOutput = b;} + + // Define a property + void DefineProperty(const char *name, cmProperty::ScopeType scope, + const char *ShortDescription, + const char *FullDescription, + bool chain = false, + const char *variableGroup = 0); + + // get property definition + cmPropertyDefinition *GetPropertyDefinition + (const char *name, cmProperty::ScopeType scope); + + // Is a property defined? + bool IsPropertyDefined(const char *name, cmProperty::ScopeType scope); + bool IsPropertyChained(const char *name, cmProperty::ScopeType scope); + + // record accesses of properties and variables + void RecordPropertyAccess(const char *name, cmProperty::ScopeType scope); + void ReportUndefinedPropertyAccesses(const char *filename); + + // Define the properties + static void DefineProperties(cmake *cm); + + void SetCMakeEditCommand(const char* s) + { + this->CMakeEditCommand = s; + } + void SetSuppressDevWarnings(bool v) + { + this->SuppressDevWarnings = v; + this->DoSuppressDevWarnings = true; + } + + /** Display a message to the user. */ + void IssueMessage(cmake::MessageType t, std::string const& text, + cmListFileBacktrace const& backtrace); +protected: + void InitializeProperties(); + int HandleDeleteCacheVariables(const char* var); + cmPropertyMap Properties; + std::set > AccessedProperties; + + std::map + PropertyDefinitions; + + typedef + cmExternalMakefileProjectGenerator* (*CreateExtraGeneratorFunctionType)(); + typedef std::map RegisteredExtraGeneratorsMap; + + typedef cmGlobalGenerator* (*CreateGeneratorFunctionType)(); + typedef std::map RegisteredGeneratorsMap; + RegisteredCommandsMap Commands; + RegisteredGeneratorsMap Generators; + RegisteredExtraGeneratorsMap ExtraGenerators; + void AddDefaultCommands(); + void AddDefaultGenerators(); + void AddDefaultExtraGenerators(); + void AddExtraGenerator(const char* name, + CreateExtraGeneratorFunctionType newFunction); + + cmPolicies *Policies; + cmGlobalGenerator *GlobalGenerator; + cmCacheManager *CacheManager; + std::string cmHomeDirectory; + std::string HomeOutputDirectory; + std::string cmStartDirectory; + std::string StartOutputDirectory; + bool SuppressDevWarnings; + bool DoSuppressDevWarnings; + + ///! return true if the same cmake was used to make the cache. + bool CacheVersionMatches(); + ///! read in a cmake list file to initialize the cache + void ReadListFile(const char *path); + + ///! Check if CMAKE_CACHEFILE_DIR is set. If it is not, delete the log file. + /// If it is set, truncate it to 50kb + void TruncateOutputLog(const char* fname); + + /** + * Method called to check build system integrity at build time. + * Returns 1 if CMake should rerun and 0 otherwise. + */ + int CheckBuildSystem(); + + void SetDirectoriesFromFile(const char* arg); + + //! Make sure all commands are what they say they are and there is no + //macros. + void CleanupCommandsAndMacros(); + + void GenerateGraphViz(const char* fileName) const; + + static int ExecuteEchoColor(std::vector& args); + static int ExecuteLinkScript(std::vector& args); + static int VisualStudioLink(std::vector& args, int type); + static int VisualStudioLinkIncremental(std::vector& args, + int type, + bool verbose); + static int VisualStudioLinkNonIncremental(std::vector& args, + int type, + bool verbose); + static int ParseVisualStudioLinkCommand(std::vector& args, + std::vector& command, + std::string& targetName); + static bool RunCommand(const char* comment, + std::vector& command, + bool verbose, + int* retCodeOut = 0); + cmVariableWatch* VariableWatch; + + ///! Find the full path to one of the cmake programs like ctest, cpack, etc. + std::string FindCMakeProgram(const char* name) const; +private: + ProgressCallbackType ProgressCallback; + void* ProgressCallbackClientData; + bool Verbose; + bool InTryCompile; + bool ScriptMode; + bool DebugOutput; + std::string CMakeEditCommand; + std::string CMakeCommand; + std::string CXXEnvironment; + std::string CCEnvironment; + std::string CheckBuildSystemArgument; + std::string CheckStampFile; + std::string CheckStampList; + std::string VSSolutionFile; + std::string CTestCommand; + std::string CPackCommand; + bool ClearBuildSystem; + bool DebugTryCompile; + cmFileTimeComparison* FileComparison; + std::string GraphVizFile; + + void UpdateConversionPathTable(); +}; + +#define CMAKE_STANDARD_OPTIONS_TABLE \ + {"-C ", "Pre-load a script to populate the cache.", \ + "When cmake is first run in an empty build tree, it creates a " \ + "CMakeCache.txt file and populates it with customizable settings " \ + "for the project. This option may be used to specify a file from " \ + "which to load cache entries before the first pass through " \ + "the project's cmake listfiles. The loaded entries take priority " \ + "over the project's default values. The given file should be a CMake " \ + "script containing SET commands that use the CACHE option, " \ + "not a cache-format file."}, \ + {"-D :=", "Create a cmake cache entry.", \ + "When cmake is first run in an empty build tree, it creates a " \ + "CMakeCache.txt file and populates it with customizable settings " \ + "for the project. This option may be used to specify a setting " \ + "that takes priority over the project's default value. The option " \ + "may be repeated for as many cache entries as desired."}, \ + {"-U ", "Remove matching entries from CMake cache.", \ + "This option may be used to remove one or more variables from the " \ + "CMakeCache.txt file, globbing expressions using * and ? are supported. "\ + "The option may be repeated for as many cache entries as desired.\n" \ + "Use with care, you can make your CMakeCache.txt non-working."}, \ + {"-G ", "Specify a makefile generator.", \ + "CMake may support multiple native build systems on certain platforms. " \ + "A makefile generator is responsible for generating a particular build " \ + "system. Possible generator names are specified in the Generators " \ + "section."},\ + {"-Wno-dev", "Suppress developer warnings.",\ + "Suppress warnings that are meant for the author"\ + " of the CMakeLists.txt files."},\ + {"-Wdev", "Enable developer warnings.",\ + "Enable warnings that are meant for the author"\ + " of the CMakeLists.txt files."} + + +#define CMAKE_STANDARD_INTRODUCTION \ + {0, \ + "CMake is a cross-platform build system generator. Projects " \ + "specify their build process with platform-independent CMake listfiles " \ + "included in each directory of a source tree with the name " \ + "CMakeLists.txt. " \ + "Users build a project by using CMake to generate a build system " \ + "for a native tool on their platform.", 0} +#endif diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx new file mode 100644 index 000000000..91e3226df --- /dev/null +++ b/Source/cmakemain.cxx @@ -0,0 +1,512 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmakemain.cxx,v $ + Language: C++ + Date: $Date: 2008-03-11 20:02:10 $ + Version: $Revision: 1.80 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +// include these first, otherwise there will be problems on Windows +// with GetCurrentDirectory() being redefined +#ifdef CMAKE_BUILD_WITH_CMAKE +#include "cmDynamicLoader.h" +#include "cmDocumentation.h" +#endif + +#include "cmake.h" +#include "cmCacheManager.h" +#include "cmListFileCache.h" +#include "cmakewizard.h" +#include "cmSourceFile.h" +#include "cmGlobalGenerator.h" +#include "cmLocalGenerator.h" +#include "cmMakefile.h" + +#ifdef CMAKE_BUILD_WITH_CMAKE +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " cmake - Cross-Platform Makefile Generator.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " cmake [options] \n" + " cmake [options] ", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"cmake\" executable is the CMake command-line interface. It may " + "be used to configure projects in scripts. Project configuration " + "settings " + "may be specified on the command line with the -D option. The -i option " + "will cause cmake to interactively prompt for such settings.", 0}, + CMAKE_STANDARD_INTRODUCTION, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + CMAKE_STANDARD_OPTIONS_TABLE, + {"-E", "CMake command mode.", + "For true platform independence, CMake provides a list of commands " + "that can be used on all systems. Run with -E help for the usage " + "information."}, + {"-i", "Run in wizard mode.", + "Wizard mode runs cmake interactively without a GUI. The user is " + "prompted to answer questions about the project configuration. " + "The answers are used to set cmake cache values."}, + {"-L[A][H]", "List non-advanced cached variables.", + "List cache variables will run CMake and list all the variables from the " + "CMake cache that are not marked as INTERNAL or ADVANCED. This will " + "effectively display current CMake settings, which can be then changed " + "with -D option. Changing some of the variable may result in more " + "variables being created. If A is specified, then it will display also " + "advanced variables. If H is specified, it will also display help for " + "each variable."}, + {"-N", "View mode only.", + "Only load the cache. Do not actually run configure and generate steps."}, + {"-P ", "Process script mode.", + "Process the given cmake file as a script written in the CMake language. " + "No configure or generate step is performed and the cache is not" + " modified. If variables are defined using -D, this must be done " + "before the -P argument."}, + {"--graphviz=[file]", "Generate graphviz of dependencies.", + "Generate a graphviz input file that will contain all the library and " + "executable dependencies in the project."}, + {"--system-information [file]", "Dump information about this system.", + "Dump a wide range of information about the current system. If run " + "from the top of a binary tree for a CMake project it will dump " + "additional information such as the cache, log files etc."}, + {"--debug-trycompile", "Do not delete the try compile directories..", + "Do not delete the files and directories created for try_compile calls. " + "This is useful in debugging failed try_compiles."}, + {"--debug-output", "Put cmake in a debug mode.", + "Print extra stuff during the cmake run like stack traces with " + "message(send_error ) calls."}, + {"--help-command cmd [file]", "Print help for a single command and exit.", + "Full documentation specific to the given command is displayed. " + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-command-list [file]", "List available listfile commands and exit.", + "The list contains all commands for which help may be obtained by using " + "the --help-command argument followed by a command name. " + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-commands [file]", "Print help for all commands and exit.", + "Full documentation specific for all current command is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-compatcommands [file]", "Print help for compatibility commands. ", + "Full documentation specific for all compatibility commands is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-module module [file]", "Print help for a single module and exit.", + "Full documentation specific to the given module is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-module-list [file]", "List available modules and exit.", + "The list contains all modules for which help may be obtained by using " + "the --help-module argument followed by a module name. " + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-modules [file]", "Print help for all modules and exit.", + "Full documentation for all modules is displayed. " + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-custom-modules [file]" , "Print help for all custom modules and " + "exit.", + "Full documentation for all custom modules is displayed. " + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-property prop [file]", + "Print help for a single property and exit.", + "Full documentation specific to the given property is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-property-list [file]", "List available properties and exit.", + "The list contains all properties for which help may be obtained by using " + "the --help-property argument followed by a property name. If a file is " + "specified, the help is written into it." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-properties [file]", "Print help for all properties and exit.", + "Full documentation for all properties is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-variable var [file]", + "Print help for a single variable and exit.", + "Full documentation specific to the given variable is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-variable-list [file]", "List documented variables and exit.", + "The list contains all variables for which help may be obtained by using " + "the --help-variable argument followed by a variable name. If a file is " + "specified, the help is written into it." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {"--help-variables [file]", "Print help for all variables and exit.", + "Full documentation for all variables is displayed." + "If a file is specified, the documentation is written into and the output " + "format is determined depending on the filename suffix. Supported are man " + "page, HTML, DocBook and plain text."}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationSeeAlso[][3] = +{ + {0, "ccmake", 0}, + {0, "cpack", 0}, + {0, "ctest", 0}, + {0, "cmakecommands", 0}, + {0, "cmakecompat", 0}, + {0, "cmakemodules", 0}, + {0, "cmakeprops", 0}, + {0, "cmakevars", 0}, + {0, 0, 0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationNOTE[][3] = +{ + {0, + "CMake no longer configures a project when run with no arguments. " + "In order to configure the project in the current directory, run\n" + " cmake .", 0}, + {0,0,0} +}; +#endif + +int do_cmake(int ac, char** av); + +static cmMakefile* cmakemainGetMakefile(void *clientdata) +{ + cmake* cm = (cmake *)clientdata; + if(cm && cm->GetDebugOutput()) + { + cmGlobalGenerator* gg=cm->GetGlobalGenerator(); + if (gg) + { + cmLocalGenerator* lg=gg->GetCurrentLocalGenerator(); + if (lg) + { + cmMakefile* mf = lg->GetMakefile(); + return mf; + } + } + } + return 0; +} + +static std::string cmakemainGetStack(void *clientdata) +{ + std::string msg; + cmMakefile* mf=cmakemainGetMakefile(clientdata); + if (mf) + { + msg = mf->GetListFileStack(); + if (!msg.empty()) + { + msg = "\n Called from: " + msg; + } + } + + return msg; +} + +static void cmakemainErrorCallback(const char* m, const char*, bool&, + void *clientdata) +{ + std::cerr << m << cmakemainGetStack(clientdata) << std::endl << std::flush; +} + +static void cmakemainProgressCallback(const char *m, float prog, + void* clientdata) +{ + cmMakefile* mf = cmakemainGetMakefile(clientdata); + std::string dir; + if ((mf) && (strstr(m, "Configuring")==m) && (prog<0)) + { + dir = " "; + dir += mf->GetCurrentDirectory(); + } + else if ((mf) && (strstr(m, "Generating")==m)) + { + dir = " "; + dir += mf->GetCurrentOutputDirectory(); + } + + if ((prog < 0) || (!dir.empty())) + { + std::cout << "-- " << m << dir << cmakemainGetStack(clientdata)< args; + for(int i =0; i < ac; ++i) + { + args.push_back(av[i]); + } + hcm.SetCacheArgs(args); + const char* modulePath = hcm.GetCacheDefinition("CMAKE_MODULE_PATH"); + if (modulePath) + { + doc.SetCMakeModulePath(modulePath); + } + + std::vector commands; + std::vector policies; + std::vector compatCommands; + std::vector generators; + std::map propDocs; + + hcm.GetPolicyDocumentation(policies); + hcm.GetCommandDocumentation(commands, true, false); + hcm.GetCommandDocumentation(compatCommands, false, true); + hcm.GetPropertiesDocumentation(propDocs); + hcm.GetGeneratorDocumentation(generators); + + doc.SetName("cmake"); + doc.SetSection("Name",cmDocumentationName); + doc.SetSection("Usage",cmDocumentationUsage); + doc.SetSection("Description",cmDocumentationDescription); + doc.AppendSection("Generators",generators); + doc.PrependSection("Options",cmDocumentationOptions); + doc.SetSection("Commands",commands); + doc.SetSection("Policies",policies); + doc.AppendSection("Compatibility Commands",compatCommands); + doc.SetSections(propDocs); + + cmDocumentationEntry e; + e.Brief = + "variables defined by cmake, that give information about the project, " + "and cmake"; + doc.PrependSection("Variables that Provide Information",e); + + doc.SetSeeAlsoList(cmDocumentationSeeAlso); + int result = doc.PrintRequestedDocumentation(std::cout)? 0:1; + + // If we were run with no arguments, but a CMakeLists.txt file + // exists, the user may have been trying to use the old behavior + // of cmake to build a project in-source. Print a message + // explaining the change to standard error and return an error + // condition in case the program is running from a script. + if((ac == 1) && cmSystemTools::FileExists("CMakeLists.txt")) + { + doc.ClearSections(); + doc.SetSection("NOTE", cmDocumentationNOTE); + doc.Print(cmDocumentation::UsageForm, std::cerr); + return 1; + } + return result; + } +#else + if ( nocwd || ac == 1 ) + { + std::cout << + "Bootstrap CMake should not be used outside CMake build process." + << std::endl; + return 0; + } +#endif + + bool wiz = false; + bool sysinfo = false; + bool command = false; + bool list_cached = false; + bool list_all_cached = false; + bool list_help = false; + bool view_only = false; + bool script_mode = false; + std::vector args; + for(int i =0; i < ac; ++i) + { + if(strcmp(av[i], "-i") == 0) + { + wiz = true; + } + else if(!command && strcmp(av[i], "--system-information") == 0) + { + sysinfo = true; + } + // if command has already been set, then + // do not eat the -E + else if (!command && strcmp(av[i], "-E") == 0) + { + command = true; + } + else if (strcmp(av[i], "-N") == 0) + { + view_only = true; + } + else if (strcmp(av[i], "-L") == 0) + { + list_cached = true; + } + else if (strcmp(av[i], "-LA") == 0) + { + list_all_cached = true; + } + else if (strcmp(av[i], "-LH") == 0) + { + list_cached = true; + list_help = true; + } + else if (strcmp(av[i], "-LAH") == 0) + { + list_all_cached = true; + list_help = true; + } + else if (strncmp(av[i], "-P", strlen("-P")) == 0) + { + if ( i == ac -1 ) + { + cmSystemTools::Error("No script specified for argument -P"); + } + else + { + script_mode = true; + args.push_back(av[i]); + i++; + args.push_back(av[i]); + } + } + else + { + args.push_back(av[i]); + } + } + + if(command) + { + int ret = cmake::ExecuteCMakeCommand(args); + return ret; + } + if (wiz) + { + cmakewizard wizard; + return wizard.RunWizard(args); + } + if (sysinfo) + { + cmake cm; + int ret = cm.GetSystemInformation(args); + return ret; + } + cmake cm; + cmSystemTools::SetErrorCallback(cmakemainErrorCallback, (void *)&cm); + cm.SetProgressCallback(cmakemainProgressCallback, (void *)&cm); + cm.SetScriptMode(script_mode); + + int res = cm.Run(args, view_only); + if ( list_cached || list_all_cached ) + { + cmCacheManager::CacheIterator it = + cm.GetCacheManager()->GetCacheIterator(); + std::cout << "-- Cache values" << std::endl; + for ( it.Begin(); !it.IsAtEnd(); it.Next() ) + { + cmCacheManager::CacheEntryType t = it.GetType(); + if ( t != cmCacheManager::INTERNAL && t != cmCacheManager::STATIC && + t != cmCacheManager::UNINITIALIZED ) + { + bool advanced = it.PropertyExists("ADVANCED"); + if ( list_all_cached || !advanced) + { + if ( list_help ) + { + std::cout << "// " << it.GetProperty("HELPSTRING") << std::endl; + } + std::cout << it.GetName() << ":" << + cmCacheManager::TypeToString(it.GetType()) + << "=" << it.GetValue() << std::endl; + if ( list_help ) + { + std::cout << std::endl; + } + } + } + } + } + + // Always return a non-negative value. Windows tools do not always + // interpret negative return values as errors. + if(res != 0) + { + return 1; + } + else + { + return 0; + } +} + diff --git a/Source/cmaketest.h.in b/Source/cmaketest.h.in new file mode 100644 index 000000000..7398598b0 --- /dev/null +++ b/Source/cmaketest.h.in @@ -0,0 +1,21 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmaketest.h.in,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.7 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#define CMAKE_BINARY_DIR "${CMake_BINARY_DIR}" +#define EXECUTABLE_OUTPUT_PATH "${EXECUTABLE_OUTPUT_PATH}" +#define MAKEPROGRAM "${MAKEPROGRAM}" +#define CMAKE_GENERATOR "${CMAKE_GENERATOR}" +#define DART_MAKECOMMAND "${MAKECOMMAND}" diff --git a/Source/cmakewizard.cxx b/Source/cmakewizard.cxx new file mode 100644 index 000000000..c6307cade --- /dev/null +++ b/Source/cmakewizard.cxx @@ -0,0 +1,159 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmakewizard.cxx,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:07 $ + Version: $Revision: 1.23 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmakewizard.h" +#include "cmake.h" +#include "cmCacheManager.h" + +cmakewizard::cmakewizard() +{ + this->ShowAdvanced = false; +} + + +void cmakewizard::AskUser(const char* key, + cmCacheManager::CacheIterator& iter) +{ + printf("Variable Name: %s\n", key); + const char* helpstring = iter.GetProperty("HELPSTRING"); + printf("Description: %s\n", (helpstring?helpstring:"(none)")); + printf("Current Value: %s\n", iter.GetValue()); + printf("New Value (Enter to keep current value): "); + char buffer[4096]; + buffer[0] = 0; + fgets(buffer, sizeof(buffer)-1, stdin); + + if(strlen(buffer) > 0) + { + std::string sbuffer = buffer; + std::string::size_type pos = sbuffer.find_last_not_of(" \n\r\t"); + std::string value = ""; + if ( pos != std::string::npos ) + { + value = sbuffer.substr(0, pos+1); + } + + if ( value.size() > 0 ) + { + if(iter.GetType() == cmCacheManager::PATH || + iter.GetType() == cmCacheManager::FILEPATH) + { + cmSystemTools::ConvertToUnixSlashes(value); + } + if(iter.GetType() == cmCacheManager::BOOL) + { + if(!cmSystemTools::IsOn(value.c_str())) + { + value = "OFF"; + } + } + iter.SetValue(value.c_str()); + } + } + printf("\n"); +} + +bool cmakewizard::AskAdvanced() +{ + printf("Would you like to see advanced options? [No]:"); + char buffer[4096]; + buffer[0] = 0; + fgets(buffer, sizeof(buffer)-1, stdin); + if(buffer[0]) + { + if(buffer[0] == 'y' || buffer[0] == 'Y') + { + return true; + } + } + return false; +} + + +void cmakewizard::ShowMessage(const char* m) +{ + printf("%s\n", m); +} + + + +int cmakewizard::RunWizard(std::vector const& args) +{ + this->ShowAdvanced = this->AskAdvanced(); + cmSystemTools::DisableRunCommandOutput(); + cmake make; + make.SetArgs(args); + make.SetCMakeCommand(args[0].c_str()); + make.LoadCache(); + make.SetCacheArgs(args); + std::map askedCache; + bool asked = false; + // continue asking questions until no new questions are asked + do + { + asked = false; + // run cmake + this->ShowMessage( + "Please wait while cmake processes CMakeLists.txt files....\n"); + + make.Configure(); + this->ShowMessage("\n"); + // load the cache from disk + cmCacheManager *cachem = make.GetCacheManager(); + cachem->LoadCache(make.GetHomeOutputDirectory()); + cmCacheManager::CacheIterator i = cachem->NewIterator(); + // iterate over all entries in the cache + for(;!i.IsAtEnd(); i.Next()) + { + std::string key = i.GetName(); + if( i.GetType() == cmCacheManager::INTERNAL || + i.GetType() == cmCacheManager::STATIC || + i.GetType() == cmCacheManager::UNINITIALIZED ) + { + continue; + } + if(askedCache.count(key)) + { + std::string& e = askedCache.find(key)->second; + if(e != i.GetValue()) + { + if(this->ShowAdvanced || !i.GetPropertyAsBool("ADVANCED")) + { + this->AskUser(key.c_str(), i); + asked = true; + } + } + } + else + { + if(this->ShowAdvanced || !i.GetPropertyAsBool("ADVANCED")) + { + this->AskUser(key.c_str(), i); + asked = true; + } + } + askedCache[key] = i.GetValue(); + } + cachem->SaveCache(make.GetHomeOutputDirectory()); + } + while(asked); + if(make.Generate() == 0) + { + this->ShowMessage("CMake complete, run make to build project.\n"); + return 0; + } + return 1; +} diff --git a/Source/cmakewizard.h b/Source/cmakewizard.h new file mode 100644 index 000000000..79f8afb7a --- /dev/null +++ b/Source/cmakewizard.h @@ -0,0 +1,47 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmakewizard.h,v $ + Language: C++ + Date: $Date: 2006-03-15 16:02:08 $ + Version: $Revision: 1.14 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ + + +#include "cmMakefile.h" + +class cmakewizard +{ +public: + cmakewizard(); + virtual ~cmakewizard() {} + /** + * Prompt the user to see if they want to see advanced entries. + */ + virtual bool AskAdvanced(); + + /** + * Prompt the User for a new value for key, the answer is put in entry. + */ + virtual void AskUser(const char* key, cmCacheManager::CacheIterator& iter); + ///! Show a message to wait for cmake to run. + virtual void ShowMessage(const char*); + + /** + * Run cmake in wizard mode. This will coninue to ask the user questions + * until there are no more entries in the cache. + */ + int RunWizard(std::vectorconst& args); + +private: + bool ShowAdvanced; +}; + diff --git a/Source/cmakexbuild.cxx b/Source/cmakexbuild.cxx new file mode 100755 index 000000000..4206a967c --- /dev/null +++ b/Source/cmakexbuild.cxx @@ -0,0 +1,97 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmakexbuild.cxx,v $ + Language: C++ + Date: $Date: 2007-07-27 14:55:24 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include +#include "cmStandardIncludes.h" +#include "cmSystemTools.h" + +// This is a wrapper program for xcodebuild +// it calls xcodebuild, and does two things +// it removes much of the output, all the setevn +// stuff. Also, it checks for the text file busy +// error, and re-runs xcodebuild until that error does +// not show up. + +int RunXCode(std::vector& argv, bool& hitbug) +{ + hitbug = false; + cmsysProcess* cp = cmsysProcess_New(); + cmsysProcess_SetCommand(cp, &*argv.begin()); + cmsysProcess_SetTimeout(cp, 0); + cmsysProcess_Execute(cp); + std::vector out; + std::vector err; + std::string line; + int pipe = cmSystemTools::WaitForLine(cp, line, 100.0, out, err); + while(pipe != cmsysProcess_Pipe_None) + { + if(line.find("/bin/sh: bad interpreter: Text file busy") + != line.npos) + { + hitbug = true; + std::cerr << "Hit xcodebuild bug : " << line << "\n"; + } + // if the bug is hit, no more output should be generated + // because it may contain bogus errors + // also remove all output with setenv in it to tone down + // the verbosity of xcodebuild + if(!hitbug && (line.find("setenv") == line.npos)) + { + if(pipe == cmsysProcess_Pipe_STDERR) + { + std::cerr << line << "\n"; + } + else if(pipe == cmsysProcess_Pipe_STDOUT) + { + std::cout << line << "\n"; + } + } + pipe = cmSystemTools::WaitForLine(cp, line, 100, out, err); + } + cmsysProcess_WaitForExit(cp, 0); + if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exited) + { + return cmsysProcess_GetExitValue(cp); + } + if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error) + { + return -1; + } + return -1; +} + +int main(int ac, char*av[]) +{ + std::vector argv; + argv.push_back("xcodebuild"); + for(int i =1; i < ac; i++) + { + argv.push_back(av[i]); + } + argv.push_back(0); + bool hitbug = true; + int ret = 0; + while(hitbug) + { + ret = RunXCode(argv, hitbug); + } + if(ret < 0) + { + return 255; + } + return ret; +} + diff --git a/Source/cmw9xcom.cxx b/Source/cmw9xcom.cxx new file mode 100644 index 000000000..54ba9dcd0 --- /dev/null +++ b/Source/cmw9xcom.cxx @@ -0,0 +1,50 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: cmw9xcom.cxx,v $ + Language: C++ + Date: $Date: 2002-12-11 16:49:08 $ + Version: $Revision: 1.5 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmSystemTools.h" +#include "cmWin32ProcessExecution.h" + +// this is a test driver program for cmake. +int main (int argc, char *argv[]) +{ + cmSystemTools::EnableMSVCDebugHook(); + if ( argc <= 1 ) + { + std::cerr << "Usage: " << argv[0] << " executable" << std::endl; + return 1; + } + std::string arg = argv[1]; + if ( (arg.find_first_of(" ") != arg.npos) && + (arg.find_first_of("\"") == arg.npos) ) + { + arg = "\"" + arg + "\""; + } + std::string command = arg; + int cc; + for ( cc = 2; cc < argc; cc ++ ) + { + std::string arg = argv[cc]; + if ( (arg.find_first_of(" ") != arg.npos) && + (arg.find_first_of("\"") == arg.npos) ) + { + arg = "\"" + arg + "\""; + } + command += " "; + command += arg; + } + + return cmWin32ProcessExecution::Windows9xHack(command.c_str()); +} diff --git a/Source/ctest.cxx b/Source/ctest.cxx new file mode 100644 index 000000000..bcc0aa902 --- /dev/null +++ b/Source/ctest.cxx @@ -0,0 +1,279 @@ +/*========================================================================= + + Program: CMake - Cross-Platform Makefile Generator + Module: $RCSfile: ctest.cxx,v $ + Language: C++ + Date: $Date: 2008-01-31 16:43:44 $ + Version: $Revision: 1.102 $ + + Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. + See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#include "cmCTest.h" +#include "cmSystemTools.h" + +// Need these for documentation support. +#include "cmake.h" +#include "cmDocumentation.h" + +#include "CTest/cmCTestScriptHandler.h" +//---------------------------------------------------------------------------- +static const char * cmDocumentationName[][3] = +{ + {0, + " ctest - Testing driver provided by CMake.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationUsage[][3] = +{ + {0, + " ctest [options]", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationDescription[][3] = +{ + {0, + "The \"ctest\" executable is the CMake test driver program. " + "CMake-generated build trees created for projects that use " + "the ENABLE_TESTING and ADD_TEST commands have testing support. " + "This program will run the tests and report results.", 0}, + {0,0,0} +}; + +//---------------------------------------------------------------------------- +static const char * cmDocumentationOptions[][3] = +{ + {"-C , --build-config ", "Choose configuration to test.", + "Some CMake-generated build trees can have multiple build configurations " + "in the same tree. This option can be used to specify which one should " + "be tested. Example configurations are \"Debug\" and \"Release\"."}, + {"-V,--verbose", "Enable verbose output from tests.", + "Test output is normally suppressed and only summary information is " + "displayed. This option will show all test output."}, + {"-VV,--extra-verbose", "Enable more verbose output from tests.", + "Test output is normally suppressed and only summary information is " + "displayed. This option will show even more test output."}, + {"--debug", "Displaying more verbose internals of CTest.", + "This feature will result in large number of output that is mostly " + "useful for debugging dashboard problems."}, + {"-Q,--quiet", "Make ctest quiet.", + "This option will suppress all the output. The output log file will " + "still be generated if the --output-log is specified. Options such " + "as --verbose, --extra-verbose, and --debug are ignored if --quiet is " + "specified."}, + {"-O , --output-log ", "Output to log file", + "This option tells ctest to write all its output to a log file."}, + {"-N,--show-only", "Disable actual execution of tests.", + "This option tells ctest to list the tests that would be run but not " + "actually run them. Useful in conjunction with the -R and -E options."}, + {"-R , --tests-regex ", "Run tests matching regular " + "expression.", + "This option tells ctest to run only the tests whose names match the " + "given regular expression."}, + {"-E , --exclude-regex ", "Exclude tests matching regular " + "expression.", + "This option tells ctest to NOT run the tests whose names match the " + "given regular expression."}, + {"-D , --dashboard ", "Execute dashboard test", + "This option tells ctest to perform act as a Dart client and perform " + "a dashboard test. All tests are , where Mode can be " + "Experimental, Nightly, and Continuous, and Test can be Start, Update, " + "Configure, Build, Test, Coverage, and Submit."}, + {"-M , --test-model ", "Sets the model for a dashboard", + "This option tells ctest to act as a Dart client " + "where the TestModel can be Experimental, " + "Nightly, and Continuous. Combining -M and -T is similar to -D"}, + {"-T , --test-action ", "Sets the dashboard action to " + "perform", + "This option tells ctest to act as a Dart client " + "and perform some action such as start, build, test etc. " + "Combining -M and -T is similar to -D"}, + {"--track ", "Specify the track to submit dashboard to", + "Submit dashboard to specified track instead of default one. By " + "default, the dashboard is submitted to Nightly, Experimental, or " + "Continuous track, but by specifying this option, the track can be " + "arbitrary."}, + {"-S